Skip to content

Commit 7b00e33

Browse files
committed
Fix impal
1 parent 0a76d20 commit 7b00e33

File tree

3 files changed

+21
-26
lines changed

3 files changed

+21
-26
lines changed

include/d/actor/d_a_npc_ash.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class daNpcAsh_HIO_c : public mDoHIO_entry_c {
3939
*/
4040
class daNpcAsh_c : public daNpcF_c {
4141
public:
42-
typedef bool (daNpcAsh_c::*ActionFn)(void*);
4342
typedef BOOL (daNpcAsh_c::*EventFn)(int);
4443

4544
enum Type {
@@ -107,7 +106,7 @@ class daNpcAsh_c : public daNpcF_c {
107106
/* 809596E0 */ bool setExpressionBtp(int);
108107
/* 809597C0 */ void setMotionAnm(int i_idx, f32 i_morf);
109108
/* 80959910 */ void reset();
110-
/* 80959B28 */ inline bool setAction(ActionFn);
109+
/* 80959B28 */ inline bool setAction(bool (daNpcAsh_c::*)(void*));
111110
/* 80959BD0 */ inline bool isSneaking();
112111
/* 80959C40 */ bool wait_type0(void*);
113112
/* 8095A67C */ void setMotion(int, f32, int);
@@ -154,7 +153,7 @@ class daNpcAsh_c : public daNpcF_c {
154153
/* 0xCB0 */ fopAc_ac_c* mTalkPartner;
155154
/* 0xCB4 */ NPC_ASH_HIO_CLASS* mpHIO;
156155
/* 0xCB8 */ dCcD_Cyl mCcCyl[2];
157-
/* 0xF30 */ ActionFn mpActionFn;
156+
/* 0xF30 */ bool (daNpcAsh_c::*mAction)(void*);
158157
/* 0xF3C */ request_of_phase_process_class mPhase[2];
159158
/* 0xF4C */ u32 mItemPartnerId;
160159
/* 0xF50 */ u32 field_0xf50; // unused

src/d/actor/d_a_npc_ash.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ void daNpcAsh_c::reset() {
594594

595595
field_0xf50 = 0;
596596
field_0xf54 = 0;
597-
mpActionFn = NULL;
597+
mAction = NULL;
598598
mLookMode = -1;
599599
mMode = 0;
600600
gravity = mpHIO->m.common.gravity;
@@ -623,23 +623,23 @@ void daNpcAsh_c::reset() {
623623
}
624624

625625
if (mType == TYPE_BAR) {
626-
setAction(&wait_type0);
626+
setAction(&daNpcAsh_c::wait_type0);
627627
} else {
628-
setAction(&wait_type1);
628+
setAction(&daNpcAsh_c::wait_type1);
629629
}
630630
}
631631

632632
/* 80959B28-80959BD0 001928 00A8+00 1/1 0/0 0/0 .text
633633
* setAction__10daNpcAsh_cFM10daNpcAsh_cFPCvPvPv_b */
634-
bool daNpcAsh_c::setAction(daNpcAsh_c::ActionFn i_actionFn) {
634+
bool daNpcAsh_c::setAction(bool (daNpcAsh_c::*i_action)(void*)) {
635635
mMode = 3;
636-
if (mpActionFn != NULL) {
637-
(this->*mpActionFn)(NULL);
636+
if (mAction != NULL) {
637+
(this->*mAction)(NULL);
638638
}
639639
mMode = 0;
640-
this->mpActionFn = i_actionFn;
641-
if (mpActionFn != NULL) {
642-
(this->*mpActionFn)(NULL);
640+
mAction = i_action;
641+
if (mAction != NULL) {
642+
(this->*mAction)(NULL);
643643
}
644644
return true;
645645
}
@@ -845,12 +845,12 @@ bool daNpcAsh_c::wait_type0(void* param_0) {
845845
mOrderEvtNo = 3;
846846
changeEvent(l_arcNames[0], l_evtNames[mOrderEvtNo], 1, -1);
847847
} else {
848-
setAction(&talk);
848+
setAction(&daNpcAsh_c::talk);
849849
}
850850
}
851851
} else {
852852
if (dComIfGp_getEventManager().getMyStaffId(l_myName, NULL, 0) != -1) {
853-
setAction(&demo);
853+
setAction(&daNpcAsh_c::demo);
854854
}
855855
}
856856
} else {
@@ -918,7 +918,7 @@ bool daNpcAsh_c::wait_type1(void* param_0) {
918918

919919
case 1:
920920
if (daNpcF_chkTmpBit(0x74)) {
921-
setAction(&leave);
921+
setAction(&daNpcAsh_c::leave);
922922
}
923923
break;
924924
}
@@ -955,7 +955,7 @@ bool daNpcAsh_c::talk(void* param_0) {
955955
if (field_0xf5f <= 2 || mCurAngle.y == fopAcM_searchPlayerAngleY(this)) {
956956
if (talkProc(NULL, 1, NULL)) {
957957
mActorMngr[0].entry(daPy_getPlayerActorClass());
958-
setAction(&wait_type0);
958+
setAction(&daNpcAsh_c::wait_type0);
959959
ret = true;
960960
} else {
961961
s32 prev_msg_timer = mMsgTimer;
@@ -1024,18 +1024,18 @@ bool daNpcAsh_c::demo(void* param_0) {
10241024
mOrderEvtNo = 0;
10251025
mEventIdx = -1;
10261026
if (mType == TYPE_BAR) {
1027-
setAction(&wait_type0);
1027+
setAction(&daNpcAsh_c::wait_type0);
10281028
} else {
1029-
setAction(&wait_type1);
1029+
setAction(&daNpcAsh_c::wait_type1);
10301030
}
10311031
}
10321032
} else {
10331033
mOrderEvtNo = 0;
10341034
mEventIdx = -1;
10351035
if (mType == TYPE_BAR) {
1036-
setAction(&wait_type0);
1036+
setAction(&daNpcAsh_c::wait_type0);
10371037
} else {
1038-
setAction(&wait_type1);
1038+
setAction(&daNpcAsh_c::wait_type1);
10391039
}
10401040
}
10411041
break;
@@ -1293,8 +1293,8 @@ void daNpcAsh_c::setParam() {
12931293

12941294
/* 8095BF6C-8095C200 003D6C 0294+00 1/0 0/0 0/0 .text main__10daNpcAsh_cFv */
12951295
BOOL daNpcAsh_c::main() {
1296-
if (mpActionFn != NULL) {
1297-
(this->*mpActionFn)(NULL);
1296+
if (mAction != NULL) {
1297+
(this->*mAction)(NULL);
12981298
}
12991299
if (dComIfGp_event_runCheck() != 0 && !eventInfo.checkCommandTalk() && mItemPartnerId != -1) {
13001300
dComIfGp_event_setItemPartnerId(mItemPartnerId);

src/d/actor/d_a_npc_impal.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ daNpcImpal_HIO_c::daNpcImpal_HIO_c() {
5050
m = daNpcImpal_Param_c::m;
5151
}
5252

53-
void daNpcImpal_HIO_c::listenPropertyEvent(const JORPropertyEvent* event) {
54-
// TODO
55-
}
56-
5753
void daNpcImpal_HIO_c::genMessage(JORMContext* ctext) {
5854
// TODO
5955
}

0 commit comments

Comments
 (0)