mirror of
https://github.com/lscharen/iigs-game-engine.git
synced 2024-11-26 07:49:17 +00:00
Fix nasty RTable initialization bug
This commit is contained in:
parent
8582ecb320
commit
d27b10b6fd
@ -244,7 +244,7 @@ SetScreenRect sty ScreenHeight ; Save the screen height and
|
||||
lda ScreenY0 ; Calculate the address of the first byte
|
||||
asl ; of the right side of the playfield
|
||||
tax
|
||||
lda ScreenAddr,x ; This is the address for the left edge of the physical screen
|
||||
lda ScreenAddr,x ; This is the address for the edge of the physical screen
|
||||
clc
|
||||
adc ScreenX1
|
||||
dec
|
||||
@ -252,9 +252,6 @@ SetScreenRect sty ScreenHeight ; Save the screen height and
|
||||
|
||||
ldx #0
|
||||
ldy ScreenHeight
|
||||
jsr :loop
|
||||
pla ; Reset the address and continue filling in the
|
||||
ldy ScreenHeight ; second half of the table
|
||||
:loop clc
|
||||
sta RTable,x
|
||||
adc #160
|
||||
@ -263,6 +260,16 @@ SetScreenRect sty ScreenHeight ; Save the screen height and
|
||||
dey
|
||||
bne :loop
|
||||
|
||||
ldy ScreenHeight
|
||||
pla ; Reset the address and continue filling in the
|
||||
:loop2 clc
|
||||
sta RTable,x
|
||||
adc #160
|
||||
inx
|
||||
inx
|
||||
dey
|
||||
bne :loop2
|
||||
|
||||
; Calculate the screen locations for each tile corner
|
||||
|
||||
lda ScreenY0 ; Calculate the address of the first byte
|
||||
|
Loading…
Reference in New Issue
Block a user