From c61d6939724d71e820fd25d84724c82bec1ffd2d Mon Sep 17 00:00:00 2001 From: alpine9000 Date: Sun, 15 May 2016 15:07:54 +1000 Subject: [PATCH] collisions work after scrolling stop --- 028.bs/game1.s | 8 +++++++- 028.bs/player.s | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/028.bs/game1.s b/028.bs/game1.s index 69947b5..b6eb39e 100644 --- a/028.bs/game1.s +++ b/028.bs/game1.s @@ -80,6 +80,7 @@ MainMenu: bra InitialiseNewGame Reset: + move.w #0,stopScrollingPending move.w #218,d0 lea livesCounterShortText,a1 jsr RenderCounter @@ -199,6 +200,9 @@ GameLoop: cmp.b #$f,d0 bne .s2 move.w #0,moving + cmp.w #1,stopScrollingPending + bne .s2 + move.l #0,foregroundScrollPixels .s2: jsr ProcessJoystick cmp.w #PLAYER_INITIAL_X+16*3,spriteX @@ -460,7 +464,7 @@ RenderForegroundTile: .s2: rts stopScrolling: - move.l #0,foregroundScrollPixels + move.w #1,stopScrollingPending rts @@ -974,6 +978,8 @@ livesCounterShortText: dc.b "00" dc.b 0 align 4 +stopScrollingPending: + dc.w 0 startUserstack: ds.b $1000 ; size of stack diff --git a/028.bs/player.s b/028.bs/player.s index c8b7189..56666c3 100644 --- a/028.bs/player.s +++ b/028.bs/player.s @@ -274,7 +274,6 @@ InstallTankColorPalette: rts CheckPlayerMiss: - ;; check if player has fallen off the left side of the play area cmpi.w #PLAYER_INITIAL_X-15,spriteX blt .doBigBang