Skip to content

Simple library that loads and parses Animated OBJ files written in C89

License

Notifications You must be signed in to change notification settings

vasall/amoloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

amoloader

A simple library that loads and parses Animated OBJ files written in C89

Disclaimer: Currently the library can only load models generated by editamo

Compiling

To compile a static library, type

make

The outputted file has the name libamoloader.a by default

if you want to check the functionality of the library, run

make check

You can compare the output to tests/cube.amo
To install the library in the /usr path, run

make install

How to use

To include amoloader into your project:

  1. add #include <amoloader.h> to your .c file
  2. In your Makefile, add -L. -lamoloader to your compile instruction

The library has only two functions:

  • struct amoloader_data *amo_load(const char *path, int *count)
  • int amo_destroy(struct amoloader_data *data, int count)

The amoloader_data struct contains the parsed data (See amoloader.h for more details)

Example

#include "amoloader.h"

int main() {
    int count;

    struct amoloader_data *data = amo_load("path/to/amo_file.amo", &count);

    if(data == NULL) {
        fprintf(stderr, "Couldn't load amo file\n");
        return -1;
    }

    /* Do stuff with the data */

    amo_destroy(data, count);
    return 0;
}

License

This project is licensed under the zlib license. See LICENSE for more details

About

Simple library that loads and parses Animated OBJ files written in C89

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published