whitespace cleanup

This commit is contained in:
scawful
2024-09-18 23:38:18 -04:00
parent aa9a75077b
commit 3e73c7ab1a
2 changed files with 24 additions and 28 deletions

View File

@@ -83,8 +83,7 @@ SprState = $0DD0
SprGfxProps = $0E60 SprGfxProps = $0E60
; Direction of sprite collision with wall ; Direction of sprite collision with wall
SprCollision = $0E70 SprCollision = $0E70
; Definitely closely tied to the process of a sprite taking damage. ; Definitely closely tied to the process of a sprite taking damage.
; Seems to serve as a palette cycling index, or a state variable. ; Seems to serve as a palette cycling index, or a state variable.

View File

@@ -121,13 +121,13 @@ Sprite_BeanVendor_Main:
RTS RTS
} }
; 0x01 - Liftable Magic Bean ; 0x01 - Liftable Magic Bean
MagicBean: MagicBean:
{ {
%StartOnFrame(1) %StartOnFrame(1)
%PlayAnimation(1,1,1) %PlayAnimation(1,1,1)
; TODO: Finish bottle logic ; TODO: Finish bottle logic
LDA.w SprMiscE, X : CMP.b #$01 : BEQ .not_lifting LDA.w SprMiscE, X : CMP.b #$01 : BEQ .not_lifting
LDA.w $0309 : CMP.b #$02 : BNE .not_lifting LDA.w $0309 : CMP.b #$02 : BNE .not_lifting
@@ -136,7 +136,7 @@ Sprite_BeanVendor_Main:
LDA.l $7EF35D : CMP.b #$02 : BEQ .bottle2_available LDA.l $7EF35D : CMP.b #$02 : BEQ .bottle2_available
LDA.l $7EF35E : CMP.b #$02 : BEQ .bottle3_available LDA.l $7EF35E : CMP.b #$02 : BEQ .bottle3_available
LDA.l $7EF35F : CMP.b #$02 : BEQ .bottle4_available LDA.l $7EF35F : CMP.b #$02 : BEQ .bottle4_available
%ShowUnconditionalMessage($033) %ShowUnconditionalMessage($033)
JMP .not_lifting JMP .not_lifting
@@ -149,7 +149,7 @@ Sprite_BeanVendor_Main:
LDA.b #$09 : STA.l $7EF35D LDA.b #$09 : STA.l $7EF35D
%ShowUnconditionalMessage($034) %ShowUnconditionalMessage($034)
JMP .finish_storage JMP .finish_storage
.bottle3_available .bottle3_available
LDA.b #$09 : STA.l $7EF35E LDA.b #$09 : STA.l $7EF35E
%ShowUnconditionalMessage($034) %ShowUnconditionalMessage($034)
@@ -165,7 +165,7 @@ Sprite_BeanVendor_Main:
.not_lifting .not_lifting
JSL Sprite_CheckIfLifted JSL Sprite_CheckIfLifted
RTS RTS
} }
@@ -175,7 +175,7 @@ Sprite_BeanVendor_Main:
%PlayAnimation(2,3,16) %PlayAnimation(2,3,16)
JSL Sprite_PlayerCantPassThrough JSL Sprite_PlayerCantPassThrough
REP #$30 REP #$30
LDA.l $7EF3C7 LDA.l $7EF3C7
AND.w #$00FF AND.w #$00FF
SEP #$30 SEP #$30
CMP.b #$07 : BCS .already_met CMP.b #$07 : BCS .already_met
@@ -211,7 +211,7 @@ Sprite_BeanVendor_Main:
LDA.w SprY, X : STA $02 LDA.w SprY, X : STA $02
LDA.w SprYH, X : STA $03 LDA.w SprYH, X : STA $03
LDA.w SprXH, X : STA $01 LDA.w SprXH, X : STA $01
LDA.b #$07 LDA.b #$07
JSL Sprite_SpawnDynamically JSL Sprite_SpawnDynamically
JSL Sprite_SetSpawnedCoords JSL Sprite_SetSpawnedCoords
LDA.b #$01 : STA.w SprAction, Y LDA.b #$01 : STA.w SprAction, Y
@@ -242,7 +242,7 @@ Sprite_BeanVendor_Main:
%ShowUnconditionalMessage($146) %ShowUnconditionalMessage($146)
%GotoAction(6) %GotoAction(6)
.not_ready .not_ready
RTS RTS
} }
KaeoporaGaebora_Respond: KaeoporaGaebora_Respond:
@@ -277,7 +277,7 @@ Sprite_BeanVendor_Main:
ReleaseMagicBean: ReleaseMagicBean:
{ {
; X is the bottle ID ; X is the bottle ID
LDA.b $8A : CMP.b #$00 : BNE .not_the_ranch LDA.b $8A : CMP.b #$00 : BNE .not_the_ranch
LDA.b #$07 LDA.b #$07
JSL Sprite_SpawnDynamically JSL Sprite_SpawnDynamically
@@ -315,17 +315,17 @@ Sprite_BeanVendor_Draw:
.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?
ASL A : TAX ASL A : TAX
REP #$20 REP #$20
LDA $00 : CLC : ADC .x_offsets, X : STA ($90), Y LDA $00 : CLC : ADC .x_offsets, X : STA ($90), Y
AND.w #$0100 : STA $0E AND.w #$0100 : STA $0E
INY INY
LDA $02 : CLC : ADC .y_offsets, X : STA ($90), Y LDA $02 : CLC : ADC .y_offsets, X : STA ($90), Y
CLC : ADC #$0010 : CMP.w #$0100 CLC : ADC #$0010 : CMP.w #$0100
@@ -342,14 +342,12 @@ Sprite_BeanVendor_Draw:
INY INY
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
@@ -409,17 +407,17 @@ Sprite_KaeoporaGaebora_Draw:
.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?
ASL A : TAX ASL A : TAX
REP #$20 REP #$20
LDA $00 : CLC : ADC .x_offsets, X : STA ($90), Y LDA $00 : CLC : ADC .x_offsets, X : STA ($90), Y
AND.w #$0100 : STA $0E AND.w #$0100 : STA $0E
INY INY
LDA $02 : CLC : ADC .y_offsets, X : STA ($90), Y LDA $02 : CLC : ADC .y_offsets, X : STA ($90), Y
CLC : ADC #$0010 : CMP.w #$0100 CLC : ADC #$0010 : CMP.w #$0100
@@ -436,14 +434,13 @@ Sprite_KaeoporaGaebora_Draw:
INY INY
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
@@ -451,7 +448,7 @@ Sprite_KaeoporaGaebora_Draw:
RTS RTS
; ========================================================= ; =========================================================
.start_index .start_index
db $00 db $00
.nbr_of_tiles .nbr_of_tiles