auto move sfx placeholder

This commit is contained in:
alpine9000
2016-05-07 11:25:21 +10:00
parent 2af194e717
commit 484fd760f2
6 changed files with 43 additions and 20 deletions
+4 -1
View File
@@ -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)
Binary file not shown.
+12 -6
View File
@@ -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
+4 -4
View File
@@ -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
+9 -8
View File
@@ -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:
+14 -1
View File
@@ -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