mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-01 19:16:44 +01:00
display "Loading" when switching to new resolution
This commit is contained in:
parent
00f4c409e6
commit
9b33a0af12
2 changed files with 4 additions and 1 deletions
|
@ -382,7 +382,7 @@ int main(int argc, char **argv){
|
||||||
game.loadstate = GAMESTATE_LOADING;
|
game.loadstate = GAMESTATE_LOADING;
|
||||||
PreloadGameState(&game);
|
PreloadGameState(&game);
|
||||||
LoadGameState(&game);
|
LoadGameState(&game);
|
||||||
game.loadstate = GAMESTATE_LEVEL;
|
game.loadstate = GAMESTATE_MENU;
|
||||||
while(1) {
|
while(1) {
|
||||||
ALLEGRO_EVENT ev;
|
ALLEGRO_EVENT ev;
|
||||||
al_wait_for_event(game.event_queue, &ev);
|
al_wait_for_event(game.event_queue, &ev);
|
||||||
|
|
|
@ -45,6 +45,9 @@ int Pause_Keydown(struct Game *game, ALLEGRO_EVENT *ev) {
|
||||||
else al_show_mouse_cursor(game->display);
|
else al_show_mouse_cursor(game->display);
|
||||||
Shared_Unload(game);
|
Shared_Unload(game);
|
||||||
Shared_Load(game);
|
Shared_Load(game);
|
||||||
|
al_clear_to_color(al_map_rgb(0,0,0));
|
||||||
|
al_draw_text_with_shadow(game->font, al_map_rgb(255,255,255), al_get_display_width(game->display)*0.0234, al_get_display_height(game->display)*0.85, ALLEGRO_ALIGN_LEFT, "Loading...");
|
||||||
|
al_flip_display();
|
||||||
Loading_Unload(game);
|
Loading_Unload(game);
|
||||||
Loading_Load(game);
|
Loading_Load(game);
|
||||||
Menu_Unload(game);
|
Menu_Unload(game);
|
||||||
|
|
Loading…
Reference in a new issue