From 131a454b62687224a2e0a98c05a456729cc00761 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 20 Jan 2019 23:55:01 -0500 Subject: add sound map --- src/sdl/main.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/sdl/main.c') diff --git a/src/sdl/main.c b/src/sdl/main.c index 53f2377..244d5ab 100644 --- a/src/sdl/main.c +++ b/src/sdl/main.c @@ -175,7 +175,7 @@ bump( const Uint32 ticks ) { draw_ctx->bump_ticks = ticks; - sound_play(sounds, ASSET_SOUND_HIT_1_WAV); + sound_play(sounds, SOUND_BUMP); } int main(int argc, char *argv[]) { @@ -308,7 +308,7 @@ int main(int argc, char *argv[]) { if (sok_ctx_move(&ctx, (sok_dir_t) action.data)) { if (sok_ctx_is_done(&ctx)) { // play sound - sound_play(sounds, ASSET_SOUND_POWERUP_3_WAV); + sound_play(sounds, SOUND_LEVEL_DONE); } } else { // move failed @@ -320,7 +320,7 @@ int main(int argc, char *argv[]) { case ACTION_UNDO: if (sok_ctx_undo(&ctx)) { // play sound - sound_play(sounds, ASSET_SOUND_HIT_1_WAV); + sound_play(sounds, SOUND_UNDO); } else { bump(&draw_ctx, sounds, ticks); warn("undo failed"); @@ -330,7 +330,7 @@ int main(int argc, char *argv[]) { case ACTION_NEXT: if (sok_ctx_is_done(&ctx)) { // play sound - sound_play(sounds, ASSET_SOUND_POWERUP_1_WAV); + sound_play(sounds, SOUND_LEVEL_NEXT); // advance level level_num++; @@ -345,7 +345,7 @@ int main(int argc, char *argv[]) { break; case ACTION_RESET: // play sound - sound_play(sounds, ASSET_SOUND_UNDO_0_WAV); + sound_play(sounds, SOUND_LEVEL_RESET); // reset level if (!sok_ctx_set_level(&ctx, draw_ctx.level->data)) { @@ -356,7 +356,7 @@ int main(int argc, char *argv[]) { case ACTION_WARP: if (warp_buf_get(&warp_buf, &level_num)) { // play sound - sound_play(sounds, ASSET_SOUND_POWERUP_1_WAV); + sound_play(sounds, SOUND_LEVEL_WARP); // load level set_level(&draw_ctx, &ctx, level_num); @@ -411,7 +411,7 @@ int main(int argc, char *argv[]) { break; case ACTION_SOLVE_CANCEL: SDL_Log("solve cancelled by user"); - sound_play(sounds, ASSET_SOUND_HIT_2_WAV); + sound_play(sounds, SOUND_SOLVE_CANCEL); draw_ctx.state = GAME_STATE_PLAY; solve_cancel(draw_ctx.solve); @@ -422,7 +422,7 @@ int main(int argc, char *argv[]) { break; case ACTION_SOLVE_EVENT_DONE: SDL_Log("solve done"); - sound_play(sounds, ASSET_SOUND_POWERUP_4_WAV); + sound_play(sounds, SOUND_SOLVE_DONE); draw_ctx.state = GAME_STATE_PLAY; // TODO: handle success solve_fini(draw_ctx.solve, solve_on_done, &ctx); -- cgit v1.2.3