mirror of
https://frontier.innolan.net/github/AmigaExamples.git
synced 2026-09-12 15:22:06 +00:00
multiple songs
This commit is contained in:
+3
-1
@@ -5,6 +5,8 @@ paletteA_BACKGROUND_COLOR_LONG=000 153 238 255
|
||||
paletteB_BACKGROUND_COLOR_LONG=000 000 102 187
|
||||
paletteC_BACKGROUND_COLOR_LONG=210 002 053 255
|
||||
|
||||
MAX_P61_SIZE=$(shell ls -Sl assets/P61.* | awk '{print $$5}' | head -1)
|
||||
|
||||
# userstack used by bootblock
|
||||
USERSTACK_ADDRESS=7fffc
|
||||
# if you change this you must also change link.script.x
|
||||
@@ -76,7 +78,7 @@ IMAGES=foreground.png \
|
||||
|
||||
IMAGEDATA=$(addprefix out/, $(IMAGES:.png=.bin))
|
||||
|
||||
VASM_EXTRA_ARGS=-DTIMING_TEST=0 -DSFX=1 -DBALOON_BOB=1
|
||||
VASM_EXTRA_ARGS=-DTIMING_TEST=0 -DSFX=1 -DBALOON_BOB=1 -DMAX_P61_SIZE=$(MAX_P61_SIZE) -allmp
|
||||
|
||||
LINKER_OPTIONS=-T link.script.x
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
xdef P61_Init
|
||||
xdef P61_Music
|
||||
xdef P61_Master
|
||||
xdef P61_End
|
||||
; #-----+-----------------------------------------#
|
||||
; |Name:| P6112 - Optimized Player 6.1 Playroutine|
|
||||
; +-----+-----------------------------------------+
|
||||
|
||||
@@ -84,6 +84,8 @@ backgroundTilemap:
|
||||
backgroundMap:
|
||||
include "out/background-map.s"
|
||||
dc.w $FFFF
|
||||
|
||||
|
||||
backgroundOnscreen:
|
||||
dc.l backgroundBitplanes1
|
||||
backgroundOffscreen:
|
||||
|
||||
Binary file not shown.
+13
-10
@@ -45,6 +45,7 @@ Entry:
|
||||
lea Level3InterruptHandler,a3
|
||||
move.l a3,LVL3_INT_VECTOR
|
||||
|
||||
move.w #0,d0
|
||||
jsr StartMusic
|
||||
jsr ShowSplash
|
||||
MainMenu:
|
||||
@@ -632,6 +633,8 @@ Level3InterruptHandler:
|
||||
move.w #INTF_VERTB,INTREQ(a6) ; clear interrupt bit
|
||||
add.l #1,verticalBlankCount
|
||||
jsr SetupSpriteData
|
||||
cmp.w #0,P61_Master
|
||||
beq .checkCopper
|
||||
jsr P61_Music
|
||||
.checkCopper:
|
||||
move.w INTREQR(a6),d0
|
||||
@@ -808,19 +811,19 @@ InstallFlagGreyPalette:
|
||||
;; frames after jump before player miss is checked
|
||||
;; level complete name
|
||||
;; palette
|
||||
Level 1,"STAY ON THE PATHWAYS!",100,2*2,12,10,"LEVEL 1",A,21
|
||||
Level 2,"COLLECT COINS!",100,2*2,12,10,"LEVEL 2",A,21
|
||||
Level 3,"ARROWS ARE YOUR FRIEND!",100,2*2,12,10,"LEVEL 3",A,21
|
||||
Level 4,"WATCH OUT FOR BEES!",100,2*2,12,10,"LEVEL 4",A,21
|
||||
Level 5,"REMEMBER THE PATHWAYS BEFORE THEY FADE!",75,2*2,12,10,"LEVEL 5",A,21
|
||||
Level 1,"STAY ON THE PATHWAYS!",100,2*2,12,10,"LEVEL 1",A,21,0
|
||||
Level 2,"COLLECT COINS!",100,2*2,12,10,"LEVEL 2",A,21,1
|
||||
Level 3,"ARROWS ARE YOUR FRIEND!",100,2*2,12,10,"LEVEL 3",A,21,2
|
||||
Level 4,"WATCH OUT FOR BEES!",100,2*2,12,10,"LEVEL 4",A,21,0
|
||||
Level 5,"REMEMBER THE PATHWAYS BEFORE THEY FADE!",75,2*2,12,10,"LEVEL 5",A,21,0
|
||||
|
||||
Level 6,"LET'S TRY A LONGER LEVEL!",75,2*2,12,10,"PHEW!, LEVEL 6",B,98
|
||||
Level 7,"HAVING FUN YET?",70,2*2,12,10,"LEVEL 7",B,98
|
||||
Level 6,"LET'S TRY A LONGER LEVEL!",75,2*2,12,10,"PHEW!, LEVEL 6",B,98,2
|
||||
Level 7,"HAVING FUN YET?",70,2*2,12,10,"LEVEL 7",B,98,2
|
||||
|
||||
Level 8,"GIDDY UP!",50,4*2,8,6,"GETTING FASTER!, LEVEL 8",C,98
|
||||
Level 9,"LETS GO?",25,4*2,8,6,"LEVEL 9",C,98
|
||||
Level 8,"GIDDY UP!",50,4*2,8,6,"GETTING FASTER!, LEVEL 8",C,98,2
|
||||
Level 9,"LETS GO?",25,4*2,8,6,"LEVEL 9",C,98,2
|
||||
|
||||
Level 10,"WHAT? WHAT?!",50,4*2,8,6,"NICE! LEVEL 10",A,98
|
||||
Level 10,"WHAT? WHAT?!",50,4*2,8,6,"NICE! LEVEL 10",A,98,1
|
||||
;; Level 10,"WHAT? WHAT?!",15,4*2,8,6,"YOU'RE GOOD, LEVEL 10",C
|
||||
|
||||
;; Level 7,"LEVEL 3",50,4*2,8,6,"3",C
|
||||
|
||||
+3
-1
@@ -14,8 +14,10 @@ InstallLevel\1:
|
||||
move.l #\4,pathwayFadeRate
|
||||
move.w #\5,playerLevelPausePixels
|
||||
move.w #\6,playerLevelMissPixels
|
||||
move.l #\9,playerXColumnLastSafe,
|
||||
move.l #\9,playerXColumnLastSafe
|
||||
move.l #\9,playerXColumn
|
||||
move.w #\a,d0
|
||||
jsr StartMusic
|
||||
rts
|
||||
|
||||
align 4
|
||||
|
||||
@@ -169,4 +169,12 @@ PlayerMoveLeft: macro
|
||||
PlaySound Jump
|
||||
add.l #1,playerXColumn
|
||||
jsr UpdatePlayerScore
|
||||
endm
|
||||
|
||||
P61Module: macro
|
||||
cnop 0,512
|
||||
diskmodule\1:
|
||||
incbin \2
|
||||
cnop 0,512
|
||||
enddiskmodule\1:
|
||||
endm
|
||||
+57
-15
@@ -1,28 +1,70 @@
|
||||
include "includes.i"
|
||||
|
||||
xdef StartMusic
|
||||
|
||||
StartMusic:
|
||||
;; a0 - destination address
|
||||
;; a1 - start address
|
||||
;; d0 - size
|
||||
|
||||
StartMusic:
|
||||
cmp.w #0,P61_Master
|
||||
beq .skip
|
||||
cmp.w currentModule,d0
|
||||
beq .skip
|
||||
cmp.w #-1,currentModule
|
||||
beq .fadeComplete
|
||||
|
||||
.fadeOutMusic:
|
||||
cmp.w #0,P61_Master
|
||||
beq .fadeComplete
|
||||
sub.w #1,P61_Master
|
||||
jsr WaitVerticalBlank
|
||||
jsr PlayNextSound
|
||||
bra .fadeOutMusic
|
||||
.fadeComplete:
|
||||
|
||||
move.w d0,currentModule
|
||||
movem.l d0-a6,-(sp)
|
||||
move.w d0,-(sp)
|
||||
jsr P61_End
|
||||
move.w (sp)+,d0
|
||||
lea module,a0
|
||||
lea diskmodule,a1
|
||||
move.l #enddiskmodule-diskmodule,d0
|
||||
jsr LoadDiskData
|
||||
lea modules,a1
|
||||
lsl.w #3,d0
|
||||
adda.w d0,a1
|
||||
move.l (a1)+,d0
|
||||
move.l (a1),a1
|
||||
jsr LoadDiskData
|
||||
lea module,a0
|
||||
sub.l a1,a1
|
||||
sub.l a2,a2
|
||||
moveq #0,d0
|
||||
jsr P61_Init
|
||||
move.w #64,P61_Master
|
||||
jsr P61_Init
|
||||
movem.l (sp)+,d0-a6
|
||||
.skip:
|
||||
rts
|
||||
|
||||
|
||||
currentModule:
|
||||
dc.w -1
|
||||
|
||||
|
||||
modules:
|
||||
dc.l enddiskmoduleA-diskmoduleA
|
||||
dc.l diskmoduleA
|
||||
|
||||
dc.l enddiskmoduleB-diskmoduleB
|
||||
dc.l diskmoduleB
|
||||
|
||||
dc.l enddiskmoduleC-diskmoduleC
|
||||
dc.l diskmoduleC
|
||||
|
||||
section .bss
|
||||
module
|
||||
ds.b enddiskmodule-diskmodule
|
||||
module:
|
||||
ds.b MAX_P61_SIZE
|
||||
ds.b 512
|
||||
|
||||
section .noload
|
||||
cnop 0,512
|
||||
diskmodule:
|
||||
incbin "assets/P61.jmd-songA"
|
||||
cnop 0,512
|
||||
enddiskmodule:
|
||||
|
||||
moduleDiskData:
|
||||
P61Module A,"assets/P61.jmd-songA"
|
||||
P61Module B,"assets/P61.jmd-songB"
|
||||
P61Module C,"assets/P61.jmd-songC"
|
||||
|
||||
Reference in New Issue
Block a user