mirror of
https://frontier.innolan.net/github/AmigaExamples.git
synced 2026-09-12 01:32:35 +00:00
sprite flashing on a4000/bob flashing after background loop
This commit is contained in:
+2
-1
@@ -110,6 +110,7 @@ RenderNextBackgroundFrame:
|
||||
add.l d0,a2
|
||||
cmp.w #$FFFF,20(a2)
|
||||
bne .skip
|
||||
jsr ClearBobs
|
||||
move.l #0,backgroundScrollX
|
||||
.skip:
|
||||
|
||||
@@ -135,7 +136,7 @@ RenderNextBackgroundFrame:
|
||||
|
||||
endif
|
||||
|
||||
cmp.l #320,backgroundScrollX
|
||||
cmp.l #SCREEN_WIDTH*2,backgroundScrollX
|
||||
ble .dontRenderBobs
|
||||
jsr RenderBob
|
||||
.dontRenderBobs:
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
xdef AddBobBaloon
|
||||
xdef RenderBob
|
||||
xdef ResetBobs
|
||||
xdef ClearBobs
|
||||
xdef RestoreBobBackgrounds
|
||||
xdef bobBufferOffset
|
||||
xdef EnableBobs
|
||||
@@ -59,6 +60,33 @@ AddBobCloud:
|
||||
bra .loop
|
||||
.done:
|
||||
rts
|
||||
|
||||
ClearBobs:
|
||||
move.w #2,bobsEnabled ; disables bob movement
|
||||
bsr RestoreBobBackgrounds
|
||||
eor.l #4,bobBufferOffset
|
||||
move.l backgroundOffscreen,a0
|
||||
move.l backgroundOnscreen,backgroundOffscreen
|
||||
move.l a0,backgroundOnscreen
|
||||
bsr RestoreBobBackgrounds
|
||||
eor.l #4,bobBufferOffset
|
||||
move.l backgroundOffscreen,a0
|
||||
move.l backgroundOnscreen,backgroundOffscreen
|
||||
move.l a0,backgroundOnscreen
|
||||
move.w #1,bobsEnabled
|
||||
lea bob,a5
|
||||
.loop:
|
||||
cmp.l #0,(a5)
|
||||
beq .done
|
||||
lea BOB_LAST_DEST_ADDRESS(a5),a1
|
||||
move.l #0,(a1)
|
||||
adda.l bobBufferOffset,a1
|
||||
move.l #0,(a1)
|
||||
move.l #BOB_IDLE_X+1,BOB_X(a5)
|
||||
adda.l #endBob-bob,a5
|
||||
bra .loop
|
||||
.done:
|
||||
rts
|
||||
|
||||
ResetBobs:
|
||||
move.w #2,bobsEnabled ; disables bob movement
|
||||
|
||||
+6
-3
@@ -137,7 +137,8 @@ SetupBoardLoop:
|
||||
move.w #1,moving
|
||||
bsr Update
|
||||
|
||||
jsr RenderNextForegroundFrame
|
||||
jsr RenderNextForegroundFrame
|
||||
jsr PrepareItemSpriteData
|
||||
|
||||
jsr SwitchBackgroundBuffers2
|
||||
move.w #15,d5
|
||||
@@ -248,7 +249,8 @@ GameLoop:
|
||||
.dontRenderPathway:
|
||||
|
||||
|
||||
jsr PlayNextSound
|
||||
jsr PlayNextSound
|
||||
jsr PrepareItemSpriteData
|
||||
bra GameLoop
|
||||
|
||||
|
||||
@@ -462,7 +464,7 @@ RenderNextForegroundFrame:
|
||||
add.l #1,d3
|
||||
cmp.l #FOREGROUND_PLAYAREA_HEIGHT_WORDS,d3
|
||||
blt .loop
|
||||
jsr PrepareItemSpriteData
|
||||
;; jsr PrepareItemSpriteData
|
||||
rts
|
||||
|
||||
|
||||
@@ -517,6 +519,7 @@ BigBang:
|
||||
add.l #1,frameCount
|
||||
jsr Update
|
||||
bsr RenderNextForegroundFrame
|
||||
jsr PrepareItemSpriteData
|
||||
jsr RenderNextBackgroundFrame
|
||||
jsr WaitVerticalBlank
|
||||
jsr PlayNextSound
|
||||
|
||||
@@ -125,12 +125,6 @@ ResetItems:
|
||||
|
||||
SwitchItemSpriteBuffers:
|
||||
move.w spriteX,spriteLagX
|
||||
move.w #ITEM_NUM_SLOTS-1,d1
|
||||
move.w d1,d0
|
||||
lea item1,a1
|
||||
.loop:
|
||||
adda.l #ITEM_STRUCT_SIZE,a1
|
||||
dbra d1,.loop
|
||||
rts
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user