duke: fix scroll glitch

This commit is contained in:
Vince Weaver 2020-12-14 16:08:31 -05:00
parent 75fcf81a91
commit 5345f809a0
3 changed files with 6 additions and 4 deletions

View File

@ -61,7 +61,7 @@ duke_start:
lda #18
sta DUKE_X
lda #18
lda #20
sta DUKE_Y
lda #1
sta DUKE_DIRECTION

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@ -184,9 +184,11 @@ duke_get_feet_location:
; + 1 is because sprite is 4 pixels wide?
; screen is 16 wide, but ofsset 4 in
; screen is 16 wide, but offset 4 in
; block index of foot is (feet approximately 8 lower than Y)
; to get to feet add 6 to Y?
; block index of foot is (feet approximately 6 lower than Y)
; INT((y+4)/4)*16 + (x-4+1/2)
; FIXME: if 18,18 -> INT(26/4)*16 = 96 + 7 = 103 = 6R7
@ -203,7 +205,7 @@ duke_get_feet_location:
lda DUKE_Y
clc
adc #6 ; +4
adc #4 ; +4
lsr ; / 4 (INT)
lsr