aboutsummaryrefslogtreecommitdiff
path: root/src/sdl/main.c
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2019-01-20 23:55:01 -0500
committerPaul Duncan <pabs@pablotron.org>2019-01-20 23:55:01 -0500
commit131a454b62687224a2e0a98c05a456729cc00761 (patch)
tree779250990a7dfde86e8974cfc96d0387752006e9 /src/sdl/main.c
parentac77abdfcc14950843035667a1ec2d15eadc4a69 (diff)
downloadsok-131a454b62687224a2e0a98c05a456729cc00761.tar.bz2
sok-131a454b62687224a2e0a98c05a456729cc00761.zip
add sound map
Diffstat (limited to 'src/sdl/main.c')
-rw-r--r--src/sdl/main.c16
1 files changed, 8 insertions, 8 deletions
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);