;;; Arachnus_Dying ;;; 08023E7C (T) push r4,r5,r14 08023E7E (T) ldr r2,=300120Ch ;\ 08023E80 (T) ldr r1,=83BDED6h ;| 08023E82 (T) ldr r3,=EnemyOrientation ;| 08023E84 (T) ldrh r0,[r3,6h] ;| 08023E86 (T) lsl r0,r0,1h ;} MOSAIC = 83BDED6[EnemyYPositionSpawn] 08023E88 (T) add r0,r0,r1 ;| 08023E8A (T) ldrh r0,[r0] ;| 08023E8C (T) strh r0,[r2] ;/ 08023E8E (T) ldrh r0,[r3,6h] ;\ 08023E90 (T) sub r0,1h ;} --EnemyYPositionSpawn 08023E92 (T) strh r0,[r3,6h] ;/ 08023E94 (T) ldrh r0,[r3,2h] ;\ 08023E96 (T) sub r0,0A0h ;| 08023E98 (T) lsl r0,r0,10h ;} r5 = EnemyYPosition - A0h 08023E9A (T) lsr r5,r0,10h ;/ 08023E9C (T) ldrh r4,[r3,4h] ; r4 = EnemyXPosition 08023E9E (T) ldrh r0,[r3,8h] ;\ 08023EA0 (T) mov r2,r3 ;| 08023EA2 (T) cmp r0,0h ;} If EnemyXPositionSpawn == 0: 08023EA4 (T) bne 8023EA8h ;/ 08023EA6 (T) b 8023FB4h ; Branch to 8023FB4h 08023EA8 (T) ldrh r0,[r3,6h] ;\ 08023EAA (T) cmp r0,28h ;} If EnemyYPositionSpawn > 28h: 08023EAC (T) bls 8023EB0h ;/ 08023EAE (T) b 802410Ch ; Return 08023EB0 (T) lsl r0,r0,2h ;\ 08023EB2 (T) ldr r1,=8023ECCh ;| 08023EB4 (T) add r0,r0,r1 ;} Branch to code that handles the current EnemyYPositionSpawn 08023EB6 (T) ldr r0,[r0] ;| 08023EB8 (T) mov r15,r0 ;/ 08023EBA dw 00000h 08023EBC dd 00300120Ch,0083BDED6h,0030006BCh,008023ECCh 08023ECC dd 008023FAAh,00802410Ch,00802410Ch,00802410Ch 08023EDC dd 00802410Ch,00802410Ch,00802410Ch,00802410Ch 08023EEC dd 00802410Ch,00802410Ch,008023F9Ah,00802410Ch 08023EFC dd 00802410Ch,00802410Ch,00802410Ch,00802410Ch 08023F0C dd 00802410Ch,00802410Ch,00802410Ch,00802410Ch 08023F1C dd 008023F8Ah,00802410Ch,00802410Ch,00802410Ch 08023F2C dd 00802410Ch,00802410Ch,00802410Ch,00802410Ch 08023F3C dd 00802410Ch,00802410Ch,008023F84h,00802410Ch 08023F4C dd 00802410Ch,00802410Ch,00802410Ch,00802410Ch 08023F5C dd 00802410Ch,00802410Ch,00802410Ch,00802410Ch 08023F6C dd 008023F70h ; 28h 08023F70 (T) mov r0,r5 ;\ 08023F72 (T) sub r0,10h ;} r0 parameter = EnemyYPosition - B0h 08023F74 (T) mov r1,r4 ; r1 parameter = EnemyXPosition 08023F76 (T) mov r2,25h ; r2 parameter = 25h 08023F78 (T) bl 80730E4h ; Execute subroutine 80730E4h 08023F7C (T) mov r0,r5 ;\ 08023F7E (T) add r0,10h ;} r0 parameter = EnemyYPosition - 90h 08023F80 (T) mov r1,r4 ; r1 parameter = EnemyXPosition 08023F82 (T) b 8023F92h ; Branch to 8023F92h ; 1Eh 08023F84 (T) mov r0,r5 ;\ 08023F86 (T) sub r0,20h ;} r0 parameter = EnemyYPosition - C0h 08023F88 (T) b 8023F9Eh ; Branch to 8023F9Eh ; 14h 08023F8A (T) mov r0,r5 ;\ 08023F8C (T) add r0,40h ;} r0 parameter = EnemyYPosition - 60h 08023F8E (T) mov r1,r4 ;\ 08023F90 (T) sub r1,10h ;} r1 parameter = EnemyXPosition - 10h ; Also branched from 28h: ; r0 = EnemyYPosition - 90h ; r1 = EnemyXPosition 08023F92 (T) mov r2,26h ; r2 parameter = 26h 08023F94 (T) bl 80730E4h ; Execute subroutine 80730E4h 08023F98 (T) b 802410Ch ; Return ; 0Ah 08023F9A (T) mov r0,r5 ;\ 08023F9C (T) sub r0,40h ;} r0 parameter = EnemyYPosition - E0h ; Also branched from 1Eh: ; r0 = EnemyYPosition - C0h 08023F9E (T) mov r1,r4 ;\ 08023FA0 (T) add r1,1Ch ;} r1 parameter = EnemyXPosition + 1Ch 08023FA2 (T) mov r2,25h ; r2 parameter = 25h 08023FA4 (T) bl 80730E4h ; Execute subroutine 80730E4h 08023FA8 (T) b 802410Ch ; Return ; 00h 08023FAA (T) mov r0,0h ;\ 08023FAC (T) strh r0,[r2,8h] ;} EnemyXPositionSpawn = 0 08023FAE (T) mov r0,2Ch ;\ 08023FB0 (T) strh r0,[r2,6h] ;} EnemyYPosition spawn = 2Ch 08023FB2 (T) b 802410Ch ; Return ; EnemyXPositionSpawn == 0 08023FB4 (T) ldrh r0,[r3,6h] ;\ 08023FB6 (T) cmp r0,28h ;| 08023FB8 (T) bls 8023FBCh ;| 08023FBA (T) b 80240DEh ;| ;| 08023FBC (T) lsl r0,r0,2h ;} Branch to code that handles the current EnemyYPositionSpawn 08023FBE (T) ldr r1,=8023FCCh ;| 08023FC0 (T) add r0,r0,r1 ;| 08023FC2 (T) ldr r0,[r0] ;| 08023FC4 (T) mov r15,r0 ;/ 08023FC6 dw 00000h 08023FC8 dd 008023FCCh,0080240CEh,0080240DEh,0080240DEh 08023FD8 dd 0080240DEh,0080240DEh,0080240DEh,0080240DEh 08023FE8 dd 0080240DEh,0080240DEh,0080240DEh,0080240B0h 08023FF8 dd 0080240DEh,0080240DEh,0080240DEh,0080240DEh 08024008 dd 0080240DEh,0080240DEh,0080240DEh,0080240DEh 08024018 dd 0080240DEh,00802409Ah,0080240DEh,0080240DEh 08024028 dd 0080240DEh,0080240DEh,0080240DEh,0080240DEh 08024038 dd 0080240DEh,0080240DEh,0080240DEh,008024086h 08024048 dd 0080240DEh,0080240DEh,0080240DEh,0080240DEh 08024058 dd 0080240DEh,0080240DEh,0080240DEh,0080240DEh 08024068 dd 0080240DEh,008024070h ; 28h 08024070 (T) mov r0,r5 ;\ 08024072 (T) sub r0,40h ;} r0 parameter = EnemyYPosition - E0h 08024074 (T) sub r4,10h ;\ 08024076 (T) mov r1,r4 ;} r1 parameter = EnemyXPosition - 10h 08024078 (T) mov r2,26h ; r2 parameter = 26h 0802407A (T) bl 80730E4h ; Execute subroutine 80730E4h 0802407E (T) mov r0,r5 ;\ 08024080 (T) add r0,20h ;} r0 parameter = EnemyYPosition - 80h 08024082 (T) mov r1,r4 ; r1 parameter = EnemyXPosition - 10h 08024084 (T) b 80240C6h ; Branch to 80240C6h ; 1Eh 08024086 (T) mov r0,r5 ;\ 08024088 (T) sub r0,20h ;} r0 parameter = EnemyYPosition - C0h 0802408A (T) mov r1,r4 ;\ 0802408C (T) add r1,1Ch ;} r1 parameter = EnemyXPosition + 1Ch 0802408E (T) mov r2,26h ; r2 parameter = 26h 08024090 (T) bl 80730E4h ; Execute subroutine 80730E4h 08024094 (T) mov r0,r5 ;\ 08024096 (T) add r0,40h ;} r0 parameter = EnemyYPosition - 60h 08024098 (T) b 80240C2h ; Branch to 80240C2h ; 14h 0802409A (T) mov r0,r5 ;\ 0802409C (T) sub r0,20h ;} r0 parameter = EnemyYPosition - C0h 0802409E (T) sub r4,10h ;\ 080240A0 (T) mov r1,r4 ;} r1 parameter = EnemyXPosition - 10h 080240A2 (T) mov r2,26h ; r2 parameter = 26h 080240A4 (T) bl 80730E4h ; Execute subroutine 80730E4h 080240A8 (T) mov r0,r5 ;\ 080240AA (T) add r0,40h ;} r0 parameter = EnemyYPosition - 60h 080240AC (T) mov r1,r4 ; r1 parameter = EnemyXPosition - 10h 080240AE (T) b 80240C6h ; Branch to 80240C6h ; 0Ah 080240B0 (T) mov r0,r5 ;\ 080240B2 (T) sub r0,40h ;} r0 parameter = EnemyYPosition - E0h 080240B4 (T) mov r1,r4 ;\ 080240B6 (T) add r1,1Ch ;} r1 parameter = EnemyXPosition + 1Ch 080240B8 (T) mov r2,26h ; r2 parameter = 26h 080240BA (T) bl 80730E4h ; Execute subroutine 80730E4h 080240BE (T) mov r0,r5 ;\ 080240C0 (T) add r0,20h ;} r0 parameter = EnemyYPosition - 80h ; Also branch from 1Eh: ; r0 parameter = EnemyYPosition - 60h 080240C2 (T) mov r1,r4 ;\ 080240C4 (T) add r1,20h ;} r1 parameter = EnemyXPosition + 20h ; Also branched from 28h: ; r0 = EnemyYPosition - 80h ; r1 = EnemyXPosition - 10h ; and 14h: ; r0 = EnemyYPosition - 60h ; r1 = EnemyXPosition - 10h 080240C6 (T) mov r2,25h ; r2 parameter = 25h 080240C8 (T) bl 80730E4h ; Execute subroutine 80730E4h 080240CC (T) b 80240DEh ; Branch to 80240DEh ; 00h 080240CE (T) ldr r2,=EnemyOrientation ;\ 080240D0 (T) mov r1,r2 ;| 080240D2 (T) add r1,24h ;} Enemy pose = 59h (start to be born) 080240D4 (T) mov r0,59h ;| 080240D6 (T) strb r0,[r1] ;/ 080240D8 (T) ldr r0,=30006ADh ;\ 080240DA (T) ldrb r0,[r0] ;} Enemy ID = [30006AD] 080240DC (T) strb r0,[r2,1Dh] ;/ ; Execution continues here after all enemy y position spawn specific code is executed 080240DE (T) ldr r1,=EnemyOrientation ;\ 080240E0 (T) ldrh r0,[r1,6h] ;| 080240E2 (T) cmp r0,13h ;} If enemy Y position spawn <= 13h: 080240E4 (T) bhi 80240FCh ;/ 080240E6 (T) ldr r0,=30006ADh ;\ 080240E8 (T) ldrb r0,[r0] ;} r0 parameter = [30006AD] 080240EA (T) ldrh r2,[r1,6h] ; r2 = enemy ID 080240EC (T) mov r1,0h ; r1 parameter = 0 080240EE (T) bl 800F8ACh ; Execute subroutine 800F8ACh 080240F2 (T) b 802410Ch ; Return 080240F4 dd 0030006BCh,0030006ADh 080240FC (T) cmp r0,14h ;\ 080240FE (T) bne 802410Ch ;} If enemy Y position spawn != 14h: return 08024100 (T) ldr r0,=30006ADh ;\ 08024102 (T) ldrb r0,[r0] ;} r0 parameter = [30006AD] 08024104 (T) mov r1,0h ; r1 parameter = 0 08024106 (T) mov r2,5h ; r2 parameter = 5 08024108 (T) bl 800F8F0h ; Execute subroutine 800F8F0h 0802410C (T) pop r4,r5 0802410E (T) pop r0 08024110 (T) bx r0 08024112 dw 00000h 08024114 dd 0030006ADh