diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-07-08 22:35:16 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-07-08 22:35:16 +0100 |
commit | 8871729a65615df0eab213bbbf942abe75771704 (patch) | |
tree | 34a4ab0f412c34383799e14816d1dfe288705085 /src/sound.c | |
parent | 5ae0b6490f5fd138f4cbf5c084680bb03b2fff05 (diff) | |
download | gold-mine-run-8871729a65615df0eab213bbbf942abe75771704.tar.gz gold-mine-run-8871729a65615df0eab213bbbf942abe75771704.zip |
Avoid drawing the whole screen on each frame
This allows supporting 386DX "just about" (there will be flickering).
Diffstat (limited to 'src/sound.c')
-rw-r--r-- | src/sound.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/sound.c b/src/sound.c index 871fcaa..c9e3b1c 100644 --- a/src/sound.c +++ b/src/sound.c @@ -30,11 +30,6 @@ static uint32_t voice = 0; static MODULE *music = NULL; -#define MAX_QUEUE 4 - -static uint8_t queue[MAX_QUEUE]; -static uint8_t queue_top; - uint8_t sound_init(uint8_t nosound) { MikMod_InitThreads(); @@ -71,8 +66,6 @@ uint8_t sound_init(uint8_t nosound) Player_Start(music); MikMod_EnableOutput(); - queue_top = 0; - return 1; } @@ -126,21 +119,3 @@ void sound_play_efx(uint8_t efxno) cur = efxno; voice = Sample_Play(efx[cur].s, 0, 0); } - -void sound_queue_efx(uint8_t efxno) -{ - if (queue_top >= MAX_QUEUE) - return; - - queue[queue_top++] = efxno; -} - -void sound_play_queue() -{ - while (queue_top > 0) - sound_play_efx(queue[--queue_top]); - - disable(); - MikMod_Update(); - enable(); -} |