begin aiAttack.cpp

This commit is contained in:
EpochFlame 2023-02-04 21:12:32 -05:00
parent 4b38081768
commit 61ed46dc22
4 changed files with 64 additions and 232 deletions

View File

@ -34,28 +34,27 @@ lbl_8047F31C:
.section .data, "wa" # 0x8049E220 - 0x804EFC20
.balign 8
.global __vt__13FindCondition
__vt__13FindCondition:
.obj __vt__13FindCondition, weak
.4byte 0
.4byte 0
.4byte satisfy__13FindConditionFP8CollPart
.global "__vt__20Condition<8CollPart>"
"__vt__20Condition<8CollPart>":
.endobj __vt__13FindCondition
.obj __vt__20Condition<8CollPart>, weak
.4byte 0
.4byte 0
.4byte 0
.global __vt__Q26PikiAI20ApproachPosActionArg
__vt__Q26PikiAI20ApproachPosActionArg:
.endobj __vt__20Condition<8CollPart>
.obj __vt__Q26PikiAI20ApproachPosActionArg, weak
.4byte 0
.4byte 0
.4byte getName__Q26PikiAI20ApproachPosActionArgFv
.global __vt__Q26PikiAI20StickAttackActionArg
__vt__Q26PikiAI20StickAttackActionArg:
.endobj __vt__Q26PikiAI20ApproachPosActionArg
.obj __vt__Q26PikiAI20StickAttackActionArg, weak
.4byte 0
.4byte 0
.4byte getName__Q26PikiAI20StickAttackActionArgFv
.global __vt__Q26PikiAI9ActAttack
__vt__Q26PikiAI9ActAttack:
.endobj __vt__Q26PikiAI20StickAttackActionArg
.obj __vt__Q26PikiAI9ActAttack, global
.4byte 0
.4byte 0
.4byte init__Q26PikiAI9ActAttackFPQ26PikiAI9ActionArg
@ -75,6 +74,7 @@ __vt__Q26PikiAI9ActAttack:
.4byte 0
.4byte 0
.4byte "@56@4@onKeyEvent__Q26PikiAI9ActAttackFRCQ28SysShape8KeyEvent"
.endobj __vt__Q26PikiAI9ActAttack
.section .sdata2, "a" # 0x80516360 - 0x80520E40
.balign 8
@ -124,8 +124,7 @@ lbl_805190C8:
.float 0.5
.section .text, "ax" # 0x800056C0 - 0x80472F00
.global getInfo__Q26PikiAI9ActAttackFPc
getInfo__Q26PikiAI9ActAttackFPc:
.fn getInfo__Q26PikiAI9ActAttackFPc, global
/* 801A04CC 0019D40C 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 801A04D0 0019D410 7C 08 02 A6 */ mflr r0
/* 801A04D4 0019D414 3C A0 80 48 */ lis r5, lbl_8047F2AC@ha
@ -154,9 +153,9 @@ getInfo__Q26PikiAI9ActAttackFPc:
/* 801A0530 0019D470 7C 08 03 A6 */ mtlr r0
/* 801A0534 0019D474 38 21 00 20 */ addi r1, r1, 0x20
/* 801A0538 0019D478 4E 80 00 20 */ blr
.endfn getInfo__Q26PikiAI9ActAttackFPc
.global emotion_success__Q26PikiAI9ActAttackFv
emotion_success__Q26PikiAI9ActAttackFv:
.fn emotion_success__Q26PikiAI9ActAttackFv, global
/* 801A053C 0019D47C 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 801A0540 0019D480 7C 08 02 A6 */ mflr r0
/* 801A0544 0019D484 38 A0 00 13 */ li r5, 0x13
@ -174,9 +173,9 @@ emotion_success__Q26PikiAI9ActAttackFv:
/* 801A0574 0019D4B4 7C 08 03 A6 */ mtlr r0
/* 801A0578 0019D4B8 38 21 00 10 */ addi r1, r1, 0x10
/* 801A057C 0019D4BC 4E 80 00 20 */ blr
.endfn emotion_success__Q26PikiAI9ActAttackFv
.global __ct__Q26PikiAI9ActAttackFPQ24Game4Piki
__ct__Q26PikiAI9ActAttackFPQ24Game4Piki:
.fn __ct__Q26PikiAI9ActAttackFPQ24Game4Piki, global
/* 801A0580 0019D4C0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 801A0584 0019D4C4 7C 08 02 A6 */ mflr r0
/* 801A0588 0019D4C8 90 01 00 14 */ stw r0, 0x14(r1)
@ -233,9 +232,9 @@ __ct__Q26PikiAI9ActAttackFPQ24Game4Piki:
/* 801A0648 0019D588 7C 08 03 A6 */ mtlr r0
/* 801A064C 0019D58C 38 21 00 10 */ addi r1, r1, 0x10
/* 801A0650 0019D590 4E 80 00 20 */ blr
.endfn __ct__Q26PikiAI9ActAttackFPQ24Game4Piki
.global init__Q26PikiAI9ActAttackFPQ26PikiAI9ActionArg
init__Q26PikiAI9ActAttackFPQ26PikiAI9ActionArg:
.fn init__Q26PikiAI9ActAttackFPQ26PikiAI9ActionArg, global
/* 801A0654 0019D594 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 801A0658 0019D598 7C 08 02 A6 */ mflr r0
/* 801A065C 0019D59C 90 01 00 24 */ stw r0, 0x24(r1)
@ -312,9 +311,9 @@ init__Q26PikiAI9ActAttackFPQ26PikiAI9ActionArg:
/* 801A0764 0019D6A4 7C 08 03 A6 */ mtlr r0
/* 801A0768 0019D6A8 38 21 00 20 */ addi r1, r1, 0x20
/* 801A076C 0019D6AC 4E 80 00 20 */ blr
.endfn init__Q26PikiAI9ActAttackFPQ26PikiAI9ActionArg
.global initStickAttack__Q26PikiAI9ActAttackFv
initStickAttack__Q26PikiAI9ActAttackFv:
.fn initStickAttack__Q26PikiAI9ActAttackFv, global
/* 801A0770 0019D6B0 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 801A0774 0019D6B4 7C 08 02 A6 */ mflr r0
/* 801A0778 0019D6B8 90 01 00 34 */ stw r0, 0x34(r1)
@ -348,9 +347,9 @@ initStickAttack__Q26PikiAI9ActAttackFv:
/* 801A07E8 0019D728 7C 08 03 A6 */ mtlr r0
/* 801A07EC 0019D72C 38 21 00 30 */ addi r1, r1, 0x30
/* 801A07F0 0019D730 4E 80 00 20 */ blr
.endfn initStickAttack__Q26PikiAI9ActAttackFv
.global initAdjust__Q26PikiAI9ActAttackFv
initAdjust__Q26PikiAI9ActAttackFv:
.fn initAdjust__Q26PikiAI9ActAttackFv, global
/* 801A07F4 0019D734 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 801A07F8 0019D738 7C 08 02 A6 */ mflr r0
/* 801A07FC 0019D73C 90 01 00 34 */ stw r0, 0x34(r1)
@ -393,9 +392,9 @@ initAdjust__Q26PikiAI9ActAttackFv:
/* 801A0890 0019D7D0 7C 08 03 A6 */ mtlr r0
/* 801A0894 0019D7D4 38 21 00 30 */ addi r1, r1, 0x30
/* 801A0898 0019D7D8 4E 80 00 20 */ blr
.endfn initAdjust__Q26PikiAI9ActAttackFv
.global initJumpAdjust__Q26PikiAI9ActAttackFv
initJumpAdjust__Q26PikiAI9ActAttackFv:
.fn initJumpAdjust__Q26PikiAI9ActAttackFv, global
/* 801A089C 0019D7DC 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 801A08A0 0019D7E0 7C 08 02 A6 */ mflr r0
/* 801A08A4 0019D7E4 90 01 00 34 */ stw r0, 0x34(r1)
@ -439,9 +438,9 @@ initJumpAdjust__Q26PikiAI9ActAttackFv:
/* 801A093C 0019D87C 7C 08 03 A6 */ mtlr r0
/* 801A0940 0019D880 38 21 00 30 */ addi r1, r1, 0x30
/* 801A0944 0019D884 4E 80 00 20 */ blr
.endfn initJumpAdjust__Q26PikiAI9ActAttackFv
.global applicable__Q26PikiAI9ActAttackFv
applicable__Q26PikiAI9ActAttackFv:
.fn applicable__Q26PikiAI9ActAttackFv, global
/* 801A0948 0019D888 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 801A094C 0019D88C 7C 08 02 A6 */ mflr r0
/* 801A0950 0019D890 90 01 00 24 */ stw r0, 0x24(r1)
@ -479,9 +478,9 @@ applicable__Q26PikiAI9ActAttackFv:
/* 801A09C8 0019D908 7C 08 03 A6 */ mtlr r0
/* 801A09CC 0019D90C 38 21 00 20 */ addi r1, r1, 0x20
/* 801A09D0 0019D910 4E 80 00 20 */ blr
.endfn applicable__Q26PikiAI9ActAttackFv
.global calcAttackPos__Q26PikiAI9ActAttackFv
calcAttackPos__Q26PikiAI9ActAttackFv:
.fn calcAttackPos__Q26PikiAI9ActAttackFv, global
/* 801A09D4 0019D914 94 21 FF B0 */ stwu r1, -0x50(r1)
/* 801A09D8 0019D918 7C 08 02 A6 */ mflr r0
/* 801A09DC 0019D91C 90 01 00 54 */ stw r0, 0x54(r1)
@ -600,9 +599,9 @@ calcAttackPos__Q26PikiAI9ActAttackFv:
/* 801A0B8C 0019DACC 7C 08 03 A6 */ mtlr r0
/* 801A0B90 0019DAD0 38 21 00 50 */ addi r1, r1, 0x50
/* 801A0B94 0019DAD4 4E 80 00 20 */ blr
.endfn calcAttackPos__Q26PikiAI9ActAttackFv
.global exec__Q26PikiAI9ActAttackFv
exec__Q26PikiAI9ActAttackFv:
.fn exec__Q26PikiAI9ActAttackFv, global
/* 801A0B98 0019DAD8 94 21 FE F0 */ stwu r1, -0x110(r1)
/* 801A0B9C 0019DADC 7C 08 02 A6 */ mflr r0
/* 801A0BA0 0019DAE0 90 01 01 14 */ stw r0, 0x114(r1)
@ -1234,9 +1233,9 @@ exec__Q26PikiAI9ActAttackFv:
/* 801A14D8 0019E418 7C 08 03 A6 */ mtlr r0
/* 801A14DC 0019E41C 38 21 01 10 */ addi r1, r1, 0x110
/* 801A14E0 0019E420 4E 80 00 20 */ blr
.endfn exec__Q26PikiAI9ActAttackFv
.global cleanup__Q26PikiAI9ActAttackFv
cleanup__Q26PikiAI9ActAttackFv:
.fn cleanup__Q26PikiAI9ActAttackFv, global
/* 801A14E4 0019E424 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 801A14E8 0019E428 7C 08 02 A6 */ mflr r0
/* 801A14EC 0019E42C C0 02 AD 58 */ lfs f0, lbl_805190B8@sda21(r2)
@ -1260,9 +1259,9 @@ cleanup__Q26PikiAI9ActAttackFv:
/* 801A152C 0019E46C 7C 08 03 A6 */ mtlr r0
/* 801A1530 0019E470 38 21 00 10 */ addi r1, r1, 0x10
/* 801A1534 0019E474 4E 80 00 20 */ blr
.endfn cleanup__Q26PikiAI9ActAttackFv
.global collisionCallback__Q26PikiAI9ActAttackFPQ24Game4PikiRQ24Game9CollEvent
collisionCallback__Q26PikiAI9ActAttackFPQ24Game4PikiRQ24Game9CollEvent:
.fn collisionCallback__Q26PikiAI9ActAttackFPQ24Game4PikiRQ24Game9CollEvent, global
/* 801A1538 0019E478 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 801A153C 0019E47C 7C 08 02 A6 */ mflr r0
/* 801A1540 0019E480 90 01 00 34 */ stw r0, 0x34(r1)
@ -1320,9 +1319,9 @@ collisionCallback__Q26PikiAI9ActAttackFPQ24Game4PikiRQ24Game9CollEvent:
/* 801A160C 0019E54C 7C 08 03 A6 */ mtlr r0
/* 801A1610 0019E550 38 21 00 30 */ addi r1, r1, 0x30
/* 801A1614 0019E554 4E 80 00 20 */ blr
.endfn collisionCallback__Q26PikiAI9ActAttackFPQ24Game4PikiRQ24Game9CollEvent
.global bounceCallback__Q26PikiAI9ActAttackFPQ24Game4PikiPQ23Sys8Triangle
bounceCallback__Q26PikiAI9ActAttackFPQ24Game4PikiPQ23Sys8Triangle:
.fn bounceCallback__Q26PikiAI9ActAttackFPQ24Game4PikiPQ23Sys8Triangle, global
/* 801A1618 0019E558 94 21 FF 90 */ stwu r1, -0x70(r1)
/* 801A161C 0019E55C 7C 08 02 A6 */ mflr r0
/* 801A1620 0019E560 90 01 00 74 */ stw r0, 0x74(r1)
@ -1476,9 +1475,9 @@ bounceCallback__Q26PikiAI9ActAttackFPQ24Game4PikiPQ23Sys8Triangle:
/* 801A1858 0019E798 7C 08 03 A6 */ mtlr r0
/* 801A185C 0019E79C 38 21 00 70 */ addi r1, r1, 0x70
/* 801A1860 0019E7A0 4E 80 00 20 */ blr
.endfn bounceCallback__Q26PikiAI9ActAttackFPQ24Game4PikiPQ23Sys8Triangle
.global onKeyEvent__Q26PikiAI9ActAttackFRCQ28SysShape8KeyEvent
onKeyEvent__Q26PikiAI9ActAttackFRCQ28SysShape8KeyEvent:
.fn onKeyEvent__Q26PikiAI9ActAttackFRCQ28SysShape8KeyEvent, global
/* 801A1864 0019E7A4 80 04 00 1C */ lwz r0, 0x1c(r4)
/* 801A1868 0019E7A8 28 00 03 E8 */ cmplwi r0, 0x3e8
/* 801A186C 0019E7AC 4C 82 00 20 */ bnelr
@ -1488,9 +1487,9 @@ onKeyEvent__Q26PikiAI9ActAttackFRCQ28SysShape8KeyEvent:
/* 801A187C 0019E7BC 38 00 00 01 */ li r0, 1
/* 801A1880 0019E7C0 98 03 00 36 */ stb r0, 0x36(r3)
/* 801A1884 0019E7C4 4E 80 00 20 */ blr
.endfn onKeyEvent__Q26PikiAI9ActAttackFRCQ28SysShape8KeyEvent
.global satisfy__13FindConditionFP8CollPart
satisfy__13FindConditionFP8CollPart:
.fn satisfy__13FindConditionFP8CollPart, weak
/* 801A1888 0019E7C8 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 801A188C 0019E7CC 7C 08 02 A6 */ mflr r0
/* 801A1890 0019E7D0 90 01 00 14 */ stw r0, 0x14(r1)
@ -1514,28 +1513,29 @@ satisfy__13FindConditionFP8CollPart:
/* 801A18D4 0019E814 7C 08 03 A6 */ mtlr r0
/* 801A18D8 0019E818 38 21 00 10 */ addi r1, r1, 0x10
/* 801A18DC 0019E81C 4E 80 00 20 */ blr
.endfn satisfy__13FindConditionFP8CollPart
.global getName__Q26PikiAI20ApproachPosActionArgFv
getName__Q26PikiAI20ApproachPosActionArgFv:
.fn getName__Q26PikiAI20ApproachPosActionArgFv, weak
/* 801A18E0 0019E820 3C 60 80 48 */ lis r3, lbl_8047F304@ha
/* 801A18E4 0019E824 38 63 F3 04 */ addi r3, r3, lbl_8047F304@l
/* 801A18E8 0019E828 4E 80 00 20 */ blr
.endfn getName__Q26PikiAI20ApproachPosActionArgFv
.global getName__Q26PikiAI20StickAttackActionArgFv
getName__Q26PikiAI20StickAttackActionArgFv:
.fn getName__Q26PikiAI20StickAttackActionArgFv, weak
/* 801A18EC 0019E82C 3C 60 80 48 */ lis r3, lbl_8047F31C@ha
/* 801A18F0 0019E830 38 63 F3 1C */ addi r3, r3, lbl_8047F31C@l
/* 801A18F4 0019E834 4E 80 00 20 */ blr
.endfn getName__Q26PikiAI20StickAttackActionArgFv
.global getNextAIType__Q26PikiAI9ActAttackFv
getNextAIType__Q26PikiAI9ActAttackFv:
.fn getNextAIType__Q26PikiAI9ActAttackFv, weak
/* 801A18F8 0019E838 38 60 00 01 */ li r3, 1
/* 801A18FC 0019E83C 4E 80 00 20 */ blr
.endfn getNextAIType__Q26PikiAI9ActAttackFv
.global "@56@4@onKeyEvent__Q26PikiAI9ActAttackFRCQ28SysShape8KeyEvent"
"@56@4@onKeyEvent__Q26PikiAI9ActAttackFRCQ28SysShape8KeyEvent":
.fn @56@4@onKeyEvent__Q26PikiAI9ActAttackFRCQ28SysShape8KeyEvent, weak
/* 801A1900 0019E840 39 60 00 04 */ li r11, 4
/* 801A1904 0019E844 7D 63 58 2E */ lwzx r11, r3, r11
/* 801A1908 0019E848 7C 63 5A 14 */ add r3, r3, r11
/* 801A190C 0019E84C 38 63 FF C8 */ addi r3, r3, -56
/* 801A1910 0019E850 4B FF FF 54 */ b onKeyEvent__Q26PikiAI9ActAttackFRCQ28SysShape8KeyEvent
.endfn @56@4@onKeyEvent__Q26PikiAI9ActAttackFRCQ28SysShape8KeyEvent

View File

@ -124,8 +124,8 @@
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/creatureStick.cpp">creatureStick.cpp</a> | 29833 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_Ending.cpp">singleGS_Ending.cpp</a> | 31110 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiEnter.cpp">aiEnter.cpp</a> | 31721 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_DayEnd.cpp">singleGS_DayEnd.cpp</a> | 32347 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameDynamics.cpp">gameDynamics.cpp</a> | 34058 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiBore.cpp">aiBore.cpp</a> | 34883 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/baseGameSectionKantei.cpp">baseGameSectionKantei.cpp</a> | 35202 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiWeed.cpp">aiWeed.cpp</a> | 38056 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiAttack.cpp">aiAttack.cpp</a> | 38682 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/collinfo.cpp">collinfo.cpp</a> | 42272 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/baseGameSectionKantei.cpp">baseGameSectionKantei.cpp</a> | 35202 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiAttack.cpp">aiAttack.cpp</a> | 35427 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiWeed.cpp">aiWeed.cpp</a> | 38056 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/collinfo.cpp">collinfo.cpp</a> | 42272 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiFormation.cpp">aiFormation.cpp</a> | 43342 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameCPlate.cpp">gameCPlate.cpp</a> | 43761 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameGeneratorCache.cpp">gameGeneratorCache.cpp</a> | 46523 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gamePlayDataMemCard.cpp">gamePlayDataMemCard.cpp</a> | 48609 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameCaveInfo.cpp">gameCaveInfo.cpp</a> | 49577 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pelletCarcass.cpp">pelletCarcass.cpp</a> | 55314 |

View File

@ -203,6 +203,7 @@ struct ActAttack : public Action, virtual SysShape::MotionListener {
void initStickAttack();
void initAdjust();
void initJump();
void initJumpAdjust();
void calcAttackPos();
@ -211,7 +212,7 @@ struct ActAttack : public Action, virtual SysShape::MotionListener {
// _0C-_10 = MotionListener*
Game::Creature* mCreature; // _10
CollPart* mCollPart; // _14
s16 _18; // _18
u16 _18; // _18
ActStickAttack* mStickAttack; // _1C
ActApproachPos* mApproachPos; // _20
Sys::Sphere* mAttackSphere; // _24

View File

@ -1,4 +1,7 @@
#include "types.h"
#include "PikiAI.h"
#include "Game/Piki.h"
#include "Game/PikiState.h"
/*
Generated from dpostproc
@ -167,37 +170,6 @@ void PikiAI::ActAttack::getInfo(char* dest)
{
char* actions[] = { "SA", "AJ", "JA", "JP", "LT" };
sprintf(dest, "attack %s", actions[_18]);
/*
.loc_0x0:
stwu r1, -0x20(r1)
mflr r0
lis r5, 0x8048
stw r0, 0x24(r1)
lwzu r11, -0xD54(r5)
lhz r0, 0x18(r3)
lis r3, 0x8048
lwz r10, 0x4(r5)
subi r6, r3, 0xD40
lwz r9, 0x8(r5)
mr r3, r4
lwz r8, 0xC(r5)
rlwinm r0,r0,2,0,29
lwz r7, 0x10(r5)
addi r5, r1, 0x8
stw r11, 0x8(r1)
mr r4, r6
stw r10, 0xC(r1)
stw r9, 0x10(r1)
stw r8, 0x14(r1)
stw r7, 0x18(r1)
lwzx r5, r5, r0
crclr 6, 0x6
bl -0xD90F0
lwz r0, 0x24(r1)
mtlr r0
addi r1, r1, 0x20
blr
*/
}
/*
@ -207,6 +179,7 @@ void PikiAI::ActAttack::getInfo(char* dest)
*/
void PikiAI::ActAttack::emotion_success()
{
mParent->mFsm->transit(mParent, Game::PIKISTATE_Emotion, nullptr);
/*
stwu r1, -0x10(r1)
mflr r0
@ -233,69 +206,13 @@ void PikiAI::ActAttack::emotion_success()
* Address: 801A0580
* Size: 0000D4
*/
PikiAI::ActAttack::ActAttack(Game::Piki* p)
// vtable size issues?
PikiAI::ActAttack::ActAttack(Game::Piki* piki)
: Action(piki)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
extsh. r0, r4
stw r31, 0xc(r1)
mr r31, r3
stw r30, 8(r1)
mr r30, r5
beq lbl_801A05B8
addi r0, r31, 0x38
lis r3, __vt__Q28SysShape14MotionListener@ha
stw r0, 0xc(r31)
addi r0, r3, __vt__Q28SysShape14MotionListener@l
stw r0, 0x38(r31)
lbl_801A05B8:
mr r3, r31
mr r4, r30
bl __ct__Q26PikiAI6ActionFPQ24Game4Piki
lis r3, __vt__Q26PikiAI9ActAttack@ha
addi r0, r31, 0x38
addi r4, r3, __vt__Q26PikiAI9ActAttack@l
li r3, 0x2c
stw r4, 0(r31)
addi r5, r4, 0x40
lwz r4, 0xc(r31)
stw r5, 0(r4)
lwz r4, 0xc(r31)
subf r0, r4, r0
stw r0, 4(r4)
bl __nw__FUl
or. r0, r3, r3
beq lbl_801A060C
mr r5, r30
li r4, 1
bl __ct__Q26PikiAI14ActStickAttackFPQ24Game4Piki
mr r0, r3
lbl_801A060C:
stw r0, 0x1c(r31)
li r3, 0x28
bl __nw__FUl
or. r0, r3, r3
beq lbl_801A062C
mr r4, r30
bl __ct__Q26PikiAI14ActApproachPosFPQ24Game4Piki
mr r0, r3
lbl_801A062C:
stw r0, 0x20(r31)
addi r0, r2, lbl_8051908C@sda21
mr r3, r31
stw r0, 8(r31)
lwz r31, 0xc(r1)
lwz r30, 8(r1)
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
mStickAttack = new ActStickAttack(piki);
mApproachPos = new ActApproachPos(piki);
mName = "Attack";
}
/*
@ -303,7 +220,7 @@ lbl_801A062C:
* Address: 801A0654
* Size: 00011C
*/
void PikiAI::ActAttack::init(PikiAI::ActionArg*)
void PikiAI::ActAttack::init(ActionArg* initarg)
{
/*
stwu r1, -0x20(r1)
@ -740,7 +657,7 @@ lbl_801A0B7C:
* Address: 801A0B98
* Size: 00094C
*/
void PikiAI::ActAttack::exec()
int PikiAI::ActAttack::exec()
{
/*
stwu r1, -0x110(r1)
@ -1707,89 +1624,3 @@ void PikiAI::ActAttack::onKeyEvent(SysShape::KeyEvent const&)
blr
*/
}
/*
* --INFO--
* Address: 801A1888
* Size: 000058
*/
void FindCondition::satisfy(CollPart*)
{
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
stw r31, 0xc(r1)
li r31, 0
lwz r0, 0x10(r4)
cmplwi r0, 0
bne lbl_801A18C8
lis r5, 0x2A2A2A2A@ha
addi r3, r4, 0x30
addi r4, r5, 0x2A2A2A2A@l
li r5, 0x2a
bl match__4ID32FUlc
clrlwi. r0, r3, 0x18
beq lbl_801A18C8
li r31, 1
lbl_801A18C8:
lwz r0, 0x14(r1)
mr r3, r31
lwz r31, 0xc(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
* --INFO--
* Address: 801A18E0
* Size: 00000C
*/
void PikiAI::ApproachPosActionArg::getName()
{
/*
lis r3, lbl_8047F304@ha
addi r3, r3, lbl_8047F304@l
blr
*/
}
/*
* --INFO--
* Address: 801A18EC
* Size: 00000C
*/
void PikiAI::StickAttackActionArg::getName()
{
/*
lis r3, lbl_8047F31C@ha
addi r3, r3, lbl_8047F31C@l
blr
*/
}
/*
* --INFO--
* Address: 801A18F8
* Size: 000008
*/
u32 PikiAI::ActAttack::getNextAIType() { return 0x1; }
/*
* --INFO--
* Address: 801A1900
* Size: 000014
*/
void @56 @4 @PikiAI::ActAttack::onKeyEvent(SysShape::KeyEvent const&)
{
/*
li r11, 4
lwzx r11, r3, r11
add r3, r3, r11
addi r3, r3, -56
b onKeyEvent__Q26PikiAI9ActAttackFRCQ28SysShape8KeyEvent
*/
}