From 8a66e228823b7e1ab3f994081832f548cac98a00 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Fri, 1 Jan 2021 13:17:08 +0000 Subject: ubox has a wait_for function :facepalm: --- game/src/aux.c | 9 --------- game/src/aux.h | 1 - game/src/main.c | 4 ++-- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/game/src/aux.c b/game/src/aux.c index 15fc2a4..b8864c6 100644 --- a/game/src/aux.c +++ b/game/src/aux.c @@ -16,12 +16,3 @@ void put_text(uint8_t x, uint8_t y, const uint8_t *text) while (*text) ubox_put_tile(x++, y, *text++ + 128 - 31); } - -/** - * Wait for `frames` frames. - */ -void wait_for(uint8_t frames) -{ - while (frames--) - ubox_wait(); -} diff --git a/game/src/aux.h b/game/src/aux.h index bf62d1a..64dfbbd 100644 --- a/game/src/aux.h +++ b/game/src/aux.h @@ -8,6 +8,5 @@ */ void put_text(uint8_t x, uint8_t y, const uint8_t *text); -void wait_for(uint8_t frames); #endif // _AUX_H diff --git a/game/src/main.c b/game/src/main.c index 1405356..23591ca 100644 --- a/game/src/main.c +++ b/game/src/main.c @@ -75,7 +75,7 @@ void draw_game_over() // play game over music mplayer_init(SONG, SONG_GAME_OVER); - wait_for(128); + ubox_wait_for(128); } void main() @@ -126,7 +126,7 @@ redraw_menu: if (ctl != UBOX_MSX_CTL_NONE) { mplayer_play_effect_p(EFX_START, EFX_CHAN_NO, 0); - wait_for(16); + ubox_wait_for(16); // play the game run_game(); -- cgit v1.2.3