mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-13 04:27:59 +01:00
show console when using speed cheats
This commit is contained in:
parent
cd3fbbccf0
commit
74bf535c07
1 changed files with 2 additions and 0 deletions
|
@ -617,12 +617,14 @@ int main(int argc, char **argv){
|
||||||
speed -= 10;
|
speed -= 10;
|
||||||
if (speed<10) speed = 10;
|
if (speed<10) speed = 10;
|
||||||
al_set_timer_speed(game.timer, ALLEGRO_BPS_TO_SECS(speed));
|
al_set_timer_speed(game.timer, ALLEGRO_BPS_TO_SECS(speed));
|
||||||
|
game.showconsole = true;
|
||||||
PrintConsole(&game, "DEBUG: Gameplay speed: %.2fx", speed/60.0);
|
PrintConsole(&game, "DEBUG: Gameplay speed: %.2fx", speed/60.0);
|
||||||
} else if ((game.debug) && (ev.type == ALLEGRO_EVENT_KEY_DOWN) && (ev.keyboard.keycode == ALLEGRO_KEY_F11)) {
|
} else if ((game.debug) && (ev.type == ALLEGRO_EVENT_KEY_DOWN) && (ev.keyboard.keycode == ALLEGRO_KEY_F11)) {
|
||||||
double speed = ALLEGRO_BPS_TO_SECS(al_get_timer_speed(game.timer)); // inverting
|
double speed = ALLEGRO_BPS_TO_SECS(al_get_timer_speed(game.timer)); // inverting
|
||||||
speed += 10;
|
speed += 10;
|
||||||
if (speed>600) speed = 600;
|
if (speed>600) speed = 600;
|
||||||
al_set_timer_speed(game.timer, ALLEGRO_BPS_TO_SECS(speed));
|
al_set_timer_speed(game.timer, ALLEGRO_BPS_TO_SECS(speed));
|
||||||
|
game.showconsole = true;
|
||||||
PrintConsole(&game, "DEBUG: Gameplay speed: %.2fx", speed/60.0);
|
PrintConsole(&game, "DEBUG: Gameplay speed: %.2fx", speed/60.0);
|
||||||
} else if ((game.debug) && (ev.type == ALLEGRO_EVENT_KEY_DOWN) && (ev.keyboard.keycode == ALLEGRO_KEY_F12)) {
|
} else if ((game.debug) && (ev.type == ALLEGRO_EVENT_KEY_DOWN) && (ev.keyboard.keycode == ALLEGRO_KEY_F12)) {
|
||||||
ALLEGRO_PATH *path = al_get_standard_path(ALLEGRO_USER_DOCUMENTS_PATH);
|
ALLEGRO_PATH *path = al_get_standard_path(ALLEGRO_USER_DOCUMENTS_PATH);
|
||||||
|
|
Loading…
Reference in a new issue