;;; $F23C: Samus command 9: set up Samus for Zebes start ;;;
{
; Called by:
;     $82:8000: Game state 6/1Fh/28h (loading game data / set up new game / load demo game data)
$90:F23C AD A2 09 LDA $09A2 [$7E:09A2] ;\
$90:F23F 89 20 00 BIT #$0020 ;} If equipped gravity suit: go to BRANCH_GRAVITY
$90:F242 D0 23 BNE $23 [$F267] ;/
$90:F244 89 01 00 BIT #$0001 ;\
$90:F247 D0 0F BNE $0F [$F258] ;} If equipped varia suit: go to BRANCH_VARIA
$90:F249 A0 F4 E1 LDY #$E1F4 ;\
$90:F24C 22 E9 C4 8D JSL $8DC4E9[$8D:C4E9] ;} Spawn palette FX object $E1F4 (Samus loading - power suit)
$90:F250 A9 00 00 LDA #$0000 ;\
$90:F253 8D 1C 0A STA $0A1C [$7E:0A1C] ;} Samus pose = facing forward - power suit
$90:F256 80 1C BRA $1C [$F274] ; Go to BRANCH_MERGE
; BRANCH_VARIA
$90:F258 A0 F8 E1 LDY #$E1F8 ;\
$90:F25B 22 E9 C4 8D JSL $8DC4E9[$8D:C4E9] ;} Spawn palette FX object $E1F8 (Samus loading - varia suit)
$90:F25F A9 9B 00 LDA #$009B ;\
$90:F262 8D 1C 0A STA $0A1C [$7E:0A1C] ;} Samus pose = facing forward - varia/gravity suit
$90:F265 80 0D BRA $0D [$F274] ; Go to BRANCH_MERGE
; BRANCH_GRAVITY
$90:F267 A0 FC E1 LDY #$E1FC ;\
$90:F26A 22 E9 C4 8D JSL $8DC4E9[$8D:C4E9] ;} Spawn palette FX object $E1FC (Samus loading - gravity suit)
$90:F26E A9 9B 00 LDA #$009B ;\
$90:F271 8D 1C 0A STA $0A1C [$7E:0A1C] ;} Samus pose = facing forward - varia/gravity suit
; BRANCH_MERGE
$90:F274 22 BA DE 91 JSL $91DEBA[$91:DEBA] ; Load Samus suit palette
$90:F278 22 33 F4 91 JSL $91F433[$91:F433] ; Initialise Samus pose
$90:F27C A9 03 00 LDA #$0003 ;\
$90:F27F 8D 94 0A STA $0A94 [$7E:0A94] ;} Samus animation frame timer = 3
$90:F282 A9 02 00 LDA #$0002 ;\
$90:F285 8D 96 0A STA $0A96 [$7E:0A96] ;} Samus animation frame = 2 (Samus appears)
$90:F288 9C EC 0D STZ $0DEC [$7E:0DEC] ; Samus appears fanfare timer = 0
$90:F28B 38 SEC ;\
$90:F28C 60 RTS ;} Return carry set
}