diff --git a/Sprites/NPCs/followers.asm b/Sprites/NPCs/followers.asm index b4794d1..a20141e 100644 --- a/Sprites/NPCs/followers.asm +++ b/Sprites/NPCs/followers.asm @@ -811,14 +811,14 @@ DrawMinecartFollower: { JSL $099EFC ; Follower_Initialize - LDX $012B - LDA .direction_to_anim, X - STA $02CF + LDX !MinecartDirection + LDA .direction_to_anim, X : STA $02CF JSR FollowerDraw_CachePosition JSR MinecartFollower_Top JSR MinecartFollower_Bottom + ; Check the current submodule in the underworld LDA.b $11 : BNE .dont_spawn LDA !LinkInCart : BEQ .dont_spawn LDA.b #$A3 @@ -844,7 +844,7 @@ DrawMinecartFollower: .dont_spawn RTS -.direction_to_anim + .direction_to_anim db $02, $00, $02, $00 } diff --git a/Sprites/Objects/minecart.asm b/Sprites/Objects/minecart.asm index 2cf44e9..ab57316 100644 --- a/Sprites/Objects/minecart.asm +++ b/Sprites/Objects/minecart.asm @@ -188,6 +188,7 @@ endmacro Minecart_HandleToss: { + LDA.b #$30 : STA.w SprTimerA, X ; Check links facing direction $2F and apply velocity LDA $2F : CMP.b #$00 : BEQ .toss_north CMP.b #$02 : BEQ .toss_south @@ -470,7 +471,6 @@ HandleTileDirections: ; Fetch tile attributes based on current coordinates LDA.b #$00 : JSL Sprite_GetTileAttr : LDA $0FA5 - CMP.b #$02 : BNE .not_out_of_bounds ; If the tile is out of bounds, release the cart LDA #$40 : STA.w SprTimerD, X @@ -626,38 +626,32 @@ HandleDynamicSwitchTileDirections: CMP.b #$01 : BEQ .north_or_south CMP.b #$02 : BEQ .east_or_west CMP.b #$03 : BEQ .north_or_south - .no_b0 + .no_b0 RTS .east_or_west LDA.w SwitchRam : BNE .go_west - LDA #$01 : STA.w SprSubtype, X - STA.w !MinecartDirection - LDA #$03 : STA !SpriteDirection, X - %GotoAction(3) ; Minecart_MoveEast - RTS - - .go_west - LDA #$03 : STA.w SprSubtype, X - STA.w !MinecartDirection + LDA #$01 : STA.w SprSubtype, X : STA.w !MinecartDirection + LDA #$03 : STA !SpriteDirection, X + %GotoAction(3) ; Minecart_MoveEast + RTS + .go_west + LDA #$03 : STA.w SprSubtype, X : STA.w !MinecartDirection LDA #$02 : STA !SpriteDirection, X %GotoAction(5) ; Minecart_MoveWest RTS .north_or_south - LDA.w SwitchRam : BNE .go_south - LDA #$00 : STA.w SprSubtype, X - STA.w !MinecartDirection - STA !SpriteDirection, X + LDA.w SwitchRam : BNE .go_south + LDA #$00 : STA.w SprSubtype, X : STA.w !MinecartDirection + STA !SpriteDirection, X %GotoAction(2) ; Minecart_MoveNorth RTS - .go_south - LDA #$02 : STA.w SprSubtype, X - STA.w !MinecartDirection - LDA #$01 : STA !SpriteDirection, X - %GotoAction(4) ; Minecart_MoveSouth - RTS + LDA #$02 : STA.w SprSubtype, X : STA.w !MinecartDirection + LDA #$01 : STA !SpriteDirection, X + %GotoAction(4) ; Minecart_MoveSouth + RTS } ; ========================================================= diff --git a/Sprites/Objects/switch_track.asm b/Sprites/Objects/switch_track.asm index 6b7d7af..8c46a9d 100644 --- a/Sprites/Objects/switch_track.asm +++ b/Sprites/Objects/switch_track.asm @@ -102,7 +102,7 @@ Sprite_RotatingTrack_Main: ; 02 = BottomRight -> BottomLeft BottomRightToBottomLeft: { - LDA.w SwitchRam : BNE part2_b + LDA.w SwitchRam : BEQ part2_b %PlayAnimation(2,2,4) part2_b: %PlayAnimation(3,3,4)