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

View File

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