mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-01 11:06:44 +01:00
Add more PrintConsoles around gamestate handling.
This commit is contained in:
parent
40bda569b9
commit
993a6fd2e7
1 changed files with 6 additions and 0 deletions
|
@ -362,6 +362,7 @@ SYMBOL_INTERNAL void libsuperderpy_mainloop(void* g) {
|
||||||
(*tmp->api->Gamestate_Stop)(game, tmp->data);
|
(*tmp->api->Gamestate_Stop)(game, tmp->data);
|
||||||
tmp->started = false;
|
tmp->started = false;
|
||||||
tmp->pending_stop = false;
|
tmp->pending_stop = false;
|
||||||
|
PrintConsole(game, "Gamestate \"%s\" stopped successfully.", tmp->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tmp->pending_load) { game->_priv.loading.toLoad++; }
|
if (tmp->pending_load) { game->_priv.loading.toLoad++; }
|
||||||
|
@ -379,6 +380,7 @@ SYMBOL_INTERNAL void libsuperderpy_mainloop(void* g) {
|
||||||
game->_priv.current_gamestate = tmp;
|
game->_priv.current_gamestate = tmp;
|
||||||
(*tmp->api->Gamestate_Unload)(game, tmp->data);
|
(*tmp->api->Gamestate_Unload)(game, tmp->data);
|
||||||
al_resume_timer(game->_priv.timer);
|
al_resume_timer(game->_priv.timer);
|
||||||
|
PrintConsole(game, "Gamestate \"%s\" unloaded successfully.", tmp->name);
|
||||||
}
|
}
|
||||||
if (tmp->pending_load) {
|
if (tmp->pending_load) {
|
||||||
al_stop_timer(game->_priv.timer);
|
al_stop_timer(game->_priv.timer);
|
||||||
|
@ -431,6 +433,7 @@ SYMBOL_INTERNAL void libsuperderpy_mainloop(void* g) {
|
||||||
|
|
||||||
al_set_new_bitmap_flags(data.bitmap_flags);
|
al_set_new_bitmap_flags(data.bitmap_flags);
|
||||||
ReloadShaders(game, false);
|
ReloadShaders(game, false);
|
||||||
|
PrintConsole(game, "Gamestate \"%s\" loaded successfully.", tmp->name);
|
||||||
game->_priv.loading.loaded++;
|
game->_priv.loading.loaded++;
|
||||||
|
|
||||||
tmp->loaded = true;
|
tmp->loaded = true;
|
||||||
|
@ -458,6 +461,7 @@ SYMBOL_INTERNAL void libsuperderpy_mainloop(void* g) {
|
||||||
tmp->pending_start = false;
|
tmp->pending_start = false;
|
||||||
(*tmp->api->Gamestate_Start)(game, tmp->data);
|
(*tmp->api->Gamestate_Start)(game, tmp->data);
|
||||||
al_resume_timer(game->_priv.timer);
|
al_resume_timer(game->_priv.timer);
|
||||||
|
PrintConsole(game, "Gamestate \"%s\" started successfully.", tmp->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((tmp->started) || (tmp->pending_start) || (tmp->pending_load)) {
|
if ((tmp->started) || (tmp->pending_start) || (tmp->pending_load)) {
|
||||||
|
@ -620,12 +624,14 @@ SYMBOL_EXPORT void libsuperderpy_destroy(struct Game* game) {
|
||||||
game->_priv.current_gamestate = tmp;
|
game->_priv.current_gamestate = tmp;
|
||||||
(*tmp->api->Gamestate_Stop)(game, tmp->data);
|
(*tmp->api->Gamestate_Stop)(game, tmp->data);
|
||||||
tmp->started = false;
|
tmp->started = false;
|
||||||
|
PrintConsole(game, "Gamestate \"%s\" stopped successfully.", tmp->name);
|
||||||
}
|
}
|
||||||
if (tmp->loaded) {
|
if (tmp->loaded) {
|
||||||
PrintConsole(game, "Unloading gamestate \"%s\"...", tmp->name);
|
PrintConsole(game, "Unloading gamestate \"%s\"...", tmp->name);
|
||||||
game->_priv.current_gamestate = tmp;
|
game->_priv.current_gamestate = tmp;
|
||||||
(*tmp->api->Gamestate_Unload)(game, tmp->data);
|
(*tmp->api->Gamestate_Unload)(game, tmp->data);
|
||||||
tmp->loaded = false;
|
tmp->loaded = false;
|
||||||
|
PrintConsole(game, "Gamestate \"%s\" unloaded successfully.", tmp->name);
|
||||||
}
|
}
|
||||||
CloseGamestate(game, tmp);
|
CloseGamestate(game, tmp);
|
||||||
pom = tmp->next;
|
pom = tmp->next;
|
||||||
|
|
Loading…
Reference in a new issue