make showing loading screen on launch configurable

This commit is contained in:
Sebastian Krzyszkowiak 2016-08-20 03:32:32 +02:00
parent 63451eb858
commit 97d62e4c04
2 changed files with 6 additions and 3 deletions

View file

@ -181,6 +181,8 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char*
game->shuttingdown = false; game->shuttingdown = false;
game->restart = false; game->restart = false;
game->show_loading_on_launch = false;
return game; return game;
} }
@ -203,9 +205,8 @@ SYMBOL_EXPORT int libsuperderpy_run(struct Game *game) {
struct Gamestate *tmp = game->_priv.gamestates; struct Gamestate *tmp = game->_priv.gamestates;
while (tmp) { while (tmp) {
// don't show loading screen on init // don't show loading screen on init if requested
// TODO: make it configurable tmp->showLoading = game->show_loading_on_launch;
tmp->showLoading = false;
tmp = tmp->next; tmp = tmp->next;
} }

View file

@ -120,6 +120,8 @@ struct Game {
bool shuttingdown; /*!< If true then shut down of the game is pending. */ bool shuttingdown; /*!< If true then shut down of the game is pending. */
bool restart; /*!< If true then restart of the game is pending. */ bool restart; /*!< If true then restart of the game is pending. */
bool show_loading_on_launch;
const char* name; const char* name;
LIBSUPERDERPY_DATA_TYPE *data; LIBSUPERDERPY_DATA_TYPE *data;