I've already explained reasons behind this in #15. This PR does the following:
Moves all static non-const vars into struct micromod_obj
Replaces functions which were using them with their _obj versions which accept pointer to struct as first argument
Structs are now parts of header so they are renamed with prefix micromod_
Adds include guard
Adds macro for API version
Ports mod2wav and sdlplayer to new API
Minor changes to code which doesn't affect anything
It is compatible with old version. To keep it this way there's global instance of struct micromod_obj and wrappers around new functions which use it. Old functions are marked with __attribute__ ((deprecated)) but are working.
What this PR doesn't do:
Updates w2player to new API becuase I'm on linux and can't test it anyways
Changes MICROMOD_VERSION because I'm unsure what is correct new value
I've already explained reasons behind this in #15. This PR does the following:
static
non-const vars intostruct micromod_obj
_obj
versions which accept pointer to struct as first argumentmicromod_
mod2wav
andsdlplayer
to new APIIt is compatible with old version. To keep it this way there's global instance of
struct micromod_obj
and wrappers around new functions which use it. Old functions are marked with__attribute__ ((deprecated))
but are working.What this PR doesn't do:
w2player
to new API becuase I'm on linux and can't test it anywaysMICROMOD_VERSION
because I'm unsure what is correct new value