diff --git a/028.bs/Makefile b/028.bs/Makefile index 6214fba..64ba069 100644 --- a/028.bs/Makefile +++ b/028.bs/Makefile @@ -181,10 +181,13 @@ out/falling.raw: assets/falling.wav out/jump.raw: assets/jump.wav sox -v 0.98 assets/jump.wav -c 1 -r 13000 -b 8 out/jump.raw +out/whoosh.raw: assets/whoosh.wav + sox -v 2.0 assets/whoosh.wav -c 1 -r 13000 -b 8 out/whoosh.raw + out/chaching.raw: assets/chaching.wav sox -v 0.98 assets/chaching.wav -c 1 -r 13000 -b 8 out/chaching.raw -out/main.o: $(IMAGEDATA) out/background-map.s out/foreground-map.s Makefile link.script.x out/playarea_fade.s out/flags_fade.s out/panelFade.s out/tileFade.s out/jump.raw out/falling.raw out/chaching.raw +out/main.o: $(IMAGEDATA) out/background-map.s out/foreground-map.s Makefile link.script.x out/playarea_fade.s out/flags_fade.s out/panelFade.s out/tileFade.s out/jump.raw out/falling.raw out/chaching.raw out/whoosh.raw setuptiming: $(eval VASM_EXTRA_ARGS=-DTIMING_TEST=1 -DSFX=1) diff --git a/028.bs/assets/whoosh.wav b/028.bs/assets/whoosh.wav new file mode 100644 index 0000000..2b69b2e Binary files /dev/null and b/028.bs/assets/whoosh.wav differ diff --git a/028.bs/constants.i b/028.bs/constants.i index e80b3cf..7dbfaa1 100644 --- a/028.bs/constants.i +++ b/028.bs/constants.i @@ -1,21 +1,27 @@ MPANEL_COPPER_WAIT equ $9ad1 ; controls the vertical position of the message panel -SPRITE_MOVE_UP equ 1 -SPRITE_MOVE_DOWN equ 2 -SPRITE_MOVE_LEFT equ 3 -SPRITE_MOVE_RIGHT equ 4 +PLAYER_MOVE_UP equ 1 +PLAYER_MOVE_DOWN equ 2 +PLAYER_MOVE_LEFT equ 3 +PLAYER_MOVE_RIGHT equ 4 PLAYER_INITIAL_X equ $c0 PLAYER_LEFT_X equ $c0 PLAYER_INITIAL_Y equ $e4-32 PLAYER_BOTTOM_Y equ $e4+16 PLAYER_TOP_Y equ (PLAYER_BOTTOM_Y-(7*16)) +PLAYER_SPRITE_VERTICAL_BYTES equ ((16*4)+12) + PLAYER_JUMP_PIXELS equ 8 ; PLAYER_JUMP_PIXELS * PLAYER_MOVE_PIXELS must equal 16 PLAYER_MOVE_PIXELS equ 2 + PLAYER_PAUSE_PIXELS equ 12 ; number of pixel waits between jumps -PLAYER_CHECK_MISS_PIXELS equ 12 -PLAYER_SPRITE_VERTICAL_BYTES equ ((16*4)+12) +PLAYER_CHECK_MISS_PIXELS equ 10 +PLAYER_FAST_PAUSE_PIXELS equ 4 ; number of pixel waits between jumps +PLAYER_FAST_CHECK_MISS_PIXELS equ 2 + + PATHWAY_FADE_TIMER_COUNT equ 100 diff --git a/028.bs/macros.i b/028.bs/macros.i index f206ce3..1e94aca 100644 --- a/028.bs/macros.i +++ b/028.bs/macros.i @@ -73,7 +73,7 @@ PlayerMoveRight: macro move.w playerJumpPixels,d1 add.w playerPausePixels,d1 move.w d1,spriteR - move.w #SPRITE_MOVE_RIGHT,spriteLastMove + move.w #PLAYER_MOVE_RIGHT,spriteLastMove PlaySound Jump endm @@ -81,7 +81,7 @@ PlayerMoveUp: macro move.w playerJumpPixels,d1 add.w playerPausePixels,d1 move.w d1,spriteU - move.w #SPRITE_MOVE_UP,spriteLastMove + move.w #PLAYER_MOVE_UP,spriteLastMove PlaySound Jump endm @@ -89,7 +89,7 @@ PlayerMoveDown: macro move.w playerJumpPixels,d1 add.w playerPausePixels,d1 move.w d1,spriteD - move.w #SPRITE_MOVE_DOWN,spriteLastMove + move.w #PLAYER_MOVE_DOWN,spriteLastMove PlaySound Jump endm @@ -97,6 +97,6 @@ PlayerMoveLeft: macro move.w playerJumpPixels,d1 add.w playerPausePixels,d1 move.w d1,spriteL - move.w #SPRITE_MOVE_LEFT,spriteLastMove + move.w #PLAYER_MOVE_LEFT,spriteLastMove PlaySound Jump endm \ No newline at end of file diff --git a/028.bs/player.s b/028.bs/player.s index 6d4c8ef..b75c377 100644 --- a/028.bs/player.s +++ b/028.bs/player.s @@ -165,8 +165,8 @@ ProcessJoystick: cmp.w #0,spriteAutoMoveEnabled beq .autoMoveDisabled - move.w #4,playerPausePixels - move.w #4,playerMissPixels + move.w #PLAYER_FAST_PAUSE_PIXELS,playerPausePixels + move.w #PLAYER_FAST_CHECK_MISS_PIXELS,playerMissPixels bsr GetNextAutoMove @@ -194,6 +194,7 @@ ProcessJoystick: rts SpriteEnableAuto: + PlaySound Whoosh move.w #1,spriteAutoMoveEnabled rts @@ -392,27 +393,27 @@ GetNextAutoMove: beq .vertical bra .skip .horizontal: - cmp.w #SPRITE_MOVE_RIGHT,spriteLastMove + cmp.w #PLAYER_MOVE_RIGHT,spriteLastMove beq .goRight bra .goLeft .topLeft: - cmp.w #SPRITE_MOVE_RIGHT,spriteLastMove + cmp.w #PLAYER_MOVE_RIGHT,spriteLastMove beq .goUp bra .goLeft .leftBottom: - cmp.w #SPRITE_MOVE_RIGHT,spriteLastMove + cmp.w #PLAYER_MOVE_RIGHT,spriteLastMove beq .goDown bra .goLeft .topRight: - cmp.w #SPRITE_MOVE_DOWN,spriteLastMove + cmp.w #PLAYER_MOVE_DOWN,spriteLastMove beq .goRight bra .goUp .rightBottom: - cmp.w #SPRITE_MOVE_UP,spriteLastMove + cmp.w #PLAYER_MOVE_UP,spriteLastMove beq .goRight bra .goDown .vertical: - cmp.w #SPRITE_MOVE_UP,spriteLastMove + cmp.w #PLAYER_MOVE_UP,spriteLastMove beq .goUp bra .goDown .default: diff --git a/028.bs/sound.s b/028.bs/sound.s index cbfcb3c..3dd7141 100644 --- a/028.bs/sound.s +++ b/028.bs/sound.s @@ -3,7 +3,8 @@ xdef PlayJumpSound xdef PlayFallingSound xdef PlayChachingSound - + xdef PlayWhooshSound + PlayJumpSound: lea jump(pc),a1 move.l a1,AUD3LCH(a6) @@ -13,6 +14,15 @@ PlayJumpSound: move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6) rts +PlayWhooshSound: + lea whoosh,a1 + move.l a1,AUD3LCH(a6) + move.w #256,AUD3PER(a6) + move.w #64,AUD3VOL(a6) + move.w #(endWhoosh-whoosh)/2,AUD3LEN(a6) ;Set length in words + move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6) + rts + PlayFallingSound: lea falling(pc),a1 @@ -44,4 +54,7 @@ endFalling: chaching: incbin "out/chaching.raw" endChaching: +whoosh: + incbin "out/whoosh.raw" +endWhoosh: endif \ No newline at end of file