From abd268f18cc55cac7b79ad81134a3999d9d8ff69 Mon Sep 17 00:00:00 2001 From: alpine9000 Date: Fri, 15 Apr 2016 10:45:37 +1000 Subject: [PATCH] No more fg_shift 2 --- 028.game2/constants.i | 3 ++- 028.game2/game1.s | 4 ++-- 028.game2/image.s | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/028.game2/constants.i b/028.game2/constants.i index 47fce7b..6267d77 100644 --- a/028.game2/constants.i +++ b/028.game2/constants.i @@ -1,7 +1,8 @@ BACKGROUND_UPDATE_COUNT equ $3 FOREGROUND_DELAY_BIT equ 0 -FOREGROUND_SCROLL_SHIFT_CONVERT equ 4 +FOREGROUND_SCROLL_SHIFT_CONVERT equ 1 +FOREGROUND_SCROLL_PIXELS equ 2 SCREEN_WIDTH equ 320 SCREEN_HEIGHT equ 256 diff --git a/028.game2/game1.s b/028.game2/game1.s index 7b5b6b5..4ed8f3b 100644 --- a/028.game2/game1.s +++ b/028.game2/game1.s @@ -41,7 +41,7 @@ Entry: Reset: - move.l #-1,foregroundScrollX ; x pos (d1) + move.l #-FOREGROUND_SCROLL_PIXELS,foregroundScrollX ; x pos (d1) move.l #0,fg_tileIndex ; tile index (d3) move.l #0,backgroundScrollX move.l #0,bg_shift ; shift counter (d2) @@ -94,7 +94,7 @@ Update: bge .skip add.l #2,fg_tileIndex ; increment foreground tile index .skip: - add.l #16,foregroundScrollX + add.l #FOREGROUND_SCROLL_PIXELS,foregroundScrollX .skipForegroundUpdates: add.l #1,frameCount diff --git a/028.game2/image.s b/028.game2/image.s index 25a9170..d58f95e 100644 --- a/028.game2/image.s +++ b/028.game2/image.s @@ -6,7 +6,7 @@ SwitchBuffers: ;; offscreen - bitplane address move.l foregroundScrollX,d0 - lsr.l #4,d0 ; convert to pixels + lsr.l #FOREGROUND_SCROLL_SHIFT_CONVERT,d0 ; convert to pixels lsr.l #3,d0 ; bytes to scroll move.l foregroundOffscreen,a0 move.l foregroundOnscreen,foregroundOffscreen