Minecart and follower stuff

This commit is contained in:
scawful
2024-11-28 11:29:00 -05:00
parent 07451bc0ca
commit 130df6b653
3 changed files with 20 additions and 26 deletions

View File

@@ -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

View File

@@ -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
@@ -631,30 +631,24 @@ HandleDynamicSwitchTileDirections:
.east_or_west
LDA.w SwitchRam : BNE .go_west
LDA #$01 : 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 #$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
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 #$02 : STA.w SprSubtype, X : STA.w !MinecartDirection
LDA #$01 : STA !SpriteDirection, X
%GotoAction(4) ; Minecart_MoveSouth
RTS

View File

@@ -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)