mirror of
https://frontier.innolan.net/github/AmigaExamples.git
synced 2026-09-12 15:31:52 +00:00
skipped frame counter, a4k sprite sync, audio wait bug fix
This commit is contained in:
+23
-29
@@ -81,7 +81,7 @@ Entry:
|
||||
|
||||
jsr InitialiseItems
|
||||
|
||||
Reset:
|
||||
Reset:
|
||||
lea livesCounterText,a0
|
||||
bsr DecrementCounter
|
||||
move.w #218,d0
|
||||
@@ -169,27 +169,29 @@ FadeInLoop:
|
||||
jsr InitialisePlayer
|
||||
jsr EnableItemSprites
|
||||
|
||||
lea frameCounterText,a0
|
||||
bsr ResetCounter
|
||||
lea verticalBlankCounterText,a0
|
||||
bsr ResetCounter
|
||||
|
||||
move.l #0,verticalBlankCount
|
||||
move.l #1,frameCount
|
||||
bra GameLoop
|
||||
.c1:
|
||||
bra FadeInLoop
|
||||
|
||||
GameLoop:
|
||||
|
||||
if 0
|
||||
lea frameCounterText,a0
|
||||
bsr IncrementCounter
|
||||
lea frameCounterText,a1
|
||||
move.w #31,d0
|
||||
jsr RenderCounter
|
||||
lea verticalBlankCounterText,a1
|
||||
move.w #101,d0
|
||||
jsr RenderCounter
|
||||
endif
|
||||
move.l verticalBlankCount,d0
|
||||
move.l frameCount,d1
|
||||
cmp.l d1,d0
|
||||
beq .noSkippedFrames
|
||||
addq #1,d0
|
||||
cmp.l d1,d0
|
||||
beq .noSkippedFrames
|
||||
move.l frameCount,verticalBlankCount
|
||||
lea skippedFramesCounterText,a0
|
||||
jsr IncrementCounter
|
||||
lea skippedFramesCounterText,a1
|
||||
move.w #110,d0
|
||||
jsr RenderCounter
|
||||
.noSkippedFrames:
|
||||
|
||||
|
||||
add.l #1,frameCount
|
||||
move.l frameCount,d6
|
||||
@@ -783,8 +785,6 @@ Level3InterruptHandler:
|
||||
.verticalBlank:
|
||||
move.w #INTF_VERTB,INTREQ(a6) ; clear interrupt bit
|
||||
add.l #1,verticalBlankCount
|
||||
lea verticalBlankCounterText,a0
|
||||
bsr IncrementCounter
|
||||
jsr SetupSpriteData
|
||||
jsr P61_Music
|
||||
.checkCopper:
|
||||
@@ -893,6 +893,11 @@ gameOverMessage:
|
||||
dc.b 0
|
||||
align 4
|
||||
|
||||
skippedFramesCounterText:
|
||||
dc.b "0000"
|
||||
dc.b 0
|
||||
align 4
|
||||
|
||||
livesCounterText:
|
||||
dc.b "00"
|
||||
livesCounterShortText:
|
||||
@@ -900,17 +905,6 @@ livesCounterShortText:
|
||||
dc.b 0
|
||||
align 4
|
||||
|
||||
frameCounterText:
|
||||
dc.b "0000"
|
||||
dc.b 0
|
||||
align 4
|
||||
|
||||
verticalBlankCounterText:
|
||||
dc.b "0000"
|
||||
dc.b 0
|
||||
align 4
|
||||
|
||||
|
||||
copperList:
|
||||
panelCopperListBpl1Ptr:
|
||||
dc.w BPL1PTL,0
|
||||
|
||||
+4
-4
@@ -23,7 +23,7 @@ ScrollItemSprites:
|
||||
move.l foregroundScrollPixels,d0
|
||||
cmp.w #0,ITEM_SPRITE(a1)
|
||||
beq .skip
|
||||
sub.w d0,ITEM_X(a1)
|
||||
sub.w d0,ITEM_X(a1)
|
||||
cmp.w #160<<FOREGROUND_SCROLL_SHIFT_CONVERT,ITEM_X(a1)
|
||||
bgt .skip
|
||||
move.w #0,ITEM_SPRITE(a1)
|
||||
@@ -163,8 +163,8 @@ _SetupItemSpriteData:
|
||||
mulu.w #ITEM_SPRITE_VERTICAL_BYTES,d2
|
||||
add.l d2,a0
|
||||
|
||||
move.w ITEM_X(a1),d0
|
||||
;; move.w ITEM_LAGX(a1),d0
|
||||
;; move.w ITEM_X(a1),d0
|
||||
move.w ITEM_LAGX(a1),d0
|
||||
lsr.w #FOREGROUND_SCROLL_SHIFT_CONVERT,d0 ; convert to pixels
|
||||
;; move.w ITEM_X(a1),ITEM_LAGX(a1)
|
||||
|
||||
@@ -193,7 +193,7 @@ _SetupItemSpriteData:
|
||||
bra .done
|
||||
|
||||
.done:
|
||||
add.w #1,ITEM_INDEX(a1)
|
||||
;; add.w #1,ITEM_INDEX(a1)
|
||||
.spriteIsNotEnabled:
|
||||
move.l (sp)+,d0
|
||||
rts
|
||||
|
||||
+6
-4
@@ -12,12 +12,14 @@ KillSound: macro
|
||||
move.l #emptySound,AUD3LCH(a6)
|
||||
|
||||
|
||||
lea $dff004,a0
|
||||
move.l (a0),d0
|
||||
add.l #1<<8,d0
|
||||
lea $dff006,a0
|
||||
move.w (a0),d0
|
||||
and.w #$ff00,d0
|
||||
add.w #4,d0
|
||||
.loop:
|
||||
move.l (a0),d1
|
||||
cmp.l d0,d1
|
||||
and.w #$ff00,d1
|
||||
cmp.w d0,d1
|
||||
ble .loop
|
||||
|
||||
move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6)
|
||||
|
||||
Reference in New Issue
Block a user