;;; Disassembly ;;;
; Arachnus entry point
080246BC (T) push r14
080246BE (T) ldr r2,=EnemyOrientation ;\
080246C0 (T) mov r0,r2 ;|
080246C2 (T) add r0,24h ;|
080246C4 (T) ldrb r3,[r0] ;} If EnemyPose != 0 (enemy has initialised):
080246C6 (T) cmp r3,0h ;|
080246C8 (T) beq 8024718h ;/
080246CA (T) ldrh r0,[r2,14h] ;\
080246CC (T) cmp r0,0h ;} If EnemyHealth != 0:
080246CE (T) beq 8024714h ;/
080246D0 (T) mov r0,r2 ;\
080246D2 (T) add r0,2Ch ;|
080246D4 (T) ldrb r0,[r0] ;|
080246D6 (T) mov r1,7Fh ;} If EnemyInvincibilityTimer > 5:
080246D8 (T) and r1,r0 ;|
080246DA (T) cmp r1,5h ;|
080246DC (T) bls 80246F4h ;/
080246DE (T) cmp r3,2h ;\
080246E0 (T) beq 80246E6h ;|
080246E2 (T) cmp r3,8h ;|
080246E4 (T) bne 8024718h ;} If EnemyPose == 2 or 8 (moving forwards or standing still):
080246E6 (T) cmp r3,3Eh ;| Redundant check against EnemyPose == 3Eh (cry of pain)
080246E8 (T) beq 8024718h ;/
080246EA (T) bl 8023894h ;\
080246EE (T) b 8024718h ;} Execute subroutine Arachnus_SetCryOfPain
080246F0 dd 0030006BCh
080246F4 (T) cmp r1,2h ;\ Else (EnemyInvincibilityTimer <= 5):
080246F6 (T) bls 8024718h ;} If EnemyInvincibilityTimer > 2:
080246F8 (T) ldrh r0,[r2] ;\
080246FA (T) mov r3,80h ;|
080246FC (T) lsl r3,r3,3h ;|
080246FE (T) mov r1,r3 ;} EnemyOrientation |= 400h (shot)
08024700 (T) mov r3,0h ;|
08024702 (T) orr r1,r0 ;|
08024704 (T) strh r1,[r2] ;/
08024706 (T) mov r1,r2 ;\
08024708 (T) add r1,2Eh ;|
0802470A (T) ldrb r0,[r1] ;} If EnemyRespawnTimer != FFh:
0802470C (T) cmp r0,0FFh ;|
0802470E (T) beq 8024718h ;/
08024710 (T) strb r3,[r1] ;\
08024712 (T) b 8024718h ;} EnemyRespawnTimer = 0
08024714 (T) bl 80238D8h ; Else (EnemyHealth == 0): Execute subroutine Arachnus_SetDeath
08024718 (T) ldr r0,=EnemyOrientation ;\
0802471A (T) add r0,24h ;|
0802471C (T) ldrb r0,[r0] ;|
0802471E (T) cmp r0,5Ah ;|
08024720 (T) bls 8024724h ;|
08024722 (T) b 80248F4h ;|
;} Branch to code that handles the current EnemyPose
08024724 (T) lsl r0,r0,2h ;|
08024726 (T) ldr r1,=8024738h ;|
08024728 (T) add r0,r0,r1 ;|
0802472A (T) ldr r0,[r0] ;|
0802472C (T) mov r15,r0 ;/
0802472E dw 00000h
08024730 dd 0030006BCh,008024738h,0080248AEh,0080248B4h
08024740 dd 0080248B8h,0080248C8h,0080248CCh,0080248F4h
08024750 dd 0080248F4h,0080248BEh,0080248C2h,0080248F4h
08024760 dd 0080248F4h,0080248F4h,0080248F4h,0080248F4h
08024770 dd 0080248F4h,0080248F4h,0080248F4h,0080248F4h
08024780 dd 0080248F4h,0080248F4h,0080248F4h,0080248F4h
08024790 dd 0080248F4h,0080248F4h,0080248F4h,0080248F4h
080247A0 dd 0080248F4h,0080248F4h,0080248F4h,0080248F4h
080247B0 dd 0080248F4h,0080248F4h,0080248F4h,0080248F4h
080247C0 dd 0080248F4h,0080248F4h,0080248F4h,0080248F4h
080247D0 dd 0080248F4h,0080248F4h,0080248F4h,0080248F4h
080247E0 dd 0080248F4h,0080248F4h,0080248F4h,0080248F4h
080247F0 dd 0080248F4h,0080248F4h,0080248F4h,0080248F4h
08024800 dd 0080248F4h,0080248F4h,0080248F4h,0080248F4h
08024810 dd 0080248F4h,0080248F4h,0080248D2h,0080248F4h
08024820 dd 0080248D8h,0080248F4h,0080248DEh,0080248F4h
08024830 dd 0080248E4h,0080248F4h,0080248EAh,0080248F4h
08024840 dd 0080248F0h,0080248F4h,0080248F4h,0080248F4h
08024850 dd 0080248F4h,0080248F4h,0080248F4h,0080248F4h
08024860 dd 0080248F4h,0080248F4h,0080248F4h,0080248F4h
08024870 dd 0080248F4h,0080248F4h,0080248F4h,0080248F4h
08024880 dd 0080248F4h,0080248F4h,0080248F4h,0080248F4h
08024890 dd 0080248F4h,0080248F4h,0080248F4h,0080248A4h
080248A0 dd 0080248A8h
; 0x59, start to be born
080248A4 (T) bl 8024290h ; Execute subroutine Arachnus_Initialistion
; 0x5A, be born
080248A8 (T) bl 802423Ch ; Execute subroutine Arachnus_Birth
080248AC (T) b 80248F4h ; Return
; 0x00, initialisation
080248AE (T) bl 8024290h ; Execute subroutine Arachnus_Initialistion
080248B2 (T) b 80248F4h ; Return
; 0x01, thinking
080248B4 (T) bl 80243D4h ; Execute subroutine Arachnus_Thinking
; 0x02, walking
080248B8 (T) bl 8024404h ; Execute subroutine Arachnus_Walking
080248BC (T) b 80248F4h ; Return
; 0x07, standing initialisation
080248BE (T) bl 8024538h ; Execute subroutine Arachnus_StandingInitialisation
; 0x08, standing
080248C2 (T) bl 80245CCh ; Execute subroutine Arachnus_Standing
080248C6 (T) b 80248F4h ; Return
; 0x03, turn around
080248C8 (T) bl 8024614h ; Execute subroutine Arachnus_TurnAround
; 0x04, turning around
080248CC (T) bl 802464Ch ; Execute subroutine Arachnus_TurningAround
080248D0 (T) b 80248F4h ; Return
; 0x38, slash attack
080248D2 (T) bl 8023A20h ; Execute subroutine Arachnus_SlashAttack
080248D6 (T) b 80248F4h ; Return
; 0x3A, roll attack
080248D8 (T) bl 8023B20h ; Execute subroutine Arachnus_RollAttack
080248DC (T) b 80248F4h ; Return
; 0x3C, hit wall from roll attack
080248DE (T) bl 8023D18h ; Execute subroutine Arachnus_HitWallFromRollAttack
080248E2 (T) b 80248F4h ; Return
; 0x3E, cry of pain (shot with missile)
080248E4 (T) bl 8023E30h ; Execute subroutine Arachnus_CryOfPain
080248E8 (T) b 80248F4h ; Return
; 0x40, flame attack
080248EA (T) bl 8024118h ; Execute subroutine Arachnus_FlameAttack
080248EE (T) b 80248F4h ; Return
; 0x42, dying
080248F0 (T) bl 8023E7Ch ; Execute subroutine Arachnus_Dying
; All others
080248F4 (T) pop r0
080248F6 (T) bx r0