mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-01 11:06:44 +01:00
loading: call Gamestate_Logic
This commit is contained in:
parent
0af3d8b1d0
commit
a9c318dd78
1 changed files with 4 additions and 0 deletions
|
@ -401,12 +401,16 @@ SYMBOL_INTERNAL void libsuperderpy_mainloop(void* g) {
|
||||||
|
|
||||||
#ifndef LIBSUPERDERPY_SINGLE_THREAD
|
#ifndef LIBSUPERDERPY_SINGLE_THREAD
|
||||||
al_run_detached_thread(GamestateLoadingThread, &data);
|
al_run_detached_thread(GamestateLoadingThread, &data);
|
||||||
|
double time = al_get_time();
|
||||||
while (game->_priv.loading.inProgress) {
|
while (game->_priv.loading.inProgress) {
|
||||||
DrawGamestates(game);
|
DrawGamestates(game);
|
||||||
al_set_target_backbuffer(game->display);
|
al_set_target_backbuffer(game->display);
|
||||||
|
double delta = al_get_time() - time;
|
||||||
if (tmp->showLoading) {
|
if (tmp->showLoading) {
|
||||||
|
(*game->_priv.loading.gamestate->api->Gamestate_Logic)(game, game->_priv.loading.gamestate->data, delta);
|
||||||
(*game->_priv.loading.gamestate->api->Gamestate_Draw)(game, game->_priv.loading.gamestate->data);
|
(*game->_priv.loading.gamestate->api->Gamestate_Draw)(game, game->_priv.loading.gamestate->data);
|
||||||
}
|
}
|
||||||
|
time += delta;
|
||||||
DrawConsole(game);
|
DrawConsole(game);
|
||||||
al_flip_display();
|
al_flip_display();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue