mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-12 16:14:23 +01:00
add UnloadAllGamestates function
This commit is contained in:
parent
676ae31613
commit
cfb5cefff1
2 changed files with 9 additions and 0 deletions
|
@ -165,6 +165,14 @@ SYMBOL_EXPORT void ResumeGamestate(struct Game *game, const char* name) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SYMBOL_EXPORT void UnloadAllGamestates(struct Game *game) {
|
||||||
|
struct Gamestate *tmp = game->_priv.gamestates;
|
||||||
|
while (tmp) {
|
||||||
|
UnloadGamestate(game, tmp->name);
|
||||||
|
tmp = tmp->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SYMBOL_EXPORT void SwitchGamestate(struct Game *game, const char* current, const char* n) {
|
SYMBOL_EXPORT void SwitchGamestate(struct Game *game, const char* current, const char* n) {
|
||||||
StopGamestate(game, current);
|
StopGamestate(game, current);
|
||||||
UnloadGamestate(game, current);
|
UnloadGamestate(game, current);
|
||||||
|
|
|
@ -58,6 +58,7 @@ void StartGamestate(struct Game *game, const char* name);
|
||||||
void StopGamestate(struct Game *game, const char* name);
|
void StopGamestate(struct Game *game, const char* name);
|
||||||
void PauseGamestate(struct Game *game, const char* name);
|
void PauseGamestate(struct Game *game, const char* name);
|
||||||
void ResumeGamestate(struct Game *game, const char* name);
|
void ResumeGamestate(struct Game *game, const char* name);
|
||||||
|
void UnloadAllGamestates(struct Game *game);
|
||||||
void SwitchGamestate(struct Game *game, const char* current, const char* n);
|
void SwitchGamestate(struct Game *game, const char* current, const char* n);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue