mirror of
https://frontier.innolan.net/github/AmigaExamples.git
synced 2026-09-12 02:42:21 +00:00
Cleanup
This commit is contained in:
+1
-1
@@ -168,7 +168,7 @@ out/falling.raw: assets/falling.wav
|
|||||||
sox assets/falling.wav -b 8 -c 1 -r 8000 out/falling.raw
|
sox assets/falling.wav -b 8 -c 1 -r 8000 out/falling.raw
|
||||||
|
|
||||||
out/jump.raw: assets/jump.wav
|
out/jump.raw: assets/jump.wav
|
||||||
sox assets/jump.wav -c 1 -r 13000 -b 8 out/jump.raw
|
sox -v 0.98 assets/jump.wav -c 1 -r 13000 -b 8 out/jump.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/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
|
||||||
|
|
||||||
|
|||||||
+6
-70
@@ -46,15 +46,6 @@ Entry:
|
|||||||
lea Level3InterruptHandler,a3
|
lea Level3InterruptHandler,a3
|
||||||
move.l a3,LVL3_INT_VECTOR
|
move.l a3,LVL3_INT_VECTOR
|
||||||
|
|
||||||
|
|
||||||
if 0
|
|
||||||
lea Level4InterruptHandler,a3
|
|
||||||
move.l a3,LVL4_INT_VECTOR
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
;; move.w #(INTF_SETCLR|INTF_VERTB|INTF_INTEN),INTENA(a6)
|
|
||||||
|
|
||||||
jsr StartMusic
|
jsr StartMusic
|
||||||
jsr ShowSplash
|
jsr ShowSplash
|
||||||
jsr BlueFill
|
jsr BlueFill
|
||||||
@@ -75,14 +66,12 @@ Entry:
|
|||||||
lea panel,a1
|
lea panel,a1
|
||||||
jsr PokePanelBitplanePointers
|
jsr PokePanelBitplanePointers
|
||||||
|
|
||||||
|
|
||||||
lea mpanelCopperListBpl1Ptr,a0
|
lea mpanelCopperListBpl1Ptr,a0
|
||||||
lea mpanel,a1
|
lea mpanel,a1
|
||||||
jsr PokePanelBitplanePointers
|
jsr PokePanelBitplanePointers
|
||||||
|
|
||||||
bsr ShowMessagePanel
|
bsr ShowMessagePanel
|
||||||
|
|
||||||
|
|
||||||
jsr Init ; enable the playfield
|
jsr Init ; enable the playfield
|
||||||
jsr InstallSpriteColorPalette
|
jsr InstallSpriteColorPalette
|
||||||
|
|
||||||
@@ -192,7 +181,7 @@ GameLoop:
|
|||||||
|
|
||||||
jsr WaitVerticalBlank
|
jsr WaitVerticalBlank
|
||||||
|
|
||||||
MOVE.W #2,AUD3LEN(a6) ;Set length in words
|
move.w #2,AUD3LEN(a6) ; set the empty sound for the next sample to be played
|
||||||
move.l #emptySound,AUD3LCH(a6)
|
move.l #emptySound,AUD3LCH(a6)
|
||||||
|
|
||||||
if TIMING_TEST=1
|
if TIMING_TEST=1
|
||||||
@@ -213,10 +202,6 @@ GameLoop:
|
|||||||
.s2:
|
.s2:
|
||||||
|
|
||||||
jsr ProcessJoystick
|
jsr ProcessJoystick
|
||||||
if 0
|
|
||||||
btst.b #0,joystick
|
|
||||||
bne .setMoving
|
|
||||||
endif
|
|
||||||
cmp.w #PLAYER_INITIAL_X+16*3,spriteX
|
cmp.w #PLAYER_INITIAL_X+16*3,spriteX
|
||||||
bge .setMoving
|
bge .setMoving
|
||||||
addq.w #1,movingCounter
|
addq.w #1,movingCounter
|
||||||
@@ -232,6 +217,7 @@ GameLoop:
|
|||||||
|
|
||||||
|
|
||||||
bsr Update
|
bsr Update
|
||||||
|
jsr CheckPlayerMiss
|
||||||
bsr RenderNextForegroundFrame
|
bsr RenderNextForegroundFrame
|
||||||
jsr RenderNextBackgroundFrame
|
jsr RenderNextBackgroundFrame
|
||||||
|
|
||||||
@@ -246,17 +232,6 @@ GameLoop:
|
|||||||
jsr RenderPathway
|
jsr RenderPathway
|
||||||
.dontRenderPathway:
|
.dontRenderPathway:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if 0
|
|
||||||
move.w pathwayYIndex,d6
|
|
||||||
cmp.w #0,d6
|
|
||||||
beq .dontRenderMapTile
|
|
||||||
move.w pathwayXIndex,d5
|
|
||||||
bsr RenderMapTile
|
|
||||||
.dontRenderMapTile:
|
|
||||||
endif
|
|
||||||
|
|
||||||
if TIMING_TEST=1
|
if TIMING_TEST=1
|
||||||
move.w #$f00,COLOR00(a6)
|
move.w #$f00,COLOR00(a6)
|
||||||
move.w #$f00,COLOR02(a6)
|
move.w #$f00,COLOR02(a6)
|
||||||
@@ -300,7 +275,7 @@ Update:
|
|||||||
jsr InstallNextPathwayColor
|
jsr InstallNextPathwayColor
|
||||||
.dontInstallNextPathwayColor:
|
.dontInstallNextPathwayColor:
|
||||||
add.w #1,pathwayFadeCount
|
add.w #1,pathwayFadeCount
|
||||||
jsr CheckPlayerMiss
|
;; jsr CheckPlayerMiss
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
@@ -667,13 +642,10 @@ PostMissedTile:
|
|||||||
|
|
||||||
|
|
||||||
BigBang:
|
BigBang:
|
||||||
jsr PlayFalling
|
jsr PlayFallingSound
|
||||||
move.l #10,d0
|
|
||||||
.loop:
|
|
||||||
jsr WaitVerticalBlank
|
jsr WaitVerticalBlank
|
||||||
dbra d0,.loop
|
|
||||||
|
move.w #2,AUD3LEN(a6) ; set the empty sound for the next sample to be played
|
||||||
MOVE.W #2,AUD3LEN(a6) ;Set length in words
|
|
||||||
move.l #emptySound,AUD3LCH(a6)
|
move.l #emptySound,AUD3LCH(a6)
|
||||||
|
|
||||||
jsr ResetItems
|
jsr ResetItems
|
||||||
@@ -813,42 +785,6 @@ Level3InterruptHandler:
|
|||||||
rte
|
rte
|
||||||
|
|
||||||
|
|
||||||
if 0
|
|
||||||
Level4InterruptHandler:
|
|
||||||
movem.l d0-a6,-(sp)
|
|
||||||
lea CUSTOM,a6
|
|
||||||
.checkVerticalBlank:
|
|
||||||
move.w INTREQR(a6),d0
|
|
||||||
and.w #INTF_AUD0,d0
|
|
||||||
beq .interruptComplete
|
|
||||||
|
|
||||||
move.l #1000,d0
|
|
||||||
.loop:
|
|
||||||
dbra d0,.loop
|
|
||||||
|
|
||||||
move.w #INTF_AUD0,INTREQ(a6) ; clear interrupt bit
|
|
||||||
MOVE.W #2,AUD0LEN(a6) ;Set length in words
|
|
||||||
move.l #jump,AUD0LCH(a6)
|
|
||||||
move.w #INTF_AUD0,INTENA(a6)
|
|
||||||
|
|
||||||
if 0
|
|
||||||
move.w #DMAF_AUD0,DMACON(a6)
|
|
||||||
|
|
||||||
lea verticalBlankCounterText,a0
|
|
||||||
bsr IncrementCounter
|
|
||||||
|
|
||||||
if 0
|
|
||||||
MOVE.W #1,AUD0PER(a6)
|
|
||||||
MOVE.W #0,AUD0VOL(a6) ;Use maximum volume
|
|
||||||
MOVE.W #2,AUD0LEN(a6) ;Set length in words
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
.interruptComplete:
|
|
||||||
|
|
||||||
movem.l (sp)+,d0-a6
|
|
||||||
rte
|
|
||||||
endif
|
|
||||||
|
|
||||||
Message:
|
Message:
|
||||||
;; a0 - bitplane
|
;; a0 - bitplane
|
||||||
;; a1 - text
|
;; a1 - text
|
||||||
|
|||||||
+4
-4
@@ -157,22 +157,22 @@ ProcessJoystick:
|
|||||||
cmp.b #3,joystickpos
|
cmp.b #3,joystickpos
|
||||||
bne .notRight
|
bne .notRight
|
||||||
move.w #PLAYER_JUMP_PIXELS+PLAYER_PAUSE_PIXELS,spriteR
|
move.w #PLAYER_JUMP_PIXELS+PLAYER_PAUSE_PIXELS,spriteR
|
||||||
jsr PlaySound
|
jsr PlayJumpSound
|
||||||
.notRight:
|
.notRight:
|
||||||
cmp.b #1,joystickpos
|
cmp.b #1,joystickpos
|
||||||
bne .notUp
|
bne .notUp
|
||||||
move.w #PLAYER_JUMP_PIXELS+PLAYER_PAUSE_PIXELS,spriteU
|
move.w #PLAYER_JUMP_PIXELS+PLAYER_PAUSE_PIXELS,spriteU
|
||||||
jsr PlaySound
|
jsr PlayJumpSound
|
||||||
.notUp:
|
.notUp:
|
||||||
cmp.b #5,joystickpos
|
cmp.b #5,joystickpos
|
||||||
bne .notDown
|
bne .notDown
|
||||||
move.w #PLAYER_JUMP_PIXELS+PLAYER_PAUSE_PIXELS,spriteD
|
move.w #PLAYER_JUMP_PIXELS+PLAYER_PAUSE_PIXELS,spriteD
|
||||||
jsr PlaySound
|
jsr PlayJumpSound
|
||||||
.notDown:
|
.notDown:
|
||||||
cmp.b #7,joystickpos
|
cmp.b #7,joystickpos
|
||||||
bne .notLeft
|
bne .notLeft
|
||||||
move.w #PLAYER_JUMP_PIXELS+PLAYER_PAUSE_PIXELS,spriteL
|
move.w #PLAYER_JUMP_PIXELS+PLAYER_PAUSE_PIXELS,spriteL
|
||||||
jsr PlaySound
|
jsr PlayJumpSound
|
||||||
.notLeft:
|
.notLeft:
|
||||||
.skip:
|
.skip:
|
||||||
rts
|
rts
|
||||||
|
|||||||
+14
-23
@@ -1,32 +1,23 @@
|
|||||||
include "includes.i"
|
include "includes.i"
|
||||||
xdef PlaySound
|
xdef PlayJumpSound
|
||||||
xdef PlayFalling
|
xdef PlayFallingSound
|
||||||
|
|
||||||
PlaySound:
|
PlayJumpSound:
|
||||||
LEA jump(pc),a1 ;Address of data to
|
lea jump(pc),a1
|
||||||
MOVE.L a1,AUD3LCH(a6) ;The 680x0 writes this as though it were a
|
move.l a1,AUD3LCH(a6)
|
||||||
MOVE.W #123,AUD3PER(a6)
|
move.w #123,AUD3PER(a6)
|
||||||
MOVE.W #64,AUD3VOL(a6) ;Use maximum volume
|
move.w #64,AUD3VOL(a6)
|
||||||
MOVE.W #(endJump-jump)/2,AUD3LEN(a6) ;Set length in words
|
move.w #(endJump-jump)/2,AUD3LEN(a6) ;Set length in words
|
||||||
move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6)
|
move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6)
|
||||||
|
|
||||||
if 0
|
|
||||||
move.l #1000,d0
|
|
||||||
.loop:
|
|
||||||
dbra d0,.loop
|
|
||||||
|
|
||||||
MOVE.W #2,AUD3LEN(a6) ;Set length in words
|
|
||||||
move.l #jump,AUD3LCH(a6)
|
|
||||||
endif
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
PlayFalling:
|
PlayFallingSound:
|
||||||
LEA falling(pc),a1 ;Address of data to
|
lea falling(pc),a1
|
||||||
MOVE.L a1,AUD3LCH(a6) ;The 680x0 writes this as though it were a
|
move.l a1,AUD3LCH(a6)
|
||||||
MOVE.W #256,AUD3PER(a6)
|
move.w #256,AUD3PER(a6)
|
||||||
MOVE.W #25,AUD3VOL(a6) ;Use maximum volume
|
move.w #25,AUD3VOL(a6)
|
||||||
MOVE.W #(endFalling-falling)/4,AUD3LEN(a6) ;Set length in words
|
move.w #(endFalling-falling)/4,AUD3LEN(a6) ;Set length in words
|
||||||
move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6)
|
move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6)
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|||||||
@@ -128,3 +128,12 @@ Notes:
|
|||||||
# /Applications/CMake.app/Contents/bin/cmake ..
|
# /Applications/CMake.app/Contents/bin/cmake ..
|
||||||
# make install
|
# make install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
11. SOX
|
||||||
|
```
|
||||||
|
# git clone git://sox.git.sourceforge.net/gitroot/sox/sox
|
||||||
|
# cd sox
|
||||||
|
# autoreconf -i
|
||||||
|
# ./configure --prefix=/usr/local
|
||||||
|
# make install
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user