d_demo work

This commit is contained in:
LagoLunatic
2025-03-28 22:35:13 -04:00
parent 09746976e3
commit b9c1eed694
26 changed files with 408 additions and 276 deletions
+10
View File
@@ -5,6 +5,16 @@
namespace JStage {
struct TActor : public TObject {
enum {
ID_NORMAL = -1,
ID_UNK_1 = 1,
ID_UNK_2 = 2,
ID_UNK_3 = 3,
ID_UNK_4 = 4,
ID_UNK_5 = 5,
ID_UNK_6 = 6,
};
virtual ~TActor() = 0;
virtual s32 JSGFGetType() const;
virtual void JSGGetTranslation(Vec*) const;
+6 -6
View File
@@ -2844,23 +2844,23 @@ inline char* dComIfGp_evmng_getMyActName(int staffIdx) {
}
inline f32* dComIfGp_evmng_getMyFloatP(int staffIdx, char* name) {
return reinterpret_cast<f32*>(dComIfGp_getPEvtManager()->getMySubstanceP(staffIdx, name, 0)); //type 0 is float
return reinterpret_cast<f32*>(dComIfGp_getPEvtManager()->getMySubstanceP(staffIdx, name, dEvDtData_c::TYPE_FLOAT));
}
inline Vec* dComIfGp_evmng_getMyVec3dP(int staffIdx, char* name) {
return reinterpret_cast<Vec*>(dComIfGp_getPEvtManager()->getMySubstanceP(staffIdx, name, 1)); //type 1 is vec3f
return reinterpret_cast<Vec*>(dComIfGp_getPEvtManager()->getMySubstanceP(staffIdx, name, dEvDtData_c::TYPE_VEC));
}
inline cXyz* dComIfGp_evmng_getMyXyzP(int staffIdx, char* name) {
return reinterpret_cast<cXyz*>(dComIfGp_getPEvtManager()->getMySubstanceP(staffIdx, name, 1)); //type 1 is vec3f
return reinterpret_cast<cXyz*>(dComIfGp_getPEvtManager()->getMySubstanceP(staffIdx, name, dEvDtData_c::TYPE_VEC));
}
inline u32* dComIfGp_evmng_getMyIntegerP(int staffIdx, char* name) {
return reinterpret_cast<u32*>(dComIfGp_getPEvtManager()->getMySubstanceP(staffIdx, name, 3)); //type 3 is int
inline int* dComIfGp_evmng_getMyIntegerP(int staffIdx, char* name) {
return reinterpret_cast<int*>(dComIfGp_getPEvtManager()->getMySubstanceP(staffIdx, name, dEvDtData_c::TYPE_INT));
}
inline char* dComIfGp_evmng_getMyStringP(int staffIdx, char* name) {
return reinterpret_cast<char*>(dComIfGp_getPEvtManager()->getMySubstanceP(staffIdx, name, 4)); //type 4 is string
return reinterpret_cast<char*>(dComIfGp_getPEvtManager()->getMySubstanceP(staffIdx, name, dEvDtData_c::TYPE_STRING));
}
inline BOOL dComIfGp_evmng_startCheck(s16 eventID) {
+118 -31
View File
@@ -26,8 +26,43 @@
class fopAc_ac_c;
class dMesg_tControl;
// TODO: made up, figure out what this is
struct dDemo_prm_data {
/* 0x0 */ u8 field_0x0[0x4 - 0x0];
/* 0x4 */ s8 field_0x4;
/* 0x5 */ u8 field_0x5[0x6 - 0x5];
/* 0x6 */ s8 field_0x6;
/* 0x7 */ s8 field_0x7;
/* 0x8 */ u8 field_0x8[0xB - 0x8];
/* 0xB */ s8 field_0xb;
/* 0xC */ u8 field_0xc[0xF - 0xC];
/* 0xF */ s8 field_0xf;
};
class dDemo_prm_c {
public:
u32 getId() { return mId; }
dDemo_prm_data* getData() { return mData; }
public:
/* 0x0 */ u32 mId;
/* 0x4 */ dDemo_prm_data* mData;
};
class dDemo_actor_c : public JStage::TActor {
public:
enum Enable_e {
/* 0x001 */ ENABLE_UNK_e = (1 << 0),
/* 0x002 */ ENABLE_TRANS_e = (1 << 1),
/* 0x004 */ ENABLE_SCALE_e = (1 << 2),
/* 0x008 */ ENABLE_ROTATE_e = (1 << 3),
/* 0x010 */ ENABLE_SHAPE_e = (1 << 4),
/* 0x020 */ ENABLE_ANM_e = (1 << 5),
/* 0x040 */ ENABLE_ANM_FRAME_e = (1 << 6),
/* 0x080 */ ENABLE_TEX_ANM = (1 << 7),
/* 0x100 */ ENABLE_TEX_ANM_FRAME_e = (1 << 8),
};
dDemo_actor_c();
~dDemo_actor_c();
fopAc_ac_c* getActor();
@@ -55,59 +90,57 @@ public:
cMtx_copy(mModel->getAnmMtx((u16)no), dst);
return 1;
}
f32 JSGGetAnimationFrameMax() const { return mAnimationFrameMax; }
f32 JSGGetAnimationFrameMax() const { return mAnmFrameMax; }
f32 JSGGetTextureAnimationFrameMax() const { return mTexAnimationFrameMax; }
void JSGGetTranslation(Vec* dst) const { *dst = mTranslation; }
void JSGGetScaling(Vec* dst) const { *dst = mScaling; }
void JSGGetTranslation(Vec* dst) const { *dst = mTrans; }
void JSGGetScaling(Vec* dst) const { *dst = mScale; }
void JSGGetRotation(Vec* dst) const {
dst->x = cM_sht2d(mRotation.x);
dst->y = cM_sht2d(mRotation.y);
dst->z = cM_sht2d(mRotation.z);
dst->x = cM_sht2d(mRotate.x);
dst->y = cM_sht2d(mRotate.y);
dst->z = cM_sht2d(mRotate.z);
}
u32 checkEnable(u16 mask) { return mFlags & mask; }
csXyz* getRatate() { return &mRotation; }
void onEnable(u16 flag) { mFlags |= flag; }
cXyz* getTrans() { return &mTrans; }
cXyz* getScale() { return &mScale; }
csXyz* getRatate() { return &mRotate; }
u32 getShapeId() { return mShapeId; }
u32 getAnmId() { return mAnmId; }
f32 getAnmFrame() { return mAnmFrame; }
f32 getAnmTransition() { return mAnmTransition; }
void setAnmFrameMax(f32 max) { mAnmFrameMax = max; }
void setModel(J3DModel* model) { mModel = model; }
dDemo_prm_c* getPrm() { return &mPrm; }
u32 getOldAnmId() { return mOldAnmId; }
void setOldAnmId(u32 id) { mOldAnmId = id; }
void getAnmFrame() {}
void getAnmId() {}
void getAnmTransition() {}
void getOldAnmId() {}
void getOldScrId() {}
void getOldTevId() {}
void getOldTexId() {}
void getPrm() {}
void getScale() {}
void getTrans() {}
void onEnable(u16) {}
void setAnmFrameMax(f32 v) { mAnimationFrameMax = v; }
void setModel(J3DModel* model) { mModel = model; }
void setOldAnmId(u32) {}
void setOldScrId(u32) {}
void setOldTevId(u32) {}
void setOldTexId(u32) {}
void setTexAnmFrameMax(f32) {}
private:
/* 0x04 */ u16 mFlags;
/* 0x06 */ u8 field_0x06[0x08 - 0x06];
/* 0x08 */ cXyz mTranslation;
/* 0x14 */ cXyz mScaling;
/* 0x20 */ csXyz mRotation;
/* 0x26 */ u8 field_0x26[0x28 - 0x26];
/* 0x08 */ cXyz mTrans;
/* 0x14 */ cXyz mScale;
/* 0x20 */ csXyz mRotate;
/* 0x28 */ u32 mShapeId;
/* 0x2C */ u32 mNextBckId;
/* 0x30 */ f32 mAnimationFrame;
/* 0x34 */ f32 mAnimationTransition;
/* 0x38 */ f32 mAnimationFrameMax;
/* 0x2C */ u32 mAnmId;
/* 0x30 */ f32 mAnmFrame;
/* 0x34 */ f32 mAnmTransition;
/* 0x38 */ f32 mAnmFrameMax;
/* 0x3C */ s32 mTexAnimation;
/* 0x40 */ f32 mTexAnimationFrame;
/* 0x44 */ f32 mTexAnimationFrameMax;
/* 0x48 */ J3DModel* mModel;
/* 0x4C */ u32 field_0x4c;
/* 0x50 */ const void* field_0x50;
/* 0x4C */ dDemo_prm_c mPrm;
/* 0x54 */ u32 field_0x54;
/* 0x58 */ fpc_ProcID mActorPcId;
/* 0x5C */ s32 mBckId;
/* 0x58 */ fpc_ProcID mActorId;
/* 0x5C */ s32 mOldAnmId;
/* 0x60 */ s32 mBtpId;
/* 0x64 */ s32 mBtkId;
/* 0x68 */ s32 mBrkId;
@@ -115,6 +148,17 @@ public:
class dDemo_camera_c : public JStage::TCamera {
public:
enum Enable_e {
/* 0x01 */ ENABLE_PROJ_NEAR_e = (1 << 0),
/* 0x02 */ ENABLE_PROJ_FAR_e = (1 << 1),
/* 0x04 */ ENABLE_PROJ_FOVY_e = (1 << 2),
/* 0x08 */ ENABLE_PROJ_ASPECT_e = (1 << 3),
/* 0x10 */ ENABLE_VIEW_POS_e = (1 << 4),
/* 0x20 */ ENABLE_VIEW_UP_VEC_e = (1 << 5),
/* 0x40 */ ENABLE_VIEW_TARG_POS_e = (1 << 6),
/* 0x80 */ ENABLE_VIEW_ROLL_e = (1 << 7),
};
dDemo_camera_c() { mFlags = 0; }
~dDemo_camera_c() {}
f32 JSGGetProjectionNear() const;
@@ -134,6 +178,15 @@ public:
f32 JSGGetViewRoll() const;
void JSGSetViewRoll(f32);
bool checkEnable(u8 mask) { return mFlags & mask; }
void onEnable(u8 flag) { mFlags |= flag; }
void getFovy() {}
void getRoll() {}
void getTarget() {}
void getTrans() {}
void getUp() {}
private:
/* 0x04 */ u8 mFlags;
/* 0x08 */ f32 mProjNear;
@@ -148,10 +201,16 @@ private:
class dDemo_ambient_c : public JStage::TAmbientLight {
public:
enum Enable_e {
/* 0x1 */ ENABLE_COLOR_e = (1 << 0),
};
dDemo_ambient_c() { mFlags = 0; }
~dDemo_ambient_c() {}
void JSGSetColor(GXColor color);
void onEnable(u8 flag) { mFlags |= flag; }
private:
/* 0x04 */ u8 mFlags;
/* 0x08 */ GXColor mColor;
@@ -159,6 +218,15 @@ private:
class dDemo_light_c : public JStage::TLight {
public:
enum Enable_e {
/* 0x01 */ ENABLE_LIGHT_TYPE_e = (1 << 0),
/* 0x02 */ ENABLE_POSITION_e = (1 << 1),
/* 0x04 */ ENABLE_COLOR_e = (1 << 2),
/* 0x08 */ ENABLE_DIST_ATTEN_e = (1 << 3),
/* 0x10 */ ENABLE_ANGLE_ATTEN_e = (1 << 4),
/* 0x20 */ ENABLE_DIRECTION_e = (1 << 5),
};
dDemo_light_c() { mFlags = 0; }
~dDemo_light_c() {}
void JSGSetLightType(JStage::TELight);
@@ -168,6 +236,8 @@ public:
void JSGSetAngleAttenuation(f32, GXSpotFn);
void JSGSetDirection(const Vec&);
void onEnable(u8 flag) { mFlags |= flag; }
private:
/* 0x04 */ u8 mFlags;
/* 0x08 */ JStage::TELight mLightType;
@@ -183,6 +253,13 @@ private:
class dDemo_fog_c : public JStage::TFog {
public:
enum Enable_e {
/* 0x1 */ ENABLE_FOG_FN_e = (1 << 0),
/* 0x2 */ ENABLE_START_Z_e = (1 << 1),
/* 0x4 */ ENABLE_END_Z_e = (1 << 2),
/* 0x8 */ ENABLE_COLOR_e = (1 << 3),
};
dDemo_fog_c() { mFlags = 0; }
~dDemo_fog_c() {}
void JSGSetFogFunction(GXFogType);
@@ -190,6 +267,8 @@ public:
void JSGSetEndZ(f32);
void JSGSetColor(GXColor);
void onEnable(u8 flag) { mFlags |= flag; }
private:
/* 0x04 */ u8 mFlags;
/* 0x05 */ u8 mFogType;
@@ -212,6 +291,12 @@ public:
dDemo_fog_c* createFog();
void remove();
void createEditorCamera() {}
void getCamera() {}
void getEditorCamera() {}
void removeEditorCamera() {}
private:
/* 0x00 */ u8 mNumActor;
/* 0x01 */ u8 mNumLight;
/* 0x04 */ dDemo_actor_c* mpActors[32];
@@ -226,6 +311,7 @@ public:
dDemo_system_c() : mObject(NULL) {}
~dDemo_system_c();
void* JSGFindObject(const char*, JStage::TEObject) const;
void setObject(dDemo_object_c* obj) { mObject = obj; }
private:
@@ -249,6 +335,7 @@ public:
u32 getFrameNoMsg() { return mFrameNoMsg; }
s32 getMode() { return mMode; }
private:
/* 0x00 */ dDemo_system_c* mSystem;
/* 0x04 */ JStudio::TControl* mControl;
/* 0x08 */ JStudio_JStage::TCreateObject* mStage;
+7
View File
@@ -23,6 +23,13 @@ struct event_binary_data_header {
class dEvDtData_c {
public:
enum DataType {
/* 0x0 */ TYPE_FLOAT,
/* 0x1 */ TYPE_VEC,
/* 0x3 */ TYPE_INT = 3,
/* 0x4 */ TYPE_STRING
};
/* 0x00 */ char mName[32];
/* 0x20 */ s32 mIndex;
/* 0x24 */ s32 mSubstanceType;
+2 -2
View File
@@ -611,7 +611,7 @@ void daAuction_c::privateCut() {
/* 00001300-000013C0 .text eventTalkInit__11daAuction_cFi */
void daAuction_c::eventTalkInit(int staffIdx) {
s32* pMsg = (s32*)dComIfGp_evmng_getMyIntegerP(staffIdx, "MsgNo");
int* pMsg = dComIfGp_evmng_getMyIntegerP(staffIdx, "MsgNo");
if (pMsg != NULL) {
switch (*pMsg) {
@@ -1231,7 +1231,7 @@ void daAuction_c::eventCameraOffInit() {
void daAuction_c::eventGetItemNpcInit(int staffIdx) {
setCameraNpc(m824, 0);
u32* pTimerData = dComIfGp_evmng_getMyIntegerP(staffIdx, "Timer");
int* pTimerData = dComIfGp_evmng_getMyIntegerP(staffIdx, "Timer");
if (pTimerData != NULL) {
mTimer = *pTimerData;
+2 -2
View File
@@ -326,7 +326,7 @@ void daMbdoor_c::demoProc() {
case ACT_ADJUSTMENT:
calcMtx();
mAdjustmentTimer = 0;
u32* timerP = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "Timer");
int* timerP = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "Timer");
if (timerP) {
mAdjustmentTimer = *timerP;
}
@@ -540,7 +540,7 @@ BOOL daMbdoor_c::execute() {
dDemo_actor_c* demoActor = dComIfGp_demo_getActor(demoActorID);
if (demoActor) {
field_0x2ad = 0;
if (demoActor->checkEnable(0x8)) {
if (demoActor->checkEnable(dDemo_actor_c::ENABLE_ROTATE_e)) {
field_0x2b2 = demoActor->getRatate()->y;
field_0x2b0 = demoActor->getRatate()->z;
}
+6 -6
View File
@@ -1791,8 +1791,8 @@ BOOL daNpc_Bs1_c::getdemo_action(void*) {
/* 00003CB4-00003D7C .text evn_talk_init__11daNpc_Bs1_cFi */
BOOL daNpc_Bs1_c::evn_talk_init(int actorId) {
u32* pMsgNo = dComIfGp_evmng_getMyIntegerP(actorId, "MsgNo");
u32* pEndMsgNo = dComIfGp_evmng_getMyIntegerP(actorId, "EndMsgNo");
int* pMsgNo = dComIfGp_evmng_getMyIntegerP(actorId, "MsgNo");
int* pEndMsgNo = dComIfGp_evmng_getMyIntegerP(actorId, "EndMsgNo");
l_msgId = fpcM_ERROR_PROCESS_ID_e;
l_msg = NULL;
if (pMsgNo != NULL) {
@@ -1810,7 +1810,7 @@ BOOL daNpc_Bs1_c::evn_talk_init(int actorId) {
/* 00003D7C-00003DE4 .text evn_continue_talk_init__11daNpc_Bs1_cFi */
BOOL daNpc_Bs1_c::evn_continue_talk_init(int actorId) {
u32* pEndMsgNo = dComIfGp_evmng_getMyIntegerP(actorId, "EndMsgNo");
int* pEndMsgNo = dComIfGp_evmng_getMyIntegerP(actorId, "EndMsgNo");
if (pEndMsgNo != NULL) {
m744 = *pEndMsgNo;
} else {
@@ -1852,7 +1852,7 @@ BOOL daNpc_Bs1_c::evn_talk() {
/* 00003F14-00003FE0 .text evn_jnt_lock_init__11daNpc_Bs1_cFi */
BOOL daNpc_Bs1_c::evn_jnt_lock_init(int actorIdx) {
u32* substance = dComIfGp_evmng_getMyIntegerP(actorIdx, "prm");
int* substance = dComIfGp_evmng_getMyIntegerP(actorIdx, "prm");
u32 jnt_to_lock;
if (substance != NULL) {
jnt_to_lock = *substance;
@@ -1882,7 +1882,7 @@ BOOL daNpc_Bs1_c::evn_jnt_lock_init(int actorIdx) {
/* 00003FE0-00004048 .text evn_wait_init__11daNpc_Bs1_cFi */
BOOL daNpc_Bs1_c::evn_wait_init(int actorIdx) {
u32* pTimer = dComIfGp_evmng_getMyIntegerP(actorIdx, "Timer");
int* pTimer = dComIfGp_evmng_getMyIntegerP(actorIdx, "Timer");
if (pTimer != NULL) {
m63E = (u16)*pTimer;
} else {
@@ -1899,7 +1899,7 @@ BOOL daNpc_Bs1_c::evn_wait() {
/* 00004078-000040E4 .text evn_set_anm_init__11daNpc_Bs1_cFi */
BOOL daNpc_Bs1_c::evn_set_anm_init(int actorIdx) {
u32 anmNo;
u32* pAnmNo = dComIfGp_evmng_getMyIntegerP(actorIdx, "AnmNo");
int* pAnmNo = dComIfGp_evmng_getMyIntegerP(actorIdx, "AnmNo");
if (pAnmNo != NULL) {
anmNo = *pAnmNo;
} else {
+11 -11
View File
@@ -1356,7 +1356,7 @@ BOOL daNpc_Ji1_c::eventAction(void*) {
/* 00004714-00004778 .text evn_init_pos_init__11daNpc_Ji1_cFi */
u32 daNpc_Ji1_c::evn_init_pos_init(int staffIdx) {
u32* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "AnmNo");
int* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "AnmNo");
u32 value = 0;
if(data) {
@@ -1369,7 +1369,7 @@ u32 daNpc_Ji1_c::evn_init_pos_init(int staffIdx) {
/* 00004778-00004838 .text evn_setAnm_init__11daNpc_Ji1_cFi */
u32 daNpc_Ji1_c::evn_setAnm_init(int staffIdx) {
u32* iData = dComIfGp_evmng_getMyIntegerP(staffIdx, "AnmNo");
int* iData = dComIfGp_evmng_getMyIntegerP(staffIdx, "AnmNo");
f32* fData = dComIfGp_evmng_getMyFloatP(staffIdx, "hokan");
if(iData) {
@@ -1391,8 +1391,8 @@ u32 daNpc_Ji1_c::evn_setAnm_init(int staffIdx) {
/* 00004838-000049AC .text evn_talk_init__11daNpc_Ji1_cFi */
u32 daNpc_Ji1_c::evn_talk_init(int staffIdx) {
u32* pMsgNo = dComIfGp_evmng_getMyIntegerP(staffIdx, "MsgNo");
u32* pEndMsgNo = dComIfGp_evmng_getMyIntegerP(staffIdx, "EndMsgNo");
int* pMsgNo = dComIfGp_evmng_getMyIntegerP(staffIdx, "MsgNo");
int* pEndMsgNo = dComIfGp_evmng_getMyIntegerP(staffIdx, "EndMsgNo");
l_msgId = fpcM_ERROR_PROCESS_ID_e;
l_msg = 0;
@@ -1482,7 +1482,7 @@ u32 daNpc_Ji1_c::evn_talk() {
/* 00004B1C-00004B84 .text evn_continue_talk_init__11daNpc_Ji1_cFi */
u32 daNpc_Ji1_c::evn_continue_talk_init(int staffIdx) {
u32* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "EndMsgNo");
int* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "EndMsgNo");
if(data) {
field_0xD80 = *data;
@@ -1542,7 +1542,7 @@ u32 daNpc_Ji1_c::evn_continue_talk() {
/* 00004CF4-00004D50 .text evn_setAngle_init__11daNpc_Ji1_cFi */
u32 daNpc_Ji1_c::evn_setAngle_init(int staffIdx) {
u32* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "angle");
int* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "angle");
if(data) {
current.angle.y = *data;
@@ -1553,7 +1553,7 @@ u32 daNpc_Ji1_c::evn_setAngle_init(int staffIdx) {
/* 00004D50-00004E8C .text evn_sound_proc_init__11daNpc_Ji1_cFi */
u32 daNpc_Ji1_c::evn_sound_proc_init(int staffIdx) {
u32* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "prm");
int* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "prm");
if(data) {
switch(*data) {
@@ -1576,7 +1576,7 @@ u32 daNpc_Ji1_c::evn_sound_proc_init(int staffIdx) {
/* 00004E8C-00004F60 .text evn_head_swing_init__11daNpc_Ji1_cFi */
u32 daNpc_Ji1_c::evn_head_swing_init(int staffIdx) {
u32* pData = dComIfGp_evmng_getMyIntegerP(staffIdx, "prm");
int* pData = dComIfGp_evmng_getMyIntegerP(staffIdx, "prm");
u32 value;
if(!pData) {
value = 0;
@@ -1602,7 +1602,7 @@ u32 daNpc_Ji1_c::evn_head_swing_init(int staffIdx) {
/* 00004F60-00005008 .text evn_harpoon_proc_init__11daNpc_Ji1_cFi */
u32 daNpc_Ji1_c::evn_harpoon_proc_init(int staffIdx) {
u32* pData = dComIfGp_evmng_getMyIntegerP(staffIdx, "prm");
int* pData = dComIfGp_evmng_getMyIntegerP(staffIdx, "prm");
u32 value;
if(!pData) {
value = 0;
@@ -1686,7 +1686,7 @@ u32 daNpc_Ji1_c::evn_RollAtControl() {
/* 00005314-000053F8 .text evn_game_mode_init__11daNpc_Ji1_cFi */
u32 daNpc_Ji1_c::evn_game_mode_init(int staffIdx) {
u32* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "prm");
int* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "prm");
u32 value;
if(data) {
@@ -1725,7 +1725,7 @@ u32 daNpc_Ji1_c::evn_turn_to_player() {
/* 0000545C-00005508 .text evn_hide_init__11daNpc_Ji1_cFi */
u32 daNpc_Ji1_c::evn_hide_init(int staffIdx) {
daPy_py_c* player = daPy_getPlayerActorClass();
u32* pData = dComIfGp_evmng_getMyIntegerP(staffIdx, "prm");
int* pData = dComIfGp_evmng_getMyIntegerP(staffIdx, "prm");
u32 value;
if(!pData) {
value = 0;
+1 -1
View File
@@ -981,7 +981,7 @@ BOOL daNpc_kam_c::actionDefault(int evtStaffId) {
/* 0000351C-00003580 .text initialWaitEvent__11daNpc_kam_cFi */
void daNpc_kam_c::initialWaitEvent(int evtStaffId) {
u32* timerP = dComIfGp_evmng_getMyIntegerP(evtStaffId, "timer");
int* timerP = dComIfGp_evmng_getMyIntegerP(evtStaffId, "timer");
if (timerP) {
mWaitTimer = *timerP;
} else {
+2 -2
View File
@@ -284,9 +284,9 @@ void daNpc_Nz_c::cutHideProc() {
/* 00004100-00004204 .text cutSetAnmStart__10daNpc_Nz_cFv */
void daNpc_Nz_c::cutSetAnmStart() {
u32* pAnmNo = dComIfGp_evmng_getMyIntegerP(field_0x8F4, "anm_no");
int* pAnmNo = dComIfGp_evmng_getMyIntegerP(field_0x8F4, "anm_no");
s32 anmNo = 0;
u32* pLoopCount = dComIfGp_evmng_getMyIntegerP(field_0x8F4, "loop_count");
int* pLoopCount = dComIfGp_evmng_getMyIntegerP(field_0x8F4, "loop_count");
if(pAnmNo) {
anmNo = *pAnmNo;
+9 -9
View File
@@ -1347,26 +1347,26 @@ void daNpc_Os_c::initialWaitEvent(int staffIdx) {
current.pos.set(posData->x, posData->y, posData->z);
}
u32* angleData = dComIfGp_evmng_getMyIntegerP(staffIdx, "angle");
int* angleData = dComIfGp_evmng_getMyIntegerP(staffIdx, "angle");
if(angleData) {
s16 angle = *angleData;
current.angle.y = angle;
shape_angle.y = angle;
}
u32* gravData = dComIfGp_evmng_getMyIntegerP(staffIdx, "gravity");
int* gravData = dComIfGp_evmng_getMyIntegerP(staffIdx, "gravity");
if(gravData) {
onGravity();
maxFallSpeed = -100.0f;
gravity = l_HIO.field_0x8C;
}
u32* quakeData = dComIfGp_evmng_getMyIntegerP(staffIdx, "quake");
int* quakeData = dComIfGp_evmng_getMyIntegerP(staffIdx, "quake");
if(quakeData) {
dComIfGp_getVibration().StartShock(*quakeData, -0x11, cXyz(0.0f, 1.0f, 0.0f));
}
u32* timerData = dComIfGp_evmng_getMyIntegerP(staffIdx, "timer");
int* timerData = dComIfGp_evmng_getMyIntegerP(staffIdx, "timer");
if(timerData) {
field_0x7C0 = *timerData;
}
@@ -1439,7 +1439,7 @@ BOOL daNpc_Os_c::actionMoveEvent(int staffIdx) {
/* 00004644-000046E4 .text initialMoveEndEvent__10daNpc_Os_cFi */
void daNpc_Os_c::initialMoveEndEvent(int staffIdx) {
u32* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "Daiza");
int* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "Daiza");
if(data && mpPedestal) {
current.pos.x = mpPedestal->current.pos.x;
current.pos.y = mpPedestal->current.pos.y + 240.0f;
@@ -1466,7 +1466,7 @@ void daNpc_Os_c::initialTurnEvent(int) {
/* 0000474C-000047D4 .text actionTurnEvent__10daNpc_Os_cFi */
BOOL daNpc_Os_c::actionTurnEvent(int staffIdx) {
u32* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "Angle");
int* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "Angle");
if(data) {
s16 temp = cLib_addCalcAngleS(&shape_angle.y, *data, 0x1E, 0x2000, 0x800);
current.angle.y = shape_angle.y;
@@ -1481,7 +1481,7 @@ BOOL daNpc_Os_c::actionTurnEvent(int staffIdx) {
/* 000047D4-00004860 .text initialFinishEvent__10daNpc_Os_cFi */
void daNpc_Os_c::initialFinishEvent(int staffIdx) {
u32* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "Type");
int* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "Type");
u32 value = 0;
if(data) {
@@ -1506,7 +1506,7 @@ BOOL daNpc_Os_c::actionFinishEvent(int) {
void daNpc_Os_c::initialMsgSetEvent(int staffIdx) {
l_msgId = -1;
u32* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "MsgNo");
int* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "MsgNo");
if(data) {
field_0x780 = *data;
}
@@ -1532,7 +1532,7 @@ void daNpc_Os_c::initialSwitchOnEvent(int) {
/* 00004988-00004A60 .text initialNextEvent__10daNpc_Os_cFi */
void daNpc_Os_c::initialNextEvent(int staffIdx) {
u32* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "SE");
int* data = dComIfGp_evmng_getMyIntegerP(staffIdx, "SE");
if(data) {
u32 value = *data;
+6 -6
View File
@@ -5770,7 +5770,7 @@ void daNpcPeople_c::eventMesSetTpInit(int param_1) {
/* 00004784-0000498C .text eventMesSetInit__13daNpcPeople_cFi */
void daNpcPeople_c::eventMesSetInit(int staffIdx) {
u32* pMsgNo = dComIfGp_evmng_getMyIntegerP(staffIdx, "MsgNo");
int* pMsgNo = dComIfGp_evmng_getMyIntegerP(staffIdx, "MsgNo");
if(pMsgNo) {
m734 = 0;
@@ -5834,8 +5834,8 @@ bool daNpcPeople_c::eventMesSet2() {
/* 000049F8-00004A90 .text eventFlagSetInit__13daNpcPeople_cFi */
void daNpcPeople_c::eventFlagSetInit(int staffIdx) {
s32* pTurn = (s32*)dComIfGp_evmng_getMyIntegerP(staffIdx, "Turn");
s32* pLook = (s32*)dComIfGp_evmng_getMyIntegerP(staffIdx, "Look");
int* pTurn = dComIfGp_evmng_getMyIntegerP(staffIdx, "Turn");
int* pLook = dComIfGp_evmng_getMyIntegerP(staffIdx, "Look");
if(*pTurn != 0) {
m79D = *pTurn;
@@ -5848,7 +5848,7 @@ void daNpcPeople_c::eventFlagSetInit(int staffIdx) {
/* 00004A90-00004B34 .text eventGetItemInit__13daNpcPeople_cFi */
void daNpcPeople_c::eventGetItemInit(int staffIdx) {
int itemNo;
u32* pItemIdx = dComIfGp_evmng_getMyIntegerP(staffIdx, "ItemNo");
int* pItemIdx = dComIfGp_evmng_getMyIntegerP(staffIdx, "ItemNo");
if(pItemIdx) {
itemNo = l_get_item_no[*pItemIdx];
}
@@ -5931,7 +5931,7 @@ bool daNpcPeople_c::eventUb1Talk() {
/* 00004DC0-00004F24 .text eventUb1TalkXyInit__13daNpcPeople_cFi */
void daNpcPeople_c::eventUb1TalkXyInit(int staffIdx) {
u32* pMsgNo = dComIfGp_evmng_getMyIntegerP(staffIdx, "MsgNo");
int* pMsgNo = dComIfGp_evmng_getMyIntegerP(staffIdx, "MsgNo");
BOOL temp = false;
if(pMsgNo) {
switch(*pMsgNo) {
@@ -6090,7 +6090,7 @@ void daNpcPeople_c::eventCameraStartInit() {
/* 00005314-0000539C .text eventCoCylRInit__13daNpcPeople_cFi */
void daNpcPeople_c::eventCoCylRInit(int staffIdx) {
s32* pRad = (s32*)dComIfGp_evmng_getMyIntegerP(staffIdx, "CoCylR");
int* pRad = dComIfGp_evmng_getMyIntegerP(staffIdx, "CoCylR");
if(pRad) {
m74C = *pRad;
}
+2 -2
View File
@@ -2228,7 +2228,7 @@ void daNpcRoten_c::eventInit() {
/* 00002600-0000280C .text eventMesSetInit__12daNpcRoten_cFi */
void daNpcRoten_c::eventMesSetInit(int staffIdx) {
u32* pData = dComIfGp_evmng_getMyIntegerP(staffIdx, "MsgNo");
int* pData = dComIfGp_evmng_getMyIntegerP(staffIdx, "MsgNo");
if(pData) {
u32 msgNo = *pData;
switch(msgNo) {
@@ -2310,7 +2310,7 @@ void daNpcRoten_c::eventClrItemInit() {
void daNpcRoten_c::eventGetItemInit(int staffIdx) {
fpc_ProcID pcId;
u32* pData = dComIfGp_evmng_getMyIntegerP(staffIdx, "ItemNo");
int* pData = dComIfGp_evmng_getMyIntegerP(staffIdx, "ItemNo");
if(pData != NULL) {
u32 itemNo = *pData; // fakematch?
itemNo = l_get_item_no[itemNo];
+2 -2
View File
@@ -74,8 +74,8 @@ bool daObjDmgroom_c::_delete() {
bool daObjDmgroom_c::_execute() {
if (demoActorID != 0) {
dDemo_actor_c * demoAc = dComIfGp_demo_getActor(demoActorID);
if (demoAc != NULL && demoAc->checkEnable(0x40))
mBrkAnm.setFrame(demoAc->mAnimationFrame);
if (demoAc != NULL && demoAc->checkEnable(dDemo_actor_c::ENABLE_ANM_FRAME_e))
mBrkAnm.setFrame(demoAc->getAnmFrame());
}
set_mtx();
return true;
+2 -2
View File
@@ -112,8 +112,8 @@ static BOOL daObjDoguuD_Draw(void* i_this) {
bool daObjDoguuD_c::_execute() {
if (demoActorID != 0) {
dDemo_actor_c* demoAc = dComIfGp_demo_getActor(demoActorID);
if (demoAc != NULL && demoAc->checkEnable(0x10)) {
mShape = demoAc->mShapeId;
if (demoAc != NULL && demoAc->checkEnable(dDemo_actor_c::ENABLE_SHAPE_e)) {
mShape = demoAc->getShapeId();
}
}
set_mtx();
+1 -1
View File
@@ -1204,7 +1204,7 @@ void daObjFigure_c::privateCut() {
/* 0000119C-00001294 .text eventMesSetInit__13daObjFigure_cFi */
void daObjFigure_c::eventMesSetInit(int staffIdx) {
u32* pMsgNo = dComIfGp_evmng_getMyIntegerP(staffIdx, "MsgNo");
int* pMsgNo = dComIfGp_evmng_getMyIntegerP(staffIdx, "MsgNo");
if(pMsgNo) {
m72C = NULL;
switch(*pMsgNo) {
+1 -1
View File
@@ -157,7 +157,7 @@ BOOL daObjHat_c::_execute() {
fopAcM_SetSpeed(this, xspeed, yspeed, zspeed);
fopAcM_posMove(this, mStts.GetCCMoveP());
mAcch.CrrPos(g_dComIfG_gameInfo.play.mBgS);
mAcch.CrrPos(*dComIfG_Bgsp());
if (mAcch.ChkWallHit()) {
fopAcM_SetSpeedF(this, 0.0f);
}
+3 -3
View File
@@ -118,9 +118,9 @@ static BOOL daObjTower_Draw(void* i_this) {
bool daObjTower_c::_execute() {
if (demoActorID != 0) {
dDemo_actor_c* pdVar1 = dComIfGp_demo_getActor(demoActorID);
if (pdVar1 != NULL && pdVar1->checkEnable(0x02)) {
current.pos = pdVar1->mTranslation;
dDemo_actor_c* demo_actor = dComIfGp_demo_getActor(demoActorID);
if (demo_actor != NULL && demo_actor->checkEnable(dDemo_actor_c::ENABLE_TRANS_e)) {
current.pos = *demo_actor->getTrans();
}
}
+1 -1
View File
@@ -266,7 +266,7 @@ void daObjVgnfd_c::init_mtx() {
/* 00000B3C-00000BA0 .text set_timer__12daObjVgnfd_cFv */
void daObjVgnfd_c::set_timer() {
u32* int_p = dComIfGp_evmng_getMyIntegerP(mStaffId, "Timer");
int* int_p = dComIfGp_evmng_getMyIntegerP(mStaffId, "Timer");
mTimer = 0;
if (int_p != NULL)
mTimer = *int_p;
+4 -4
View File
@@ -633,10 +633,10 @@ static BOOL demo_move(sail_class* i_this) {
if (i_this->demoActorID == 0) {
return FALSE;
}
dDemo_actor_c* demo = g_dComIfG_gameInfo.play.mDemo->mDemoObj.getActor(i_this->demoActorID);
if (demo != NULL) {
if (demo->checkEnable(0x40)) {
f32 frame = demo->mAnimationFrame;
dDemo_actor_c* demo_actor = dComIfGp_demo_getActor(i_this->demoActorID);
if (demo_actor != NULL) {
if (demo_actor->checkEnable(dDemo_actor_c::ENABLE_ANM_FRAME_e)) {
f32 frame = demo_actor->getAnmFrame();
frame = 0.6f - (frame * 0.006f);
i_this->mSailPacket.m1C44 = frame;
i_this->mSailPacket.m1C44 = cLib_minMaxLimit<f32>(i_this->mSailPacket.m1C44, 0.0f, 0.6f);
+18 -32
View File
@@ -1338,9 +1338,6 @@ void daShip_c::setPartAnimeInit(unsigned char param_1) {
void daShip_c::setSelfMove(int param_1) {
BOOL bVar1;
short sVar2;
int iVar3;
int iVar4;
float fVar5;
float fVar6;
if (param_1) {
@@ -1793,8 +1790,6 @@ BOOL daShip_c::procCraneReady_init() {
/* 00004B7C-00004CD0 .text procCraneReady__8daShip_cFv */
BOOL daShip_c::procCraneReady() {
float fVar1;
float fVar2;
int iVar3;
if (checkNextMode(10)) {
return TRUE;
@@ -2028,12 +2023,12 @@ BOOL daShip_c::procToolDemo_init() {
BOOL daShip_c::procToolDemo() {
dDemo_actor_c* demoActor = dComIfGp_demo_getActor(demoActorID);
if (demoActor) {
if ((demoActor->mFlags & 2) != 0) {
current.pos.x = demoActor->mTranslation.x;
current.pos.z = demoActor->mTranslation.z;
if (demoActor->checkEnable(dDemo_actor_c::ENABLE_TRANS_e)) {
current.pos.x = demoActor->getTrans()->x;
current.pos.z = demoActor->getTrans()->z;
}
if ((demoActor->mFlags & 8) != 0) {
csXyz demoRot = demoActor->mRotation;
if (demoActor->checkEnable(dDemo_actor_c::ENABLE_ROTATE_e)) {
csXyz demoRot = *demoActor->getRatate();
short prevShapeAngleY = shape_angle.y;
shape_angle.y = demoRot.y;
current.angle.y = shape_angle.y;
@@ -2071,7 +2066,6 @@ BOOL daShip_c::procZevDemo() {
float fVar3;
short sVar5;
short sVar15;
short uVar16;
u16 fileIndex;
float fVar17;
cXyz local_7c;
@@ -2083,12 +2077,13 @@ BOOL daShip_c::procZevDemo() {
}
if (mEvtStaffId != -1) {
cXyz* posP = dComIfGp_evmng_getMyXyzP(mEvtStaffId, "pos");
u32* angleP = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "angle");
int* angleP = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "angle");
float* speedP = dComIfGp_evmng_getMyFloatP(mEvtStaffId, "speed");
u32* partP = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "part");
s32* talkP = (s32*)dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "talk");
u32* atn_actorP = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "atn_actor");
int* partP = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "part");
int* talkP = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "talk");
int* atn_actorP = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "atn_actor");
// Fakematch, dComIfGp_event_getPt1 doesn't work for some reason
if (atn_actorP && g_dComIfG_gameInfo.play.getEvent().getPt1()) {
m0428 = &dComIfGp_event_getPt1()->eyePos;
}
@@ -2398,8 +2393,6 @@ BOOL daShip_c::procZevDemo() {
/* 00006310-00006440 .text procTalkReady_init__8daShip_cFv */
BOOL daShip_c::procTalkReady_init() {
int iVar1;
short sVar2;
J3DAnmTransform* pAnimRes;
mProc = &daShip_c::procTalkReady;
@@ -2518,7 +2511,6 @@ BOOL daShip_c::procTurn_init() {
/* 0000686C-00006C78 .text procTurn__8daShip_cFv */
BOOL daShip_c::procTurn() {
float fVar1;
float fVar2;
short sVar4;
float fVar5;
@@ -2535,7 +2527,6 @@ BOOL daShip_c::procTurn() {
fVar6 = local_c4.abs();
if (fVar6 > 1.0f) {
fVar2 = fVar6 * 0.5f;
fVar1 = 60.0f;
if (fVar2 > 60.0f) {
fVar2 = 60.0f;
}
@@ -2744,7 +2735,6 @@ BOOL daShip_c::procTactWarp_init() {
onStateFlg(daSFLG_UNK1_e);
m037A = 0;
fopAcM_seStartCurrent(this, 0x186E, 0);
camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0));
dCam_getBody()->StartEventCamera(0xe, fopAcM_GetID(this), 0);
dKy_get_seacolor(amb, &diff);
m03BC.x = 0;
@@ -2769,7 +2759,6 @@ BOOL daShip_c::procTactWarp() {
m1984.end();
m1998.end();
procPaddleMove_init();
camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0));
dCam_getBody()->EndEventCamera(fopAcM_GetID(this));
}
res = FALSE;
@@ -3366,8 +3355,6 @@ f32 daShip_c::getAnglePartRate() {
/* 00009384-000095E4 .text setTornadoActor__8daShip_cFv */
void daShip_c::setTornadoActor() {
float fVar1;
float fVar5;
cXyz local_20;
mTornadoActor = (daTornado_c*)fopAcM_SearchByID(mTornadoID);
@@ -3502,9 +3489,7 @@ BOOL daShip_c::execute() {
float fVar2;
float fVar3;
float dVar27;
float dVar28;
Mtx* pMVar13;
int iVar23;
int sp18;
s16 sp12;
@@ -3870,7 +3855,7 @@ BOOL daShip_c::execute() {
mAcchCir[3].SetWall(-600.0f - current.pos.y, 250.0f);
mAcch.CrrPos(g_dComIfG_gameInfo.play.mBgS);
mAcch.CrrPos(*dComIfG_Bgsp());
if (checkForceMove()) {
current.pos = spF0;
@@ -3980,7 +3965,6 @@ BOOL daShip_c::execute() {
daBomb_c* bomb = (daBomb_c *)fopAcM_fastCreate(PROC_BOMB, daBomb_c::prm_make(daBomb_c::STATE_4, FALSE, TRUE), &spE4, tevStr.mRoomNo, &sp1C);
int bombId;
if (bomb) {
dCam_getBody()->ForceLockOn(fpcM_GetID(bomb));
@@ -4152,10 +4136,12 @@ BOOL daShip_c::execute() {
cXyz spB4(attention_info.position - link->current.pos);
if (
(!dComIfGp_event_runCheck() && dComIfGp_checkPlayerStatus0(0, daPyStts0_SHIP_RIDE_e)) ||
std::fabsf(current.pos.y - link->current.pos.y) < 50.0f &&
spB4.abs2XZ() < 62500.0f &&
fopAcM_seenPlayerAngleY(this) < 0x6000 &&
mNextMessageNo != 0xD65
(
std::fabsf(current.pos.y - link->current.pos.y) < 50.0f &&
spB4.abs2XZ() < 62500.0f &&
fopAcM_seenPlayerAngleY(this) < 0x6000 &&
mNextMessageNo != 0xD65
)
) {
fopAcM_orderSpeakEvent(this);
offStateFlg(daSFLG_UNK400000_e);
@@ -4667,7 +4653,7 @@ cPhs_State daShip_c::create() {
m029C->getModel()->setBaseTRMtx(m0298->getModel()->getAnmMtx(4));
m029C->calc();
g_dComIfG_gameInfo.play.mpPlayerPtr[2] = this;
dComIfGp_setShipActor(this);
mTrack.mMinVel = 3.0f;
mWaveL.mMaxParticleVelocity = 40.0f;
+3 -3
View File
@@ -191,7 +191,7 @@ u16 daTag_Island_c::talk() {
void daTag_Island_c::demoInitTact_Bf() {
talkInit();
s32* a_intP = (s32*)dComIfGp_evmng_getMyIntegerP(mStaffId, "prm0");
int* a_intP = dComIfGp_evmng_getMyIntegerP(mStaffId, "prm0");
JUT_ASSERT(0x167, a_intP);
if (a_intP != NULL) {
@@ -258,7 +258,7 @@ BOOL daTag_Island_c::demoProcTact_Af() {
/* 00000A00-00000AC4 .text demoInitSpeak__14daTag_Island_cFv */
void daTag_Island_c::demoInitSpeak() {
talkInit();
s32* a_intP = (s32*)dComIfGp_evmng_getMyIntegerP(mStaffId, "MsgNo");
int* a_intP = dComIfGp_evmng_getMyIntegerP(mStaffId, "MsgNo");
JUT_ASSERT(0x1C2, a_intP);
m2AC = *a_intP;
@@ -282,7 +282,7 @@ BOOL daTag_Island_c::demoProcSpeak() {
/* 00000B1C-00000B84 .text demoInitWait__14daTag_Island_cFv */
void daTag_Island_c::demoInitWait() {
s32* a_intP = (s32*)dComIfGp_evmng_getMyIntegerP(mStaffId, "Timer");
int* a_intP = dComIfGp_evmng_getMyIntegerP(mStaffId, "Timer");
if (a_intP != NULL)
mTimer = *a_intP;
else
+1 -1
View File
@@ -133,7 +133,7 @@ void daYgcwp_c::make_shine() {
/* 000005F0-00000654 .text set_timer__9daYgcwp_cFv */
void daYgcwp_c::set_timer() {
s32* a_intP = (s32*)dComIfGp_evmng_getMyIntegerP(mStaffId, "Timer");
int* a_intP = dComIfGp_evmng_getMyIntegerP(mStaffId, "Timer");
mTimer = 0;
if (a_intP != NULL)
mTimer = *a_intP;
+143 -94
View File
@@ -12,12 +12,12 @@
/* 800692C4-80069330 .text __ct__13dDemo_actor_cFv */
dDemo_actor_c::dDemo_actor_c() {
mFlags = 0;
mTranslation.setall(0.0f);
mScaling.setall(1.0f);
mRotation.setall(0);
mTrans.setall(0.0f);
mScale.setall(1.0f);
mRotate.setall(0);
mModel = NULL;
mAnimationFrameMax = 3.402823e+38;
mTexAnimationFrameMax = 3.402823e+38;
mAnmFrameMax = FLOAT_MAX;
mTexAnimationFrameMax = FLOAT_MAX;
}
/* 80069330-800693C0 .text __dt__13dDemo_actor_cFv */
@@ -26,8 +26,8 @@ dDemo_actor_c::~dDemo_actor_c() {
if (actor) {
actor->demoActorID = 0;
}
mActorPcId = fpcM_ERROR_PROCESS_ID_e;
mBckId = -1;
mActorId = fpcM_ERROR_PROCESS_ID_e;
mOldAnmId = -1;
mBtpId = -1;
mBtkId = -1;
mBrkId = -1;
@@ -35,16 +35,16 @@ dDemo_actor_c::~dDemo_actor_c() {
/* 800693C0-800693F4 .text getActor__13dDemo_actor_cFv */
fopAc_ac_c* dDemo_actor_c::getActor() {
return fopAcM_SearchByID(mActorPcId);
return fopAcM_SearchByID(mActorId);
}
/* 800693F4-80069434 .text setActor__13dDemo_actor_cFP10fopAc_ac_c */
void dDemo_actor_c::setActor(fopAc_ac_c* ac) {
if (ac == NULL)
mActorPcId = fpcM_ERROR_PROCESS_ID_e;
mActorId = fpcM_ERROR_PROCESS_ID_e;
else
mActorPcId = fopAcM_GetID(ac);
mBckId = -1;
mActorId = fopAcM_GetID(ac);
mOldAnmId = -1;
mBtpId = -1;
mBtkId = -1;
mBrkId = -1;
@@ -53,7 +53,7 @@ void dDemo_actor_c::setActor(fopAc_ac_c* ac) {
/* 80069434-80069550 .text getP_BtpData__13dDemo_actor_cFPCc */
void* dDemo_actor_c::getP_BtpData(const char* name) {
/* Nonmatching */
if (!(mFlags & 1))
if (!checkEnable(ENABLE_UNK_e))
return NULL;
}
@@ -69,137 +69,186 @@ void* dDemo_actor_c::getP_BtkData(const char*) {
/* 8006969C-80069838 .text getPrm_Morf__13dDemo_actor_cFv */
f32 dDemo_actor_c::getPrm_Morf() {
/* Nonmatching */
if (checkEnable(ENABLE_ANM_FRAME_e)) {
return mAnmTransition;
}
if (!checkEnable(ENABLE_UNK_e)) {
return 0.0f;
}
dDemo_prm_data* prm = mPrm.mData;
switch (mPrm.mId) {
case ID_UNK_1:
if (field_0x54 < 4) {
return 0.0f;
}
return prm->field_0x4;
case ID_UNK_2:
if (field_0x54 < 7) {
return 0.0f;
}
return prm->field_0x7;
case ID_UNK_4:
if (field_0x54 < 6) {
return 0.0f;
}
return prm->field_0x6;
case ID_UNK_5:
if (field_0x54 < 0xB) {
return 0.0f;
}
return prm->field_0xb;
case ID_UNK_6:
if (field_0x54 < 0xF) {
return 0.0f;
}
return prm->field_0xf;
default:
return 0.0f;
}
}
/* 80069838-800698C0 .text dDemo_getJaiPointer__FPCcUliPUs */
void* dDemo_getJaiPointer(const char* a_name, u32 bck, int num, u16* tbl) {
/* Nonmatching */
if (num <= 0 || tbl == NULL)
return NULL;
for (s32 i = 0; i < num; i++)
if (tbl[i*2 + 0] == bck)
return dComIfG_getObjectIDRes(a_name, tbl[i*2 + 1]);
int i;
int var_r31;
for (i = var_r31 = 0; i < num; i++, var_r31 += 2)
if (tbl[var_r31 + 0] == (bck & 0xFFFF))
return dComIfG_getObjectIDRes(a_name, tbl[var_r31 + 1]);
return NULL;
}
/* 800698C0-80069BC0 .text dDemo_setDemoData__FP10fopAc_ac_cUcP14mDoExt_McaMorfPCciPUsUlSc */
BOOL dDemo_setDemoData(fopAc_ac_c* ac, u8 flag, mDoExt_McaMorf* morf, const char* a_name, int p5, u16* p6, u32 mtrlSndId, s8 reverb) {
/* Nonmatching */
dDemo_actor_c* demoActor = dComIfGp_demo_getActor(ac->demoActorID);
if (demoActor == NULL)
BOOL dDemo_setDemoData(fopAc_ac_c* i_actor, u8 i_flags, mDoExt_McaMorf* i_morf, const char* i_arcName,
int p5, u16* p6, u32 mtrlSndId, s8 i_reverb) {
dDemo_actor_c* demo_actor = dComIfGp_demo_getActor(i_actor->demoActorID);
if (demo_actor == NULL)
return FALSE;
u32 enable = demoActor->checkEnable(flag);
if (enable & 2) {
ac->current.pos = demoActor->mTranslation;
ac->old.pos = ac->current.pos;
u8 flags = demo_actor->checkEnable(i_flags);
if (flags & dDemo_actor_c::ENABLE_TRANS_e) {
i_actor->old.pos = i_actor->current.pos = *demo_actor->getTrans();
}
if (enable & 8) {
ac->shape_angle = demoActor->mRotation;
ac->current.angle = ac->shape_angle;
if (flags & dDemo_actor_c::ENABLE_ROTATE_e) {
i_actor->current.angle = i_actor->shape_angle = *demo_actor->getRatate();
}
if (enable & 4) {
ac->scale = demoActor->mScaling;
if (flags & dDemo_actor_c::ENABLE_SCALE_e) {
i_actor->scale = *demo_actor->getScale();
}
if (morf == NULL)
if (i_morf == NULL)
return TRUE;
demoActor->mModel = morf->getModel();
demo_actor->setModel(i_morf->getModel());
if ((enable & 0x20)) {
int bck = demoActor->mNextBckId;
if (bck & 0x10000)
a_name = dStage_roomControl_c::getDemoArcName();
JUT_ASSERT(0, a_name != NULL);
demoActor->mBckId = bck;
J3DAnmTransform* i_key = (J3DAnmTransform*)dComIfG_getObjectIDRes(a_name, bck);
JUT_ASSERT(0, i_key != NULL);
void* i_sound = dDemo_getJaiPointer(a_name, bck, p5, p6);
morf->setAnm(i_key, -1, demoActor->getPrm_Morf(), 1.0f, 0.0f, -1.0f, i_sound);
demoActor->mAnimationFrameMax = morf->getEndFrame();
if (enable & 0x40) {
if (demoActor->mAnimationFrame > 1.0f) {
morf->setFrame(demoActor->mAnimationFrame - 1.0f);
morf->play(&ac->current.pos, mtrlSndId, reverb);
if (flags & dDemo_actor_c::ENABLE_ANM_e) {
int anmID = demo_actor->getAnmId();
if (anmID != demo_actor->getOldAnmId()) {
const char* a_name;
if (anmID & 0x10000) {
a_name = dStage_roomControl_c::getDemoArcName();
JUT_ASSERT(397, a_name != NULL);
} else {
morf->setFrame(demoActor->mAnimationFrame);
a_name = i_arcName;
}
} else {
morf->play(&ac->current.pos, mtrlSndId, reverb);
demo_actor->setOldAnmId(anmID);
J3DAnmTransform* i_key = (J3DAnmTransform*)dComIfG_getObjectIDRes(a_name, anmID & 0xFFFF);
JUT_ASSERT(408, i_key != NULL);
void* i_sound = dDemo_getJaiPointer(a_name, anmID & 0xFFFF, p5, p6);
f32 f1 = demo_actor->getPrm_Morf();
i_morf->setAnm(i_key, -1, f1, 1.0f, 0.0f, -1.0f, i_sound);
demo_actor->setAnmFrameMax(i_morf->getEndFrame());
}
}
if (flags & dDemo_actor_c::ENABLE_ANM_FRAME_e) {
f32 anm_frame = demo_actor->getAnmFrame();
if (anm_frame > 1.0f) {
anm_frame -= 1.0f;
i_morf->setFrame(anm_frame);
i_morf->play(&i_actor->current.pos, mtrlSndId, i_reverb);
} else {
i_morf->setFrame(anm_frame);
}
} else {
i_morf->play(&i_actor->current.pos, mtrlSndId, i_reverb);
}
return TRUE;
}
/* 80069BC0-80069BDC .text JSGSetData__13dDemo_actor_cFUlPCvUl */
void dDemo_actor_c::JSGSetData(u32 p0, const void* p1, u32 p2) {
field_0x4c = p0;
field_0x50 = p1;
mPrm.mId = p0;
mPrm.mData = (dDemo_prm_data*)p1;
field_0x54 = p2;
mFlags |= 0x01;
onEnable(ENABLE_UNK_e);
}
/* 80069BDC-80069C04 .text JSGSetTranslation__13dDemo_actor_cFRC3Vec */
void dDemo_actor_c::JSGSetTranslation(const Vec& v) {
mTranslation = v;
mFlags |= 0x02;
mTrans = v;
onEnable(ENABLE_TRANS_e);
}
/* 80069C04-80069C2C .text JSGSetScaling__13dDemo_actor_cFRC3Vec */
void dDemo_actor_c::JSGSetScaling(const Vec& v) {
mScaling = v;
mFlags |= 0x04;
mScale = v;
onEnable(ENABLE_SCALE_e);
}
/* 80069C2C-80069C90 .text JSGSetRotation__13dDemo_actor_cFRC3Vec */
void dDemo_actor_c::JSGSetRotation(const Vec& v) {
mRotation.x = cM_deg2s(v.x);
mRotation.y = cM_deg2s(v.y);
mRotation.z = cM_deg2s(v.z);
mFlags |= 0x08;
mRotate.x = cM_deg2s(v.x);
mRotate.y = cM_deg2s(v.y);
mRotate.z = cM_deg2s(v.z);
onEnable(ENABLE_ROTATE_e);
}
/* 80069C90-80069CA4 .text JSGSetShape__13dDemo_actor_cFUl */
void dDemo_actor_c::JSGSetShape(u32 id) {
mShapeId = id;
mFlags |= 0x10;
onEnable(ENABLE_SHAPE_e);
}
/* 80069CA4-80069CC0 .text JSGSetAnimation__13dDemo_actor_cFUl */
void dDemo_actor_c::JSGSetAnimation(u32 no) {
mNextBckId = no;
mAnimationFrameMax = 3.402823e+38;
mFlags |= 0x20;
mAnmId = no;
mAnmFrameMax = FLOAT_MAX;
onEnable(ENABLE_ANM_e);
}
/* 80069CC0-80069CD4 .text JSGSetAnimationFrame__13dDemo_actor_cFf */
void dDemo_actor_c::JSGSetAnimationFrame(f32 v) {
mAnimationFrame = v;
mFlags |= 0x40;
mAnmFrame = v;
onEnable(ENABLE_ANM_FRAME_e);
}
/* 80069CD4-80069CE8 .text JSGSetAnimationTransition__13dDemo_actor_cFf */
void dDemo_actor_c::JSGSetAnimationTransition(f32 v) {
mAnimationTransition = v;
mFlags |= 0x40;
mAnmTransition = v;
onEnable(ENABLE_ANM_FRAME_e);
}
/* 80069CE8-80069CFC .text JSGSetTextureAnimation__13dDemo_actor_cFUl */
void dDemo_actor_c::JSGSetTextureAnimation(u32 no) {
mTexAnimation = no;
mFlags |= 0x80;
onEnable(ENABLE_TEX_ANM);
}
/* 80069CFC-80069D10 .text JSGSetTextureAnimationFrame__13dDemo_actor_cFf */
void dDemo_actor_c::JSGSetTextureAnimationFrame(f32 v) {
mTexAnimationFrame = v;
mFlags |= 0x100;
onEnable(ENABLE_TEX_ANM_FRAME_e);
}
/* 80069D10-80069D44 .text getView__Fv */
@@ -221,7 +270,7 @@ f32 dDemo_camera_c::JSGGetProjectionNear() const {
/* 80069D78-80069D8C .text JSGSetProjectionNear__14dDemo_camera_cFf */
void dDemo_camera_c::JSGSetProjectionNear(f32 v) {
mProjNear = v;
mFlags |= 0x01;
onEnable(ENABLE_PROJ_NEAR_e);
}
/* 80069D8C-80069DC0 .text JSGGetProjectionFar__14dDemo_camera_cCFv */
@@ -235,7 +284,7 @@ f32 dDemo_camera_c::JSGGetProjectionFar() const {
/* 80069DC0-80069DD4 .text JSGSetProjectionFar__14dDemo_camera_cFf */
void dDemo_camera_c::JSGSetProjectionFar(f32 v) {
mProjFar = v;
mFlags |= 0x02;
onEnable(ENABLE_PROJ_FAR_e);
}
/* 80069DD4-80069E08 .text JSGGetProjectionFovy__14dDemo_camera_cCFv */
@@ -249,21 +298,21 @@ f32 dDemo_camera_c::JSGGetProjectionFovy() const {
/* 80069E08-80069E1C .text JSGSetProjectionFovy__14dDemo_camera_cFf */
void dDemo_camera_c::JSGSetProjectionFovy(f32 v) {
mFovy = v;
mFlags |= 0x04;
onEnable(ENABLE_PROJ_FOVY_e);
}
/* 80069E1C-80069E50 .text JSGGetProjectionAspect__14dDemo_camera_cCFv */
f32 dDemo_camera_c::JSGGetProjectionAspect() const {
camera_class* view = getView();
if (view == NULL)
return 1.3333f;
return 1.3333334f;
return view->mAspect;
}
/* 80069E50-80069E64 .text JSGSetProjectionAspect__14dDemo_camera_cFf */
void dDemo_camera_c::JSGSetProjectionAspect(f32 v) {
mAspect = v;
mFlags |= 0x08;
onEnable(ENABLE_PROJ_ASPECT_e);
}
/* 80069E64-80069EC0 .text JSGGetViewPosition__14dDemo_camera_cCFP3Vec */
@@ -280,7 +329,7 @@ void dDemo_camera_c::JSGGetViewPosition(Vec* dst) const {
/* 80069EC0-80069EE8 .text JSGSetViewPosition__14dDemo_camera_cFRC3Vec */
void dDemo_camera_c::JSGSetViewPosition(const Vec& v) {
mViewPosition = v;
mFlags |= 0x10;
onEnable(ENABLE_VIEW_POS_e);
}
/* 80069EE8-80069F48 .text JSGGetViewUpVector__14dDemo_camera_cCFP3Vec */
@@ -297,7 +346,7 @@ void dDemo_camera_c::JSGGetViewUpVector(Vec* dst) const {
/* 80069F48-80069F70 .text JSGSetViewUpVector__14dDemo_camera_cFRC3Vec */
void dDemo_camera_c::JSGSetViewUpVector(const Vec& v) {
mUpVector = v;
mFlags |= 0x20;
onEnable(ENABLE_VIEW_UP_VEC_e);
}
/* 80069F70-80069FD0 .text JSGGetViewTargetPosition__14dDemo_camera_cCFP3Vec */
@@ -314,7 +363,7 @@ void dDemo_camera_c::JSGGetViewTargetPosition(Vec* dst) const {
/* 80069FD0-80069FF8 .text JSGSetViewTargetPosition__14dDemo_camera_cFRC3Vec */
void dDemo_camera_c::JSGSetViewTargetPosition(const Vec& v) {
mTargetPosition = v;
mFlags |= 0x40;
onEnable(ENABLE_VIEW_TARG_POS_e);
}
/* 80069FF8-8006A050 .text JSGGetViewRoll__14dDemo_camera_cCFv */
@@ -328,31 +377,31 @@ f32 dDemo_camera_c::JSGGetViewRoll() const {
/* 8006A050-8006A064 .text JSGSetViewRoll__14dDemo_camera_cFf */
void dDemo_camera_c::JSGSetViewRoll(f32 v) {
mRoll = v;
mFlags |= 0x80;
onEnable(ENABLE_VIEW_ROLL_e);
}
/* 8006A064-8006A094 .text JSGSetColor__15dDemo_ambient_cF8_GXColor */
void dDemo_ambient_c::JSGSetColor(GXColor color) {
mColor = color;
mFlags |= 0x01;
onEnable(ENABLE_COLOR_e);
}
/* 8006A094-8006A0A8 .text JSGSetLightType__13dDemo_light_cFQ26JStage7TELight */
void dDemo_light_c::JSGSetLightType(JStage::TELight type) {
mLightType = type;
mFlags |= 0x01;
onEnable(ENABLE_LIGHT_TYPE_e);
}
/* 8006A0A8-8006A0D0 .text JSGSetPosition__13dDemo_light_cFRC3Vec */
void dDemo_light_c::JSGSetPosition(const Vec& v) {
mPosition = v;
mFlags |= 0x02;
onEnable(ENABLE_POSITION_e);
}
/* 8006A0D0-8006A100 .text JSGSetColor__13dDemo_light_cF8_GXColor */
void dDemo_light_c::JSGSetColor(GXColor v) {
mColor = v;
mFlags |= 0x04;
onEnable(ENABLE_COLOR_e);
}
/* 8006A100-8006A11C .text JSGSetDistanceAttenuation__13dDemo_light_cFff13_GXDistAttnFn */
@@ -360,44 +409,44 @@ void dDemo_light_c::JSGSetDistanceAttenuation(f32 ref0, f32 ref1, GXDistAttnFn f
mDistAttn0 = ref0;
mDistAttn1 = ref1;
mAttnFn = fn;
mFlags |= 0x08;
onEnable(ENABLE_DIST_ATTEN_e);
}
/* 8006A11C-8006A134 .text JSGSetAngleAttenuation__13dDemo_light_cFf9_GXSpotFn */
void dDemo_light_c::JSGSetAngleAttenuation(f32 ref, GXSpotFn fn) {
mAngleAttn = ref;
mSpotFn = fn;
mFlags |= 0x10;
onEnable(ENABLE_ANGLE_ATTEN_e);
}
/* 8006A134-8006A15C .text JSGSetDirection__13dDemo_light_cFRC3Vec */
void dDemo_light_c::JSGSetDirection(const Vec& v) {
mDirection = v;
mFlags |= 0x20;
onEnable(ENABLE_DIRECTION_e);
}
/* 8006A15C-8006A170 .text JSGSetFogFunction__11dDemo_fog_cF10_GXFogType */
void dDemo_fog_c::JSGSetFogFunction(GXFogType type) {
mFogType = type;
mFlags |= 0x01;
onEnable(ENABLE_FOG_FN_e);
}
/* 8006A170-8006A184 .text JSGSetStartZ__11dDemo_fog_cFf */
void dDemo_fog_c::JSGSetStartZ(f32 v) {
mStartZ = v;
mFlags |= 0x02;
onEnable(ENABLE_START_Z_e);
}
/* 8006A184-8006A198 .text JSGSetEndZ__11dDemo_fog_cFf */
void dDemo_fog_c::JSGSetEndZ(f32 v) {
mEndZ = v;
mFlags |= 0x04;
onEnable(ENABLE_END_Z_e);
}
/* 8006A198-8006A1C8 .text JSGSetColor__11dDemo_fog_cF8_GXColor */
void dDemo_fog_c::JSGSetColor(GXColor color) {
mColor = color;
mFlags |= 0x08;
onEnable(ENABLE_COLOR_e);
}
/* 8006A1C8-8006A1E4 .text __ct__14dDemo_object_cFv */
+24 -31
View File
@@ -16,12 +16,6 @@ BOOL dEvDt_Next_Stage(int staffIdx, int wipePrm) {
u32 mode;
u32 wipe;
const char * pStageName;
u32 * pStartCode;
u32 * pRoomNo;
u32 * pLayer;
f32 * pHour;
u32 * pMode;
u32 * pWipe;
roomNo = 0;
layerNo = -1;
@@ -31,19 +25,18 @@ BOOL dEvDt_Next_Stage(int staffIdx, int wipePrm) {
pStageName = dComIfGp_evmng_getMyStringP(staffIdx, "Stage");
if (pStageName == NULL)
return FALSE;
pStartCode = dComIfGp_evmng_getMyIntegerP(staffIdx, "StartCode");
pRoomNo = dComIfGp_evmng_getMyIntegerP(staffIdx, "RoomNo");
int* pStartCode = dComIfGp_evmng_getMyIntegerP(staffIdx, "StartCode");
int* pRoomNo = dComIfGp_evmng_getMyIntegerP(staffIdx, "RoomNo");
if (pRoomNo != NULL)
roomNo = *pRoomNo;
pLayer = dComIfGp_evmng_getMyIntegerP(staffIdx, "Layer");
int* pLayer = dComIfGp_evmng_getMyIntegerP(staffIdx, "Layer");
if (pLayer != NULL)
layerNo = *pLayer;
pHour = dComIfGp_evmng_getMyFloatP(staffIdx, "Hour");
pMode = dComIfGp_evmng_getMyIntegerP(staffIdx, "Mode");
f32* pHour = dComIfGp_evmng_getMyFloatP(staffIdx, "Hour");
int* pMode = dComIfGp_evmng_getMyIntegerP(staffIdx, "Mode");
if (pMode != NULL)
mode = *pMode;
pWipe = dComIfGp_evmng_getMyIntegerP(staffIdx, "Wipe");
int* pWipe = dComIfGp_evmng_getMyIntegerP(staffIdx, "Wipe");
if (pWipe != NULL)
wipe = *pWipe;
@@ -128,7 +121,7 @@ void dEvDtEvent_c::specialStaffProc(dEvDtStaff_c* staff) {
/* 80071BB4-80071C18 .text specialProc_WaitStart__12dEvDtStaff_cFi */
void dEvDtStaff_c::specialProc_WaitStart(int staffIdx) {
u32 * pTimer = dComIfGp_evmng_getMyIntegerP(staffIdx, "Timer");
int* pTimer = dComIfGp_evmng_getMyIntegerP(staffIdx, "Timer");
if (pTimer == NULL)
mTimer = 0;
else
@@ -229,7 +222,7 @@ void dEvDtStaff_c::specialProcLight() {
dKy_instant_timechg(*pHour * 15.0f);
}
s32 * pWeather = (s32*)dComIfGp_evmng_getMyIntegerP(staffIdx, "Weather");
int* pWeather = dComIfGp_evmng_getMyIntegerP(staffIdx, "Weather");
if (pWeather != NULL) {
switch (*pWeather) {
case 0:
@@ -300,7 +293,7 @@ void dEvDtStaff_c::specialProcMessage() {
{
l_msgId = fpcM_ERROR_PROCESS_ID_e;
l_msg = NULL;
u32* idata = dComIfGp_evmng_getMyIntegerP(staffIdx, "msgNo");
int* idata = dComIfGp_evmng_getMyIntegerP(staffIdx, "msgNo");
JUT_ASSERT(0x1D2, idata);
l_msgNo = *idata;
mWipeDirection = 0;
@@ -315,7 +308,7 @@ void dEvDtStaff_c::specialProcMessage() {
{
JUT_ASSERT(0x1DC, l_msg);
l_msg->mStatus = fopMsgStts_MSG_CONTINUES_e;
u32* idata = dComIfGp_evmng_getMyIntegerP(staffIdx, "msgNo");
int* idata = dComIfGp_evmng_getMyIntegerP(staffIdx, "msgNo");
JUT_ASSERT(0x1DF, idata);
l_msgNo = *idata;
fopMsgM_messageSet(l_msgNo);
@@ -323,7 +316,7 @@ void dEvDtStaff_c::specialProcMessage() {
}
case ACT_TELOP_ON:
{
u32* idata = dComIfGp_evmng_getMyIntegerP(staffIdx, "tlpNo");
int* idata = dComIfGp_evmng_getMyIntegerP(staffIdx, "tlpNo");
JUT_ASSERT(0x1E5, idata);
dComIfGp_setStageNameOn(*idata);
specialProc_WaitStart(staffIdx);
@@ -450,7 +443,7 @@ void dEvDtStaff_c::specialProcSound() {
break;
case ACT_LANDING_DEMO:
{
s32* pPrepare = (s32*)dComIfGp_evmng_getMyIntegerP(staffIdx, "PREPARE");
int* pPrepare = dComIfGp_evmng_getMyIntegerP(staffIdx, "PREPARE");
if (pPrepare != NULL) {
static u32 landing_table[] = {
2, 3, 4, 5, 6, 1, 7,
@@ -460,18 +453,18 @@ void dEvDtStaff_c::specialProcSound() {
mDoAud_prepareLandingDemo(landing_table[*pPrepare]);
}
u32 * pStart = dComIfGp_evmng_getMyIntegerP(staffIdx, "START");
int* pStart = dComIfGp_evmng_getMyIntegerP(staffIdx, "START");
if (pStart != NULL)
mDoAud_startLandingDemo();
u32 * pEnd = dComIfGp_evmng_getMyIntegerP(staffIdx, "END");
int* pEnd = dComIfGp_evmng_getMyIntegerP(staffIdx, "END");
if (pEnd != NULL)
mDoAud_endLandingDemo();
}
break;
case ACT_BGMSTOP:
{
u32* pTimer = dComIfGp_evmng_getMyIntegerP(staffIdx, "Timer");
int* pTimer = dComIfGp_evmng_getMyIntegerP(staffIdx, "Timer");
if (pTimer != NULL)
mDoAud_bgmStop(*pTimer);
}
@@ -523,7 +516,7 @@ void dEvDtStaff_c::specialProcCreate() {
dStage_objectNameInf * objectName = dStage_searchName(name);
JUT_ASSERT(0x2e5, objectName);
u32* pArg = dComIfGp_evmng_getMyIntegerP(staffIdx, "ARG");
int* pArg = dComIfGp_evmng_getMyIntegerP(staffIdx, "ARG");
u32 arg;
if (pArg == NULL) {
arg = 0xFFFFFFFF;
@@ -539,7 +532,7 @@ void dEvDtStaff_c::specialProcCreate() {
pos = *pPos;
}
s32* pAngle = (s32*)dComIfGp_evmng_getMyIntegerP(staffIdx, "ANGLE");
int* pAngle = dComIfGp_evmng_getMyIntegerP(staffIdx, "ANGLE");
csXyz angle;
if (pAngle == NULL) {
angle.setall(0);
@@ -611,7 +604,7 @@ void dEvDtStaff_c::specialProcDirector() {
case ACT_FADE:
{
f32* rate = dComIfGp_evmng_getMyFloatP(staffIdx, "Rate");
u32* color = dComIfGp_evmng_getMyIntegerP(staffIdx, "Color");
int* color = dComIfGp_evmng_getMyIntegerP(staffIdx, "Color");
JUT_ASSERT(0x343, rate);
if (*rate > 0.0f) {
mDoGph_gInf_c::setFadeRate(0.0f);
@@ -631,7 +624,7 @@ void dEvDtStaff_c::specialProcDirector() {
break;
case ACT_BGM_START:
{
u32* pBGM = dComIfGp_evmng_getMyIntegerP(staffIdx, "BGM_ID");
int* pBGM = dComIfGp_evmng_getMyIntegerP(staffIdx, "BGM_ID");
u32 bgm;
static u32 bgm_table[] = {
JA_BGM_I_MAJU,
@@ -655,7 +648,7 @@ void dEvDtStaff_c::specialProcDirector() {
JUT_ASSERT(0x36b, FALSE);
const u8* pattern = (const u8*)dComIfGp_evmng_getMyIntegerP(staffIdx, "Pattern");
const u32* type = dComIfGp_evmng_getMyIntegerP(staffIdx, "Type");
const int* type = dComIfGp_evmng_getMyIntegerP(staffIdx, "Type");
if (pattern == NULL || type == NULL)
JUT_ASSERT(0x36f, FALSE);
@@ -668,7 +661,7 @@ void dEvDtStaff_c::specialProcDirector() {
break;
case ACT_SE_START:
{
s32* pSE = (s32*)dComIfGp_evmng_getMyIntegerP(staffIdx, "SENUM");
int* pSE = dComIfGp_evmng_getMyIntegerP(staffIdx, "SENUM");
if (pSE != NULL) {
static u32 se_table[] = {
JA_SE_CM_ZL_FDEMO_JIMEN,
@@ -689,7 +682,7 @@ void dEvDtStaff_c::specialProcDirector() {
mWipeDirection = 0;
else
mWipeDirection = 1;
u32* sound = dComIfGp_evmng_getMyIntegerP(staffIdx, "SOUND");
int* sound = dComIfGp_evmng_getMyIntegerP(staffIdx, "SOUND");
if (sound != NULL) {
switch (*sound) {
case 0:
@@ -801,7 +794,7 @@ void dEvDtStaff_c::specialProcPackage() {
JUT_ASSERT(0x42e, demo_data);
dComIfGp_demo_create((const u8*)demo_data, pOffsetPos, offsetAngY);
dComIfGp_event_setCullRate(10.0f);
u32* eventFlag = dComIfGp_evmng_getMyIntegerP(staffIdx, "EventFlag");
int* eventFlag = dComIfGp_evmng_getMyIntegerP(staffIdx, "EventFlag");
if (eventFlag != NULL)
dComIfGs_onEventBit(*eventFlag);
}
@@ -859,7 +852,7 @@ void dEvDtStaff_c::specialProcTimekeeper() {
switch (actIdx) {
case ACT_COUNTDOWN:
{
u32* idata = dComIfGp_evmng_getMyIntegerP(staffIdx, "Timer");
int* idata = dComIfGp_evmng_getMyIntegerP(staffIdx, "Timer");
JUT_ASSERT(0x482, idata);
mTimer = *idata;
}
+23 -23
View File
@@ -83,7 +83,7 @@ bool dNpc_EventCut_c::cutProc() {
/* 8021CED0-8021CF3C .text cutWaitStart__15dNpc_EventCut_cFv */
void dNpc_EventCut_c::cutWaitStart() {
u32* timer = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "Timer");
int* timer = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "Timer");
if(timer) {
mTimer = (s16)*timer;
}
@@ -103,7 +103,7 @@ void dNpc_EventCut_c::cutWaitProc() {
void dNpc_EventCut_c::cutTurnToActorStart() {
mpActorName = dComIfGp_evmng_getMyStringP(mEvtStaffId, "ActorName");
u32* set = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "SetId");
int* set = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "SetId");
if(set) {
mSetId = *set;
}
@@ -119,7 +119,7 @@ void dNpc_EventCut_c::cutTurnToActorStart() {
mOffsetPos.set(0.0f, 0.0f, 0.0f);
}
u32* turnType = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "TurnType");
int* turnType = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "TurnType");
if(turnType) {
mTurnType = *turnType;
}
@@ -127,7 +127,7 @@ void dNpc_EventCut_c::cutTurnToActorStart() {
mTurnType = 1;
}
u32* timer = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "Timer");
int* timer = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "Timer");
if(timer) {
mTimer = (s16)*timer;
}
@@ -135,7 +135,7 @@ void dNpc_EventCut_c::cutTurnToActorStart() {
mTimer = 1;
}
u32* speed = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "TurnSpeed");
int* speed = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "TurnSpeed");
if(speed) {
mTurnSpeed = *speed;
}
@@ -143,7 +143,7 @@ void dNpc_EventCut_c::cutTurnToActorStart() {
mTurnSpeed = 0;
}
u32* angle = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "AddAngle");
int* angle = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "AddAngle");
if(angle == 0) {
mAddAngle = 0;
}
@@ -159,7 +159,7 @@ void dNpc_EventCut_c::cutTurnToActorStart() {
pDelDistance = *dist;
}
u32* noTurn = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "NoTurn");
int* noTurn = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "NoTurn");
if(noTurn) {
mbNoTurn = 1;
}
@@ -240,13 +240,13 @@ void dNpc_EventCut_c::cutTurnToActorProc() {
/* 8021D51C-8021D730 .text cutMoveToActorStart__15dNpc_EventCut_cFv */
void dNpc_EventCut_c::cutMoveToActorStart() {
mpActorName = dComIfGp_evmng_getMyStringP(mEvtStaffId, "ActorName");
u32* set = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "SetId");
int* set = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "SetId");
f32* speed = dComIfGp_evmng_getMyFloatP(mEvtStaffId, "Speed");
f32* dist = dComIfGp_evmng_getMyFloatP(mEvtStaffId, "DelDistance");
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");
int* attn = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "Attention");
int* noTurn = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "NoTurn");
int* angle = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "ShapeAngle");
if(noTurn == 0) {
mbNoTurn = 0;
@@ -397,7 +397,7 @@ void dNpc_EventCut_c::cutTurnToPosStart() {
mPos.set(0.0f, 0.0f, 0.0f);
}
u32* turnType = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "TurnType");
int* turnType = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "TurnType");
if(turnType) {
mTurnType = *turnType;
}
@@ -405,7 +405,7 @@ void dNpc_EventCut_c::cutTurnToPosStart() {
mTurnType = 1;
}
u32* timer = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "Timer");
int* timer = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "Timer");
if(timer) {
mTimer = (s16)*timer;
}
@@ -413,7 +413,7 @@ void dNpc_EventCut_c::cutTurnToPosStart() {
mTimer = 1;
}
u32* speed = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "TurnSpeed");
int* speed = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "TurnSpeed");
if(speed) {
mTurnSpeed = *speed;
}
@@ -421,7 +421,7 @@ void dNpc_EventCut_c::cutTurnToPosStart() {
mTurnSpeed = 0;
}
u32* noTurn = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "NoTurn");
int* noTurn = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "NoTurn");
if(noTurn) {
mbNoTurn = 1;
}
@@ -429,7 +429,7 @@ void dNpc_EventCut_c::cutTurnToPosStart() {
mbNoTurn = 0;
}
u32* angle = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "AddAngle");
int* angle = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "AddAngle");
if(angle == 0) {
mAddAngle = 0;
}
@@ -480,9 +480,9 @@ void dNpc_EventCut_c::cutMoveToPosStart() {
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");
u32* noTurn = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "NoTurn");
u32* angle = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "AddAngle");
int* attn = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "Attention");
int* noTurn = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "NoTurn");
int* angle = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "AddAngle");
if(noTurn == 0) {
mbNoTurn = 0;
@@ -556,7 +556,7 @@ void dNpc_EventCut_c::cutMoveToPosProc() {
/* 8021E4C0-8021E58C .text cutTalkMsgProc__15dNpc_EventCut_cFv */
void dNpc_EventCut_c::cutTalkMsgStart() {
if(mpTalkActor != 0) {
u32* attn = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "Attention");
int* attn = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "Attention");
if(attn == 0) {
mbAttention = false;
}
@@ -564,8 +564,8 @@ void dNpc_EventCut_c::cutTalkMsgStart() {
mbAttention = true;
}
u32* firstMsgNo = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "msg_num");
u32* endMsgNo = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "end_msg");
int* firstMsgNo = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "msg_num");
int* endMsgNo = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "end_msg");
if(firstMsgNo == 0) {
mpTalkActor->mCurrMsgNo = 0;
}
@@ -586,7 +586,7 @@ void dNpc_EventCut_c::cutTalkMsgStart() {
/* 8021E444-8021E4C0 .text cutContinueTalkStart__15dNpc_EventCut_cFv */
void dNpc_EventCut_c::cutContinueTalkStart() {
if(mpTalkActor != 0) {
u32* endMsg = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "end_num");
int* endMsg = dComIfGp_evmng_getMyIntegerP(mEvtStaffId, "end_num");
if(endMsg) {
mpTalkActor->mEndMsgNo = *endMsg;
}