;;; Enemy_CheckAnimationLoopNextFrame ;;; ;; Returns r0: 0 if more animation, 1 if no more animation 0801196C (T) push r14 0801196E (T) ldr r0,=EnemyOrientation ;\ 08011970 (T) ldrb r1,[r0,1Ch] ;| 08011972 (T) ldrh r3,[r0,16h] ;| 08011974 (T) lsl r1,r1,18h ;| 08011976 (T) mov r2,80h ;| 08011978 (T) lsl r2,r2,12h ;| 0801197A (T) add r1,r1,r2 ;| 0801197C (T) lsr r1,r1,18h ;} If EnemyGraphicPointer[EnemyAnimation] timer > EnemyAnimationCounter+1: return 0 0801197E (T) ldr r2,[r0,18h] ;| 08011980 (T) lsl r0,r3,3h ;| 08011982 (T) add r0,r0,r2 ;| 08011984 (T) ldrb r0,[r0,4h] ;| 08011986 (T) cmp r0,r1 ;| 08011988 (T) bcs 80119A0h ;/ 0801198A (T) add r0,r3,1 ;\ 0801198C (T) lsl r0,r0,10h ;| 0801198E (T) lsr r0,r0,0Dh ;| 08011990 (T) add r0,r0,r2 ;} And if EnemyGraphicPointer[EnemyAnimation + 1] timer: return 0 08011992 (T) ldrb r0,[r0,4h] ;| 08011994 (T) cmp r0,0h ;| 08011996 (T) bne 80119A0h ;/ 08011998 (T) mov r0,1h ;\ 0801199A (T) b 80119A2h ;} Return 1 0801199C dd 0030006BCh 080119A0 (T) mov r0,0h 080119A2 (T) pop r1 080119A4 (T) bx r1