mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-26 11:30:12 +00:00
climb: fix issue that crashed on real hardware
we were indexing off the end of the sprite and on real hardware the uninitialied pointers there indexed into bad places
This commit is contained in:
parent
8391455d46
commit
345214d6b4
@ -52,6 +52,24 @@ hgr_draw_sprite_bg_mask:
|
||||
sta hdsb_ysize_smc+1
|
||||
clc
|
||||
adc CURSOR_Y
|
||||
cmp #192
|
||||
bcc hdsb_ysize_ok
|
||||
|
||||
hdsb_ysize_not_ok:
|
||||
; adjust self modify
|
||||
; want it to be (192-SPRITE_Y)
|
||||
|
||||
; lda #192
|
||||
; sec
|
||||
; sbc SPRITE_Y
|
||||
; sta sprite_ysize_smc+1 ; self modify for end row
|
||||
|
||||
lda #191 ; max out yend
|
||||
|
||||
|
||||
|
||||
hdsb_ysize_ok:
|
||||
|
||||
sta save_yend,Y
|
||||
|
||||
;================================
|
||||
|
Loading…
Reference in New Issue
Block a user