Whitespace housekeeping

This commit is contained in:
scawful
2024-09-29 18:10:13 -04:00
parent 87634efca0
commit 863b3eaf5d
4 changed files with 34 additions and 50 deletions

View File

@@ -56,6 +56,7 @@ Sprite_Octorok_Prep:
{ {
PHB : PHK : PLB PHB : PHK : PLB
; TODO Check if the sprite is placed in water
PLB PLB
RTL RTL

View File

@@ -472,7 +472,6 @@ HandleTileDirections:
LDA #$40 : STA.w SprTimerD, X LDA #$40 : STA.w SprTimerD, X
%GotoAction(6) ; Minecart_Release %GotoAction(6) ; Minecart_Release
RTS RTS
.not_out_of_bounds .not_out_of_bounds
; Check if the tile is a stop tile ; Check if the tile is a stop tile
CMP.b #$B7 : BEQ .stop_north CMP.b #$B7 : BEQ .stop_north
@@ -486,12 +485,10 @@ HandleTileDirections:
LDA.b #South : STA.w SprSubtype, X : STA.w !MinecartDirection LDA.b #South : STA.w SprSubtype, X : STA.w !MinecartDirection
LDA #$01 : STA !SpriteDirection, X LDA #$01 : STA !SpriteDirection, X
JMP .go_vert JMP .go_vert
.stop_south .stop_south
; Set the new direction to south and flip the cart's orientation ; Set the new direction to south and flip the cart's orientation
LDA.b #North : STA.w SprSubtype, X : STZ.w !MinecartDirection LDA.b #North : STA.w SprSubtype, X : STZ.w !MinecartDirection
LDA #$00 : STA !SpriteDirection, X LDA #$00 : STA !SpriteDirection, X
; ----------------------------------------------- ; -----------------------------------------------
.go_vert .go_vert
%SetTimerA($40) %SetTimerA($40)
@@ -499,18 +496,15 @@ HandleTileDirections:
%GotoAction(1) ; Minecart_WaitVert %GotoAction(1) ; Minecart_WaitVert
JSL Link_ResetProperties_A JSL Link_ResetProperties_A
RTS RTS
.stop_east .stop_east
; Set the new direction to east and flip the cart's orientation ; Set the new direction to east and flip the cart's orientation
LDA.b #West : STA.w SprSubtype, X : STA.w !MinecartDirection LDA.b #West : STA.w SprSubtype, X : STA.w !MinecartDirection
LDA #$02 : STA !SpriteDirection, X LDA #$02 : STA !SpriteDirection, X
JMP .go_horiz JMP .go_horiz
.stop_west .stop_west
; Set the new direction to west and flip the cart's orientation ; Set the new direction to west and flip the cart's orientation
LDA.b #East : STA.w SprSubtype, X : STA.w !MinecartDirection LDA.b #East : STA.w SprSubtype, X : STA.w !MinecartDirection
LDA #$03 : STA !SpriteDirection, X LDA #$03 : STA !SpriteDirection, X
; ----------------------------------------------- ; -----------------------------------------------
.go_horiz .go_horiz
%SetTimerA($40) %SetTimerA($40)
@@ -549,7 +543,6 @@ HandleTileDirections:
.inverse_vert_velocity .inverse_vert_velocity
LDA.b #-!MinecartSpeed : STA.w SprYSpeed, X LDA.b #-!MinecartSpeed : STA.w SprYSpeed, X
JMP .done JMP .done
.check_direction .check_direction
LDA.w SprSubtype, X LDA.w SprSubtype, X
ASL #2 ; Multiply by 4 (shifting left by 2 bits) to offset rows in the lookup table ASL #2 ; Multiply by 4 (shifting left by 2 bits) to offset rows in the lookup table
@@ -624,7 +617,6 @@ HandleDynamicSwitchTileDirections:
JSL Link_SetupHitBox JSL Link_SetupHitBox
JSL Sprite_SetupHitBox ; X is now the ID of the sprite $B0 JSL Sprite_SetupHitBox ; X is now the ID of the sprite $B0
PLX PLX
JSL CheckIfHitBoxesOverlap : BCC .no_b0 JSL CheckIfHitBoxesOverlap : BCC .no_b0
LDA !MinecartDirection : CMP.b #$00 : BEQ .east_or_west LDA !MinecartDirection : CMP.b #$00 : BEQ .east_or_west
CMP.b #$01 : BEQ .north_or_south CMP.b #$01 : BEQ .north_or_south
@@ -674,7 +666,6 @@ CheckSpritePresence:
LDX.b #$10 LDX.b #$10
.x_loop .x_loop
DEX DEX
LDY.b #$04 LDY.b #$04
.y_loop .y_loop
DEY DEY
@@ -712,7 +703,6 @@ CheckForPlayerInput:
CMP.b #$BD : BEQ .can_input CMP.b #$BD : BEQ .can_input
BRA .cant_input BRA .cant_input
.can_input .can_input
LDY !SpriteDirection, X LDY !SpriteDirection, X
LDA $F0 : AND .d_pad_press, Y : STA $00 : AND.b #$08 : BEQ .not_pressing_up LDA $F0 : AND .d_pad_press, Y : STA $00 : AND.b #$08 : BEQ .not_pressing_up
LDA.b #$00 : STA !SpriteDirection, X ; Moving Up LDA.b #$00 : STA !SpriteDirection, X ; Moving Up
@@ -817,11 +807,8 @@ Sprite_Minecart_DrawTop:
LDA .properties, X : STA ($90), Y LDA .properties, X : STA ($90), Y
PHY PHY
TYA : LSR #2 : TAY TYA : LSR #2 : TAY
LDA .sizes, X : ORA $0F : STA ($92), Y ; store size in oam buffer LDA .sizes, X : ORA $0F : STA ($92), Y ; store size in oam buffer
PLY : INY PLY : INY
PLX : DEX : BPL .nextTile PLX : DEX : BPL .nextTile
@@ -879,7 +866,6 @@ Sprite_Minecart_DrawBottom:
.nextTile .nextTile
PHX ; Save current Tile Index? PHX ; Save current Tile Index?
TXA : CLC : ADC $06 ; Add Animation Index Offset TXA : CLC : ADC $06 ; Add Animation Index Offset
PHA ; Keep the value with animation index offset? PHA ; Keep the value with animation index offset?
@@ -907,13 +893,9 @@ Sprite_Minecart_DrawBottom:
LDA .properties, X : STA ($90), Y LDA .properties, X : STA ($90), Y
PHY PHY
TYA : LSR #2 : TAY TYA : LSR #2 : TAY
LDA .sizes, X : ORA $0F : STA ($92), Y ; store size in oam buffer LDA .sizes, X : ORA $0F : STA ($92), Y ; store size in oam buffer
PLY : INY PLY : INY
PLX : DEX : BPL .nextTile PLX : DEX : BPL .nextTile
PLX PLX
@@ -992,3 +974,4 @@ JML RoomTag_ShutterDoorRequiresCart
; #_01CC0A: BRA RoomTag_TriggerHoles ; #_01CC0A: BRA RoomTag_TriggerHoles
pullpc pullpc