;;; Arachnus_TurningAround ;;;
0802464C (T)  push    r14
0802464E (T)  ldr     r1,=EnemyOrientation      ;\
08024650 (T)  mov     r0,r1                     ;|
08024652 (T)  add     r0,2Fh                    ;} r3 = EnemyAttachedEnemySlot
08024654 (T)  ldrb    r3,[r0]                   ;/
08024656 (T)  ldrb    r0,[r1,1Ch]               ;\
08024658 (T)  cmp     r0,4h                     ;| 
0802465A (T)  bne     80246A2h                  ;|
0802465C (T)  ldrh    r0,[r1,16h]               ;} If EnemyAnimationCounter==4 && EnemyAnimation==2:
0802465E (T)  cmp     r0,2h                     ;|
08024660 (T)  bne     80246A2h                  ;/
08024662 (T)  ldrh    r0,[r1]                   ;\
08024664 (T)  mov     r2,40h                    ;|
08024666 (T)  eor     r0,r2                     ;} EnemyOrientation ^= 40h (facing right)
08024668 (T)  strh    r0,[r1]                   ;/
0802466A (T)  ldr     r1,=EnemySlot0            ;\
0802466C (T)  lsl     r0,r3,3h                  ;|
0802466E (T)  sub     r0,r0,r3                  ;|
08024670 (T)  lsl     r0,r0,3h                  ;|
08024672 (T)  add     r3,r0,r1                  ;} Enemy[EnemyAttachedEnemySlot]Orientation ^= 40h
08024674 (T)  ldrh    r0,[r3]                   ;|
08024676 (T)  eor     r0,r2                     ;|
08024678 (T)  strh    r0,[r3]                   ;/
0802467A (T)  mov     r1,40h                    ;\
0802467C (T)  and     r0,r1                     ;|
0802467E (T)  lsl     r0,r0,10h                 ;|
08024680 (T)  lsr     r0,r0,10h                 ;} If Enemy[EnemyAttachedEnemySlot]Orientation has 40h:
08024682 (T)  cmp     r0,0h                     ;|
08024684 (T)  beq     802469Ch                  ;/
08024686 (T)  ldr     r0,=0FFB0h                ;\
08024688 (T)  strh    r0,[r3,0Eh]               ;} Enemy[EnemyAttachedEnemySlot]LeftBoundry = -50h
0802468A (T)  mov     r0,0h                     ;\
0802468C (T)  b       80246A0h                  ;} Enemy[EnemyAttachedEnemySlot]RightRoundry = 00h
0802468E      dw      00000h
08024690      dd      0030006BCh,003000140h,00000FFB0h

0802469C (T)  strh    r0,[r3,0Eh]               ; Else (Enemy[EnemyAttachedEnemySlot]Orientation hasn't 40h): Enemy[EnemyAttachedEnemySlot]LeftBoundryOffset = 00h
0802469E (T)  mov     r0,50h                    ;\
                                                ;} Enemy[EnemyAttachedEnemySlot]RightBoundryOffset = 50h
080246A0 (T)  strh    r0,[r3,10h]               ;/

080246A2 (T)  bl      801196Ch                  ; Execute subroutine Enemy_CheckAnimationLoopNextFrame
080246A6 (T)  cmp     r0,0h                     ;\
080246A8 (T)  beq     80246B2h                  ;} If not returned 0 (no more animation):
080246AA (T)  ldr     r0,=EnemyOrientation      ;\
080246AC (T)  add     r0,24h                    ;|
080246AE (T)  mov     r1,1h                     ;} EnemyPose = 1 (thinking)
080246B0 (T)  strb    r1,[r0]                   ;/

080246B2 (T)  pop     r0
080246B4 (T)  bx      r0
080246B6      dw      00000h
080246B8      dd      0030006BCh