fix can-scroll-puzzle logic

This commit is contained in:
4am 2020-05-08 15:54:31 -04:00
parent 59e92a19e5
commit 43004af546
3 changed files with 9 additions and 13 deletions

2
notes
View File

@ -1,3 +1,3 @@
Playtesting bugs:
6x4-003 does not recognize UNFREE
4x3-007 does not recognize WHET

View File

@ -178,10 +178,9 @@ ScrollPuzzleDown
; out: C clear if puzzle was scrolled down
; C set if puzzle was already as far down as it can go
; preserves X/Y
lda puzzle_offsets, y
cmp #4
beq @fail
lda puzzle_data3, y
beq +
ScrollPuzzleDownUnconditionally
lda puzzle_data7, y
sta puzzle_data8, y
@ -215,7 +214,7 @@ ScrollPuzzleDown
sta puzzle_offsets, y
clc
rts
@fail sec
+ sec
rts
ScrollPuzzleUp
@ -223,11 +222,8 @@ ScrollPuzzleUp
; out: C clear if puzzle was scrolled up
; C set if puzzle was already as far up as it can go
; preserves X/Y
lda puzzle_offsets, y
clc
adc puzzle_logical_height
cmp #5
beq @fail
lda puzzle_data5, y
beq +
lda puzzle_data1, y
sta puzzle_data0, y
@ -262,7 +258,7 @@ ScrollPuzzleUp
sta puzzle_offsets, y
clc
rts
@fail sec
+ sec
rts
IsPuzzleComplete

View File

@ -275,7 +275,7 @@ AnimatePuzzleIntoPlace
sty @max+1
ldy #0
-- ldx #4
- jsr ScrollPuzzleDown
- jsr ScrollPuzzleDownUnconditionally
jsr ScrollDown
dex
bne -