feat: add module template
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#include "module_version.h"
|
||||
#include <stdio.h>
|
||||
|
||||
/* on load */
|
||||
int stk_mod_init(void)
|
||||
{
|
||||
printf("my_module initialized!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* on unload/reload */
|
||||
void stk_mod_shutdown(void) { printf("my_module shut down.\n"); }
|
||||
|
||||
const char *stk_mod_name(void) { return "my_module"; }
|
||||
const char *stk_mod_version(void) { return MY_MODULE_VERSION_STRING; }
|
||||
const char *stk_mod_description(void) { return "TODO: describe this module"; }
|
||||
|
||||
/*
|
||||
* declares which other modules must be loaded first.
|
||||
* id = dependency's filename, minus extension.
|
||||
* layout must match stk_dep_t: id[64], version[32].
|
||||
* sentinel ("","") required, always last.
|
||||
*
|
||||
* =1.0.0 exact
|
||||
* >=1.0.0 minimum (default)
|
||||
* ^1.0.0 same major
|
||||
*/
|
||||
/*
|
||||
typedef struct {
|
||||
char id[64];
|
||||
char version[32];
|
||||
} dep_t;
|
||||
|
||||
dep_t stk_mod_deps[] = {
|
||||
{ "physics", ">=2.0.0" },
|
||||
{ "", "" }
|
||||
};
|
||||
*/
|
||||
Reference in New Issue
Block a user