;;; Arachnus_SlashAttack ;;; 08023A20 (T) push r4,r5,r14 08023A22 (T) add sp,-0Ch 08023A24 (T) ldr r0,=EnemyOrientation ;\ 08023A26 (T) mov r12,r0 ;| 08023A28 (T) ldrh r1,[r0] ;| 08023A2A (T) mov r5,40h ;| 08023A2C (T) mov r0,r5 ;| 08023A2E (T) and r0,r1 ;} If EnemyOrientation has 40h (facing right): 08023A30 (T) lsl r0,r0,10h ;| 08023A32 (T) lsr r4,r0,10h ;| 08023A34 (T) cmp r4,0h ;| 08023A36 (T) beq 8023A8Eh ;/ 08023A38 (T) mov r2,r12 ;\ 08023A3A (T) ldrh r1,[r2,16h] ;| 08023A3C (T) cmp r1,0Fh ;} If EnemyAnimation <= 0Fh: 08023A3E (T) bhi 8023A4Ch ;/ 08023A40 (T) mov r0,0A0h ;\ 08023A42 (T) strh r0,[r2,10h] ;} EnemyRightBoundryOffset = A0h 08023A44 (T) b 8023AF6h ; Branch to 8023AF6h 08023A46 dw 00000h 08023A48 dd 0030006BCh 08023A4C (T) cmp r1,11h ;\ Else (EnemyAnimation > 0Fh): 08023A4E (T) bhi 8023A58h ;} If EnemyAnimation <= 11h: 08023A50 (T) mov r0,60h ;\ 08023A52 (T) mov r1,r12 ;} EnemyRightBoundryOffset = 60h 08023A54 (T) strh r0,[r1,10h] ;/ 08023A56 (T) b 8023AF6h ; Branch to 8023AF6h 08023A58 (T) cmp r1,17h ;\ Else (EnemyAnimation > 11h): 08023A5A (T) bhi 8023A86h ;} If EnemyAnimation <= 17h: 08023A5C (T) mov r0,0C0h ;\ 08023A5E (T) mov r2,r12 ;} EnemyRightBoundryOffset = 40h 08023A60 (T) strh r0,[r2,10h] ;/ 08023A62 (T) cmp r1,12h ;\ 08023A64 (T) bne 8023AF6h ;| 08023A66 (T) ldrb r0,[r2,1Ch] ;} If EnemyAnimation != 12h or EnemyAnimationCounter != 03h: Branch to 8023AF6h 08023A68 (T) cmp r0,3h ;| 08023A6A (T) bne 8023AF6h ;/ 08023A6C (T) ldrb r2,[r2,1Fh] ; r2 parameter = EnemySpritesetGFXSlot 08023A6E (T) mov r0,r12 ;\ 08023A70 (T) add r0,23h ;} r3 parameter = EnemySlot 08023A72 (T) ldrb r3,[r0] ;/ 08023A74 (T) mov r1,r12 ;\ 08023A76 (T) ldrh r0,[r1,2h] ;| 08023A78 (T) add r0,10h ;} sp0 parameter = EnemyYPosition + 10h 08023A7A (T) str r0,[sp] ;/ 08023A7C (T) ldrh r0,[r1,4h] ;\ 08023A7E (T) add r0,8Ch ;} sp4 parameter = EnemyXPosition + 8Ch 08023A80 (T) str r0,[sp,4h] ;/ 08023A82 (T) str r5,[sp,8h] ; sp8 parameter = 40h 08023A84 (T) b 8023ADCh ; Branch to 8023ADCh 08023A86 (T) mov r0,80h ;\ Else (EnemyAnimation > 17h): 08023A88 (T) mov r2,r12 ;} EnemyRightBoundryOffset = 80h 08023A8A (T) strh r0,[r2,10h] ;/ 08023A8C (T) b 8023AF6h ; Branch to 8023AF6 08023A8E (T) mov r0,r12 ;\ Else (EnemyOrientation hasn't 40h): 08023A90 (T) ldrh r1,[r0,16h] ;| 08023A92 (T) cmp r1,0Fh ;| 08023A94 (T) bhi 8023AA4h ;| 08023A96 (T) ldr r0,=0FF60h ;| 08023A98 (T) mov r1,r12 ;| 08023A9A (T) strh r0,[r1,0Eh] ;| 08023A9C (T) b 8023AF6h ;| 08023A9E dw 00000h ;| 08023AA0 dd 00000FF60h ;| ;| 08023AA4 (T) cmp r1,11h ;| 08023AA6 (T) bhi 8023AB0h ;| 08023AA8 (T) ldr r0,=0FFA0h ;| 08023AAA (T) b 8023AF2h ;| 08023AAC dd 00000FFA0h ;| ;| 08023AB0 (T) cmp r1,17h ;| 08023AB2 (T) bhi 8023AF0h ;| 08023AB4 (T) ldr r0,=0FF40h ;} Same as above; but with negative x values, for EnemyLeftBoundryOffset, and sp4 parameter 08023AB6 (T) mov r2,r12 ;| 08023AB8 (T) strh r0,[r2,0Eh] ;| 08023ABA (T) cmp r1,12h ;| 08023ABC (T) bne 8023AF6h ;| 08023ABE (T) ldrb r0,[r2,1Ch] ;| 08023AC0 (T) cmp r0,3h ;| 08023AC2 (T) bne 8023AF6h ;| 08023AC4 (T) ldrb r2,[r2,1Fh] ;| 08023AC6 (T) mov r0,r12 ;| 08023AC8 (T) add r0,23h ;| 08023ACA (T) ldrb r3,[r0] ;| 08023ACC (T) mov r1,r12 ;| 08023ACE (T) ldrh r0,[r1,2h] ;| 08023AD0 (T) add r0,10h ;| 08023AD2 (T) str r0,[sp] ;| 08023AD4 (T) ldrh r0,[r1,4h] ;| 08023AD6 (T) sub r0,8Ch ;| 08023AD8 (T) str r0,[sp,4h] ;| 08023ADA (T) str r4,[sp,8h] ;/ 08023ADC (T) mov r0,16h ; r0 parameter = 16h (slash projectile) 08023ADE (T) mov r1,0h ; r1 parameter = 00h 08023AE0 (T) bl 800FAE0h ; Execute subroutine Enemy_SpawnNewEnemy 08023AE4 (T) mov r0,0B9h ; r0 parameter = B9h 08023AE6 (T) bl 800270Ch ; Execute subroutine 800270C (Sound effect?) 08023AEA (T) b 8023AF6h ; Branch to 8023AF6 08023AEC dd 00000FF40h 08023AF0 (T) ldr r0,=0FF80h ;\ ;| 08023AF2 (T) mov r2,r12 ;} Continuation of 'Same as above' 08023AF4 (T) strh r0,[r2,0Eh] ;/ 08023AF6 (T) bl 801196Ch ; Execute subroutine Enemy_CheckAnimationLoopNextFrame 08023AFA (T) cmp r0,0h ;\ 08023AFC (T) beq 8023B0Eh ;} If not returned 0 (no more animation) 08023AFE (T) ldr r1,=EnemyOrientation ;\ 08023B00 (T) mov r2,r1 ;| 08023B02 (T) add r2,24h ;} EnemyPose = 1 (thinking) 08023B04 (T) mov r0,1h ;| 08023B06 (T) strb r0,[r2] ;/ 08023B08 (T) add r1,2Eh ;\ 08023B0A (T) mov r0,78h ;} EnemyRespawnTimer = 78h 08023B0C (T) strb r0,[r1] ;/ 08023B0E (T) add sp,0Ch 08023B10 (T) pop r4,r5 08023B12 (T) pop r0 08023B14 (T) bx r0 08023B16 dw 00000h 08023B18 dd 00000FF80h,0030006BCh