pea
developer
Hi there,
I apologise if this has been covered in another thread, I tried a search but when you don't know what to search for its pretty hard!
I don't know if this is specifically GP32 related, or if its C/C++ specific. Also note that there are other ways to achieve the same thing (e.g. scripting) but I'm asking about this particular method! Here goes:
Say I have a game, with functions that affect the game world:
And this is compiled into an fxe, how can I load in some user defined code (like a plugin) into the game, which may have many functions, and can also access these game_ functions?
If its not GP32 specific, please throw me a link or some keywords to look up on how to do this?
Cheers
I apologise if this has been covered in another thread, I tried a search but when you don't know what to search for its pretty hard!
I don't know if this is specifically GP32 related, or if its C/C++ specific. Also note that there are other ways to achieve the same thing (e.g. scripting) but I'm asking about this particular method! Here goes:
Say I have a game, with functions that affect the game world:
Code:
game_makeCharacterGlow()
game_increaseScoreBy()
game_goUpLevel()
Code:
void plugin_main( args ){
if (plugin_canIncreaseScore()){
game_makeCharacterGlow();
game_increaseScoreBy(100);
}
}
bool plugin_canIncreaseScore(){
...
}
If its not GP32 specific, please throw me a link or some keywords to look up on how to do this?
Cheers