summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2021-01-01 13:17:08 +0000
committerJuan J. Martinez <jjm@usebox.net>2021-01-01 13:17:08 +0000
commit8a66e228823b7e1ab3f994081832f548cac98a00 (patch)
tree7adfba7a44643c0b94892609368ad95abb80d45a
parent2051dd34f2db962d6290d1f49fb879f626ce0c98 (diff)
downloadubox-msx-lib-8a66e228823b7e1ab3f994081832f548cac98a00.tar.gz
ubox-msx-lib-8a66e228823b7e1ab3f994081832f548cac98a00.zip
ubox has a wait_for function :facepalm:
-rw-r--r--game/src/aux.c9
-rw-r--r--game/src/aux.h1
-rw-r--r--game/src/main.c4
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();