diff --git a/src/bank_A0.asm b/src/bank_A0.asm index fa9199d..309f4a0 100644 --- a/src/bank_A0.asm +++ b/src/bank_A0.asm @@ -2,635 +2,10 @@ org $A08000 -; Loading the game: -; $8A1E - load enemies - at $80:A0CA (start gameplay) -; $8CD7 - initialise enemies and transfer tiles to VRAM - at $82:80C9/80F9/814C (game state 6/1Fh/28h), executed 6 times for 6 frames - -; Main gameplay (game state 8): -; $8EB6 - determine which enemies to process -; $9785 - Samus / projectile interaction handler -; $8FD4 - main enemy routine -; $9758 - enemy collision handling -; $C26A - process enemy instructions -; $9423 - add enemy to drawing queue -; $A8F0 - Samus / solid enemy collision detection, executed at least twice -; $9894 - enemy projectile / Samus collision detection -; $996C - enemy projectile / projectile collision detection -; $A306 - process enemy power bomb interaction -; $884D - draw Samus, projectiles, enemies and enemy projectiles -; $944A - write enemy OAM -; $88C4 - execute enemy graphics drawn hook -; $9726 - handle queuing enemy BG2 tilemap VRAM transfer -; $8687 - handle room shaking -; $9169 - decrement Samus hurt timers and clear active enemy indices - -; Door transition whilst screen is fading out (game state Ah/Bh): -; $8EB6 - determine which enemies to process -; $8FD4 - main enemy routine -; $884D - draw Samus, enemies and enemy projectiles - -; Door transition whilst screen is scrolling (game state Bh): -; Enemy tiles are processed via enemy set data by $82:DFD1 during door transition function $E4A9 -; $8A1E - load enemies - at $82:E4A9 -; $896F - load enemy set data (just mirrors enemy set into RAM ($7E:D559), debug/pointless) -; $8A6D - clear enemy data and process enemy set -; $8D64 - process enemy set (from ROM directly) (loads enemy palettes and allocates space for tiles (EnemyTileData_Size, $7E:EF5C)) -; $8C6C - load enemy tile data (loads enemy tiles into $7E:7000 from enemy loading data (EnemyTileData_Size), this data is then DMA'd by $8CD7 (but not $8A9E)) -; $8A9E - initialise enemies - at $82:E4A9 (clear enemy tiles ($7E:7000), load enemy population data into enemy data) -; $8BF3 - load enemy GFX indices (determines enemy VRAM tiles index and palette index ($0F98/96 / $7E:7006/08) from enemy set (again, from ROM directly)) -; $88D0 - record enemy spawn data (mirrors enemy population data to $7E:701E..39) -; $8BE9 - execute enemy initialisation AI - -; Door transition whilst screen is fading in (game state Bh): -; $8EB6 - determine which enemies to process -; $8FD4 - main enemy routine -; $884D - draw Samus, enemies and enemy projectiles -; $9726 - handle queuing enemy BG2 tilemap VRAM transfer - - ; Common to all enemy code banks - -;;; $8000: Grapple AI - no interaction. Also unfreezes enemies(!) ;;; -Common_GrappleAI_NoInteraction: -; Used by skultera, Draygon body, fire arc, Phantoon, etecoon, dachora and WS ghost - JSL.L GrappleAI_SwitchEnemyAIToMainAI ;A08000; - RTL ;A08004; - - -;;; $8005: Grapple AI - Samus latches on ;;; -Common_GrappleAI_SamusLatchesOn: -; Used by gripper and Crocomire - JSL.L GrappleAI_SamusLatchesOnWithGrapple ;A08005; - RTL ;A08009; - - -;;; $800A: Grapple AI - kill enemy ;;; -Common_GrappleAI_KillEnemy: -; Common - JSL.L GrappleAI_EnemyGrappleDeath ;A0800A; - RTL ;A0800E; - - -;;; $800F: Grapple AI - cancel grapple beam ;;; -Common_GrappleAI_CancelGrappleBeam: -; Common - JSL.L GrappleAI_SwitchToFrozenAI ;A0800F; - RTL ;A08013; - - -;;; $8014: Grapple AI - Samus latches on - no invincibility ;;; -Common_GrappleAI_SamusLatchesOn_NoInvincibility: -; Used by powamp - JSL.L GrappleAI_SamusLatchesOnWithGrapple_NoInvincibility ;A08014; - RTL ;A08018; - - -;;; $8019: Unused. Grapple AI - Samus latches on - paralyse enemy ;;; -UNUSED_Common_GrappleAI_SamusLatchesOn_ParalyzeEnemy_A08019: - JSL.L GrappleAI_SamusLatchesOnWithGrapple_ParalyzeEnemy ;A08019; - RTL ;A0801D; - - -;;; $801E: Grapple AI - hurt Samus ;;; -Common_GrappleAI_HurtSamus: -; Used by WS spark -; Hurt reaction happens in $9B:B932 - JSL.L GrappleAI_SwitchToFrozenAI_duplicate ;A0801E; - RTL ;A08022; - - -;;; $8023: Normal enemy touch AI ;;; -Common_NormalEnemyTouchAI: - JSL.L NormalEnemyTouchAI ;A08023; - RTL ;A08027; - - -;;; $8028: Normal touch AI - no death check ;;; -Common_NormalTouchAI_NoDeathCheck: - JSL.L NormalEnemyTouchAI_NoDeathCheck_External ;A08028; - RTL ;A0802C; - - -;;; $802D: Normal enemy shot AI ;;; -Common_NormalEnemyShotAI: - JSL.L NormalEnemyShotAI ;A0802D; - RTL ;A08031; - - -;;; $8032: Normal enemy shot AI - no death check, no enemy shot graphic ;;; -Common_NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic: - JSL.L NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic_External ;A08032; - RTL ;A08036; - - -;;; $8037: Normal enemy power bomb AI ;;; -Common_NormalEnemyPowerBombAI: - JSL.L NormalEnemyPowerBombAI ;A08037; - RTL ;A0803B; - - -;;; $803C: Normal enemy power bomb AI - no death check ;;; -Common_NormalEnemyPowerBombAI_NoDeathCheck: -; Kraid's power bomb AI - JSL.L NormalEnemyPowerBombAI_NoDeathCheck_External ;A0803C; - RTL ;A08040; - - -;;; $8041: Normal enemy frozen AI ;;; -Common_NormalEnemyFrozenAI: - JSL.L NormalEnemyFrozenAI ;A08041; - RTL ;A08045; - - -;;; $8046: Creates a dud shot ;;; -Common_CreateADudShot: - JSL.L CreateADudShot ;A08046; - RTL ;A0804A; - - -;;; $804B: RTS ;;; -RTS_A0804B: - RTS ;A0804B; - - -;;; $804C: RTL ;;; -RTL_A0804C: - RTL ;A0804C; - - -;;; $804D: Spritemap - nothing ;;; -Spritemap_Common_Nothing: - dw $0000 ;A0804D; - - -;;; $804F: Extended spritemap - nothing ;;; -ExtendedSpritemap_Common_Nothing: - dw $0001,$0000,$0000 ;A0804F; - dw Spritemap_Common_Nothing ;A08055; - dw Hitbox_Common_Nothing ;A08057; - - -;;; $8059: Hitbox - nothing ;;; -Hitbox_Common_Nothing: -; [n entries] [[left offset] [top offset] [right offset] [bottom offset] [p touch] [p shot]]... - dw $0001,$0000,$0000,$0000,$0000 ;A08059; - dw Common_NormalEnemyTouchAI ;A08063; - dw Common_NormalEnemyShotAI ;A08065; - - -;;; $8067: Instruction list - delete enemy ;;; -InstList_Common_DeleteEnemy: - dw Instruction_Common_DeleteEnemy ;A08067; - - -;;; $8069: Two NOPs ;;; -NOPNOP_A08069: -; Used as palette by respawning enemy placeholder and Draygon's eye o_O - NOP ;A08069; - NOP ;A0806A; - -Instruction_Common_Enemy0FB2_InY: -; Used only by torizos (for enemy movement function) and escape etecoon (for enemy function) - LDA.W $0000,Y ;A0806B; - STA.W Enemy.var5,X ;A0806E; - INY ;A08071; - INY ;A08072; - RTL ;A08073; - - -;;; $806B: Instruction - Enemy.var5 = [[Y]] ;;; -Instruction_Common_SetEnemy0FB2ToRTS: -; Used only by torizos (for enemy movement function) and escape etecoon (for enemy function) - LDA.W #RTS_A0807B ;A08074; - STA.W Enemy.var5,X ;A08077; - RTL ;A0807A; - - -RTS_A0807B: - RTS ;A0807B; - - -;;; $807C: Instruction - delete enemy ;;; -Instruction_Common_DeleteEnemy: - LDA.W Enemy.properties,X ;A0807C; - ORA.W #$0200 ;A0807F; - STA.W Enemy.properties,X ;A08082; - PLA ;A08085; - PEA.W ProcessEnemyInstructions_return-1 ;A08086; - RTL ;A08089; - - -;;; $808A: Instruction - call function [[Y]] ;;; -Instruction_Common_CallFunctionInY: - LDA.W $0000,Y ;A0808A; - STA.B DP_Temp12 ;A0808D; - PHY ;A0808F; - PHX ;A08090; - PEA.W .manualReturn-1 ;A08091; - JMP.W (DP_Temp12) ;A08094; - - .manualReturn: - PLX ;A08097; - PLY ;A08098; - INY ;A08099; - INY ;A0809A; - RTL ;A0809B; - - -;;; $809C: Instruction - call function [[Y]] with A = [[Y] + 2] ;;; -Instruction_Common_CallFunctionInY_WithA: - LDA.W $0000,Y ;A0809C; - STA.B DP_Temp12 ;A0809F; - LDA.W $0002,Y ;A080A1; - PHY ;A080A4; - PHX ;A080A5; - PEA.W .manualReturn-1 ;A080A6; - JMP.W (DP_Temp12) ;A080A9; - - .manualReturn: - PLX ;A080AC; - PLY ;A080AD; - TYA ;A080AE; - CLC ;A080AF; - ADC.W #$0004 ;A080B0; - TAY ;A080B3; - RTL ;A080B4; - - -if !FEATURE_KEEP_UNREFERENCED -;;; $80B5: Unused. Instruction - call external function [[Y]] ;;; -UNUSED_Instruction_Common_CallExternalFunctionInY_A080B5: - LDA.W $0000,Y ;A080B5; - STA.B DP_Temp12 ;A080B8; - LDA.W $0001,Y ;A080BA; - STA.B DP_Temp13 ;A080BD; - PHX ;A080BF; - PHY ;A080C0; - JSL.L .externalFunction ;A080C1; - PLY ;A080C5; - PLX ;A080C6; - INY ;A080C7; - INY ;A080C8; - INY ;A080C9; - RTL ;A080CA; - - .externalFunction: - JML.W [DP_Temp12] ;A080CB; - - -;;; $80CE: Unused. Instruction - call external function [[Y]] with A = [[Y] + 3] ;;; -UNUSED_Inst_Common_CallExternalFunctionInY_WithA_A080CE: - LDA.W $0000,Y ;A080CE; - STA.B DP_Temp12 ;A080D1; - LDA.W $0001,Y ;A080D3; - STA.B DP_Temp13 ;A080D6; - LDA.W $0003,Y ;A080D8; - PHX ;A080DB; - PHY ;A080DC; - JSL.L .externalFunction ;A080DD; - PLY ;A080E1; - PLX ;A080E2; - TYA ;A080E3; - CLC ;A080E4; - ADC.W #$0005 ;A080E5; - TAY ;A080E8; - RTL ;A080E9; - - .externalFunction: - JML.W [DP_Temp12] ;A080EA; -endif ; !FEATURE_KEEP_UNREFERENCED - - -;;; $80ED: Instruction - go to [[Y]] ;;; -Instruction_Common_GotoY: - LDA.W $0000,Y ;A080ED; - TAY ;A080F0; - RTL ;A080F1; - - -;;; $80F2: Instruction - go to [[Y]] + ±[[Y]] ;;; -Instruction_Common_GotoY_PlusY: - STY.B DP_Temp12 ;A080F2; - DEY ;A080F4; - LDA.W $0000,Y ;A080F5; - XBA ;A080F8; - BMI .highByte ;A080F9; - AND.W #$00FF ;A080FB; - BRA + ;A080FE; - - .highByte: - ORA.W #$FF00 ;A08100; - -+ CLC ;A08103; - ADC.B DP_Temp12 ;A08104; - TAY ;A08106; - RTL ;A08107; - - -;;; $8108: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_Common_DecrementTimer_GotoYIfNonZero: - DEC.W Enemy.loopCounter,X ;A08108; - BNE Instruction_Common_GotoY ;A0810B; - INY ;A0810D; - INY ;A0810E; - RTL ;A0810F; - - -;;; $8110: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate: - DEC.W Enemy.loopCounter,X ;A08110; - BNE Instruction_Common_GotoY ;A08113; - INY ;A08115; - INY ;A08116; - RTL ;A08117; - - -;;; $8118: Instruction - decrement timer and go to [Y] + ±[[Y]] if non-zero ;;; -Instruction_Common_DecrementTimer_GotoY_PlusY_IfNonZero: - SEP #$20 ;A08118; - DEC.W Enemy.loopCounter,X ;A0811A; - REP #$20 ;A0811D; - BNE Instruction_Common_GotoY_PlusY ;A0811F; - INY ;A08121; - RTL ;A08122; - - -;;; $8123: Instruction - timer = [[Y]] ;;; -Instruction_Common_TimerInY: - LDA.W $0000,Y ;A08123; - STA.W Enemy.loopCounter,X ;A08126; - INY ;A08129; - INY ;A0812A; - RTL ;A0812B; - - -;;; $812C: Instruction - skip next instruction ;;; -Instruction_Common_SkipNextInstruction: - INY ;A0812C; - INY ;A0812D; - RTL ;A0812E; - - -;;; $812F: Instruction - sleep ;;; -Instruction_Common_Sleep: - DEY ;A0812F; - DEY ;A08130; - TYA ;A08131; - STA.W Enemy.instList,X ;A08132; - PLA ;A08135; - PEA.W ProcessEnemyInstructions_return-1 ;A08136; - RTL ;A08139; - - -;;; $813A: Instruction - wait [[Y]] frames ;;; -Instruction_Common_WaitYFrames: -; Set instruction timer and terminate processing enemy instructions -; Used for running a delay that doesn't update graphics, -; useful for e.g. GT eye beam attack ($AA:D10D), implemented by an instruction list that has no graphical instructions, -; which allows it to be called from multiple different poses - LDA.W $0000,Y ;A0813A; - STA.W Enemy.instTimer,X ;A0813D; - INY ;A08140; - INY ;A08141; - TYA ;A08142; - STA.W Enemy.instList,X ;A08143; - PLA ;A08146; - PEA.W ProcessEnemyInstructions_return-1 ;A08147; - RTL ;A0814A; - - -;;; $814B: Instruction - transfer [[Y]] bytes from [[Y] + 2] to VRAM [[Y] + 5] ;;; -Instruction_Common_TransferYBytesInYToVRAM: - PHX ;A0814B; - LDX.W VRAMWriteStack ;A0814C; - LDA.W $0000,Y ;A0814F; - STA.B VRAMWrite.size,X ;A08152; - LDA.W $0002,Y ;A08154; - STA.B VRAMWrite.src,X ;A08157; - LDA.W $0003,Y ;A08159; - STA.B VRAMWrite.src+1,X ;A0815C; - LDA.W $0005,Y ;A0815E; - STA.B VRAMWrite.dest,X ;A08161; - TXA ;A08163; - CLC ;A08164; - ADC.W #$0007 ;A08165; - STA.W VRAMWriteStack ;A08168; - TYA ;A0816B; - CLC ;A0816C; - ADC.W #$0007 ;A0816D; - TAY ;A08170; - PLX ;A08171; - RTL ;A08172; - - -;;; $8173: Instruction - enable off-screen processing ;;; -Instruction_Common_EnableOffScreenProcessing: - LDA.W Enemy.properties,X ;A08173; - ORA.W #$0800 ;A08176; - STA.W Enemy.properties,X ;A08179; - RTL ;A0817C; - - -;;; $817D: Instruction - disable off-screen processing ;;; -Instruction_Common_DisableOffScreenProcessing: - LDA.W Enemy.properties,X ;A0817D; - AND.W #$F7FF ;A08180; - STA.W Enemy.properties,X ;A08183; - RTL ;A08186; - - -;;; $8187: Common enemy speeds - linearly increasing ;;; -CommonEnemySpeeds_LinearlyIncreasing: -; _____________________ Speed -; | _______________ Subspeed -; | | _________ Negated speed -; | | | ___ Negated subspeed -; | | | | - .speed: - dw $0000 ;A08187; - .subspeed: - dw $0000 ;A08189; - .negatedSpeed: - dw $0000 ;A0818B; - .negatedSubspeed: - dw $0000 ;A0818D; - dw $0000,$1000,$FFFF,$F000 - dw $0000,$2000,$FFFF,$E000 - dw $0000,$3000,$FFFF,$D000 - dw $0000,$4000,$FFFF,$C000 - dw $0000,$5000,$FFFF,$B000 - dw $0000,$6000,$FFFF,$A000 - dw $0000,$7000,$FFFF,$9000 - dw $0000,$8000,$FFFF,$8000 - dw $0000,$9000,$FFFF,$7000 - dw $0000,$A000,$FFFF,$6000 - dw $0000,$B000,$FFFF,$5000 - dw $0000,$C000,$FFFF,$4000 - dw $0000,$D000,$FFFF,$3000 - dw $0000,$E000,$FFFF,$2000 - dw $0000,$F000,$FFFF,$1000 - dw $0001,$0000,$FFFF,$0000 - dw $0001,$1000,$FFFE,$F000 - dw $0001,$2000,$FFFE,$E000 - dw $0001,$3000,$FFFE,$D000 - dw $0001,$4000,$FFFE,$C000 - dw $0001,$5000,$FFFE,$B000 - dw $0001,$6000,$FFFE,$A000 - dw $0001,$7000,$FFFE,$9000 - dw $0001,$8000,$FFFE,$8000 - dw $0001,$9000,$FFFE,$7000 - dw $0001,$A000,$FFFE,$6000 - dw $0001,$B000,$FFFE,$5000 - dw $0001,$C000,$FFFE,$4000 - dw $0001,$D000,$FFFE,$3000 - dw $0001,$E000,$FFFE,$2000 - dw $0001,$F000,$FFFE,$1000 - dw $0002,$0000,$FFFE,$0000 - dw $0002,$1000,$FFFD,$F000 - dw $0002,$2000,$FFFD,$E000 - dw $0002,$3000,$FFFD,$D000 - dw $0002,$4000,$FFFD,$C000 - dw $0002,$5000,$FFFD,$B000 - dw $0002,$6000,$FFFD,$A000 - dw $0002,$7000,$FFFD,$9000 - dw $0002,$8000,$FFFD,$8000 - dw $0002,$9000,$FFFD,$7000 - dw $0002,$A000,$FFFD,$6000 - dw $0002,$B000,$FFFD,$5000 - dw $0002,$C000,$FFFD,$4000 - dw $0002,$D000,$FFFD,$3000 - dw $0002,$E000,$FFFD,$2000 - dw $0002,$F000,$FFFD,$1000 - dw $0003,$0000,$FFFD,$0000 - dw $0003,$1000,$FFFC,$F000 - dw $0003,$2000,$FFFC,$E000 - dw $0003,$3000,$FFFC,$D000 - dw $0003,$4000,$FFFC,$C000 - dw $0003,$5000,$FFFC,$B000 - dw $0003,$6000,$FFFC,$A000 - dw $0003,$7000,$FFFC,$9000 - dw $0003,$8000,$FFFC,$8000 - dw $0003,$9000,$FFFC,$7000 - dw $0003,$A000,$FFFC,$6000 - dw $0003,$B000,$FFFC,$5000 - dw $0003,$C000,$FFFC,$4000 - dw $0003,$D000,$FFFC,$3000 - dw $0003,$E000,$FFFC,$2000 - dw $0003,$F000,$FFFC,$1000 - dw $0004,$0000,$FFFC,$0000 - - -;;; $838F: Common enemy speeds - quadratically increasing ;;; -CommonEnemySpeeds_QuadraticallyIncreasing: -; I.e. gravity -; Used by e.g. Botwoon when dying and falling to the floor -; _____________________ Subspeed -; | _______________ Speed -; | | _________ Negated subspeed -; | | | ___ Negated speed -; | | | | - .subspeed: - dw $0000 ;A0838F; - .speed: - dw $0000 ;A08391; - .negatedSubspeed: - dw $0000 ;A08393; - .negatedSpeed: - dw $0000 ;A08395; - dw $0109,$0000,$FEF7,$FFFF - dw $031B,$0000,$FCE5,$FFFF - dw $0636,$0000,$F9CA,$FFFF - dw $0A5A,$0000,$F5A6,$FFFF - dw $0F87,$0000,$F079,$FFFF - dw $15BD,$0000,$EA43,$FFFF - dw $1CFC,$0000,$E304,$FFFF - dw $2544,$0000,$DABC,$FFFF - dw $2E95,$0000,$D16B,$FFFF - dw $38EF,$0000,$C711,$FFFF - dw $4452,$0000,$BBAE,$FFFF - dw $50BE,$0000,$AF42,$FFFF - dw $5E33,$0000,$A1CD,$FFFF - dw $6CB1,$0000,$934F,$FFFF - dw $7C38,$0000,$83C8,$FFFF - dw $8CC8,$0000,$7338,$FFFF - dw $9E61,$0000,$619F,$FFFF - dw $B103,$0000,$4EFD,$FFFF - dw $C4AE,$0000,$3B52,$FFFF - dw $D962,$0000,$269E,$FFFF - dw $EF1F,$0000,$10E1,$FFFF - dw $05E5,$0000,$FA1B,$FFFF - dw $14B4,$0001,$EB4C,$FFFE - dw $2D8C,$0001,$D274,$FFFE - dw $476D,$0001,$B893,$FFFE - dw $6257,$0001,$9DA9,$FFFE - dw $7E4A,$0001,$81B6,$FFFE - dw $9B46,$0001,$64BA,$FFFE - dw $B94B,$0001,$46B5,$FFFE - dw $D859,$0001,$27A7,$FFFE - dw $F870,$0001,$0790,$FFFE - dw $1090,$0002,$EF70,$FFFD - dw $32B9,$0002,$CD47,$FFFD - dw $55EB,$0002,$AA15,$FFFD - dw $7A26,$0002,$85DA,$FFFD - dw $9F6A,$0002,$6096,$FFFD - dw $C5B7,$0002,$3A49,$FFFD - dw $ED0D,$0002,$12F3,$FFFD - dw $0C6C,$0003,$F394,$FFFC - dw $35D4,$0003,$CA2C,$FFFC - dw $6045,$0003,$9FBB,$FFFC - dw $8BBF,$0003,$7441,$FFFC - dw $B842,$0003,$47BE,$FFFC - dw $E5CE,$0003,$1A32,$FFFC - dw $0B63,$0004,$F49D,$FFFB - dw $3B01,$0004,$C4FF,$FFFB - dw $6BA8,$0004,$9458,$FFFB - dw $9D58,$0004,$62A8,$FFFB - dw $D011,$0004,$2FEF,$FFFB - dw $03D3,$0004,$FC2D,$FFFB - dw $2F9E,$0005,$D062,$FFFA - dw $6572,$0005,$9A8E,$FFFA - dw $9C4F,$0005,$63B1,$FFFA - dw $D435,$0005,$2BCB,$FFFA - dw $0424,$0006,$FBDC,$FFF9 - dw $3E1C,$0006,$C1E4,$FFF9 - dw $791D,$0006,$86E3,$FFF9 - dw $B527,$0006,$4AD9,$FFF9 - dw $F23A,$0006,$0DC6,$FFF9 - dw $2756,$0007,$D8AA,$FFF8 - dw $667B,$0007,$9985,$FFF8 - dw $A6A9,$0007,$5957,$FFF8 - dw $E7E0,$0007,$1820,$FFF8 - dw $2120,$0008,$DEE0,$FFF7 - dw $6469,$0008,$9B97,$FFF7 - dw $A8BB,$0008,$5745,$FFF7 - dw $EE16,$0008,$11EA,$FFF7 - dw $2B7A,$0009,$D486,$FFF6 - dw $72E7,$0009,$8D19,$FFF6 - dw $BB5D,$0009,$44A3,$FFF6 - dw $04DC,$0009,$FB24,$FFF6 - dw $4664,$000A,$B99C,$FFF5 - dw $91F5,$000A,$6E0B,$FFF5 - dw $DE8F,$000A,$2171,$FFF5 - dw $2332,$000B,$DCCE,$FFF4 - dw $71DE,$000B,$8E22,$FFF4 - dw $C193,$000B,$3E6D,$FFF4 - dw $0951,$000C,$F6AF,$FFF3 - dw $5B18,$000C,$A4E8,$FFF3 - dw $ADE8,$000C,$5218,$FFF3 - dw $01C1,$000C,$FE3F,$FFF3 - dw $4DA3,$000D,$B25D,$FFF2 - dw $A38E,$000D,$5C72,$FFF2 - dw $FA82,$000D,$057E,$FFF2 - dw $497F,$000E,$B681,$FFF1 - dw $A285,$000E,$5D7B,$FFF1 - dw $FC94,$000E,$036C,$FFF1 - dw $4EAC,$000F,$B154,$FFF0 - dw $AACD,$000F,$5533,$FFF0 - dw $07F7,$000F,$F809,$FFF0 - dw $5D2A,$0010,$A2D6,$FFEF - dw $BC66,$0010,$439A,$FFEF - dw $13AB,$0011,$EC55,$FFEE - dw $74F9,$0011,$8B07,$FFEE +namespace Common +incsrc "common_enemy_functions.asm" +namespace off ;;; $8687: Handle room shaking ;;; @@ -1003,13 +378,13 @@ Load_Enemies: JSL.L Debug_LoadEnemySetData ;A08A27; STZ.W DebugTimeIsFrozenForEnemies ;A08A2B; STZ.W BossID ;A08A2E; - LDA.W #RTL_A0804C>>16 ;A08A31; + LDA.W #Common_RTL_A0804C>>16 ;A08A31; STA.W EnemyGraphicsDrawnHook+2 ;A08A34; - LDA.W #RTL_A0804C ;A08A37; + LDA.W #Common_RTL_A0804C ;A08A37; STA.W EnemyGraphicsDrawnHook ;A08A3A; - LDA.W #RTL_A0804C>>16 ;A08A3D; + LDA.W #Common_RTL_A0804C>>16 ;A08A3D; STA.W unused1790+2 ;A08A40; - LDA.W #RTL_A0804C ;A08A43; + LDA.W #Common_RTL_A0804C ;A08A43; STA.W unused1790 ;A08A46; LDA.W #$0800 ;A08A49; STA.W EnemyBG2TilemapSize ;A08A4C; @@ -1171,11 +546,11 @@ Initialise_Enemies: BEQ .noInstructions ;A08B9F; PHX ;A08BA1; PHY ;A08BA2; - LDX.W #Spritemap_Common_Nothing ;A08BA3; + LDX.W #Common_Spritemap_Nothing ;A08BA3; LDA.W Enemy.properties2,Y ;A08BA6; BIT.W #$0004 ;A08BA9; BEQ + ;A08BAC; - LDX.W #ExtendedSpritemap_Common_Nothing ;A08BAE; + LDX.W #Common_ExtendedSpritemap_Nothing ;A08BAE; + TXA ;A08BB1; STA.W Enemy.spritemap,Y ;A08BB2; @@ -2321,7 +1696,7 @@ SpawnEnemy_AlwaysSucceed: LDA.W Enemy.properties,Y ;A093D1; BIT.W #$2000 ;A093D4; BEQ .nextEnemy ;A093D7; - LDA.W #Spritemap_Common_Nothing ;A093D9; + LDA.W #Common_Spritemap_Nothing ;A093D9; STA.W Enemy.spritemap,Y ;A093DC; .nextEnemy: @@ -2544,7 +1919,7 @@ WriteEnemyOAM_IfNotFrozenOrInvincibleFrame: ;;; $957E: Normal enemy frozen AI ;;; -NormalEnemyFrozenAI: +NormalEnemyFrozenAI_Internal: PHX ;A0957E; PHY ;A0957F; LDX.W EnemyIndex ;A09580; @@ -3270,9 +2645,9 @@ EnemySamusCollisionHandling_ExtendedSpritemap: LDA.W Enemy.ID,X ;A09A77; TAX ;A09A7A; LDA.L EnemyHeaders_enemyTouch,X ;A09A7B; - CMP.W #RTL_A0804C ;A09A7F; + CMP.W #Common_RTL_A0804C ;A09A7F; BEQ .returnUpper ;A09A82; - CMP.W #RTS_A0804B ;A09A84; + CMP.W #Common_RTS_A0804B ;A09A84; BNE .touch ;A09A87; .returnUpper: @@ -3419,13 +2794,13 @@ Enemy_vs_Projectile_CollisionHandling_ExtendedSpritemap: LDY.W EnemyIndex ;A09B9E; LDA.W Enemy.spritemap,Y ;A09BA1; BEQ .returnUpper ;A09BA4; - CMP.W #ExtendedSpritemap_Common_Nothing ;A09BA6; + CMP.W #Common_ExtendedSpritemap_Nothing ;A09BA6; BEQ .returnUpper ;A09BA9; LDX.W Enemy.ID,Y ;A09BAB; LDA.L EnemyHeaders_enemyShot,X ;A09BAE; - CMP.W #RTL_A0804C ;A09BB2; + CMP.W #Common_RTL_A0804C ;A09BB2; BEQ .returnUpper ;A09BB5; - CMP.W #RTS_A0804B ;A09BB7; + CMP.W #Common_RTS_A0804B ;A09BB7; BNE + ;A09BBA; .returnUpper: @@ -3632,9 +3007,9 @@ Enemy_vs_Bomb_CollisionHandling_ExtendedSpritemap: LDY.W EnemyIndex ;A09D50; LDX.W Enemy.ID,Y ;A09D53; LDA.L EnemyHeaders_enemyShot,X ;A09D56; - CMP.W #RTL_A0804C ;A09D5A; + CMP.W #Common_RTL_A0804C ;A09D5A; BEQ .returnUpper ;A09D5D; - CMP.W #RTS_A0804B ;A09D5F; + CMP.W #Common_RTS_A0804B ;A09D5F; BNE + ;A09D62; .returnUpper: @@ -3894,7 +3269,7 @@ EnemyGrappleBeamCollisionDetection: CMP.W #Common_GrappleAI_SamusLatchesOn_NoInvincibility ;A09F30; BEQ .grappleIndexDetermined ;A09F33; INY ;A09F35; - CMP.W #UNUSED_Common_GrappleAI_SamusLatchesOn_ParalyzeEnemy_A08019 ;A09F36; + CMP.W #Common_UNUSED_GrappleAI_SamusLatchesOn_ParalyzeEnemy_A08019 ;A09F36; BEQ .grappleIndexDetermined ;A09F39; INY ;A09F3B; CMP.W #Common_GrappleAI_HurtSamus ;A09F3C; @@ -4106,9 +3481,9 @@ Enemy_vs_Samus_CollisionHandling: LDX.W EnemyIndex ;A0A0B8; LDY.W Enemy.ID,X ;A0A0BB; LDA.W $0030,Y ;A0A0BE; - CMP.W #RTL_A0804C ;A0A0C1; + CMP.W #Common_RTL_A0804C ;A0A0C1; BEQ ..return ;A0A0C4; - CMP.W #RTS_A0804B ;A0A0C6; + CMP.W #Common_RTS_A0804B ;A0A0C6; BNE .hasTouchAI ;A0A0C9; ..return: @@ -4206,7 +3581,7 @@ Enemy_vs_ProjectileCollisionHandling: LDY.W EnemyIndex ;A0A15F; LDA.W Enemy.spritemap,Y ;A0A162; BEQ .returnUpper ;A0A165; - CMP.W #Spritemap_Common_Nothing ;A0A167; + CMP.W #Common_Spritemap_Nothing ;A0A167; BEQ .returnUpper ;A0A16A; LDA.W Enemy.properties,Y ;A0A16C; BIT.W #$0400 ;A0A16F; @@ -4663,7 +4038,7 @@ Suit_Damage_Division: ;;; $A477: Normal enemy touch AI ;;; -NormalEnemyTouchAI: +NormalEnemyTouchAI_Internal: LDX.W EnemyIndex ;A0A477; JSR.W NormalEnemyTouchAI_NoDeathCheck ;A0A47A; LDX.W EnemyIndex ;A0A47D; @@ -4812,7 +4187,7 @@ NormalEnemyTouchAI_NoDeathCheck: ;;; $A597: Normal enemy power bomb AI ;;; -NormalEnemyPowerBombAI: +NormalEnemyPowerBombAI_Internal: LDX.W EnemyIndex ;A0A597; JSR.W NormalEnemyPowerBombAI_NoDeathCheck ;A0A59A; LDX.W EnemyIndex ;A0A59D; @@ -4900,7 +4275,7 @@ NormalEnemyPowerBombAI_NoDeathCheck: ;;; $A63D: Normal enemy shot AI ;;; -NormalEnemyShotAI: +NormalEnemyShotAI_Internal: STZ.W Temp_ShotAIHitFlag ;A0A63D; LDX.W EnemyIndex ;A0A640; JSR.W NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic ;A0A643; @@ -5233,7 +4608,7 @@ NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic: ;;; $A8BC: Creates a dud shot ;;; -CreateADudShot: +CreateADudShot_Internal: PHX ;A0A8BC; PHY ;A0A8BD; LDA.W CollisionIndex ;A0A8BE; @@ -10085,7 +9460,7 @@ AlignEnemyYPositionWIthNonSquareSlope: if !FEATURE_KEEP_UNREFERENCED ;;; $C9BF: Unused. Common enemy projectile speeds - linearly increasing ;;; UNUSED_CommonEnemyProjectileSpeeds_LinearlyIncreasing_A0C9BF: -; Clone of CommonEnemySpeeds_LinearlyIncreasing +; Clone of Common_EnemySpeeds_LinearlyIncreasing ; _____________________ Speed ; | _______________ Subspeed ; | | _________ Negated speed @@ -10168,7 +9543,7 @@ endif ; !FEATURE_KEEP_UNREFERENCED ;;; $CBC7: Common enemy projectile speeds - quadratically increasing ;;; CommonEnemyProjectileSpeeds_QuadraticallyIncreasing: -; Clone of CommonEnemySpeeds_QuadraticallyIncreasing +; Clone of Common_EnemySpeeds_QuadraticallyIncreasing ; Used by Botwoon's body when dying and falling to the floor, and polyp rock ; _____________________ Subspeed ; | _______________ Speed @@ -10298,7 +9673,7 @@ EnemyHeaders_Boyon: ;A0CEBF %unused(0), %mainAI(MainAI_Boyon), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -10330,7 +9705,7 @@ EnemyHeaders_Stoke: ;A0CEFF %unused(0), %mainAI(MainAI_Stoke), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -10362,7 +9737,7 @@ EnemyHeaders_MamaTurtle: ;A0CF3F %unused(0), %mainAI(MainAI_MamaTurtle), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -10394,7 +9769,7 @@ EnemyHeaders_BabyTurtle: ;A0CF7F %unused(0), %mainAI(MainAI_BabyTurtle), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -10426,7 +9801,7 @@ EnemyHeaders_Puyo: ;A0CFBF %unused(0), %mainAI(MainAI_Puyo), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -10458,7 +9833,7 @@ EnemyHeaders_Cacatac: ;A0CFFF %unused(0), %mainAI(MainAI_Cacatac), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -10490,7 +9865,7 @@ EnemyHeaders_Owtch: ;A0D03F %unused(0), %mainAI(MainAI_Owtch), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -10522,14 +9897,14 @@ EnemyHeaders_ShipTop: ;A0D07F %unused(0), %mainAI(MainAI_ShipTop), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_A2804C), - %enemyShot(RTL_A2804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Ship), %layer(2), @@ -10552,16 +9927,16 @@ EnemyHeaders_ShipBottomEntrance: ;A0D0BF %initAI(InitAI_ShipBottomEntrance), %parts(1), %unused(0), - %mainAI(RTL_A2804C), + %mainAI(Common_RTL_A0804C), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), - %frozenAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), + %frozenAI(Common_RTL_A0804C), %timeIsFrozen(0), %deathAnimation(0), - %powerBombReaction(RTL_A2804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_A2804C), - %enemyShot(RTL_A2804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Ship), %layer(2), @@ -10586,7 +9961,7 @@ EnemyHeaders_Mellow: ;A0D0FF %unused(0), %mainAI(MainAI_Mellow_Mella_Menu), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -10618,7 +9993,7 @@ EnemyHeaders_Mella: ;A0D13F %unused(0), %mainAI(MainAI_Mellow_Mella_Menu), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -10650,7 +10025,7 @@ EnemyHeaders_Menu: ;A0D17F %unused(0), %mainAI(MainAI_Mellow_Mella_Menu), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -10682,7 +10057,7 @@ EnemyHeaders_Multiviola: ;A0D1BF %unused(0), %mainAI(MainAI_Multiviola), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -10714,7 +10089,7 @@ EnemyHeaders_LavaRocks: ;A0D1FF %unused(0), %mainAI(MainAI_Polyp), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -10746,7 +10121,7 @@ EnemyHeaders_Rinka: ;A0D23F %unused(0), %mainAI(MainAI_Rinka), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(FrozenAI_Rinka), %timeIsFrozen(0), %deathAnimation(0), @@ -10778,7 +10153,7 @@ EnemyHeaders_Rio: ;A0D27F %unused(0), %mainAI(MainAI_Rio), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -10810,7 +10185,7 @@ EnemyHeaders_Squeept: ;A0D2BF %unused(0), %mainAI(MainAI_Squeept), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -10842,7 +10217,7 @@ EnemyHeaders_Geruta: ;A0D2FF %unused(0), %mainAI(MainAI_Geruta), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -10874,7 +10249,7 @@ EnemyHeaders_Holtz: ;A0D33F %unused(0), %mainAI(MainAI_Holtz), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -10906,7 +10281,7 @@ EnemyHeaders_Oum: ;A0D37F %unused(0), %mainAI(MainAI_Oum), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -10938,7 +10313,7 @@ EnemyHeaders_Choot: ;A0D3BF %unused(0), %mainAI(MainAI_Choot), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -10970,7 +10345,7 @@ EnemyHeaders_GRipper: ;A0D3FF %unused(0), %mainAI(MainAI_GRipper), %grappleAI(Common_GrappleAI_SamusLatchesOn), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -11002,7 +10377,7 @@ EnemyHeaders_Ripper2: ;A0D43F %unused(0), %mainAI(MainAI_Ripper2), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -11034,7 +10409,7 @@ EnemyHeaders_Ripper: ;A0D47F %unused(0), %mainAI(MainAI_Ripper), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -11066,7 +10441,7 @@ EnemyHeaders_Dragon: ;A0D4BF %unused(0), %mainAI(MainAI_Dragon), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -11098,13 +10473,13 @@ EnemyHeaders_ShutterGrowing: ;A0D4FF %unused(0), %mainAI(MainAI_ShutterGrowing), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_A2804C), + %enemyTouch(Common_RTL_A0804C), %enemyShot(Common_NormalEnemyShotAI), %spritemap(0), %tileData(Tiles_Shutter), @@ -11130,7 +10505,7 @@ EnemyHeaders_ShutterShootable: ;A0D53F %unused(0), %mainAI(MainAI_ShutterShootable_ShutterDestroyable_Kamer), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -11162,7 +10537,7 @@ EnemyHeaders_ShutterHorizShootable: ;A0D57F %unused(0), %mainAI(MainAI_ShutterHorizShootable), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -11194,7 +10569,7 @@ EnemyHeaders_ShutterDestroyable: ;A0D5BF %unused(0), %mainAI(MainAI_ShutterShootable_ShutterDestroyable_Kamer), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -11226,7 +10601,7 @@ EnemyHeaders_Kamer: ;A0D5FF %unused(0), %mainAI(MainAI_ShutterShootable_ShutterDestroyable_Kamer), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -11258,7 +10633,7 @@ EnemyHeaders_Waver: ;A0D63F %unused(0), %mainAI(MainAI_Waver), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -11290,7 +10665,7 @@ EnemyHeaders_Metaree: ;A0D67F %unused(0), %mainAI(MainAI_Metaree), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -11322,7 +10697,7 @@ EnemyHeaders_Fireflea: ;A0D6BF %unused(0), %mainAI(MainAI_Fireflea), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -11354,7 +10729,7 @@ EnemyHeaders_Skultera: ;A0D6FF %unused(0), %mainAI(MainAI_Skultera), %grappleAI(Common_GrappleAI_NoInteraction), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -11386,14 +10761,14 @@ EnemyHeaders_Elevator: ;A0D73F %unused(0), %mainAI(MainAI_GrappleAI_FrozenAI_Elevator), %grappleAI(MainAI_GrappleAI_FrozenAI_Elevator), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(MainAI_GrappleAI_FrozenAI_Elevator), %timeIsFrozen(0), %deathAnimation(0), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_A3804C), - %enemyShot(RTL_A3804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(0), %layer(5), @@ -11418,7 +10793,7 @@ EnemyHeaders_Sciser: ;A0D77F %unused(0), %mainAI(MainAI_Crawlers), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -11450,7 +10825,7 @@ EnemyHeaders_Zero: ;A0D7BF %unused(0), %mainAI(MainAI_Crawlers), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -11482,7 +10857,7 @@ EnemyHeaders_Tripper: ;A0D7FF %unused(0), %mainAI(MainAI_Tripper_Kamer2), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -11514,7 +10889,7 @@ EnemyHeaders_Kamer2: ;A0D83F %unused(0), %mainAI(MainAI_Tripper_Kamer2), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -11546,7 +10921,7 @@ EnemyHeaders_Sbug: ;A0D87F %unused(0), %mainAI(MainAI_Sbug), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -11578,7 +10953,7 @@ EnemyHeaders_Sbug2: ;A0D8BF %unused(0), %mainAI(MainAI_Sbug), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -11610,7 +10985,7 @@ EnemyHeaders_Mochtroid: ;A0D8FF %unused(0), %mainAI(MainAI_Mochtroid), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -11642,7 +11017,7 @@ EnemyHeaders_Sidehopper: ;A0D93F %unused(0), %mainAI(MainAI_Hopper), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -11674,7 +11049,7 @@ EnemyHeaders_Dessgeega: ;A0D97F %unused(0), %mainAI(MainAI_Hopper), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -11706,7 +11081,7 @@ EnemyHeaders_SidehopperLarge: ;A0D9BF %unused(0), %mainAI(MainAI_Hopper), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -11738,7 +11113,7 @@ EnemyHeaders_SidehopperTourian: ;A0D9FF %unused(0), %mainAI(MainAI_Hopper), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -11770,7 +11145,7 @@ EnemyHeaders_DessgeegaLarge: ;A0DA3F %unused(0), %mainAI(MainAI_Hopper), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -11802,7 +11177,7 @@ EnemyHeaders_Zoa: ;A0DA7F %unused(0), %mainAI(MainAI_Zoa), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -11834,7 +11209,7 @@ EnemyHeaders_Viola: ;A0DABF %unused(0), %mainAI(MainAI_Crawlers), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -11852,28 +11227,28 @@ EnemyHeaders_Viola: ;A0DABF EnemyHeaders_Respawn: ;A0DAFF; %EnemyHeader(\ %tileDataSize(0), - %palette(NOPNOP_A38069), + %palette(Common_NOPNOP_A08069), %health(0), %damage(0), %width(8), %height(8), - %bank(RTL_A3804C>>16), + %bank(CommonA3_RTL_A0804C>>16), %hurtAITime(0), %cry($0059), %bossID(0), - %initAI(RTL_A3804C), + %initAI(Common_RTL_A0804C), %parts(1), %unused(0), - %mainAI(RTL_A3804C), + %mainAI(Common_RTL_A0804C), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A3804C), - %frozenAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), + %frozenAI(Common_RTL_A0804C), %timeIsFrozen(0), %deathAnimation(0), %powerBombReaction(0), %variantIndex(0), - %enemyTouch(RTL_A3804C), - %enemyShot(RTL_A3804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Metroid), %layer(0), @@ -11898,7 +11273,7 @@ EnemyHeaders_Bang: ;A0DB3F %unused(0), %mainAI(MainAI_Bang), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -11930,7 +11305,7 @@ EnemyHeaders_Skree: ;A0DB7F %unused(0), %mainAI(MainAI_Skree), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -11962,7 +11337,7 @@ EnemyHeaders_Yard: ;A0DBBF %unused(0), %mainAI(MainAI_Yard), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -11994,13 +11369,13 @@ EnemyHeaders_Reflec: ;A0DBFF %unused(0), %mainAI(RTL_A3DC1B), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), %powerBombReaction(0), %variantIndex(0), - %enemyTouch(RTL_A3804C), + %enemyTouch(Common_RTL_A0804C), %enemyShot(EnemyShot_Reflec), %spritemap(0), %tileData(Tiles_Reflec), @@ -12026,7 +11401,7 @@ EnemyHeaders_HZoomer: ;A0DC3F %unused(0), %mainAI(MainAI_HZoomer), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -12058,7 +11433,7 @@ EnemyHeaders_Zeela: ;A0DC7F %unused(0), %mainAI(MainAI_Crawlers), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -12090,7 +11465,7 @@ EnemyHeaders_Sova: ;A0DCBF %unused(0), %mainAI(MainAI_Crawlers), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -12122,7 +11497,7 @@ EnemyHeaders_Zoomer: ;A0DCFF %unused(1), %mainAI(MainAI_Crawlers), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -12154,7 +11529,7 @@ EnemyHeaders_MZoomer: ;A0DD3F %unused(1), %mainAI(MainAI_Crawlers), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -12250,7 +11625,7 @@ EnemyHeaders_CrocomireTongue: ;A0DDFF %unused(0), %mainAI(MainAI_CrocomireTongue), %grappleAI(Common_GrappleAI_SamusLatchesOn), - %hurtAI(RTL_A4804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -12300,7 +11675,7 @@ EnemyHeaders_DraygonBody: ;A0DE3F EnemyHeaders_DraygonEye: ;A0DE7F; %EnemyHeader(\ %tileDataSize($1800), - %palette(NOPNOP_A58069), + %palette(Common_NOPNOP_A08069), %health(6000), %damage(160), %width(2), @@ -12314,14 +11689,14 @@ EnemyHeaders_DraygonEye: ;A0DE7F %unused(0), %mainAI(MainAI_DraygonEye), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A5804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_A5804C), - %enemyShot(RTL_A5804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Draygon), %layer(5), @@ -12346,11 +11721,11 @@ EnemyHeaders_DraygonTail: ;A0DEBF %unused(0), %mainAI(RTL_A5C5AA), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A5804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), %enemyTouch(Common_NormalEnemyTouchAI), %enemyShot(Common_NormalEnemyShotAI), @@ -12378,14 +11753,14 @@ EnemyHeaders_DraygonArms: ;A0DEFF %unused(0), %mainAI(RTL_A5C5C4), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A5804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_A5804C), - %enemyShot(RTL_A5804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Draygon), %layer(5), @@ -12410,7 +11785,7 @@ EnemyHeaders_SporeSpawn: ;A0DF3F %unused(0), %mainAI(MainAI_SporeSpawn), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A5804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -12442,7 +11817,7 @@ EnemyHeaders_SporeSpawnStalk: ;A0DF7F %unused(0), %mainAI(MainAI_SporeSpawn), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A5804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -12474,7 +11849,7 @@ EnemyHeaders_Boulder: ;A0DFBF %unused(0), %mainAI(MainAI_Boulder), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A6804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -12506,14 +11881,14 @@ EnemyHeaders_KzanTop: ;A0DFFF %unused(0), %mainAI(MainAI_KzanTop), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A6804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), %powerBombReaction(0), %variantIndex(0), %enemyTouch(Common_NormalEnemyTouchAI), - %enemyShot(RTL_A6804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Kzan), %layer(5), @@ -12538,14 +11913,14 @@ EnemyHeaders_KzanBottom: ;A0E03F %unused(0), %mainAI(MainAI_KzanBottom), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A6804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), %powerBombReaction(0), %variantIndex(0), %enemyTouch(Common_NormalEnemyTouchAI), - %enemyShot(RTL_A6804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Kzan), %layer(5), @@ -12570,14 +11945,14 @@ EnemyHeaders_Hibashi: ;A0E07F %unused(0), %mainAI(MainAI_Hibashi), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A6804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), %powerBombReaction(0), %variantIndex(0), %enemyTouch(Common_NormalEnemyTouchAI), - %enemyShot(RTL_A6804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Hibashi_Puromi), %layer(5), @@ -12602,14 +11977,14 @@ EnemyHeaders_Puromi: ;A0E0BF %unused(0), %mainAI(MainAI_Puromi), %grappleAI(Common_GrappleAI_NoInteraction), - %hurtAI(RTL_A6804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), %powerBombReaction(0), %variantIndex(0), %enemyTouch(Common_NormalEnemyTouchAI), - %enemyShot(RTL_A6804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Hibashi_Puromi), %layer(5), @@ -12634,7 +12009,7 @@ EnemyHeaders_MiniKraid: ;A0E0FF %unused(0), %mainAI(MainAI_MiniKraid), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A6804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(3), @@ -12730,14 +12105,14 @@ EnemyHeaders_RidleyExplosion: ;A0E1BF %unused(0), %mainAI(MainAI_RidleyExplosion), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A6804C), - %frozenAI(RTL_A6804C), + %hurtAI(Common_RTL_A0804C), + %frozenAI(Common_RTL_A0804C), %timeIsFrozen(0), %deathAnimation(0), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_A6804C), - %enemyShot(RTL_A6804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_RidleyExplosion), %layer(5), @@ -12762,14 +12137,14 @@ EnemyHeaders_Steam: ;A0E1FF %unused(0), %mainAI(MainAI_CeresSteam), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A6804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), %powerBombReaction(0), %variantIndex(0), %enemyTouch(EnemyTouch_CeresSteam), - %enemyShot(RTL_A6804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(EnemyHeaders_CeresDoor), %layer(5), @@ -12794,7 +12169,7 @@ EnemyHeaders_CeresDoor: ;A0E23F %unused(0), %mainAI(MainAI_CeresDoor), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A6804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -12826,7 +12201,7 @@ EnemyHeaders_Zebetite: ;A0E27F %unused(0), %mainAI(MainAI_Zebetite), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A6804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -12858,14 +12233,14 @@ EnemyHeaders_Kraid: ;A0E2BF %unused(0), %mainAI(MainAI_Kraid), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A7804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), %powerBombReaction(Common_NormalEnemyPowerBombAI_NoDeathCheck), %variantIndex(0), %enemyTouch(EnemyTouch_Kraid), - %enemyShot(RTL_A7804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Kraid), %layer(5), @@ -12890,7 +12265,7 @@ EnemyHeaders_KraidArm: ;A0E2FF %unused(0), %mainAI(MainAI_KraidArm), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A7804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -12922,7 +12297,7 @@ EnemyHeaders_KraidLintTop: ;A0E33F %unused(0), %mainAI(MainAI_KraidLintTop), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A7804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -12954,7 +12329,7 @@ EnemyHeaders_KraidLintMiddle: ;A0E37F %unused(0), %mainAI(MainAI_KraidLintMiddle), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A7804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -12986,7 +12361,7 @@ EnemyHeaders_KraidLintBottom: ;A0E3BF %unused(0), %mainAI(MainAI_KraidLintBottom), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A7804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -13018,7 +12393,7 @@ EnemyHeaders_KraidFoot: ;A0E3FF %unused(0), %mainAI(MainAI_KraidFoot), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A7804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -13050,7 +12425,7 @@ EnemyHeaders_KraidNail: ;A0E43F %unused(0), %mainAI(MainAI_KraidNail), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A7804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -13082,7 +12457,7 @@ EnemyHeaders_KraidNailBad: ;A0E47F %unused(0), %mainAI(MainAI_KraidNailBad), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A7804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -13115,7 +12490,7 @@ EnemyHeaders_PhantoonBody: ;A0E4BF %mainAI(MainAI_Phantoon), %grappleAI(Common_GrappleAI_NoInteraction), %hurtAI(HurtAI_Phantoon), - %frozenAI(RTL_A7804C), + %frozenAI(Common_RTL_A0804C), %timeIsFrozen(0), %deathAnimation(0), %powerBombReaction(RTL_A7DD9A), @@ -13144,16 +12519,16 @@ EnemyHeaders_PhantoonEye: ;A0E4FF %initAI(InitAI_Phantoon_Eye_Tentacles_Mouth), %parts(1), %unused(0), - %mainAI(RTL_A7804C), + %mainAI(Common_RTL_A0804C), %grappleAI(Common_GrappleAI_NoInteraction), - %hurtAI(RTL_A7804C), - %frozenAI(RTL_A7804C), + %hurtAI(Common_RTL_A0804C), + %frozenAI(Common_RTL_A0804C), %timeIsFrozen(0), %deathAnimation(0), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_A7804C), - %enemyShot(RTL_A7804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Phantoon), %layer(5), @@ -13178,14 +12553,14 @@ EnemyHeaders_PhantoonTentacles: ;A0E53F %unused(0), %mainAI(RTL_A7E011), %grappleAI(Common_GrappleAI_NoInteraction), - %hurtAI(RTL_A7804C), - %frozenAI(RTL_A7804C), + %hurtAI(Common_RTL_A0804C), + %frozenAI(Common_RTL_A0804C), %timeIsFrozen(0), %deathAnimation(0), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_A7804C), - %enemyShot(RTL_A7804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Phantoon), %layer(5), @@ -13210,14 +12585,14 @@ EnemyHeaders_PhantoonMouth: ;A0E57F %unused(0), %mainAI(RTL_A7E011), %grappleAI(Common_GrappleAI_NoInteraction), - %hurtAI(RTL_A7804C), - %frozenAI(RTL_A7804C), + %hurtAI(Common_RTL_A0804C), + %frozenAI(Common_RTL_A0804C), %timeIsFrozen(0), %deathAnimation(0), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_A7804C), - %enemyShot(RTL_A7804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Phantoon), %layer(5), @@ -13242,14 +12617,14 @@ EnemyHeaders_Etecoon: ;A0E5BF %unused(0), %mainAI(MainAI_Etecoon), %grappleAI(Common_GrappleAI_NoInteraction), - %hurtAI(RTL_A7804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_A7804C), - %enemyShot(RTL_A7804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Etecoon), %layer(5), @@ -13274,14 +12649,14 @@ EnemyHeaders_Dachora: ;A0E5FF %unused(0), %mainAI(MainAI_Dachora), %grappleAI(Common_GrappleAI_NoInteraction), - %hurtAI(RTL_A7804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_A7804C), - %enemyShot(RTL_A7804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Dachora), %layer(5), @@ -13306,7 +12681,7 @@ EnemyHeaders_Evir: ;A0E63F %unused(0), %mainAI(MainAI_Evir), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -13338,14 +12713,14 @@ EnemyHeaders_EvirProjectile: ;A0E67F %unused(0), %mainAI(MainAI_EvirProjectile), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), %enemyTouch(Common_NormalEnemyTouchAI), - %enemyShot(RTL_A8804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Evir), %layer(5), @@ -13370,14 +12745,14 @@ EnemyHeaders_Eye: ;A0E6BF %unused(0), %mainAI(MainAI_Eye), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), %powerBombReaction(0), %variantIndex(0), %enemyTouch(Common_NormalEnemyTouchAI), - %enemyShot(RTL_A8804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Eye), %layer(5), @@ -13402,7 +12777,7 @@ EnemyHeaders_Fune: ;A0E6FF %unused(0), %mainAI(MainAI_Fune_Namihe), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -13434,7 +12809,7 @@ EnemyHeaders_Namihe: ;A0E73F %unused(0), %mainAI(MainAI_Fune_Namihe), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -13466,7 +12841,7 @@ EnemyHeaders_Coven: ;A0E77F %unused(0), %mainAI(MainAI_Coven), %grappleAI(Common_GrappleAI_NoInteraction), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -13498,7 +12873,7 @@ EnemyHeaders_YappingMaw: ;A0E7BF %unused(0), %mainAI(MainAI_YappingMaw), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(FrozenAI_YappingMaw), %timeIsFrozen(0), %deathAnimation(4), @@ -13530,7 +12905,7 @@ EnemyHeaders_Kago: ;A0E7FF %unused(0), %mainAI(MainAI_Kago), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -13562,7 +12937,7 @@ EnemyHeaders_Magdollite: ;A0E83F %unused(0), %mainAI(MainAI_Magdollite), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -13594,7 +12969,7 @@ EnemyHeaders_Beetom: ;A0E87F %unused(0), %mainAI(MainAI_Beetom), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -13626,7 +13001,7 @@ EnemyHeaders_Powamp: ;A0E8BF %unused(0), %mainAI(MainAI_Powamp), %grappleAI(Common_GrappleAI_SamusLatchesOn_NoInvincibility), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -13658,7 +13033,7 @@ EnemyHeaders_Robot: ;A0E8FF %unused(0), %mainAI(MainAI_Robot), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -13690,7 +13065,7 @@ EnemyHeaders_RobotNoPower: ;A0E93F %unused(0), %mainAI(RTL_A8CC66), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -13722,7 +13097,7 @@ EnemyHeaders_Bull: ;A0E97F %unused(0), %mainAI(MainAI_Bull), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -13754,7 +13129,7 @@ EnemyHeaders_Alcoon: ;A0E9BF %unused(0), %mainAI(MainAI_Alcoon), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -13786,7 +13161,7 @@ EnemyHeaders_Atomic: ;A0E9FF %unused(0), %mainAI(MainAI_Atomic), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(2), @@ -13818,7 +13193,7 @@ EnemyHeaders_Spark: ;A0EA3F %unused(0), %mainAI(MainAI_Spark), %grappleAI(Common_GrappleAI_HurtSamus), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -13850,13 +13225,13 @@ EnemyHeaders_FaceBlock: ;A0EA7F %unused(0), %mainAI(MainAI_FaceBlock), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), %powerBombReaction(0), %variantIndex(0), - %enemyTouch(RTL_A8804C), + %enemyTouch(Common_RTL_A0804C), %enemyShot(EnemyShot_FaceBlock), %spritemap(0), %tileData(Tiles_FaceBlock), @@ -13882,7 +13257,7 @@ EnemyHeaders_KihunterGreen: ;A0EABF %unused(0), %mainAI(MainAI_Kihunter), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -13914,14 +13289,14 @@ EnemyHeaders_KihunterGreenWings: ;A0EAFF %unused(0), %mainAI(MainAI_KihunterWings), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_A8804C), - %enemyShot(RTL_A8804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Kihunter), %layer(5), @@ -13946,7 +13321,7 @@ EnemyHeaders_KihunterYellow: ;A0EB3F %unused(0), %mainAI(MainAI_Kihunter), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -13978,14 +13353,14 @@ EnemyHeaders_KihunterYellowWings: ;A0EB7F %unused(0), %mainAI(MainAI_KihunterWings), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_A8804C), - %enemyShot(RTL_A8804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Kihunter), %layer(5), @@ -14010,7 +13385,7 @@ EnemyHeaders_KihunterRed: ;A0EBBF %unused(0), %mainAI(MainAI_Kihunter), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -14042,14 +13417,14 @@ EnemyHeaders_KihunterRedWings: ;A0EBFF %unused(0), %mainAI(MainAI_KihunterWings), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A8804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_A8804C), - %enemyShot(RTL_A8804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Kihunter), %layer(5), @@ -14138,14 +13513,14 @@ EnemyHeaders_BabyMetroidCutscene: ;A0ECBF %unused(0), %mainAI(MainAI_BabyMetroidCutscene), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A9804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), %powerBombReaction(0), %variantIndex(0), %enemyTouch(EnemyTouch_BabyMetroidCutscene), - %enemyShot(RTL_A9804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_BabyMetroid), %layer(2), @@ -14170,14 +13545,14 @@ EnemyHeaders_MotherBrainTubes: ;A0ECFF %unused(0), %mainAI(MainAI_MotherBrainTubes), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A9804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), %powerBombReaction(0), %variantIndex(0), - %enemyTouch(RTL_A9804C), - %enemyShot(RTL_A9804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_MotherBrainHead), %layer(5), @@ -14202,7 +13577,7 @@ EnemyHeaders_CorpseTorizo: ;A0ED3F %unused(0), %mainAI(MainAI_CorpseTorizo), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A9804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -14266,7 +13641,7 @@ EnemyHeaders_CorpseSidehopper2: ;A0EDBF %unused(0), %mainAI(MainAI_HurtAI_CorpseEnemies), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A9804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -14298,7 +13673,7 @@ EnemyHeaders_CorpseZoomer: ;A0EDFF %unused(0), %mainAI(MainAI_HurtAI_CorpseEnemies), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A9804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -14330,7 +13705,7 @@ EnemyHeaders_CorpseRipper: ;A0EE3F %unused(0), %mainAI(MainAI_HurtAI_CorpseEnemies), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A9804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -14362,7 +13737,7 @@ EnemyHeaders_CorpseSkree: ;A0EE7F %unused(0), %mainAI(MainAI_HurtAI_CorpseEnemies), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A9804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -14394,7 +13769,7 @@ EnemyHeaders_BabyMetroid: ;A0EEBF %unused(0), %mainAI(MainAI_BabyMetroid), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_A9804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -14554,14 +13929,14 @@ EnemyHeaders_TourianStatue: ;A0EFFF %unused(0), %mainAI(MainAI_TourianStatue), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_AA804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_AA804C), - %enemyShot(RTL_AA804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_TourianStatue), %layer(6), @@ -14577,23 +13952,23 @@ EnemyHeaders_TourianStatueGhost: ;A0F03F %damage(3000), %width(0), %height(0), - %bank(RTL_AA804C>>16), + %bank(Palettes_TourianStatue_Ridley>>16), %hurtAITime(0), %cry(0), %bossID(0), - %initAI(RTL_AA804C), + %initAI(Common_RTL_A0804C), %parts(1), %unused(0), - %mainAI(RTL_AA804C), + %mainAI(Common_RTL_A0804C), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_AA804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_AA804C), - %enemyShot(RTL_AA804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_TourianStatuesSoul), %layer(6), @@ -14648,16 +14023,16 @@ EnemyHeaders_NoobTubeCrack: ;A0F0BF %initAI(InitAI_NoobTubeCrack), %parts(1), %unused(0), - %mainAI(RTL_AA804C), + %mainAI(Common_RTL_A0804C), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_AA804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), %powerBombReaction(0), %variantIndex(0), - %enemyTouch(RTL_AA804C), - %enemyShot(RTL_AA804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_NoobTubeCrack), %layer(5), @@ -14682,7 +14057,7 @@ EnemyHeaders_Chozo: ;A0F0FF %unused(0), %mainAI(MainAI_Chozo), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_AA804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -14723,7 +14098,7 @@ UNUSED_EnemyHeaders_SpinningTurtleEye_A0F153: ;A0F153 %unused(0), %mainAI(UNUSED_MainAI_SpinningTurtleEye_B3870E), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -14755,7 +14130,7 @@ EnemyHeaders_Zeb: ;A0F193 %unused(0), %mainAI(MainAI_Zeb_Zebbo), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_B3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -14787,7 +14162,7 @@ EnemyHeaders_Zebbo: ;A0F1D3 %unused(0), %mainAI(MainAI_Zeb_Zebbo), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_B3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -14819,7 +14194,7 @@ EnemyHeaders_Gamet: ;A0F213 %unused(0), %mainAI(MainAI_Gamet), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_B3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -14851,7 +14226,7 @@ EnemyHeaders_Geega: ;A0F253 %unused(0), %mainAI(MainAI_Geega), %grappleAI(Common_GrappleAI_KillEnemy), - %hurtAI(RTL_B3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -14883,7 +14258,7 @@ EnemyHeaders_Botwoon: ;A0F293 %unused(0), %mainAI(MainAI_Botwoon), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), @@ -14915,14 +14290,14 @@ EnemyHeaders_EtecoonEscape: ;A0F2D3 %unused(0), %mainAI(MainAI_EtecoonEscape), %grappleAI(Common_GrappleAI_NoInteraction), - %hurtAI(RTL_B3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_B3804C), - %enemyShot(RTL_B3804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Etecoon), %layer(5), @@ -14947,14 +14322,14 @@ EnemyHeaders_DachoraEscape: ;A0F313 %unused(0), %mainAI(RTL_B3EB1A), %grappleAI(Common_GrappleAI_NoInteraction), - %hurtAI(RTL_B3804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(0), - %powerBombReaction(RTL_A0804C), + %powerBombReaction(Common_RTL_A0804C), %variantIndex(0), - %enemyTouch(RTL_B3804C), - %enemyShot(RTL_B3804C), + %enemyTouch(Common_RTL_A0804C), + %enemyShot(Common_RTL_A0804C), %spritemap(0), %tileData(Tiles_Dachora), %layer(5), @@ -14979,7 +14354,7 @@ EnemyHeaders_PirateGreyWall: ;A0F353 %unused(0), %mainAI(MainAI_PirateWall), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -15011,7 +14386,7 @@ EnemyHeaders_PirateGreenWall: ;A0F393 %unused(0), %mainAI(MainAI_PirateWall), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -15043,7 +14418,7 @@ EnemyHeaders_PirateRedWall: ;A0F3D3 %unused(0), %mainAI(MainAI_PirateWall), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -15075,7 +14450,7 @@ EnemyHeaders_PirateGoldWall: ;A0F413 %unused(0), %mainAI(MainAI_PirateWall), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -15107,7 +14482,7 @@ EnemyHeaders_PirateMagentaWall: ;A0F453 %unused(0), %mainAI(MainAI_PirateWall), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -15139,7 +14514,7 @@ EnemyHeaders_PirateSilverWall: ;A0F493 %unused(0), %mainAI(MainAI_PirateWall), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -15171,7 +14546,7 @@ EnemyHeaders_PirateGreyNinja: ;A0F4D3 %unused(0), %mainAI(MainAI_PirateNinja), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -15203,7 +14578,7 @@ EnemyHeaders_PirateGreenNinja: ;A0F513 %unused(0), %mainAI(MainAI_PirateNinja), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -15235,7 +14610,7 @@ EnemyHeaders_PirateRedNinja: ;A0F553 %unused(1), %mainAI(MainAI_PirateNinja), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -15267,7 +14642,7 @@ EnemyHeaders_PirateGoldNinja: ;A0F593 %unused(0), %mainAI(MainAI_PirateNinja), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -15299,7 +14674,7 @@ EnemyHeaders_PirateMagentaNinja: ;A0F5D3 %unused(0), %mainAI(MainAI_PirateNinja), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -15331,7 +14706,7 @@ EnemyHeaders_PirateSilverNinja: ;A0F613 %unused(0), %mainAI(MainAI_PirateNinja), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -15363,7 +14738,7 @@ EnemyHeaders_PirateGreyWalking: ;A0F653 %unused(0), %mainAI(MainAI_PirateWalking), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -15395,7 +14770,7 @@ EnemyHeaders_PirateGreenWalking: ;A0F693 %unused(0), %mainAI(MainAI_PirateWalking), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -15427,7 +14802,7 @@ EnemyHeaders_PirateRedWalking: ;A0F6D3 %unused(0), %mainAI(MainAI_PirateWalking), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -15459,7 +14834,7 @@ EnemyHeaders_PirateGoldWalking: ;A0F713 %unused(0), %mainAI(MainAI_PirateWalking), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -15491,7 +14866,7 @@ EnemyHeaders_PirateMagentaWalking: ;A0F753 %unused(0), %mainAI(MainAI_PirateWalking), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), @@ -15523,7 +14898,7 @@ EnemyHeaders_PirateSilverWalking: ;A0F793 %unused(0), %mainAI(MainAI_PirateWalking), %grappleAI(Common_GrappleAI_CancelGrappleBeam), - %hurtAI(RTL_B2804C), + %hurtAI(Common_RTL_A0804C), %frozenAI(Common_NormalEnemyFrozenAI), %timeIsFrozen(0), %deathAnimation(4), diff --git a/src/bank_A2.asm b/src/bank_A2.asm index d8aa2fb..55e40af 100644 --- a/src/bank_A2.asm +++ b/src/bank_A2.asm @@ -3,590 +3,9 @@ org $A28000 ; Common to all enemy code banks - -;;; $8000: Grapple AI - no interaction. Also unfreezes enemies(!) ;;; -CommonA2_GrappleAI_NoInteraction: -; Used by skultera, Draygon body, fire arc, Phantoon, etecoon, dachora and WS ghost - JSL.L GrappleAI_SwitchEnemyAIToMainAI ;A28000; - RTL ;A28004; - - -;;; $8005: Grapple AI - Samus latches on ;;; -CommonA2_GrappleAI_SamusLatchesOn: -; Used by gripper and Crocomire - JSL.L GrappleAI_SamusLatchesOnWithGrapple ;A28005; - RTL ;A28009; - - -;;; $800A: Grapple AI - kill enemy ;;; -CommonA2_GrappleAI_KillEnemy: -; Common - JSL.L GrappleAI_EnemyGrappleDeath ;A2800A; - RTL ;A2800E; - - -;;; $800F: Grapple AI - cancel grapple beam ;;; -CommonA2_GrappleAI_CancelGrappleBeam: -; Common - JSL.L GrappleAI_SwitchToFrozenAI ;A2800F; - RTL ;A28013; - - -;;; $8014: Grapple AI - Samus latches on - no invincibility ;;; -CommonA2_GrappleAI_SamusLatchesOn_NoInvincibility: -; Used by powamp - JSL.L GrappleAI_SamusLatchesOnWithGrapple_NoInvincibility ;A28014; - RTL ;A28018; - - -;;; $8019: Unused. Grapple AI - Samus latches on - paralyse enemy ;;; -UNUSED_CommonA2_GrappleAI_SamusLatchesOn_ParalyzeEnemy_A28019: - JSL.L GrappleAI_SamusLatchesOnWithGrapple_ParalyzeEnemy ;A28019; - RTL ;A2801D; - - -;;; $801E: Grapple AI - hurt Samus ;;; -CommonA2_GrappleAI_HurtSamus: -; Used by WS spark -; Hurt reaction happens in $9B:B932 - JSL.L GrappleAI_SwitchToFrozenAI_duplicate ;A2801E; - RTL ;A28022; - - -;;; $8023: Normal enemy touch AI ;;; -CommonA2_NormalEnemyTouchAI: - JSL.L NormalEnemyTouchAI ;A28023; - RTL ;A28027; - - -;;; $8028: Normal touch AI - no death check ;;; -CommonA2_NormalTouchAI_NoDeathCheck: - JSL.L NormalEnemyTouchAI_NoDeathCheck_External ;A28028; - RTL ;A2802C; - - -;;; $802D: Normal enemy shot AI ;;; -CommonA2_NormalEnemyShotAI: - JSL.L NormalEnemyShotAI ;A2802D; - RTL ;A28031; - - -;;; $8032: Normal enemy shot AI - no death check, no enemy shot graphic ;;; -CommonA2_NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic: - JSL.L NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic_External ;A28032; - RTL ;A28036; - - -;;; $8037: Normal enemy power bomb AI ;;; -CommonA2_NormalEnemyPowerBombAI: - JSL.L NormalEnemyPowerBombAI ;A28037; - RTL ;A2803B; - - -;;; $803C: Normal enemy power bomb AI - no death check ;;; -CommonA2_NormalEnemyPowerBombAI_NoDeathCheck: -; Kraid's power bomb AI - JSL.L NormalEnemyPowerBombAI_NoDeathCheck_External ;A2803C; - RTL ;A28040; - - -;;; $8041: Normal enemy frozen AI ;;; -CommonA2_NormalEnemyFrozenAI: - JSL.L NormalEnemyFrozenAI ;A28041; - RTL ;A28045; - - -;;; $8046: Creates a dud shot ;;; -CommonA2_CreateADudShot_JSL: - JSL.L CreateADudShot ;A28046; - RTL ;A2804A; - - -;;; $804B: RTS ;;; -RTS_A2804B: - RTS ;A2804B; - - -;;; $804C: RTL ;;; -RTL_A2804C: - RTL ;A2804C; - - -;;; $804D: Spritemap - nothing ;;; -Spritemap_CommonA2_Nothing: - dw $0000 ;A2804D; - - -;;; $804F: Extended spritemap - nothing ;;; -ExtendedSpritemap_CommonA2_Nothing: - dw $0001 ;A2804F; - dw $0000,$0000 - dw Spritemap_CommonA2_Nothing ;A28055; - dw Hitbox_CommonA2_Nothing ;A28057; - - -;;; $8059: Hitbox - nothing ;;; -Hitbox_CommonA2_Nothing: -; [n entries] [[left offset] [top offset] [right offset] [bottom offset] [p touch] [p shot]]... - dw $0001 ;A28059; - dw $0000,$0000,$0000,$0000 - dw CommonA2_NormalEnemyTouchAI ;A28063; - dw CommonA2_NormalEnemyShotAI ;A28065; - - -;;; $8067: Instruction list - delete enemy ;;; -InstList_CommonA2_DeleteEnemy: - dw Instruction_CommonA2_DeleteEnemy ;A28067; - - -;;; $8069: Two NOPs ;;; -NOPNOP_A28069: -; Used as palette by respawning enemy placeholder and Draygon's eye o_O - NOP ;A28069; - NOP ;A2806A; - -;;; $806B: Instruction - Enemy.var5 = [[Y]] ;;; -Instruction_CommonA2_Enemy0FB2_InY: -; Used only by torizos (for enemy movement function) and escape etecoon (for enemy function) - LDA.W $0000,Y ;A2806B; - STA.W Enemy.var5,X ;A2806E; - INY ;A28071; - INY ;A28072; - RTL ;A28073; - - -;;; $8074: Instruction - Enemy.var5 = RTS ;;; -Instruction_CommonA2_SetEnemy0FB2ToRTS: - LDA.W #RTS_A2807B ;A28074; - STA.W Enemy.var5,X ;A28077; - RTL ;A2807A; - - -RTS_A2807B: - RTS ;A2807B; - - -;;; $807C: Instruction - delete enemy ;;; -Instruction_CommonA2_DeleteEnemy: - LDA.W Enemy.properties,X ;A2807C; - ORA.W #$0200 ;A2807F; - STA.W Enemy.properties,X ;A28082; - PLA ;A28085; - PEA.W ProcessEnemyInstructions_return-1 ;A28086; - RTL ;A28089; - - -;;; $808A: Instruction - call function [[Y]] ;;; -Instruction_CommonA2_CallFunctionInY: - LDA.W $0000,Y ;A2808A; - STA.B DP_Temp12 ;A2808D; - PHY ;A2808F; - PHX ;A28090; - PEA.W .manualReturn-1 ;A28091; - JMP.W (DP_Temp12) ;A28094; - - .manualReturn: - PLX ;A28097; - PLY ;A28098; - INY ;A28099; - INY ;A2809A; - RTL ;A2809B; - - -;;; $809C: Instruction - call function [[Y]] with A = [[Y] + 2] ;;; -Instruction_CommonA2_CallFunctionInY_WithA: - LDA.W $0000,Y ;A2809C; - STA.B DP_Temp12 ;A2809F; - LDA.W $0002,Y ;A280A1; - PHY ;A280A4; - PHX ;A280A5; - PEA.W .manualReturn-1 ;A280A6; - JMP.W (DP_Temp12) ;A280A9; - - .manualReturn: - PLX ;A280AC; - PLY ;A280AD; - TYA ;A280AE; - CLC ;A280AF; - ADC.W #$0004 ;A280B0; - TAY ;A280B3; - RTL ;A280B4; - - -if !FEATURE_KEEP_UNREFERENCED -;;; $80B5: Unused. Instruction - call external function [[Y]] ;;; -UNUSED_Instruction_CommonA2_CallExternalFunctionInY_A280B5: - LDA.W $0000,Y ;A280B5; - STA.B DP_Temp12 ;A280B8; - LDA.W $0001,Y ;A280BA; - STA.B DP_Temp13 ;A280BD; - PHX ;A280BF; - PHY ;A280C0; - JSL.L .externalFunction ;A280C1; - PLY ;A280C5; - PLX ;A280C6; - INY ;A280C7; - INY ;A280C8; - INY ;A280C9; - RTL ;A280CA; - - .externalFunction: - JML.W [DP_Temp12] ;A280CB; - - -;;; $80CE: Unused. Instruction - call external function [[Y]] with A = [[Y] + 3] ;;; -UNUSED_Inst_CommonA2_CallExternalFunctionInY_WithA_A280CE: - LDA.W $0000,Y ;A280CE; - STA.B DP_Temp12 ;A280D1; - LDA.W $0001,Y ;A280D3; - STA.B DP_Temp13 ;A280D6; - LDA.W $0003,Y ;A280D8; - PHX ;A280DB; - PHY ;A280DC; - JSL.L .externalFunction ;A280DD; - PLY ;A280E1; - PLX ;A280E2; - TYA ;A280E3; - CLC ;A280E4; - ADC.W #$0005 ;A280E5; - TAY ;A280E8; - RTL ;A280E9; - - .externalFunction: - JML.W [DP_Temp12] ;A280EA; -endif ; !FEATURE_KEEP_UNREFERENCED - - -;;; $80ED: Instruction - go to [[Y]] ;;; -Instruction_CommonA2_GotoY: - LDA.W $0000,Y ;A280ED; - TAY ;A280F0; - RTL ;A280F1; - - -;;; $80F2: Instruction - go to [[Y]] + ±[[Y]] ;;; -Instruction_CommonA2_GotoY_PlusY: - STY.B DP_Temp12 ;A280F2; - DEY ;A280F4; - LDA.W $0000,Y ;A280F5; - XBA ;A280F8; - BMI .highByte ;A280F9; - AND.W #$00FF ;A280FB; - BRA + ;A280FE; - - .highByte: - ORA.W #$FF00 ;A28100; - -+ CLC ;A28103; - ADC.B DP_Temp12 ;A28104; - TAY ;A28106; - RTL ;A28107; - - -;;; $8108: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonA2_DecrementTimer_GotoYIfNonZero: - DEC.W Enemy.loopCounter,X ;A28108; - BNE Instruction_CommonA2_GotoY ;A2810B; - INY ;A2810D; - INY ;A2810E; - RTL ;A2810F; - - -;;; $8110: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonA2_DecrementTimer_GotoYIfNonZero_duplicate: - DEC.W Enemy.loopCounter,X ;A28110; - BNE Instruction_CommonA2_GotoY ;A28113; - INY ;A28115; - INY ;A28116; - RTL ;A28117; - - -;;; $8118: Instruction - decrement timer and go to [Y] + ±[[Y]] if non-zero ;;; -Instruction_CommonA2_DecrementTimer_GotoY_PlusY_IfNonZero: - SEP #$20 ;A28118; - DEC.W Enemy.loopCounter,X ;A2811A; - REP #$20 ;A2811D; - BNE Instruction_CommonA2_GotoY_PlusY ;A2811F; - INY ;A28121; - RTL ;A28122; - - -;;; $8123: Instruction - timer = [[Y]] ;;; -Instruction_CommonA2_TimerInY: - LDA.W $0000,Y ;A28123; - STA.W Enemy.loopCounter,X ;A28126; - INY ;A28129; - INY ;A2812A; - RTL ;A2812B; - - -;;; $812C: Instruction - skip next instruction ;;; -Instruction_CommonA2_SkipNextInstruction: - INY ;A2812C; - INY ;A2812D; - RTL ;A2812E; - - -;;; $812F: Instruction - sleep ;;; -Instruction_CommonA2_Sleep: - DEY ;A2812F; - DEY ;A28130; - TYA ;A28131; - STA.W Enemy.instList,X ;A28132; - PLA ;A28135; - PEA.W ProcessEnemyInstructions_return-1 ;A28136; - RTL ;A28139; - - -;;; $813A: Instruction - wait [[Y]] frames ;;; -Instruction_CommonA2_WaitYFrames: -; Set instruction timer and terminate processing enemy instructions -; Used for running a delay that doesn't update graphics, -; useful for e.g. GT eye beam attack ($AA:D10D), implemented by an instruction list that has no graphical instructions, -; which allows it to be called from multiple different poses - LDA.W $0000,Y ;A2813A; - STA.W Enemy.instTimer,X ;A2813D; - INY ;A28140; - INY ;A28141; - TYA ;A28142; - STA.W Enemy.instList,X ;A28143; - PLA ;A28146; - PEA.W ProcessEnemyInstructions_return-1 ;A28147; - RTL ;A2814A; - - -;;; $814B: Instruction - transfer [[Y]] bytes from [[Y] + 2] to VRAM [[Y] + 5] ;;; -Instruction_CommonA2_TransferYBytesInYToVRAM: - PHX ;A2814B; - LDX.W VRAMWriteStack ;A2814C; - LDA.W $0000,Y ;A2814F; - STA.B VRAMWrite.size,X ;A28152; - LDA.W $0002,Y ;A28154; - STA.B VRAMWrite.src,X ;A28157; - LDA.W $0003,Y ;A28159; - STA.B VRAMWrite.src+1,X ;A2815C; - LDA.W $0005,Y ;A2815E; - STA.B VRAMWrite.dest,X ;A28161; - TXA ;A28163; - CLC ;A28164; - ADC.W #$0007 ;A28165; - STA.W VRAMWriteStack ;A28168; - TYA ;A2816B; - CLC ;A2816C; - ADC.W #$0007 ;A2816D; - TAY ;A28170; - PLX ;A28171; - RTL ;A28172; - - -;;; $8173: Instruction - enable off-screen processing ;;; -Instruction_CommonA2_EnableOffScreenProcessing: - LDA.W Enemy.properties,X ;A28173; - ORA.W #$0800 ;A28176; - STA.W Enemy.properties,X ;A28179; - RTL ;A2817C; - - -;;; $817D: Instruction - disable off-screen processing ;;; -Instruction_CommonA2_DisableOffScreenProcessing: - LDA.W Enemy.properties,X ;A2817D; - AND.W #$F7FF ;A28180; - STA.W Enemy.properties,X ;A28183; - RTL ;A28186; - - -;;; $8187: Common enemy speeds - linearly increasing ;;; -CommonA2EnemySpeeds_LinearlyIncreasing: -; _____________________ Speed -; | _______________ Subspeed -; | | _________ Negated speed -; | | | ___ Negated subspeed -; | | | | - .speed: - dw $0000 ;A28187; - .subspeed: - dw $0000 ;A28189; - .negatedSpeed: - dw $0000 ;A2818B; - .negatedSubspeed: - dw $0000 ;A2818D; - dw $0000,$1000,$FFFF,$F000 - dw $0000,$2000,$FFFF,$E000 - dw $0000,$3000,$FFFF,$D000 - dw $0000,$4000,$FFFF,$C000 - dw $0000,$5000,$FFFF,$B000 - dw $0000,$6000,$FFFF,$A000 - dw $0000,$7000,$FFFF,$9000 - dw $0000,$8000,$FFFF,$8000 - dw $0000,$9000,$FFFF,$7000 - dw $0000,$A000,$FFFF,$6000 - dw $0000,$B000,$FFFF,$5000 - dw $0000,$C000,$FFFF,$4000 - dw $0000,$D000,$FFFF,$3000 - dw $0000,$E000,$FFFF,$2000 - dw $0000,$F000,$FFFF,$1000 - dw $0001,$0000,$FFFF,$0000 - dw $0001,$1000,$FFFE,$F000 - dw $0001,$2000,$FFFE,$E000 - dw $0001,$3000,$FFFE,$D000 - dw $0001,$4000,$FFFE,$C000 - dw $0001,$5000,$FFFE,$B000 - dw $0001,$6000,$FFFE,$A000 - dw $0001,$7000,$FFFE,$9000 - dw $0001,$8000,$FFFE,$8000 - dw $0001,$9000,$FFFE,$7000 - dw $0001,$A000,$FFFE,$6000 - dw $0001,$B000,$FFFE,$5000 - dw $0001,$C000,$FFFE,$4000 - dw $0001,$D000,$FFFE,$3000 - dw $0001,$E000,$FFFE,$2000 - dw $0001,$F000,$FFFE,$1000 - dw $0002,$0000,$FFFE,$0000 - dw $0002,$1000,$FFFD,$F000 - dw $0002,$2000,$FFFD,$E000 - dw $0002,$3000,$FFFD,$D000 - dw $0002,$4000,$FFFD,$C000 - dw $0002,$5000,$FFFD,$B000 - dw $0002,$6000,$FFFD,$A000 - dw $0002,$7000,$FFFD,$9000 - dw $0002,$8000,$FFFD,$8000 - dw $0002,$9000,$FFFD,$7000 - dw $0002,$A000,$FFFD,$6000 - dw $0002,$B000,$FFFD,$5000 - dw $0002,$C000,$FFFD,$4000 - dw $0002,$D000,$FFFD,$3000 - dw $0002,$E000,$FFFD,$2000 - dw $0002,$F000,$FFFD,$1000 - dw $0003,$0000,$FFFD,$0000 - dw $0003,$1000,$FFFC,$F000 - dw $0003,$2000,$FFFC,$E000 - dw $0003,$3000,$FFFC,$D000 - dw $0003,$4000,$FFFC,$C000 - dw $0003,$5000,$FFFC,$B000 - dw $0003,$6000,$FFFC,$A000 - dw $0003,$7000,$FFFC,$9000 - dw $0003,$8000,$FFFC,$8000 - dw $0003,$9000,$FFFC,$7000 - dw $0003,$A000,$FFFC,$6000 - dw $0003,$B000,$FFFC,$5000 - dw $0003,$C000,$FFFC,$4000 - dw $0003,$D000,$FFFC,$3000 - dw $0003,$E000,$FFFC,$2000 - dw $0003,$F000,$FFFC,$1000 - dw $0004,$0000,$FFFC,$0000 - - -;;; $838F: Common enemy speeds - quadratically increasing ;;; -CommonA2EnemySpeeds_QuadraticallyIncreasing: -; I.e. gravity -; Used by e.g. Botwoon when dying and falling to the floor -; _____________________ Subspeed -; | _______________ Speed -; | | _________ Negated subspeed -; | | | ___ Negated speed -; | | | | - .subspeed: - dw $0000 ;A2838F; - .speed: - dw $0000 ;A28391; - .negatedSubspeed: - dw $0000 ;A28393; - .negatedSpeed: - dw $0000 ;A28395; - dw $0109,$0000,$FEF7,$FFFF - dw $031B,$0000,$FCE5,$FFFF - dw $0636,$0000,$F9CA,$FFFF - dw $0A5A,$0000,$F5A6,$FFFF - dw $0F87,$0000,$F079,$FFFF - dw $15BD,$0000,$EA43,$FFFF - dw $1CFC,$0000,$E304,$FFFF - dw $2544,$0000,$DABC,$FFFF - dw $2E95,$0000,$D16B,$FFFF - dw $38EF,$0000,$C711,$FFFF - dw $4452,$0000,$BBAE,$FFFF - dw $50BE,$0000,$AF42,$FFFF - dw $5E33,$0000,$A1CD,$FFFF - dw $6CB1,$0000,$934F,$FFFF - dw $7C38,$0000,$83C8,$FFFF - dw $8CC8,$0000,$7338,$FFFF - dw $9E61,$0000,$619F,$FFFF - dw $B103,$0000,$4EFD,$FFFF - dw $C4AE,$0000,$3B52,$FFFF - dw $D962,$0000,$269E,$FFFF - dw $EF1F,$0000,$10E1,$FFFF - dw $05E5,$0000,$FA1B,$FFFF - dw $14B4,$0001,$EB4C,$FFFE - dw $2D8C,$0001,$D274,$FFFE - dw $476D,$0001,$B893,$FFFE - dw $6257,$0001,$9DA9,$FFFE - dw $7E4A,$0001,$81B6,$FFFE - dw $9B46,$0001,$64BA,$FFFE - dw $B94B,$0001,$46B5,$FFFE - dw $D859,$0001,$27A7,$FFFE - dw $F870,$0001,$0790,$FFFE - dw $1090,$0002,$EF70,$FFFD - dw $32B9,$0002,$CD47,$FFFD - dw $55EB,$0002,$AA15,$FFFD - dw $7A26,$0002,$85DA,$FFFD - dw $9F6A,$0002,$6096,$FFFD - dw $C5B7,$0002,$3A49,$FFFD - dw $ED0D,$0002,$12F3,$FFFD - dw $0C6C,$0003,$F394,$FFFC - dw $35D4,$0003,$CA2C,$FFFC - dw $6045,$0003,$9FBB,$FFFC - dw $8BBF,$0003,$7441,$FFFC - dw $B842,$0003,$47BE,$FFFC - dw $E5CE,$0003,$1A32,$FFFC - dw $0B63,$0004,$F49D,$FFFB - dw $3B01,$0004,$C4FF,$FFFB - dw $6BA8,$0004,$9458,$FFFB - dw $9D58,$0004,$62A8,$FFFB - dw $D011,$0004,$2FEF,$FFFB - dw $03D3,$0004,$FC2D,$FFFB - dw $2F9E,$0005,$D062,$FFFA - dw $6572,$0005,$9A8E,$FFFA - dw $9C4F,$0005,$63B1,$FFFA - dw $D435,$0005,$2BCB,$FFFA - dw $0424,$0006,$FBDC,$FFF9 - dw $3E1C,$0006,$C1E4,$FFF9 - dw $791D,$0006,$86E3,$FFF9 - dw $B527,$0006,$4AD9,$FFF9 - dw $F23A,$0006,$0DC6,$FFF9 - dw $2756,$0007,$D8AA,$FFF8 - dw $667B,$0007,$9985,$FFF8 - dw $A6A9,$0007,$5957,$FFF8 - dw $E7E0,$0007,$1820,$FFF8 - dw $2120,$0008,$DEE0,$FFF7 - dw $6469,$0008,$9B97,$FFF7 - dw $A8BB,$0008,$5745,$FFF7 - dw $EE16,$0008,$11EA,$FFF7 - dw $2B7A,$0009,$D486,$FFF6 - dw $72E7,$0009,$8D19,$FFF6 - dw $BB5D,$0009,$44A3,$FFF6 - dw $04DC,$0009,$FB24,$FFF6 - dw $4664,$000A,$B99C,$FFF5 - dw $91F5,$000A,$6E0B,$FFF5 - dw $DE8F,$000A,$2171,$FFF5 - dw $2332,$000B,$DCCE,$FFF4 - dw $71DE,$000B,$8E22,$FFF4 - dw $C193,$000B,$3E6D,$FFF4 - dw $0951,$000C,$F6AF,$FFF3 - dw $5B18,$000C,$A4E8,$FFF3 - dw $ADE8,$000C,$5218,$FFF3 - dw $01C1,$000C,$FE3F,$FFF3 - dw $4DA3,$000D,$B25D,$FFF2 - dw $A38E,$000D,$5C72,$FFF2 - dw $FA82,$000D,$057E,$FFF2 - dw $497F,$000E,$B681,$FFF1 - dw $A285,$000E,$5D7B,$FFF1 - dw $FC94,$000E,$036C,$FFF1 - dw $4EAC,$000F,$B154,$FFF0 - dw $AACD,$000F,$5533,$FFF0 - dw $07F7,$000F,$F809,$FFF0 - dw $5D2A,$0010,$A2D6,$FFEF - dw $BC66,$0010,$439A,$FFEF - dw $13AB,$0011,$EC55,$FFEE - dw $74F9,$0011,$8B07,$FFEE +namespace CommonA2 +incsrc "common_enemy_functions.asm" +namespace off ;;; $8687: Palette - enemy $CEBF (boyon) ;;; @@ -597,7 +16,7 @@ Palette_Boyon: ;;; $86A7: Instruction list - idle ;;; InstList_Boyon_Idle_0: - dw Instruction_Common_DisableOffScreenProcessing ;A286A7; + dw Common_Instruction_DisableOffScreenProcessing ;A286A7; dw RTL_A288C5 ;A286A9; InstList_Boyon_Idle_1: @@ -605,13 +24,13 @@ InstList_Boyon_Idle_1: dw $000A,Spritemap_Boyon_Idle_1 ;A286AF; dw $000A,Spritemap_Boyon_Idle_2 ;A286B3; dw $000A,Spritemap_Boyon_Idle_1 ;A286B7; - dw Instruction_Common_GotoY ;A286BB; + dw Common_Instruction_GotoY ;A286BB; dw InstList_Boyon_Idle_1 ;A286BD; ;;; $86BF: Instruction list - bouncing ;;; InstList_Boyon_Bouncing_0: - dw Instruction_Common_EnableOffScreenProcessing ;A286BF; + dw Common_Instruction_EnableOffScreenProcessing ;A286BF; dw Instruction_Boyon_StartBounce ;A286C1; InstList_Boyon_Bouncing_1: @@ -621,7 +40,7 @@ InstList_Boyon_Bouncing_1: dw $0005,Spritemap_Boyon_Bouncing_3 ;A286CF; dw $0005,Spritemap_Boyon_Bouncing_2 ;A286D3; dw $0005,Spritemap_Boyon_Bouncing_1 ;A286D7; - dw Instruction_Common_GotoY ;A286DB; + dw Common_Instruction_GotoY ;A286DB; dw InstList_Boyon_Bouncing_1 ;A286DD; @@ -650,7 +69,7 @@ BoyonData: ;;; $871C: Initialisation AI - enemy $CEBF (boyon) ;;; InitAI_Boyon: LDX.W EnemyIndex ;A2871C; - LDA.W #Spritemap_Common_Nothing ;A2871F; + LDA.W #Common_Spritemap_Nothing ;A2871F; STA.W Enemy.spritemap,X ;A28722; JSR.W SetBoyonInstList ;A28725; LDA.W #$0001 ;A28728; @@ -942,7 +361,7 @@ InstList_Stoke_MovingLeft_1: dw $0010,Spritemap_Stoke_MovingLeft_1 ;A28938; dw $0008,Spritemap_Stoke_MovingLeft_2 ;A2893C; dw $0008,Spritemap_Stoke_MovingLeft_3 ;A28940; - dw Instruction_Common_GotoY ;A28944; + dw Common_Instruction_GotoY ;A28944; dw InstList_Stoke_MovingLeft_1 ;A28946; @@ -951,7 +370,7 @@ InstList_Stoke_AttackingLeft: dw $0010,Spritemap_Stoke_MovingLeft_2 ;A28948; dw Instruction_Stoke_SpawnProjectileWithDirectionInY,$0000 ;A2894C; dw $0010,Spritemap_Stoke_AttackingLeft ;A28950; - dw Instruction_Common_GotoY ;A28954; + dw Common_Instruction_GotoY ;A28954; dw InstList_Stoke_MovingLeft_0 ;A28956; @@ -964,7 +383,7 @@ InstList_Stoke_MovingRight_1: dw $0010,Spritemap_Stoke_MovingRight_1 ;A2895E; dw $0008,Spritemap_Stoke_MovingRight_2 ;A28962; dw $0008,Spritemap_Stoke_MovingRight_3 ;A28966; - dw Instruction_Common_GotoY ;A2896A; + dw Common_Instruction_GotoY ;A2896A; dw InstList_Stoke_MovingRight_1 ;A2896C; @@ -973,7 +392,7 @@ InstList_Stoke_AttackingRight: dw $0010,Spritemap_Stoke_MovingRight_2 ;A2896E; dw Instruction_Stoke_SpawnProjectileWithDirectionInY,$0001 ;A28972; dw $0010,Spritemap_Stoke_AttackingRight ;A28976; - dw Instruction_Common_GotoY ;A2897A; + dw Common_Instruction_GotoY ;A2897A; dw InstList_Stoke_MovingRight_0 ;A2897C; @@ -1012,20 +431,20 @@ Instruction_Stoke_SetMovingRight: ;;; $89AD: Initialisation AI - enemy $CEFF (mini-Crocomire) ;;; InitAI_Stoke: LDX.W EnemyIndex ;A289AD; - LDA.W #Spritemap_Common_Nothing ;A289B0; + LDA.W #Common_Spritemap_Nothing ;A289B0; STA.W Enemy.spritemap,X ;A289B3; LDA.W Enemy.init1,X ;A289B6; ASL ;A289B9; ASL ;A289BA; ASL ;A289BB; TAY ;A289BC; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A289BD; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A289BD; STA.W Stoke.rightVelocity,X ;A289C0; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A289C3; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A289C3; STA.W Stoke.rightSubVelocity,X ;A289C6; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;A289C9; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;A289C9; STA.W Stoke.leftVelocity,X ;A289CC; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;A289CF; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;A289CF; STA.W Stoke.leftSubVelocity,X ;A289D2; JSR.W SetStokeMovingLeftInstList ;A289D5; LDA.W #Function_Stoke_MovingLeft ;A289D8; @@ -1300,7 +719,7 @@ InstList_BabyTurtle_Spinning: dw $0005,Spritemap_BabyTurtle_FacingLeft_9 ;A28BE0; dw $0005,Spritemap_BabyTurtle_FacingLeft_A ;A28BE4; dw Instruction_BabyTurtle_Set_Spinning_Stoppable ;A28BE8; - dw Instruction_Common_GotoY ;A28BEA; + dw Common_Instruction_GotoY ;A28BEA; dw InstList_BabyTurtle_Spinning ;A28BEC; @@ -1311,7 +730,7 @@ UNUSED_InstList_A28BEE: dw $0010,Spritemap_MamaTurtle_FacingLeft_4 ;A28BF2; dw $0010,Spritemap_MamaTurtle_FacingLeft_5 ;A28BF6; dw $0010,Spritemap_MamaTurtle_FacingLeft_6 ;A28BFA; - dw Instruction_Common_GotoY ;A28BFE; + dw Common_Instruction_GotoY ;A28BFE; dw UNUSED_InstList_A28BEE ;A28C00; endif ; !FEATURE_KEEP_UNREFERENCED @@ -1324,7 +743,7 @@ InstList_MamaTurtle_Spinning: dw $0005,Spritemap_MamaTurtle_FacingLeft_8 ;A28C0C; dw $0005,Spritemap_MamaTurtle_FacingLeft_7 ;A28C10; dw $0005,Spritemap_MamaTurtle_FacingLeft_8 ;A28C14; - dw Instruction_Common_GotoY ;A28C18; + dw Common_Instruction_GotoY ;A28C18; dw InstList_MamaTurtle_Spinning ;A28C1A; @@ -1335,7 +754,7 @@ InstList_MamaTurtle_FacingLeft_EnterShell: dw $0005,Spritemap_MamaTurtle_FacingLeft_1 ;A28C24; dw Instruction_MamaTurtle_RiseToHoverRightwards ;A28C28; dw $7FFF,Spritemap_MamaTurtle_FacingLeft_0 ;A28C2A; - dw Instruction_Common_Sleep ;A28C2E; + dw Common_Instruction_Sleep ;A28C2E; ;;; $8C30: Instruction list - mini-tatori - facing left - hiding ;;; @@ -1345,13 +764,13 @@ InstList_BabyTurtle_FacingLeft_Hiding: dw $0040,Spritemap_BabyTurtle_FacingLeft_7 ;A28C38; dw Instruction_BabyTurtle_LeaveShell ;A28C3C; dw $7FFF,Spritemap_BabyTurtle_FacingLeft_7 ;A28C3E; - dw Instruction_Common_Sleep ;A28C42; + dw Common_Instruction_Sleep ;A28C42; ;;; $8C44: Instruction list - tatori - asleep ;;; InstList_MamaTurtle_Asleep: dw $7FFF,Spritemap_MamaTurtle_FacingLeft_0 ;A28C44; - dw Instruction_Common_Sleep ;A28C48; + dw Common_Instruction_Sleep ;A28C48; ;;; $8C4A: Instruction list - tatori - facing left - leave shell ;;; @@ -1362,7 +781,7 @@ InstList_MamaTurtle_FacingLeft_LeaveShell: dw $0060,Spritemap_MamaTurtle_FacingLeft_3 ;A28C56; dw Instruction_MamaTurtle_EnterShell ;A28C5A; dw $7FFF,Spritemap_MamaTurtle_FacingLeft_3 ;A28C5C; - dw Instruction_Common_Sleep ;A28C60; + dw Common_Instruction_Sleep ;A28C60; ;;; $8C62: Instruction list - mini-tatori - facing left - leave shell ;;; @@ -1371,7 +790,7 @@ InstList_BabyTurtle_FacingLeft_LeaveShell: dw $002F,Spritemap_BabyTurtle_FacingLeft_4 ;A28C66; dw Instruction_BabyTurtle_LeftShell ;A28C6A; dw $002F,Spritemap_BabyTurtle_FacingLeft_4 ;A28C6C; - dw Instruction_Common_Sleep ;A28C70; + dw Common_Instruction_Sleep ;A28C70; ;;; $8C72: Instruction list - mini-tatori - crawling right ;;; @@ -1410,7 +829,7 @@ UNUSED_InstList_A28CC4: dw $0005,Spritemap_BabyTurtle_FacingRight_13 ;A28CC8; dw $0005,Spritemap_BabyTurtle_FacingRight_14 ;A28CCC; dw $0005,Spritemap_BabyTurtle_FacingRight_15 ;A28CD0; - dw Instruction_Common_GotoY ;A28CD4; + dw Common_Instruction_GotoY ;A28CD4; dw UNUSED_InstList_A28CC4 ;A28CD6; @@ -1420,7 +839,7 @@ UNUSED_InstList_A28CD8: dw $0010,Spritemap_MamaTurtle_FacingRight_D ;A28CDC; dw $0010,Spritemap_MamaTurtle_FacingRight_E ;A28CE0; dw $0010,Spritemap_MamaTurtle_FacingRight_F ;A28CE4; - dw Instruction_Common_GotoY ;A28CE8; + dw Common_Instruction_GotoY ;A28CE8; dw UNUSED_InstList_A28CD8 ;A28CEA; @@ -1430,7 +849,7 @@ UNUSED_InstList_A28CEC: dw $0005,Spritemap_MamaTurtle_FacingRight_11 ;A28CF0; dw $0005,Spritemap_MamaTurtle_FacingRight_10 ;A28CF4; dw $0005,Spritemap_MamaTurtle_FacingRight_11 ;A28CF8; - dw Instruction_Common_GotoY ;A28CFC; + dw Common_Instruction_GotoY ;A28CFC; dw UNUSED_InstList_A28CEC ;A28CFE; endif ; !FEATURE_KEEP_UNREFERENCED @@ -1442,7 +861,7 @@ InstList_MamaTurtle_FacingRight_EnterShell: dw $0005,Spritemap_MamaTurtle_FacingRight_A ;A28D08; dw Instruction_MamaTurtle_RiseToHoverLeftwards ;A28D0C; dw $7FFF,Spritemap_MamaTurtle_FacingRight_9 ;A28D0E; - dw Instruction_Common_Sleep ;A28D12; + dw Common_Instruction_Sleep ;A28D12; ;;; $8D14: Instruction list - mini-tatori - facing right - hiding ;;; @@ -1452,7 +871,7 @@ InstList_BabyTurtle_FacingRight_Hiding: dw $0040,Spritemap_BabyTurtle_FacingRight_12 ;A28D1C; dw Instruction_BabyTurtle_LeaveShell ;A28D20; dw $7FFF,Spritemap_BabyTurtle_FacingRight_12 ;A28D22; - dw Instruction_Common_Sleep ;A28D26; + dw Common_Instruction_Sleep ;A28D26; ;;; $8D28: Instruction list - tatori - facing right - leave shell ;;; @@ -1463,7 +882,7 @@ InstList_MamaTurtle_FacingRight_LeaveShell: dw $0060,Spritemap_MamaTurtle_FacingRight_C ;A28D34; dw Instruction_MamaTurtle_EnterShell ;A28D38; dw $7FFF,Spritemap_MamaTurtle_FacingRight_C ;A28D3A; - dw Instruction_Common_Sleep ;A28D3E; + dw Common_Instruction_Sleep ;A28D3E; ;;; $8D40: Instruction list - mini-tatori - facing right - leave shell ;;; @@ -1472,7 +891,7 @@ InstList_BabyTurtle_FacingRight_LeaveShell: dw $002F,Spritemap_BabyTurtle_FacingLeft_4 ;A28D44; dw Instruction_BabyTurtle_LeftShell ;A28D48; dw $002F,Spritemap_BabyTurtle_FacingLeft_4 ;A28D4A; - dw Instruction_Common_Sleep ;A28D4E; + dw Common_Instruction_Sleep ;A28D4E; ;;; $8D50: Tatori data ;;; @@ -1513,7 +932,7 @@ InitAI_MamaTurtle: LDA.W Enemy.properties,X ;A28D6F; ORA.W #$2000 ;A28D72; STA.W Enemy.properties,X ;A28D75; - LDA.W #Spritemap_Common_Nothing ;A28D78; + LDA.W #Common_Spritemap_Nothing ;A28D78; STA.W Enemy.spritemap,X ;A28D7B; LDA.W #$0001 ;A28D7E; STA.W Enemy.instTimer,X ;A28D81; @@ -2226,7 +1645,7 @@ AwakenTurtle: ;;; $930F: Enemy shot - enemy $CF7F (mini-tatori) ;;; EnemyShot_BabyTurtle: - JSL.L NormalEnemyShotAI ;A2930F; + JSL.L NormalEnemyShotAI_Internal ;A2930F; BRA AwakenTurtle ;A29313; @@ -2280,7 +1699,7 @@ MamaTurtle_vs_Samus_CollisionDetection: BMI .return ;A29375; LDA.W SamusInvincibilityTimer ;A29377; BNE .return ;A2937A; - JSL.L NormalEnemyTouchAI ;A2937C; + JSL.L NormalEnemyTouchAI_Internal ;A2937C; .return: RTS ;A29380; @@ -2868,7 +2287,7 @@ InstList_Puyo_GroundedDropping_Fast: dw $0005,Spritemap_Puyo_1 ;A299B1; dw $0005,Spritemap_Puyo_2 ;A299B5; dw $0005,Spritemap_Puyo_1 ;A299B9; - dw Instruction_Common_GotoY ;A299BD; + dw Common_Instruction_GotoY ;A299BD; dw InstList_Puyo_GroundedDropping_Fast ;A299BF; @@ -2878,7 +2297,7 @@ InstList_Puyo_GroundedDropping_Medium: dw $0008,Spritemap_Puyo_1 ;A299C5; dw $0008,Spritemap_Puyo_2 ;A299C9; dw $0008,Spritemap_Puyo_1 ;A299CD; - dw Instruction_Common_GotoY ;A299D1; + dw Common_Instruction_GotoY ;A299D1; dw InstList_Puyo_GroundedDropping_Medium ;A299D3; @@ -2888,38 +2307,38 @@ InstList_Puyo_GroundedDropping_Slow: dw $000A,Spritemap_Puyo_1 ;A299D9; dw $000A,Spritemap_Puyo_2 ;A299DD; dw $000A,Spritemap_Puyo_1 ;A299E1; - dw Instruction_Common_GotoY ;A299E5; + dw Common_Instruction_GotoY ;A299E5; dw InstList_Puyo_GroundedDropping_Slow ;A299E7; ;;; $99E9: Instruction list - hopping right frame 0 / hopping left frame 4 ;;; InstList_Puyo_HoppingRight_0_HoppingLeft_4: dw $0001,Spritemap_Puyo_7 ;A299E9; - dw Instruction_Common_Sleep ;A299ED; + dw Common_Instruction_Sleep ;A299ED; ;;; $99EF: Instruction list - hopping right frame 1 / hopping left frame 3 ;;; InstList_Puyo_HoppingRight_1_HoppingLeft_3: dw $0001,Spritemap_Puyo_6 ;A299EF; - dw Instruction_Common_Sleep ;A299F3; + dw Common_Instruction_Sleep ;A299F3; ;;; $99F5: Instruction list - hopping frame 2 ;;; InstList_Puyo_Hopping_2: dw $0001,Spritemap_Puyo_5 ;A299F5; - dw Instruction_Common_Sleep ;A299F9; + dw Common_Instruction_Sleep ;A299F9; ;;; $99FB: Instruction list - hopping right frame 3 / hopping left frame 1 ;;; InstList_Puyo_HoppingRight_3_HoppingLeft_1: dw $0001,Spritemap_Puyo_4 ;A299FB; - dw Instruction_Common_Sleep ;A299FF; + dw Common_Instruction_Sleep ;A299FF; ;;; $9A01: Instruction list - hopping right frame 4 / hopping left frame 0 ;;; InstList_Puyo_HoppingRight_4_HoppingLeft_0: dw $0001,Spritemap_Puyo_3 ;A29A01; - dw Instruction_Common_Sleep ;A29A05; + dw Common_Instruction_Sleep ;A29A05; ;;; $9A07: Hop table ;;; @@ -2954,7 +2373,7 @@ PuyoHopTable: ;;; $9A3F: Initialisation AI - enemy $CFBF (puyo) ;;; InitAI_Puyo: LDX.W EnemyIndex ;A29A3F; - LDA.W #Spritemap_Common_Nothing ;A29A42; + LDA.W #Common_Spritemap_Nothing ;A29A42; STA.W Enemy.spritemap,X ;A29A45; STZ.W Enemy.var0,X ;A29A48; LDA.W #InstList_Puyo_GroundedDropping_Fast ;A29A4B; @@ -3094,7 +2513,7 @@ Puyo_CalculateInitialHopSpeed: TAY ;A29B33; LDA.B DP_Temp18 ;A29B34; CLC ;A29B36; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing+1,Y ;A29B37; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing+1,Y ;A29B37; STA.B DP_Temp18 ;A29B3A; LDY.W Puyo.hopTableIndex,X ;A29B3C; LDA.W PuyoHopTable_jumpHeight,Y ;A29B3F; @@ -3160,9 +2579,9 @@ PuyoMovement: DEY ;A29BA7; .notFalling: - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+4,Y ;A29BA8; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+4,Y ;A29BA8; STA.B DP_Temp12 ;A29BAB; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+6,Y ;A29BAD; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+6,Y ;A29BAD; STA.B DP_Temp14 ;A29BB0; CLC ;A29BB2; JSL.L MoveEnemyDownBy_14_12 ;A29BB3; @@ -3545,7 +2964,7 @@ InstList_Cacatac_UpsideUp_Idling: dw $0008,Spritemap_Cacatac_5 ;A29EA0; dw $0008,Spritemap_Cacatac_6 ;A29EA4; dw $0008,Spritemap_Cacatac_7 ;A29EA8; - dw Instruction_Common_GotoY ;A29EAC; + dw Common_Instruction_GotoY ;A29EAC; dw InstList_Cacatac_UpsideUp_Idling ;A29EAE; @@ -3561,7 +2980,7 @@ InstList_Cacatac_UpsideUp_Attacking: dw Instruction_Cacatac_SpawnSpikeProjectileWithParameterInY,$0002 ;A29ECA; dw Instruction_Cacatac_SpawnSpikeProjectileWithParameterInY,$000E ;A29ECE; dw Instruction_Cacatac_SpawnSpikeProjectileWithParameterInY,$0004 ;A29ED2; - dw Instruction_Common_GotoY ;A29ED6; + dw Common_Instruction_GotoY ;A29ED6; dw InstList_Cacatac_UpsideUp_Idling ;A29ED8; @@ -3578,7 +2997,7 @@ InstList_Cacatac_UpsideDown_Idling_1: dw $0008,Spritemap_Cacatac_F ;A29EF0; dw $0008,Spritemap_Cacatac_10 ;A29EF4; dw $0008,Spritemap_Cacatac_11 ;A29EF8; - dw Instruction_Common_GotoY ;A29EFC; + dw Common_Instruction_GotoY ;A29EFC; dw InstList_Cacatac_UpsideDown_Idling_1 ;A29EFE; @@ -3594,7 +3013,7 @@ InstList_Cacatac_UpsideDown_Attacking: dw Instruction_Cacatac_SpawnSpikeProjectileWithParameterInY,$0008 ;A29F1A; dw Instruction_Cacatac_SpawnSpikeProjectileWithParameterInY,$0012 ;A29F1E; dw Instruction_Cacatac_SpawnSpikeProjectileWithParameterInY,$000A ;A29F22; - dw Instruction_Common_GotoY ;A29F26; + dw Common_Instruction_GotoY ;A29F26; dw InstList_Cacatac_UpsideDown_Idling_0 ;A29F28; @@ -3626,7 +3045,7 @@ CacatacFunctionPointers: ;;; $9F48: Initialisation AI - enemy $CFFF (cacatac) ;;; InitAI_Cacatac: LDX.W EnemyIndex ;A29F48; - LDA.W #Spritemap_Common_Nothing ;A29F4B; + LDA.W #Common_Spritemap_Nothing ;A29F4B; STA.W Enemy.spritemap,X ;A29F4E; LDA.W Enemy.init0+1,X ;A29F51; AND.W #$00FF ;A29F54; @@ -3662,13 +3081,13 @@ InitAI_Cacatac: ASL ;A29F97; ASL ;A29F98; TAY ;A29F99; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A29F9A; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A29F9A; STA.W Cacatac.rightVelocity,X ;A29F9D; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A29FA0; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A29FA0; STA.W Cacatac.rightSubVelocity,X ;A29FA3; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;A29FA6; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;A29FA6; STA.W Cacatac.leftVelocity,X ;A29FA9; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;A29FAC; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;A29FAC; STA.W Cacatac.leftSubVelocity,X ;A29FAF; RTL ;A29FB2; @@ -4053,7 +3472,7 @@ InstList_Owtch_MovingLeft_1: dw $0008,Spritemap_Owtch_0 ;A2A3AD; dw $0008,Spritemap_Owtch_1 ;A2A3B1; dw $0008,Spritemap_Owtch_2 ;A2A3B5; - dw Instruction_Common_GotoY ;A2A3B9; + dw Common_Instruction_GotoY ;A2A3B9; dw InstList_Owtch_MovingLeft_1 ;A2A3BB; @@ -4065,7 +3484,7 @@ InstList_Owtch_MovingRight_1: dw $0008,Spritemap_Owtch_2 ;A2A3BF; dw $0008,Spritemap_Owtch_1 ;A2A3C3; dw $0008,Spritemap_Owtch_0 ;A2A3C7; - dw Instruction_Common_GotoY ;A2A3CB; + dw Common_Instruction_GotoY ;A2A3CB; dw InstList_Owtch_MovingRight_1 ;A2A3CD; @@ -4096,7 +3515,7 @@ OwtchConstants: ;;; $A3F9: Initialisation AI - enemy $D03F (owtch) ;;; InitAI_Owtch: LDX.W EnemyIndex ;A2A3F9; - LDA.W #Spritemap_Common_Nothing ;A2A3FC; + LDA.W #Common_Spritemap_Nothing ;A2A3FC; STA.W Enemy.spritemap,X ;A2A3FF; LDA.W Enemy.init0,X ;A2A402; AND.W #$00FF ;A2A405; @@ -4112,13 +3531,13 @@ InitAI_Owtch: ASL ;A2A41D; ASL ;A2A41E; TAY ;A2A41F; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A2A420; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A2A420; STA.W Owtch.rightVelocity,X ;A2A423; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A2A426; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A2A426; STA.W Owtch.rightSubVelocity,X ;A2A429; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;A2A42C; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;A2A42C; STA.W Owtch.leftVelocity,X ;A2A42F; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;A2A432; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;A2A432; STA.W Cacatac.leftSubVelocity,X ;A2A435; LDA.W Enemy.init1+1,X ;A2A438; AND.W #$00FF ;A2A43B; @@ -4361,7 +3780,7 @@ InstList_ShipEntrancePad_Opening_0: InstList_ShipEntrancePad_Opening_1: dw $0004,Spritemap_Ship_A ;A2A5E6; - dw Instruction_Common_GotoY ;A2A5EA; + dw Common_Instruction_GotoY ;A2A5EA; dw InstList_ShipEntrancePad_Opening_1 ;A2A5EC; @@ -4380,20 +3799,20 @@ InstList_ShipEntrancePad_Closing: ;;; $A60E: Instruction list - gunship entrance pad - closed ;;; InstList_ShipEntrancePad_Closed: dw $0008,Spritemap_Ship_C ;A2A60E; - dw Instruction_Common_GotoY ;A2A612; + dw Common_Instruction_GotoY ;A2A612; dw InstList_ShipEntrancePad_Closed ;A2A614; ;;; $A616: Instruction list - gunship top ;;; InstList_ShipTop: dw $0001,Spritemap_Ship_0 ;A2A616; - dw Instruction_Common_Sleep ;A2A61A; + dw Common_Instruction_Sleep ;A2A61A; ;;; $A61C: Instruction list - gunship bottom ;;; InstList_ShipBottom: dw $0001,Spritemap_Ship_1 ;A2A61C; - dw Instruction_Common_Sleep ;A2A620; + dw Common_Instruction_Sleep ;A2A620; ;;; $A622: Gunship brakes movement data ;;; @@ -5519,7 +4938,7 @@ InstList_Mellow_Mella_Menu: dw $0002,Spritemap_Mellow_Mella_Menu_1 ;A2B017; dw $0002,Spritemap_Mellow_Mella_Menu_2 ;A2B01B; dw $0002,Spritemap_Mellow_Mella_Menu_3 ;A2B01F; - dw Instruction_Common_GotoY ;A2B023; + dw Common_Instruction_GotoY ;A2B023; dw InstList_Mellow_Mella_Menu ;A2B025; @@ -5542,11 +4961,11 @@ InitAI_Mellow_Mella_Menu: STA.W Flies.function,X ;A2B074; LDA.W #InstList_Mellow_Mella_Menu ;A2B077; STA.W Enemy.instList,X ;A2B07A; - LDA.W #Spritemap_Common_Nothing ;A2B07D; + LDA.W #Common_Spritemap_Nothing ;A2B07D; STA.W Enemy.spritemap,X ;A2B080; LDA.W #$0001 ;A2B083; STA.W Enemy.instTimer,X ;A2B086; - LDA.W #Spritemap_Common_Nothing ;A2B089; + LDA.W #Common_Spritemap_Nothing ;A2B089; STA.W Enemy.spritemap,X ;A2B08C; RTL ;A2B08F; @@ -5887,7 +5306,7 @@ InstList_Multiviola: dw $000A,Spritemap_Multiviola_3 ;A2B308; dw $000A,Spritemap_Multiviola_2 ;A2B30C; dw $000A,Spritemap_Multiviola_1 ;A2B310; - dw Instruction_Common_GotoY ;A2B314; + dw Common_Instruction_GotoY ;A2B314; dw InstList_Multiviola ;A2B316; @@ -5896,30 +5315,30 @@ if !FEATURE_KEEP_UNREFERENCED UNUSED_InstList_Multiviola_A2B318: ; The spritemaps here have no associated graphics dw $0002,UNUSED_Spritemap_Multiviola_A2B4E2 ;A2B318; - dw $0001,Spritemap_Common_Nothing ;A2B31C; + dw $0001,Common_Spritemap_Nothing ;A2B31C; dw $0002,UNUSED_Spritemap_Multiviola_A2B4E2 ;A2B320; - dw $0001,Spritemap_Common_Nothing ;A2B324; + dw $0001,Common_Spritemap_Nothing ;A2B324; dw $0002,UNUSED_Spritemap_Multiviola_A2B4E9 ;A2B328; - dw $0001,Spritemap_Common_Nothing ;A2B32C; + dw $0001,Common_Spritemap_Nothing ;A2B32C; dw $0002,UNUSED_Spritemap_Multiviola_A2B4E9 ;A2B330; - dw $0001,Spritemap_Common_Nothing ;A2B334; + dw $0001,Common_Spritemap_Nothing ;A2B334; dw $0002,UNUSED_Spritemap_Multiviola_A2B4F0 ;A2B338; - dw $0001,Spritemap_Common_Nothing ;A2B33C; + dw $0001,Common_Spritemap_Nothing ;A2B33C; dw $0002,UNUSED_Spritemap_Multiviola_A2B4F0 ;A2B340; - dw $0001,Spritemap_Common_Nothing ;A2B344; + dw $0001,Common_Spritemap_Nothing ;A2B344; dw $0002,UNUSED_Spritemap_Multiviola_A2B4F7 ;A2B348; - dw $0001,Spritemap_Common_Nothing ;A2B34C; + dw $0001,Common_Spritemap_Nothing ;A2B34C; dw $0002,UNUSED_Spritemap_Multiviola_A2B4F7 ;A2B350; - dw $0001,Spritemap_Common_Nothing ;A2B354; + dw $0001,Common_Spritemap_Nothing ;A2B354; dw $0002,UNUSED_Spritemap_Multiviola_A2B4F0 ;A2B358; - dw $0001,Spritemap_Common_Nothing ;A2B35C; + dw $0001,Common_Spritemap_Nothing ;A2B35C; dw $0002,UNUSED_Spritemap_Multiviola_A2B4F0 ;A2B360; - dw $0001,Spritemap_Common_Nothing ;A2B364; + dw $0001,Common_Spritemap_Nothing ;A2B364; dw $0002,UNUSED_Spritemap_Multiviola_A2B4E9 ;A2B368; - dw $0001,Spritemap_Common_Nothing ;A2B36C; + dw $0001,Common_Spritemap_Nothing ;A2B36C; dw $0002,UNUSED_Spritemap_Multiviola_A2B4E9 ;A2B370; - dw $0001,Spritemap_Common_Nothing ;A2B374; - dw Instruction_Common_GotoY ;A2B378; + dw $0001,Common_Spritemap_Nothing ;A2B374; + dw Common_Instruction_GotoY ;A2B378; dw UNUSED_InstList_Multiviola_A2B318 ;A2B37A; @@ -5927,30 +5346,30 @@ UNUSED_InstList_Multiviola_A2B318: UNUSED_InstList_Multiviola_A2B37C: ; The spritemaps here have no associated graphics dw $0002,UNUSED_Spritemap_Multiviola_A2B4FE ;A2B37C; - dw $0001,Spritemap_Common_Nothing ;A2B380; + dw $0001,Common_Spritemap_Nothing ;A2B380; dw $0002,UNUSED_Spritemap_Multiviola_A2B4FE ;A2B384; - dw $0001,Spritemap_Common_Nothing ;A2B388; + dw $0001,Common_Spritemap_Nothing ;A2B388; dw $0002,UNUSED_Spritemap_Multiviola_B2B505 ;A2B38C; - dw $0001,Spritemap_Common_Nothing ;A2B390; + dw $0001,Common_Spritemap_Nothing ;A2B390; dw $0002,UNUSED_Spritemap_Multiviola_B2B505 ;A2B394; - dw $0001,Spritemap_Common_Nothing ;A2B398; + dw $0001,Common_Spritemap_Nothing ;A2B398; dw $0002,UNUSED_Spritemap_Multiviola_A2B50C ;A2B39C; - dw $0001,Spritemap_Common_Nothing ;A2B3A0; + dw $0001,Common_Spritemap_Nothing ;A2B3A0; dw $0002,UNUSED_Spritemap_Multiviola_A2B50C ;A2B3A4; - dw $0001,Spritemap_Common_Nothing ;A2B3A8; + dw $0001,Common_Spritemap_Nothing ;A2B3A8; dw $0002,UNUSED_Spritemap_Multiviola_A2B513 ;A2B3AC; - dw $0001,Spritemap_Common_Nothing ;A2B3B0; + dw $0001,Common_Spritemap_Nothing ;A2B3B0; dw $0002,UNUSED_Spritemap_Multiviola_A2B513 ;A2B3B4; - dw $0001,Spritemap_Common_Nothing ;A2B3B8; + dw $0001,Common_Spritemap_Nothing ;A2B3B8; dw $0002,UNUSED_Spritemap_Multiviola_A2B50C ;A2B3BC; - dw $0001,Spritemap_Common_Nothing ;A2B3C0; + dw $0001,Common_Spritemap_Nothing ;A2B3C0; dw $0002,UNUSED_Spritemap_Multiviola_A2B50C ;A2B3C4; - dw $0001,Spritemap_Common_Nothing ;A2B3C8; + dw $0001,Common_Spritemap_Nothing ;A2B3C8; dw $0002,UNUSED_Spritemap_Multiviola_B2B505 ;A2B3CC; - dw $0001,Spritemap_Common_Nothing ;A2B3D0; + dw $0001,Common_Spritemap_Nothing ;A2B3D0; dw $0002,UNUSED_Spritemap_Multiviola_B2B505 ;A2B3D4; - dw $0001,Spritemap_Common_Nothing ;A2B3D8; - dw Instruction_Common_GotoY ;A2B3DC; + dw $0001,Common_Spritemap_Nothing ;A2B3D8; + dw Common_Instruction_GotoY ;A2B3DC; dw UNUSED_InstList_Multiviola_A2B37C ;A2B3DE; endif ; !FEATURE_KEEP_UNREFERENCED @@ -6122,7 +5541,7 @@ endif ; !FEATURE_KEEP_UNREFERENCED ;;; $B51A: Instruction list - polyp ;;; InstList_Polyp: dw $0001,Spritemap_Polyp ;A2B51A; - dw Instruction_Common_Sleep ;A2B51E; + dw Common_Instruction_Sleep ;A2B51E; ;;; $B520: Polyp data ;;; @@ -6698,7 +6117,7 @@ FrozenAI_Rinka: STZ.W Enemy.freezeTimer,X ;A2B92F; .onScreen: - JSL.L NormalEnemyFrozenAI ;A2B932; + JSL.L NormalEnemyFrozenAI_Internal ;A2B932; LDA.L MotherBrainBody.deleteTurretsRinkasFlag ;A2B936; BNE .delete ;A2B93A; RTL ;A2B93C; @@ -6825,7 +6244,7 @@ InstList_Rinka_NotMotherBrainsRoom_1: dw $0006,Spritemap_Rinka_3 ;A2B9FC; dw $0007,Spritemap_Rinka_2 ;A2BA00; dw $0008,Spritemap_Rinka_1 ;A2BA04; - dw Instruction_Common_GotoY ;A2BA08; + dw Common_Instruction_GotoY ;A2BA08; dw InstList_Rinka_NotMotherBrainsRoom_1 ;A2BA0A; @@ -6844,7 +6263,7 @@ InstList_Rinka_MotherBrainsRoom_1: dw $0006,Spritemap_Rinka_3 ;A2BA28; dw $0007,Spritemap_Rinka_2 ;A2BA2C; dw $0008,Spritemap_Rinka_1 ;A2BA30; - dw Instruction_Common_GotoY ;A2BA34; + dw Common_Instruction_GotoY ;A2BA34; dw InstList_Rinka_MotherBrainsRoom_1 ;A2BA36; @@ -6898,7 +6317,7 @@ UNUSED_InstList_Rio_Idle_A2BB9B: dw $0004,Spritemap_Rio_3 ;A2BABF; dw $0004,Spritemap_Rio_2 ;A2BAC3; dw $0004,Spritemap_Rio_3 ;A2BAC7; - dw Instruction_Common_GotoY ;A2BACB; + dw Common_Instruction_GotoY ;A2BACB; dw UNUSED_InstList_Rio_Idle_A2BB9B ;A2BACD; @@ -6935,7 +6354,7 @@ UNUSED_InstList_Rio_Swooping_A2BACF: dw $0003,Spritemap_Rio_7 ;A2BB3B; dw $0003,Spritemap_Rio_6 ;A2BB3F; dw $0003,Spritemap_Rio_7 ;A2BB43; - dw Instruction_Common_GotoY ;A2BB47; + dw Common_Instruction_GotoY ;A2BB47; dw UNUSED_InstList_Rio_Swooping_A2BACF ;A2BB49; endif ; !FEATURE_KEEP_UNREFERENCED @@ -6958,7 +6377,7 @@ InstList_Rio_PostSwoopIdle: dw $0004,Spritemap_Rio_3 ;A2BB6F; dw $0004,Spritemap_Rio_2 ;A2BB73; dw $0004,Spritemap_Rio_3 ;A2BB77; - dw Instruction_Common_GotoY ;A2BB7B; + dw Common_Instruction_GotoY ;A2BB7B; dw InstList_Rio_Idle ;A2BB7D; @@ -6970,14 +6389,14 @@ InstList_Rio_Swooping_Part1: dw $0003,Spritemap_Rio_5 ;A2BB8B; dw $0003,Spritemap_Rio_6 ;A2BB8F; dw Instruction_Rio_SetAnimationFinishedFlag ;A2BB93; - dw Instruction_Common_Sleep ;A2BB95; + dw Common_Instruction_Sleep ;A2BB95; ;;; $BB97: Instruction list - swooping - part 2 ;;; InstList_Rio_Swooping_Part2: dw $0003,Spritemap_Rio_7 ;A2BB97; dw $0003,Spritemap_Rio_6 ;A2BB9B; - dw Instruction_Common_GotoY ;A2BB9F; + dw Common_Instruction_GotoY ;A2BB9F; dw InstList_Rio_Swooping_Part2 ;A2BBA1; @@ -6989,7 +6408,7 @@ InstList_Rio_SwoopCooldown: dw $0003,Spritemap_Rio_3 ;A2BBAF; dw $0003,Spritemap_Rio_2 ;A2BBB3; dw Instruction_Rio_SetAnimationFinishedFlag ;A2BBB7; - dw Instruction_Common_Sleep ;A2BBB9; + dw Common_Instruction_Sleep ;A2BBB9; ;;; $BBBB: Rio constants ;;; @@ -7312,7 +6731,7 @@ Palette_Squeept: ;;; $BE3C: Instruction list - rising ;;; InstList_Squeept_Rising: dw $0001,Spritemap_Squeept_0 ;A2BE3C; - dw Instruction_Common_Sleep ;A2BE40; + dw Common_Instruction_Sleep ;A2BE40; ;;; $BE42: Instruction list - flipping / falling ;;; @@ -7325,23 +6744,23 @@ InstList_Squeept_Flipping_Falling: dw $000A,Spritemap_Squeept_5 ;A2BE56; dw $0001,Spritemap_Squeept_6 ;A2BE5A; dw Instruction_Squeept_SetAnimationFinishedFlag ;A2BE5E; - dw Instruction_Common_Sleep ;A2BE60; + dw Common_Instruction_Sleep ;A2BE60; ;;; $BE62: Instruction list - flame ;;; InstList_Squeept_Flame_0: dw $0001,Spritemap_Squeept_7 ;A2BE62; - dw $0001,Spritemap_Common_Nothing ;A2BE66; - dw Instruction_Common_TimerInY,$0001 ;A2BE6A; + dw $0001,Common_Spritemap_Nothing ;A2BE66; + dw Common_Instruction_TimerInY,$0001 ;A2BE6A; InstList_Squeept_Flame_1: dw $0001,Spritemap_Squeept_9 ;A2BE6E; - dw $0001,Spritemap_Common_Nothing ;A2BE72; + dw $0001,Common_Spritemap_Nothing ;A2BE72; dw $0001,Spritemap_Squeept_8 ;A2BE76; - dw $0001,Spritemap_Common_Nothing ;A2BE7A; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;A2BE7E; + dw $0001,Common_Spritemap_Nothing ;A2BE7A; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;A2BE7E; dw InstList_Squeept_Flame_1 ;A2BE80; - dw Instruction_Common_GotoY ;A2BE82; + dw Common_Instruction_GotoY ;A2BE82; dw InstList_Squeept_Flame_0 ;A2BE84; @@ -7646,7 +7065,7 @@ InstList_Geruta_Main_Idle: dw $0012,Spritemap_Geruta_0 ;A2C0F7; dw $000D,Spritemap_Geruta_1 ;A2C0FB; dw $0012,Spritemap_Geruta_2 ;A2C0FF; - dw Instruction_Common_GotoY ;A2C103; + dw Common_Instruction_GotoY ;A2C103; dw InstList_Geruta_Main_Idle ;A2C105; @@ -7665,7 +7084,7 @@ InstList_Geruta_Main_Swoop_StartDescending: dw Instruction_Geruta_SetFlamesYOffset_negative10 ;A2C125; dw $0001,Spritemap_Geruta_E ;A2C127; dw Instruction_Geruta_SetFinishedSwoopStartAnimationFlag ;A2C12B; - dw Instruction_Common_Sleep ;A2C12D; + dw Common_Instruction_Sleep ;A2C12D; ;;; $C12F: Instruction list - main - swoop - descending ;;; @@ -7675,7 +7094,7 @@ InstList_Geruta_Main_Swoop_Descending: dw $0005,Spritemap_Geruta_8 ;A2C135; dw $0008,Spritemap_Geruta_9 ;A2C139; dw $0006,Spritemap_Geruta_8 ;A2C13D; - dw Instruction_Common_GotoY ;A2C141; + dw Common_Instruction_GotoY ;A2C141; dw InstList_Geruta_Main_Swoop_Descending ;A2C143; @@ -7698,7 +7117,7 @@ InstList_Geruta_Main_Swoop_StartAscending: dw Instruction_Geruta_SetFlamesYOffset_C ;A2C16F; dw $0001,Spritemap_Geruta_2 ;A2C171; dw Instruction_Geruta_SetFinishedSwoopStartAnimationFlag ;A2C175; - dw Instruction_Common_Sleep ;A2C177; + dw Common_Instruction_Sleep ;A2C177; ;;; $C179: Instruction list - main - swoop - ascending ;;; @@ -7708,7 +7127,7 @@ InstList_Geruta_Main_Swoop_Ascending: dw $0005,Spritemap_Geruta_10 ;A2C17F; dw $0008,Spritemap_Geruta_11 ;A2C183; dw $0006,Spritemap_Geruta_10 ;A2C187; - dw Instruction_Common_GotoY ;A2C18B; + dw Common_Instruction_GotoY ;A2C18B; dw InstList_Geruta_Main_Swoop_Ascending ;A2C18D; @@ -7718,7 +7137,7 @@ InstList_Geruta_Flames_Ascending: dw $0005,Spritemap_Geruta_5 ;A2C193; dw $0008,Spritemap_Geruta_6 ;A2C197; dw $0006,Spritemap_Geruta_5 ;A2C19B; - dw Instruction_Common_GotoY ;A2C19F; + dw Common_Instruction_GotoY ;A2C19F; dw InstList_Geruta_Flames_Ascending ;A2C1A1; @@ -7728,7 +7147,7 @@ InstList_Geruta_Flames_Descending: dw $0005,Spritemap_Geruta_13 ;A2C1A7; dw $0008,Spritemap_Geruta_14 ;A2C1AB; dw $0006,Spritemap_Geruta_13 ;A2C1AF; - dw Instruction_Common_GotoY ;A2C1B3; + dw Common_Instruction_GotoY ;A2C1B3; dw InstList_Geruta_Flames_Descending ;A2C1B5; @@ -8264,7 +7683,7 @@ InstList_Holtz_Idle_1: dw $000B,Spritemap_Holtz_1 ;A2C620; dw $000B,Spritemap_Holtz_2 ;A2C624; dw $000B,Spritemap_Holtz_1 ;A2C628; - dw Instruction_Common_GotoY ;A2C62C; + dw Common_Instruction_GotoY ;A2C62C; dw InstList_Holtz_Idle_1 ;A2C62E; @@ -8281,14 +7700,14 @@ InstList_Holtz_PrepareToSwoop: dw $0003,Spritemap_Holtz_9 ;A2C64E; dw $0003,Spritemap_Holtz_A ;A2C652; dw Instruction_Holtz_SetAnimationFinishedFlag ;A2C656; - dw Instruction_Common_Sleep ;A2C658; + dw Common_Instruction_Sleep ;A2C658; ;;; $C65A: Instruction list - swoop - descending ;;; InstList_Holtz_Swoop_Descending: dw Instruction_Holtz_HideFlames ;A2C65A; dw $0001,Spritemap_Holtz_A ;A2C65C; - dw Instruction_Common_Sleep ;A2C660; + dw Common_Instruction_Sleep ;A2C660; ;;; $C662: Instruction list - swoop - ascending - part 1 ;;; @@ -8298,7 +7717,7 @@ InstList_Holtz_Swoop_Ascending_Part1: dw $0003,Spritemap_Holtz_9 ;A2C668; dw $0003,Spritemap_Holtz_B ;A2C66C; dw Instruction_Holtz_SetAnimationFinishedFlag ;A2C670; - dw Instruction_Common_Sleep ;A2C672; + dw Common_Instruction_Sleep ;A2C672; ;;; $C674: Instruction list - swoop - ascending - part 2 ;;; @@ -8309,7 +7728,7 @@ InstList_Holtz_Swoop_Part2_1: dw $0002,Spritemap_Holtz_E ;A2C676; dw $0002,Spritemap_Holtz_C ;A2C67A; dw $0002,Spritemap_Holtz_D ;A2C67E; - dw Instruction_Common_GotoY ;A2C682; + dw Common_Instruction_GotoY ;A2C682; dw InstList_Holtz_Swoop_Part2_1 ;A2C684; @@ -8326,7 +7745,7 @@ InstList_Holtz_SwoopCooldown: dw $0001,Spritemap_Holtz_3 ;A2C6A4; dw $0001,Spritemap_Holtz_2 ;A2C6A8; dw Instruction_Holtz_SetAnimationFinishedFlag ;A2C6AC; - dw Instruction_Common_Sleep ;A2C6AE; + dw Common_Instruction_Sleep ;A2C6AE; ;;; $C6B0: Instruction list - flames ;;; @@ -8334,7 +7753,7 @@ InstList_Holtz_Flames: dw $0006,Spritemap_Holtz_F ;A2C6B0; dw $0004,Spritemap_Holtz_10 ;A2C6B4; dw $0003,Spritemap_Holtz_11 ;A2C6B8; - dw Instruction_Common_GotoY ;A2C6BC; + dw Common_Instruction_GotoY ;A2C6BC; dw InstList_Holtz_Flames ;A2C6BE; @@ -8762,7 +8181,7 @@ Palette_Oum: ;;; $CA4B: Instruction list - facing left - idle ;;; InstList_Oum_FacingLeft_Idle: dw $0001,ExtendedSpritemap_Oum_FacingLeft_0 ;A2CA4B; - dw Instruction_Common_Sleep ;A2CA4F; + dw Common_Instruction_Sleep ;A2CA4F; ;;; $CA51: Instruction list - facing left - attacking ;;; @@ -8782,7 +8201,7 @@ InstList_Oum_FacingLeft_Attacking: dw $0001,ExtendedSpritemap_Oum_FacingLeft_3 ;A2CA7F; dw $0012,ExtendedSpritemap_Oum_FacingLeft_2 ;A2CA83; dw Instruction_Oum_SetAnimationFinishedFlag ;A2CA87; - dw Instruction_Common_Sleep ;A2CA89; + dw Common_Instruction_Sleep ;A2CA89; ;;; $CA8B: Instruction list - facing left - rolling forwards ;;; @@ -8797,7 +8216,7 @@ InstList_Oum_FacingLeft_RollingForwards: dw $0007,ExtendedSpritemap_Oum_FacingLeft_C ;A2CAA3; dw $0007,ExtendedSpritemap_Oum_FacingLeft_D ;A2CAA7; dw $0007,ExtendedSpritemap_Oum_FacingLeft_E ;A2CAAB; - dw Instruction_Common_GotoY ;A2CAAF; + dw Common_Instruction_GotoY ;A2CAAF; dw InstList_Oum_FacingLeft_RollingForwards ;A2CAB1; @@ -8813,14 +8232,14 @@ InstList_Oum_FacingLeft_RollingBackwards: dw Instruction_Oum_SetAttackAllowingRotationFlag ;A2CACF; dw $0007,ExtendedSpritemap_Oum_FacingLeft_2 ;A2CAD1; dw Instruction_Oum_ResetAttackAllowingRotationFlag ;A2CAD5; - dw Instruction_Common_GotoY ;A2CAD7; + dw Common_Instruction_GotoY ;A2CAD7; dw InstList_Oum_FacingLeft_RollingBackwards ;A2CAD9; ;;; $CADB: Instruction list - facing right - idle ;;; InstList_Oum_FacingRight_Idle: dw $0001,ExtendedSpritemap_Oum_FacingRight_0 ;A2CADB; - dw Instruction_Common_Sleep ;A2CADF; + dw Common_Instruction_Sleep ;A2CADF; ;;; $CAE1: Instruction list - facing right - attacking ;;; @@ -8840,7 +8259,7 @@ InstList_Oum_FacingRight_Attacking: dw $0001,ExtendedSpritemap_Oum_FacingRight_3 ;A2CB0F; dw $0012,ExtendedSpritemap_Oum_FacingRight_2 ;A2CB13; dw Instruction_Oum_SetAnimationFinishedFlag ;A2CB17; - dw Instruction_Common_Sleep ;A2CB19; + dw Common_Instruction_Sleep ;A2CB19; ;;; $CB1B: Instruction list - facing right - rolling forwards ;;; @@ -8855,7 +8274,7 @@ InstList_Oum_FacingRight_RollingForwards: dw $0007,ExtendedSpritemap_Oum_FacingRight_C ;A2CB33; dw $0007,ExtendedSpritemap_Oum_FacingRight_D ;A2CB37; dw $0007,ExtendedSpritemap_Oum_FacingRight_E ;A2CB3B; - dw Instruction_Common_GotoY ;A2CB3F; + dw Common_Instruction_GotoY ;A2CB3F; dw InstList_Oum_FacingRight_RollingForwards ;A2CB41; @@ -8871,7 +8290,7 @@ InstList_Oum_FacingRight_RollingBackwards: dw Instruction_Oum_SetAttackAllowingRotationFlag ;A2CB5F; dw $0007,ExtendedSpritemap_Oum_FacingRight_2 ;A2CB61; dw Instruction_Oum_ResetAttackAllowingRotationFlag ;A2CB65; - dw Instruction_Common_GotoY ;A2CB67; + dw Common_Instruction_GotoY ;A2CB67; dw InstList_Oum_FacingRight_RollingBackwards ;A2CB69; @@ -9340,9 +8759,9 @@ Function_Oum_Rolling: INY ;A2CEC1; .notLeft: - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A2CEC2; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A2CEC2; STA.B DP_Temp12 ;A2CEC5; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A2CEC7; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A2CEC7; STA.B DP_Temp14 ;A2CECA; LDA.L Oum.touchingSamusFlag,X ;A2CECC; BEQ .noAdjustForSamus ;A2CED0; @@ -9438,9 +8857,9 @@ Function_Oum_Falling: ASL ;A2CF7D; ASL ;A2CF7E; TAY ;A2CF7F; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing,Y ;A2CF80; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing,Y ;A2CF80; STA.B DP_Temp12 ;A2CF83; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+2,Y ;A2CF85; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+2,Y ;A2CF85; STA.B DP_Temp14 ;A2CF88; JSL.L MoveEnemyDownBy_14_12 ;A2CF8A; BCC .return ;A2CF8E; @@ -9479,9 +8898,9 @@ Function_Oum_Rising: ASL ;A2CFC5; ASL ;A2CFC6; TAY ;A2CFC7; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+4,Y ;A2CFC8; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+4,Y ;A2CFC8; STA.B DP_Temp12 ;A2CFCB; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+6,Y ;A2CFCD; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+6,Y ;A2CFCD; STA.B DP_Temp14 ;A2CFD0; JSL.L MoveEnemyDownBy_14_12 ;A2CFD2; @@ -9547,19 +8966,19 @@ Hitbox_Oum_FacingLeft_0: dw EnemyShot_Oum ;A2D040; dw $FFF8,$FFEF,$000E,$0010 ;A2D042; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D04A; - dw RTL_A2804C ;A2D04C; + dw Common_RTL_A0804C ;A2D04C; Hitbox_Oum_FacingLeft_1: dw $0001 ;A2D04E; dw $FFF0,$FFEF,$000E,$0010 ;A2D050; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D058; - dw RTL_A2804C ;A2D05A; + dw Common_RTL_A0804C ;A2D05A; Hitbox_Oum_FacingLeft_2: dw $0002 ;A2D05C; dw $FFFF,$FFEF,$000E,$0010 dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D066; - dw RTL_A2804C ;A2D068; + dw Common_RTL_A0804C ;A2D068; dw $FFEF,$FFEF,$0000,$0010 ;A2D06A; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D072; dw EnemyShot_Oum ;A2D074; @@ -9571,7 +8990,7 @@ Hitbox_Oum_FacingLeft_3: dw EnemyShot_Oum ;A2D082; dw $0000,$FFEF,$000D,$0010 ;A2D084; dw EnemyTouch_Oum_HurtsSamus ;A2D08C; - dw RTL_A2804C ;A2D08E; + dw Common_RTL_A0804C ;A2D08E; Hitbox_Oum_FacingLeft_4: dw $0002 ;A2D090; @@ -9580,7 +8999,7 @@ Hitbox_Oum_FacingLeft_4: dw EnemyShot_Oum ;A2D09C; dw $0000,$FFEF,$000E,$0010 ;A2D09E; dw EnemyTouch_Oum_HurtsSamus ;A2D0A6; - dw RTL_A2804C ;A2D0A8; + dw Common_RTL_A0804C ;A2D0A8; Hitbox_Oum_FacingLeft_5: dw $0002 ;A2D0AA; @@ -9589,7 +9008,7 @@ Hitbox_Oum_FacingLeft_5: dw EnemyShot_Oum ;A2D0B6; dw $0000,$FFEE,$000E,$0010 ;A2D0B8; dw EnemyTouch_Oum_HurtsSamus ;A2D0C0; - dw RTL_A2804C ;A2D0C2; + dw Common_RTL_A0804C ;A2D0C2; Hitbox_Oum_FacingLeft_6: dw $0002 ;A2D0C4; @@ -9598,7 +9017,7 @@ Hitbox_Oum_FacingLeft_6: dw EnemyShot_Oum ;A2D0D0; dw $0000,$FFEE,$000F,$0010 ;A2D0D2; dw EnemyTouch_Oum_HurtsSamus ;A2D0DA; - dw RTL_A2804C ;A2D0DC; + dw Common_RTL_A0804C ;A2D0DC; Hitbox_Oum_FacingLeft_7: dw $0002 ;A2D0DE; @@ -9607,7 +9026,7 @@ Hitbox_Oum_FacingLeft_7: dw EnemyShot_Oum ;A2D0EA; dw $0000,$FFEE,$000F,$0010 ;A2D0EC; dw EnemyTouch_Oum_HurtsSamus ;A2D0F4; - dw RTL_A2804C ;A2D0F6; + dw Common_RTL_A0804C ;A2D0F6; Hitbox_Oum_FacingLeft_8: dw $0003 ;A2D0F8; @@ -9616,16 +9035,16 @@ Hitbox_Oum_FacingLeft_8: dw EnemyShot_Oum ;A2D104; dw $FFF0,$FFF0,$0000,$0000 ;A2D106; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D10E; - dw RTL_A2804C ;A2D110; + dw Common_RTL_A0804C ;A2D110; dw $0000,$FFF0,$000E,$0010 ;A2D112; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D11A; - dw RTL_A2804C ;A2D11C; + dw Common_RTL_A0804C ;A2D11C; Hitbox_Oum_FacingLeft_9: dw $0002 ;A2D11E; dw $FFF1,$FFEF,$000F,$0000 dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D128; - dw RTL_A2804C ;A2D12A; + dw Common_RTL_A0804C ;A2D12A; dw $FFF1,$0000,$000F,$0010 ;A2D12C; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D134; dw EnemyShot_Oum ;A2D136; @@ -9634,10 +9053,10 @@ Hitbox_Oum_FacingLeft_A: dw $0003 ;A2D138; dw $FFF1,$FFEF,$0000,$0010 dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D142; - dw RTL_A2804C ;A2D144; + dw Common_RTL_A0804C ;A2D144; dw $0000,$FFEF,$000F,$0000 ;A2D146; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D14E; - dw RTL_A2804C ;A2D150; + dw Common_RTL_A0804C ;A2D150; dw $0000,$0000,$000F,$0010 ;A2D152; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D15A; dw EnemyShot_Oum ;A2D15C; @@ -9646,7 +9065,7 @@ Hitbox_Oum_FacingLeft_B: dw $0002 ;A2D15E; dw $FFF0,$FFEF,$0000,$0010 dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D168; - dw RTL_A2804C ;A2D16A; + dw Common_RTL_A0804C ;A2D16A; dw $0000,$FFEF,$000F,$0010 ;A2D16C; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D174; dw EnemyShot_Oum ;A2D176; @@ -9655,13 +9074,13 @@ Hitbox_Oum_FacingLeft_C: dw $0003 ;A2D178; dw $FFF1,$FFEF,$0000,$0010 dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D182; - dw RTL_A2804C ;A2D184; + dw Common_RTL_A0804C ;A2D184; dw $0000,$FFEF,$000F,$0000 ;A2D186; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D18E; dw EnemyShot_Oum ;A2D190; dw $0000,$0000,$000F,$0010 ;A2D192; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D19A; - dw RTL_A2804C ;A2D19C; + dw Common_RTL_A0804C ;A2D19C; Hitbox_Oum_FacingLeft_D: dw $0002 ;A2D19E; @@ -9670,25 +9089,25 @@ Hitbox_Oum_FacingLeft_D: dw EnemyShot_Oum ;A2D1AA; dw $FFF0,$0000,$000F,$0010 ;A2D1AC; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D1B4; - dw RTL_A2804C ;A2D1B6; + dw Common_RTL_A0804C ;A2D1B6; Hitbox_Oum_FacingLeft_E: dw $0003 ;A2D1B8; dw $FFF0,$0000,$0000,$0010 dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D1C2; - dw RTL_A2804C ;A2D1C4; + dw Common_RTL_A0804C ;A2D1C4; dw $FFF0,$FFEF,$0000,$0000 ;A2D1C6; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D1CE; dw EnemyShot_Oum ;A2D1D0; dw $0000,$FFEF,$000E,$0010 ;A2D1D2; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D1DA; - dw RTL_A2804C ;A2D1DC; + dw Common_RTL_A0804C ;A2D1DC; Hitbox_Oum_FacingRight_0: dw $0002 ;A2D1DE; dw $FFF0,$FFEF,$0008,$0010 dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D1E8; - dw RTL_A2804C ;A2D1EA; + dw Common_RTL_A0804C ;A2D1EA; dw $0008,$FFEF,$0010,$0010 ;A2D1EC; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D1F4; dw EnemyShot_Oum ;A2D1F6; @@ -9697,13 +9116,13 @@ Hitbox_Oum_FacingRight_1: dw $0001 ;A2D1F8; dw $FFF0,$FFEF,$0010,$0010 dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D202; - dw RTL_A2804C ;A2D204; + dw Common_RTL_A0804C ;A2D204; Hitbox_Oum_FacingRight_2: dw $0002 ;A2D206; dw $FFF0,$FFEF,$0000,$0010 dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D210; - dw RTL_A2804C ;A2D212; + dw Common_RTL_A0804C ;A2D212; dw $0000,$FFEF,$0010,$0010 ;A2D214; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D21C; dw EnemyShot_Oum ;A2D21E; @@ -9712,7 +9131,7 @@ Hitbox_Oum_FacingRight_3: dw $0002 ;A2D220; dw $FFF0,$FFEF,$0000,$0010 dw EnemyTouch_Oum_HurtsSamus ;A2D22A; - dw RTL_A2804C ;A2D22C; + dw Common_RTL_A0804C ;A2D22C; dw $0000,$FFF8,$0014,$0008 ;A2D22E; dw EnemyTouch_Oum_HurtsSamus ;A2D236; dw EnemyShot_Oum ;A2D238; @@ -9721,7 +9140,7 @@ Hitbox_Oum_FacingRight_4: dw $0002 ;A2D23A; dw $FFF0,$FFEF,$FFFF,$0010 dw EnemyTouch_Oum_HurtsSamus ;A2D244; - dw RTL_A2804C ;A2D246; + dw Common_RTL_A0804C ;A2D246; dw $0000,$FFF8,$0016,$0008 ;A2D248; dw EnemyTouch_Oum_HurtsSamus ;A2D250; dw EnemyShot_Oum ;A2D252; @@ -9730,7 +9149,7 @@ Hitbox_Oum_FacingRight_5: dw $0002 ;A2D254; dw $FFF0,$FFEE,$0000,$0010 dw EnemyTouch_Oum_HurtsSamus ;A2D25E; - dw RTL_A2804C ;A2D260; + dw Common_RTL_A0804C ;A2D260; dw $0000,$FFF8,$0018,$0008 ;A2D262; dw EnemyTouch_Oum_HurtsSamus ;A2D26A; dw EnemyShot_Oum ;A2D26C; @@ -9739,7 +9158,7 @@ Hitbox_Oum_FacingRight_6: dw $0002 ;A2D26E; dw $FFF1,$FFEF,$0000,$0010 dw EnemyTouch_Oum_HurtsSamus ;A2D278; - dw RTL_A2804C ;A2D27A; + dw Common_RTL_A0804C ;A2D27A; dw $0000,$FFF8,$0018,$0008 ;A2D27C; dw EnemyTouch_Oum_HurtsSamus ;A2D284; dw EnemyShot_Oum ;A2D286; @@ -9748,7 +9167,7 @@ Hitbox_Oum_FacingRight_7: dw $0002 ;A2D288; dw $FFF0,$FFEF,$0000,$0010 dw EnemyTouch_Oum_HurtsSamus ;A2D292; - dw RTL_A2804C ;A2D294; + dw Common_RTL_A0804C ;A2D294; dw $0000,$FFF8,$0019,$0008 ;A2D296; dw EnemyTouch_Oum_HurtsSamus ;A2D29E; dw EnemyShot_Oum ;A2D2A0; @@ -9757,10 +9176,10 @@ Hitbox_Oum_FacingRight_8: dw $0003 ;A2D2A2; dw $FFF1,$FFF0,$0000,$0010 dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D2AC; - dw RTL_A2804C ;A2D2AE; + dw Common_RTL_A0804C ;A2D2AE; dw $0000,$FFF0,$0010,$0000 ;A2D2B0; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D2B8; - dw RTL_A2804C ;A2D2BA; + dw Common_RTL_A0804C ;A2D2BA; dw $0000,$0000,$0010,$0010 ;A2D2BC; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D2C4; dw EnemyShot_Oum ;A2D2C6; @@ -9769,7 +9188,7 @@ Hitbox_Oum_FacingRight_9: dw $0002 ;A2D2C8; dw $FFF1,$FFEF,$000F,$0000 dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D2D2; - dw RTL_A2804C ;A2D2D4; + dw Common_RTL_A0804C ;A2D2D4; dw $FFF1,$0000,$000F,$0010 ;A2D2D6; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D2DE; dw EnemyShot_Oum ;A2D2E0; @@ -9781,10 +9200,10 @@ Hitbox_Oum_FacingRight_A: dw EnemyShot_Oum ;A2D2EE; dw $FFF0,$FFEF,$0000,$0000 ;A2D2F0; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D2F8; - dw RTL_A2804C ;A2D2FA; + dw Common_RTL_A0804C ;A2D2FA; dw $0000,$FFEF,$000E,$0011 ;A2D2FC; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D304; - dw RTL_A2804C ;A2D306; + dw Common_RTL_A0804C ;A2D306; Hitbox_Oum_FacingRight_B: dw $0002 ;A2D308; @@ -9793,7 +9212,7 @@ Hitbox_Oum_FacingRight_B: dw EnemyShot_Oum ;A2D314; dw $0000,$FFEF,$000E,$0010 ;A2D316; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D31E; - dw RTL_A2804C ;A2D320; + dw Common_RTL_A0804C ;A2D320; Hitbox_Oum_FacingRight_C: dw $0003 ;A2D322; @@ -9802,10 +9221,10 @@ Hitbox_Oum_FacingRight_C: dw EnemyShot_Oum ;A2D32E; dw $FFF0,$0000,$0000,$0010 ;A2D330; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D338; - dw RTL_A2804C ;A2D33A; + dw Common_RTL_A0804C ;A2D33A; dw $0000,$FFEF,$000E,$0010 ;A2D33C; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D344; - dw RTL_A2804C ;A2D346; + dw Common_RTL_A0804C ;A2D346; Hitbox_Oum_FacingRight_D: dw $0002 ;A2D348; @@ -9814,19 +9233,19 @@ Hitbox_Oum_FacingRight_D: dw EnemyShot_Oum ;A2D354; dw $FFF0,$0000,$000F,$0010 ;A2D356; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D35E; - dw RTL_A2804C ;A2D360; + dw Common_RTL_A0804C ;A2D360; Hitbox_Oum_FacingRight_E: dw $0003 ;A2D362; dw $FFF1,$FFEF,$0000,$0010 dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D36C; - dw RTL_A2804C ;A2D36E; + dw Common_RTL_A0804C ;A2D36E; dw $0000,$FFEF,$0010,$0000 ;A2D370; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D378; dw EnemyShot_Oum ;A2D37A; dw $0000,$0000,$0010,$0010 ;A2D37C; dw EnemyTouch_Oum_DoesNotHurtSamus ;A2D384; - dw RTL_A2804C ;A2D386; + dw Common_RTL_A0804C ;A2D386; ;;; $D388: Enemy touch - oum - hurts Samus ;;; @@ -9861,7 +9280,7 @@ EnemyTouch_Oum_DoesNotHurtSamus: ;;; $D3B4: Enemy shot - enemy $D37F (oum) ;;; EnemyShot_Oum: - JSL.L NormalEnemyShotAI ;A2D3B4; + JSL.L NormalEnemyShotAI_Internal ;A2D3B4; LDA.W #$0057 ;A2D3B8; JSL.L QueueSound_Lib2_Max6 ;A2D3BB; RTL ;A2D3BF; @@ -10175,25 +9594,25 @@ Palette_Choot: ;;; $D82C: Instruction list - idle ;;; InstList_Choot_Idle: - dw Instruction_Common_DisableOffScreenProcessing ;A2D82C; + dw Common_Instruction_DisableOffScreenProcessing ;A2D82C; dw $0001,Spritemap_Choot_0 ;A2D82E; - dw Instruction_Common_Sleep ;A2D832; + dw Common_Instruction_Sleep ;A2D832; ;;; $D834: Instruction list - jumping ;;; InstList_Choot_Jumping: - dw Instruction_Common_EnableOffScreenProcessing ;A2D834; + dw Common_Instruction_EnableOffScreenProcessing ;A2D834; dw $0008,Spritemap_Choot_1 ;A2D836; dw $0001,Spritemap_Choot_2 ;A2D83A; - dw Instruction_Common_Sleep ;A2D83E; + dw Common_Instruction_Sleep ;A2D83E; ;;; $D840: Instruction list - falling ;;; InstList_Choot_Falling: - dw Instruction_Common_EnableOffScreenProcessing ;A2D840; + dw Common_Instruction_EnableOffScreenProcessing ;A2D840; dw $0008,Spritemap_Choot_1 ;A2D842; dw $0001,Spritemap_Choot_3 ;A2D846; - dw Instruction_Common_Sleep ;A2D84A; + dw Common_Instruction_Sleep ;A2D84A; ;;; $D84C: Falling pattern data ;;; @@ -10441,14 +9860,14 @@ CalculateChootInitialJumpSpeed: TAY ;A2DFFE; LDA.B DP_Temp14 ;A2DFFF; CLC ;A2E001; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing,Y ;A2E002; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing,Y ;A2E002; BCC + ;A2E005; INC.B DP_Temp16 ;A2E007; + STA.B DP_Temp14 ;A2E009; LDA.B DP_Temp16 ;A2E00B; CLC ;A2E00D; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing+2,Y ;A2E00E; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing+2,Y ;A2E00E; STA.B DP_Temp16 ;A2E011; CMP.B DP_Temp12 ;A2E013; BMI .loop ;A2E015; @@ -10519,14 +9938,14 @@ Function_Choot_Jumping: TAY ;A2E077; LDA.W Enemy.YSubPosition,X ;A2E078; CLC ;A2E07B; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing+4,Y ;A2E07C; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing+4,Y ;A2E07C; BCC + ;A2E07F; INC.W Enemy.YPosition,X ;A2E081; + STA.W Enemy.YSubPosition,X ;A2E084; LDA.W Enemy.YPosition,X ;A2E087; CLC ;A2E08A; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing+6,Y ;A2E08B; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing+6,Y ;A2E08B; STA.W Enemy.YPosition,X ;A2E08E; LDA.W Choot.YSpeedTableIndex,X ;A2E091; SEC ;A2E094; @@ -10650,7 +10069,7 @@ InstList_GRipper_MovingLeft: dw $0007,Spritemap_GRipper_Ripper2_MovingLeft_1 ;A2E19F; dw $0008,Spritemap_GRipper_Ripper2_MovingLeft_0 ;A2E1A3; dw $0007,Spritemap_GRipper_Ripper2_MovingLeft_2 ;A2E1A7; - dw Instruction_Common_GotoY ;A2E1AB; + dw Common_Instruction_GotoY ;A2E1AB; dw InstList_GRipper_MovingLeft ;A2E1AD; @@ -10660,7 +10079,7 @@ InstList_GRipper_MovingRight: dw $0007,Spritemap_GRipper_Ripper2_MovingRight_1 ;A2E1B3; dw $0008,Spritemap_GRipper_Ripper2_MovingRight_0 ;A2E1B7; dw $0007,Spritemap_GRipper_Ripper2_MovingRight_2 ;A2E1BB; - dw Instruction_Common_GotoY ;A2E1BF; + dw Common_Instruction_GotoY ;A2E1BF; dw InstList_GRipper_MovingRight ;A2E1C1; @@ -10668,14 +10087,14 @@ if !FEATURE_KEEP_UNREFERENCED ;;; $E1C3: Unused. Instruction list - frozen - facing left ;;; UNUSED_InstList_GRipper_FacingLeft_A2E1C3: dw $0010,Spritemap_GRipper_Ripper2_Frozen_FacingLeft ;A2E1C3; - dw Instruction_Common_GotoY ;A2E1C7; + dw Common_Instruction_GotoY ;A2E1C7; dw UNUSED_InstList_GRipper_FacingLeft_A2E1C3 ;A2E1C9; ;;; $E1CB: Unused. Instruction list - frozen - facing right ;;; UNUSED_InstList_GRipper_FacingRight_A2E1CB: dw $0010,Spritemap_GRipper_Ripper2_Frozen_FacingRight ;A2E1CB; - dw Instruction_Common_GotoY ;A2E1CF; + dw Common_Instruction_GotoY ;A2E1CF; dw UNUSED_InstList_GRipper_FacingRight_A2E1CB ;A2E1D1; endif ; !FEATURE_KEEP_UNREFERENCED @@ -10693,16 +10112,16 @@ InitAI_GRipper: LDA.W Enemy.instList,X ;A2E1E3; BIT.W #$FEFF ;A2E1E6; BEQ .negateSpeed ;A2E1E9; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A2E1EB; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A2E1EB; STA.W Ripper.XVelocity,X ;A2E1EE; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A2E1F1; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A2E1F1; STA.W Ripper.XSubVelocity,X ;A2E1F4; BRA + ;A2E1F7; .negateSpeed: - LDA.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;A2E1F9; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;A2E1F9; STA.W Ripper.XVelocity,X ;A2E1FC; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;A2E1FF; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;A2E1FF; STA.W Ripper.XSubVelocity,X ;A2E202; + LDY.W #InstList_GRipper_MovingLeft ;A2E205; @@ -10741,17 +10160,17 @@ MainAI_GRipper: TAY ;A2E245; LDA.W Ripper.XVelocity,X ;A2E246; BPL .movingLeft ;A2E249; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A2E24B; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A2E24B; STA.W Ripper.XVelocity,X ;A2E24E; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A2E251; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A2E251; STA.W Ripper.XSubVelocity,X ;A2E254; LDY.W #InstList_GRipper_MovingRight ;A2E257; BRA .setInstList ;A2E25A; .movingLeft: - LDA.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;A2E25C; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;A2E25C; STA.W Ripper.XVelocity,X ;A2E25F; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;A2E262; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;A2E262; STA.W Ripper.XSubVelocity,X ;A2E265; LDY.W #InstList_GRipper_MovingLeft ;A2E268; @@ -10812,7 +10231,7 @@ if !FEATURE_KEEP_UNREFERENCED ;;; $E2A4: Unused. Enemy shot ;;; UNUSED_EnemyShot_A2E2A4: ; Clone of EnemyShot_GRipper_Ripper2 - JSL.L NormalEnemyShotAI ;A2E2A4; + JSL.L NormalEnemyShotAI_Internal ;A2E2A4; LDX.W EnemyIndex ;A2E2A8; LDA.W Enemy.freezeTimer,X ;A2E2AB; BEQ .return ;A2E2AE; @@ -10841,7 +10260,7 @@ InstList_Ripper2_MovingRight: dw $0007,Spritemap_GRipper_Ripper2_MovingLeft_1 ;A2E2E4; dw $0008,Spritemap_GRipper_Ripper2_MovingLeft_0 ;A2E2E8; dw $0007,Spritemap_GRipper_Ripper2_MovingLeft_2 ;A2E2EC; - dw Instruction_Common_GotoY ;A2E2F0; + dw Common_Instruction_GotoY ;A2E2F0; dw InstList_Ripper2_MovingRight ;A2E2F2; @@ -10851,7 +10270,7 @@ InstList_Ripper2_MovingLeft: dw $0007,Spritemap_GRipper_Ripper2_MovingRight_1 ;A2E2F8; dw $0008,Spritemap_GRipper_Ripper2_MovingRight_0 ;A2E2FC; dw $0007,Spritemap_GRipper_Ripper2_MovingRight_2 ;A2E300; - dw Instruction_Common_GotoY ;A2E304; + dw Common_Instruction_GotoY ;A2E304; dw InstList_Ripper2_MovingLeft ;A2E306; @@ -10859,14 +10278,14 @@ if !FEATURE_KEEP_UNREFERENCED ;;; $E308: Unused. Instruction list - frozen - facing left ;;; UNUSED_InstList_Ripper2_FacingLeft_A2E308: dw $0010,Spritemap_GRipper_Ripper2_Frozen_FacingLeft ;A2E308; - dw Instruction_Common_GotoY ;A2E30C; + dw Common_Instruction_GotoY ;A2E30C; dw UNUSED_InstList_Ripper2_FacingLeft_A2E308 ;A2E30E; ;;; $E310: Unused. Instruction list - frozen - facing right ;;; UNUSED_InstList_Ripper2_FacingRight_A2E310: dw $0010,Spritemap_GRipper_Ripper2_Frozen_FacingRight ;A2E310; - dw Instruction_Common_GotoY ;A2E314; + dw Common_Instruction_GotoY ;A2E314; dw UNUSED_InstList_Ripper2_FacingRight_A2E310 ;A2E316; endif ; !FEATURE_KEEP_UNREFERENCED @@ -10890,15 +10309,15 @@ InitAI_Ripper2: TAY ;A2E333; LDA.W Enemy.init1,X ;A2E334; BEQ + ;A2E337; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A2E339; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A2E339; STA.W Ripper.XVelocity,X ;A2E33C; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A2E33F; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A2E33F; STA.W Ripper.XSubVelocity,X ;A2E342; RTL ;A2E345; -+ LDA.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;A2E346; ++ LDA.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;A2E346; STA.W Ripper.XVelocity,X ;A2E349; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;A2E34C; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;A2E34C; STA.W Ripper.XSubVelocity,X ;A2E34F; RTL ;A2E352; @@ -10917,17 +10336,17 @@ MainAI_Ripper2: TAY ;A2E36C; LDA.W Ripper.XVelocity,X ;A2E36D; BPL .movingLeft ;A2E370; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A2E372; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A2E372; STA.W Ripper.XVelocity,X ;A2E375; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A2E378; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A2E378; STA.W Ripper.XSubVelocity,X ;A2E37B; LDY.W #InstList_Ripper2_MovingLeft ;A2E37E; BRA + ;A2E381; .movingLeft: - LDA.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;A2E383; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;A2E383; STA.W Ripper.XVelocity,X ;A2E386; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;A2E389; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;A2E389; STA.W Ripper.XSubVelocity,X ;A2E38C; LDY.W #InstList_Ripper2_MovingRight ;A2E38F; @@ -10957,7 +10376,7 @@ RTL_A2E3A8: ;;; $E3A9: Enemy shot - enemy $D3FF/$D43F (gripper / ripper ii) ;;; EnemyShot_GRipper_Ripper2: - JSL.L NormalEnemyShotAI ;A2E3A9; + JSL.L NormalEnemyShotAI_Internal ;A2E3A9; LDX.W EnemyIndex ;A2E3AD; LDA.W Enemy.freezeTimer,X ;A2E3B0; BEQ .return ;A2E3B3; @@ -11038,7 +10457,7 @@ InstList_Ripper_MovingRight: dw $0007,Spritemap_Ripper_MovingRight_1 ;A2E47B; dw $0008,Spritemap_Ripper_MovingRight_0 ;A2E47F; dw $0007,Spritemap_Ripper_MovingRight_2 ;A2E483; - dw Instruction_Common_GotoY ;A2E487; + dw Common_Instruction_GotoY ;A2E487; dw InstList_Ripper_MovingRight ;A2E489; @@ -11048,7 +10467,7 @@ InstList_Ripper_MovingLeft: dw $0007,Spritemap_Ripper_MovingLeft_1 ;A2E48F; dw $0008,Spritemap_Ripper_MovingLeft_0 ;A2E493; dw $0007,Spritemap_Ripper_MovingLeft_2 ;A2E497; - dw Instruction_Common_GotoY ;A2E49B; + dw Common_Instruction_GotoY ;A2E49B; dw InstList_Ripper_MovingLeft ;A2E49D; @@ -11071,15 +10490,15 @@ InitAI_Ripper: TAY ;A2E4BA; LDA.W Enemy.init1,X ;A2E4BB; BEQ + ;A2E4BE; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A2E4C0; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A2E4C0; STA.W Ripper.XVelocity,X ;A2E4C3; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A2E4C6; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A2E4C6; STA.W Ripper.XSubVelocity,X ;A2E4C9; RTL ;A2E4CC; -+ LDA.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;A2E4CD; ++ LDA.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;A2E4CD; STA.W Ripper.XVelocity,X ;A2E4D0; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;A2E4D3; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;A2E4D3; STA.W Ripper.XSubVelocity,X ;A2E4D6; RTL ;A2E4D9; @@ -11098,17 +10517,17 @@ MainAI_Ripper: TAY ;A2E4F3; LDA.W Ripper.XVelocity,X ;A2E4F4; BPL .movingLeft ;A2E4F7; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A2E4F9; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A2E4F9; STA.W Ripper.XVelocity,X ;A2E4FC; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A2E4FF; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A2E4FF; STA.W Ripper.XSubVelocity,X ;A2E502; LDY.W #InstList_Ripper_MovingRight ;A2E505; BRA + ;A2E508; .movingLeft: - LDA.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;A2E50A; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;A2E50A; STA.W Ripper.XVelocity,X ;A2E50D; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;A2E510; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;A2E510; STA.W Ripper.XSubVelocity,X ;A2E513; LDY.W #InstList_Ripper_MovingLeft ;A2E516; @@ -11173,28 +10592,28 @@ Palette_Dragon: ;;; $E59B: Instruction list - idle - facing left ;;; InstList_Dragon_Idle_FacingLeft: dw $0001,Spritemap_Dragon_0 ;A2E59B; - dw Instruction_Common_Sleep ;A2E59F; + dw Common_Instruction_Sleep ;A2E59F; ;;; $E5A1: Instruction list - wings - facing left ;;; InstList_Dragon_Wings_FacingLeft: dw $0005,Spritemap_Dragon_4 ;A2E5A1; dw $0005,Spritemap_Dragon_5 ;A2E5A5; - dw Instruction_Common_GotoY ;A2E5A9; + dw Common_Instruction_GotoY ;A2E5A9; dw InstList_Dragon_Wings_FacingLeft ;A2E5AB; ;;; $E5AD: Instruction list - idle - facing right ;;; InstList_Dragon_Idle_FacingRight: dw $0001,Spritemap_Dragon_6 ;A2E5AD; - dw Instruction_Common_Sleep ;A2E5B1; + dw Common_Instruction_Sleep ;A2E5B1; ;;; $E5B3: Instruction list - wings - facing right ;;; InstList_Dragon_Wings_FacingRight: dw $0005,Spritemap_Dragon_A ;A2E5B3; dw $0005,Spritemap_Dragon_B ;A2E5B7; - dw Instruction_Common_GotoY ;A2E5BB; + dw Common_Instruction_GotoY ;A2E5BB; dw InstList_Dragon_Wings_FacingRight ;A2E5BD; @@ -11206,7 +10625,7 @@ InstList_Dragon_Attacking_FacingLeft: dw $0003,Spritemap_Dragon_2 ;A2E5CB; dw $0001,Spritemap_Dragon_1 ;A2E5CF; dw Instruction_Dragon_SetAnimationFinishedFlag ;A2E5D3; - dw Instruction_Common_Sleep ;A2E5D5; + dw Common_Instruction_Sleep ;A2E5D5; ;;; $E5D7: Instruction list - attacking - facing right ;;; @@ -11217,7 +10636,7 @@ InstList_Dragon_Attacking_FacingRight: dw $0003,Spritemap_Dragon_8 ;A2E5E3; dw $0001,Spritemap_Dragon_7 ;A2E5E7; dw Instruction_Dragon_SetAnimationFinishedFlag ;A2E5EB; - dw Instruction_Common_Sleep ;A2E5ED; + dw Common_Instruction_Sleep ;A2E5ED; ;;; $E5EF: Instruction list pointers ;;; @@ -11619,25 +11038,25 @@ Palette_Shutters: ;;; $E998: Instruction list - shutter - growth level 0 ;;; InstList_Shutter_GrowthLevel0: dw $0001,Spritemap_Shutters_10px ;A2E998; - dw Instruction_Common_Sleep ;A2E99C; + dw Common_Instruction_Sleep ;A2E99C; ;;; $E99E: Instruction list - shutter - growth level 1 ;;; InstList_Shutter_GrowthLevel1: dw $0001,Spritemap_Shutters_20px ;A2E99E; - dw Instruction_Common_Sleep ;A2E9A2; + dw Common_Instruction_Sleep ;A2E9A2; ;;; $E9A4: Instruction list - shutter - growth level 2 ;;; InstList_Shutter_GrowthLevel2: dw $0001,Spritemap_Shutters_30px ;A2E9A4; - dw Instruction_Common_Sleep ;A2E9A8; + dw Common_Instruction_Sleep ;A2E9A8; ;;; $E9AA: Instruction list - shutter - growth level 3 ;;; InstList_Shutter_GrowthLevel3: dw $0001,Spritemap_Shutters_40px ;A2E9AA; - dw Instruction_Common_Sleep ;A2E9AE; + dw Common_Instruction_Sleep ;A2E9AE; if !FEATURE_KEEP_UNREFERENCED @@ -11653,7 +11072,7 @@ UNUSED_InstList_Shutter_ShrinkingLoop_A2E9B0: dw $0004,UNUSED_Spritemap_Shutters_18px_A2ED4B ;A2E9C4; dw $0004,Spritemap_Shutters_10px ;A2E9C8; dw $0004,UNUSED_Spritemap_Shutters_8px_A2ED38 ;A2E9CC; - dw Instruction_Common_GotoY ;A2E9D0; + dw Common_Instruction_GotoY ;A2E9D0; dw UNUSED_InstList_Shutter_ShrinkingLoop_A2E9B0 ;A2E9D2; endif ; !FEATURE_KEEP_UNREFERENCED @@ -11661,7 +11080,7 @@ endif ; !FEATURE_KEEP_UNREFERENCED ;;; $E9D4: Instruction list - horizontal shutter ;;; InstList_ShutterHorizontal: dw $0001,Spritemap_Shutters_Horizontal ;A2E9D4; - dw Instruction_Common_Sleep ;A2E9D8; + dw Common_Instruction_Sleep ;A2E9D8; ;;; $E9DA: Initialisation AI - enemy $D4FF (growing shutter) ;;; @@ -12164,7 +11583,7 @@ InstList_Kamer: dw $000A,Spritemap_Kamer_1 ;A2EDEB; dw $000A,Spritemap_Kamer_2 ;A2EDEF; dw $000A,Spritemap_Kamer_3 ;A2EDF3; - dw Instruction_Common_GotoY ;A2EDF7; + dw Common_Instruction_GotoY ;A2EDF7; dw InstList_Kamer ;A2EDF9; @@ -12204,13 +11623,13 @@ Init_Shutter_Kamer_Common: ASL ;A2EE2A; ASL ;A2EE2B; TAY ;A2EE2C; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A2EE2D; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A2EE2D; STA.W Shutters.downVelocity,X ;A2EE30; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A2EE33; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A2EE33; STA.W Shutters.downSubVelocity,X ;A2EE36; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;A2EE39; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;A2EE39; STA.W Shutters.upVelocity,X ;A2EE3C; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;A2EE3F; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;A2EE3F; STA.W Shutters.upSubVelocity,X ;A2EE42; LDA.W Enemy.instList+1,X ;A2EE45; AND.W #$00FF ;A2EE48; @@ -12535,7 +11954,7 @@ EnemyShot_ShutterShootable_Kamer: ;;; $F0AA: Enemy shot - enemy $B5BF (destroyable shutter) ;;; EnemyTouch_ShutterDestroyable: LDX.W EnemyIndex ;A2F0AA; - JSL.L NormalEnemyShotAI ;A2F0AD; + JSL.L NormalEnemyShotAI_Internal ;A2F0AD; JSL.L PowerBombReaction_ShutterShootable_ShutterDestroyable_Kamer ;A2F0B1; RTL ;A2F0B5; @@ -12610,13 +12029,13 @@ InitializeHorizontalShutter: ASL ;A2F129; ASL ;A2F12A; TAY ;A2F12B; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A2F12C; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A2F12C; STA.W ShutterHorizShootable.rightVelocity,X ;A2F12F; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A2F132; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A2F132; STA.W ShutterHorizShootable.rightSubVelocity,X ;A2F135; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;A2F138; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;A2F138; STA.W ShutterHorizShootable.leftVelocity,X ;A2F13B; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;A2F13E; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;A2F13E; STA.W ShutterHorizShootable.leftSubVelocity,X ;A2F141; LDA.W Enemy.instList+1,X ;A2F144; AND.W #$00FF ;A2F147; diff --git a/src/bank_A3.asm b/src/bank_A3.asm index c3a4e4c..38a0c92 100644 --- a/src/bank_A3.asm +++ b/src/bank_A3.asm @@ -3,591 +3,9 @@ org $A38000 ; Common to all enemy code banks - -;;; $8000: Grapple AI - no interaction. Also unfreezes enemies(!) ;;; -CommonA3_GrappleAI_NoInteraction: -; Used by skultera, Draygon body, fire arc, Phantoon, etecoon, dachora and WS ghost - JSL.L GrappleAI_SwitchEnemyAIToMainAI ;A38000; - RTL ;A38004; - - -;;; $8005: Grapple AI - Samus latches on ;;; -CommonA3_GrappleAI_SamusLatchesOn: -; Used by gripper and Crocomire - JSL.L GrappleAI_SamusLatchesOnWithGrapple ;A38005; - RTL ;A38009; - - -;;; $800A: Grapple AI - kill enemy ;;; -CommonA3_GrappleAI_KillEnemy: -; Common - JSL.L GrappleAI_EnemyGrappleDeath ;A3800A; - RTL ;A3800E; - - -;;; $800F: Grapple AI - cancel grapple beam ;;; -CommonA3_GrappleAI_CancelGrappleBeam: -; Common - JSL.L GrappleAI_SwitchToFrozenAI ;A3800F; - RTL ;A38013; - - -;;; $8014: Grapple AI - Samus latches on - no invincibility ;;; -CommonA3_GrappleAI_SamusLatchesOn_NoInvincibility: -; Used by powamp - JSL.L GrappleAI_SamusLatchesOnWithGrapple_NoInvincibility ;A38014; - RTL ;A38018; - - -;;; $8019: Unused. Grapple AI - Samus latches on - paralyse enemy ;;; -UNUSED_CommonA3_GrappleAI_SamusLatchesOn_ParalyzeEnemy_A38019: - JSL.L GrappleAI_SamusLatchesOnWithGrapple_ParalyzeEnemy ;A38019; - RTL ;A3801D; - - -;;; $801E: Grapple AI - hurt Samus ;;; -CommonA3_GrappleAI_HurtSamus: -; Used by WS spark -; Hurt reaction happens in $9B:B932 - JSL.L GrappleAI_SwitchToFrozenAI_duplicate ;A3801E; - RTL ;A38022; - - -;;; $8023: Normal enemy touch AI ;;; -CommonA3_NormalEnemyTouchAI: - JSL.L NormalEnemyTouchAI ;A38023; - RTL ;A38027; - - -;;; $8028: Normal touch AI - no death check ;;; -CommonA3_NormalTouchAI_NoDeathCheck: - JSL.L NormalEnemyTouchAI_NoDeathCheck_External ;A38028; - RTL ;A3802C; - - -;;; $802D: Normal enemy shot AI ;;; -CommonA3_NormalEnemyShotAI: - JSL.L NormalEnemyShotAI ;A3802D; - RTL ;A38031; - - -;;; $8032: Normal enemy shot AI - no death check, no enemy shot graphic ;;; -CommonA3_NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic: - JSL.L NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic_External ;A38032; - RTL ;A38036; - - -;;; $8037: Normal enemy power bomb AI ;;; -CommonA3_NormalEnemyPowerBombAI: - JSL.L NormalEnemyPowerBombAI ;A38037; - RTL ;A3803B; - - -;;; $803C: Normal enemy power bomb AI - no death check ;;; -CommonA3_NormalEnemyPowerBombAI_NoDeathCheck: -; Kraid's power bomb AI - JSL.L NormalEnemyPowerBombAI_NoDeathCheck_External ;A3803C; - RTL ;A38040; - - -;;; $8041: Normal enemy frozen AI ;;; -CommonA3_NormalEnemyFrozenAI: - JSL.L NormalEnemyFrozenAI ;A38041; - RTL ;A38045; - - -;;; $8046: Creates a dud shot ;;; -CommonA3_CreateADudShot: - JSL.L CreateADudShot ;A38046; - RTL ;A3804A; - - -;;; $804B: RTS ;;; -RTS_A3804B: - RTS ;A3804B; - - -;;; $804C: RTL ;;; -RTL_A3804C: - RTL ;A3804C; - - -;;; $804D: Spritemap - nothing ;;; -Spritemap_CommonA3_Nothing: - dw $0000 ;A3804D; - - -;;; $804F: Extended spritemap - nothing ;;; -ExtendedSpritemap_CommonA3_Nothing: - dw $0001 ;A3804F; - dw $0000,$0000 - dw Spritemap_CommonA3_Nothing ;A38055; - dw Hitbox_CommonA3_Nothing ;A38057; - - -;;; $8059: Hitbox - nothing ;;; -Hitbox_CommonA3_Nothing: -; [n entries] [[left offset] [top offset] [right offset] [bottom offset] [p touch] [p shot]]... - dw $0001 ;A38059; - dw $0000,$0000,$0000,$0000 - dw CommonA3_NormalEnemyTouchAI ;A38063; - dw CommonA3_NormalEnemyShotAI ;A38065; - - -;;; $8067: Instruction list - delete enemy ;;; -InstList_CommonA3_DeleteEnemy: - dw Instruction_CommonA3_DeleteEnemy ;A38067; - - -;;; $8069: Two NOPs ;;; -NOPNOP_A38069: -; Used as palette by respawning enemy placeholder and Draygon's eye o_O - NOP ;A38069; - NOP ;A3806A; - - -;;; $806B: Instruction - Enemy.var5 = [[Y]] ;;; -Instruction_CommonA3_Enemy0FB2_InY: -; Used only by torizos (for enemy movement function) and escape etecoon (for enemy function) - LDA.W $0000,Y ;A3806B; - STA.W Enemy.var5,X ;A3806E; - INY ;A38071; - INY ;A38072; - RTL ;A38073; - - -;;; $8074: Instruction - Enemy.var5 = RTS ;;; -Instruction_CommonA3_SetEnemy0FB2ToRTS: - LDA.W #RTS_A3807B ;A38074; - STA.W Enemy.var5,X ;A38077; - RTL ;A3807A; - - -RTS_A3807B: - RTS ;A3807B; - - -;;; $807C: Instruction - delete enemy ;;; -Instruction_CommonA3_DeleteEnemy: - LDA.W Enemy.properties,X ;A3807C; - ORA.W #$0200 ;A3807F; - STA.W Enemy.properties,X ;A38082; - PLA ;A38085; - PEA.W ProcessEnemyInstructions_return-1 ;A38086; - RTL ;A38089; - - -;;; $808A: Instruction - call function [[Y]] ;;; -Instruction_CommonA3_CallFunctionInY: - LDA.W $0000,Y ;A3808A; - STA.B DP_Temp12 ;A3808D; - PHY ;A3808F; - PHX ;A38090; - PEA.W .manualReturn-1 ;A38091; - JMP.W (DP_Temp12) ;A38094; - - .manualReturn: - PLX ;A38097; - PLY ;A38098; - INY ;A38099; - INY ;A3809A; - RTL ;A3809B; - - -;;; $809C: Instruction - call function [[Y]] with A = [[Y] + 2] ;;; -Instruction_CommonA3_CallFunctionInY_WithA: - LDA.W $0000,Y ;A3809C; - STA.B DP_Temp12 ;A3809F; - LDA.W $0002,Y ;A380A1; - PHY ;A380A4; - PHX ;A380A5; - PEA.W .manualReturn-1 ;A380A6; - JMP.W (DP_Temp12) ;A380A9; - - .manualReturn: - PLX ;A380AC; - PLY ;A380AD; - TYA ;A380AE; - CLC ;A380AF; - ADC.W #$0004 ;A380B0; - TAY ;A380B3; - RTL ;A380B4; - - -if !FEATURE_KEEP_UNREFERENCED -;;; $80B5: Unused. Instruction - call external function [[Y]] ;;; -UNUSED_Instruction_CommonA3_CallExternalFunctionInY_A380B5: - LDA.W $0000,Y ;A380B5; - STA.B DP_Temp12 ;A380B8; - LDA.W $0001,Y ;A380BA; - STA.B DP_Temp13 ;A380BD; - PHX ;A380BF; - PHY ;A380C0; - JSL.L .externalFunction ;A380C1; - PLY ;A380C5; - PLX ;A380C6; - INY ;A380C7; - INY ;A380C8; - INY ;A380C9; - RTL ;A380CA; - - .externalFunction: - JML.W [DP_Temp12] ;A380CB; - - -;;; $80CE: Unused. Instruction - call external function [[Y]] with A = [[Y] + 3] ;;; -UNUSED_Inst_CommonA3_CallExternalFunctionInY_WithA_A380CE: - LDA.W $0000,Y ;A380CE; - STA.B DP_Temp12 ;A380D1; - LDA.W $0001,Y ;A380D3; - STA.B DP_Temp13 ;A380D6; - LDA.W $0003,Y ;A380D8; - PHX ;A380DB; - PHY ;A380DC; - JSL.L .externalFunction ;A380DD; - PLY ;A380E1; - PLX ;A380E2; - TYA ;A380E3; - CLC ;A380E4; - ADC.W #$0005 ;A380E5; - TAY ;A380E8; - RTL ;A380E9; - - .externalFunction: - JML.W [DP_Temp12] ;A380EA; -endif ; !FEATURE_KEEP_UNREFERENCED - - -;;; $80ED: Instruction - go to [[Y]] ;;; -Instruction_CommonA3_GotoY: - LDA.W $0000,Y ;A380ED; - TAY ;A380F0; - RTL ;A380F1; - - -;;; $80F2: Instruction - go to [[Y]] + ±[[Y]] ;;; -Instruction_CommonA3_GotoY_PlusY: - STY.B DP_Temp12 ;A380F2; - DEY ;A380F4; - LDA.W $0000,Y ;A380F5; - XBA ;A380F8; - BMI .highByte ;A380F9; - AND.W #$00FF ;A380FB; - BRA + ;A380FE; - - .highByte: - ORA.W #$FF00 ;A38100; - -+ CLC ;A38103; - ADC.B DP_Temp12 ;A38104; - TAY ;A38106; - RTL ;A38107; - - -;;; $8108: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonA3_DecrementTimer_GotoYIfNonZero: - DEC.W Enemy.loopCounter,X ;A38108; - BNE Instruction_CommonA3_GotoY ;A3810B; - INY ;A3810D; - INY ;A3810E; - RTL ;A3810F; - - -;;; $8110: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonA3_DecrementTimer_GotoYIfNonZero_duplicate: - DEC.W Enemy.loopCounter,X ;A38110; - BNE Instruction_CommonA3_GotoY ;A38113; - INY ;A38115; - INY ;A38116; - RTL ;A38117; - - -;;; $8118: Instruction - decrement timer and go to [Y] + ±[[Y]] if non-zero ;;; -Instruction_CommonA3_DecrementTimer_GotoY_PlusY_IfNonZero: - SEP #$20 ;A38118; - DEC.W Enemy.loopCounter,X ;A3811A; - REP #$20 ;A3811D; - BNE Instruction_CommonA3_GotoY_PlusY ;A3811F; - INY ;A38121; - RTL ;A38122; - - -;;; $8123: Instruction - timer = [[Y]] ;;; -Instruction_CommonA3_TimerInY: - LDA.W $0000,Y ;A38123; - STA.W Enemy.loopCounter,X ;A38126; - INY ;A38129; - INY ;A3812A; - RTL ;A3812B; - - -;;; $812C: Instruction - skip next instruction ;;; -Instruction_CommonA3_SkipNextInstruction: - INY ;A3812C; - INY ;A3812D; - RTL ;A3812E; - - -;;; $812F: Instruction - sleep ;;; -Instruction_CommonA3_Sleep: - DEY ;A3812F; - DEY ;A38130; - TYA ;A38131; - STA.W Enemy.instList,X ;A38132; - PLA ;A38135; - PEA.W ProcessEnemyInstructions_return-1 ;A38136; - RTL ;A38139; - - -;;; $813A: Instruction - wait [[Y]] frames ;;; -Instruction_CommonA3_WaitYFrames: -; Set instruction timer and terminate processing enemy instructions -; Used for running a delay that doesn't update graphics, -; useful for e.g. GT eye beam attack ($AA:D10D), implemented by an instruction list that has no graphical instructions, -; which allows it to be called from multiple different poses - LDA.W $0000,Y ;A3813A; - STA.W Enemy.instTimer,X ;A3813D; - INY ;A38140; - INY ;A38141; - TYA ;A38142; - STA.W Enemy.instList,X ;A38143; - PLA ;A38146; - PEA.W ProcessEnemyInstructions_return-1 ;A38147; - RTL ;A3814A; - - -;;; $814B: Instruction - transfer [[Y]] bytes from [[Y] + 2] to VRAM [[Y] + 5] ;;; -Instruction_CommonA3_TransferYBytesInYToVRAM: - PHX ;A3814B; - LDX.W VRAMWriteStack ;A3814C; - LDA.W $0000,Y ;A3814F; - STA.B VRAMWrite.size,X ;A38152; - LDA.W $0002,Y ;A38154; - STA.B VRAMWrite.src,X ;A38157; - LDA.W $0003,Y ;A38159; - STA.B VRAMWrite.src+1,X ;A3815C; - LDA.W $0005,Y ;A3815E; - STA.B VRAMWrite.dest,X ;A38161; - TXA ;A38163; - CLC ;A38164; - ADC.W #$0007 ;A38165; - STA.W VRAMWriteStack ;A38168; - TYA ;A3816B; - CLC ;A3816C; - ADC.W #$0007 ;A3816D; - TAY ;A38170; - PLX ;A38171; - RTL ;A38172; - - -;;; $8173: Instruction - enable off-screen processing ;;; -Instruction_CommonA3_EnableOffScreenProcessing: - LDA.W Enemy.properties,X ;A38173; - ORA.W #$0800 ;A38176; - STA.W Enemy.properties,X ;A38179; - RTL ;A3817C; - - -;;; $817D: Instruction - disable off-screen processing ;;; -Instruction_CommonA3_DisableOffScreenProcessing: - LDA.W Enemy.properties,X ;A3817D; - AND.W #$F7FF ;A38180; - STA.W Enemy.properties,X ;A38183; - RTL ;A38186; - - -;;; $8187: Common enemy speeds - linearly increasing ;;; -CommonA3EnemySpeeds_LinearlyIncreasing: -; _____________________ Speed -; | _______________ Subspeed -; | | _________ Negated speed -; | | | ___ Negated subspeed -; | | | | - .speed: - dw $0000 ;A38187; - .subspeed: - dw $0000 ;A38189; - .negatedSpeed: - dw $0000 ;A3818B; - .negatedSubspeed: - dw $0000 ;A3818D; - dw $0000,$1000,$FFFF,$F000 - dw $0000,$2000,$FFFF,$E000 - dw $0000,$3000,$FFFF,$D000 - dw $0000,$4000,$FFFF,$C000 - dw $0000,$5000,$FFFF,$B000 - dw $0000,$6000,$FFFF,$A000 - dw $0000,$7000,$FFFF,$9000 - dw $0000,$8000,$FFFF,$8000 - dw $0000,$9000,$FFFF,$7000 - dw $0000,$A000,$FFFF,$6000 - dw $0000,$B000,$FFFF,$5000 - dw $0000,$C000,$FFFF,$4000 - dw $0000,$D000,$FFFF,$3000 - dw $0000,$E000,$FFFF,$2000 - dw $0000,$F000,$FFFF,$1000 - dw $0001,$0000,$FFFF,$0000 - dw $0001,$1000,$FFFE,$F000 - dw $0001,$2000,$FFFE,$E000 - dw $0001,$3000,$FFFE,$D000 - dw $0001,$4000,$FFFE,$C000 - dw $0001,$5000,$FFFE,$B000 - dw $0001,$6000,$FFFE,$A000 - dw $0001,$7000,$FFFE,$9000 - dw $0001,$8000,$FFFE,$8000 - dw $0001,$9000,$FFFE,$7000 - dw $0001,$A000,$FFFE,$6000 - dw $0001,$B000,$FFFE,$5000 - dw $0001,$C000,$FFFE,$4000 - dw $0001,$D000,$FFFE,$3000 - dw $0001,$E000,$FFFE,$2000 - dw $0001,$F000,$FFFE,$1000 - dw $0002,$0000,$FFFE,$0000 - dw $0002,$1000,$FFFD,$F000 - dw $0002,$2000,$FFFD,$E000 - dw $0002,$3000,$FFFD,$D000 - dw $0002,$4000,$FFFD,$C000 - dw $0002,$5000,$FFFD,$B000 - dw $0002,$6000,$FFFD,$A000 - dw $0002,$7000,$FFFD,$9000 - dw $0002,$8000,$FFFD,$8000 - dw $0002,$9000,$FFFD,$7000 - dw $0002,$A000,$FFFD,$6000 - dw $0002,$B000,$FFFD,$5000 - dw $0002,$C000,$FFFD,$4000 - dw $0002,$D000,$FFFD,$3000 - dw $0002,$E000,$FFFD,$2000 - dw $0002,$F000,$FFFD,$1000 - dw $0003,$0000,$FFFD,$0000 - dw $0003,$1000,$FFFC,$F000 - dw $0003,$2000,$FFFC,$E000 - dw $0003,$3000,$FFFC,$D000 - dw $0003,$4000,$FFFC,$C000 - dw $0003,$5000,$FFFC,$B000 - dw $0003,$6000,$FFFC,$A000 - dw $0003,$7000,$FFFC,$9000 - dw $0003,$8000,$FFFC,$8000 - dw $0003,$9000,$FFFC,$7000 - dw $0003,$A000,$FFFC,$6000 - dw $0003,$B000,$FFFC,$5000 - dw $0003,$C000,$FFFC,$4000 - dw $0003,$D000,$FFFC,$3000 - dw $0003,$E000,$FFFC,$2000 - dw $0003,$F000,$FFFC,$1000 - dw $0004,$0000,$FFFC,$0000 - - -;;; $838F: Common enemy speeds - quadratically increasing ;;; -CommonA3EnemySpeeds_QuadraticallyIncreasing: -; I.e. gravity -; Used by e.g. Botwoon when dying and falling to the floor -; _____________________ Subspeed -; | _______________ Speed -; | | _________ Negated subspeed -; | | | ___ Negated speed -; | | | | - .subspeed: - dw $0000 ;A3838F; - .speed: - dw $0000 ;A38391; - .negatedSubspeed: - dw $0000 ;A38393; - .negatedSpeed: - dw $0000 ;A38395; - dw $0109,$0000,$FEF7,$FFFF - dw $031B,$0000,$FCE5,$FFFF - dw $0636,$0000,$F9CA,$FFFF - dw $0A5A,$0000,$F5A6,$FFFF - dw $0F87,$0000,$F079,$FFFF - dw $15BD,$0000,$EA43,$FFFF - dw $1CFC,$0000,$E304,$FFFF - dw $2544,$0000,$DABC,$FFFF - dw $2E95,$0000,$D16B,$FFFF - dw $38EF,$0000,$C711,$FFFF - dw $4452,$0000,$BBAE,$FFFF - dw $50BE,$0000,$AF42,$FFFF - dw $5E33,$0000,$A1CD,$FFFF - dw $6CB1,$0000,$934F,$FFFF - dw $7C38,$0000,$83C8,$FFFF - dw $8CC8,$0000,$7338,$FFFF - dw $9E61,$0000,$619F,$FFFF - dw $B103,$0000,$4EFD,$FFFF - dw $C4AE,$0000,$3B52,$FFFF - dw $D962,$0000,$269E,$FFFF - dw $EF1F,$0000,$10E1,$FFFF - dw $05E5,$0000,$FA1B,$FFFF - dw $14B4,$0001,$EB4C,$FFFE - dw $2D8C,$0001,$D274,$FFFE - dw $476D,$0001,$B893,$FFFE - dw $6257,$0001,$9DA9,$FFFE - dw $7E4A,$0001,$81B6,$FFFE - dw $9B46,$0001,$64BA,$FFFE - dw $B94B,$0001,$46B5,$FFFE - dw $D859,$0001,$27A7,$FFFE - dw $F870,$0001,$0790,$FFFE - dw $1090,$0002,$EF70,$FFFD - dw $32B9,$0002,$CD47,$FFFD - dw $55EB,$0002,$AA15,$FFFD - dw $7A26,$0002,$85DA,$FFFD - dw $9F6A,$0002,$6096,$FFFD - dw $C5B7,$0002,$3A49,$FFFD - dw $ED0D,$0002,$12F3,$FFFD - dw $0C6C,$0003,$F394,$FFFC - dw $35D4,$0003,$CA2C,$FFFC - dw $6045,$0003,$9FBB,$FFFC - dw $8BBF,$0003,$7441,$FFFC - dw $B842,$0003,$47BE,$FFFC - dw $E5CE,$0003,$1A32,$FFFC - dw $0B63,$0004,$F49D,$FFFB - dw $3B01,$0004,$C4FF,$FFFB - dw $6BA8,$0004,$9458,$FFFB - dw $9D58,$0004,$62A8,$FFFB - dw $D011,$0004,$2FEF,$FFFB - dw $03D3,$0004,$FC2D,$FFFB - dw $2F9E,$0005,$D062,$FFFA - dw $6572,$0005,$9A8E,$FFFA - dw $9C4F,$0005,$63B1,$FFFA - dw $D435,$0005,$2BCB,$FFFA - dw $0424,$0006,$FBDC,$FFF9 - dw $3E1C,$0006,$C1E4,$FFF9 - dw $791D,$0006,$86E3,$FFF9 - dw $B527,$0006,$4AD9,$FFF9 - dw $F23A,$0006,$0DC6,$FFF9 - dw $2756,$0007,$D8AA,$FFF8 - dw $667B,$0007,$9985,$FFF8 - dw $A6A9,$0007,$5957,$FFF8 - dw $E7E0,$0007,$1820,$FFF8 - dw $2120,$0008,$DEE0,$FFF7 - dw $6469,$0008,$9B97,$FFF7 - dw $A8BB,$0008,$5745,$FFF7 - dw $EE16,$0008,$11EA,$FFF7 - dw $2B7A,$0009,$D486,$FFF6 - dw $72E7,$0009,$8D19,$FFF6 - dw $BB5D,$0009,$44A3,$FFF6 - dw $04DC,$0009,$FB24,$FFF6 - dw $4664,$000A,$B99C,$FFF5 - dw $91F5,$000A,$6E0B,$FFF5 - dw $DE8F,$000A,$2171,$FFF5 - dw $2332,$000B,$DCCE,$FFF4 - dw $71DE,$000B,$8E22,$FFF4 - dw $C193,$000B,$3E6D,$FFF4 - dw $0951,$000C,$F6AF,$FFF3 - dw $5B18,$000C,$A4E8,$FFF3 - dw $ADE8,$000C,$5218,$FFF3 - dw $01C1,$000C,$FE3F,$FFF3 - dw $4DA3,$000D,$B25D,$FFF2 - dw $A38E,$000D,$5C72,$FFF2 - dw $FA82,$000D,$057E,$FFF2 - dw $497F,$000E,$B681,$FFF1 - dw $A285,$000E,$5D7B,$FFF1 - dw $FC94,$000E,$036C,$FFF1 - dw $4EAC,$000F,$B154,$FFF0 - dw $AACD,$000F,$5533,$FFF0 - dw $07F7,$000F,$F809,$FFF0 - dw $5D2A,$0010,$A2D6,$FFEF - dw $BC66,$0010,$439A,$FFEF - dw $13AB,$0011,$EC55,$FFEE - dw $74F9,$0011,$8B07,$FFEE +namespace CommonA3 +incsrc "common_enemy_functions.asm" +namespace off ;;; $8687: Palette - enemy $D63F (waver) ;;; @@ -599,13 +17,13 @@ Palette_Waver: ;;; $86A7: Instruction list - steady - facing left ;;; InstList_Waver_Steady_FacingLeft: dw $0001,Spritemap_Waver_2 ;A386A7; - dw Instruction_Common_Sleep ;A386AB; + dw Common_Instruction_Sleep ;A386AB; ;;; $86AD: Instruction list - steady - facing right ;;; InstList_Waver_Steady_FacingRight: dw $0001,Spritemap_Waver_7 ;A386AD; - dw Instruction_Common_Sleep ;A386B1; + dw Common_Instruction_Sleep ;A386B1; ;;; $86B3: Instruction list - spinning - facing left ;;; @@ -615,7 +33,7 @@ InstList_Waver_Spinning_FacingLeft: dw $0008,Spritemap_Waver_0 ;A386BB; dw $0008,Spritemap_Waver_1 ;A386BF; dw Instruction_Waver_SetSpinFinishedFlag ;A386C3; - dw Instruction_Common_Sleep ;A386C5; + dw Common_Instruction_Sleep ;A386C5; ;;; $86C7: Instruction list - spinning - facing right ;;; @@ -625,7 +43,7 @@ InstList_Waver_Spinning_FacingRight: dw $0008,Spritemap_Waver_5 ;A386CF; dw $0008,Spritemap_Waver_6 ;A386D3; dw Instruction_Waver_SetSpinFinishedFlag ;A386D7; - dw Instruction_Common_Sleep ;A386D9; + dw Common_Instruction_Sleep ;A386D9; ;;; $86DB: Instruction list pointers ;;; @@ -868,7 +286,7 @@ InstList_Metaree_Idling: dw $000A,Spritemap_Metaree_2 ;A38914; dw $000A,Spritemap_Metaree_3 ;A38918; dw $000A,Spritemap_Metaree_4 ;A3891C; - dw Instruction_Common_GotoY ;A38920; + dw Common_Instruction_GotoY ;A38920; dw InstList_Metaree_Idling ;A38922; @@ -877,27 +295,27 @@ InstList_Metaree_PrepareToLaunchAttack: dw $0010,Spritemap_Metaree_0 ;A38924; dw $0008,Spritemap_Metaree_1 ;A38928; dw Instruction_Metaree_SetAttackReadyFlag ;A3892C; - dw Instruction_Common_Sleep ;A3892E; + dw Common_Instruction_Sleep ;A3892E; ;;; $8930: Instruction list - launched attack ;;; InstList_Metaree_LaunchedAttack_0: - dw Instruction_Common_EnableOffScreenProcessing ;A38930; + dw Common_Instruction_EnableOffScreenProcessing ;A38930; InstList_Metaree_LaunchedAttack_1: dw $0002,Spritemap_Metaree_2 ;A38932; dw $0002,Spritemap_Metaree_3 ;A38936; dw $0002,Spritemap_Metaree_4 ;A3893A; dw $0002,Spritemap_Metaree_0 ;A3893E; - dw Instruction_Common_GotoY ;A38942; + dw Common_Instruction_GotoY ;A38942; dw InstList_Metaree_LaunchedAttack_1 ;A38944; ;;; $8946: Unused. Instruction list - stop animating ;;; UNUSED_InstList_Metaree_StopAnimating_A38946: - dw Instruction_Common_DisableOffScreenProcessing ;A38946; + dw Common_Instruction_DisableOffScreenProcessing ;A38946; dw $0001,Spritemap_Metaree_0 ;A38948; - dw Instruction_Common_Sleep ;A3894C; + dw Common_Instruction_Sleep ;A3894C; ;;; $894E: Metaree instruction list pointers ;;; @@ -1294,7 +712,7 @@ InstList_Fireflea: dw $0001,Spritemap_Fireflea_4 ;A38CF3; dw $0002,Spritemap_Fireflea_5 ;A38CF7; dw $0001,Spritemap_Fireflea_4 ;A38CFB; - dw Instruction_Common_GotoY ;A38CFF; + dw Common_Instruction_GotoY ;A38CFF; dw InstList_Fireflea ;A38D01; @@ -1372,9 +790,9 @@ SetFirefleaSpeed: + TYA ;A38D8A; STA.L Fireflea.speedTableIndex,X ;A38D8B; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A38D8F; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A38D8F; STA.W Fireflea.angleDelta,X ;A38D92; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A38D95; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A38D95; STA.W Fireflea.subAngleDelta,X ;A38D98; RTS ;A38D9B; @@ -1460,10 +878,10 @@ MainAI_Fireflea: TAY ;A38E38; CLC ;A38E39; LDA.W Enemy.YSubPosition,X ;A38E3A; - ADC.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A38E3D; + ADC.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A38E3D; STA.W Enemy.YSubPosition,X ;A38E40; LDA.W Enemy.YPosition,X ;A38E43; - ADC.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A38E46; + ADC.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A38E46; STA.W Enemy.YPosition,X ;A38E49; LDA.W Enemy.YPosition,X ;A38E4C; CMP.L Fireflea.minimumYPosition,X ;A38E4F; @@ -1679,7 +1097,7 @@ InstList_Skultera_SwimmingLeft_1: dw $000E,Spritemap_Skultera_0 ;A3902C; dw $000E,Spritemap_Skultera_1 ;A39030; dw $000E,Spritemap_Skultera_2 ;A39034; - dw Instruction_Common_GotoY ;A39038; + dw Common_Instruction_GotoY ;A39038; dw InstList_Skultera_SwimmingLeft_1 ;A3903A; @@ -1694,7 +1112,7 @@ InstList_Skultera_TurningRight: dw $000A,Spritemap_Skultera_9 ;A39054; dw $000D,Spritemap_Skultera_A ;A39058; dw Instruction_Skultera_SetTurnFinishedFlag ;A3905C; - dw Instruction_Common_Sleep ;A3905E; + dw Common_Instruction_Sleep ;A3905E; ;;; $9060: Instruction list - swimming right ;;; @@ -1705,7 +1123,7 @@ InstList_Skultera_SwimmingRight_1: dw $000E,Spritemap_Skultera_B ;A39062; dw $000E,Spritemap_Skultera_C ;A39066; dw $000E,Spritemap_Skultera_D ;A3906A; - dw Instruction_Common_GotoY ;A3906E; + dw Common_Instruction_GotoY ;A3906E; dw InstList_Skultera_SwimmingRight_1 ;A39070; @@ -1720,7 +1138,7 @@ InstList_Skultera_TurningLeft: dw $000A,Spritemap_Skultera_14 ;A3908A; dw $000D,Spritemap_Skultera_15 ;A3908E; dw Instruction_Skultera_SetTurnFinishedFlag ;A39092; - dw Instruction_Common_Sleep ;A39094; + dw Common_Instruction_Sleep ;A39094; ;;; $9096: Instruction - enemy layer = 6 ;;; @@ -1769,13 +1187,13 @@ InitAI_Skultera: ASL ;A390DF; ASL ;A390E0; TAY ;A390E1; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A390E2; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A390E2; STA.W Skulltera.rightVelocity,X ;A390E5; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A390E8; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A390E8; STA.W Skulltera.rightSubVelocity,X ;A390EB; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;A390EE; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;A390EE; STA.W Skulltera.leftVelocity,X ;A390F1; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;A390F4; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;A390F4; STA.W Skulltera.leftSubVelocity,X ;A390F7; LDA.W Enemy.init1,X ;A390FA; AND.W #$00FF ;A390FD; @@ -2159,7 +1577,7 @@ UNUSED_SpritemapPointers_Skultera: InstList_Elevator: dw $0002,Spritemap_Elevator_0 ;A394D6; dw $0002,Spritemap_Elevator_1 ;A394DA; - dw Instruction_Common_GotoY ;A394DE; + dw Common_Instruction_GotoY ;A394DE; dw InstList_Elevator ;A394E0; @@ -2173,7 +1591,7 @@ ElevatorControllerInputs: ;;; $94E6: Initialisation AI - enemy $D73F (elevator) ;;; InitAI_Elevator: LDX.W EnemyIndex ;A394E6; - LDA.W #Spritemap_Common_Nothing ;A394E9; + LDA.W #Common_Spritemap_Nothing ;A394E9; STA.W Enemy.spritemap,X ;A394EC; LDA.W #$0001 ;A394EF; STA.W Enemy.instTimer,X ;A394F2; @@ -2369,7 +1787,7 @@ InstList_Sciser_UpsideRight_1: dw $0008,Spritemap_Sciser_UpsideRight_1 ;A39683; dw $0008,Spritemap_Sciser_UpsideRight_2 ;A39687; dw $0008,Spritemap_Sciser_UpsideRight_1 ;A3968B; - dw Instruction_Common_GotoY ;A3968F; + dw Common_Instruction_GotoY ;A3968F; dw InstList_Sciser_UpsideRight_1 ;A39691; @@ -2383,7 +1801,7 @@ InstList_Sciser_UpsideLeft_1: dw $0008,Spritemap_Sciser_UpsideLeft_1 ;A3969B; dw $0008,Spritemap_Sciser_UpsideLeft_2 ;A3969F; dw $0008,Spritemap_Sciser_UpsideLeft_1 ;A396A3; - dw Instruction_Common_GotoY ;A396A7; + dw Common_Instruction_GotoY ;A396A7; dw InstList_Sciser_UpsideLeft_1 ;A396A9; @@ -2397,7 +1815,7 @@ InstList_Sciser_UpsideDown_1: dw $0008,Spritemap_Sciser_UpsideDown_1 ;A396B3; dw $0008,Spritemap_Sciser_UpsideDown_2 ;A396B7; dw $0008,Spritemap_Sciser_UpsideDown_1 ;A396BB; - dw Instruction_Common_GotoY ;A396BF; + dw Common_Instruction_GotoY ;A396BF; dw InstList_Sciser_UpsideDown_1 ;A396C1; @@ -2411,7 +1829,7 @@ InstList_Sciser_UpsideUp_1: dw $0008,Spritemap_Sciser_UpsideUp_1 ;A396CB; dw $0008,Spritemap_Sciser_UpsideUp_2 ;A396CF; dw $0008,Spritemap_Sciser_UpsideUp_1 ;A396D3; - dw Instruction_Common_GotoY ;A396D7; + dw Common_Instruction_GotoY ;A396D7; dw InstList_Sciser_UpsideUp_1 ;A396D9; @@ -2560,7 +1978,7 @@ UNUSED_InstList_Zero_UpsideRight_FacingUp_A3982F: dw $0004,Spritemap_Zero_UpsideRight_FacingUp_3 ;A3983B; dw $0004,Spritemap_Zero_UpsideRight_FacingUp_2 ;A3983F; dw $0004,Spritemap_Zero_UpsideRight_FacingUp_1 ;A39843; - dw Instruction_Common_GotoY ;A39847; + dw Common_Instruction_GotoY ;A39847; dw UNUSED_InstList_Zero_UpsideRight_FacingUp_A3982F ;A39849; @@ -2576,7 +1994,7 @@ InstList_Zero_UpsideRight_FacingDown_1: dw $0004,Spritemap_Zero_UpsideRight_FacingDown_3 ;A3985B; dw $0004,Spritemap_Zero_UpsideRight_FacingDown_2 ;A3985F; dw $0004,Spritemap_Zero_UpsideRight_FacingDown_1 ;A39863; - dw Instruction_Common_GotoY ;A39867; + dw Common_Instruction_GotoY ;A39867; dw InstList_Zero_UpsideRight_FacingDown_1 ;A39869; @@ -2592,7 +2010,7 @@ UNUSED_InstList_Zero_UpsideLeft_FacingDown_A3986F: dw $0004,Spritemap_Zero_UpsideLeft_FacingDown_3 ;A3987B; dw $0004,Spritemap_Zero_UpsideLeft_FacingDown_2 ;A3987F; dw $0004,Spritemap_Zero_UpsideLeft_FacingDown_1 ;A39883; - dw Instruction_Common_GotoY ;A39887; + dw Common_Instruction_GotoY ;A39887; dw UNUSED_InstList_Zero_UpsideLeft_FacingDown_A3986F ;A39889; @@ -2608,7 +2026,7 @@ InstList_Zero_UpsideLeft_FacingUp_1: dw $0004,Spritemap_Zero_UpsideLeft_FacingUp_3 ;A3989B; dw $0004,Spritemap_Zero_UpsideLeft_FacingUp_2 ;A3989F; dw $0004,Spritemap_Zero_UpsideLeft_FacingUp_1 ;A398A3; - dw Instruction_Common_GotoY ;A398A7; + dw Common_Instruction_GotoY ;A398A7; dw InstList_Zero_UpsideLeft_FacingUp_1 ;A398A9; @@ -2624,7 +2042,7 @@ InstList_Zero_UpsideDown_FacingLeft_1: dw $0004,Spritemap_Zero_UpsideDown_FacingLeft_3 ;A398BB; dw $0004,Spritemap_Zero_UpsideDown_FacingLeft_2 ;A398BF; dw $0004,Spritemap_Zero_UpsideDown_FacingLeft_1 ;A398C3; - dw Instruction_Common_GotoY ;A398C7; + dw Common_Instruction_GotoY ;A398C7; dw InstList_Zero_UpsideDown_FacingLeft_1 ;A398C9; @@ -2640,7 +2058,7 @@ UNUSED_InstList_Zero_UpsideUp_FacingLeft_A398CF: dw $0004,Spritemap_Zero_UpsideUp_FacingLeft_3 ;A398DB; dw $0004,Spritemap_Zero_UpsideUp_FacingLeft_2 ;A398DF; dw $0004,Spritemap_Zero_UpsideUp_FacingLeft_1 ;A398E3; - dw Instruction_Common_GotoY ;A398E7; + dw Common_Instruction_GotoY ;A398E7; dw UNUSED_InstList_Zero_UpsideUp_FacingLeft_A398CF ;A398E9; @@ -2656,7 +2074,7 @@ UNUSED_InstList_Zero_UpsideDown_FacingRight_A398EF: dw $0004,Spritemap_Zero_UpsideDown_FacingRight_3 ;A398FB; dw $0004,Spritemap_Zero_UpsideDown_FacingRight_2 ;A398FF; dw $0004,Spritemap_Zero_UpsideDown_FacingRight_1 ;A39903; - dw Instruction_Common_GotoY ;A39907; + dw Common_Instruction_GotoY ;A39907; dw UNUSED_InstList_Zero_UpsideDown_FacingRight_A398EF ;A39909; @@ -2672,7 +2090,7 @@ UNUSED_InstList_Zero_UpsideUp_FacingRight_A3990F: dw $0004,Spritemap_Zero_UpsideUp_FacingRight_3 ;A3991B; dw $0004,Spritemap_Zero_UpsideUp_FacingRight_2 ;A3991F; dw $0004,Spritemap_Zero_UpsideUp_FacingRight_1 ;A39923; - dw Instruction_Common_GotoY ;A39927; + dw Common_Instruction_GotoY ;A39927; dw UNUSED_InstList_Zero_UpsideUp_FacingRight_A3990F ;A39929; @@ -2935,7 +2353,7 @@ InstList_Kamer2_VerticallyMoving_Left_1: dw $000A,Spritemap_Kamer2_1 ;A39BC1; dw $000A,Spritemap_Kamer2_2 ;A39BC5; dw $000A,Spritemap_Kamer2_3 ;A39BC9; - dw Instruction_Common_GotoY ;A39BCD; + dw Common_Instruction_GotoY ;A39BCD; dw InstList_Kamer2_VerticallyMoving_Left_1 ;A39BCF; @@ -2948,7 +2366,7 @@ InstList_Kamer2_VerticallyMoving_Right_1: dw $000A,Spritemap_Kamer2_1 ;A39BD7; dw $000A,Spritemap_Kamer2_2 ;A39BDB; dw $000A,Spritemap_Kamer2_3 ;A39BDF; - dw Instruction_Common_GotoY ;A39BE3; + dw Common_Instruction_GotoY ;A39BE3; dw InstList_Kamer2_VerticallyMoving_Right_1 ;A39BE5; @@ -2961,7 +2379,7 @@ InstList_Kamer2_VerticallyStill_Left_1: dw $000A,Spritemap_Kamer2_1 ;A39BED; dw $000A,Spritemap_Kamer2_2 ;A39BF1; dw $000A,Spritemap_Kamer2_3 ;A39BF5; - dw Instruction_Common_GotoY ;A39BF9; + dw Common_Instruction_GotoY ;A39BF9; dw InstList_Kamer2_VerticallyStill_Left_1 ;A39BFB; @@ -2974,7 +2392,7 @@ InstList_Kamer2_VerticallyStill_Right_1: dw $000A,Spritemap_Kamer2_1 ;A39C03; dw $000A,Spritemap_Kamer2_2 ;A39C07; dw $000A,Spritemap_Kamer2_3 ;A39C0B; - dw Instruction_Common_GotoY ;A39C0F; + dw Common_Instruction_GotoY ;A39C0F; dw InstList_Kamer2_VerticallyStill_Right_1 ;A39C11; @@ -2987,7 +2405,7 @@ InstList_Tripper_VerticallyMoving_Left_1: dw $0008,Spritemap_Tripper_VerticallyMoving_Left_1 ;A39C19; dw $0007,Spritemap_Tripper_VerticallyMoving_Left_0 ;A39C1D; dw $0008,Spritemap_Tripper_VerticallyMoving_Left_2 ;A39C21; - dw Instruction_Common_GotoY ;A39C25; + dw Common_Instruction_GotoY ;A39C25; dw InstList_Tripper_VerticallyMoving_Left_1 ;A39C27; @@ -3000,7 +2418,7 @@ InstList_Tripper_VerticallyMoving_Right_1: dw $0008,Spritemap_Tripper_VerticallyMoving_Right_1 ;A39C2F; dw $0007,Spritemap_Tripper_VerticallyMoving_Right_0 ;A39C33; dw $0008,Spritemap_Tripper_VerticallyMoving_Right_2 ;A39C37; - dw Instruction_Common_GotoY ;A39C3B; + dw Common_Instruction_GotoY ;A39C3B; dw InstList_Tripper_VerticallyMoving_Right_1 ;A39C3D; @@ -3013,7 +2431,7 @@ InstList_Tripper_VerticallyStill_Right_1: dw $0008,Spritemap_Tripper_VerticallyStill_Right_1 ;A39C45; dw $0007,Spritemap_Tripper_VerticallyStill_Right_0 ;A39C49; dw $0008,Spritemap_Tripper_VerticallyStill_Right_2 ;A39C4D; - dw Instruction_Common_GotoY ;A39C51; + dw Common_Instruction_GotoY ;A39C51; dw InstList_Tripper_VerticallyStill_Right_1 ;A39C53; @@ -3026,7 +2444,7 @@ InstList_Tripper_VerticallyStill_Left_1: dw $0008,Spritemap_Tripper_VerticallyStill_Left_1 ;A39C5B; dw $0007,Spritemap_Tripper_VerticallyStill_Left_0 ;A39C5F; dw $0008,Spritemap_Tripper_VerticallyStill_Left_2 ;A39C63; - dw Instruction_Common_GotoY ;A39C67; + dw Common_Instruction_GotoY ;A39C67; dw InstList_Tripper_VerticallyStill_Left_1 ;A39C69; @@ -3110,13 +2528,13 @@ InitAI_Tripper_Kamer2_Common: ASL ;A39CD7; ASL ;A39CD8; TAY ;A39CD9; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A39CDA; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A39CDA; STA.W Platform.rightVelocity,X ;A39CDD; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A39CE0; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A39CE0; STA.W Platform.rightSubVelocity,X ;A39CE3; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;A39CE6; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;A39CE6; STA.W Platform.leftVelocity,X ;A39CE9; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;A39CEC; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;A39CEC; STA.W Platform.leftSubVelocity,X ;A39CEF; LDA.W #$0000 ;A39CF2; STA.L Platform.YMovementFunctionIndex,X ;A39CF5; @@ -3221,9 +2639,9 @@ Function_Tripper_Kamer2_YMovement_Rising: ASL ;A39DCA; ASL ;A39DCB; TAY ;A39DCC; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+4,Y ;A39DCD; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+4,Y ;A39DCD; STA.B DP_Temp12 ;A39DD0; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+6,Y ;A39DD2; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+6,Y ;A39DD2; STA.B DP_Temp14 ;A39DD5; JSL.L MoveEnemyDownBy_14_12 ;A39DD7; BCC .return ;A39DDB; @@ -3262,9 +2680,9 @@ Function_Tripper_Kamer2_YMovement_1_Sinking: ASL ;A39E1D; ASL ;A39E1E; TAY ;A39E1F; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing,Y ;A39E20; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing,Y ;A39E20; STA.B DP_Temp12 ;A39E23; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+2,Y ;A39E25; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+2,Y ;A39E25; STA.B DP_Temp14 ;A39E28; JSL.L MoveEnemyDownBy_14_12 ;A39E2A; BCC .notCollidedWithBlock ;A39E2E; @@ -3542,7 +2960,7 @@ InstList_Sbug_FacingUp: dw $0005,Spritemap_Sbug_FacingUp_1 ;A3A075; dw $0005,Spritemap_Sbug_FacingUp_0 ;A3A079; dw $0005,Spritemap_Sbug_FacingUp_2 ;A3A07D; - dw Instruction_Common_GotoY ;A3A081; + dw Common_Instruction_GotoY ;A3A081; dw InstList_Sbug_FacingUp ;A3A083; @@ -3552,7 +2970,7 @@ InstList_Sbug_FacingUpLeft: dw $0005,Spritemap_Sbug_FacingUpLeft_1 ;A3A089; dw $0005,Spritemap_Sbug_FacingUpLeft_0 ;A3A08D; dw $0005,Spritemap_Sbug_FacingUpLeft_2 ;A3A091; - dw Instruction_Common_GotoY ;A3A095; + dw Common_Instruction_GotoY ;A3A095; dw InstList_Sbug_FacingUpLeft ;A3A097; @@ -3562,7 +2980,7 @@ InstList_Sbug_FacingLeft: dw $0005,Spritemap_Sbug_FacingLeft_1 ;A3A09D; dw $0005,Spritemap_Sbug_FacingLeft_0 ;A3A0A1; dw $0005,Spritemap_Sbug_FacingLeft_2 ;A3A0A5; - dw Instruction_Common_GotoY ;A3A0A9; + dw Common_Instruction_GotoY ;A3A0A9; dw InstList_Sbug_FacingLeft ;A3A0AB; @@ -3572,7 +2990,7 @@ InstList_Sbug_FacingDownLeft: dw $0005,Spritemap_Sbug_FacingDownLeft_1 ;A3A0B1; dw $0005,Spritemap_Sbug_FacingDownLeft_0 ;A3A0B5; dw $0005,Spritemap_Sbug_FacingDownLeft_2 ;A3A0B9; - dw Instruction_Common_GotoY ;A3A0BD; + dw Common_Instruction_GotoY ;A3A0BD; dw InstList_Sbug_FacingDownLeft ;A3A0BF; @@ -3582,7 +3000,7 @@ InstList_Sbug_FacingDown: dw $0005,Spritemap_Sbug_FacingDown_1 ;A3A0C5; dw $0005,Spritemap_Sbug_FacingDown_0 ;A3A0C9; dw $0005,Spritemap_Sbug_FacingDown_2 ;A3A0CD; - dw Instruction_Common_GotoY ;A3A0D1; + dw Common_Instruction_GotoY ;A3A0D1; dw InstList_Sbug_FacingDown ;A3A0D3; @@ -3592,7 +3010,7 @@ InstList_Sbug_FacingDownRight: dw $0005,Spritemap_Sbug_FacingDownRight_1 ;A3A0D9; dw $0005,Spritemap_Sbug_FacingDownRight_0 ;A3A0DD; dw $0005,Spritemap_Sbug_FacingDownRight_2 ;A3A0E1; - dw Instruction_Common_GotoY ;A3A0E5; + dw Common_Instruction_GotoY ;A3A0E5; dw InstList_Sbug_FacingDownRight ;A3A0E7; @@ -3602,7 +3020,7 @@ InstList_Sbug_FacingRight: dw $0005,Spritemap_Sbug_FacingRight_1 ;A3A0ED; dw $0005,Spritemap_Sbug_FacingRight_0 ;A3A0F1; dw $0005,Spritemap_Sbug_FacingRight_2 ;A3A0F5; - dw Instruction_Common_GotoY ;A3A0F9; + dw Common_Instruction_GotoY ;A3A0F9; dw InstList_Sbug_FacingRight ;A3A0FB; @@ -3612,7 +3030,7 @@ InstList_Sbug_FacingUpRight: dw $0005,Spritemap_Sbug_FacingUpRight_1 ;A3A101; dw $0005,Spritemap_Sbug_FacingUpRight_0 ;A3A105; dw $0005,Spritemap_Sbug_FacingUpRight_2 ;A3A109; - dw Instruction_Common_GotoY ;A3A10D; + dw Common_Instruction_GotoY ;A3A10D; dw InstList_Sbug_FacingUpRight ;A3A10F; @@ -4448,7 +3866,7 @@ InstList_Mochtroid_NotTouchingSamus: dw $000E,Spritemap_Mochtroid_NotTouchingSamus_1 ;A3A749; dw $000E,Spritemap_Mochtroid_NotTouchingSamus_2 ;A3A74D; dw $000E,Spritemap_Mochtroid_NotTouchingSamus_1 ;A3A751; - dw Instruction_Common_GotoY ;A3A755; + dw Common_Instruction_GotoY ;A3A755; dw InstList_Mochtroid_NotTouchingSamus ;A3A757; @@ -4458,7 +3876,7 @@ InstList_Mochtroid_TouchingSamus: dw $0005,Spritemap_Mochtroid_TouchingSamus_1 ;A3A75D; dw $0005,Spritemap_Mochtroid_TouchingSamus_2 ;A3A761; dw $0005,Spritemap_Mochtroid_TouchingSamus_1 ;A3A765; - dw Instruction_Common_GotoY ;A3A769; + dw Common_Instruction_GotoY ;A3A769; dw InstList_Mochtroid_TouchingSamus ;A3A76B; @@ -4844,42 +4262,42 @@ Instruction_Sidehopper_QueueSoundInY_Lib2_Max3: ;;; $AA76: Instruction list - sidehopper - hopping - upside up ;;; InstList_Sidehopper_Hopping_UpsideUp: - dw Instruction_Common_EnableOffScreenProcessing ;A3AA76; + dw Common_Instruction_EnableOffScreenProcessing ;A3AA76; dw Instruction_Sidehopper_QueueSoundInY_Lib2_Max3,$005D ;A3AA78; dw $0001,Spritemap_Sidehopper_2 ;A3AA7A; - dw Instruction_Common_Sleep ;A3AA80; + dw Common_Instruction_Sleep ;A3AA80; ;;; $AA82: Instruction list - sidehopper - landed - upside up ;;; InstList_Sidehopper_Landed_UpsideUp: - dw Instruction_Common_DisableOffScreenProcessing ;A3AA82; + dw Common_Instruction_DisableOffScreenProcessing ;A3AA82; dw Instruction_Sidehopper_QueueSoundInY_Lib2_Max3,$005E ;A3AA84; dw $0002,Spritemap_Sidehopper_0 ;A3AA86; dw $0005,Spritemap_Sidehopper_1 ;A3AA8C; dw $0002,Spritemap_Sidehopper_0 ;A3AA90; dw $0003,Spritemap_Sidehopper_1 ;A3AA94; dw Instruction_Hopper_ReadyToHop ;A3AA98; - dw Instruction_Common_Sleep ;A3AA9A; + dw Common_Instruction_Sleep ;A3AA9A; ;;; $AA9C: Instruction list - sidehopper - hopping - upside down ;;; InstList_Sidehopper_Hopping_UpsideDown: - dw Instruction_Common_EnableOffScreenProcessing ;A3AA9C; + dw Common_Instruction_EnableOffScreenProcessing ;A3AA9C; dw Instruction_Sidehopper_QueueSoundInY_Lib2_Max3,$005D ;A3AA9E; dw $0001,Spritemap_Sidehopper_5 ;A3AAA0; - dw Instruction_Common_Sleep ;A3AAA6; + dw Common_Instruction_Sleep ;A3AAA6; ;;; $AAA8: Instruction list - sidehopper - landed - upside down ;;; InstList_Sidehopper_Landed_UpsideDown: - dw Instruction_Common_DisableOffScreenProcessing ;A3AAA8; + dw Common_Instruction_DisableOffScreenProcessing ;A3AAA8; dw Instruction_Sidehopper_QueueSoundInY_Lib2_Max3,$005E ;A3AAAA; dw $0002,Spritemap_Sidehopper_3 ;A3AAAC; dw $0005,Spritemap_Sidehopper_4 ;A3AAB2; dw $0002,Spritemap_Sidehopper_3 ;A3AAB6; dw $0003,Spritemap_Sidehopper_4 ;A3AABA; dw Instruction_Hopper_ReadyToHop ;A3AABE; - dw Instruction_Common_Sleep ;A3AAC0; + dw Common_Instruction_Sleep ;A3AAC0; ;;; $AAC2: Sidehopper data ;;; @@ -5026,7 +4444,7 @@ Hoppers_CalculateInitialHopSpeed: TAY ;A3ABAB; LDA.B DP_Temp14 ;A3ABAC; CLC ;A3ABAE; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing+1,Y ;A3ABAF; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing+1,Y ;A3ABAF; STA.B DP_Temp14 ;A3ABB2; CMP.B DP_Temp16 ;A3ABB4; BMI .loop ;A3ABB6; @@ -5300,9 +4718,9 @@ HopperMovement_Jumping_UpsideUp: ASL ;A3AD74; ASL ;A3AD75; TAY ;A3AD76; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+6,Y ;A3AD77; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+6,Y ;A3AD77; STA.B DP_Temp14 ;A3AD7A; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+4,Y ;A3AD7C; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+4,Y ;A3AD7C; STA.B DP_Temp12 ;A3AD7F; JSL.L MoveEnemyDownBy_14_12 ;A3AD81; BCC .notCollidedWithBlock ;A3AD85; @@ -5351,9 +4769,9 @@ HopperMovement_Falling_UpsideUp: ASL ;A3ADDB; ASL ;A3ADDC; TAY ;A3ADDD; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+2,Y ;A3ADDE; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+2,Y ;A3ADDE; STA.B DP_Temp14 ;A3ADE1; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing,Y ;A3ADE3; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing,Y ;A3ADE3; STA.B DP_Temp12 ;A3ADE6; JSL.L MoveEnemyDownBy_14_12 ;A3ADE8; BCC .notCollidedWithBlock ;A3ADEC; @@ -5396,9 +4814,9 @@ HopperMovement_Jumping_UpsideDown: ASL ;A3AE2E; ASL ;A3AE2F; TAY ;A3AE30; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+2,Y ;A3AE31; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+2,Y ;A3AE31; STA.B DP_Temp14 ;A3AE34; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing,Y ;A3AE36; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing,Y ;A3AE36; STA.B DP_Temp12 ;A3AE39; JSL.L MoveEnemyDownBy_14_12 ;A3AE3B; BCC .notCollidedWithBlock ;A3AE3F; @@ -5447,9 +4865,9 @@ HopperMovement_Falling_UpsideDown: ASL ;A3AE95; ASL ;A3AE96; TAY ;A3AE97; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+6,Y ;A3AE98; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+6,Y ;A3AE98; STA.B DP_Temp14 ;A3AE9B; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+4,Y ;A3AE9D; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+4,Y ;A3AE9D; STA.B DP_Temp12 ;A3AEA0; JSL.L MoveEnemyDownBy_14_12 ;A3AEA2; BCC .notCollidedWithBlock ;A3AEA6; @@ -5552,38 +4970,38 @@ Palette_Dessgeega: ;;; $AFA5: Instruction list - desgeega - hopping - upside up ;;; InstList_Dessgeega_Hopping_UpsideUp: - dw Instruction_Common_EnableOffScreenProcessing ;A3AFA5; + dw Common_Instruction_EnableOffScreenProcessing ;A3AFA5; dw $0001,Spritemap_Dessgeega_2 ;A3AFA7; - dw Instruction_Common_Sleep ;A3AFAB; + dw Common_Instruction_Sleep ;A3AFAB; ;;; $AFAD: Instruction list - desgeega - landed - upside up ;;; InstList_Dessgeega_Landed_UpsideUp: - dw Instruction_Common_DisableOffScreenProcessing ;A3AFAD; + dw Common_Instruction_DisableOffScreenProcessing ;A3AFAD; dw $0002,Spritemap_Dessgeega_0 ;A3AFAF; dw $0005,Spritemap_Dessgeega_1 ;A3AFB3; dw $0002,Spritemap_Dessgeega_0 ;A3AFB7; dw $0003,Spritemap_Dessgeega_1 ;A3AFBB; dw Instruction_Hopper_ReadyToHop ;A3AFBF; - dw Instruction_Common_Sleep ;A3AFC1; + dw Common_Instruction_Sleep ;A3AFC1; ;;; $AFC3: Instruction list - desgeega - hopping - upside down ;;; InstList_Dessgeega_Hopping_UpsideDown: - dw Instruction_Common_EnableOffScreenProcessing ;A3AFC3; + dw Common_Instruction_EnableOffScreenProcessing ;A3AFC3; dw $0001,Spritemap_Dessgeega_5 ;A3AFC5; - dw Instruction_Common_Sleep ;A3AFC9; + dw Common_Instruction_Sleep ;A3AFC9; ;;; $AFCB: Instruction list - desgeega - landed - upside down ;;; InstList_Dessgeega_Landed_UpsideDown: - dw Instruction_Common_DisableOffScreenProcessing ;A3AFCB; + dw Common_Instruction_DisableOffScreenProcessing ;A3AFCB; dw $0002,Spritemap_Dessgeega_3 ;A3AFCD; dw $0005,Spritemap_Dessgeega_4 ;A3AFD1; dw $0002,Spritemap_Dessgeega_3 ;A3AFD5; dw $0003,Spritemap_Dessgeega_4 ;A3AFD9; dw Instruction_Hopper_ReadyToHop ;A3AFDD; - dw Instruction_Common_Sleep ;A3AFDF; + dw Common_Instruction_Sleep ;A3AFDF; ;;; $AFE1: RTL ;;; @@ -5660,42 +5078,42 @@ Palette_SidehopperTourian: ;;; $B0C5: Instruction list - super-sidehopper - hopping - upside up ;;; InstList_SidehopperLarge_Hopping_UpsideUp: - dw Instruction_Common_EnableOffScreenProcessing ;A3B0C5; + dw Common_Instruction_EnableOffScreenProcessing ;A3B0C5; dw Instruction_Sidehopper_QueueSoundInY_Lib2_Max3,$005D ;A3B0C7; dw $0001,Spritemap_SidehopperTourian_2 ;A3B0C9; - dw Instruction_Common_Sleep ;A3B0CF; + dw Common_Instruction_Sleep ;A3B0CF; ;;; $B0D1: Instruction list - super-sidehopper - landed - upside up ;;; InstList_SidehopperLarge_Landed_UpsideUp: - dw Instruction_Common_DisableOffScreenProcessing ;A3B0D1; + dw Common_Instruction_DisableOffScreenProcessing ;A3B0D1; dw Instruction_Sidehopper_QueueSoundInY_Lib2_Max3,$005E ;A3B0D3; dw $0002,Spritemap_SidehopperTourian_0 ;A3B0D5; dw $0005,Spritemap_SidehopperTourian_1 ;A3B0DB; dw $0002,Spritemap_SidehopperTourian_0 ;A3B0DF; dw $0003,Spritemap_SidehopperTourian_1 ;A3B0E3; dw Instruction_Hopper_ReadyToHop ;A3B0E7; - dw Instruction_Common_Sleep ;A3B0E9; + dw Common_Instruction_Sleep ;A3B0E9; ;;; $B0EB: Instruction list - super-sidehopper - hopping - upside down ;;; InstList_SidehopperLarge_Hopping_UpsideDown: - dw Instruction_Common_EnableOffScreenProcessing ;A3B0EB; + dw Common_Instruction_EnableOffScreenProcessing ;A3B0EB; dw Instruction_Sidehopper_QueueSoundInY_Lib2_Max3,$005D ;A3B0ED; dw $0001,Spritemap_SidehopperTourian_5 ;A3B0EF; - dw Instruction_Common_Sleep ;A3B0F5; + dw Common_Instruction_Sleep ;A3B0F5; ;;; $B0F7: Instruction list - super-sidehopper - landed - upside down ;;; InstList_SidehopperLarge_Landed_UpsideDown: - dw Instruction_Common_DisableOffScreenProcessing ;A3B0F7; + dw Common_Instruction_DisableOffScreenProcessing ;A3B0F7; dw Instruction_Sidehopper_QueueSoundInY_Lib2_Max3,$005E ;A3B0F9; dw $0002,Spritemap_SidehopperTourian_3 ;A3B0FB; dw $0005,Spritemap_SidehopperTourian_4 ;A3B101; dw $0002,Spritemap_SidehopperTourian_3 ;A3B105; dw $0003,Spritemap_SidehopperTourian_4 ;A3B109; dw Instruction_Hopper_ReadyToHop ;A3B10D; - dw Instruction_Common_Sleep ;A3B10F; + dw Common_Instruction_Sleep ;A3B10F; ;;; $B111: Tourian super-sidehopper spritemaps ;;; @@ -5776,38 +5194,38 @@ Palette_DessgeegaLarge: ;;; $B237: Instruction list - super-desgeega - hopping - upside up ;;; InstList_DessgeegaLarge_Hopping_UpsideUp: - dw Instruction_Common_EnableOffScreenProcessing ;A3B237; + dw Common_Instruction_EnableOffScreenProcessing ;A3B237; dw $0001,Spritemap_DessgeegaLarge_2 ;A3B239; - dw Instruction_Common_Sleep ;A3B23D; + dw Common_Instruction_Sleep ;A3B23D; ;;; $B23F: Instruction list - super-desgeega - landed - upside up ;;; InstList_DessgeegaLarge_Landed_UpsideUp: - dw Instruction_Common_DisableOffScreenProcessing ;A3B23F; + dw Common_Instruction_DisableOffScreenProcessing ;A3B23F; dw $0002,Spritemap_DessgeegaLarge_0 ;A3B241; dw $0005,Spritemap_DessgeegaLarge_1 ;A3B245; dw $0002,Spritemap_DessgeegaLarge_0 ;A3B249; dw $0003,Spritemap_DessgeegaLarge_1 ;A3B24D; dw Instruction_Hopper_ReadyToHop ;A3B251; - dw Instruction_Common_Sleep ;A3B253; + dw Common_Instruction_Sleep ;A3B253; ;;; $B255: Instruction list - super-desgeega - hopping - upside down ;;; InstList_DessgeegaLarge_Hopping_UpsideDown: - dw Instruction_Common_EnableOffScreenProcessing ;A3B255; + dw Common_Instruction_EnableOffScreenProcessing ;A3B255; dw $0001,Spritemap_DessgeegaLarge_5 ;A3B257; - dw Instruction_Common_Sleep ;A3B25B; + dw Common_Instruction_Sleep ;A3B25B; ;;; $B25D: Instruction list - super-desgeega - landed - upside down ;;; InstList_DessgeegaLarge_Landed_UpsideDown: - dw Instruction_Common_DisableOffScreenProcessing ;A3B25D; + dw Common_Instruction_DisableOffScreenProcessing ;A3B25D; dw $0002,Spritemap_DessgeegaLarge_3 ;A3B25F; dw $0005,Spritemap_DessgeegaLarge_4 ;A3B263; dw $0002,Spritemap_DessgeegaLarge_3 ;A3B267; dw $0003,Spritemap_DessgeegaLarge_4 ;A3B26B; dw Instruction_Hopper_ReadyToHop ;A3B26F; - dw Instruction_Common_Sleep ;A3B271; + dw Common_Instruction_Sleep ;A3B271; ;;; $B273: Super-desgeega spritemaps ;;; @@ -5902,7 +5320,7 @@ InstList_Zoa_FacingLeft_Shooting: dw $0008,Spritemap_Zoa_1 ;A3B3C9; dw Instruction_Zoa_SetXSpeedTableIndexToC ;A3B3CD; dw $0030,Spritemap_Zoa_2 ;A3B3CF; - dw Instruction_Common_GotoY ;A3B3D3; + dw Common_Instruction_GotoY ;A3B3D3; dw InstList_Zoa_FacingLeft_Shooting ;A3B3D5; @@ -5911,7 +5329,7 @@ InstList_Zoa_FacingLeft_Rising: dw $0004,Spritemap_Zoa_4 ;A3B3D7; dw $0004,Spritemap_Zoa_3 ;A3B3DB; dw $0004,Spritemap_Zoa_5 ;A3B3DF; - dw Instruction_Common_GotoY ;A3B3E3; + dw Common_Instruction_GotoY ;A3B3E3; dw InstList_Zoa_FacingLeft_Rising ;A3B3E5; @@ -5923,7 +5341,7 @@ InstList_Zoa_FacingRight_Shooting: dw $0008,Spritemap_Zoa_7 ;A3B3EF; dw Instruction_Zoa_SetXSpeedTableIndexToC ;A3B3F3; dw $0030,Spritemap_Zoa_8 ;A3B3F5; - dw Instruction_Common_GotoY ;A3B3F9; + dw Common_Instruction_GotoY ;A3B3F9; dw InstList_Zoa_FacingRight_Shooting ;A3B3FB; @@ -5932,7 +5350,7 @@ InstList_Zoa_FacingRight_Rising: dw $0004,Spritemap_Zoa_A ;A3B3FD; dw $0004,Spritemap_Zoa_9 ;A3B401; dw $0004,Spritemap_Zoa_B ;A3B405; - dw Instruction_Common_GotoY ;A3B409; + dw Common_Instruction_GotoY ;A3B409; dw InstList_Zoa_FacingRight_Rising ;A3B40B; @@ -6193,7 +5611,7 @@ Palette_Viola: InstList_Viola_UpsideDown: dw Instruction_Crawlers_FunctionInY ;A3B5D3; dw Function_Crawlers_CrawlingHorizontally ;A3B5D5; - dw Instruction_Common_GotoY ;A3B5D7; + dw Common_Instruction_GotoY ;A3B5D7; dw InstList_Viola_Normal ;A3B5D9; @@ -6201,7 +5619,7 @@ InstList_Viola_UpsideDown: InstList_Viola_UpsideUp: dw Instruction_Crawlers_FunctionInY ;A3B5DB; dw Function_Crawlers_CrawlingHorizontally ;A3B5DD; - dw Instruction_Common_GotoY ;A3B5DF; + dw Common_Instruction_GotoY ;A3B5DF; dw InstList_Viola_Normal ;A3B5E1; @@ -6209,7 +5627,7 @@ InstList_Viola_UpsideUp: InstList_Viola_UpsideRight: dw Instruction_Crawlers_FunctionInY ;A3B5E3; dw Function_Crawlers_CrawlingVertically ;A3B5E5; - dw Instruction_Common_GotoY ;A3B5E7; + dw Common_Instruction_GotoY ;A3B5E7; dw InstList_Viola_Normal ;A3B5E9; @@ -6235,7 +5653,7 @@ InstList_Viola_Normal: dw $000A,Spritemap_Viola_Normal_3 ;A3B61B; dw $000A,Spritemap_Viola_Normal_2 ;A3B61F; dw $000A,Spritemap_Viola_Normal_1 ;A3B623; - dw Instruction_Common_GotoY ;A3B627; + dw Common_Instruction_GotoY ;A3B627; dw InstList_Viola_Normal ;A3B629; @@ -6256,7 +5674,7 @@ UNUSED_InstList_Viola_XFlipped_A3B62B: dw $0006,UNUSED_Spritemap_Viola_XFlipped_A3B6D6 ;A3B657; dw $0006,UNUSED_Spritemap_Viola_XFlipped_A3B6CF ;A3B65B; dw $0006,UNUSED_Spritemap_Viola_XFlipped_A3B6C8 ;A3B65F; - dw Instruction_Common_GotoY ;A3B663; + dw Common_Instruction_GotoY ;A3B663; dw UNUSED_InstList_Viola_XFlipped_A3B62B ;A3B665; endif ; !FEATURE_KEEP_UNREFERENCED @@ -6411,7 +5829,7 @@ InstList_Bang_Core_Growth0_Idling: dw $000D,Spritemap_Bang_Growth0_Idling_2 ;A3B762; dw $0010,Spritemap_Bang_Growth0_Idling_4 ;A3B766; dw $000D,Spritemap_Bang_Growth0_Idling_2 ;A3B76A; - dw Instruction_Common_GotoY ;A3B76E; + dw Common_Instruction_GotoY ;A3B76E; dw InstList_Bang_Core_Growth0_Idling ;A3B770; @@ -6425,7 +5843,7 @@ InstList_Bang_Core_Growth0_Growing: dw $0004,Spritemap_Bang_Growth0_Growing_4 ;A3B784; dw $0010,Spritemap_Bang_Growth0_Growing_6 ;A3B788; dw Instruction_Bang_SetFinishedGrowingFlagTo1 ;A3B78C; - dw Instruction_Common_Sleep ;A3B78E; + dw Common_Instruction_Sleep ;A3B78E; ;;; $B790: Instruction list - core - growth level 1 - idling ;;; @@ -6434,7 +5852,7 @@ InstList_Bang_Core_Growth1_Idling: dw $0008,Spritemap_Bang_Growth1_Idling_2 ;A3B794; dw $000D,Spritemap_Bang_Growth1_Idling_4 ;A3B798; dw $0008,Spritemap_Bang_Growth1_Idling_2 ;A3B79C; - dw Instruction_Common_GotoY ;A3B7A0; + dw Common_Instruction_GotoY ;A3B7A0; dw InstList_Bang_Core_Growth1_Idling ;A3B7A2; @@ -6448,7 +5866,7 @@ InstList_Bang_Core_Growth1_Growing: dw $0004,Spritemap_Bang_Growth1_Growing_4 ;A3B7B6; dw $0010,Spritemap_Bang_Growth1_Growing_6 ;A3B7BA; dw Instruction_Bang_SetFinishedGrowingFlagTo1 ;A3B7BE; - dw Instruction_Common_Sleep ;A3B7C0; + dw Common_Instruction_Sleep ;A3B7C0; ;;; $B7C2: Instruction list - core - growth level 2 - idling ;;; @@ -6457,7 +5875,7 @@ InstList_Bang_Core_Growth2_Idling: dw $0006,Spritemap_Bang_Growth2_Idling_2 ;A3B7C6; dw $0004,Spritemap_Bang_Growth2_Idling_4 ;A3B7CA; dw $0006,Spritemap_Bang_Growth2_Idling_2 ;A3B7CE; - dw Instruction_Common_GotoY ;A3B7D2; + dw Common_Instruction_GotoY ;A3B7D2; dw InstList_Bang_Core_Growth2_Idling ;A3B7D4; @@ -6471,7 +5889,7 @@ InstList_Bang_Core_Growth2_Growing: dw $0004,Spritemap_Bang_Growth2_Growing_6 ;A3B7E8; dw $0010,Spritemap_Bang_Growth2_Growing_8 ;A3B7EC; dw Instruction_Bang_SetFinishedGrowingFlagTo1 ;A3B7F0; - dw Instruction_Common_Sleep ;A3B7F2; + dw Common_Instruction_Sleep ;A3B7F2; ;;; $B7F4: Instruction list - core - growth level 3 - idling ;;; @@ -6492,7 +5910,7 @@ InstList_Bang_Core_Growth3_Idling: dw $0003,Spritemap_Bang_Growth3_Idling_E ;A3B828; dw $0002,Spritemap_Bang_Growth3_Idling_10 ;A3B82C; dw $0003,Spritemap_Bang_Growth3_Idling_E ;A3B830; - dw Instruction_Common_GotoY ;A3B834; + dw Common_Instruction_GotoY ;A3B834; dw InstList_Bang_Core_Growth3_Idling ;A3B836; @@ -6507,7 +5925,7 @@ InstList_Bang_Core_Growth3_Growing: dw $0004,Spritemap_Bang_Growth3_Growing_8 ;A3B84E; dw $0010,Spritemap_Bang_Growth3_Growing_A ;A3B852; dw Instruction_Bang_SetFinishedGrowingFlagTo1 ;A3B856; - dw Instruction_Common_Sleep ;A3B858; + dw Common_Instruction_Sleep ;A3B858; ;;; $B85A: Instruction list - core - growth level 4 - idling ;;; @@ -6523,7 +5941,7 @@ InstList_Bang_Core_Growth4_Idling: dw $0002,Spritemap_Bang_Growth4_Idling_A ;A3B87A; dw $0001,Spritemap_Bang_Growth4_Idling_C ;A3B87E; dw $0002,Spritemap_Bang_Growth4_Idling_A ;A3B882; - dw Instruction_Common_GotoY ;A3B886; + dw Common_Instruction_GotoY ;A3B886; dw InstList_Bang_Core_Growth4_Idling ;A3B888; @@ -6538,7 +5956,7 @@ InstList_Bang_Core_Growth4_Growing: dw $0004,Spritemap_Bang_Growth4_Growing_8 ;A3B8A0; dw $0010,Spritemap_Bang_Growth4_Growing_A ;A3B8A4; dw Instruction_Bang_SetFinishedGrowingFlagTo1 ;A3B8A8; - dw Instruction_Common_Sleep ;A3B8AA; + dw Common_Instruction_Sleep ;A3B8AA; ;;; $B8AC: Instruction list - shell - growth level 0 - idling ;;; @@ -6547,21 +5965,21 @@ InstList_Bang_Shell_Growth0_Idling: dw $000D,Spritemap_Bang_Growth0_Idling_3 ;A3B8B0; dw $0010,Spritemap_Bang_Growth0_Idling_5 ;A3B8B4; dw $000D,Spritemap_Bang_Growth0_Idling_3 ;A3B8B8; - dw Instruction_Common_GotoY ;A3B8BC; + dw Common_Instruction_GotoY ;A3B8BC; dw InstList_Bang_Shell_Growth0_Idling ;A3B8BE; ;;; $B8C0: Instruction list - shell - growth level 0 - growing ;;; InstList_Bang_Shell_Growth0_Growing: dw Instruction_Bang_PlayAcquiredSuitSFX ;A3B8C0; - dw $0004,Spritemap_Common_Nothing ;A3B8C2; - dw $0008,Spritemap_Common_Nothing ;A3B8C6; - dw $0004,Spritemap_Common_Nothing ;A3B8CA; + dw $0004,Common_Spritemap_Nothing ;A3B8C2; + dw $0008,Common_Spritemap_Nothing ;A3B8C6; + dw $0004,Common_Spritemap_Nothing ;A3B8CA; dw $0002,Spritemap_Bang_Growth0_Growing_3 ;A3B8CE; dw $0004,Spritemap_Bang_Growth0_Growing_5 ;A3B8D2; dw $0010,Spritemap_Bang_Growth0_Growing_7 ;A3B8D6; dw Instruction_Bang_SetFinishedGrowingFlagTo1 ;A3B8DA; - dw Instruction_Common_Sleep ;A3B8DC; + dw Common_Instruction_Sleep ;A3B8DC; ;;; $B8DE: Instruction list - shell - growth level 1 - idling ;;; @@ -6570,21 +5988,21 @@ InstList_Bang_Shell_Growth1_Idling: dw $0008,Spritemap_Bang_Growth1_Idling_3 ;A3B8E2; dw $000D,Spritemap_Bang_Growth1_Idling_5 ;A3B8E6; dw $0008,Spritemap_Bang_Growth1_Idling_3 ;A3B8EA; - dw Instruction_Common_GotoY ;A3B8EE; + dw Common_Instruction_GotoY ;A3B8EE; dw InstList_Bang_Shell_Growth1_Idling ;A3B8F0; ;;; $B8F2: Instruction list - shell - growth level 1 - growing ;;; InstList_Bang_Shell_Growth1_Growing: dw Instruction_Bang_PlayAcquiredSuitSFX ;A3B8F2; - dw $0004,Spritemap_Common_Nothing ;A3B8F4; - dw $0008,Spritemap_Common_Nothing ;A3B8F8; - dw $0004,Spritemap_Common_Nothing ;A3B8FC; + dw $0004,Common_Spritemap_Nothing ;A3B8F4; + dw $0008,Common_Spritemap_Nothing ;A3B8F8; + dw $0004,Common_Spritemap_Nothing ;A3B8FC; dw $0002,Spritemap_Bang_Growth1_Growing_3 ;A3B900; dw $0004,Spritemap_Bang_Growth1_Growing_5 ;A3B904; dw $0010,Spritemap_Bang_Growth1_Growing_7 ;A3B908; dw Instruction_Bang_SetFinishedGrowingFlagTo1 ;A3B90C; - dw Instruction_Common_Sleep ;A3B90E; + dw Common_Instruction_Sleep ;A3B90E; ;;; $B910: Instruction list - shell - growth level 2 - idling ;;; @@ -6593,7 +6011,7 @@ InstList_Bang_Shell_Growth2_Idling: dw $0006,Spritemap_Bang_Growth2_Idling_3 ;A3B914; dw $0004,Spritemap_Bang_Growth2_Idling_5 ;A3B918; dw $0006,Spritemap_Bang_Growth2_Idling_3 ;A3B91C; - dw Instruction_Common_GotoY ;A3B920; + dw Common_Instruction_GotoY ;A3B920; dw InstList_Bang_Shell_Growth2_Idling ;A3B922; @@ -6607,7 +6025,7 @@ InstList_Bang_Shell_Growth2_Growing: dw $0004,Spritemap_Bang_Growth2_Growing_7 ;A3B936; dw $0010,Spritemap_Bang_Growth2_Growing_9 ;A3B93A; dw Instruction_Bang_SetFinishedGrowingFlagTo1 ;A3B93E; - dw Instruction_Common_Sleep ;A3B940; + dw Common_Instruction_Sleep ;A3B940; ;;; $B942: Instruction list - shell - growth level 3 - idling ;;; @@ -6628,7 +6046,7 @@ InstList_Bang_Shell_Growth3_Idling: dw $0003,Spritemap_Bang_Growth3_Idling_F ;A3B976; dw $0002,Spritemap_Bang_Growth3_Idling_11 ;A3B97A; dw $0003,Spritemap_Bang_Growth3_Idling_F ;A3B97E; - dw Instruction_Common_GotoY ;A3B982; + dw Common_Instruction_GotoY ;A3B982; dw InstList_Bang_Shell_Growth3_Idling ;A3B984; @@ -6643,7 +6061,7 @@ InstList_Bang_Shell_Growth3_Growing: dw $0004,Spritemap_Bang_Growth3_Growing_9 ;A3B99C; dw $0010,Spritemap_Bang_Growth3_Growing_B ;A3B9A0; dw Instruction_Bang_SetFinishedGrowingFlagTo1 ;A3B9A4; - dw Instruction_Common_Sleep ;A3B9A6; + dw Common_Instruction_Sleep ;A3B9A6; ;;; $B9A8: Instruction list - shell - growth level 4 - idling ;;; @@ -6659,7 +6077,7 @@ InstList_Bang_Shell_Growth4_Idling: dw $0002,Spritemap_Bang_Growth4_Idling_B ;A3B9C8; dw $0001,Spritemap_Bang_Growth4_Idling_D ;A3B9CC; dw $0002,Spritemap_Bang_Growth4_Idling_B ;A3B9D0; - dw Instruction_Common_GotoY ;A3B9D4; + dw Common_Instruction_GotoY ;A3B9D4; dw InstList_Bang_Shell_Growth4_Idling ;A3B9D6; @@ -6672,15 +6090,15 @@ InstList_Bang_Shell_Growth4_Growing: dw $0002,Spritemap_Bang_Growth4_Growing_5 ;A3B9E6; dw $0004,Spritemap_Bang_Growth4_Growing_7 ;A3B9EA; dw $0004,Spritemap_Bang_Growth4_Growing_9 ;A3B9EE; - dw $0010,Spritemap_Common_Nothing ;A3B9F2; + dw $0010,Common_Spritemap_Nothing ;A3B9F2; dw Instruction_Bang_SetFinishedGrowingFlagTo1 ;A3B9F6; - dw Instruction_Common_Sleep ;A3B9F8; + dw Common_Instruction_Sleep ;A3B9F8; ;;; $B9FA: Instruction list - electricity - none ;;; InstList_Bang_Electricity_None: - dw $0001,Spritemap_Common_Nothing ;A3B9FA; - dw Instruction_Common_Sleep ;A3B9FE; + dw $0001,Common_Spritemap_Nothing ;A3B9FA; + dw Common_Instruction_Sleep ;A3B9FE; ;;; $BA00: Instruction list - electricity - growth level 3/4 - growing ;;; @@ -6688,18 +6106,18 @@ InstList_Bang_Electricity_Growth3_4_Growing: dw $0002,Spritemap_Bang_Electricity_Growth3_4_Growing_0 ;A3BA00; dw $0003,Spritemap_Bang_Electricity_Growth3_4_Growing_1 ;A3BA04; dw $0004,Spritemap_Bang_Electricity_Growth3_4_Growing_2 ;A3BA08; - dw $0002,Spritemap_Common_Nothing ;A3BA0C; + dw $0002,Common_Spritemap_Nothing ;A3BA0C; dw $0004,Spritemap_Bang_Electricity_Growth3_4_Growing_3 ;A3BA10; dw $0002,Spritemap_Bang_Electricity_Growth3_4_Growing_4 ;A3BA14; dw $0003,Spritemap_Bang_Electricity_Growth3_4_Growing_5 ;A3BA18; dw $0002,Spritemap_Bang_Electricity_Growth3_4_Growing_6 ;A3BA1C; dw $0004,Spritemap_Bang_Electricity_Growth3_4_Growing_7 ;A3BA20; dw $0003,Spritemap_Bang_Electricity_Growth3_4_Growing_8 ;A3BA24; - dw $000A,Spritemap_Common_Nothing ;A3BA28; + dw $000A,Common_Spritemap_Nothing ;A3BA28; dw $0003,Spritemap_Bang_Electricity_Growth3_4_Growing_9 ;A3BA2C; dw $0002,Spritemap_Bang_Electricity_Growth3_4_Growing_A ;A3BA30; dw $0004,Spritemap_Bang_Electricity_Growth3_4_Growing_B ;A3BA34; - dw Instruction_Common_GotoY ;A3BA38; + dw Common_Instruction_GotoY ;A3BA38; dw InstList_Bang_Electricity_Growth3_4_Growing ;A3BA3A; @@ -6710,18 +6128,18 @@ UNSUED_InstList_Bang_Electricity_Growing_A3BA3C: dw $0002,UNUSED_Spritemap_Bang_Electricity_A3C5AE ;A3BA3C; dw $0003,UNUSED_Spritemap_Bang_Electricity_A3C5BA ;A3BA40; dw $0004,UNUSED_Spritemap_Bang_Electricity_A3C5C6 ;A3BA44; - dw $0002,Spritemap_Common_Nothing ;A3BA48; + dw $0002,Common_Spritemap_Nothing ;A3BA48; dw $0004,UNUSED_Spritemap_Bang_Electricity_A3C5D2 ;A3BA4C; dw $0002,UNUSED_Spritemap_Bang_Electricity_A3C5DE ;A3BA50; dw $0003,UNUSED_Spritemap_Bang_Electricity_A3C5EA ;A3BA54; dw $0002,UNUSED_Spritemap_Bang_Electricity_A3C5F6 ;A3BA58; dw $0004,UNUSED_Spritemap_Bang_Electricity_A3C602 ;A3BA5C; dw $0003,UNUSED_Spritemap_Bang_Electricity_A3C60E ;A3BA60; - dw $000A,Spritemap_Common_Nothing ;A3BA64; + dw $000A,Common_Spritemap_Nothing ;A3BA64; dw $0003,UNUSED_Spritemap_Bang_Electricity_A3C61A ;A3BA68; dw $0002,UNUSED_Spritemap_Bang_Electricity_A3C626 ;A3BA6C; dw $0004,UNUSED_Spritemap_Bang_Electricity_A3C632 ;A3BA70; - dw Instruction_Common_GotoY ;A3BA74; + dw Common_Instruction_GotoY ;A3BA74; dw UNSUED_InstList_Bang_Electricity_Growing_A3BA3C ;A3BA76; endif ; !FEATURE_KEEP_UNREFERENCED @@ -8073,7 +7491,7 @@ InstList_Skree_Idling: dw $000A,Spritemap_Skree_2 ;A3C662; dw $000A,Spritemap_Skree_3 ;A3C666; dw $000A,Spritemap_Skree_4 ;A3C66A; - dw Instruction_Common_GotoY ;A3C66E; + dw Common_Instruction_GotoY ;A3C66E; dw InstList_Skree_Idling ;A3C670; @@ -8082,27 +7500,27 @@ InstList_Skree_PrepareToLaunchAttack: dw $0010,Spritemap_Skree_0 ;A3C672; dw $0008,Spritemap_Skree_1 ;A3C676; dw Instruction_Skree_SetAttackReadyFlag ;A3C67A; - dw Instruction_Common_Sleep ;A3C67C; + dw Common_Instruction_Sleep ;A3C67C; ;;; $C67E: Instruction list - launched attack ;;; InstList_Skree_LaunchedAttack_0: - dw Instruction_Common_EnableOffScreenProcessing ;A3C67E; + dw Common_Instruction_EnableOffScreenProcessing ;A3C67E; InstList_Skree_LaunchedAttack_1: dw $0002,Spritemap_Skree_2 ;A3C680; dw $0002,Spritemap_Skree_3 ;A3C684; dw $0002,Spritemap_Skree_4 ;A3C688; dw $0002,Spritemap_Skree_0 ;A3C68C; - dw Instruction_Common_GotoY ;A3C690; + dw Common_Instruction_GotoY ;A3C690; dw InstList_Skree_LaunchedAttack_1 ;A3C692; ;;; $C694: Unused. Instruction list - stop animating ;;; UNUSED_InstList_Skree_StopAnimating_A3C694: - dw Instruction_Common_DisableOffScreenProcessing ;A3C694; + dw Common_Instruction_DisableOffScreenProcessing ;A3C694; dw $0001,Spritemap_Skree_0 ;A3C696; - dw Instruction_Common_Sleep ;A3C69A; + dw Common_Instruction_Sleep ;A3C69A; ;;; $C69C: Skree instruction list pointers ;;; @@ -8392,7 +7810,7 @@ InstList_Yard_Crawling_UpsideUp_MovingLeft: dw $0009,Spritemap_Yard_0 ;A3C8EA; dw $000D,Spritemap_Yard_1 ;A3C8F0; dw $0009,Spritemap_Yard_2 ;A3C8F4; - dw Instruction_Common_GotoY ;A3C8F8; + dw Common_Instruction_GotoY ;A3C8F8; dw InstList_Yard_Crawling_UpsideUp_MovingLeft ;A3C8FA; @@ -8418,7 +7836,7 @@ InstList_Yard_Crawling_UpsideLeft_MovingDown: dw $0009,Spritemap_Yard_6 ;A3C920; dw $000D,Spritemap_Yard_7 ;A3C926; dw $0009,Spritemap_Yard_8 ;A3C92A; - dw Instruction_Common_GotoY ;A3C92E; + dw Common_Instruction_GotoY ;A3C92E; dw InstList_Yard_Crawling_UpsideLeft_MovingDown ;A3C930; @@ -8444,7 +7862,7 @@ InstList_Yard_Crawling_UpsideDown_MovingRight: dw $0009,Spritemap_Yard_C ;A3C956; dw $000D,Spritemap_Yard_D ;A3C95C; dw $0009,Spritemap_Yard_E ;A3C960; - dw Instruction_Common_GotoY ;A3C964; + dw Common_Instruction_GotoY ;A3C964; dw InstList_Yard_Crawling_UpsideDown_MovingRight ;A3C966; @@ -8470,7 +7888,7 @@ InstList_Yard_Crawling_UpsideRight_MovingUp: dw $0009,Spritemap_Yard_12 ;A3C98C; dw $000D,Spritemap_Yard_13 ;A3C992; dw $0009,Spritemap_Yard_14 ;A3C996; - dw Instruction_Common_GotoY ;A3C99A; + dw Common_Instruction_GotoY ;A3C99A; dw InstList_Yard_Crawling_UpsideRight_MovingUp ;A3C99C; @@ -8496,7 +7914,7 @@ InstList_Yard_Crawling_UpsideUp_MovingRight: dw $0009,Spritemap_Yard_20 ;A3C9C2; dw $000D,Spritemap_Yard_21 ;A3C9C8; dw $0009,Spritemap_Yard_22 ;A3C9CC; - dw Instruction_Common_GotoY ;A3C9D0; + dw Common_Instruction_GotoY ;A3C9D0; dw InstList_Yard_Crawling_UpsideUp_MovingRight ;A3C9D2; @@ -8522,7 +7940,7 @@ InstList_Yard_Crawling_UpsideRight_MovingDown: dw $0009,Spritemap_Yard_26 ;A3C9F8; dw $000D,Spritemap_Yard_27 ;A3C9FE; dw $0009,Spritemap_Yard_28 ;A3CA02; - dw Instruction_Common_GotoY ;A3CA06; + dw Common_Instruction_GotoY ;A3CA06; dw InstList_Yard_Crawling_UpsideRight_MovingDown ;A3CA08; @@ -8548,7 +7966,7 @@ InstList_Yard_Crawling_UpsideDown_MovingLeft: dw $0009,Spritemap_Yard_2C ;A3CA2E; dw $000D,Spritemap_Yard_2D ;A3CA34; dw $0009,Spritemap_Yard_2E ;A3CA38; - dw Instruction_Common_GotoY ;A3CA3C; + dw Common_Instruction_GotoY ;A3CA3C; dw InstList_Yard_Crawling_UpsideDown_MovingLeft ;A3CA3E; @@ -8574,7 +7992,7 @@ InstList_Yard_Crawling_UpsideLeft_MovingUp: dw $0009,Spritemap_Yard_32 ;A3CA64; dw $000D,Spritemap_Yard_33 ;A3CA6A; dw $0009,Spritemap_Yard_34 ;A3CA6E; - dw Instruction_Common_GotoY ;A3CA72; + dw Common_Instruction_GotoY ;A3CA72; dw InstList_Yard_Crawling_UpsideLeft_MovingUp ;A3CA74; @@ -8587,7 +8005,7 @@ InstList_Yard_InsideTurn_UpsideUp_MovingLeft: dw $0007,Spritemap_Yard_40 ;A3CA7E; dw $0004,Spritemap_Yard_41 ;A3CA82; dw $0007,Spritemap_Yard_42 ;A3CA86; - dw Instruction_Common_GotoY ;A3CA8A; + dw Common_Instruction_GotoY ;A3CA8A; dw InstList_Yard_Crawling_UpsideRight_MovingUp ;A3CA8C; @@ -8600,7 +8018,7 @@ InstList_Yard_InsideTurn_UpsideRight_MovingUp: dw $0007,Spritemap_Yard_43 ;A3CA96; dw $0004,Spritemap_Yard_44 ;A3CA9A; dw $0007,Spritemap_Yard_45 ;A3CA9E; - dw Instruction_Common_GotoY ;A3CAA2; + dw Common_Instruction_GotoY ;A3CAA2; dw InstList_Yard_Crawling_UpsideDown_MovingRight ;A3CAA4; @@ -8613,7 +8031,7 @@ InstList_Yard_InsideTurn_UpsideDown_MovingRight: dw $0007,Spritemap_Yard_46 ;A3CAAE; dw $0004,Spritemap_Yard_47 ;A3CAB2; dw $0007,Spritemap_Yard_48 ;A3CAB6; - dw Instruction_Common_GotoY ;A3CABA; + dw Common_Instruction_GotoY ;A3CABA; dw InstList_Yard_Crawling_UpsideLeft_MovingDown ;A3CABC; @@ -8626,7 +8044,7 @@ InstList_Yard_InsideTurn_UpsideLeft_MovingDown: dw $0007,Spritemap_Yard_49 ;A3CAC6; dw $0004,Spritemap_Yard_4A ;A3CACA; dw $0007,Spritemap_Yard_4B ;A3CACE; - dw Instruction_Common_GotoY ;A3CAD2; + dw Common_Instruction_GotoY ;A3CAD2; dw InstList_Yard_Crawling_UpsideUp_MovingLeft ;A3CAD4; @@ -8639,7 +8057,7 @@ InstList_Yard_InsideTurn_UpsideUp_MovingRight: dw $0007,Spritemap_Yard_54 ;A3CADE; dw $0004,Spritemap_Yard_55 ;A3CAE2; dw $0007,Spritemap_Yard_56 ;A3CAE6; - dw Instruction_Common_GotoY ;A3CAEA; + dw Common_Instruction_GotoY ;A3CAEA; dw InstList_Yard_Crawling_UpsideLeft_MovingUp ;A3CAEC; @@ -8652,7 +8070,7 @@ InstList_Yard_InsideTurn_UpsideLeft_MovingUp: dw $0007,Spritemap_Yard_57 ;A3CAF6; dw $0004,Spritemap_Yard_58 ;A3CAFA; dw $0007,Spritemap_Yard_59 ;A3CAFE; - dw Instruction_Common_GotoY ;A3CB02; + dw Common_Instruction_GotoY ;A3CB02; dw InstList_Yard_Crawling_UpsideDown_MovingLeft ;A3CB04; @@ -8665,7 +8083,7 @@ InstList_Yard_InsideTurn_UpsideDown_MovingLeft: dw $0007,Spritemap_Yard_5A ;A3CB0E; dw $0004,Spritemap_Yard_5B ;A3CB12; dw $0007,Spritemap_Yard_5C ;A3CB16; - dw Instruction_Common_GotoY ;A3CB1A; + dw Common_Instruction_GotoY ;A3CB1A; dw InstList_Yard_Crawling_UpsideRight_MovingDown ;A3CB1C; @@ -8678,7 +8096,7 @@ InstList_Yard_InsideTurn_UpsideRight_MovingDown: dw $0007,Spritemap_Yard_5D ;A3CB26; dw $0004,Spritemap_Yard_5E ;A3CB2A; dw $0007,Spritemap_Yard_5F ;A3CB2E; - dw Instruction_Common_GotoY ;A3CB32; + dw Common_Instruction_GotoY ;A3CB32; dw InstList_Yard_Crawling_UpsideUp_MovingRight ;A3CB34; @@ -8695,7 +8113,7 @@ InstList_Yard_Hiding_UpsideUp_MovingLeft: InstList_Yard_Hidden_UpsideUp_MovingLeft: dw $0030,Spritemap_Yard_4C ;A3CB44; dw $0010,Spritemap_Yard_4D ;A3CB48; - dw Instruction_Common_GotoY ;A3CB4C; + dw Common_Instruction_GotoY ;A3CB4C; dw InstList_Yard_Crawling_UpsideUp_MovingLeft ;A3CB4E; @@ -8708,7 +8126,7 @@ InstList_Yard_Hiding_UpsideDown_MovingLeft: dw Instruction_Yard_GoBack4BytesIfHidingOr50PercentChance ;A3CB5C; dw $0030,Spritemap_Yard_64 ;A3CB5E; dw $0010,Spritemap_Yard_65 ;A3CB62; - dw Instruction_Common_GotoY ;A3CB66; + dw Common_Instruction_GotoY ;A3CB66; dw InstList_Yard_Crawling_UpsideDown_MovingLeft ;A3CB68; @@ -8721,7 +8139,7 @@ InstList_Yard_Hiding_UpsideDown_MovingRight: dw Instruction_Yard_GoBack4BytesIfHidingOr50PercentChance ;A3CB76; dw $0030,Spritemap_Yard_50 ;A3CB78; dw $0010,Spritemap_Yard_51 ;A3CB7C; - dw Instruction_Common_GotoY ;A3CB80; + dw Common_Instruction_GotoY ;A3CB80; dw InstList_Yard_Crawling_UpsideDown_MovingRight ;A3CB82; @@ -8738,7 +8156,7 @@ InstList_Yard_Hiding_UpsideUp_MovingRight: InstList_Yard_Hidden_UpsideUp_MovingRight: dw $0030,Spritemap_Yard_60 ;A3CB92; dw $0010,Spritemap_Yard_61 ;A3CB96; - dw Instruction_Common_GotoY ;A3CB9A; + dw Common_Instruction_GotoY ;A3CB9A; dw InstList_Yard_Crawling_UpsideUp_MovingRight ;A3CB9C; @@ -8751,7 +8169,7 @@ InstList_Yard_Hiding_UpsideRight_MovingUp: dw Instruction_Yard_GoBack4BytesIfHidingOr50PercentChance ;A3CBAA; dw $0030,Spritemap_Yard_4E ;A3CBAC; dw $0010,Spritemap_Yard_4F ;A3CBB0; - dw Instruction_Common_GotoY ;A3CBB4; + dw Common_Instruction_GotoY ;A3CBB4; dw InstList_Yard_Crawling_UpsideRight_MovingUp ;A3CBB6; @@ -8764,7 +8182,7 @@ InstList_Yard_Hiding_UpsideLeft_MovingUp: dw Instruction_Yard_GoBack4BytesIfHidingOr50PercentChance ;A3CBC4; dw $0030,Spritemap_Yard_62 ;A3CBC6; dw $0010,Spritemap_Yard_63 ;A3CBCA; - dw Instruction_Common_GotoY ;A3CBCE; + dw Common_Instruction_GotoY ;A3CBCE; dw InstList_Yard_Crawling_UpsideLeft_MovingUp ;A3CBD0; @@ -8777,7 +8195,7 @@ InstList_Yard_Hiding_UpsideLeft_MovingDown: dw Instruction_Yard_GoBack4BytesIfHidingOr50PercentChance ;A3CBDE; dw $0030,Spritemap_Yard_52 ;A3CBE0; dw $0010,Spritemap_Yard_53 ;A3CBE4; - dw Instruction_Common_GotoY ;A3CBE8; + dw Common_Instruction_GotoY ;A3CBE8; dw InstList_Yard_Crawling_UpsideLeft_MovingDown ;A3CBEA; @@ -8790,7 +8208,7 @@ InstList_Yard_Hiding_UpsideRight_MovingDown: dw Instruction_Yard_GoBack4BytesIfHidingOr50PercentChance ;A3CBF8; dw $0030,Spritemap_Yard_66 ;A3CBFA; dw $0010,Spritemap_Yard_67 ;A3CBFE; - dw Instruction_Common_GotoY ;A3CC02; + dw Common_Instruction_GotoY ;A3CC02; dw InstList_Yard_Crawling_UpsideRight_MovingDown ;A3CC04; @@ -8804,7 +8222,7 @@ InstList_Yard_Airborne_FacingLeft_1: dw $0003,Spritemap_Yard_1B ;A3CC0E; dw $0003,Spritemap_Yard_1D ;A3CC12; dw $0003,Spritemap_Yard_1F ;A3CC16; - dw Instruction_Common_GotoY ;A3CC1A; + dw Common_Instruction_GotoY ;A3CC1A; dw InstList_Yard_Airborne_FacingLeft_1 ;A3CC1C; @@ -8818,7 +8236,7 @@ InstList_Yard_Airborne_FacingRight_1: dw $0003,Spritemap_Yard_3B ;A3CC26; dw $0003,Spritemap_Yard_3D ;A3CC2A; dw $0003,Spritemap_Yard_3F ;A3CC2E; - dw Instruction_Common_GotoY ;A3CC32; + dw Common_Instruction_GotoY ;A3CC32; dw InstList_Yard_Airborne_FacingRight_1 ;A3CC34; @@ -9089,7 +8507,7 @@ InitAI_Yard: LDX.W EnemyIndex ;A3CDE2; LDA.W #RTL_A3CF5F ;A3CDE5; STA.W Yard.movementFunction,X ;A3CDE8; - LDA.W #Spritemap_Common_Nothing ;A3CDEB; + LDA.W #Common_Spritemap_Nothing ;A3CDEB; STA.W Enemy.spritemap,X ;A3CDEE; LDA.W #$0001 ;A3CDF1; STA.W Enemy.instTimer,X ;A3CDF4; @@ -9219,7 +8637,7 @@ HandleYardHiding: CMP.W #RTL_A3CF5F ;A3CEEA; BEQ .crawl ;A3CEED; STA.W Enemy.instList,X ;A3CEEF; - LDA.W #Spritemap_Common_Nothing ;A3CEF2; + LDA.W #Common_Spritemap_Nothing ;A3CEF2; STA.W Enemy.spritemap,X ;A3CEF5; LDA.W #$0001 ;A3CEF8; STA.W Enemy.instTimer,X ;A3CEFB; @@ -10804,7 +10222,7 @@ EnemyGraphicsDrawnHook_Reflec_PeriodicallyCyclePalettes: InstList_Reflec_FacingLeft: dw Instruction_Reflec_Param2InY,$0000 ;A3DB4C; dw $0040,Spritemap_Reflec_FacingLeft ;A3DB4E; - dw Instruction_Common_GotoY ;A3DB54; + dw Common_Instruction_GotoY ;A3DB54; dw InstList_Reflec_FacingLeft ;A3DB56; @@ -10812,7 +10230,7 @@ InstList_Reflec_FacingLeft: InstList_Reflec_FacingUpLeft: dw Instruction_Reflec_Param2InY,$0001 ;A3DB58; dw $0040,Spritemap_Reflec_FacingUpLeft ;A3DB5A; - dw Instruction_Common_GotoY ;A3DB60; + dw Common_Instruction_GotoY ;A3DB60; dw InstList_Reflec_FacingUpLeft ;A3DB62; @@ -10820,70 +10238,70 @@ InstList_Reflec_FacingUpLeft: InstList_Reflec_FacingUp: dw Instruction_Reflec_Param2InY,$0002 ;A3DB64; dw $0040,Spritemap_Reflec_FacingUp ;A3DB66; - dw Instruction_Common_Sleep ;A3DB6C; + dw Common_Instruction_Sleep ;A3DB6C; ;;; $DB6E: Instruction list - facing up-right ;;; InstList_Reflec_FacingUpRight: dw Instruction_Reflec_Param2InY,$0003 ;A3DB6E; dw $0040,Spritemap_Reflec_FacingUpRight ;A3DB70; - dw Instruction_Common_Sleep ;A3DB76; + dw Common_Instruction_Sleep ;A3DB76; ;;; $DB78: Instruction list - facing right ;;; InstList_Reflec_FacingRight: dw Instruction_Reflec_Param2InY,$0000 ;A3DB78; dw $0040,Spritemap_Reflec_FacingRight ;A3DB7A; - dw Instruction_Common_Sleep ;A3DB80; + dw Common_Instruction_Sleep ;A3DB80; ;;; $DB82: Instruction list - facing down-right ;;; InstList_Reflec_FacingDownRight: dw Instruction_Reflec_Param2InY,$0001 ;A3DB82; dw $0040,Spritemap_Reflec_FacingDownRight ;A3DB84; - dw Instruction_Common_Sleep ;A3DB8A; + dw Common_Instruction_Sleep ;A3DB8A; ;;; $DB8C: Instruction list - facing down ;;; InstList_Reflec_FacingDown: dw Instruction_Reflec_Param2InY,$0002 ;A3DB8C; dw $0040,Spritemap_Reflec_FacingDown ;A3DB8E; - dw Instruction_Common_Sleep ;A3DB94; + dw Common_Instruction_Sleep ;A3DB94; ;;; $DB96: Instruction list - facing down-left ;;; InstList_Reflec_FacingDownLeft: dw Instruction_Reflec_Param2InY,$0003 ;A3DB96; dw $0040,Spritemap_Reflec_FacingDownLeft ;A3DB98; - dw Instruction_Common_Sleep ;A3DB9E; + dw Common_Instruction_Sleep ;A3DB9E; ;;; $DBA0: Instruction list - health reached zero - facing left ;;; InstList_Reflec_ZeroHealth_FacingLeft: dw Instruction_Reflec_Param2InY,$0000 ;A3DBA0; dw $0001,Spritemap_Reflec_FacingLeft ;A3DBA2; - dw Instruction_Common_Sleep ;A3DBA8; + dw Common_Instruction_Sleep ;A3DBA8; ;;; $DBAA: Instruction list - health reached zero - facing up-left ;;; InstList_Reflec_ZeroHealth_FacingUpLeft: dw Instruction_Reflec_Param2InY,$0001 ;A3DBAA; dw $0001,Spritemap_Reflec_FacingUpLeft ;A3DBAC; - dw Instruction_Common_Sleep ;A3DBB2; + dw Common_Instruction_Sleep ;A3DBB2; ;;; $DBB4: Instruction list - health reached zero - facing up ;;; InstList_Reflec_ZeroHealth_FacingUp: dw Instruction_Reflec_Param2InY,$0002 ;A3DBB4; dw $0001,Spritemap_Reflec_FacingUp ;A3DBB6; - dw Instruction_Common_Sleep ;A3DBBC; + dw Common_Instruction_Sleep ;A3DBBC; ;;; $DBBE: Instruction list - health reached zero - facing up-right ;;; InstList_Reflec_ZeroHealth_FacingUpRight: dw Instruction_Reflec_Param2InY,$0003 ;A3DBBE; dw $0001,Spritemap_Reflec_FacingUpRight ;A3DBC0; - dw Instruction_Common_Sleep ;A3DBC6; + dw Common_Instruction_Sleep ;A3DBC6; ;;; $DBC8: Instruction - enemy reflection axis = [[Y]] ;;; @@ -11353,7 +10771,7 @@ InstList_HZoomer_UpsideRight_1: dw $0003,Spritemap_Crawlers_UpsideRight_2 ;A3DFD7; dw $0003,Spritemap_Crawlers_UpsideRight_3 ;A3DFDB; dw $0003,Spritemap_Crawlers_UpsideRight_4 ;A3DFDF; - dw Instruction_Common_GotoY ;A3DFE3; + dw Common_Instruction_GotoY ;A3DFE3; dw InstList_HZoomer_UpsideRight_1 ;A3DFE5; @@ -11368,7 +10786,7 @@ InstList_HZoomer_UpsideLeft_1: dw $0003,Spritemap_Crawlers_UpsideLeft_2 ;A3DFF3; dw $0003,Spritemap_Crawlers_UpsideLeft_3 ;A3DFF7; dw $0003,Spritemap_Crawlers_UpsideLeft_4 ;A3DFFB; - dw Instruction_Common_GotoY ;A3DFFF; + dw Common_Instruction_GotoY ;A3DFFF; dw InstList_HZoomer_UpsideLeft_1 ;A3E001; @@ -11383,7 +10801,7 @@ InstList_HZoomer_UpsideDown_1: dw $0003,Spritemap_Crawlers_UpsideDown_FacingLeft_2 ;A3E00F; dw $0003,Spritemap_Crawlers_UpsideDown_FacingLeft_3 ;A3E013; dw $0003,Spritemap_Crawlers_UpsideDown_FacingLeft_4 ;A3E017; - dw Instruction_Common_GotoY ;A3E01B; + dw Common_Instruction_GotoY ;A3E01B; dw InstList_HZoomer_UpsideDown_1 ;A3E01D; @@ -11398,7 +10816,7 @@ InstList_HZoomer_UpsideUp_1: dw $0003,Spritemap_Crawlers_UpsideUp_FacingRight_2 ;A3E02B; dw $0003,Spritemap_Crawlers_UpsideUp_FacingRight_3 ;A3E02F; dw $0003,Spritemap_Crawlers_UpsideUp_FacingRight_4 ;A3E033; - dw Instruction_Common_GotoY ;A3E037; + dw Common_Instruction_GotoY ;A3E037; dw InstList_HZoomer_UpsideUp_1 ;A3E039; @@ -11701,7 +11119,7 @@ InstList_Zeela_Zoomer_UpsideRight_1: dw $0003,Spritemap_Crawlers_UpsideRight_2 ;A3E268; dw $0003,Spritemap_Crawlers_UpsideRight_3 ;A3E26C; dw $0003,Spritemap_Crawlers_UpsideRight_4 ;A3E270; - dw Instruction_Common_GotoY ;A3E274; + dw Common_Instruction_GotoY ;A3E274; dw InstList_Zeela_Zoomer_UpsideRight_1 ;A3E276; @@ -11716,7 +11134,7 @@ InstList_Zeela_Zoomer_UpsideLeft_1: dw $0003,Spritemap_Crawlers_UpsideLeft_2 ;A3E284; dw $0003,Spritemap_Crawlers_UpsideLeft_3 ;A3E288; dw $0003,Spritemap_Crawlers_UpsideLeft_4 ;A3E28C; - dw Instruction_Common_GotoY ;A3E290; + dw Common_Instruction_GotoY ;A3E290; dw InstList_Zeela_Zoomer_UpsideLeft_1 ;A3E292; @@ -11731,7 +11149,7 @@ InstList_Zeela_Zoomer_UpsideDown_1: dw $0003,Spritemap_Crawlers_UpsideDown_FacingLeft_2 ;A3E2A0; dw $0003,Spritemap_Crawlers_UpsideDown_FacingLeft_3 ;A3E2A4; dw $0003,Spritemap_Crawlers_UpsideDown_FacingLeft_4 ;A3E2A8; - dw Instruction_Common_GotoY ;A3E2AC; + dw Common_Instruction_GotoY ;A3E2AC; dw InstList_Zeela_Zoomer_UpsideDown_1 ;A3E2AE; @@ -11746,7 +11164,7 @@ InstList_Zeela_Zoomer_UpsideUp_1: dw $0003,Spritemap_Crawlers_UpsideUp_FacingRight_2 ;A3E2BC; dw $0003,Spritemap_Crawlers_UpsideUp_FacingRight_3 ;A3E2C0; dw $0003,Spritemap_Crawlers_UpsideUp_FacingRight_4 ;A3E2C4; - dw Instruction_Common_GotoY ;A3E2C8; + dw Common_Instruction_GotoY ;A3E2C8; dw InstList_Zeela_Zoomer_UpsideUp_1 ;A3E2CA; @@ -12085,7 +11503,7 @@ InitAI_Zoomer_MZoomer: ;;; $E67A: Creepy crawly common initialisation AI ;;; InitAI_Crawlers_Common: ; Used by: sciser, zero, viola, yard, zeela, zoomer, sova, stone zoomer - LDA.W #Spritemap_Common_Nothing ;A3E67A; + LDA.W #Common_Spritemap_Nothing ;A3E67A; STA.W Enemy.spritemap,X ;A3E67D; LDA.W #$0001 ;A3E680; STA.W Enemy.instTimer,X ;A3E683; @@ -12511,7 +11929,7 @@ InstList_Metroid_ChasingSamus: dw $000A,Spritemap_Metroid_Insides_3 ;A3EA17; dw $0010,Spritemap_Metroid_Insides_1 ;A3EA1B; dw Instruction_Metroid_PlayRandomMetroidSFX ;A3EA1F; - dw Instruction_Common_GotoY ;A3EA21; + dw Common_Instruction_GotoY ;A3EA21; dw InstList_Metroid_ChasingSamus ;A3EA23; @@ -12523,7 +11941,7 @@ InstList_Metroid_DrainingSamus: dw $000A,Spritemap_Metroid_Insides_3 ;A3EA31; dw $0010,Spritemap_Metroid_Insides_1 ;A3EA35; dw Instruction_Metroid_PlayDrainingSamusSFX ;A3EA39; - dw Instruction_Common_GotoY ;A3EA3B; + dw Common_Instruction_GotoY ;A3EA3B; dw InstList_Metroid_DrainingSamus ;A3EA3D; @@ -13294,7 +12712,7 @@ EnemyShot_Metroid: ;;; $F042: Power bomb reaction - enemy $DD7F (metroid) ;;; PowerBombReaction_Metroid: - JSL.L NormalEnemyPowerBombAI ;A3F042; + JSL.L NormalEnemyPowerBombAI_Internal ;A3F042; LDA.W Enemy.health,X ;A3F046; BNE .return ;A3F049; LDA.W #$0013 ;A3F04B; diff --git a/src/bank_A4.asm b/src/bank_A4.asm index 42adb27..9470982 100644 --- a/src/bank_A4.asm +++ b/src/bank_A4.asm @@ -3,591 +3,9 @@ org $A48000 ; Common to all enemy code banks - -;;; $8000: Grapple AI - no interaction. Also unfreezes enemies(!) ;;; -CommonA4_GrappleAI_NoInteraction: -; Used by skultera, Draygon body, fire arc, Phantoon, etecoon, dachora and WS ghost - JSL.L GrappleAI_SwitchEnemyAIToMainAI ;A48000; - RTL ;A48004; - - -;;; $8005: Grapple AI - Samus latches on ;;; -CommonA4_GrappleAI_SamusLatchesOn: -; Used by gripper and Crocomire - JSL.L GrappleAI_SamusLatchesOnWithGrapple ;A48005; - RTL ;A48009; - - -;;; $800A: Grapple AI - kill enemy ;;; -CommonA4_GrappleAI_KillEnemy: -; Common - JSL.L GrappleAI_EnemyGrappleDeath ;A4800A; - RTL ;A4800E; - - -;;; $800F: Grapple AI - cancel grapple beam ;;; -CommonA4_GrappleAI_CancelGrappleBeam: -; Common - JSL.L GrappleAI_SwitchToFrozenAI ;A4800F; - RTL ;A48013; - - -;;; $8014: Grapple AI - Samus latches on - no invincibility ;;; -CommonA4_GrappleAI_SamusLatchesOn_NoInvincibility: -; Used by powamp - JSL.L GrappleAI_SamusLatchesOnWithGrapple_NoInvincibility ;A48014; - RTL ;A48018; - - -;;; $8019: Unused. Grapple AI - Samus latches on - paralyse enemy ;;; -UNUSED_CommonA4_GrappleAI_SamusLatchesOn_ParalyzeEnemy_A48019: - JSL.L GrappleAI_SamusLatchesOnWithGrapple_ParalyzeEnemy ;A48019; - RTL ;A4801D; - - -;;; $801E: Grapple AI - hurt Samus ;;; -CommonA4_GrappleAI_HurtSamus: -; Used by WS spark -; Hurt reaction happens in $9B:B932 - JSL.L GrappleAI_SwitchToFrozenAI_duplicate ;A4801E; - RTL ;A48022; - - -;;; $8023: Normal enemy touch AI ;;; -CommonA4_NormalEnemyTouchAI: - JSL.L NormalEnemyTouchAI ;A48023; - RTL ;A48027; - - -;;; $8028: Normal touch AI - no death check ;;; -CommonA4_NormalTouchAI_NoDeathCheck: - JSL.L NormalEnemyTouchAI_NoDeathCheck_External ;A48028; - RTL ;A4802C; - - -;;; $802D: Normal enemy shot AI ;;; -CommonA4_NormalEnemyShotAI: - JSL.L NormalEnemyShotAI ;A4802D; - RTL ;A48031; - - -;;; $8032: Normal enemy shot AI - no death check, no enemy shot graphic ;;; -CommonA4_NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic: - JSL.L NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic_External ;A48032; - RTL ;A48036; - - -;;; $8037: Normal enemy power bomb AI ;;; -CommonA4_NormalEnemyPowerBombAI: - JSL.L NormalEnemyPowerBombAI ;A48037; - RTL ;A4803B; - - -;;; $803C: Normal enemy power bomb AI - no death check ;;; -CommonA4_NormalEnemyPowerBombAI_NoDeathCheck: -; Kraid's power bomb AI - JSL.L NormalEnemyPowerBombAI_NoDeathCheck_External ;A4803C; - RTL ;A48040; - - -;;; $8041: Normal enemy frozen AI ;;; -CommonA4_NormalEnemyFrozenAI: - JSL.L NormalEnemyFrozenAI ;A48041; - RTL ;A48045; - - -;;; $8046: Creates a dud shot ;;; -CommonA4_CreateADudShot: - JSL.L CreateADudShot ;A48046; - RTL ;A4804A; - - -;;; $804B: RTS ;;; -RTS_A4804B: - RTS ;A4804B; - - -;;; $804C: RTL ;;; -RTL_A4804C: - RTL ;A4804C; - - -;;; $804D: Spritemap - nothing ;;; -Spritemap_CommonA4_Nothing: - dw $0000 ;A4804D; - - -;;; $804F: Extended spritemap - nothing ;;; -ExtendedSpritemap_CommonA4_Nothing: - dw $0001 ;A4804F; - dw $0000,$0000 - dw Spritemap_CommonA4_Nothing ;A48055; - dw Hitbox_CommonA4_Nothing ;A48057; - - -;;; $8059: Hitbox - nothing ;;; -Hitbox_CommonA4_Nothing: -; [n entries] [[left offset] [top offset] [right offset] [bottom offset] [p touch] [p shot]]... - dw $0001 ;A48059; - dw $0000,$0000,$0000,$0000 - dw CommonA4_NormalEnemyTouchAI ;A48063; - dw CommonA4_NormalEnemyShotAI ;A48065; - - -;;; $8067: Instruction list - delete enemy ;;; -InstList_CommonA4_DeleteEnemy: - dw Instruction_CommonA4_DeleteEnemy ;A48067; - - -;;; $8069: Two NOPs ;;; -NOPNOP_A48069: -; Used as palette by respawning enemy placeholder and Draygon's eye o_O - NOP ;A48069; - NOP ;A4806A; - - -;;; $806B: Instruction - Enemy.var5 = [[Y]] ;;; -Instruction_CommonA4_Enemy0FB2_InY: -; Used only by torizos (for enemy movement function) and escape etecoon (for enemy function) - LDA.W $0000,Y ;A4806B; - STA.W Enemy.var5,X ;A4806E; - INY ;A48071; - INY ;A48072; - RTL ;A48073; - - -;;; $8074: Instruction - Enemy.var5 = RTS ;;; -Instruction_CommonA4_SetEnemy0FB2ToRTS: - LDA.W #RTS_A4807B ;A48074; - STA.W Enemy.var5,X ;A48077; - RTL ;A4807A; - - -RTS_A4807B: - RTS ;A4807B; - - -;;; $807C: Instruction - delete enemy ;;; -Instruction_CommonA4_DeleteEnemy: - LDA.W Enemy.properties,X ;A4807C; - ORA.W #$0200 ;A4807F; - STA.W Enemy.properties,X ;A48082; - PLA ;A48085; - PEA.W ProcessEnemyInstructions_return-1 ;A48086; - RTL ;A48089; - - -;;; $808A: Instruction - call function [[Y]] ;;; -Instruction_CommonA4_CallFunctionInY: - LDA.W $0000,Y ;A4808A; - STA.B DP_Temp12 ;A4808D; - PHY ;A4808F; - PHX ;A48090; - PEA.W .manualReturn-1 ;A48091; - JMP.W (DP_Temp12) ;A48094; - - .manualReturn: - PLX ;A48097; - PLY ;A48098; - INY ;A48099; - INY ;A4809A; - RTL ;A4809B; - - -;;; $809C: Instruction - call function [[Y]] with A = [[Y] + 2] ;;; -Instruction_CommonA4_CallFunctionInY_WithA: - LDA.W $0000,Y ;A4809C; - STA.B DP_Temp12 ;A4809F; - LDA.W $0002,Y ;A480A1; - PHY ;A480A4; - PHX ;A480A5; - PEA.W .manualReturn-1 ;A480A6; - JMP.W (DP_Temp12) ;A480A9; - - .manualReturn: - PLX ;A480AC; - PLY ;A480AD; - TYA ;A480AE; - CLC ;A480AF; - ADC.W #$0004 ;A480B0; - TAY ;A480B3; - RTL ;A480B4; - - -if !FEATURE_KEEP_UNREFERENCED -;;; $80B5: Unused. Instruction - call external function [[Y]] ;;; -UNUSED_Instruction_CommonA4_CallExternalFunctionInY_A480B5: - LDA.W $0000,Y ;A480B5; - STA.B DP_Temp12 ;A480B8; - LDA.W $0001,Y ;A480BA; - STA.B DP_Temp13 ;A480BD; - PHX ;A480BF; - PHY ;A480C0; - JSL.L .externalFunction ;A480C1; - PLY ;A480C5; - PLX ;A480C6; - INY ;A480C7; - INY ;A480C8; - INY ;A480C9; - RTL ;A480CA; - - .externalFunction: - JML.W [DP_Temp12] ;A480CB; - - -;;; $80CE: Unused. Instruction - call external function [[Y]] with A = [[Y] + 3] ;;; -UNUSED_Inst_CommonA4_CallExternalFunctionInY_WithA_A480CE: - LDA.W $0000,Y ;A480CE; - STA.B DP_Temp12 ;A480D1; - LDA.W $0001,Y ;A480D3; - STA.B DP_Temp13 ;A480D6; - LDA.W $0003,Y ;A480D8; - PHX ;A480DB; - PHY ;A480DC; - JSL.L .externalFunction ;A480DD; - PLY ;A480E1; - PLX ;A480E2; - TYA ;A480E3; - CLC ;A480E4; - ADC.W #$0005 ;A480E5; - TAY ;A480E8; - RTL ;A480E9; - - .externalFunction: - JML.W [DP_Temp12] ;A480EA; -endif ; !FEATURE_KEEP_UNREFERENCED - - -;;; $80ED: Instruction - go to [[Y]] ;;; -Instruction_CommonA4_GotoY: - LDA.W $0000,Y ;A480ED; - TAY ;A480F0; - RTL ;A480F1; - - -;;; $80F2: Instruction - go to [[Y]] + ±[[Y]] ;;; -Instruction_CommonA4_GotoY_PlusY: - STY.B DP_Temp12 ;A480F2; - DEY ;A480F4; - LDA.W $0000,Y ;A480F5; - XBA ;A480F8; - BMI .highByte ;A480F9; - AND.W #$00FF ;A480FB; - BRA + ;A480FE; - - .highByte: - ORA.W #$FF00 ;A48100; - -+ CLC ;A48103; - ADC.B DP_Temp12 ;A48104; - TAY ;A48106; - RTL ;A48107; - - -;;; $8108: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonA4_DecrementTimer_GotoYIfNonZero: - DEC.W Enemy.loopCounter,X ;A48108; - BNE Instruction_CommonA4_GotoY ;A4810B; - INY ;A4810D; - INY ;A4810E; - RTL ;A4810F; - - -;;; $8110: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonA4_DecrementTimer_GotoYIfNonZero_duplicate: - DEC.W Enemy.loopCounter,X ;A48110; - BNE Instruction_CommonA4_GotoY ;A48113; - INY ;A48115; - INY ;A48116; - RTL ;A48117; - - -;;; $8118: Instruction - decrement timer and go to [Y] + ±[[Y]] if non-zero ;;; -Instruction_CommonA4_DecrementTimer_GotoY_PlusY_IfNonZero: - SEP #$20 ;A48118; - DEC.W Enemy.loopCounter,X ;A4811A; - REP #$20 ;A4811D; - BNE Instruction_CommonA4_GotoY_PlusY ;A4811F; - INY ;A48121; - RTL ;A48122; - - -;;; $8123: Instruction - timer = [[Y]] ;;; -Instruction_CommonA4_TimerInY: - LDA.W $0000,Y ;A48123; - STA.W Enemy.loopCounter,X ;A48126; - INY ;A48129; - INY ;A4812A; - RTL ;A4812B; - - -;;; $812C: Instruction - skip next instruction ;;; -Instruction_CommonA4_SkipNextInstruction: - INY ;A4812C; - INY ;A4812D; - RTL ;A4812E; - - -;;; $812F: Instruction - sleep ;;; -Instruction_CommonA4_Sleep: - DEY ;A4812F; - DEY ;A48130; - TYA ;A48131; - STA.W Enemy.instList,X ;A48132; - PLA ;A48135; - PEA.W ProcessEnemyInstructions_return-1 ;A48136; - RTL ;A48139; - - -;;; $813A: Instruction - wait [[Y]] frames ;;; -Instruction_CommonA4_WaitYFrames: -; Set instruction timer and terminate processing enemy instructions -; Used for running a delay that doesn't update graphics, -; useful for e.g. GT eye beam attack ($AA:D10D), implemented by an instruction list that has no graphical instructions, -; which allows it to be called from multiple different poses - LDA.W $0000,Y ;A4813A; - STA.W Enemy.instTimer,X ;A4813D; - INY ;A48140; - INY ;A48141; - TYA ;A48142; - STA.W Enemy.instList,X ;A48143; - PLA ;A48146; - PEA.W ProcessEnemyInstructions_return-1 ;A48147; - RTL ;A4814A; - - -;;; $814B: Instruction - transfer [[Y]] bytes from [[Y] + 2] to VRAM [[Y] + 5] ;;; -Instruction_CommonA4_TransferYBytesInYToVRAM: - PHX ;A4814B; - LDX.W VRAMWriteStack ;A4814C; - LDA.W $0000,Y ;A4814F; - STA.B VRAMWrite.size,X ;A48152; - LDA.W $0002,Y ;A48154; - STA.B VRAMWrite.src,X ;A48157; - LDA.W $0003,Y ;A48159; - STA.B VRAMWrite.src+1,X ;A4815C; - LDA.W $0005,Y ;A4815E; - STA.B VRAMWrite.dest,X ;A48161; - TXA ;A48163; - CLC ;A48164; - ADC.W #$0007 ;A48165; - STA.W VRAMWriteStack ;A48168; - TYA ;A4816B; - CLC ;A4816C; - ADC.W #$0007 ;A4816D; - TAY ;A48170; - PLX ;A48171; - RTL ;A48172; - - -;;; $8173: Instruction - enable off-screen processing ;;; -Instruction_CommonA4_EnableOffScreenProcessing: - LDA.W Enemy.properties,X ;A48173; - ORA.W #$0800 ;A48176; - STA.W Enemy.properties,X ;A48179; - RTL ;A4817C; - - -;;; $817D: Instruction - disable off-screen processing ;;; -Instruction_CommonA4_DisableOffScreenProcessing: - LDA.W Enemy.properties,X ;A4817D; - AND.W #$F7FF ;A48180; - STA.W Enemy.properties,X ;A48183; - RTL ;A48186; - - -;;; $8187: Common enemy speeds - linearly increasing ;;; -CommonA4EnemySpeeds_LinearlyIncreasing: -; _____________________ Speed -; | _______________ Subspeed -; | | _________ Negated speed -; | | | ___ Negated subspeed -; | | | | - .speed: - dw $0000 ;A48187; - .subspeed: - dw $0000 ;A48189; - .negatedSpeed: - dw $0000 ;A4818B; - .negatedSubspeed: - dw $0000 ;A4818D; - dw $0000,$1000,$FFFF,$F000 - dw $0000,$2000,$FFFF,$E000 - dw $0000,$3000,$FFFF,$D000 - dw $0000,$4000,$FFFF,$C000 - dw $0000,$5000,$FFFF,$B000 - dw $0000,$6000,$FFFF,$A000 - dw $0000,$7000,$FFFF,$9000 - dw $0000,$8000,$FFFF,$8000 - dw $0000,$9000,$FFFF,$7000 - dw $0000,$A000,$FFFF,$6000 - dw $0000,$B000,$FFFF,$5000 - dw $0000,$C000,$FFFF,$4000 - dw $0000,$D000,$FFFF,$3000 - dw $0000,$E000,$FFFF,$2000 - dw $0000,$F000,$FFFF,$1000 - dw $0001,$0000,$FFFF,$0000 - dw $0001,$1000,$FFFE,$F000 - dw $0001,$2000,$FFFE,$E000 - dw $0001,$3000,$FFFE,$D000 - dw $0001,$4000,$FFFE,$C000 - dw $0001,$5000,$FFFE,$B000 - dw $0001,$6000,$FFFE,$A000 - dw $0001,$7000,$FFFE,$9000 - dw $0001,$8000,$FFFE,$8000 - dw $0001,$9000,$FFFE,$7000 - dw $0001,$A000,$FFFE,$6000 - dw $0001,$B000,$FFFE,$5000 - dw $0001,$C000,$FFFE,$4000 - dw $0001,$D000,$FFFE,$3000 - dw $0001,$E000,$FFFE,$2000 - dw $0001,$F000,$FFFE,$1000 - dw $0002,$0000,$FFFE,$0000 - dw $0002,$1000,$FFFD,$F000 - dw $0002,$2000,$FFFD,$E000 - dw $0002,$3000,$FFFD,$D000 - dw $0002,$4000,$FFFD,$C000 - dw $0002,$5000,$FFFD,$B000 - dw $0002,$6000,$FFFD,$A000 - dw $0002,$7000,$FFFD,$9000 - dw $0002,$8000,$FFFD,$8000 - dw $0002,$9000,$FFFD,$7000 - dw $0002,$A000,$FFFD,$6000 - dw $0002,$B000,$FFFD,$5000 - dw $0002,$C000,$FFFD,$4000 - dw $0002,$D000,$FFFD,$3000 - dw $0002,$E000,$FFFD,$2000 - dw $0002,$F000,$FFFD,$1000 - dw $0003,$0000,$FFFD,$0000 - dw $0003,$1000,$FFFC,$F000 - dw $0003,$2000,$FFFC,$E000 - dw $0003,$3000,$FFFC,$D000 - dw $0003,$4000,$FFFC,$C000 - dw $0003,$5000,$FFFC,$B000 - dw $0003,$6000,$FFFC,$A000 - dw $0003,$7000,$FFFC,$9000 - dw $0003,$8000,$FFFC,$8000 - dw $0003,$9000,$FFFC,$7000 - dw $0003,$A000,$FFFC,$6000 - dw $0003,$B000,$FFFC,$5000 - dw $0003,$C000,$FFFC,$4000 - dw $0003,$D000,$FFFC,$3000 - dw $0003,$E000,$FFFC,$2000 - dw $0003,$F000,$FFFC,$1000 - dw $0004,$0000,$FFFC,$0000 - - -;;; $838F: Common enemy speeds - quadratically increasing ;;; -CommonA4EnemySpeeds_QuadraticallyIncreasing: -; _____________________ Subspeed -; | _______________ Speed -; | | _________ Negated subspeed -; | | | ___ Negated speed -; | | | | -; I.e. gravity -; Used by e.g. Botwoon when dying and falling to the floor - .subspeed: - dw $0000 ;A4838F; - .speed: - dw $0000 ;A48391; - .negatedSubspeed: - dw $0000 ;A48393; - .negatedSpeed: - dw $0000 ;A48395; - dw $0109,$0000,$FEF7,$FFFF - dw $031B,$0000,$FCE5,$FFFF - dw $0636,$0000,$F9CA,$FFFF - dw $0A5A,$0000,$F5A6,$FFFF - dw $0F87,$0000,$F079,$FFFF - dw $15BD,$0000,$EA43,$FFFF - dw $1CFC,$0000,$E304,$FFFF - dw $2544,$0000,$DABC,$FFFF - dw $2E95,$0000,$D16B,$FFFF - dw $38EF,$0000,$C711,$FFFF - dw $4452,$0000,$BBAE,$FFFF - dw $50BE,$0000,$AF42,$FFFF - dw $5E33,$0000,$A1CD,$FFFF - dw $6CB1,$0000,$934F,$FFFF - dw $7C38,$0000,$83C8,$FFFF - dw $8CC8,$0000,$7338,$FFFF - dw $9E61,$0000,$619F,$FFFF - dw $B103,$0000,$4EFD,$FFFF - dw $C4AE,$0000,$3B52,$FFFF - dw $D962,$0000,$269E,$FFFF - dw $EF1F,$0000,$10E1,$FFFF - dw $05E5,$0000,$FA1B,$FFFF - dw $14B4,$0001,$EB4C,$FFFE - dw $2D8C,$0001,$D274,$FFFE - dw $476D,$0001,$B893,$FFFE - dw $6257,$0001,$9DA9,$FFFE - dw $7E4A,$0001,$81B6,$FFFE - dw $9B46,$0001,$64BA,$FFFE - dw $B94B,$0001,$46B5,$FFFE - dw $D859,$0001,$27A7,$FFFE - dw $F870,$0001,$0790,$FFFE - dw $1090,$0002,$EF70,$FFFD - dw $32B9,$0002,$CD47,$FFFD - dw $55EB,$0002,$AA15,$FFFD - dw $7A26,$0002,$85DA,$FFFD - dw $9F6A,$0002,$6096,$FFFD - dw $C5B7,$0002,$3A49,$FFFD - dw $ED0D,$0002,$12F3,$FFFD - dw $0C6C,$0003,$F394,$FFFC - dw $35D4,$0003,$CA2C,$FFFC - dw $6045,$0003,$9FBB,$FFFC - dw $8BBF,$0003,$7441,$FFFC - dw $B842,$0003,$47BE,$FFFC - dw $E5CE,$0003,$1A32,$FFFC - dw $0B63,$0004,$F49D,$FFFB - dw $3B01,$0004,$C4FF,$FFFB - dw $6BA8,$0004,$9458,$FFFB - dw $9D58,$0004,$62A8,$FFFB - dw $D011,$0004,$2FEF,$FFFB - dw $03D3,$0004,$FC2D,$FFFB - dw $2F9E,$0005,$D062,$FFFA - dw $6572,$0005,$9A8E,$FFFA - dw $9C4F,$0005,$63B1,$FFFA - dw $D435,$0005,$2BCB,$FFFA - dw $0424,$0006,$FBDC,$FFF9 - dw $3E1C,$0006,$C1E4,$FFF9 - dw $791D,$0006,$86E3,$FFF9 - dw $B527,$0006,$4AD9,$FFF9 - dw $F23A,$0006,$0DC6,$FFF9 - dw $2756,$0007,$D8AA,$FFF8 - dw $667B,$0007,$9985,$FFF8 - dw $A6A9,$0007,$5957,$FFF8 - dw $E7E0,$0007,$1820,$FFF8 - dw $2120,$0008,$DEE0,$FFF7 - dw $6469,$0008,$9B97,$FFF7 - dw $A8BB,$0008,$5745,$FFF7 - dw $EE16,$0008,$11EA,$FFF7 - dw $2B7A,$0009,$D486,$FFF6 - dw $72E7,$0009,$8D19,$FFF6 - dw $BB5D,$0009,$44A3,$FFF6 - dw $04DC,$0009,$FB24,$FFF6 - dw $4664,$000A,$B99C,$FFF5 - dw $91F5,$000A,$6E0B,$FFF5 - dw $DE8F,$000A,$2171,$FFF5 - dw $2332,$000B,$DCCE,$FFF4 - dw $71DE,$000B,$8E22,$FFF4 - dw $C193,$000B,$3E6D,$FFF4 - dw $0951,$000C,$F6AF,$FFF3 - dw $5B18,$000C,$A4E8,$FFF3 - dw $ADE8,$000C,$5218,$FFF3 - dw $01C1,$000C,$FE3F,$FFF3 - dw $4DA3,$000D,$B25D,$FFF2 - dw $A38E,$000D,$5C72,$FFF2 - dw $FA82,$000D,$057E,$FFF2 - dw $497F,$000E,$B681,$FFF1 - dw $A285,$000E,$5D7B,$FFF1 - dw $FC94,$000E,$036C,$FFF1 - dw $4EAC,$000F,$B154,$FFF0 - dw $AACD,$000F,$5533,$FFF0 - dw $07F7,$000F,$F809,$FFF0 - dw $5D2A,$0010,$A2D6,$FFEF - dw $BC66,$0010,$439A,$FFEF - dw $13AB,$0011,$EC55,$FFEE - dw $74F9,$0011,$8B07,$FFEE +namespace CommonA4 +incsrc "common_enemy_functions.asm" +namespace off ;;; $8687: Hurt AI - enemy $DD8F (Crocomire) ;;; @@ -1535,7 +953,7 @@ Crocomire_vs_Samus_CollisionHandling: SBC.W SamusXRadius ;A48CA1; SBC.W SamusXPosition ;A48CA4; BPL .return ;A48CA7; - JSL.L NormalEnemyTouchAI ;A48CA9; + JSL.L NormalEnemyTouchAI_Internal ;A48CA9; LDA.W Enemy.XPosition ;A48CAD; SEC ;A48CB0; SBC.W Enemy.XHitboxRadius ;A48CB1; @@ -3792,7 +3210,7 @@ Palette_Crocomire_Sprite3: ;;; $B93D: Enemy touch - Crocomire - claws ;;; EnemyTouch_Crocomire_Claws: ; Used for some other hitboxes, but those are placed behind Crocomire's invisible wall (Crocomire_vs_Samus_CollisionHandling) - JSL.L NormalEnemyTouchAI ;A4B93D; + JSL.L NormalEnemyTouchAI_Internal ;A4B93D; LDA.W Crocomire.fightFlags ;A4B941; ORA.W #$4000 ;A4B944; STA.W Crocomire.fightFlags ;A4B947; @@ -4023,9 +3441,9 @@ EnemyShot_Crocomire_SpawnShotExplosion_duplicate: InstList_Crocomire_Initial: dw $0001,ExtendedSpritemap_Crocomire_0 ;A4BADE; dw Instruction_Crocomire_FightAI ;A4BAE2; - dw Instruction_Common_GotoY ;A4BAE4; + dw Common_Instruction_GotoY ;A4BAE4; dw InstList_Crocomire_Initial ;A4BAE6; - dw Instruction_Common_Sleep ;A4BAE8; + dw Common_Instruction_Sleep ;A4BAE8; ;;; $BAEA: Instruction list - Crocomire - charge forward one step (unused) ;;; @@ -4097,7 +3515,7 @@ InstList_Crocomire_ProjectileAttack_1: dw $0007,ExtendedSpritemap_Crocomire_22 ;A4BB9E; dw $0007,ExtendedSpritemap_Crocomire_23 ;A4BBA2; dw $0007,ExtendedSpritemap_Crocomire_24 ;A4BBA6; - dw Instruction_Common_GotoY ;A4BBAA; + dw Common_Instruction_GotoY ;A4BBAA; dw InstList_Crocomire_ProjectileAttack_1 ;A4BBAC; @@ -4160,7 +3578,7 @@ InstList_Crocomire_StepForward: dw Instruction_Crocomire_FightAI ;A4BC24; dw $0004,ExtendedSpritemap_Crocomire_1F ;A4BC26; dw Instruction_Crocomire_FightAI ;A4BC2A; - dw Instruction_Common_GotoY ;A4BC2C; + dw Common_Instruction_GotoY ;A4BC2C; dw InstList_Crocomire_StepForward ;A4BC2E; @@ -4373,7 +3791,7 @@ InstList_Crocomire_PowerBombReaction_MouthNotOpen_1: dw Instruction_Crocomire_MoveLeft4Pixels ;A4BE4A; dw $0004,ExtendedSpritemap_Crocomire_ChargeForward_StepBack_B ;A4BE4C; dw Instruction_Crocomire_FightAI ;A4BE50; - dw Instruction_Common_GotoY ;A4BE52; + dw Common_Instruction_GotoY ;A4BE52; dw InstList_Crocomire_PowerBombReaction_MouthNotOpen_1 ;A4BE54; @@ -4383,7 +3801,7 @@ InstList_CrocomireTongue_Fight: dw $0005,ExtendedSpritemap_Crocomire_11 ;A4BE5A; dw $0005,ExtendedSpritemap_Crocomire_12 ;A4BE5E; dw $0005,ExtendedSpritemap_Crocomire_13 ;A4BE62; - dw Instruction_Common_GotoY ;A4BE66; + dw Common_Instruction_GotoY ;A4BE66; dw InstList_CrocomireTongue_Fight ;A4BE68; @@ -4394,7 +3812,7 @@ UNUSED_InstList_CrocomireTongue_ReverseVersionOfFight_A4BE6A: dw $0005,ExtendedSpritemap_Crocomire_12 ;A4BE6E; dw $0005,ExtendedSpritemap_Crocomire_11 ;A4BE72; dw $0005,ExtendedSpritemap_Crocomire_10 ;A4BE76; - dw Instruction_Common_GotoY ;A4BE7A; + dw Common_Instruction_GotoY ;A4BE7A; dw InstList_CrocomireTongue_Fight ;A4BE7C; endif ; !FEATURE_KEEP_UNREFERENCED @@ -4466,7 +3884,7 @@ InstList_CrocomireTongue_NearSpikeWallCharge_1: dw Instruction_Crocomire_MoveLeft_SpawnCloud_HandleSpikeWall ;A4BF30; dw $0003,ExtendedSpritemap_Crocomire_ChargeForward_StepBack_B ;A4BF32; dw Instruction_Crocomire_FightAI ;A4BF36; - dw Instruction_Common_GotoY ;A4BF38; + dw Common_Instruction_GotoY ;A4BF38; dw InstList_CrocomireTongue_NearSpikeWallCharge_1 ;A4BF3A; @@ -4484,63 +3902,63 @@ InstList_Crocomire_BackOffFromSpikeWall: dw Instruction_Crocomire_ShakeScreen ;A4BF58; dw Instruction_Crocomire_MoveRight4Pixels ;A4BF5A; dw Instruction_Crocomire_FightAI ;A4BF5C; - dw Instruction_Common_GotoY ;A4BF5E; + dw Common_Instruction_GotoY ;A4BF5E; dw InstList_Crocomire_BackOffFromSpikeWall ;A4BF60; ;;; $BF62: Instruction list - sleep ;;; InstList_Crocomire_Sleep: - dw Instruction_Common_Sleep ;A4BF62; + dw Common_Instruction_Sleep ;A4BF62; ;;; $BF64: Instruction list - Crocomire - melting 1 - top row ;;; InstList_Crocomire_Melting1_TopRow: dw $7FFF,ExtendedSpritemap_Crocomire_25 ;A4BF64; - dw Instruction_Common_GotoY ;A4BF68; + dw Common_Instruction_GotoY ;A4BF68; dw InstList_Crocomire_Melting1_TopRow ;A4BF6A; ;;; $BF6C: Instruction list - Crocomire - melting 1 - top 2 rows ;;; InstList_Crocomire_Melting1_Top2Rows: dw $7FFF,ExtendedSpritemap_Crocomire_26 ;A4BF6C; - dw Instruction_Common_Sleep ;A4BF70; + dw Common_Instruction_Sleep ;A4BF70; ;;; $BF72: Instruction list - Crocomire - melting 1 - top 3 rows ;;; InstList_Crocomire_Melting1_Top3Rows: dw $7FFF,ExtendedSpritemap_Crocomire_27 ;A4BF72; - dw Instruction_Common_Sleep ;A4BF76; + dw Common_Instruction_Sleep ;A4BF76; ;;; $BF78: Instruction list - Crocomire - melting 1 - top 4 rows ;;; InstList_Crocomire_Melting1_Top4Rows: dw $7FFF,ExtendedSpritemap_Crocomire_28 ;A4BF78; - dw Instruction_Common_Sleep ;A4BF7C; + dw Common_Instruction_Sleep ;A4BF7C; ;;; $BF7E: Instruction list - Crocomire - melting 2 - top row ;;; InstList_Crocomire_Melting2_TopRow: dw $7FFF,ExtendedSpritemap_Crocomire_29 ;A4BF7E; - dw Instruction_Common_GotoY ;A4BF82; + dw Common_Instruction_GotoY ;A4BF82; dw InstList_Crocomire_Melting2_TopRow ;A4BF84; ;;; $BF86: Instruction list - Crocomire - melting 2 - top 2 rows ;;; InstList_Crocomire_Melting2_Top2Rows: dw $7FFF,ExtendedSpritemap_Crocomire_2A ;A4BF86; - dw Instruction_Common_Sleep ;A4BF8A; + dw Common_Instruction_Sleep ;A4BF8A; ;;; $BF8C: Instruction list - Crocomire - melting 2 - top 3 rows ;;; InstList_Crocomire_Melting2_Top3Rows: dw $7FFF,ExtendedSpritemap_Crocomire_2B ;A4BF8C; - dw Instruction_Common_Sleep ;A4BF90; + dw Common_Instruction_Sleep ;A4BF90; ;;; $BF92: Instruction list - Crocomire - melting 2 - top 4 rows ;;; InstList_Crocomire_Melting2_Top4Rows: dw $7FFF,ExtendedSpritemap_Crocomire_2C ;A4BF92; - dw Instruction_Common_Sleep ;A4BF96; + dw Common_Instruction_Sleep ;A4BF96; ;;; $BF98: Instruction list - Crocomire tongue - melting ;;; @@ -4550,7 +3968,7 @@ InstList_CrocomireTongue_Melting: dw $0005,ExtendedSpritemap_Crocomire_2F ;A4BFA0; dw $0005,ExtendedSpritemap_Crocomire_30 ;A4BFA4; dw $0005,ExtendedSpritemap_Crocomire_31 ;A4BFA8; - dw Instruction_Common_GotoY ;A4BFAC; + dw Common_Instruction_GotoY ;A4BFAC; dw InstList_CrocomireTongue_Melting ;A4BFAE; @@ -4561,7 +3979,7 @@ InstList_CrocomireTongue_BridgeCollapsed: dw Instruction_Crocomire_QueueCrySFX ;A4BFB8; dw $0005,ExtendedSpritemap_Crocomire_8 ;A4BFBA; dw $0005,ExtendedSpritemap_Crocomire_9 ;A4BFBE; - dw Instruction_Common_Sleep ;A4BFC2; + dw Common_Instruction_Sleep ;A4BFC2; ;;; $BFC4: Crocomire extended spritemaps ;;; @@ -7053,7 +6471,7 @@ InstList_CrocomireCorpse_Skeleton_Falling: dw $000A,ExtendedSpritemap_CrocomireCorpse_0 ;A4E14A; dw $000A,ExtendedSpritemap_CrocomireCorpse_1 ;A4E14E; dw $000A,ExtendedSpritemap_CrocomireCorpse_2 ;A4E152; - dw Instruction_Common_Sleep ;A4E156; + dw Common_Instruction_Sleep ;A4E156; ;;; $E158: Instruction list - Crocomire - skeleton - falls apart ;;; @@ -7096,13 +6514,13 @@ InstList_CrocomireCorpse_Skeleton_FallsApart_0: InstList_CrocomireCorpse_Skeleton_1: dw $7FFF,ExtendedSpritemap_CrocomireCorpse_15 ;A4E1C6; - dw Instruction_Common_Sleep ;A4E1CA; + dw Common_Instruction_Sleep ;A4E1CA; ;;; $E1CC: Instruction list - Crocomire - dead ;;; InstList_CrocomireCorpse_Skeleton_Dead: dw $7FFF,ExtendedSpritemap_CrocomireCorpse_16 ;A4E1CC; - dw Instruction_Common_Sleep ;A4E1D0; + dw Common_Instruction_Sleep ;A4E1D0; ;;; $E1D2: Instruction list - Crocomire - skeleton - flowing down the river ;;; @@ -7117,7 +6535,7 @@ InstList_CrocomireCorpse_Skeleton_FlowingDownTheRiver: dw $0004,ExtendedSpritemap_CrocomireCorpse_1E ;A4E1EE; dw $0004,ExtendedSpritemap_CrocomireCorpse_1F ;A4E1F2; dw $0014,ExtendedSpritemap_CrocomireCorpse_20 ;A4E1F6; - dw Instruction_Common_GotoY ;A4E1FA; + dw Common_Instruction_GotoY ;A4E1FA; dw InstList_CrocomireCorpse_Skeleton_FlowingDownTheRiver ;A4E1FC; diff --git a/src/bank_A5.asm b/src/bank_A5.asm index bf96c87..ce71d1e 100644 --- a/src/bank_A5.asm +++ b/src/bank_A5.asm @@ -3,591 +3,9 @@ org $A58000 ; Common to all enemy code banks - -;;; $8000: Grapple AI - no interaction. Also unfreezes enemies(!) ;;; -CommonA5_GrappleAI_NoInteraction: -; Used by skultera, Draygon body, fire arc, Phantoon, etecoon, dachora and WS ghost - JSL.L GrappleAI_SwitchEnemyAIToMainAI ;A58000; - RTL ;A58004; - - -;;; $8005: Grapple AI - Samus latches on ;;; -CommonA5_GrappleAI_SamusLatchesOn: -; Used by gripper and Crocomire - JSL.L GrappleAI_SamusLatchesOnWithGrapple ;A58005; - RTL ;A58009; - - -;;; $800A: Grapple AI - kill enemy ;;; -CommonA5_GrappleAI_KillEnemy: -; Common - JSL.L GrappleAI_EnemyGrappleDeath ;A5800A; - RTL ;A5800E; - - -;;; $800F: Grapple AI - cancel grapple beam ;;; -CommonA5_GrappleAI_CancelGrappleBeam: -; Common - JSL.L GrappleAI_SwitchToFrozenAI ;A5800F; - RTL ;A58013; - - -;;; $8014: Grapple AI - Samus latches on - no invincibility ;;; -CommonA5_GrappleAI_SamusLatchesOn_NoInvincibility: -; Used by powamp - JSL.L GrappleAI_SamusLatchesOnWithGrapple_NoInvincibility ;A58014; - RTL ;A58018; - - -;;; $8019: Unused. Grapple AI - Samus latches on - paralyse enemy ;;; -UNUSED_CommonA5_GrappleAI_SamusLatchesOn_ParalyzeEnemy_A58019: - JSL.L GrappleAI_SamusLatchesOnWithGrapple_ParalyzeEnemy ;A58019; - RTL ;A5801D; - - -;;; $801E: Grapple AI - hurt Samus ;;; -CommonA5_GrappleAI_HurtSamus: -; Used by WS spark -; Hurt reaction happens in $9B:B932 - JSL.L GrappleAI_SwitchToFrozenAI_duplicate ;A5801E; - RTL ;A58022; - - -;;; $8023: Normal enemy touch AI ;;; -CommonA5_NormalEnemyTouchAI: - JSL.L NormalEnemyTouchAI ;A58023; - RTL ;A58027; - - -;;; $8028: Normal touch AI - no death check ;;; -CommonA5_NormalTouchAI_NoDeathCheck: - JSL.L NormalEnemyTouchAI_NoDeathCheck_External ;A58028; - RTL ;A5802C; - - -;;; $802D: Normal enemy shot AI ;;; -CommonA5_NormalEnemyShotAI: - JSL.L NormalEnemyShotAI ;A5802D; - RTL ;A58031; - - -;;; $8032: Normal enemy shot AI - no death check, no enemy shot graphic ;;; -CommonA5_NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic: - JSL.L NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic_External ;A58032; - RTL ;A58036; - - -;;; $8037: Normal enemy power bomb AI ;;; -CommonA5_NormalEnemyPowerBombAI: - JSL.L NormalEnemyPowerBombAI ;A58037; - RTL ;A5803B; - - -;;; $803C: Normal enemy power bomb AI - no death check ;;; -CommonA5_NormalEnemyPowerBombAI_NoDeathCheck: -; Kraid's power bomb AI - JSL.L NormalEnemyPowerBombAI_NoDeathCheck_External ;A5803C; - RTL ;A58040; - - -;;; $8041: Normal enemy frozen AI ;;; -CommonA5_NormalEnemyFrozenAI: - JSL.L NormalEnemyFrozenAI ;A58041; - RTL ;A58045; - - -;;; $8046: Creates a dud shot ;;; -CommonA5_CreateADudShot: - JSL.L CreateADudShot ;A58046; - RTL ;A5804A; - - -;;; $804B: RTS ;;; -RTS_A5804B: - RTS ;A5804B; - - -;;; $804C: RTL ;;; -RTL_A5804C: - RTL ;A5804C; - - -;;; $804D: Spritemap - nothing ;;; -Spritemap_CommonA5_Nothing: - dw $0000 ;A5804D; - - -;;; $804F: Extended spritemap - nothing ;;; -ExtendedSpritemap_CommonA5_Nothing: - dw $0001 ;A5804F; - dw $0000,$0000 - dw Spritemap_CommonA5_Nothing ;A58055; - dw Hitbox_CommonA5_Nothing ;A58057; - - -;;; $8059: Hitbox - nothing ;;; -Hitbox_CommonA5_Nothing: -; [n entries] [[left offset] [top offset] [right offset] [bottom offset] [p touch] [p shot]]... - dw $0001 ;A58059; - dw $0000,$0000,$0000,$0000 - dw CommonA5_NormalEnemyTouchAI ;A58063; - dw CommonA5_NormalEnemyShotAI ;A58065; - - -;;; $8067: Instruction list - delete enemy ;;; -InstList_CommonA5_DeleteEnemy: - dw Instruction_CommonA5_DeleteEnemy ;A58067; - - -;;; $8069: Two NOPs ;;; -NOPNOP_A58069: -; Used as palette by respawning enemy placeholder and Draygon's eye o_O - NOP ;A58069; - NOP ;A5806A; - - -;;; $806B: Instruction - Enemy.var5 = [[Y]] ;;; -Instruction_CommonA5_Enemy0FB2_InY: -; Used only by torizos (for enemy movement function) and escape etecoon (for enemy function) - LDA.W $0000,Y ;A5806B; - STA.W Enemy.var5,X ;A5806E; - INY ;A58071; - INY ;A58072; - RTL ;A58073; - - -;;; $8074: Instruction - Enemy.var5 = RTS ;;; -Instruction_CommonA5_SetEnemy0FB2ToRTS: - LDA.W #RTS_A5807B ;A58074; - STA.W Enemy.var5,X ;A58077; - RTL ;A5807A; - - -RTS_A5807B: - RTS ;A5807B; - - -;;; $807C: Instruction - delete enemy ;;; -Instruction_CommonA5_DeleteEnemy: - LDA.W Enemy.properties,X ;A5807C; - ORA.W #$0200 ;A5807F; - STA.W Enemy.properties,X ;A58082; - PLA ;A58085; - PEA.W ProcessEnemyInstructions_return-1 ;A58086; - RTL ;A58089; - - -;;; $808A: Instruction - call function [[Y]] ;;; -Instruction_CommonA5_CallFunctionInY: - LDA.W $0000,Y ;A5808A; - STA.B DP_Temp12 ;A5808D; - PHY ;A5808F; - PHX ;A58090; - PEA.W .manualReturn-1 ;A58091; - JMP.W (DP_Temp12) ;A58094; - - .manualReturn: - PLX ;A58097; - PLY ;A58098; - INY ;A58099; - INY ;A5809A; - RTL ;A5809B; - - -;;; $809C: Instruction - call function [[Y]] with A = [[Y] + 2] ;;; -Instruction_CommonA5_CallFunctionInY_WithA: - LDA.W $0000,Y ;A5809C; - STA.B DP_Temp12 ;A5809F; - LDA.W $0002,Y ;A580A1; - PHY ;A580A4; - PHX ;A580A5; - PEA.W .manualReturn-1 ;A580A6; - JMP.W (DP_Temp12) ;A580A9; - - .manualReturn: - PLX ;A580AC; - PLY ;A580AD; - TYA ;A580AE; - CLC ;A580AF; - ADC.W #$0004 ;A580B0; - TAY ;A580B3; - RTL ;A580B4; - - -if !FEATURE_KEEP_UNREFERENCED -;;; $80B5: Unused. Instruction - call external function [[Y]] ;;; -UNUSED_Instruction_CommonA5_CallExternalFunctionInY_A580B5: - LDA.W $0000,Y ;A580B5; - STA.B DP_Temp12 ;A580B8; - LDA.W $0001,Y ;A580BA; - STA.B DP_Temp13 ;A580BD; - PHX ;A580BF; - PHY ;A580C0; - JSL.L .externalFunction ;A580C1; - PLY ;A580C5; - PLX ;A580C6; - INY ;A580C7; - INY ;A580C8; - INY ;A580C9; - RTL ;A580CA; - - .externalFunction: - JML.W [DP_Temp12] ;A580CB; - - -;;; $80CE: Unused. Instruction - call external function [[Y]] with A = [[Y] + 3] ;;; -UNUSED_Inst_CommonA5_CallExternalFunctionInY_WithA_A580CE: - LDA.W $0000,Y ;A580CE; - STA.B DP_Temp12 ;A580D1; - LDA.W $0001,Y ;A580D3; - STA.B DP_Temp13 ;A580D6; - LDA.W $0003,Y ;A580D8; - PHX ;A580DB; - PHY ;A580DC; - JSL.L .externalFunction ;A580DD; - PLY ;A580E1; - PLX ;A580E2; - TYA ;A580E3; - CLC ;A580E4; - ADC.W #$0005 ;A580E5; - TAY ;A580E8; - RTL ;A580E9; - - .externalFunction: - JML.W [DP_Temp12] ;A580EA; -endif ; !FEATURE_KEEP_UNREFERENCED - - -;;; $80ED: Instruction - go to [[Y]] ;;; -Instruction_CommonA5_GotoY: - LDA.W $0000,Y ;A580ED; - TAY ;A580F0; - RTL ;A580F1; - - -;;; $80F2: Instruction - go to [[Y]] + ±[[Y]] ;;; -Instruction_CommonA5_GotoY_PlusY: - STY.B DP_Temp12 ;A580F2; - DEY ;A580F4; - LDA.W $0000,Y ;A580F5; - XBA ;A580F8; - BMI .highByte ;A580F9; - AND.W #$00FF ;A580FB; - BRA + ;A580FE; - - .highByte: - ORA.W #$FF00 ;A58100; - -+ CLC ;A58103; - ADC.B DP_Temp12 ;A58104; - TAY ;A58106; - RTL ;A58107; - - -;;; $8108: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonA5_DecrementTimer_GotoYIfNonZero: - DEC.W Enemy.loopCounter,X ;A58108; - BNE Instruction_CommonA5_GotoY ;A5810B; - INY ;A5810D; - INY ;A5810E; - RTL ;A5810F; - - -;;; $8110: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonA5_DecrementTimer_GotoYIfNonZero_duplicate: - DEC.W Enemy.loopCounter,X ;A58110; - BNE Instruction_CommonA5_GotoY ;A58113; - INY ;A58115; - INY ;A58116; - RTL ;A58117; - - -;;; $8118: Instruction - decrement timer and go to [Y] + ±[[Y]] if non-zero ;;; -Instruction_CommonA5_DecrementTimer_GotoY_PlusY_IfNonZero: - SEP #$20 ;A58118; - DEC.W Enemy.loopCounter,X ;A5811A; - REP #$20 ;A5811D; - BNE Instruction_CommonA5_GotoY_PlusY ;A5811F; - INY ;A58121; - RTL ;A58122; - - -;;; $8123: Instruction - timer = [[Y]] ;;; -Instruction_CommonA5_TimerInY: - LDA.W $0000,Y ;A58123; - STA.W Enemy.loopCounter,X ;A58126; - INY ;A58129; - INY ;A5812A; - RTL ;A5812B; - - -;;; $812C: Instruction - skip next instruction ;;; -Instruction_CommonA5_SkipNextInstruction: - INY ;A5812C; - INY ;A5812D; - RTL ;A5812E; - - -;;; $812F: Instruction - sleep ;;; -Instruction_CommonA5_Sleep: - DEY ;A5812F; - DEY ;A58130; - TYA ;A58131; - STA.W Enemy.instList,X ;A58132; - PLA ;A58135; - PEA.W ProcessEnemyInstructions_return-1 ;A58136; - RTL ;A58139; - - -;;; $813A: Instruction - wait [[Y]] frames ;;; -Instruction_CommonA5_WaitYFrames: -; Set instruction timer and terminate processing enemy instructions -; Used for running a delay that doesn't update graphics, -; useful for e.g. GT eye beam attack ($AA:D10D), implemented by an instruction list that has no graphical instructions, -; which allows it to be called from multiple different poses - LDA.W $0000,Y ;A5813A; - STA.W Enemy.instTimer,X ;A5813D; - INY ;A58140; - INY ;A58141; - TYA ;A58142; - STA.W Enemy.instList,X ;A58143; - PLA ;A58146; - PEA.W ProcessEnemyInstructions_return-1 ;A58147; - RTL ;A5814A; - - -;;; $814B: Instruction - transfer [[Y]] bytes from [[Y] + 2] to VRAM [[Y] + 5] ;;; -Instruction_CommonA5_TransferYBytesInYToVRAM: - PHX ;A5814B; - LDX.W VRAMWriteStack ;A5814C; - LDA.W $0000,Y ;A5814F; - STA.B VRAMWrite.size,X ;A58152; - LDA.W $0002,Y ;A58154; - STA.B VRAMWrite.src,X ;A58157; - LDA.W $0003,Y ;A58159; - STA.B VRAMWrite.src+1,X ;A5815C; - LDA.W $0005,Y ;A5815E; - STA.B VRAMWrite.dest,X ;A58161; - TXA ;A58163; - CLC ;A58164; - ADC.W #$0007 ;A58165; - STA.W VRAMWriteStack ;A58168; - TYA ;A5816B; - CLC ;A5816C; - ADC.W #$0007 ;A5816D; - TAY ;A58170; - PLX ;A58171; - RTL ;A58172; - - -;;; $8173: Instruction - enable off-screen processing ;;; -Instruction_CommonA5_EnableOffScreenProcessing: - LDA.W Enemy.properties,X ;A58173; - ORA.W #$0800 ;A58176; - STA.W Enemy.properties,X ;A58179; - RTL ;A5817C; - - -;;; $817D: Instruction - disable off-screen processing ;;; -Instruction_CommonA5_DisableOffScreenProcessing: - LDA.W Enemy.properties,X ;A5817D; - AND.W #$F7FF ;A58180; - STA.W Enemy.properties,X ;A58183; - RTL ;A58186; - - -;;; $8187: Common enemy speeds - linearly increasing ;;; -CommonA5EnemySpeeds_LinearlyIncreasing: -; _____________________ Speed -; | _______________ Subspeed -; | | _________ Negated speed -; | | | ___ Negated subspeed -; | | | | - .speed: - dw $0000 ;A58187; - .subspeed: - dw $0000 ;A58189; - .negatedSpeed: - dw $0000 ;A5818B; - .negatedSubspeed: - dw $0000 ;A5818D; - dw $0000,$1000,$FFFF,$F000 - dw $0000,$2000,$FFFF,$E000 - dw $0000,$3000,$FFFF,$D000 - dw $0000,$4000,$FFFF,$C000 - dw $0000,$5000,$FFFF,$B000 - dw $0000,$6000,$FFFF,$A000 - dw $0000,$7000,$FFFF,$9000 - dw $0000,$8000,$FFFF,$8000 - dw $0000,$9000,$FFFF,$7000 - dw $0000,$A000,$FFFF,$6000 - dw $0000,$B000,$FFFF,$5000 - dw $0000,$C000,$FFFF,$4000 - dw $0000,$D000,$FFFF,$3000 - dw $0000,$E000,$FFFF,$2000 - dw $0000,$F000,$FFFF,$1000 - dw $0001,$0000,$FFFF,$0000 - dw $0001,$1000,$FFFE,$F000 - dw $0001,$2000,$FFFE,$E000 - dw $0001,$3000,$FFFE,$D000 - dw $0001,$4000,$FFFE,$C000 - dw $0001,$5000,$FFFE,$B000 - dw $0001,$6000,$FFFE,$A000 - dw $0001,$7000,$FFFE,$9000 - dw $0001,$8000,$FFFE,$8000 - dw $0001,$9000,$FFFE,$7000 - dw $0001,$A000,$FFFE,$6000 - dw $0001,$B000,$FFFE,$5000 - dw $0001,$C000,$FFFE,$4000 - dw $0001,$D000,$FFFE,$3000 - dw $0001,$E000,$FFFE,$2000 - dw $0001,$F000,$FFFE,$1000 - dw $0002,$0000,$FFFE,$0000 - dw $0002,$1000,$FFFD,$F000 - dw $0002,$2000,$FFFD,$E000 - dw $0002,$3000,$FFFD,$D000 - dw $0002,$4000,$FFFD,$C000 - dw $0002,$5000,$FFFD,$B000 - dw $0002,$6000,$FFFD,$A000 - dw $0002,$7000,$FFFD,$9000 - dw $0002,$8000,$FFFD,$8000 - dw $0002,$9000,$FFFD,$7000 - dw $0002,$A000,$FFFD,$6000 - dw $0002,$B000,$FFFD,$5000 - dw $0002,$C000,$FFFD,$4000 - dw $0002,$D000,$FFFD,$3000 - dw $0002,$E000,$FFFD,$2000 - dw $0002,$F000,$FFFD,$1000 - dw $0003,$0000,$FFFD,$0000 - dw $0003,$1000,$FFFC,$F000 - dw $0003,$2000,$FFFC,$E000 - dw $0003,$3000,$FFFC,$D000 - dw $0003,$4000,$FFFC,$C000 - dw $0003,$5000,$FFFC,$B000 - dw $0003,$6000,$FFFC,$A000 - dw $0003,$7000,$FFFC,$9000 - dw $0003,$8000,$FFFC,$8000 - dw $0003,$9000,$FFFC,$7000 - dw $0003,$A000,$FFFC,$6000 - dw $0003,$B000,$FFFC,$5000 - dw $0003,$C000,$FFFC,$4000 - dw $0003,$D000,$FFFC,$3000 - dw $0003,$E000,$FFFC,$2000 - dw $0003,$F000,$FFFC,$1000 - dw $0004,$0000,$FFFC,$0000 - - -;;; $838F: Common enemy speeds - quadratically increasing ;;; -CommonA5EnemySpeeds_QuadraticallyIncreasing: -; I.e. gravity -; Used by e.g. Botwoon when dying and falling to the floor -; _____________________ Subspeed -; | _______________ Speed -; | | _________ Negated subspeed -; | | | ___ Negated speed -; | | | | - .subspeed: - dw $0000 ;A5838F; - .speed: - dw $0000 ;A58391; - .negatedSubspeed: - dw $0000 ;A58393; - .negatedSpeed: - dw $0000 ;A58395; - dw $0109,$0000,$FEF7,$FFFF - dw $031B,$0000,$FCE5,$FFFF - dw $0636,$0000,$F9CA,$FFFF - dw $0A5A,$0000,$F5A6,$FFFF - dw $0F87,$0000,$F079,$FFFF - dw $15BD,$0000,$EA43,$FFFF - dw $1CFC,$0000,$E304,$FFFF - dw $2544,$0000,$DABC,$FFFF - dw $2E95,$0000,$D16B,$FFFF - dw $38EF,$0000,$C711,$FFFF - dw $4452,$0000,$BBAE,$FFFF - dw $50BE,$0000,$AF42,$FFFF - dw $5E33,$0000,$A1CD,$FFFF - dw $6CB1,$0000,$934F,$FFFF - dw $7C38,$0000,$83C8,$FFFF - dw $8CC8,$0000,$7338,$FFFF - dw $9E61,$0000,$619F,$FFFF - dw $B103,$0000,$4EFD,$FFFF - dw $C4AE,$0000,$3B52,$FFFF - dw $D962,$0000,$269E,$FFFF - dw $EF1F,$0000,$10E1,$FFFF - dw $05E5,$0000,$FA1B,$FFFF - dw $14B4,$0001,$EB4C,$FFFE - dw $2D8C,$0001,$D274,$FFFE - dw $476D,$0001,$B893,$FFFE - dw $6257,$0001,$9DA9,$FFFE - dw $7E4A,$0001,$81B6,$FFFE - dw $9B46,$0001,$64BA,$FFFE - dw $B94B,$0001,$46B5,$FFFE - dw $D859,$0001,$27A7,$FFFE - dw $F870,$0001,$0790,$FFFE - dw $1090,$0002,$EF70,$FFFD - dw $32B9,$0002,$CD47,$FFFD - dw $55EB,$0002,$AA15,$FFFD - dw $7A26,$0002,$85DA,$FFFD - dw $9F6A,$0002,$6096,$FFFD - dw $C5B7,$0002,$3A49,$FFFD - dw $ED0D,$0002,$12F3,$FFFD - dw $0C6C,$0003,$F394,$FFFC - dw $35D4,$0003,$CA2C,$FFFC - dw $6045,$0003,$9FBB,$FFFC - dw $8BBF,$0003,$7441,$FFFC - dw $B842,$0003,$47BE,$FFFC - dw $E5CE,$0003,$1A32,$FFFC - dw $0B63,$0004,$F49D,$FFFB - dw $3B01,$0004,$C4FF,$FFFB - dw $6BA8,$0004,$9458,$FFFB - dw $9D58,$0004,$62A8,$FFFB - dw $D011,$0004,$2FEF,$FFFB - dw $03D3,$0004,$FC2D,$FFFB - dw $2F9E,$0005,$D062,$FFFA - dw $6572,$0005,$9A8E,$FFFA - dw $9C4F,$0005,$63B1,$FFFA - dw $D435,$0005,$2BCB,$FFFA - dw $0424,$0006,$FBDC,$FFF9 - dw $3E1C,$0006,$C1E4,$FFF9 - dw $791D,$0006,$86E3,$FFF9 - dw $B527,$0006,$4AD9,$FFF9 - dw $F23A,$0006,$0DC6,$FFF9 - dw $2756,$0007,$D8AA,$FFF8 - dw $667B,$0007,$9985,$FFF8 - dw $A6A9,$0007,$5957,$FFF8 - dw $E7E0,$0007,$1820,$FFF8 - dw $2120,$0008,$DEE0,$FFF7 - dw $6469,$0008,$9B97,$FFF7 - dw $A8BB,$0008,$5745,$FFF7 - dw $EE16,$0008,$11EA,$FFF7 - dw $2B7A,$0009,$D486,$FFF6 - dw $72E7,$0009,$8D19,$FFF6 - dw $BB5D,$0009,$44A3,$FFF6 - dw $04DC,$0009,$FB24,$FFF6 - dw $4664,$000A,$B99C,$FFF5 - dw $91F5,$000A,$6E0B,$FFF5 - dw $DE8F,$000A,$2171,$FFF5 - dw $2332,$000B,$DCCE,$FFF4 - dw $71DE,$000B,$8E22,$FFF4 - dw $C193,$000B,$3E6D,$FFF4 - dw $0951,$000C,$F6AF,$FFF3 - dw $5B18,$000C,$A4E8,$FFF3 - dw $ADE8,$000C,$5218,$FFF3 - dw $01C1,$000C,$FE3F,$FFF3 - dw $4DA3,$000D,$B25D,$FFF2 - dw $A38E,$000D,$5C72,$FFF2 - dw $FA82,$000D,$057E,$FFF2 - dw $497F,$000E,$B681,$FFF1 - dw $A285,$000E,$5D7B,$FFF1 - dw $FC94,$000E,$036C,$FFF1 - dw $4EAC,$000F,$B154,$FFF0 - dw $AACD,$000F,$5533,$FFF0 - dw $07F7,$000F,$F809,$FFF0 - dw $5D2A,$0010,$A2D6,$FFEF - dw $BC66,$0010,$439A,$FFEF - dw $13AB,$0011,$EC55,$FFEE - dw $74F9,$0011,$8B07,$FFEE +namespace CommonA5 +incsrc "common_enemy_functions.asm" +namespace off ;;; $8687: Initialisation AI - enemy $DE3F (Draygon body) ;;; @@ -2011,7 +1429,7 @@ Function_DraygonBody_DeathSequence_DriftToDeathSpot: STY.W Enemy[1].instList ;A59284; LDA.W #$0001 ;A59287; STA.W Enemy[1].instTimer ;A5928A; - LDA.W #RTS_A5804B ;A5928D; + LDA.W #Common_RTS_A0804B ;A5928D; STA.W DraygonEye.function ;A59290; .return: @@ -2536,7 +1954,7 @@ DraygonReaction_Common: + STY.W Enemy[1].instList ;A5963F; LDA.W #$0001 ;A59642; STA.W Enemy[1].instTimer ;A59645; - LDA.W #RTS_A5804B ;A59648; + LDA.W #Common_RTS_A0804B ;A59648; STA.W DraygonEye.function ;A5964B; LDA.W #Function_DraygonBody_DeathSequence_DriftToDeathSpot ;A5964E; STA.W DraygonBody.function ;A59651; @@ -2733,7 +2151,7 @@ GenerateRandomDyingDraygonSpriteObjectPosition: ;;; $97B9: Instruction list - sleep ;;; InstList_Draygon_Sleep: - dw Instruction_Common_Sleep ;A597B9; + dw Common_Instruction_Sleep ;A597B9; ;;; $97BB: Instruction list - Draygon body - facing left - reset ;;; @@ -2747,7 +2165,7 @@ InstList_DraygonBody_FacingLeft_Reset: dw Instruction_Draygon_EyeFunctionInY ;A597C7; dw Function_DraygonEye_FacingLeft ;A597C9; dw $0001,ExtendedSpritemap_Draygon_1A ;A597CB; - dw Instruction_Common_Sleep ;A597CF; + dw Common_Instruction_Sleep ;A597CF; ;;; $97D1: Instruction list - Draygon body - facing right - reset ;;; @@ -2761,7 +2179,7 @@ InstList_DraygonBody_FacingRight_Reset: dw Instruction_Draygon_EyeFunctionInY ;A597DD; dw Function_DraygonEye_FacingRight ;A597DF; dw $0001,ExtendedSpritemap_Draygon_4A ;A597E1; - dw Instruction_Common_Sleep ;A597E5; + dw Common_Instruction_Sleep ;A597E5; ;;; $97E7: Instruction list - Draygon arms - facing left - idle ;;; @@ -2772,11 +2190,11 @@ InstList_DraygonArms_FacingLeft_Idle_0: dw $0005,ExtendedSpritemap_Draygon_7 ;A597F3; dw $0005,ExtendedSpritemap_Draygon_8 ;A597F7; dw $0005,ExtendedSpritemap_Draygon_9 ;A597FB; - dw Instruction_Common_GotoY ;A597FF; + dw Common_Instruction_GotoY ;A597FF; dw InstList_DraygonArms_FacingLeft_Idle_0 ;A59801; InstList_DraygonArms_FacingLeft_Idle_1: - dw Instruction_Common_Sleep ;A59803; + dw Common_Instruction_Sleep ;A59803; if !FEATURE_KEEP_UNREFERENCED @@ -2785,7 +2203,7 @@ UNUSED_InstList_DraygonArms_A59805: dw $0001,ExtendedSpritemap_Draygon_1D ;A59805; dw $0001,ExtendedSpritemap_Draygon_1C ;A59809; dw $0040,ExtendedSpritemap_Draygon_1B ;A5980D; - dw Instruction_Common_Sleep ;A59811; + dw Common_Instruction_Sleep ;A59811; endif ; !FEATURE_KEEP_UNREFERENCED @@ -2795,7 +2213,7 @@ InstList_DraygonArms_FacingLeft_NearSwoopApex: dw $0001,ExtendedSpritemap_Draygon_1C ;A59817; dw $0001,ExtendedSpritemap_Draygon_1D ;A5981B; dw $0040,ExtendedSpritemap_Draygon_1E ;A5981F; - dw Instruction_Common_Sleep ;A59823; + dw Common_Instruction_Sleep ;A59823; ;;; $9825: Instruction list - Draygon arms - facing left - fake grab ;;; @@ -2808,7 +2226,7 @@ Debug_InstList_DraygonArms_FacingLeft_FakeGrab: dw $0001,ExtendedSpritemap_Draygon_1D ;A59835; dw $0001,ExtendedSpritemap_Draygon_1C ;A59839; dw $0040,ExtendedSpritemap_Draygon_1B ;A5983D; - dw Instruction_Common_GotoY ;A59841; + dw Common_Instruction_GotoY ;A59841; dw InstList_DraygonArms_FacingLeft_Idle_0 ;A59843; @@ -2822,7 +2240,7 @@ InstList_DraygonArms_FacingLeft_Grab: dw $0001,ExtendedSpritemap_Draygon_1C ;A59859; dw $0001,ExtendedSpritemap_Draygon_1B ;A5985D; dw $0001,ExtendedSpritemap_Draygon_1C ;A59861; - dw Instruction_Common_Sleep ;A59865; + dw Common_Instruction_Sleep ;A59865; ;;; $9867: Instruction list - Draygon body - facing left - dying ;;; @@ -2831,7 +2249,7 @@ InstList_DraygonArms_FacingLeft_Dying: dw $0005,ExtendedSpritemap_Draygon_B ;A5986B; dw $0005,ExtendedSpritemap_Draygon_C ;A5986F; dw $0005,ExtendedSpritemap_Draygon_D ;A59873; - dw Instruction_Common_GotoY ;A59877; + dw Common_Instruction_GotoY ;A59877; dw InstList_DraygonBody_Dying_0 ;A59879; @@ -2841,7 +2259,7 @@ UNUSED_InstList_DraygonBody_A5987B: dw $0005,ExtendedSpritemap_Draygon_C ;A5987B; dw $0005,ExtendedSpritemap_Draygon_B ;A5987F; dw $0005,ExtendedSpritemap_Draygon_A ;A59883; - dw Instruction_Common_Sleep ;A59887; + dw Common_Instruction_Sleep ;A59887; endif ; !FEATURE_KEEP_UNREFERENCED @@ -2851,7 +2269,7 @@ InstList_DraygonBody_FacingLeft_Idle: dw Instruction_Draygon_EyeFunctionInY ;A5988B; dw Function_DraygonEye_FacingLeft ;A5988D; dw $0001,ExtendedSpritemap_Draygon_1A ;A5988F; - dw Instruction_Common_Sleep ;A59893; + dw Common_Instruction_Sleep ;A59893; ;;; $9895: Instruction - room loading interrupt command = Draygon's room - begin HUD drawing ;;; @@ -2865,28 +2283,28 @@ Instruction_Draygon_RoomLoadingInterruptCmd_BeginHUDDraw: InstList_DraygonBody_Dying_0: dw Instruction_Draygon_QueueSFXInY_Lib3_Max6,$001B ;A5989B; dw Instruction_DraygonBody_SetAsIntangible ;A5989F; - dw Instruction_Common_TimerInY,$0008 ;A598A1; + dw Common_Instruction_TimerInY,$0008 ;A598A1; InstList_DraygonBody_Dying_1: - dw Instruction_Common_WaitYFrames,$000C ;A598A5; + dw Common_Instruction_WaitYFrames,$000C ;A598A5; dw Inst_Draygon_SpawnDyingDraygonSpriteObject_BigExplosion ;A598A9; dw Inst_Draygon_SpawnDyingDraygonSpriteObject_SmallExplosion ;A598AB; dw Inst_Draygon_SpawnDyingDraygonSpriteObject_BigDustCloud ;A598AD; dw Inst_Draygon_SpawnDyingDraygonSpriteObject_BreathBubbles ;A598AF; dw Instruction_Draygon_QueueSFXInY_Lib2_Max6,$0025 ;A598B1; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;A598B5; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;A598B5; dw InstList_DraygonBody_Dying_1 ;A598B7; - dw Instruction_Common_WaitYFrames,$0001 ;A598B9; + dw Common_Instruction_WaitYFrames,$0001 ;A598B9; dw Instruction_Draygon_ParalyseDraygonTailAndArms ;A598BD; InstList_DraygonBody_Dying_2: - dw Instruction_Common_WaitYFrames,$0010 ;A598BF; + dw Common_Instruction_WaitYFrames,$0010 ;A598BF; dw Inst_Draygon_SpawnDyingDraygonSpriteObject_BigExplosion ;A598C3; dw Inst_Draygon_SpawnDyingDraygonSpriteObject_SmallExplosion ;A598C5; dw Inst_Draygon_SpawnDyingDraygonSpriteObject_BigDustCloud ;A598C7; dw Inst_Draygon_SpawnDyingDraygonSpriteObject_BreathBubbles ;A598C9; dw Instruction_Draygon_QueueSFXInY_Lib2_Max6,$0025 ;A598CB; - dw Instruction_Common_GotoY ;A598CF; + dw Common_Instruction_GotoY ;A598CF; dw InstList_DraygonBody_Dying_2 ;A598D1; @@ -2908,7 +2326,7 @@ Instruction_Draygon_ParalyseDraygonTailAndArms: ;;; $98ED: Instruction list - delete ;;; InstList_Draygon_Delete: - dw Instruction_Common_DeleteEnemy ;A598ED; + dw Common_Instruction_DeleteEnemy ;A598ED; ;;; $98EF: Instruction - set Draygon body as intangible ;;; @@ -2933,7 +2351,7 @@ InstList_DraygonBody_FacingLeft_FireGoop: dw $0002,ExtendedSpritemap_Draygon_10 ;A59914; dw $0002,ExtendedSpritemap_Draygon_F ;A59918; dw $0001,ExtendedSpritemap_Draygon_E ;A5991C; - dw Instruction_Common_Sleep ;A59920; + dw Common_Instruction_Sleep ;A59920; ;;; $9922: Instruction list - Draygon body - facing left - roar ;;; @@ -2946,7 +2364,7 @@ InstList_DraygonBody_FacingLeft_Roar: dw $0006,ExtendedSpritemap_Draygon_10 ;A59936; dw $0006,ExtendedSpritemap_Draygon_F ;A5993A; dw $0006,ExtendedSpritemap_Draygon_E ;A5993E; - dw Instruction_Common_Sleep ;A59942; + dw Common_Instruction_Sleep ;A59942; ;;; $9944: Instruction list - Draygon eye - facing left - idle ;;; @@ -2965,23 +2383,23 @@ InstList_DraygonEye_FacingLeft_Idle: dw $0005,ExtendedSpritemap_Draygon_12 ;A59970; dw Instruction_Draygon_FunctionInY ;A59974; dw Function_DraygonEye_FacingLeft ;A59976; - dw Instruction_Common_Sleep ;A59978; + dw Common_Instruction_Sleep ;A59978; ;;; $997A: Instruction list - Draygon eye - facing left - dying ;;; InstList_DraygonEye_FacingLeft_Dying_0: - dw Instruction_Common_TimerInY,$0004 ;A5997A; + dw Common_Instruction_TimerInY,$0004 ;A5997A; InstList_DraygonEye_FacingLeft_Dying_1: dw $0004,ExtendedSpritemap_Draygon_16 ;A5997E; dw $0004,ExtendedSpritemap_Draygon_18 ;A59982; dw $0004,ExtendedSpritemap_Draygon_17 ;A59986; dw $0004,ExtendedSpritemap_Draygon_19 ;A5998A; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;A5998E; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;A5998E; dw InstList_DraygonEye_FacingLeft_Dying_1 ;A59990; dw $0020,ExtendedSpritemap_Draygon_15 ;A59992; dw $0010,ExtendedSpritemap_Draygon_14 ;A59996; - dw Instruction_Common_Sleep ;A5999A; + dw Common_Instruction_Sleep ;A5999A; ;;; $999C: Instruction list - Draygon eye - facing left - dead ;;; @@ -2990,31 +2408,31 @@ InstList_DraygonEye_FacingLeft_Dead: dw $0020,ExtendedSpritemap_Draygon_14 ;A599A0; dw $0020,ExtendedSpritemap_Draygon_13 ;A599A4; dw $0001,ExtendedSpritemap_Draygon_12 ;A599A8; - dw Instruction_Common_Sleep ;A599AC; + dw Common_Instruction_Sleep ;A599AC; ;;; $99AE: Instruction list - Draygon eye - facing left - looking left ;;; InstList_DraygonEye_FacingLeft_LookingLeft: dw $0001,ExtendedSpritemap_Draygon_16 ;A599AE; - dw Instruction_Common_Sleep ;A599B2; + dw Common_Instruction_Sleep ;A599B2; ;;; $99B4: Instruction list - Draygon eye - facing left - looking right ;;; InstList_DraygonEye_FacingLeft_LookingRight: dw $0001,ExtendedSpritemap_Draygon_17 ;A599B4; - dw Instruction_Common_Sleep ;A599B8; + dw Common_Instruction_Sleep ;A599B8; ;;; $99BA: Instruction list - Draygon eye - facing left - looking up ;;; InstList_DraygonEye_FacingLeft_LookingUp: dw $0001,ExtendedSpritemap_Draygon_18 ;A599BA; - dw Instruction_Common_Sleep ;A599BE; + dw Common_Instruction_Sleep ;A599BE; ;;; $99C0: Instruction list - Draygon eye - facing left - looking down ;;; InstList_DraygonEye_FacingLeft_LookingDown: dw $0001,ExtendedSpritemap_Draygon_19 ;A599C0; - dw Instruction_Common_Sleep ;A599C4; + dw Common_Instruction_Sleep ;A599C4; ;;; $99C6: Instruction list - Draygon tail - facing left - idle ;;; @@ -3031,11 +2449,11 @@ InstList_DraygonTail_FacingLeft_Idle_0: dw $0006,ExtendedSpritemap_Draygon_25 ;A599EA; dw $0006,ExtendedSpritemap_Draygon_24 ;A599EE; dw $0007,ExtendedSpritemap_Draygon_23 ;A599F2; - dw Instruction_Common_GotoY ;A599F6; + dw Common_Instruction_GotoY ;A599F6; dw InstList_DraygonTail_FacingLeft_Idle_0 ;A599F8; InstList_DraygonTail_FacingLeft_Idle_1: - dw Instruction_Common_Sleep ;A599FA; + dw Common_Instruction_Sleep ;A599FA; ;;; $99FC: Instruction list - Draygon tail - facing left - fake tail whip ;;; @@ -3063,13 +2481,13 @@ InstList_DraygonTail_FacingLeft_FakeTailWhip: dw $0004,ExtendedSpritemap_Draygon_2B ;A59A58; dw $0005,ExtendedSpritemap_Draygon_2A ;A59A5C; dw $0006,ExtendedSpritemap_Draygon_29 ;A59A60; - dw Instruction_Common_GotoY ;A59A64; + dw Common_Instruction_GotoY ;A59A64; dw InstList_DraygonTail_FacingLeft_Idle_0 ;A59A66; ;;; $9A68: Instruction list - Draygon tail - facing left - final tail whips ;;; InstList_DraygonTail_FacingLeft_FinalTailWhips_0: - dw Instruction_Common_TimerInY,$0004 ;A59A68; + dw Common_Instruction_TimerInY,$0004 ;A59A68; InstList_DraygonTail_FacingLeft_FinalTailWhips_1: dw Instruction_DraygonBody_DisplaceGraphics,$FFFF,$FFFF ;A59A6C; @@ -3096,15 +2514,15 @@ InstList_DraygonTail_FacingLeft_FinalTailWhips_1: dw $0004,ExtendedSpritemap_Draygon_2B ;A59ACE; dw $0005,ExtendedSpritemap_Draygon_2A ;A59AD2; dw $0006,ExtendedSpritemap_Draygon_29 ;A59AD6; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;A59ADA; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;A59ADA; dw InstList_DraygonTail_FacingLeft_FinalTailWhips_1 ;A59ADC; dw Instruction_Draygon_BodyFunctionInY ;A59ADE; dw Function_DraygonBody_GrabbedSamus_FlailTail_FlyStraightUp ;A59AE0; - dw Instruction_Common_GotoY ;A59AE2; + dw Common_Instruction_GotoY ;A59AE2; dw InstList_DraygonTail_FacingLeft_Idle_0 ;A59AE4; InstList_DraygonTail_FacingLeft_FinalTailWhips_2: - dw Instruction_Common_Sleep ;A59AE6; + dw Common_Instruction_Sleep ;A59AE6; ;;; $9AE8: Instruction list - Draygon tail - facing left - tail whip ;;; @@ -3133,7 +2551,7 @@ InstList_DraygonTail_FacingLeft_TailWhip: dw $0004,ExtendedSpritemap_Draygon_2B ;A59B4A; dw $0005,ExtendedSpritemap_Draygon_2A ;A59B4E; dw $0006,ExtendedSpritemap_Draygon_29 ;A59B52; - dw Instruction_Common_GotoY ;A59B56; + dw Common_Instruction_GotoY ;A59B56; dw InstList_DraygonTail_FacingLeft_Idle_0 ;A59B58; @@ -3155,7 +2573,7 @@ InstList_DraygonTail_FacingLeft_TailFlail: dw $0004,ExtendedSpritemap_Draygon_2B ;A59B8A; dw $0005,ExtendedSpritemap_Draygon_2A ;A59B8E; dw $0006,ExtendedSpritemap_Draygon_29 ;A59B92; - dw Instruction_Common_GotoY ;A59B96; + dw Common_Instruction_GotoY ;A59B96; dw InstList_DraygonTail_FacingLeft_Idle_0 ;A59B98; @@ -3197,11 +2615,11 @@ InstList_DraygonArms_FacingRight_Idle_0: dw $0005,ExtendedSpritemap_Draygon_37 ;A59BE6; dw $0005,ExtendedSpritemap_Draygon_38 ;A59BEA; dw $0005,ExtendedSpritemap_Draygon_39 ;A59BEE; - dw Instruction_Common_GotoY ;A59BF2; + dw Common_Instruction_GotoY ;A59BF2; dw InstList_DraygonArms_FacingRight_Idle_0 ;A59BF4; InstList_DraygonArms_FacingRight_Idle_1: - dw Instruction_Common_Sleep ;A59BF6; + dw Common_Instruction_Sleep ;A59BF6; if !FEATURE_KEEP_UNREFERENCED @@ -3210,7 +2628,7 @@ UNUSED_InstList_DraygonArms_A59BF8: dw $0001,ExtendedSpritemap_Draygon_4D ;A59BF8; dw $0001,ExtendedSpritemap_Draygon_4C ;A59BFC; dw $0040,ExtendedSpritemap_Draygon_4B ;A59C00; - dw Instruction_Common_Sleep ;A59C04; + dw Common_Instruction_Sleep ;A59C04; endif ; !FEATURE_KEEP_UNREFERENCED @@ -3220,7 +2638,7 @@ InstList_DraygonArms_FacingRight_NearSwoopApex: dw $0001,ExtendedSpritemap_Draygon_4C ;A59C0A; dw $0001,ExtendedSpritemap_Draygon_4D ;A59C0E; dw $0040,ExtendedSpritemap_Draygon_4E ;A59C12; - dw Instruction_Common_Sleep ;A59C16; + dw Common_Instruction_Sleep ;A59C16; ;;; $9C18: Instruction list - Draygon arms - facing right - fake grab ;;; @@ -3233,7 +2651,7 @@ Debug_InstList_DraygonArms_FacingRight_FakeGrab: dw $0001,ExtendedSpritemap_Draygon_4D ;A59C28; dw $0001,ExtendedSpritemap_Draygon_4C ;A59C2C; dw $0040,ExtendedSpritemap_Draygon_4B ;A59C30; - dw Instruction_Common_GotoY ;A59C34; + dw Common_Instruction_GotoY ;A59C34; dw InstList_DraygonArms_FacingRight_Idle_0 ;A59C36; @@ -3247,7 +2665,7 @@ InstList_DraygonArms_FacingRight_Grab: dw $0001,ExtendedSpritemap_Draygon_4C ;A59C4C; dw $0001,ExtendedSpritemap_Draygon_4B ;A59C50; dw $0001,ExtendedSpritemap_Draygon_4C ;A59C54; - dw Instruction_Common_Sleep ;A59C58; + dw Common_Instruction_Sleep ;A59C58; ;;; $9C5A: Instruction list - Draygon body - facing right - dying ;;; @@ -3256,11 +2674,11 @@ InstList_DraygonArms_FacingRight_Dying_0: dw $0005,ExtendedSpritemap_Draygon_3B ;A59C5E; dw $0005,ExtendedSpritemap_Draygon_3C ;A59C62; dw $0005,ExtendedSpritemap_Draygon_3D ;A59C66; - dw Instruction_Common_GotoY ;A59C6A; + dw Common_Instruction_GotoY ;A59C6A; dw InstList_DraygonBody_Dying_0 ;A59C6C; InstList_DraygonBody_FacingRight_Dying_1: - dw Instruction_Common_Sleep ;A59C6E; + dw Common_Instruction_Sleep ;A59C6E; if !FEATURE_KEEP_UNREFERENCED @@ -3269,7 +2687,7 @@ UNUSED_InstList_DraygonBody_A59C70: dw $0005,ExtendedSpritemap_Draygon_3C ;A59C70; dw $0005,ExtendedSpritemap_Draygon_3B ;A59C74; dw $0005,ExtendedSpritemap_Draygon_3A ;A59C78; - dw Instruction_Common_Sleep ;A59C7C; + dw Common_Instruction_Sleep ;A59C7C; endif ; !FEATURE_KEEP_UNREFERENCED @@ -3279,7 +2697,7 @@ InstList_DraygonBody_FacingRight_Idle: dw Instruction_Draygon_EyeFunctionInY ;A59C80; dw Function_DraygonEye_FacingRight ;A59C82; dw $0001,ExtendedSpritemap_Draygon_4A ;A59C84; - dw Instruction_Common_Sleep ;A59C88; + dw Common_Instruction_Sleep ;A59C88; ;;; $9C8A: Instruction - room loading interrupt command = Draygon's room - begin HUD drawing ;;; @@ -3300,7 +2718,7 @@ InstList_DraygonBody_FacingRight_FireGoop: dw $0002,ExtendedSpritemap_Draygon_40 ;A59CA6; dw $0002,ExtendedSpritemap_Draygon_3F ;A59CAA; dw $0001,ExtendedSpritemap_Draygon_3E ;A59CAE; - dw Instruction_Common_Sleep ;A59CB2; + dw Common_Instruction_Sleep ;A59CB2; ;;; $9CB4: Instruction list - Draygon body - facing right - roar ;;; @@ -3313,7 +2731,7 @@ InstList_DraygonBody_FacingRight_Roar: dw $0006,ExtendedSpritemap_Draygon_40 ;A59CC8; dw $0006,ExtendedSpritemap_Draygon_3F ;A59CCC; dw $0006,ExtendedSpritemap_Draygon_3E ;A59CD0; - dw Instruction_Common_Sleep ;A59CD4; + dw Common_Instruction_Sleep ;A59CD4; ;;; $9CD6: Instruction list - Draygon eye - facing right - idle ;;; @@ -3332,7 +2750,7 @@ InstList_DraygonEye_FacingRight_Idle: dw $0005,ExtendedSpritemap_Draygon_42 ;A59D02; dw Instruction_Draygon_FunctionInY ;A59D06; dw Function_DraygonEye_FacingLeft ;A59D08; - dw Instruction_Common_Sleep ;A59D0A; + dw Common_Instruction_Sleep ;A59D0A; if !FEATURE_KEEP_UNREFERENCED @@ -3347,18 +2765,18 @@ endif ; !FEATURE_KEEP_UNREFERENCED ;;; $9D1C: Instruction list - Draygon eye - facing right - dying ;;; InstList_DraygonEye_FacingRight_Dying_0: - dw Instruction_Common_TimerInY,$0004 ;A59D1C; + dw Common_Instruction_TimerInY,$0004 ;A59D1C; InstList_DraygonEye_FacingRight_Dying_1: dw $0004,ExtendedSpritemap_Draygon_46 ;A59D20; dw $0004,ExtendedSpritemap_Draygon_48 ;A59D24; dw $0004,ExtendedSpritemap_Draygon_47 ;A59D28; dw $0004,ExtendedSpritemap_Draygon_49 ;A59D2C; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;A59D30; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;A59D30; dw InstList_DraygonEye_FacingRight_Dying_1 ;A59D32; dw $0020,ExtendedSpritemap_Draygon_45 ;A59D34; dw $0010,ExtendedSpritemap_Draygon_44 ;A59D38; - dw Instruction_Common_Sleep ;A59D3C; + dw Common_Instruction_Sleep ;A59D3C; ;;; $9D3E: Instruction list - Draygon eye - facing right - dead ;;; @@ -3367,31 +2785,31 @@ InstList_DraygonEye_FacingRight_Dead: dw $0020,ExtendedSpritemap_Draygon_44 ;A59D42; dw $0020,ExtendedSpritemap_Draygon_43 ;A59D46; dw $0001,ExtendedSpritemap_Draygon_42 ;A59D4A; - dw Instruction_Common_Sleep ;A59D4E; + dw Common_Instruction_Sleep ;A59D4E; ;;; $9D50: Instruction list - Draygon eye - facing right - looking right ;;; InstList_DraygonEye_FacingRight_LookingRight: dw $0001,ExtendedSpritemap_Draygon_46 ;A59D50; - dw Instruction_Common_Sleep ;A59D54; + dw Common_Instruction_Sleep ;A59D54; ;;; $9D56: Instruction list - Draygon eye - facing right - looking left ;;; InstList_DraygonEye_FacingRight_LookingLeft: dw $0001,ExtendedSpritemap_Draygon_47 ;A59D56; - dw Instruction_Common_Sleep ;A59D5A; + dw Common_Instruction_Sleep ;A59D5A; ;;; $9D5C: Instruction list - Draygon eye - facing right - looking up ;;; InstList_DraygonEye_FacingRight_LookingUp: dw $0001,ExtendedSpritemap_Draygon_48 ;A59D5C; - dw Instruction_Common_Sleep ;A59D60; + dw Common_Instruction_Sleep ;A59D60; ;;; $9D62: Instruction list - Draygon eye - facing right - looking down ;;; InstList_DraygonEye_FacingRight_LookingDown: dw $0001,ExtendedSpritemap_Draygon_49 ;A59D62; - dw Instruction_Common_Sleep ;A59D66; + dw Common_Instruction_Sleep ;A59D66; ;;; $9D68: Instruction list - Draygon tail - facing right - idle ;;; @@ -3408,11 +2826,11 @@ InstList_DraygonTail_FacingRight_Idle_0: dw $0006,ExtendedSpritemap_Draygon_5C ;A59D8C; dw $0006,ExtendedSpritemap_Draygon_5B ;A59D90; dw $0007,ExtendedSpritemap_Draygon_5A ;A59D94; - dw Instruction_Common_GotoY ;A59D98; + dw Common_Instruction_GotoY ;A59D98; dw InstList_DraygonTail_FacingRight_Idle_0 ;A59D9A; InstList_DraygonTail_FacingRight_Idle_1: - dw Instruction_Common_Sleep ;A59D9C; + dw Common_Instruction_Sleep ;A59D9C; ;;; $9D9E: Instruction list - Draygon tail - facing right - fake tail whip ;;; @@ -3440,7 +2858,7 @@ Debug_InstList_DraygonTail_FacingRight_FakeTailWhip: dw $0004,ExtendedSpritemap_Draygon_62 ;A59DFA; dw $0005,ExtendedSpritemap_Draygon_61 ;A59DFE; dw $0006,ExtendedSpritemap_Draygon_60 ;A59E02; - dw Instruction_Common_GotoY ;A59E06; + dw Common_Instruction_GotoY ;A59E06; dw InstList_DraygonTail_FacingRight_Idle_0 ;A59E08; @@ -3463,7 +2881,7 @@ Instruction_DraygonBody_DisplaceGraphics: ;;; $9E21: Instruction list - Draygon tail - facing right - final tail whips ;;; InstList_DraygonTail_FacingRight_FinalTailWhips_0: - dw Instruction_Common_TimerInY,$0004 ;A59E21; + dw Common_Instruction_TimerInY,$0004 ;A59E21; InstList_DraygonTail_FacingRight_FinalTailWhips_1: dw Instruction_DraygonBody_DisplaceGraphics,$0001,$FFFF ;A59E25; @@ -3490,15 +2908,15 @@ InstList_DraygonTail_FacingRight_FinalTailWhips_1: dw $0004,ExtendedSpritemap_Draygon_62 ;A59E87; dw $0005,ExtendedSpritemap_Draygon_61 ;A59E8B; dw $0006,ExtendedSpritemap_Draygon_60 ;A59E8F; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;A59E93; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;A59E93; dw InstList_DraygonTail_FacingRight_FinalTailWhips_1 ;A59E95; dw Instruction_Draygon_BodyFunctionInY ;A59E97; dw Function_DraygonBody_GrabbedSamus_FlailTail_FlyStraightUp ;A59E99; - dw Instruction_Common_GotoY ;A59E9B; + dw Common_Instruction_GotoY ;A59E9B; dw InstList_DraygonTail_FacingRight_Idle_0 ;A59E9D; InstList_DraygonTail_FacingRight_FinalTailWhips_2: - dw Instruction_Common_Sleep ;A59E9F; + dw Common_Instruction_Sleep ;A59E9F; ;;; $9EA1: Instruction list - Draygon tail - facing right - tail whip ;;; @@ -3527,11 +2945,11 @@ InstList_DraygonTail_FacingRight_TailWhip_0: dw $0004,ExtendedSpritemap_Draygon_62 ;A59F03; dw $0005,ExtendedSpritemap_Draygon_61 ;A59F07; dw $0006,ExtendedSpritemap_Draygon_60 ;A59F0B; - dw Instruction_Common_GotoY ;A59F0F; + dw Common_Instruction_GotoY ;A59F0F; dw InstList_DraygonTail_FacingRight_Idle_0 ;A59F11; InstList_DraygonTail_FacingRight_TailWhip_1: - dw Instruction_Common_Sleep ;A59F13; + dw Common_Instruction_Sleep ;A59F13; ;;; $9F15: Instruction list - Draygon tail - facing right - tail flail ;;; @@ -3552,11 +2970,11 @@ InstList_DraygonTail_FacingRight_TailFlail_0: dw $0004,ExtendedSpritemap_Draygon_62 ;A59F45; dw $0005,ExtendedSpritemap_Draygon_61 ;A59F49; dw $0006,ExtendedSpritemap_Draygon_60 ;A59F4D; - dw Instruction_Common_GotoY ;A59F51; + dw Common_Instruction_GotoY ;A59F51; dw InstList_DraygonTail_FacingRight_Idle_0 ;A59F53; InstList_DraygonTail_FacingRight_TailFlail_1: - dw Instruction_Common_Sleep ;A59F55; + dw Common_Instruction_Sleep ;A59F55; ;;; $9F57: Instruction - Draygon body function = [[Y]] ;;; @@ -4885,8 +4303,8 @@ Hitbox_Draygon_6: Hitbox_Draygon_7: dw $0001 ;A5A9AF; dw $FFF7,$FFF7,$0004,$0007 - dw RTL_A5804C ;A5A9B9; - dw RTL_A5804C ;A5A9BB; + dw Common_RTL_A0804C ;A5A9B9; + dw Common_RTL_A0804C ;A5A9BB; Hitbox_Draygon_8: dw $0000 ;A5A9BD; @@ -4990,7 +4408,7 @@ Hitbox_Draygon_19: Hitbox_Draygon_1A: dw $0004 ;A5AA95; dw $FFEF,$FFF0,$0012,$001E - dw RTL_A5804C ;A5AA9F; + dw Common_RTL_A0804C ;A5AA9F; dw EnemyShot_Draygon ;A5AAA1; dw $FFC5,$FFBE,$0003,$FFE2 ;A5AAA3; dw EnemyTouch_Draygon ;A5AAAB; @@ -5032,8 +4450,8 @@ Hitbox_Draygon_1F: Hitbox_Draygon_20: dw $0001 ;A5AB01; dw $FFFB,$FFF7,$0007,$0007 - dw RTL_A5804C ;A5AB0B; - dw RTL_A5804C ;A5AB0D; + dw Common_RTL_A0804C ;A5AB0B; + dw Common_RTL_A0804C ;A5AB0D; Hitbox_Draygon_21: dw $0001 ;A5AB0F; @@ -5107,7 +4525,7 @@ Hitbox_Draygon_2C: Hitbox_Draygon_2D: dw $0004 ;A5ABAB; dw $FFEE,$FFF9,$0012,$001E - dw RTL_A5804C ;A5ABB5; + dw Common_RTL_A0804C ;A5ABB5; dw EnemyShot_Draygon ;A5ABB7; dw $FFF6,$FFC1,$003E,$FFE6 ;A5ABB9; dw EnemyTouch_Draygon ;A5ABC1; @@ -6434,7 +5852,7 @@ InitAI_DraygonEye: LDX.W EnemyIndex ;A5C46B; LDA.W #InstList_DraygonEye_FacingLeft_Idle ;A5C46E; STA.W Enemy.instList,X ;A5C471; - LDA.W #RTS_A5804B ;A5C474; + LDA.W #Common_RTS_A0804B ;A5C474; STA.W DraygonBody.function,X ;A5C477; RTL ;A5C47A; @@ -7253,7 +6671,7 @@ InstList_SporeSpawn_Initial_Dead: dw Instruction_SporeSpawn_FunctionInY ;A5E6BD; dw RTS_A5EB1A ;A5E6BF; dw $0001,ExtendedSpritemap_SporeSpawn_Dead ;A5E6C1; - dw Instruction_Common_Sleep ;A5E6C5; + dw Common_Instruction_Sleep ;A5E6C5; ;;; $E6C7: Instruction list - initial - Spore Spawn is alive ;;; @@ -7262,7 +6680,7 @@ InstList_SporeSpawn_Initial_Alive: dw Instruction_SporeSpawn_FunctionInY ;A5E6CB; dw Function_SporeSpawn_Descent ;A5E6CD; dw $0001,ExtendedSpritemap_SporeSpawn_Closed_Closing_Opening_0 ;A5E6CF; - dw Instruction_Common_Sleep ;A5E6D3; + dw Common_Instruction_Sleep ;A5E6D3; ;;; $E6D5: Instruction list - fight has started ;;; @@ -7288,14 +6706,14 @@ InstList_SporeSpawn_OpenAndStop_0: dw Instruction_SporeSpawn_ClearDamagedFlag ;A5E70B; dw Instruction_SporeSpawn_FunctionInY ;A5E70D; dw RTS_A5EB1A ;A5E70F; - dw Instruction_Common_TimerInY,$0005 ;A5E711; + dw Common_Instruction_TimerInY,$0005 ;A5E711; InstList_SporeSpawn_OpenAndStop_1: dw $0008,ExtendedSpritemap_SporeSpawn_FullyOpen_0 ;A5E715; dw $0008,ExtendedSpritemap_SporeSpawn_FullyOpen_1 ;A5E719; dw $0008,ExtendedSpritemap_SporeSpawn_FullyOpen_2 ;A5E71D; dw $0008,ExtendedSpritemap_SporeSpawn_FullyOpen_1 ;A5E721; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;A5E725; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;A5E725; dw InstList_SporeSpawn_OpenAndStop_1 ;A5E727; @@ -7315,7 +6733,7 @@ InstList_SporeSpawn_CloseAndMove: dw $0200,ExtendedSpritemap_SporeSpawn_Closed_Closing_Opening_0 ;A5E74F; dw Instruction_SporeSpawn_SporeGenerationFlagInY,$0001 ;A5E753; dw $00D0,ExtendedSpritemap_SporeSpawn_Closed_Closing_Opening_0 ;A5E755; - dw Instruction_Common_GotoY ;A5E75B; + dw Common_Instruction_GotoY ;A5E75B; dw InstList_SporeSpawn_OpenAndStop_0 ;A5E75D; @@ -7351,13 +6769,13 @@ InstList_SporeSpawn_DeathSequence_0: dw $0001,ExtendedSpritemap_SporeSpawn_Closed_Closing_Opening_6 ;A5E781; dw Instruction_SporeSpawn_FunctionInY ;A5E785; dw Function_SporeSpawn_Dying ;A5E787; - dw Instruction_Common_TimerInY,$000A ;A5E789; + dw Common_Instruction_TimerInY,$000A ;A5E789; InstList_SporeSpawn_DeathSequence_1: dw $0001,ExtendedSpritemap_SporeSpawn_Closed_Closing_Opening_6 ;A5E78D; dw Instruction_SporeSpawn_SpawnDyingExplosion ;A5E791; - dw Instruction_Common_WaitYFrames,$0008 ;A5E793; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;A5E797; + dw Common_Instruction_WaitYFrames,$0008 ;A5E793; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;A5E797; dw InstList_SporeSpawn_DeathSequence_1 ;A5E799; dw $0008,ExtendedSpritemap_SporeSpawn_Closed_Closing_Opening_6 ;A5E79B; dw $0008,ExtendedSpritemap_SporeSpawn_Closed_Closing_Opening_5 ;A5E79F; @@ -7367,12 +6785,12 @@ InstList_SporeSpawn_DeathSequence_1: dw $0008,ExtendedSpritemap_SporeSpawn_Closed_Closing_Opening_1 ;A5E7AF; dw $0001,ExtendedSpritemap_SporeSpawn_Dead ;A5E7B3; dw Instruction_SporeSpawn_Harden ;A5E7B7; - dw Instruction_Common_TimerInY,$000A ;A5E7B9; + dw Common_Instruction_TimerInY,$000A ;A5E7B9; InstList_SporeSpawn_DeathSequence_2: dw Instruction_SporeSpawn_SpawnHardeningDustCloud ;A5E7BD; - dw Instruction_Common_WaitYFrames,$0008 ;A5E7BF; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;A5E7C3; + dw Common_Instruction_WaitYFrames,$0008 ;A5E7BF; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;A5E7C3; dw InstList_SporeSpawn_DeathSequence_2 ;A5E7C5; dw Instruction_SporeSpawn_LoadDeathSequencePalette,$0000 ;A5E7C7; dw Instruction_SporeSpawn_SpawnHardeningDustCloud ;A5E7CB; @@ -7396,7 +6814,7 @@ InstList_SporeSpawn_DeathSequence_2: dw Instruction_SporeSpawn_SpawnHardeningDustCloud ;A5E807; dw $0010,ExtendedSpritemap_SporeSpawn_Dead ;A5E809; dw Instruction_SporeSpawn_CallSporeSpawnDeathItemDropRoutine ;A5E80D; - dw Instruction_Common_Sleep ;A5E80F; + dw Common_Instruction_Sleep ;A5E80F; if !FEATURE_KEEP_UNREFERENCED @@ -8400,10 +7818,10 @@ ExtendedSpritemap_SporeSpawn_FullyOpen_2: Hitbox_SporeSpawn_0: dw $0002 ;A5EF73; dw $FFD7,$FFE2,$0029,$001E - dw RTL_A5804C ;A5EF7D; + dw Common_RTL_A0804C ;A5EF7D; dw Common_CreateADudShot ;A5EF7F; dw $FFF0,$FFD3,$000F,$FFE2 ;A5EF81; - dw RTL_A5804C ;A5EF89; + dw Common_RTL_A0804C ;A5EF89; dw Common_CreateADudShot ;A5EF8B; Hitbox_SporeSpawn_1: diff --git a/src/bank_A6.asm b/src/bank_A6.asm index 21533c1..b47af61 100644 --- a/src/bank_A6.asm +++ b/src/bank_A6.asm @@ -3,591 +3,9 @@ org $A68000 ; Common to all enemy code banks - -;;; $8000: Grapple AI - no interaction. Also unfreezes enemies(!) ;;; -CommonA6_GrappleAI_NoInteraction: -; Used by skultera, Draygon body, fire arc, Phantoon, etecoon, dachora and WS ghost - JSL.L GrappleAI_SwitchEnemyAIToMainAI ;A68000; - RTL ;A68004; - - -;;; $8005: Grapple AI - Samus latches on ;;; -CommonA6_GrappleAI_SamusLatchesOn: -; Used by gripper and Crocomire - JSL.L GrappleAI_SamusLatchesOnWithGrapple ;A68005; - RTL ;A68009; - - -;;; $800A: Grapple AI - kill enemy ;;; -CommonA6_GrappleAI_KillEnemy: -; Common - JSL.L GrappleAI_EnemyGrappleDeath ;A6800A; - RTL ;A6800E; - - -;;; $800F: Grapple AI - cancel grapple beam ;;; -CommonA6_GrappleAI_CancelGrappleBeam: -; Common - JSL.L GrappleAI_SwitchToFrozenAI ;A6800F; - RTL ;A68013; - - -;;; $8014: Grapple AI - Samus latches on - no invincibility ;;; -CommonA6_GrappleAI_SamusLatchesOn_NoInvincibility: -; Used by powamp - JSL.L GrappleAI_SamusLatchesOnWithGrapple_NoInvincibility ;A68014; - RTL ;A68018; - - -;;; $8019: Unused. Grapple AI - Samus latches on - paralyse enemy ;;; -UNUSED_CommonA6_GrappleAI_SamusLatchesOn_ParalyzeEnemy_A68019: - JSL.L GrappleAI_SamusLatchesOnWithGrapple_ParalyzeEnemy ;A68019; - RTL ;A6801D; - - -;;; $801E: Grapple AI - hurt Samus ;;; -CommonA6_GrappleAI_HurtSamus: -; Used by WS spark -; Hurt reaction happens in $9B:B932 - JSL.L GrappleAI_SwitchToFrozenAI_duplicate ;A6801E; - RTL ;A68022; - - -;;; $8023: Normal enemy touch AI ;;; -CommonA6_NormalEnemyTouchAI: - JSL.L NormalEnemyTouchAI ;A68023; - RTL ;A68027; - - -;;; $8028: Normal touch AI - no death check ;;; -CommonA6_NormalTouchAI_NoDeathCheck: - JSL.L NormalEnemyTouchAI_NoDeathCheck_External ;A68028; - RTL ;A6802C; - - -;;; $802D: Normal enemy shot AI ;;; -CommonA6_NormalEnemyShotAI: - JSL.L NormalEnemyShotAI ;A6802D; - RTL ;A68031; - - -;;; $8032: Normal enemy shot AI - no death check, no enemy shot graphic ;;; -CommonA6_NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic: - JSL.L NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic_External ;A68032; - RTL ;A68036; - - -;;; $8037: Normal enemy power bomb AI ;;; -CommonA6_NormalEnemyPowerBombAI: - JSL.L NormalEnemyPowerBombAI ;A68037; - RTL ;A6803B; - - -;;; $803C: Normal enemy power bomb AI - no death check ;;; -CommonA6_NormalEnemyPowerBombAI_NoDeathCheck: -; Kraid's power bomb AI - JSL.L NormalEnemyPowerBombAI_NoDeathCheck_External ;A6803C; - RTL ;A68040; - - -;;; $8041: Normal enemy frozen AI ;;; -CommonA6_NormalEnemyFrozenAI: - JSL.L NormalEnemyFrozenAI ;A68041; - RTL ;A68045; - - -;;; $8046: Creates a dud shot ;;; -CommonA6_CreateADudShot: - JSL.L CreateADudShot ;A68046; - RTL ;A6804A; - - -;;; $804B: RTS ;;; -RTS_A6804B: - RTS ;A6804B; - - -;;; $804C: RTL ;;; -RTL_A6804C: - RTL ;A6804C; - - -;;; $804D: Spritemap - nothing ;;; -Spritemap_CommonA6_Nothing: - dw $0000 ;A6804D; - - -;;; $804F: Extended spritemap - nothing ;;; -ExtendedSpritemap_CommonA6_Nothing: - dw $0001 ;A6804F; - dw $0000,$0000 - dw Spritemap_CommonA6_Nothing ;A68055; - dw Hitbox_CommonA6_Nothing ;A68057; - - -;;; $8059: Hitbox - nothing ;;; -Hitbox_CommonA6_Nothing: -; [n entries] [[left offset] [top offset] [right offset] [bottom offset] [p touch] [p shot]]... - dw $0001 ;A68059; - dw $0000,$0000,$0000,$0000 - dw CommonA6_NormalEnemyTouchAI ;A68063; - dw CommonA6_NormalEnemyShotAI ;A68065; - - -;;; $8067: Instruction list - delete enemy ;;; -InstList_CommonA6_DeleteEnemy: - dw Instruction_CommonA6_DeleteEnemy ;A68067; - - -;;; $8069: Two NOPs ;;; -NOPNOP_A68069: -; Used as palette by respawning enemy placeholder and Draygon's eye o_O - NOP ;A68069; - NOP ;A6806A; - - -;;; $806B: Instruction - Enemy.var5 = [[Y]] ;;; -Instruction_CommonA6_Enemy0FB2_InY: -; Used only by torizos (for enemy movement function) and escape etecoon (for enemy function) - LDA.W $0000,Y ;A6806B; - STA.W Enemy.var5,X ;A6806E; - INY ;A68071; - INY ;A68072; - RTL ;A68073; - - -;;; $8074: Instruction - Enemy.var5 = RTS ;;; -Instruction_CommonA6_SetEnemy0FB2ToRTS: - LDA.W #RTS_A6807B ;A68074; - STA.W Enemy.var5,X ;A68077; - RTL ;A6807A; - - -RTS_A6807B: - RTS ;A6807B; - - -;;; $807C: Instruction - delete enemy ;;; -Instruction_CommonA6_DeleteEnemy: - LDA.W Enemy.properties,X ;A6807C; - ORA.W #$0200 ;A6807F; - STA.W Enemy.properties,X ;A68082; - PLA ;A68085; - PEA.W ProcessEnemyInstructions_return-1 ;A68086; - RTL ;A68089; - - -;;; $808A: Instruction - call function [[Y]] ;;; -Instruction_CommonA6_CallFunctionInY: - LDA.W $0000,Y ;A6808A; - STA.B DP_Temp12 ;A6808D; - PHY ;A6808F; - PHX ;A68090; - PEA.W .manualReturn-1 ;A68091; - JMP.W (DP_Temp12) ;A68094; - - .manualReturn: - PLX ;A68097; - PLY ;A68098; - INY ;A68099; - INY ;A6809A; - RTL ;A6809B; - - -;;; $809C: Instruction - call function [[Y]] with A = [[Y] + 2] ;;; -Instruction_CommonA6_CallFunctionInY_WithA: - LDA.W $0000,Y ;A6809C; - STA.B DP_Temp12 ;A6809F; - LDA.W $0002,Y ;A680A1; - PHY ;A680A4; - PHX ;A680A5; - PEA.W .manualReturn-1 ;A680A6; - JMP.W (DP_Temp12) ;A680A9; - - .manualReturn: - PLX ;A680AC; - PLY ;A680AD; - TYA ;A680AE; - CLC ;A680AF; - ADC.W #$0004 ;A680B0; - TAY ;A680B3; - RTL ;A680B4; - - -if !FEATURE_KEEP_UNREFERENCED -;;; $80B5: Unused. Instruction - call external function [[Y]] ;;; -UNUSED_Instruction_CommonA6_CallExternalFunctionInY_A680B5: - LDA.W $0000,Y ;A680B5; - STA.B DP_Temp12 ;A680B8; - LDA.W $0001,Y ;A680BA; - STA.B DP_Temp13 ;A680BD; - PHX ;A680BF; - PHY ;A680C0; - JSL.L .externalFunction ;A680C1; - PLY ;A680C5; - PLX ;A680C6; - INY ;A680C7; - INY ;A680C8; - INY ;A680C9; - RTL ;A680CA; - - .externalFunction: - JML.W [DP_Temp12] ;A680CB; - - -;;; $80CE: Unused. Instruction - call external function [[Y]] with A = [[Y] + 3] ;;; -UNUSED_Inst_CommonA6_CallExternalFunctionInY_WithA_A680CE: - LDA.W $0000,Y ;A680CE; - STA.B DP_Temp12 ;A680D1; - LDA.W $0001,Y ;A680D3; - STA.B DP_Temp13 ;A680D6; - LDA.W $0003,Y ;A680D8; - PHX ;A680DB; - PHY ;A680DC; - JSL.L .externalFunction ;A680DD; - PLY ;A680E1; - PLX ;A680E2; - TYA ;A680E3; - CLC ;A680E4; - ADC.W #$0005 ;A680E5; - TAY ;A680E8; - RTL ;A680E9; - - .externalFunction: - JML.W [DP_Temp12] ;A680EA; -endif ; !FEATURE_KEEP_UNREFERENCED - - -;;; $80ED: Instruction - go to [[Y]] ;;; -Instruction_CommonA6_GotoY: - LDA.W $0000,Y ;A680ED; - TAY ;A680F0; - RTL ;A680F1; - - -;;; $80F2: Instruction - go to [[Y]] + ±[[Y]] ;;; -Instruction_CommonA6_GotoY_PlusY: - STY.B DP_Temp12 ;A680F2; - DEY ;A680F4; - LDA.W $0000,Y ;A680F5; - XBA ;A680F8; - BMI .highByte ;A680F9; - AND.W #$00FF ;A680FB; - BRA + ;A680FE; - - .highByte: - ORA.W #$FF00 ;A68100; - -+ CLC ;A68103; - ADC.B DP_Temp12 ;A68104; - TAY ;A68106; - RTL ;A68107; - - -;;; $8108: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonA6_DecrementTimer_GotoYIfNonZero: - DEC.W Enemy.loopCounter,X ;A68108; - BNE Instruction_CommonA6_GotoY ;A6810B; - INY ;A6810D; - INY ;A6810E; - RTL ;A6810F; - - -;;; $8110: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonA6_DecrementTimer_GotoYIfNonZero_duplicate: - DEC.W Enemy.loopCounter,X ;A68110; - BNE Instruction_CommonA6_GotoY ;A68113; - INY ;A68115; - INY ;A68116; - RTL ;A68117; - - -;;; $8118: Instruction - decrement timer and go to [Y] + ±[[Y]] if non-zero ;;; -Instruction_CommonA6_DecrementTimer_GotoY_PlusY_IfNonZero: - SEP #$20 ;A68118; - DEC.W Enemy.loopCounter,X ;A6811A; - REP #$20 ;A6811D; - BNE Instruction_CommonA6_GotoY_PlusY ;A6811F; - INY ;A68121; - RTL ;A68122; - - -;;; $8123: Instruction - timer = [[Y]] ;;; -Instruction_CommonA6_TimerInY: - LDA.W $0000,Y ;A68123; - STA.W Enemy.loopCounter,X ;A68126; - INY ;A68129; - INY ;A6812A; - RTL ;A6812B; - - -;;; $812C: Instruction - skip next instruction ;;; -Instruction_CommonA6_SkipNextInstruction: - INY ;A6812C; - INY ;A6812D; - RTL ;A6812E; - - -;;; $812F: Instruction - sleep ;;; -Instruction_CommonA6_Sleep: - DEY ;A6812F; - DEY ;A68130; - TYA ;A68131; - STA.W Enemy.instList,X ;A68132; - PLA ;A68135; - PEA.W ProcessEnemyInstructions_return-1 ;A68136; - RTL ;A68139; - - -;;; $813A: Instruction - wait [[Y]] frames ;;; -Instruction_CommonA6_WaitYFrames: -; Set instruction timer and terminate processing enemy instructions -; Used for running a delay that doesn't update graphics, -; useful for e.g. GT eye beam attack ($AA:D10D), implemented by an instruction list that has no graphical instructions, -; which allows it to be called from multiple different poses - LDA.W $0000,Y ;A6813A; - STA.W Enemy.instTimer,X ;A6813D; - INY ;A68140; - INY ;A68141; - TYA ;A68142; - STA.W Enemy.instList,X ;A68143; - PLA ;A68146; - PEA.W ProcessEnemyInstructions_return-1 ;A68147; - RTL ;A6814A; - - -;;; $814B: Instruction - transfer [[Y]] bytes from [[Y] + 2] to VRAM [[Y] + 5] ;;; -Instruction_CommonA6_TransferYBytesInYToVRAM: - PHX ;A6814B; - LDX.W VRAMWriteStack ;A6814C; - LDA.W $0000,Y ;A6814F; - STA.B VRAMWrite.size,X ;A68152; - LDA.W $0002,Y ;A68154; - STA.B VRAMWrite.src,X ;A68157; - LDA.W $0003,Y ;A68159; - STA.B VRAMWrite.src+1,X ;A6815C; - LDA.W $0005,Y ;A6815E; - STA.B $D5,X ;A68161; - TXA ;A68163; - CLC ;A68164; - ADC.W #$0007 ;A68165; - STA.W VRAMWriteStack ;A68168; - TYA ;A6816B; - CLC ;A6816C; - ADC.W #$0007 ;A6816D; - TAY ;A68170; - PLX ;A68171; - RTL ;A68172; - - -;;; $8173: Instruction - enable off-screen processing ;;; -Instruction_CommonA6_EnableOffScreenProcessing: - LDA.W Enemy.properties,X ;A68173; - ORA.W #$0800 ;A68176; - STA.W Enemy.properties,X ;A68179; - RTL ;A6817C; - - -;;; $817D: Instruction - disable off-screen processing ;;; -Instruction_CommonA6_DisableOffScreenProcessing: - LDA.W Enemy.properties,X ;A6817D; - AND.W #$F7FF ;A68180; - STA.W Enemy.properties,X ;A68183; - RTL ;A68186; - - -;;; $8187: Common enemy speeds - linearly increasing ;;; -CommonA6EnemySpeeds_LinearlyIncreasing: -; _____________________ Speed -; | _______________ Subspeed -; | | _________ Negated speed -; | | | ___ Negated subspeed -; | | | | - .speed: - dw $0000 ;A68187; - .subspeed: - dw $0000 ;A68189; - .negatedSpeed: - dw $0000 ;A6818B; - .negatedSubspeed: - dw $0000 ;A6818D; - dw $0000,$1000,$FFFF,$F000 - dw $0000,$2000,$FFFF,$E000 - dw $0000,$3000,$FFFF,$D000 - dw $0000,$4000,$FFFF,$C000 - dw $0000,$5000,$FFFF,$B000 - dw $0000,$6000,$FFFF,$A000 - dw $0000,$7000,$FFFF,$9000 - dw $0000,$8000,$FFFF,$8000 - dw $0000,$9000,$FFFF,$7000 - dw $0000,$A000,$FFFF,$6000 - dw $0000,$B000,$FFFF,$5000 - dw $0000,$C000,$FFFF,$4000 - dw $0000,$D000,$FFFF,$3000 - dw $0000,$E000,$FFFF,$2000 - dw $0000,$F000,$FFFF,$1000 - dw $0001,$0000,$FFFF,$0000 - dw $0001,$1000,$FFFE,$F000 - dw $0001,$2000,$FFFE,$E000 - dw $0001,$3000,$FFFE,$D000 - dw $0001,$4000,$FFFE,$C000 - dw $0001,$5000,$FFFE,$B000 - dw $0001,$6000,$FFFE,$A000 - dw $0001,$7000,$FFFE,$9000 - dw $0001,$8000,$FFFE,$8000 - dw $0001,$9000,$FFFE,$7000 - dw $0001,$A000,$FFFE,$6000 - dw $0001,$B000,$FFFE,$5000 - dw $0001,$C000,$FFFE,$4000 - dw $0001,$D000,$FFFE,$3000 - dw $0001,$E000,$FFFE,$2000 - dw $0001,$F000,$FFFE,$1000 - dw $0002,$0000,$FFFE,$0000 - dw $0002,$1000,$FFFD,$F000 - dw $0002,$2000,$FFFD,$E000 - dw $0002,$3000,$FFFD,$D000 - dw $0002,$4000,$FFFD,$C000 - dw $0002,$5000,$FFFD,$B000 - dw $0002,$6000,$FFFD,$A000 - dw $0002,$7000,$FFFD,$9000 - dw $0002,$8000,$FFFD,$8000 - dw $0002,$9000,$FFFD,$7000 - dw $0002,$A000,$FFFD,$6000 - dw $0002,$B000,$FFFD,$5000 - dw $0002,$C000,$FFFD,$4000 - dw $0002,$D000,$FFFD,$3000 - dw $0002,$E000,$FFFD,$2000 - dw $0002,$F000,$FFFD,$1000 - dw $0003,$0000,$FFFD,$0000 - dw $0003,$1000,$FFFC,$F000 - dw $0003,$2000,$FFFC,$E000 - dw $0003,$3000,$FFFC,$D000 - dw $0003,$4000,$FFFC,$C000 - dw $0003,$5000,$FFFC,$B000 - dw $0003,$6000,$FFFC,$A000 - dw $0003,$7000,$FFFC,$9000 - dw $0003,$8000,$FFFC,$8000 - dw $0003,$9000,$FFFC,$7000 - dw $0003,$A000,$FFFC,$6000 - dw $0003,$B000,$FFFC,$5000 - dw $0003,$C000,$FFFC,$4000 - dw $0003,$D000,$FFFC,$3000 - dw $0003,$E000,$FFFC,$2000 - dw $0003,$F000,$FFFC,$1000 - dw $0004,$0000,$FFFC,$0000 - - -;;; $838F: Common enemy speeds - quadratically increasing ;;; -CommonA6EnemySpeeds_QuadraticallyIncreasing: -; I.e. gravity -; Used by e.g. Botwoon when dying and falling to the floor -; _____________________ Subspeed -; | _______________ Speed -; | | _________ Negated subspeed -; | | | ___ Negated speed -; | | | | - .subspeed: - dw $0000 ;A6838F; - .speed: - dw $0000 ;A68391; - .negatedSubspeed: - dw $0000 ;A68393; - .negatedSpeed: - dw $0000 ;A68395; - dw $0109,$0000,$FEF7,$FFFF - dw $031B,$0000,$FCE5,$FFFF - dw $0636,$0000,$F9CA,$FFFF - dw $0A5A,$0000,$F5A6,$FFFF - dw $0F87,$0000,$F079,$FFFF - dw $15BD,$0000,$EA43,$FFFF - dw $1CFC,$0000,$E304,$FFFF - dw $2544,$0000,$DABC,$FFFF - dw $2E95,$0000,$D16B,$FFFF - dw $38EF,$0000,$C711,$FFFF - dw $4452,$0000,$BBAE,$FFFF - dw $50BE,$0000,$AF42,$FFFF - dw $5E33,$0000,$A1CD,$FFFF - dw $6CB1,$0000,$934F,$FFFF - dw $7C38,$0000,$83C8,$FFFF - dw $8CC8,$0000,$7338,$FFFF - dw $9E61,$0000,$619F,$FFFF - dw $B103,$0000,$4EFD,$FFFF - dw $C4AE,$0000,$3B52,$FFFF - dw $D962,$0000,$269E,$FFFF - dw $EF1F,$0000,$10E1,$FFFF - dw $05E5,$0000,$FA1B,$FFFF - dw $14B4,$0001,$EB4C,$FFFE - dw $2D8C,$0001,$D274,$FFFE - dw $476D,$0001,$B893,$FFFE - dw $6257,$0001,$9DA9,$FFFE - dw $7E4A,$0001,$81B6,$FFFE - dw $9B46,$0001,$64BA,$FFFE - dw $B94B,$0001,$46B5,$FFFE - dw $D859,$0001,$27A7,$FFFE - dw $F870,$0001,$0790,$FFFE - dw $1090,$0002,$EF70,$FFFD - dw $32B9,$0002,$CD47,$FFFD - dw $55EB,$0002,$AA15,$FFFD - dw $7A26,$0002,$85DA,$FFFD - dw $9F6A,$0002,$6096,$FFFD - dw $C5B7,$0002,$3A49,$FFFD - dw $ED0D,$0002,$12F3,$FFFD - dw $0C6C,$0003,$F394,$FFFC - dw $35D4,$0003,$CA2C,$FFFC - dw $6045,$0003,$9FBB,$FFFC - dw $8BBF,$0003,$7441,$FFFC - dw $B842,$0003,$47BE,$FFFC - dw $E5CE,$0003,$1A32,$FFFC - dw $0B63,$0004,$F49D,$FFFB - dw $3B01,$0004,$C4FF,$FFFB - dw $6BA8,$0004,$9458,$FFFB - dw $9D58,$0004,$62A8,$FFFB - dw $D011,$0004,$2FEF,$FFFB - dw $03D3,$0004,$FC2D,$FFFB - dw $2F9E,$0005,$D062,$FFFA - dw $6572,$0005,$9A8E,$FFFA - dw $9C4F,$0005,$63B1,$FFFA - dw $D435,$0005,$2BCB,$FFFA - dw $0424,$0006,$FBDC,$FFF9 - dw $3E1C,$0006,$C1E4,$FFF9 - dw $791D,$0006,$86E3,$FFF9 - dw $B527,$0006,$4AD9,$FFF9 - dw $F23A,$0006,$0DC6,$FFF9 - dw $2756,$0007,$D8AA,$FFF8 - dw $667B,$0007,$9985,$FFF8 - dw $A6A9,$0007,$5957,$FFF8 - dw $E7E0,$0007,$1820,$FFF8 - dw $2120,$0008,$DEE0,$FFF7 - dw $6469,$0008,$9B97,$FFF7 - dw $A8BB,$0008,$5745,$FFF7 - dw $EE16,$0008,$11EA,$FFF7 - dw $2B7A,$0009,$D486,$FFF6 - dw $72E7,$0009,$8D19,$FFF6 - dw $BB5D,$0009,$44A3,$FFF6 - dw $04DC,$0009,$FB24,$FFF6 - dw $4664,$000A,$B99C,$FFF5 - dw $91F5,$000A,$6E0B,$FFF5 - dw $DE8F,$000A,$2171,$FFF5 - dw $2332,$000B,$DCCE,$FFF4 - dw $71DE,$000B,$8E22,$FFF4 - dw $C193,$000B,$3E6D,$FFF4 - dw $0951,$000C,$F6AF,$FFF3 - dw $5B18,$000C,$A4E8,$FFF3 - dw $ADE8,$000C,$5218,$FFF3 - dw $01C1,$000C,$FE3F,$FFF3 - dw $4DA3,$000D,$B25D,$FFF2 - dw $A38E,$000D,$5C72,$FFF2 - dw $FA82,$000D,$057E,$FFF2 - dw $497F,$000E,$B681,$FFF1 - dw $A285,$000E,$5D7B,$FFF1 - dw $FC94,$000E,$036C,$FFF1 - dw $4EAC,$000F,$B154,$FFF0 - dw $AACD,$000F,$5533,$FFF0 - dw $07F7,$000F,$F809,$FFF0 - dw $5D2A,$0010,$A2D6,$FFEF - dw $BC66,$0010,$439A,$FFEF - dw $13AB,$0011,$EC55,$FFEE - dw $74F9,$0011,$8B07,$FFEE +namespace CommonA6 +incsrc "common_enemy_functions.asm" +namespace off ;;; $8687: Palette - enemy $DFBF (boulder) ;;; @@ -606,7 +24,7 @@ InstList_Boulder_FacingLeft: dw $0008,Spritemap_Boulder_5 ;A686BB; dw $0008,Spritemap_Boulder_6 ;A686BF; dw $0008,Spritemap_Boulder_7 ;A686C3; - dw Instruction_Common_GotoY ;A686C7; + dw Common_Instruction_GotoY ;A686C7; dw InstList_Boulder_FacingLeft ;A686C9; @@ -620,7 +38,7 @@ InstList_Boulder_FacingRight: dw $0008,Spritemap_Boulder_3 ;A686DF; dw $0008,Spritemap_Boulder_2 ;A686E3; dw $0008,Spritemap_Boulder_1 ;A686E7; - dw Instruction_Common_GotoY ;A686EB; + dw Common_Instruction_GotoY ;A686EB; dw InstList_Boulder_FacingRight ;A686ED; @@ -839,9 +257,9 @@ Function_Boulder_Bounce_Falling: ASL ;A68896; ASL ;A68897; TAY ;A68898; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing,Y ;A68899; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing,Y ;A68899; STA.B DP_Temp12 ;A6889C; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+2,Y ;A6889E; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+2,Y ;A6889E; STA.B DP_Temp14 ;A688A1; JSL.L MoveEnemyDownBy_14_12 ;A688A3; BCC .noCollision ;A688A7; @@ -927,9 +345,9 @@ Function_Boulder_Rolling: ASL ;A6894D; ASL ;A6894E; TAY ;A6894F; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing,Y ;A68950; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing,Y ;A68950; STA.B DP_Temp12 ;A68953; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+2,Y ;A68955; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+2,Y ;A68955; CLC ;A68958; ADC.L Boulder.minimumDistanceFromGround,X ;A68959; STA.B DP_Temp14 ;A6895D; @@ -948,9 +366,9 @@ Function_Boulder_Rolling: INY ;A68978; .right: - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing,Y ;A68979; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing,Y ;A68979; STA.B DP_Temp12 ;A6897C; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+2,Y ;A6897E; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+2,Y ;A6897E; STA.B DP_Temp14 ;A68981; JSL.L MoveEnemyRightBy_14_12_IgnoreSlopes ;A68983; BCC .notCollidedWithWall ;A68987; @@ -1013,14 +431,14 @@ MoveBoulderHorizontally: LDX.W EnemyIndex ;A68A00; LDA.W Enemy.XSubPosition,X ;A68A03; CLC ;A68A06; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing,Y ;A68A07; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing,Y ;A68A07; BCC + ;A68A0A; INC.W Enemy.XPosition,X ;A68A0C; + STA.W Enemy.XSubPosition,X ;A68A0F; LDA.W Enemy.XPosition,X ;A68A12; CLC ;A68A15; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing+2,Y ;A68A16; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing+2,Y ;A68A16; STA.W Enemy.XPosition,X ;A68A19; RTS ;A68A1C; @@ -1033,14 +451,14 @@ UNUSED_MoveBoulderHorizontallyWithLinearSpeedTable_A68A1D: LDX.W EnemyIndex ;A68A1D; LDA.W Enemy.XSubPosition,X ;A68A20; CLC ;A68A23; - ADC.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A68A24; + ADC.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A68A24; BCC + ;A68A27; INC.W Enemy.XPosition,X ;A68A29; + STA.W Enemy.XSubPosition,X ;A68A2C; LDA.W Enemy.XPosition,X ;A68A2F; CLC ;A68A32; - ADC.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A68A33; + ADC.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A68A33; STA.W Enemy.XPosition,X ;A68A36; RTS ;A68A39; endif ; !FEATURE_KEEP_UNREFERENCED @@ -1053,14 +471,14 @@ MoveBoulderVertically: LDX.W EnemyIndex ;A68A3A; LDA.W Enemy.YSubPosition,X ;A68A3D; CLC ;A68A40; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing,Y ;A68A41; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing,Y ;A68A41; BCC + ;A68A44; INC.W Enemy.YPosition,X ;A68A46; + STA.W Enemy.YSubPosition,X ;A68A49; LDA.W Enemy.YPosition,X ;A68A4C; CLC ;A68A4F; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing+2,Y ;A68A50; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing+2,Y ;A68A50; STA.W Enemy.YPosition,X ;A68A53; RTS ;A68A56; @@ -1142,7 +560,7 @@ Palette_Kzan: ;;; $8B29: Instruction list - spike platform ;;; InstList_Kzan: dw $0001,Spritemap_Kzan ;A68B29; - dw Instruction_Common_Sleep ;A68B2D; + dw Common_Instruction_Sleep ;A68B2D; ;;; $8B2F: Initialisation AI - enemy $DFFF (spike platform top) ;;; @@ -1159,9 +577,9 @@ InitAI_KzanTop: ASL ;A68B46; STA.L Kzan.fallingYSpeedTableIndex,X ;A68B47; TAX ;A68B4B; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,X ;A68B4C; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,X ;A68B4C; STA.B DP_Temp12 ;A68B4F; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,X ;A68B51; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,X ;A68B51; STA.B DP_Temp14 ;A68B54; LDX.W EnemyIndex ;A68B56; LDA.B DP_Temp14 ;A68B59; @@ -1245,9 +663,9 @@ Function_Kzan_Falling: STA.L Kzan.previousYPosition,X ;A68BE3; LDA.L Kzan.fallingYSpeedTableIndex,X ;A68BE7; TAX ;A68BEB; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,X ;A68BEC; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,X ;A68BEC; STA.B DP_Temp14 ;A68BEF; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,X ;A68BF1; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,X ;A68BF1; STA.B DP_Temp12 ;A68BF4; LDX.W EnemyIndex ;A68BF6; JSL.L MoveEnemyY_plus_12_14 ;A68BF9; @@ -1454,13 +872,13 @@ InstList_Hibashi_GraphicsPart: dw Instruction_Hibashi_ActivityFrame15 ;A68D9F; dw $0004,Spritemap_Hibashi_16 ;A68DA1; dw Instruction_Hibashi_FinishActivity ;A68DA5; - dw Instruction_Common_Sleep ;A68DA7; + dw Common_Instruction_Sleep ;A68DA7; ;;; $8DA9: Instruction list - hitbox part ;;; InstList_Hibashi_HitboxPart: dw $0002,Spritemap_Hibashi_0 ;A68DA9; - dw Instruction_Common_Sleep ;A68DAD; + dw Common_Instruction_Sleep ;A68DAD; ;;; $8DAF: Instruction - queue fire pillar sound effect ;;; @@ -2218,7 +1636,7 @@ InstList_Puromi: dw $0003,Spritemap_Puromi_2 ;A694B4; dw $0003,Spritemap_Puromi_3 ;A694B8; dw $0003,Spritemap_Puromi_7 ;A694BC; - dw Instruction_Common_GotoY ;A694C0; + dw Common_Instruction_GotoY ;A694C0; dw InstList_Puromi ;A694C2; @@ -2272,9 +1690,9 @@ InitAI_Puromi: INY ;A6953D; .firingUp: - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A6953E; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A6953E; STA.L Puromi.angleDelta,X ;A69541; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A69545; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A69545; STA.L Puromi.subAngleDelta,X ;A69548; LDA.W Enemy.XPosition,X ;A6954C; STA.L Puromi.arcOriginXPosition,X ;A6954F; @@ -2833,7 +2251,7 @@ InstList_MiniKraid_StepForwards_FacingLeft: dw $0008,Spritemap_MiniKraid_Stepping_FacingLeft_2 ;A699B6; dw $000C,Spritemap_MiniKraid_Stepping_FacingLeft_3 ;A699BA; dw Instruction_MiniKraid_Move ;A699BE; - dw Instruction_Common_GotoY ;A699C0; + dw Common_Instruction_GotoY ;A699C0; dw InstList_MiniKraid_ChooseAction ;A699C2; @@ -2849,7 +2267,7 @@ InstList_MiniKraid_StepBackwards_FacingLeft: dw $000C,Spritemap_MiniKraid_Stepping_FacingLeft_3 ;A699CC; dw $0008,Spritemap_MiniKraid_Stepping_FacingLeft_2 ;A699D0; dw $000C,Spritemap_MiniKraid_Stepping_FacingLeft_1 ;A699D4; - dw Instruction_Common_GotoY ;A699D8; + dw Common_Instruction_GotoY ;A699D8; dw InstList_MiniKraid_ChooseAction_duplicate ;A699DA; @@ -2861,7 +2279,7 @@ InstList_MiniKraid_FireSpit_FacingLeft: dw Instruction_MiniKraid_FireSpitLeft ;A699E6; dw $0010,Spritemap_MiniKraid_FiringSpit_FacingLeft_2 ;A699E8; dw $0008,Spritemap_MiniKraid_FiringSpit_FacingLeft_1 ;A699EC; - dw Instruction_Common_GotoY ;A699F0; + dw Common_Instruction_GotoY ;A699F0; dw InstList_MiniKraid_ChooseAction ;A699F2; @@ -2869,7 +2287,7 @@ if !FEATURE_KEEP_UNREFERENCED ;;; $99F4: Unused. Instruction list - standing - facing left ;;; UNUSED_InstList_MiniKraid_Standing_FacingLeft_A699F4: dw $7FFF,Spritemap_MiniKraid_FiringSpit_FacingLeft_0 ;A699F4; - dw Instruction_Common_Sleep ;A699F8; + dw Common_Instruction_Sleep ;A699F8; endif ; !FEATURE_KEEP_UNREFERENCED @@ -2885,7 +2303,7 @@ InstList_MiniKraid_StepForwards_FacingRight: dw $0008,Spritemap_MiniKraid_Stepping_FacingRight_2 ;A69A04; dw $000C,Spritemap_MiniKraid_Stepping_FacingRight_3 ;A69A08; dw Instruction_MiniKraid_Move ;A69A0C; - dw Instruction_Common_GotoY ;A69A0E; + dw Common_Instruction_GotoY ;A69A0E; dw InstList_MiniKraid_ChooseAction_duplicate_again2 ;A69A10; @@ -2901,7 +2319,7 @@ InstList_MiniKraid_StepBackwards_FacingRight: dw $000C,Spritemap_MiniKraid_Stepping_FacingRight_3 ;A69A1A; dw $0008,Spritemap_MiniKraid_Stepping_FacingRight_2 ;A69A1E; dw $000C,Spritemap_MiniKraid_Stepping_FacingRight_1 ;A69A22; - dw Instruction_Common_GotoY ;A69A26; + dw Common_Instruction_GotoY ;A69A26; dw InstList_MiniKraid_ChooseAction_duplicate_again3 ;A69A28; @@ -2913,7 +2331,7 @@ InstList_MiniKraid_FireSpit_FacingRight: dw Instruction_MiniKraid_FireSpitRight ;A69A34; dw $0010,Spritemap_MiniKraid_FiringSpit_FacingRight_2 ;A69A36; dw $0008,Spritemap_MiniKraid_FiringSpit_FacingRight_1 ;A69A3A; - dw Instruction_Common_GotoY ;A69A3E; + dw Common_Instruction_GotoY ;A69A3E; dw InstList_MiniKraid_ChooseAction_duplicate_again2 ;A69A40; @@ -2921,7 +2339,7 @@ if !FEATURE_KEEP_UNREFERENCED ;;; $9A42: Unused. Instruction list - standing - facing right ;;; UNUSED_InstList_MiniKraid_Standing_FacingRight_A69A42: dw $7FFF,Spritemap_MiniKraid_FiringSpit_FacingRight_0 ;A69A42; - dw Instruction_Common_Sleep ;A69A46; + dw Common_Instruction_Sleep ;A69A46; endif ; !FEATURE_KEEP_UNREFERENCED @@ -8371,175 +7789,175 @@ RidleyExplosionEntry_B: ;;; $CA47: Instruction list - ;;; InstList_RidleyTail_Large: dw $0001,Spritemap_RidleyTail_Large ;A6CA47; - dw Instruction_Common_Sleep ;A6CA4B; + dw Common_Instruction_Sleep ;A6CA4B; ;;; $CA4D: Instruction list - ;;; InstList_RidleyTail_Medium: dw $0001,Spritemap_RidleyTail_Medium ;A6CA4D; - dw Instruction_Common_Sleep ;A6CA51; + dw Common_Instruction_Sleep ;A6CA51; ;;; $CA53: Instruction list - ;;; InstList_RidleyTail_Small: dw $0001,Spritemap_RidleyTail_Small ;A6CA53; - dw Instruction_Common_Sleep ;A6CA57; + dw Common_Instruction_Sleep ;A6CA57; ;;; $CA59: Instruction list - ;;; InstList_RidleyWings_FullyRaised_FacingLeft: dw $0001,Spritemap_RidleyWings_FacingLeft_FullyRaised ;A6CA59; - dw Instruction_Common_Sleep ;A6CA5D; + dw Common_Instruction_Sleep ;A6CA5D; ;;; $CA5F: Instruction list - ;;; InstList_RidleyWings_FullyRaised_FacingRight: dw $0001,Spritemap_RidleyWings_FacingRight_FullyRaised ;A6CA5F; - dw Instruction_Common_Sleep ;A6CA63; + dw Common_Instruction_Sleep ;A6CA63; ;;; $CA65: Instruction list - ;;; InstList_RidleyLegs_PulledUp_FacingLeft: dw $0001,Spritemap_Ridley_FacingLeft_Legs_PulledUp ;A6CA65; - dw Instruction_Common_Sleep ;A6CA69; + dw Common_Instruction_Sleep ;A6CA69; ;;; $CA6B: Instruction list - ;;; InstList_RidleyLegs_PulledUp_FacingRight: dw $0001,Spritemap_Ridley_FacingRight_Legs_PulledUp ;A6CA6B; - dw Instruction_Common_Sleep ;A6CA6F; + dw Common_Instruction_Sleep ;A6CA6F; ;;; $CA71: Instruction list - ;;; InstList_RidleyHead_MouthOpen_FacingLeft: dw $0001,Spritemap_Ridley_FacingLeft_HeadNeck_MouthOpen ;A6CA71; - dw Instruction_Common_Sleep ;A6CA75; + dw Common_Instruction_Sleep ;A6CA75; ;;; $CA77: Instruction list - ;;; InstList_RidleyHead_MouthOpen_FacingRight: dw $0001,Spritemap_Ridley_FacingRight_HeadNeck_MouthOpen ;A6CA77; - dw Instruction_Common_Sleep ;A6CA7B; + dw Common_Instruction_Sleep ;A6CA7B; ;;; $CA7D: Instruction list - ;;; InstList_RidleyTorso_FacingLeft: dw $0001,Spritemap_Ridley_FacingLeft_Torso ;A6CA7D; - dw Instruction_Common_Sleep ;A6CA81; + dw Common_Instruction_Sleep ;A6CA81; ;;; $CA83: Instruction list - ;;; InstList_RidleyTorso_FacingRight: dw $0001,Spritemap_Ridley_FacingRight_Torso ;A6CA83; - dw Instruction_Common_Sleep ;A6CA87; + dw Common_Instruction_Sleep ;A6CA87; ;;; $CA89: Instruction list - ;;; InstList_RidleyClaw_FacingLeft: dw $0001,Spritemap_Ridley_FacingLeft_Claws ;A6CA89; - dw Instruction_Common_Sleep ;A6CA8D; + dw Common_Instruction_Sleep ;A6CA8D; ;;; $CA8F: Instruction list - ;;; InstList_RidleyClaw_FacingRight: dw $0001,Spritemap_Ridley_FacingRight_Claws ;A6CA8F; - dw Instruction_Common_Sleep ;A6CA93; + dw Common_Instruction_Sleep ;A6CA93; ;;; $CA95: Instruction list - ;;; InstList_RidleyTailTip_PointingDown: dw $0001,Spritemap_RidleyTailTip_PointingDown ;A6CA95; - dw Instruction_Common_Sleep ;A6CA99; + dw Common_Instruction_Sleep ;A6CA99; ;;; $CA9B: Instruction list - ;;; InstList_RidleyTailTip_PointingDownDownRight: dw $0001,Spritemap_RidleyTailTip_PointingDownDownRight ;A6CA9B; - dw Instruction_Common_Sleep ;A6CA9F; + dw Common_Instruction_Sleep ;A6CA9F; ;;; $CAA1: Instruction list - ;;; InstList_RidleyTailTip_PointingDownRight: dw $0001,Spritemap_RidleyTailTip_PointingDownRight ;A6CAA1; - dw Instruction_Common_Sleep ;A6CAA5; + dw Common_Instruction_Sleep ;A6CAA5; ;;; $CAA7: Instruction list - ;;; InstList_RidleyTailTip_PointingRightDownRight: dw $0001,Spritemap_RidleyTailTip_PointingRightDownRight ;A6CAA7; - dw Instruction_Common_Sleep ;A6CAAB; + dw Common_Instruction_Sleep ;A6CAAB; ;;; $CAAD: Instruction list - ;;; InstList_RidleyTailTip_PointingRight: dw $0001,Spritemap_RidleyTailTip_PointingRight ;A6CAAD; - dw Instruction_Common_Sleep ;A6CAB1; + dw Common_Instruction_Sleep ;A6CAB1; ;;; $CAB3: Instruction list - ;;; InstList_RidleyTailTip_PointingRightUpRight: dw $0001,Spritemap_RidleyTailTip_PointingRightUpRight ;A6CAB3; - dw Instruction_Common_Sleep ;A6CAB7; + dw Common_Instruction_Sleep ;A6CAB7; ;;; $CAB9: Instruction list - ;;; InstList_RidleyTailTip_PointingUpRight: dw $0001,Spritemap_RidleyTailTip_PointingUpRight ;A6CAB9; - dw Instruction_Common_Sleep ;A6CABD; + dw Common_Instruction_Sleep ;A6CABD; ;;; $CABF: Instruction list - ;;; InstList_RidleyTailTip_PointingUpUpRight: dw $0001,Spritemap_RidleyTailTip_PointingUpUpRight ;A6CABF; - dw Instruction_Common_Sleep ;A6CAC3; + dw Common_Instruction_Sleep ;A6CAC3; ;;; $CAC5: Instruction list - ;;; InstList_RidleyTailTip_PointingUp: dw $0001,Spritemap_RidleyTailTip_PointingUp ;A6CAC5; - dw Instruction_Common_Sleep ;A6CAC9; + dw Common_Instruction_Sleep ;A6CAC9; ;;; $CACB: Instruction list - ;;; InstList_RidleyTailTip_PointingUpUpLeft: dw $0001,Spritemap_RidleyTailTip_PointingUpUpLeft ;A6CACB; - dw Instruction_Common_Sleep ;A6CACF; + dw Common_Instruction_Sleep ;A6CACF; ;;; $CAD1: Instruction list - ;;; InstList_RidleyTailTip_PointingUpLeft: dw $0001,Spritemap_RidleyTailTip_PointingUpLeft ;A6CAD1; - dw Instruction_Common_Sleep ;A6CAD5; + dw Common_Instruction_Sleep ;A6CAD5; ;;; $CAD7: Instruction list - ;;; InstList_RidleyTailTip_PointingLeftUpLeft: dw $0001,Spritemap_RidleyTailTip_PointingLeftUpLeft ;A6CAD7; - dw Instruction_Common_Sleep ;A6CADB; + dw Common_Instruction_Sleep ;A6CADB; ;;; $CADD: Instruction list - ;;; InstList_RidleyTailTip_PointingLeft: dw $0001,Spritemap_RidleyTailTip_PointingLeft ;A6CADD; - dw Instruction_Common_Sleep ;A6CAE1; + dw Common_Instruction_Sleep ;A6CAE1; ;;; $CAE3: Instruction list - ;;; InstList_RidleyTailTip_PointingLeftDownLeft: dw $0001,Spritemap_RidleyTailTip_PointingLeftDownLeft ;A6CAE3; - dw Instruction_Common_Sleep ;A6CAE7; + dw Common_Instruction_Sleep ;A6CAE7; ;;; $CAE9: Instruction list - ;;; InstList_RidleyTailTip_PointingDownLeft: dw $0001,Spritemap_RidleyTailTip_PointingDownLeft ;A6CAE9; - dw Instruction_Common_Sleep ;A6CAED; + dw Common_Instruction_Sleep ;A6CAED; ;;; $CAEF: Instruction list - ;;; InstList_RidleyTailTip_PointingDownDownLeft: dw $0001,Spritemap_RidleyTailTip_PointingDownDownLeft ;A6CAEF; - dw Instruction_Common_Sleep ;A6CAF3; + dw Common_Instruction_Sleep ;A6CAF3; ;;; $CAF5: ;;; @@ -11924,13 +11342,13 @@ InstList_Ridley_FacingLeft_Initial: dw Instruction_Ridley_GotoYIfNotFacingLeft ;A6E538; dw InstList_Ridley_FacingRight_Initial ;A6E53A; dw $000C,ExtendedSpritemap_Ridley_FacingLeft ;A6E53C; - dw Instruction_Common_Sleep ;A6E540; + dw Common_Instruction_Sleep ;A6E540; ;;; $E542: Instruction list - ;;; InstList_Ridley_FacingRight_Initial: dw $000C,ExtendedSpritemap_Ridley_FacingRight ;A6E542; - dw Instruction_Common_Sleep ;A6E546; + dw Common_Instruction_Sleep ;A6E546; ;;; $E548: Instruction list - ;;; @@ -11947,7 +11365,7 @@ InstList_RidleyCeres_FacingLeft_Lunging: dw $0006,ExtendedSpritemap_Ridley_FacingLeft_LegsHalfExtended ;A6E566; dw Inst_RidleyCeres_UpdateSamusPrevPosition_HeldYDisplacement,$0000 ;A6E56C; dw $0004,ExtendedSpritemap_Ridley_FacingLeft ;A6E56E; - dw Instruction_Common_Sleep ;A6E574; + dw Common_Instruction_Sleep ;A6E574; ;;; $E576: Instruction list - ;;; @@ -11962,7 +11380,7 @@ UNUSED_InstList_RidleyCeres_FacingRight_Lunging_A6E576: dw $0006,ExtendedSpritemap_Ridley_FacingRight_LegsHalfExtended ;A6E590; dw Inst_RidleyCeres_UpdateSamusPrevPosition_HeldYDisplacement,$0000 ;A6E596; dw $0004,ExtendedSpritemap_Ridley_FacingRight ;A6E598; - dw Instruction_Common_Sleep ;A6E59E; + dw Common_Instruction_Sleep ;A6E59E; if !FEATURE_KEEP_UNREFERENCED @@ -11974,7 +11392,7 @@ UNUSED_InstList_RidleyCeres_FacingLeft_A6E5A0: dw $0002,ExtendedSpritemap_Ridley_FacingLeft ;A6E5A6; dw UNUSED_Instruction_RidleyCeres_GotoYIfHoldingBaby_A6E4F8 ;A6E5AC; dw UNUSED_InstList_RidleyCeres_FacingLeft_HoldingBaby_A6E5B2 ;A6E5AE; - dw Instruction_Common_Sleep ;A6E5B0; + dw Common_Instruction_Sleep ;A6E5B0; ;;; $E5B2: Instruction list - ;;; @@ -12017,7 +11435,7 @@ UNUSED_InstList_RidleyCeres_FacingLeft_HoldingBaby_A6E5EA: UNUSED_InstList_RidleyCeres_FacingLeft_HoldingBaby_A6E5F4: dw Inst_RidleyCeres_UpdateSamusPrevPosition_HeldYDisplacement,$0000 ;A6E5F4; dw $0002,ExtendedSpritemap_Ridley_FacingLeft ;A6E5F6; - dw Instruction_Common_Sleep ;A6E5FC; + dw Common_Instruction_Sleep ;A6E5FC; ;;; $E5FE: Instruction list - ;;; @@ -12026,7 +11444,7 @@ UNUSED_InstList_RidleyCeres_FacingRight_A6E5FE: dw $0002,ExtendedSpritemap_Ridley_FacingRight ;A6E600; dw UNUSED_Instruction_RidleyCeres_GotoYIfHoldingBaby_A6E4F8 ;A6E606; dw UNUSED_InstList_RidleyCeres_FacingRight_HoldingBaby_A6E60C ;A6E608; - dw Instruction_Common_Sleep ;A6E60A; + dw Common_Instruction_Sleep ;A6E60A; ;;; $E60C: Instruction list - ;;; @@ -12069,7 +11487,7 @@ UNUSED_InstList_RidleyCeres_FacingRight_HoldingBaby_A6E644: UNUSED_InstList_RidleyCeres_FacingRight_HoldingBaby_A6E64E: dw Inst_RidleyCeres_UpdateSamusPrevPosition_HeldYDisplacement,$0000 ;A6E64E; dw $0002,ExtendedSpritemap_Ridley_FacingRight ;A6E650; - dw Instruction_Common_Sleep ;A6E656; + dw Common_Instruction_Sleep ;A6E656; endif ; !FEATURE_KEEP_UNREFERENCED @@ -12083,7 +11501,7 @@ InstList_RidleyCeres_FacingLeft_ExtendLegs: dw $0006,ExtendedSpritemap_Ridley_FacingLeft_LegsHalfExtended ;A6E666; dw Inst_RidleyCeres_UpdateSamusPrevPosition_HeldYDisplacement,$0004 ;A6E66C; dw $0001,ExtendedSpritemap_Ridley_FacingLeft_LegsExtended ;A6E66E; - dw Instruction_Common_Sleep ;A6E674; + dw Common_Instruction_Sleep ;A6E674; ;;; $E676: Instruction list - ;;; @@ -12094,7 +11512,7 @@ InstList_RidleyCeres_FacingRight_ExtendLegs: dw $0006,ExtendedSpritemap_Ridley_FacingRight_LegsHalfExtended ;A6E680; dw Inst_RidleyCeres_UpdateSamusPrevPosition_HeldYDisplacement,$0004 ;A6E686; dw $0001,ExtendedSpritemap_Ridley_FacingRight_LegsExtended ;A6E688; - dw Instruction_Common_Sleep ;A6E68E; + dw Common_Instruction_Sleep ;A6E68E; ;;; $E690: Instruction list - ;;; @@ -12109,7 +11527,7 @@ InstList_Ridley_FacingLeft_OpeningRoar: dw $0008,ExtendedSpritemap_Ridley_FacingLeft_MouthHalfOpen ;A6E6A2; dw Instruction_Ridley_ResetRoarFlag ;A6E6A6; dw $0001,ExtendedSpritemap_Ridley_FacingLeft ;A6E6A8; - dw Instruction_Common_Sleep ;A6E6AC; + dw Common_Instruction_Sleep ;A6E6AC; ;;; $E6AE: Instruction list - ;;; @@ -12121,7 +11539,7 @@ InstList_Ridley_FacingRight_OpeningRoar: dw $0008,ExtendedSpritemap_Ridley_FacingRight_MouthHalfOpen ;A6E6BC; dw Instruction_Ridley_ResetRoarFlag ;A6E6C0; dw $0001,ExtendedSpritemap_Ridley_FacingRight ;A6E6C2; - dw Instruction_Common_Sleep ;A6E6C6; + dw Common_Instruction_Sleep ;A6E6C6; ;;; $E6C8: Instruction list - ;;; @@ -12133,7 +11551,7 @@ InstList_Ridley_FacingLeft_DeathRoar: dw $0008,ExtendedSpritemap_Ridley_FacingLeft_MouthHalfOpen ;A6E6D2; dw $0010,ExtendedSpritemap_Ridley_FacingLeft_MouthOpen ;A6E6D6; dw Instruction_Ridley_ResetRoarFlag ;A6E6DA; - dw Instruction_Common_Sleep ;A6E6DC; + dw Common_Instruction_Sleep ;A6E6DC; ;;; $E6DE: Instruction list - ;;; @@ -12143,7 +11561,7 @@ InstList_Ridley_FacingRight_DeathRoar: dw $0008,ExtendedSpritemap_Ridley_FacingRight_MouthHalfOpen ;A6E6E4; dw $0010,ExtendedSpritemap_Ridley_FacingRight_MouthOpen ;A6E6E8; dw Instruction_Ridley_ResetRoarFlag ;A6E6EC; - dw Instruction_Common_Sleep ;A6E6EE; + dw Common_Instruction_Sleep ;A6E6EE; ;;; $E6F0: Instruction list - ;;; @@ -12155,7 +11573,7 @@ InstList_Ridley_TurnFromLeftToRight: dw Instruction_Ridley_SetDirectionToRight_UpdateTailParts ;A6E6FA; dw $0001,ExtendedSpritemap_Ridley_FacingForward ;A6E6FC; dw $0001,ExtendedSpritemap_Ridley_FacingRight ;A6E700; - dw Instruction_Common_Sleep ;A6E704; + dw Common_Instruction_Sleep ;A6E704; ;;; $E706: Instruction list - ;;; @@ -12167,7 +11585,7 @@ InstList_Ridley_TurnFromRightToLeft: dw Instruction_Ridley_SetDirectionToLeft_UpdateTailParts ;A6E710; dw $0001,ExtendedSpritemap_Ridley_FacingForward ;A6E712; dw $0001,ExtendedSpritemap_Ridley_FacingLeft ;A6E716; - dw Instruction_Common_Sleep ;A6E71A; + dw Common_Instruction_Sleep ;A6E71A; ;;; $E71C: Instruction ;;; @@ -12246,7 +11664,7 @@ InstList_Ridley_FacingLeft_Fireballing_0: InstList_Ridley_FacingLeft_Fireballing_1: dw Instruction_Ridley_ResetRoarFlag ;A6E7AC; dw $0001,ExtendedSpritemap_Ridley_FacingLeft ;A6E7AE; - dw Instruction_Common_Sleep ;A6E7B2; + dw Common_Instruction_Sleep ;A6E7B2; ;;; $E7B4: Instruction list - ;;; @@ -12293,7 +11711,7 @@ InstList_Ridley_FacingRight_Fireballing_0: InstList_Ridley_FacingRight_Fireballing_1: dw Instruction_Ridley_ResetRoarFlag ;A6E820; dw $0001,ExtendedSpritemap_Ridley_FacingRight ;A6E822; - dw Instruction_Common_Sleep ;A6E826; + dw Common_Instruction_Sleep ;A6E826; if !FEATURE_KEEP_UNREFERENCED @@ -12453,7 +11871,7 @@ InstList_RidleyCeres_FacingLeft_FlyUp_StartMainAI: dw Instruction_RidleyCeres_SetRidleyMainAI_SetVerticalSpeed ;A6E939; dw $0011,ExtendedSpritemap_Ridley_FacingLeft_LegsHalfExtended ;A6E93B; dw $0011,ExtendedSpritemap_Ridley_FacingLeft ;A6E93F; - dw Instruction_Common_Sleep ;A6E943; + dw Common_Instruction_Sleep ;A6E943; ;;; $E945: Instruction list - ;;; @@ -12466,7 +11884,7 @@ InstList_RidleyCeres_FacingRight_FlyUp_StartMainAI: dw Instruction_Ridley_SetRidleyMainAI_SetVerticalSpeed ;A6E95D; dw $0011,ExtendedSpritemap_Ridley_FacingRight_LegsHalfExtended ;A6E95F; dw $0011,ExtendedSpritemap_Ridley_FacingRight ;A6E963; - dw Instruction_Common_Sleep ;A6E967; + dw Common_Instruction_Sleep ;A6E967; ;;; $E969: Instruction ;;; @@ -13098,7 +12516,7 @@ EnemyTouch_CeresSteam: LDX.W EnemyIndex ;A6F03F; LDA.W #$7FFF ;A6F042; STA.W Enemy.health,X ;A6F045; - JSL.L NormalEnemyTouchAI ;A6F048; + JSL.L NormalEnemyTouchAI_Internal ;A6F048; RTL ;A6F04C; @@ -13123,7 +12541,7 @@ InstList_CeresSteam_Up_2: dw $0003,ExtendedSpritemap_CeresSteam_Up_4 ;A6F071; dw $0003,ExtendedSpritemap_CeresSteam_Up_5 ;A6F075; dw $0003,ExtendedSpritemap_CeresSteam_Up_6 ;A6F079; - dw Instruction_Common_GotoY ;A6F07D; + dw Common_Instruction_GotoY ;A6F07D; dw InstList_CeresSteam_Up_1 ;A6F07F; @@ -13148,7 +12566,7 @@ InstList_CeresSteam_Left_2: dw $0003,ExtendedSpritemap_CeresSteam_Left_4 ;A6F0A5; dw $0003,ExtendedSpritemap_CeresSteam_Left_5 ;A6F0A9; dw $0003,ExtendedSpritemap_CeresSteam_Left_6 ;A6F0AD; - dw Instruction_Common_GotoY ;A6F0B1; + dw Common_Instruction_GotoY ;A6F0B1; dw InstList_CeresSteam_Left_1 ;A6F0B3; @@ -13173,7 +12591,7 @@ InstList_CeresSteam_Down_2: dw $0003,ExtendedSpritemap_CeresSteam_Down_4 ;A6F0D9; dw $0003,ExtendedSpritemap_CeresSteam_Down_5 ;A6F0DD; dw $0003,ExtendedSpritemap_CeresSteam_Down_6 ;A6F0E1; - dw Instruction_Common_GotoY ;A6F0E5; + dw Common_Instruction_GotoY ;A6F0E5; dw InstList_CeresSteam_Down_1 ;A6F0E7; @@ -13198,7 +12616,7 @@ InstList_CeresSteam_Right_2: dw $0003,ExtendedSpritemap_CeresSteam_Right_4 ;A6F10D; dw $0003,ExtendedSpritemap_CeresSteam_Right_5 ;A6F111; dw $0003,ExtendedSpritemap_CeresSteam_Right_6 ;A6F115; - dw Instruction_Common_GotoY ;A6F119; + dw Common_Instruction_GotoY ;A6F119; dw InstList_CeresSteam_Right_1 ;A6F11B; @@ -13411,121 +12829,121 @@ Hitbox_CeresSteam_Up_0: dw $0001 ;A6F25C; dw $FFF8,$FFF0,$0007,$FFFF dw EnemyTouch_CeresSteam ;A6F266; - dw RTL_A6804C ;A6F268; + dw Common_RTL_A0804C ;A6F268; Hitbox_CeresSteam_Up_1: dw $0001 ;A6F26A; dw $FFF8,$FFE9,$0007,$FFFE dw EnemyTouch_CeresSteam ;A6F274; - dw RTL_A6804C ;A6F276; + dw Common_RTL_A0804C ;A6F276; Hitbox_CeresSteam_Up_2: dw $0001 ;A6F278; dw $FFF8,$FFE0,$0007,$FFF8 dw EnemyTouch_CeresSteam ;A6F282; - dw RTL_A6804C ;A6F284; + dw Common_RTL_A0804C ;A6F284; Hitbox_CeresSteam_Up_3: dw $0001 ;A6F286; dw $FFF8,$FFD8,$0007,$FFF0 dw EnemyTouch_CeresSteam ;A6F290; - dw RTL_A6804C ;A6F292; + dw Common_RTL_A0804C ;A6F292; Hitbox_CeresSteam_Up_4: dw $0001 ;A6F294; dw $FFF8,$FFD8,$0006,$FFE8 dw EnemyTouch_CeresSteam ;A6F29E; - dw RTL_A6804C ;A6F2A0; + dw Common_RTL_A0804C ;A6F2A0; Hitbox_CeresSteam_Left_0: dw $0001 ;A6F2A2; dw $FFF0,$FFF8,$FFFF,$0007 dw EnemyTouch_CeresSteam ;A6F2AC; - dw RTL_A6804C ;A6F2AE; + dw Common_RTL_A0804C ;A6F2AE; Hitbox_CeresSteam_Left_1: dw $0001 ;A6F2B0; dw $FFE8,$FFF8,$FFFE,$0007 dw EnemyTouch_CeresSteam ;A6F2BA; - dw RTL_A6804C ;A6F2BC; + dw Common_RTL_A0804C ;A6F2BC; Hitbox_CeresSteam_Left_2: dw $0001 ;A6F2BE; dw $FFE0,$FFF9,$FFF7,$0007 dw EnemyTouch_CeresSteam ;A6F2C8; - dw RTL_A6804C ;A6F2CA; + dw Common_RTL_A0804C ;A6F2CA; Hitbox_CeresSteam_Left_3: dw $0001 ;A6F2CC; dw $FFD8,$FFF7,$FFEF,$0005 dw EnemyTouch_CeresSteam ;A6F2D6; - dw RTL_A6804C ;A6F2D8; + dw Common_RTL_A0804C ;A6F2D8; Hitbox_CeresSteam_Left_4: dw $0001 ;A6F2DA; dw $FFD8,$FFF5,$FFE6,$0002 dw EnemyTouch_CeresSteam ;A6F2E4; - dw RTL_A6804C ;A6F2E6; + dw Common_RTL_A0804C ;A6F2E6; Hitbox_CeresSteam_Down_0: dw $0001 ;A6F2E8; dw $FFF8,$0000,$0007,$000E dw EnemyTouch_CeresSteam ;A6F2F2; - dw RTL_A6804C ;A6F2F4; + dw Common_RTL_A0804C ;A6F2F4; Hitbox_CeresSteam_Down_1: dw $0001 ;A6F2F6; dw $FFF8,$0000,$0007,$0017 dw EnemyTouch_CeresSteam ;A6F300; - dw RTL_A6804C ;A6F302; + dw Common_RTL_A0804C ;A6F302; Hitbox_CeresSteam_Down_2: dw $0001 ;A6F304; dw $FFF8,$0008,$0007,$001F dw EnemyTouch_CeresSteam ;A6F30E; - dw RTL_A6804C ;A6F310; + dw Common_RTL_A0804C ;A6F310; Hitbox_CeresSteam_Down_3: dw $0001 ;A6F312; dw $FFF8,$000F,$0007,$0027 dw EnemyTouch_CeresSteam ;A6F31C; - dw RTL_A6804C ;A6F31E; + dw Common_RTL_A0804C ;A6F31E; Hitbox_CeresSteam_Down_4: dw $0001 ;A6F320; dw $FFF8,$0017,$0006,$0026 dw EnemyTouch_CeresSteam ;A6F32A; - dw RTL_A6804C ;A6F32C; + dw Common_RTL_A0804C ;A6F32C; Hitbox_CeresSteam_Right_0: dw $0001 ;A6F32E; dw $0000,$FFF8,$000F,$0007 dw EnemyTouch_CeresSteam ;A6F338; - dw RTL_A6804C ;A6F33A; + dw Common_RTL_A0804C ;A6F33A; Hitbox_CeresSteam_Right_1: dw $0001 ;A6F33C; dw $0001,$FFF8,$0017,$0007 dw EnemyTouch_CeresSteam ;A6F346; - dw RTL_A6804C ;A6F348; + dw Common_RTL_A0804C ;A6F348; Hitbox_CeresSteam_Right_2: dw $0001 ;A6F34A; dw $0009,$FFF8,$001F,$0007 dw EnemyTouch_CeresSteam ;A6F354; - dw RTL_A6804C ;A6F356; + dw Common_RTL_A0804C ;A6F356; Hitbox_CeresSteam_Right_3: dw $0001 ;A6F358; dw $0012,$FFF7,$0026,$0005 dw EnemyTouch_CeresSteam ;A6F362; - dw RTL_A6804C ;A6F364; + dw Common_RTL_A0804C ;A6F364; Hitbox_CeresSteam_Right_4: dw $0001 ;A6F366; dw $0019,$FFF5,$0028,$0003 dw EnemyTouch_CeresSteam ;A6F370; - dw RTL_A6804C ;A6F372; + dw Common_RTL_A0804C ;A6F372; ;;; $F374: Ceres steam spritemaps ;;; @@ -13722,7 +13140,7 @@ InstList_CeresDoor_RidleysRoom_FacingRight_1: dw Instruction_CeresDoor_GotoYIfAreaBossIsAlive ;A6F562; dw InstList_CeresDoor_RidleysRoom_FacingRight_1 ;A6F564; dw Instruction_CeresDoor_SetAsVisible_ClearDrawnByRidleyFlag ;A6F566; - dw Instruction_Common_GotoY ;A6F568; + dw Common_Instruction_GotoY ;A6F568; dw InstList_CeresDoor_Closed_FacingRight_0 ;A6F56A; @@ -13740,7 +13158,7 @@ InstList_CeresDoor_Open_FacingRight_0: dw $0002,Spritemap_CeresDoor_FacingRight_Open ;A6F578; dw Inst_CeresDoor_GotoYIfSamusIsNotWithing30Pixels ;A6F57C; dw InstList_CeresDoor_Open_FacingRight_1 ;A6F57E; - dw Instruction_Common_GotoY ;A6F580; + dw Common_Instruction_GotoY ;A6F580; dw InstList_CeresDoor_Open_FacingRight_0 ;A6F582; InstList_CeresDoor_Open_FacingRight_1: @@ -13768,7 +13186,7 @@ InstList_CeresDoor_Closed_FacingRight_1: dw $0005,Spritemap_CeresDoor_FacingRight_Open ;A6F5B2; dw Instruction_CeresDoor_SetAsIntangible ;A6F5B6; dw Instruction_CeresDoor_SetAsInvisible ;A6F5B8; - dw Instruction_Common_GotoY ;A6F5BA; + dw Common_Instruction_GotoY ;A6F5BA; dw InstList_CeresDoor_Open_FacingRight_0 ;A6F5BC; @@ -13784,7 +13202,7 @@ InstList_CeresDoor_Normal_FacingLeft_1: dw $0002,Spritemap_CeresDoor_FacingLeft_Closed ;A6F5CA; dw Inst_CeresDoor_GotoYIfSamusIsNotWithing30Pixels ;A6F5CE; dw InstList_CeresDoor_Normal_FacingLeft_2 ;A6F5D0; - dw Instruction_Common_GotoY ;A6F5D2; + dw Common_Instruction_GotoY ;A6F5D2; dw InstList_CeresDoor_Normal_FacingLeft_1 ;A6F5D4; InstList_CeresDoor_Normal_FacingLeft_2: @@ -13810,7 +13228,7 @@ InstList_CeresDoor_Normal_FacingLeft_4: dw $0005,Spritemap_CeresDoor_FacingLeft_Open ;A6F604; dw Instruction_CeresDoor_SetAsIntangible ;A6F608; dw Instruction_CeresDoor_SetAsInvisible ;A6F60A; - dw Instruction_Common_GotoY ;A6F60C; + dw Common_Instruction_GotoY ;A6F60C; dw InstList_CeresDoor_Normal_FacingLeft_1 ;A6F60E; @@ -13820,7 +13238,7 @@ InstList_CeresDoor_RotatingElevRoom_PreExploDoorOverlay_0: InstList_CeresDoor_RotatingElevRoom_PreExploDoorOverlay_1: dw $0001,Spritemap_CeresDoor_RotatingElevRoomPreExplosionDoorOverlay ;A6F612; - dw Instruction_Common_GotoY ;A6F616; + dw Common_Instruction_GotoY ;A6F616; dw InstList_CeresDoor_RotatingElevRoom_PreExploDoorOverlay_1 ;A6F618; @@ -13833,7 +13251,7 @@ InstList_CeresDoor_RotatingElevatorRoom_InvisibleWall_0: InstList_CeresDoor_RotatingElevatorRoom_InvisibleWall_1: dw $0001,Spritemap_CeresDoor_FacingLeft_Closed ;A6F622; - dw Instruction_Common_GotoY ;A6F626; + dw Common_Instruction_GotoY ;A6F626; dw InstList_CeresDoor_RotatingElevatorRoom_InvisibleWall_1 ;A6F628; @@ -13843,7 +13261,7 @@ InstList_CeresDoor_RidleyEscapeMode7LeftWall_0: InstList_CeresDoor_RidleyEscapeMode7LeftWall_1: dw $0001,Spritemap_CeresDoor_RidleyEscapeMode7LeftWall ;A6F62C; - dw Instruction_Common_GotoY ;A6F630; + dw Common_Instruction_GotoY ;A6F630; dw InstList_CeresDoor_RidleyEscapeMode7LeftWall_1 ;A6F632; @@ -13853,7 +13271,7 @@ InstList_CeresDoor_RidleyEscapeMode7RightWall_0: InstList_CeresDoor_RidleyEscapeMode7RightWall_1: dw $0001,Spritemap_CeresDoor_RidleyEscapeMode7RightWall ;A6F636; - dw Instruction_Common_GotoY ;A6F63A; + dw Common_Instruction_GotoY ;A6F63A; dw InstList_CeresDoor_RidleyEscapeMode7RightWall_1 ;A6F63C; @@ -14771,70 +14189,70 @@ EnemyShot_Zebetite: InstList_Big_HealthGreaterThanEqualTo800: dw $0001 ;A6FDCC; dw Spritemap_Zebetite_Big_HealthGreaterThanEqualTo800 ;A6FDCE; - dw Instruction_Common_Sleep ;A6FDD0; + dw Common_Instruction_Sleep ;A6FDD0; ;;; $FDD2: Instruction list - big zebetite - HP < 800 ;;; InstList_Big_HealthLessThan800: dw $0001 ;A6FDD2; dw SpritemapZebetite_Big_HealthLessThan800 ;A6FDD4; - dw Instruction_Common_Sleep ;A6FDD6; + dw Common_Instruction_Sleep ;A6FDD6; ;;; $FDD8: Instruction list - big zebetite - HP < 600 ;;; InstList_Big_HealthLessThan600: dw $0001 ;A6FDD8; dw SpritemapZebetite_Big_HealthLessThan600 ;A6FDDA; - dw Instruction_Common_Sleep ;A6FDDC; + dw Common_Instruction_Sleep ;A6FDDC; ;;; $FDDE: Instruction list - big zebetite - HP < 400 ;;; InstList_Big_HealthLessThan400: dw $0001 ;A6FDDE; dw SpritemapZebetite_Big_HealthLessThan400 ;A6FDE0; - dw Instruction_Common_Sleep ;A6FDE2; + dw Common_Instruction_Sleep ;A6FDE2; ;;; $FDE4: Instruction list - big zebetite - HP < 200 ;;; InstList_Big_HealthLessThan200: dw $0001 ;A6FDE4; dw SpritemapZebetite_Big_HealthLessThan200 ;A6FDE6; - dw Instruction_Common_Sleep ;A6FDE8; + dw Common_Instruction_Sleep ;A6FDE8; ;;; $FDEA: Instruction list - small zebetite pair - HP >= 800 ;;; InstList_Small_HealthGreaterThanEqualTo800: dw $0001 ;A6FDEA; dw Spritemap_Zebetite_Small_HealthGreaterThanEqualTo800 ;A6FDEC; - dw Instruction_Common_Sleep ;A6FDEE; + dw Common_Instruction_Sleep ;A6FDEE; ;;; $FDF0: Instruction list - small zebetite pair - HP < 800 ;;; InstList_Small_HealthLessThan800: dw $0001 ;A6FDF0; dw SpritemapZebetite_Small_HealthLessThan800 ;A6FDF2; - dw Instruction_Common_Sleep ;A6FDF4; + dw Common_Instruction_Sleep ;A6FDF4; ;;; $FDF6: Instruction list - small zebetite pair - HP < 600 ;;; InstList_Small_HealthLessThan600: dw $0001 ;A6FDF6; dw SpritemapZebetite_Small_HealthLessThan600 ;A6FDF8; - dw Instruction_Common_Sleep ;A6FDFA; + dw Common_Instruction_Sleep ;A6FDFA; ;;; $FDFC: Instruction list - small zebetite pair - HP < 400 ;;; InstList_Small_HealthLessThan400: dw $0001 ;A6FDFC; dw SpritemapZebetite_Small_HealthLessThan400 ;A6FDFE; - dw Instruction_Common_Sleep ;A6FE00; + dw Common_Instruction_Sleep ;A6FE00; ;;; $FE02: Instruction list - small zebetite pair - HP < 200 ;;; InstList_Small_HealthLessThan200: dw $0001 ;A6FE02; dw SpritemapZebetite_Small_HealthLessThan200 ;A6FE04; - dw Instruction_Common_Sleep ;A6FE06; + dw Common_Instruction_Sleep ;A6FE06; ;;; $FE08: Spritemaps - zebetites ;;; diff --git a/src/bank_A7.asm b/src/bank_A7.asm index 10fd917..adbe6ff 100644 --- a/src/bank_A7.asm +++ b/src/bank_A7.asm @@ -3,591 +3,9 @@ org $A78000 ; Common to all enemy code banks - -;;; $8000: Grapple AI - no interaction. Also unfreezes enemies(!) ;;; -CommonA7_GrappleAI_NoInteraction: -; Used by skultera, Draygon body, fire arc, Phantoon, etecoon, dachora and WS ghost - JSL.L GrappleAI_SwitchEnemyAIToMainAI ;A78000; - RTL ;A78004; - - -;;; $8005: Grapple AI - Samus latches on ;;; -CommonA7_GrappleAI_SamusLatchesOn: -; Used by gripper and Crocomire - JSL.L GrappleAI_SamusLatchesOnWithGrapple ;A78005; - RTL ;A78009; - - -;;; $800A: Grapple AI - kill enemy ;;; -CommonA7_GrappleAI_KillEnemy: -; Common - JSL.L GrappleAI_EnemyGrappleDeath ;A7800A; - RTL ;A7800E; - - -;;; $800F: Grapple AI - cancel grapple beam ;;; -CommonA7_GrappleAI_CancelGrappleBeam: -; Common - JSL.L GrappleAI_SwitchToFrozenAI ;A7800F; - RTL ;A78013; - - -;;; $8014: Grapple AI - Samus latches on - no invincibility ;;; -CommonA7_GrappleAI_SamusLatchesOn_NoInvincibility: -; Used by powamp - JSL.L GrappleAI_SamusLatchesOnWithGrapple_NoInvincibility ;A78014; - RTL ;A78018; - - -;;; $8019: Unused. Grapple AI - Samus latches on - paralyse enemy ;;; -UNUSED_CommonA7_GrappleAI_SamusLatchesOn_ParalyzeEnemy_A78019: - JSL.L GrappleAI_SamusLatchesOnWithGrapple_ParalyzeEnemy ;A78019; - RTL ;A7801D; - - -;;; $801E: Grapple AI - hurt Samus ;;; -CommonA7_GrappleAI_HurtSamus: -; Used by WS spark -; Hurt reaction happens in $9B:B932 - JSL.L GrappleAI_SwitchToFrozenAI_duplicate ;A7801E; - RTL ;A78022; - - -;;; $8023: Normal enemy touch AI ;;; -CommonA7_NormalEnemyTouchAI: - JSL.L NormalEnemyTouchAI ;A78023; - RTL ;A78027; - - -;;; $8028: Normal touch AI - no death check ;;; -CommonA7_NormalTouchAI_NoDeathCheck: - JSL.L NormalEnemyTouchAI_NoDeathCheck_External ;A78028; - RTL ;A7802C; - - -;;; $802D: Normal enemy shot AI ;;; -CommonA7_NormalEnemyShotAI: - JSL.L NormalEnemyShotAI ;A7802D; - RTL ;A78031; - - -;;; $8032: Normal enemy shot AI - no death check, no enemy shot graphic ;;; -CommonA7_NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic: - JSL.L NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic_External ;A78032; - RTL ;A78036; - - -;;; $8037: Normal enemy power bomb AI ;;; -CommonA7_NormalEnemyPowerBombAI: - JSL.L NormalEnemyPowerBombAI ;A78037; - RTL ;A7803B; - - -;;; $803C: Normal enemy power bomb AI - no death check ;;; -CommonA7_NormalEnemyPowerBombAI_NoDeathCheck: -; Kraid's power bomb AI - JSL.L NormalEnemyPowerBombAI_NoDeathCheck_External ;A7803C; - RTL ;A78040; - - -;;; $8041: Normal enemy frozen AI ;;; -CommonA7_NormalEnemyFrozenAI: - JSL.L NormalEnemyFrozenAI ;A78041; - RTL ;A78045; - - -;;; $8046: Creates a dud shot ;;; -CommonA7_CreateADudShot: - JSL.L CreateADudShot ;A78046; - RTL ;A7804A; - - -;;; $804B: RTS ;;; -RTS_A7804B: - RTS ;A7804B; - - -;;; $804C: RTL ;;; -RTL_A7804C: - RTL ;A7804C; - - -;;; $804D: Spritemap - nothing ;;; -Spritemap_CommonA7_Nothing: - dw $0000 ;A7804D; - - -;;; $804F: Extended spritemap - nothing ;;; -ExtendedSpritemap_CommonA7_Nothing: - dw $0001 ;A7804F; - dw $0000,$0000 - dw Spritemap_CommonA7_Nothing ;A78055; - dw Hitbox_CommonA7_Nothing ;A78057; - - -;;; $8059: Hitbox - nothing ;;; -Hitbox_CommonA7_Nothing: -; [n entries] [[left offset] [top offset] [right offset] [bottom offset] [p touch] [p shot]]... - dw $0001 ;A78059; - dw $0000,$0000,$0000,$0000 - dw CommonA7_NormalEnemyTouchAI ;A78063; - dw CommonA7_NormalEnemyShotAI ;A78065; - - -;;; $8067: Instruction list - delete enemy ;;; -InstList_CommonA7_DeleteEnemy: - dw Instruction_CommonA7_DeleteEnemy ;A78067; - - -;;; $8069: Two NOPs ;;; -NOPNOP_A78069: -; Used as palette by respawning enemy placeholder and Draygon's eye o_O - NOP ;A78069; - NOP ;A7806A; - - -;;; $806B: Instruction - Enemy.var5 = [[Y]] ;;; -Instruction_CommonA7_Enemy0FB2_InY: -; Used only by torizos (for enemy movement function) and escape etecoon (for enemy function) - LDA.W $0000,Y ;A7806B; - STA.W Enemy.var5,X ;A7806E; - INY ;A78071; - INY ;A78072; - RTL ;A78073; - - -;;; $8074: Instruction - Enemy.var5 = RTS ;;; -Instruction_CommonA7_SetEnemy0FB2ToRTS: - LDA.W #RTS_A7807B ;A78074; - STA.W Enemy.var5,X ;A78077; - RTL ;A7807A; - - -RTS_A7807B: - RTS ;A7807B; - - -;;; $807C: Instruction - delete enemy ;;; -Instruction_CommonA7_DeleteEnemy: - LDA.W Enemy.properties,X ;A7807C; - ORA.W #$0200 ;A7807F; - STA.W Enemy.properties,X ;A78082; - PLA ;A78085; - PEA.W ProcessEnemyInstructions_return-1 ;A78086; - RTL ;A78089; - - -;;; $808A: Instruction - call function [[Y]] ;;; -Instruction_CommonA7_CallFunctionInY: - LDA.W $0000,Y ;A7808A; - STA.B DP_Temp12 ;A7808D; - PHY ;A7808F; - PHX ;A78090; - PEA.W .manualReturn-1 ;A78091; - JMP.W (DP_Temp12) ;A78094; - - .manualReturn: - PLX ;A78097; - PLY ;A78098; - INY ;A78099; - INY ;A7809A; - RTL ;A7809B; - - -;;; $809C: Instruction - call function [[Y]] with A = [[Y] + 2] ;;; -Instruction_CommonA7_CallFunctionInY_WithA: - LDA.W $0000,Y ;A7809C; - STA.B DP_Temp12 ;A7809F; - LDA.W $0002,Y ;A780A1; - PHY ;A780A4; - PHX ;A780A5; - PEA.W .manualReturn-1 ;A780A6; - JMP.W (DP_Temp12) ;A780A9; - - .manualReturn: - PLX ;A780AC; - PLY ;A780AD; - TYA ;A780AE; - CLC ;A780AF; - ADC.W #$0004 ;A780B0; - TAY ;A780B3; - RTL ;A780B4; - - -if !FEATURE_KEEP_UNREFERENCED -;;; $80B5: Unused. Instruction - call external function [[Y]] ;;; -UNUSED_Instruction_CommonA7_CallExternalFunctionInY_A780B5: - LDA.W $0000,Y ;A780B5; - STA.B DP_Temp12 ;A780B8; - LDA.W $0001,Y ;A780BA; - STA.B DP_Temp13 ;A780BD; - PHX ;A780BF; - PHY ;A780C0; - JSL.L .externalFunction ;A780C1; - PLY ;A780C5; - PLX ;A780C6; - INY ;A780C7; - INY ;A780C8; - INY ;A780C9; - RTL ;A780CA; - - .externalFunction: - JML.W [DP_Temp12] ;A780CB; - - -;;; $80CE: Unused. Instruction - call external function [[Y]] with A = [[Y] + 3] ;;; -UNUSED_Inst_CommonA7_CallExternalFunctionInY_WithA_A780CE: - LDA.W $0000,Y ;A780CE; - STA.B DP_Temp12 ;A780D1; - LDA.W $0001,Y ;A780D3; - STA.B DP_Temp13 ;A780D6; - LDA.W $0003,Y ;A780D8; - PHX ;A780DB; - PHY ;A780DC; - JSL.L .externalFunction ;A780DD; - PLY ;A780E1; - PLX ;A780E2; - TYA ;A780E3; - CLC ;A780E4; - ADC.W #$0005 ;A780E5; - TAY ;A780E8; - RTL ;A780E9; - - .externalFunction: - JML.W [DP_Temp12] ;A780EA; -endif ; !FEATURE_KEEP_UNREFERENCED - - -;;; $80ED: Instruction - go to [[Y]] ;;; -Instruction_CommonA7_GotoY: - LDA.W $0000,Y ;A780ED; - TAY ;A780F0; - RTL ;A780F1; - - -;;; $80F2: Instruction - go to [[Y]] + ±[[Y]] ;;; -Instruction_CommonA7_GotoY_PlusY: - STY.B DP_Temp12 ;A780F2; - DEY ;A780F4; - LDA.W $0000,Y ;A780F5; - XBA ;A780F8; - BMI .highByte ;A780F9; - AND.W #$00FF ;A780FB; - BRA + ;A780FE; - - .highByte: - ORA.W #$FF00 ;A78100; - -+ CLC ;A78103; - ADC.B DP_Temp12 ;A78104; - TAY ;A78106; - RTL ;A78107; - - -;;; $8108: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonA7_DecrementTimer_GotoYIfNonZero: - DEC.W Enemy.loopCounter,X ;A78108; - BNE Instruction_CommonA7_GotoY ;A7810B; - INY ;A7810D; - INY ;A7810E; - RTL ;A7810F; - - -;;; $8110: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonA7_DecrementTimer_GotoYIfNonZero_duplicate: - DEC.W Enemy.loopCounter,X ;A78110; - BNE Instruction_CommonA7_GotoY ;A78113; - INY ;A78115; - INY ;A78116; - RTL ;A78117; - - -;;; $8118: Instruction - decrement timer and go to [Y] + ±[[Y]] if non-zero ;;; -Instruction_CommonA7_DecrementTimer_GotoY_PlusY_IfNonZero: - SEP #$20 ;A78118; - DEC.W Enemy.loopCounter,X ;A7811A; - REP #$20 ;A7811D; - BNE Instruction_CommonA7_GotoY_PlusY ;A7811F; - INY ;A78121; - RTL ;A78122; - - -;;; $8123: Instruction - timer = [[Y]] ;;; -Instruction_CommonA7_TimerInY: - LDA.W $0000,Y ;A78123; - STA.W Enemy.loopCounter,X ;A78126; - INY ;A78129; - INY ;A7812A; - RTL ;A7812B; - - -;;; $812C: Instruction - skip next instruction ;;; -Instruction_CommonA7_SkipNextInstruction: - INY ;A7812C; - INY ;A7812D; - RTL ;A7812E; - - -;;; $812F: Instruction - sleep ;;; -Instruction_CommonA7_Sleep: - DEY ;A7812F; - DEY ;A78130; - TYA ;A78131; - STA.W Enemy.instList,X ;A78132; - PLA ;A78135; - PEA.W ProcessEnemyInstructions_return-1 ;A78136; - RTL ;A78139; - - -;;; $813A: Instruction - wait [[Y]] frames ;;; -Instruction_CommonA7_WaitYFrames: -; Set instruction timer and terminate processing enemy instructions -; Used for running a delay that doesn't update graphics, -; useful for e.g. GT eye beam attack ($AA:D10D), implemented by an instruction list that has no graphical instructions, -; which allows it to be called from multiple different poses - LDA.W $0000,Y ;A7813A; - STA.W Enemy.instTimer,X ;A7813D; - INY ;A78140; - INY ;A78141; - TYA ;A78142; - STA.W Enemy.instList,X ;A78143; - PLA ;A78146; - PEA.W ProcessEnemyInstructions_return-1 ;A78147; - RTL ;A7814A; - - -;;; $814B: Instruction - transfer [[Y]] bytes from [[Y] + 2] to VRAM [[Y] + 5] ;;; -Instruction_CommonA7_TransferYBytesInYToVRAM: - PHX ;A7814B; - LDX.W VRAMWriteStack ;A7814C; - LDA.W $0000,Y ;A7814F; - STA.B VRAMWrite.size,X ;A78152; - LDA.W $0002,Y ;A78154; - STA.B VRAMWrite.src,X ;A78157; - LDA.W $0003,Y ;A78159; - STA.B VRAMWrite.src+1,X ;A7815C; - LDA.W $0005,Y ;A7815E; - STA.B VRAMWrite.dest,X ;A78161; - TXA ;A78163; - CLC ;A78164; - ADC.W #$0007 ;A78165; - STA.W VRAMWriteStack ;A78168; - TYA ;A7816B; - CLC ;A7816C; - ADC.W #$0007 ;A7816D; - TAY ;A78170; - PLX ;A78171; - RTL ;A78172; - - -;;; $8173: Instruction - enable off-screen processing ;;; -Instruction_CommonA7_EnableOffScreenProcessing: - LDA.W Enemy.properties,X ;A78173; - ORA.W #$0800 ;A78176; - STA.W Enemy.properties,X ;A78179; - RTL ;A7817C; - - -;;; $817D: Instruction - disable off-screen processing ;;; -Instruction_CommonA7_DisableOffScreenProcessing: - LDA.W Enemy.properties,X ;A7817D; - AND.W #$F7FF ;A78180; - STA.W Enemy.properties,X ;A78183; - RTL ;A78186; - - -;;; $8187: Common enemy speeds - linearly increasing ;;; -CommonA7EnemySpeeds_LinearlyIncreasing: -; _____________________ Speed -; | _______________ Subspeed -; | | _________ Negated speed -; | | | ___ Negated subspeed -; | | | | - .speed: - dw $0000 ;A78187; - .subspeed: - dw $0000 ;A78189; - .negatedSpeed: - dw $0000 ;A7818B; - .negatedSubspeed: - dw $0000 ;A7818D; - dw $0000,$1000,$FFFF,$F000 - dw $0000,$2000,$FFFF,$E000 - dw $0000,$3000,$FFFF,$D000 - dw $0000,$4000,$FFFF,$C000 - dw $0000,$5000,$FFFF,$B000 - dw $0000,$6000,$FFFF,$A000 - dw $0000,$7000,$FFFF,$9000 - dw $0000,$8000,$FFFF,$8000 - dw $0000,$9000,$FFFF,$7000 - dw $0000,$A000,$FFFF,$6000 - dw $0000,$B000,$FFFF,$5000 - dw $0000,$C000,$FFFF,$4000 - dw $0000,$D000,$FFFF,$3000 - dw $0000,$E000,$FFFF,$2000 - dw $0000,$F000,$FFFF,$1000 - dw $0001,$0000,$FFFF,$0000 - dw $0001,$1000,$FFFE,$F000 - dw $0001,$2000,$FFFE,$E000 - dw $0001,$3000,$FFFE,$D000 - dw $0001,$4000,$FFFE,$C000 - dw $0001,$5000,$FFFE,$B000 - dw $0001,$6000,$FFFE,$A000 - dw $0001,$7000,$FFFE,$9000 - dw $0001,$8000,$FFFE,$8000 - dw $0001,$9000,$FFFE,$7000 - dw $0001,$A000,$FFFE,$6000 - dw $0001,$B000,$FFFE,$5000 - dw $0001,$C000,$FFFE,$4000 - dw $0001,$D000,$FFFE,$3000 - dw $0001,$E000,$FFFE,$2000 - dw $0001,$F000,$FFFE,$1000 - dw $0002,$0000,$FFFE,$0000 - dw $0002,$1000,$FFFD,$F000 - dw $0002,$2000,$FFFD,$E000 - dw $0002,$3000,$FFFD,$D000 - dw $0002,$4000,$FFFD,$C000 - dw $0002,$5000,$FFFD,$B000 - dw $0002,$6000,$FFFD,$A000 - dw $0002,$7000,$FFFD,$9000 - dw $0002,$8000,$FFFD,$8000 - dw $0002,$9000,$FFFD,$7000 - dw $0002,$A000,$FFFD,$6000 - dw $0002,$B000,$FFFD,$5000 - dw $0002,$C000,$FFFD,$4000 - dw $0002,$D000,$FFFD,$3000 - dw $0002,$E000,$FFFD,$2000 - dw $0002,$F000,$FFFD,$1000 - dw $0003,$0000,$FFFD,$0000 - dw $0003,$1000,$FFFC,$F000 - dw $0003,$2000,$FFFC,$E000 - dw $0003,$3000,$FFFC,$D000 - dw $0003,$4000,$FFFC,$C000 - dw $0003,$5000,$FFFC,$B000 - dw $0003,$6000,$FFFC,$A000 - dw $0003,$7000,$FFFC,$9000 - dw $0003,$8000,$FFFC,$8000 - dw $0003,$9000,$FFFC,$7000 - dw $0003,$A000,$FFFC,$6000 - dw $0003,$B000,$FFFC,$5000 - dw $0003,$C000,$FFFC,$4000 - dw $0003,$D000,$FFFC,$3000 - dw $0003,$E000,$FFFC,$2000 - dw $0003,$F000,$FFFC,$1000 - dw $0004,$0000,$FFFC,$0000 - - -;;; $838F: Common enemy speeds - quadratically increasing ;;; -CommonA7EnemySpeeds_QuadraticallyIncreasing: -; I.e. gravity -; Used by e.g. Botwoon when dying and falling to the floor -; _____________________ Subspeed -; | _______________ Speed -; | | _________ Negated subspeed -; | | | ___ Negated speed -; | | | | - .subspeed: - dw $0000 ;A7838F; - .speed: - dw $0000 ;A78391; - .negatedSubspeed: - dw $0000 ;A78393; - .negatedSpeed: - dw $0000 ;A78395; - dw $0109,$0000,$FEF7,$FFFF - dw $031B,$0000,$FCE5,$FFFF - dw $0636,$0000,$F9CA,$FFFF - dw $0A5A,$0000,$F5A6,$FFFF - dw $0F87,$0000,$F079,$FFFF - dw $15BD,$0000,$EA43,$FFFF - dw $1CFC,$0000,$E304,$FFFF - dw $2544,$0000,$DABC,$FFFF - dw $2E95,$0000,$D16B,$FFFF - dw $38EF,$0000,$C711,$FFFF - dw $4452,$0000,$BBAE,$FFFF - dw $50BE,$0000,$AF42,$FFFF - dw $5E33,$0000,$A1CD,$FFFF - dw $6CB1,$0000,$934F,$FFFF - dw $7C38,$0000,$83C8,$FFFF - dw $8CC8,$0000,$7338,$FFFF - dw $9E61,$0000,$619F,$FFFF - dw $B103,$0000,$4EFD,$FFFF - dw $C4AE,$0000,$3B52,$FFFF - dw $D962,$0000,$269E,$FFFF - dw $EF1F,$0000,$10E1,$FFFF - dw $05E5,$0000,$FA1B,$FFFF - dw $14B4,$0001,$EB4C,$FFFE - dw $2D8C,$0001,$D274,$FFFE - dw $476D,$0001,$B893,$FFFE - dw $6257,$0001,$9DA9,$FFFE - dw $7E4A,$0001,$81B6,$FFFE - dw $9B46,$0001,$64BA,$FFFE - dw $B94B,$0001,$46B5,$FFFE - dw $D859,$0001,$27A7,$FFFE - dw $F870,$0001,$0790,$FFFE - dw $1090,$0002,$EF70,$FFFD - dw $32B9,$0002,$CD47,$FFFD - dw $55EB,$0002,$AA15,$FFFD - dw $7A26,$0002,$85DA,$FFFD - dw $9F6A,$0002,$6096,$FFFD - dw $C5B7,$0002,$3A49,$FFFD - dw $ED0D,$0002,$12F3,$FFFD - dw $0C6C,$0003,$F394,$FFFC - dw $35D4,$0003,$CA2C,$FFFC - dw $6045,$0003,$9FBB,$FFFC - dw $8BBF,$0003,$7441,$FFFC - dw $B842,$0003,$47BE,$FFFC - dw $E5CE,$0003,$1A32,$FFFC - dw $0B63,$0004,$F49D,$FFFB - dw $3B01,$0004,$C4FF,$FFFB - dw $6BA8,$0004,$9458,$FFFB - dw $9D58,$0004,$62A8,$FFFB - dw $D011,$0004,$2FEF,$FFFB - dw $03D3,$0004,$FC2D,$FFFB - dw $2F9E,$0005,$D062,$FFFA - dw $6572,$0005,$9A8E,$FFFA - dw $9C4F,$0005,$63B1,$FFFA - dw $D435,$0005,$2BCB,$FFFA - dw $0424,$0006,$FBDC,$FFF9 - dw $3E1C,$0006,$C1E4,$FFF9 - dw $791D,$0006,$86E3,$FFF9 - dw $B527,$0006,$4AD9,$FFF9 - dw $F23A,$0006,$0DC6,$FFF9 - dw $2756,$0007,$D8AA,$FFF8 - dw $667B,$0007,$9985,$FFF8 - dw $A6A9,$0007,$5957,$FFF8 - dw $E7E0,$0007,$1820,$FFF8 - dw $2120,$0008,$DEE0,$FFF7 - dw $6469,$0008,$9B97,$FFF7 - dw $A8BB,$0008,$5745,$FFF7 - dw $EE16,$0008,$11EA,$FFF7 - dw $2B7A,$0009,$D486,$FFF6 - dw $72E7,$0009,$8D19,$FFF6 - dw $BB5D,$0009,$44A3,$FFF6 - dw $04DC,$0009,$FB24,$FFF6 - dw $4664,$000A,$B99C,$FFF5 - dw $91F5,$000A,$6E0B,$FFF5 - dw $DE8F,$000A,$2171,$FFF5 - dw $2332,$000B,$DCCE,$FFF4 - dw $71DE,$000B,$8E22,$FFF4 - dw $C193,$000B,$3E6D,$FFF4 - dw $0951,$000C,$F6AF,$FFF3 - dw $5B18,$000C,$A4E8,$FFF3 - dw $ADE8,$000C,$5218,$FFF3 - dw $01C1,$000C,$FE3F,$FFF3 - dw $4DA3,$000D,$B25D,$FFF2 - dw $A38E,$000D,$5C72,$FFF2 - dw $FA82,$000D,$057E,$FFF2 - dw $497F,$000E,$B681,$FFF1 - dw $A285,$000E,$5D7B,$FFF1 - dw $FC94,$000E,$036C,$FFF1 - dw $4EAC,$000F,$B154,$FFF0 - dw $AACD,$000F,$5533,$FFF0 - dw $07F7,$000F,$F809,$FFF0 - dw $5D2A,$0010,$A2D6,$FFEF - dw $BC66,$0010,$439A,$FFEF - dw $13AB,$0011,$EC55,$FFEE - dw $74F9,$0011,$8B07,$FFEE +namespace CommonA7 +incsrc "common_enemy_functions.asm" +namespace off ;;; $8687: Palette - enemy $E2BF/$E2FF/$E33F/$E37F/$E3BF/$E3FF/$E43F/$E47F (Kraid) ;;; @@ -615,13 +33,13 @@ Palette_KraidRoomBackground: ;;; $86E7: Instruction list - Kraid foot - initial ;;; InstList_KraidFoot_Initial: dw $7FFF,ExtendedSpritemap_KraidFoot_Initial ;A786E7; - dw Instruction_Common_Sleep ;A786EB; + dw Common_Instruction_Sleep ;A786EB; ;;; $86ED: Instruction list - Kraid foot - Kraid is big - neutral ;;; InstList_KraidFoot_KraidIsBig_Neutral: dw $7FFF,ExtendedSpritemap_KraidFoot_0 ;A786ED; - dw Instruction_Common_Sleep ;A786F1; + dw Common_Instruction_Sleep ;A786F1; ;;; $86F3: Instruction list - Kraid foot - Kraid is big - walking forwards ;;; @@ -692,7 +110,7 @@ InstList_KraidFoot_KraidIsBig_WalkingForward_0: dw $0001,ExtendedSpritemap_KraidFoot_0 ;A787B7; InstList_KraidFoot_KraidIsBig_WalkingForward_1: - dw Instruction_Common_Sleep ;A787BB; + dw Common_Instruction_Sleep ;A787BB; ;;; $87BD: Instruction list - Kraid foot - lunge forward ;;; @@ -764,7 +182,7 @@ InstList_KraidFoot_LungeForward_0: dw $0001,ExtendedSpritemap_KraidFoot_0 ;A78881; InstList_KraidFoot_LungeForward_1: - dw Instruction_Common_Sleep ;A78885; + dw Common_Instruction_Sleep ;A78885; ;;; $8887: Instruction list - Kraid foot - Kraid is big - walking backwards ;;; @@ -828,7 +246,7 @@ InstList_KraidFoot_KraidIsBig_WalkingBackwards_0: dw $0001,ExtendedSpritemap_KraidFoot_1 ;A78935; InstList_KraidFoot_KraidIsBig_WalkingBackwards_1: - dw Instruction_Common_GotoY ;A78939; + dw Common_Instruction_GotoY ;A78939; dw InstList_KraidFoot_KraidIsBig_WalkingBackwards_0 ;A7893B; @@ -892,7 +310,7 @@ UNUSED_InstList_KraidFoot_WalkingBackwards_Fast_A7893D: dw $0001,ExtendedSpritemap_KraidFoot_3 ;A789E3; dw $0001,ExtendedSpritemap_KraidFoot_2 ;A789E7; dw $0001,ExtendedSpritemap_KraidFoot_1 ;A789EB; - dw Instruction_Common_GotoY ;A789EF; + dw Common_Instruction_GotoY ;A789EF; dw UNUSED_InstList_KraidFoot_WalkingBackwards_Fast_A7893D ;A789F1; endif ; !FEATURE_KEEP_UNREFERENCED @@ -920,7 +338,7 @@ InstList_KraidArm_Normal_0: InstList_KraidArm_Normal_1: dw $0020,ExtendedSpritemap_KraidArm_General_0 ;A78A37; dw Instruction_KraidArm_SlowArmIfLessThanHalfHealth ;A78A3B; - dw Instruction_Common_GotoY ;A78A3D; + dw Common_Instruction_GotoY ;A78A3D; dw InstList_KraidArm_Normal_0 ;A78A3F; @@ -945,7 +363,7 @@ InstList_KraidArm_Slow: dw $0008,ExtendedSpritemap_KraidArm_General_1 ;A78A81; dw $0030,ExtendedSpritemap_KraidArm_General_0 ;A78A85; dw Instruction_KraidArm_SlowArmIfLessThanHalfHealth ;A78A89; - dw Instruction_Common_GotoY ;A78A8B; + dw Common_Instruction_GotoY ;A78A8B; dw InstList_KraidArm_Slow ;A78A8D; @@ -984,7 +402,7 @@ InstList_KraidArm_RisingSinking: dw $0006,ExtendedSpritemap_KraidArm_RisingSinking_2 ;A78AE0; dw $0006,ExtendedSpritemap_KraidArm_RisingSinking_1 ;A78AE4; dw $0020,ExtendedSpritemap_KraidArm_RisingSinking_0 ;A78AE8; - dw Instruction_Common_GotoY ;A78AEC; + dw Common_Instruction_GotoY ;A78AEC; dw InstList_KraidArm_RisingSinking ;A78AEE; @@ -993,19 +411,19 @@ InstList_KraidArm_Dying_PreparingToLungeForward: dw $0006,ExtendedSpritemap_KraidArm_General_0 ;A78AF0; dw $0006,ExtendedSpritemap_KraidArm_Dying_PreparingToLungeForward_0 ;A78AF4; dw $7FFF,ExtendedSpritemap_KraidArm_Dying_PreparingToLungeForward_1 ;A78AF8; - dw Instruction_Common_Sleep ;A78AFC; + dw Common_Instruction_Sleep ;A78AFC; ;;; $8AFE: Instruction list - Kraid lint - initial ;;; InstList_KraidLint_Initial: dw $7FFF,Spritemap_KraidLint_Initial ;A78AFE; - dw Instruction_Common_Sleep ;A78B02; + dw Common_Instruction_Sleep ;A78B02; ;;; $8B04: Instruction list - Kraid lint - Kraid is big ;;; InstList_KraidLint_KraidIsBig: dw $7FFF,Spritemap_KraidLint_KraidIsBig ;A78B04; - dw Instruction_Common_Sleep ;A78B08; + dw Common_Instruction_Sleep ;A78B08; ;;; $8B0A: Instruction list - fingernail ;;; @@ -1018,7 +436,7 @@ InstList_KraidNail: dw $0003,Spritemap_KraidNail_5 ;A78B1E; dw $0003,Spritemap_KraidNail_6 ;A78B22; dw $0003,Spritemap_KraidNail_7 ;A78B26; - dw Instruction_Common_GotoY ;A78B2A; + dw Common_Instruction_GotoY ;A78B2A; dw InstList_KraidNail ;A78B2C; @@ -2142,7 +1560,7 @@ Hitbox_KraidArm_Dying_PreparingToLungeForward_1: ;;; $948B: Enemy touch - Kraid arm/foot - normal ;;; EnemyTouch_KraidArm_KraidFoot_Normal: - JSL.L NormalEnemyTouchAI ;A7948B; fallthrough to RTL_A7948F + JSL.L NormalEnemyTouchAI_Internal ;A7948B; fallthrough to RTL_A7948F RTL_A7948F: @@ -2178,7 +1596,7 @@ PushSamusBack: ;;; $94B1: Normal enemy shot ;;; NormalEnemyShot: - JSL.L NormalEnemyShotAI ;A794B1; fallthrough to RTL_A794B5 + JSL.L NormalEnemyShotAI_Internal ;A794B1; fallthrough to RTL_A794B5 RTL_A794B5: @@ -4218,7 +3636,7 @@ KraidBody_vs_Samus_CollisionHandling: JSR.W PushSamusBack ;A7B153; LDA.W SamusInvincibilityTimer ;A7B156; BNE .return1 ;A7B159; - JSL.L NormalEnemyTouchAI ;A7B15B; + JSL.L NormalEnemyTouchAI_Internal ;A7B15B; .return0: RTS ;A7B15F; @@ -5242,7 +4660,7 @@ KraidLint_vs_Samus_CollisionHandling: + STA.W ExtraSamusXDisplacement ;A7B9E1; PHX ;A7B9E4; PHP ;A7B9E5; - JSL.L NormalEnemyTouchAI ;A7B9E6; + JSL.L NormalEnemyTouchAI_Internal ;A7B9E6; PLP ;A7B9EA; PLX ;A7B9EB; LDA.W Enemy.properties,X ;A7B9EC; @@ -5592,7 +5010,7 @@ endif ; !FEATURE_KEEP_UNREFERENCED ;;; $BCCF: Enemy touch - enemy $E43F (Kraid good fingernail) ;;; EnemyTouch_KraidNail: - JSL.L NormalEnemyTouchAI ;A7BCCF; + JSL.L NormalEnemyTouchAI_Internal ;A7BCCF; LDX.W EnemyIndex ;A7BCD3; JSL.L EnemyDeath ;A7BCD6; LDX.W EnemyIndex ;A7BCDA; @@ -5601,7 +5019,7 @@ EnemyTouch_KraidNail: ;;; $BCDE: Enemy touch - enemy $E47F (Kraid bad fingernail) ;;; EnemyTouch_KraidNailBad: - JSL.L NormalEnemyTouchAI ;A7BCDE; + JSL.L NormalEnemyTouchAI_Internal ;A7BCDE; LDX.W EnemyIndex ;A7BCE2; JSL.L EnemyDeath ;A7BCE5; LDX.W EnemyIndex ;A7BCE9; @@ -6670,7 +6088,7 @@ KraidDeath_SinkThroughFloor: STA.W EnemyBG2TilemapSize ;A7C557; LDY.W EnemyIndex ;A7C55A; LDX.W Enemy.ID,Y ;A7C55D; - LDA.W #RTL_A7804C ;A7C560; + LDA.W #Common_RTL_A0804C ;A7C560; STA.L EnemyHeaders_enemyShot,X ;A7C563; LDA.W Enemy[1].properties ;A7C567; ORA.W #$0200 ;A7C56A; >.< #$0600 @@ -7384,19 +6802,19 @@ Palette_Phantoon_HealthBased_7: ;;; $CC41: Instruction list - body - invulnerable ;;; InstList_Phantoon_Body_Invulnerable: dw $0001,ExtendedSpritemap_Phantoon_Body_Invulnerable ;A7CC41; - dw Instruction_Common_Sleep ;A7CC45; + dw Common_Instruction_Sleep ;A7CC45; ;;; $CC47: Instruction list - body - full hitbox ;;; InstList_Phantoon_Body_FullHitbox: dw $0001,ExtendedSpritemap_Phantoon_Body_FullHitbox ;A7CC47; - dw Instruction_Common_Sleep ;A7CC4B; + dw Common_Instruction_Sleep ;A7CC4B; ;;; $CC4D: Instruction list - body - eye hitbox only ;;; InstList_Phantoon_Body_EyeHitboxOnly: dw $0001,ExtendedSpritemap_Phantoon_Body_EyeHitbox ;A7CC4D; - dw Instruction_Common_Sleep ;A7CC51; + dw Common_Instruction_Sleep ;A7CC51; ;;; $CC53: Instruction list - eye - open ;;; @@ -7404,11 +6822,11 @@ InstList_Phantoon_Eye_Open: dw $000A,ExtendedSpritemap_Phantoon_Eye_Opening ;A7CC53; dw $000A,ExtendedSpritemap_Phantoon_Eye_OpeningClosing ;A7CC57; dw $0001,ExtendedSpritemap_Phantoon_Eye_Open ;A7CC5B; - dw Instruction_Common_CallFunctionInY ;A7CC5F; + dw Common_Instruction_CallFunctionInY ;A7CC5F; dw PlayPhantoonMaterializationSFX ;A7CC61; - dw Instruction_Common_CallFunctionInY ;A7CC63; + dw Common_Instruction_CallFunctionInY ;A7CC63; dw SetupEyeOpenPhantoonState ;A7CC65; - dw Instruction_Common_Sleep ;A7CC67; + dw Common_Instruction_Sleep ;A7CC67; if !FEATURE_KEEP_UNREFERENCED @@ -7417,25 +6835,25 @@ UNUSED_InstList_Phantoon_Eye_Open_IgnoringSamus_A7CC69: dw $000A,ExtendedSpritemap_Phantoon_Eye_Opening ;A7CC69; dw $000A,ExtendedSpritemap_Phantoon_Eye_OpeningClosing ;A7CC6D; dw $0001,ExtendedSpritemap_Phantoon_Eye_Open ;A7CC71; - dw Instruction_Common_CallFunctionInY ;A7CC75; + dw Common_Instruction_CallFunctionInY ;A7CC75; dw PlayPhantoonMaterializationSFX ;A7CC77; - dw Instruction_Common_Sleep ;A7CC79; + dw Common_Instruction_Sleep ;A7CC79; endif ; !FEATURE_KEEP_UNREFERENCED ;;; $CC7B: Instruction list - eye - closed ;;; InstList_Phantoon_Eye_Closed: dw $0001,ExtendedSpritemap_Phantoon_Eye_Closed ;A7CC7B; - dw Instruction_Common_Sleep ;A7CC7F; + dw Common_Instruction_Sleep ;A7CC7F; ;;; $CC81: Instruction list - eye - close and pick new pattern ;;; InstList_Phantoon_Eye_Close_PickNewPattern: dw $0001,ExtendedSpritemap_Phantoon_Eye_Open ;A7CC81; dw $000A,ExtendedSpritemap_Phantoon_Eye_OpeningClosing ;A7CC85; - dw Instruction_Common_CallFunctionInY ;A7CC89; + dw Common_Instruction_CallFunctionInY ;A7CC89; dw PickNewPhantoonPattern ;A7CC8B; - dw Instruction_Common_GotoY ;A7CC8D; + dw Common_Instruction_GotoY ;A7CC8D; dw InstList_Phantoon_Eye_Closed ;A7CC8F; @@ -7443,64 +6861,64 @@ InstList_Phantoon_Eye_Close_PickNewPattern: InstList_Phantoon_Eye_Close: dw $0001,ExtendedSpritemap_Phantoon_Eye_Open ;A7CC91; dw $000A,ExtendedSpritemap_Phantoon_Eye_OpeningClosing ;A7CC95; - dw Instruction_Common_GotoY ;A7CC99; + dw Common_Instruction_GotoY ;A7CC99; dw InstList_Phantoon_Eye_Closed ;A7CC9B; ;;; $CC9D: Instruction list - eyeball - centred ;;; InstList_Phantoon_Eyeball_Centered: dw $0001,ExtendedSpritemap_Phantoon_Eyeball_Centered ;A7CC9D; - dw Instruction_Common_CallFunctionInY ;A7CCA1; + dw Common_Instruction_CallFunctionInY ;A7CCA1; dw PlayPhantoonMaterializationSFX ;A7CCA3; - dw Instruction_Common_Sleep ;A7CCA5; + dw Common_Instruction_Sleep ;A7CCA5; ;;; $CCA7: Instruction list - eyeball - looking up ;;; InstList_Phantoon_Eyeball_LookingUp: dw $0001,ExtendedSpritemap_Phantoon_Eyeball_LookingUp ;A7CCA7; - dw Instruction_Common_Sleep ;A7CCAB; + dw Common_Instruction_Sleep ;A7CCAB; ;;; $CCAD: Instruction list - eyeball - looking up-right ;;; InstList_Phantoon_Eyeball_LookingUpRight: dw $0001,ExtendedSpritemap_Phantoon_Eyeball_LookingUpRight ;A7CCAD; - dw Instruction_Common_Sleep ;A7CCB1; + dw Common_Instruction_Sleep ;A7CCB1; ;;; $CCB3: Instruction list - eyeball - looking right ;;; InstList_Phantoon_Eyeball_LookingRight: dw $0001,ExtendedSpritemap_Phantoon_Eyeball_LookingRight ;A7CCB3; - dw Instruction_Common_Sleep ;A7CCB7; + dw Common_Instruction_Sleep ;A7CCB7; ;;; $CCB9: Instruction list - eyeball - looking down-right ;;; InstList_Phantoon_Eyeball_LookingDownRight: dw $0001,ExtendedSpritemap_Phantoon_Eyeball_LookingDownRight ;A7CCB9; - dw Instruction_Common_Sleep ;A7CCBD; + dw Common_Instruction_Sleep ;A7CCBD; ;;; $CCBF: Instruction list - eyeball - looking down ;;; InstList_Phantoon_Eyeball_LookingDown: dw $0001,ExtendedSpritemap_Phantoon_Eyeball_LookingDown ;A7CCBF; - dw Instruction_Common_Sleep ;A7CCC3; + dw Common_Instruction_Sleep ;A7CCC3; ;;; $CCC5: Instruction list - eyeball - looking down-left ;;; InstList_Phantoon_Eyeball_LookingDownLeft: dw $0001,ExtendedSpritemap_Phantoon_Eyeball_LookingDownLeft ;A7CCC5; - dw Instruction_Common_Sleep ;A7CCC9; + dw Common_Instruction_Sleep ;A7CCC9; ;;; $CCCB: Instruction list - eyeball - looking left ;;; InstList_Phantoon_Eyeball_LookingLeft: dw $0001,ExtendedSpritemap_Phantoon_Eyeball_LookingLeft ;A7CCCB; - dw Instruction_Common_Sleep ;A7CCCF; + dw Common_Instruction_Sleep ;A7CCCF; ;;; $CCD1: Instruction list - eyeball - looking up-left ;;; InstList_Phantoon_Eyeball_LookingUpLeft: dw $0001,ExtendedSpritemap_Phantoon_Eyeball_LookingUpLeft ;A7CCD1; - dw Instruction_Common_Sleep ;A7CCD5; + dw Common_Instruction_Sleep ;A7CCD5; ;;; $CCD7: Instruction list - tentacles ;;; @@ -7509,7 +6927,7 @@ InstList_Phantoon_Tentacles: dw $0008,ExtendedSpritemap_Phantoon_Tentacles_1 ;A7CCDB; dw $0008,ExtendedSpritemap_Phantoon_Tentacles_2 ;A7CCDF; dw $0008,ExtendedSpritemap_Phantoon_Tentacles_1 ;A7CCE3; - dw Instruction_Common_GotoY ;A7CCE7; + dw Common_Instruction_GotoY ;A7CCE7; dw InstList_Phantoon_Tentacles ;A7CCE9; @@ -7517,14 +6935,14 @@ InstList_Phantoon_Tentacles: InstList_Phantoon_Mouth_SpawnFlame: dw $0005,ExtendedSpritemap_Phantoon_Mouth_SpawningFlame_1 ;A7CCEB; dw $0005,ExtendedSpritemap_Phantoon_Mouth_SpawningFlame_0 ;A7CCEF; - dw Instruction_Common_CallFunctionInY ;A7CCF3; + dw Common_Instruction_CallFunctionInY ;A7CCF3; dw SpawnCasualFlame ;A7CCF5; ;;; $CCF7: Instruction list - mouth - initial ;;; InstList_Phantoon_Mouth_Initial: dw $0001,ExtendedSpritemap_Phantoon_Mouth_Normal ;A7CCF7; - dw Instruction_Common_Sleep ;A7CCFB; + dw Common_Instruction_Sleep ;A7CCFB; ;;; $CCFD: Casual flame timers ;;; @@ -7723,7 +7141,7 @@ InitAI_PhantoonBody: InitAI_Phantoon_Eye_Tentacles_Mouth: ; Phantoon body also executes this as part of initialisation AI, so all Phantoon parts are doing this LDX.W EnemyIndex ;A7CE55; - LDA.W #Spritemap_Common_Nothing ;A7CE58; + LDA.W #Common_Spritemap_Nothing ;A7CE58; STA.W Enemy.spritemap,X ;A7CE5B; LDA.W #$0001 ;A7CE5E; STA.W Enemy.instTimer,X ;A7CE61; @@ -10305,8 +9723,8 @@ endif ; !FEATURE_KEEP_UNREFERENCED Hitbox_Phantoon_0: dw $0001 ;A7E020; dw $0000,$0000,$0000,$0000 - dw RTL_A7804C ;A7E02A; - dw RTL_A7804C ;A7E02C; + dw Common_RTL_A0804C ;A7E02A; + dw Common_RTL_A0804C ;A7E02C; Hitbox_Phantoon_1: dw $0005 ;A7E02E; @@ -10588,7 +10006,7 @@ Palette_Etecoon: ;;; $E81E: Instruction list - look right at Samus and run left ;;; InstList_Etecoon_LookRightAtSamusAndRunLeft: dw $0005,Spritemap_Etecoon_C ;A7E81E; - dw Instruction_Common_Sleep ;A7E822; + dw Common_Instruction_Sleep ;A7E822; dw $0001,Spritemap_Etecoon_D ;A7E824; @@ -10598,7 +10016,7 @@ InstList_Etecoon_RunningLeft: dw $0005,Spritemap_Etecoon_1 ;A7E82C; dw $0005,Spritemap_Etecoon_2 ;A7E830; dw $0005,Spritemap_Etecoon_1 ;A7E834; - dw Instruction_Common_GotoY ;A7E838; + dw Common_Instruction_GotoY ;A7E838; dw InstList_Etecoon_RunningLeft ;A7E83A; @@ -10611,14 +10029,14 @@ InstList_Etecoon_WallJump_1: dw $0003,Spritemap_Etecoon_4 ;A7E844; dw $0003,Spritemap_Etecoon_5 ;A7E848; dw $0003,Spritemap_Etecoon_6 ;A7E84C; - dw Instruction_Common_GotoY ;A7E850; + dw Common_Instruction_GotoY ;A7E850; dw InstList_Etecoon_WallJump_1 ;A7E852; ;;; $E854: Instruction list - hopping - facing left ;;; InstList_Etecoon_Hopping_FacingLeft: dw $0001,Spritemap_Etecoon_8 ;A7E854; - dw Instruction_Common_Sleep ;A7E858; + dw Common_Instruction_Sleep ;A7E858; dw $000C,Spritemap_Etecoon_9 ;A7E85A; dw $000C,Spritemap_Etecoon_A ;A7E85E; @@ -10628,19 +10046,19 @@ InstList_Etecoon_HitCeiling: dw $0006,Spritemap_Etecoon_B ;A7E862; dw $000C,Spritemap_Etecoon_A ;A7E866; dw $000C,Spritemap_Etecoon_9 ;A7E86A; - dw Instruction_Common_Sleep ;A7E86E; + dw Common_Instruction_Sleep ;A7E86E; ;;; $E870: Instruction list - wall-jump left eligible ;;; InstList_Etecoon_WallJumpLeftEligible: dw $0001,Spritemap_Etecoon_F ;A7E870; - dw Instruction_Common_Sleep ;A7E874; + dw Common_Instruction_Sleep ;A7E874; ;;; $E876: Instruction list - look left at Samus and run right ;;; InstList_Etecoon_LookLeftAtSamusAndRunRight: dw $0005,Spritemap_Etecoon_1E ;A7E876; - dw Instruction_Common_Sleep ;A7E87A; + dw Common_Instruction_Sleep ;A7E87A; dw $0001,Spritemap_Etecoon_1D ;A7E87C; @@ -10650,7 +10068,7 @@ InstList_Etecoon_RunningRight: dw $0005,Spritemap_Etecoon_11 ;A7E884; dw $0005,Spritemap_Etecoon_12 ;A7E888; dw $0005,Spritemap_Etecoon_11 ;A7E88C; - dw Instruction_Common_GotoY ;A7E890; + dw Common_Instruction_GotoY ;A7E890; dw InstList_Etecoon_RunningRight ;A7E892; @@ -10665,38 +10083,38 @@ InstList_Etecoon_JumpingRight: dw $0003,Spritemap_Etecoon_14 ;A7E89C; dw $0003,Spritemap_Etecoon_15 ;A7E8A0; dw $0003,Spritemap_Etecoon_16 ;A7E8A4; - dw Instruction_Common_GotoY ;A7E8A8; + dw Common_Instruction_GotoY ;A7E8A8; dw InstList_Etecoon_JumpingRight ;A7E8AA; ;;; $E8AC: Instruction list - hopping - facing right ;;; InstList_Etecoon_Hopping_FacingRight: dw $0001,Spritemap_Etecoon_18 ;A7E8AC; - dw Instruction_Common_Sleep ;A7E8B0; + dw Common_Instruction_Sleep ;A7E8B0; dw $000C,Spritemap_Etecoon_19 ;A7E8B2; dw $000C,Spritemap_Etecoon_1A ;A7E8B6; dw $0006,Spritemap_Etecoon_1B ;A7E8BA; dw $000C,Spritemap_Etecoon_1A ;A7E8BE; dw $000C,Spritemap_Etecoon_19 ;A7E8C2; - dw Instruction_Common_Sleep ;A7E8C6; + dw Common_Instruction_Sleep ;A7E8C6; ;;; $E8C8: Instruction list - wall-jump right eligible ;;; InstList_Etecoon_WallJumpRightEligible: dw $0001,Spritemap_Etecoon_1F ;A7E8C8; - dw Instruction_Common_Sleep ;A7E8CC; + dw Common_Instruction_Sleep ;A7E8CC; ;;; $E8CE: Instruction list - initial ;;; InstList_Etecoon_Initial: dw $0008,Spritemap_Etecoon_18 ;A7E8CE; - dw Instruction_Common_GotoY ;A7E8D2; + dw Common_Instruction_GotoY ;A7E8D2; dw InstList_Etecoon_Initial ;A7E8D4; ;;; $E8D6: Instruction list - flexing ;;; InstList_Etecoon_Flexing_0: - dw Instruction_Common_TimerInY ;A7E8D6; + dw Common_Instruction_TimerInY ;A7E8D6; dw $0004 ;A7E8D8; InstList_Etecoon_Flexing_1: @@ -10706,11 +10124,11 @@ InstList_Etecoon_Flexing_1: dw $0008,Spritemap_Etecoon_1B ;A7E8E6; dw $0008,Spritemap_Etecoon_1A ;A7E8EA; dw $0008,Spritemap_Etecoon_19 ;A7E8EE; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;A7E8F2; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;A7E8F2; dw InstList_Etecoon_Flexing_1 ;A7E8F4; dw $0020,Spritemap_Etecoon_1C ;A7E8F6; dw $0020,Spritemap_Etecoon_1E ;A7E8FA; - dw Instruction_Common_Sleep ;A7E8FE; + dw Common_Instruction_Sleep ;A7E8FE; ;;; $E900: Etecoon constants ;;; @@ -10742,7 +10160,7 @@ InitAI_Etecoon: LDA.W Enemy.properties,X ;A7E915; ORA.W #$2000 ;A7E918; STA.W Enemy.properties,X ;A7E91B; - LDA.W #Spritemap_Common_Nothing ;A7E91E; + LDA.W #Common_Spritemap_Nothing ;A7E91E; STA.W Enemy.spritemap,X ;A7E921; LDA.W #$0001 ;A7E924; STA.W Enemy.instTimer,X ;A7E927; @@ -11829,7 +11247,7 @@ InstList_Dachora_RunningLeft: dw $0005,Spritemap_Dachora_3 ;A7F351; dw $0005,Spritemap_Dachora_4 ;A7F355; dw $0005,Spritemap_Dachora_5 ;A7F359; - dw Instruction_Common_GotoY ;A7F35D; + dw Common_Instruction_GotoY ;A7F35D; dw InstList_Dachora_RunningLeft ;A7F35F; InstList_Dachora_RunningLeft_FastAnimation: @@ -11839,7 +11257,7 @@ InstList_Dachora_RunningLeft_FastAnimation: dw $0003,Spritemap_Dachora_3 ;A7F36D; dw $0003,Spritemap_Dachora_4 ;A7F371; dw $0003,Spritemap_Dachora_5 ;A7F375; - dw Instruction_Common_GotoY ;A7F379; + dw Common_Instruction_GotoY ;A7F379; dw InstList_Dachora_RunningLeft_FastAnimation ;A7F37B; InstList_Dachora_RunningLeft_VeryFastAnimation: @@ -11849,7 +11267,7 @@ InstList_Dachora_RunningLeft_VeryFastAnimation: dw $0001,Spritemap_Dachora_3 ;A7F389; dw $0001,Spritemap_Dachora_4 ;A7F38D; dw $0001,Spritemap_Dachora_5 ;A7F391; - dw Instruction_Common_GotoY ;A7F395; + dw Common_Instruction_GotoY ;A7F395; dw InstList_Dachora_RunningLeft_VeryFastAnimation ;A7F397; @@ -11866,7 +11284,7 @@ InstList_Dachora_Idling_FacingLeft: dw $0007,Spritemap_Dachora_E ;A7F3B9; dw $0007,Spritemap_Dachora_D ;A7F3BD; dw $000A,Spritemap_Dachora_B ;A7F3C1; - dw Instruction_Common_GotoY ;A7F3C5; + dw Common_Instruction_GotoY ;A7F3C5; dw InstList_Dachora_Idling_FacingLeft ;A7F3C7; @@ -11881,7 +11299,7 @@ InstList_Dachora_Blinking_FacingLeft: dw $000A,Spritemap_Dachora_8 ;A7F3E1; dw $0005,Spritemap_Dachora_9 ;A7F3E5; dw $000B,Spritemap_Dachora_A ;A7F3E9; - dw Instruction_Common_GotoY ;A7F3ED; + dw Common_Instruction_GotoY ;A7F3ED; dw InstList_Dachora_Blinking_FacingLeft ;A7F3EF; @@ -11889,21 +11307,21 @@ if !FEATURE_KEEP_UNREFERENCED ;;; $F3F1: Unused. Instruction list - charge shinespark - facing left ;;; UNUSED_InstList_Dachora_ChargeShinespark_FacingLeft_A7F3F1: dw $0001,Spritemap_Dachora_6 ;A7F3F1; - dw Instruction_Common_Sleep ;A7F3F5; + dw Common_Instruction_Sleep ;A7F3F5; endif ; !FEATURE_KEEP_UNREFERENCED ;;; $F3F7: Instruction list - echo - facing left ;;; InstList_Dachora_Echo_FacingLeft: dw $000A,Spritemap_Dachora_7 ;A7F3F7; - dw Instruction_Common_GotoY ;A7F3FB; + dw Common_Instruction_GotoY ;A7F3FB; dw InstList_Dachora_Echo_FacingLeft ;A7F3FD; ;;; $F3FF: Instruction list - falling - facing left ;;; InstList_Dachora_Falling_FacingLeft: dw $0005,Spritemap_Dachora_4 ;A7F3FF; - dw Instruction_Common_GotoY ;A7F403; + dw Common_Instruction_GotoY ;A7F403; dw InstList_Dachora_Falling_FacingLeft ;A7F405; @@ -11915,7 +11333,7 @@ InstList_Dachora_RunningRight: dw $0005,Spritemap_Dachora_12 ;A7F413; dw $0005,Spritemap_Dachora_13 ;A7F417; dw $0005,Spritemap_Dachora_14 ;A7F41B; - dw Instruction_Common_GotoY ;A7F41F; + dw Common_Instruction_GotoY ;A7F41F; dw InstList_Dachora_RunningRight ;A7F421; InstList_Dachora_RunningRight_FastAnimation: @@ -11925,7 +11343,7 @@ InstList_Dachora_RunningRight_FastAnimation: dw $0003,Spritemap_Dachora_12 ;A7F42F; dw $0003,Spritemap_Dachora_13 ;A7F433; dw $0003,Spritemap_Dachora_14 ;A7F437; - dw Instruction_Common_GotoY ;A7F43B; + dw Common_Instruction_GotoY ;A7F43B; dw InstList_Dachora_RunningRight_FastAnimation ;A7F43D; InstList_Dachora_RunningRight_VeryFastAnimation: @@ -11935,7 +11353,7 @@ InstList_Dachora_RunningRight_VeryFastAnimation: dw $0001,Spritemap_Dachora_12 ;A7F44B; dw $0001,Spritemap_Dachora_13 ;A7F44F; dw $0001,Spritemap_Dachora_14 ;A7F453; - dw Instruction_Common_GotoY ;A7F457; + dw Common_Instruction_GotoY ;A7F457; dw InstList_Dachora_RunningRight_VeryFastAnimation ;A7F459; @@ -11952,7 +11370,7 @@ InstList_Dachora_Idling_FacingRight: dw $0007,Spritemap_Dachora_1D ;A7F47B; dw $0007,Spritemap_Dachora_1C ;A7F47F; dw $000A,Spritemap_Dachora_1A ;A7F483; - dw Instruction_Common_GotoY ;A7F487; + dw Common_Instruction_GotoY ;A7F487; dw InstList_Dachora_Idling_FacingRight ;A7F489; @@ -11967,27 +11385,27 @@ InstList_Dachora_Blinking_FacingRight: dw $000A,Spritemap_Dachora_17 ;A7F4A3; dw $0005,Spritemap_Dachora_18 ;A7F4A7; dw $000B,Spritemap_Dachora_19 ;A7F4AB; - dw Instruction_Common_GotoY ;A7F4AF; + dw Common_Instruction_GotoY ;A7F4AF; dw InstList_Dachora_Blinking_FacingRight ;A7F4B1; ;;; $F4B3: Instruction list - charge shinespark - facing right ;;; InstList_Dachora_ChargeShinespark_FacingRight: dw $0001,Spritemap_Dachora_15 ;A7F4B3; - dw Instruction_Common_Sleep ;A7F4B7; + dw Common_Instruction_Sleep ;A7F4B7; ;;; $F4B9: Instruction list - echo - facing right ;;; InstList_Dachora_Echo_FacingRight: dw $000A,Spritemap_Dachora_16 ;A7F4B9; - dw Instruction_Common_GotoY ;A7F4BD; + dw Common_Instruction_GotoY ;A7F4BD; dw InstList_Dachora_Echo_FacingRight ;A7F4BF; ;;; $F4C1: Instruction list - falling - facing right ;;; InstList_Dachora_Falling_FacingRight: dw $0005,Spritemap_Dachora_13 ;A7F4C1; - dw Instruction_Common_GotoY ;A7F4C5; + dw Common_Instruction_GotoY ;A7F4C5; dw InstList_Dachora_Falling_FacingRight ;A7F4C7; @@ -12031,7 +11449,7 @@ InitAI_Dachora: LDA.W Enemy.properties,X ;A7F4E0; ORA.W #$2000 ;A7F4E3; STA.W Enemy.properties,X ;A7F4E6; - LDA.W #Spritemap_Common_Nothing ;A7F4E9; + LDA.W #Common_Spritemap_Nothing ;A7F4E9; STA.W Enemy.spritemap,X ;A7F4EC; LDA.W #$0001 ;A7F4EF; STA.W Enemy.instTimer,X ;A7F4F2; diff --git a/src/bank_A8.asm b/src/bank_A8.asm index 4b38b15..f637457 100644 --- a/src/bank_A8.asm +++ b/src/bank_A8.asm @@ -3,591 +3,9 @@ org $A88000 ; Common to all enemy code banks - -;;; $8000: Grapple AI - no interaction. Also unfreezes enemies(!) ;;; -CommonA8_GrappleAI_NoInteraction: -; Used by skultera, Draygon body, fire arc, Phantoon, etecoon, dachora and WS ghost - JSL.L GrappleAI_SwitchEnemyAIToMainAI ;A88000; - RTL ;A88004; - - -;;; $8005: Grapple AI - Samus latches on ;;; -CommonA8_GrappleAI_SamusLatchesOn: -; Used by gripper and Crocomire - JSL.L GrappleAI_SamusLatchesOnWithGrapple ;A88005; - RTL ;A88009; - - -;;; $800A: Grapple AI - kill enemy ;;; -CommonA8_GrappleAI_KillEnemy: -; Common - JSL.L GrappleAI_EnemyGrappleDeath ;A8800A; - RTL ;A8800E; - - -;;; $800F: Grapple AI - cancel grapple beam ;;; -CommonA8_GrappleAI_CancelGrappleBeam: -; Common - JSL.L GrappleAI_SwitchToFrozenAI ;A8800F; - RTL ;A88013; - - -;;; $8014: Grapple AI - Samus latches on - no invincibility ;;; -CommonA8_GrappleAI_SamusLatchesOn_NoInvincibility: -; Used by powamp - JSL.L GrappleAI_SamusLatchesOnWithGrapple_NoInvincibility ;A88014; - RTL ;A88018; - - -;;; $8019: Unused. Grapple AI - Samus latches on - paralyse enemy ;;; -UNUSED_CommonA8_GrappleAI_SamusLatchesOn_ParalyzeEnemy_A88019: - JSL.L GrappleAI_SamusLatchesOnWithGrapple_ParalyzeEnemy ;A88019; - RTL ;A8801D; - - -;;; $801E: Grapple AI - hurt Samus ;;; -CommonA8_GrappleAI_HurtSamus: -; Used by WS spark -; Hurt reaction happens in $9B:B932 - JSL.L GrappleAI_SwitchToFrozenAI_duplicate ;A8801E; - RTL ;A88022; - - -;;; $8023: Normal enemy touch AI ;;; -CommonA8_NormalEnemyTouchAI: - JSL.L NormalEnemyTouchAI ;A88023; - RTL ;A88027; - - -;;; $8028: Normal touch AI - no death check ;;; -CommonA8_NormalTouchAI_NoDeathCheck: - JSL.L NormalEnemyTouchAI_NoDeathCheck_External ;A88028; - RTL ;A8802C; - - -;;; $802D: Normal enemy shot AI ;;; -CommonA8_NormalEnemyShotAI: - JSL.L NormalEnemyShotAI ;A8802D; - RTL ;A88031; - - -;;; $8032: Normal enemy shot AI - no death check, no enemy shot graphic ;;; -CommonA8_NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic: - JSL.L NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic_External ;A88032; - RTL ;A88036; - - -;;; $8037: Normal enemy power bomb AI ;;; -CommonA8_NormalEnemyPowerBombAI: - JSL.L NormalEnemyPowerBombAI ;A88037; - RTL ;A8803B; - - -;;; $803C: Normal enemy power bomb AI - no death check ;;; -CommonA8_NormalEnemyPowerBombAI_NoDeathCheck: -; Kraid's power bomb AI - JSL.L NormalEnemyPowerBombAI_NoDeathCheck_External ;A8803C; - RTL ;A88040; - - -;;; $8041: Normal enemy frozen AI ;;; -CommonA8_NormalEnemyFrozenAI: - JSL.L NormalEnemyFrozenAI ;A88041; - RTL ;A88045; - - -;;; $8046: Creates a dud shot ;;; -CommonA8_CreateADudShot: - JSL.L CreateADudShot ;A88046; - RTL ;A8804A; - - -;;; $804B: RTS ;;; -RTS_A8804B: - RTS ;A8804B; - - -;;; $804C: RTL ;;; -RTL_A8804C: - RTL ;A8804C; - - -;;; $804D: Spritemap - nothing ;;; -Spritemap_CommonA8_Nothing: - dw $0000 ;A8804D; - - -;;; $804F: Extended spritemap - nothing ;;; -ExtendedSpritemap_CommonA8_Nothing: - dw $0001 ;A8804F; - dw $0000,$0000 - dw Spritemap_CommonA8_Nothing ;A88055; - dw Hitbox_CommonA8_Nothing ;A88057; - - -;;; $8059: Hitbox - nothing ;;; -Hitbox_CommonA8_Nothing: -; [n entries] [[left offset] [top offset] [right offset] [bottom offset] [p touch] [p shot]]... - dw $0001 ;A88059; - dw $0000,$0000,$0000,$0000 - dw CommonA8_NormalEnemyTouchAI ;A88063; - dw CommonA8_NormalEnemyShotAI ;A88065; - - -;;; $8067: Instruction list - delete enemy ;;; -InstList_CommonA8_DeleteEnemy: - dw Instruction_CommonA8_DeleteEnemy ;A88067; - - -;;; $8069: Two NOPs ;;; -NOPNOP_A88069: -; Used as palette by respawning enemy placeholder and Draygon's eye o_O - NOP ;A88069; - NOP ;A8806A; - - -;;; $806B: Instruction - Enemy.var5 = [[Y]] ;;; -Instruction_CommonA8_Enemy0FB2_InY: -; Used only by torizos (for enemy movement function) and escape etecoon (for enemy function) - LDA.W $0000,Y ;A8806B; - STA.W Enemy.var5,X ;A8806E; - INY ;A88071; - INY ;A88072; - RTL ;A88073; - - -;;; $8074: Instruction - Enemy.var5 = RTS ;;; -Instruction_CommonA8_SetEnemy0FB2ToRTS: - LDA.W #RTS_A8807B ;A88074; - STA.W Enemy.var5,X ;A88077; - RTL ;A8807A; - - -RTS_A8807B: - RTS ;A8807B; - - -;;; $807C: Instruction - delete enemy ;;; -Instruction_CommonA8_DeleteEnemy: - LDA.W Enemy.properties,X ;A8807C; - ORA.W #$0200 ;A8807F; - STA.W Enemy.properties,X ;A88082; - PLA ;A88085; - PEA.W ProcessEnemyInstructions_return-1 ;A88086; - RTL ;A88089; - - -;;; $808A: Instruction - call function [[Y]] ;;; -Instruction_CommonA8_CallFunctionInY: - LDA.W $0000,Y ;A8808A; - STA.B DP_Temp12 ;A8808D; - PHY ;A8808F; - PHX ;A88090; - PEA.W .manualReturn-1 ;A88091; - JMP.W (DP_Temp12) ;A88094; - - .manualReturn: - PLX ;A88097; - PLY ;A88098; - INY ;A88099; - INY ;A8809A; - RTL ;A8809B; - - -;;; $809C: Instruction - call function [[Y]] with A = [[Y] + 2] ;;; -Instruction_CommonA8_CallFunctionInY_WithA: - LDA.W $0000,Y ;A8809C; - STA.B DP_Temp12 ;A8809F; - LDA.W $0002,Y ;A880A1; - PHY ;A880A4; - PHX ;A880A5; - PEA.W .manualReturn-1 ;A880A6; - JMP.W (DP_Temp12) ;A880A9; - - .manualReturn: - PLX ;A880AC; - PLY ;A880AD; - TYA ;A880AE; - CLC ;A880AF; - ADC.W #$0004 ;A880B0; - TAY ;A880B3; - RTL ;A880B4; - - -if !FEATURE_KEEP_UNREFERENCED -;;; $80B5: Unused. Instruction - call external function [[Y]] ;;; -UNUSED_Instruction_CommonA8_CallExternalFunctionInY_A880B5: - LDA.W $0000,Y ;A880B5; - STA.B DP_Temp12 ;A880B8; - LDA.W $0001,Y ;A880BA; - STA.B DP_Temp13 ;A880BD; - PHX ;A880BF; - PHY ;A880C0; - JSL.L .externalFunction ;A880C1; - PLY ;A880C5; - PLX ;A880C6; - INY ;A880C7; - INY ;A880C8; - INY ;A880C9; - RTL ;A880CA; - - .externalFunction: - JML.W [DP_Temp12] ;A880CB; - - -;;; $80CE: Unused. Instruction - call external function [[Y]] with A = [[Y] + 3] ;;; -UNUSED_Inst_CommonA8_CallExternalFunctionInY_WithA_A880CE: - LDA.W $0000,Y ;A880CE; - STA.B DP_Temp12 ;A880D1; - LDA.W $0001,Y ;A880D3; - STA.B DP_Temp13 ;A880D6; - LDA.W $0003,Y ;A880D8; - PHX ;A880DB; - PHY ;A880DC; - JSL.L .externalFunction ;A880DD; - PLY ;A880E1; - PLX ;A880E2; - TYA ;A880E3; - CLC ;A880E4; - ADC.W #$0005 ;A880E5; - TAY ;A880E8; - RTL ;A880E9; - - .externalFunction: - JML.W [DP_Temp12] ;A880EA; -endif ; !FEATURE_KEEP_UNREFERENCED - - -;;; $80ED: Instruction - go to [[Y]] ;;; -Instruction_CommonA8_GotoY: - LDA.W $0000,Y ;A880ED; - TAY ;A880F0; - RTL ;A880F1; - - -;;; $80F2: Instruction - go to [[Y]] + ±[[Y]] ;;; -Instruction_CommonA8_GotoY_PlusY: - STY.B DP_Temp12 ;A880F2; - DEY ;A880F4; - LDA.W $0000,Y ;A880F5; - XBA ;A880F8; - BMI .highByte ;A880F9; - AND.W #$00FF ;A880FB; - BRA + ;A880FE; - - .highByte: - ORA.W #$FF00 ;A88100; - -+ CLC ;A88103; - ADC.B DP_Temp12 ;A88104; - TAY ;A88106; - RTL ;A88107; - - -;;; $8108: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonA8_DecrementTimer_GotoYIfNonZero: - DEC.W Enemy.loopCounter,X ;A88108; - BNE Instruction_CommonA8_GotoY ;A8810B; - INY ;A8810D; - INY ;A8810E; - RTL ;A8810F; - - -;;; $8110: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonA8_DecrementTimer_GotoYIfNonZero_duplicate: - DEC.W Enemy.loopCounter,X ;A88110; - BNE Instruction_CommonA8_GotoY ;A88113; - INY ;A88115; - INY ;A88116; - RTL ;A88117; - - -;;; $8118: Instruction - decrement timer and go to [Y] + ±[[Y]] if non-zero ;;; -Instruction_CommonA8_DecrementTimer_GotoY_PlusY_IfNonZero: - SEP #$20 ;A88118; - DEC.W Enemy.loopCounter,X ;A8811A; - REP #$20 ;A8811D; - BNE Instruction_CommonA8_GotoY_PlusY ;A8811F; - INY ;A88121; - RTL ;A88122; - - -;;; $8123: Instruction - timer = [[Y]] ;;; -Instruction_CommonA8_TimerInY: - LDA.W $0000,Y ;A88123; - STA.W Enemy.loopCounter,X ;A88126; - INY ;A88129; - INY ;A8812A; - RTL ;A8812B; - - -;;; $812C: Instruction - skip next instruction ;;; -Instruction_CommonA8_SkipNextInstruction: - INY ;A8812C; - INY ;A8812D; - RTL ;A8812E; - - -;;; $812F: Instruction - sleep ;;; -Instruction_CommonA8_Sleep: - DEY ;A8812F; - DEY ;A88130; - TYA ;A88131; - STA.W Enemy.instList,X ;A88132; - PLA ;A88135; - PEA.W ProcessEnemyInstructions_return-1 ;A88136; - RTL ;A88139; - - -;;; $813A: Instruction - wait [[Y]] frames ;;; -Instruction_CommonA8_WaitYFrames: -; Set instruction timer and terminate processing enemy instructions -; Used for running a delay that doesn't update graphics, -; useful for e.g. GT eye beam attack ($AA:D10D), implemented by an instruction list that has no graphical instructions, -; which allows it to be called from multiple different poses - LDA.W $0000,Y ;A8813A; - STA.W Enemy.instTimer,X ;A8813D; - INY ;A88140; - INY ;A88141; - TYA ;A88142; - STA.W Enemy.instList,X ;A88143; - PLA ;A88146; - PEA.W ProcessEnemyInstructions_return-1 ;A88147; - RTL ;A8814A; - - -;;; $814B: Instruction - transfer [[Y]] bytes from [[Y] + 2] to VRAM [[Y] + 5] ;;; -Instruction_CommonA8_TransferYBytesInYToVRAM: - PHX ;A8814B; - LDX.W VRAMWriteStack ;A8814C; - LDA.W $0000,Y ;A8814F; - STA.B VRAMWrite.size,X ;A88152; - LDA.W $0002,Y ;A88154; - STA.B VRAMWrite.src,X ;A88157; - LDA.W $0003,Y ;A88159; - STA.B VRAMWrite.src+1,X ;A8815C; - LDA.W $0005,Y ;A8815E; - STA.B VRAMWrite.dest,X ;A88161; - TXA ;A88163; - CLC ;A88164; - ADC.W #$0007 ;A88165; - STA.W VRAMWriteStack ;A88168; - TYA ;A8816B; - CLC ;A8816C; - ADC.W #$0007 ;A8816D; - TAY ;A88170; - PLX ;A88171; - RTL ;A88172; - - -;;; $8173: Instruction - enable off-screen processing ;;; -Instruction_CommonA8_EnableOffScreenProcessing: - LDA.W Enemy.properties,X ;A88173; - ORA.W #$0800 ;A88176; - STA.W Enemy.properties,X ;A88179; - RTL ;A8817C; - - -;;; $817D: Instruction - disable off-screen processing ;;; -Instruction_CommonA8_DisableOffScreenProcessing: - LDA.W Enemy.properties,X ;A8817D; - AND.W #$F7FF ;A88180; - STA.W Enemy.properties,X ;A88183; - RTL ;A88186; - - -;;; $8187: Common enemy speeds - linearly increasing ;;; -CommonA8EnemySpeeds_LinearlyIncreasing: -; _____________________ Speed -; | _______________ Subspeed -; | | _________ Negated speed -; | | | ___ Negated subspeed -; | | | | - .speed: - dw $0000 ;A88187; - .subspeed: - dw $0000 ;A88189; - .negatedSpeed: - dw $0000 ;A8818B; - .negatedSubspeed: - dw $0000 ;A8818D; - dw $0000,$1000,$FFFF,$F000 - dw $0000,$2000,$FFFF,$E000 - dw $0000,$3000,$FFFF,$D000 - dw $0000,$4000,$FFFF,$C000 - dw $0000,$5000,$FFFF,$B000 - dw $0000,$6000,$FFFF,$A000 - dw $0000,$7000,$FFFF,$9000 - dw $0000,$8000,$FFFF,$8000 - dw $0000,$9000,$FFFF,$7000 - dw $0000,$A000,$FFFF,$6000 - dw $0000,$B000,$FFFF,$5000 - dw $0000,$C000,$FFFF,$4000 - dw $0000,$D000,$FFFF,$3000 - dw $0000,$E000,$FFFF,$2000 - dw $0000,$F000,$FFFF,$1000 - dw $0001,$0000,$FFFF,$0000 - dw $0001,$1000,$FFFE,$F000 - dw $0001,$2000,$FFFE,$E000 - dw $0001,$3000,$FFFE,$D000 - dw $0001,$4000,$FFFE,$C000 - dw $0001,$5000,$FFFE,$B000 - dw $0001,$6000,$FFFE,$A000 - dw $0001,$7000,$FFFE,$9000 - dw $0001,$8000,$FFFE,$8000 - dw $0001,$9000,$FFFE,$7000 - dw $0001,$A000,$FFFE,$6000 - dw $0001,$B000,$FFFE,$5000 - dw $0001,$C000,$FFFE,$4000 - dw $0001,$D000,$FFFE,$3000 - dw $0001,$E000,$FFFE,$2000 - dw $0001,$F000,$FFFE,$1000 - dw $0002,$0000,$FFFE,$0000 - dw $0002,$1000,$FFFD,$F000 - dw $0002,$2000,$FFFD,$E000 - dw $0002,$3000,$FFFD,$D000 - dw $0002,$4000,$FFFD,$C000 - dw $0002,$5000,$FFFD,$B000 - dw $0002,$6000,$FFFD,$A000 - dw $0002,$7000,$FFFD,$9000 - dw $0002,$8000,$FFFD,$8000 - dw $0002,$9000,$FFFD,$7000 - dw $0002,$A000,$FFFD,$6000 - dw $0002,$B000,$FFFD,$5000 - dw $0002,$C000,$FFFD,$4000 - dw $0002,$D000,$FFFD,$3000 - dw $0002,$E000,$FFFD,$2000 - dw $0002,$F000,$FFFD,$1000 - dw $0003,$0000,$FFFD,$0000 - dw $0003,$1000,$FFFC,$F000 - dw $0003,$2000,$FFFC,$E000 - dw $0003,$3000,$FFFC,$D000 - dw $0003,$4000,$FFFC,$C000 - dw $0003,$5000,$FFFC,$B000 - dw $0003,$6000,$FFFC,$A000 - dw $0003,$7000,$FFFC,$9000 - dw $0003,$8000,$FFFC,$8000 - dw $0003,$9000,$FFFC,$7000 - dw $0003,$A000,$FFFC,$6000 - dw $0003,$B000,$FFFC,$5000 - dw $0003,$C000,$FFFC,$4000 - dw $0003,$D000,$FFFC,$3000 - dw $0003,$E000,$FFFC,$2000 - dw $0003,$F000,$FFFC,$1000 - dw $0004,$0000,$FFFC,$0000 - - -;;; $838F: Common enemy speeds - quadratically increasing ;;; -CommonA8EnemySpeeds_QuadraticallyIncreasing: -; I.e. gravity -; Used by e.g. Botwoon when dying and falling to the floor -; _____________________ Subspeed -; | _______________ Speed -; | | _________ Negated subspeed -; | | | ___ Negated speed -; | | | | - .subspeed: - dw $0000 ;A8838F; - .speed: - dw $0000 ;A88391; - .negatedSubspeed: - dw $0000 ;A88393; - .negatedSpeed: - dw $0000 ;A88395; - dw $0109,$0000,$FEF7,$FFFF - dw $031B,$0000,$FCE5,$FFFF - dw $0636,$0000,$F9CA,$FFFF - dw $0A5A,$0000,$F5A6,$FFFF - dw $0F87,$0000,$F079,$FFFF - dw $15BD,$0000,$EA43,$FFFF - dw $1CFC,$0000,$E304,$FFFF - dw $2544,$0000,$DABC,$FFFF - dw $2E95,$0000,$D16B,$FFFF - dw $38EF,$0000,$C711,$FFFF - dw $4452,$0000,$BBAE,$FFFF - dw $50BE,$0000,$AF42,$FFFF - dw $5E33,$0000,$A1CD,$FFFF - dw $6CB1,$0000,$934F,$FFFF - dw $7C38,$0000,$83C8,$FFFF - dw $8CC8,$0000,$7338,$FFFF - dw $9E61,$0000,$619F,$FFFF - dw $B103,$0000,$4EFD,$FFFF - dw $C4AE,$0000,$3B52,$FFFF - dw $D962,$0000,$269E,$FFFF - dw $EF1F,$0000,$10E1,$FFFF - dw $05E5,$0000,$FA1B,$FFFF - dw $14B4,$0001,$EB4C,$FFFE - dw $2D8C,$0001,$D274,$FFFE - dw $476D,$0001,$B893,$FFFE - dw $6257,$0001,$9DA9,$FFFE - dw $7E4A,$0001,$81B6,$FFFE - dw $9B46,$0001,$64BA,$FFFE - dw $B94B,$0001,$46B5,$FFFE - dw $D859,$0001,$27A7,$FFFE - dw $F870,$0001,$0790,$FFFE - dw $1090,$0002,$EF70,$FFFD - dw $32B9,$0002,$CD47,$FFFD - dw $55EB,$0002,$AA15,$FFFD - dw $7A26,$0002,$85DA,$FFFD - dw $9F6A,$0002,$6096,$FFFD - dw $C5B7,$0002,$3A49,$FFFD - dw $ED0D,$0002,$12F3,$FFFD - dw $0C6C,$0003,$F394,$FFFC - dw $35D4,$0003,$CA2C,$FFFC - dw $6045,$0003,$9FBB,$FFFC - dw $8BBF,$0003,$7441,$FFFC - dw $B842,$0003,$47BE,$FFFC - dw $E5CE,$0003,$1A32,$FFFC - dw $0B63,$0004,$F49D,$FFFB - dw $3B01,$0004,$C4FF,$FFFB - dw $6BA8,$0004,$9458,$FFFB - dw $9D58,$0004,$62A8,$FFFB - dw $D011,$0004,$2FEF,$FFFB - dw $03D3,$0004,$FC2D,$FFFB - dw $2F9E,$0005,$D062,$FFFA - dw $6572,$0005,$9A8E,$FFFA - dw $9C4F,$0005,$63B1,$FFFA - dw $D435,$0005,$2BCB,$FFFA - dw $0424,$0006,$FBDC,$FFF9 - dw $3E1C,$0006,$C1E4,$FFF9 - dw $791D,$0006,$86E3,$FFF9 - dw $B527,$0006,$4AD9,$FFF9 - dw $F23A,$0006,$0DC6,$FFF9 - dw $2756,$0007,$D8AA,$FFF8 - dw $667B,$0007,$9985,$FFF8 - dw $A6A9,$0007,$5957,$FFF8 - dw $E7E0,$0007,$1820,$FFF8 - dw $2120,$0008,$DEE0,$FFF7 - dw $6469,$0008,$9B97,$FFF7 - dw $A8BB,$0008,$5745,$FFF7 - dw $EE16,$0008,$11EA,$FFF7 - dw $2B7A,$0009,$D486,$FFF6 - dw $72E7,$0009,$8D19,$FFF6 - dw $BB5D,$0009,$44A3,$FFF6 - dw $04DC,$0009,$FB24,$FFF6 - dw $4664,$000A,$B99C,$FFF5 - dw $91F5,$000A,$6E0B,$FFF5 - dw $DE8F,$000A,$2171,$FFF5 - dw $2332,$000B,$DCCE,$FFF4 - dw $71DE,$000B,$8E22,$FFF4 - dw $C193,$000B,$3E6D,$FFF4 - dw $0951,$000C,$F6AF,$FFF3 - dw $5B18,$000C,$A4E8,$FFF3 - dw $ADE8,$000C,$5218,$FFF3 - dw $01C1,$000C,$FE3F,$FFF3 - dw $4DA3,$000D,$B25D,$FFF2 - dw $A38E,$000D,$5C72,$FFF2 - dw $FA82,$000D,$057E,$FFF2 - dw $497F,$000E,$B681,$FFF1 - dw $A285,$000E,$5D7B,$FFF1 - dw $FC94,$000E,$036C,$FFF1 - dw $4EAC,$000F,$B154,$FFF0 - dw $AACD,$000F,$5533,$FFF0 - dw $07F7,$000F,$F809,$FFF0 - dw $5D2A,$0010,$A2D6,$FFEF - dw $BC66,$0010,$439A,$FFEF - dw $13AB,$0011,$EC55,$FFEE - dw $74F9,$0011,$8B07,$FFEE +namespace CommonA8 +incsrc "common_enemy_functions.asm" +namespace off ;;; $8687: Palette - enemy $E63F/$E67F (evir) ;;; @@ -604,7 +22,7 @@ InstList_Evir_Body_FacingLeft: dw $000A,Spritemap_Evir_3 ;A886B3; dw $000A,Spritemap_Evir_4 ;A886B7; dw $000A,Spritemap_Evir_5 ;A886BB; - dw Instruction_Common_GotoY ;A886BF; + dw Common_Instruction_GotoY ;A886BF; dw InstList_Evir_Body_FacingLeft ;A886C1; @@ -627,7 +45,7 @@ InstList_Evir_Arms_FacingLeft: dw $000A,Spritemap_Evir_8 ;A886FB; dw $000A,Spritemap_Evir_9 ;A886FF; dw $0030,Spritemap_Evir_A ;A88703; - dw Instruction_Common_GotoY ;A88707; + dw Common_Instruction_GotoY ;A88707; dw InstList_Evir_Arms_FacingLeft ;A88709; @@ -639,7 +57,7 @@ InstList_Evir_Body_FacingRight: dw $000A,Spritemap_Evir_10 ;A88717; dw $000A,Spritemap_Evir_11 ;A8871B; dw $000A,Spritemap_Evir_12 ;A8871F; - dw Instruction_Common_GotoY ;A88723; + dw Common_Instruction_GotoY ;A88723; dw InstList_Evir_Body_FacingRight ;A88725; @@ -662,30 +80,30 @@ InstList_Evir_Arms_FacingRight: dw $000A,Spritemap_Evir_15 ;A8875F; dw $000A,Spritemap_Evir_16 ;A88763; dw $0030,Spritemap_Evir_17 ;A88767; - dw Instruction_Common_GotoY ;A8876B; + dw Common_Instruction_GotoY ;A8876B; dw InstList_Evir_Arms_FacingRight ;A8876D; ;;; $876F: Instruction list - evir projectile - normal ;;; InstList_Evir_Projectile_Normal: dw $0001,Spritemap_Evir_C ;A8876F; - dw Instruction_Common_Sleep ;A88773; + dw Common_Instruction_Sleep ;A88773; ;;; $8775: Instruction list - evir projectile - regenerating ;;; InstList_Evir_Projectile_Regenerating_0: dw Instruction_Evir_SetInitialRegenerationXOffset ;A88775; - dw Instruction_Common_TimerInY,$0008 ;A88777; + dw Common_Instruction_TimerInY,$0008 ;A88777; dw Instruction_Evir_PlaySpitSFX ;A8877B; InstList_Evir_Projectile_Regenerating_1: dw $0008,Spritemap_Evir_B ;A8877D; dw Instruction_Evir_AdvanceRegenerationXOffset ;A88781; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;A88783; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;A88783; dw InstList_Evir_Projectile_Regenerating_1 ;A88785; dw $0010,Spritemap_Evir_C ;A88787; dw Instruction_Evir_FinishRegeneration ;A8878B; - dw Instruction_Common_Sleep ;A8878D; + dw Common_Instruction_Sleep ;A8878D; ;;; $878F: Instruction - queue evir spit sound effect ;;; @@ -756,13 +174,13 @@ InitAI_Evir: ASL ;A887F2; ASL ;A887F3; TAY ;A887F4; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A887F5; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A887F5; STA.L Evir.downVelocity,X ;A887F8; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A887FC; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A887FC; STA.L Evir.downSubVelocity,X ;A887FF; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;A88803; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;A88803; STA.L Evir.upVelocity,X ;A88806; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;A8880A; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;A8880A; STA.L Evir.upSubVelocity,X ;A8880D; LDA.W Enemy.init1+1,Y ;A88811; AND.W #$00FF ;A88814; @@ -1161,7 +579,7 @@ PowerBombReaction_Evir: ;;; $8B12: Enemy touch - enemy $E63F (evir) ;;; EnemyTouch_Evir: - JSL.L NormalEnemyShotAI ;A88B12; fallthrough to ContactReaction_Evir_Common + JSL.L NormalEnemyShotAI_Internal ;A88B12; fallthrough to ContactReaction_Evir_Common ;;; $8B16: Evir shared contact reaction ;;; @@ -1524,7 +942,7 @@ InstList_Eye_Active: dw $000A,Spritemap_Eye_1 ;A88FE0; dw $000A,Spritemap_Eye_0 ;A88FE4; dw $000A,Spritemap_Eye_0 ;A88FE8; - dw Instruction_Common_GotoY ;A88FEC; + dw Common_Instruction_GotoY ;A88FEC; dw InstList_Eye_Active ;A88FEE; @@ -1538,7 +956,7 @@ InstList_Eye_FacingRight_Deactivating: ;;; $8FFC: Instruction list - eye - facing right - closed ;;; InstList_Eye_FacingRight_Closed: dw $0030,Spritemap_Eye_E ;A88FFC; - dw Instruction_Common_Sleep ;A89000; + dw Common_Instruction_Sleep ;A89000; ;;; $9002: Instruction list - eye - facing left - deactivating ;;; @@ -1551,7 +969,7 @@ InstList_Eye_FacingLeft_Deactivating: ;;; $900E: Instruction list - eye - facing left - closed ;;; InstList_Eye_FacingLeft_Closed: dw $0030,Spritemap_Eye_10 ;A8900E; - dw Instruction_Common_Sleep ;A89012; + dw Common_Instruction_Sleep ;A89012; ;;; $9014: Instruction list - eye - activating - facing right ;;; @@ -1560,7 +978,7 @@ InstList_Eye_FacingRight_Activating: dw $0005,Spritemap_Eye_F ;A89018; dw $0030,Spritemap_Eye_3 ;A8901C; dw $0008,Spritemap_Eye_F ;A89020; - dw Instruction_Common_Sleep ;A89024; + dw Common_Instruction_Sleep ;A89024; ;;; $9026: Instruction list - eye - activating - facing left ;;; @@ -1569,31 +987,31 @@ InstList_Eye_FacingLeft_Activating: dw $0005,Spritemap_Eye_11 ;A8902A; dw $0030,Spritemap_Eye_A ;A8902E; dw $0008,Spritemap_Eye_11 ;A89032; - dw Instruction_Common_Sleep ;A89036; + dw Common_Instruction_Sleep ;A89036; ;;; $9038: Instruction list - mount - facing right ;;; InstList_Eye_Mount_FacingRight: dw $0001,Spritemap_Eye_12 ;A89038; - dw Instruction_Common_Sleep ;A8903C; + dw Common_Instruction_Sleep ;A8903C; ;;; $903E: Instruction list - mount - facing down ;;; InstList_Eye_Mount_FacingDown: dw $0001,Spritemap_Eye_13 ;A8903E; - dw Instruction_Common_Sleep ;A89042; + dw Common_Instruction_Sleep ;A89042; ;;; $9044: Instruction list - mount - facing left ;;; InstList_Eye_Mount_FacingLeft: dw $0001,Spritemap_Eye_14 ;A89044; - dw Instruction_Common_Sleep ;A89048; + dw Common_Instruction_Sleep ;A89048; ;;; $904A: Instruction list - mount - facing up ;;; InstList_Eye_Mount_FacingUp: dw $0001,Spritemap_Eye_15 ;A8904A; - dw Instruction_Common_Sleep ;A8904E; + dw Common_Instruction_Sleep ;A8904E; ;;; $9050: Morph ball eye proximities ;;; @@ -1617,7 +1035,7 @@ InitAI_Eye: LDA.W Enemy.properties,X ;A8905B; ORA.W #$2000 ;A8905E; STA.W Enemy.properties,X ;A89061; - LDA.W #Spritemap_Common_Nothing ;A89064; + LDA.W #Common_Spritemap_Nothing ;A89064; STA.W Enemy.spritemap,X ;A89067; LDA.W #$0001 ;A8906A; STA.W Enemy.instTimer,X ;A8906D; @@ -2006,7 +1424,7 @@ Palette_Fune: ;;; $9399: Instruction list - fune - facing left - idle ;;; InstList_Fune_FacingLeft_Idling: dw $0001,Spritemap_Fune_FacingLeft_Idle_MouthClosed ;A89399; - dw Instruction_Common_Sleep ;A8939D; + dw Common_Instruction_Sleep ;A8939D; ;;; $939F: Instruction list - fune - facing left - active ;;; @@ -2022,14 +1440,14 @@ InstList_Fune_FacingLeft_Active: dw $0008,Spritemap_Fune_FacingLeft_MouthOpening1 ;A893BB; dw $0008,Spritemap_Fune_FacingLeft_StartOpeningMouth ;A893BF; dw Instruction_FuneNamihe_FinishActivity ;A893C3; - dw Instruction_Common_GotoY ;A893C5; + dw Common_Instruction_GotoY ;A893C5; dw InstList_Fune_FacingLeft_Idling ;A893C7; ;;; $93C9: Instruction list - fune - facing right - idle ;;; InstList_Fune_FacingRight_Idling: dw $0001,Spritemap_Fune_FacingRight_Idle_MouthClosed ;A893C9; - dw Instruction_Common_Sleep ;A893CD; + dw Common_Instruction_Sleep ;A893CD; ;;; $93CF: Instruction list - fune - facing right - active ;;; @@ -2045,7 +1463,7 @@ InstList_Fune_FacingRight_Active: dw $0008,Spritemap_Fune_FacingRight_MouthOpening1 ;A893EB; dw $0008,Spritemap_Fune_FacingRight_StartOpeningMouth ;A893EF; dw Instruction_FuneNamihe_FinishActivity_duplicate ;A893F3; - dw Instruction_Common_GotoY ;A893F5; + dw Common_Instruction_GotoY ;A893F5; dw InstList_Fune_FacingRight_Idling ;A893F7; @@ -2170,7 +1588,7 @@ Palette_Namihe: ;;; $95BD: Instruction list - namihe - facing left - idle ;;; InstList_Namihe_FacingLeft_Idling: dw $0001,Spritemap_Namihe_FacingLeft_Idle_MouthEyeOpened ;A895BD; - dw Instruction_Common_Sleep ;A895C1; + dw Common_Instruction_Sleep ;A895C1; ;;; $95C3: Instruction list - namihe - facing left - active ;;; @@ -2187,14 +1605,14 @@ InstList_Namihe_FacingLeft_Active: dw $0008,Spritemap_Namihe_FacingLeft_MouthOpening1 ;A895E3; dw $0008,Spritemap_Namihe_FacingLeft_StartOpeningMouth ;A895E7; dw Instruction_FuneNamihe_FinishActivity ;A895EB; - dw Instruction_Common_GotoY ;A895ED; + dw Common_Instruction_GotoY ;A895ED; dw InstList_Namihe_FacingLeft_Idling ;A895EF; ;;; $95F1: Instruction list - namihe - facing right - idle ;;; InstList_Namihe_FacingRight_Idling: dw $0001,Spritemap_Namihe_FacingRight_Idle_MouthEyeClosed ;A895F1; - dw Instruction_Common_Sleep ;A895F5; + dw Common_Instruction_Sleep ;A895F5; ;;; $95F7: Instruction list - namihe - facing right - active ;;; @@ -2211,7 +1629,7 @@ InstList_Namihe_FacingRight_Active: dw $0008,Spritemap_Namihe_FacingRight_MouthOpening1 ;A89617; dw $0008,Spritemap_Namihe_FacingRight_StartOpeningMouth ;A8961B; dw Instruction_FuneNamihe_FinishActivity_duplicate ;A8961F; - dw Instruction_Common_GotoY ;A89621; + dw Common_Instruction_GotoY ;A89621; dw InstList_Namihe_FacingRight_Idling ;A89623; @@ -2630,7 +2048,7 @@ InstList_Coven: dw $0010,Spritemap_Coven_0 ;A89A8C; dw $0010,Spritemap_Coven_1 ;A89A90; dw $0010,Spritemap_Coven_2 ;A89A94; - dw Instruction_Common_GotoY ;A89A98; + dw Common_Instruction_GotoY ;A89A98; dw InstList_Coven ;A89A9A; @@ -3285,7 +2703,7 @@ InstList_YappingMaw_Attacking_FacingUp: dw Instruction_YappingMaw_QueueSFXIfOnScreen ;A89F77; dw $0050,Spritemap_YappingMaw_2 ;A89F79; dw $0003,Spritemap_YappingMaw_1 ;A89F7D; - dw Instruction_Common_GotoY ;A89F81; + dw Common_Instruction_GotoY ;A89F81; dw InstList_YappingMaw_Attacking_FacingUp ;A89F83; @@ -3296,7 +2714,7 @@ InstList_YappingMaw_Attacking_FacingUpRight: dw Instruction_YappingMaw_QueueSFXIfOnScreen ;A89F8D; dw $0050,Spritemap_YappingMaw_5 ;A89F8F; dw $0003,Spritemap_YappingMaw_4 ;A89F93; - dw Instruction_Common_GotoY ;A89F97; + dw Common_Instruction_GotoY ;A89F97; dw InstList_YappingMaw_Attacking_FacingUpRight ;A89F99; @@ -3307,7 +2725,7 @@ InstList_YappingMaw_Attacking_FacingRight: dw Instruction_YappingMaw_QueueSFXIfOnScreen ;A89FA3; dw $0050,Spritemap_YappingMaw_8 ;A89FA5; dw $0003,Spritemap_YappingMaw_7 ;A89FA9; - dw Instruction_Common_GotoY ;A89FAD; + dw Common_Instruction_GotoY ;A89FAD; dw InstList_YappingMaw_Attacking_FacingRight ;A89FAF; @@ -3318,7 +2736,7 @@ InstList_YappingMaw_Attacking_FacingDownRight: dw Instruction_YappingMaw_QueueSFXIfOnScreen ;A89FB9; dw $0050,Spritemap_YappingMaw_B ;A89FBB; dw $0003,Spritemap_YappingMaw_A ;A89FBF; - dw Instruction_Common_GotoY ;A89FC3; + dw Common_Instruction_GotoY ;A89FC3; dw InstList_YappingMaw_Attacking_FacingDownRight ;A89FC5; @@ -3329,7 +2747,7 @@ InstList_YappingMaw_Attacking_FacingDown: dw Instruction_YappingMaw_QueueSFXIfOnScreen ;A89FCF; dw $0050,Spritemap_YappingMaw_E ;A89FD1; dw $0003,Spritemap_YappingMaw_D ;A89FD5; - dw Instruction_Common_GotoY ;A89FD9; + dw Common_Instruction_GotoY ;A89FD9; dw InstList_YappingMaw_Attacking_FacingDown ;A89FDB; @@ -3340,7 +2758,7 @@ InstList_YappingMaw_Attacking_FacingDownLeft: dw Instruction_YappingMaw_QueueSFXIfOnScreen ;A89FE5; dw $0050,Spritemap_YappingMaw_11 ;A89FE7; dw $0003,Spritemap_YappingMaw_10 ;A89FEB; - dw Instruction_Common_GotoY ;A89FEF; + dw Common_Instruction_GotoY ;A89FEF; dw InstList_YappingMaw_Attacking_FacingDownLeft ;A89FF1; @@ -3351,7 +2769,7 @@ InstList_YappingMaw_Attacking_FacingLeft: dw Instruction_YappingMaw_QueueSFXIfOnScreen ;A89FFB; dw $0050,Spritemap_YappingMaw_14 ;A89FFD; dw $0003,Spritemap_YappingMaw_13 ;A8A001; - dw Instruction_Common_GotoY ;A8A005; + dw Common_Instruction_GotoY ;A8A005; dw InstList_YappingMaw_Attacking_FacingLeft ;A8A007; @@ -3362,7 +2780,7 @@ InstList_YappingMaw_Attacking_FacingUpLeft: dw Instruction_YappingMaw_QueueSFXIfOnScreen ;A8A011; dw $0050,Spritemap_YappingMaw_17 ;A8A013; dw $0003,Spritemap_YappingMaw_16 ;A8A017; - dw Instruction_Common_GotoY ;A8A01B; + dw Common_Instruction_GotoY ;A8A01B; dw InstList_YappingMaw_Attacking_FacingUpLeft ;A8A01D; @@ -3382,7 +2800,7 @@ InstList_YappingMaw_Cooldown_FacingUp_1: dw $0005,Spritemap_YappingMaw_0 ;A8A02F; dw $0003,Spritemap_YappingMaw_1 ;A8A033; dw Instruction_YappingMaw_QueueSFXIfOnScreen ;A8A037; - dw Instruction_Common_GotoY ;A8A039; + dw Common_Instruction_GotoY ;A8A039; dw InstList_YappingMaw_Cooldown_FacingUp_1 ;A8A03B; @@ -3398,7 +2816,7 @@ InstList_YappingMaw_Cooldown_FacingUpLeft_1: dw $0005,Spritemap_YappingMaw_0 ;A8A04D; dw $0003,Spritemap_YappingMaw_1 ;A8A051; dw Instruction_YappingMaw_QueueSFXIfOnScreen ;A8A055; - dw Instruction_Common_GotoY ;A8A057; + dw Common_Instruction_GotoY ;A8A057; dw InstList_YappingMaw_Cooldown_FacingUpLeft_1 ;A8A059; @@ -3418,7 +2836,7 @@ InstList_YappingMaw_Cooldown_FacingDown_1: dw $0005,Spritemap_YappingMaw_C ;A8A06B; dw $0003,Spritemap_YappingMaw_D ;A8A06F; dw Instruction_YappingMaw_QueueSFXIfOnScreen ;A8A073; - dw Instruction_Common_GotoY ;A8A075; + dw Common_Instruction_GotoY ;A8A075; dw InstList_YappingMaw_Cooldown_FacingDown_1 ;A8A077; @@ -3434,7 +2852,7 @@ InstList_YappingMaw_Cooldown_FacingDownLeft_1: dw $0005,Spritemap_YappingMaw_C ;A8A089; dw $0003,Spritemap_YappingMaw_D ;A8A08D; dw Instruction_YappingMaw_QueueSFXIfOnScreen ;A8A091; - dw Instruction_Common_GotoY ;A8A093; + dw Common_Instruction_GotoY ;A8A093; dw InstList_YappingMaw_Cooldown_FacingDownLeft_1 ;A8A095; @@ -4078,11 +3496,11 @@ UpdateYappingMawAngularSpeed: LDY.W YappingMaw.angularSpeedTableIndex,X ;A8A63E; LDA.W YappingMaw.angle,X ;A8A641; CLC ;A8A644; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing+2,Y ;A8A645; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing+2,Y ;A8A645; STA.W YappingMaw.angle,X ;A8A648; LDA.W YappingMaw.subAngle,X ;A8A64B; CLC ;A8A64E; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing,Y ;A8A64F; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing,Y ;A8A64F; BCC + ;A8A652; INC.W YappingMaw.angle,X ;A8A654; @@ -4297,7 +3715,7 @@ EnemyTouch_YappingMaw: ;;; $A7BD: Enemy shot - enemy $E7BF (yapping maw) ;;; EnemyShot_YappingMaw: ; BUG: Yapping maw shinespark crash crash applies here too if a yapping maw is frozen or killed, see Function_YappingMaw_Cooldown - JSL.L NormalEnemyShotAI ;A8A7BD; + JSL.L NormalEnemyShotAI_Internal ;A8A7BD; LDX.W EnemyIndex ;A8A7C1; LDA.W Enemy.health,X ;A8A7C4; BNE .alive ;A8A7C7; @@ -4617,7 +4035,7 @@ InstList_Kago_Initial_SlowAnimation: dw $000A,Spritemap_Kago_1 ;A8AB22; dw $000A,Spritemap_Kago_2 ;A8AB26; dw $000A,Spritemap_Kago_1 ;A8AB2A; - dw Instruction_Common_GotoY ;A8AB2E; + dw Common_Instruction_GotoY ;A8AB2E; dw InstList_Kago_Initial_SlowAnimation ;A8AB30; @@ -4627,7 +4045,7 @@ InstList_Kago_TakenHit_FastAnimation: dw $0003,Spritemap_Kago_1 ;A8AB36; dw $0003,Spritemap_Kago_2 ;A8AB3A; dw $0003,Spritemap_Kago_1 ;A8AB3E; - dw Instruction_Common_GotoY ;A8AB42; + dw Common_Instruction_GotoY ;A8AB42; dw InstList_Kago_TakenHit_FastAnimation ;A8AB44; @@ -4676,7 +4094,7 @@ RTL_A8AB82: EnemyShot_Kago: PHX ;A8AB83; PHY ;A8AB84; - JSL.L NormalEnemyShotAI ;A8AB85; + JSL.L NormalEnemyShotAI_Internal ;A8AB85; LDA.W #$0002 ;A8AB89; STA.W EarthquakeType ;A8AB8C; LDA.W #$0010 ;A8AB8F; @@ -4764,7 +4182,7 @@ InstList_Magdollite_Idling_FacingLeft: dw $000D,Spritemap_Magdollite_FacingLeft_Head_1 ;A8ACA0; dw $000D,Spritemap_Magdollite_FacingLeft_Head_2 ;A8ACA4; dw $000D,Spritemap_Magdollite_FacingLeft_Head_1 ;A8ACA8; - dw Instruction_Common_GotoY ;A8ACAC; + dw Common_Instruction_GotoY ;A8ACAC; dw InstList_Magdollite_Idling_FacingLeft ;A8ACAE; @@ -4786,7 +4204,7 @@ InstList_Magdollite_Slave2_ThrowFireballs_FacingLeft: dw Instruction_Magdollite_ShiftLeft8Pixels_Up4Pixels_Left_dup ;A8ACD4; dw $0005,Spritemap_Magdollite_FacingLeft_Hand_FingersCurled ;A8ACD6; dw Instruction_Magdollite_ResetWaitingFlag ;A8ACDA; - dw Instruction_Common_Sleep ;A8ACDC; + dw Common_Instruction_Sleep ;A8ACDC; ;;; $ACDE: Instruction list - head - facing left - submerge into lava ;;; @@ -4800,29 +4218,29 @@ InstList_Magdollite_SplashIntoLavaAndFormBasePillar_Left_0: dw Instruction_Magdollite_MoveDown2Pixels ;A8ACF2; dw $0005,Spritemap_Magdollite_FacingLeft_Head_BarelyPokingOutOfLava ;A8ACF4; dw Instruction_Magdollite_MoveDownBy18Pixels_SetSlavesAsVisible ;A8ACF8; - dw Instruction_Common_TimerInY ;A8ACFA; + dw Common_Instruction_TimerInY ;A8ACFA; dw $0018 ;A8ACFC; InstList_Magdollite_SplashIntoLavaAndFormBasePillar_Left_1: dw Instruction_Magdollite_MoveBaseAndPillarUp1Pixel ;A8ACFE; dw $0001,Spritemap_Magdollite_FacingLeft_WidePillarSection ;A8AD00; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;A8AD04; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;A8AD04; dw InstList_Magdollite_SplashIntoLavaAndFormBasePillar_Left_1 ;A8AD06; dw Instruction_Magdollite_ResetWaitingFlag ;A8AD08; - dw Instruction_Common_Sleep ;A8AD0A; + dw Common_Instruction_Sleep ;A8AD0A; ;;; $AD0C: Instruction list - head - facing left - emerge from lava ;;; InstList_Magdollite_UnformBasePillar_SplashBackToIdle_Left_0: dw Instruction_Magdollite_SetWaitingFlag ;A8AD0C; dw Instruction_Magdollite_RestoreInitialYPositions ;A8AD0E; - dw Instruction_Common_TimerInY ;A8AD10; + dw Common_Instruction_TimerInY ;A8AD10; dw $0018 ;A8AD12; InstList_Magdollite_UnformBasePillar_SplashBackToIdle_Left_1: dw Instruction_Magdollite_MoveBaseAndPillarDown1Pixel ;A8AD14; dw $0001,Spritemap_Magdollite_FacingLeft_WidePillarSection ;A8AD16; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;A8AD1A; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;A8AD1A; dw InstList_Magdollite_UnformBasePillar_SplashBackToIdle_Left_1 ;A8AD1C; dw Instruction_Magdollite_MoveDown4Pixels_SetSlavesAsInvisible ;A8AD1E; dw $0005,Spritemap_Magdollite_FacingLeft_Head_BarelyPokingOutOfLava ;A8AD20; @@ -4833,7 +4251,7 @@ InstList_Magdollite_UnformBasePillar_SplashBackToIdle_Left_1: dw Instruction_Magdollite_MoveUp2Pixels ;A8AD32; dw $0005,Spritemap_Magdollite_FacingLeft_Head_1 ;A8AD34; dw Instruction_Magdollite_ResetWaitingFlag ;A8AD38; - dw Instruction_Common_Sleep ;A8AD3A; + dw Common_Instruction_Sleep ;A8AD3A; ;;; $AD3C: Instruction list - head - facing right - idle ;;; @@ -4842,7 +4260,7 @@ InstList_Magdollite_Idling_FacingRight: dw $000D,Spritemap_Magdollite_FacingRight_Head_1 ;A8AD40; dw $000D,Spritemap_Magdollite_FacingRight_Head_2 ;A8AD44; dw $000D,Spritemap_Magdollite_FacingRight_Head_1 ;A8AD48; - dw Instruction_Common_GotoY ;A8AD4C; + dw Common_Instruction_GotoY ;A8AD4C; dw InstList_Magdollite_Idling_FacingRight ;A8AD4E; @@ -4864,7 +4282,7 @@ InstList_Magdollite_ThrowFireballs_FacingRight: dw Instruction_Magdollite_ShiftRight8Pixels_Up4Pixels_Right_dup ;A8AD74; dw $0005,Spritemap_Magdollite_FacingRight_Hand_FingersCurled ;A8AD76; dw Instruction_Magdollite_ResetWaitingFlag ;A8AD7A; - dw Instruction_Common_Sleep ;A8AD7C; + dw Common_Instruction_Sleep ;A8AD7C; ;;; $AD7E: Instruction list - head - facing right - submerge into lava ;;; @@ -4878,29 +4296,29 @@ InstList_Magdollite_SplashIntoLavaAndFormBasePillar_Right_0: dw Instruction_Magdollite_MoveDown2Pixels ;A8AD92; dw $0005,Spritemap_Magdollite_FacingRight_Head_BarelyPokingOutOfLava ;A8AD94; dw Instruction_Magdollite_MoveDownBy18Pixels_SetSlavesAsVisible ;A8AD98; - dw Instruction_Common_TimerInY ;A8AD9A; + dw Common_Instruction_TimerInY ;A8AD9A; dw $0018 ;A8AD9C; InstList_Magdollite_SplashIntoLavaAndFormBasePillar_Right_1: dw Instruction_Magdollite_MoveBaseAndPillarUp1Pixel ;A8AD9E; dw $0001,Spritemap_Magdollite_FacingRight_WidePillarSection ;A8ADA0; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;A8ADA4; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;A8ADA4; dw InstList_Magdollite_SplashIntoLavaAndFormBasePillar_Right_1 ;A8ADA6; dw Instruction_Magdollite_ResetWaitingFlag ;A8ADA8; - dw Instruction_Common_Sleep ;A8ADAA; + dw Common_Instruction_Sleep ;A8ADAA; ;;; $ADAC: Instruction list - head - facing right - emerge from lava ;;; InstList_Magdollite_UnformBasePillar_SplashBackToIdle_Right_0: dw Instruction_Magdollite_SetWaitingFlag ;A8ADAC; dw Instruction_Magdollite_RestoreInitialYPositions ;A8ADAE; - dw Instruction_Common_TimerInY ;A8ADB0; + dw Common_Instruction_TimerInY ;A8ADB0; dw $0018 ;A8ADB2; InstList_Magdollite_UnformBasePillar_SplashBackToIdle_Right_1: dw Instruction_Magdollite_MoveBaseAndPillarDown1Pixel ;A8ADB4; dw $0001,Spritemap_Magdollite_FacingRight_WidePillarSection ;A8ADB6; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;A8ADBA; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;A8ADBA; dw InstList_Magdollite_UnformBasePillar_SplashBackToIdle_Right_1 ;A8ADBC; dw Instruction_Magdollite_MoveDown4Pixels_SetSlavesAsInvisible ;A8ADBE; dw $0005,Spritemap_Magdollite_FacingRight_Head_BarelyPokingOutOfLava ;A8ADC0; @@ -4911,61 +4329,61 @@ InstList_Magdollite_UnformBasePillar_SplashBackToIdle_Right_1: dw Instruction_Magdollite_MoveUp2Pixels ;A8ADD2; dw $0005,Spritemap_Magdollite_FacingRight_Head_1 ;A8ADD4; dw Instruction_Magdollite_ResetWaitingFlag ;A8ADD8; - dw Instruction_Common_Sleep ;A8ADDA; + dw Common_Instruction_Sleep ;A8ADDA; ;;; $ADDC: Instruction list - arm - growth level 0 ;;; InstList_Magdollite_Slave1_NarrowPillar_FacingLeft: dw $0001,Spritemap_Magdollite_FacingLeft_NarrowPillarSection ;A8ADDC; - dw Instruction_Common_Sleep ;A8ADE0; + dw Common_Instruction_Sleep ;A8ADE0; ;;; $ADE2: Instruction list - arm - growth level 1 ;;; InstList_Magdollite_Slave1_NarrowPillar_FacingRight: dw $0001,Spritemap_Magdollite_FacingRight_NarrowPillarSection ;A8ADE2; - dw Instruction_Common_Sleep ;A8ADE6; + dw Common_Instruction_Sleep ;A8ADE6; ;;; $ADE8: Instruction list - arm - growth level 2 ;;; InstList_Magdollite_Slave1_3xPillarStack: dw $0001,Spritemap_Magdollite_NarrowPillarStacks_3x ;A8ADE8; - dw Instruction_Common_Sleep ;A8ADEC; + dw Common_Instruction_Sleep ;A8ADEC; ;;; $ADEE: Instruction list - arm - growth level 3 ;;; InstList_Magdollite_Slave1_4xPillarStack: dw $0001,Spritemap_Magdollite_NarrowPillarStacks_4x ;A8ADEE; - dw Instruction_Common_Sleep ;A8ADF2; + dw Common_Instruction_Sleep ;A8ADF2; ;;; $ADF4: Instruction list - arm - growth level 4 ;;; InstList_Magdollite_Slave1_5xPillarStack: dw $0001,Spritemap_Magdollite_NarrowPillarStacks_5x ;A8ADF4; - dw Instruction_Common_Sleep ;A8ADF8; + dw Common_Instruction_Sleep ;A8ADF8; ;;; $ADFA: Instruction list - arm - growth level 5 ;;; InstList_Magdollite_Slave1_6xPillarStack: dw $0001,Spritemap_Magdollite_NarrowPillarStacks_6x ;A8ADFA; - dw Instruction_Common_Sleep ;A8ADFE; + dw Common_Instruction_Sleep ;A8ADFE; ;;; $AE00: Instruction list - arm - growth level 6 ;;; InstList_Magdollite_Slave1_7xPillarStack: dw $0001,Spritemap_Magdollite_NarrowPillarStacks_7x ;A8AE00; - dw Instruction_Common_Sleep ;A8AE04; + dw Common_Instruction_Sleep ;A8AE04; ;;; $AE06: Instruction list - arm - growth level 7 ;;; InstList_Magdollite_Slave1_8xPillarStack: dw $0001,Spritemap_Magdollite_NarrowPillarStacks_8x ;A8AE06; - dw Instruction_Common_Sleep ;A8AE0A; + dw Common_Instruction_Sleep ;A8AE0A; ;;; $AE0C: Instruction list - hand - stub ;;; InstList_Magdollite_Slave2_PillarCap: dw $0001,Spritemap_Magdollite_FacingLeft_PillarCap ;A8AE0C; - dw Instruction_Common_Sleep ;A8AE10; + dw Common_Instruction_Sleep ;A8AE10; ;;; $AE12: Instruction - queue sound [[Y]], sound library 2, max queued sounds allowed = 6, if enemy is on-screen ;;; @@ -5292,13 +4710,13 @@ GetMagdolliteSpeeds: ASL ;A8B068; ASL ;A8B069; TAY ;A8B06A; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A8B06B; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A8B06B; STA.L Magdollite.downVelocity,X ;A8B06E; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A8B072; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A8B072; STA.L Magdollite.downSubVelocity,X ;A8B075; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;A8B079; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;A8B079; STA.L Magdollite.upVelocity,X ;A8B07C; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;A8B080; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;A8B080; STA.L Magdollite.upSubVelocity,X ;A8B083; RTS ;A8B087; @@ -5777,7 +5195,7 @@ EnemyTouch_Magdollite: ;;; $B40C: Enemy shot - enemy $E83F (magdollite) ;;; EnemyShot_Magdollite: - JSL.L NormalEnemyShotAI ;A8B40C; fallthrough to ContactReaction_Magdollite_Common + JSL.L NormalEnemyShotAI_Internal ;A8B40C; fallthrough to ContactReaction_Magdollite_Common ;;; $B410: Magdollite shared contact reaction ;;; @@ -6023,34 +5441,34 @@ endif ; !FEATURE_KEEP_UNREFERENCED ;;; $B696: Instruction list - crawling - facing left ;;; InstList_Beetom_Crawling_FacingLeft_0: - dw Instruction_Common_DisableOffScreenProcessing ;A8B696; + dw Common_Instruction_DisableOffScreenProcessing ;A8B696; InstList_Beetom_Crawling_FacingLeft_1: dw $000A,Spritemap_Beetom_0 ;A8B698; dw $000A,Spritemap_Beetom_1 ;A8B69C; dw $000A,Spritemap_Beetom_2 ;A8B6A0; dw $000A,Spritemap_Beetom_1 ;A8B6A4; - dw Instruction_Common_GotoY ;A8B6A8; + dw Common_Instruction_GotoY ;A8B6A8; dw InstList_Beetom_Crawling_FacingLeft_1 ;A8B6AA; ;;; $B6AC: Instruction list - hop - facing left ;;; InstList_Beetom_Hop_FacingLeft: - dw Instruction_Common_EnableOffScreenProcessing ;A8B6AC; + dw Common_Instruction_EnableOffScreenProcessing ;A8B6AC; dw $0004,Spritemap_Beetom_3 ;A8B6AE; dw $0008,Spritemap_Beetom_4 ;A8B6B2; dw $0004,Spritemap_Beetom_3 ;A8B6B6; dw $0001,Spritemap_Beetom_0 ;A8B6BA; - dw Instruction_Common_Sleep ;A8B6BE; + dw Common_Instruction_Sleep ;A8B6BE; if !FEATURE_KEEP_UNREFERENCED ;;; $B6C0: Unused. Instruction list - small hop - facing left ;;; UNUSED_InstList_Beetom_SmallHop_FacingLeft_A8B6C0: - dw Instruction_Common_EnableOffScreenProcessing ;A8B6C0; + dw Common_Instruction_EnableOffScreenProcessing ;A8B6C0; dw $0004,Spritemap_Beetom_3 ;A8B6C2; dw $0001,Spritemap_Beetom_0 ;A8B6C6; - dw Instruction_Common_Sleep ;A8B6CA; + dw Common_Instruction_Sleep ;A8B6CA; endif ; !FEATURE_KEEP_UNREFERENCED @@ -6067,40 +5485,40 @@ InstList_Beetom_DrainingSamus_FacingLeft_1: dw $0005,Spritemap_Beetom_9 ;A8B6E2; dw $0005,Spritemap_Beetom_A ;A8B6E6; dw $0005,Spritemap_Beetom_9 ;A8B6EA; - dw Instruction_Common_GotoY ;A8B6EE; + dw Common_Instruction_GotoY ;A8B6EE; dw InstList_Beetom_DrainingSamus_FacingLeft_1 ;A8B6F0; ;;; $B6F2: Instruction list - crawling - facing right ;;; InstList_Beetom_Crawling_FacingRight_0: - dw Instruction_Common_DisableOffScreenProcessing ;A8B6F2; + dw Common_Instruction_DisableOffScreenProcessing ;A8B6F2; InstList_Beetom_Crawling_FacingRight_1: dw $000A,Spritemap_Beetom_B ;A8B6F4; dw $000A,Spritemap_Beetom_C ;A8B6F8; dw $000A,Spritemap_Beetom_D ;A8B6FC; dw $000A,Spritemap_Beetom_C ;A8B700; - dw Instruction_Common_GotoY ;A8B704; + dw Common_Instruction_GotoY ;A8B704; dw InstList_Beetom_Crawling_FacingRight_1 ;A8B706; ;;; $B708: Instruction list - hop - facing right ;;; InstList_Beetom_Hop_FacingRight: - dw Instruction_Common_EnableOffScreenProcessing ;A8B708; + dw Common_Instruction_EnableOffScreenProcessing ;A8B708; dw $0004,Spritemap_Beetom_E ;A8B70A; dw $0008,Spritemap_Beetom_F ;A8B70E; dw $0004,Spritemap_Beetom_E ;A8B712; dw $0001,Spritemap_Beetom_B ;A8B716; - dw Instruction_Common_Sleep ;A8B71A; + dw Common_Instruction_Sleep ;A8B71A; if !FEATURE_KEEP_UNREFERENCED ;;; $B71C: Unused. Instruction list - small hop - facing right ;;; UNUSED_InstList_Beetom_SmallHop_FacingRight_A8B71C: - dw Instruction_Common_EnableOffScreenProcessing ;A8B71C; + dw Common_Instruction_EnableOffScreenProcessing ;A8B71C; dw $0004,Spritemap_Beetom_E ;A8B71E; dw $0001,Spritemap_Beetom_B ;A8B722; - dw Instruction_Common_Sleep ;A8B726; + dw Common_Instruction_Sleep ;A8B726; endif ; !FEATURE_KEEP_UNREFERENCED @@ -6117,7 +5535,7 @@ InstList_Beetom_DrainingSamus_FacingRight_1: dw $0005,Spritemap_Beetom_14 ;A8B73E; dw $0005,Spritemap_Beetom_15 ;A8B742; dw $0005,Spritemap_Beetom_14 ;A8B746; - dw Instruction_Common_GotoY ;A8B74A; + dw Common_Instruction_GotoY ;A8B74A; dw InstList_Beetom_DrainingSamus_FacingRight_1 ;A8B74C; @@ -6218,7 +5636,7 @@ Beetom_CalculateInitialHopSpeed: TAY ;A8B7FD; LDA.B DP_Temp14 ;A8B7FE; CLC ;A8B800; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing+1,Y ;A8B801; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing+1,Y ;A8B801; STA.B DP_Temp14 ;A8B804; CMP.B DP_Temp16 ;A8B806; BMI .loop ;A8B808; @@ -6604,9 +6022,9 @@ Function_Beetom_YMovement_ShortHop_Rising: ASL ;A8BAEB; ASL ;A8BAEC; TAY ;A8BAED; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+6,Y ;A8BAEE; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+6,Y ;A8BAEE; STA.B DP_Temp14 ;A8BAF1; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+4,Y ;A8BAF3; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+4,Y ;A8BAF3; STA.B DP_Temp12 ;A8BAF6; JSL.L MoveEnemyDownBy_14_12 ;A8BAF8; BCC .notCollidedWithBlock ;A8BAFC; @@ -6636,9 +6054,9 @@ Function_Beetom_YMovement_ShortHop_Falling: ASL ;A8BB24; ASL ;A8BB25; TAY ;A8BB26; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+2,Y ;A8BB27; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+2,Y ;A8BB27; STA.B DP_Temp14 ;A8BB2A; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing,Y ;A8BB2C; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing,Y ;A8BB2C; STA.B DP_Temp12 ;A8BB2F; JSL.L MoveEnemyDownBy_14_12 ;A8BB31; BCC .notCollidedWithBlock ;A8BB35; @@ -6720,9 +6138,9 @@ Function_Beetom_YMovement_LongHop_Rising: ASL ;A8BBBC; ASL ;A8BBBD; TAY ;A8BBBE; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+6,Y ;A8BBBF; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+6,Y ;A8BBBF; STA.B DP_Temp14 ;A8BBC2; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+4,Y ;A8BBC4; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+4,Y ;A8BBC4; STA.B DP_Temp12 ;A8BBC7; JSL.L MoveEnemyDownBy_14_12 ;A8BBC9; BCC .notCollidedWithBlock ;A8BBCD; @@ -6752,9 +6170,9 @@ Function_Beetom_YMovement_LongHop_Falling: ASL ;A8BBF5; ASL ;A8BBF6; TAY ;A8BBF7; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+2,Y ;A8BBF8; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+2,Y ;A8BBF8; STA.B DP_Temp14 ;A8BBFB; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing,Y ;A8BBFD; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing,Y ;A8BBFD; STA.B DP_Temp12 ;A8BC00; JSL.L MoveEnemyDownBy_14_12 ;A8BC02; BCC .notCollidedWithBlock ;A8BC06; @@ -6837,9 +6255,9 @@ Function_Beetom_YMovement_Lunge_Rising: ASL ;A8BC8E; ASL ;A8BC8F; TAY ;A8BC90; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+6,Y ;A8BC91; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+6,Y ;A8BC91; STA.B DP_Temp14 ;A8BC94; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+4,Y ;A8BC96; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+4,Y ;A8BC96; STA.B DP_Temp12 ;A8BC99; JSL.L MoveEnemyDownBy_14_12 ;A8BC9B; BCC .notCollidedWithBlock ;A8BC9F; @@ -6868,9 +6286,9 @@ Function_Beetom_YMovement_Lunge_Falling: ASL ;A8BCC7; ASL ;A8BCC8; TAY ;A8BCC9; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+2,Y ;A8BCCA; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+2,Y ;A8BCCA; STA.B DP_Temp14 ;A8BCCD; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing,Y ;A8BCCF; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing,Y ;A8BCCF; STA.B DP_Temp12 ;A8BCD2; JSL.L MoveEnemyDownBy_14_12 ;A8BCD4; BCC .notCollidedWithBlock ;A8BCD8; @@ -7016,9 +6434,9 @@ Function_Beetom_Movement_BeingFlung: ASL ;A8BDD0; ASL ;A8BDD1; TAY ;A8BDD2; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing+2,Y ;A8BDD3; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing+2,Y ;A8BDD3; STA.B DP_Temp14 ;A8BDD6; - LDA.W CommonEnemySpeeds_QuadraticallyIncreasing,Y ;A8BDD8; + LDA.W Common_EnemySpeeds_QuadraticallyIncreasing,Y ;A8BDD8; STA.B DP_Temp12 ;A8BDDB; JSL.L MoveEnemyDownBy_14_12 ;A8BDDD; BCC .notCollidedWithBlock ;A8BDE1; @@ -7335,7 +6753,7 @@ InstList_Powamp_Body_FastAnimation: dw $0005,Spritemap_Powamp_Body_CheeksLowered ;A8C163; dw $0005,Spritemap_Powamp_Body_CheeksLifting ;A8C167; dw $0005,Spritemap_Powamp_Body_CheeksRaised ;A8C16B; - dw Instruction_Common_GotoY ;A8C16F; + dw Common_Instruction_GotoY ;A8C16F; dw InstList_Powamp_Body_FastAnimation ;A8C171; @@ -7343,7 +6761,7 @@ InstList_Powamp_Body_SlowAnimation: dw $0009,Spritemap_Powamp_Body_CheeksLowered ;A8C173; dw $0009,Spritemap_Powamp_Body_CheeksLifting ;A8C177; dw $0009,Spritemap_Powamp_Body_CheeksRaised ;A8C17B; - dw Instruction_Common_GotoY ;A8C17F; + dw Common_Instruction_GotoY ;A8C17F; dw InstList_Powamp_Body_SlowAnimation ;A8C181; @@ -7356,7 +6774,7 @@ InstList_Powamp_Balloon_Inflate_1: InstList_Powamp_Balloon_Inflate_2: dw $00A0,Spritemap_Powamp_Balloon_FullyInflated ;A8C18B; - dw Instruction_Common_Sleep ;A8C18F; + dw Common_Instruction_Sleep ;A8C18F; ;;; $C191: Instruction list - balloon - deflate ;;; @@ -7368,7 +6786,7 @@ InstList_Powamp_Balloon_StartSinking: ;;; $C199: Instruction list - balloon - initial ;;; InstList_Powamp_Balloon_Deflated: dw $00A0,Spritemap_Powamp_Balloon_Deflated ;A8C199; - dw Instruction_Common_Sleep ;A8C19D; + dw Common_Instruction_Sleep ;A8C19D; @@ -7400,7 +6818,7 @@ InitAI_Powamp: LDA.W Enemy.properties,X ;A8C1CC; ORA.W #$2000 ;A8C1CF; STA.W Enemy.properties,X ;A8C1D2; - LDA.W #Spritemap_Common_Nothing ;A8C1D5; + LDA.W #Common_Spritemap_Nothing ;A8C1D5; STA.W Enemy.spritemap,X ;A8C1D8; LDA.W #$0001 ;A8C1DB; STA.W Enemy.instTimer,X ;A8C1DE; @@ -7955,7 +7373,7 @@ EnemyTouch_Powamp: BNE .return ;A8C5C4; LDA.W Enemy.palette,X ;A8C5C6; PHA ;A8C5C9; - JSL.L NormalEnemyTouchAI ;A8C5CA; + JSL.L NormalEnemyTouchAI_Internal ;A8C5CA; LDX.W EnemyIndex ;A8C5CE; LDA.W Enemy.health,X ;A8C5D1; BEQ .dead ;A8C5D4; @@ -8085,19 +7503,19 @@ Palette_Robot: ;;; $C6D3: Instruction list - work robot deactivated - neutral ;;; InstList_RobotNoPower_Neutral: dw $7FFF,Spritemap_Robot_19 ;A8C6D3; - dw Instruction_Common_Sleep ;A8C6D7; + dw Common_Instruction_Sleep ;A8C6D7; ;;; $C6D9: Instruction list - work robot deactivated - leaning left ;;; InstList_RobotNoPower_LeaningLeft: dw $7FFF,Spritemap_Robot_18 ;A8C6D9; - dw Instruction_Common_Sleep ;A8C6DD; + dw Common_Instruction_Sleep ;A8C6DD; ;;; $C6DF: Instruction list - work robot deactivated - leaning right ;;; InstList_RobotNoPower_LeaningRight: dw $7FFF,Spritemap_Robot_1A ;A8C6DF; - dw Instruction_Common_Sleep ;A8C6E3; + dw Common_Instruction_Sleep ;A8C6E3; ;;; $C6E5: Instruction list - initial ;;; @@ -8134,7 +7552,7 @@ InstList_Robot_FacingLeft_WalkingForwards_1: dw $0001,Spritemap_Robot_0 ;A8C731; dw Instruction_Robot_TryShootingLaserDownLeft ;A8C735; dw $0009,Spritemap_Robot_0 ;A8C737; - dw Instruction_Common_GotoY ;A8C73B; + dw Common_Instruction_GotoY ;A8C73B; dw InstList_Robot_FacingLeft_WalkingForwards_1 ;A8C73D; @@ -8266,7 +7684,7 @@ InstList_Robot_FacingLeft_Shot_SamusIsBehind: InstList_Robot_FacingLeft_ShotLaserDownLeft: dw $0005,Spritemap_Robot_0 ;A8C8B1; dw $0002,Spritemap_Robot_B ;A8C8B5; - dw Instruction_Common_GotoY ;A8C8B9; + dw Common_Instruction_GotoY ;A8C8B9; dw InstList_Robot_FacingLeft_LaserShotRecoil ;A8C8BB; @@ -8277,7 +7695,7 @@ InstList_Robot_FacingLeft_ShotLaserLeft: dw Instruction_Robot_FacingLeft_MoveBackward_HandleWallOrFall ;A8C8C5; dw Instruction_Robot_PlaySFXIfOnScreen ;A8C8C7; dw $000A,Spritemap_Robot_B ;A8C8C9; - dw Instruction_Common_GotoY ;A8C8CD; + dw Common_Instruction_GotoY ;A8C8CD; dw InstList_Robot_FacingLeft_LaserShotRecoil ;A8C8CF; @@ -8308,7 +7726,7 @@ InstList_Robot_FacingLeft_LaserShotRecoil: dw $000A,Spritemap_Robot_3 ;A8C90D; dw $0060,Spritemap_Robot_2 ;A8C911; dw Instruction_Robot_DecrementLaserCooldown ;A8C915; - dw Instruction_Common_GotoY ;A8C917; + dw Common_Instruction_GotoY ;A8C917; dw InstList_Robot_FacingLeft_WalkingForwards_0 ;A8C919; @@ -8318,7 +7736,7 @@ InstList_Robot_ApproachingAFallToTheRight: dw $000A,Spritemap_Robot_D ;A8C91F; dw $000A,Spritemap_Robot_E ;A8C923; dw Instruction_Robot_DecrementLaserCooldown ;A8C927; - dw Instruction_Common_GotoY ;A8C929; + dw Common_Instruction_GotoY ;A8C929; dw InstList_Robot_FacingLeft_WalkingForwards_0 ;A8C92B; @@ -8352,7 +7770,7 @@ InstList_Robot_FacingRight_WalkingForwards_1: dw Instruction_Robot_PlaySFXIfOnScreen ;A8C979; dw $000A,Spritemap_Robot_17 ;A8C97B; dw Instruction_Robot_FacingRight_MoveForward_HandleWallOrFall ;A8C97F; - dw Instruction_Common_GotoY ;A8C981; + dw Common_Instruction_GotoY ;A8C981; dw InstList_Robot_FacingRight_WalkingForwards_1 ;A8C983; @@ -8486,7 +7904,7 @@ InstList_Robot_FacingRight_Shot_SamusIsBehind: InstList_Robot_FacingRight_ShotLaserDownRight: dw $0005,Spritemap_Robot_C ;A8CAFD; dw $0002,Spritemap_Robot_17 ;A8CB01; - dw Instruction_Common_GotoY ;A8CB05; + dw Common_Instruction_GotoY ;A8CB05; dw InstList_Robot_FacingRight_LaserShotRecoil ;A8CB07; @@ -8497,7 +7915,7 @@ InstList_Robot_FacingRight_ShotLaserRight: dw Instruction_Robot_PlaySFXIfOnScreen ;A8CB11; dw Instruction_Robot_FacingRight_MoveBackward_HandleWallOrFall ;A8CB13; dw $000A,Spritemap_Robot_17 ;A8CB15; - dw Instruction_Common_GotoY ;A8CB19; + dw Common_Instruction_GotoY ;A8CB19; dw InstList_Robot_FacingRight_LaserShotRecoil ;A8CB1B; @@ -8527,7 +7945,7 @@ InstList_Robot_FacingRight_LaserShotRecoil: dw $000A,Spritemap_Robot_10 ;A8CB55; dw $000A,Spritemap_Robot_F ;A8CB59; dw $0060,Spritemap_Robot_E ;A8CB5D; - dw Instruction_Common_GotoY ;A8CB61; + dw Common_Instruction_GotoY ;A8CB61; dw InstList_Robot_FacingRight_WalkingForwards_0 ;A8CB63; @@ -8537,7 +7955,7 @@ InstList_Robot_ApproachingAFallToTheLeft: dw $000A,Spritemap_Robot_1 ;A8CB69; dw $000A,Spritemap_Robot_2 ;A8CB6D; dw Instruction_Robot_DecrementLaserCooldown ;A8CB71; - dw Instruction_Common_GotoY ;A8CB73; + dw Common_Instruction_GotoY ;A8CB73; dw InstList_Robot_FacingRight_WalkingForwards_0 ;A8CB75; @@ -9362,7 +8780,7 @@ EnemyTouch_Robot: ;;; $D18D: Enemy shot - enemy $E93F (work robot deactivated) ;;; EnemyShot_RobotNoPower: - JSL.L NormalEnemyShotAI ;A8D18D; + JSL.L NormalEnemyShotAI_Internal ;A8D18D; RTL ;A8D191; @@ -9376,7 +8794,7 @@ EnemyShot_Robot: BIT.W #$0001 ;A8D19D; BEQ .return ;A8D1A0; LDX.W EnemyIndex ;A8D1A2; - JSL.L NormalEnemyShotAI ;A8D1A5; + JSL.L NormalEnemyShotAI_Internal ;A8D1A5; LDX.W EnemyIndex ;A8D1A9; LDA.W Enemy.health,X ;A8D1AC; BEQ .return ;A8D1AF; @@ -9821,22 +9239,22 @@ InstList_Bull_Normal: dw $000A,Spritemap_Bull_1 ;A8D845; dw $000A,Spritemap_Bull_0 ;A8D849; dw $000A,Spritemap_Bull_2 ;A8D84D; - dw Instruction_Common_GotoY ;A8D851; + dw Common_Instruction_GotoY ;A8D851; dw InstList_Bull_Normal ;A8D853; ;;; $D855: Instruction list - shot ;;; InstList_Bull_Shot_0: - dw Instruction_Common_TimerInY,$0005 ;A8D855; + dw Common_Instruction_TimerInY,$0005 ;A8D855; InstList_Bull_Shot_1: dw $0003,Spritemap_Bull_0 ;A8D859; dw $0003,Spritemap_Bull_1 ;A8D85D; dw $0003,Spritemap_Bull_0 ;A8D861; dw $0003,Spritemap_Bull_2 ;A8D865; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;A8D869; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;A8D869; dw InstList_Bull_Shot_1 ;A8D86B; - dw Instruction_Common_GotoY ;A8D86D; + dw Common_Instruction_GotoY ;A8D86D; dw InstList_Bull_Normal ;A8D86F; @@ -10317,7 +9735,7 @@ InstList_Alcoon_FacingLeft_Walking_1: dw $000A,Spritemap_Alcoon_FacingLeft_FrontFootBack ;A8DBF5; dw Instruction_Alcoon_DecrementStepCounter_MoveHorizontally ;A8DBF9; dw $000A,Spritemap_Alcoon_FacingLeft_FeetTogether_BackFootForward ;A8DBFB; - dw Instruction_Common_GotoY ;A8DBFF; + dw Common_Instruction_GotoY ;A8DBFF; dw InstList_Alcoon_FacingLeft_Walking_0 ;A8DC01; @@ -10348,13 +9766,13 @@ InstList_Alcoon_FacingLeft_SpawnFireballs: ;;; $DC4B: Instruction list - facing left - airborne - looking up ;;; InstList_Alcoon_FacingLeft_Airborne_LookingUp: dw $7FFF,Spritemap_Alcoon_FacingLeft_LookingUp ;A8DC4B; - dw Instruction_Common_Sleep ;A8DC4F; + dw Common_Instruction_Sleep ;A8DC4F; ;;; $DC51: Instruction list - facing left - airborne - looking forward ;;; InstList_Alcoon_FacingLeft_Airborne_LookingForward: dw $7FFF,Spritemap_Alcoon_FacingLeft_FeetTogether_BackFootForward ;A8DC51; - dw Instruction_Common_Sleep ;A8DC55; + dw Common_Instruction_Sleep ;A8DC55; ;;; $DC57: Instruction list - facing right - walking ;;; @@ -10369,7 +9787,7 @@ InstList_Alcoon_FacingRight_Walking_1: dw $000A,Spritemap_Alcoon_FacingRight_FrontFootBack ;A8DC65; dw Instruction_Alcoon_DecrementStepCounter_MoveHorizontally ;A8DC69; dw $000A,Spritemap_Alcoon_FacingRight_FrontFootUp ;A8DC6B; - dw Instruction_Common_GotoY ;A8DC6F; + dw Common_Instruction_GotoY ;A8DC6F; dw InstList_Alcoon_FacingRight_Walking_0 ;A8DC71; @@ -10400,13 +9818,13 @@ InstList_Alcoon_FacingRight_SpawnFireballs: ;;; $DCBB: Instruction list - facing right - airborne - looking up ;;; InstList_Alcoon_FacingRight_Airborne_LookingUp: dw $7FFF,Spritemap_Alcoon_FacingRight_LookingUp ;A8DCBB; - dw Instruction_Common_Sleep ;A8DCBF; + dw Common_Instruction_Sleep ;A8DCBF; ;;; $DCC1: Instruction list - facing right - airborne - looking forward ;;; InstList_Alcoon_FacingRight_Airborne_LookingForward: dw $7FFF,Spritemap_Alcoon_FacingRight_FrontFootUp ;A8DCC1; - dw Instruction_Common_Sleep ;A8DCC5; + dw Common_Instruction_Sleep ;A8DCC5; ;;; $DCC7: Alcoon constants ;;; @@ -10839,7 +10257,7 @@ RTL_A8DF9C: if !FEATURE_KEEP_UNREFERENCED ;;; $DF9D: Unused. Normal enemy shot AI ;;; UNUSED_NormalEnemyShotAI_A8DF9D: - JSL.L NormalEnemyShotAI ;A8DF9D; + JSL.L NormalEnemyShotAI_Internal ;A8DF9D; RTL ;A8DFA1; endif ; !FEATURE_KEEP_UNREFERENCED @@ -11069,7 +10487,7 @@ InstList_Atomic_SpinningUpRight: dw $0008,Spritemap_Atomic_3 ;A8E31C; dw $0008,Spritemap_Atomic_4 ;A8E320; dw $0008,Spritemap_Atomic_5 ;A8E324; - dw Instruction_Common_GotoY ;A8E328; + dw Common_Instruction_GotoY ;A8E328; dw InstList_Atomic_SpinningUpRight ;A8E32A; @@ -11081,7 +10499,7 @@ InstList_Atomic_SpinningUpLeft: dw $0008,Spritemap_Atomic_9 ;A8E338; dw $0008,Spritemap_Atomic_A ;A8E33C; dw $0008,Spritemap_Atomic_B ;A8E340; - dw Instruction_Common_GotoY ;A8E344; + dw Common_Instruction_GotoY ;A8E344; dw InstList_Atomic_SpinningUpLeft ;A8E346; @@ -11093,7 +10511,7 @@ InstList_Atomic_SpinningDownLeft: dw $0008,Spritemap_Atomic_2 ;A8E354; dw $0008,Spritemap_Atomic_1 ;A8E358; dw $0008,Spritemap_Atomic_0 ;A8E35C; - dw Instruction_Common_GotoY ;A8E360; + dw Common_Instruction_GotoY ;A8E360; dw InstList_Atomic_SpinningDownLeft ;A8E362; @@ -11105,7 +10523,7 @@ InstList_Atomic_SpinningDownRight: dw $0008,Spritemap_Atomic_8 ;A8E370; dw $0008,Spritemap_Atomic_7 ;A8E374; dw $0008,Spritemap_Atomic_6 ;A8E378; - dw Instruction_Common_GotoY ;A8E37C; + dw Common_Instruction_GotoY ;A8E37C; dw InstList_Atomic_SpinningDownRight ;A8E37E; @@ -11134,13 +10552,13 @@ InitAI_Atomic: ASL ;A8E3A3; ASL ;A8E3A4; TAY ;A8E3A5; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;A8E3A6; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;A8E3A6; STA.L Atomic.speed,X ;A8E3A9; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;A8E3AD; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;A8E3AD; STA.L Atomic.subSpeed,X ;A8E3B0; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;A8E3B4; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;A8E3B4; STA.L Atomic.negativeSpeed,X ;A8E3B7; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;A8E3BB; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;A8E3BB; STA.L Atomic.negativeSubSpeed,X ;A8E3BE; RTL ;A8E3C2; @@ -11365,13 +10783,13 @@ Palette_Spark: InstList_Spark_FlickerOn: dw Instruction_Spark_SetAsTangible ;A8E5A7; dw $0001,Spritemap_Spark_Flickering_0 ;A8E5A9; - dw $0002,Spritemap_Common_Nothing ;A8E5AD; + dw $0002,Common_Spritemap_Nothing ;A8E5AD; dw $0001,Spritemap_Spark_Flickering_0 ;A8E5B1; - dw $0002,Spritemap_Common_Nothing ;A8E5B5; + dw $0002,Common_Spritemap_Nothing ;A8E5B5; dw $0001,Spritemap_Spark_Flickering_1 ;A8E5B9; - dw $0002,Spritemap_Common_Nothing ;A8E5BD; + dw $0002,Common_Spritemap_Nothing ;A8E5BD; dw $0001,Spritemap_Spark_Flickering_1 ;A8E5C1; - dw $0001,Spritemap_Common_Nothing ;A8E5C5; + dw $0001,Common_Spritemap_Nothing ;A8E5C5; dw $0002,Spritemap_Spark_Flickering_2 ;A8E5C9; dw $0002,Spritemap_Spark_Flickering_3 ;A8E5CD; @@ -11382,7 +10800,7 @@ InstList_Spark_Constant: dw $0003,Spritemap_Spark_Constant_1 ;A8E5D5; dw $0003,Spritemap_Spark_Constant_2 ;A8E5D9; dw $0003,Spritemap_Spark_Constant_3 ;A8E5DD; - dw Instruction_Common_GotoY ;A8E5E1; + dw Common_Instruction_GotoY ;A8E5E1; dw InstList_Spark_Constant ;A8E5E3; @@ -11393,11 +10811,11 @@ InstList_Spark_FlickerOut: dw $0001,Spritemap_Spark_Flickering_1 ;A8E5ED; dw $0001,Spritemap_Spark_Flickering_1 ;A8E5F1; dw $0001,Spritemap_Spark_Flickering_2 ;A8E5F5; - dw $0001,Spritemap_Common_Nothing ;A8E5F9; + dw $0001,Common_Spritemap_Nothing ;A8E5F9; dw $0001,Spritemap_Spark_Flickering_2 ;A8E5FD; - dw $0001,Spritemap_Common_Nothing ;A8E601; + dw $0001,Common_Spritemap_Nothing ;A8E601; dw Instruction_Spark_SetAsIntangible ;A8E605; - dw Instruction_Common_Sleep ;A8E607; + dw Common_Instruction_Sleep ;A8E607; ;;; $E609: Instruction list - emit falling sparks ;;; @@ -11406,7 +10824,7 @@ InstList_Spark_EmitFallingSparks: dw $0003,Spritemap_Spark_Flickering_1 ;A8E60D; dw $0003,Spritemap_Spark_Flickering_2 ;A8E611; dw $0003,Spritemap_Spark_Flickering_3 ;A8E615; - dw Instruction_Common_GotoY ;A8E619; + dw Common_Instruction_GotoY ;A8E619; dw InstList_Spark_EmitFallingSparks ;A8E61B; @@ -11653,7 +11071,7 @@ InstList_FaceBlock_TurningLeft: dw $0030,Spritemap_FaceBlock_FacingForward ;A8E80C; dw $0010,Spritemap_FaceBlock_TurningLeft ;A8E810; dw $0010,Spritemap_FaceBlock_FacingLeft ;A8E814; - dw Instruction_Common_Sleep ;A8E818; + dw Common_Instruction_Sleep ;A8E818; ;;; $E81A: Instruction list - turning right ;;; @@ -11661,13 +11079,13 @@ InstList_FaceBlock_TurningRight: dw $0030,Spritemap_FaceBlock_FacingForward ;A8E81A; dw $0010,Spritemap_FaceBlock_TurningRight ;A8E81E; dw $0010,Spritemap_FaceBlock_FacingRight ;A8E822; - dw Instruction_Common_Sleep ;A8E826; + dw Common_Instruction_Sleep ;A8E826; ;;; $E828: Instruction list - facing forward ;;; InstList_FaceBlock_FacingForward: dw $0001,Spritemap_FaceBlock_FacingForward ;A8E828; - dw Instruction_Common_Sleep ;A8E82C; + dw Common_Instruction_Sleep ;A8E82C; ;;; $E82E: Initialisation AI - enemy $EA7F (blue Brinstar face block) ;;; @@ -11679,7 +11097,7 @@ InitAI_FaceBlock: LDA.W CollectedItems ;A8E83A; BIT.W #$0004 ;A8E83D; BNE .morphBallCollected ;A8E840; - LDY.W #RTL_A8804C ;A8E842; + LDY.W #Common_RTL_A0804C ;A8E842; .morphBallCollected: STY.W EnemyGraphicsDrawnHook ;A8E845; @@ -11882,7 +11300,7 @@ InstList_Kihunter_Swiping_FacingLeft: dw $0002,Spritemap_Kihunter_Swiping_FacingLeft_0 ;A8EA14; dw $0002,Spritemap_Kihunter_Swiping_FacingLeft_3 ;A8EA18; dw $0020,Spritemap_Kihunter_Swiping_FacingLeft_4 ;A8EA1C; - dw Instruction_Common_GotoY ;A8EA20; + dw Common_Instruction_GotoY ;A8EA20; dw InstList_Kihunter_Idling_FacingLeft ;A8EA22; @@ -11902,7 +11320,7 @@ InstList_Kihunter_Swiping_FacingRight: dw $0002,Spritemap_Kihunter_Swiping_FacingRight_0 ;A8EA3E; dw $0002,Spritemap_Kihunter_Swiping_FacingRight_3 ;A8EA42; dw $0020,Spritemap_Kihunter_Swiping_FacingRight_4 ;A8EA46; - dw Instruction_Common_GotoY ;A8EA4A; + dw Common_Instruction_GotoY ;A8EA4A; dw InstList_Kihunter_Idling_FacingRight ;A8EA4C; @@ -11911,7 +11329,7 @@ InstList_KihunterWings_FacingLeft: dw $0002,Spritemap_KihunterWings_FacingLeft_0 ;A8EA4E; dw $0002,Spritemap_KihunterWings_FacingLeft_1 ;A8EA52; dw $0001,Spritemap_KihunterWings_FacingLeft_2 ;A8EA56; - dw Instruction_Common_GotoY ;A8EA5A; + dw Common_Instruction_GotoY ;A8EA5A; dw InstList_KihunterWings_FacingLeft ;A8EA5C; @@ -11920,7 +11338,7 @@ InstList_KihunterWings_FacingRight: dw $0002,Spritemap_KihunterWings_FacingRight_0 ;A8EA5E; dw $0002,Spritemap_KihunterWings_FacingRight_1 ;A8EA62; dw $0001,Spritemap_KihunterWings_FacingRight_2 ;A8EA66; - dw Instruction_Common_GotoY ;A8EA6A; + dw Common_Instruction_GotoY ;A8EA6A; dw InstList_KihunterWings_FacingRight ;A8EA6C; @@ -11928,7 +11346,7 @@ if !FEATURE_KEEP_UNREFERENCED ;;; $EA6E: Unused. Instruction list - ki-hunter wings - falling - X flipped ;;; UNUSED_InstList_KihunterWings_Falling_XFlipped_A8EA6E: dw $0010,UNUSED_Spritemap_KihunterWings_Falling_XFlipped_A8EBDF ;A8EA6E; - dw Instruction_Common_GotoY ;A8EA72; + dw Common_Instruction_GotoY ;A8EA72; dw UNUSED_InstList_KihunterWings_Falling_XFlipped_A8EA6E ;A8EA74; @@ -11936,7 +11354,7 @@ UNUSED_InstList_KihunterWings_Falling_XFlipped_A8EA6E: UNUSED_InstList_KihunterWings_Falling_XFlipped_A8EA76: ; Spritemap UNUSED_Spritemap_KihunterWings_Falling_XFlipped_A8EBEB is a clone of Spritemap_Kihunter_6, so this instruction list is a clone of UNUSED_InstList_KihunterWings_Falling_XFlipped_A8EA6E dw $0010,UNUSED_Spritemap_KihunterWings_Falling_XFlipped_A8EBEB ;A8EA76; - dw Instruction_Common_GotoY ;A8EA7A; + dw Common_Instruction_GotoY ;A8EA7A; dw UNUSED_InstList_KihunterWings_Falling_XFlipped_A8EA76 ;A8EA7C; endif ; !FEATURE_KEEP_UNREFERENCED @@ -11944,7 +11362,7 @@ endif ; !FEATURE_KEEP_UNREFERENCED ;;; $EA7E: Instruction list - ki-hunter wings - falling ;;; InstList_KihunterWings_Falling: dw $0001,Spritemap_KihunterWings_Falling ;A8EA7E; - dw Instruction_Common_Sleep ;A8EA82; + dw Common_Instruction_Sleep ;A8EA82; if !FEATURE_KEEP_UNREFERENCED @@ -11952,7 +11370,7 @@ if !FEATURE_KEEP_UNREFERENCED UNUSED_InstList_KihunterWings_Falling_A8EA84: ; Spritemap UNUSED_Spritemap_KihunterWings_Falling_A8ECB4 is a clone of Spritemap_KihunterWings_Falling, so this instruction list is a clone of InstList_KihunterWings_Falling dw $0001,UNUSED_Spritemap_KihunterWings_Falling_A8ECB4 ;A8EA84; - dw Instruction_Common_Sleep ;A8EA88; + dw Common_Instruction_Sleep ;A8EA88; endif ; !FEATURE_KEEP_UNREFERENCED @@ -11965,7 +11383,7 @@ InstList_Kihunter_Hop_FacingLeft: dw $0002,Spritemap_Kihunter_Hop_FacingLeft_0 ;A8EA9A; dw Instruction_Kihunter_SetFunctionToHop ;A8EA9E; dw $0001,Spritemap_Kihunter_Hop_FacingLeft_3 ;A8EAA0; - dw Instruction_Common_Sleep ;A8EAA4; + dw Common_Instruction_Sleep ;A8EAA4; ;;; $EAA6: Instruction list - ki-hunter - hop - facing right ;;; @@ -11977,7 +11395,7 @@ InstList_Kihunter_Hop_FacingRight: dw $0002,Spritemap_Kihunter_Hop_FacingRight_0 ;A8EAB6; dw Instruction_Kihunter_SetFunctionToHop ;A8EABA; dw $0001,Spritemap_Kihunter_Hop_FacingRight_3 ;A8EABC; - dw Instruction_Common_Sleep ;A8EAC0; + dw Common_Instruction_Sleep ;A8EAC0; ;;; $EAC2: Instruction list - ki-hunter - landed from hop - facing left ;;; @@ -11988,7 +11406,7 @@ InstList_Kihunter_LandedFromHop_FacingLeft: dw $0008,Spritemap_Kihunter_Hop_FacingLeft_1 ;A8EACE; dw Instruction_Kihunter_SetFunctionTo_Wingless_Thinking ;A8EAD2; dw $0001,Spritemap_Kihunter_Hop_FacingLeft_0 ;A8EAD4; - dw Instruction_Common_Sleep ;A8EAD8; + dw Common_Instruction_Sleep ;A8EAD8; ;;; $EADA: Instruction list - ki-hunter - landed from hop - facing right ;;; @@ -11999,7 +11417,7 @@ InstList_Kihunter_LandedFromHop_FacingRight: dw $0008,Spritemap_Kihunter_Hop_FacingRight_1 ;A8EAE6; dw Instruction_Kihunter_SetFunctionTo_Wingless_Thinking ;A8EAEA; dw $0001,Spritemap_Kihunter_Hop_FacingRight_0 ;A8EAEC; - dw Instruction_Common_Sleep ;A8EAF0; + dw Common_Instruction_Sleep ;A8EAF0; ;;; $EAF2: Instruction list - acid spit attack - facing left ;;; @@ -12012,7 +11430,7 @@ InstList_Kihunter_AcidSpitAttack_FacingLeft: dw $0018,Spritemap_Kihunter_AcidSpitAttack_FacingLeft_4 ;A8EB04; dw Instruction_Kihunter_SetFunctionTo_Wingless_Thinking ;A8EB08; dw $0001,Spritemap_Kihunter_AcidSpitAttack_FacingLeft_0 ;A8EB0A; - dw Instruction_Common_Sleep ;A8EB0E; + dw Common_Instruction_Sleep ;A8EB0E; ;;; $EB10: Instruction list - acid spit attack - facing right ;;; @@ -12025,7 +11443,7 @@ InstList_Kihunter_AcidSpitAttack_FacingRight: dw $0018,Spritemap_Kihunter_AcidSpitAttack_FacingRight_4 ;A8EB22; dw Instruction_Kihunter_SetFunctionTo_Wingless_Thinking ;A8EB26; dw $0001,Spritemap_Kihunter_AcidSpitAttack_FacingRight_0 ;A8EB28; - dw Instruction_Common_Sleep ;A8EB2C; + dw Common_Instruction_Sleep ;A8EB2C; ;;; $EB2E: Ki-hunter spritemaps ;;; @@ -13131,7 +12549,7 @@ RTL_A8F700: ;;; $F701: Enemy shot - enemy $EABF/$EB3F/$EBBF (ki-hunter) ;;; EnemyShot_Kihunter: - JSL.L NormalEnemyShotAI ;A8F701; + JSL.L NormalEnemyShotAI_Internal ;A8F701; LDX.W EnemyIndex ;A8F705; LDA.W Enemy.health,X ;A8F708; BEQ .dead ;A8F70B; @@ -13198,7 +12616,7 @@ EnemyShot_Kihunter: STA.W KihunterWings.speedTableIndex,X ;A8F7A9; LDA.W #InstList_KihunterWings_Falling ;A8F7AC; STA.W Enemy.instList,X ;A8F7AF; - LDA.W #Spritemap_Common_Nothing ;A8F7B2; + LDA.W #Common_Spritemap_Nothing ;A8F7B2; STA.W Enemy.spritemap,X ;A8F7B5; LDA.W #$0001 ;A8F7B8; STA.W Enemy.instTimer,X ;A8F7BB; @@ -13233,7 +12651,7 @@ Function_KihunterWings_Falling_DriftingLeft: TAY ;A8F7E8; LDA.W KihunterWings.arcAngle,X ;A8F7E9; CLC ;A8F7EC; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing+5,Y ;A8F7ED; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing+5,Y ;A8F7ED; STA.W KihunterWings.arcAngle,X ;A8F7F0; LDA.W KihunterConstants_fallingWingsArcRadius ;A8F7F3; AND.W #$00FF ;A8F7F6; @@ -13328,7 +12746,7 @@ Function_KihunterWings_Falling_DriftingRight: TAY ;A8F8BA; LDA.W KihunterWings.arcAngle,X ;A8F8BB; CLC ;A8F8BE; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing+1,Y ;A8F8BF; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing+1,Y ;A8F8BF; STA.W KihunterWings.arcAngle,X ;A8F8C2; LDA.W KihunterConstants_fallingWingsArcRadius ;A8F8C5; AND.W #$00FF ;A8F8C8; @@ -13436,7 +12854,7 @@ DetermineFallingKihunterWingsSpeedTableIndexResetValue: TAY ;A8F9AD; LDA.W KihunterWings.angleAccumulator,X ;A8F9AE; CLC ;A8F9B1; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing+1,Y ;A8F9B2; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing+1,Y ;A8F9B2; STA.W KihunterWings.angleAccumulator,X ;A8F9B5; CMP.W #$2000 ;A8F9B8; BMI .loop ;A8F9BB; diff --git a/src/bank_A9.asm b/src/bank_A9.asm index b0238f9..5bce2f1 100644 --- a/src/bank_A9.asm +++ b/src/bank_A9.asm @@ -3,591 +3,9 @@ org $A98000 ; Common to all enemy code banks - -;;; $8000: Grapple AI - no interaction. Also unfreezes enemies(!) ;;; -CommonA9_GrappleAI_NoInteraction: -; Used by skultera, Draygon body, fire arc, Phantoon, etecoon, dachora and WS ghost - JSL.L GrappleAI_SwitchEnemyAIToMainAI ;A98000; - RTL ;A98004; - - -;;; $8005: Grapple AI - Samus latches on ;;; -CommonA9_GrappleAI_SamusLatchesOn: -; Used by gripper and Crocomire - JSL.L GrappleAI_SamusLatchesOnWithGrapple ;A98005; - RTL ;A98009; - - -;;; $800A: Grapple AI - kill enemy ;;; -CommonA9_GrappleAI_KillEnemy: -; Common - JSL.L GrappleAI_EnemyGrappleDeath ;A9800A; - RTL ;A9800E; - - -;;; $800F: Grapple AI - cancel grapple beam ;;; -CommonA9_GrappleAI_CancelGrappleBeam: -; Common - JSL.L GrappleAI_SwitchToFrozenAI ;A9800F; - RTL ;A98013; - - -;;; $8014: Grapple AI - Samus latches on - no invincibility ;;; -CommonA9_GrappleAI_SamusLatchesOn_NoInvincibility: -; Used by powamp - JSL.L GrappleAI_SamusLatchesOnWithGrapple_NoInvincibility ;A98014; - RTL ;A98018; - - -;;; $8019: Unused. Grapple AI - Samus latches on - paralyse enemy ;;; -UNUSED_CommonA9_GrappleAI_SamusLatchesOn_ParalyzeEnemy_A98019: - JSL.L GrappleAI_SamusLatchesOnWithGrapple_ParalyzeEnemy ;A98019; - RTL ;A9801D; - - -;;; $801E: Grapple AI - hurt Samus ;;; -CommonA9_GrappleAI_HurtSamus: -; Used by WS spark -; Hurt reaction happens in $9B:B932 - JSL.L GrappleAI_SwitchToFrozenAI_duplicate ;A9801E; - RTL ;A98022; - - -;;; $8023: Normal enemy touch AI ;;; -CommonA9_NormalEnemyTouchAI: - JSL.L NormalEnemyTouchAI ;A98023; - RTL ;A98027; - - -;;; $8028: Normal touch AI - no death check ;;; -CommonA9_NormalTouchAI_NoDeathCheck: - JSL.L NormalEnemyTouchAI_NoDeathCheck_External ;A98028; - RTL ;A9802C; - - -;;; $802D: Normal enemy shot AI ;;; -CommonA9_NormalEnemyShotAI: - JSL.L NormalEnemyShotAI ;A9802D; - RTL ;A98031; - - -;;; $8032: Normal enemy shot AI - no death check, no enemy shot graphic ;;; -CommonA9_NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic: - JSL.L NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic_External ;A98032; - RTL ;A98036; - - -;;; $8037: Normal enemy power bomb AI ;;; -CommonA9_NormalEnemyPowerBombAI: - JSL.L NormalEnemyPowerBombAI ;A98037; - RTL ;A9803B; - - -;;; $803C: Normal enemy power bomb AI - no death check ;;; -CommonA9_NormalEnemyPowerBombAI_NoDeathCheck: -; Kraid's power bomb AI - JSL.L NormalEnemyPowerBombAI_NoDeathCheck_External ;A9803C; - RTL ;A98040; - - -;;; $8041: Normal enemy frozen AI ;;; -CommonA9_NormalEnemyFrozenAI: - JSL.L NormalEnemyFrozenAI ;A98041; - RTL ;A98045; - - -;;; $8046: Creates a dud shot ;;; -CommonA9_CreateADudShot: - JSL.L CreateADudShot ;A98046; - RTL ;A9804A; - - -;;; $804B: RTS ;;; -RTS_A9804B: - RTS ;A9804B; - - -;;; $804C: RTL ;;; -RTL_A9804C: - RTL ;A9804C; - - -;;; $804D: Spritemap - nothing ;;; -Spritemap_CommonA9_Nothing: - dw $0000 ;A9804D; - - -;;; $804F: Extended spritemap - nothing ;;; -ExtendedSpritemap_CommonA9_Nothing: - dw $0001 ;A9804F; - dw $0000,$0000 - dw Spritemap_CommonA9_Nothing ;A98055; - dw Hitbox_CommonA9_Nothing ;A98057; - - -;;; $8059: Hitbox - nothing ;;; -Hitbox_CommonA9_Nothing: -; [n entries] [[left offset] [top offset] [right offset] [bottom offset] [p touch] [p shot]]... - dw $0001 ;A98059; - dw $0000,$0000,$0000,$0000 - dw CommonA9_NormalEnemyTouchAI ;A98063; - dw CommonA9_NormalEnemyShotAI ;A98065; - - -;;; $8067: Instruction list - delete enemy ;;; -InstList_CommonA9_DeleteEnemy: - dw Instruction_CommonA9_DeleteEnemy ;A98067; - - -;;; $8069: Two NOPs ;;; -NOPNOP_A98069: -; Used as palette by respawning enemy placeholder and Draygon's eye o_O - NOP ;A98069; - NOP ;A9806A; - - -;;; $806B: Instruction - Enemy.var5 = [[Y]] ;;; -Instruction_CommonA9_Enemy0FB2_InY: -; Used only by torizos (for enemy movement function) and escape etecoon (for enemy function) - LDA.W $0000,Y ;A9806B; - STA.W Enemy.var5,X ;A9806E; - INY ;A98071; - INY ;A98072; - RTL ;A98073; - - -;;; $8074: Instruction - Enemy.var5 = RTS ;;; -Instruction_CommonA9_SetEnemy0FB2ToRTS: - LDA.W #RTS_A9807B ;A98074; - STA.W Enemy.var5,X ;A98077; - RTL ;A9807A; - - -RTS_A9807B: - RTS ;A9807B; - - -;;; $807C: Instruction - delete enemy ;;; -Instruction_CommonA9_DeleteEnemy: - LDA.W Enemy.properties,X ;A9807C; - ORA.W #$0200 ;A9807F; - STA.W Enemy.properties,X ;A98082; - PLA ;A98085; - PEA.W ProcessEnemyInstructions_return-1 ;A98086; - RTL ;A98089; - - -;;; $808A: Instruction - call function [[Y]] ;;; -Instruction_CommonA9_CallFunctionInY: - LDA.W $0000,Y ;A9808A; - STA.B DP_Temp12 ;A9808D; - PHY ;A9808F; - PHX ;A98090; - PEA.W .manualReturn-1 ;A98091; - JMP.W (DP_Temp12) ;A98094; - - .manualReturn: - PLX ;A98097; - PLY ;A98098; - INY ;A98099; - INY ;A9809A; - RTL ;A9809B; - - -;;; $809C: Instruction - call function [[Y]] with A = [[Y] + 2] ;;; -Instruction_CommonA9_CallFunctionInY_WithA: - LDA.W $0000,Y ;A9809C; - STA.B DP_Temp12 ;A9809F; - LDA.W $0002,Y ;A980A1; - PHY ;A980A4; - PHX ;A980A5; - PEA.W .manualReturn-1 ;A980A6; - JMP.W (DP_Temp12) ;A980A9; - - .manualReturn: - PLX ;A980AC; - PLY ;A980AD; - TYA ;A980AE; - CLC ;A980AF; - ADC.W #$0004 ;A980B0; - TAY ;A980B3; - RTL ;A980B4; - - -if !FEATURE_KEEP_UNREFERENCED -;;; $80B5: Unused. Instruction - call external function [[Y]] ;;; -UNUSED_Instruction_CommonA9_CallExternalFunctionInY_A980B5: - LDA.W $0000,Y ;A980B5; - STA.B DP_Temp12 ;A980B8; - LDA.W $0001,Y ;A980BA; - STA.B DP_Temp13 ;A980BD; - PHX ;A980BF; - PHY ;A980C0; - JSL.L .externalFunction ;A980C1; - PLY ;A980C5; - PLX ;A980C6; - INY ;A980C7; - INY ;A980C8; - INY ;A980C9; - RTL ;A980CA; - - .externalFunction: - JML.W [DP_Temp12] ;A980CB; - - -;;; $80CE: Unused. Instruction - call external function [[Y]] with A = [[Y] + 3] ;;; -UNUSED_Inst_CommonA9_CallExternalFunctionInY_WithA_A980CE: - LDA.W $0000,Y ;A980CE; - STA.B DP_Temp12 ;A980D1; - LDA.W $0001,Y ;A980D3; - STA.B DP_Temp13 ;A980D6; - LDA.W $0003,Y ;A980D8; - PHX ;A980DB; - PHY ;A980DC; - JSL.L .externalFunction ;A980DD; - PLY ;A980E1; - PLX ;A980E2; - TYA ;A980E3; - CLC ;A980E4; - ADC.W #$0005 ;A980E5; - TAY ;A980E8; - RTL ;A980E9; - - .externalFunction: - JML.W [DP_Temp12] ;A980EA; -endif ; !FEATURE_KEEP_UNREFERENCED - - -;;; $80ED: Instruction - go to [[Y]] ;;; -Instruction_CommonA9_GotoY: - LDA.W $0000,Y ;A980ED; - TAY ;A980F0; - RTL ;A980F1; - - -;;; $80F2: Instruction - go to [[Y]] + ±[[Y]] ;;; -Instruction_CommonA9_GotoY_PlusY: - STY.B DP_Temp12 ;A980F2; - DEY ;A980F4; - LDA.W $0000,Y ;A980F5; - XBA ;A980F8; - BMI .highByte ;A980F9; - AND.W #$00FF ;A980FB; - BRA + ;A980FE; - - .highByte: - ORA.W #$FF00 ;A98100; - -+ CLC ;A98103; - ADC.B DP_Temp12 ;A98104; - TAY ;A98106; - RTL ;A98107; - - -;;; $8108: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonA9_DecrementTimer_GotoYIfNonZero: - DEC.W Enemy.loopCounter,X ;A98108; - BNE Instruction_CommonA9_GotoY ;A9810B; - INY ;A9810D; - INY ;A9810E; - RTL ;A9810F; - - -;;; $8110: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonA9_DecrementTimer_GotoYIfNonZero_duplicate: - DEC.W Enemy.loopCounter,X ;A98110; - BNE Instruction_CommonA9_GotoY ;A98113; - INY ;A98115; - INY ;A98116; - RTL ;A98117; - - -;;; $8118: Instruction - decrement timer and go to [Y] + ±[[Y]] if non-zero ;;; -Instruction_CommonA9_DecrementTimer_GotoY_PlusY_IfNonZero: - SEP #$20 ;A98118; - DEC.W Enemy.loopCounter,X ;A9811A; - REP #$20 ;A9811D; - BNE Instruction_CommonA9_GotoY_PlusY ;A9811F; - INY ;A98121; - RTL ;A98122; - - -;;; $8123: Instruction - timer = [[Y]] ;;; -Instruction_CommonA9_TimerInY: - LDA.W $0000,Y ;A98123; - STA.W Enemy.loopCounter,X ;A98126; - INY ;A98129; - INY ;A9812A; - RTL ;A9812B; - - -;;; $812C: Instruction - skip next instruction ;;; -Instruction_CommonA9_SkipNextInstruction: - INY ;A9812C; - INY ;A9812D; - RTL ;A9812E; - - -;;; $812F: Instruction - sleep ;;; -Instruction_CommonA9_Sleep: - DEY ;A9812F; - DEY ;A98130; - TYA ;A98131; - STA.W Enemy.instList,X ;A98132; - PLA ;A98135; - PEA.W ProcessEnemyInstructions_return-1 ;A98136; - RTL ;A98139; - - -;;; $813A: Instruction - wait [[Y]] frames ;;; -Instruction_CommonA9_WaitYFrames: -; Set instruction timer and terminate processing enemy instructions -; Used for running a delay that doesn't update graphics, -; useful for e.g. GT eye beam attack ($AA:D10D), implemented by an instruction list that has no graphical instructions, -; which allows it to be called from multiple different poses - LDA.W $0000,Y ;A9813A; - STA.W Enemy.instTimer,X ;A9813D; - INY ;A98140; - INY ;A98141; - TYA ;A98142; - STA.W Enemy.instList,X ;A98143; - PLA ;A98146; - PEA.W ProcessEnemyInstructions_return-1 ;A98147; - RTL ;A9814A; - - -;;; $814B: Instruction - transfer [[Y]] bytes from [[Y] + 2] to VRAM [[Y] + 5] ;;; -Instruction_CommonA9_TransferYBytesInYToVRAM: - PHX ;A9814B; - LDX.W VRAMWriteStack ;A9814C; - LDA.W $0000,Y ;A9814F; - STA.B VRAMWrite.size,X ;A98152; - LDA.W $0002,Y ;A98154; - STA.B VRAMWrite.src,X ;A98157; - LDA.W $0003,Y ;A98159; - STA.B VRAMWrite.src+1,X ;A9815C; - LDA.W $0005,Y ;A9815E; - STA.B VRAMWrite.dest,X ;A98161; - TXA ;A98163; - CLC ;A98164; - ADC.W #$0007 ;A98165; - STA.W VRAMWriteStack ;A98168; - TYA ;A9816B; - CLC ;A9816C; - ADC.W #$0007 ;A9816D; - TAY ;A98170; - PLX ;A98171; - RTL ;A98172; - - -;;; $8173: Instruction - enable off-screen processing ;;; -Instruction_CommonA9_EnableOffScreenProcessing: - LDA.W Enemy.properties,X ;A98173; - ORA.W #$0800 ;A98176; - STA.W Enemy.properties,X ;A98179; - RTL ;A9817C; - - -;;; $817D: Instruction - disable off-screen processing ;;; -Instruction_CommonA9_DisableOffScreenProcessing: - LDA.W Enemy.properties,X ;A9817D; - AND.W #$F7FF ;A98180; - STA.W Enemy.properties,X ;A98183; - RTL ;A98186; - - -;;; $8187: Common enemy speeds - linearly increasing ;;; -CommonA9EnemySpeeds_LinearlyIncreasing: -; _____________________ Speed -; | _______________ Subspeed -; | | _________ Negated speed -; | | | ___ Negated subspeed -; | | | | - .speed: - dw $0000 ;A98187; - .subspeed: - dw $0000 ;A98189; - .negatedSpeed: - dw $0000 ;A9818B; - .negatedSubspeed: - dw $0000 ;A9818D; - dw $0000,$1000,$FFFF,$F000 - dw $0000,$2000,$FFFF,$E000 - dw $0000,$3000,$FFFF,$D000 - dw $0000,$4000,$FFFF,$C000 - dw $0000,$5000,$FFFF,$B000 - dw $0000,$6000,$FFFF,$A000 - dw $0000,$7000,$FFFF,$9000 - dw $0000,$8000,$FFFF,$8000 - dw $0000,$9000,$FFFF,$7000 - dw $0000,$A000,$FFFF,$6000 - dw $0000,$B000,$FFFF,$5000 - dw $0000,$C000,$FFFF,$4000 - dw $0000,$D000,$FFFF,$3000 - dw $0000,$E000,$FFFF,$2000 - dw $0000,$F000,$FFFF,$1000 - dw $0001,$0000,$FFFF,$0000 - dw $0001,$1000,$FFFE,$F000 - dw $0001,$2000,$FFFE,$E000 - dw $0001,$3000,$FFFE,$D000 - dw $0001,$4000,$FFFE,$C000 - dw $0001,$5000,$FFFE,$B000 - dw $0001,$6000,$FFFE,$A000 - dw $0001,$7000,$FFFE,$9000 - dw $0001,$8000,$FFFE,$8000 - dw $0001,$9000,$FFFE,$7000 - dw $0001,$A000,$FFFE,$6000 - dw $0001,$B000,$FFFE,$5000 - dw $0001,$C000,$FFFE,$4000 - dw $0001,$D000,$FFFE,$3000 - dw $0001,$E000,$FFFE,$2000 - dw $0001,$F000,$FFFE,$1000 - dw $0002,$0000,$FFFE,$0000 - dw $0002,$1000,$FFFD,$F000 - dw $0002,$2000,$FFFD,$E000 - dw $0002,$3000,$FFFD,$D000 - dw $0002,$4000,$FFFD,$C000 - dw $0002,$5000,$FFFD,$B000 - dw $0002,$6000,$FFFD,$A000 - dw $0002,$7000,$FFFD,$9000 - dw $0002,$8000,$FFFD,$8000 - dw $0002,$9000,$FFFD,$7000 - dw $0002,$A000,$FFFD,$6000 - dw $0002,$B000,$FFFD,$5000 - dw $0002,$C000,$FFFD,$4000 - dw $0002,$D000,$FFFD,$3000 - dw $0002,$E000,$FFFD,$2000 - dw $0002,$F000,$FFFD,$1000 - dw $0003,$0000,$FFFD,$0000 - dw $0003,$1000,$FFFC,$F000 - dw $0003,$2000,$FFFC,$E000 - dw $0003,$3000,$FFFC,$D000 - dw $0003,$4000,$FFFC,$C000 - dw $0003,$5000,$FFFC,$B000 - dw $0003,$6000,$FFFC,$A000 - dw $0003,$7000,$FFFC,$9000 - dw $0003,$8000,$FFFC,$8000 - dw $0003,$9000,$FFFC,$7000 - dw $0003,$A000,$FFFC,$6000 - dw $0003,$B000,$FFFC,$5000 - dw $0003,$C000,$FFFC,$4000 - dw $0003,$D000,$FFFC,$3000 - dw $0003,$E000,$FFFC,$2000 - dw $0003,$F000,$FFFC,$1000 - dw $0004,$0000,$FFFC,$0000 - - -;;; $838F: Common enemy speeds - quadratically increasing ;;; -CommonA9EnemySpeeds_QuadraticallyIncreasing: -; I.e. gravity -; Used by e.g. Botwoon when dying and falling to the floor -; _____________________ Subspeed -; | _______________ Speed -; | | _________ Negated subspeed -; | | | ___ Negated speed -; | | | | - .subspeed: - dw $0000 ;A9838F; - .speed: - dw $0000 ;A98391; - .negatedSubspeed: - dw $0000 ;A98393; - .negatedSpeed: - dw $0000 ;A98395; - dw $0109,$0000,$FEF7,$FFFF - dw $031B,$0000,$FCE5,$FFFF - dw $0636,$0000,$F9CA,$FFFF - dw $0A5A,$0000,$F5A6,$FFFF - dw $0F87,$0000,$F079,$FFFF - dw $15BD,$0000,$EA43,$FFFF - dw $1CFC,$0000,$E304,$FFFF - dw $2544,$0000,$DABC,$FFFF - dw $2E95,$0000,$D16B,$FFFF - dw $38EF,$0000,$C711,$FFFF - dw $4452,$0000,$BBAE,$FFFF - dw $50BE,$0000,$AF42,$FFFF - dw $5E33,$0000,$A1CD,$FFFF - dw $6CB1,$0000,$934F,$FFFF - dw $7C38,$0000,$83C8,$FFFF - dw $8CC8,$0000,$7338,$FFFF - dw $9E61,$0000,$619F,$FFFF - dw $B103,$0000,$4EFD,$FFFF - dw $C4AE,$0000,$3B52,$FFFF - dw $D962,$0000,$269E,$FFFF - dw $EF1F,$0000,$10E1,$FFFF - dw $05E5,$0000,$FA1B,$FFFF - dw $14B4,$0001,$EB4C,$FFFE - dw $2D8C,$0001,$D274,$FFFE - dw $476D,$0001,$B893,$FFFE - dw $6257,$0001,$9DA9,$FFFE - dw $7E4A,$0001,$81B6,$FFFE - dw $9B46,$0001,$64BA,$FFFE - dw $B94B,$0001,$46B5,$FFFE - dw $D859,$0001,$27A7,$FFFE - dw $F870,$0001,$0790,$FFFE - dw $1090,$0002,$EF70,$FFFD - dw $32B9,$0002,$CD47,$FFFD - dw $55EB,$0002,$AA15,$FFFD - dw $7A26,$0002,$85DA,$FFFD - dw $9F6A,$0002,$6096,$FFFD - dw $C5B7,$0002,$3A49,$FFFD - dw $ED0D,$0002,$12F3,$FFFD - dw $0C6C,$0003,$F394,$FFFC - dw $35D4,$0003,$CA2C,$FFFC - dw $6045,$0003,$9FBB,$FFFC - dw $8BBF,$0003,$7441,$FFFC - dw $B842,$0003,$47BE,$FFFC - dw $E5CE,$0003,$1A32,$FFFC - dw $0B63,$0004,$F49D,$FFFB - dw $3B01,$0004,$C4FF,$FFFB - dw $6BA8,$0004,$9458,$FFFB - dw $9D58,$0004,$62A8,$FFFB - dw $D011,$0004,$2FEF,$FFFB - dw $03D3,$0004,$FC2D,$FFFB - dw $2F9E,$0005,$D062,$FFFA - dw $6572,$0005,$9A8E,$FFFA - dw $9C4F,$0005,$63B1,$FFFA - dw $D435,$0005,$2BCB,$FFFA - dw $0424,$0006,$FBDC,$FFF9 - dw $3E1C,$0006,$C1E4,$FFF9 - dw $791D,$0006,$86E3,$FFF9 - dw $B527,$0006,$4AD9,$FFF9 - dw $F23A,$0006,$0DC6,$FFF9 - dw $2756,$0007,$D8AA,$FFF8 - dw $667B,$0007,$9985,$FFF8 - dw $A6A9,$0007,$5957,$FFF8 - dw $E7E0,$0007,$1820,$FFF8 - dw $2120,$0008,$DEE0,$FFF7 - dw $6469,$0008,$9B97,$FFF7 - dw $A8BB,$0008,$5745,$FFF7 - dw $EE16,$0008,$11EA,$FFF7 - dw $2B7A,$0009,$D486,$FFF6 - dw $72E7,$0009,$8D19,$FFF6 - dw $BB5D,$0009,$44A3,$FFF6 - dw $04DC,$0009,$FB24,$FFF6 - dw $4664,$000A,$B99C,$FFF5 - dw $91F5,$000A,$6E0B,$FFF5 - dw $DE8F,$000A,$2171,$FFF5 - dw $2332,$000B,$DCCE,$FFF4 - dw $71DE,$000B,$8E22,$FFF4 - dw $C193,$000B,$3E6D,$FFF4 - dw $0951,$000C,$F6AF,$FFF3 - dw $5B18,$000C,$A4E8,$FFF3 - dw $ADE8,$000C,$5218,$FFF3 - dw $01C1,$000C,$FE3F,$FFF3 - dw $4DA3,$000D,$B25D,$FFF2 - dw $A38E,$000D,$5C72,$FFF2 - dw $FA82,$000D,$057E,$FFF2 - dw $497F,$000E,$B681,$FFF1 - dw $A285,$000E,$5D7B,$FFF1 - dw $FC94,$000E,$036C,$FFF1 - dw $4EAC,$000F,$B154,$FFF0 - dw $AACD,$000F,$5533,$FFF0 - dw $07F7,$000F,$F809,$FFF0 - dw $5D2A,$0010,$A2D6,$FFEF - dw $BC66,$0010,$439A,$FFEF - dw $13AB,$0011,$EC55,$FFEE - dw $74F9,$0011,$8B07,$FFEE +namespace CommonA9 +incsrc "common_enemy_functions.asm" +namespace off ;;; $8687: Initialisation AI - enemy $EC7F (Mother Brain body) ;;; @@ -1417,31 +835,31 @@ SpawnFallingTubeSmoke: ;;; $8C69: Instruction list - Mother Brain tubes falling 0 ;;; InstList_MotherBrainTubes_0: dw $0001,Spritemaps_MotherBrainTubes_0 ;A98C69; - dw Instruction_Common_Sleep ;A98C6D; + dw Common_Instruction_Sleep ;A98C6D; ;;; $8C6F: Instruction list - Mother Brain tubes falling 1 ;;; InstList_MotherBrainTubes_1: dw $0001,Spritemaps_MotherBrainTubes_1 ;A98C6F; - dw Instruction_Common_Sleep ;A98C73; + dw Common_Instruction_Sleep ;A98C73; ;;; $8C75: Instruction list - Mother Brain tubes falling 2 ;;; InstList_MotherBrainTubes_2: dw $0001,Spritemaps_MotherBrainTubes_2 ;A98C75; - dw Instruction_Common_Sleep ;A98C79; + dw Common_Instruction_Sleep ;A98C79; ;;; $8C7B: Instruction list - Mother Brain tubes falling 3 ;;; InstList_MotherBrainTubes_3: dw $0001,Spritemaps_MotherBrainTubes_3 ;A98C7B; - dw Instruction_Common_Sleep ;A98C7F; + dw Common_Instruction_Sleep ;A98C7F; ;;; $8C81: Instruction list - Mother Brain tubes falling 4 ;;; InstList_MotherBrainTubes_4: dw $0001,Spritemaps_MotherBrainTubes_4 ;A98C81; - dw Instruction_Common_Sleep ;A98C85; + dw Common_Instruction_Sleep ;A98C85; ;;; $8C87: Mother Brain body function - fake death - ascent - draw room background on BG1 - rows 2/3 ;;; @@ -2915,7 +2333,7 @@ InstList_MotherBrainBody_WalkingForwards_ReallyFast: dw Instruction_MotherBrainBody_MoveBodyUpBy2_LeftBy1_Footstep ;A99760; dw Instruction_MotherBrainBody_SetPoseToStanding ;A99762; dw $0002,ExtendedSpritemap_MotherBrainBody_Walking_7 ;A99764; - dw Instruction_Common_Sleep ;A99768; + dw Common_Instruction_Sleep ;A99768; ;;; $976A: Instruction list - Mother Brain body - walking forwards - fast ;;; @@ -2939,7 +2357,7 @@ InstList_MotherBrainBody_WalkingForwards_Fast: dw Instruction_MotherBrainBody_MoveBodyUpBy2_LeftBy1_Footstep ;A9979A; dw Instruction_MotherBrainBody_SetPoseToStanding ;A9979C; dw $0004,ExtendedSpritemap_MotherBrainBody_Walking_7 ;A9979E; - dw Instruction_Common_Sleep ;A997A2; + dw Common_Instruction_Sleep ;A997A2; ;;; $97A4: Instruction list - Mother Brain body - walking forwards - medium ;;; @@ -2963,7 +2381,7 @@ InstList_MotherBrainBody_WalkingForwards_Medium: dw Instruction_MotherBrainBody_MoveBodyUpBy2_LeftBy1_Footstep ;A997D4; dw Instruction_MotherBrainBody_SetPoseToStanding ;A997D6; dw $0006,ExtendedSpritemap_MotherBrainBody_Walking_7 ;A997D8; - dw Instruction_Common_Sleep ;A997DC; + dw Common_Instruction_Sleep ;A997DC; ;;; $97DE: Instruction list - Mother Brain body - walking forwards - slow ;;; @@ -2987,7 +2405,7 @@ InstList_MotherBrainBody_WalkingForwards_Slow: dw Instruction_MotherBrainBody_MoveBodyUpBy2_LeftBy1_Footstep ;A9980E; dw Instruction_MotherBrainBody_SetPoseToStanding ;A99810; dw $0008,ExtendedSpritemap_MotherBrainBody_Walking_7 ;A99812; - dw Instruction_Common_Sleep ;A99816; + dw Common_Instruction_Sleep ;A99816; ;;; $9818: Instruction list - Mother Brain body - walking forwards - really slow ;;; @@ -3011,7 +2429,7 @@ InstList_MotherBrainBody_WalkingForwards_ReallySlow: dw Instruction_MotherBrainBody_MoveBodyUpBy2_LeftBy1_Footstep ;A99848; dw Instruction_MotherBrainBody_SetPoseToStanding ;A9984A; dw $000A,ExtendedSpritemap_MotherBrainBody_Walking_7 ;A9984C; - dw Instruction_Common_Sleep ;A99850; + dw Common_Instruction_Sleep ;A99850; ;;; $9852: Instruction list - Mother Brain body - walking backwards - slow ;;; @@ -3035,7 +2453,7 @@ InstList_MotherBrainBody_WalkingBackwards_Slow: dw Instruction_MotherBrainBody_MoveBodyUpBy2_LeftBy1_Footstep_duplicate ;A99882; dw Instruction_MotherBrainBody_SetPoseToStanding ;A99884; dw $0008,ExtendedSpritemap_MotherBrainBody_Standing ;A99886; - dw Instruction_Common_Sleep ;A9988A; + dw Common_Instruction_Sleep ;A9988A; ;;; $988C: Instruction list - Mother Brain body - walking backwards - really fast ;;; @@ -3059,7 +2477,7 @@ InstList_MotherBrainBody_WalkingBackwards_ReallyFast: dw Instruction_MotherBrainBody_MoveBodyUpBy2_LeftBy1_Footstep_duplicate ;A998BC; dw Instruction_MotherBrainBody_SetPoseToStanding ;A998BE; dw $0002,ExtendedSpritemap_MotherBrainBody_Standing ;A998C0; - dw Instruction_Common_Sleep ;A998C4; + dw Common_Instruction_Sleep ;A998C4; ;;; $98C6: Instruction list - Mother Brain body - walking backwards - fast ;;; @@ -3083,7 +2501,7 @@ InstList_MotherBrainBody_WalkingBackwards_Fast: dw Instruction_MotherBrainBody_MoveBodyUpBy2_LeftBy1_Footstep_duplicate ;A998F6; dw Instruction_MotherBrainBody_SetPoseToStanding ;A998F8; dw $0004,ExtendedSpritemap_MotherBrainBody_Standing ;A998FA; - dw Instruction_Common_Sleep ;A998FE; + dw Common_Instruction_Sleep ;A998FE; ;;; $9900: Instruction list - Mother Brain body - walking backwards - medium ;;; @@ -3107,7 +2525,7 @@ InstList_MotherBrainBody_WalkingBackwards_Medium: dw Instruction_MotherBrainBody_MoveBodyUpBy2_LeftBy1_Footstep_duplicate ;A99930; dw Instruction_MotherBrainBody_SetPoseToStanding ;A99932; dw $0006,ExtendedSpritemap_MotherBrainBody_Standing ;A99934; - dw Instruction_Common_Sleep ;A99938; + dw Common_Instruction_Sleep ;A99938; ;;; $993A: Instruction list - Mother Brain body - walking backwards - really slow ;;; @@ -3131,7 +2549,7 @@ InstList_MotherBrainBody_WalkingBackwards_ReallySlow: dw Instruction_MotherBrainBody_MoveBodyUpBy2_LeftBy1_Footstep_duplicate ;A9996A; dw Instruction_MotherBrainBody_SetPoseToStanding ;A9996C; dw $000A,ExtendedSpritemap_MotherBrainBody_Standing ;A9996E; - dw Instruction_Common_Sleep ;A99972; + dw Common_Instruction_Sleep ;A99972; ;;; $9974: Instruction list - Mother Brain body - crouch and then stand up ;;; @@ -3154,7 +2572,7 @@ InstList_MotherBrainBody_CrouchAndThenStandUp: dw Instruction_MotherBrainBody_MoveBodyUpBy12_ScrollRightBy2 ;A999A0; dw $0008,ExtendedSpritemap_MotherBrainBody_Standing ;A999A2; dw Instruction_MotherBrainBody_SetPoseToStanding ;A999A6; - dw Instruction_Common_Sleep ;A999A8; + dw Common_Instruction_Sleep ;A999A8; ;;; $99AA: Instruction list - Mother Brain body - standing up after crouching - slow ;;; @@ -3168,7 +2586,7 @@ InstList_MotherBrainBody_StandingUpAfterCrouching_Slow: dw Instruction_MotherBrainBody_MoveBodyUpBy12_ScrollRightBy2 ;A999BC; dw $0010,ExtendedSpritemap_MotherBrainBody_Standing ;A999BE; dw Instruction_MotherBrainBody_SetPoseToStanding ;A999C2; - dw Instruction_Common_Sleep ;A999C4; + dw Common_Instruction_Sleep ;A999C4; ;;; $99C6: Instruction list - Mother Brain body - standing up after crouching - fast ;;; @@ -3182,7 +2600,7 @@ InstList_MotherBrainBody_StandingUpAfterCrouching_Fast: dw Instruction_MotherBrainBody_MoveBodyUpBy12_ScrollRightBy2 ;A999D8; dw $0008,ExtendedSpritemap_MotherBrainBody_Standing ;A999DA; dw Instruction_MotherBrainBody_SetPoseToStanding ;A999DE; - dw Instruction_Common_Sleep ;A999E0; + dw Common_Instruction_Sleep ;A999E0; ;;; $99E2: Instruction list - Mother Brain body - standing up after leaning down ;;; @@ -3192,7 +2610,7 @@ InstList_MotherBrainBody_StandingUpAfterLeaningDown: dw Instruction_MotherBrainBody_MoveBodyUpBy12_ScrollRightBy2 ;A999E8; dw $0008,ExtendedSpritemap_MotherBrainBody_Standing ;A999EA; dw Instruction_MotherBrainBody_SetPoseToStanding ;A999EE; - dw Instruction_Common_Sleep ;A999F0; + dw Common_Instruction_Sleep ;A999F0; ;;; $99F2: Instruction list - Mother Brain body - leaning down ;;; @@ -3202,14 +2620,14 @@ InstList_MotherBrainBody_LeaningDown: dw Instruction_MotherBrainBody_MoveBodyDownBy12_ScrollLeftBy4 ;A999F8; dw Instruction_MotherBrainBody_SetPoseToLeaningDown ;A999FA; dw $0008,ExtendedSpritemap_MotherBrainBody_LeaningDown ;A999FC; - dw Instruction_Common_Sleep ;A99A00; + dw Common_Instruction_Sleep ;A99A00; ;;; $9A02: Instruction list - Mother Brain body - crouched ;;; InstList_MotherBrainBody_Crouched: dw Instruction_MotherBrainBody_SetPoseToCrouching ;A99A02; dw $0008,ExtendedSpritemap_MotherBrainBody_Crouched ;A99A04; - dw Instruction_Common_Sleep ;A99A08; + dw Common_Instruction_Sleep ;A99A08; ;;; $9A0A: Instruction list - Mother Brain body - crouch - slow ;;; @@ -3223,7 +2641,7 @@ InstList_MotherBrainBody_Crouch_Slow: dw Instruction_MotherBrainBody_MoveBodyDownBy10_ScrollRightBy2 ;A99A1C; dw Instruction_MotherBrainBody_SetPoseToCrouching ;A99A1E; dw $0008,ExtendedSpritemap_MotherBrainBody_Crouched ;A99A20; - dw Instruction_Common_Sleep ;A99A24; + dw Common_Instruction_Sleep ;A99A24; ;;; $9A26: Instruction list - Mother Brain body - crouch - fast ;;; @@ -3237,7 +2655,7 @@ InstList_MotherBrainBody_Crouch_Fast: dw Instruction_MotherBrainBody_MoveBodyDownBy10_ScrollRightBy2 ;A99A38; dw Instruction_MotherBrainBody_SetPoseToCrouching ;A99A3A; dw $0008,ExtendedSpritemap_MotherBrainBody_Crouched ;A99A3C; - dw Instruction_Common_Sleep ;A99A40; + dw Common_Instruction_Sleep ;A99A40; ;;; $9A42: Instruction list - Mother Brain body - death beam mode ;;; @@ -3277,7 +2695,7 @@ InstList_MotherBrainBody_DeathBeamMode: dw $00F0,ExtendedSpritemap_MotherBrainBody_Standing ;A99ABE; dw Instruction_MotherBrainBody_IncrementDeathBeamAttackPhase ;A99AC2; dw Instruction_MotherBrainBody_SetPoseToStanding ;A99AC4; - dw Instruction_Common_Sleep ;A99AC6; + dw Common_Instruction_Sleep ;A99AC6; ;;; $9AC8: Instruction - spawn enemy projectile $E509 to offset ([[Y]], [[Y] + 2]) with parameter [[Y] + 4] ;;; @@ -3481,7 +2899,7 @@ InstList_MotherBrainHead_HyperBeamRecoil_1: ;;; $9C13: Instruction list - Mother Brain body - initial (dummy) ;;; InstList_MotherBrainHead_InitialDummy: dw $0000,UNUSED_ExtendedSpritemap_MotherBrainBrain_A9A320 ;A99C13; - dw Instruction_Common_Sleep ;A99C17; + dw Common_Instruction_Sleep ;A99C17; if !FEATURE_KEEP_UNREFERENCED @@ -5915,7 +5333,7 @@ MotherBrainPart_vs_Samus_CollisionDetection: ;;; $B503: Enemy shot - enemy $EC7F (Mother Brain body) ;;; EnemyShot_MotherBrainBody: - JML.L CreateADudShot ;A9B503; fallthrough to EnemyShot_MotherBrainHead + JML.L CreateADudShot_Internal ;A9B503; fallthrough to EnemyShot_MotherBrainHead ;;; $B507: Enemy shot - enemy $EC3F (Mother Brain brain) ;;; @@ -5966,7 +5384,7 @@ EnemyShot_MotherBrainHead: LDA.L MotherBrainBody.form ;A9B551; CMP.W #$0001 ;A9B555; BNE .gotoNormalShotAI ;A9B558; - JML.L CreateADudShot ;A9B55A; + JML.L CreateADudShot_Internal ;A9B55A; .gotoNormalShotAI: JML.L NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic_External ;A9B55E; @@ -9737,7 +9155,7 @@ Instruction_BabyMetroid_GotoDrainingMotherBrain: ;;; $CFCE: Instruction list - Shitroid - took fatal blow ;;; InstList_BabyMetroid_TookFatalBlow: dw $0080,Spritemap_BabyMetroid_2 ;A9CFCE; - dw Instruction_Common_Sleep ;A9CFD2; + dw Common_Instruction_Sleep ;A9CFD2; ;;; $CFD4: Process Mother Brain invincibility palette ;;; @@ -10570,7 +9988,7 @@ Palette_CorpseTorizo: ;;; $D6DC: Instruction list - torizo corpse ;;; InstList_CorpseTorizo: dw $0001,Spritemaps_CorpseTorizo ;A9D6DC; - dw Instruction_Common_Sleep ;A9D6E0; + dw Common_Instruction_Sleep ;A9D6E0; ;;; $D6E2: Torizo corpse spritemaps ;;; @@ -13802,7 +13220,7 @@ InstList_CorpseSidehopper_Alive_Hopping: dw $0005,Spritemap_CorpseSidehopper_Alive_0 ;A9ECC4; dw $0004,Spritemap_CorpseSidehopper_Alive_1 ;A9ECC8; dw Instruction_SidehopperCorpse_EndHop ;A9ECCC; - dw Instruction_Common_Sleep ;A9ECCE; + dw Common_Instruction_Sleep ;A9ECCE; ;;; $ECD0: Instruction - end hop ;;; @@ -13823,67 +13241,67 @@ Instruction_SidehopperCorpse_EndHop: ;;; $ECE3: Instruction list - sidehopper corpse - alive - idle ;;; InstList_CorpseSidehopper_Alive_Idle: dw $0001,Spritemap_CorpseSidehopper_Alive_2 ;A9ECE3; - dw Instruction_Common_Sleep ;A9ECE7; + dw Common_Instruction_Sleep ;A9ECE7; ;;; $ECE9: Instruction list - sidehopper corpse - alive - corpse ;;; InstList_CorpseSidehopper_Alive_Corpse: dw $0001,Spritemap_CorpseSidehopper_Dead_0 ;A9ECE9; - dw Instruction_Common_Sleep ;A9ECED; + dw Common_Instruction_Sleep ;A9ECED; ;;; $ECEF: Instruction list - sidehopper corpse - dead ;;; InstList_CorpseSidehopper_Alive_Dead: dw $0001,Spritemap_CorpseSidehopper_Dead_1 ;A9ECEF; - dw Instruction_Common_Sleep ;A9ECF3; + dw Common_Instruction_Sleep ;A9ECF3; ;;; $ECF5: Instruction list - zoomer corpse - enemy parameter 1 = 0 ;;; InstList_CorpseZoomer_Param1_0: dw $0001,Spritemap_CorpseZoomer_0 ;A9ECF5; - dw Instruction_Common_Sleep ;A9ECF9; + dw Common_Instruction_Sleep ;A9ECF9; ;;; $ECFB: Instruction list - zoomer corpse - enemy parameter 1 = 2 ;;; InstList_CorpseZoomer_Param1_2: dw $0001,Spritemap_CorpseZoomer_1 ;A9ECFB; - dw Instruction_Common_Sleep ;A9ECFF; + dw Common_Instruction_Sleep ;A9ECFF; ;;; $ED01: Instruction list - zoomer corpse - enemy parameter 1 = 4 ;;; InstList_CorpseZoomer_Param1_4: dw $0001,Spritemap_CorpseZoomer_2 ;A9ED01; - dw Instruction_Common_Sleep ;A9ED05; + dw Common_Instruction_Sleep ;A9ED05; ;;; $ED07: Instruction list - ripper corpse - enemy parameter 1 = 0 ;;; InstList_CorpseRipper_Param1_0: dw $0001,Spritemap_CorpseRipper_0 ;A9ED07; - dw Instruction_Common_Sleep ;A9ED0B; + dw Common_Instruction_Sleep ;A9ED0B; ;;; $ED0D: Instruction list - ripper corpse - enemy parameter 1 = 2 ;;; InstList_CorpseRipper_Param1_2: dw $0001,Spritemap_CorpseRipper_1 ;A9ED0D; - dw Instruction_Common_Sleep ;A9ED11; + dw Common_Instruction_Sleep ;A9ED11; ;;; $ED13: Instruction list - skree corpse - enemy parameter 1 = 0 ;;; InstList_CorpseSkree_Param1_0: dw $0001,Spritemap_CorpseSkree_0 ;A9ED13; - dw Instruction_Common_Sleep ;A9ED17; + dw Common_Instruction_Sleep ;A9ED17; ;;; $ED19: Instruction list - skree corpse - enemy parameter 1 = 2 ;;; InstList_CorpseSkree_Param1_2: dw $0001,Spritemap_CorpseSkree_1 ;A9ED19; - dw Instruction_Common_Sleep ;A9ED1D; + dw Common_Instruction_Sleep ;A9ED1D; ;;; $ED1F: Instruction list - skree corpse - enemy parameter 1 = 4 ;;; InstList_CorpseSkree_Param1_4: dw $0001,Spritemap_CorpseSkree_2 ;A9ED1F; - dw Instruction_Common_Sleep ;A9ED23; + dw Common_Instruction_Sleep ;A9ED23; ;;; $ED25: Dead monster spritemaps ;;; diff --git a/src/bank_AA.asm b/src/bank_AA.asm index e90bbe9..d7d6caa 100644 --- a/src/bank_AA.asm +++ b/src/bank_AA.asm @@ -3,591 +3,9 @@ org $AA8000 ; Common to all enemy code banks - -;;; $8000: Grapple AI - no interaction. Also unfreezes enemies(!) ;;; -CommonAA_GrappleAI_NoInteraction: -; Used by skultera, Draygon body, fire arc, Phantoon, etecoon, dachora and WS ghost - JSL.L GrappleAI_SwitchEnemyAIToMainAI ;AA8000; - RTL ;AA8004; - - -;;; $8005: Grapple AI - Samus latches on ;;; -CommonAA_GrappleAI_SamusLatchesOn: -; Used by gripper and Crocomire - JSL.L GrappleAI_SamusLatchesOnWithGrapple ;AA8005; - RTL ;AA8009; - - -;;; $800A: Grapple AI - kill enemy ;;; -CommonAA_GrappleAI_KillEnemy: -; Common - JSL.L GrappleAI_EnemyGrappleDeath ;AA800A; - RTL ;AA800E; - - -;;; $800F: Grapple AI - cancel grapple beam ;;; -CommonAA_GrappleAI_CancelGrappleBeam: -; Common - JSL.L GrappleAI_SwitchToFrozenAI ;AA800F; - RTL ;AA8013; - - -;;; $8014: Grapple AI - Samus latches on - no invincibility ;;; -CommonAA_GrappleAI_SamusLatchesOn_NoInvincibility: -; Used by powamp - JSL.L GrappleAI_SamusLatchesOnWithGrapple_NoInvincibility ;AA8014; - RTL ;AA8018; - - -;;; $8019: Unused. Grapple AI - Samus latches on - paralyse enemy ;;; -UNUSED_CommonAA_GrappleAI_SamusLatchesOn_ParalyzeEnemy_AA8019: - JSL.L GrappleAI_SamusLatchesOnWithGrapple_ParalyzeEnemy ;AA8019; - RTL ;AA801D; - - -;;; $801E: Grapple AI - hurt Samus ;;; -CommonAA_GrappleAI_HurtSamus: -; Used by WS spark -; Hurt reaction happens in $9B:B932 - JSL.L GrappleAI_SwitchToFrozenAI_duplicate ;AA801E; - RTL ;AA8022; - - -;;; $8023: Normal enemy touch AI ;;; -CommonAA_NormalEnemyTouchAI: - JSL.L NormalEnemyTouchAI ;AA8023; - RTL ;AA8027; - - -;;; $8028: Normal touch AI - no death check ;;; -CommonAA_NormalTouchAI_NoDeathCheck: - JSL.L NormalEnemyTouchAI_NoDeathCheck_External ;AA8028; - RTL ;AA802C; - - -;;; $802D: Normal enemy shot AI ;;; -CommonAA_NormalEnemyShotAI: - JSL.L NormalEnemyShotAI ;AA802D; - RTL ;AA8031; - - -;;; $8032: Normal enemy shot AI - no death check, no enemy shot graphic ;;; -CommonAA_NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic: - JSL.L NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic_External ;AA8032; - RTL ;AA8036; - - -;;; $8037: Normal enemy power bomb AI ;;; -CommonAA_NormalEnemyPowerBombAI: - JSL.L NormalEnemyPowerBombAI ;AA8037; - RTL ;AA803B; - - -;;; $803C: Normal enemy power bomb AI - no death check ;;; -CommonAA_NormalEnemyPowerBombAI_NoDeathCheck: -; Kraid's power bomb AI - JSL.L NormalEnemyPowerBombAI_NoDeathCheck_External ;AA803C; - RTL ;AA8040; - - -;;; $8041: Normal enemy frozen AI ;;; -CommonAA_NormalEnemyFrozenAI: - JSL.L NormalEnemyFrozenAI ;AA8041; - RTL ;AA8045; - - -;;; $8046: Creates a dud shot ;;; -CommonAA_CreateADudShot: - JSL.L CreateADudShot ;AA8046; - RTL ;AA804A; - - -;;; $804B: RTS ;;; -RTS_AA804B: - RTS ;AA804B; - - -;;; $804C: RTL ;;; -RTL_AA804C: - RTL ;AA804C; - - -;;; $804D: Spritemap - nothing ;;; -Spritemap_CommonAA_Nothing: - dw $0000 ;AA804D; - - -;;; $804F: Extended spritemap - nothing ;;; -ExtendedSpritemap_CommonAA_Nothing: - dw $0001 ;AA804F; - dw $0000,$0000 - dw Spritemap_CommonAA_Nothing ;AA8055; - dw Hitbox_CommonAA_Nothing ;AA8057; - - -;;; $8059: Hitbox - nothing ;;; -Hitbox_CommonAA_Nothing: -; [n entries] [[left offset] [top offset] [right offset] [bottom offset] [p touch] [p shot]]... - dw $0001 ;AA8059; - dw $0000,$0000,$0000,$0000 - dw CommonAA_NormalEnemyTouchAI ;AA8063; - dw CommonAA_NormalEnemyShotAI ;AA8065; - - -;;; $8067: Instruction list - delete enemy ;;; -InstList_CommonAA_DeleteEnemy: - dw Instruction_CommonAA_DeleteEnemy ;AA8067; - - -;;; $8069: Two NOPs ;;; -NOPNOP_AA8069: -; Used as palette by respawning enemy placeholder and Draygon's eye o_O - NOP ;AA8069; - NOP ;AA806A; - - -;;; $806B: Instruction - Enemy.var5 = [[Y]] ;;; -Instruction_CommonAA_Enemy0FB2_InY: -; Used only by torizos (for enemy movement function) and escape etecoon (for enemy function) - LDA.W $0000,Y ;AA806B; - STA.W Enemy.var5,X ;AA806E; - INY ;AA8071; - INY ;AA8072; - RTL ;AA8073; - - -;;; $8074: Instruction - Enemy.var5 = RTS ;;; -Instruction_CommonAA_SetEnemy0FB2ToRTS: - LDA.W #RTS_AA807B ;AA8074; - STA.W Enemy.var5,X ;AA8077; - RTL ;AA807A; - - -RTS_AA807B: - RTS ;AA807B; - - -;;; $807C: Instruction - delete enemy ;;; -Instruction_CommonAA_DeleteEnemy: - LDA.W Enemy.properties,X ;AA807C; - ORA.W #$0200 ;AA807F; - STA.W Enemy.properties,X ;AA8082; - PLA ;AA8085; - PEA.W ProcessEnemyInstructions_return-1 ;AA8086; - RTL ;AA8089; - - -;;; $808A: Instruction - call function [[Y]] ;;; -Instruction_CommonAA_CallFunctionInY: - LDA.W $0000,Y ;AA808A; - STA.B DP_Temp12 ;AA808D; - PHY ;AA808F; - PHX ;AA8090; - PEA.W .manualReturn-1 ;AA8091; - JMP.W (DP_Temp12) ;AA8094; - - .manualReturn: - PLX ;AA8097; - PLY ;AA8098; - INY ;AA8099; - INY ;AA809A; - RTL ;AA809B; - - -;;; $809C: Instruction - call function [[Y]] with A = [[Y] + 2] ;;; -Instruction_CommonAA_CallFunctionInY_WithA: - LDA.W $0000,Y ;AA809C; - STA.B DP_Temp12 ;AA809F; - LDA.W $0002,Y ;AA80A1; - PHY ;AA80A4; - PHX ;AA80A5; - PEA.W .manualReturn-1 ;AA80A6; - JMP.W (DP_Temp12) ;AA80A9; - - .manualReturn: - PLX ;AA80AC; - PLY ;AA80AD; - TYA ;AA80AE; - CLC ;AA80AF; - ADC.W #$0004 ;AA80B0; - TAY ;AA80B3; - RTL ;AA80B4; - - -if !FEATURE_KEEP_UNREFERENCED -;;; $80B5: Unused. Instruction - call external function [[Y]] ;;; -UNUSED_Instruction_CommonAA_CallExternalFunctionInY_AA80B5: - LDA.W $0000,Y ;AA80B5; - STA.B DP_Temp12 ;AA80B8; - LDA.W $0001,Y ;AA80BA; - STA.B DP_Temp13 ;AA80BD; - PHX ;AA80BF; - PHY ;AA80C0; - JSL.L .externalFunction ;AA80C1; - PLY ;AA80C5; - PLX ;AA80C6; - INY ;AA80C7; - INY ;AA80C8; - INY ;AA80C9; - RTL ;AA80CA; - - .externalFunction: - JML.W [DP_Temp12] ;AA80CB; - - -;;; $80CE: Unused. Instruction - call external function [[Y]] with A = [[Y] + 3] ;;; -UNUSED_Inst_CommonAA_CallExternalFunctionInY_WithA_AA80CE: - LDA.W $0000,Y ;AA80CE; - STA.B DP_Temp12 ;AA80D1; - LDA.W $0001,Y ;AA80D3; - STA.B DP_Temp13 ;AA80D6; - LDA.W $0003,Y ;AA80D8; - PHX ;AA80DB; - PHY ;AA80DC; - JSL.L .externalFunction ;AA80DD; - PLY ;AA80E1; - PLX ;AA80E2; - TYA ;AA80E3; - CLC ;AA80E4; - ADC.W #$0005 ;AA80E5; - TAY ;AA80E8; - RTL ;AA80E9; - - .externalFunction: - JML.W [DP_Temp12] ;AA80EA; -endif ; !FEATURE_KEEP_UNREFERENCED - - -;;; $80ED: Instruction - go to [[Y]] ;;; -Instruction_CommonAA_GotoY: - LDA.W $0000,Y ;AA80ED; - TAY ;AA80F0; - RTL ;AA80F1; - - -;;; $80F2: Instruction - go to [[Y]] + ±[[Y]] ;;; -Instruction_CommonAA_GotoY_PlusY: - STY.B DP_Temp12 ;AA80F2; - DEY ;AA80F4; - LDA.W $0000,Y ;AA80F5; - XBA ;AA80F8; - BMI .highByte ;AA80F9; - AND.W #$00FF ;AA80FB; - BRA + ;AA80FE; - - .highByte: - ORA.W #$FF00 ;AA8100; - -+ CLC ;AA8103; - ADC.B DP_Temp12 ;AA8104; - TAY ;AA8106; - RTL ;AA8107; - - -;;; $8108: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonAA_DecrementTimer_GotoYIfNonZero: - DEC.W Enemy.loopCounter,X ;AA8108; - BNE Instruction_CommonAA_GotoY ;AA810B; - INY ;AA810D; - INY ;AA810E; - RTL ;AA810F; - - -;;; $8110: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonAA_DecrementTimer_GotoYIfNonZero_duplicate: - DEC.W Enemy.loopCounter,X ;AA8110; - BNE Instruction_CommonAA_GotoY ;AA8113; - INY ;AA8115; - INY ;AA8116; - RTL ;AA8117; - - -;;; $8118: Instruction - decrement timer and go to [Y] + ±[[Y]] if non-zero ;;; -Instruction_CommonAA_DecrementTimer_GotoY_PlusY_IfNonZero: - SEP #$20 ;AA8118; - DEC.W Enemy.loopCounter,X ;AA811A; - REP #$20 ;AA811D; - BNE Instruction_CommonAA_GotoY_PlusY ;AA811F; - INY ;AA8121; - RTL ;AA8122; - - -;;; $8123: Instruction - timer = [[Y]] ;;; -Instruction_CommonAA_TimerInY: - LDA.W $0000,Y ;AA8123; - STA.W Enemy.loopCounter,X ;AA8126; - INY ;AA8129; - INY ;AA812A; - RTL ;AA812B; - - -;;; $812C: Instruction - skip next instruction ;;; -Instruction_CommonAA_SkipNextInstruction: - INY ;AA812C; - INY ;AA812D; - RTL ;AA812E; - - -;;; $812F: Instruction - sleep ;;; -Instruction_CommonAA_Sleep: - DEY ;AA812F; - DEY ;AA8130; - TYA ;AA8131; - STA.W Enemy.instList,X ;AA8132; - PLA ;AA8135; - PEA.W ProcessEnemyInstructions_return-1 ;AA8136; - RTL ;AA8139; - - -;;; $813A: Instruction - wait [[Y]] frames ;;; -Instruction_CommonAA_WaitYFrames: -; Set instruction timer and terminate processing enemy instructions -; Used for running a delay that doesn't update graphics, -; useful for e.g. GT eye beam attack ($AA:D10D), implemented by an instruction list that has no graphical instructions, -; which allows it to be called from multiple different poses - LDA.W $0000,Y ;AA813A; - STA.W Enemy.instTimer,X ;AA813D; - INY ;AA8140; - INY ;AA8141; - TYA ;AA8142; - STA.W Enemy.instList,X ;AA8143; - PLA ;AA8146; - PEA.W ProcessEnemyInstructions_return-1 ;AA8147; - RTL ;AA814A; - - -;;; $814B: Instruction - transfer [[Y]] bytes from [[Y] + 2] to VRAM [[Y] + 5] ;;; -Instruction_CommonAA_TransferYBytesInYToVRAM: - PHX ;AA814B; - LDX.W VRAMWriteStack ;AA814C; - LDA.W $0000,Y ;AA814F; - STA.B VRAMWrite.size,X ;AA8152; - LDA.W $0002,Y ;AA8154; - STA.B VRAMWrite.src,X ;AA8157; - LDA.W $0003,Y ;AA8159; - STA.B VRAMWrite.src+1,X ;AA815C; - LDA.W $0005,Y ;AA815E; - STA.B VRAMWrite.dest,X ;AA8161; - TXA ;AA8163; - CLC ;AA8164; - ADC.W #$0007 ;AA8165; - STA.W VRAMWriteStack ;AA8168; - TYA ;AA816B; - CLC ;AA816C; - ADC.W #$0007 ;AA816D; - TAY ;AA8170; - PLX ;AA8171; - RTL ;AA8172; - - -;;; $8173: Instruction - enable off-screen processing ;;; -Instruction_CommonAA_EnableOffScreenProcessing: - LDA.W Enemy.properties,X ;AA8173; - ORA.W #$0800 ;AA8176; - STA.W Enemy.properties,X ;AA8179; - RTL ;AA817C; - - -;;; $817D: Instruction - disable off-screen processing ;;; -Instruction_CommonAA_DisableOffScreenProcessing: - LDA.W Enemy.properties,X ;AA817D; - AND.W #$F7FF ;AA8180; - STA.W Enemy.properties,X ;AA8183; - RTL ;AA8186; - - -;;; $8187: Common enemy speeds - linearly increasing ;;; -CommonAAEnemySpeeds_LinearlyIncreasing: -; _____________________ Speed -; | _______________ Subspeed -; | | _________ Negated speed -; | | | ___ Negated subspeed -; | | | | - .speed: - dw $0000 ;AA8187; - .subspeed: - dw $0000 ;AA8189; - .negatedSpeed: - dw $0000 ;AA818B; - .negatedSubspeed: - dw $0000 ;AA818D; - dw $0000,$1000,$FFFF,$F000 - dw $0000,$2000,$FFFF,$E000 - dw $0000,$3000,$FFFF,$D000 - dw $0000,$4000,$FFFF,$C000 - dw $0000,$5000,$FFFF,$B000 - dw $0000,$6000,$FFFF,$A000 - dw $0000,$7000,$FFFF,$9000 - dw $0000,$8000,$FFFF,$8000 - dw $0000,$9000,$FFFF,$7000 - dw $0000,$A000,$FFFF,$6000 - dw $0000,$B000,$FFFF,$5000 - dw $0000,$C000,$FFFF,$4000 - dw $0000,$D000,$FFFF,$3000 - dw $0000,$E000,$FFFF,$2000 - dw $0000,$F000,$FFFF,$1000 - dw $0001,$0000,$FFFF,$0000 - dw $0001,$1000,$FFFE,$F000 - dw $0001,$2000,$FFFE,$E000 - dw $0001,$3000,$FFFE,$D000 - dw $0001,$4000,$FFFE,$C000 - dw $0001,$5000,$FFFE,$B000 - dw $0001,$6000,$FFFE,$A000 - dw $0001,$7000,$FFFE,$9000 - dw $0001,$8000,$FFFE,$8000 - dw $0001,$9000,$FFFE,$7000 - dw $0001,$A000,$FFFE,$6000 - dw $0001,$B000,$FFFE,$5000 - dw $0001,$C000,$FFFE,$4000 - dw $0001,$D000,$FFFE,$3000 - dw $0001,$E000,$FFFE,$2000 - dw $0001,$F000,$FFFE,$1000 - dw $0002,$0000,$FFFE,$0000 - dw $0002,$1000,$FFFD,$F000 - dw $0002,$2000,$FFFD,$E000 - dw $0002,$3000,$FFFD,$D000 - dw $0002,$4000,$FFFD,$C000 - dw $0002,$5000,$FFFD,$B000 - dw $0002,$6000,$FFFD,$A000 - dw $0002,$7000,$FFFD,$9000 - dw $0002,$8000,$FFFD,$8000 - dw $0002,$9000,$FFFD,$7000 - dw $0002,$A000,$FFFD,$6000 - dw $0002,$B000,$FFFD,$5000 - dw $0002,$C000,$FFFD,$4000 - dw $0002,$D000,$FFFD,$3000 - dw $0002,$E000,$FFFD,$2000 - dw $0002,$F000,$FFFD,$1000 - dw $0003,$0000,$FFFD,$0000 - dw $0003,$1000,$FFFC,$F000 - dw $0003,$2000,$FFFC,$E000 - dw $0003,$3000,$FFFC,$D000 - dw $0003,$4000,$FFFC,$C000 - dw $0003,$5000,$FFFC,$B000 - dw $0003,$6000,$FFFC,$A000 - dw $0003,$7000,$FFFC,$9000 - dw $0003,$8000,$FFFC,$8000 - dw $0003,$9000,$FFFC,$7000 - dw $0003,$A000,$FFFC,$6000 - dw $0003,$B000,$FFFC,$5000 - dw $0003,$C000,$FFFC,$4000 - dw $0003,$D000,$FFFC,$3000 - dw $0003,$E000,$FFFC,$2000 - dw $0003,$F000,$FFFC,$1000 - dw $0004,$0000,$FFFC,$0000 - - -;;; $838F: Common enemy speeds - quadratically increasing ;;; -CommonAAEnemySpeeds_QuadraticallyIncreasing: -; I.e. gravity -; Used by e.g. Botwoon when dying and falling to the floor -; _____________________ Subspeed -; | _______________ Speed -; | | _________ Negated subspeed -; | | | ___ Negated speed -; | | | | - .subspeed: - dw $0000 ;AA838F; - .speed: - dw $0000 ;AA8391; - .negatedSubspeed: - dw $0000 ;AA8393; - .negatedSpeed: - dw $0000 ;AA8395; - dw $0109,$0000,$FEF7,$FFFF - dw $031B,$0000,$FCE5,$FFFF - dw $0636,$0000,$F9CA,$FFFF - dw $0A5A,$0000,$F5A6,$FFFF - dw $0F87,$0000,$F079,$FFFF - dw $15BD,$0000,$EA43,$FFFF - dw $1CFC,$0000,$E304,$FFFF - dw $2544,$0000,$DABC,$FFFF - dw $2E95,$0000,$D16B,$FFFF - dw $38EF,$0000,$C711,$FFFF - dw $4452,$0000,$BBAE,$FFFF - dw $50BE,$0000,$AF42,$FFFF - dw $5E33,$0000,$A1CD,$FFFF - dw $6CB1,$0000,$934F,$FFFF - dw $7C38,$0000,$83C8,$FFFF - dw $8CC8,$0000,$7338,$FFFF - dw $9E61,$0000,$619F,$FFFF - dw $B103,$0000,$4EFD,$FFFF - dw $C4AE,$0000,$3B52,$FFFF - dw $D962,$0000,$269E,$FFFF - dw $EF1F,$0000,$10E1,$FFFF - dw $05E5,$0000,$FA1B,$FFFF - dw $14B4,$0001,$EB4C,$FFFE - dw $2D8C,$0001,$D274,$FFFE - dw $476D,$0001,$B893,$FFFE - dw $6257,$0001,$9DA9,$FFFE - dw $7E4A,$0001,$81B6,$FFFE - dw $9B46,$0001,$64BA,$FFFE - dw $B94B,$0001,$46B5,$FFFE - dw $D859,$0001,$27A7,$FFFE - dw $F870,$0001,$0790,$FFFE - dw $1090,$0002,$EF70,$FFFD - dw $32B9,$0002,$CD47,$FFFD - dw $55EB,$0002,$AA15,$FFFD - dw $7A26,$0002,$85DA,$FFFD - dw $9F6A,$0002,$6096,$FFFD - dw $C5B7,$0002,$3A49,$FFFD - dw $ED0D,$0002,$12F3,$FFFD - dw $0C6C,$0003,$F394,$FFFC - dw $35D4,$0003,$CA2C,$FFFC - dw $6045,$0003,$9FBB,$FFFC - dw $8BBF,$0003,$7441,$FFFC - dw $B842,$0003,$47BE,$FFFC - dw $E5CE,$0003,$1A32,$FFFC - dw $0B63,$0004,$F49D,$FFFB - dw $3B01,$0004,$C4FF,$FFFB - dw $6BA8,$0004,$9458,$FFFB - dw $9D58,$0004,$62A8,$FFFB - dw $D011,$0004,$2FEF,$FFFB - dw $03D3,$0004,$FC2D,$FFFB - dw $2F9E,$0005,$D062,$FFFA - dw $6572,$0005,$9A8E,$FFFA - dw $9C4F,$0005,$63B1,$FFFA - dw $D435,$0005,$2BCB,$FFFA - dw $0424,$0006,$FBDC,$FFF9 - dw $3E1C,$0006,$C1E4,$FFF9 - dw $791D,$0006,$86E3,$FFF9 - dw $B527,$0006,$4AD9,$FFF9 - dw $F23A,$0006,$0DC6,$FFF9 - dw $2756,$0007,$D8AA,$FFF8 - dw $667B,$0007,$9985,$FFF8 - dw $A6A9,$0007,$5957,$FFF8 - dw $E7E0,$0007,$1820,$FFF8 - dw $2120,$0008,$DEE0,$FFF7 - dw $6469,$0008,$9B97,$FFF7 - dw $A8BB,$0008,$5745,$FFF7 - dw $EE16,$0008,$11EA,$FFF7 - dw $2B7A,$0009,$D486,$FFF6 - dw $72E7,$0009,$8D19,$FFF6 - dw $BB5D,$0009,$44A3,$FFF6 - dw $04DC,$0009,$FB24,$FFF6 - dw $4664,$000A,$B99C,$FFF5 - dw $91F5,$000A,$6E0B,$FFF5 - dw $DE8F,$000A,$2171,$FFF5 - dw $2332,$000B,$DCCE,$FFF4 - dw $71DE,$000B,$8E22,$FFF4 - dw $C193,$000B,$3E6D,$FFF4 - dw $0951,$000C,$F6AF,$FFF3 - dw $5B18,$000C,$A4E8,$FFF3 - dw $ADE8,$000C,$5218,$FFF3 - dw $01C1,$000C,$FE3F,$FFF3 - dw $4DA3,$000D,$B25D,$FFF2 - dw $A38E,$000D,$5C72,$FFF2 - dw $FA82,$000D,$057E,$FFF2 - dw $497F,$000E,$B681,$FFF1 - dw $A285,$000E,$5D7B,$FFF1 - dw $FC94,$000E,$036C,$FFF1 - dw $4EAC,$000F,$B154,$FFF0 - dw $AACD,$000F,$5533,$FFF0 - dw $07F7,$000F,$F809,$FFF0 - dw $5D2A,$0010,$A2D6,$FFEF - dw $BC66,$0010,$439A,$FFEF - dw $13AB,$0011,$EC55,$FFEE - dw $74F9,$0011,$8B07,$FFEE +namespace CommonAA +incsrc "common_enemy_functions.asm" +namespace off ;;; $8687: Torizo palettes ;;; @@ -4112,13 +3530,13 @@ InstList_Torizo_SpecialCallable_BlowUpBombTorizosGut: dw Instruction_Torizo_SetAnimationLock ;AAB0E9; dw Instruction_Torizo_Spawn5LowHealthExplosion_SleepFor28Frames,$0000 ;AAB0EB; dw Instruction_Torizo_MarkBTGutBlownUp_Spawn6BTDroolProjectiles ;AAB0EF; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB0F1; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB0F1; dw $0040 : dl Tiles_Torizo+$200 : dw $7300 ;AAB0F3; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB0FA; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB0FA; dw $0040 : dl Tiles_Torizo+$400 : dw $7400 ;AAB0FC; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB103; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB103; dw $0020 : dl Tiles_Torizo+$240 : dw $7E70 ;AAB105; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB10C; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB10C; dw $0020 : dl Tiles_Torizo+$440 : dw $7F70 ;AAB10E; dw Instruction_Torizo_FunctionInY ;AAB115; dw Function_Torizo_NormalMovement ;AAB117; @@ -4157,24 +3575,24 @@ InstList_Torizo_Callable_BlowUpBombTorizosFace: dw Instruction_Torizo_SetAnimationLock ;AAB159; dw Instruction_Torizo_Spawn5LowHealthExplosion_SleepFor28Frames,$0006 ;AAB15B; dw Instruction_Torizo_MarkBombTorizoFaceBlownUp ;AAB15F; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB161; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB161; dw $0020 : dl Tiles_Torizo+$260 : dw $7E50 ;AAB163; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB16A; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB16A; dw $0020 : dl Tiles_Torizo+$460 : dw $7F50 ;AAB16C; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB173; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB173; dw $0040 : dl Tiles_Blank : dw $7C80 ;AAB175; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB17C; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB17C; dw $0040 : dl Tiles_Blank : dw $7CA0 ;AAB17E; - dw Instruction_Common_WaitYFrames,$0001 ;AAB185; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB189; + dw Common_Instruction_WaitYFrames,$0001 ;AAB185; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB189; dw $0040 : dl Tiles_Blank : dw $7D80 ;AAB18B; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB192; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB192; dw $0040 : dl Tiles_Blank : dw $7DA0 ;AAB194; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB19B; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB19B; dw $0040 : dl Tiles_Blank : dw $7E80 ;AAB19D; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB1A4; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB1A4; dw $0040 : dl Tiles_Blank : dw $7F80 ;AAB1A6; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB1AD; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB1AD; dw $0020 : dl Tiles_Blank : dw $79F0 ;AAB1AF; dw Instruction_Torizo_FunctionInY ;AAB1B6; dw Function_Torizo_NormalMovement ;AAB1B8; @@ -4195,41 +3613,41 @@ InstList_Torizo_DeathSequence_0: dw Instruction_Torizo_FunctionInY ;AAB1C8; dw RTS_AAC6AB ;AAB1CA; dw Instruction_Torizo_SetAnimationLock ;AAB1CC; - dw Instruction_Common_TimerInY,$0008 ;AAB1CE; + dw Common_Instruction_TimerInY,$0008 ;AAB1CE; InstList_Torizo_DeathSequence_1: dw Instruction_Torizo_SpawnTorizoDeathExplosion_SleepFor1IFrame ;AAB1D2; - dw Instruction_Common_WaitYFrames,$0006 ;AAB1D4; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AAB1D8; + dw Common_Instruction_WaitYFrames,$0006 ;AAB1D4; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AAB1D8; dw InstList_Torizo_DeathSequence_1 ;AAB1DA; dw Instruction_Torizo_SetupPaletteTransitionToBlack ;AAB1DC; - dw Instruction_Common_TimerInY,$000E ;AAB1DE; + dw Common_Instruction_TimerInY,$000E ;AAB1DE; InstList_Torizo_DeathSequence_2: dw Instruction_Torizo_SpawnTorizoDeathExplosion_SleepFor1IFrame ;AAB1E2; dw Instruction_Torizo_SetAsVisible ;AAB1E4; - dw Instruction_Common_WaitYFrames,$0002 ;AAB1E6; + dw Common_Instruction_WaitYFrames,$0002 ;AAB1E6; dw Instruction_Torizo_SetAsInvisible ;AAB1EA; - dw Instruction_Common_WaitYFrames,$0002 ;AAB1EC; + dw Common_Instruction_WaitYFrames,$0002 ;AAB1EC; dw Instruction_Torizo_SpawnTorizoDeathExplosion_SleepFor1IFrame ;AAB1F0; dw Instruction_Torizo_SetAsVisible ;AAB1F2; - dw Instruction_Common_WaitYFrames,$0002 ;AAB1F4; + dw Common_Instruction_WaitYFrames,$0002 ;AAB1F4; dw Instruction_Torizo_SetAsInvisible ;AAB1F8; - dw Instruction_Common_WaitYFrames,$0002 ;AAB1FA; + dw Common_Instruction_WaitYFrames,$0002 ;AAB1FA; dw Instruction_Torizo_SetAsVisible ;AAB1FE; - dw Instruction_Common_WaitYFrames,$0002 ;AAB200; + dw Common_Instruction_WaitYFrames,$0002 ;AAB200; dw Instruction_Torizo_SetAsInvisible ;AAB204; - dw Instruction_Common_WaitYFrames,$0002 ;AAB206; + dw Common_Instruction_WaitYFrames,$0002 ;AAB206; dw Instruction_Torizo_SetAsVisible ;AAB20A; - dw Instruction_Common_WaitYFrames,$0002 ;AAB20C; + dw Common_Instruction_WaitYFrames,$0002 ;AAB20C; dw Instruction_Torizo_SetAsInvisible ;AAB210; - dw Instruction_Common_WaitYFrames,$0002 ;AAB212; + dw Common_Instruction_WaitYFrames,$0002 ;AAB212; dw Instruction_Torizo_AdvanceGradualColorChange ;AAB216; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AAB218; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AAB218; dw InstList_Torizo_DeathSequence_2 ;AAB21A; - dw Instruction_Common_WaitYFrames,$0040 ;AAB21C; + dw Common_Instruction_WaitYFrames,$0040 ;AAB21C; dw Instruction_Torizo_SetBossBit_QueueElevatorMusic_SpawnDrops ;AAB220; - dw Instruction_Common_DeleteEnemy ;AAB222; + dw Common_Instruction_DeleteEnemy ;AAB222; ;;; $B224: Instruction - set enemy as visible ;;; @@ -4312,38 +3730,38 @@ InstList_Torizo_BombTorizo_Initial_0: dw $0001,ExtendedSpritemap_Torizo_Blank ;AAB87D; dw Instruction_Torizo_FunctionInY ;AAB881; dw Function_Torizo_WakeWhenBombTorizoChozoFinishesCrumbling ;AAB883; - dw Instruction_Common_Sleep ;AAB885; + dw Common_Instruction_Sleep ;AAB885; dw Instruction_Torizo_FunctionInY ;AAB887; dw Function_Torizo_SimpleMovement ;AAB889; dw $0030,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AAB88B; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB88F; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB88F; dw $0040 : dl Tiles_Torizo : dw $7D80 ;AAB891; dw $0020,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AAB896; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB89C; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB89C; dw $0040 : dl Tiles_Torizo+$40 : dw $7D80 ;AAB89E; dw $0010,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AAB8A3; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB8A9; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB8A9; dw $0040 : dl Tiles_Torizo+$80 : dw $7D80 ;AAB8AB; dw $0008,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AAB8B0; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB8B6; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB8B6; dw $0040 : dl Tiles_Torizo+$C0 : dw $7D80 ;AAB8B8; dw $0020,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AAB8BD; - dw Instruction_Common_TimerInY,$0002 ;AAB8C3; + dw Common_Instruction_TimerInY,$0002 ;AAB8C3; InstList_Torizo_BombTorizo_Initial_1: dw $0004,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AAB8C7; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB8CB; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB8CB; dw $0040 : dl Tiles_Torizo : dw $7D80 ;AAB8CD; dw $0004,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AAB8D6; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB8D8; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB8D8; dw $0040 : dl Tiles_Torizo+$40 : dw $7D80 ;AAB8DA; dw $0004,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AAB8E3; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB8E5; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB8E5; dw $0040 : dl Tiles_Torizo+$80 : dw $7D80 ;AAB8E7; dw $0004,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AAB8F0; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAB8F2; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAB8F2; dw $0040 : dl Tiles_Torizo+$C0 : dw $7D80 ;AAB8F4; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AAB8FB; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AAB8FB; dw InstList_Torizo_BombTorizo_Initial_1 ;AAB8FD; dw $0030,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AAB8FF; dw Instruction_Torizo_StandingUpMovement_IndexInY,$0000 ;AAB903; @@ -4358,18 +3776,18 @@ InstList_Torizo_BombTorizo_Initial_1: dw $0008,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_5 ;AAB925; dw Instruction_Torizo_StandingUpMovement_IndexInY,$000A ;AAB92B; dw Instruction_Torizo_SetupPaletteTransitionToNormalTorizo ;AAB92F; - dw Instruction_Common_TimerInY,$0010 ;AAB931; + dw Common_Instruction_TimerInY,$0010 ;AAB931; InstList_Torizo_BombTorizo_Initial_2: dw $0004,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_6 ;AAB935; dw Instruction_Torizo_AdvanceGradualColorChange ;AAB939; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AAB93B; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AAB93B; dw InstList_Torizo_BombTorizo_Initial_2 ;AAB93D; dw RTL_AAC2C8 ;AAB93F; dw Instruction_Torizo_ClearAnimationLock ;AAB941; dw Instruction_Torizo_StartFightMusic_BombTorizoBellyPaletteFX ;AAB943; dw $0010,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_6 ;AAB945; - dw Instruction_Common_GotoY ;AAB949; + dw Common_Instruction_GotoY ;AAB949; dw InstList_Torizo_FacingLeft_Walking_LeftLegMoving ;AAB94B; @@ -4403,7 +3821,7 @@ InstList_Torizo_FacingLeft_Walking_RightLegMoving: dw Instruction_Torizo_SetSteppedLeftWithLeftFootState ;AAB96C; dw Instruction_Torizo_FunctionInY ;AAB96E; dw Function_Torizo_NormalMovement ;AAB970; - dw Instruction_Common_Enemy0FB2_InY ;AAB972; + dw Common_Instruction_Enemy0FB2_InY ;AAB972; dw Function_Torizo_Movement_Walking ;AAB974; dw Instruction_Torizo_SpawnLowHealthInitialDroolIfHealthIsLow ;AAB976; dw Instruction_Torizo_PlayTorizoFootstepsSFX ;AAB978; @@ -4434,7 +3852,7 @@ InstList_Torizo_FacingLeft_Walking_LeftLegMoving: dw Instruction_Torizo_SetSteppedLeftWithRightFootState ;AAB9B6; dw Instruction_Torizo_FunctionInY ;AAB9B8; dw Function_Torizo_NormalMovement ;AAB9BA; - dw Instruction_Common_Enemy0FB2_InY ;AAB9BC; + dw Common_Instruction_Enemy0FB2_InY ;AAB9BC; dw Function_Torizo_Movement_Walking ;AAB9BE; dw Instruction_Torizo_SpawnLowHealthInitialDroolIfHealthIsLow ;AAB9C0; dw Instruction_Torizo_PlayTorizoFootstepsSFX ;AAB9C2; @@ -4458,13 +3876,13 @@ InstList_Torizo_FacingLeft_Walking_LeftLegMoving: dw Instruction_Torizo_BombTorizoWalkingMovement_Normal_IndexInY,$0012 ;AAB9F4; dw $0006,ExtendedSpritemaps_Torizo_WalkingLeft_LeftLegMoving_4 ;AAB9F6; dw Instruction_Torizo_BombTorizoWalkingMovement_Normal_IndexInY,$0000 ;AAB9FC; - dw Instruction_Common_GotoY ;AABA00; + dw Common_Instruction_GotoY ;AABA00; dw InstList_Torizo_FacingLeft_Walking_RightLegMoving ;AABA02; ;;; $BA04: Instruction list - callable - spewing chozo orbs - facing left - right foot forward ;;; InstList_Torizo_FacingLeft_SpewingChozoOrbs_RightFootFwd_0: - dw Instruction_Common_Enemy0FB2_InY ;AABA04; + dw Common_Instruction_Enemy0FB2_InY ;AABA04; dw Function_Torizo_Movement_Attacking ;AABA06; dw $0010,ExtendedSpritemaps_Torizo_Attacks_FaceLeft_RightFootForward ;AABA08; dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_RightFootForward_0 ;AABA0C; @@ -4473,25 +3891,25 @@ InstList_Torizo_FacingLeft_SpewingChozoOrbs_RightFootFwd_0: dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_RightFootForward_3 ;AABA18; dw $0010,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_RightFootForward_4 ;AABA1C; dw Instruction_Torizo_PlayShotTorizoSFX ;AABA20; - dw Instruction_Common_TimerInY,$0003 ;AABA22; + dw Common_Instruction_TimerInY,$0003 ;AABA22; InstList_Torizo_FacingLeft_SpewingChozoOrbs_RightFootFwd_1: dw Instruction_Torizo_SpawnBombTorizosChozoOrbs ;AABA26; - dw Instruction_Common_WaitYFrames,$0010 ;AABA28; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AABA2C; + dw Common_Instruction_WaitYFrames,$0010 ;AABA28; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AABA2C; dw InstList_Torizo_FacingLeft_SpewingChozoOrbs_RightFootFwd_1 ;AABA2E; dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_RightFootForward_3 ;AABA30; dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_RightFootForward_2 ;AABA34; dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_RightFootForward_1 ;AABA38; dw $0048,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_RightFootForward_0 ;AABA3C; - dw Instruction_Common_Enemy0FB2_InY ;AABA40; + dw Common_Instruction_Enemy0FB2_InY ;AABA40; dw Function_Torizo_Movement_Walking ;AABA42; dw Instruction_Torizo_Return ;AABA44; ;;; $BA46: Instruction list - callable - spewing chozo orbs - facing left - left foot forward ;;; InstList_Torizo_FacingLeft_SpewingChozoOrbs_LeftFootFwd_0: - dw Instruction_Common_Enemy0FB2_InY ;AABA46; + dw Common_Instruction_Enemy0FB2_InY ;AABA46; dw Function_Torizo_Movement_Attacking ;AABA48; dw $0010,ExtendedSpritemaps_Torizo_Attacks_FaceLeft_LeftFootForward ;AABA4A; dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_LeftFootForward_0 ;AABA4E; @@ -4500,27 +3918,27 @@ InstList_Torizo_FacingLeft_SpewingChozoOrbs_LeftFootFwd_0: dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_LeftFootForward_3 ;AABA5A; dw $0010,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_LeftFootForward_4 ;AABA5E; dw Instruction_Torizo_PlayShotTorizoSFX ;AABA62; - dw Instruction_Common_TimerInY,$0003 ;AABA64; + dw Common_Instruction_TimerInY,$0003 ;AABA64; InstList_Torizo_FacingLeft_SpewingChozoOrbs_LeftFootFwd_1: dw Instruction_Torizo_SpawnBombTorizosChozoOrbs ;AABA68; - dw Instruction_Common_WaitYFrames,$0010 ;AABA6A; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AABA6E; + dw Common_Instruction_WaitYFrames,$0010 ;AABA6A; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AABA6E; dw InstList_Torizo_FacingLeft_SpewingChozoOrbs_LeftFootFwd_1 ;AABA70; dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_LeftFootForward_3 ;AABA72; dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_LeftFootForward_2 ;AABA76; dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_LeftFootForward_1 ;AABA7A; dw $0048,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_LeftFootForward_0 ;AABA7E; - dw Instruction_Common_Enemy0FB2_InY ;AABA82; + dw Common_Instruction_Enemy0FB2_InY ;AABA82; dw Function_Torizo_Movement_Walking ;AABA84; dw Instruction_Torizo_Return ;AABA86; ;;; $BA88: Instruction list - callable - sonic booms - facing left - right foot forward ;;; InstList_Torizo_FacingLeft_SonicBooms_RightFootForward_0: - dw Instruction_Common_Enemy0FB2_InY ;AABA88; + dw Common_Instruction_Enemy0FB2_InY ;AABA88; dw Function_Torizo_Movement_Attacking ;AABA8A; - dw Instruction_Common_TimerInY,$0004 ;AABA8C; + dw Common_Instruction_TimerInY,$0004 ;AABA8C; InstList_Torizo_FacingLeft_SonicBooms_RightFootForward_1: dw $0006,ExtendedSpritemaps_Torizo_Attacks_FaceLeft_RightFootForward ;AABA90; @@ -4545,18 +3963,18 @@ InstList_Torizo_FacingLeft_SonicBooms_RightFootForward_1: dw Instruction_Torizo_SpawnBombTorizoSonicBoomWithParameterY,$0001 ;AABADC; dw $0002,ExtSpritemap_Torizo_NonOrbAttack_FaceLeft_RightFootForward_0 ;AABADE; dw $0038,ExtSpritemap_Torizo_NonOrbAttacks_FaceLeft_LeftFootForward_5 ;AABAE4; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AABAE8; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AABAE8; dw InstList_Torizo_FacingLeft_SonicBooms_RightFootForward_1 ;AABAEA; - dw Instruction_Common_Enemy0FB2_InY ;AABAEC; + dw Common_Instruction_Enemy0FB2_InY ;AABAEC; dw Function_Torizo_Movement_Walking ;AABAEE; dw Instruction_Torizo_Return ;AABAF0; ;;; $BAF2: Instruction list - callable - sonic booms - facing left - left foot forward ;;; InstList_Torizo_FacingLeft_SonicBooms_LeftFootForward_0: - dw Instruction_Common_Enemy0FB2_InY ;AABAF2; + dw Common_Instruction_Enemy0FB2_InY ;AABAF2; dw Function_Torizo_Movement_Attacking ;AABAF4; - dw Instruction_Common_TimerInY,$0004 ;AABAF6; + dw Common_Instruction_TimerInY,$0004 ;AABAF6; InstList_Torizo_FacingLeft_SonicBooms_LeftFootForward_1: dw $0006,ExtendedSpritemaps_Torizo_Attacks_FaceLeft_LeftFootForward ;AABAFA; @@ -4581,16 +3999,16 @@ InstList_Torizo_FacingLeft_SonicBooms_LeftFootForward_1: dw Instruction_Torizo_SpawnBombTorizoSonicBoomWithParameterY,$0001 ;AABB46; dw $0002,ExtSpritemap_Torizo_SonicBoom_Swipe_FaceLeft_LeftFootFwd_0 ;AABB4A; dw $0038,ExtSpritemap_Torizo_NonOrbAttack_FaceLeft_LeftFootForward_5 ;AABB4E; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AABB52; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AABB52; dw InstList_Torizo_FacingLeft_SonicBooms_LeftFootForward_1 ;AABB54; - dw Instruction_Common_Enemy0FB2_InY ;AABB56; + dw Common_Instruction_Enemy0FB2_InY ;AABB56; dw Function_Torizo_Movement_Walking ;AABB58; dw Instruction_Torizo_Return ;AABB5A; ;;; $BB5C: Instruction list - callable - explosive swipe - facing left - right foot forward ;;; InstList_Torizo_FacingLeft_ExplosiveSwipe_RightFootForward: - dw Instruction_Common_Enemy0FB2_InY ;AABB5C; + dw Common_Instruction_Enemy0FB2_InY ;AABB5C; dw Function_Torizo_Movement_Attacking ;AABB5E; dw $0003,ExtendedSpritemaps_Torizo_Attacks_FaceLeft_RightFootForward ;AABB60; dw $0003,ExtSpritemap_Torizo_NonOrbAttacks_FaceLeft_LeftFootForward_0 ;AABB64; @@ -4622,14 +4040,14 @@ InstList_Torizo_FacingLeft_ExplosiveSwipe_RightFootForward: dw Instruction_Torizo_SpawnBombTorizoExplosiveSwipeWithParamY,$0012 ;AABBCC; dw $0001,ExtSpritemap_Torizo_NonOrbAttack_FaceLeft_RightFootForward_0 ;AABBCE; dw $0010,ExtSpritemap_Torizo_NonOrbAttacks_FaceLeft_LeftFootForward_5 ;AABBD4; - dw Instruction_Common_Enemy0FB2_InY ;AABBD8; + dw Common_Instruction_Enemy0FB2_InY ;AABBD8; dw Function_Torizo_Movement_Walking ;AABBDA; dw Instruction_Torizo_Return ;AABBDC; ;;; $BBDE: Instruction list - callable - explosive swipe - facing left - left foot forward ;;; InstList_Torizo_FacingLeft_ExplosiveSwipe_LeftFootForward: - dw Instruction_Common_Enemy0FB2_InY ;AABBDE; + dw Common_Instruction_Enemy0FB2_InY ;AABBDE; dw Function_Torizo_Movement_Attacking ;AABBE0; dw $0003,ExtendedSpritemaps_Torizo_Attacks_FaceLeft_LeftFootForward ;AABBE2; dw $0003,ExtSpritemap_Torizo_NonOrbAttack_FaceLeft_LeftFootForward_0 ;AABBE6; @@ -4661,14 +4079,14 @@ InstList_Torizo_FacingLeft_ExplosiveSwipe_LeftFootForward: dw Instruction_Torizo_SpawnBombTorizoExplosiveSwipeWithParamY,$0012 ;AABC4E; dw $0001,ExtSpritemap_Torizo_SonicBoom_Swipe_FaceLeft_LeftFootFwd_0 ;AABC50; dw $0010,ExtSpritemap_Torizo_NonOrbAttack_FaceLeft_LeftFootForward_5 ;AABC56; - dw Instruction_Common_Enemy0FB2_InY ;AABC5A; + dw Common_Instruction_Enemy0FB2_InY ;AABC5A; dw Function_Torizo_Movement_Walking ;AABC5C; dw Instruction_Torizo_Return ;AABC5E; ;;; $BC60: Instruction list - jumping forwards - facing left ;;; InstList_Torizo_FacingLeft_JumpingForwards_0: - dw Instruction_Common_Enemy0FB2_InY ;AABC60; + dw Common_Instruction_Enemy0FB2_InY ;AABC60; dw Function_Torizo_Movement_Jumping_Falling ;AABC62; dw Instruction_Torizo_LinkInstructionInY ;AABC64; dw InstList_Torizo_FacingLeft_Falling_0 ;AABC66; @@ -4683,14 +4101,14 @@ InstList_Torizo_FacingLeft_JumpingForwards_1: ;;; $BC78: Instruction list - falling - facing left ;;; InstList_Torizo_FacingLeft_Falling_0: - dw Instruction_Common_Enemy0FB2_InY ;AABC78; + dw Common_Instruction_Enemy0FB2_InY ;AABC78; dw Function_Torizo_Movement_Jumping_Falling ;AABC7A; dw Instruction_Torizo_LinkInstructionInY ;AABC7C; dw InstList_Torizo_FacingLeft_Falling_2 ;AABC7E; InstList_Torizo_FacingLeft_Falling_1: dw $0005,ExtendedSpritemaps_Torizo_Jumping_Falling_FacingLeft_1 ;AABC80; - dw Instruction_Common_GotoY ;AABC84; + dw Common_Instruction_GotoY ;AABC84; dw InstList_Torizo_FacingLeft_Falling_1 ;AABC86; InstList_Torizo_FacingLeft_Falling_2: @@ -4699,13 +4117,13 @@ InstList_Torizo_FacingLeft_Falling_2: dw Instruction_Torizo_GotoY_IfFaceBlownUp_ElseGotoY2_IfGolden ;AABC8C; dw InstList_Torizo_FacingLeft_Faceless_Walking_LeftLegMoving ;AABC8E; dw InstList_GoldenTorizo_WalkingLeft_LeftLegMoving ;AABC90; - dw Instruction_Common_GotoY ;AABC92; + dw Common_Instruction_GotoY ;AABC92; dw InstList_Torizo_FacingLeft_Walking_LeftLegMoving ;AABC94; ;;; $BC96: Instruction list - jumping backwards - facing left - landing left foot forward ;;; InstList_Torizo_FacingLeft_JumpingBackward_LandLeftFootFwd_0: - dw Instruction_Common_Enemy0FB2_InY ;AABC96; + dw Common_Instruction_Enemy0FB2_InY ;AABC96; dw Function_Torizo_Movement_Jumping_Falling ;AABC98; dw Instruction_Torizo_LinkInstructionInY ;AABC9A; dw InstList_Torizo_FacingLeft_JumpingBackward_LandLeftFootFwd_2 ;AABC9C; @@ -4718,14 +4136,14 @@ InstList_Torizo_FacingLeft_JumpingBackward_LandLeftFootFwd_1: dw InstList_Torizo_FacingLeft_JumpingBackward_LandLeftFootFwd_1 ;AABCAC; InstList_Torizo_FacingLeft_JumpingBackward_LandLeftFootFwd_2: - dw Instruction_Common_Enemy0FB2_InY ;AABCAE; + dw Common_Instruction_Enemy0FB2_InY ;AABCAE; dw Function_Torizo_Movement_Jumping_Falling ;AABCB0; dw Instruction_Torizo_LinkInstructionInY ;AABCB2; dw InstList_Torizo_FacingLeft_JumpingBackward_LandLeftFootFwd_4 ;AABCB4; InstList_Torizo_FacingLeft_JumpingBackward_LandLeftFootFwd_3: dw $0005,ExtendedSpritemaps_Torizo_Jumping_Falling_FacingLeft_1 ;AABCB6; - dw Instruction_Common_GotoY ;AABCBA; + dw Common_Instruction_GotoY ;AABCBA; dw InstList_Torizo_FacingLeft_JumpingBackward_LandLeftFootFwd_3 ;AABCBC; InstList_Torizo_FacingLeft_JumpingBackward_LandLeftFootFwd_4: @@ -4737,13 +4155,13 @@ InstList_Torizo_FacingLeft_JumpingBackward_LandLeftFootFwd_4: dw Instruction_Torizo_CallY_OrY2_ForBombTorizoAttack ;AABCC8; dw InstList_Torizo_FacingLeft_SpewingChozoOrbs_LeftFootFwd_0 ;AABCCA; dw InstList_Torizo_FacingLeft_SonicBooms_LeftFootForward_0 ;AABCCC; - dw Instruction_Common_GotoY ;AABCCE; + dw Common_Instruction_GotoY ;AABCCE; dw InstList_Torizo_FacingLeft_Walking_RightLegMoving ;AABCD0; ;;; $BCD2: Instruction list - jumping backwards - facing left - landing right foot forward ;;; InstList_Torizo_FacingLeft_JumpingBackward_RightFootFwd_0: - dw Instruction_Common_Enemy0FB2_InY ;AABCD2; + dw Common_Instruction_Enemy0FB2_InY ;AABCD2; dw Function_Torizo_Movement_Jumping_Falling ;AABCD4; dw Instruction_Torizo_LinkInstructionInY ;AABCD6; dw InstList_Torizo_FacingLeft_JumpingBackward_RightFootFwd_2 ;AABCD8; @@ -4756,14 +4174,14 @@ InstList_Torizo_FacingLeft_JumpingBackward_RightFootFwd_1: dw InstList_Torizo_FacingLeft_JumpingBackward_RightFootFwd_1 ;AABCE8; InstList_Torizo_FacingLeft_JumpingBackward_RightFootFwd_2: - dw Instruction_Common_Enemy0FB2_InY ;AABCEA; + dw Common_Instruction_Enemy0FB2_InY ;AABCEA; dw Function_Torizo_Movement_Jumping_Falling ;AABCEC; dw Instruction_Torizo_LinkInstructionInY ;AABCEE; dw InstList_Torizo_FacingLeft_JumpingBackward_RightFootFwd_4 ;AABCF0; InstList_Torizo_FacingLeft_JumpingBackward_RightFootFwd_3: dw $0005,ExtendedSpritemaps_Torizo_Jumping_Falling_FacingLeft_1 ;AABCF2; - dw Instruction_Common_GotoY ;AABCF6; + dw Common_Instruction_GotoY ;AABCF6; dw InstList_Torizo_FacingLeft_JumpingBackward_RightFootFwd_3 ;AABCF8; InstList_Torizo_FacingLeft_JumpingBackward_RightFootFwd_4: @@ -4775,7 +4193,7 @@ InstList_Torizo_FacingLeft_JumpingBackward_RightFootFwd_4: dw Instruction_Torizo_CallY_OrY2_ForBombTorizoAttack ;AABD04; dw InstList_Torizo_FacingLeft_SpewingChozoOrbs_RightFootFwd_0 ;AABD06; dw InstList_Torizo_FacingLeft_SonicBooms_RightFootForward_0 ;AABD08; - dw Instruction_Common_GotoY ;AABD0A; + dw Common_Instruction_GotoY ;AABD0A; dw InstList_Torizo_FacingLeft_Walking_LeftLegMoving ;AABD0C; @@ -4792,7 +4210,7 @@ InstList_Torizo_FacingLeft_Faceless_Walking_RightLegMoving: dw Instruction_Torizo_SetSteppedLeftWithLeftFootState ;AABD18; dw Instruction_Torizo_FunctionInY ;AABD1A; dw Function_Torizo_NormalMovement ;AABD1C; - dw Instruction_Common_Enemy0FB2_InY ;AABD1E; + dw Common_Instruction_Enemy0FB2_InY ;AABD1E; dw Function_Torizo_Movement_Walking ;AABD20; dw Instruction_Torizo_SpawnLowHealthInitialDroolIfHealthIsLow ;AABD22; dw Instruction_Torizo_PlayTorizoFootstepsSFX ;AABD24; @@ -4815,7 +4233,7 @@ InstList_Torizo_FacingLeft_Faceless_Walking_LeftLegMoving: dw Instruction_Torizo_SetSteppedLeftWithRightFootState ;AABD52; dw Instruction_Torizo_FunctionInY ;AABD54; dw Function_Torizo_NormalMovement ;AABD56; - dw Instruction_Common_Enemy0FB2_InY ;AABD58; + dw Common_Instruction_Enemy0FB2_InY ;AABD58; dw Function_Torizo_Movement_Walking ;AABD5A; dw Instruction_Torizo_SpawnLowHealthInitialDroolIfHealthIsLow ;AABD5C; dw Instruction_Torizo_PlayTorizoFootstepsSFX ;AABD5E; @@ -4831,7 +4249,7 @@ InstList_Torizo_FacingLeft_Faceless_Walking_LeftLegMoving: dw Instruction_Torizo_BTWalkingMovement_Faceless_IndexInY,$0012 ;AABD80; dw $0005,ExtendedSpritemaps_Torizo_WalkingLeft_LeftLegMoving_4 ;AABD82; dw Instruction_Torizo_BTWalkingMovement_Faceless_IndexInY,$0000 ;AABD88; - dw Instruction_Common_GotoY ;AABD8C; + dw Common_Instruction_GotoY ;AABD8C; dw InstList_Torizo_FacingLeft_Faceless_Walking_RightLegMoving ;AABD8E; @@ -4843,7 +4261,7 @@ UNUSED_InstList_Torizo_FacingRight_StandUp_AABD90: dw ExtendedSpritemap_Torizo_Blank ;AABD94; dw Instruction_Torizo_FunctionInY ;AABD96; dw Function_Torizo_WakeWhenBombTorizoChozoFinishesCrumbling ;AABD98; - dw Instruction_Common_Sleep ;AABD9A; + dw Common_Instruction_Sleep ;AABD9A; dw Instruction_Torizo_FunctionInY ;AABD9C; dw Function_Torizo_SimpleMovement ;AABD9E; dw $0020,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingRight_0 ;AABDA0; @@ -4859,7 +4277,7 @@ UNUSED_InstList_Torizo_FacingRight_StandUp_AABD90: dw $0008,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingRight_5 ;AABDC6; dw Instruction_Torizo_StandingUpMovement_IndexInY,$001A ;AABDCC; dw $0008,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingRight_6 ;AABDCE; - dw Instruction_Common_GotoY ;AABDD4; + dw Common_Instruction_GotoY ;AABDD4; dw InstList_Torizo_FacingRight_Walking_RightLegMoving ;AABDD6; endif ; !FEATURE_KEEP_UNREFERENCED @@ -4877,7 +4295,7 @@ InstList_Torizo_FacingRight_Walking_LeftLegMoving: dw Instruction_Torizo_SetSteppedRightWithRightFootState ;AABDE2; dw Instruction_Torizo_FunctionInY ;AABDE4; dw Function_Torizo_NormalMovement ;AABDE6; - dw Instruction_Common_Enemy0FB2_InY ;AABDE8; + dw Common_Instruction_Enemy0FB2_InY ;AABDE8; dw Function_Torizo_Movement_Walking ;AABDEA; dw Instruction_Torizo_SpawnLowHealthInitialDroolIfHealthIsLow ;AABDEC; dw Instruction_Torizo_PlayTorizoFootstepsSFX ;AABDEE; @@ -4910,7 +4328,7 @@ InstList_Torizo_FacingRight_Walking_RightLegMoving: dw Instruction_Torizo_SetSteppedRightWithLeftFootState ;AABE30; dw Instruction_Torizo_FunctionInY ;AABE32; dw Function_Torizo_NormalMovement ;AABE34; - dw Instruction_Common_Enemy0FB2_InY ;AABE36; + dw Common_Instruction_Enemy0FB2_InY ;AABE36; dw Function_Torizo_Movement_Walking ;AABE38; dw Instruction_Torizo_SpawnLowHealthInitialDroolIfHealthIsLow ;AABE3A; dw Instruction_Torizo_PlayTorizoFootstepsSFX ;AABE3C; @@ -4934,13 +4352,13 @@ InstList_Torizo_FacingRight_Walking_RightLegMoving: dw Instruction_Torizo_BombTorizoWalkingMovement_Normal_IndexInY,$0026;AABE6E; dw $0006,ExtendedSpritemaps_Torizo_WalkingRight_RightLegMoving_4 ;AABE70; dw Instruction_Torizo_BombTorizoWalkingMovement_Normal_IndexInY,$0014;AABE76; - dw Instruction_Common_GotoY ;AABE7A; + dw Common_Instruction_GotoY ;AABE7A; dw InstList_Torizo_FacingRight_Walking_LeftLegMoving ;AABE7C; ;;; $BE7E: Instruction list - callable - spewing chozo orbs - facing right - left foot forward ;;; InstList_Torizo_FacingRight_SpewingChozoOrbs_LeftFootFwd_0: - dw Instruction_Common_Enemy0FB2_InY ;AABE7E; + dw Common_Instruction_Enemy0FB2_InY ;AABE7E; dw Function_Torizo_Movement_Attacking ;AABE80; dw $0010,ExtendedSpritemaps_Torizo_Attacks_FaceRight_LeftFootForward ;AABE82; dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_LeftFootForward_0 ;AABE86; @@ -4949,25 +4367,25 @@ InstList_Torizo_FacingRight_SpewingChozoOrbs_LeftFootFwd_0: dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_LeftFootForward_3 ;AABE92; dw $0010,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_LeftFootForward_4 ;AABE96; dw Instruction_Torizo_PlayShotTorizoSFX ;AABE9A; - dw Instruction_Common_TimerInY,$0003 ;AABE9C; + dw Common_Instruction_TimerInY,$0003 ;AABE9C; InstList_Torizo_FacingRight_SpewingChozoOrbs_LeftFootFwd_1: dw Instruction_Torizo_SpawnBombTorizosChozoOrbs ;AABEA0; - dw Instruction_Common_WaitYFrames,$0010 ;AABEA2; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AABEA6; + dw Common_Instruction_WaitYFrames,$0010 ;AABEA2; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AABEA6; dw InstList_Torizo_FacingRight_SpewingChozoOrbs_LeftFootFwd_1 ;AABEA8; dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_LeftFootForward_3 ;AABEAA; dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_LeftFootForward_2 ;AABEAE; dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_LeftFootForward_1 ;AABEB2; dw $0048,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_LeftFootForward_0 ;AABEB6; - dw Instruction_Common_Enemy0FB2_InY ;AABEBA; + dw Common_Instruction_Enemy0FB2_InY ;AABEBA; dw Function_Torizo_Movement_Walking ;AABEBC; dw Instruction_Torizo_Return ;AABEBE; ;;; $BEC0: Instruction list - callable - spewing chozo orbs - facing right - right foot forward ;;; InstList_Torizo_FacingRight_SpewingChozoOrbs_RightFootFwd_0: - dw Instruction_Common_Enemy0FB2_InY ;AABEC0; + dw Common_Instruction_Enemy0FB2_InY ;AABEC0; dw Function_Torizo_Movement_Attacking ;AABEC2; dw $0010,ExtendedSpritemaps_Torizo_Attacks_FaceRight_RightFootForward ;AABEC4; dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_RightFootForward_0 ;AABEC8; @@ -4976,27 +4394,27 @@ InstList_Torizo_FacingRight_SpewingChozoOrbs_RightFootFwd_0: dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_RightFootForward_3 ;AABED4; dw $0010,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_RightFootForward_4 ;AABED8; dw Instruction_Torizo_PlayShotTorizoSFX ;AABEDC; - dw Instruction_Common_TimerInY,$0003 ;AABEDE; + dw Common_Instruction_TimerInY,$0003 ;AABEDE; InstList_Torizo_FacingRight_SpewingChozoOrbs_RightFootFwd_1: dw Instruction_Torizo_SpawnBombTorizosChozoOrbs ;AABEE2; - dw Instruction_Common_WaitYFrames,$0010 ;AABEE4; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AABEE8; + dw Common_Instruction_WaitYFrames,$0010 ;AABEE4; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AABEE8; dw InstList_Torizo_FacingRight_SpewingChozoOrbs_RightFootFwd_1 ;AABEEA; dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_RightFootForward_3 ;AABEEC; dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_RightFootForward_2 ;AABEF0; dw $0008,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_RightFootForward_1 ;AABEF4; dw $0048,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_RightFootForward_0 ;AABEF8; - dw Instruction_Common_Enemy0FB2_InY ;AABEFC; + dw Common_Instruction_Enemy0FB2_InY ;AABEFC; dw Function_Torizo_Movement_Walking ;AABEFE; dw Instruction_Torizo_Return ;AABF00; ;;; $BF02: Instruction list - callable - sonic booms - facing right - left foot forward ;;; InstList_Torizo_FacingRight_SonicBooms_LeftFootForward_0: - dw Instruction_Common_Enemy0FB2_InY ;AABF02; + dw Common_Instruction_Enemy0FB2_InY ;AABF02; dw Function_Torizo_Movement_Attacking ;AABF04; - dw Instruction_Common_TimerInY,$0004 ;AABF06; + dw Common_Instruction_TimerInY,$0004 ;AABF06; InstList_Torizo_FacingRight_SonicBooms_LeftFootForward_1: dw $0006,ExtendedSpritemaps_Torizo_Attacks_FaceRight_LeftFootForward ;AABF0A; @@ -5021,18 +4439,18 @@ InstList_Torizo_FacingRight_SonicBooms_LeftFootForward_1: dw Instruction_Torizo_SpawnBombTorizoSonicBoomWithParameterY,$0001 ;AABF56; dw $0002,ExtSpritemap_Torizo_NonOrbAttacks_FaceRight_LeftFootFwd_6 ;AABF58; dw $0038,ExtSpritemap_Torizo_NonOrbAttacks_FaceRight_LeftFootFwd_5 ;AABF5E; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AABF62; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AABF62; dw InstList_Torizo_FacingRight_SonicBooms_LeftFootForward_1 ;AABF64; - dw Instruction_Common_Enemy0FB2_InY ;AABF66; + dw Common_Instruction_Enemy0FB2_InY ;AABF66; dw Function_Torizo_Movement_Walking ;AABF68; dw Instruction_Torizo_Return ;AABF6A; ;;; $BF6C: Instruction list - callable - sonic booms - facing right - right foot forward ;;; InstList_Torizo_FacingRight_SonicBooms_RightFootForward_0: - dw Instruction_Common_Enemy0FB2_InY ;AABF6C; + dw Common_Instruction_Enemy0FB2_InY ;AABF6C; dw Function_Torizo_Movement_Attacking ;AABF6E; - dw Instruction_Common_TimerInY,$0004 ;AABF70; + dw Common_Instruction_TimerInY,$0004 ;AABF70; InstList_Torizo_FacingRight_SonicBooms_RightFootForward_1: dw $0006,ExtendedSpritemaps_Torizo_Attacks_FaceRight_RightFootForward ;AABF74; @@ -5057,16 +4475,16 @@ InstList_Torizo_FacingRight_SonicBooms_RightFootForward_1: dw Instruction_Torizo_SpawnBombTorizoSonicBoomWithParameterY,$0001 ;AABFC0; dw $0002,ExtSpritemap_Torizo_NonOrbAttacks_FaceRight_RightFootFwd_6 ;AABFC2; dw $0038,ExtSpritemap_Torizo_NonOrbAttacks_FaceRight_RightFootFwd_5 ;AABFC8; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AABFCC; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AABFCC; dw InstList_Torizo_FacingRight_SonicBooms_RightFootForward_1 ;AABFCE; - dw Instruction_Common_Enemy0FB2_InY ;AABFD0; + dw Common_Instruction_Enemy0FB2_InY ;AABFD0; dw Function_Torizo_Movement_Walking ;AABFD2; dw Instruction_Torizo_Return ;AABFD4; ;;; $BFD6: Instruction list - callable - explosive swipe - facing right - left foot forward ;;; InstList_Torizo_FacingRight_ExplosiveSwipe_LeftFootForward: - dw Instruction_Common_Enemy0FB2_InY ;AABFD6; + dw Common_Instruction_Enemy0FB2_InY ;AABFD6; dw Function_Torizo_Movement_Attacking ;AABFD8; dw $0003,ExtendedSpritemaps_Torizo_Attacks_FaceRight_LeftFootForward ;AABFDA; dw $0003,ExtSpritemap_Torizo_NonOrbAttacks_FaceRight_LeftFootFwd_0 ;AABFDE; @@ -5098,14 +4516,14 @@ InstList_Torizo_FacingRight_ExplosiveSwipe_LeftFootForward: dw Instruction_Torizo_SpawnBombTorizoExplosiveSwipeWithParamY,$0012 ;AAC046; dw $0001,ExtSpritemap_Torizo_NonOrbAttacks_FaceRight_LeftFootFwd_6 ;AAC048; dw $0010,ExtSpritemap_Torizo_NonOrbAttacks_FaceRight_LeftFootFwd_5 ;AAC04E; - dw Instruction_Common_Enemy0FB2_InY ;AAC052; + dw Common_Instruction_Enemy0FB2_InY ;AAC052; dw Function_Torizo_Movement_Walking ;AAC054; dw Instruction_Torizo_Return ;AAC056; ;;; $C058: Instruction list - callable - explosive swipe - facing right - right foot forward ;;; InstList_Torizo_FacingRight_ExplosiveSwipe_RightFootForward: - dw Instruction_Common_Enemy0FB2_InY ;AAC058; + dw Common_Instruction_Enemy0FB2_InY ;AAC058; dw Function_Torizo_Movement_Attacking ;AAC05A; dw $0003,ExtendedSpritemaps_Torizo_Attacks_FaceRight_RightFootForward ;AAC05C; dw $0003,ExtSpritemap_Torizo_NonOrbAttacks_FaceRight_RightFootFwd_0 ;AAC060; @@ -5137,14 +4555,14 @@ InstList_Torizo_FacingRight_ExplosiveSwipe_RightFootForward: dw Instruction_Torizo_SpawnBombTorizoExplosiveSwipeWithParamY,$0012 ;AAC0C8; dw $0001,ExtSpritemap_Torizo_NonOrbAttacks_FaceRight_RightFootFwd_6 ;AAC0CA; dw $0010,ExtSpritemap_Torizo_NonOrbAttacks_FaceRight_RightFootFwd_5 ;AAC0D0; - dw Instruction_Common_Enemy0FB2_InY ;AAC0D4; + dw Common_Instruction_Enemy0FB2_InY ;AAC0D4; dw Function_Torizo_Movement_Walking ;AAC0D6; dw Instruction_Torizo_Return ;AAC0D8; ;;; $C0DA: Instruction list - jumping forwards - facing right ;;; InstList_Torizo_FacingRight_JumpingForwards_0: - dw Instruction_Common_Enemy0FB2_InY ;AAC0DA; + dw Common_Instruction_Enemy0FB2_InY ;AAC0DA; dw Function_Torizo_Movement_Jumping_Falling ;AAC0DC; dw Instruction_Torizo_LinkInstructionInY ;AAC0DE; dw InstList_Torizo_FacingRight_Falling_0 ;AAC0E0; @@ -5159,14 +4577,14 @@ InstList_Torizo_FacingRight_JumpingForwards_1: ;;; $C0F2: Instruction list - falling - facing right ;;; InstList_Torizo_FacingRight_Falling_0: - dw Instruction_Common_Enemy0FB2_InY ;AAC0F2; + dw Common_Instruction_Enemy0FB2_InY ;AAC0F2; dw Function_Torizo_Movement_Jumping_Falling ;AAC0F4; dw Instruction_Torizo_LinkInstructionInY ;AAC0F6; dw InstList_Torizo_FacingRight_Falling_2 ;AAC0F8; InstList_Torizo_FacingRight_Falling_1: dw $0005,ExtendedSpritemaps_Torizo_Jumping_Falling_FacingRight_1 ;AAC0FA; - dw Instruction_Common_GotoY ;AAC0FE; + dw Common_Instruction_GotoY ;AAC0FE; dw InstList_Torizo_FacingRight_Falling_1 ;AAC100; InstList_Torizo_FacingRight_Falling_2: @@ -5175,13 +4593,13 @@ InstList_Torizo_FacingRight_Falling_2: dw Instruction_Torizo_GotoY_IfFaceBlownUp_ElseGotoY2_IfGolden ;AAC106; dw InstList_Torizo_FacingRight_Faceless_Walking_RightLegMoving ;AAC108; dw InstList_GoldenTorizo_WalkingRight_RightLegMoving ;AAC10A; - dw Instruction_Common_GotoY ;AAC10C; + dw Common_Instruction_GotoY ;AAC10C; dw InstList_Torizo_FacingRight_Walking_RightLegMoving ;AAC10E; ;;; $C110: Instruction list - jumping backwards - facing right - landing right foot forward ;;; InstList_Torizo_FacingRight_JumpBackward_LandRightFootFwd_0: - dw Instruction_Common_Enemy0FB2_InY ;AAC110; + dw Common_Instruction_Enemy0FB2_InY ;AAC110; dw Function_Torizo_Movement_Jumping_Falling ;AAC112; dw Instruction_Torizo_LinkInstructionInY ;AAC114; dw InstList_Torizo_FacingRight_JumpBackward_LandRightFootFwd_2 ;AAC116; @@ -5194,14 +4612,14 @@ InstList_Torizo_FacingRight_JumpBackward_LandRightFootFwd_1: dw InstList_Torizo_FacingRight_JumpBackward_LandRightFootFwd_1 ;AAC126; InstList_Torizo_FacingRight_JumpBackward_LandRightFootFwd_2: - dw Instruction_Common_Enemy0FB2_InY ;AAC128; + dw Common_Instruction_Enemy0FB2_InY ;AAC128; dw Function_Torizo_Movement_Jumping_Falling ;AAC12A; dw Instruction_Torizo_LinkInstructionInY ;AAC12C; dw InstList_Torizo_FacingRight_JumpBackward_LandRightFootFwd_4 ;AAC12E; InstList_Torizo_FacingRight_JumpBackward_LandRightFootFwd_3: dw $0005,ExtendedSpritemaps_Torizo_Jumping_Falling_FacingRight_1 ;AAC130; - dw Instruction_Common_GotoY ;AAC134; + dw Common_Instruction_GotoY ;AAC134; dw InstList_Torizo_FacingRight_JumpBackward_LandRightFootFwd_3 ;AAC136; InstList_Torizo_FacingRight_JumpBackward_LandRightFootFwd_4: @@ -5213,13 +4631,13 @@ InstList_Torizo_FacingRight_JumpBackward_LandRightFootFwd_4: dw Instruction_Torizo_CallY_OrY2_ForBombTorizoAttack ;AAC142; dw InstList_Torizo_FacingRight_SpewingChozoOrbs_RightFootFwd_0 ;AAC144; dw InstList_Torizo_FacingRight_SonicBooms_RightFootForward_0 ;AAC146; - dw Instruction_Common_GotoY ;AAC148; + dw Common_Instruction_GotoY ;AAC148; dw InstList_Torizo_FacingRight_Walking_LeftLegMoving ;AAC14A; ;;; $C14C: Instruction list - jumping backwards - facing right - landing left foot forward ;;; InstList_Torizo_FacingRight_JumpBackwards_LandLeftFootFwd_0: - dw Instruction_Common_Enemy0FB2_InY ;AAC14C; + dw Common_Instruction_Enemy0FB2_InY ;AAC14C; dw Function_Torizo_Movement_Jumping_Falling ;AAC14E; dw Instruction_Torizo_LinkInstructionInY ;AAC150; dw InstList_Torizo_FacingRight_JumpBackwards_LandLeftFootFwd_2 ;AAC152; @@ -5232,14 +4650,14 @@ InstList_Torizo_FacingRight_JumpBackwards_LandLeftFootFwd_1: dw InstList_Torizo_FacingRight_JumpBackwards_LandLeftFootFwd_1 ;AAC162; InstList_Torizo_FacingRight_JumpBackwards_LandLeftFootFwd_2: - dw Instruction_Common_Enemy0FB2_InY ;AAC164; + dw Common_Instruction_Enemy0FB2_InY ;AAC164; dw Function_Torizo_Movement_Jumping_Falling ;AAC166; dw Instruction_Torizo_LinkInstructionInY ;AAC168; dw InstList_Torizo_FacingRight_JumpBackwards_LandLeftFootFwd_4 ;AAC16A; InstList_Torizo_FacingRight_JumpBackwards_LandLeftFootFwd_3: dw $0005,ExtendedSpritemaps_Torizo_Jumping_Falling_FacingRight_1 ;AAC16C; - dw Instruction_Common_GotoY ;AAC170; + dw Common_Instruction_GotoY ;AAC170; dw InstList_Torizo_FacingRight_JumpBackwards_LandLeftFootFwd_3 ;AAC172; InstList_Torizo_FacingRight_JumpBackwards_LandLeftFootFwd_4: @@ -5251,7 +4669,7 @@ InstList_Torizo_FacingRight_JumpBackwards_LandLeftFootFwd_4: dw Instruction_Torizo_CallY_OrY2_ForBombTorizoAttack ;AAC17E; dw InstList_Torizo_FacingRight_SpewingChozoOrbs_LeftFootFwd_0 ;AAC180; dw InstList_Torizo_FacingRight_SonicBooms_LeftFootForward_0 ;AAC182; - dw Instruction_Common_GotoY ;AAC184; + dw Common_Instruction_GotoY ;AAC184; dw InstList_Torizo_FacingRight_Walking_RightLegMoving ;AAC186; @@ -5268,7 +4686,7 @@ InstList_Torizo_FacingRight_Faceless_Walking_LeftLegMoving: dw Instruction_Torizo_SetSteppedRightWithRightFootState ;AAC192; dw Instruction_Torizo_FunctionInY ;AAC194; dw Function_Torizo_NormalMovement ;AAC196; - dw Instruction_Common_Enemy0FB2_InY ;AAC198; + dw Common_Instruction_Enemy0FB2_InY ;AAC198; dw Function_Torizo_Movement_Walking ;AAC19A; dw Instruction_Torizo_SpawnLowHealthInitialDroolIfHealthIsLow ;AAC19C; dw Instruction_Torizo_PlayTorizoFootstepsSFX ;AAC19E; @@ -5291,7 +4709,7 @@ InstList_Torizo_FacingRight_Faceless_Walking_RightLegMoving: dw Instruction_Torizo_SetSteppedRightWithLeftFootState ;AAC1CC; dw Instruction_Torizo_FunctionInY ;AAC1CE; dw Function_Torizo_NormalMovement ;AAC1D0; - dw Instruction_Common_Enemy0FB2_InY ;AAC1D2; + dw Common_Instruction_Enemy0FB2_InY ;AAC1D2; dw Function_Torizo_Movement_Walking ;AAC1D4; dw Instruction_Torizo_SpawnLowHealthInitialDroolIfHealthIsLow ;AAC1D6; dw Instruction_Torizo_PlayTorizoFootstepsSFX ;AAC1D8; @@ -5307,7 +4725,7 @@ InstList_Torizo_FacingRight_Faceless_Walking_RightLegMoving: dw Instruction_Torizo_BTWalkingMovement_Faceless_IndexInY,$0026 ;AAC1FA; dw $0005,ExtendedSpritemaps_Torizo_WalkingRight_RightLegMoving_4 ;AAC1FC; dw Instruction_Torizo_BTWalkingMovement_Faceless_IndexInY,$0014 ;AAC202; - dw Instruction_Common_GotoY ;AAC206; + dw Common_Instruction_GotoY ;AAC206; dw InstList_Torizo_FacingRight_Faceless_Walking_LeftLegMoving ;AAC208; @@ -6461,14 +5879,14 @@ EnemyShot_Torizo_StandUp_SitDown: ;;; $C9CB: Instruction list - Golden Torizo - initial ;;; InstList_GoldenTorizo_Initial_0: - dw Instruction_Common_TransferYBytesInYToVRAM ;AAC9CB; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAC9CB; dw $0600 : dl Tiles_GoldenTorizoEgg : dw $6D00 ;AAC9CD; dw Instruction_Torizo_SetSteppedLeftWithRightFootState ;AAC9D4; dw Instruction_Torizo_SetAnimationLock ;AAC9D6; dw Instruction_Torizo_FunctionInY ;AAC9D8; dw Function_GoldenTorizo_WakeIfSamusIsBelowAndRightOfTargetPos ;AAC9DA; dw $0001,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_3 ;AAC9DC; - dw Instruction_Common_Sleep ;AAC9E0; + dw Common_Instruction_Sleep ;AAC9E0; dw Instruction_Torizo_FunctionInY ;AAC9E2; dw Function_Torizo_SimpleMovement ;AAC9E4; @@ -6486,34 +5904,34 @@ InstList_GoldenTorizo_Initial_1: dw Instruction_Torizo_FunctionInY ;AACA08; dw RTS_AAC6AB ;AACA0A; dw $0030,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AACA0C; - dw Instruction_Common_TransferYBytesInYToVRAM ;AACA10; + dw Common_Instruction_TransferYBytesInYToVRAM ;AACA10; dw $0040 : dl Tiles_Torizo : dw $7D80 ;AACA12; dw $0020,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AACA17; - dw Instruction_Common_TransferYBytesInYToVRAM ;AACA1D; + dw Common_Instruction_TransferYBytesInYToVRAM ;AACA1D; dw $0040 : dl Tiles_Torizo+$40 : dw $7D80 ;AACA1F; dw $0010,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AACA24; - dw Instruction_Common_TransferYBytesInYToVRAM ;AACA2A; + dw Common_Instruction_TransferYBytesInYToVRAM ;AACA2A; dw $0040 : dl Tiles_Torizo+$80 : dw $7D80 ;AACA2C; dw $0008,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AACA31; - dw Instruction_Common_TransferYBytesInYToVRAM ;AACA37; + dw Common_Instruction_TransferYBytesInYToVRAM ;AACA37; dw $0040 : dl Tiles_Torizo+$C0 : dw $7D80 ;AACA39; dw $0020,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AACA3E; - dw Instruction_Common_TimerInY,$0002 ;AACA44; + dw Common_Instruction_TimerInY,$0002 ;AACA44; InstList_GoldenTorizo_Initial_2: dw $0004,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AACA48; - dw Instruction_Common_TransferYBytesInYToVRAM ;AACA4C; + dw Common_Instruction_TransferYBytesInYToVRAM ;AACA4C; dw $0040 : dl Tiles_Torizo : dw $7D80 ;AACA4E; dw $0004,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AACA53; - dw Instruction_Common_TransferYBytesInYToVRAM ;AACA59; + dw Common_Instruction_TransferYBytesInYToVRAM ;AACA59; dw $0040 : dl Tiles_Torizo+$40 : dw $7D80 ;AACA5B; dw $0004,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AACA60; - dw Instruction_Common_TransferYBytesInYToVRAM ;AACA66; + dw Common_Instruction_TransferYBytesInYToVRAM ;AACA66; dw $0040 : dl Tiles_Torizo+$80 : dw $7D80 ;AACA68; dw $0004,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AACA6D; - dw Instruction_Common_TransferYBytesInYToVRAM ;AACA73; + dw Common_Instruction_TransferYBytesInYToVRAM ;AACA73; dw $0040 : dl Tiles_Torizo+$C0 : dw $7D80 ;AACA75; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AACA7C; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AACA7C; dw InstList_GoldenTorizo_Initial_2 ;AACA7E; dw $0020,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_0 ;AACA80; dw Instruction_Torizo_StandingUpMovement_IndexInY,$0000 ;AACA84; @@ -6528,18 +5946,18 @@ InstList_GoldenTorizo_Initial_2: dw $0008,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_5 ;AACAA6; dw Instruction_Torizo_StandingUpMovement_IndexInY,$000A ;AACAAC; dw Instruction_Torizo_LoadGoldenTorizoPalettes ;AACAB0; - dw Instruction_Common_TimerInY,$0010 ;AACAB2; + dw Common_Instruction_TimerInY,$0010 ;AACAB2; InstList_GoldenTorizo_Initial_3: dw $0004,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_6 ;AACAB6; dw Instruction_Torizo_AdvanceGradualColorChange ;AACABA; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AACABC; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AACABC; dw InstList_GoldenTorizo_Initial_3 ;AACABE; dw RTL_AAC2C8 ;AACAC0; dw Instruction_Torizo_ClearAnimationLock ;AACAC2; dw Inst_Torizo_StartFightMusic_GoldenTorizoBellyPaletteFX ;AACAC4; dw $0010,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_6 ;AACAC6; - dw Instruction_Common_GotoY ;AACACA; + dw Common_Instruction_GotoY ;AACACA; dw InstList_GoldenTorizo_WalkingLeft_LeftLegMoving ;AACACC; @@ -6581,7 +5999,7 @@ Inst_Torizo_StartFightMusic_GoldenTorizoBellyPaletteFX: ;;; $CAFF: Instruction list - callable - Golden Torizo - spewing chozo orbs - facing left - right foot forward ;;; InstList_GoldenTorizo_SpewChozoOrbs_FaceLeft_RightFootFwd_0: - dw Instruction_Common_Enemy0FB2_InY ;AACAFF; + dw Common_Instruction_Enemy0FB2_InY ;AACAFF; dw Function_GoldenTorizo_Movement_Attacking ;AACB01; dw $0006,ExtendedSpritemaps_Torizo_Attacks_FaceLeft_RightFootForward ;AACB03; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_RightFootForward_0 ;AACB07; @@ -6589,26 +6007,26 @@ InstList_GoldenTorizo_SpewChozoOrbs_FaceLeft_RightFootFwd_0: dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_RightFootForward_2 ;AACB0F; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_RightFootForward_3 ;AACB13; dw $0006,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_RightFootForward_4 ;AACB17; - dw Instruction_Common_TimerInY,$0006 ;AACB1B; + dw Common_Instruction_TimerInY,$0006 ;AACB1B; InstList_GoldenTorizo_SpewChozoOrbs_FaceLeft_RightFootFwd_1: dw Instruction_Torizo_PlayShotTorizoSFX ;AACB1F; dw Instruction_GoldenTorizo_SpawnChozoOrbs ;AACB21; - dw Instruction_Common_WaitYFrames,$0006 ;AACB23; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AACB27; + dw Common_Instruction_WaitYFrames,$0006 ;AACB23; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AACB27; dw InstList_GoldenTorizo_SpewChozoOrbs_FaceLeft_RightFootFwd_1 ;AACB29; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_RightFootForward_3 ;AACB2B; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_RightFootForward_2 ;AACB2F; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_RightFootForward_1 ;AACB33; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_RightFootForward_0 ;AACB37; - dw Instruction_Common_Enemy0FB2_InY ;AACB3B; + dw Common_Instruction_Enemy0FB2_InY ;AACB3B; dw Function_GoldenTorizo_Movement_Walking ;AACB3D; dw Instruction_Torizo_Return ;AACB3F; ;;; $CB41: Instruction list - callable - Golden Torizo - spewing chozo orbs - facing left - left foot forward ;;; InstList_GoldenTorizo_SpewChozoOrbs_FacingLeft_LeftFootFwd_0: - dw Instruction_Common_Enemy0FB2_InY ;AACB41; + dw Common_Instruction_Enemy0FB2_InY ;AACB41; dw Function_GoldenTorizo_Movement_Attacking ;AACB43; dw $0006,ExtendedSpritemaps_Torizo_Attacks_FaceLeft_LeftFootForward ;AACB45; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_LeftFootForward_0 ;AACB49; @@ -6616,28 +6034,28 @@ InstList_GoldenTorizo_SpewChozoOrbs_FacingLeft_LeftFootFwd_0: dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_LeftFootForward_2 ;AACB51; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_LeftFootForward_3 ;AACB55; dw $0006,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_LeftFootForward_4 ;AACB59; - dw Instruction_Common_TimerInY,$0006 ;AACB5D; + dw Common_Instruction_TimerInY,$0006 ;AACB5D; InstList_GoldenTorizo_SpewChozoOrbs_FacingLeft_LeftFootFwd_1: dw Instruction_Torizo_PlayShotTorizoSFX ;AACB61; dw Instruction_GoldenTorizo_SpawnChozoOrbs ;AACB63; - dw Instruction_Common_WaitYFrames,$0006 ;AACB65; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AACB69; + dw Common_Instruction_WaitYFrames,$0006 ;AACB65; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AACB69; dw InstList_GoldenTorizo_SpewChozoOrbs_FacingLeft_LeftFootFwd_1 ;AACB6B; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_LeftFootForward_3 ;AACB6D; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_LeftFootForward_2 ;AACB71; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_LeftFootForward_1 ;AACB75; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceLeft_LeftFootForward_0 ;AACB79; - dw Instruction_Common_Enemy0FB2_InY ;AACB7D; + dw Common_Instruction_Enemy0FB2_InY ;AACB7D; dw Function_GoldenTorizo_Movement_Walking ;AACB7F; dw Instruction_Torizo_Return ;AACB81; ;;; $CB83: Instruction list - callable - Golden Torizo - sonic booms - facing left - right foot forward ;;; InstList_GoldenTorizo_SonicBooms_FacingLeft_RightFootFwd_0: - dw Instruction_Common_Enemy0FB2_InY ;AACB83; + dw Common_Instruction_Enemy0FB2_InY ;AACB83; dw Function_GoldenTorizo_Movement_Attacking ;AACB85; - dw Instruction_Common_TimerInY,$0004 ;AACB87; + dw Common_Instruction_TimerInY,$0004 ;AACB87; InstList_GoldenTorizo_SonicBooms_FacingLeft_RightFootFwd_1: dw $0003,ExtendedSpritemaps_Torizo_Attacks_FaceLeft_RightFootForward ;AACB8B; @@ -6662,18 +6080,18 @@ InstList_GoldenTorizo_SonicBooms_FacingLeft_RightFootFwd_1: dw Instruction_Torizo_SpawnGoldenTorizoSonicBoomWithParameterY,$0001 ;AACBD7; dw $0001,ExtSpritemap_Torizo_NonOrbAttack_FaceLeft_RightFootForward_0 ;AACBD9; dw $0004,ExtSpritemap_Torizo_NonOrbAttacks_FaceLeft_LeftFootForward_5 ;AACBDF; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AACBE3; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AACBE3; dw InstList_GoldenTorizo_SonicBooms_FacingLeft_RightFootFwd_1 ;AACBE5; - dw Instruction_Common_Enemy0FB2_InY ;AACBE7; + dw Common_Instruction_Enemy0FB2_InY ;AACBE7; dw Function_GoldenTorizo_Movement_Walking ;AACBE9; dw Instruction_Torizo_Return ;AACBEB; ;;; $CBED: Instruction list - callable - Golden Torizo - sonic booms - facing left - left foot forward ;;; InstList_GoldenTorizo_SonicBooms_FacingLeft_LeftFootFwd_0: - dw Instruction_Common_Enemy0FB2_InY ;AACBED; + dw Common_Instruction_Enemy0FB2_InY ;AACBED; dw Function_GoldenTorizo_Movement_Attacking ;AACBEF; - dw Instruction_Common_TimerInY,$0004 ;AACBF1; + dw Common_Instruction_TimerInY,$0004 ;AACBF1; InstList_GoldenTorizo_SonicBooms_FacingLeft_LeftFootFwd_1: dw $0003,ExtendedSpritemaps_Torizo_Attacks_FaceLeft_LeftFootForward ;AACBF5; @@ -6698,16 +6116,16 @@ InstList_GoldenTorizo_SonicBooms_FacingLeft_LeftFootFwd_1: dw Instruction_Torizo_SpawnGoldenTorizoSonicBoomWithParameterY,$0001 ;AACC41; dw $0001,ExtSpritemap_Torizo_SonicBoom_Swipe_FaceLeft_LeftFootFwd_0 ;AACC43; dw $0004,ExtSpritemap_Torizo_NonOrbAttack_FaceLeft_LeftFootForward_5 ;AACC49; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AACC4D; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AACC4D; dw InstList_GoldenTorizo_SonicBooms_FacingLeft_LeftFootFwd_1 ;AACC4F; - dw Instruction_Common_Enemy0FB2_InY ;AACC51; + dw Common_Instruction_Enemy0FB2_InY ;AACC51; dw Function_GoldenTorizo_Movement_Walking ;AACC53; dw Instruction_Torizo_Return ;AACC55; ;;; $CC57: Instruction list - callable - Golden Torizo - spewing chozo orbs - facing right - left foot forward ;;; InstList_GoldenTorizo_SpewChozoOrb_FacingLeft_LeftFootFwd_0: - dw Instruction_Common_Enemy0FB2_InY ;AACC57; + dw Common_Instruction_Enemy0FB2_InY ;AACC57; dw Function_GoldenTorizo_Movement_Attacking ;AACC59; dw $0006,ExtendedSpritemaps_Torizo_Attacks_FaceRight_LeftFootForward ;AACC5B; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_LeftFootForward_0 ;AACC5F; @@ -6715,26 +6133,26 @@ InstList_GoldenTorizo_SpewChozoOrb_FacingLeft_LeftFootFwd_0: dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_LeftFootForward_2 ;AACC67; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_LeftFootForward_3 ;AACC6B; dw $0006,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_LeftFootForward_4 ;AACC6F; - dw Instruction_Common_TimerInY,$0006 ;AACC73; + dw Common_Instruction_TimerInY,$0006 ;AACC73; InstList_GoldenTorizo_SpewChozoOrb_FacingLeft_LeftFootFwd_1: dw Instruction_Torizo_PlayShotTorizoSFX ;AACC77; dw Instruction_GoldenTorizo_SpawnChozoOrbs ;AACC79; - dw Instruction_Common_WaitYFrames,$0006 ;AACC7B; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AACC7F; + dw Common_Instruction_WaitYFrames,$0006 ;AACC7B; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AACC7F; dw InstList_GoldenTorizo_SpewChozoOrb_FacingLeft_LeftFootFwd_1 ;AACC81; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_LeftFootForward_3 ;AACC83; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_LeftFootForward_2 ;AACC87; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_LeftFootForward_1 ;AACC8B; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_LeftFootForward_0 ;AACC8F; - dw Instruction_Common_Enemy0FB2_InY ;AACC93; + dw Common_Instruction_Enemy0FB2_InY ;AACC93; dw Function_GoldenTorizo_Movement_Walking ;AACC95; dw Instruction_Torizo_Return ;AACC97; ;;; $CC99: Instruction list - callable - Golden Torizo - spewing chozo orbs - facing right - right foot forward ;;; InstList_GoldenTorizo_SpewChozoOrb_FacingLeft_RightFootFwd_0: - dw Instruction_Common_Enemy0FB2_InY ;AACC99; + dw Common_Instruction_Enemy0FB2_InY ;AACC99; dw Function_GoldenTorizo_Movement_Attacking ;AACC9B; dw $0006,ExtendedSpritemaps_Torizo_Attacks_FaceRight_RightFootForward ;AACC9D; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_RightFootForward_0 ;AACCA1; @@ -6742,28 +6160,28 @@ InstList_GoldenTorizo_SpewChozoOrb_FacingLeft_RightFootFwd_0: dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_RightFootForward_2 ;AACCA9; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_RightFootForward_3 ;AACCAD; dw $0006,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_RightFootForward_4 ;AACCB1; - dw Instruction_Common_TimerInY,$0006 ;AACCB5; + dw Common_Instruction_TimerInY,$0006 ;AACCB5; InstList_GoldenTorizo_SpewChozoOrb_FacingLeft_RightFootFwd_1: dw Instruction_Torizo_PlayShotTorizoSFX ;AACCB9; dw Instruction_GoldenTorizo_SpawnChozoOrbs ;AACCBB; - dw Instruction_Common_WaitYFrames,$0006 ;AACCBD; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AACCC1; + dw Common_Instruction_WaitYFrames,$0006 ;AACCBD; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AACCC1; dw InstList_GoldenTorizo_SpewChozoOrb_FacingLeft_RightFootFwd_1 ;AACCC3; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_RightFootForward_3 ;AACCC5; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_RightFootForward_2 ;AACCC9; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_RightFootForward_1 ;AACCCD; dw $0003,ExtSpritemaps_Torizo_ChozoOrbs_FaceRight_RightFootForward_0 ;AACCD1; - dw Instruction_Common_Enemy0FB2_InY ;AACCD5; + dw Common_Instruction_Enemy0FB2_InY ;AACCD5; dw Function_GoldenTorizo_Movement_Walking ;AACCD7; dw Instruction_Torizo_Return ;AACCD9; ;;; $CCDB: Instruction list - callable - Golden Torizo - sonic booms - facing right - left foot forward ;;; InstList_GoldenTorizo_SonicBooms_FacingRight_LeftFootFwd_0: - dw Instruction_Common_Enemy0FB2_InY ;AACCDB; + dw Common_Instruction_Enemy0FB2_InY ;AACCDB; dw Function_GoldenTorizo_Movement_Attacking ;AACCDD; - dw Instruction_Common_TimerInY,$0004 ;AACCDF; + dw Common_Instruction_TimerInY,$0004 ;AACCDF; InstList_GoldenTorizo_SonicBooms_FacingRight_LeftFootFwd_1: dw $0003,ExtendedSpritemaps_Torizo_Attacks_FaceRight_LeftFootForward ;AACCE3; @@ -6788,18 +6206,18 @@ InstList_GoldenTorizo_SonicBooms_FacingRight_LeftFootFwd_1: dw Instruction_Torizo_SpawnGoldenTorizoSonicBoomWithParameterY,$0001 ;AACD2F; dw $0001,ExtSpritemap_Torizo_NonOrbAttacks_FaceRight_LeftFootFwd_6 ;AACD31; dw $0004,ExtSpritemap_Torizo_NonOrbAttacks_FaceRight_LeftFootFwd_5 ;AACD37; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AACD3B; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AACD3B; dw InstList_GoldenTorizo_SonicBooms_FacingRight_LeftFootFwd_1 ;AACD3D; - dw Instruction_Common_Enemy0FB2_InY ;AACD3F; + dw Common_Instruction_Enemy0FB2_InY ;AACD3F; dw Function_GoldenTorizo_Movement_Walking ;AACD41; dw Instruction_Torizo_Return ;AACD43; ;;; $CD45: Instruction list - callable - Golden Torizo - sonic booms - facing right - right foot forward ;;; InstList_GoldenTorizo_SonicBooms_FacingRight_RightFootFwd_0: - dw Instruction_Common_Enemy0FB2_InY ;AACD45; + dw Common_Instruction_Enemy0FB2_InY ;AACD45; dw Function_GoldenTorizo_Movement_Attacking ;AACD47; - dw Instruction_Common_TimerInY,$0004 ;AACD49; + dw Common_Instruction_TimerInY,$0004 ;AACD49; InstList_GoldenTorizo_SonicBooms_FacingRight_RightFootFwd_1: dw $0003,ExtendedSpritemaps_Torizo_Attacks_FaceRight_RightFootForward ;AACD4D; @@ -6824,9 +6242,9 @@ InstList_GoldenTorizo_SonicBooms_FacingRight_RightFootFwd_1: dw Instruction_Torizo_SpawnGoldenTorizoSonicBoomWithParameterY,$0001 ;AACD99; dw $0001,ExtSpritemap_Torizo_NonOrbAttacks_FaceRight_RightFootFwd_6 ;AACD9B; dw $0004,ExtSpritemap_Torizo_NonOrbAttacks_FaceRight_RightFootFwd_5 ;AACDA1; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AACDA5; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AACDA5; dw InstList_GoldenTorizo_SonicBooms_FacingRight_RightFootFwd_1 ;AACDA7; - dw Instruction_Common_Enemy0FB2_InY ;AACDA9; + dw Common_Instruction_Enemy0FB2_InY ;AACDA9; dw Function_GoldenTorizo_Movement_Walking ;AACDAB; dw Instruction_Torizo_Return ;AACDAD; @@ -6836,7 +6254,7 @@ InstList_GT_LandedFromBackwardsJump_FacingLeft_LeftFootFwd: dw Instruction_GoldenTorizo_CallY_OrY2_ForAttack ;AACDAF; dw InstList_GoldenTorizo_SpewChozoOrbs_FacingLeft_LeftFootFwd_0 ;AACDB1; dw InstList_GoldenTorizo_SonicBooms_FacingLeft_LeftFootFwd_0 ;AACDB3; - dw Instruction_Common_GotoY ;AACDB5; + dw Common_Instruction_GotoY ;AACDB5; dw InstList_GoldenTorizo_WalkingLeft_RightLegMoving ;AACDB7; @@ -6845,7 +6263,7 @@ InstList_GT_LandedFromBackwardsJump_FacingLeft_RightFootFwd: dw Instruction_GoldenTorizo_CallY_OrY2_ForAttack ;AACDB9; dw InstList_GoldenTorizo_SpewChozoOrbs_FaceLeft_RightFootFwd_0 ;AACDBB; dw InstList_GoldenTorizo_SonicBooms_FacingLeft_RightFootFwd_0 ;AACDBD; - dw Instruction_Common_GotoY ;AACDBF; + dw Common_Instruction_GotoY ;AACDBF; dw InstList_GoldenTorizo_WalkingLeft_LeftLegMoving ;AACDC1; @@ -6854,7 +6272,7 @@ InstList_GT_LandedFromBackwardsJump_FacingRight_RightFootFwd: dw Instruction_GoldenTorizo_CallY_OrY2_ForAttack ;AACDC3; dw InstList_GoldenTorizo_SpewChozoOrb_FacingLeft_RightFootFwd_0 ;AACDC5; dw InstList_GoldenTorizo_SonicBooms_FacingRight_RightFootFwd_0 ;AACDC7; - dw Instruction_Common_GotoY ;AACDC9; + dw Common_Instruction_GotoY ;AACDC9; dw InstList_GoldenTorizo_WalkingRight_LeftLegMoving ;AACDCB; @@ -6863,7 +6281,7 @@ InstList_GT_LandedFromBackwardsJump_FacingRight_LeftFootFwd: dw Instruction_GoldenTorizo_CallY_OrY2_ForAttack ;AACDCD; dw InstList_GoldenTorizo_SpewChozoOrb_FacingLeft_LeftFootFwd_0 ;AACDCF; dw InstList_GoldenTorizo_SonicBooms_FacingRight_LeftFootFwd_0 ;AACDD1; - dw Instruction_Common_GotoY ;AACDD3; + dw Common_Instruction_GotoY ;AACDD3; dw InstList_GoldenTorizo_WalkingRight_RightLegMoving ;AACDD5; @@ -6903,7 +6321,7 @@ InstList_GoldenTorizo_CaughtSuper_FacingLeft_LeftLegFwd: dw $0002,ExtendedSpritemaps_Torizo_Attacks_FaceLeft_LeftFootForward ;AACE35; dw $0010,ExtSpritemap_Torizo_NonOrbAttack_FaceLeft_LeftFootForward_5 ;AACE39; dw Instruction_GoldenTorizo_ClearCaughtSuperMissileFlag ;AACE3D; - dw Instruction_Common_GotoY ;AACE3F; + dw Common_Instruction_GotoY ;AACE3F; dw InstList_GoldenTorizo_WalkingLeft_RightLegMoving ;AACE41; @@ -6935,7 +6353,7 @@ InstList_GoldenTorizo_CaughtSuper_FacingLeft_RightLegFwd: dw $0002,ExtendedSpritemaps_Torizo_Attacks_FaceLeft_RightFootForward ;AACE97; dw $0010,ExtSpritemap_Torizo_NonOrbAttacks_FaceLeft_LeftFootForward_5 ;AACE9B; dw Instruction_GoldenTorizo_ClearCaughtSuperMissileFlag ;AACE9F; - dw Instruction_Common_GotoY ;AACEA1; + dw Common_Instruction_GotoY ;AACEA1; dw InstList_GoldenTorizo_WalkingLeft_LeftLegMoving ;AACEA3; @@ -6965,7 +6383,7 @@ InstList_GoldenTorizo_CaughtSuper_FacingRight_RightLegFwd: dw $0002,ExtendedSpritemaps_Torizo_Attacks_FaceRight_RightFootForward ;AACEF1; dw $0010,ExtSpritemap_Torizo_NonOrbAttacks_FaceRight_RightFootFwd_5 ;AACEF5; dw Instruction_GoldenTorizo_ClearCaughtSuperMissileFlag ;AACEF9; - dw Instruction_Common_GotoY ;AACEFB; + dw Common_Instruction_GotoY ;AACEFB; dw InstList_GoldenTorizo_WalkingRight_LeftLegMoving ;AACEFD; @@ -6995,13 +6413,13 @@ InstList_GoldenTorizo_CaughtSuper_FacingRight_LeftLegFwd: dw $0002,ExtendedSpritemaps_Torizo_Attacks_FaceRight_LeftFootForward ;AACF4B; dw $0010,ExtSpritemap_Torizo_NonOrbAttacks_FaceRight_LeftFootFwd_5 ;AACF4F; dw Instruction_GoldenTorizo_ClearCaughtSuperMissileFlag ;AACF53; - dw Instruction_Common_GotoY ;AACF55; + dw Common_Instruction_GotoY ;AACF55; dw InstList_GoldenTorizo_WalkingRight_RightLegMoving ;AACF57; ;;; $CF59: Instruction list - sit down attack - facing left ;;; InstList_GoldenTorizo_SitDownAttack_FacingLeft: - dw Instruction_Common_Enemy0FB2_InY ;AACF59; + dw Common_Instruction_Enemy0FB2_InY ;AACF59; dw Function_GoldenTorizo_Movement_Attacking ;AACF5B; dw $0008,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_6 ;AACF5D; dw Instruction_Torizo_SittingDownMovement_IndexInY,$000A ;AACF61; @@ -7027,15 +6445,15 @@ InstList_GoldenTorizo_SitDownAttack_FacingLeft: dw Instruction_Torizo_StandingUpMovement_IndexInY,$0008 ;AACFB1; dw $000A,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingLeft_5 ;AACFB3; dw Instruction_Torizo_StandingUpMovement_IndexInY,$000A ;AACFB9; - dw Instruction_Common_Enemy0FB2_InY ;AACFBD; + dw Common_Instruction_Enemy0FB2_InY ;AACFBD; dw Function_GoldenTorizo_Movement_Walking ;AACFBF; - dw Instruction_Common_GotoY ;AACFC1; + dw Common_Instruction_GotoY ;AACFC1; dw InstList_GoldenTorizo_WalkingLeft_LeftLegMoving ;AACFC3; ;;; $CFC5: Instruction list - sit down attack - facing right ;;; InstList_GoldenTorizo_SitDownAttack_FacingRight: - dw Instruction_Common_Enemy0FB2_InY ;AACFC5; + dw Common_Instruction_Enemy0FB2_InY ;AACFC5; dw Function_GoldenTorizo_Movement_Attacking ;AACFC7; dw $0008,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingRight_6 ;AACFC9; dw Instruction_Torizo_SittingDownMovement_IndexInY,$001A ;AACFCD; @@ -7061,64 +6479,64 @@ InstList_GoldenTorizo_SitDownAttack_FacingRight: dw Instruction_Torizo_StandingUpMovement_IndexInY,$0018 ;AAD01D; dw $000A,ExtendedSpritemaps_Torizo_StandUp_SitDown_FacingRight_5 ;AAD01F; dw Instruction_Torizo_StandingUpMovement_IndexInY,$001A ;AAD025; - dw Instruction_Common_Enemy0FB2_InY ;AAD029; + dw Common_Instruction_Enemy0FB2_InY ;AAD029; dw Function_GoldenTorizo_Movement_Walking ;AAD02B; - dw Instruction_Common_GotoY ;AAD02D; + dw Common_Instruction_GotoY ;AAD02D; dw InstList_GoldenTorizo_WalkingRight_RightLegMoving ;AAD02F; ;;; $D031: Instruction list - callable - release Golden Torizo eggs ;;; InstList_GoldenTorizo_ReleaseGoldenTorizoEggs_0: - dw Instruction_Common_Enemy0FB2_InY ;AAD031; + dw Common_Instruction_Enemy0FB2_InY ;AAD031; dw Function_GoldenTorizo_Movement_Attacking ;AAD033; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD035; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD035; dw $0040 : dl Tiles_Torizo+$280 : dw $7300 ;AAD037; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD03E; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD03E; dw $0040 : dl Tiles_Torizo+$480 : dw $7400 ;AAD040; - dw Instruction_Common_WaitYFrames,$0008 ;AAD047; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD04B; + dw Common_Instruction_WaitYFrames,$0008 ;AAD047; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD04B; dw $0040 : dl Tiles_Torizo+$2C0 : dw $7300 ;AAD04D; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD054; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD054; dw $0040 : dl Tiles_Torizo+$4C0 : dw $7400 ;AAD056; - dw Instruction_Common_WaitYFrames,$0008 ;AAD05D; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD061; + dw Common_Instruction_WaitYFrames,$0008 ;AAD05D; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD061; dw $0040 : dl Tiles_Torizo+$300 : dw $7300 ;AAD063; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD06A; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD06A; dw $0040 : dl Tiles_Torizo+$500 : dw $7400 ;AAD06C; - dw Instruction_Common_WaitYFrames,$0010 ;AAD073; - dw Instruction_Common_TimerInY,$0006 ;AAD077; + dw Common_Instruction_WaitYFrames,$0010 ;AAD073; + dw Common_Instruction_TimerInY,$0006 ;AAD077; InstList_GoldenTorizo_ReleaseGoldenTorizoEggs_1: dw Instruction_GoldenTorizo_QueueEggReleasedSFX ;AAD07B; dw Instruction_GoldenTorizo_SpawnGoldenTorizoEgg ;AAD07D; - dw Instruction_Common_WaitYFrames,$0008 ;AAD07F; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AAD083; + dw Common_Instruction_WaitYFrames,$0008 ;AAD07F; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AAD083; dw InstList_GoldenTorizo_ReleaseGoldenTorizoEggs_1 ;AAD085; InstList_GoldenTorizo_ReleaseGoldenTorizoEggs_2: - dw Instruction_Common_WaitYFrames,$0001 ;AAD087; + dw Common_Instruction_WaitYFrames,$0001 ;AAD087; dw Instruction_GoldenTorizo_EyeBeamAttack_0 ;AAD08B; dw InstList_GoldenTorizo_ReleaseGoldenTorizoEggs_2 ;AAD08D; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD08F; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD08F; dw $0040 : dl Tiles_Torizo+$300 : dw $7300 ;AAD091; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD098; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD098; dw $0040 : dl Tiles_Torizo+$500 : dw $7400 ;AAD09A; - dw Instruction_Common_WaitYFrames,$0008 ;AAD0A1; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD0A5; + dw Common_Instruction_WaitYFrames,$0008 ;AAD0A1; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD0A5; dw $0040 : dl Tiles_Torizo+$2C0 : dw $7300 ;AAD0A7; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD0AE; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD0AE; dw $0040 : dl Tiles_Torizo+$4C0 : dw $7400 ;AAD0B0; - dw Instruction_Common_WaitYFrames,$0008 ;AAD0B7; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD0BB; + dw Common_Instruction_WaitYFrames,$0008 ;AAD0B7; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD0BB; dw $0040 : dl Tiles_Torizo+$280 : dw $7300 ;AAD0BD; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD0C4; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD0C4; dw $0040 : dl Tiles_Torizo+$480 : dw $7400 ;AAD0C6; - dw Instruction_Common_WaitYFrames,$0008 ;AAD0CD; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD0D1; + dw Common_Instruction_WaitYFrames,$0008 ;AAD0CD; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD0D1; dw $0040 : dl Tiles_BombTorizo_GoldenTorizo+$600 : dw $7300 ;AAD0D3; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD0DA; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD0DA; dw $0040 : dl Tiles_BombTorizo_GoldenTorizo+$800 : dw $7400 ;AAD0DC; - dw Instruction_Common_Enemy0FB2_InY ;AAD0E3; + dw Common_Instruction_Enemy0FB2_InY ;AAD0E3; dw Function_GoldenTorizo_Movement_Walking ;AAD0E5; dw Instruction_Torizo_Return ;AAD0E7; @@ -7162,35 +6580,35 @@ InstList_GoldenTorizo_EyeBeamAttack_0: dw Function_GoldenTorizo_SimpleMovement ;AAD10F; dw Instruction_GoldenTorizo_DisableEyeBeamExplosions ;AAD111; dw Instruction_Torizo_SetAnimationLock ;AAD113; - dw Instruction_Common_WaitYFrames,$0008 ;AAD115; - dw Instruction_Common_TimerInY,$0004 ;AAD119; + dw Common_Instruction_WaitYFrames,$0008 ;AAD115; + dw Common_Instruction_TimerInY,$0004 ;AAD119; dw Instruction_GoldenTorizo_QueueLaserSFX ;AAD11D; InstList_GoldenTorizo_EyeBeamAttack_1: dw Instruction_GoldenTorizo_SpawnEyeBeam,$0000 ;AAD11F; - dw Instruction_Common_WaitYFrames,$0004 ;AAD123; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AAD127; + dw Common_Instruction_WaitYFrames,$0004 ;AAD123; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AAD127; dw InstList_GoldenTorizo_EyeBeamAttack_1 ;AAD129; - dw Instruction_Common_WaitYFrames,$0008 ;AAD12B; - dw Instruction_Common_TimerInY,$0002 ;AAD12F; + dw Common_Instruction_WaitYFrames,$0008 ;AAD12B; + dw Common_Instruction_TimerInY,$0002 ;AAD12F; InstList_GoldenTorizo_EyeBeamAttack_2: - dw Instruction_Common_WaitYFrames,$0003 ;AAD133; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD137; + dw Common_Instruction_WaitYFrames,$0003 ;AAD133; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD137; dw $0040 : dl Tiles_Torizo : dw $7D80 ;AAD139; - dw Instruction_Common_WaitYFrames,$0003 ;AAD140; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD144; + dw Common_Instruction_WaitYFrames,$0003 ;AAD140; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD144; dw $0040 : dl Tiles_Torizo+$40 : dw $7D80 ;AAD146; - dw Instruction_Common_WaitYFrames,$0003 ;AAD14D; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD151; + dw Common_Instruction_WaitYFrames,$0003 ;AAD14D; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD151; dw $0040 : dl Tiles_Torizo+$80 : dw $7D80 ;AAD153; - dw Instruction_Common_WaitYFrames,$0003 ;AAD15A; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD15E; + dw Common_Instruction_WaitYFrames,$0003 ;AAD15A; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD15E; dw $0040 : dl Tiles_Torizo+$C0 : dw $7D80 ;AAD160; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AAD167; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AAD167; dw InstList_GoldenTorizo_EyeBeamAttack_2 ;AAD169; dw Instruction_GoldenTorizo_EnableEyeBeamExplosions ;AAD16B; - dw Instruction_Common_WaitYFrames,$0008 ;AAD16D; + dw Common_Instruction_WaitYFrames,$0008 ;AAD16D; dw Instruction_GoldenTorizo_DisableEyeBeamExplosions ;AAD171; dw Instruction_Torizo_ClearAnimationLock ;AAD173; dw Instruction_Torizo_FunctionInY ;AAD175; @@ -7216,31 +6634,31 @@ Instruction_GoldenTorizo_EnableEyeBeamExplosions: ;;; $D193: Instruction list - callable - stunned ;;; InstList_Torizo_Stunned_0: - dw Instruction_Common_Enemy0FB2_InY ;AAD193; + dw Common_Instruction_Enemy0FB2_InY ;AAD193; dw Function_GoldenTorizo_Movement_Attacking ;AAD195; dw Instruction_Torizo_SetAnimationLock ;AAD197; - dw Instruction_Common_WaitYFrames,$0018 ;AAD199; - dw Instruction_Common_TimerInY,$0002 ;AAD19D; + dw Common_Instruction_WaitYFrames,$0018 ;AAD199; + dw Common_Instruction_TimerInY,$0002 ;AAD19D; InstList_Torizo_Stunned_1: - dw Instruction_Common_WaitYFrames,$0003 ;AAD1A1; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD1A5; + dw Common_Instruction_WaitYFrames,$0003 ;AAD1A1; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD1A5; dw $0040 : dl Tiles_Torizo : dw $7D80 ;AAD1A7; - dw Instruction_Common_WaitYFrames,$0003 ;AAD1AE; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD1B2; + dw Common_Instruction_WaitYFrames,$0003 ;AAD1AE; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD1B2; dw $0040 : dl Tiles_Torizo+$40 : dw $7D80 ;AAD1B4; - dw Instruction_Common_WaitYFrames,$0003 ;AAD1BB; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD1BF; + dw Common_Instruction_WaitYFrames,$0003 ;AAD1BB; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD1BF; dw $0040 : dl Tiles_Torizo+$80 : dw $7D80 ;AAD1C1; - dw Instruction_Common_WaitYFrames,$0003 ;AAD1C8; - dw Instruction_Common_TransferYBytesInYToVRAM ;AAD1CC; + dw Common_Instruction_WaitYFrames,$0003 ;AAD1C8; + dw Common_Instruction_TransferYBytesInYToVRAM ;AAD1CC; dw $0040 : dl Tiles_Torizo+$C0 : dw $7D80 ;AAD1CE; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AAD1D5; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AAD1D5; dw InstList_Torizo_Stunned_1 ;AAD1D7; - dw Instruction_Common_WaitYFrames,$0010 ;AAD1D9; + dw Common_Instruction_WaitYFrames,$0010 ;AAD1D9; dw Instruction_Torizo_ClearAnimationLock ;AAD1DD; dw Instruction_GoldenTorizo_UnmarkStunned ;AAD1DF; - dw Instruction_Common_Enemy0FB2_InY ;AAD1E1; + dw Common_Instruction_Enemy0FB2_InY ;AAD1E1; dw Function_GoldenTorizo_Movement_Walking ;AAD1E3; dw Instruction_Torizo_Return ;AAD1E5; @@ -7261,7 +6679,7 @@ InstList_GoldenTorizo_Dodge_TurningLeft: dw Instruction_Torizo_SetTorizoTurningAroundFlag ;AAD1F7; dw $0018,ExtendedSpritemaps_Torizo_FacingScreen_Turning_Dodging ;AAD1F9; dw Instruction_Torizo_ClearAnimationLock ;AAD1FD; - dw Instruction_Common_GotoY ;AAD1FF; + dw Common_Instruction_GotoY ;AAD1FF; dw InstList_GoldenTorizo_WalkingLeft_RightLegMoving ;AAD201; @@ -7278,7 +6696,7 @@ InstList_GoldenTorizo_WalkingLeft_RightLegMoving: dw Instruction_Torizo_SetSteppedLeftWithLeftFootState ;AAD20D; dw Instruction_Torizo_FunctionInY ;AAD20F; dw Function_GoldenTorizo_NormalMovement ;AAD211; - dw Instruction_Common_Enemy0FB2_InY ;AAD213; + dw Common_Instruction_Enemy0FB2_InY ;AAD213; dw Function_GoldenTorizo_Movement_Walking ;AAD215; dw Instruction_Torizo_PlayTorizoFootstepsSFX ;AAD217; dw $0008,ExtendedSpritemaps_Torizo_WalkingLeft_RightLegMoving_0 ;AAD219; @@ -7310,7 +6728,7 @@ InstList_GoldenTorizo_WalkingLeft_LeftLegMoving: dw Instruction_Torizo_SetSteppedLeftWithRightFootState ;AAD259; dw Instruction_Torizo_FunctionInY ;AAD25B; dw Function_GoldenTorizo_NormalMovement ;AAD25D; - dw Instruction_Common_Enemy0FB2_InY ;AAD25F; + dw Common_Instruction_Enemy0FB2_InY ;AAD25F; dw Function_GoldenTorizo_Movement_Walking ;AAD261; dw Instruction_Torizo_PlayTorizoFootstepsSFX ;AAD263; dw $0008,ExtendedSpritemaps_Torizo_WalkingLeft_LeftLegMoving_0 ;AAD265; @@ -7337,7 +6755,7 @@ InstList_GoldenTorizo_WalkingLeft_LeftLegMoving: dw Instruction_GoldenTorizo_WalkingMovement_IndexInY,$0012 ;AAD29D; dw $0004,ExtendedSpritemaps_Torizo_WalkingLeft_LeftLegMoving_4 ;AAD29F; dw Instruction_GoldenTorizo_WalkingMovement_IndexInY,$0000 ;AAD2A5; - dw Instruction_Common_GotoY ;AAD2A9; + dw Common_Instruction_GotoY ;AAD2A9; dw InstList_GoldenTorizo_WalkingLeft_RightLegMoving ;AAD2AB; @@ -7349,7 +6767,7 @@ InstList_GoldenTorizo_Dodge_TurningRight: dw Instruction_Torizo_SetTorizoTurningAroundFlag ;AAD2B3; dw $0018,ExtendedSpritemaps_Torizo_FacingScreen_Turning_Dodging ;AAD2B5; dw Instruction_Torizo_ClearAnimationLock ;AAD2B9; - dw Instruction_Common_GotoY ;AAD2BB; + dw Common_Instruction_GotoY ;AAD2BB; dw InstList_GoldenTorizo_WalkingRight_LeftLegMoving ;AAD2BD; @@ -7366,7 +6784,7 @@ InstList_GoldenTorizo_WalkingRight_LeftLegMoving: dw Instruction_Torizo_SetSteppedRightWithRightFootState ;AAD2C9; dw Instruction_Torizo_FunctionInY ;AAD2CB; dw Function_GoldenTorizo_NormalMovement ;AAD2CD; - dw Instruction_Common_Enemy0FB2_InY ;AAD2CF; + dw Common_Instruction_Enemy0FB2_InY ;AAD2CF; dw Function_GoldenTorizo_Movement_Walking ;AAD2D1; dw Instruction_Torizo_PlayTorizoFootstepsSFX ;AAD2D3; dw $0008,ExtendedSpritemaps_Torizo_WalkingRight_LeftLegMoving_0 ;AAD2D5; @@ -7398,7 +6816,7 @@ InstList_GoldenTorizo_WalkingRight_RightLegMoving: dw Instruction_Torizo_SetSteppedRightWithLeftFootState ;AAD315; dw Instruction_Torizo_FunctionInY ;AAD317; dw Function_GoldenTorizo_NormalMovement ;AAD319; - dw Instruction_Common_Enemy0FB2_InY ;AAD31B; + dw Common_Instruction_Enemy0FB2_InY ;AAD31B; dw Function_GoldenTorizo_Movement_Walking ;AAD31D; dw Instruction_Torizo_PlayTorizoFootstepsSFX ;AAD31F; dw $0008,ExtendedSpritemaps_Torizo_WalkingRight_RightLegMoving_0 ;AAD321; @@ -7425,7 +6843,7 @@ InstList_GoldenTorizo_WalkingRight_RightLegMoving: dw Instruction_GoldenTorizo_WalkingMovement_IndexInY,$0026 ;AAD359; dw $0004,ExtendedSpritemaps_Torizo_WalkingRight_RightLegMoving_4 ;AAD35B; dw Instruction_GoldenTorizo_WalkingMovement_IndexInY,$0014 ;AAD361; - dw Instruction_Common_GotoY ;AAD365; + dw Common_Instruction_GotoY ;AAD365; dw InstList_GoldenTorizo_WalkingRight_LeftLegMoving ;AAD367; @@ -8047,32 +7465,32 @@ Palettes_TourianStatue_BaseDecoration: ;;; $D7A5: Instruction list - Tourian entrance statue - Ridley ;;; InstList_TourianStatue_Ridley_0: - dw Instruction_Common_DeleteEnemy ;AAD7A5; + dw Common_Instruction_DeleteEnemy ;AAD7A5; InstList_TourianStatue_Ridley_1: dw $7777,UNUSED_Spritemaps_TourianStatue_Ridley_AAD83B ;AAD7A7; - dw Instruction_Common_GotoY ;AAD7AB; + dw Common_Instruction_GotoY ;AAD7AB; dw InstList_TourianStatue_Ridley_1 ;AAD7AD; ;;; $D7AF: Instruction list - Tourian entrance statue - Phantoon ;;; InstList_TourianStatue_Phantoon_0: - dw Instruction_Common_DeleteEnemy ;AAD7AF; + dw Common_Instruction_DeleteEnemy ;AAD7AF; InstList_TourianStatue_Phantoon_1: dw $7777,UNUSED_Spritemaps_TourianStatue_Phantoon_AAD8B0 ;AAD7B1; - dw Instruction_Common_GotoY ;AAD7B5; + dw Common_Instruction_GotoY ;AAD7B5; dw InstList_TourianStatue_Phantoon_1 ;AAD7B7; ;;; $D7B9: Instruction list - Tourian entrance statue - base decoration ;;; InstList_TourianStatue_BaseDecoration_0: - dw Instruction_Common_DeleteEnemy ;AAD7B9; + dw Common_Instruction_DeleteEnemy ;AAD7B9; dw $0100,UNUSED_Spritemaps_TourianStatue_BaseDecoration_AAD816 ;AAD7BB; InstList_TourianStatue_BaseDecoration_1: dw $7777,UNUSED_Spritemaps_TourianStatue_BaseDecoration_AAD816 ;AAD7BF; - dw Instruction_Common_GotoY ;AAD7C3; + dw Common_Instruction_GotoY ;AAD7C3; dw InstList_TourianStatue_BaseDecoration_1 ;AAD7C5; @@ -8304,31 +7722,31 @@ Instruction_Shaktool_ResetShaktoolFunctions: ;;; $D9EA: Unused. Instruction list - Shaktool saw hand - attack - primary piece ;;; UNUSED_InstList_Shaktool_SawHand_Attack_PrimaryPiece_AAD9EA: - dw Instruction_Common_WaitYFrames,$0240 ;AAD9EA; - dw Instruction_Common_GotoY ;AAD9EE; + dw Common_Instruction_WaitYFrames,$0240 ;AAD9EA; + dw Common_Instruction_GotoY ;AAD9EE; dw InstList_Shaktool_SawHand_PrimaryPiece ;AAD9F0; ;;; $D9F2: Unused. Instruction list - Shaktool saw hand - attack - final piece ;;; UNUSED_InstList_Shaktool_SawHand_Attack_FinalPiece_AAD9F2: - dw Instruction_Common_WaitYFrames,$0240 ;AAD9F2; + dw Common_Instruction_WaitYFrames,$0240 ;AAD9F2; dw Instruction_Shaktool_ResetShaktoolFunctions ;AAD9F6; - dw Instruction_Common_GotoY ;AAD9F8; + dw Common_Instruction_GotoY ;AAD9F8; dw InstList_Shaktool_SawHand_FinalPiece ;AAD9FA; ;;; $D9FC: Instruction list - Shaktool saw hand - head bob - primary piece ;;; InstList_Shaktool_SawHand_HeadBob_PrimaryPiece: - dw Instruction_Common_WaitYFrames,$0014 ;AAD9FC; - dw Instruction_Common_GotoY ;AADA00; + dw Common_Instruction_WaitYFrames,$0014 ;AAD9FC; + dw Common_Instruction_GotoY ;AADA00; dw InstList_Shaktool_SawHand_PrimaryPiece ;AADA02; ;;; $DA04: Instruction list - Shaktool saw hand - head bob - final piece ;;; InstList_Shaktool_SawHand_HeadBob_FinalPiece: - dw Instruction_Common_WaitYFrames,$0014 ;AADA04; + dw Common_Instruction_WaitYFrames,$0014 ;AADA04; dw Instruction_Shaktool_ResetShaktoolFunctions ;AADA08; - dw Instruction_Common_GotoY ;AADA0A; + dw Common_Instruction_GotoY ;AADA0A; dw InstList_Shaktool_SawHand_FinalPiece ;AADA0C; @@ -8338,7 +7756,7 @@ InstList_Shaktool_SawHand_PrimaryPiece: dw $000A,Spritemaps_Shaktool_SawHand_PrimaryPiece_0 ;AADA0E; dw $000A,Spritemaps_Shaktool_SawHand_PrimaryPiece_1 ;AADA12; dw $000A,Spritemaps_Shaktool_SawHand_PrimaryPiece_2 ;AADA16; - dw Instruction_Common_GotoY ;AADA1A; + dw Common_Instruction_GotoY ;AADA1A; dw InstList_Shaktool_SawHand_PrimaryPiece ;AADA1C; @@ -8347,132 +7765,132 @@ InstList_Shaktool_SawHand_FinalPiece: dw $0003,Spritemaps_Shaktool_SawHand_FinalPiece_0 ;AADA1E; dw $0003,Spritemaps_Shaktool_SawHand_FinalPiece_1 ;AADA22; dw $0003,Spritemaps_Shaktool_SawHand_FinalPiece_2 ;AADA26; - dw Instruction_Common_GotoY ;AADA2A; + dw Common_Instruction_GotoY ;AADA2A; dw InstList_Shaktool_SawHand_FinalPiece ;AADA2C; ;;; $DA2E: Unused. Instruction list - Shaktool arm piece - attack - back ;;; UNUSED_InstList_Shaktool_ArmPiece_Attack_Back_AADA2E: - dw Instruction_Common_WaitYFrames,$00C0 ;AADA2E; + dw Common_Instruction_WaitYFrames,$00C0 ;AADA2E; dw UNUSED_Instruction_Shaktool_Lower1PixelAwayFromProj_AAD931 ;AADA32; - dw Instruction_Common_WaitYFrames,$0080 ;AADA34; + dw Common_Instruction_WaitYFrames,$0080 ;AADA34; dw UNUSED_Instruction_Shaktool_Raise1PixelTowardsProj_AAD93F ;AADA38; - dw Instruction_Common_WaitYFrames,$0100 ;AADA3A; - dw Instruction_Common_GotoY ;AADA3E; + dw Common_Instruction_WaitYFrames,$0100 ;AADA3A; + dw Common_Instruction_GotoY ;AADA3E; dw InstList_Shaktool_ArmPiece_Normal ;AADA40; ;;; $DA42: Unused. Instruction list - Shaktool arm piece - attack - front ;;; UNUSED_InstList_Shaktool_ArmPiece_Attack_Front_AADA42: - dw Instruction_Common_WaitYFrames,$0100 ;AADA42; + dw Common_Instruction_WaitYFrames,$0100 ;AADA42; dw UNUSED_Instruction_Shaktool_Lower1PixelAwayFromProj_AAD931 ;AADA46; - dw Instruction_Common_WaitYFrames,$0080 ;AADA48; + dw Common_Instruction_WaitYFrames,$0080 ;AADA48; dw UNUSED_Instruction_Shaktool_Raise1PixelTowardsProj_AAD93F ;AADA4C; - dw Instruction_Common_WaitYFrames,$00C0 ;AADA4E; - dw Instruction_Common_GotoY ;AADA52; + dw Common_Instruction_WaitYFrames,$00C0 ;AADA4E; + dw Common_Instruction_GotoY ;AADA52; dw InstList_Shaktool_ArmPiece_Normal ;AADA54; ;;; $DA56: Instruction list - Shaktool arm piece - head bob - back ;;; InstList_Shaktool_ArmPiece_HeadBob_Back: dw Instruction_Shaktool_Lower1Pixel ;AADA56; - dw Instruction_Common_WaitYFrames,$0014 ;AADA58; + dw Common_Instruction_WaitYFrames,$0014 ;AADA58; dw Instruction_Shaktool_Raise1Pixel ;AADA5C; - dw Instruction_Common_GotoY ;AADA5E; + dw Common_Instruction_GotoY ;AADA5E; dw InstList_Shaktool_ArmPiece_Normal ;AADA60; ;;; $DA62: Instruction list - Shaktool arm piece - head bob - front ;;; InstList_Shaktool_ArmPiece_HeadBob_Front: - dw Instruction_Common_WaitYFrames,$0004 ;AADA62; + dw Common_Instruction_WaitYFrames,$0004 ;AADA62; dw Instruction_Shaktool_Lower1Pixel ;AADA66; - dw Instruction_Common_WaitYFrames,$000C ;AADA68; + dw Common_Instruction_WaitYFrames,$000C ;AADA68; dw Instruction_Shaktool_Raise1Pixel ;AADA6C; - dw Instruction_Common_WaitYFrames,$0004 ;AADA6E; + dw Common_Instruction_WaitYFrames,$0004 ;AADA6E; ;;; $DA72: Instruction list - Shaktool arm piece - normal ;;; InstList_Shaktool_ArmPiece_Normal: dw $0077,Spritemaps_Shaktool_ArmPiece ;AADA72; - dw Instruction_Common_GotoY ;AADA76; + dw Common_Instruction_GotoY ;AADA76; dw InstList_Shaktool_ArmPiece_Normal ;AADA78; ;;; $DA7A: Unused. Instruction list - Shaktool head - attack ;;; UNUSED_InstList_Shaktool_Head_Attack_AADA7A: - dw Instruction_Common_WaitYFrames,$0080 ;AADA7A; + dw Common_Instruction_WaitYFrames,$0080 ;AADA7A; dw UNUSED_Instruction_Shaktool_Lower1PixelAwayFromProj_AAD931 ;AADA7E; dw RTL_AAD99F ;AADA80; - dw Instruction_Common_WaitYFrames,$0080 ;AADA82; + dw Common_Instruction_WaitYFrames,$0080 ;AADA82; dw UNUSED_Instruction_Shaktool_Raise1PixelTowardsProj_AAD93F ;AADA86; - dw Instruction_Common_WaitYFrames,$0140 ;AADA88; - dw Instruction_Common_WaitYFrames,$0001 ;AADA8C; + dw Common_Instruction_WaitYFrames,$0140 ;AADA88; + dw Common_Instruction_WaitYFrames,$0001 ;AADA8C; ;;; $DA90: Instruction list - Shaktool head - head bob ;;; InstList_Shaktool_Head_HeadBob: - dw Instruction_Common_WaitYFrames,$0008 ;AADA90; + dw Common_Instruction_WaitYFrames,$0008 ;AADA90; dw Instruction_Shaktool_Lower1Pixel ;AADA94; - dw Instruction_Common_WaitYFrames,$0004 ;AADA96; + dw Common_Instruction_WaitYFrames,$0004 ;AADA96; dw Instruction_Shaktool_Raise1Pixel ;AADA9A; - dw Instruction_Common_WaitYFrames,$0008 ;AADA9C; - dw Instruction_Common_WaitYFrames,$0001 ;AADAA0; + dw Common_Instruction_WaitYFrames,$0008 ;AADA9C; + dw Common_Instruction_WaitYFrames,$0001 ;AADAA0; ;;; $DAA4: Instruction list - Shaktool head - aiming left ;;; InstList_Shaktool_Head_AimingLeft: ; Useless observation: the graphical instruction delay is increasing by one for each of these instruction lists ^^; dw $0774,Spritemaps_Shaktool_Head_0 ;AADAA4; - dw Instruction_Common_GotoY ;AADAA8; + dw Common_Instruction_GotoY ;AADAA8; dw InstList_Shaktool_Head_AimingLeft ;AADAAA; ;;; $DAAC: Instruction list - Shaktool head - aiming up-left ;;; InstList_Shaktool_Head_AimingUpLeft: dw $0775,Spritemaps_Shaktool_Head_1 ;AADAAC; - dw Instruction_Common_GotoY ;AADAB0; + dw Common_Instruction_GotoY ;AADAB0; dw InstList_Shaktool_Head_AimingUpLeft ;AADAB2; ;;; $DAB4: Instruction list - Shaktool head - aiming up ;;; InstList_Shaktool_Head_AimingUp: dw $0776,Spritemaps_Shaktool_Head_2 ;AADAB4; - dw Instruction_Common_GotoY ;AADAB8; + dw Common_Instruction_GotoY ;AADAB8; dw InstList_Shaktool_Head_AimingUp ;AADABA; ;;; $DABC: Instruction list - Shaktool head - aiming up-right ;;; InstList_Shaktool_Head_AimingUpRight: dw $0777,Spritemaps_Shaktool_Head_3 ;AADABC; - dw Instruction_Common_GotoY ;AADAC0; + dw Common_Instruction_GotoY ;AADAC0; dw InstList_Shaktool_Head_AimingUpRight ;AADAC2; ;;; $DAC4: Instruction list - Shaktool head - aiming right ;;; InstList_Shaktool_Head_AimingRight: dw $0778,Spritemaps_Shaktool_Head_4 ;AADAC4; - dw Instruction_Common_GotoY ;AADAC8; + dw Common_Instruction_GotoY ;AADAC8; dw InstList_Shaktool_Head_AimingRight ;AADACA; ;;; $DACC: Instruction list - Shaktool head - aiming down-right ;;; InstList_Shaktool_Head_AimingDownRight: dw $0779,Spritemaps_Shaktool_Head_5 ;AADACC; - dw Instruction_Common_GotoY ;AADAD0; + dw Common_Instruction_GotoY ;AADAD0; dw InstList_Shaktool_Head_AimingDownRight ;AADAD2; ;;; $DAD4: Instruction list - Shaktool head - aiming down ;;; InstList_Shaktool_Head_AimingDown: dw $077A,Spritemaps_Shaktool_Head_6 ;AADAD4; - dw Instruction_Common_GotoY ;AADAD8; + dw Common_Instruction_GotoY ;AADAD8; dw InstList_Shaktool_Head_AimingDown ;AADADA; ;;; $DADC: Instruction list - Shaktool head - aiming down-left ;;; InstList_Shaktool_Head_AimingDownLeft: dw $077B,Spritemaps_Shaktool_Head_7 ;AADADC; - dw Instruction_Common_GotoY ;AADAE0; + dw Common_Instruction_GotoY ;AADAE0; dw InstList_Shaktool_Head_AimingDownLeft ;AADAE2; @@ -9046,7 +8464,7 @@ endif ; !FEATURE_KEEP_UNREFERENCED ;;; $DF2F: Enemy touch - enemy $F07F (Shaktool) ;;; EnemyTouch_Shaktool: - JSL.L NormalEnemyTouchAI ;AADF2F; + JSL.L NormalEnemyTouchAI_Internal ;AADF2F; RTL ;AADF33; @@ -9054,7 +8472,7 @@ EnemyTouch_Shaktool: EnemyShot_Shaktool: ; Bug: when an enemy dies and goes through its death animation, its enemy RAM is cleared, ; so the LDY always loads 0, meaning this only works out if Shaktool is the first enemy in the room - JSL.L NormalEnemyShotAI ;AADF34; + JSL.L NormalEnemyShotAI_Internal ;AADF34; LDX.W EnemyIndex ;AADF38; LDA.W Enemy.health,X ;AADF3B; BNE .return ;AADF3E; @@ -9246,15 +8664,15 @@ Palette_Chozo_LowerNorfair_SpritePalette2: ;;; $E39D: Instruction list - chozo statue - Lower Norfair - initial ;;; InstList_Chozo_LowerNorfair_Initial: - dw Instruction_Common_Enemy0FB2_InY ;AAE39D; + dw Common_Instruction_Enemy0FB2_InY ;AAE39D; dw Function_Chozo_LowerNorfair ;AAE39F; dw $0001,Spritemaps_Chozo_13 ;AAE3A1; - dw Instruction_Common_Sleep ;AAE3A5; + dw Common_Instruction_Sleep ;AAE3A5; ;;; $E3A7: Instruction list - chozo statue - Lower Norfair - activated ;;; InstList_Chozo_LowerNorfair_Activated_0: - dw Instruction_Common_SetEnemy0FB2ToRTS ;AAE3A7; + dw Common_Instruction_SetEnemy0FB2ToRTS ;AAE3A7; dw Instruction_Chozo_Movement_IndexInY,$0020 ;AAE3A9; dw $0020,Spritemaps_Chozo_13 ;AAE3AB; dw Instruction_Chozo_Movement_IndexInY,$0022 ;AAE3B1; @@ -9270,7 +8688,7 @@ InstList_Chozo_LowerNorfair_Activated_0: dw $000C,Spritemaps_Chozo_22 ;AAE3D7; dw $0060,Spritemaps_Chozo_23 ;AAE3DB; dw Instruction_Chozo_StartLoweringAcid ;AAE3DF; - dw Instruction_Common_TimerInY,$0005 ;AAE3E1; + dw Common_Instruction_TimerInY,$0005 ;AAE3E1; InstList_Chozo_LowerNorfair_Activated_1: dw $000B,Spritemaps_Chozo_20 ;AAE3E5; @@ -9279,9 +8697,9 @@ InstList_Chozo_LowerNorfair_Activated_1: dw $0008,Spritemaps_Chozo_23 ;AAE3F1; dw $0006,Spritemaps_Chozo_22 ;AAE3F5; dw $0008,Spritemaps_Chozo_21 ;AAE3F9; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AAE3FD; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AAE3FD; dw InstList_Chozo_LowerNorfair_Activated_1 ;AAE3FF; - dw Instruction_Common_SetEnemy0FB2ToRTS ;AAE401; + dw Common_Instruction_SetEnemy0FB2ToRTS ;AAE401; dw Instruction_Chozo_Movement_IndexInY,$0026 ;AAE403; dw $0080,Spritemaps_Chozo_16 ;AAE405; dw Instruction_Chozo_Movement_IndexInY,$0024 ;AAE40B; @@ -9292,7 +8710,7 @@ InstList_Chozo_LowerNorfair_Activated_1: dw $0020,Spritemaps_Chozo_13 ;AAE41D; dw Instruction_Chozo_UnlockSamus ;AAE423; dw Instruction_Chozo_SetLoweredAcidPosition ;AAE425; - dw Instruction_Common_Sleep ;AAE427; + dw Common_Instruction_Sleep ;AAE427; ;;; $E429: Instruction - start lowering acid ;;; @@ -9333,15 +8751,15 @@ Function_Chozo_LowerNorfair: ;;; $E457: Instruction list - chozo statue - Wrecked Ship - initial ;;; InstList_Chozo_WreckedShip_Initial: - dw Instruction_Common_Enemy0FB2_InY ;AAE457; + dw Common_Instruction_Enemy0FB2_InY ;AAE457; dw Function_Chozo_WreckedShip ;AAE459; dw $0001,Spritemaps_Chozo_0 ;AAE45B; - dw Instruction_Common_Sleep ;AAE45F; + dw Common_Instruction_Sleep ;AAE45F; ;;; $E461: Instruction list - chozo statue - Wrecked Ship - activated ;;; InstList_Chozo_WreckedShip_Activated_0: - dw Instruction_Common_SetEnemy0FB2ToRTS ;AAE461; + dw Common_Instruction_SetEnemy0FB2ToRTS ;AAE461; dw Instruction_Chozo_Movement_IndexInY,$0000 ;AAE463; dw $0020,Spritemaps_Chozo_0 ;AAE465; dw Instruction_Chozo_Movement_IndexInY,$0002 ;AAE46B; @@ -9356,7 +8774,7 @@ InstList_Chozo_WreckedShip_Activated_0: dw $000A,Spritemaps_Chozo_E ;AAE48D; dw $000C,Spritemaps_Chozo_F ;AAE491; dw $0080,Spritemaps_Chozo_10 ;AAE495; - dw Instruction_Common_TimerInY,$0004 ;AAE499; + dw Common_Instruction_TimerInY,$0004 ;AAE499; InstList_Chozo_WreckedShip_Activated_1: dw $000B,Spritemaps_Chozo_D ;AAE49D; @@ -9365,11 +8783,11 @@ InstList_Chozo_WreckedShip_Activated_1: dw $0008,Spritemaps_Chozo_10 ;AAE4A9; dw $0006,Spritemaps_Chozo_F ;AAE4AD; dw $0008,Spritemaps_Chozo_E ;AAE4B1; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AAE4B5; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AAE4B5; dw InstList_Chozo_WreckedShip_Activated_1 ;AAE4B7; - dw Instruction_Common_Enemy0FB2_InY ;AAE4B9; + dw Common_Instruction_Enemy0FB2_InY ;AAE4B9; dw RTS_AAE7DA ;AAE4BB; - dw Instruction_Common_TimerInY,$0010 ;AAE4BD; + dw Common_Instruction_TimerInY,$0010 ;AAE4BD; InstList_Chozo_WreckedShip_Activated_2: dw Instruction_Chozo_Movement_IndexInY,$0016 ;AAE4C1; @@ -9398,7 +8816,7 @@ InstList_Chozo_WreckedShip_Activated_2: dw Instruction_Chozo_Movement_IndexInY,$0014 ;AAE519; dw Instruction_Chozo_SpawnChozoSpikeClearingFootstepProjectile,$0000 ;AAE51D; dw $0006,Spritemaps_Chozo_A ;AAE51F; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;AAE525; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;AAE525; dw InstList_Chozo_WreckedShip_Activated_2 ;AAE527; dw Instruction_Chozo_Movement_IndexInY,$0016 ;AAE529; dw Instruction_Chozo_SpawnChozoSpikeClearingFootstepProjectile,$FFF8 ;AAE52D; @@ -9412,7 +8830,7 @@ InstList_Chozo_WreckedShip_Activated_2: dw Instruction_Chozo_Movement_IndexInY,$000C ;AAE54D; dw Instruction_Chozo_SpawnChozoSpikeClearingFootstepProjectile,$0000 ;AAE551; dw $0006,Spritemaps_Chozo_6 ;AAE553; - dw Instruction_Common_SetEnemy0FB2ToRTS ;AAE559; + dw Common_Instruction_SetEnemy0FB2ToRTS ;AAE559; dw Instruction_Chozo_Movement_IndexInY,$0006 ;AAE55B; dw $0080,Spritemaps_Chozo_3 ;AAE55D; dw Instruction_Chozo_Movement_IndexInY,$0004 ;AAE563; @@ -9422,7 +8840,7 @@ InstList_Chozo_WreckedShip_Activated_2: dw Instruction_Chozo_Movement_IndexInY,$0000 ;AAE573; dw $0020,Spritemaps_Chozo_0 ;AAE575; dw Instruction_Chozo_ReleaseSamus_BlockSlopeAccess ;AAE57B; - dw Instruction_Common_Sleep ;AAE57D; + dw Common_Instruction_Sleep ;AAE57D; ;;; $E57F: Instruction - queue chozo grabs Samus sound effect ;;; @@ -9586,7 +9004,7 @@ InitAI_Chozo: LDA.W Enemy.properties,X ;AAE728; ORA.W #$A800 ;AAE72B; STA.W Enemy.properties,X ;AAE72E; - LDA.W #Spritemap_Common_Nothing ;AAE731; + LDA.W #Common_Spritemap_Nothing ;AAE731; STA.W Enemy.spritemap,X ;AAE734; LDA.W #$0001 ;AAE737; STA.W Enemy.instTimer,X ;AAE73A; diff --git a/src/bank_B2.asm b/src/bank_B2.asm index f2128cb..9454f4a 100644 --- a/src/bank_B2.asm +++ b/src/bank_B2.asm @@ -3,591 +3,9 @@ org $B28000 ; Common to all enemy code banks - -;;; $8000: Grapple AI - no interaction. Also unfreezes enemies(!) ;;; -CommonB2_GrappleAI_NoInteraction: -; Used by skultera, Draygon body, fire arc, Phantoon, etecoon, dachora and WS ghost - JSL.L GrappleAI_SwitchEnemyAIToMainAI ;B28000; - RTL ;B28004; - - -;;; $8005: Grapple AI - Samus latches on ;;; -CommonB2_GrappleAI_SamusLatchesOn: -; Used by gripper and Crocomire - JSL.L GrappleAI_SamusLatchesOnWithGrapple ;B28005; - RTL ;B28009; - - -;;; $800A: Grapple AI - kill enemy ;;; -CommonB2_GrappleAI_KillEnemy: -; Common - JSL.L GrappleAI_EnemyGrappleDeath ;B2800A; - RTL ;B2800E; - - -;;; $800F: Grapple AI - cancel grapple beam ;;; -CommonB2_GrappleAI_CancelGrappleBeam: -; Common - JSL.L GrappleAI_SwitchToFrozenAI ;B2800F; - RTL ;B28013; - - -;;; $8014: Grapple AI - Samus latches on - no invincibility ;;; -CommonB2_GrappleAI_SamusLatchesOn_NoInvincibility: -; Used by powamp - JSL.L GrappleAI_SamusLatchesOnWithGrapple_NoInvincibility ;B28014; - RTL ;B28018; - - -;;; $8019: Unused. Grapple AI - Samus latches on - paralyse enemy ;;; -UNUSED_CommonB2_GrappleAI_SamusLatchesOn_ParalyzeEnemy_B28019: - JSL.L GrappleAI_SamusLatchesOnWithGrapple_ParalyzeEnemy ;B28019; - RTL ;B2801D; - - -;;; $801E: Grapple AI - hurt Samus ;;; -CommonB2_GrappleAI_HurtSamus: -; Used by WS spark -; Hurt reaction happens in $9B:B932 - JSL.L GrappleAI_SwitchToFrozenAI_duplicate ;B2801E; - RTL ;B28022; - - -;;; $8023: Normal enemy touch AI ;;; -CommonB2_NormalEnemyTouchAI: - JSL.L NormalEnemyTouchAI ;B28023; - RTL ;B28027; - - -;;; $8028: Normal touch AI - no death check ;;; -CommonB2_NormalTouchAI_NoDeathCheck: - JSL.L NormalEnemyTouchAI_NoDeathCheck_External ;B28028; - RTL ;B2802C; - - -;;; $802D: Normal enemy shot AI ;;; -CommonB2_NormalEnemyShotAI: - JSL.L NormalEnemyShotAI ;B2802D; - RTL ;B28031; - - -;;; $8032: Normal enemy shot AI - no death check, no enemy shot graphic ;;; -CommonB2_NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic: - JSL.L NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic_External ;B28032; - RTL ;B28036; - - -;;; $8037: Normal enemy power bomb AI ;;; -CommonB2_NormalEnemyPowerBombAI: - JSL.L NormalEnemyPowerBombAI ;B28037; - RTL ;B2803B; - - -;;; $803C: Normal enemy power bomb AI - no death check ;;; -CommonB2_NormalEnemyPowerBombAI_NoDeathCheck: -; Kraid's power bomb AI - JSL.L NormalEnemyPowerBombAI_NoDeathCheck_External ;B2803C; - RTL ;B28040; - - -;;; $8041: Normal enemy frozen AI ;;; -CommonB2_NormalEnemyFrozenAI: - JSL.L NormalEnemyFrozenAI ;B28041; - RTL ;B28045; - - -;;; $8046: Creates a dud shot ;;; -CommonB2_CreateADudShot: - JSL.L CreateADudShot ;B28046; - RTL ;B2804A; - - -;;; $804B: RTS ;;; -RTS_B2804B: - RTS ;B2804B; - - -;;; $804C: RTL ;;; -RTL_B2804C: - RTL ;B2804C; - - -;;; $804D: Spritemap - nothing ;;; -Spritemap_CommonB2_Nothing: - dw $0000 ;B2804D; - - -;;; $804F: Extended spritemap - nothing ;;; -ExtendedSpritemap_CommonB2_Nothing: - dw $0001 ;B2804F; - dw $0000,$0000 - dw Spritemap_CommonB2_Nothing ;B28055; - dw Hitbox_CommonB2_Nothing ;B28057; - - -;;; $8059: Hitbox - nothing ;;; -Hitbox_CommonB2_Nothing: -; [n entries] [[left offset] [top offset] [right offset] [bottom offset] [p touch] [p shot]]... - dw $0001 ;B28059; - dw $0000,$0000,$0000,$0000 - dw CommonB2_NormalEnemyTouchAI ;B28063; - dw CommonB2_NormalEnemyShotAI ;B28065; - - -;;; $8067: Instruction list - delete enemy ;;; -InstList_CommonB2_DeleteEnemy: - dw Instruction_CommonB2_DeleteEnemy ;B28067; - - -;;; $8069: Two NOPs ;;; -NOPNOP_B28069: -; Used as palette by respawning enemy placeholder and Draygon's eye o_O - NOP ;B28069; - NOP ;B2806A; - - -;;; $806B: Instruction - Enemy.var5 = [[Y]] ;;; -Instruction_CommonB2_Enemy0FB2_InY: -; Used only by torizos (for enemy movement function) and escape etecoon (for enemy function) - LDA.W $0000,Y ;B2806B; - STA.W Enemy.var5,X ;B2806E; - INY ;B28071; - INY ;B28072; - RTL ;B28073; - - -;;; $8074: Instruction - Enemy.var5 = RTS ;;; -Instruction_CommonB2_SetEnemy0FB2ToRTS: - LDA.W #RTS_B2807B ;B28074; - STA.W Enemy.var5,X ;B28077; - RTL ;B2807A; - - -RTS_B2807B: - RTS ;B2807B; - - -;;; $807C: Instruction - delete enemy ;;; -Instruction_CommonB2_DeleteEnemy: - LDA.W Enemy.properties,X ;B2807C; - ORA.W #$0200 ;B2807F; - STA.W Enemy.properties,X ;B28082; - PLA ;B28085; - PEA.W ProcessEnemyInstructions_return-1 ;B28086; - RTL ;B28089; - - -;;; $808A: Instruction - call function [[Y]] ;;; -Instruction_CommonB2_CallFunctionInY: - LDA.W $0000,Y ;B2808A; - STA.B DP_Temp12 ;B2808D; - PHY ;B2808F; - PHX ;B28090; - PEA.W .manualReturn-1 ;B28091; - JMP.W (DP_Temp12) ;B28094; - - .manualReturn: - PLX ;B28097; - PLY ;B28098; - INY ;B28099; - INY ;B2809A; - RTL ;B2809B; - - -;;; $809C: Instruction - call function [[Y]] with A = [[Y] + 2] ;;; -Instruction_CommonB2_CallFunctionInY_WithA: - LDA.W $0000,Y ;B2809C; - STA.B DP_Temp12 ;B2809F; - LDA.W $0002,Y ;B280A1; - PHY ;B280A4; - PHX ;B280A5; - PEA.W .manualReturn-1 ;B280A6; - JMP.W (DP_Temp12) ;B280A9; - - .manualReturn: - PLX ;B280AC; - PLY ;B280AD; - TYA ;B280AE; - CLC ;B280AF; - ADC.W #$0004 ;B280B0; - TAY ;B280B3; - RTL ;B280B4; - - -if !FEATURE_KEEP_UNREFERENCED -;;; $80B5: Unused. Instruction - call external function [[Y]] ;;; -UNUSED_Instruction_CommonB2_CallExternalFunctionInY_B280B5: - LDA.W $0000,Y ;B280B5; - STA.B DP_Temp12 ;B280B8; - LDA.W $0001,Y ;B280BA; - STA.B DP_Temp13 ;B280BD; - PHX ;B280BF; - PHY ;B280C0; - JSL.L .externalFunction ;B280C1; - PLY ;B280C5; - PLX ;B280C6; - INY ;B280C7; - INY ;B280C8; - INY ;B280C9; - RTL ;B280CA; - - .externalFunction: - JML.W [DP_Temp12] ;B280CB; - - -;;; $80CE: Unused. Instruction - call external function [[Y]] with A = [[Y] + 3] ;;; -UNUSED_Inst_CommonB2_CallExternalFunctionInY_WithA_B280CE: - LDA.W $0000,Y ;B280CE; - STA.B DP_Temp12 ;B280D1; - LDA.W $0001,Y ;B280D3; - STA.B DP_Temp13 ;B280D6; - LDA.W $0003,Y ;B280D8; - PHX ;B280DB; - PHY ;B280DC; - JSL.L .externalFunction ;B280DD; - PLY ;B280E1; - PLX ;B280E2; - TYA ;B280E3; - CLC ;B280E4; - ADC.W #$0005 ;B280E5; - TAY ;B280E8; - RTL ;B280E9; - - .externalFunction: - JML.W [DP_Temp12] ;B280EA; -endif ; !FEATURE_KEEP_UNREFERENCED - - -;;; $80ED: Instruction - go to [[Y]] ;;; -Instruction_CommonB2_GotoY: - LDA.W $0000,Y ;B280ED; - TAY ;B280F0; - RTL ;B280F1; - - -;;; $80F2: Instruction - go to [[Y]] + ±[[Y]] ;;; -Instruction_CommonB2_GotoY_PlusY: - STY.B DP_Temp12 ;B280F2; - DEY ;B280F4; - LDA.W $0000,Y ;B280F5; - XBA ;B280F8; - BMI .highByte ;B280F9; - AND.W #$00FF ;B280FB; - BRA + ;B280FE; - - .highByte: - ORA.W #$FF00 ;B28100; - -+ CLC ;B28103; - ADC.B DP_Temp12 ;B28104; - TAY ;B28106; - RTL ;B28107; - - -;;; $8108: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonB2_DecrementTimer_GotoYIfNonZero: - DEC.W Enemy.loopCounter,X ;B28108; - BNE Instruction_CommonB2_GotoY ;B2810B; - INY ;B2810D; - INY ;B2810E; - RTL ;B2810F; - - -;;; $8110: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonB2_DecrementTimer_GotoYIfNonZero_duplicate: - DEC.W Enemy.loopCounter,X ;B28110; - BNE Instruction_CommonB2_GotoY ;B28113; - INY ;B28115; - INY ;B28116; - RTL ;B28117; - - -;;; $8118: Instruction - decrement timer and go to [Y] + ±[[Y]] if non-zero ;;; -Instruction_CommonB2_DecrementTimer_GotoY_PlusY_IfNonZero: - SEP #$20 ;B28118; - DEC.W Enemy.loopCounter,X ;B2811A; - REP #$20 ;B2811D; - BNE Instruction_CommonB2_GotoY_PlusY ;B2811F; - INY ;B28121; - RTL ;B28122; - - -;;; $8123: Instruction - timer = [[Y]] ;;; -Instruction_CommonB2_TimerInY: - LDA.W $0000,Y ;B28123; - STA.W Enemy.loopCounter,X ;B28126; - INY ;B28129; - INY ;B2812A; - RTL ;B2812B; - - -;;; $812C: Instruction - skip next instruction ;;; -Instruction_CommonB2_SkipNextInstruction: - INY ;B2812C; - INY ;B2812D; - RTL ;B2812E; - - -;;; $812F: Instruction - sleep ;;; -Instruction_CommonB2_Sleep: - DEY ;B2812F; - DEY ;B28130; - TYA ;B28131; - STA.W Enemy.instList,X ;B28132; - PLA ;B28135; - PEA.W ProcessEnemyInstructions_return-1 ;B28136; - RTL ;B28139; - - -;;; $813A: Instruction - wait [[Y]] frames ;;; -Instruction_CommonB2_WaitYFrames: -; Set instruction timer and terminate processing enemy instructions -; Used for running a delay that doesn't update graphics, -; useful for e.g. GT eye beam attack ($AA:D10D), implemented by an instruction list that has no graphical instructions, -; which allows it to be called from multiple different poses - LDA.W $0000,Y ;B2813A; - STA.W Enemy.instTimer,X ;B2813D; - INY ;B28140; - INY ;B28141; - TYA ;B28142; - STA.W Enemy.instList,X ;B28143; - PLA ;B28146; - PEA.W ProcessEnemyInstructions_return-1 ;B28147; - RTL ;B2814A; - - -;;; $814B: Instruction - transfer [[Y]] bytes from [[Y] + 2] to VRAM [[Y] + 5] ;;; -Instruction_CommonB2_TransferYBytesInYToVRAM: - PHX ;B2814B; - LDX.W VRAMWriteStack ;B2814C; - LDA.W $0000,Y ;B2814F; - STA.B VRAMWrite.size,X ;B28152; - LDA.W $0002,Y ;B28154; - STA.B VRAMWrite.src,X ;B28157; - LDA.W $0003,Y ;B28159; - STA.B VRAMWrite.src+1,X ;B2815C; - LDA.W $0005,Y ;B2815E; - STA.B VRAMWrite.dest,X ;B28161; - TXA ;B28163; - CLC ;B28164; - ADC.W #$0007 ;B28165; - STA.W VRAMWriteStack ;B28168; - TYA ;B2816B; - CLC ;B2816C; - ADC.W #$0007 ;B2816D; - TAY ;B28170; - PLX ;B28171; - RTL ;B28172; - - -;;; $8173: Instruction - enable off-screen processing ;;; -Instruction_CommonB2_EnableOffScreenProcessing: - LDA.W Enemy.properties,X ;B28173; - ORA.W #$0800 ;B28176; - STA.W Enemy.properties,X ;B28179; - RTL ;B2817C; - - -;;; $817D: Instruction - disable off-screen processing ;;; -Instruction_CommonB2_DisableOffScreenProcessing: - LDA.W Enemy.properties,X ;B2817D; - AND.W #$F7FF ;B28180; - STA.W Enemy.properties,X ;B28183; - RTL ;B28186; - - -;;; $8187: Common enemy speeds - linearly increasing ;;; -CommonB2EnemySpeeds_LinearlyIncreasing: -; _____________________ Speed -; | _______________ Subspeed -; | | _________ Negated speed -; | | | ___ Negated subspeed -; | | | | - .speed: - dw $0000 ;B28187; - .subspeed: - dw $0000 ;B28189; - .negatedSpeed: - dw $0000 ;B2818B; - .negatedSubspeed: - dw $0000 ;B2818D; - dw $0000,$1000,$FFFF,$F000 - dw $0000,$2000,$FFFF,$E000 - dw $0000,$3000,$FFFF,$D000 - dw $0000,$4000,$FFFF,$C000 - dw $0000,$5000,$FFFF,$B000 - dw $0000,$6000,$FFFF,$A000 - dw $0000,$7000,$FFFF,$9000 - dw $0000,$8000,$FFFF,$8000 - dw $0000,$9000,$FFFF,$7000 - dw $0000,$A000,$FFFF,$6000 - dw $0000,$B000,$FFFF,$5000 - dw $0000,$C000,$FFFF,$4000 - dw $0000,$D000,$FFFF,$3000 - dw $0000,$E000,$FFFF,$2000 - dw $0000,$F000,$FFFF,$1000 - dw $0001,$0000,$FFFF,$0000 - dw $0001,$1000,$FFFE,$F000 - dw $0001,$2000,$FFFE,$E000 - dw $0001,$3000,$FFFE,$D000 - dw $0001,$4000,$FFFE,$C000 - dw $0001,$5000,$FFFE,$B000 - dw $0001,$6000,$FFFE,$A000 - dw $0001,$7000,$FFFE,$9000 - dw $0001,$8000,$FFFE,$8000 - dw $0001,$9000,$FFFE,$7000 - dw $0001,$A000,$FFFE,$6000 - dw $0001,$B000,$FFFE,$5000 - dw $0001,$C000,$FFFE,$4000 - dw $0001,$D000,$FFFE,$3000 - dw $0001,$E000,$FFFE,$2000 - dw $0001,$F000,$FFFE,$1000 - dw $0002,$0000,$FFFE,$0000 - dw $0002,$1000,$FFFD,$F000 - dw $0002,$2000,$FFFD,$E000 - dw $0002,$3000,$FFFD,$D000 - dw $0002,$4000,$FFFD,$C000 - dw $0002,$5000,$FFFD,$B000 - dw $0002,$6000,$FFFD,$A000 - dw $0002,$7000,$FFFD,$9000 - dw $0002,$8000,$FFFD,$8000 - dw $0002,$9000,$FFFD,$7000 - dw $0002,$A000,$FFFD,$6000 - dw $0002,$B000,$FFFD,$5000 - dw $0002,$C000,$FFFD,$4000 - dw $0002,$D000,$FFFD,$3000 - dw $0002,$E000,$FFFD,$2000 - dw $0002,$F000,$FFFD,$1000 - dw $0003,$0000,$FFFD,$0000 - dw $0003,$1000,$FFFC,$F000 - dw $0003,$2000,$FFFC,$E000 - dw $0003,$3000,$FFFC,$D000 - dw $0003,$4000,$FFFC,$C000 - dw $0003,$5000,$FFFC,$B000 - dw $0003,$6000,$FFFC,$A000 - dw $0003,$7000,$FFFC,$9000 - dw $0003,$8000,$FFFC,$8000 - dw $0003,$9000,$FFFC,$7000 - dw $0003,$A000,$FFFC,$6000 - dw $0003,$B000,$FFFC,$5000 - dw $0003,$C000,$FFFC,$4000 - dw $0003,$D000,$FFFC,$3000 - dw $0003,$E000,$FFFC,$2000 - dw $0003,$F000,$FFFC,$1000 - dw $0004,$0000,$FFFC,$0000 - - -;;; $838F: Common enemy speeds - quadratically increasing ;;; -CommonB2EnemySpeeds_QuadraticallyIncreasing: -; I.e. gravity -; Used by e.g. Botwoon when dying and falling to the floor -; _____________________ Subspeed -; | _______________ Speed -; | | _________ Negated subspeed -; | | | ___ Negated speed -; | | | | - .subspeed: - dw $0000 ;B2838F; - .speed: - dw $0000 ;B28391; - .negatedSubspeed: - dw $0000 ;B28393; - .negatedSpeed: - dw $0000 ;B28395; - dw $0109,$0000,$FEF7,$FFFF - dw $031B,$0000,$FCE5,$FFFF - dw $0636,$0000,$F9CA,$FFFF - dw $0A5A,$0000,$F5A6,$FFFF - dw $0F87,$0000,$F079,$FFFF - dw $15BD,$0000,$EA43,$FFFF - dw $1CFC,$0000,$E304,$FFFF - dw $2544,$0000,$DABC,$FFFF - dw $2E95,$0000,$D16B,$FFFF - dw $38EF,$0000,$C711,$FFFF - dw $4452,$0000,$BBAE,$FFFF - dw $50BE,$0000,$AF42,$FFFF - dw $5E33,$0000,$A1CD,$FFFF - dw $6CB1,$0000,$934F,$FFFF - dw $7C38,$0000,$83C8,$FFFF - dw $8CC8,$0000,$7338,$FFFF - dw $9E61,$0000,$619F,$FFFF - dw $B103,$0000,$4EFD,$FFFF - dw $C4AE,$0000,$3B52,$FFFF - dw $D962,$0000,$269E,$FFFF - dw $EF1F,$0000,$10E1,$FFFF - dw $05E5,$0000,$FA1B,$FFFF - dw $14B4,$0001,$EB4C,$FFFE - dw $2D8C,$0001,$D274,$FFFE - dw $476D,$0001,$B893,$FFFE - dw $6257,$0001,$9DA9,$FFFE - dw $7E4A,$0001,$81B6,$FFFE - dw $9B46,$0001,$64BA,$FFFE - dw $B94B,$0001,$46B5,$FFFE - dw $D859,$0001,$27A7,$FFFE - dw $F870,$0001,$0790,$FFFE - dw $1090,$0002,$EF70,$FFFD - dw $32B9,$0002,$CD47,$FFFD - dw $55EB,$0002,$AA15,$FFFD - dw $7A26,$0002,$85DA,$FFFD - dw $9F6A,$0002,$6096,$FFFD - dw $C5B7,$0002,$3A49,$FFFD - dw $ED0D,$0002,$12F3,$FFFD - dw $0C6C,$0003,$F394,$FFFC - dw $35D4,$0003,$CA2C,$FFFC - dw $6045,$0003,$9FBB,$FFFC - dw $8BBF,$0003,$7441,$FFFC - dw $B842,$0003,$47BE,$FFFC - dw $E5CE,$0003,$1A32,$FFFC - dw $0B63,$0004,$F49D,$FFFB - dw $3B01,$0004,$C4FF,$FFFB - dw $6BA8,$0004,$9458,$FFFB - dw $9D58,$0004,$62A8,$FFFB - dw $D011,$0004,$2FEF,$FFFB - dw $03D3,$0004,$FC2D,$FFFB - dw $2F9E,$0005,$D062,$FFFA - dw $6572,$0005,$9A8E,$FFFA - dw $9C4F,$0005,$63B1,$FFFA - dw $D435,$0005,$2BCB,$FFFA - dw $0424,$0006,$FBDC,$FFF9 - dw $3E1C,$0006,$C1E4,$FFF9 - dw $791D,$0006,$86E3,$FFF9 - dw $B527,$0006,$4AD9,$FFF9 - dw $F23A,$0006,$0DC6,$FFF9 - dw $2756,$0007,$D8AA,$FFF8 - dw $667B,$0007,$9985,$FFF8 - dw $A6A9,$0007,$5957,$FFF8 - dw $E7E0,$0007,$1820,$FFF8 - dw $2120,$0008,$DEE0,$FFF7 - dw $6469,$0008,$9B97,$FFF7 - dw $A8BB,$0008,$5745,$FFF7 - dw $EE16,$0008,$11EA,$FFF7 - dw $2B7A,$0009,$D486,$FFF6 - dw $72E7,$0009,$8D19,$FFF6 - dw $BB5D,$0009,$44A3,$FFF6 - dw $04DC,$0009,$FB24,$FFF6 - dw $4664,$000A,$B99C,$FFF5 - dw $91F5,$000A,$6E0B,$FFF5 - dw $DE8F,$000A,$2171,$FFF5 - dw $2332,$000B,$DCCE,$FFF4 - dw $71DE,$000B,$8E22,$FFF4 - dw $C193,$000B,$3E6D,$FFF4 - dw $0951,$000C,$F6AF,$FFF3 - dw $5B18,$000C,$A4E8,$FFF3 - dw $ADE8,$000C,$5218,$FFF3 - dw $01C1,$000C,$FE3F,$FFF3 - dw $4DA3,$000D,$B25D,$FFF2 - dw $A38E,$000D,$5C72,$FFF2 - dw $FA82,$000D,$057E,$FFF2 - dw $497F,$000E,$B681,$FFF1 - dw $A285,$000E,$5D7B,$FFF1 - dw $FC94,$000E,$036C,$FFF1 - dw $4EAC,$000F,$B154,$FFF0 - dw $AACD,$000F,$5533,$FFF0 - dw $07F7,$000F,$F809,$FFF0 - dw $5D2A,$0010,$A2D6,$FFEF - dw $BC66,$0010,$439A,$FFEF - dw $13AB,$0011,$EC55,$FFEE - dw $74F9,$0011,$8B07,$FFEE +namespace CommonB2 +incsrc "common_enemy_functions.asm" +namespace off ;;; $8687: Palette - enemy $F353/$F4D3/$F653 (grey space pirate) ;;; @@ -637,7 +55,7 @@ endif ; !FEATURE_KEEP_UNREFERENCED ;;; $8767: Power bomb reaction - enemy $F353/$F4D3/$F513/$F553/$F593/$F5D3/$F613/$F653/$F693/$F6D3/$F713/$F753/$F793 (grey wall space pirate / ninja space pirates / walking space pirates) ;;; PowerBombReaction_Ninja_Walking_GreyWall: - JSL.L NormalEnemyPowerBombAI ;B28767; + JSL.L NormalEnemyPowerBombAI_Internal ;B28767; RTL ;B2876B; @@ -646,7 +64,7 @@ EnemyTouch_SpacePirate: LDX.W EnemyIndex ;B2876C; LDA.W Enemy.freezeTimer,X ;B2876F; BNE .return ;B28772; - JSL.L NormalEnemyTouchAI ;B28774; + JSL.L NormalEnemyTouchAI_Internal ;B28774; .return: RTL ;B28778; @@ -658,7 +76,7 @@ EnemyShot_SpacePirate_Normal: LDA.W Enemy.ID,X ;B2877C; CMP.W #EnemyHeaders_PirateGoldNinja ;B2877F; BEQ NormalPirateShot ;B28782; - JSL.L NormalEnemyShotAI ;B28784; + JSL.L NormalEnemyShotAI_Internal ;B28784; RTL ;B28788; @@ -9063,14 +8481,14 @@ InstList_PirateWall_FireLaser_WallJumpLeft: dw $0009,ExtendedSpritemaps_PirateWall_E ;B2ECC4; dw $000F,ExtendedSpritemaps_PirateWall_F ;B2ECC8; dw Instruction_PirateWall_FireLaserLeft ;B2ECCC; - dw Instruction_Common_WaitYFrames,$0020 ;B2ECCE; + dw Common_Instruction_WaitYFrames,$0020 ;B2ECCE; dw Instruction_PirateWall_PrepareWallJumpToLeft ;B2ECD2; dw Instruction_PirateWall_FunctionInY ;B2ECD4; dw Function_PirateWall_WallJumpingLeft ;B2ECD6; dw Instruction_PirateWall_QueueSpacePirateAttackSFX ;B2ECD8; dw $000A,ExtendedSpritemaps_PirateWall_10 ;B2ECDA; dw $0001,ExtendedSpritemaps_PirateWall_11 ;B2ECDE; - dw Instruction_Common_Sleep ;B2ECE2; + dw Common_Instruction_Sleep ;B2ECE2; ;;; $ECE4: Instruction list - landed on left wall ;;; @@ -9084,7 +8502,7 @@ InstList_PirateWall_LandedOnLeftWall: InstList_PirateWall_MovingUpLeftWall_0: dw Instruction_PirateWall_FunctionInY ;B2ECEC; dw Function_PirateWall_ClimbingLeftWall ;B2ECEE; - dw Instruction_Common_TimerInY,$0004 ;B2ECF0; + dw Common_Instruction_TimerInY,$0004 ;B2ECF0; InstList_PirateWall_MovingUpLeftWall_1: dw $000A,ExtendedSpritemaps_PirateWall_0 ;B2ECF4; @@ -9102,7 +8520,7 @@ InstList_PirateWall_MovingUpLeftWall_1: dw $0005,ExtendedSpritemaps_PirateWall_2 ;B2ED22; dw Inst_PirateWall_MoveYPixelsDown_ChangeDirOnCollision_Left,$FFFD ;B2ED28; dw $0008,ExtendedSpritemaps_PirateWall_1 ;B2ED2A; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;B2ED30; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;B2ED30; dw InstList_PirateWall_MovingUpLeftWall_1 ;B2ED32; dw Instruction_PirateWall_RandomlyChooseADirection_LeftWall ;B2ED34; @@ -9111,7 +8529,7 @@ InstList_PirateWall_MovingUpLeftWall_1: InstList_PirateWall_MovingDownLeftWall_0: dw Instruction_PirateWall_FunctionInY ;B2ED36; dw Function_PirateWall_ClimbingLeftWall ;B2ED38; - dw Instruction_Common_TimerInY,$0004 ;B2ED3A; + dw Common_Instruction_TimerInY,$0004 ;B2ED3A; InstList_PirateWall_MovingDownLeftWall_1: dw $000A,ExtendedSpritemaps_PirateWall_0 ;B2ED3E; @@ -9129,7 +8547,7 @@ InstList_PirateWall_MovingDownLeftWall_1: dw $0005,ExtendedSpritemaps_PirateWall_2 ;B2ED6E; dw Inst_PirateWall_MoveYPixelsDown_ChangeDirOnCollision_Left,$0003 ;B2ED72; dw $0008,ExtendedSpritemaps_PirateWall_1 ;B2ED74; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;B2ED7A; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;B2ED7A; dw InstList_PirateWall_MovingDownLeftWall_1 ;B2ED7C; dw Instruction_PirateWall_RandomlyChooseADirection_LeftWall ;B2ED7E; @@ -9141,14 +8559,14 @@ InstList_PirateWall_FireLaser_WallJumpRight: dw $0009,ExtendedSpritemaps_PirateWall_5 ;B2ED84; dw $0001,ExtendedSpritemaps_PirateWall_6 ;B2ED88; dw Instruction_PirateWall_FireLaserRight ;B2ED8C; - dw Instruction_Common_WaitYFrames,$0020 ;B2ED8E; + dw Common_Instruction_WaitYFrames,$0020 ;B2ED8E; dw Instruction_PirateWall_PrepareWallJumpToRight ;B2ED92; dw Instruction_PirateWall_FunctionInY ;B2ED94; dw Function_PirateWall_WallJumpingRight ;B2ED96; dw Instruction_PirateWall_QueueSpacePirateAttackSFX ;B2ED98; dw $000A,ExtendedSpritemaps_PirateWall_7 ;B2ED9A; dw $0001,ExtendedSpritemaps_PirateWall_8 ;B2ED9E; - dw Instruction_Common_Sleep ;B2EDA2; + dw Common_Instruction_Sleep ;B2EDA2; ;;; $EDA4: Instruction list - landed on right wall ;;; @@ -9162,7 +8580,7 @@ InstList_PirateWall_LandingOnRightWall: InstList_PirateWall_MovingDownRightWall_0: dw Instruction_PirateWall_FunctionInY ;B2EDAC; dw Function_PirateWall_ClimbingRightWall ;B2EDAE; - dw Instruction_Common_TimerInY,$0004 ;B2EDB0; + dw Common_Instruction_TimerInY,$0004 ;B2EDB0; InstList_PirateWall_MovingDownRightWall_1: dw $000A,ExtendedSpritemaps_PirateWall_9 ;B2EDB4; @@ -9180,7 +8598,7 @@ InstList_PirateWall_MovingDownRightWall_1: dw $0005,ExtendedSpritemaps_PirateWall_B ;B2EDE2; dw Inst_PirateWall_MoveYPixelsDown_ChangeDirOnCollision_Right,$0003 ;B2EDE8; dw $0008,ExtendedSpritemaps_PirateWall_A ;B2EDEA; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;B2EDF0; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;B2EDF0; dw InstList_PirateWall_MovingDownRightWall_1 ;B2EDF2; dw Instruction_PirateWall_RandomlyChooseADirection_RightWall ;B2EDF4; @@ -9189,7 +8607,7 @@ InstList_PirateWall_MovingDownRightWall_1: InstList_PirateWall_MovingUpRightWall_0: dw Instruction_PirateWall_FunctionInY ;B2EDF6; dw Function_PirateWall_ClimbingRightWall ;B2EDF8; - dw Instruction_Common_TimerInY,$0004 ;B2EDFA; + dw Common_Instruction_TimerInY,$0004 ;B2EDFA; InstList_PirateWall_MovingUpRightWall_1: dw $000A,ExtendedSpritemaps_PirateWall_9 ;B2EDFE; @@ -9207,7 +8625,7 @@ InstList_PirateWall_MovingUpRightWall_1: dw $0005,ExtendedSpritemaps_PirateWall_B ;B2EE2C; dw Inst_PirateWall_MoveYPixelsDown_ChangeDirOnCollision_Right,$FFFD ;B2EE32; dw $0008,ExtendedSpritemaps_PirateWall_A ;B2EE34; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;B2EE3A; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;B2EE3A; dw InstList_PirateWall_MovingUpRightWall_1 ;B2EE3C; dw Instruction_PirateWall_RandomlyChooseADirection_RightWall ;B2EE3E; @@ -9665,7 +9083,7 @@ Function_PirateWall_WallJumpingLeft: ;;; $F15C: Instruction list - projectile claw attack left ;;; InstList_PirateNinja_ProjectileClawAttack_Left: dw Instruction_PirateWall_FunctionInY ;B2F15C; - dw RTS_A0804B ;B2F15E; + dw Common_RTS_A0804B ;B2F15E; dw $0005,ExtendedSpritemaps_PirateNinja_0 ;B2F160; dw $0005,ExtendedSpritemaps_PirateNinja_1 ;B2F164; dw $0005,ExtendedSpritemaps_PirateNinja_2 ;B2F168; @@ -9690,14 +9108,14 @@ InstList_PirateNinja_ProjectileClawAttack_Left: dw $0002,ExtendedSpritemaps_PirateNinja_6 ;B2F1B2; dw $0002,ExtendedSpritemaps_PirateNinja_7 ;B2F1B8; dw $0002,ExtendedSpritemaps_PirateNinja_8 ;B2F1BC; - dw Instruction_Common_GotoY ;B2F1C0; + dw Common_Instruction_GotoY ;B2F1C0; dw InstList_PirateNinja_Active_FacingLeft_0 ;B2F1C2; ;;; $F1C4: Instruction list - spin jump left ;;; InstList_PirateNinja_SpinJumpLeft_0: dw Instruction_PirateWall_FunctionInY ;B2F1C4; - dw RTS_A0804B ;B2F1C6; + dw Common_RTS_A0804B ;B2F1C6; dw $0005,ExtendedSpritemaps_PirateNinja_0 ;B2F1C8; dw $0005,ExtendedSpritemaps_PirateNinja_1 ;B2F1CC; dw $0005,ExtendedSpritemaps_PirateNinja_2 ;B2F1D0; @@ -9712,7 +9130,7 @@ InstList_PirateNinja_SpinJumpLeft_0: dw $0002,ExtendedSpritemaps_PirateNinja_8 ;B2F1F4; dw Instruction_PirateNinja_ResetSpeed ;B2F1F8; dw Instruction_PirateWall_FunctionInY ;B2F1FA; - dw RTS_A0804B ;B2F1FC; + dw Common_RTS_A0804B ;B2F1FC; dw $0008,ExtendedSpritemaps_PirateNinja_0 ;B2F1FE; dw Instruction_PirateWall_FunctionInY ;B2F202; dw Function_PirateNinja_SpinJumpleft_Rising ;B2F204; @@ -9727,7 +9145,7 @@ InstList_PirateNinja_SpinJumpLeft_1: dw $0001,ExtendedSpritemaps_PirateNinja_17 ;B2F21E; dw $0001,ExtendedSpritemaps_PirateNinja_18 ;B2F222; dw $0001,ExtendedSpritemaps_PirateNinja_19 ;B2F226; - dw Instruction_Common_GotoY ;B2F22A; + dw Common_Instruction_GotoY ;B2F22A; dw InstList_PirateNinja_SpinJumpLeft_1 ;B2F22C; @@ -9742,9 +9160,9 @@ InstList_PirateNinja_Active_FacingLeft_1: dw $000A,ExtendedSpritemaps_PirateNinja_34 ;B2F23A; dw $000A,ExtendedSpritemaps_PirateNinja_33 ;B2F23E; dw Instruction_PirateWall_FunctionInY ;B2F242; - dw RTS_A0804B ;B2F244; + dw Common_RTS_A0804B ;B2F244; dw Instruction_PirateNinja_SetFunction0FAC_Active ;B2F246; - dw Instruction_Common_GotoY ;B2F248; + dw Common_Instruction_GotoY ;B2F248; dw InstList_PirateNinja_Active_FacingLeft_1 ;B2F24A; @@ -9759,7 +9177,7 @@ UNUSED_InstList_PirateNinja_WalkingLeft_B2F24C: dw $0005,ExtendedSpritemaps_PirateNinja_27 ;B2F260; dw $0005,ExtendedSpritemaps_PirateNinja_28 ;B2F264; dw $0005,ExtendedSpritemaps_PirateNinja_29 ;B2F268; - dw Instruction_Common_GotoY ;B2F26C; + dw Common_Instruction_GotoY ;B2F26C; dw UNUSED_InstList_PirateNinja_WalkingLeft_B2F24C ;B2F26E; endif ; !FEATURE_KEEP_UNREFERENCED @@ -9767,16 +9185,16 @@ endif ; !FEATURE_KEEP_UNREFERENCED ;;; $F270: Instruction list - flinch - facing left ;;; InstList_PirateNinja_Flinch_FacingLeft: dw Instruction_PirateWall_FunctionInY ;B2F270; - dw RTS_A0804B ;B2F272; + dw Common_RTS_A0804B ;B2F272; dw $0010,ExtendedSpritemaps_PirateNinja_38 ;B2F274; - dw Instruction_Common_GotoY ;B2F278; + dw Common_Instruction_GotoY ;B2F278; dw InstList_PirateNinja_Active_FacingLeft_0 ;B2F27A; ;;; $F27C: Instruction list - divekick left - jump ;;; InstList_PirateNinja_DivekickLeft_Jump_0: dw Instruction_PirateWall_FunctionInY ;B2F27C; - dw RTS_B2804B ;B2F27E; + dw Common_RTS_A0804B ;B2F27E; dw $0008,ExtendedSpritemaps_PirateNinja_42 ;B2F280; dw Instruction_PirateNinja_SetLeftDivekickJumpInitialYSpeed ;B2F284; dw Instruction_PirateWall_FunctionInY ;B2F286; @@ -9787,9 +9205,9 @@ InstList_PirateNinja_DivekickLeft_Jump_1: dw $0004,ExtendedSpritemaps_PirateNinja_3A ;B2F28C; dw Instruction_PirateNinja_PaletteIndexInY,$0E00 ;B2F292; dw $0004,ExtendedSpritemaps_PirateNinja_3A ;B2F294; - dw Instruction_Common_GotoY ;B2F29A; + dw Common_Instruction_GotoY ;B2F29A; dw InstList_PirateNinja_DivekickLeft_Jump_1 ;B2F29C; - dw Instruction_Common_Sleep ;B2F29E; + dw Common_Instruction_Sleep ;B2F29E; ;;; $F2A0: Instruction list - divekick left - divekick ;;; @@ -9799,7 +9217,7 @@ InstList_PirateNinja_DivekickLeft_Divekick: dw Instruction_PirateNinja_DivekickLeft_Divekick ;B2F2A6; dw Instruction_PirateNinja_QueueSoundInY_Lib2_Max6,$0066 ;B2F2A8; dw $0001,ExtendedSpritemaps_PirateNinja_3B ;B2F2AA; - dw Instruction_Common_Sleep ;B2F2B0; + dw Common_Instruction_Sleep ;B2F2B0; ;;; $F2B2: Instruction list - divekick left - walk to left post ;;; @@ -9816,7 +9234,7 @@ InstList_PirateNinja_DivekickLeft_WalkToLeftPost_1: dw $0005,ExtendedSpritemaps_PirateNinja_27 ;B2F2CA; dw $0005,ExtendedSpritemaps_PirateNinja_28 ;B2F2CE; dw $0005,ExtendedSpritemaps_PirateNinja_29 ;B2F2D2; - dw Instruction_Common_GotoY ;B2F2D6; + dw Common_Instruction_GotoY ;B2F2D6; dw InstList_PirateNinja_DivekickLeft_WalkToLeftPost_1 ;B2F2D8; @@ -9831,16 +9249,16 @@ InstList_PirateNinja_Initial_FacingLeft_1: dw $0020,ExtendedSpritemaps_PirateNinja_48 ;B2F2E6; dw $000A,ExtendedSpritemaps_PirateNinja_47 ;B2F2EA; dw $0020,ExtendedSpritemaps_PirateNinja_46 ;B2F2EE; - dw Instruction_Common_GotoY ;B2F2F2; + dw Common_Instruction_GotoY ;B2F2F2; dw InstList_PirateNinja_Initial_FacingLeft_1 ;B2F2F4; - dw Instruction_Common_Sleep ;B2F2F6; + dw Common_Instruction_Sleep ;B2F2F6; ;;; $F2F8: Instruction list - land - facing left ;;; InstList_PirateNinja_Land_FacingLeft_0: dw Instruction_PirateNinja_PaletteIndexInY,$0200 ;B2F2F8; dw Instruction_PirateWall_FunctionInY ;B2F2FC; - dw RTS_A0804B ;B2F2FE; + dw Common_RTS_A0804B ;B2F2FE; dw $0004,ExtendedSpritemaps_PirateNinja_47 ;B2F300; dw $0008,ExtendedSpritemaps_PirateNinja_46 ;B2F304; dw $0004,ExtendedSpritemaps_PirateNinja_4C ;B2F308; @@ -9853,7 +9271,7 @@ InstList_PirateNinja_Land_FacingLeft_1: dw $000A,ExtendedSpritemaps_PirateNinja_36 ;B2F318; dw $000A,ExtendedSpritemaps_PirateNinja_37 ;B2F31C; dw $000A,ExtendedSpritemaps_PirateNinja_36 ;B2F320; - dw Instruction_Common_GotoY ;B2F324; + dw Common_Instruction_GotoY ;B2F324; dw InstList_PirateNinja_Land_FacingLeft_1 ;B2F326; @@ -9861,27 +9279,27 @@ if !FEATURE_KEEP_UNREFERENCED ;;; $F328: Unused. Instruction list - facing forward ;;; UNUSED_InstList_PirateNinja_FacingForward_B2F328: dw $0008,ExtendedSpritemaps_PirateNinja_4C ;B2F328; - dw Instruction_Common_Sleep ;B2F32C; + dw Common_Instruction_Sleep ;B2F32C; endif ; !FEATURE_KEEP_UNREFERENCED ;;; $F32E: Instruction list - standing kick - facing left ;;; InstList_PirateNinja_StandingKick_FacingLeft: dw Instruction_PirateWall_FunctionInY ;B2F32E; - dw RTS_A0804B ;B2F330; + dw Common_RTS_A0804B ;B2F330; dw $0004,ExtendedSpritemaps_PirateNinja_3E ;B2F332; dw Instruction_PirateNinja_QueueSoundInY_Lib2_Max6,$0066 ;B2F336; dw $0004,ExtendedSpritemaps_PirateNinja_44 ;B2F338; dw $0020,ExtendedSpritemaps_PirateNinja_3F ;B2F33E; dw $0004,ExtendedSpritemaps_PirateNinja_44 ;B2F342; - dw Instruction_Common_GotoY ;B2F346; + dw Common_Instruction_GotoY ;B2F346; dw InstList_PirateNinja_Active_FacingLeft_0 ;B2F348; ;;; $F34A: Instruction list - projectile claw attack right ;;; InstList_PirateNinja_ProjectileClawAttack_Right: dw Instruction_PirateWall_FunctionInY ;B2F34A; - dw RTS_B2804B ;B2F34C; + dw Common_RTS_A0804B ;B2F34C; dw $0005,ExtendedSpritemaps_PirateNinja_9 ;B2F34E; dw $0005,ExtendedSpritemaps_PirateNinja_A ;B2F352; dw $0005,ExtendedSpritemaps_PirateNinja_B ;B2F356; @@ -9906,14 +9324,14 @@ InstList_PirateNinja_ProjectileClawAttack_Right: dw Instruction_PirateNinja_QueueSoundInY_Lib2_Max6,$0066 ;B2F3A2; dw $0002,ExtendedSpritemaps_PirateNinja_F ;B2F3A4; dw $0002,ExtendedSpritemaps_PirateNinja_11 ;B2F3AA; - dw Instruction_Common_GotoY ;B2F3AE; + dw Common_Instruction_GotoY ;B2F3AE; dw InstList_PirateNinja_Active_FacingRight_0 ;B2F3B0; ;;; $F3B2: Instruction list - spin jump right ;;; InstList_PirateNinja_SpinJumpRight_0: dw Instruction_PirateWall_FunctionInY ;B2F3B2; - dw RTS_B2804B ;B2F3B4; + dw Common_RTS_A0804B ;B2F3B4; dw $0005,ExtendedSpritemaps_PirateNinja_9 ;B2F3B6; dw $0005,ExtendedSpritemaps_PirateNinja_A ;B2F3BA; dw $0005,ExtendedSpritemaps_PirateNinja_B ;B2F3BE; @@ -9928,7 +9346,7 @@ InstList_PirateNinja_SpinJumpRight_0: dw $0002,ExtendedSpritemaps_PirateNinja_11 ;B2F3E2; dw Instruction_PirateNinja_ResetSpeed ;B2F3E6; dw Instruction_PirateWall_FunctionInY ;B2F3E8; - dw RTS_A0804B ;B2F3EA; + dw Common_RTS_A0804B ;B2F3EA; dw $0008,ExtendedSpritemaps_PirateNinja_9 ;B2F3EC; dw Instruction_PirateWall_FunctionInY ;B2F3F0; dw Function_PirateNinja_SpinJumpRight_Rising ;B2F3F2; @@ -9943,7 +9361,7 @@ InstList_PirateNinja_SpinJumpRight_1: dw $0001,ExtendedSpritemaps_PirateNinja_1F ;B2F40C; dw $0001,ExtendedSpritemaps_PirateNinja_20 ;B2F410; dw $0001,ExtendedSpritemaps_PirateNinja_21 ;B2F414; - dw Instruction_Common_GotoY ;B2F418; + dw Common_Instruction_GotoY ;B2F418; dw InstList_PirateNinja_SpinJumpRight_1 ;B2F41A; @@ -9965,9 +9383,9 @@ InstList_PirateNinja_Active_FacingRight_1: dw $000A,ExtendedSpritemaps_PirateNinja_37 ;B2F42C; dw $000A,ExtendedSpritemaps_PirateNinja_36 ;B2F430; dw Instruction_PirateWall_FunctionInY ;B2F434; - dw RTS_B2804B ;B2F436; + dw Common_RTS_A0804B ;B2F436; dw Instruction_PirateNinja_SetFunction0FAC_Active ;B2F438; - dw Instruction_Common_GotoY ;B2F43A; + dw Common_Instruction_GotoY ;B2F43A; dw InstList_PirateNinja_Active_FacingRight_1 ;B2F43C; @@ -9982,7 +9400,7 @@ UNUSED_InstList_PirateNinja_WalkingRight_B2F43E: dw $0005,ExtendedSpritemaps_PirateNinja_2F ;B2F452; dw $0005,ExtendedSpritemaps_PirateNinja_30 ;B2F456; dw $0005,ExtendedSpritemaps_PirateNinja_31 ;B2F45A; - dw Instruction_Common_GotoY ;B2F45E; + dw Common_Instruction_GotoY ;B2F45E; dw UNUSED_InstList_PirateNinja_WalkingRight_B2F43E ;B2F460; endif ; !FEATURE_KEEP_UNREFERENCED @@ -9990,16 +9408,16 @@ endif ; !FEATURE_KEEP_UNREFERENCED ;;; $F462: Instruction list - flinch - facing right ;;; InstList_PirateNinja_Flinch_FacingRight: dw Instruction_PirateWall_FunctionInY ;B2F462; - dw RTS_B2804B ;B2F464; + dw Common_RTS_A0804B ;B2F464; dw $0010,ExtendedSpritemaps_PirateNinja_39 ;B2F466; - dw Instruction_Common_GotoY ;B2F46A; + dw Common_Instruction_GotoY ;B2F46A; dw InstList_PirateNinja_Active_FacingRight_0 ;B2F46C; ;;; $F46E: Instruction list - divekick right - jump ;;; InstList_PirateNinja_DivekickRight_Jump_0: dw Instruction_PirateWall_FunctionInY ;B2F46E; - dw RTS_B2804B ;B2F470; + dw Common_RTS_A0804B ;B2F470; dw $0008,ExtendedSpritemaps_PirateNinja_43 ;B2F472; dw Instruction_PirateNinja_SetRightDivekickJumpInitialYSpeed ;B2F476; dw Instruction_PirateWall_FunctionInY ;B2F478; @@ -10010,9 +9428,9 @@ InstList_PirateNinja_DivekickRight_Jump_1: dw $0004,ExtendedSpritemaps_PirateNinja_3C ;B2F47E; dw Instruction_PirateNinja_PaletteIndexInY,$0E00 ;B2F484; dw $0004,ExtendedSpritemaps_PirateNinja_3C ;B2F486; - dw Instruction_Common_GotoY ;B2F48C; + dw Common_Instruction_GotoY ;B2F48C; dw InstList_PirateNinja_DivekickRight_Jump_1 ;B2F48E; - dw Instruction_Common_Sleep ;B2F490; + dw Common_Instruction_Sleep ;B2F490; ;;; $F492: Instruction list - divekick right - divekick ;;; @@ -10022,7 +9440,7 @@ InstList_PirateNinja_DivekickRight_Divekick: dw Instruction_PirateNinja_DivekickRight_Divekick ;B2F498; dw Instruction_PirateNinja_QueueSoundInY_Lib2_Max6,$0066 ;B2F49A; dw $0001,ExtendedSpritemaps_PirateNinja_3D ;B2F49C; - dw Instruction_Common_Sleep ;B2F4A2; + dw Common_Instruction_Sleep ;B2F4A2; ;;; $F4A4: Instruction list - divekick right - walk to right post ;;; @@ -10039,7 +9457,7 @@ InstList_PirateNinja_DivekickRight_WalkToRightPost_1: dw $0005,ExtendedSpritemaps_PirateNinja_2F ;B2F4BC; dw $0005,ExtendedSpritemaps_PirateNinja_30 ;B2F4C0; dw $0005,ExtendedSpritemaps_PirateNinja_31 ;B2F4C4; - dw Instruction_Common_GotoY ;B2F4C8; + dw Common_Instruction_GotoY ;B2F4C8; dw InstList_PirateNinja_DivekickRight_WalkToRightPost_1 ;B2F4CA; @@ -10054,16 +9472,16 @@ InstList_PirateNinja_Initial_FacingRight_1: dw $0020,ExtendedSpritemaps_PirateNinja_4B ;B2F4D8; dw $000A,ExtendedSpritemaps_PirateNinja_4A ;B2F4DC; dw $0020,ExtendedSpritemaps_PirateNinja_49 ;B2F4E0; - dw Instruction_Common_GotoY ;B2F4E4; + dw Common_Instruction_GotoY ;B2F4E4; dw InstList_PirateNinja_Initial_FacingRight_1 ;B2F4E6; - dw Instruction_Common_Sleep ;B2F4E8; + dw Common_Instruction_Sleep ;B2F4E8; ;;; $F4EA: Instruction list - land - facing right ;;; InstList_PirateNinja_Land_FacingRight_0: dw Instruction_PirateNinja_PaletteIndexInY,$0200 ;B2F4EA; dw Instruction_PirateWall_FunctionInY ;B2F4EE; - dw RTS_A0804B ;B2F4F0; + dw Common_RTS_A0804B ;B2F4F0; dw $0004,ExtendedSpritemaps_PirateNinja_4A ;B2F4F2; dw $0008,ExtendedSpritemaps_PirateNinja_49 ;B2F4F6; dw $0004,ExtendedSpritemaps_PirateNinja_4C ;B2F4FA; @@ -10076,20 +9494,20 @@ InstList_PirateNinja_Land_FacingRight_1: dw $000A,ExtendedSpritemaps_PirateNinja_33 ;B2F50A; dw $000A,ExtendedSpritemaps_PirateNinja_34 ;B2F50E; dw $000A,ExtendedSpritemaps_PirateNinja_33 ;B2F512; - dw Instruction_Common_GotoY ;B2F516; + dw Common_Instruction_GotoY ;B2F516; dw InstList_PirateNinja_Land_FacingRight_1 ;B2F518; ;;; $F51A: Instruction list - standing kick - facing right ;;; InstList_PirateNinja_StandingKick_FacingRight: dw Instruction_PirateWall_FunctionInY ;B2F51A; - dw RTS_A0804B ;B2F51C; + dw Common_RTS_A0804B ;B2F51C; dw $0004,ExtendedSpritemaps_PirateNinja_40 ;B2F51E; dw Instruction_PirateNinja_QueueSoundInY_Lib2_Max6,$0066 ;B2F522; dw $0004,ExtendedSpritemaps_PirateNinja_45 ;B2F524; dw $0020,ExtendedSpritemaps_PirateNinja_41 ;B2F52A; dw $0004,ExtendedSpritemaps_PirateNinja_45 ;B2F52E; - dw Instruction_Common_GotoY ;B2F532; + dw Common_Instruction_GotoY ;B2F532; dw InstList_PirateNinja_Active_FacingRight_0 ;B2F534; @@ -10292,7 +9710,7 @@ InitAI_PirateNinja: .zeroParam1again2: TYA ;B2F676; STA.W Enemy.XPosition,X ;B2F677; - LDA.W #RTS_B2804B ;B2F67A; + LDA.W #Common_RTS_A0804B ;B2F67A; STA.W PirateNinja.function,X ;B2F67D; LDA.W Enemy.YPosition,X ;B2F680; STA.L PirateNinja.spawnYPosition,X ;B2F683; @@ -10596,7 +10014,7 @@ Function_PirateNinja_SpinJumpLeft_Falling: RTS ;B2F873; .landing: - LDA.W #RTS_B2804B ;B2F874; + LDA.W #Common_RTS_A0804B ;B2F874; STA.W PirateNinja.function,X ;B2F877; LDA.W #InstList_PirateNinja_Land_FacingLeft_0 ;B2F87A; STA.W Enemy.instList,X ;B2F87D; @@ -10655,7 +10073,7 @@ Function_PirateNinja_SpinJumpRight_Falling: RTS ;B2F8EC; .landing: - LDA.W #RTS_B2804B ;B2F8ED; + LDA.W #Common_RTS_A0804B ;B2F8ED; STA.W PirateNinja.function,X ;B2F8F0; LDA.W #InstList_PirateNinja_Land_FacingRight_0 ;B2F8F3; STA.W Enemy.instList,X ;B2F8F6; @@ -10829,7 +10247,7 @@ Instruction_PirateNinja_DivekickLeft_WalkToLeftPost: STA.W Enemy.instList,X ;B2FA2D; LDA.W #$0001 ;B2FA30; STA.W Enemy.instTimer,X ;B2FA33; - LDA.W #RTS_B2804B ;B2FA36; + LDA.W #Common_RTS_A0804B ;B2FA36; STA.W PirateNinja.function,X ;B2FA39; .return: @@ -10934,7 +10352,7 @@ Instruction_PirateNinja_DivekickRight_WalkToRightPost: STA.W Enemy.instList,X ;B2FB01; LDA.W #$0001 ;B2FB04; STA.W Enemy.instTimer,X ;B2FB07; - LDA.W #RTS_B2804B ;B2FB0A; + LDA.W #Common_RTS_A0804B ;B2FB0A; STA.W PirateNinja.function,X ;B2FB0D; .return: @@ -10973,18 +10391,18 @@ PirateNinja_SpawnLandingDustCloud: ;;; $FB4C: Instruction list - flinch - facing left ;;; InstList_PirateWalking_Flinch_FacingLeft: dw Instruction_PirateWalking_FunctionInY ;B2FB4C; - dw RTS_A0804B ;B2FB4E; + dw Common_RTS_A0804B ;B2FB4E; dw $0010,ExtendedSpritemaps_PirateWalking_23 ;B2FB50; - dw Instruction_Common_GotoY ;B2FB54; + dw Common_Instruction_GotoY ;B2FB54; dw InstList_PirateWalking_WalkingLeft_0 ;B2FB56; ;;; $FB58: Instruction list - flinch - facing right ;;; InstList_PirateWalking_Flinch_FacingRight: dw Instruction_PirateWalking_FunctionInY ;B2FB58; - dw RTS_A0804B ;B2FB5A; + dw Common_RTS_A0804B ;B2FB5A; dw $0010,ExtendedSpritemaps_PirateWalking_24 ;B2FB5C; - dw Instruction_Common_GotoY ;B2FB60; + dw Common_Instruction_GotoY ;B2FB60; dw InstList_PirateWalking_WalkingRight_0 ;B2FB62; @@ -11002,7 +10420,7 @@ InstList_PirateWalking_WalkingLeft_1: dw $000A,ExtendedSpritemaps_PirateWalking_5 ;B2FB7C; dw $000A,ExtendedSpritemaps_PirateWalking_6 ;B2FB80; dw $000A,ExtendedSpritemaps_PirateWalking_7 ;B2FB84; - dw Instruction_Common_GotoY ;B2FB88; + dw Common_Instruction_GotoY ;B2FB88; dw InstList_PirateWalking_WalkingLeft_1 ;B2FB8A; @@ -11036,7 +10454,7 @@ InstList_PirateWalking_LookingAround_FacingLeft: dw $000A,ExtendedSpritemaps_PirateWalking_1D ;B2FBD6; dw $0020,ExtendedSpritemaps_PirateWalking_1C ;B2FBDA; dw $0008,ExtendedSpritemaps_PirateWalking_22 ;B2FBDE; - dw Instruction_Common_GotoY ;B2FBE2; + dw Common_Instruction_GotoY ;B2FBE2; dw InstList_PirateWalking_WalkingRight_0 ;B2FBE4; @@ -11054,7 +10472,7 @@ InstList_PirateWalking_WalkingRight_1: dw $000A,ExtendedSpritemaps_PirateWalking_D ;B2FBFE; dw $000A,ExtendedSpritemaps_PirateWalking_E ;B2FC02; dw $000A,ExtendedSpritemaps_PirateWalking_F ;B2FC06; - dw Instruction_Common_GotoY ;B2FC0A; + dw Common_Instruction_GotoY ;B2FC0A; dw InstList_PirateWalking_WalkingRight_1 ;B2FC0C; @@ -11088,7 +10506,7 @@ InstList_PirateWalking_LookingAround_FacingRight: dw $000A,ExtendedSpritemaps_PirateWalking_20 ;B2FC58; dw $0020,ExtendedSpritemaps_PirateWalking_1F ;B2FC5C; dw $0008,ExtendedSpritemaps_PirateWalking_22 ;B2FC60; - dw Instruction_Common_GotoY ;B2FC64; + dw Common_Instruction_GotoY ;B2FC64; dw InstList_PirateWalking_WalkingLeft_0 ;B2FC66; @@ -11202,7 +10620,7 @@ InitAI_PirateWalking: .keepLeft: TYA ;B2FD13; STA.W Enemy.instList,X ;B2FD14; - LDA.W #RTS_B2804B ;B2FD17; + LDA.W #Common_RTS_A0804B ;B2FD17; STA.W PirateWalking.function,X ;B2FD1A; LDA.W Enemy.XPosition,X ;B2FD1D; CLC ;B2FD20; diff --git a/src/bank_B3.asm b/src/bank_B3.asm index d43c6c2..f2ab504 100644 --- a/src/bank_B3.asm +++ b/src/bank_B3.asm @@ -3,591 +3,9 @@ org $B38000 ; Common to all enemy code banks - -;;; $8000: Grapple AI - no interaction. Also unfreezes enemies(!) ;;; -CommonB3_GrappleAI_NoInteraction: -; Used by skultera, Draygon body, fire arc, Phantoon, etecoon, dachora and WS ghost - JSL.L GrappleAI_SwitchEnemyAIToMainAI ;B38000; - RTL ;B38004; - - -;;; $8005: Grapple AI - Samus latches on ;;; -CommonB3_GrappleAI_SamusLatchesOn: -; Used by gripper and Crocomire - JSL.L GrappleAI_SamusLatchesOnWithGrapple ;B38005; - RTL ;B38009; - - -;;; $800A: Grapple AI - kill enemy ;;; -CommonB3_GrappleAI_KillEnemy: -; Common - JSL.L GrappleAI_EnemyGrappleDeath ;B3800A; - RTL ;B3800E; - - -;;; $800F: Grapple AI - cancel grapple beam ;;; -CommonB3_GrappleAI_CancelGrappleBeam: -; Common - JSL.L GrappleAI_SwitchToFrozenAI ;B3800F; - RTL ;B38013; - - -;;; $8014: Grapple AI - Samus latches on - no invincibility ;;; -CommonB3_GrappleAI_SamusLatchesOn_NoInvincibility: -; Used by powamp - JSL.L GrappleAI_SamusLatchesOnWithGrapple_NoInvincibility ;B38014; - RTL ;B38018; - - -;;; $8019: Unused. Grapple AI - Samus latches on - paralyse enemy ;;; -UNUSED_CommonB3_GrappleAI_SamusLatchesOn_ParalyzeEnemy_B38019: - JSL.L GrappleAI_SamusLatchesOnWithGrapple_ParalyzeEnemy ;B38019; - RTL ;B3801D; - - -;;; $801E: Grapple AI - hurt Samus ;;; -CommonB3_GrappleAI_HurtSamus: -; Used by WS spark -; Hurt reaction happens in $9B:B932 - JSL.L GrappleAI_SwitchToFrozenAI_duplicate ;B3801E; - RTL ;B38022; - - -;;; $8023: Normal enemy touch AI ;;; -CommonB3_NormalEnemyTouchAI: - JSL.L NormalEnemyTouchAI ;B38023; - RTL ;B38027; - - -;;; $8028: Normal touch AI - no death check ;;; -CommonB3_NormalTouchAI_NoDeathCheck: - JSL.L NormalEnemyTouchAI_NoDeathCheck_External ;B38028; - RTL ;B3802C; - - -;;; $802D: Normal enemy shot AI ;;; -CommonB3_NormalEnemyShotAI: - JSL.L NormalEnemyShotAI ;B3802D; - RTL ;B38031; - - -;;; $8032: Normal enemy shot AI - no death check, no enemy shot graphic ;;; -CommonB3_NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic: - JSL.L NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic_External ;B38032; - RTL ;B38036; - - -;;; $8037: Normal enemy power bomb AI ;;; -CommonB3_NormalEnemyPowerBombAI: - JSL.L NormalEnemyPowerBombAI ;B38037; - RTL ;B3803B; - - -;;; $803C: Normal enemy power bomb AI - no death check ;;; -CommonB3_NormalEnemyPowerBombAI_NoDeathCheck: -; Kraid's power bomb AI - JSL.L NormalEnemyPowerBombAI_NoDeathCheck_External ;B3803C; - RTL ;B38040; - - -;;; $8041: Normal enemy frozen AI ;;; -CommonB3_NormalEnemyFrozenAI: - JSL.L NormalEnemyFrozenAI ;B38041; - RTL ;B38045; - - -;;; $8046: Creates a dud shot ;;; -CommonB3_CreateADudShot: - JSL.L CreateADudShot ;B38046; - RTL ;B3804A; - - -;;; $804B: RTS ;;; -RTS_B3804B: - RTS ;B3804B; - - -;;; $804C: RTL ;;; -RTL_B3804C: - RTL ;B3804C; - - -;;; $804D: Spritemap - nothing ;;; -Spritemap_CommonB3_Nothing: - dw $0000 ;B3804D; - - -;;; $804F: Extended spritemap - nothing ;;; -ExtendedSpritemap_CommonB3_Nothing: - dw $0001 ;B3804F; - dw $0000,$0000 - dw Spritemap_CommonB3_Nothing ;B38055; - dw Hitbox_CommonB3_Nothing ;B38057; - - -;;; $8059: Hitbox - nothing ;;; -Hitbox_CommonB3_Nothing: -; [n entries] [[left offset] [top offset] [right offset] [bottom offset] [p touch] [p shot]]... - dw $0001 ;B38059; - dw $0000,$0000,$0000,$0000 - dw CommonB3_NormalEnemyTouchAI ;B38063; - dw CommonB3_NormalEnemyShotAI ;B38065; - - -;;; $8067: Instruction list - delete enemy ;;; -InstList_CommonB3_DeleteEnemy: - dw Instruction_CommonB3_DeleteEnemy ;B38067; - - -;;; $8069: Two NOPs ;;; -NOPNOP_B38069: -; Used as palette by respawning enemy placeholder and Draygon's eye o_O - NOP ;B38069; - NOP ;B3806A; - - -;;; $806B: Instruction - Enemy.var5 = [[Y]] ;;; -Instruction_CommonB3_Enemy0FB2_InY: -; Used only by torizos (for enemy movement function) and escape etecoon (for enemy function) - LDA.W $0000,Y ;B3806B; - STA.W Enemy.var5,X ;B3806E; - INY ;B38071; - INY ;B38072; - RTL ;B38073; - - -;;; $8074: Instruction - Enemy.var5 = RTS ;;; -Instruction_CommonB3_SetEnemy0FB2ToRTS: - LDA.W #RTS_B3807B ;B38074; - STA.W Enemy.var5,X ;B38077; - RTL ;B3807A; - - -RTS_B3807B: - RTS ;B3807B; - - -;;; $807C: Instruction - delete enemy ;;; -Instruction_CommonB3_DeleteEnemy: - LDA.W Enemy.properties,X ;B3807C; - ORA.W #$0200 ;B3807F; - STA.W Enemy.properties,X ;B38082; - PLA ;B38085; - PEA.W ProcessEnemyInstructions_return-1 ;B38086; - RTL ;B38089; - - -;;; $808A: Instruction - call function [[Y]] ;;; -Instruction_CommonB3_CallFunctionInY: - LDA.W $0000,Y ;B3808A; - STA.B DP_Temp12 ;B3808D; - PHY ;B3808F; - PHX ;B38090; - PEA.W .manualReturn-1 ;B38091; - JMP.W (DP_Temp12) ;B38094; - - .manualReturn: - PLX ;B38097; - PLY ;B38098; - INY ;B38099; - INY ;B3809A; - RTL ;B3809B; - - -;;; $809C: Instruction - call function [[Y]] with A = [[Y] + 2] ;;; -Instruction_CommonB3_CallFunctionInY_WithA: - LDA.W $0000,Y ;B3809C; - STA.B DP_Temp12 ;B3809F; - LDA.W $0002,Y ;B380A1; - PHY ;B380A4; - PHX ;B380A5; - PEA.W .manualReturn-1 ;B380A6; - JMP.W (DP_Temp12) ;B380A9; - - .manualReturn: - PLX ;B380AC; - PLY ;B380AD; - TYA ;B380AE; - CLC ;B380AF; - ADC.W #$0004 ;B380B0; - TAY ;B380B3; - RTL ;B380B4; - - -if !FEATURE_KEEP_UNREFERENCED -;;; $80B5: Unused. Instruction - call external function [[Y]] ;;; -UNUSED_Instruction_CommonB3_CallExternalFunctionInY_B380B5: - LDA.W $0000,Y ;B380B5; - STA.B DP_Temp12 ;B380B8; - LDA.W $0001,Y ;B380BA; - STA.B DP_Temp13 ;B380BD; - PHX ;B380BF; - PHY ;B380C0; - JSL.L .externalFunction ;B380C1; - PLY ;B380C5; - PLX ;B380C6; - INY ;B380C7; - INY ;B380C8; - INY ;B380C9; - RTL ;B380CA; - - .externalFunction: - JML.W [DP_Temp12] ;B380CB; - - -;;; $80CE: Unused. Instruction - call external function [[Y]] with A = [[Y] + 3] ;;; -UNUSED_Inst_CommonB3_CallExternalFunctionInY_WithA_B380CE: - LDA.W $0000,Y ;B380CE; - STA.B DP_Temp12 ;B380D1; - LDA.W $0001,Y ;B380D3; - STA.B DP_Temp13 ;B380D6; - LDA.W $0003,Y ;B380D8; - PHX ;B380DB; - PHY ;B380DC; - JSL.L .externalFunction ;B380DD; - PLY ;B380E1; - PLX ;B380E2; - TYA ;B380E3; - CLC ;B380E4; - ADC.W #$0005 ;B380E5; - TAY ;B380E8; - RTL ;B380E9; - - .externalFunction: - JML.W [DP_Temp12] ;B380EA; -endif ; !FEATURE_KEEP_UNREFERENCED - - -;;; $80ED: Instruction - go to [[Y]] ;;; -Instruction_CommonB3_GotoY: - LDA.W $0000,Y ;B380ED; - TAY ;B380F0; - RTL ;B380F1; - - -;;; $80F2: Instruction - go to [[Y]] + ±[[Y]] ;;; -Instruction_CommonB3_GotoY_PlusY: - STY.B DP_Temp12 ;B380F2; - DEY ;B380F4; - LDA.W $0000,Y ;B380F5; - XBA ;B380F8; - BMI .highByte ;B380F9; - AND.W #$00FF ;B380FB; - BRA + ;B380FE; - - .highByte: - ORA.W #$FF00 ;B38100; - -+ CLC ;B38103; - ADC.B DP_Temp12 ;B38104; - TAY ;B38106; - RTL ;B38107; - - -;;; $8108: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonB3_DecrementTimer_GotoYIfNonZero: - DEC.W Enemy.loopCounter,X ;B38108; - BNE Instruction_CommonB3_GotoY ;B3810B; - INY ;B3810D; - INY ;B3810E; - RTL ;B3810F; - - -;;; $8110: Instruction - decrement timer and go to [[Y]] if non-zero ;;; -Instruction_CommonB3_DecrementTimer_GotoYIfNonZero_duplicate: - DEC.W Enemy.loopCounter,X ;B38110; - BNE Instruction_CommonB3_GotoY ;B38113; - INY ;B38115; - INY ;B38116; - RTL ;B38117; - - -;;; $8118: Instruction - decrement timer and go to [Y] + ±[[Y]] if non-zero ;;; -Instruction_CommonB3_DecrementTimer_GotoY_PlusY_IfNonZero: - SEP #$20 ;B38118; - DEC.W Enemy.loopCounter,X ;B3811A; - REP #$20 ;B3811D; - BNE Instruction_CommonB3_GotoY_PlusY ;B3811F; - INY ;B38121; - RTL ;B38122; - - -;;; $8123: Instruction - timer = [[Y]] ;;; -Instruction_CommonB3_TimerInY: - LDA.W $0000,Y ;B38123; - STA.W Enemy.loopCounter,X ;B38126; - INY ;B38129; - INY ;B3812A; - RTL ;B3812B; - - -;;; $812C: Instruction - skip next instruction ;;; -Instruction_CommonB3_SkipNextInstruction: - INY ;B3812C; - INY ;B3812D; - RTL ;B3812E; - - -;;; $812F: Instruction - sleep ;;; -Instruction_CommonB3_Sleep: - DEY ;B3812F; - DEY ;B38130; - TYA ;B38131; - STA.W Enemy.instList,X ;B38132; - PLA ;B38135; - PEA.W ProcessEnemyInstructions_return-1 ;B38136; - RTL ;B38139; - - -;;; $813A: Instruction - wait [[Y]] frames ;;; -Instruction_CommonB3_WaitYFrames: -; Set instruction timer and terminate processing enemy instructions -; Used for running a delay that doesn't update graphics, -; useful for e.g. GT eye beam attack ($AA:D10D), implemented by an instruction list that has no graphical instructions, -; which allows it to be called from multiple different poses - LDA.W $0000,Y ;B3813A; - STA.W Enemy.instTimer,X ;B3813D; - INY ;B38140; - INY ;B38141; - TYA ;B38142; - STA.W Enemy.instList,X ;B38143; - PLA ;B38146; - PEA.W ProcessEnemyInstructions_return-1 ;B38147; - RTL ;B3814A; - - -;;; $814B: Instruction - transfer [[Y]] bytes from [[Y] + 2] to VRAM [[Y] + 5] ;;; -Instruction_CommonB3_TransferYBytesInYToVRAM: - PHX ;B3814B; - LDX.W VRAMWriteStack ;B3814C; - LDA.W $0000,Y ;B3814F; - STA.B VRAMWrite.size,X ;B38152; - LDA.W $0002,Y ;B38154; - STA.B VRAMWrite.src,X ;B38157; - LDA.W $0003,Y ;B38159; - STA.B VRAMWrite.src+1,X ;B3815C; - LDA.W $0005,Y ;B3815E; - STA.B VRAMWrite.dest,X ;B38161; - TXA ;B38163; - CLC ;B38164; - ADC.W #$0007 ;B38165; - STA.W VRAMWriteStack ;B38168; - TYA ;B3816B; - CLC ;B3816C; - ADC.W #$0007 ;B3816D; - TAY ;B38170; - PLX ;B38171; - RTL ;B38172; - - -;;; $8173: Instruction - enable off-screen processing ;;; -Instruction_CommonB3_EnableOffScreenProcessing: - LDA.W Enemy.properties,X ;B38173; - ORA.W #$0800 ;B38176; - STA.W Enemy.properties,X ;B38179; - RTL ;B3817C; - - -;;; $817D: Instruction - disable off-screen processing ;;; -Instruction_CommonB3_DisableOffScreenProcessing: - LDA.W Enemy.properties,X ;B3817D; - AND.W #$F7FF ;B38180; - STA.W Enemy.properties,X ;B38183; - RTL ;B38186; - - -;;; $8187: Common enemy speeds - linearly increasing ;;; -CommonB3EnemySpeeds_LinearlyIncreasing: -; _____________________ Speed -; | _______________ Subspeed -; | | _________ Negated speed -; | | | ___ Negated subspeed -; | | | | - .speed: - dw $0000 ;B38187; - .subspeed: - dw $0000 ;B38189; - .negatedSpeed: - dw $0000 ;B3818B; - .negatedSubspeed: - dw $0000 ;B3818D; - dw $0000,$1000,$FFFF,$F000 - dw $0000,$2000,$FFFF,$E000 - dw $0000,$3000,$FFFF,$D000 - dw $0000,$4000,$FFFF,$C000 - dw $0000,$5000,$FFFF,$B000 - dw $0000,$6000,$FFFF,$A000 - dw $0000,$7000,$FFFF,$9000 - dw $0000,$8000,$FFFF,$8000 - dw $0000,$9000,$FFFF,$7000 - dw $0000,$A000,$FFFF,$6000 - dw $0000,$B000,$FFFF,$5000 - dw $0000,$C000,$FFFF,$4000 - dw $0000,$D000,$FFFF,$3000 - dw $0000,$E000,$FFFF,$2000 - dw $0000,$F000,$FFFF,$1000 - dw $0001,$0000,$FFFF,$0000 - dw $0001,$1000,$FFFE,$F000 - dw $0001,$2000,$FFFE,$E000 - dw $0001,$3000,$FFFE,$D000 - dw $0001,$4000,$FFFE,$C000 - dw $0001,$5000,$FFFE,$B000 - dw $0001,$6000,$FFFE,$A000 - dw $0001,$7000,$FFFE,$9000 - dw $0001,$8000,$FFFE,$8000 - dw $0001,$9000,$FFFE,$7000 - dw $0001,$A000,$FFFE,$6000 - dw $0001,$B000,$FFFE,$5000 - dw $0001,$C000,$FFFE,$4000 - dw $0001,$D000,$FFFE,$3000 - dw $0001,$E000,$FFFE,$2000 - dw $0001,$F000,$FFFE,$1000 - dw $0002,$0000,$FFFE,$0000 - dw $0002,$1000,$FFFD,$F000 - dw $0002,$2000,$FFFD,$E000 - dw $0002,$3000,$FFFD,$D000 - dw $0002,$4000,$FFFD,$C000 - dw $0002,$5000,$FFFD,$B000 - dw $0002,$6000,$FFFD,$A000 - dw $0002,$7000,$FFFD,$9000 - dw $0002,$8000,$FFFD,$8000 - dw $0002,$9000,$FFFD,$7000 - dw $0002,$A000,$FFFD,$6000 - dw $0002,$B000,$FFFD,$5000 - dw $0002,$C000,$FFFD,$4000 - dw $0002,$D000,$FFFD,$3000 - dw $0002,$E000,$FFFD,$2000 - dw $0002,$F000,$FFFD,$1000 - dw $0003,$0000,$FFFD,$0000 - dw $0003,$1000,$FFFC,$F000 - dw $0003,$2000,$FFFC,$E000 - dw $0003,$3000,$FFFC,$D000 - dw $0003,$4000,$FFFC,$C000 - dw $0003,$5000,$FFFC,$B000 - dw $0003,$6000,$FFFC,$A000 - dw $0003,$7000,$FFFC,$9000 - dw $0003,$8000,$FFFC,$8000 - dw $0003,$9000,$FFFC,$7000 - dw $0003,$A000,$FFFC,$6000 - dw $0003,$B000,$FFFC,$5000 - dw $0003,$C000,$FFFC,$4000 - dw $0003,$D000,$FFFC,$3000 - dw $0003,$E000,$FFFC,$2000 - dw $0003,$F000,$FFFC,$1000 - dw $0004,$0000,$FFFC,$0000 - - -;;; $838F: Common enemy speeds - quadratically increasing ;;; -CommonB3EnemySpeeds_QuadraticallyIncreasing: -; I.e. gravity -; Used by e.g. Botwoon when dying and falling to the floor -; _____________________ Subspeed -; | _______________ Speed -; | | _________ Negated subspeed -; | | | ___ Negated speed -; | | | | - .subspeed: - dw $0000 ;B3838F; - .speed: - dw $0000 ;B38391; - .negatedSubspeed: - dw $0000 ;B38393; - .negatedSpeed: - dw $0000 ;B38395; - dw $0109,$0000,$FEF7,$FFFF - dw $031B,$0000,$FCE5,$FFFF - dw $0636,$0000,$F9CA,$FFFF - dw $0A5A,$0000,$F5A6,$FFFF - dw $0F87,$0000,$F079,$FFFF - dw $15BD,$0000,$EA43,$FFFF - dw $1CFC,$0000,$E304,$FFFF - dw $2544,$0000,$DABC,$FFFF - dw $2E95,$0000,$D16B,$FFFF - dw $38EF,$0000,$C711,$FFFF - dw $4452,$0000,$BBAE,$FFFF - dw $50BE,$0000,$AF42,$FFFF - dw $5E33,$0000,$A1CD,$FFFF - dw $6CB1,$0000,$934F,$FFFF - dw $7C38,$0000,$83C8,$FFFF - dw $8CC8,$0000,$7338,$FFFF - dw $9E61,$0000,$619F,$FFFF - dw $B103,$0000,$4EFD,$FFFF - dw $C4AE,$0000,$3B52,$FFFF - dw $D962,$0000,$269E,$FFFF - dw $EF1F,$0000,$10E1,$FFFF - dw $05E5,$0000,$FA1B,$FFFF - dw $14B4,$0001,$EB4C,$FFFE - dw $2D8C,$0001,$D274,$FFFE - dw $476D,$0001,$B893,$FFFE - dw $6257,$0001,$9DA9,$FFFE - dw $7E4A,$0001,$81B6,$FFFE - dw $9B46,$0001,$64BA,$FFFE - dw $B94B,$0001,$46B5,$FFFE - dw $D859,$0001,$27A7,$FFFE - dw $F870,$0001,$0790,$FFFE - dw $1090,$0002,$EF70,$FFFD - dw $32B9,$0002,$CD47,$FFFD - dw $55EB,$0002,$AA15,$FFFD - dw $7A26,$0002,$85DA,$FFFD - dw $9F6A,$0002,$6096,$FFFD - dw $C5B7,$0002,$3A49,$FFFD - dw $ED0D,$0002,$12F3,$FFFD - dw $0C6C,$0003,$F394,$FFFC - dw $35D4,$0003,$CA2C,$FFFC - dw $6045,$0003,$9FBB,$FFFC - dw $8BBF,$0003,$7441,$FFFC - dw $B842,$0003,$47BE,$FFFC - dw $E5CE,$0003,$1A32,$FFFC - dw $0B63,$0004,$F49D,$FFFB - dw $3B01,$0004,$C4FF,$FFFB - dw $6BA8,$0004,$9458,$FFFB - dw $9D58,$0004,$62A8,$FFFB - dw $D011,$0004,$2FEF,$FFFB - dw $03D3,$0004,$FC2D,$FFFB - dw $2F9E,$0005,$D062,$FFFA - dw $6572,$0005,$9A8E,$FFFA - dw $9C4F,$0005,$63B1,$FFFA - dw $D435,$0005,$2BCB,$FFFA - dw $0424,$0006,$FBDC,$FFF9 - dw $3E1C,$0006,$C1E4,$FFF9 - dw $791D,$0006,$86E3,$FFF9 - dw $B527,$0006,$4AD9,$FFF9 - dw $F23A,$0006,$0DC6,$FFF9 - dw $2756,$0007,$D8AA,$FFF8 - dw $667B,$0007,$9985,$FFF8 - dw $A6A9,$0007,$5957,$FFF8 - dw $E7E0,$0007,$1820,$FFF8 - dw $2120,$0008,$DEE0,$FFF7 - dw $6469,$0008,$9B97,$FFF7 - dw $A8BB,$0008,$5745,$FFF7 - dw $EE16,$0008,$11EA,$FFF7 - dw $2B7A,$0009,$D486,$FFF6 - dw $72E7,$0009,$8D19,$FFF6 - dw $BB5D,$0009,$44A3,$FFF6 - dw $04DC,$0009,$FB24,$FFF6 - dw $4664,$000A,$B99C,$FFF5 - dw $91F5,$000A,$6E0B,$FFF5 - dw $DE8F,$000A,$2171,$FFF5 - dw $2332,$000B,$DCCE,$FFF4 - dw $71DE,$000B,$8E22,$FFF4 - dw $C193,$000B,$3E6D,$FFF4 - dw $0951,$000C,$F6AF,$FFF3 - dw $5B18,$000C,$A4E8,$FFF3 - dw $ADE8,$000C,$5218,$FFF3 - dw $01C1,$000C,$FE3F,$FFF3 - dw $4DA3,$000D,$B25D,$FFF2 - dw $A38E,$000D,$5C72,$FFF2 - dw $FA82,$000D,$057E,$FFF2 - dw $497F,$000E,$B681,$FFF1 - dw $A285,$000E,$5D7B,$FFF1 - dw $FC94,$000E,$036C,$FFF1 - dw $4EAC,$000F,$B154,$FFF0 - dw $AACD,$000F,$5533,$FFF0 - dw $07F7,$000F,$F809,$FFF0 - dw $5D2A,$0010,$A2D6,$FFEF - dw $BC66,$0010,$439A,$FFEF - dw $13AB,$0011,$EC55,$FFEE - dw $74F9,$0011,$8B07,$FFEE +namespace CommonB3 +incsrc "common_enemy_functions.asm" +namespace off ;;; $8687: Palette - enemy $F153 (unused spinning turtle eye) ;;; @@ -606,7 +24,7 @@ UNUSED_InstList_SpinningTurtleEye_Initial_B386A7: dw $000A,UNUSED_Spritemaps_SpinningTurtleEye_5_B38737 ;B386BB; dw $000A,UNUSED_Spritemaps_SpinningTurtleEye_6_B3873E ;B386BF; dw $000A,UNUSED_Spritemaps_SpinningTurtleEye_7_B38745 ;B386C3; - dw Instruction_Common_GotoY ;B386C7; + dw Common_Instruction_GotoY ;B386C7; dw UNUSED_InstList_SpinningTurtleEye_Initial_B386A7 ;B386C9; @@ -616,7 +34,7 @@ UNUSED_InstList_SpinningTurtleEye_B386CB: dw $0008,UNUSED_Spritemaps_SpinningTurtleEye_8_B3874C ;B386CB; dw $0008,UNUSED_Spritemaps_SpinningTurtleEye_9_B38753 ;B386CF; dw $0008,UNUSED_Spritemaps_SpinningTurtleEye_A_B3875A ;B386D3; - dw Instruction_Common_GotoY ;B386D7; + dw Common_Instruction_GotoY ;B386D7; dw UNUSED_InstList_SpinningTurtleEye_B386CB ;B386D9; @@ -625,7 +43,7 @@ UNUSED_InstList_SpinningTurtleEye_B386DB: dw $0008,UNUSED_Spritemaps_SpinningTurtleEye_B_B38761 ;B386DB; dw $0008,UNUSED_Spritemaps_SpinningTurtleEye_C_B38768 ;B386DF; dw $0008,UNUSED_Spritemaps_SpinningTurtleEye_D_B3876F ;B386E3; - dw Instruction_Common_GotoY ;B386E7; + dw Common_Instruction_GotoY ;B386E7; dw UNUSED_InstList_SpinningTurtleEye_B386DB ;B386E9; @@ -634,7 +52,7 @@ UNUSED_InstList_SpinningTurtleEye_B386EB: dw $0008,UNUSED_Spritemaps_SpinningTurtleEye_E_B38776 ;B386EB; dw $0008,UNUSED_Spritemaps_SpinningTurtleEye_F_B3877D ;B386EF; dw $0008,UNUSED_Spritemaps_SpinningTurtleEye_10_B38784 ;B386F3; - dw Instruction_Common_GotoY ;B386F7; + dw Common_Instruction_GotoY ;B386F7; dw UNUSED_InstList_SpinningTurtleEye_B386EB ;B386F9; endif ; !FEATURE_KEEP_UNREFERENCED @@ -754,7 +172,7 @@ InstList_Zeb_FacingLeft_Rising: dw $0002,Spritemaps_Zeb_3 ;B387BF; dw $0002,Spritemaps_Zeb_2 ;B387C3; dw $0002,Spritemaps_Zeb_1 ;B387C7; - dw Instruction_Common_GotoY ;B387CB; + dw Common_Instruction_GotoY ;B387CB; dw InstList_Zeb_FacingLeft_Rising ;B387CD; @@ -766,7 +184,7 @@ InstList_Zeb_FacingLeft_Shooting: dw $0001,Spritemaps_Zeb_4 ;B387DB; dw $0001,Spritemaps_Zeb_3 ;B387DF; dw $0001,Spritemaps_Zeb_1 ;B387E3; - dw Instruction_Common_GotoY ;B387E7; + dw Common_Instruction_GotoY ;B387E7; dw InstList_Zeb_FacingLeft_Shooting ;B387E9; @@ -780,7 +198,7 @@ InstList_Zeb_FacingRight_Rising: dw $0002,Spritemaps_Zeb_8 ;B387FF; dw $0002,Spritemaps_Zeb_7 ;B38803; dw $0002,Spritemaps_Zeb_6 ;B38807; - dw Instruction_Common_GotoY ;B3880B; + dw Common_Instruction_GotoY ;B3880B; dw InstList_Zeb_FacingRight_Rising ;B3880D; @@ -792,7 +210,7 @@ InstList_Zeb_FacingRight_Shooting: dw $0001,Spritemaps_Zeb_9 ;B3881B; dw $0001,Spritemaps_Zeb_8 ;B3881F; dw $0001,Spritemaps_Zeb_6 ;B38823; - dw Instruction_Common_GotoY ;B38827; + dw Common_Instruction_GotoY ;B38827; dw InstList_Zeb_FacingRight_Shooting ;B38829; @@ -1070,7 +488,7 @@ InstList_Zebbo_FacingLeft_Rising: dw $0001,Spritemaps_Zebbo_4 ;B38A21; dw $0002,Spritemaps_Zebbo_5 ;B38A25; dw $0001,Spritemaps_Zebbo_4 ;B38A29; - dw Instruction_Common_GotoY ;B38A2D; + dw Common_Instruction_GotoY ;B38A2D; dw InstList_Zebbo_FacingLeft_Rising ;B38A2F; @@ -1080,7 +498,7 @@ InstList_Zebbo_FacingLeft_Shooting: dw $0003,Spritemaps_Zebbo_1 ;B38A35; dw $0003,Spritemaps_Zebbo_2 ;B38A39; dw $0003,Spritemaps_Zebbo_1 ;B38A3D; - dw Instruction_Common_GotoY ;B38A41; + dw Common_Instruction_GotoY ;B38A41; dw InstList_Zebbo_FacingLeft_Shooting ;B38A43; @@ -1090,7 +508,7 @@ InstList_Zebbo_FacingRight_Rising: dw $0001,Spritemaps_Zebbo_A ;B38A49; dw $0002,Spritemaps_Zebbo_B ;B38A4D; dw $0001,Spritemaps_Zebbo_A ;B38A51; - dw Instruction_Common_GotoY ;B38A55; + dw Common_Instruction_GotoY ;B38A55; dw InstList_Zebbo_FacingRight_Rising ;B38A57; @@ -1100,7 +518,7 @@ InstList_Zebbo_FacingRight_Shooting: dw $0003,Spritemaps_Zebbo_7 ;B38A5D; dw $0003,Spritemaps_Zebbo_8 ;B38A61; dw $0003,Spritemaps_Zebbo_7 ;B38A65; - dw Instruction_Common_GotoY ;B38A69; + dw Common_Instruction_GotoY ;B38A69; dw InstList_Zebbo_FacingRight_Shooting ;B38A6B; @@ -1170,7 +588,7 @@ InstList_Gamet_FacingLeft_Rising: dw $0002,Spritemaps_Gamet_3 ;B38AF5; dw $0002,Spritemaps_Gamet_2 ;B38AF9; dw $0002,Spritemaps_Gamet_1 ;B38AFD; - dw Instruction_Common_GotoY ;B38B01; + dw Common_Instruction_GotoY ;B38B01; dw InstList_Gamet_FacingLeft_Rising ;B38B03; @@ -1182,7 +600,7 @@ InstList_Gamet_FacingLeft_Shooting: dw $0001,Spritemaps_Gamet_4 ;B38B11; dw $0001,Spritemaps_Gamet_3 ;B38B15; dw $0001,Spritemaps_Gamet_1 ;B38B19; - dw Instruction_Common_GotoY ;B38B1D; + dw Common_Instruction_GotoY ;B38B1D; dw InstList_Gamet_FacingLeft_Shooting ;B38B1F; @@ -1196,7 +614,7 @@ InstList_Gamet_FacingRight_Rising: dw $0002,Spritemaps_Gamet_8 ;B38B35; dw $0002,Spritemaps_Gamet_7 ;B38B39; dw $0002,Spritemaps_Gamet_6 ;B38B3D; - dw Instruction_Common_GotoY ;B38B41; + dw Common_Instruction_GotoY ;B38B41; dw InstList_Gamet_FacingRight_Rising ;B38B43; @@ -1208,7 +626,7 @@ InstList_Gamet_FacingRight_Shooting: dw $0001,Spritemaps_Gamet_9 ;B38B51; dw $0001,Spritemaps_Gamet_8 ;B38B55; dw $0001,Spritemaps_Gamet_6 ;B38B59; - dw Instruction_Common_GotoY ;B38B5D; + dw Common_Instruction_GotoY ;B38B5D; dw InstList_Gamet_FacingRight_Shooting ;B38B5F; @@ -1371,14 +789,14 @@ Function_Gamet_Rising: TAY ;B38CB5; LDA.W Enemy.YSubPosition,X ;B38CB6; CLC ;B38CB9; - ADC.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;B38CBA; + ADC.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;B38CBA; BCC + ;B38CBD; INC.W Enemy.YPosition,X ;B38CBF; + STA.W Enemy.YSubPosition,X ;B38CC2; LDA.W Enemy.YPosition,X ;B38CC5; CLC ;B38CC8; - ADC.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;B38CC9; + ADC.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;B38CC9; STA.W Enemy.YPosition,X ;B38CCC; CMP.W SamusYPosition ;B38CCF; BPL .return ;B38CD2; @@ -1420,14 +838,14 @@ Function_Gamet_MoveToFormation_UpperMiddle: TAY ;B38D15; LDA.W Enemy.YSubPosition,X ;B38D16; CLC ;B38D19; - ADC.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;B38D1A; + ADC.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;B38D1A; BCC + ;B38D1D; INC.W Enemy.YPosition,X ;B38D1F; + STA.W Enemy.YSubPosition,X ;B38D22; LDA.W Enemy.YPosition,X ;B38D25; CLC ;B38D28; - ADC.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;B38D29; + ADC.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;B38D29; STA.W Enemy.YPosition,X ;B38D2C; CLC ;B38D2F; ADC.W #$0010 ;B38D30; @@ -1453,14 +871,14 @@ Function_Gamet_MoveToFormation_Top: TAY ;B38D57; LDA.W Enemy.YSubPosition,X ;B38D58; CLC ;B38D5B; - ADC.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;B38D5C; + ADC.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;B38D5C; BCC + ;B38D5F; INC.W Enemy.YPosition,X ;B38D61; + STA.W Enemy.YSubPosition,X ;B38D64; LDA.W Enemy.YPosition,X ;B38D67; CLC ;B38D6A; - ADC.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;B38D6B; + ADC.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;B38D6B; STA.W Enemy.YPosition,X ;B38D6E; CLC ;B38D71; ADC.W #$0020 ;B38D72; @@ -1486,14 +904,14 @@ Function_Gamet_MoveToFormation_LowerMiddle: TAY ;B38D99; LDA.W Enemy.YSubPosition,X ;B38D9A; CLC ;B38D9D; - ADC.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;B38D9E; + ADC.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;B38D9E; BCC + ;B38DA1; INC.W Enemy.YPosition,X ;B38DA3; + STA.W Enemy.YSubPosition,X ;B38DA6; LDA.W Enemy.YPosition,X ;B38DA9; CLC ;B38DAC; - ADC.W CommonEnemySpeeds_LinearlyIncreasing,Y ;B38DAD; + ADC.W Common_EnemySpeeds_LinearlyIncreasing,Y ;B38DAD; STA.W Enemy.YPosition,X ;B38DB0; SEC ;B38DB3; SBC.W #$0010 ;B38DB4; @@ -1519,14 +937,14 @@ Function_Gamet_MoveToFormation_Bottom: TAY ;B38DDB; LDA.W Enemy.YSubPosition,X ;B38DDC; CLC ;B38DDF; - ADC.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;B38DE0; + ADC.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;B38DE0; BCC + ;B38DE3; INC.W Enemy.YPosition,X ;B38DE5; + STA.W Enemy.YSubPosition,X ;B38DE8; LDA.W Enemy.YPosition,X ;B38DEB; CLC ;B38DEE; - ADC.W CommonEnemySpeeds_LinearlyIncreasing,Y ;B38DEF; + ADC.W Common_EnemySpeeds_LinearlyIncreasing,Y ;B38DEF; STA.W Enemy.YPosition,X ;B38DF2; SEC ;B38DF5; SBC.W #$0020 ;B38DF6; @@ -1551,14 +969,14 @@ Function_Gamet_ShootingLeft: TAY ;B38E1A; LDA.W Enemy.XSubPosition,X ;B38E1B; CLC ;B38E1E; - ADC.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;B38E1F; + ADC.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;B38E1F; BCC + ;B38E22; INC.W Enemy.XPosition,X ;B38E24; + STA.W Enemy.XSubPosition,X ;B38E27; LDA.W Enemy.XPosition,X ;B38E2A; CLC ;B38E2D; - ADC.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;B38E2E; + ADC.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;B38E2E; STA.W Enemy.XPosition,X ;B38E31; RTS ;B38E34; @@ -1570,14 +988,14 @@ Function_Gamet_ShootingRight: TAY ;B38E3B; LDA.W Enemy.XSubPosition,X ;B38E3C; CLC ;B38E3F; - ADC.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;B38E40; + ADC.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;B38E40; BCC + ;B38E43; INC.W Enemy.XPosition,X ;B38E45; + STA.W Enemy.XSubPosition,X ;B38E48; LDA.W Enemy.XPosition,X ;B38E4B; CLC ;B38E4E; - ADC.W CommonEnemySpeeds_LinearlyIncreasing,Y ;B38E4F; + ADC.W Common_EnemySpeeds_LinearlyIncreasing,Y ;B38E4F; STA.W Enemy.XPosition,X ;B38E52; RTS ;B38E55; @@ -1680,7 +1098,7 @@ InstList_Geega_FacingLeft_Rising: dw $0004,Spritemaps_Geega_1 ;B38F00; dw $0004,Spritemaps_Geega_2 ;B38F04; dw $0004,Spritemaps_Geega_1 ;B38F08; - dw Instruction_Common_GotoY ;B38F0C; + dw Common_Instruction_GotoY ;B38F0C; dw InstList_Geega_FacingLeft_Rising ;B38F0E; @@ -1690,7 +1108,7 @@ InstList_Geega_FacingLeft_Shooting: dw $0001,Spritemaps_Geega_4 ;B38F14; dw $0001,Spritemaps_Geega_5 ;B38F18; dw $0001,Spritemaps_Geega_4 ;B38F1C; - dw Instruction_Common_GotoY ;B38F20; + dw Common_Instruction_GotoY ;B38F20; dw InstList_Geega_FacingLeft_Shooting ;B38F22; @@ -1700,7 +1118,7 @@ InstList_Geega_FacingRight_Rising: dw $0004,Spritemaps_Geega_7 ;B38F28; dw $0004,Spritemaps_Geega_8 ;B38F2C; dw $0004,Spritemaps_Geega_7 ;B38F30; - dw Instruction_Common_GotoY ;B38F34; + dw Common_Instruction_GotoY ;B38F34; dw InstList_Geega_FacingRight_Rising ;B38F36; @@ -1710,7 +1128,7 @@ InstList_Geega_FacingRight_Shooting: dw $0001,Spritemaps_Geega_A ;B38F3C; dw $0001,Spritemaps_Geega_B ;B38F40; dw $0001,Spritemaps_Geega_A ;B38F44; - dw Instruction_Common_GotoY ;B38F48; + dw Common_Instruction_GotoY ;B38F48; dw InstList_Geega_FacingRight_Shooting ;B38F4A; @@ -1738,13 +1156,13 @@ InitAI_Geega: ASL ;B38F81; ASL ;B38F82; TAY ;B38F83; - LDA.W CommonEnemySpeeds_LinearlyIncreasing,Y ;B38F84; + LDA.W Common_EnemySpeeds_LinearlyIncreasing,Y ;B38F84; STA.L Geega.rightVelocity,X ;B38F87; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+2,Y ;B38F8B; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+2,Y ;B38F8B; STA.L Geega.rightSubVelocity,X ;B38F8E; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+4,Y ;B38F92; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+4,Y ;B38F92; STA.L Geega.leftVelocity,X ;B38F95; - LDA.W CommonEnemySpeeds_LinearlyIncreasing+6,Y ;B38F99; + LDA.W Common_EnemySpeeds_LinearlyIncreasing+6,Y ;B38F99; STA.L Geega.leftSubVelocity,X ;B38F9C; LDA.W #Function_Geega_WaitForSamusToGetNear ;B38FA0; STA.W Geega.function,X ;B38FA3; @@ -2067,14 +1485,14 @@ MoveGeegaUp: TAY ;B3925F; LDA.W Enemy.YSubPosition,X ;B39260; CLC ;B39263; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing+4,Y ;B39264; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing+4,Y ;B39264; BCC + ;B39267; INC.W Enemy.YPosition,X ;B39269; + STA.W Enemy.YSubPosition,X ;B3926C; LDA.W Enemy.YPosition,X ;B3926F; CLC ;B39272; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing+6,Y ;B39273; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing+6,Y ;B39273; STA.W Enemy.YPosition,X ;B39276; RTS ;B39279; @@ -2095,14 +1513,14 @@ MoveGeegaDown: TAY ;B39290; LDA.W Enemy.YSubPosition,X ;B39291; CLC ;B39294; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing,Y ;B39295; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing,Y ;B39295; BCC + ;B39298; INC.W Enemy.YPosition,X ;B3929A; + STA.W Enemy.YSubPosition,X ;B3929D; LDA.W Enemy.YPosition,X ;B392A0; CLC ;B392A3; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing+2,Y ;B392A4; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing+2,Y ;B392A4; STA.W Enemy.YPosition,X ;B392A7; .return: @@ -2197,76 +1615,76 @@ Palette_Botwoon: InstList_Botwoon_MouthClosed_AimingUp_FacingLeft: dw Instruction_Botwoon_EnemyRadius_8x10 ;B39339; dw $0001,Spritemaps_Botwoon_MouthClosed_Priority2_AimingUp_FacingLeft;B3933B; - dw Instruction_Common_Sleep ;B3933F; + dw Common_Instruction_Sleep ;B3933F; ;;; $9341: Instruction list - mouth closed - aiming up-left ;;; InstList_Botwoon_MouthClosed_AimingUpLeft: dw Instruction_Botwoon_EnemyRadius_CxC ;B39341; dw $0001,Spritemaps_Botwoon_MouthClosed_Priority2_AimingUpLeft ;B39343; - dw Instruction_Common_Sleep ;B39347; + dw Common_Instruction_Sleep ;B39347; ;;; $9349: Instruction list - mouth closed - aiming left ;;; InstList_Botwoon_MouthClosed_AimingLeft: dw Instruction_Botwoon_EnemyRadius_10x8 ;B39349; dw $0001,Spritemaps_Botwoon_MouthClosed_Priority2_AimingLeft ;B3934B; - dw Instruction_Common_Sleep ;B3934F; + dw Common_Instruction_Sleep ;B3934F; ;;; $9351: Instruction list - mouth closed - aiming down-left ;;; InstList_Botwoon_MouthClosed_AimingDownLeft: dw Instruction_Botwoon_EnemyRadius_CxC_duplicate ;B39351; dw $0001,Spritemaps_Botwoon_MouthClosed_Priority2_AimingDownLeft ;B39353; - dw Instruction_Common_Sleep ;B39357; + dw Common_Instruction_Sleep ;B39357; ;;; $9359: Unused. Instruction list - mouth closed - aiming down (facing left) ;;; UNSUED_InstList_Botwoon_MouthClosed_AimDown_FaceLeft_B39359: dw Instruction_Botwoon_EnemyRadius_8x10_duplicate ;B39359; dw $0001,Spritemaps_Botwoon_MouthClosed_Priority2_AimDown_FacingLeft ;B3935B; - dw Instruction_Common_Sleep ;B3935F; + dw Common_Instruction_Sleep ;B3935F; ;;; $9361: Instruction list - mouth closed - aiming down (facing right) ;;; InstList_Botwoon_MouthClosed_AimingDown_FacingRight: dw Instruction_Botwoon_EnemyRadius_8x10_duplicate_again ;B39361; dw $0001,Spritemaps_Botwoon_MouthClosed_Priority2_AimDown_FacingRight;B39363; - dw Instruction_Common_Sleep ;B39367; + dw Common_Instruction_Sleep ;B39367; ;;; $9369: Instruction list - mouth closed - aiming down-right ;;; InstList_Botwoon_MouthClosed_AimingDownRight: dw Instruction_Botwoon_EnemyRadius_CxC_duplicate_again ;B39369; dw $0001,Spritemaps_Botwoon_MouthClosed_Priority2_AimingDownRight ;B3936B; - dw Instruction_Common_Sleep ;B3936F; + dw Common_Instruction_Sleep ;B3936F; ;;; $9371: Instruction list - mouth closed - aiming right ;;; InstList_Botwoon_MouthClosed_AimingRight: dw Instruction_Botwoon_EnemyRadius_10x8_duplicate ;B39371; dw $0001,Spritemaps_Botwoon_MouthClosed_Priority2_AimingRight ;B39373; - dw Instruction_Common_Sleep ;B39377; + dw Common_Instruction_Sleep ;B39377; ;;; $9379: Instruction list - mouth closed - aiming up-right ;;; InstList_Botwoon_MouthClosed_AimingUpRight: dw Instruction_Botwoon_EnemyRadius_CxC_duplicate_again2 ;B39379; dw $0001,Spritemaps_Botwoon_MouthClosed_Priority2_AimingUpRight ;B3937B; - dw Instruction_Common_Sleep ;B3937F; + dw Common_Instruction_Sleep ;B3937F; ;;; $9381: Instruction list - mouth closed - aiming up (facing right) ;;; InstList_Botwoon_MouthClosed_AimingUp_FacingRight: dw Instruction_Botwoon_EnemyRadius_8x10_duplicate_again2 ;B39381; dw $0001,Spritemaps_Botwoon_MouthClosed_Priority2_AimUp_FacingRight ;B39383; - dw Instruction_Common_Sleep ;B39387; + dw Common_Instruction_Sleep ;B39387; ;;; $9389: Instruction list - hide ;;; InstList_Botwoon_Hide: - dw $0001,Spritemap_Common_Nothing ;B39389; - dw Instruction_Common_Sleep ;B3938D; + dw $0001,Common_Spritemap_Nothing ;B39389; + dw Common_Instruction_Sleep ;B3938D; ;;; $938F: Unused. Instruction list - spit - aiming up (facing left) ;;; @@ -2276,7 +1694,7 @@ UNSUED_InstList_Botwoon_Spit_AimingUp_FacingLeft: dw Instruction_Botwoon_QueueSpitSFX ;B39395; dw Instruction_Botwoon_SetSpittingFlag ;B39397; dw $0010,Spritemaps_Botwoon_MouthOpen_Priority2_AimingUp_FacingLeft ;B39399; - dw Instruction_Common_Sleep ;B3939D; + dw Common_Instruction_Sleep ;B3939D; ;;; $939F: Instruction list - spit - aiming up-left ;;; @@ -2286,7 +1704,7 @@ InstList_Botwoon_Spit_AimingUpLeft: dw Instruction_Botwoon_QueueSpitSFX ;B393A5; dw Instruction_Botwoon_SetSpittingFlag ;B393A7; dw $0010,Spritemaps_Botwoon_MouthOpen_Priority2_AimingUpLeft ;B393A9; - dw Instruction_Common_Sleep ;B393AD; + dw Common_Instruction_Sleep ;B393AD; ;;; $93AF: Instruction list - spit - aiming left ;;; @@ -2296,7 +1714,7 @@ InstList_Botwoon_Spit_AimingLeft: dw Instruction_Botwoon_QueueSpitSFX ;B393B5; dw Instruction_Botwoon_SetSpittingFlag ;B393B7; dw $0019,Spritemaps_Botwoon_MouthOpen_Priority2_AimingLeft ;B393B9; - dw Instruction_Common_Sleep ;B393BD; + dw Common_Instruction_Sleep ;B393BD; ;;; $93BF: Instruction list - spit - aiming down-left ;;; @@ -2306,7 +1724,7 @@ InstList_Botwoon_Spit_AimingDownLeft: dw Instruction_Botwoon_QueueSpitSFX ;B393C5; dw Instruction_Botwoon_SetSpittingFlag ;B393C7; dw $0010,Spritemaps_Botwoon_MouthOpen_Priority2_AimingDownLeft ;B393C9; - dw Instruction_Common_Sleep ;B393CD; + dw Common_Instruction_Sleep ;B393CD; if !FEATURE_KEEP_UNREFERENCED @@ -2317,7 +1735,7 @@ UNUSED_InstList_Botwoon_Spit_AimingDown_FacingLeft_B393CF: dw Instruction_Botwoon_QueueSpitSFX ;B393D5; dw Instruction_Botwoon_SetSpittingFlag ;B393D7; dw $0010,Spritemaps_Botwoon_MouthOpen_Priority2_AimingDown_FacingLeft;B393D9; - dw Instruction_Common_Sleep ;B393DD; + dw Common_Instruction_Sleep ;B393DD; endif ; !FEATURE_KEEP_UNREFERENCED @@ -2328,7 +1746,7 @@ InstList_Botwoon_Spit_AimingDown_FacingRight: dw Instruction_Botwoon_QueueSpitSFX ;B393E5; dw Instruction_Botwoon_SetSpittingFlag ;B393E7; dw $0010,Spritemaps_Botwoon_MouthOpen_Priority2_AimDown_FacingRight ;B393E9; - dw Instruction_Common_Sleep ;B393ED; + dw Common_Instruction_Sleep ;B393ED; ;;; $93EF: Instruction list - spit - aiming down-right ;;; @@ -2338,7 +1756,7 @@ InstList_Botwoon_Spit_AimingDownRight: dw Instruction_Botwoon_QueueSpitSFX ;B393F5; dw Instruction_Botwoon_SetSpittingFlag ;B393F7; dw $0010,Spritemaps_Botwoon_MouthOpen_Priority2_AimingDownRight ;B393F9; - dw Instruction_Common_Sleep ;B393FD; + dw Common_Instruction_Sleep ;B393FD; ;;; $93FF: Instruction list - spit - aiming right ;;; @@ -2348,7 +1766,7 @@ InstList_Botwoon_Spit_AimingRight: dw Instruction_Botwoon_QueueSpitSFX ;B39405; dw Instruction_Botwoon_SetSpittingFlag ;B39407; dw $0010,Spritemaps_Botwoon_MouthOpen_Priority2_AimingRight ;B39409; - dw Instruction_Common_Sleep ;B3940D; + dw Common_Instruction_Sleep ;B3940D; ;;; $940F: Instruction list - spit - aiming up-right ;;; @@ -2358,7 +1776,7 @@ InstList_Botwoon_Spit_AimingUpRight: dw Instruction_Botwoon_QueueSpitSFX ;B39415; dw Instruction_Botwoon_SetSpittingFlag ;B39417; dw $0010,Spritemaps_Botwoon_MouthOpen_Priority2_AimingUpRight ;B39419; - dw Instruction_Common_Sleep ;B3941D; + dw Common_Instruction_Sleep ;B3941D; ;;; $941F: Instruction list - spit - aiming up (facing right) ;;; @@ -2368,71 +1786,71 @@ InstList_Botwoon_Spit_AimingUp_FacingRight: dw Instruction_Botwoon_QueueSpitSFX ;B39425; dw Instruction_Botwoon_SetSpittingFlag ;B39427; dw $0010,Spritemaps_Botwoon_MouthOpen_Priority2_AimingUp_FacingRight ;B39429; - dw Instruction_Common_Sleep ;B3942D; + dw Common_Instruction_Sleep ;B3942D; if !FEATURE_KEEP_UNREFERENCED ;;; $942F: Unused. Instruction list - hidden - aiming up (facing left) ;;; UNUSED_InstList_Botwoon_Hidden_AimingUp_FacingLeft_B3942F: dw $0001,Spritemaps_Botwoon_MouthClosed_Priority0_AimingUp_FacingLeft;B3942F; - dw Instruction_Common_Sleep ;B39433; + dw Common_Instruction_Sleep ;B39433; endif ; !FEATURE_KEEP_UNREFERENCED ;;; $9435: Instruction list - hidden - aiming up-left ;;; InstList_Botwoon_Hidden_AimingUpLeft: dw $0001,Spritemaps_Botwoon_MouthClosed_Priority0_AimingUpLeft ;B39435; - dw Instruction_Common_Sleep ;B39439; + dw Common_Instruction_Sleep ;B39439; ;;; $943B: Instruction list - hidden - aiming left ;;; InstList_Botwoon_Hidden_AimingLeft: dw $0001,Spritemaps_Botwoon_MouthClosed_Priority0_AimingLeft ;B3943B; - dw Instruction_Common_Sleep ;B3943F; + dw Common_Instruction_Sleep ;B3943F; ;;; $9441: Instruction list - hidden - aiming down-left ;;; InstList_Botwoon_Hidden_AimingDownLeft: dw $0001,Spritemaps_Botwoon_MouthClosed_Priority0_AimingDownLeft ;B39441; - dw Instruction_Common_Sleep ;B39445; + dw Common_Instruction_Sleep ;B39445; if !FEATURE_KEEP_UNREFERENCED ;;; $9447: Unused. Instruction list - hidden - aiming down (facing left) ;;; UNUSED_InstList_Botwoon_Hidden_AimingDown_FacingLeft_B39447: dw $0001,Spritemaps_Botwoon_MouthClosed_Priority0_AimDown_FacingLeft ;B39447; - dw Instruction_Common_Sleep ;B3944B; + dw Common_Instruction_Sleep ;B3944B; endif ; !FEATURE_KEEP_UNREFERENCED ;;; $944D: Instruction list - hidden - aiming down (facing right) ;;; InstList_Botwoon_Hidden_AimingDown_FacingRight: dw $0001,Spritemaps_Botwoon_MouthClosed_Priority0_AimDown_FacingRight;B3944D; - dw Instruction_Common_Sleep ;B39451; + dw Common_Instruction_Sleep ;B39451; ;;; $9453: Instruction list - hidden - aiming down-right ;;; InstList_Botwoon_Hidden_AimingDownRight: dw $0001,Spritemaps_Botwoon_MouthClosed_Priority0_AimingDownRight ;B39453; - dw Instruction_Common_Sleep ;B39457; + dw Common_Instruction_Sleep ;B39457; ;;; $9459: Instruction list - hidden - aiming right ;;; InstList_Botwoon_Hidden_AimingRight: dw $0001,Spritemaps_Botwoon_MouthClosed_Priority0_AimingRight ;B39459; - dw Instruction_Common_Sleep ;B3945D; + dw Common_Instruction_Sleep ;B3945D; ;;; $945F: Instruction list - hidden - aiming up-right ;;; InstList_Botwoon_Hidden_AimingUpRight: dw $0001,Spritemaps_Botwoon_MouthClosed_Priority0_AimingUpRight ;B3945F; - dw Instruction_Common_Sleep ;B39463; + dw Common_Instruction_Sleep ;B39463; ;;; $9465: Instruction list - hidden - aiming up (facing right) ;;; InstList_Botwoon_Hidden_AimingUp_FacingRight: dw $0001,Spritemaps_Botwoon_MouthClosed_Priority0_AimUp_FacingRight ;B39465; - dw Instruction_Common_Sleep ;B39469; + dw Common_Instruction_Sleep ;B39469; ;;; $946B: Botwoon instruction list pointers ;;; @@ -3138,14 +2556,14 @@ Function_Botwoon_DeathSequence_FallingToGround: TAY ;B39A6C; LDA.W Enemy.YSubPosition,X ;B39A6D; CLC ;B39A70; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing,Y ;B39A71; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing,Y ;B39A71; BCC + ;B39A74; INC.W Enemy.YPosition,X ;B39A76; + STA.W Enemy.YSubPosition,X ;B39A79; LDA.W Enemy.YPosition,X ;B39A7C; CLC ;B39A7F; - ADC.W CommonEnemySpeeds_QuadraticallyIncreasing+2,Y ;B39A80; + ADC.W Common_EnemySpeeds_QuadraticallyIncreasing+2,Y ;B39A80; STA.W Enemy.YPosition,X ;B39A83; CMP.W #$00C8 ;B39A86; BMI .lessThanC8 ;B39A89; @@ -5402,7 +4820,7 @@ InstList_EtecoonEscape_RunningLeft_LowTide_1: dw $0005,Spritemaps_EtecoonEscape_1 ;B3E55E; dw $0005,Spritemaps_EtecoonEscape_2 ;B3E562; dw $0005,Spritemaps_EtecoonEscape_1 ;B3E566; - dw Instruction_Common_GotoY ;B3E56A; + dw Common_Instruction_GotoY ;B3E56A; dw InstList_EtecoonEscape_RunningLeft_LowTide_1 ;B3E56C; @@ -5412,7 +4830,7 @@ InstList_EtecoonEscape_RunningLeft_HighTide: dw $0003,Spritemaps_EtecoonEscape_1 ;B3E572; dw $0003,Spritemaps_EtecoonEscape_2 ;B3E576; dw $0003,Spritemaps_EtecoonEscape_1 ;B3E57A; - dw Instruction_Common_GotoY ;B3E57E; + dw Common_Instruction_GotoY ;B3E57E; dw InstList_EtecoonEscape_RunningLeft_HighTide ;B3E580; @@ -5426,7 +4844,7 @@ InstList_EtecoonEscape_RunningRight_LowTide_1: dw $0006,Spritemaps_EtecoonEscape_4 ;B3E58A; dw $0006,Spritemaps_EtecoonEscape_5 ;B3E58E; dw $0006,Spritemaps_EtecoonEscape_4 ;B3E592; - dw Instruction_Common_GotoY ;B3E596; + dw Common_Instruction_GotoY ;B3E596; dw InstList_EtecoonEscape_RunningRight_LowTide_1 ;B3E598; @@ -5436,13 +4854,13 @@ InstList_EtecoonEscape_RunningRight_HighTide: dw $0003,Spritemaps_EtecoonEscape_4 ;B3E59E; dw $0003,Spritemaps_EtecoonEscape_5 ;B3E5A2; dw $0003,Spritemaps_EtecoonEscape_4 ;B3E5A6; - dw Instruction_Common_GotoY ;B3E5AA; + dw Common_Instruction_GotoY ;B3E5AA; dw InstList_EtecoonEscape_RunningRight_HighTide ;B3E5AC; ;;; $E5AE: Instruction list - running for escape ;;; InstList_EtecoonEscape_RunningForEscape_0: - dw Instruction_Common_Enemy0FB2_InY ;B3E5AE; + dw Common_Instruction_Enemy0FB2_InY ;B3E5AE; dw Function_EtecoonEscape_RunningForEscape ;B3E5B0; InstList_EtecoonEscape_RunningForEscape_1: @@ -5450,7 +4868,7 @@ InstList_EtecoonEscape_RunningForEscape_1: dw $0003,Spritemaps_EtecoonEscape_4 ;B3E5B6; dw $0003,Spritemaps_EtecoonEscape_5 ;B3E5BA; dw $0003,Spritemaps_EtecoonEscape_4 ;B3E5BE; - dw Instruction_Common_GotoY ;B3E5C2; + dw Common_Instruction_GotoY ;B3E5C2; dw InstList_EtecoonEscape_RunningForEscape_1 ;B3E5C4; @@ -5460,14 +4878,14 @@ InstList_EtecoonEscape_Stationary: dw $0008,Spritemaps_EtecoonEscape_F ;B3E5CA; dw $0040,Spritemaps_EtecoonEscape_11 ;B3E5CE; dw $0008,Spritemaps_EtecoonEscape_10 ;B3E5D2; - dw Instruction_Common_GotoY ;B3E5D6; + dw Common_Instruction_GotoY ;B3E5D6; dw InstList_EtecoonEscape_Stationary ;B3E5D8; ;;; $E5DA: Instruction list - express gratitude then escape ;;; InstList_EtecoonEscape_ExpressGratitudeThenEscape_0: - dw Instruction_Common_SetEnemy0FB2ToRTS ;B3E5DA; - dw Instruction_Common_TimerInY,$0008 ;B3E5DC; + dw Common_Instruction_SetEnemy0FB2ToRTS ;B3E5DA; + dw Common_Instruction_TimerInY,$0008 ;B3E5DC; InstList_EtecoonEscape_ExpressGratitudeThenEscape_1: dw $0008,Spritemaps_EtecoonEscape_0 ;B3E5E0; @@ -5478,11 +4896,11 @@ InstList_EtecoonEscape_ExpressGratitudeThenEscape_1: dw Instruction_EtecoonEscape_XPositionPlusY,$FFFD ;B3E5F4; dw $0008,Spritemaps_EtecoonEscape_1 ;B3E5F6; dw Instruction_EtecoonEscape_XPositionPlusY,$FFFD ;B3E5FC; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;B3E600; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;B3E600; dw InstList_EtecoonEscape_ExpressGratitudeThenEscape_1 ;B3E602; dw $0040,Spritemaps_EtecoonEscape_E ;B3E604; dw $0008,Spritemaps_EtecoonEscape_F ;B3E608; - dw Instruction_Common_GotoY ;B3E60C; + dw Common_Instruction_GotoY ;B3E60C; dw InstList_EtecoonEscape_RunningForEscape_0 ;B3E60E; @@ -5501,7 +4919,7 @@ if !FEATURE_KEEP_UNREFERENCED ;;; $E61D: Unused. Instruction list ;;; UNUSED_InstList_EtecoonEscape_B3E61D: dw $0001,Spritemaps_EtecoonEscape_6 ;B3E61D; - dw Instruction_Common_Sleep ;B3E621; + dw Common_Instruction_Sleep ;B3E621; ;;; $E623: Unused. Instruction list ;;; @@ -5511,13 +4929,13 @@ UNUSED_InstList_EtecoonEscape_B3E623: dw $0006,Spritemaps_EtecoonEscape_9 ;B3E62B; dw $000C,Spritemaps_EtecoonEscape_8 ;B3E62F; dw $000C,Spritemaps_EtecoonEscape_7 ;B3E633; - dw Instruction_Common_Sleep ;B3E637; + dw Common_Instruction_Sleep ;B3E637; ;;; $E639: Unused. Instruction list ;;; UNUSED_InstList_EtecoonEscape_B3E639: dw $0001,Spritemaps_EtecoonEscape_A ;B3E639; - dw Instruction_Common_Sleep ;B3E63D; + dw Common_Instruction_Sleep ;B3E63D; ;;; $E63F: Unused. Instruction list ;;; @@ -5527,7 +4945,7 @@ UNUSED_InstList_EtecoonEscape_B3E63F: dw $0006,Spritemaps_EtecoonEscape_D ;B3E647; dw $000C,Spritemaps_EtecoonEscape_C ;B3E64B; dw $000C,Spritemaps_EtecoonEscape_B ;B3E64F; - dw Instruction_Common_Sleep ;B3E653; + dw Common_Instruction_Sleep ;B3E653; endif ; !FEATURE_KEEP_UNREFERENCED @@ -5816,7 +5234,7 @@ Palette_DachoraEscape: ;;; $E964: Instruction list - running around aimlessly - low tide ;;; InstList_DachoraEscape_RunningAroundAimlessly_LowTide_0: - dw Instruction_Common_TimerInY,$0005 ;B3E964; + dw Common_Instruction_TimerInY,$0005 ;B3E964; InstList_DachoraEscape_RunningAroundAimlessly_LowTide_1: dw $0003,Spritemaps_DachoraEscape_0 ;B3E968; @@ -5835,9 +5253,9 @@ InstList_DachoraEscape_RunningAroundAimlessly_LowTide_1: dw InstList_DachoraEscape_RunningAroundAimlessly_HighTide_2 ;B3E98E; dw InstList_DachoraEscape_GotoY_IfCrittersEscaped ;B3E990; dw InstList_DachoraEscape_RunningForEscape_0 ;B3E992; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;B3E994; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;B3E994; dw InstList_DachoraEscape_RunningAroundAimlessly_LowTide_1 ;B3E996; - dw Instruction_Common_TimerInY,$0005 ;B3E998; + dw Common_Instruction_TimerInY,$0005 ;B3E998; InstList_DachoraEscape_RunningAroundAimlessly_LowTide_2: dw $0003,Spritemaps_DachoraEscape_6 ;B3E99C; @@ -5856,16 +5274,16 @@ InstList_DachoraEscape_RunningAroundAimlessly_LowTide_2: dw InstList_DachoraEscape_RunningAroundAimlessly_HighTide_4 ;B3E9C2; dw InstList_DachoraEscape_GotoY_IfCrittersEscaped ;B3E9C4; dw InstList_DachoraEscape_RunningForEscape_1 ;B3E9C6; - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;B3E9C8; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;B3E9C8; dw InstList_DachoraEscape_RunningAroundAimlessly_LowTide_2 ;B3E9CA; - dw Instruction_Common_GotoY ;B3E9CC; + dw Common_Instruction_GotoY ;B3E9CC; dw InstList_DachoraEscape_RunningAroundAimlessly_LowTide_0 ;B3E9CE; ;;; $E9D0: Instruction list - running around aimlessly - high tide ;;; ; Parts of this instruction list are jumped to from the low tide instruction list InstList_DachoraEscape_RunningAroundAimlessly_HighTide_0: - dw Instruction_Common_TimerInY,$0005 ;B3E9D0; + dw Common_Instruction_TimerInY,$0005 ;B3E9D0; InstList_DachoraEscape_RunningAroundAimlessly_HighTide_1: dw $0002,Spritemaps_DachoraEscape_0 ;B3E9D4; @@ -5884,9 +5302,9 @@ InstList_DachoraEscape_RunningAroundAimlessly_HighTide_1: dw InstList_DachoraEscape_RunningForEscape_0 ;B3E9FA; InstList_DachoraEscape_RunningAroundAimlessly_HighTide_2: - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;B3E9FC; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;B3E9FC; dw InstList_DachoraEscape_RunningAroundAimlessly_HighTide_1 ;B3E9FE; - dw Instruction_Common_TimerInY,$0005 ;B3EA00; + dw Common_Instruction_TimerInY,$0005 ;B3EA00; InstList_DachoraEscape_RunningAroundAimlessly_HighTide_3: dw $0002,Spritemaps_DachoraEscape_6 ;B3EA04; @@ -5905,9 +5323,9 @@ InstList_DachoraEscape_RunningAroundAimlessly_HighTide_3: dw InstList_DachoraEscape_RunningForEscape_1 ;B3EA2A; InstList_DachoraEscape_RunningAroundAimlessly_HighTide_4: - dw Instruction_Common_DecrementTimer_GotoYIfNonZero_duplicate ;B3EA2C; + dw Common_Instruction_DecrementTimer_GotoYIfNonZero_duplicate ;B3EA2C; dw InstList_DachoraEscape_RunningAroundAimlessly_HighTide_3 ;B3EA2E; - dw Instruction_Common_GotoY ;B3EA30; + dw Common_Instruction_GotoY ;B3EA30; dw InstList_DachoraEscape_RunningAroundAimlessly_HighTide_0 ;B3EA32; @@ -5955,7 +5373,7 @@ InstList_DachoraEscape_RunningForEscape_2: dw Instruction_DachoraEscape_XPositionPlus6 ;B3EA9C; dw $0001,Spritemaps_DachoraEscape_B ;B3EA9E; dw Instruction_DachoraEscape_XPositionPlus6 ;B3EAA2; - dw Instruction_Common_GotoY ;B3EAA4; + dw Common_Instruction_GotoY ;B3EAA4; dw InstList_DachoraEscape_RunningForEscape_2 ;B3EAA6; @@ -6024,7 +5442,7 @@ InitAI_DachoraEscape: LDA.W Enemy.properties,X ;B3EAFB; ORA.W #$2000 ;B3EAFE; STA.W Enemy.properties,X ;B3EB01; - LDA.W #Spritemap_Common_Nothing ;B3EB04; + LDA.W #Common_Spritemap_Nothing ;B3EB04; STA.W Enemy.spritemap,X ;B3EB07; LDA.W #$0001 ;B3EB0A; STA.W Enemy.instTimer,X ;B3EB0D; diff --git a/src/common_enemy_functions.asm b/src/common_enemy_functions.asm new file mode 100644 index 0000000..bf63fa9 --- /dev/null +++ b/src/common_enemy_functions.asm @@ -0,0 +1,630 @@ + +; Loading the game: +; $8A1E - load enemies - at $80:A0CA (start gameplay) +; $8CD7 - initialise enemies and transfer tiles to VRAM - at $82:80C9/80F9/814C (game state 6/1Fh/28h), executed 6 times for 6 frames + +; Main gameplay (game state 8): +; $8EB6 - determine which enemies to process +; $9785 - Samus / projectile interaction handler +; $8FD4 - main enemy routine +; $9758 - enemy collision handling +; $C26A - process enemy instructions +; $9423 - add enemy to drawing queue +; $A8F0 - Samus / solid enemy collision detection, executed at least twice +; $9894 - enemy projectile / Samus collision detection +; $996C - enemy projectile / projectile collision detection +; $A306 - process enemy power bomb interaction +; $884D - draw Samus, projectiles, enemies and enemy projectiles +; $944A - write enemy OAM +; $88C4 - execute enemy graphics drawn hook +; $9726 - handle queuing enemy BG2 tilemap VRAM transfer +; $8687 - handle room shaking +; $9169 - decrement Samus hurt timers and clear active enemy indices + +; Door transition whilst screen is fading out (game state Ah/Bh): +; $8EB6 - determine which enemies to process +; $8FD4 - main enemy routine +; $884D - draw Samus, enemies and enemy projectiles + +; Door transition whilst screen is scrolling (game state Bh): +; Enemy tiles are processed via enemy set data by $82:DFD1 during door transition function $E4A9 +; $8A1E - load enemies - at $82:E4A9 +; $896F - load enemy set data (just mirrors enemy set into RAM ($7E:D559), debug/pointless) +; $8A6D - clear enemy data and process enemy set +; $8D64 - process enemy set (from ROM directly) (loads enemy palettes and allocates space for tiles (EnemyTileData_Size, $7E:EF5C)) +; $8C6C - load enemy tile data (loads enemy tiles into $7E:7000 from enemy loading data (EnemyTileData_Size), this data is then DMA'd by $8CD7 (but not $8A9E)) +; $8A9E - initialise enemies - at $82:E4A9 (clear enemy tiles ($7E:7000), load enemy population data into enemy data) +; $8BF3 - load enemy GFX indices (determines enemy VRAM tiles index and palette index ($0F98/96 / $7E:7006/08) from enemy set (again, from ROM directly)) +; $88D0 - record enemy spawn data (mirrors enemy population data to $7E:701E..39) +; $8BE9 - execute enemy initialisation AI + +; Door transition whilst screen is fading in (game state Bh): +; $8EB6 - determine which enemies to process +; $8FD4 - main enemy routine +; $884D - draw Samus, enemies and enemy projectiles +; $9726 - handle queuing enemy BG2 tilemap VRAM transfer + + +; Common to all enemy code banks + +;;; $8000: Grapple AI - no interaction. Also unfreezes enemies(!) ;;; +GrappleAI_NoInteraction: +; Used by skultera, Draygon body, fire arc, Phantoon, etecoon, dachora and WS ghost + JSL.L GrappleAI_SwitchEnemyAIToMainAI ;A08000; + RTL ;A08004; + + +;;; $8005: Grapple AI - Samus latches on ;;; +GrappleAI_SamusLatchesOn: +; Used by gripper and Crocomire + JSL.L GrappleAI_SamusLatchesOnWithGrapple ;A08005; + RTL ;A08009; + + +;;; $800A: Grapple AI - kill enemy ;;; +GrappleAI_KillEnemy: +; Common + JSL.L GrappleAI_EnemyGrappleDeath ;A0800A; + RTL ;A0800E; + + +;;; $800F: Grapple AI - cancel grapple beam ;;; +GrappleAI_CancelGrappleBeam: +; Common + JSL.L GrappleAI_SwitchToFrozenAI ;A0800F; + RTL ;A08013; + + +;;; $8014: Grapple AI - Samus latches on - no invincibility ;;; +GrappleAI_SamusLatchesOn_NoInvincibility: +; Used by powamp + JSL.L GrappleAI_SamusLatchesOnWithGrapple_NoInvincibility ;A08014; + RTL ;A08018; + + +;;; $8019: Unused. Grapple AI - Samus latches on - paralyse enemy ;;; +UNUSED_GrappleAI_SamusLatchesOn_ParalyzeEnemy_A08019: + JSL.L GrappleAI_SamusLatchesOnWithGrapple_ParalyzeEnemy ;A08019; + RTL ;A0801D; + + +;;; $801E: Grapple AI - hurt Samus ;;; +GrappleAI_HurtSamus: +; Used by WS spark +; Hurt reaction happens in $9B:B932 + JSL.L GrappleAI_SwitchToFrozenAI_duplicate ;A0801E; + RTL ;A08022; + + +;;; $8023: Normal enemy touch AI ;;; +NormalEnemyTouchAI: + JSL.L NormalEnemyTouchAI_Internal ;A08023; + RTL ;A08027; + + +;;; $8028: Normal touch AI - no death check ;;; +NormalTouchAI_NoDeathCheck: + JSL.L NormalEnemyTouchAI_NoDeathCheck_External ;A08028; + RTL ;A0802C; + + +;;; $802D: Normal enemy shot AI ;;; +NormalEnemyShotAI: + JSL.L NormalEnemyShotAI_Internal ;A0802D; + RTL ;A08031; + + +;;; $8032: Normal enemy shot AI - no death check, no enemy shot graphic ;;; +NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic: + JSL.L NormalEnemyShotAI_NoDeathCheck_NoEnemyShotGraphic_External ;A08032; + RTL ;A08036; + + +;;; $8037: Normal enemy power bomb AI ;;; +NormalEnemyPowerBombAI: + JSL.L NormalEnemyPowerBombAI_Internal ;A08037; + RTL ;A0803B; + + +;;; $803C: Normal enemy power bomb AI - no death check ;;; +NormalEnemyPowerBombAI_NoDeathCheck: +; Kraid's power bomb AI + JSL.L NormalEnemyPowerBombAI_NoDeathCheck_External ;A0803C; + RTL ;A08040; + + +;;; $8041: Normal enemy frozen AI ;;; +NormalEnemyFrozenAI: + JSL.L NormalEnemyFrozenAI_Internal ;A08041; + RTL ;A08045; + + +;;; $8046: Creates a dud shot ;;; +CreateADudShot: + JSL.L CreateADudShot_Internal ;A08046; + RTL ;A0804A; + + +;;; $804B: RTS ;;; +RTS_A0804B: + RTS ;A0804B; + + +;;; $804C: RTL ;;; +RTL_A0804C: + RTL ;A0804C; + + +;;; $804D: Spritemap - nothing ;;; +Spritemap_Nothing: + dw $0000 ;A0804D; + + +;;; $804F: Extended spritemap - nothing ;;; +ExtendedSpritemap_Nothing: + dw $0001,$0000,$0000 ;A0804F; + dw Spritemap_Nothing ;A08055; + dw Hitbox_Nothing ;A08057; + + +;;; $8059: Hitbox - nothing ;;; +Hitbox_Nothing: +; [n entries] [[left offset] [top offset] [right offset] [bottom offset] [p touch] [p shot]]... + dw $0001,$0000,$0000,$0000,$0000 ;A08059; + dw NormalEnemyTouchAI ;A08063; + dw NormalEnemyShotAI ;A08065; + + +;;; $8067: Instruction list - delete enemy ;;; +InstList_DeleteEnemy: + dw Instruction_DeleteEnemy ;A08067; + + +;;; $8069: Two NOPs ;;; +NOPNOP_A08069: +; Used as palette by respawning enemy placeholder and Draygon's eye o_O + NOP ;A08069; + NOP ;A0806A; + +Instruction_Enemy0FB2_InY: +; Used only by torizos (for enemy movement function) and escape etecoon (for enemy function) + LDA.W $0000,Y ;A0806B; + STA.W Enemy.var5,X ;A0806E; + INY ;A08071; + INY ;A08072; + RTL ;A08073; + + +;;; $806B: Instruction - Enemy.var5 = [[Y]] ;;; +Instruction_SetEnemy0FB2ToRTS: +; Used only by torizos (for enemy movement function) and escape etecoon (for enemy function) + LDA.W #RTS_A0807B ;A08074; + STA.W Enemy.var5,X ;A08077; + RTL ;A0807A; + + +RTS_A0807B: + RTS ;A0807B; + + +;;; $807C: Instruction - delete enemy ;;; +Instruction_DeleteEnemy: + LDA.W Enemy.properties,X ;A0807C; + ORA.W #$0200 ;A0807F; + STA.W Enemy.properties,X ;A08082; + PLA ;A08085; + PEA.W ProcessEnemyInstructions_return-1 ;A08086; + RTL ;A08089; + + +;;; $808A: Instruction - call function [[Y]] ;;; +Instruction_CallFunctionInY: + LDA.W $0000,Y ;A0808A; + STA.B DP_Temp12 ;A0808D; + PHY ;A0808F; + PHX ;A08090; + PEA.W .manualReturn-1 ;A08091; + JMP.W (DP_Temp12) ;A08094; + + .manualReturn: + PLX ;A08097; + PLY ;A08098; + INY ;A08099; + INY ;A0809A; + RTL ;A0809B; + + +;;; $809C: Instruction - call function [[Y]] with A = [[Y] + 2] ;;; +Instruction_CallFunctionInY_WithA: + LDA.W $0000,Y ;A0809C; + STA.B DP_Temp12 ;A0809F; + LDA.W $0002,Y ;A080A1; + PHY ;A080A4; + PHX ;A080A5; + PEA.W .manualReturn-1 ;A080A6; + JMP.W (DP_Temp12) ;A080A9; + + .manualReturn: + PLX ;A080AC; + PLY ;A080AD; + TYA ;A080AE; + CLC ;A080AF; + ADC.W #$0004 ;A080B0; + TAY ;A080B3; + RTL ;A080B4; + + +if !FEATURE_KEEP_UNREFERENCED +;;; $80B5: Unused. Instruction - call external function [[Y]] ;;; +UNUSED_Instruction_CallExternalFunctionInY_A080B5: + LDA.W $0000,Y ;A080B5; + STA.B DP_Temp12 ;A080B8; + LDA.W $0001,Y ;A080BA; + STA.B DP_Temp13 ;A080BD; + PHX ;A080BF; + PHY ;A080C0; + JSL.L .externalFunction ;A080C1; + PLY ;A080C5; + PLX ;A080C6; + INY ;A080C7; + INY ;A080C8; + INY ;A080C9; + RTL ;A080CA; + + .externalFunction: + JML.W [DP_Temp12] ;A080CB; + + +;;; $80CE: Unused. Instruction - call external function [[Y]] with A = [[Y] + 3] ;;; +UNUSED_Inst_CallExternalFunctionInY_WithA_A080CE: + LDA.W $0000,Y ;A080CE; + STA.B DP_Temp12 ;A080D1; + LDA.W $0001,Y ;A080D3; + STA.B DP_Temp13 ;A080D6; + LDA.W $0003,Y ;A080D8; + PHX ;A080DB; + PHY ;A080DC; + JSL.L .externalFunction ;A080DD; + PLY ;A080E1; + PLX ;A080E2; + TYA ;A080E3; + CLC ;A080E4; + ADC.W #$0005 ;A080E5; + TAY ;A080E8; + RTL ;A080E9; + + .externalFunction: + JML.W [DP_Temp12] ;A080EA; +endif ; !FEATURE_KEEP_UNREFERENCED + + +;;; $80ED: Instruction - go to [[Y]] ;;; +Instruction_GotoY: + LDA.W $0000,Y ;A080ED; + TAY ;A080F0; + RTL ;A080F1; + + +;;; $80F2: Instruction - go to [[Y]] + ±[[Y]] ;;; +Instruction_GotoY_PlusY: + STY.B DP_Temp12 ;A080F2; + DEY ;A080F4; + LDA.W $0000,Y ;A080F5; + XBA ;A080F8; + BMI .highByte ;A080F9; + AND.W #$00FF ;A080FB; + BRA + ;A080FE; + + .highByte: + ORA.W #$FF00 ;A08100; + ++ CLC ;A08103; + ADC.B DP_Temp12 ;A08104; + TAY ;A08106; + RTL ;A08107; + + +;;; $8108: Instruction - decrement timer and go to [[Y]] if non-zero ;;; +Instruction_DecrementTimer_GotoYIfNonZero: + DEC.W Enemy.loopCounter,X ;A08108; + BNE Instruction_GotoY ;A0810B; + INY ;A0810D; + INY ;A0810E; + RTL ;A0810F; + + +;;; $8110: Instruction - decrement timer and go to [[Y]] if non-zero ;;; +Instruction_DecrementTimer_GotoYIfNonZero_duplicate: + DEC.W Enemy.loopCounter,X ;A08110; + BNE Instruction_GotoY ;A08113; + INY ;A08115; + INY ;A08116; + RTL ;A08117; + + +;;; $8118: Instruction - decrement timer and go to [Y] + ±[[Y]] if non-zero ;;; +Instruction_DecrementTimer_GotoY_PlusY_IfNonZero: + SEP #$20 ;A08118; + DEC.W Enemy.loopCounter,X ;A0811A; + REP #$20 ;A0811D; + BNE Instruction_GotoY_PlusY ;A0811F; + INY ;A08121; + RTL ;A08122; + + +;;; $8123: Instruction - timer = [[Y]] ;;; +Instruction_TimerInY: + LDA.W $0000,Y ;A08123; + STA.W Enemy.loopCounter,X ;A08126; + INY ;A08129; + INY ;A0812A; + RTL ;A0812B; + + +;;; $812C: Instruction - skip next instruction ;;; +Instruction_SkipNextInstruction: + INY ;A0812C; + INY ;A0812D; + RTL ;A0812E; + + +;;; $812F: Instruction - sleep ;;; +Instruction_Sleep: + DEY ;A0812F; + DEY ;A08130; + TYA ;A08131; + STA.W Enemy.instList,X ;A08132; + PLA ;A08135; + PEA.W ProcessEnemyInstructions_return-1 ;A08136; + RTL ;A08139; + + +;;; $813A: Instruction - wait [[Y]] frames ;;; +Instruction_WaitYFrames: +; Set instruction timer and terminate processing enemy instructions +; Used for running a delay that doesn't update graphics, +; useful for e.g. GT eye beam attack ($AA:D10D), implemented by an instruction list that has no graphical instructions, +; which allows it to be called from multiple different poses + LDA.W $0000,Y ;A0813A; + STA.W Enemy.instTimer,X ;A0813D; + INY ;A08140; + INY ;A08141; + TYA ;A08142; + STA.W Enemy.instList,X ;A08143; + PLA ;A08146; + PEA.W ProcessEnemyInstructions_return-1 ;A08147; + RTL ;A0814A; + + +;;; $814B: Instruction - transfer [[Y]] bytes from [[Y] + 2] to VRAM [[Y] + 5] ;;; +Instruction_TransferYBytesInYToVRAM: + PHX ;A0814B; + LDX.W VRAMWriteStack ;A0814C; + LDA.W $0000,Y ;A0814F; + STA.B VRAMWrite.size,X ;A08152; + LDA.W $0002,Y ;A08154; + STA.B VRAMWrite.src,X ;A08157; + LDA.W $0003,Y ;A08159; + STA.B VRAMWrite.src+1,X ;A0815C; + LDA.W $0005,Y ;A0815E; + STA.B VRAMWrite.dest,X ;A08161; + TXA ;A08163; + CLC ;A08164; + ADC.W #$0007 ;A08165; + STA.W VRAMWriteStack ;A08168; + TYA ;A0816B; + CLC ;A0816C; + ADC.W #$0007 ;A0816D; + TAY ;A08170; + PLX ;A08171; + RTL ;A08172; + + +;;; $8173: Instruction - enable off-screen processing ;;; +Instruction_EnableOffScreenProcessing: + LDA.W Enemy.properties,X ;A08173; + ORA.W #$0800 ;A08176; + STA.W Enemy.properties,X ;A08179; + RTL ;A0817C; + + +;;; $817D: Instruction - disable off-screen processing ;;; +Instruction_DisableOffScreenProcessing: + LDA.W Enemy.properties,X ;A0817D; + AND.W #$F7FF ;A08180; + STA.W Enemy.properties,X ;A08183; + RTL ;A08186; + + +;;; $8187: Common enemy speeds - linearly increasing ;;; +EnemySpeeds_LinearlyIncreasing: +; _____________________ Speed +; | _______________ Subspeed +; | | _________ Negated speed +; | | | ___ Negated subspeed +; | | | | + .speed: + dw $0000 ;A08187; + .subspeed: + dw $0000 ;A08189; + .negatedSpeed: + dw $0000 ;A0818B; + .negatedSubspeed: + dw $0000 ;A0818D; + dw $0000,$1000,$FFFF,$F000 + dw $0000,$2000,$FFFF,$E000 + dw $0000,$3000,$FFFF,$D000 + dw $0000,$4000,$FFFF,$C000 + dw $0000,$5000,$FFFF,$B000 + dw $0000,$6000,$FFFF,$A000 + dw $0000,$7000,$FFFF,$9000 + dw $0000,$8000,$FFFF,$8000 + dw $0000,$9000,$FFFF,$7000 + dw $0000,$A000,$FFFF,$6000 + dw $0000,$B000,$FFFF,$5000 + dw $0000,$C000,$FFFF,$4000 + dw $0000,$D000,$FFFF,$3000 + dw $0000,$E000,$FFFF,$2000 + dw $0000,$F000,$FFFF,$1000 + dw $0001,$0000,$FFFF,$0000 + dw $0001,$1000,$FFFE,$F000 + dw $0001,$2000,$FFFE,$E000 + dw $0001,$3000,$FFFE,$D000 + dw $0001,$4000,$FFFE,$C000 + dw $0001,$5000,$FFFE,$B000 + dw $0001,$6000,$FFFE,$A000 + dw $0001,$7000,$FFFE,$9000 + dw $0001,$8000,$FFFE,$8000 + dw $0001,$9000,$FFFE,$7000 + dw $0001,$A000,$FFFE,$6000 + dw $0001,$B000,$FFFE,$5000 + dw $0001,$C000,$FFFE,$4000 + dw $0001,$D000,$FFFE,$3000 + dw $0001,$E000,$FFFE,$2000 + dw $0001,$F000,$FFFE,$1000 + dw $0002,$0000,$FFFE,$0000 + dw $0002,$1000,$FFFD,$F000 + dw $0002,$2000,$FFFD,$E000 + dw $0002,$3000,$FFFD,$D000 + dw $0002,$4000,$FFFD,$C000 + dw $0002,$5000,$FFFD,$B000 + dw $0002,$6000,$FFFD,$A000 + dw $0002,$7000,$FFFD,$9000 + dw $0002,$8000,$FFFD,$8000 + dw $0002,$9000,$FFFD,$7000 + dw $0002,$A000,$FFFD,$6000 + dw $0002,$B000,$FFFD,$5000 + dw $0002,$C000,$FFFD,$4000 + dw $0002,$D000,$FFFD,$3000 + dw $0002,$E000,$FFFD,$2000 + dw $0002,$F000,$FFFD,$1000 + dw $0003,$0000,$FFFD,$0000 + dw $0003,$1000,$FFFC,$F000 + dw $0003,$2000,$FFFC,$E000 + dw $0003,$3000,$FFFC,$D000 + dw $0003,$4000,$FFFC,$C000 + dw $0003,$5000,$FFFC,$B000 + dw $0003,$6000,$FFFC,$A000 + dw $0003,$7000,$FFFC,$9000 + dw $0003,$8000,$FFFC,$8000 + dw $0003,$9000,$FFFC,$7000 + dw $0003,$A000,$FFFC,$6000 + dw $0003,$B000,$FFFC,$5000 + dw $0003,$C000,$FFFC,$4000 + dw $0003,$D000,$FFFC,$3000 + dw $0003,$E000,$FFFC,$2000 + dw $0003,$F000,$FFFC,$1000 + dw $0004,$0000,$FFFC,$0000 + + +;;; $838F: Common enemy speeds - quadratically increasing ;;; +EnemySpeeds_QuadraticallyIncreasing: +; I.e. gravity +; Used by e.g. Botwoon when dying and falling to the floor +; _____________________ Subspeed +; | _______________ Speed +; | | _________ Negated subspeed +; | | | ___ Negated speed +; | | | | + .subspeed: + dw $0000 ;A0838F; + .speed: + dw $0000 ;A08391; + .negatedSubspeed: + dw $0000 ;A08393; + .negatedSpeed: + dw $0000 ;A08395; + dw $0109,$0000,$FEF7,$FFFF + dw $031B,$0000,$FCE5,$FFFF + dw $0636,$0000,$F9CA,$FFFF + dw $0A5A,$0000,$F5A6,$FFFF + dw $0F87,$0000,$F079,$FFFF + dw $15BD,$0000,$EA43,$FFFF + dw $1CFC,$0000,$E304,$FFFF + dw $2544,$0000,$DABC,$FFFF + dw $2E95,$0000,$D16B,$FFFF + dw $38EF,$0000,$C711,$FFFF + dw $4452,$0000,$BBAE,$FFFF + dw $50BE,$0000,$AF42,$FFFF + dw $5E33,$0000,$A1CD,$FFFF + dw $6CB1,$0000,$934F,$FFFF + dw $7C38,$0000,$83C8,$FFFF + dw $8CC8,$0000,$7338,$FFFF + dw $9E61,$0000,$619F,$FFFF + dw $B103,$0000,$4EFD,$FFFF + dw $C4AE,$0000,$3B52,$FFFF + dw $D962,$0000,$269E,$FFFF + dw $EF1F,$0000,$10E1,$FFFF + dw $05E5,$0000,$FA1B,$FFFF + dw $14B4,$0001,$EB4C,$FFFE + dw $2D8C,$0001,$D274,$FFFE + dw $476D,$0001,$B893,$FFFE + dw $6257,$0001,$9DA9,$FFFE + dw $7E4A,$0001,$81B6,$FFFE + dw $9B46,$0001,$64BA,$FFFE + dw $B94B,$0001,$46B5,$FFFE + dw $D859,$0001,$27A7,$FFFE + dw $F870,$0001,$0790,$FFFE + dw $1090,$0002,$EF70,$FFFD + dw $32B9,$0002,$CD47,$FFFD + dw $55EB,$0002,$AA15,$FFFD + dw $7A26,$0002,$85DA,$FFFD + dw $9F6A,$0002,$6096,$FFFD + dw $C5B7,$0002,$3A49,$FFFD + dw $ED0D,$0002,$12F3,$FFFD + dw $0C6C,$0003,$F394,$FFFC + dw $35D4,$0003,$CA2C,$FFFC + dw $6045,$0003,$9FBB,$FFFC + dw $8BBF,$0003,$7441,$FFFC + dw $B842,$0003,$47BE,$FFFC + dw $E5CE,$0003,$1A32,$FFFC + dw $0B63,$0004,$F49D,$FFFB + dw $3B01,$0004,$C4FF,$FFFB + dw $6BA8,$0004,$9458,$FFFB + dw $9D58,$0004,$62A8,$FFFB + dw $D011,$0004,$2FEF,$FFFB + dw $03D3,$0004,$FC2D,$FFFB + dw $2F9E,$0005,$D062,$FFFA + dw $6572,$0005,$9A8E,$FFFA + dw $9C4F,$0005,$63B1,$FFFA + dw $D435,$0005,$2BCB,$FFFA + dw $0424,$0006,$FBDC,$FFF9 + dw $3E1C,$0006,$C1E4,$FFF9 + dw $791D,$0006,$86E3,$FFF9 + dw $B527,$0006,$4AD9,$FFF9 + dw $F23A,$0006,$0DC6,$FFF9 + dw $2756,$0007,$D8AA,$FFF8 + dw $667B,$0007,$9985,$FFF8 + dw $A6A9,$0007,$5957,$FFF8 + dw $E7E0,$0007,$1820,$FFF8 + dw $2120,$0008,$DEE0,$FFF7 + dw $6469,$0008,$9B97,$FFF7 + dw $A8BB,$0008,$5745,$FFF7 + dw $EE16,$0008,$11EA,$FFF7 + dw $2B7A,$0009,$D486,$FFF6 + dw $72E7,$0009,$8D19,$FFF6 + dw $BB5D,$0009,$44A3,$FFF6 + dw $04DC,$0009,$FB24,$FFF6 + dw $4664,$000A,$B99C,$FFF5 + dw $91F5,$000A,$6E0B,$FFF5 + dw $DE8F,$000A,$2171,$FFF5 + dw $2332,$000B,$DCCE,$FFF4 + dw $71DE,$000B,$8E22,$FFF4 + dw $C193,$000B,$3E6D,$FFF4 + dw $0951,$000C,$F6AF,$FFF3 + dw $5B18,$000C,$A4E8,$FFF3 + dw $ADE8,$000C,$5218,$FFF3 + dw $01C1,$000C,$FE3F,$FFF3 + dw $4DA3,$000D,$B25D,$FFF2 + dw $A38E,$000D,$5C72,$FFF2 + dw $FA82,$000D,$057E,$FFF2 + dw $497F,$000E,$B681,$FFF1 + dw $A285,$000E,$5D7B,$FFF1 + dw $FC94,$000E,$036C,$FFF1 + dw $4EAC,$000F,$B154,$FFF0 + dw $AACD,$000F,$5533,$FFF0 + dw $07F7,$000F,$F809,$FFF0 + dw $5D2A,$0010,$A2D6,$FFEF + dw $BC66,$0010,$439A,$FFEF + dw $13AB,$0011,$EC55,$FFEE + dw $74F9,$0011,$8B07,$FFEE