diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-07-03 21:40:42 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-07-03 21:40:42 +0100 |
commit | 4ef8cf8b3d9ad5235aa858a68f70a8aaf2b356da (patch) | |
tree | 5e84fc575df54a29097c9356ccc2e39988990dfd /src/game.c | |
parent | a225a6cf64b4c011fea851acb7dd424a1e957655 (diff) | |
download | gold-mine-run-4ef8cf8b3d9ad5235aa858a68f70a8aaf2b356da.tar.gz gold-mine-run-4ef8cf8b3d9ad5235aa858a68f70a8aaf2b356da.zip |
Sound queue
This is to queue sounds and play them when we update the screen, so the
sounds are synced with the action.
It is required because the MikMod_Update function updates on the clock
int, and is not synced with the VGA's vsync.
Diffstat (limited to 'src/game.c')
-rw-r--r-- | src/game.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -87,7 +87,7 @@ static void hud_render() sprintf(b, "%02d", time); put_text(172, 4, b, time > 10 ? 1 : 15); if (!gameover && time <= 10) - sound_play_efx(EFX_TIME); + sound_queue_efx(EFX_TIME); } if (hud & HUD_STAGE) @@ -193,7 +193,9 @@ void run_game() player_draw(); wait_vsync(); + blit_update(); + sound_play_queue(); if (gameover) { |