mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-04 04:30:40 -04:00
Process IDs cleanup
* Use fpcM_ERROR_PROCESS_ID_e enum instead of literal -1/0xFFFFFFFF everywhere * Disambiguate variable names by using itemNo/msgNo instead of itemID/msgID
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
#include "global.h"
|
||||
|
||||
class cBgW;
|
||||
@@ -21,7 +22,7 @@ public:
|
||||
mPolyIndex = -1;
|
||||
mBgIndex = 0x100;
|
||||
mpBgW = NULL;
|
||||
mActorId = -1;
|
||||
mActorId = fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
void SetPolyInfo(const cBgS_PolyInfo& other) {
|
||||
*this = other;
|
||||
|
||||
@@ -266,7 +266,7 @@ namespace daObjMovebox {
|
||||
/* 0x64E */ bool mbPrmXInitialized;
|
||||
/* 0x64F */ bool m64F;
|
||||
/* 0x650 */ EffSmokeCB mSmokeCbs[2];
|
||||
/* 0x6B8 */ u32 mChildProcId;
|
||||
/* 0x6B8 */ u32 mChildPID;
|
||||
/* 0x6BC */ int m6BC;
|
||||
|
||||
static const char* const M_arcname[13];
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
struct daObjTpost_c__letter_data {
|
||||
/* 0x00 */ bool field_0x00;
|
||||
/* 0x04 */ u32 mMsgId;
|
||||
/* 0x08 */ u8 mItemId;
|
||||
/* 0x04 */ u32 mMsgNo;
|
||||
/* 0x08 */ u8 mItemNo;
|
||||
/* 0x0A */ u16 mEventReg;
|
||||
};
|
||||
|
||||
|
||||
+2
-1
@@ -10,6 +10,7 @@
|
||||
#include "d/d_bg_s_chk.h"
|
||||
#include "d/d_bg_w.h"
|
||||
#include "global.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
|
||||
class cBgS_LinChk;
|
||||
class cBgS_GndChk;
|
||||
@@ -86,7 +87,7 @@ public:
|
||||
mpLine0 = i_line;
|
||||
pm_pos = i_pos;
|
||||
field_0x058 = param_2;
|
||||
SetActorPid(-1);
|
||||
SetActorPid(fpcM_ERROR_PROCESS_ID_e);
|
||||
field_0x3c = param_3->y;
|
||||
field_0x40 = param_3->z;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "SSystem/SComponent/c_bg_s_poly_info.h"
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include "d/d_bg_s_chk.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
|
||||
class dBgS_RoofChk : public cBgS_PolyInfo, public cBgS_Chk, public dBgS_Chk {
|
||||
public:
|
||||
@@ -13,7 +14,7 @@ public:
|
||||
m_pos.x = 0.0f;
|
||||
m_pos.y = 0.0f;
|
||||
m_pos.z = 0.0f;
|
||||
SetActorPid(-1);
|
||||
SetActorPid(fpcM_ERROR_PROCESS_ID_e);
|
||||
field_0x44 = NULL;
|
||||
}
|
||||
void Init();
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "SSystem/SComponent/c_cc_d.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
|
||||
enum dCcD_hitSe {};
|
||||
|
||||
@@ -138,7 +139,7 @@ public:
|
||||
public:
|
||||
dCcD_GAtTgCoCommonBase() { ct(); }
|
||||
void ClrActorInfo() {
|
||||
mApid = -1;
|
||||
mApid = fpcM_ERROR_PROCESS_ID_e;
|
||||
mAc = NULL;
|
||||
}
|
||||
void ct();
|
||||
|
||||
+4
-4
@@ -225,7 +225,7 @@ enum dNpc_MessageStatus_e {
|
||||
class fopNpc_npc_c : public fopAc_ac_c {
|
||||
public:
|
||||
fopNpc_npc_c() {
|
||||
mCurrMsgBsPcId = -1;
|
||||
mCurrMsgBsPcId = fpcM_ERROR_PROCESS_ID_e;
|
||||
mpCurrMsg = 0;
|
||||
}
|
||||
/* 0x290 */ dNpc_JntCtrl_c mJntCtrl;
|
||||
@@ -235,9 +235,9 @@ public:
|
||||
/* 0x4F8 */ dBgS_AcchCir mAcchCir;
|
||||
/* 0x538 */ dCcD_Stts mStts;
|
||||
/* 0x574 */ dCcD_Cyl mCyl;
|
||||
/* 0x6A4 */ u32 mCurrMsgID;
|
||||
/* 0x6A8 */ u32 mEndMsgID;
|
||||
/* 0x6AC */ s32 mCurrMsgBsPcId;
|
||||
/* 0x6A4 */ u32 mCurrMsgNo;
|
||||
/* 0x6A8 */ u32 mEndMsgNo;
|
||||
/* 0x6AC */ u32 mCurrMsgBsPcId;
|
||||
/* 0x6B0 */ msg_class* mpCurrMsg;
|
||||
/* 0x6B4 */ u8 pad_0x6B4[0x6C0 - 0x6B4];
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ void fopMsgM_setMessageID(unsigned int);
|
||||
void fopMsgM_destroyExpHeap(JKRExpHeap*);
|
||||
f32 fopMsgM_valueIncrease(int param_0, int param_1, u8 param_2);
|
||||
s32 fopMsgM_setStageLayer(void*);
|
||||
int fopMsgM_messageSet(u32 i_msgIdx, fopAc_ac_c* i_actorP);
|
||||
int fopMsgM_messageSet(u32 i_msgNo, fopAc_ac_c* i_actorP);
|
||||
int fopMsgM_messageSet(u32 param_0, cXyz*);
|
||||
int fopMsgM_messageSet(u32 param_0);
|
||||
int fopMsgM_messageSetDemo(u32 param_0);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
#include "SSystem/SComponent/c_bg_s_chk.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
|
||||
/* 80247304-8024734C .text __dt__8cBgS_ChkFv */
|
||||
cBgS_Chk::~cBgS_Chk() {
|
||||
@@ -12,7 +12,7 @@ cBgS_Chk::~cBgS_Chk() {
|
||||
|
||||
/* 8024734C-8024738C .text ChkSameActorPid__8cBgS_ChkCFUi */
|
||||
bool cBgS_Chk::ChkSameActorPid(unsigned int pid) const {
|
||||
if (mActorPid == -1 || pid == UINT32_MAX || unk_0x0C == 0) {
|
||||
if (mActorPid == fpcM_ERROR_PROCESS_ID_e || pid == UINT32_MAX || unk_0x0C == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return (mActorPid == pid) ? 1 : 0;
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
//
|
||||
|
||||
#include "SSystem/SComponent/c_bg_s_gnd_chk.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
|
||||
/* 8024738C-80247418 .text __ct__11cBgS_GndChkFv */
|
||||
cBgS_GndChk::cBgS_GndChk() {
|
||||
m_pos = cXyz::Zero;
|
||||
SetActorPid(0xFFFFFFFF);
|
||||
SetActorPid(fpcM_ERROR_PROCESS_ID_e);
|
||||
mFlag = 3;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
#include "SSystem/SComponent/c_bg_s_lin_chk.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
|
||||
/* 80247418-80247480 .text ct__11cBgS_LinChkFv */
|
||||
void cBgS_LinChk::ct() {
|
||||
@@ -12,7 +12,7 @@ void cBgS_LinChk::ct() {
|
||||
mLin.mStart = zero;
|
||||
mLin.mEnd = zero;
|
||||
field_0x40 = zero;
|
||||
SetActorPid(-1);
|
||||
SetActorPid(fpcM_ERROR_PROCESS_ID_e);
|
||||
mFlag = 0;
|
||||
mFrontFlag = 1;
|
||||
mBackFlag = 0;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "SSystem/SComponent/c_cc_d.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
#define CHECK_FLOAT_CLASS(line, x) JUT_ASSERT(line, !(((sizeof(x) == sizeof(float)) ? __fpclassifyf((float)(x)) : __fpclassifyd((double)(x)) ) == 1));
|
||||
@@ -77,7 +78,7 @@ void cCcD_Stts::Ct() {
|
||||
m_cc_move.y = 0.0f;
|
||||
m_cc_move.z = 0.0f;
|
||||
mActor = NULL;
|
||||
mApid = -1;
|
||||
mApid = fpcM_ERROR_PROCESS_ID_e;
|
||||
mWeight = 0;
|
||||
field_0x15 = 0;
|
||||
mDmg = 0;
|
||||
|
||||
@@ -66,14 +66,14 @@ static daAgb_HIO_c l_HIO;
|
||||
/* 800CF700-800CF71C .text init__10dMsgCtrl_cFUs */
|
||||
int dMsgCtrl_c::init(u16 param_0) {
|
||||
field_0x0 = param_0;
|
||||
mMsgID = -1;
|
||||
mMsgID = fpcM_ERROR_PROCESS_ID_e;
|
||||
mpMsg = NULL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 800CF71C-800CF7B4 .text execute__10dMsgCtrl_cFv */
|
||||
int dMsgCtrl_c::execute() {
|
||||
if (mMsgID == -1) {
|
||||
if (mMsgID == fpcM_ERROR_PROCESS_ID_e) {
|
||||
mMsgID = fopMsgM_messageSet(field_0x0);
|
||||
} else if (mpMsg == NULL) {
|
||||
mpMsg = fopMsgM_SearchByID(mMsgID);
|
||||
@@ -1127,7 +1127,7 @@ int daAgb_Create(fopAc_ac_c* i_this) {
|
||||
a_this->mCrrPos.mpLine0 = &a_this->current.pos;
|
||||
a_this->mCrrPos.pm_pos = &a_this->next.pos;
|
||||
a_this->mCrrPos.field_0x058 = NULL;
|
||||
a_this->mCrrPos.SetActorPid(-1);
|
||||
a_this->mCrrPos.SetActorPid(fpcM_ERROR_PROCESS_ID_e);
|
||||
a_this->mCrrPos.field_0x3c = 171.0f;
|
||||
a_this->mCrrPos.field_0x40 = 50.0f;
|
||||
|
||||
|
||||
@@ -1100,16 +1100,16 @@ BOOL daAgbsw0_c::ExeSubR() {
|
||||
|
||||
if(g_mDoGaC_gbaCom.mDoGaC_GbaLink() && g_mDoGaC_gbaCom.mDoGaC_SendStatusCheck(5)) {
|
||||
if(sw != 0xFF && fopAcM_isSwitch(this, sw)) {
|
||||
s32 itemID = getParamNo();
|
||||
if(itemID < 0 || 0x1E < itemID) {
|
||||
itemID = 0;
|
||||
s32 itemNo = getParamNo();
|
||||
if(itemNo < 0 || 0x1E < itemNo) {
|
||||
itemNo = 0;
|
||||
}
|
||||
|
||||
if(itemID != 0x16) {
|
||||
if(itemNo != RECOVER_FAIRY) {
|
||||
current.pos.y += mScale.y / 2.0f;
|
||||
}
|
||||
|
||||
fopAcM_fastCreateItem(¤t.pos, itemID, fopAcM_GetHomeRoomNo(this), 0, 0, 0.0f, cM_rndF(10.0f) + 40.0f, -7.0f, -1, 0);
|
||||
fopAcM_fastCreateItem(¤t.pos, itemNo, fopAcM_GetHomeRoomNo(this), 0, 0, 0.0f, cM_rndF(10.0f) + 40.0f, -7.0f, -1, 0);
|
||||
fopAcM_seStart(this, JA_SE_CV_CHI_MEGAHORN, 0);
|
||||
MailSend(-1, 0, 0xFF, 0xFF, 0);
|
||||
|
||||
@@ -1370,14 +1370,14 @@ BOOL daAgbsw0_c::ExeSubD() {
|
||||
}
|
||||
}
|
||||
else if(field_0x299 == 2 && fopAcM_isSwitch(this, getSw1())) {
|
||||
s32 itemID = getParamNo();
|
||||
if(itemID != 0x16) {
|
||||
s32 itemNo = getParamNo();
|
||||
if(itemNo != RECOVER_FAIRY) {
|
||||
current.pos.y += mScale.y / 2;
|
||||
}
|
||||
if(0 <= itemID && itemID < 0x1F && itemID != 0x7 && itemID != 0x8 && itemID != 0x15) {
|
||||
if(0 <= itemNo && itemNo < 0x1F && itemNo != KAKERA_HEART && itemNo != UTUWA_HEART && itemNo != SMALL_KEY) {
|
||||
s8 roomNo = fopAcM_GetHomeRoomNo(this);
|
||||
f32 rnd = cM_rndF(10.0f) + 40.0f;
|
||||
fopAcM_fastCreateItem(¤t.pos, itemID, roomNo, 0, 0, 0.0f, rnd, -7.0f, -1, 0);
|
||||
fopAcM_fastCreateItem(¤t.pos, itemNo, roomNo, 0, 0, 0.0f, rnd, -7.0f, -1, 0);
|
||||
MailSend(-1, 0, 0xFF, 0xFF, 0x11);
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
/* 0x02DC */ s16 mSpawnRotY;
|
||||
/* 0x02DE */ u8 m02DE[0x02E0 - 0x02DE];
|
||||
/* 0x02E0 */ int mCurrBckIdx;
|
||||
/* 0x02E4 */ u32 mSwallowedActorProcID;
|
||||
/* 0x02E4 */ u32 mSwallowedActorPID;
|
||||
/* 0x02E8 */ f32 mAreaRadius;
|
||||
/* 0x02EC */ f32 m02EC;
|
||||
/* 0x02F0 */ f32 mSpawnPosY;
|
||||
@@ -376,10 +376,10 @@ static BOOL medama_atari_check(am_class* i_this) {
|
||||
|
||||
/* 00000D14-00000F04 .text bomb_move_set__FP8am_classUc */
|
||||
static void bomb_move_set(am_class* i_this, u8 alwaysMoveY) {
|
||||
if (i_this->mSwallowedActorProcID == -1) {
|
||||
if (i_this->mSwallowedActorPID == fpcM_ERROR_PROCESS_ID_e) {
|
||||
return;
|
||||
}
|
||||
fopAc_ac_c* swallowedActor = fopAcM_SearchByID(i_this->mSwallowedActorProcID);
|
||||
fopAc_ac_c* swallowedActor = fopAcM_SearchByID(i_this->mSwallowedActorPID);
|
||||
if (!swallowedActor) {
|
||||
return;
|
||||
}
|
||||
@@ -462,7 +462,7 @@ static BOOL bomb_nomi_check(am_class* i_this) {
|
||||
// Swallow the bomb.
|
||||
bomb->setBombCheck_Flag();
|
||||
bomb->change_state((daBomb_c::State_e)2);
|
||||
i_this->mSwallowedActorProcID = fopAcM_GetID(bomb);
|
||||
i_this->mSwallowedActorPID = fopAcM_GetID(bomb);
|
||||
bomb->setBombNoHit();
|
||||
bomb_move_set(i_this, 0);
|
||||
i_this->mAction = ACTION_ITAI_MOVE;
|
||||
@@ -477,7 +477,7 @@ static BOOL bomb_nomi_check(am_class* i_this) {
|
||||
if (i_this->mMouthPos.y - offsetY < bomb2->current.pos.y) {
|
||||
// Swallow the bomb.
|
||||
bomb2->set_eat();
|
||||
i_this->mSwallowedActorProcID = fopAcM_GetID(bomb2);
|
||||
i_this->mSwallowedActorPID = fopAcM_GetID(bomb2);
|
||||
bomb2->set_no_hit();
|
||||
bomb_move_set(i_this, 0);
|
||||
i_this->mAction = ACTION_ITAI_MOVE;
|
||||
@@ -1003,8 +1003,8 @@ static void action_itai_move(am_class* i_this) {
|
||||
}
|
||||
cXyz centerPos = i_this->current.pos;
|
||||
centerPos.y += 150.0f;
|
||||
if (i_this->mSwallowedActorProcID != -1) {
|
||||
fopAc_ac_c* swallowedActor = fopAcM_SearchByID(i_this->mSwallowedActorProcID);
|
||||
if (i_this->mSwallowedActorPID != fpcM_ERROR_PROCESS_ID_e) {
|
||||
fopAc_ac_c* swallowedActor = fopAcM_SearchByID(i_this->mSwallowedActorPID);
|
||||
if (swallowedActor) {
|
||||
swallowedActor->mScale.setall(1.0f);
|
||||
if (fpcM_GetName(swallowedActor) == PROC_BOMB) {
|
||||
@@ -1263,7 +1263,7 @@ static s32 daAM_Create(fopAc_ac_c* i_actor) {
|
||||
i_this->mAreaRadius = i_this->mPrmAreaRadius * 100.0f;
|
||||
}
|
||||
i_this->mSpawnPosY = i_this->current.pos.y;
|
||||
i_this->mSwallowedActorProcID = -1;
|
||||
i_this->mSwallowedActorPID = fpcM_ERROR_PROCESS_ID_e;
|
||||
|
||||
if (i_this->mStartsInactive == 0 && i_this->mSwitch != 0xFF && dComIfGs_isSwitch(i_this->mSwitch, dComIfGp_roomControl_getStayNo())) {
|
||||
// When mStartsInactive is 0, the Armos Knight starts active and attacking the player.
|
||||
|
||||
@@ -124,7 +124,7 @@ void daArrow_c::_atHit(dCcD_GObjInf* thisObjInf, fopAc_ac_c* hitActor, dCcD_GObj
|
||||
f32 hitDist = (hitPos - current.pos).abs();
|
||||
if (hitDist < mNearestHitDist) {
|
||||
mNearestHitDist = hitDist;
|
||||
mHitActorProcID = fpcM_GetID(hitActor);
|
||||
mHitActorProcID = fopAcM_GetID(hitActor);
|
||||
if (hitObjInf->ChkTgShield()) {
|
||||
mbHitActor = false;
|
||||
field_0x6ec = NULL;
|
||||
@@ -155,7 +155,7 @@ void daArrow_c::setLightEffect() {
|
||||
}
|
||||
if (!field_0x688) {
|
||||
field_0x684 = fopAcM_createChild(
|
||||
PROC_ARROW_LIGHTEFF, fpcM_GetID(this),
|
||||
PROC_ARROW_LIGHTEFF, fopAcM_GetID(this),
|
||||
mArrowType, &field_0x6a8,
|
||||
current.roomNo, &shape_angle, NULL, -1, NULL
|
||||
);
|
||||
@@ -402,7 +402,7 @@ bool daArrow_c::check_water_in() {
|
||||
} else if (mArrowType == TYPE_ICE) {
|
||||
mInWaterTimer = 10*30;
|
||||
fopAcM_createChild(
|
||||
PROC_ARROW_ICEEFF, fpcM_GetID(this), mArrowType,
|
||||
PROC_ARROW_ICEEFF, fopAcM_GetID(this), mArrowType,
|
||||
&waterHitPos, current.roomNo, ¤t.angle, NULL, -1, NULL
|
||||
);
|
||||
if (field_0x6e4 == 0) {
|
||||
@@ -805,7 +805,7 @@ BOOL daArrow_c::procMove() {
|
||||
dComIfGp_particle_setP1(0x29E, &field_0x6a8, &temp10);
|
||||
|
||||
fopAcM_createChild(
|
||||
PROC_ARROW_ICEEFF, fpcM_GetID(this),
|
||||
PROC_ARROW_ICEEFF, fopAcM_GetID(this),
|
||||
mArrowType, &field_0x6a8,
|
||||
current.roomNo, &field_0x6e6, NULL, -1, NULL
|
||||
);
|
||||
|
||||
@@ -144,12 +144,12 @@ namespace daObjMknjD {
|
||||
|
||||
/* 0x04E4 */ s8 mActionIdx;
|
||||
/* 0x04E5 */ u8 mTactMode;
|
||||
/* 0x04E6 */ u8 mGiveItemId;
|
||||
/* 0x04E6 */ u8 mGiveItemNo;
|
||||
|
||||
/* 0x04E8 */ cXyz mGoalPos;
|
||||
|
||||
/* 0x04F4 */ u32 mMsgId;
|
||||
/* 0x04F8 */ u32 mMsgInstId;
|
||||
/* 0x04F4 */ u32 mMsgNo;
|
||||
/* 0x04F8 */ u32 mMsgPID;
|
||||
/* 0x04FC */ msg_class* mMsgPtr;
|
||||
|
||||
/* 0x0500 */ s32 m0500;
|
||||
@@ -354,7 +354,7 @@ int daObjMknjD::Act_c::Create() {
|
||||
mLessonEventIdx = dComIfGp_evmng_getEventIdx(daObjMknjD_EventName[7], 0xFF);
|
||||
|
||||
mTactMode = 4;
|
||||
mGiveItemId = TACT_SONG5;
|
||||
mGiveItemNo = TACT_SONG5;
|
||||
mEvtInfo.setEventName("MKNJD_K_TALK");
|
||||
m0430 = 0x2910;
|
||||
}
|
||||
@@ -365,7 +365,7 @@ int daObjMknjD::Act_c::Create() {
|
||||
mLessonEventIdx = dComIfGp_evmng_getEventIdx(daObjMknjD_EventName[6], 0xFF);
|
||||
|
||||
mTactMode = 3;
|
||||
mGiveItemId = TACT_SONG4;
|
||||
mGiveItemNo = TACT_SONG4;
|
||||
mEvtInfo.setEventName("MKNJD_D_TALK");
|
||||
m0430 = 0x2920;
|
||||
}
|
||||
@@ -374,7 +374,7 @@ int daObjMknjD::Act_c::Create() {
|
||||
mAttentionInfo.mDistances[3] = 0x3D;
|
||||
mAttentionInfo.mFlags |= fopAc_Attn_ACTION_TALK_e | fopAc_Attn_TALKFLAG_CHECK_e;
|
||||
|
||||
if (checkItemGet(mGiveItemId, 1) == 0) {
|
||||
if (checkItemGet(mGiveItemNo, 1) == 0) {
|
||||
m043F = 8;
|
||||
mEvtInfo.mpCheckCB = daObjMknjD_XyCheckCB;
|
||||
mEvtInfo.mpEventCB = daObjMknjD_XyEventCB;
|
||||
@@ -384,7 +384,7 @@ int daObjMknjD::Act_c::Create() {
|
||||
}
|
||||
|
||||
mMsgPtr = NULL;
|
||||
mMsgInstId = 0xFFFFFFFF;
|
||||
mMsgPID = fpcM_ERROR_PROCESS_ID_e;
|
||||
m0504 = false;
|
||||
|
||||
return 1;
|
||||
@@ -488,7 +488,7 @@ void daObjMknjD::Act_c::setPlayerAngle(int i_staffIdx) {
|
||||
u16 daObjMknjD::Act_c::talk(int i_param1) {
|
||||
u16 msgMode = 0xFF;
|
||||
|
||||
if (mMsgInstId == 0xFFFFFFFF) {
|
||||
if (mMsgPID == fpcM_ERROR_PROCESS_ID_e) {
|
||||
if (i_param1 == 1) {
|
||||
u32 msgId;
|
||||
|
||||
@@ -500,10 +500,10 @@ u16 daObjMknjD::Act_c::talk(int i_param1) {
|
||||
msgId = 0x1901;
|
||||
}
|
||||
|
||||
mMsgId = msgId;
|
||||
mMsgNo = msgId;
|
||||
}
|
||||
|
||||
mMsgInstId = fopMsgM_messageSet(mMsgId, this);
|
||||
mMsgPID = fopMsgM_messageSet(mMsgNo, this);
|
||||
mMsgPtr = NULL;
|
||||
}
|
||||
else {
|
||||
@@ -520,11 +520,11 @@ u16 daObjMknjD::Act_c::talk(int i_param1) {
|
||||
}
|
||||
else if (msgMode == 0x12) {
|
||||
mMsgPtr->mMode = 0x13;
|
||||
mMsgInstId = 0xFFFFFFFF;
|
||||
mMsgPID = fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
}
|
||||
else {
|
||||
mMsgPtr = fopMsgM_SearchByID(mMsgInstId);
|
||||
mMsgPtr = fopMsgM_SearchByID(mMsgPID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -589,7 +589,7 @@ void daObjMknjD::Act_c::privateCut() {
|
||||
case ACT_LESSON:
|
||||
m0504 = false;
|
||||
m0500 = 0;
|
||||
mMsgInstId = 0xFFFFFFFF;
|
||||
mMsgPID = fpcM_ERROR_PROCESS_ID_e;
|
||||
break;
|
||||
case ACT_TACT:
|
||||
break;
|
||||
@@ -964,7 +964,7 @@ int daObjMknjD::Act_c::Execute(Mtx** i_mtx) {
|
||||
privateCut();
|
||||
|
||||
if (g_dComIfG_gameInfo.play.mEvtCtrl.mMode == 0) {
|
||||
if (checkItemGet(mGiveItemId, 1) != 0) {
|
||||
if (checkItemGet(mGiveItemNo, 1) != 0) {
|
||||
m043F = 0;
|
||||
}
|
||||
else {
|
||||
@@ -982,7 +982,7 @@ int daObjMknjD::Act_c::Execute(Mtx** i_mtx) {
|
||||
player->offPlayerNoDraw();
|
||||
g_dComIfG_gameInfo.play.mEvtCtrl.mEventFlag |= 8;
|
||||
|
||||
if (checkItemGet(mGiveItemId, 1) != 0) {
|
||||
if (checkItemGet(mGiveItemNo, 1) != 0) {
|
||||
m043F = 0;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1153,11 +1153,11 @@ namespace daObjMovebox {
|
||||
}
|
||||
MTXCopy(mDoMtx_stack_c::get(), mMtx);
|
||||
|
||||
if (mChildProcId == -1) {
|
||||
if (mChildPID == fpcM_ERROR_PROCESS_ID_e) {
|
||||
return;
|
||||
}
|
||||
fopAc_ac_c* childActor;
|
||||
if (fopAcM_SearchByID(mChildProcId, &childActor)) {
|
||||
if (fopAcM_SearchByID(mChildPID, &childActor)) {
|
||||
if (!childActor) {
|
||||
return;
|
||||
}
|
||||
@@ -1188,7 +1188,7 @@ namespace daObjMovebox {
|
||||
buoyflag->setup(mDoMtx_stack_c::get());
|
||||
}
|
||||
} else {
|
||||
mChildProcId = -1;
|
||||
mChildPID = fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1423,28 +1423,28 @@ namespace daObjMovebox {
|
||||
m64F = true;
|
||||
mReverb = dComIfGp_getReverb(fopAcM_GetHomeRoomNo(this));
|
||||
|
||||
mChildProcId = -1;
|
||||
mChildPID = fpcM_ERROR_PROCESS_ID_e;
|
||||
if (prm_get_buoy() == 0) {
|
||||
cXyz buoyPos(current.pos.x, current.pos.y + i_attr()->m68 - 5.0f, current.pos.z);
|
||||
mChildProcId = daObjBuoyflag::Act_c::make_norm(fpcM_GetID(this), &buoyPos, fopAcM_GetRoomNo(this), &shape_angle);
|
||||
mChildPID = daObjBuoyflag::Act_c::make_norm(fopAcM_GetID(this), &buoyPos, fopAcM_GetRoomNo(this), &shape_angle);
|
||||
} else if (mType == TYPE_METAL_BOX_WITH_SPRING) {
|
||||
u32 jumpParams = daObjJump::Act_c::prm_make_b();
|
||||
mChildProcId = fopAcM_createChild(
|
||||
PROC_Obj_Jump, fpcM_GetID(this),
|
||||
mChildPID = fopAcM_createChild(
|
||||
PROC_Obj_Jump, fopAcM_GetID(this),
|
||||
jumpParams, ¤t.pos,
|
||||
fopAcM_GetRoomNo(this), &shape_angle, NULL, -1, NULL
|
||||
);
|
||||
} else if (mType == TYPE_MIRROR) {
|
||||
mChildProcId = fopAcM_createChild(
|
||||
PROC_Obj_Mmrr, fpcM_GetID(this),
|
||||
mChildPID = fopAcM_createChild(
|
||||
PROC_Obj_Mmrr, fopAcM_GetID(this),
|
||||
0, ¤t.pos,
|
||||
fopAcM_GetRoomNo(this), &shape_angle, NULL, -1, NULL
|
||||
);
|
||||
} else if (mType == TYPE_BLACK_BOX_WITH_MKIE) {
|
||||
cXyz mkiePos(current.pos.x, current.pos.y + 150.0f, current.pos.z);
|
||||
u32 mkieParams = daObjMkie::Act_c::prm_make(prmX_get_evId(), prmZ_get_swSave2_MkieB());
|
||||
mChildProcId = fopAcM_createChild(
|
||||
PROC_Obj_Mkie, fpcM_GetID(this),
|
||||
mChildPID = fopAcM_createChild(
|
||||
PROC_Obj_Mkie, fopAcM_GetID(this),
|
||||
mkieParams, &mkiePos,
|
||||
fopAcM_GetRoomNo(this), &shape_angle, NULL, -1, NULL
|
||||
);
|
||||
@@ -1514,7 +1514,7 @@ namespace daObjMovebox {
|
||||
int r30 = -1;
|
||||
bool r29 = true;
|
||||
|
||||
if (m64A && cLib_checkBit(mBgc.mStateFlags, Bgc_c::BgcState_UNK01) && (mType != TYPE_BLACK_BOX_WITH_MKIE || mChildProcId == -1)) {
|
||||
if (m64A && cLib_checkBit(mBgc.mStateFlags, Bgc_c::BgcState_UNK01) && (mType != TYPE_BLACK_BOX_WITH_MKIE || mChildPID == -1)) {
|
||||
BOOL temp = cLib_checkBit(mPPLabel, dBgW::PP_UNK2_e);
|
||||
BOOL r3 = cLib_checkBit(mPPLabel, dBgW::PP_UNK4_e);
|
||||
s16 r0;
|
||||
|
||||
@@ -131,15 +131,13 @@ namespace daObjPaper {
|
||||
/* 0x408 */ bool mbHasCc;
|
||||
|
||||
/* 0x40C */ int mMode;
|
||||
/* 0x410 */ int mMsgId;
|
||||
/* 0x410 */ u32 mMsgId;
|
||||
/* 0x414 */ msg_class* mpMsg;
|
||||
/* 0x418 */ Type_e mType;
|
||||
|
||||
int getMsgId() const { return mMsgId; }
|
||||
|
||||
enum Prm_e {
|
||||
PRM_MSG_ID_W = 0x10,
|
||||
PRM_MSG_ID_S = 0x00,
|
||||
PRM_MSG_NO_W = 0x10,
|
||||
PRM_MSG_NO_S = 0x00,
|
||||
|
||||
PRM_TYPE_W = 0x04,
|
||||
PRM_TYPE_S = 0x10,
|
||||
@@ -186,7 +184,7 @@ namespace daObjPaper {
|
||||
mAttentionInfo.mDistances[3] = attr(mType).mAttentionDist2;
|
||||
mAttentionInfo.mFlags |= fopAc_Attn_LOCKON_TALK_e | fopAc_Attn_ACTION_TALK_e | fopAc_Attn_TALKFLAG_READ_e;
|
||||
|
||||
mMsgId = -1;
|
||||
mMsgId = fpcM_ERROR_PROCESS_ID_e;
|
||||
|
||||
if (mType == 2) {
|
||||
mStatus = mStatus & 0xFFFFFFC0 | 0x38;
|
||||
@@ -244,17 +242,16 @@ namespace daObjPaper {
|
||||
/* 00000784-000007A4 .text mode_talk0_init__Q210daObjPaper5Act_cFv */
|
||||
void daObjPaper::Act_c::mode_talk0_init() {
|
||||
mStatus &= ~fopAcStts_NOCULLEXEC_e;
|
||||
mMsgId = -1;
|
||||
mMsgId = fpcM_ERROR_PROCESS_ID_e;
|
||||
mMode = ActMode_TALKBEGIN_e;
|
||||
}
|
||||
|
||||
/* 000007A4-00000820 .text mode_talk0__Q210daObjPaper5Act_cFv */
|
||||
void daObjPaper::Act_c::mode_talk0() {
|
||||
if (getMsgId() == 0xFFFFFFFF && dComIfGp_checkCameraAttentionStatus(dComIfGp_getPlayerCameraID(0), 4)) {
|
||||
int msgId = daObj::PrmAbstract<Prm_e>(this, PRM_MSG_ID_W, PRM_MSG_ID_S);
|
||||
msgId = fopMsgM_messageSet(msgId, &mEyePos);
|
||||
if (mMsgId == fpcM_ERROR_PROCESS_ID_e && dComIfGp_checkCameraAttentionStatus(dComIfGp_getPlayerCameraID(0), 4)) {
|
||||
int msgNo = daObj::PrmAbstract<Prm_e>(this, PRM_MSG_NO_W, PRM_MSG_NO_S);
|
||||
mMsgId = fopMsgM_messageSet(msgNo, &mEyePos);
|
||||
|
||||
mMsgId = msgId;
|
||||
mode_talk1_init();
|
||||
}
|
||||
}
|
||||
@@ -282,7 +279,7 @@ namespace daObjPaper {
|
||||
if (mpMsg->mMode == dNpcMsgStts_BOX_CLOSED_e) {
|
||||
mpMsg->mMode = dNpcMsgStts_MSG_DESTROYED_e;
|
||||
mpMsg = 0;
|
||||
mMsgId = -1;
|
||||
mMsgId = fpcM_ERROR_PROCESS_ID_e;
|
||||
|
||||
g_dComIfG_gameInfo.play.mEvtCtrl.mEventFlag |= 8;
|
||||
mode_wait_init();
|
||||
|
||||
@@ -182,9 +182,9 @@ void daObjTpost_c::cutPresentStart(int staffIdx) {
|
||||
}
|
||||
|
||||
void daObjTpost_c::cutPresentProc(int staffIdx) {
|
||||
u32 item = fopAcM_createItemForPresentDemo(¤t.pos, m_letter[mNumReadable].mItemId, 0, -1, -1, 0, 0);
|
||||
if(item != 0xFFFFFFFF) {
|
||||
dComIfGp_event_setItemPartnerId(item);
|
||||
u32 itemPID = fopAcM_createItemForPresentDemo(¤t.pos, m_letter[mNumReadable].mItemNo, 0, -1, -1, 0, 0);
|
||||
if(itemPID != fpcM_ERROR_PROCESS_ID_e) {
|
||||
dComIfGp_event_setItemPartnerId(itemPID);
|
||||
dComIfGp_evmng_cutEnd(staffIdx);
|
||||
}
|
||||
else {
|
||||
@@ -214,7 +214,7 @@ void daObjTpost_c::cutSetAnmProc(int staffIdx) {
|
||||
}
|
||||
|
||||
void daObjTpost_c::cutDispLetterStart(int staffIdx) {
|
||||
mCurrMsgID = m_letter[mNumReadable].mMsgId;
|
||||
mCurrMsgNo = m_letter[mNumReadable].mMsgNo;
|
||||
}
|
||||
|
||||
void daObjTpost_c::cutDispLetterProc(int staffIdx) {
|
||||
@@ -507,7 +507,7 @@ u16 daObjTpost_c::next_msgStatus(u32* msgId) {
|
||||
break;
|
||||
}
|
||||
|
||||
if(mCurrMsgID == m_letter[mNumReadable].mMsgId && status == dNpcMsgStts_MSG_ENDS_e) {
|
||||
if(mCurrMsgNo == m_letter[mNumReadable].mMsgNo && status == dNpcMsgStts_MSG_ENDS_e) {
|
||||
status = dNpcMsgStts_MSG_DISPLAYED_e;
|
||||
}
|
||||
|
||||
@@ -717,7 +717,7 @@ void daObjTpost_c::modeTalkXY() {
|
||||
field_0x8E4 = -1;
|
||||
}
|
||||
|
||||
switch(mCurrMsgID) {
|
||||
switch(mCurrMsgNo) {
|
||||
case 0xCE9:
|
||||
case 0xCEA:
|
||||
case 0xCF0:
|
||||
@@ -907,7 +907,7 @@ void daObjTpost_c::createInit() {
|
||||
}
|
||||
|
||||
field_0x8F0 = 1;
|
||||
mCurrMsgBsPcId = -1;
|
||||
mCurrMsgBsPcId = fpcM_ERROR_PROCESS_ID_e;
|
||||
mpCurrMsg = 0;
|
||||
|
||||
mAttentionInfo.mDistances[1] = 5;
|
||||
|
||||
@@ -2716,10 +2716,10 @@ void daPy_lk_c::setAtnList() {
|
||||
|
||||
/* 8010841C-8010848C .text setActor__16daPy_actorKeep_cFv */
|
||||
void daPy_actorKeep_c::setActor() {
|
||||
if (mID != -1) {
|
||||
if (mID != fpcM_ERROR_PROCESS_ID_e) {
|
||||
mActor = fopAcM_SearchByID(mID);
|
||||
if (mActor == NULL) {
|
||||
mID = -1;
|
||||
mID = fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
} else {
|
||||
mActor = NULL;
|
||||
@@ -2734,7 +2734,7 @@ void daPy_actorKeep_c::setData(fopAc_ac_c* actor) {
|
||||
|
||||
/* 801084AC-801084C0 .text clearData__16daPy_actorKeep_cFv */
|
||||
void daPy_actorKeep_c::clearData() {
|
||||
mID = -1;
|
||||
mID = fpcM_ERROR_PROCESS_ID_e;
|
||||
mActor = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ static s32 daTag_Msg_actionEvent(daTag_Msg_c* a_this) {
|
||||
break;
|
||||
case 1:
|
||||
l_msgId = fopMsgM_messageSet(message, &a_this->mAttentionInfo.mPosition);
|
||||
if (l_msgId != 0xffffffff) {
|
||||
if (l_msgId != fpcM_ERROR_PROCESS_ID_e) {
|
||||
msg_mode++;
|
||||
}
|
||||
break;
|
||||
@@ -214,7 +214,7 @@ static s32 daTag_Msg_actionHunt(daTag_Msg_c* a_this) {
|
||||
if ((swBit & 0xff) != 0xff) {
|
||||
dComIfGs_onSwitch(swBit,a_this->current.roomNo);
|
||||
}
|
||||
l_msgId = 0xffffffff;
|
||||
l_msgId = fpcM_ERROR_PROCESS_ID_e;
|
||||
l_msg = 0;
|
||||
msg_mode = 0;
|
||||
if ((u32)a_this->getMessage() == 0x1902) {
|
||||
|
||||
@@ -1189,10 +1189,10 @@ bool daTbox_c::actionOpenWait() {
|
||||
dComIfGp_event_onEventFlag(0x04);
|
||||
|
||||
u8 itemNo = getItemNo();
|
||||
s32 itemId = fopAcM_createItemForTrBoxDemo(¤t.pos, itemNo, -1, -1, NULL, NULL);
|
||||
u32 itemPID = fopAcM_createItemForTrBoxDemo(¤t.pos, itemNo, -1, -1, NULL, NULL);
|
||||
|
||||
if (itemId != 0xFFFFFFFF) {
|
||||
dComIfGp_event_setItemPartnerId(itemId);
|
||||
if (itemPID != fpcM_ERROR_PROCESS_ID_e) {
|
||||
dComIfGp_event_setItemPartnerId(itemPID);
|
||||
}
|
||||
|
||||
if (getShapeType() != 0) {
|
||||
|
||||
+3
-3
@@ -10,13 +10,13 @@
|
||||
|
||||
/* 800AB2AC-800AB328 .text GetAc__22dCcD_GAtTgCoCommonBaseFv */
|
||||
fopAc_ac_c* dCcD_GAtTgCoCommonBase::GetAc() {
|
||||
if (mApid == -1) {
|
||||
if (mApid == fpcM_ERROR_PROCESS_ID_e) {
|
||||
return NULL;
|
||||
}
|
||||
if (mAc == NULL) {
|
||||
mAc = fopAcM_SearchByID(mApid);
|
||||
if (mAc == NULL) {
|
||||
mApid = -1;
|
||||
mApid = fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
}
|
||||
return mAc;
|
||||
@@ -67,7 +67,7 @@ void dCcD_Stts::Init(int param_0, int param_1, fopAc_ac_c* pActor) {
|
||||
if (pActor) {
|
||||
procId = fpcM_GetID(pActor);
|
||||
} else {
|
||||
procId = -1;
|
||||
procId = fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
cCcD_Stts::Init(param_0, param_1, pActor, procId);
|
||||
|
||||
|
||||
+6
-6
@@ -651,26 +651,26 @@ void fopNpc_npc_c::setCollision(f32 radius, f32 height) {
|
||||
u16 fopNpc_npc_c::talk(int param_1) {
|
||||
u16 mode = 0xFF;
|
||||
|
||||
if(mCurrMsgBsPcId == 0xFFFFFFFF) {
|
||||
if(mCurrMsgBsPcId == fpcM_ERROR_PROCESS_ID_e) {
|
||||
if(param_1 == 1) {
|
||||
mCurrMsgID = getMsg();
|
||||
mCurrMsgNo = getMsg();
|
||||
}
|
||||
|
||||
mCurrMsgBsPcId = fopMsgM_messageSet(mCurrMsgID, this);
|
||||
mCurrMsgBsPcId = fopMsgM_messageSet(mCurrMsgNo, this);
|
||||
mpCurrMsg = 0;
|
||||
}
|
||||
else {
|
||||
if(mpCurrMsg) {
|
||||
mode = mpCurrMsg->mMode;
|
||||
if(mode == dNpcMsgStts_MSG_DISPLAYED_e) {
|
||||
mpCurrMsg->mMode = next_msgStatus(&mCurrMsgID);
|
||||
mpCurrMsg->mMode = next_msgStatus(&mCurrMsgNo);
|
||||
if(mpCurrMsg->mMode == dNpcMsgStts_MSG_CONTINUES_e) {
|
||||
fopMsgM_messageSet(mCurrMsgID);
|
||||
fopMsgM_messageSet(mCurrMsgNo);
|
||||
}
|
||||
}
|
||||
else if (mode == dNpcMsgStts_BOX_CLOSED_e) {
|
||||
mpCurrMsg->mMode = dNpcMsgStts_MSG_DESTROYED_e;
|
||||
mCurrMsgBsPcId = -1;
|
||||
mCurrMsgBsPcId = fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
|
||||
anmAtr(mode);
|
||||
|
||||
+16
-16
@@ -106,7 +106,7 @@ void dNpc_EventCut_c::cutTurnToActorStart() {
|
||||
mSetId = 0;
|
||||
}
|
||||
|
||||
Vec* pos = dComIfGp_evmng_getMyXyzP(mEvtStaffId, "OffsetPos");
|
||||
cXyz* pos = dComIfGp_evmng_getMyXyzP(mEvtStaffId, "OffsetPos");
|
||||
if(pos) {
|
||||
mOffsetPos = *pos;
|
||||
}
|
||||
@@ -236,7 +236,7 @@ void dNpc_EventCut_c::cutMoveToActorStart() {
|
||||
u32* set = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "SetId");
|
||||
f32* speed = dComIfGp_evmng_getMyFloatP(mEvtStaffId, "Speed");
|
||||
f32* dist = dComIfGp_evmng_getMyFloatP(mEvtStaffId, "DelDistance");
|
||||
Vec* offs = dComIfGp_evmng_getMyXyzP(mEvtStaffId, "OffsetPos");
|
||||
cXyz* offs = dComIfGp_evmng_getMyXyzP(mEvtStaffId, "OffsetPos");
|
||||
u32* attn = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "Attention");
|
||||
u32* noTurn = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "NoTurn");
|
||||
u32* angle = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "ShapeAngle");
|
||||
@@ -380,7 +380,7 @@ fopAc_ac_c* dNpc_EventCut_c::findActorCallBack(fopAc_ac_c* pActor, void* pData)
|
||||
}
|
||||
|
||||
void dNpc_EventCut_c::cutTurnToPosStart() {
|
||||
Vec* pos = dComIfGp_evmng_getMyXyzP(mEvtStaffId, "Pos");
|
||||
cXyz* pos = dComIfGp_evmng_getMyXyzP(mEvtStaffId, "Pos");
|
||||
if(pos) {
|
||||
mPos = *pos;
|
||||
}
|
||||
@@ -466,7 +466,7 @@ void dNpc_EventCut_c::cutTurnToPosProc() {
|
||||
}
|
||||
|
||||
void dNpc_EventCut_c::cutMoveToPosStart() {
|
||||
Vec* pos = dComIfGp_evmng_getMyXyzP(mEvtStaffId, "Pos");
|
||||
cXyz* pos = dComIfGp_evmng_getMyXyzP(mEvtStaffId, "Pos");
|
||||
f32* speed = dComIfGp_evmng_getMyFloatP(mEvtStaffId, "Speed");
|
||||
f32* dist = dComIfGp_evmng_getMyFloatP(mEvtStaffId, "DelDistance");
|
||||
u32* attn = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "Attention");
|
||||
@@ -552,19 +552,19 @@ void dNpc_EventCut_c::cutTalkMsgStart() {
|
||||
mbAttention = 1;
|
||||
}
|
||||
|
||||
u32* firstMsg = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "msg_num");
|
||||
u32* endMsg = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "end_msg");
|
||||
if(firstMsg == 0) {
|
||||
mpTalkActor->mCurrMsgID = 0;
|
||||
u32* firstMsgNo = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "msg_num");
|
||||
u32* endMsgNo = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "end_msg");
|
||||
if(firstMsgNo == 0) {
|
||||
mpTalkActor->mCurrMsgNo = 0;
|
||||
}
|
||||
else {
|
||||
mpTalkActor->mCurrMsgID = *firstMsg;
|
||||
mpTalkActor->mCurrMsgNo = *firstMsgNo;
|
||||
}
|
||||
if(endMsg) {
|
||||
mpTalkActor->mEndMsgID = *endMsg;
|
||||
if(endMsgNo) {
|
||||
mpTalkActor->mEndMsgNo = *endMsgNo;
|
||||
}
|
||||
else {
|
||||
mpTalkActor->mEndMsgID = -1;
|
||||
mpTalkActor->mEndMsgNo = -1;
|
||||
}
|
||||
|
||||
field_0x52 = 1;
|
||||
@@ -575,10 +575,10 @@ void dNpc_EventCut_c::cutContinueTalkStart() {
|
||||
if(mpTalkActor != 0) {
|
||||
u32* endMsg = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "end_num");
|
||||
if(endMsg) {
|
||||
mpTalkActor->mEndMsgID = *endMsg;
|
||||
mpTalkActor->mEndMsgNo = *endMsg;
|
||||
}
|
||||
else {
|
||||
mpTalkActor->mEndMsgID = -1;
|
||||
mpTalkActor->mEndMsgNo = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -593,8 +593,8 @@ void dNpc_EventCut_c::cutTalkMsgProc() {
|
||||
field_0x52 = 0;
|
||||
dComIfGp_evmng_cutEnd(mEvtStaffId);
|
||||
}
|
||||
else if((status == 2 || status == 6) && mpTalkActor->mEndMsgID == mpTalkActor->mCurrMsgID) {
|
||||
mpTalkActor->mEndMsgID = -1;
|
||||
else if((status == 2 || status == 6) && mpTalkActor->mEndMsgNo == mpTalkActor->mCurrMsgNo) {
|
||||
mpTalkActor->mEndMsgNo = -1;
|
||||
dComIfGp_evmng_cutEnd(mEvtStaffId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -853,7 +853,7 @@ s32 fopAcM_createItemFromTable(cXyz* p_pos, int i_itemNo, int i_itemBitNo, int r
|
||||
}
|
||||
u8* pItemTable = itemTableList->mItemTables[tableIdx];
|
||||
u32 itemNo;
|
||||
u32 lastItemPcId;
|
||||
u32 lastItemPID;
|
||||
for (int i = 0; (itemNo = *pItemTable) != NO_ITEM && i < 0x10; pItemTable++, i++) {
|
||||
if (p_pos) {
|
||||
pos = *p_pos;
|
||||
@@ -873,12 +873,12 @@ s32 fopAcM_createItemFromTable(cXyz* p_pos, int i_itemNo, int i_itemBitNo, int r
|
||||
itemNo = getItemNoByLife((s8)itemNo);
|
||||
daItem_c* item = (daItem_c*)fopAcM_fastCreateItem2(&pos, itemNo, i_itemBitNo, roomNo, type, &angle, 8, NULL);
|
||||
|
||||
lastItemPcId = fopAcM_GetID(item);
|
||||
if (lastItemPcId == -1) {
|
||||
lastItemPID = fopAcM_GetID(item);
|
||||
if (lastItemPID == fpcM_ERROR_PROCESS_ID_e) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return lastItemPcId;
|
||||
return lastItemPID;
|
||||
}
|
||||
|
||||
int itemIdx = (int)cM_rndF(15.9999f);
|
||||
@@ -930,7 +930,7 @@ s32 fopAcM_createDemoItem(cXyz* pos, int i_itemNo, int i_itemBitNo, csXyz* rot,
|
||||
}
|
||||
|
||||
u32 params = i_itemNo & 0xFF | (i_itemBitNo & 0x7F) << 0x08 | (param_7 & 0xFF) << 0x10;
|
||||
fopAcM_create(PROC_Demo_Item, params, pos, roomNo, rot, scale, 0xFF, NULL);
|
||||
return fopAcM_create(PROC_Demo_Item, params, pos, roomNo, rot, scale, 0xFF, NULL);
|
||||
}
|
||||
|
||||
/* 80026A68-80026ADC .text fopAcM_createItemForBoss__FP4cXyziiP5csXyzP4cXyzi */
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "f_pc/f_pc_stdcreate_req.h"
|
||||
#include "f_pc/f_pc_load.h"
|
||||
#include "f_pc/f_pc_node.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
|
||||
/* 80040648-8004069C .text fpcSCtRq_phase_Load__FP29standard_create_request_class */
|
||||
s32 fpcSCtRq_phase_Load(standard_create_request_class* i_SCtReq) {
|
||||
@@ -110,11 +111,11 @@ s32 fpcSCtRq_Request(layer_class* i_layer, s16 i_procName, stdCreateFunc i_creat
|
||||
};
|
||||
|
||||
if (i_procName >= 0x7FFF) {
|
||||
return -1;
|
||||
return fpcM_ERROR_PROCESS_ID_e;
|
||||
} else {
|
||||
standard_create_request_class* request = (standard_create_request_class*)fpcCtRq_Create(i_layer, sizeof(standard_create_request_class), &submethod);
|
||||
if (request == NULL) {
|
||||
return -1;
|
||||
return fpcM_ERROR_PROCESS_ID_e;
|
||||
} else {
|
||||
cPhs_Set(&request->mPhase, method);
|
||||
request->mProcName = i_procName;
|
||||
|
||||
Reference in New Issue
Block a user