mirror of https://github.com/zeldaret/tp.git
d_a_npc_ks work (#2461)
* Initial work * Work on ori2 and others * Work on npc_ks_home * Work on npc_ks_demo_022 * Chugging through * Started on demo_camera * More demo_camera work * 51% equivalent * General cleanup * Fixed compile error in d_a_e_mk * Small d_a_e_mk fix * d_a_e_fs fix * PR cleanup * Started work on d_a_obj_sw
This commit is contained in:
parent
6fd5560738
commit
bc94559904
|
|
@ -2,6 +2,8 @@
|
|||
#define D_A_NPC_KS_H
|
||||
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_obj_so.h"
|
||||
#include "d/actor/d_a_obj_sw.h"
|
||||
|
||||
/**
|
||||
* @ingroup actors-npcs
|
||||
|
|
@ -11,23 +13,146 @@
|
|||
* @details
|
||||
*
|
||||
*/
|
||||
class npc_ks_class : public fopAc_ac_c {
|
||||
class npc_ks_class {
|
||||
public:
|
||||
/* 0x568 */ u8 field_0x568[0x5b6 - 0x568];
|
||||
/* 0x000 */ fopAc_ac_c actor;
|
||||
/* 0x568 */ u8 field_0x568[0x570 - 0x568];
|
||||
/* 0x570 */ u8 field_0x570;
|
||||
/* 0x571 */ u8 field_0x571[0x5b4 - 0x571];
|
||||
/* 0x5B4 */ u8 mRoomMonkeyID;
|
||||
/* 0x5B5 */ u8 field_0x5b5;
|
||||
/* 0x5B6 */ u8 field_0x5b6;
|
||||
/* 0x5B7 */ u8 field_0x5b7[0x5c8 - 0x5b7];
|
||||
/* 0x5B7 */ u8 field_0x5b7;
|
||||
/* 0x5B8 */ int field_0x5b8;
|
||||
/* 0x5BC */ int field_0x5bc;
|
||||
/* 0x5C0 */ char* mResName;
|
||||
/* 0x5C4 */ f32 field_0x5c4;
|
||||
/* 0x5C8 */ s16 field_0x5c8;
|
||||
/* 0x5CA */ u8 field_0x5ca[0x5ea - 0x5ca];
|
||||
/* 0x5CC */ mDoExt_McaMorfSO* mpModelMorf;
|
||||
/* 0x5D0 */ int field_0x5d0;
|
||||
/* 0x5D4 */ f32 field_0x5d4;
|
||||
/* 0x5D8 */ mDoExt_btpAnm* mBtp1;
|
||||
/* 0x5DC */ mDoExt_btpAnm* mBtp2;
|
||||
/* 0x5E0 */ s16 field_0x5e0;
|
||||
/* 0x5E2 */ u8 field_0x5e2[2];
|
||||
/* 0x5E4 */ s8 field_0x5e4;
|
||||
/* 0x5E5 */ u8 field_0x5e5;
|
||||
/* 0x5E6 */ s16 field_0x5e6;
|
||||
/* 0x5E8 */ s16 mActionID;
|
||||
/* 0x5EA */ s16 mMode;
|
||||
/* 0x5EC */ u8 field_0x5ec[0xc20 - 0x5ec];
|
||||
/* 0x5EC */ u32 mShadowKey;
|
||||
/* 0x5F0 */ s16 mTimers[4];
|
||||
/* 0x5F8 */ s16 field_0x5f8;
|
||||
/* 0x5FA */ s16 field_0x5fa;
|
||||
/* 0x5FC */ s8 field_0x5fc;
|
||||
/* 0x5FD */ u8 field_0x5fd;
|
||||
/* 0x5FE */ s16 field_0x5fe;
|
||||
/* 0x600 */ s16 field_0x600;
|
||||
/* 0x602 */ s16 field_0x602;
|
||||
/* 0x604 */ s16 field_0x604;
|
||||
/* 0x606 */ s16 field_0x606;
|
||||
/* 0x608 */ s16 field_0x608;
|
||||
/* 0x60C */ f32 field_0x60c;
|
||||
/* 0x610 */ s16 field_0x610;
|
||||
/* 0x614 */ cXyz field_0x614;
|
||||
/* 0x620 */ s8 field_0x620;
|
||||
/* 0x621 */ u8 field_0x621;
|
||||
/* 0x622 */ u8 field_0x622;
|
||||
/* 0x623 */ u8 field_0x623;
|
||||
/* 0x624 */ cXyz field_0x624;
|
||||
/* 0x630 */ int field_0x630;
|
||||
/* 0x634 */ f32 field_0x634;
|
||||
/* 0x638 */ f32 field_0x638;
|
||||
/* 0x63C */ f32 field_0x63c;
|
||||
/* 0x640 */ dBgS_AcchCir mAcchCir;
|
||||
/* 0x680 */ dBgS_ObjAcch mObjAcch;
|
||||
/* 0x858 */ u32 field_0x858;
|
||||
/* 0x85C */ u32 field_0x85c;
|
||||
/* 0x860 */ Z2Creature mSound;
|
||||
/* 0x8F0 */ cXyz field_0x8f0;
|
||||
/* 0x8FC */ csXyz field_0x8fc;
|
||||
/* 0x904 */ int field_0x904;
|
||||
/* 0x908 */ f32 field_0x908;
|
||||
/* 0x90C */ s8 field_0x90c;
|
||||
/* 0x910 */ cXyz field_0x910;
|
||||
/* 0x91C */ cXyz field_0x91c;
|
||||
/* 0x928 */ f32 field_0x928;
|
||||
/* 0x92C */ s8 field_0x92c;
|
||||
/* 0x930 */ void* field_0x930;
|
||||
/* 0x934 */ obj_sw_class* field_0x934;
|
||||
/* 0x938 */ fpc_ProcID field_0x938;
|
||||
/* 0x93C */ int field_0x93c;
|
||||
/* 0x940 */ cXyz field_0x940;
|
||||
/* 0x94C */ s16 field_0x94c;
|
||||
/* 0x94E */ s16 field_0x94e;
|
||||
/* 0x950 */ dCcD_Stts mStts;
|
||||
/* 0x98C */ dCcD_Cyl field_0x98c;
|
||||
/* 0xAC8 */ u8 field_0xac8[0xaec - 0xac8];
|
||||
/* 0xAEC */ s8 field_0xaec;
|
||||
/* 0xAED */ u8 field_0xaed[0xaf4 - 0xaed];
|
||||
/* 0xAF4 */ dMsgFlow_c mMsgFlow;
|
||||
/* 0xB40 */ u8 field_0xb40;
|
||||
/* 0xB41 */ u8 field_0xb41;
|
||||
/* 0xB42 */ s16 field_0xb42;
|
||||
/* 0xB44 */ s16 field_0xb44;
|
||||
/* 0xB48 */ cXyz field_0xb48;
|
||||
/* 0xB54 */ cXyz field_0xb54;
|
||||
/* 0xB60 */ cXyz field_0xb60;
|
||||
/* 0xB6C */ cXyz field_0xb6c;
|
||||
/* 0xB78 */ cXyz field_0xb78;
|
||||
/* 0xB84 */ cXyz field_0xb84;
|
||||
/* 0xB90 */ u8 field_0xb90[0xba8 - 0xb90];
|
||||
/* 0xBA8 */ cXyz field_0xba8;
|
||||
/* 0xBB4 */ f32 field_0xbb4;
|
||||
/* 0xBB8 */ f32 field_0xbb8;
|
||||
/* 0xBBC */ u8 field_0xbbc[0xbc0 - 0xbbc];
|
||||
/* 0xBC0 */ npc_ks_class* field_0xbc0;
|
||||
/* 0xBC4 */ f32 field_0xbc4;
|
||||
/* 0xBC8 */ cXyz field_0xbc8;
|
||||
/* 0xBD4 */ s16 field_0xbd4;
|
||||
/* 0xBD6 */ u8 field_0xbd6;
|
||||
/* 0xBD7 */ s8 field_0xbd7;
|
||||
/* 0xBD8 */ s8 field_0xbd8;
|
||||
/* 0xBD9 */ s8 field_0xbd9;
|
||||
/* 0xBDA */ u8 field_0xbda;
|
||||
/* 0xBDB */ s8 field_0xbdb;
|
||||
/* 0xBDC */ s8 field_0xbdc;
|
||||
/* 0xBDD */ s8 field_0xbdd;
|
||||
/* 0xBDE */ s16 field_0xbde;
|
||||
/* 0xBE0 */ s8 field_0xbe0;
|
||||
/* 0xBE4 */ u32 field_0xbe4[4];
|
||||
/* 0xBF4 */ u32 field_0xbf4;
|
||||
/* 0xBF8 */ u8 field_0xbf8[0xbfc - 0xbf8];
|
||||
/* 0xBFC */ J3DModel* field_0xbfc;
|
||||
/* 0xC00 */ J3DModel* field_0xc00;
|
||||
/* 0xC04 */ cXyz field_0xc04;
|
||||
/* 0xC10 */ u8 field_0xc10[0xc17 - 0xc10];
|
||||
/* 0xC17 */ s8 field_0xc17;
|
||||
/* 0xC18 */ u8 field_0xc18[0xc20 - 0xc18];
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(npc_ks_class) == 0xc20);
|
||||
|
||||
class daNpc_Ks_HIO_c {
|
||||
class daNpc_Ks_HIO_c : public JORReflexible {
|
||||
public:
|
||||
/* 80A48F8C */ daNpc_Ks_HIO_c();
|
||||
/* 80A5DA90 */ ~daNpc_Ks_HIO_c();
|
||||
/* 80A5DA90 */ virtual ~daNpc_Ks_HIO_c() {};
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
/* 0x04 */ s8 field_0x4;
|
||||
/* 0x08 */ f32 field_0x8;
|
||||
/* 0x0C */ f32 field_0xc;
|
||||
/* 0x10 */ f32 field_0x10;
|
||||
/* 0x14 */ f32 field_0x14;
|
||||
/* 0x18 */ f32 field_0x18;
|
||||
/* 0x1C */ f32 field_0x1c;
|
||||
/* 0x20 */ f32 field_0x20;
|
||||
/* 0x24 */ f32 field_0x24;
|
||||
/* 0x28 */ u8 field_0x28;
|
||||
/* 0x2C */ f32 field_0x2c;
|
||||
/* 0x30 */ f32 field_0x30;
|
||||
/* 0x34 */ f32 field_0x34;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,32 @@
|
|||
*
|
||||
*/
|
||||
class obj_so_class : public fopAc_ac_c {
|
||||
private:
|
||||
/* 0x568 */ u8 field_0x568[0x1bd0 - 0x568];
|
||||
public:
|
||||
/* 0x0568 */ u8 field_0x568[0x8fc - 0x568];
|
||||
/* 0x08FC */ f32 field_0x8fc;
|
||||
/* 0x0900 */ f32 field_0x900;
|
||||
/* 0x0904 */ u8 field_0x904[0x91c - 0x904];
|
||||
/* 0x091C */ int field_0x91c;
|
||||
/* 0x0920 */ cXyz field_0x920[12];
|
||||
/* 0x09B0 */ u8 field_0x9b0[0xdac - 0x9b0];
|
||||
/* 0x0DAC */ s16 field_0xdac;
|
||||
/* 0x0DAE */ s16 field_0xdae;
|
||||
/* 0x0DB0 */ u8 field_0xdb0[0xdc4 - 0xdb0];
|
||||
/* 0x0DC4 */ s8 field_0xdc4;
|
||||
/* 0x0DC5 */ u8 field_0xdc5[0xdc8 - 0xdc5];
|
||||
/* 0x0DC8 */ f32 field_0xdc8;
|
||||
/* 0x0DCC */ u8 field_0xdcc[0x1054 - 0xdcc];
|
||||
/* 0x1054 */ s8 field_0x1054;
|
||||
/* 0x1055 */ u8 field_0x1055[0x1a98 - 0x1055];
|
||||
/* 0x1A98 */ s8 field_0x1a98[7];
|
||||
/* 0x1A9F */ u8 field_0x1a9f[0x1bd0 - 0x1a9f];
|
||||
|
||||
bool partBreak() {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
if (field_0x1a98[i] == 2) return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(obj_so_class) == 0x1bd0);
|
||||
|
|
|
|||
|
|
@ -11,18 +11,63 @@
|
|||
* @details
|
||||
*
|
||||
*/
|
||||
class obj_sw_class : public fopAc_ac_c {
|
||||
private:
|
||||
/* 0x568 */ u8 field_0x568[0xd90 - 0x568];
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(obj_sw_class) == 0xd90);
|
||||
|
||||
struct obj_sc_s {
|
||||
public:
|
||||
/* 80CF2F3C */ ~obj_sc_s();
|
||||
/* 80CF2FA8 */ obj_sc_s();
|
||||
|
||||
/* 0x00 */ s8 field_0x0;
|
||||
/* 0x01 */ u8 field_0x1[0x4 - 0x1];
|
||||
/* 0x04 */ cXyz field_0x4;
|
||||
/* 0x10 */ cXyz field_0x10;
|
||||
/* 0x1C */ cXyz field_0x1c;
|
||||
/* 0x28 */ s16 field_0x28;
|
||||
/* 0x2A */ s16 field_0x2a;
|
||||
/* 0x2C */ s16 field_0x2c;
|
||||
/* 0x2E */ u8 field_0x2e[0x30 - 0x2e];
|
||||
/* 0x30 */ f32 field_0x30;
|
||||
/* 0x34 */ s8 field_0x34;
|
||||
/* 0x35 */ s8 field_0x35;
|
||||
/* 0x36 */ u8 field_0x36[0x38 - 0x36];
|
||||
/* 0x38 */ int field_0x38;
|
||||
/* 0x3C */ int field_0x3c;
|
||||
/* 0x40 */ mDoExt_McaMorf* mpModelMorf;
|
||||
/* 0x44 */ Z2SoundObjSimple mSound;
|
||||
/* 0x64 */ J3DModel* mpModel;
|
||||
/* 0x68 */ s16 field_0x68;
|
||||
// + 2 bytes of padding
|
||||
};
|
||||
|
||||
class obj_sw_class {
|
||||
public:
|
||||
/* 0x000 */ fopAc_ac_c actor;
|
||||
/* 0x568 */ u8 field_0x568[0x570 - 0x568];
|
||||
/* 0x570 */ u8 field_0x570;
|
||||
/* 0x571 */ u8 field_0x571[0x576 - 0x571];
|
||||
/* 0x576 */ s16 field_0x576;
|
||||
/* 0x578 */ u8 field_0x578[0x57a - 0x578];
|
||||
/* 0x57A */ s16 field_0x57a;
|
||||
/* 0x57C */ s16 field_0x57c;
|
||||
/* 0x57E */ s16 field_0x57e;
|
||||
/* 0x580 */ s16 field_0x580;
|
||||
/* 0x582 */ s16 field_0x582;
|
||||
/* 0x584 */ u8 field_0x584[0x5a8 - 0x584];
|
||||
/* 0x5A8 */ obj_sc_s field_0x5a8;
|
||||
/* 0x614 */ cXyz field_0x614;
|
||||
/* 0x620 */ u8 field_0x620[0x864 - 0x620];
|
||||
/* 0x864 */ obj_sc_s field_0x864;
|
||||
/* 0x8D0 */ u8 field_0x8d0[0x8fc - 0x8d0];
|
||||
/* 0x8FC */ f32 field_0x8fc;
|
||||
/* 0x900 */ f32 field_0x900;
|
||||
/* 0x904 */ cXyz field_0x904[2];
|
||||
/* 0x91C */ int field_0x91c;
|
||||
/* 0x920 */ cXyz field_0x920[12];
|
||||
/* 0x9B0 */ u8 field_0x9b0[0xd50 - 0x9b0];
|
||||
/* 0xD50 */ mDoExt_3DlineMat1_c field_0xd50;
|
||||
/* 0xD8C */ int field_0xd8c;
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(obj_sw_class) == 0xd90);
|
||||
|
||||
#endif /* D_A_OBJ_SW_H */
|
||||
|
|
|
|||
|
|
@ -1070,7 +1070,7 @@ public:
|
|||
mDemo.setParam2(i_param2);
|
||||
}
|
||||
|
||||
void changeDemoParam0(s16 i_param1) {
|
||||
void changeDemoParam0(int i_param1) {
|
||||
mDemo.setParam0(i_param1);
|
||||
}
|
||||
|
||||
|
|
@ -1156,6 +1156,8 @@ public:
|
|||
|
||||
void setGiantPuzzle() { mSpecialMode = SMODE_WOLF_PUZZLE; }
|
||||
void setGiantPuzzleEnd() { mSpecialMode = 0; }
|
||||
|
||||
BOOL checkAutoJumpStart() { return checkResetFlg0(RFLG0_UNK_100); }
|
||||
};
|
||||
|
||||
int daPy_addCalcShort(s16* param_0, s16 param_1, s16 param_2, s16 param_3, s16 param_4);
|
||||
|
|
|
|||
|
|
@ -1057,6 +1057,7 @@ u8 dComIfGs_checkGetInsectNum();
|
|||
u8 dComIfGs_getSelectMixItemNoArrowIndex(int i_selmixItemIdx);
|
||||
BOOL dComIfGs_isStageTbox(int i_stageNo, int i_no);
|
||||
s8 dComIfGs_PolyDamageOff_Check();
|
||||
void dComIfGs_shake_kandelaar();
|
||||
void dComIfGs_Grass_hide_Set(s8 param_0);
|
||||
void dComIfGs_onGetMagicUseFlag();
|
||||
void dComIfG_playerStatusD();
|
||||
|
|
|
|||
|
|
@ -356,6 +356,10 @@ inline u16 dMeter2Info_getOilGaugeBackUp() {
|
|||
return g_meter2_info.getOilGaugeBackUp();
|
||||
}
|
||||
|
||||
inline void dMeter2Info_setOilGaugeBackUp(u16 param_1) {
|
||||
g_meter2_info.mOilGaugeBackUp = param_1;
|
||||
}
|
||||
|
||||
inline void dMeter2Info_setSaveStageName(const char* i_stageName) {
|
||||
g_meter2_info.setSaveStageName(i_stageName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1093,6 +1093,7 @@ public:
|
|||
static s8 getRoomReadId() { return mRoomReadId; }
|
||||
static void offNoChangeRoom() { mNoChangeRoom = false; }
|
||||
static void onNoChangeRoom() { mNoChangeRoom = true; }
|
||||
static s8 getNextStayNo() { return mNextStayNo; }
|
||||
static void setProcID(u32 id) { mProcID = id; }
|
||||
static u32 getProcID() { return mProcID; }
|
||||
static void setStatusProcID(int i_roomNo, fpc_ProcID i_id) { mStatus[i_roomNo].mProcID = i_id; }
|
||||
|
|
|
|||
|
|
@ -478,7 +478,6 @@ static bool checkViewArea(cXyz* i_pos) {
|
|||
}
|
||||
|
||||
/* 806BCE5C-806BD0A8 00147C 024C+00 2/1 0/0 0/0 .text e_fs_demowait__FP10e_fs_class */
|
||||
// NONMATCHING regalloc
|
||||
static void e_fs_demowait(e_fs_class* i_this) {
|
||||
cXyz delta;
|
||||
npc_ks_class* monkey = (npc_ks_class*)fopAcM_SearchByName(PROC_NPC_KS);
|
||||
|
|
@ -499,8 +498,8 @@ static void e_fs_demowait(e_fs_class* i_this) {
|
|||
break;
|
||||
|
||||
case 2:
|
||||
delta.x = monkey->current.pos.x - i_this->current.pos.x;
|
||||
delta.z = monkey->current.pos.z - i_this->current.pos.z;
|
||||
delta.x = monkey->actor.current.pos.x - i_this->current.pos.x;
|
||||
delta.z = monkey->actor.current.pos.z - i_this->current.pos.z;
|
||||
i_this->mTargetAngleY = cM_atan2s(delta.x, delta.z);
|
||||
if (i_this->mAcch.ChkGroundHit()) {
|
||||
i_this->mpMorf->setPlaySpeed(1.0f);
|
||||
|
|
|
|||
|
|
@ -1193,7 +1193,7 @@ static void cam_3d_morf(e_mk_class* i_this, f32 param_2) {
|
|||
|
||||
/* 807174E4-8071823C 0034A4 0D58+00 1/1 0/0 0/0 .text demo_camera_start__FP10e_mk_class */
|
||||
static void demo_camera_start(e_mk_class* i_this) {
|
||||
// EQUIVALENT - REGALLOC
|
||||
// NONMATCHING
|
||||
fopAc_ac_c* a_this = &i_this->enemy;
|
||||
fopAc_ac_c* actor1, * actor2, * actor3;
|
||||
daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
|
||||
|
|
@ -1908,9 +1908,9 @@ static void demo_camera_r04(e_mk_class* i_this) {
|
|||
|
||||
switch (i_this->mDemoMode) {
|
||||
case 1:
|
||||
if (!i_actor->eventInfo.checkCommandDemoAccrpt()) {
|
||||
fopAcM_orderPotentialEvent(i_actor, 2, 0xffff, 0);
|
||||
i_actor->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
|
||||
if (!i_actor->actor.eventInfo.checkCommandDemoAccrpt()) {
|
||||
fopAcM_orderPotentialEvent(&i_actor->actor, 2, 0xffff, 0);
|
||||
i_actor->actor.eventInfo.onCondition(dEvtCnd_CANDEMO_e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1953,13 +1953,13 @@ static void demo_camera_r04(e_mk_class* i_this) {
|
|||
}
|
||||
|
||||
if (i_this->mDemoCamTimer == 260) {
|
||||
cMtx_YrotS(*calc_mtx, i_actor->shape_angle.y);
|
||||
cMtx_YrotS(*calc_mtx, i_actor->actor.shape_angle.y);
|
||||
sp2c.x = 200.0f;
|
||||
sp2c.y = 300.0f;
|
||||
sp2c.z = 300.0f;
|
||||
MtxPosition(&sp2c, &i_this->mCamEye);
|
||||
i_this->mCamEye += i_actor->current.pos;
|
||||
i_this->mCamCenter = i_actor->current.pos;
|
||||
i_this->mCamEye += i_actor->actor.current.pos;
|
||||
i_this->mCamCenter = i_actor->actor.current.pos;
|
||||
i_this->mCamCenter.y += 130.0f;
|
||||
i_this->mDemoMode = 3;
|
||||
i_this->mDemoCamTimer = 0;
|
||||
|
|
@ -1971,8 +1971,8 @@ static void demo_camera_r04(e_mk_class* i_this) {
|
|||
|
||||
case 3:
|
||||
a_this->current.pos.y = a_this->home.pos.y + 10000.0f;
|
||||
cLib_addCalc2(&i_this->mCamCenter.z, i_actor->current.pos.z, 0.2f, 50.0f);
|
||||
cLib_addCalc2(&i_this->mCamCenter.y, i_actor->current.pos.y + 130.0f + cM_ssin(i_this->mDemoCamTimer * 0xA00) * 30.0f, 0.2f, 50.0f);
|
||||
cLib_addCalc2(&i_this->mCamCenter.z, i_actor->actor.current.pos.z, 0.2f, 50.0f);
|
||||
cLib_addCalc2(&i_this->mCamCenter.y, i_actor->actor.current.pos.y + 130.0f + cM_ssin(i_this->mDemoCamTimer * 0xA00) * 30.0f, 0.2f, 50.0f);
|
||||
|
||||
if (i_this->mDemoCamTimer != 93) {
|
||||
return;
|
||||
|
|
@ -2004,22 +2004,22 @@ static void demo_camera_r04(e_mk_class* i_this) {
|
|||
i_this->mDemoMode = 45;
|
||||
i_this->mDemoCamTimer = 0;
|
||||
|
||||
cMtx_YrotS(*calc_mtx, i_actor->shape_angle.y);
|
||||
cMtx_YrotS(*calc_mtx, i_actor->actor.shape_angle.y);
|
||||
sp2c.x = -300.0f;
|
||||
sp2c.y = 200.0f;
|
||||
sp2c.z = -100.0f;
|
||||
MtxPosition(&sp2c, &i_this->mCamEye);
|
||||
i_this->mCamEye += i_actor->current.pos;
|
||||
i_this->mCamCenter = i_actor->current.pos;
|
||||
i_this->mCamEye += i_actor->actor.current.pos;
|
||||
i_this->mCamCenter = i_actor->actor.current.pos;
|
||||
i_this->mCamCenter.y += 90.0f;
|
||||
return;
|
||||
|
||||
case 45:
|
||||
cLib_addCalc2(&i_this->mCamCenter.z, i_actor->current.pos.z, 0.2f, 50.0f);
|
||||
cLib_addCalc2(&i_this->mCamCenter.y, i_actor->current.pos.y + 90.0f + 30.0f * cM_ssin(i_this->mDemoCamTimer * 0xA00), 0.2f, 50.0f);
|
||||
cLib_addCalc2(&i_this->mCamCenter.z, i_actor->actor.current.pos.z, 0.2f, 50.0f);
|
||||
cLib_addCalc2(&i_this->mCamCenter.y, i_actor->actor.current.pos.y + 90.0f + 30.0f * cM_ssin(i_this->mDemoCamTimer * 0xA00), 0.2f, 50.0f);
|
||||
|
||||
if (i_this->mDemoCamTimer == 10) {
|
||||
i_actor->field_0x567 = 1;
|
||||
i_actor->actor.field_0x567 = 1;
|
||||
}
|
||||
|
||||
if (i_this->mDemoCamTimer != 55) {
|
||||
|
|
@ -2055,8 +2055,8 @@ static void demo_camera_r04(e_mk_class* i_this) {
|
|||
i_this->mCamEye.set(-477.0f, 3119.0f, 1643.0f);
|
||||
|
||||
if (i_this->mDemoCamTimer == 30) {
|
||||
i_actor->current.pos.z = 1600.0f;
|
||||
i_actor->current.pos.y = 3200.0f;
|
||||
i_actor->actor.current.pos.z = 1600.0f;
|
||||
i_actor->actor.current.pos.y = 3200.0f;
|
||||
}
|
||||
|
||||
if (i_this->mDemoCamTimer != 69) {
|
||||
|
|
@ -2089,8 +2089,8 @@ static void demo_camera_r04(e_mk_class* i_this) {
|
|||
i_this->mCamCenter.y += 190.0f;
|
||||
// fallthrough
|
||||
case 7:
|
||||
i_actor->speed.y = 0.0f;
|
||||
i_actor->current.pos.set(0.0f, 2500.0f, 3373.0f);
|
||||
i_actor->actor.speed.y = 0.0f;
|
||||
i_actor->actor.current.pos.set(0.0f, 2500.0f, 3373.0f);
|
||||
|
||||
if (i_this->mDemoCamTimer != 250) {
|
||||
return;
|
||||
|
|
@ -2100,14 +2100,14 @@ static void demo_camera_r04(e_mk_class* i_this) {
|
|||
i_this->mDemoCamTimer = 0;
|
||||
i_actor->mMode++;
|
||||
i_this->mCamEye.set(-282.0f, 2534.0f, 3147.0f);
|
||||
i_this->mCamCenter = i_actor->current.pos;
|
||||
i_this->mCamCenter = i_actor->actor.current.pos;
|
||||
// fallthrough
|
||||
case 8:
|
||||
cLib_addCalc2(&i_this->mCamCenter.y, i_actor->current.pos.y, 0.2f, 50.0f);
|
||||
cLib_addCalc2(&i_this->mCamCenter.y, i_actor->actor.current.pos.y, 0.2f, 50.0f);
|
||||
fpcM_Search(s_brg_sub, i_this);
|
||||
|
||||
if (i_this->mDemoCamTimer == 65) {
|
||||
i_actor->current.pos.set(0.0f, 3310.0f, 3427.0f);
|
||||
i_actor->actor.current.pos.set(0.0f, 3310.0f, 3427.0f);
|
||||
i_actor->mMode++;
|
||||
i_this->mDemoMode = 9;
|
||||
i_this->mDemoCamTimer = 0;
|
||||
|
|
@ -2238,7 +2238,7 @@ static void demo_camera(e_mk_class* i_this) {
|
|||
|
||||
i_no = fopAcM_GetParam(i_actor) >> 24;
|
||||
if (i_no != 0xFF) {
|
||||
dComIfGs_onSwitch(i_no, fopAcM_GetRoomNo(i_actor));
|
||||
dComIfGs_onSwitch(i_no, fopAcM_GetRoomNo(&i_actor->actor));
|
||||
}
|
||||
|
||||
dComIfGp_setNextStage("D_MN05", 0, 4, 0);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -6,8 +6,8 @@
|
|||
//#define VIRTUAL_3DLINEMAT
|
||||
#include "m_Do/m_Do_ext.h"
|
||||
#include "d/d_camera.h"
|
||||
|
||||
#include "d/actor/d_a_obj_sw.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "dol2asm.h"
|
||||
|
||||
|
||||
|
|
@ -118,154 +118,239 @@ extern "C" extern void* __vt__19mDoExt_3DlineMat1_c[5];
|
|||
extern "C" extern void* __vt__16Z2SoundObjSimple[8];
|
||||
extern "C" u8 m_cpadInfo__8mDoCPd_c[256];
|
||||
extern "C" u8 now__14mDoMtx_stack_c[48];
|
||||
extern "C" extern u8 g_dComIfG_gameInfo[122384];
|
||||
extern "C" u8 sincosTable___5JMath[65536];
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80CF30FC-80CF3100 000000 0004+00 1/1 0/0 0/0 .data l_color$3804 */
|
||||
SECTION_DATA static u8 l_color[4] = {
|
||||
0x14,
|
||||
0x0F,
|
||||
0x00,
|
||||
0xFF,
|
||||
};
|
||||
|
||||
/* 80CF0638-80CF0774 000078 013C+00 1/0 0/0 0/0 .text daObj_Sw_Draw__FP12obj_sw_class */
|
||||
static void daObj_Sw_Draw(obj_sw_class* param_0) {
|
||||
static int daObj_Sw_Draw(obj_sw_class* i_this) {
|
||||
// NONMATCHING
|
||||
static _GXColor l_color = {
|
||||
0x14,
|
||||
0x0F,
|
||||
0x00,
|
||||
0xFF,
|
||||
};
|
||||
|
||||
fopAc_ac_c* a_this = &i_this->actor;
|
||||
if (i_this->field_0x570 == 8) {
|
||||
g_env_light.settingTevStruct(0, &a_this->current.pos, &a_this->tevStr);
|
||||
obj_sc_s* sc_p = &i_this->field_0x5a8;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
if (sc_p->field_0x0 != 0) {
|
||||
g_env_light.setLightTevColorType_MAJI(sc_p->mpModelMorf->getModel(), &a_this->tevStr);
|
||||
sc_p->mpModelMorf->entryDL();
|
||||
|
||||
if (i == 2 && i_this->field_0x864.mpModel != NULL) {
|
||||
g_env_light.setLightTevColorType_MAJI(i_this->field_0x864.mpModel, &a_this->tevStr);
|
||||
mDoExt_modelUpdateDL(i_this->field_0x864.mpModel);
|
||||
}
|
||||
}
|
||||
sc_p = (obj_sc_s *)((s8*)sc_p + 100);
|
||||
}
|
||||
} else {
|
||||
g_env_light.settingTevStruct(16, &a_this->current.pos, &a_this->tevStr);
|
||||
i_this->field_0xd50.update(63, l_color, &a_this->tevStr);
|
||||
dComIfGd_set3DlineMat(&i_this->field_0xd50);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80CF3278-80CF327C 000000 0004+00 3/3 0/0 0/0 .bss saru_ct */
|
||||
static u8 saru_ct[4];
|
||||
static int saru_ct;
|
||||
|
||||
/* 80CF0774-80CF07F8 0001B4 0084+00 1/1 0/0 0/0 .text s_ks_sub__FPvPv */
|
||||
static void s_ks_sub(void* param_0, void* param_1) {
|
||||
// NONMATCHING
|
||||
static void* s_ks_sub(void* i_actor, void* i_data) {
|
||||
if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_NPC_KS) {
|
||||
int swBit = fopAcM_GetParam(i_actor) >> 24;
|
||||
if (swBit != 0xFF) {
|
||||
if (dComIfGs_isSwitch(swBit, fopAcM_GetRoomNo((fopAc_ac_c*)i_actor))) {
|
||||
saru_ct++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct path {
|
||||
int field_0x0;
|
||||
f32 field_0x4;
|
||||
f32 field_0x8;
|
||||
f32 field_0xc;
|
||||
};
|
||||
/* ############################################################################################## */
|
||||
/* 80CF3100-80CF3210 000004 0110+00 3/3 0/0 0/0 .data sc_path */
|
||||
SECTION_DATA static u8 sc_path[272] = {
|
||||
0x00, 0x00, 0x00, 0x01, 0x45, 0xFF, 0x60, 0x00, 0x45, 0x53, 0x40, 0x00, 0xC6, 0x2A, 0x1C, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x46, 0x01, 0xC4, 0x00, 0x45, 0x5C, 0x40, 0x00, 0xC6, 0x30, 0x2C, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x46, 0x09, 0x18, 0x00, 0x45, 0x65, 0xD0, 0x00, 0xC6, 0x27, 0xA0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x46, 0x09, 0x68, 0x00, 0x45, 0x65, 0xD0, 0x00, 0xC6, 0x32, 0x80, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x46, 0x10, 0xCC, 0x00, 0x45, 0x72, 0xF0, 0x00, 0xC6, 0x25, 0x68, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x46, 0x0C, 0xD4, 0x00, 0x45, 0x73, 0xE0, 0x00, 0xC6, 0x37, 0x5C, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x46, 0x0F, 0x80, 0x00, 0x45, 0x79, 0xD0, 0x00, 0xC6, 0x2F, 0x78, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x46, 0x10, 0x58, 0x00, 0x45, 0x80, 0xF8, 0x00, 0xC6, 0x39, 0xB8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x46, 0x16, 0x60, 0x00, 0x45, 0x8F, 0xD0, 0x00, 0xC6, 0x36, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x46, 0x14, 0xA4, 0x00, 0x45, 0x97, 0xB0, 0x00, 0xC6, 0x3E, 0xC4, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x46, 0x0D, 0x64, 0x00, 0x45, 0x9D, 0x58, 0x00, 0xC6, 0x3C, 0x48, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x46, 0x08, 0x2C, 0x00, 0x45, 0x9E, 0xD8, 0x00, 0xC6, 0x38, 0x24, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x46, 0x03, 0xB0, 0x00, 0x45, 0xA2, 0xB0, 0x00, 0xC6, 0x31, 0xF0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x7C, 0x00, 0x45, 0xA7, 0x48, 0x00, 0xC6, 0x2F, 0xC8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x45, 0xF5, 0x58, 0x00, 0x45, 0xAA, 0xA0, 0x00, 0xC6, 0x30, 0x14, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x45, 0xED, 0x78, 0x00, 0x45, 0xAD, 0x08, 0x00, 0xC6, 0x2E, 0xC8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
static path sc_path[17] = {
|
||||
{1, 8172.0f, 3380.0f, -10887.0f},
|
||||
{1, 8305.0f, 3524.0f, -11275.0f},
|
||||
{1, 8774.0f, 3677.0f, -10728.0f},
|
||||
{1, 8794.0f, 3677.0f, -11424.0f},
|
||||
{1, 9267.0f, 3887.0f, -10586.0f},
|
||||
{1, 9013.0f, 3902.0f, -11735.0f},
|
||||
{1, 9184.0f, 3997.0f, -11230.0f},
|
||||
{1, 9238.0f, 4127.0f, -11886.0f},
|
||||
{1, 9624.0f, 4602.0f, -11648.0f},
|
||||
{0, 9513.0f, 4854.0f, -12209.0f},
|
||||
{0, 9049.0f, 5035.0f, -12050.0f},
|
||||
{0, 8715.0f, 5083.0f, -11785.0f},
|
||||
{0, 8428.0f, 5206.0f, -11388.0f},
|
||||
{0, 8223.0f, 5353.0f, -11250.0f},
|
||||
{0, 7851.0f, 5460.0f, -11269.0f},
|
||||
{0, 7599.0f, 5537.0f, -11186.0f},
|
||||
{0, 0.0f, 0.0f, 0.0f},
|
||||
// 0x00000001, 0x45FF6000, 0x45534000, 0xC62A1C00,
|
||||
// 0x00000001, 0x4601C400, 0x455C4000, 0xC6302C00,
|
||||
// 0x00000001, 0x46091800, 0x4565D000, 0xC627A000,
|
||||
// 0x00000001, 0x46096800, 0x4565D000, 0xC6328000,
|
||||
// 0x00000001, 0x4610CC00, 0x4572F000, 0xC6256800,
|
||||
// 0x00000001, 0x460CD400, 0x4573E000, 0xC6375C00,
|
||||
// 0x00000001, 0x460F8000, 0x4579D000, 0xC62F7800,
|
||||
// 0x00000001, 0x46105800, 0x4580F800, 0xC639B800,
|
||||
// 0x00000001, 0x46166000, 0x458FD000, 0xC6360000,
|
||||
// 0x00000000, 0x4614A400, 0x4597B000, 0xC63EC400,
|
||||
// 0x00000000, 0x460D6400, 0x459D5800, 0xC63C4800,
|
||||
// 0x00000000, 0x46082C00, 0x459ED800, 0xC6382400,
|
||||
// 0x00000000, 0x4603B000, 0x45A2B000, 0xC631F000,
|
||||
// 0x00000000, 0x46007C00, 0x45A74800, 0xC62FC800,
|
||||
// 0x00000000, 0x45F55800, 0x45AAA000, 0xC6301400,
|
||||
// 0x00000000, 0x45ED7800, 0x45AD0800, 0xC62EC800,
|
||||
// 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
};
|
||||
|
||||
/* 80CF07F8-80CF08F8 000238 0100+00 1/1 0/0 0/0 .text s_ksdel_sub__FPvPv */
|
||||
static void s_ksdel_sub(void* param_0, void* param_1) {
|
||||
static void* s_ksdel_sub(void* i_actor, void* i_data) {
|
||||
// NONMATCHING
|
||||
if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_NPC_KS) {
|
||||
fopAcM_delete((fopAc_ac_c*)i_actor);
|
||||
|
||||
saru_ct++;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80CF3000-80CF3004 000000 0004+00 8/8 0/0 0/0 .rodata @3850 */
|
||||
SECTION_RODATA static u8 const lit_3850[4] = {
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x80CF3000, &lit_3850);
|
||||
|
||||
/* 80CF3004-80CF3008 000004 0004+00 1/1 0/0 0/0 .rodata @3851 */
|
||||
SECTION_RODATA static f32 const lit_3851 = -1.0f;
|
||||
COMPILER_STRIP_GATE(0x80CF3004, &lit_3851);
|
||||
|
||||
/* 80CF30EC-80CF30EC 0000EC 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DEAD static char const* const stringBase_80CF30EC = "Npc_ksw";
|
||||
#pragma pop
|
||||
|
||||
/* 80CF08F8-80CF09A8 000338 00B0+00 3/3 0/0 0/0 .text anm_init__FP8obj_sc_sifUcf */
|
||||
static void anm_init(obj_sc_s* param_0, int param_1, f32 param_2, u8 param_3, f32 param_4) {
|
||||
// NONMATCHING
|
||||
static void anm_init(obj_sc_s* i_this, int param_2, f32 i_morf, u8 i_mode, f32 i_speed) {
|
||||
i_this->mpModelMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("Npc_ksw", param_2), i_mode, i_morf,
|
||||
i_speed, 0.0f, -1.0f, NULL);
|
||||
i_this->field_0x3c = param_2;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80CF3008-80CF300C 000008 0004+00 0/4 0/0 0/0 .rodata @3976 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static f32 const lit_3976 = 5.0f;
|
||||
COMPILER_STRIP_GATE(0x80CF3008, &lit_3976);
|
||||
#pragma pop
|
||||
|
||||
/* 80CF300C-80CF3010 00000C 0004+00 0/5 0/0 0/0 .rodata @3977 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static f32 const lit_3977 = 1.0f;
|
||||
COMPILER_STRIP_GATE(0x80CF300C, &lit_3977);
|
||||
#pragma pop
|
||||
|
||||
/* 80CF3010-80CF3014 000010 0004+00 0/3 0/0 0/0 .rodata @3978 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static f32 const lit_3978 = 2.0f;
|
||||
COMPILER_STRIP_GATE(0x80CF3010, &lit_3978);
|
||||
#pragma pop
|
||||
|
||||
/* 80CF3014-80CF3018 000014 0004+00 0/4 0/0 0/0 .rodata @3979 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static f32 const lit_3979 = 40.0f;
|
||||
COMPILER_STRIP_GATE(0x80CF3014, &lit_3979);
|
||||
#pragma pop
|
||||
|
||||
/* 80CF3018-80CF301C 000018 0004+00 0/1 0/0 0/0 .rodata @3980 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static f32 const lit_3980 = 25.0f;
|
||||
COMPILER_STRIP_GATE(0x80CF3018, &lit_3980);
|
||||
#pragma pop
|
||||
|
||||
/* 80CF301C-80CF3020 00001C 0004+00 0/1 0/0 0/0 .rodata @3981 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static f32 const lit_3981 = 1700.0f;
|
||||
COMPILER_STRIP_GATE(0x80CF301C, &lit_3981);
|
||||
#pragma pop
|
||||
|
||||
/* 80CF3020-80CF3024 000020 0004+00 0/1 0/0 0/0 .rodata @3982 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static f32 const lit_3982 = -35.0f;
|
||||
COMPILER_STRIP_GATE(0x80CF3020, &lit_3982);
|
||||
#pragma pop
|
||||
|
||||
/* 80CF3024-80CF3028 000024 0004+00 0/2 0/0 0/0 .rodata @3983 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static f32 const lit_3983 = 30.0f;
|
||||
COMPILER_STRIP_GATE(0x80CF3024, &lit_3983);
|
||||
#pragma pop
|
||||
|
||||
/* 80CF09A8-80CF1008 0003E8 0660+00 1/1 0/0 0/0 .text sc_build__FP12obj_sw_class */
|
||||
static void sc_build(obj_sw_class* param_0) {
|
||||
static void sc_build(obj_sw_class* i_this) {
|
||||
// NONMATCHING
|
||||
}
|
||||
fopAc_ac_c* a_this = &i_this->actor;
|
||||
obj_sc_s* sc_p = &i_this->field_0x5a8;
|
||||
cXyz sp24, sp30;
|
||||
|
||||
/* 80CF1008-80CF1044 000A48 003C+00 1/1 0/0 0/0 .text __dt__4cXyzFv */
|
||||
//cXyz::~cXyz() {
|
||||
void __dt__4cXyzFv() {
|
||||
// NONMATCHING
|
||||
for (int i = 0; i < 8; i++) {
|
||||
if (sc_p->field_0x34 != 0) {
|
||||
sc_p->field_0x34--;
|
||||
}
|
||||
|
||||
s16 sVar1;
|
||||
switch (sc_p->field_0x0) {
|
||||
case 0:
|
||||
anm_init(sc_p, 14, 5.0f, 2, 1.0f);
|
||||
sc_p->field_0x0 = 1;
|
||||
sc_p->field_0x10 = sc_p->field_0x4;
|
||||
sc_p->field_0x1c.x = sc_path[sc_p->field_0x38].field_0x4;
|
||||
sc_p->field_0x1c.y = sc_path[sc_p->field_0x38].field_0x8;
|
||||
sc_p->field_0x1c.z = sc_path[sc_p->field_0x38].field_0xc;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
sp24 = sc_p->field_0x1c - sc_p->field_0x4;
|
||||
cLib_addCalcAngleS2(&sc_p->field_0x2a, cM_atan2s(sp24.x, sp24.z), 1, 0x2000);
|
||||
if (sc_p->field_0x34 == 0) {
|
||||
sc_p->field_0x0 = 2;
|
||||
anm_init(sc_p, 11, 2.0f, 0, 1.0f);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (sc_path[sc_p->field_0x38].field_0x0 == 1) {
|
||||
if (sc_p->field_0x3c == 11) {
|
||||
if (sc_p->mpModelMorf->isStop()) {
|
||||
anm_init(sc_p, 12, 1.0f, 0, 1.0f);
|
||||
sc_p->mSound.startSound(Z2SE_KOSARU_V_JUMP, 0, -1);
|
||||
sc_p->mSound.startSound(Z2SE_KOSARU_JUMP_START, 0, -1);
|
||||
sc_p->mSound.startSound(Z2SE_KOSARU_JUMP_WIND, 0, -1);
|
||||
sc_p->field_0x30 = 40.0f;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sc_p->field_0x30 = 25.0f;
|
||||
}
|
||||
|
||||
sp24 = sc_p->field_0x1c - sc_p->field_0x4;
|
||||
sVar1 = cM_atan2s(sp24.x, sp24.z);
|
||||
cLib_addCalcAngleS2(&sc_p->field_0x2a, sVar1, 1, 0x2000);
|
||||
cMtx_YrotS(*calc_mtx, sVar1);
|
||||
cMtx_XrotM(*calc_mtx, -cM_atan2s(sp24.y, JMAFastSqrt(sp24.x * sp24.x + sp24.z * sp24.z)));
|
||||
sp24.x = 0.0f;
|
||||
sp24.y = 0.0f;
|
||||
sp24.z = sc_p->field_0x30;
|
||||
MtxPosition(&sp24, &sp30);
|
||||
sc_p->field_0x4 += sp30;
|
||||
sp24 = sc_p->field_0x1c - sc_p->field_0x4;
|
||||
|
||||
if ((sp24.x * sp24.x + sp24.z * sp24.z) <= 1700.0f) {
|
||||
sc_p->field_0x4 = sc_p->field_0x1c;
|
||||
if (sc_p->field_0x38 == 16) {
|
||||
sc_p->field_0x0 = 3;
|
||||
anm_init(sc_p, 4, 2.0f, 2, 2.0f);
|
||||
sc_p->field_0x30 = 0.0f;
|
||||
sc_p->mSound.startSound(Z2SE_KOSARU_V_WAIT, 0, -1);
|
||||
} else {
|
||||
sc_p->field_0x38++;
|
||||
sc_p->field_0x10 = sc_p->field_0x4;
|
||||
sc_p->field_0x1c.x = sc_path[sc_p->field_0x38].field_0x4;
|
||||
sc_p->field_0x1c.y = sc_path[sc_p->field_0x38].field_0x8;
|
||||
sc_p->field_0x1c.z = sc_path[sc_p->field_0x38].field_0xc;
|
||||
|
||||
if (sc_path[sc_p->field_0x38].field_0x0 == 1) {
|
||||
anm_init(sc_p, 11, 2.0f, 0, 1.0f);
|
||||
sc_p->field_0x30 = 0.0f;
|
||||
} else if (sc_p->field_0x3c != 10) {
|
||||
anm_init(sc_p, 10, 2.0f, 2, 1.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
cLib_addCalcAngleS2(&sc_p->field_0x2a, a_this->current.angle.y + 0x8000, 2, 0x1000);
|
||||
cMtx_YrotS(*calc_mtx, sc_p->field_0x2a);
|
||||
sp24.x = 0.0f;
|
||||
sp24.y = 0.0f;
|
||||
sp24.z = -35.0f;
|
||||
MtxPosition(&sp24, &sp30);
|
||||
cLib_addCalc2(&sc_p->field_0x4.x, a_this->eyePos.x + sp30.x, 1.0f, 30.0f);
|
||||
cLib_addCalc2(&sc_p->field_0x4.y, a_this->eyePos.y, 1.0f, 30.0f);
|
||||
cLib_addCalc2(&sc_p->field_0x4.z, a_this->eyePos.z + sp30.z, 1.0f, 30.0f);
|
||||
|
||||
if (sc_p->field_0x4.y <= a_this->eyePos.y + 1.0f) {
|
||||
sp24 = sc_p->field_0x4 - a_this->eyePos;
|
||||
anm_init(sc_p, 13, 5.0f, 0, 1.0f);
|
||||
sc_p->field_0x0 = 10;
|
||||
sc_p->mSound.startSound(Z2SE_KOSARU_V_WAIT, 0, -1);
|
||||
|
||||
if (i == 7) {
|
||||
i_this->field_0x576 = 2;
|
||||
i_this->field_0x57c = 120;
|
||||
int swBit = fopAcM_GetParam(a_this) >> 24;
|
||||
if (swBit != 0xFF) {
|
||||
dComIfGs_onSwitch(swBit, fopAcM_GetRoomNo(a_this));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sc_p->field_0x30 >= 30.0f) {
|
||||
sc_p->field_0x35 = 1;
|
||||
}
|
||||
|
||||
sc_p = (obj_sc_s *)((s8*)sc_p + 100);
|
||||
}
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
|
|
@ -360,8 +445,21 @@ COMPILER_STRIP_GATE(0x80CF3060, &lit_4067);
|
|||
#pragma pop
|
||||
|
||||
/* 80CF1044-80CF1384 000A84 0340+00 1/1 0/0 0/0 .text sc_move__FP12obj_sw_class */
|
||||
static void sc_move(obj_sw_class* param_0) {
|
||||
static void sc_move(obj_sw_class* i_this) {
|
||||
// NONMATCHING
|
||||
cXyz sp24, sp30;
|
||||
|
||||
if (i_this->field_0x864.field_0x68 == 0) {
|
||||
if (i_this->field_0x57a == 0) {
|
||||
if (cM_rndF(1.0f) >= 0.2f) {
|
||||
if (cM_rndF(1.0f) >= 0.33f) {
|
||||
if (cM_rndF(1.0f) >= 0.5f) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
|
|
|
|||
Loading…
Reference in New Issue