mirror of
https://frontier.innolan.net/github/AmigaExamples.git
synced 2026-09-12 05:32:09 +00:00
No more fg_shift 2
This commit is contained in:
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user