mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-01 11:06:44 +01:00
implement frame skipping as debug feature
This commit is contained in:
parent
1db3134175
commit
6e27c1e3b5
1 changed files with 8 additions and 0 deletions
|
@ -411,6 +411,14 @@ int main(int argc, char **argv){
|
|||
if ((ev.type == ALLEGRO_EVENT_KEY_DOWN) && (ev.keyboard.keycode == ALLEGRO_KEY_TILDE)) {
|
||||
game.showconsole = !game.showconsole;
|
||||
}
|
||||
if ((game.debug) && (ev.type == ALLEGRO_EVENT_KEY_DOWN) && (ev.keyboard.keycode == ALLEGRO_KEY_F1)) {
|
||||
int i;
|
||||
for (i=0; i<512; i++) {
|
||||
DrawGameState(&game);
|
||||
}
|
||||
game.showconsole = true;
|
||||
PrintConsole(&game, "DEBUG: 512 frames skipped...");
|
||||
}
|
||||
KEYDOWN_STATE(GAMESTATE_PAUSE, Pause)
|
||||
KEYDOWN_STATE(GAMESTATE_MENU, Menu)
|
||||
KEYDOWN_STATE(GAMESTATE_LOADING, Loading)
|
||||
|
|
Loading…
Reference in a new issue