mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-01 02:56:43 +01:00
use NotPreservedBitmap for game console
This commit is contained in:
parent
d3f876097f
commit
7241476886
2 changed files with 4 additions and 2 deletions
|
@ -128,8 +128,8 @@ SYMBOL_INTERNAL void Console_Load(struct Game *game) {
|
|||
if (!game->viewport.integer_scaling) {
|
||||
width = (al_get_display_width(game->display) / (float)game->viewport.width) * game->viewport.width;
|
||||
}
|
||||
game->_priv.console = al_create_bitmap(width, al_get_font_line_height(game->_priv.font_console)*5);
|
||||
game->_priv.console_tmp = al_create_bitmap(width, al_get_font_line_height(game->_priv.font_console)*5);
|
||||
game->_priv.console = CreateNotPreservedBitmap(width, al_get_font_line_height(game->_priv.font_console)*5);
|
||||
game->_priv.console_tmp = CreateNotPreservedBitmap(width, al_get_font_line_height(game->_priv.font_console)*5);
|
||||
al_set_target_bitmap(game->_priv.console);
|
||||
al_clear_to_color(al_map_rgba(0,0,0,80));
|
||||
al_set_target_bitmap(al_get_backbuffer(game->display));
|
||||
|
|
|
@ -420,11 +420,13 @@ SYMBOL_EXPORT int libsuperderpy_run(struct Game *game) {
|
|||
al_stop_timer(game->_priv.timer);
|
||||
al_detach_voice(game->audio.v);
|
||||
FreezeGamestates(game);
|
||||
if (game->_priv.console) Console_Unload(game);
|
||||
al_acknowledge_drawing_halt(game->display);
|
||||
}
|
||||
else if(ev.type == ALLEGRO_EVENT_DISPLAY_RESUME_DRAWING) {
|
||||
game->_priv.draw = true;
|
||||
al_acknowledge_drawing_resume(game->display);
|
||||
Console_Load(game);
|
||||
PrintConsole(game, "Engine resumed.");
|
||||
ReloadGamestates(game);
|
||||
UnfreezeGamestates(game);
|
||||
|
|
Loading…
Reference in a new issue