minecart subtype bug fix

This commit is contained in:
scawful
2024-12-08 20:12:56 -05:00
parent 26f8d7a862
commit 87784b7693
2 changed files with 4 additions and 4 deletions

View File

@@ -819,7 +819,7 @@ DrawMinecartFollower:
.finish_prep .finish_prep
LDA.w POSYH : STA.w SprYH, X LDA.w POSYH : STA.w SprYH, X
LDA.w POSXH : STA.w SprXH, X LDA.w POSXH : STA.w SprXH, X
LDA.w !MinecartDirection : CLC : ADC.b #$03 : STA.w SprSubtype, X LDA.w !MinecartDirection : CLC : ADC.b #$04 : STA.w SprSubtype, X
LDA .direction_to_anim, X : STA $0D90, X LDA .direction_to_anim, X : STA $0D90, X
JSL Sprite_Minecart_Prep JSL Sprite_Minecart_Prep

View File

@@ -110,7 +110,7 @@ Sprite_Minecart_Prep:
; If the subtype is > 4, then it's an active cart ; If the subtype is > 4, then it's an active cart
LDA.w SprSubtype, X : CMP.b #$04 : BCC + LDA.w SprSubtype, X : CMP.b #$04 : BCC +
LDA.w SprSubtype, X : SEC : SBC.b #$03 : STA.w SprSubtype, X LDA.w SprSubtype, X : SEC : SBC.b #$04 : STA.w SprSubtype, X
LDA.b #$01 : STA.w SprMiscF, X ; Set the auto-move flag LDA.b #$01 : STA.w SprMiscF, X ; Set the auto-move flag
+ +
@@ -171,7 +171,7 @@ endmacro
macro MoveCart() macro MoveCart()
JSR HandleTileDirections JSR HandleTileDirections
JSR HandleDynamicSwitchTileDirections JSR HandleDynamicSwitchTileDirections
LDA #$35 : STA $012E ; Cart SFX LDA #$35 : STA $012E ; Cart SFX
endmacro endmacro
macro StopCart() macro StopCart()
@@ -627,7 +627,7 @@ HandleTileDirections:
JSR CheckForOutOfBounds JSR CheckForOutOfBounds
JSR CheckForStopTiles JSR CheckForStopTiles
JSR CheckForCornerTiles : BCC .done JSR CheckForCornerTiles : BCC .done
JSR CheckForTrackTiles ; JSR CheckForTrackTiles
.done .done
LDA #$0F : STA.w SprTimerA, X LDA #$0F : STA.w SprTimerA, X
RTS RTS