mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-01 19:16:44 +01:00
fix sudden fadeout in about screen when it wasn't faded in yet
This commit is contained in:
parent
26ecdcb532
commit
89c4d4096d
1 changed files with 7 additions and 6 deletions
13
src/about.c
13
src/about.c
|
@ -183,12 +183,13 @@ void About_Unload(struct Game *game) {
|
||||||
al_draw_bitmap_region(game->about.text_bitmap, 0, game->about.x*al_get_bitmap_height(game->about.text_bitmap), al_get_bitmap_width(game->about.text_bitmap), al_get_display_height(game->display)*0.8, al_get_display_width(game->display)*0.5, al_get_display_height(game->display)*0.1, 0);
|
al_draw_bitmap_region(game->about.text_bitmap, 0, game->about.x*al_get_bitmap_height(game->about.text_bitmap), al_get_bitmap_width(game->about.text_bitmap), al_get_display_height(game->display)*0.8, al_get_display_width(game->display)*0.5, al_get_display_height(game->display)*0.1, 0);
|
||||||
al_set_target_bitmap(al_get_backbuffer(game->display));
|
al_set_target_bitmap(al_get_backbuffer(game->display));
|
||||||
int fadeloop;
|
int fadeloop;
|
||||||
for(fadeloop=255; fadeloop>=0; fadeloop-=tps(game, 600)){
|
if (game->about.fadeloop!=0)
|
||||||
al_wait_for_event(game->event_queue, &ev);
|
for(fadeloop=255; fadeloop>=0; fadeloop-=tps(game, 600)){
|
||||||
al_draw_tinted_bitmap(game->about.fade_bitmap, al_map_rgba_f(fadeloop/255.0,fadeloop/255.0,fadeloop/255.0,1), 0, 0, 0);
|
al_wait_for_event(game->event_queue, &ev);
|
||||||
DrawConsole(game);
|
al_draw_tinted_bitmap(game->about.fade_bitmap, al_map_rgba_f(fadeloop/255.0,fadeloop/255.0,fadeloop/255.0,1), 0, 0, 0);
|
||||||
al_flip_display();
|
DrawConsole(game);
|
||||||
}
|
al_flip_display();
|
||||||
|
}
|
||||||
al_destroy_bitmap(game->about.image);
|
al_destroy_bitmap(game->about.image);
|
||||||
al_destroy_bitmap(game->about.letter);
|
al_destroy_bitmap(game->about.letter);
|
||||||
al_destroy_bitmap(game->about.fade_bitmap);
|
al_destroy_bitmap(game->about.fade_bitmap);
|
||||||
|
|
Loading…
Reference in a new issue