Skip to content

Commit

Permalink
ActPut::exec match
Browse files Browse the repository at this point in the history
  • Loading branch information
intns committed Dec 17, 2024
1 parent b3d8be1 commit 2585b58
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
2 changes: 2 additions & 0 deletions include/Creature.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ struct Creature : public RefCountable, public EventTalker {

inline CollPart* getStickPart() { return _188; }

inline Creature* get2AC() { return _2AC; }

// _00 = VTBL
// _00-_08 = RefCountable
// _08-_1C = EventTalker
Expand Down
1 change: 1 addition & 0 deletions include/PikiAI.h
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,7 @@ struct ActPick : public Action, public PaniAnimKeyListener {

// _00 = VTBL
// TODO: members
Creature* mObject; // _04
};

ActPick(Piki*);
Expand Down
24 changes: 13 additions & 11 deletions src/plugPikiKando/aiActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,21 @@
#include "Interactions.h"
#include "system.h"
#include "Dolphin/os.h"
#include "DebugLog.h"

/*
* --INFO--
* Address: ........
* Size: 00009C
*/
static void _Error(char* fmt, ...)
{
OSPanic(__FILE__, __LINE__, fmt, "aiActions");
// UNUSED FUNCTION
}
DEFINE_ERROR();

/*
* --INFO--
* Address: ........
* Size: 0000F4
*/
static void _Print(char*, ...)
{
// UNUSED FUNCTION
}
DEFINE_PRINT("aiActions");

/*
* --INFO--
Expand All @@ -41,7 +35,14 @@ ActPick::ActPick(Piki* piki)
* Address: 800A7A78
* Size: 000004
*/
void ActPick::Initialiser::initialise(Action*) { }
void ActPick::Initialiser::initialise(Action* action)
{
#ifdef __MWERKS__
ActPick* act = (ActPick*)action;
PRINT(" initialiser called ###################### \n");
act->mObject = mObject;
#endif
}

/*
* --INFO--
Expand Down Expand Up @@ -212,12 +213,13 @@ int ActPut::exec()
{
mActor->_A4.set(0.0f, 0.0f, 0.0f);

Creature* obj = mActor->_2AC;
Creature* obj = mActor->get2AC();
if (!obj) {
return ACTOUT_Fail;
}

if (obj->stimulate(InteractRelease(mActor, 1.0f))) {
PRINT("release ?\n");
return ACTOUT_Success;
}

Expand Down

0 comments on commit 2585b58

Please sign in to comment.