Cleanup floor tag puzzles

This commit is contained in:
scawful
2024-12-19 09:43:13 -05:00
parent 4f42ab2b40
commit 548379f95a
2 changed files with 24 additions and 48 deletions

View File

@@ -11,11 +11,8 @@ pullpc
; kill room tag ; kill room tag
CrumbleFloorTag_Main: CrumbleFloorTag_Main:
{ {
LDA.b $20 : CLC : ADC #$10 : AND.b #$F0 LDA.b $20 : CLC : ADC #$10 : AND.b #$F0 : STA.w $0224 ; y
STA.w $0224 ; y LDA.b $22 : CLC : ADC #$08 : AND.b #$F0 : STA.w $0225 ; x
LDA.b $22 : CLC : ADC #$08 : AND.b #$F0
STA.w $0225 ; x
LDA.w $0224 : CMP.w $0226 : BNE .differentTile LDA.w $0224 : CMP.w $0226 : BNE .differentTile
LDA.w $0225 : CMP.w $0227 : BNE .differentTile LDA.w $0225 : CMP.w $0227 : BNE .differentTile
@@ -37,8 +34,10 @@ CrumbleFloorTag_Main:
BRA .doneupdate BRA .doneupdate
+ +
LDA.l $7E2000, X : CMP.w #$0C62 : BNE + LDA.l $7E2000, X : CMP.w #$0C62 : BNE +
-
JSR update_crack_tile JSR update_crack_tile
+ +
LDA.l $7E2000, X : CMP.w #$0C63 : BEQ -
.doneupdate .doneupdate
SEP #$30 SEP #$30

View File

@@ -14,15 +14,12 @@ NewTagRoutine:
; check under link feet what tile he is standing on ; check under link feet what tile he is standing on
; save somewhere in ram last tile we were on so it doesn't turn it back off ; save somewhere in ram last tile we were on so it doesn't turn it back off
; kill room tag ; kill room tag
LDA.b $20 : CLC : ADC #$10 : AND.b #$F0 LDA.b $20 : CLC : ADC #$10 : AND.b #$F0 : STA.w $0224 ; y
STA.w $0224 ; y LDA.b $22 : CLC : ADC #$08 : AND.b #$F0 : STA.w $0225 ; x
LDA.b $22 : CLC : ADC #$08 : AND.b #$F0
STA.w $0225 ; x
LDA.w $0224 : CMP.w $0226 : BNE .differentTile LDA.w $0224 : CMP.w $0226 : BNE .differentTile
LDA.w $0225 : CMP.w $0227 : BNE .differentTile LDA.w $0225 : CMP.w $0227 : BNE .differentTile
JMP .sameTile JMP .sameTile
.differentTile .differentTile
; do code here for tile code ; do code here for tile code
@@ -33,17 +30,17 @@ NewTagRoutine:
TAX TAX
LDA.l $7E2000, X : CMP.w #$0DED : BNE + LDA.l $7E2000, X : CMP.w #$0DED : BNE +
JSR update_star_tile JSR update_star_tile
JSR SearchForEmptyStar JSR SearchForEmptyStar
BRA .doneupdate BRA .doneupdate
+ +
LDA.l $7E2000, X : CMP.w #$0DEE : BNE + LDA.l $7E2000, X : CMP.w #$0DEE : BNE +
;JSR SearchToRedStar ;JSR SearchToRedStar
JSR update_red_star_tile JSR update_red_star_tile
SEP #$30 SEP #$30
STZ.b $AE ; kill room tag! STZ.b $AE ; kill room tag!
;JSR update_empty_tile ;JSR update_empty_tile
;JSR SearchForEmptyStar ;JSR SearchForEmptyStar
+ +
.doneupdate .doneupdate
@@ -62,13 +59,9 @@ update_empty_tile:
{ {
STZ.b $0E STZ.b $0E
REP #$30 REP #$30
JSR replace_tile_empty JSR replace_tile_empty
SEP #$30 SEP #$30
LDA.b #$01 : STA.b $14
LDA.b #$01
STA.b $14
REP #$30 REP #$30
RTS RTS
} }
@@ -77,13 +70,9 @@ update_star_tile:
{ {
STZ.b $0E STZ.b $0E
REP #$30 REP #$30
JSR replace_tile_star JSR replace_tile_star
SEP #$30 SEP #$30
LDA.b #$01 : STA.b $14
LDA.b #$01
STA.b $14
LDA.b #$0C : STA.w $012F LDA.b #$0C : STA.w $012F
REP #$30 REP #$30
RTS RTS
@@ -93,15 +82,10 @@ update_red_star_tile:
{ {
STZ.b $0E STZ.b $0E
REP #$30 REP #$30
JSR replace_red_tile_star JSR replace_red_tile_star
SEP #$30 SEP #$30
LDA.b #$01 : STA.b $14
LDA.b #$01
STA.b $14
LDA.b #$3C : STA.w $012E LDA.b #$3C : STA.w $012E
REP #$30 REP #$30
RTS RTS
} }
@@ -110,17 +94,10 @@ replace_red_tile_star:
{ {
LDX.w $1000 LDX.w $1000
LDA.w #$19EE LDA.w #$19EE : STA.w $1006,X
STA.w $1006,X LDA.w #$99EE : STA.w $100C,X
LDA.w #$59EE : STA.w $1012,X
LDA.w #$99EE LDA.w #$D9EE : STA.w $1018,X
STA.w $100C,X
LDA.w #$59EE
STA.w $1012,X
LDA.w #$D9EE
STA.w $1018,X
LDX.b $06 LDX.b $06