;;; Arachnus_RollAttack ;;; 08023B20 (T) push r4-r7,r14 08023B22 (T) mov r7,r8 08023B24 (T) push r7 08023B26 (T) ldr r5,=EnemyOrientation ;\ 08023B28 (T) mov r0,r5 ;| 08023B2A (T) add r0,2Fh ;| 08023B2C (T) ldrb r2,[r0] ;| 08023B2E (T) ldr r7,=EnemySlot0 ;| 08023B30 (T) lsl r0,r2,3h ;| 08023B32 (T) sub r0,r0,r2 ;| 08023B34 (T) lsl r6,r0,3h ;} If Enemy[EnemyAttachedEnemySlot]GraphicPointer == 8302C94h: 08023B36 (T) mov r0,r7 ;| 08023B38 (T) add r0,18h ;| 08023B3A (T) add r0,r6,r0 ;| 08023B3C (T) ldr r1,[r0] ;| 08023B3E (T) ldr r0,=8302C94h ;| 08023B40 (T) cmp r1,r0 ;| 08023B42 (T) bne 8023B80h ;/ 08023B44 (T) mov r0,r2 ; r0 parameter = EnemyAttachedEnemySlot 08023B46 (T) bl 80119A8h ; Execute subroutine Enemy_CheckEnemySlotAnimationLoopCurrentFrame 08023B4A (T) cmp r0,0h ;\ 08023B4C (T) bne 8023B50h ;} If returned 0 (more animation): Return 08023B4E (T) b 8023D0Ah ;/ 08023B50 (T) ldr r0,=8302DC4h ; r0 parameter = 8302DC4h 08023B52 (T) bl 8012304h ; Execute subroutine Enemy_SetAttachedEnemyGraphics 08023B56 (T) add r1,r6,r7 ;\ 08023B58 (T) ldrh r2,[r1] ;| 08023B5A (T) mov r0,80h ;| 08023B5C (T) mov r3,0h ;} Enemy[AttachedEnemySlot]Orientation |= 80h (?) 08023B5E (T) orr r0,r2 ;| 08023B60 (T) strh r0,[r1] ;/ 08023B62 (T) mov r0,r1 ;\ 08023B64 (T) add r0,2Bh ;} Clear Enemy[AttachedEnemySlot]2B 08023B66 (T) strb r3,[r0] ;/ 08023B68 (T) mov r0,80h ;\ 08023B6A (T) lsl r0,r0,1h ;} Enemy[AttachedEnemySlot]12 = 0100; 08023B6C (T) strh r0,[r1,12h] ;/ 08023B6E (T) b 8023D0Ah ; Return 08023B70 dd 0030006BCh,003000140h,008302C94h,008302DC4h 08023B80 (T) ldr r0,=82FD0B8h 08023B82 (T) mov r1,30h ;\ 08023B84 (T) add r1,r1,r5 ;| 08023B86 (T) mov r8,r1 ; r8 = &Enemy30 08023B88 (T) ldrb r3,[r1] ;} r2 = Enemy30 08023B8A (T) lsl r1,r3,18h ;| 08023B8C (T) lsr r2,r1,18h ;/ 08023B8E (T) lsr r1,r1,1Ah ;\ 08023B90 (T) lsl r1,r1,1h ;| 08023B92 (T) add r1,r1,r0 ;} r4 = 82FD0B8[Enemy30>>2] 08023B94 (T) ldrh r4,[r1] ;/ 08023B96 (T) cmp r2,2Eh ;\ 08023B98 (T) bhi 8023BA0h ;} If Enemy30 <= 2Eh: 08023B9A (T) add r0,r3,1 ;\ 08023B9C (T) mov r2,r8 ;} Increment Enemy30 08023B9E (T) strb r0,[r2] ;/ 08023BA0 (T) ldrh r1,[r5] ;\ 08023BA2 (T) mov r0,40h ;| 08023BA4 (T) and r0,r1 ;} If EnemyOrientation hasn't 40h (facing right): 08023BA6 (T) cmp r0,0h ;} Branch to 8023C40h 08023BA8 (T) beq 8023C40h ;/ 08023BAA (T) add r6,r6,r7 ;\ 08023BAC (T) ldrh r0,[r6,2h] ;} r0 parameter = Enemy[AttachedEnemySlot]YPosition-48h 08023BAE (T) sub r0,48h ;/ 08023BB0 (T) mov r2,10h ;\ 08023BB2 (T) ldsh r1,[r6,r2] ;| 08023BB4 (T) ldrh r2,[r6,4h] ;} r1 parameter = Enemy[AttachedEnemySlot]XPosition+Enemy[AttachedEnemySlot]RightBoundaryOffset 08023BB6 (T) add r1,r1,r2 ;/ 08023BB8 (T) bl 8011390h ; Execute subroutine 8011390h (Position related?) 08023BBC (T) ldr r0,=30007A5h ;\ 08023BBE (T) ldrb r1,[r0] ;| 08023BC0 (T) mov r0,0Fh ;| 08023BC2 (T) and r0,r1 ;} If 30007A5 has any of 0F: branch to 8023CD0h 08023BC4 (T) cmp r0,0h ;| 08023BC6 (T) beq 8023BCAh ;| 08023BC8 (T) b 8023CD0h ;/ 08023BCA (T) ldrh r0,[r5,4h] ;\ 08023BCC (T) add r0,r4,r0 ;} EnemyXPosition += 82FD0B8[Enemy30>>2] (EnemyXSpeed) 08023BCE (T) strh r0,[r5,4h] ;/ 08023BD0 (T) ldrh r7,[r5,4h] ; r7 = EnemyXPosition 08023BD2 (T) ldrh r2,[r5,2h] ; r2 = EnemyYPosition 08023BD4 (T) ldrh r0,[r6,4h] ;\ 08023BD6 (T) add r0,r4,r0 ;} Enemy[AttachedEnemySlot]XPosition += 82FD0B8[Enemy30>>2] (EnemyXSpeed) 08023BD8 (T) strh r0,[r6,4h] ;/ 08023BDA (T) mov r1,r8 ;\ 08023BDC (T) ldrb r0,[r1] ;| 08023BDE (T) lsr r4,r0,1h ;} If Enemy30>>1 > 10h: 08023BE0 (T) cmp r4,10h ;| 08023BE2 (T) bls 8023BE6h ;/ 08023BE4 (T) mov r4,10h ; Use 10h for Enemy30>>1 08023BE6 (T) mov r0,r6 ;\ 08023BE8 (T) add r0,2Bh ;| 08023BEA (T) ldrb r1,[r0] ;} Enemy[AttachedEnemySlot]2B += Enemy30>>1 08023BEC (T) add r1,r1,r4 ;| 08023BEE (T) strb r1,[r0] ;/ 08023BF0 (T) ldr r0,=30007F0h ;\ 08023BF2 (T) ldrb r1,[r0] ;} If 30007F0 <= 0Ch: 08023BF4 (T) cmp r1,0Ch ;} Branch to 8023CCAh 08023BF6 (T) bls 8023CCAh ;/ 08023BF8 (T) mov r0,1h ;\ 08023BFA (T) and r0,r1 ;| 08023BFC (T) cmp r0,0h ;} If 30007F0 is odd: 08023BFE (T) beq 8023C28h ;/ 08023C00 (T) sub r2,10h ; r2 parameter = EnemyYPosition - 10h 08023C02 (T) ldr r0,=8BitFrameCounter ;\ 08023C04 (T) ldrb r0,[r0] ;| 08023C06 (T) mov r3,1Fh ;} r3 parameter = EnemyXPosition + 8BitFrameCounter % 20h 08023C08 (T) and r3,r0 ;| 08023C0A (T) add r3,r7,r3 ;/ 08023C0C (T) mov r0,0h ; r0 parameter = 0 08023C0E (T) mov r1,4h ; r1 parameter = 4 08023C10 (T) bl 8014250h ; Execute subroutine 8014250h (Manipulates the 030000F4 struct) 08023C14 (T) b 8023CCAh ; Branch to just before return 08023C16 dw 00000h 08023C18 dd 0082FD0B8h,0030007A5h,0030007F0h,003000BE5h 08023C28 (T) ldr r0,=8BitFrameCounter ;\ Else: (30007F0 is even) 08023C2A (T) ldrb r0,[r0] ;| 08023C2C (T) mov r3,1Fh ;} r3 parameter = EnemyXPosition + 8BitFrameCounter % 20h 08023C2E (T) and r3,r0 ;| 08023C30 (T) add r3,r7,r3 ;/ 08023C32 (T) mov r0,0h ; r0 parameter = 0 08023C34 (T) mov r1,11h ; r1 parameter = 11h 08023C36 (T) bl 8014250h ; Execute subroutine 8014250h (Manipulates the 030000F4 struct) 08023C3A (T) b 8023CCAh ; Branch to just before return 08023C3C dd 003000BE5h 08023C40 (T) add r6,r6,r7 ;\ (EnemyOrientation has 40h:) 08023C42 (T) ldrh r0,[r6,2h] ;} r0 parameter = Enemy[AttachedEnemySlot]YPosition-48h 08023C44 (T) sub r0,48h ;/ 08023C46 (T) mov r2,0Eh ;\ 08023C48 (T) ldsh r1,[r6,r2] ;| 08023C4A (T) ldrh r2,[r6,4h] ;} r1 parameter = Enemy[AttachedEnemySlot]XPosition+Enemy[AttachedEnemySlot]LeftBoundaryOffset 08023C4C (T) add r1,r1,r2 ;/ 08023C4E (T) bl 8011390h ; Execute subroutine 8011390h (Position related?) 08023C52 (T) ldr r0,=30007A5h ;\ 08023C54 (T) ldrb r1,[r0] ;| 08023C56 (T) mov r0,0Fh ;| 08023C58 (T) and r0,r1 ;} If 30007A5 has any of 0F: branch to 8023CD0h 08023C5A (T) cmp r0,0h ;| 08023C5C (T) bne 8023CD0h ;/ 08023C5E (T) ldrh r0,[r5,4h] ;\ 08023C60 (T) sub r0,r0,r4 ;} EnemyXPosition += 82FD0B8[Enemy30>>2] (EnemyXSpeed) 08023C62 (T) strh r0,[r5,4h] ;/ 08023C64 (T) ldrh r7,[r5,4h] ; r7 = EnemyXPosition 08023C66 (T) ldrh r2,[r5,2h] ; r2 = EnemyYPosition 08023C68 (T) ldrh r0,[r6,4h] ;\ 08023C6A (T) sub r0,r0,r4 ;} Enemy[AttachedEnemySlot]XPosition -= 82FD0B8[Enemy30>>2] (EnemyXSpeed) 08023C6C (T) strh r0,[r6,4h] ;/ 08023C6E (T) mov r1,r8 ;\ 08023C70 (T) ldrb r0,[r1] ;| 08023C72 (T) lsr r4,r0,1h ;} If Enemy30>>1 > 10h: 08023C74 (T) cmp r4,10h ;| 08023C76 (T) bls 8023C7Ah ;/ 08023C78 (T) mov r4,10h ; Use 10h for Enemy30>>1 08023C7A (T) mov r0,r6 ;\ 08023C7C (T) add r0,2Bh ;| 08023C7E (T) ldrb r1,[r0] ;} Enemy[AttachedEnemySlot]2B -= Enemy30>>1 08023C80 (T) sub r1,r1,r4 ;| 08023C82 (T) strb r1,[r0] ;/ 08023C84 (T) ldr r0,=30007F0h ;\ 08023C86 (T) ldrb r1,[r0] ;} If 30007F0 <= 0Ch: 08023C88 (T) cmp r1,0Ch ;} Branch to 8023CCAh 08023C8A (T) bls 8023CCAh ;/ 08023C8C (T) mov r0,1h ;\ 08023C8E (T) and r0,r1 ;| 08023C90 (T) cmp r0,0h ;} If 30007F0 is odd: 08023C92 (T) beq 8023CB8h ;/ 08023C94 (T) sub r2,10h ; r2 parameter = EnemyYPosition - 10h 08023C96 (T) ldr r0,=8BitFrameCounter ;\ 08023C98 (T) ldrb r0,[r0] ;| 08023C9A (T) mov r3,1Fh ;} r3 parameter = EnemyXPosition - 8BitFrameCounter % 20h 08023C9C (T) and r3,r0 ;| 08023C9E (T) sub r3,r7,r3 ;/ 08023CA0 (T) mov r0,0h ; r0 parameter = 0 08023CA2 (T) mov r1,13h ; r1 parameter = 13h 08023CA4 (T) bl 8014250h ; Execute subroutine 8014250h (Manipulates the 030000F4 struct) 08023CA8 (T) b 8023CCAh ; Branch to just before return 08023CAA dw 00000h 08023CAC dd 0030007A5h,0030007F0h,003000BE5h 08023CB8 (T) ldr r0,=8BitFrameCounter ;\ Else: (30007F0 is even) 08023CBA (T) ldrb r0,[r0] ;| 08023CBC (T) mov r3,1Fh ;} r3 parameter = EnemyXPosition - 8BitFrameCounter % 20h 08023CBE (T) and r3,r0 ;| 08023CC0 (T) sub r3,r7,r3 ;/ 08023CC2 (T) mov r0,0h ; r0 parameter = 0 08023CC4 (T) mov r1,12h ; r1 parameter = 11h 08023CC6 (T) bl 8014250h ; Execute subroutine 8014250h (Manipulates the 030000F4 struct) 08023CCA (T) mov r0,0h ;\ 08023CCC (T) cmp r0,0h ;} Branch to 8023CF8h 08023CCE (T) beq 8023CF8h ;/ 08023CD0 (T) ldr r1,=EnemyOrientation ;\ (30007A5 has any of 0F:) 08023CD2 (T) mov r2,r1 ;\ 08023CD4 (T) add r2,24h ;| 08023CD6 (T) mov r3,0h ;} Enemy pose = 3Ch (hit wall from roll attack) 08023CD8 (T) mov r0,3Ch ;| 08023CDA (T) strb r0,[r2] ;/ 08023CDC (T) add r1,31h ;\ 08023CDE (T) strb r3,[r1] ;} Clear Enemy31 08023CE0 (T) mov r0,28h ; r0 parameter = 28h 08023CE2 (T) mov r1,81h ; r1 parameter = 81h 08023CE4 (T) bl 80625C0h ; Execute subroutine 80625C0h (Manipulates the 030000F4 struct) 08023CE8 (T) mov r0,0B7h ; r0 parameter = B7h 08023CEA (T) bl 800270Ch ; Execute subroutine 800270Ch (Sound effect?) 08023CEE (T) b 8023D0Ah ; Branch to return 08023CF0 dd 003000BE5h,0030006BCh 08023CF8 (T) ldr r0,=8BitFrameCounter ;\ 08023CFA (T) ldrb r1,[r0] ;| 08023CFC (T) mov r0,0Fh ;| 08023CFE (T) and r0,r1 ;} If 8BitFrameCounter % 10h == 0: 08023D00 (T) cmp r0,0h ;| 08023D02 (T) bne 8023D0Ah ;/ 08023D04 (T) mov r0,0B6h ; r0 parameter = B6h 08023D06 (T) bl 800270Ch ; Execute subroutine 800270Ch (Sound effect?) 08023D0A (T) pop r3 08023D0C (T) mov r8,r3 08023D0E (T) pop r4-r7 08023D10 (T) pop r0 08023D12 (T) bx r0 08023D14 dd 003000BE5h