rotation -> mRotation

This commit is contained in:
elijah-thomas774
2025-09-16 20:19:32 -04:00
parent 523a8be636
commit 795183d928
109 changed files with 535 additions and 483 deletions
+26 -27
View File
@@ -69,11 +69,11 @@ public:
/* 0x9C */ mVec3_c pos_copy;
/* 0xA8 */ u32 params2;
/* 0xAC */ mAng3_c rot_copy;
/* 0xB2 */ u16 obj_id; // enemydefeat flag / id on obj-map
/* 0xB2 */ u16 obj_id;
/* 0xB4 */ s8 room_id_copy;
/* 0xB5 */ s8 viewclip_index;
/* 0xB6 */ u8 subtype;
/* 0xB8 */ mAng3_c rotation;
/* 0xB8 */ mAng3_c mRotation;
/* 0xC0 */ mVec3_c position;
/* 0xCC */ mVec3_c mScale;
/* 0xD8 */ u32 actor_properties;
@@ -88,51 +88,50 @@ public:
/* 0xF8 */ char field_0xf8[0xfc - 0xf8];
public:
/* 80501544 */ // vtable
/* 0x08 | 8002c880 */ virtual int create();
/* 0x10 | 8002c8f0 */ virtual void postCreate(MAIN_STATE_e state);
/* 0x18 | 8002c940 */ virtual int preDelete();
/* 0x20 | 8002cc10 */ virtual int execute(); // calls either actorExecute/executeInEvent
/* 0x24 | 8002cb10 */ virtual int preExecute(); // looks at some actor properties
/* 0x28 | 8002ccc0 */ virtual void postExecute(MAIN_STATE_e state); // not fully understood
/* 0x44 | 8002c3a0 */ virtual bool createHeap();
/* 0x48 | 8002c590 */ virtual ~dAcBase_c();
/* 0x4C | 8002c860 */ virtual int actorCreate(); // name is assumed
/* 0x50 | 8002c870 */ virtual int actorPostCreate(); // name is assumed
/* 0x54 | 8002cca0 */ virtual int actorExecute(); // name is assumed
/* 0x58 | 8002ccb0 */ virtual int actorExecuteInEvent(); // name is assumed
/* 0x5C | 8002ce90 */ virtual void unkVirtFunc_0x5C();
/* 0x60 | 8002cea0 */ virtual void unkVirtFunc_0x60();
/* 0x64 | 8002ceb0 */ virtual bool restorePosRotFromCopy();
/* 0x68 | 8002db80 */ virtual void registerInEvent();
/* 0x6C | 8002db90 */ virtual void unkVirtFunc_0x6C();
/* 0x70 | 8002dba0 */ virtual void doInteraction(s32);
/* vt 0x08 */ virtual int create();
/* vt 0x10 */ virtual void postCreate(MAIN_STATE_e state);
/* vt 0x18 */ virtual int preDelete();
/* vt 0x20 */ virtual int execute();
/* vt 0x24 */ virtual int preExecute();
/* vt 0x28 */ virtual void postExecute(MAIN_STATE_e state);
/* vt 0x44 */ virtual bool createHeap();
/* vt 0x48 */ virtual ~dAcBase_c();
/* vt 0x4C */ virtual int actorCreate();
/* vt 0x50 */ virtual int actorPostCreate();
/* vt 0x54 */ virtual int actorExecute();
/* vt 0x58 */ virtual int actorExecuteInEvent();
/* vt 0x5C */ virtual void unkVirtFunc_0x5C();
/* vt 0x60 */ virtual void unkVirtFunc_0x60();
/* vt 0x64 */ virtual bool restorePosRotFromCopy();
/* vt 0x68 */ virtual void registerInEvent();
/* vt 0x6C */ virtual void unkVirtFunc_0x6C();
/* vt 0x70 */ virtual void doInteraction(s32);
public:
/* 8002c3b0 */ dAcBase_c();
dAcBase_c();
void setPostion(const mVec3_c &r) {
void setPosition(const mVec3_c &r) {
position = r;
}
void SetScale(const mVec3_c &r) {
void setScale(const mVec3_c &r) {
mScale = r;
}
void SetRotation(const mAng3_c &r) {
rotation = r;
mRotation = r;
}
void copyPosition() {
pos_copy = position;
}
void copyRotation() {
rot_copy = rotation;
rot_copy = mRotation;
}
mVec3_c &GetPosition() {
return position;
}
mAng3_c &GetRotation() {
return rotation;
return mRotation;
}
mVec3_c GetPostionDifference(const dAcBase_c &other) {
+4 -4
View File
@@ -49,19 +49,19 @@ public:
/* 0x84 */ virtual bool hasPath() const {
return getPath() >= 0 && getPath() < 0xFF;
}
/* 0x88 */ virtual const char* getAnmArcNameBase() const {
/* 0x88 */ virtual const char *getAnmArcNameBase() const {
return "BirdAnm";
}
/* 0x8C */ virtual const char* getAnmArcNameLink() const {
/* 0x8C */ virtual const char *getAnmArcNameLink() const {
return "BirdLinkAnm";
}
/* 0x90 */ virtual const char* getAnmArcNameSpecial() const {
/* 0x90 */ virtual const char *getAnmArcNameSpecial() const {
return "BirdLinkAnm";
}
protected:
s32 getPath() const {
return params & 0xFF;
return mParams & 0xFF;
}
void updateMatrixBird();
+2 -2
View File
@@ -41,11 +41,11 @@ private:
}
int getParam1() {
return params & 7;
return mParams & 7;
}
int getParam2() {
return params >> 7 & 3;
return mParams >> 7 & 3;
}
};
+5 -6
View File
@@ -20,7 +20,6 @@
#include "toBeSorted/stage_render_stuff.h"
#include "toBeSorted/time_area_mgr.h"
class dAcEsm_c : public dAcEnBase_c {
public:
enum SmColor_e {
@@ -69,26 +68,26 @@ public:
STATE_FUNC_DECLARE(dAcEsm_c, Dead);
u8 GetParam_s8_0xFF() {
return params >> 8 & 0xFF;
return mParams >> 8 & 0xFF;
}
u8 GetType() {
int type = params >> 0 & 0xF;
int type = mParams >> 0 & 0xF;
return type != 0xF ? type : 0;
}
u8 GetParam_s4_0xF() {
int type = params >> 4 & 0xF;
int type = mParams >> 4 & 0xF;
return type != 0xF ? type : 0;
}
f32 GetParam_s16_0xFF() {
int tmp = params >> 16 & 0xFF;
int tmp = mParams >> 16 & 0xFF;
return tmp != 0xFF ? tmp * 100.f : 400.f;
}
u8 GetParam_s24_0x7() {
u8 tmp = params >> 24 & 0x7;
u8 tmp = mParams >> 24 & 0x7;
return tmp != 0x7 ? tmp : 0;
}
+1 -1
View File
@@ -59,7 +59,7 @@ public:
// Might be an inline from dAcBase_c?
mAng getRelativeYRotationToPlayer() {
mAng a = getXZAngleToPlayer();
return a - rotation.y;
return a - mRotation.y;
}
private:
+1 -1
View File
@@ -21,7 +21,7 @@ public:
private:
bool hasGoddessStatueFallen();
inline u8 getVariant() const {
return params & 3;
return mParams & 3;
}
/* 0x330 */ nw4r::g3d::ResFile mRes;
+1 -1
View File
@@ -18,7 +18,7 @@ public:
STATE_FUNC_DECLARE(dAcOring_c, Move);
u8 getArgFromParams() {
u32 p = (params & 3);
u32 p = (mParams & 3);
return p != 3 ? p : 0;
}
+1 -1
View File
@@ -41,7 +41,7 @@ public:
bool checkPlayerHasSword();
u8 getSubtype() const {
return params & 0x3;
return mParams & 0x3;
}
private:
+4 -4
View File
@@ -58,18 +58,18 @@ public:
bool checkOnLog_0xE4E() const;
u8 getSubtype() const {
return params & 0xF; // 0 -> Tubo00, Else -> Tubo01
return mParams & 0xF; // 0 -> Tubo00, Else -> Tubo01
}
int getParams_0x3000() const {
return params >> 12 & 0x3;
return mParams >> 12 & 0x3;
}
u8 getParams_0xC000() const {
return params >> 14 & 0x3;
return mParams >> 14 & 0x3;
}
u8 getSceneflag() const {
return params >> 4 & 0xFF;
return mParams >> 4 & 0xFF;
}
bool checkSceneflag() {
+1 -1
View File
@@ -18,7 +18,7 @@ public:
private:
u8 getModelType() {
return params & 0xF;
return mParams & 0xF;
}
/* 0x330 */ nw4r::g3d::ResFile mRes;
+2 -2
View File
@@ -33,11 +33,11 @@ private:
void movePlatforms();
s32 getParm2() {
return ((params >> 4) & 0xF);
return ((mParams >> 4) & 0xF);
}
s32 getRingLayer() {
return params & 0xF;
return mParams & 0xF;
}
/* 0x330 */ m3d::smdl_c mMdl;
+3 -1
View File
@@ -4,8 +4,10 @@
#include "d/col/bg/d_bg_w_base.h"
#include "d/col/c/c_partition.h"
#include "f/f_base.h"
#include "rvl/MTX.h" // IWYU pragma: export
struct cBgD_Vtx_t : public nw4r::math::VEC3 {};
class cBgS_GrpPassChk {
@@ -46,7 +48,7 @@ public:
}
int ChkSameActorPid(const fBase_c *pActor) const {
int id = pActor ? pActor->unique_ID : 0;
int id = pActor ? pActor->mID : 0;
if (id == 0 || mActorId == 0 || mField_0x10 == 0) {
return false;
}
+41 -24
View File
@@ -10,37 +10,54 @@
class dBase_c : public fBase_c {
public:
enum BaseProperties_e {
BASE_PROP_0x4 = 0x4,
BASE_PROP_0x1 = (1 << 0),
BASE_PROP_0x2 = (1 << 1),
BASE_PROP_0x4 = (1 << 2),
BASE_PROP_0x8 = (1 << 3),
BASE_PROP_0x10 = (1 << 4),
BASE_PROP_0x20 = (1 << 5),
BASE_PROP_0x40 = (1 << 6),
BASE_PROP_0x80 = (1 << 7),
BASE_PROP_0x100 = (1 << 8),
};
/* 0x64 */ u32 baseProperties; // field from profile init
public:
/* 80050800 */ dBase_c();
/* 80050890 */ virtual int preExecute();
/* 800508f0 */ virtual void postExecute(MAIN_STATE_e state);
/* 80050920 */ virtual int preDraw();
/* 80050860 */ virtual void postDraw(MAIN_STATE_e state);
/* 8002c530 */ virtual ~dBase_c() {}
// field from profile init
/* 0x64 */ u32 mBaseProperties;
public:
/* 80050980 */ static void resetFlags();
/* 800509a0 */ bool isActorPlayer();
/* 800509e0 */ static void initLoader();
/* 80050a00 */ static dBase_c *createBase(ProfileName, dBase_c *, u32, u8);
/* 80050a10 */ static dBase_c *createRoot(ProfileName, u32, u8);
inline bool isBasePropertyFlag(u32 flag) const {
return (baseProperties & flag) != 0;
dBase_c();
virtual int preExecute();
virtual void postExecute(MAIN_STATE_e state);
virtual int preDraw();
virtual void postDraw(MAIN_STATE_e state);
virtual ~dBase_c() {}
public:
static void resetFlags();
bool isActorPlayer();
static void initLoader();
static dBase_c *createBase(ProfileName, dBase_c *, u32, u8);
static dBase_c *createRoot(ProfileName, u32, u8);
bool checkBaseProperty(u32 property) const {
return (mBaseProperties & property) != 0;
}
void setBaseProperty(u32 property) {
mBaseProperties |= property;
}
void unsetBaseProperty(u32 property) {
mBaseProperties &= ~property;
}
private:
/* 800509c0 */ static int loadAsyncCallback();
/* 800509d0 */ static void unloadCallback();
private:
static int loadAsyncCallback();
static void unloadCallback();
public:
/* 805750c0 */ static u32 s_ExecuteControlFlags;
/* 805750c0 */ static u32 s_DrawControlFlags;
/* 805750c0 */ static u32 s_NextExecuteControlFlags;
// /* 80575bc0 */ static fProfile::fBaseProfile_c** DAT_ACTOR_ALLOCATION_FUNCTIONS;
static u32 s_ExecuteControlFlags;
static u32 s_DrawControlFlags;
static u32 s_NextExecuteControlFlags;
// static fProfile::fBaseProfile_c** DAT_ACTOR_ALLOCATION_FUNCTIONS;
friend class fBase_c;
};
+2 -2
View File
@@ -195,7 +195,7 @@ public:
return false;
}
/* vt 0x178 */ virtual const mAng3_c &getPointedAngle() const {
return rotation;
return mRotation;
}
/* vt 0x17C */ virtual const mVec3_c &getBellowsPosOrOtherVec3F() const {
return position;
@@ -372,7 +372,7 @@ public:
}
/* vt 0x270 */ virtual void triggerExitRelated() {}
/* vt 0x274 */ virtual mAng vt_0x274() {
return rotation.y;
return mRotation.y;
}
/* vt 0x278 */ virtual const mVec3_c &vt_0x278() const {
return position;
+5 -5
View File
@@ -39,15 +39,15 @@ private:
bool mTargetActive; // 0x124
u16 getTriggerSceneFlag() {
return params & 0xFF;
return mParams & 0xFF;
}
u16 getUntriggerSceneFlag() {
return params >> 0x8 & 0xFF;
return mParams >> 0x8 & 0xFF;
}
DowsingOption getDowsingOption() {
return (DowsingOption)(params >> 0x10 & 0xF);
return (DowsingOption)(mParams >> 0x10 & 0xF);
}
u32 getDowsingOptionNum() {
@@ -55,11 +55,11 @@ private:
}
u16 getUntriggerStoryFlag() {
return params >> 0x14 & 0x7FF;
return mParams >> 0x14 & 0x7FF;
}
u16 getTriggerStoryFlag() {
return rotation.z.mVal & 0x7FF;
return mRotation.z.mVal & 0x7FF;
}
};
+4 -4
View File
@@ -23,19 +23,19 @@ private:
void doExecute();
s32 getNumGeko() const {
return (params >> 16) & 0xF;
return (mParams >> 16) & 0xF;
}
s32 getNoSpawnRadiusParm() const {
return params & 0xFF;
return mParams & 0xFF;
}
u8 getGekoParam() const {
return (params >> 20) & 0x3;
return (mParams >> 20) & 0x3;
}
u8 getParm3() const {
return (params >> 22) & 0xFF;
return (mParams >> 22) & 0xFF;
}
f32 getNoSpawnRadius() const {
+5 -5
View File
@@ -33,23 +33,23 @@ private:
};
u32 getSceneFlag() {
return params & 0xFF;
return mParams & 0xFF;
}
u32 getParam0x08() {
return (params >> 8) & 0xFF;
return (mParams >> 8) & 0xFF;
}
s32 getParam0x10() {
return (params >> 0x10) & 0xF;
return (mParams >> 0x10) & 0xF;
}
bool getParam0x14() {
return (params >> 0x14) & 0x1;
return (mParams >> 0x14) & 0x1;
}
ReactType getReactType() {
return (ReactType)(params >> 0x1C);
return (ReactType)(mParams >> 0x1C);
}
void onDelete();
+1 -1
View File
@@ -17,7 +17,7 @@ public:
private:
int getTypeFromParams() {
return params >> 0x1C;
return mParams >> 0x1C;
}
bool checkPosInArea(mVec3_c &pos);
+5 -5
View File
@@ -14,23 +14,23 @@ public:
private:
u8 getSetSceneflag() {
return params;
return mParams;
}
u8 getUnsetSceneflag() {
return params >> 0x8;
return mParams >> 0x8;
}
u8 getIsPersistent() {
return params >> 0x10 & 1;
return mParams >> 0x10 & 1;
}
mAng getSetStoryflag() {
return rotation.x & 0x7FF;
return mRotation.x & 0x7FF;
}
mAng getUnsetStoryflag() {
return rotation.z & 0x7FF;
return mRotation.z & 0x7FF;
}
mMtx_c area;
+3 -3
View File
@@ -15,13 +15,13 @@ public:
virtual int actorExecute() override;
u16 getArea() const {
return params >> 8 & 0xFF;
return mParams >> 8 & 0xFF;
}
u8 getSceneflag() const {
return params >> 16 & 0xFF;
return mParams >> 16 & 0xFF;
}
u8 getTempflag() const {
return params >> 24 & 0xFF;
return mParams >> 24 & 0xFF;
}
private:
+3 -3
View File
@@ -19,15 +19,15 @@ public:
private:
u8 getActivatorIndex() {
return params & 0xF;
return mParams & 0xF;
}
u8 getZoneFlag() {
return params >> 0x4;
return mParams >> 0x4;
}
u8 getChkFlag() {
return params >> 0xC;
return mParams >> 0xC;
}
STATE_MGR_DECLARE(dTgTouchTag);
+13 -14
View File
@@ -7,7 +7,6 @@
#include "c/c_list.h"
#include "common.h"
#include "egg/core/eggExpHeap.h"
#include "egg/core/eggFrmHeap.h"
#include "f/f_base_id.h"
#include "f/f_helper_unk.h"
@@ -20,15 +19,15 @@
// official name
class fBase_c {
public:
/* 0x00 */ fBaseID_e unique_ID;
/* 0x04 */ u32 params; // params1
/* 0x00 */ fBaseID_e mID;
/* 0x04 */ u32 mParams; // params1
/* 0x08 */ ProfileName profile_name; // Actor Id
/* 0x0A */ u8 lifecycle_state;
/* 0x0B */ bool delete_request;
/* 0x0C */ s8 update_request;
/* 0x0D */ bool create_request;
/* 0x0E */ u8 group_type;
/* 0x0F */ u8 proc_control;
/* 0x0F */ u8 mProcControl;
/* 0x10 */ fManager_c manager;
/* 0x50 */ fBaHelper_c *p_helper;
/* 0x54 */ cListMg_c actor_list;
@@ -70,28 +69,28 @@ public:
};
int getID() const {
return unique_ID;
return mID;
}
bool isProcControlFlag(u8 flag) const {
return (proc_control & flag) != 0;
bool checkProcControl(u8 procControl) const {
return (mProcControl & procControl) != 0;
}
void setProcControlFlag(u8 flag) {
proc_control |= flag;
void setProcControl(u8 procControl) {
mProcControl |= procControl;
}
void clearProcControlFlag(u8 flag) {
proc_control &= ~flag;
void unsetProcControl(u8 procControl) {
mProcControl &= ~procControl;
}
void setParams() {
unique_ID = m_rootUniqueID;
params = m_tmpCtData.params;
mID = m_rootUniqueID;
mParams = m_tmpCtData.params;
profile_name = m_tmpCtData.prof_name;
group_type = m_tmpCtData.group_type;
}
u32 getFromParams(u8 shift, u32 mask) {
return (params >> shift) & mask;
return (mParams >> shift) & mask;
}
public:
+6 -7
View File
@@ -6,22 +6,21 @@
#include "common.h"
#include "f/f_profile_name.h"
/// @brief Creates a profile of a base with given values for execute and draw order.
#define SPECIAL_BASE_PROFILE(profName, className, executeOrder, drawOrder, baseProperties) \
#define SPECIAL_BASE_PROFILE(profName, className, executeOrder, drawOrder, mBaseProperties) \
void *className##_classInit() { \
return new className(); \
} \
fProfile::fBaseProfile_c g_profile_##profName = {&className##_classInit, executeOrder, drawOrder, baseProperties}
fProfile::fBaseProfile_c g_profile_##profName = {&className##_classInit, executeOrder, drawOrder, mBaseProperties}
/// @brief Creates a profile of an actor with given values for execute and draw order and the actor properties. @see
/// SPECIAL_BASE_PROFILE
#define SPECIAL_ACTOR_PROFILE(profName, className, executeOrder, drawOrder, baseProperties, properties) \
#define SPECIAL_ACTOR_PROFILE(profName, className, executeOrder, drawOrder, mBaseProperties, properties) \
void *className##_classInit() { \
return new className(); \
} \
fProfile::fActorProfile_c g_profile_##profName = { \
&className##_classInit, executeOrder, drawOrder, baseProperties, properties \
&className##_classInit, executeOrder, drawOrder, mBaseProperties, properties \
}
/// @brief Creates a profile for a base, with the profile number as the priority for both the draw and execute order.
@@ -30,8 +29,8 @@
SPECIAL_BASE_PROFILE(profName, className, fProfile::profName, fProfile::profName);
/// @brief Creates a profile of an actor with default values. @see DEFAULT_BASE_PROFILE
#define DEFAULT_ACTOR_PROFILE(profName, className, baseProperties, properties) \
SPECIAL_ACTOR_PROFILE(profName, className, fProfile::profName, fProfile::profName, baseProperties, properties);
#define DEFAULT_ACTOR_PROFILE(profName, className, mBaseProperties, properties) \
SPECIAL_ACTOR_PROFILE(profName, className, fProfile::profName, fProfile::profName, mBaseProperties, properties);
/*
+9 -9
View File
@@ -21,15 +21,15 @@ bool dAcBombf_c::createHeap() {
}
int dAcBombf_c::actorCreate() {
mDespawnSceneFlag = (params >> 8) & 0xFF;
field_0x3D4 = (params >> 16) & 0xF;
mDespawnSceneFlag = (mParams >> 8) & 0xFF;
field_0x3D4 = (mParams >> 16) & 0xF;
if (SceneflagManager::sInstance->checkBoolFlag(roomid, mDespawnSceneFlag)) {
return FAILED;
}
CREATE_ALLOCATOR(dAcBombf_c);
field_0x3D2 = (params >> 4) & 0xF;
field_0x3D2 = (mParams >> 4) & 0xF;
field_0x3D0 = field_0x3D2 == 1;
if (field_0x3D0) {
mModel.setPriorityDraw(0x82, 0x7F);
@@ -40,7 +40,7 @@ int dAcBombf_c::actorCreate() {
forwardMaxSpeed = -80.0f;
mStateMgr.changeState(StateID_Wait);
boundingBox.Set(mVec3_c(-80.0, -50.0f, -80.0f), mVec3_c(80.0, 60.0f, 80.0f));
angle = rotation;
angle = mRotation;
if (mDespawnSceneFlag < 0xFF) {
clearActorProperty(0x1);
setActorProperty(0x4);
@@ -52,7 +52,7 @@ int dAcBombf_c::actorCreate() {
int dAcBombf_c::actorPostCreate() {
// Preamble problem
mMtx_c mtx;
mtx.ZXYrotS(rotation.x, rotation.y, rotation.z);
mtx.ZXYrotS(mRotation.x, mRotation.y, mRotation.z);
mVec3_c v;
PSMTXMultVecSR(mtx, mVec3_c::Ey, v);
mVec3_c v3 = position + v * 10.0f;
@@ -60,11 +60,11 @@ int dAcBombf_c::actorPostCreate() {
if (dBgS_ObjLinChk::LineCross(&v3, &v4, this)) {
position = dBgS_ObjLinChk::GetInstance().GetLinEnd();
if (rotation.x == 0 && rotation.z == 0 && dBgS_ObjLinChk::ChkGround()) {
if (mRotation.x == 0 && mRotation.z == 0 && dBgS_ObjLinChk::ChkGround()) {
cM3dGPla pla;
dBgS::GetInstance()->GetTriPla(dBgS_ObjLinChk::GetInstance(), &pla);
rotation.x = pla.GetAngle(rotation.y);
rotation.z = pla.GetAngle(rotation.y - 0x4000);
mRotation.x = pla.GetAngle(mRotation.y);
mRotation.z = pla.GetAngle(mRotation.y - 0x4000);
}
if (dBgS::GetInstance()->ChkMoveBG(dBgS_ObjLinChk::GetInstance(), false)) {
@@ -116,7 +116,7 @@ int dAcBombf_c::actorExecute() {
field_0x3D3 = 0;
} else {
if (dBgS::GetInstance()->ChkMoveBG(field_0x398, true)) {
dBgS::GetInstance()->MoveBgTransPos(field_0x398, true, &position, &angle, &rotation);
dBgS::GetInstance()->MoveBgTransPos(field_0x398, true, &position, &angle, &mRotation);
updateMatrix();
dAcBomb_c *bomb = mBombRef.get();
if (bomb != nullptr) {
+1 -1
View File
@@ -61,7 +61,7 @@ void dAcTWoodArea_c::executeState_Wait() {
f32 attachRadius = getAttachRadius();
attachRadius = attachRadius * attachRadius;
if (dist.x * dist.x + dist.z * dist.z < attachRadius) {
bool someEffectThing = subtype != 1 ? (params & 0xF) != 0 ? false : true : true;
bool someEffectThing = subtype != 1 ? (mParams & 0xF) != 0 ? false : true : true;
if (someEffectThing) {
mVec3_c tmp(position.x, position.y + getAttachHeight(), position.z);
dJEffManager_c::spawnEffect(
+3 -3
View File
@@ -23,8 +23,8 @@ int dAcEhb_leaf_c::create() {
boundingBox.Set(mVec3_c(-100.0f, -100.0f, -100.0f), mVec3_c(100.0f, 100.0f, 100.0f));
rotation.y = cM::rndF(65535.0f);
someRot = rotation.y.mVal;
mRotation.y = cM::rndF(65535.0f);
someRot = mRotation.y.mVal;
switch (getParam1()) {
case 0:
@@ -33,7 +33,7 @@ int dAcEhb_leaf_c::create() {
case 2: mType = 2; break;
case 3:
case 4:
case 5: rotation.z.set(-0x8000); break;
case 5: mRotation.z.set(-0x8000); break;
default: break;
}
+14 -14
View File
@@ -109,13 +109,13 @@ int dAcEsm_c::actorCreate() {
shift8_0xFF = GetParam_s8_0xFF();
field_0xB74 = GetParam_s16_0xFF();
field_0xB78 = rotation.z;
field_0xB78 = mRotation.z;
if (field_0xB74 == 0.f) {
field_0xB74 = 400.f;
}
field_0xBC6 = GetParam_s24_0x7();
mOrigRotZ = rotation.z;
mOrigRotZ = mRotation.z;
if (field_0xB78 <= 0.f) {
field_0xB78 = 0.f;
@@ -129,7 +129,7 @@ int dAcEsm_c::actorCreate() {
CREATE_ALLOCATOR(dAcEsm_c);
rotation.z = angle.x = 0;
mRotation.z = angle.x = 0;
mBombRef.unlink();
@@ -177,7 +177,7 @@ int dAcEsm_c::actorCreate() {
position.CopyTo(poscopy3);
poscopy3.y += 50.f;
mRotCopy.set(rotation);
mRotCopy.set(mRotation);
field_0xB98 = 0;
field_0xB58 = 1.f;
@@ -202,7 +202,7 @@ int dAcEsm_c::actorCreate() {
dLightEnv_c::GetPInstance()->plight_set(&mLightInfo);
if (field_0xBBF == 1) {
rotation.x = 0x8000;
mRotation.x = 0x8000;
field_0xBCC = 1;
}
@@ -443,7 +443,7 @@ int dAcEsm_c::actorExecute() {
field_0xBBF = 0;
setBattleBgmRelated(2);
fn_80030700();
rotation.y = angle.y = getXZAngleToPlayer();
mRotation.y = angle.y = getXZAngleToPlayer();
}
if (field_0xBBF == 3) {
return SUCCEEDED;
@@ -765,7 +765,7 @@ void dAcEsm_c::initializeState_Walk() {
field_0xBB8 = 0;
field_0xB98 = 0;
rotation.x = 0;
mRotation.x = 0;
Set_0xBBC(2);
field_0xBAA = angle.y;
@@ -870,7 +870,7 @@ bool dAcEsm_c::fn_187_4090() {
startSound(SE_ESm_LAND);
if (field_0xBA0 == 0) {
if (fn_800301b0(position, rotation.y, true, 10.f) == 3 /* TODO: Enum?*/) {
if (fn_800301b0(position, mRotation.y, true, 10.f) == 3 /* TODO: Enum?*/) {
int code = dBgS::GetInstance()->GetSpecialCode(dBgS_ObjGndChk::GetInstance());
if (code != POLY_ATTR_SAND_SHALLOW && code != POLY_ATTR_SAND_MED) {
mHealth = 0;
@@ -993,7 +993,7 @@ void dAcEsm_c::fn_187_4540(int param0) {
f32 f = 16384.f;
dAcEsm_c *pChild = static_cast<dAcEsm_c *>(
create(fProfile::E_SM, roomid, (params & ~0xFF) | mType, &spawnPos, &rot, nullptr, 0)
create(fProfile::E_SM, roomid, (mParams & ~0xFF) | mType, &spawnPos, &rot, nullptr, 0)
);
if (pChild == nullptr) {
return;
@@ -1128,14 +1128,14 @@ void dAcEsm_c::fn_187_4CC0() {
if (mObjAcch.ChkWallHit(nullptr)) {
sLib::addCalcAngle(angle.y.ref(), mAcchCir.GetWallAngleY(), 4, 0x200);
}
sLib::addCalcAngle(rotation.y.ref(), angle.y, 2, 0x800);
sLib::addCalcAngle(mRotation.y.ref(), angle.y, 2, 0x800);
sLib::addCalcAngle(mRotUnk.x.ref(), mTargetRotX, 4, 0x800);
sLib::addCalcAngle(mRotUnk.z.ref(), mTargetRotZ, 4, 0x800);
mWorldMtx.transS(position.x, position.y, position.z);
mWorldMtx.XrotM(mRotUnk.x);
mWorldMtx.ZrotM(mRotUnk.z);
mWorldMtx.ZXYrotM(rotation.x, rotation.y, rotation.z);
mWorldMtx.ZXYrotM(mRotation.x, mRotation.y, mRotation.z);
f32 s = 1.f - 0.2f * field_0xB5C;
f32 z = 150.f * mScaleTarget.x;
@@ -1277,7 +1277,7 @@ void dAcEsm_c::fn_187_61B0(u8 param0) {
ang.set(0, 0, 0);
ang.z += player->vt_0x258();
MTXTrans(mtx_trans, mHitPos.x, mHitPos.y, mHitPos.z);
mtx_trans.YrotM(rotation.y);
mtx_trans.YrotM(mRotation.y);
mtx_trans.ZYXrotM(ang);
MTXScale(mtx_scale, mScaleTarget.x, mScaleTarget.x, mScaleTarget.x);
@@ -1351,7 +1351,7 @@ void dAcEsm_c::fn_187_61B0(u8 param0) {
case 4: {
mMtx_c mtx_scale;
MTXTrans(mtx_trans, position.x, position.y, position.z);
mtx_trans.YrotM(rotation.y);
mtx_trans.YrotM(mRotation.y);
MTXScale(mtx_scale, mScaleTarget.x, mScaleTarget.y, mScaleTarget.z);
mtx_trans += mtx_scale;
dJEffManager_c::spawnEffect(PARTICLE_RESOURCE_ID_MAPPING_280_, mtx_trans, &clr1, &clr2, 0, 0);
@@ -1398,7 +1398,7 @@ void dAcEsm_c::fn_187_61B0(u8 param0) {
}
mMtx_c mtx_scale;
MTXTrans(mtx_trans, mHitPos.x, mHitPos.y, mHitPos.z);
mtx_trans.YrotM(rotation.y);
mtx_trans.YrotM(mRotation.y);
MTXScale(mtx_scale, scale.x, scale.y, scale.z);
mtx_trans += mtx_scale;
dJEffManager_c::spawnEffect(sEmitterResArr[param0], mtx_trans, &clr1, &clr2, 0, 0);
+7 -7
View File
@@ -36,7 +36,7 @@ int dAcNpcSltk_c::actorCreate() {
field_0x750 = 0xFF;
}
mAreaIndex = rotation.z & 0xFF;
mAreaIndex = mRotation.z & 0xFF;
if (mAreaIndex < 0xFF) {
mpArea = getAreaForIndexInRoom(mAreaIndex, roomid);
if (mpArea == nullptr) {
@@ -44,7 +44,7 @@ int dAcNpcSltk_c::actorCreate() {
}
}
rotation.set(0, 0, 0);
mRotation.set(0, 0, 0);
field_0x758 = getParam2() * 100;
field_0x75C = getParam3() * 100;
@@ -99,20 +99,20 @@ int dAcNpcSltk_c::draw() {
}
int dAcNpcSltk_c::getParam0_0() const {
return params & 0xFF;
return mParams & 0xFF;
}
int dAcNpcSltk_c::getParam0_1() const {
return params & 0xFF;
return mParams & 0xFF;
}
int dAcNpcSltk_c::getParam1() const {
return (params >> 8) & 0xFF;
return (mParams >> 8) & 0xFF;
}
int dAcNpcSltk_c::getParam2() const {
return (params >> 16) & 0xFF;
return (mParams >> 16) & 0xFF;
}
int dAcNpcSltk_c::getParam3() const {
return (params >> 24) & 0xFF;
return (mParams >> 24) & 0xFF;
}
int dAcNpcSltk_c::getParam4() const {
return getParams2Lower() & 0xF;
+6 -4
View File
@@ -1,10 +1,12 @@
#include "d/a/obj/d_a_obj_F400_gate_leaf.h"
#include "common.h"
#include "d/a/obj/d_a_obj_base.h"
#include "d/flag/storyflag_manager.h"
#include "f/f_base.h"
#include "nw4r/g3d/res/g3d_resfile.h"
SPECIAL_ACTOR_PROFILE(OBJ_F400_GATE_LEAF, dAcOF400GateLeaf_c, fProfile::OBJ_F400_GATE_LEAF, 0x286, 0, 3);
bool dAcOF400GateLeaf_c::createHeap() {
@@ -14,12 +16,12 @@ bool dAcOF400GateLeaf_c::createHeap() {
}
nw4r::g3d::ResFile resFile(data);
if (!resFile.IsValid()){
if (!resFile.IsValid()) {
return false;
}
nw4r::g3d::ResMdl mdl = resFile.GetResMdl("F400GateLeaf");
if (!mdl.IsValid()){
if (!mdl.IsValid()) {
return false;
}
@@ -37,7 +39,7 @@ int dAcOF400GateLeaf_c::create() {
updateMatrix();
mMdl.setLocalMtx(mWorldMtx);
mVec3_c min, max;
mMdl.getBounds(&min,&max);
mMdl.getBounds(&min, &max);
boundingBox.Set(min, max);
return SUCCEEDED;
}
@@ -52,5 +54,5 @@ int dAcOF400GateLeaf_c::draw() {
}
u16 dAcOF400GateLeaf_c::getStoryflag() {
return params & 0xffff;
return mParams & 0xffff;
}
+2 -2
View File
@@ -38,8 +38,8 @@ bool dAcOappearBridge_c::createHeap() {
int dAcOappearBridge_c::create() {
CREATE_ALLOCATOR(dAcOappearBridge_c);
dBgS::GetInstance()->Regist(&mCollision, this);
mAreaIdx = params & 0xFF;
mEventId = (params >> 8) & 0xFF;
mAreaIdx = mParams & 0xFF;
mEventId = (mParams >> 8) & 0xFF;
mSoundPosition = position + positionOffset;
obj_pos = &mSoundPosition;
mSceneCallback.attach(mModel);
+2 -2
View File
@@ -41,7 +41,7 @@ int dAcObjBirdSp_c::actorExecute() {
mCollider.GetCoActor()->profile_name == fProfile::PLAYER)) {
mVec3_c posChange(0, -0.2, 1.0);
mMtx_c matrix;
matrix.ZXYrotS(rotation);
matrix.ZXYrotS(mRotation);
PSMTXMultVec(matrix.m, posChange, posChange);
f32 angle = (position - dBird_c::getInstance()->position).dot(posChange);
@@ -58,7 +58,7 @@ int dAcObjBirdSp_c::actorExecute() {
mCollider.SetC(position);
dCcS::GetInstance()->Set(&mCollider);
mWorldMtx.transS(position.x, position.y, position.z);
mWorldMtx.ZXYrotM(rotation);
mWorldMtx.ZXYrotM(mRotation);
return SUCCEEDED;
}
@@ -217,7 +217,7 @@ bool dAcOBlockUnderground::undergroundRefEquals(dAcOUnderground_c *underground)
}
void dAcOBlockUnderground::setBlockUndergroundPosition(mVec3_c *pos) {
setPostion(*pos);
setPosition(*pos);
updateMatrix();
mMdl.setLocalMtx(mWorldMtx);
if (hasCyl()) {
+4 -2
View File
@@ -8,9 +8,11 @@
#include "nw4r/g3d/res/g3d_resfile.h"
#include "nw4r/g3d/res/g3d_resmdl.h"
#include "nw4r/math/math_arithmetic.h"
#include "rvl/GX.h" // IWYU pragma: export
#include "toBeSorted/time_area_mgr.h"
#include "rvl/GX.h" // IWYU pragma: export
SPECIAL_ACTOR_PROFILE(OBJ_BSTONE, dAcObstonec, fProfile::OBJ_BSTONE, 0x130, 0, 2);
bool dAcObstonec::createHeap() {
@@ -33,7 +35,7 @@ bool dAcObstonec::createHeap() {
}
int dAcObstonec::create() {
mVariant = params & 0xF;
mVariant = mParams & 0xF;
CREATE_ALLOCATOR(dAcObstonec);
if (mVariant == 1) {
+4 -4
View File
@@ -53,9 +53,9 @@ bool dAcOChair_c::createHeap() {
}
int dAcOChair_c::create() {
u8 paramType = params & 0xF;
u8 paramType = mParams & 0xF;
mChairType = getChairType(paramType);
mSceneflag = params >> 4;
mSceneflag = mParams >> 4;
CREATE_ALLOCATOR(dAcOChair_c);
@@ -107,7 +107,7 @@ int dAcOChair_c::create() {
field_0xB1B = 1;
field_0xB1A = 1;
mChairRot = rotation.y;
mChairRot = mRotation.y;
mStateMgr.changeState(StateID_Wait);
boundingBox.Set(mVec3_c(-60.f, -0.f, -60.f), mVec3_c(60.f, 160.f, 60.f));
@@ -255,7 +255,7 @@ void dAcOChair_c::updateChairPos() {
mVec3_c work = mVec3_c::Ez * getDistToPlayer();
work.rotY(getRelativeYRotationToPlayer());
work.z = 0.f;
work.rotY(rotation.y);
work.rotY(mRotation.y);
poscopy2 = position;
if (work.squareMagXZ() < 10000.f) {
poscopy2 += work;
+4 -4
View File
@@ -234,7 +234,7 @@ void dAcOChest_c::doInteraction(s32 _unused) {
void dAcOChest_c::fn_326_C90() {
mWorldMtx.transS(position);
mWorldMtx.ZXYrotM(rotation);
mWorldMtx.ZXYrotM(mRotation);
mAnmMdl.getModel().setLocalMtx(mWorldMtx);
mAnmMdl.getModel().calc(false);
}
@@ -360,14 +360,14 @@ void dAcOChest_c::stateOpenUpdate2() {
mVec3_c t(0.0f, 0.0f, 122.35f);
s32 targetAngle = 0x7FFF;
targetPosition = t;
targetAngle += rotation.y;
targetPosition.rotY(rotation.y);
targetAngle += mRotation.y;
targetPosition.rotY(mRotation.y);
targetPosition += position;
if (player != nullptr) {
playerPosition = player->position;
cLib::addCalcPos(&playerPosition, targetPosition, 0.25f, 200.0f, 0.0f);
s16 YRot = rotation.y;
s16 YRot = mRotation.y;
sLib::addCalcAngle(&YRot, targetAngle, 4, 0x7FFF, 0);
if ((targetPosition.squareDistanceToXZ(playerPosition) < 25.0f) &&
+1 -1
View File
@@ -18,7 +18,7 @@ bool dAcOclearnessWall_c::createHeap() {
}
int dAcOclearnessWall_c::create() {
mSceneflag = params;
mSceneflag = mParams;
mVariant = getFromParams(8, 0xF);
field_0x542 = getFromParams(0xC, 0xF);
if (field_0x542 == 0xF) {
+3 -3
View File
@@ -37,7 +37,7 @@ int dAcODecoB_c::doDelete() {
int dAcODecoB_c::actorExecute() {
mStateMgr.executeState();
PSMTXTrans(mWorldMtx, position.x, position.y, position.z);
mWorldMtx.ZXYrotM(rotation);
mWorldMtx.ZXYrotM(mRotation);
mMdl.setLocalMtx(mWorldMtx);
return SUCCEEDED;
}
@@ -61,9 +61,9 @@ void dAcODecoB_c::executeState_Wait() {
}
field_0x38E = distance * 2048.0f;
}
field_0x38E -= rotation.x * 0.05f;
field_0x38E -= mRotation.x * 0.05f;
field_0x38E = field_0x38E * lbl_611_data_34;
rotation.x += field_0x38E;
mRotation.x += field_0x38E;
}
const f32 dAcODecoB_c::lbl_611_rodata_30 = 2000.0f;
+16 -16
View File
@@ -95,7 +95,7 @@ bool dAcODungeonShip_c::createHeap() {
}
// wat
if (!SceneflagManager::sInstance->checkBoolFlag(roomid, (params >> 0x10) & 0xFF)) {
if (!SceneflagManager::sInstance->checkBoolFlag(roomid, (mParams >> 0x10) & 0xFF)) {
goto ok;
} else {
bool result = mBg.InitMapStuff(&heap_allocator);
@@ -112,7 +112,7 @@ int dAcODungeonShip_c::create() {
return FAILED;
}
if (SceneflagManager::sInstance->checkBoolFlag(roomid, (params >> 0x10) & 0xFF)) {
if (SceneflagManager::sInstance->checkBoolFlag(roomid, (mParams >> 0x10) & 0xFF)) {
mIsDocked = true;
}
@@ -120,7 +120,7 @@ int dAcODungeonShip_c::create() {
return FAILED;
}
mPathIdx = params & 0xFF;
mPathIdx = mParams & 0xFF;
if (mPathIdx == 0xFF) {
return FAILED;
}
@@ -132,7 +132,7 @@ int dAcODungeonShip_c::create() {
forwardAccel = 0.0f;
forwardMaxSpeed = 0.0f;
boundingBox.Set(mVec3_c(-6000.0f, -500.0f, -2000.0f), mVec3_c(5000.0f, 4000.0f, 2000.0f));
if (SceneflagManager::sInstance->checkBoolFlag(roomid, (params >> 0x10) & 0xFF)) {
if (SceneflagManager::sInstance->checkBoolFlag(roomid, (mParams >> 0x10) & 0xFF)) {
dBgS::GetInstance()->RegistBg(&mBg, this);
mStateMgr.changeState(StateID_End);
} else {
@@ -144,7 +144,7 @@ int dAcODungeonShip_c::create() {
mEffects[1].init(this);
field_0x8D9 = 0;
if (!SceneflagManager::sInstance->checkBoolFlag(roomid, (params >> 0x10) & 0xFF)) {
if (!SceneflagManager::sInstance->checkBoolFlag(roomid, (mParams >> 0x10) & 0xFF)) {
mDowsingOffset.set(0.0f, 500.0f, 0.0f);
mDowsingTarget.initialize(DowsingTarget::SLOT_STORY_EVENT, 0, &mDowsingOffset, 10000.0);
mDowsingTarget.doRegister();
@@ -153,9 +153,9 @@ int dAcODungeonShip_c::create() {
mCullingDistance = 200000.0f;
clearActorProperty(0x1);
mAppearEventFromParam = (params >> 0x18);
field_0x849 = rotation.x;
rotation.x = 0;
mAppearEventFromParam = (mParams >> 0x18);
field_0x849 = mRotation.x;
mRotation.x = 0;
updateMatrix();
mBg.Move();
return SUCCEEDED;
@@ -180,7 +180,7 @@ int dAcODungeonShip_c::actorExecute() {
f32 scale = tempZero + 2100.0f;
mVec3_c directedScale = mVec3_c::Ex * scale;
directedScale.rotY(rotation.y);
directedScale.rotY(mRotation.y);
f32 extent = tempZero + 1800.0f;
mCc.Set(offsetPosition + directedScale, offsetPosition - directedScale, extent);
@@ -191,7 +191,7 @@ int dAcODungeonShip_c::actorExecute() {
mMdl.calc(false);
if (field_0x8D8) {
mEffects[0].createContinuousEffect(
PARTICLE_RESOURCE_ID_MAPPING_682_, position, &rotation, nullptr, nullptr, nullptr
PARTICLE_RESOURCE_ID_MAPPING_682_, position, &mRotation, nullptr, nullptr, nullptr
);
}
@@ -249,7 +249,7 @@ void dAcODungeonShip_c::executeState_Transparency() {
} else if (mNumTimesHit == 2) {
field_0x863 = 0;
mNumTimesHit++;
SceneflagManager::sInstance->setFlag(roomid, (params >> 0x10) & 0xFF);
SceneflagManager::sInstance->setFlag(roomid, (mParams >> 0x10) & 0xFF);
mAppearEvent = mAppearEventFromParam;
field_0x8D8 = 1;
mStateMgr.changeState(StateID_AppearEvent);
@@ -366,7 +366,7 @@ void dAcODungeonShip_c::executeState_AppearEvent() {
f32 f;
if (mEvent.getSingleFloatData(&f, 'ang0', 0) == 1) {
mAng ang = mAng::fromDeg(f);
rotation.y = ang;
mRotation.y = ang;
}
mVec3_c vec;
if (mEvent.getSingleVecData(&vec, 'pos0', 0) == 1) {
@@ -447,12 +447,12 @@ void dAcODungeonShip_c::fn_485_1720() {
mVec3_c tmp;
mPath.getDirection(tmp);
rotation.y = cM::atan2s(tmp.x, tmp.z);
mRotation.y = cM::atan2s(tmp.x, tmp.z);
if (mPath.CheckFlag(0x40000000)) {
rotation.y += rot_7fff;
mRotation.y += rot_7fff;
}
rotation.y += rot_4000;
angle.y = rotation.y;
mRotation.y += rot_4000;
angle.y = mRotation.y;
int factor = 0x12C;
f32 tmp2 = nw4r::math::SinIdx((field_0x850 * 800));
@@ -71,8 +71,8 @@ int dAcOFlyingClawshotTarget_c::actorCreate() {
int dAcOFlyingClawshotTarget_c::actorPostCreate() {
mVec3_c v = mVec3_c::Ez;
v.rotX(rotation.x);
v.rotY(rotation.y);
v.rotX(mRotation.x);
v.rotY(mRotation.y);
mVec3_c diff = dAcPy_c::LINK->position - position;
diff.normalize();
if (!mToLink.Set(v, diff)) {
+2 -2
View File
@@ -99,9 +99,9 @@ bool dAcOFruitGutsLeaf_c::hideInPast() {
}
s32 dAcOFruitGutsLeaf_c::getType() {
return params & 0xFF;
return mParams & 0xFF;
}
s32 dAcOFruitGutsLeaf_c::getPastBehavior() {
return (params >> 8) & 1;
return (mParams >> 8) & 1;
}
+1 -1
View File
@@ -17,7 +17,7 @@ const char *const dAcOislandLOD_c::resMdlNames[5] = {
SPECIAL_ACTOR_PROFILE(OBJ_ISLAND_LOD, dAcOislandLOD_c, fProfile::OBJ_ISLAND_LOD, 0x211, 0, 3);
bool dAcOislandLOD_c::createHeap() {
mMdlLodIdx = params & 0xf;
mMdlLodIdx = mParams & 0xf;
void *data = getOarcResFile(dAcOislandLOD_c::resFilenames[mMdlLodIdx]);
mResFile = nw4r::g3d::ResFile(data);
dStage_c::bindStageResToFile(&mResFile);
+13 -13
View File
@@ -156,12 +156,12 @@ UNKTYPE dAcOivyRope_c::fn_256_4C80(UNKTYPE) {}
UNKTYPE dAcOivyRope_c::fn_256_4CA0(UNKTYPE) {}
int dAcOivyRope_c::createBase() {
rotation = 0;
mRotation = 0;
f32 temp = 2000.f - 750.f;
mDistance = 2000.f;
mOldDistance = 2000.f;
mSegmentCount = 81;
mDropsceneFlag = params >> 12;
mDropsceneFlag = mParams >> 12;
mField_0xFEB = 1;
if (temp < 0.f) {
temp = 0.f;
@@ -425,10 +425,10 @@ void dAcOivyRope_c::fn_256_AC00() {
}
void dAcOivyRope_c::fn_256_AE00() {
mField_0xFDA = rotation.x;
mField_0xFDC = rotation.y;
rotation.x = 0;
rotation.y = 0;
mField_0xFDA = mRotation.x;
mField_0xFDC = mRotation.y;
mRotation.x = 0;
mRotation.y = 0;
int i = 0;
updateMatrix();
mMtx_c m = mWorldMtx;
@@ -508,10 +508,10 @@ void dAcOivyRope_c::fn_256_BAB0(mVec3_c &out, int idx, s16 xRot, s16 yRot) {
}
void dAcOivyRope_c::fn_256_BB70() {
mField_0xFDA = rotation.x;
mField_0xFDC = rotation.y;
rotation.x = 0;
rotation.y = 0;
mField_0xFDA = mRotation.x;
mField_0xFDC = mRotation.y;
mRotation.x = 0;
mRotation.y = 0;
updateMatrix();
mVec3_c *pnt2;
@@ -848,11 +848,11 @@ void dAcOivyRope_c::fn_256_D3D0(mVec3_c &pOut1, mVec3_c &pOut2, s16 param2, bool
mMtx_c m;
m.transS(playerCenter);
mAng3_c playerRot = dAcPy_c::GetLink()->rotation;
mAng3_c playerRot = dAcPy_c::GetLink()->mRotation;
m.ZXYrotM(playerRot.x, playerRot.y, playerRot.z);
// name 100% guess
mAng swingAngle = (mField_0xFCC - 0x8000) - dAcPy_c::GetLink()->rotation.y;
mAng swingAngle = (mField_0xFCC - 0x8000) - dAcPy_c::GetLink()->mRotation.y;
f32 something = param2 / 5461.f;
if (something > 1.f) {
@@ -976,7 +976,7 @@ void dAcOivyRope_c::fn_256_DAA0(bool bool0, bool bool1, f32 float0, f32 float1)
f32 target = float0 - mField_0x1040 * 1.5f;
f32 chasing = 0.f;
f32 step = target * float1;
int ang = dAcPy_c::GetLink()->rotation.y;
int ang = dAcPy_c::GetLink()->mRotation.y;
u8 *cam = (u8 *)getCamera(0);
if (cam) {
ang = cLib::targetAngleY(*(mVec3_c *)(cam + 0x6C), mTightropeEnd) + 0x2000;
+1 -1
View File
@@ -43,7 +43,7 @@ int dAcOOctGrass_c::create() {
CREATE_ALLOCATOR(dAcOOctGrass_c);
forwardAccel = 0.0f;
forwardMaxSpeed = -40.0f;
if ((params & 0xF) != 0) {
if ((mParams & 0xF) != 0) {
mMdl.setPriorityDraw(0x1C, 9);
}
updateMatrix();
+2 -2
View File
@@ -24,9 +24,9 @@ int dAcOPoolCock_c::actorCreate() {
forwardAccel = -0.0f;
forwardMaxSpeed = -40.0f;
mOpenSceneflag = params & 0xFF;
mOpenSceneflag = mParams & 0xFF;
mOpenDirection = mVec3_c::Ez;
mOpenDirection.rotY(rotation.y);
mOpenDirection.rotY(mRotation.y);
if (mOpenSceneflag < 0xFF && SceneflagManager::sInstance->checkBoolFlag(roomid, mOpenSceneflag)) {
mOpenProgress = 400.0f;
+1 -1
View File
@@ -25,7 +25,7 @@ int dAcOPumpkinLeaf_c::create() {
mStateMgr.changeState(StateID_Wait);
boundingBox.Set(mVec3_c(-50.0f, -10.0f, -50.0f), mVec3_c(50.0f, 50.0f, 50.0f));
dAcObjBase_c::create(
"PmpknBd", getRoomId(), 0, &position, &rotation, &mScale, getParams2_ignoreLower(), -1, viewclip_index
"PmpknBd", getRoomId(), 0, &position, &mRotation, &mScale, getParams2_ignoreLower(), -1, viewclip_index
);
return SUCCEEDED;
}
+1 -1
View File
@@ -57,7 +57,7 @@ void dAcOring_c::executeState_Move() {
if (GetLinkage().checkConnection(dLinkage_c::CONNECTION_7)) {
return;
}
rotation.addX(0x1000);
mRotation.addX(0x1000);
if (field_0x38C >= position.y) {
deleteRequest();
}
+4 -4
View File
@@ -167,9 +167,9 @@ void dAcOSeatSword_c::registerInEvent() {
if (mField_0x7EA == 1 && EventManager::isCurrentEvent(sEventName)) {
dAcPy_c *player = dAcPy_c::LINK;
mVec3_c vec = mVec3_c::Ez * 78.f;
mAng3_c ang = rotation;
mAng3_c ang = mRotation;
ang.y += someAng;
vec.rotY(rotation.y);
vec.rotY(mRotation.y);
vec += position;
player->setPosRot(&vec, &ang, 0, 1, 0);
mField_0x7E8.set(0);
@@ -223,12 +223,12 @@ void dAcOSeatSword_c::actorExecuteCommon() {
mEffPos.y = sEffectPos.y;
mEffPos.z = sEffectPos.z;
mEffPos.rotY(player->rotation.y);
mEffPos.rotY(player->mRotation.y);
mEffPos += player->position;
mEffPos.y = position.y;
mEff.createContinuousEffect(PARTICLE_RESOURCE_ID_MAPPING_76_, mEffPos, &rotation, &mScale, nullptr, nullptr);
mEff.createContinuousEffect(PARTICLE_RESOURCE_ID_MAPPING_76_, mEffPos, &mRotation, &mScale, nullptr, nullptr);
mEff.setGlobalAlpha(mField_0x7E4);
}
+1 -1
View File
@@ -15,7 +15,7 @@ SPECIAL_ACTOR_PROFILE(OBJ_SMOKE, dAcOsmoke_c, fProfile::OBJ_SMOKE, 0x01DB, 0, 4)
STATE_DEFINE(dAcOsmoke_c, Wait);
bool dAcOsmoke_c::createHeap() {
mType = params & 3;
mType = mParams & 3;
mBrres = nw4r::g3d::ResFile(getOarcResFile(sSmokeNames1[mType]));
nw4r::g3d::ResMdl mdl = mBrres.GetResMdl(sSmokeNames2[mType]);
TRY_CREATE(mModel.create(mdl, &heap_allocator, 0x324));
+3 -3
View File
@@ -40,8 +40,8 @@ int dAcOspike_c::create() {
mCollision.SetAtVec(tmp);
mMtx_c mtx;
mtx.XrotS(rotation.x);
mtx.ZrotM(rotation.z);
mtx.XrotS(mRotation.x);
mtx.ZrotM(mRotation.z);
mVec3_c tmp2, tmp3;
PSMTXMultVecSR(mtx.m, sVec1, tmp2);
PSMTXMultVecSR(mtx.m, sVec2, tmp3);
@@ -74,7 +74,7 @@ int dAcOspike_c::doDelete() {
int dAcOspike_c::actorExecute() {
mStateMgr.executeState();
mCollision.cM3dGUnk::Set(position, rotation.y);
mCollision.cM3dGUnk::Set(position, mRotation.y);
dCcS::GetInstance()->Set(&mCollision);
return 1;
}
+1 -1
View File
@@ -34,7 +34,7 @@ static const char *const AcOstreamLava__AnmClrNames[] = {
SPECIAL_ACTOR_PROFILE(OBJ_STREAM_LAVA, dAcOstreamLava_c, fProfile::OBJ_STREAM_LAVA, 0x1FA, 0, 6);
bool dAcOstreamLava_c::createHeap() {
mSubtype = params & 0xF;
mSubtype = mParams & 0xF;
mResFile = nw4r::g3d::ResFile(getOarcResFile(AcOstreamLava__OarcNames[mSubtype]));
dStage_c::bindStageResToFile(&mResFile);
+4 -4
View File
@@ -58,13 +58,13 @@ int dAcOTarzanPole_c::create() {
forwardAccel = 0.0f;
forwardMaxSpeed = -40.0f;
mFloat = (s32)(params & 0xFF) * 10.0f;
if ((s32)(params & 0xFF) == 0xFF) {
mFloat = (s32)(mParams & 0xFF) * 10.0f;
if ((s32)(mParams & 0xFF) == 0xFF) {
mFloat = 0.0f;
}
mVec = mVec3_c::Ex * 400.0f;
mVec.rotY(rotation.y);
mVec.rotY(mRotation.y);
boundingBox.Set(mVec3_c(-0.0f, -120.0f, -110.0f), mVec3_c(500.0f, 140.0f, 110.0f));
return SUCCEEDED;
@@ -86,7 +86,7 @@ int dAcOTarzanPole_c::actorExecute() {
}
mVec = mVec3_c::Ex * sXOffset + mVec3_c::Ey * sYOffset;
mVec.rotY(rotation.y);
mVec.rotY(mRotation.y);
poscopy2 = position + mVec;
poscopy3 = poscopy2 + mVec3_c::Ey * 20.0f;
+1 -1
View File
@@ -47,7 +47,7 @@ bool dAcOTimeStageBg_c::createHeap() {
}
int dAcOTimeStageBg_c::actorCreate() {
mSubType = params & 0xF;
mSubType = mParams & 0xF;
if (mSubType > 5) {
mSubType = 0;
}
@@ -37,7 +37,7 @@ bool dAcOtoD3StoneFigure_c::createHeap() {
int dAcOtoD3StoneFigure_c::create() {
mIsSkyKeepAlreadyOpen = isStoneOfTrialsPlaced();
mExitId = params & 0xFF;
mExitId = mParams & 0xFF;
updateMatrix();
if (!initAllocatorWork1Heap(-1, "dAcOtoD3StoneFigure_c::m_allocator", 0x20)) {
return FAILED;
@@ -97,7 +97,7 @@ int dAcOtoD3StoneFigure_c::draw() {
void dAcOtoD3StoneFigure_c::initializeState_OneEye() {
if (dScGame_c::currentSpawnInfo.getTimeOfDay() == SpawnInfo::NIGHT) {
rotation.y.mVal += -0x8000;
mRotation.y.mVal += -0x8000;
updateMatrix();
mMdl.setLocalMtx(mWorldMtx);
}
+3 -3
View File
@@ -28,7 +28,7 @@ bool dAcOTowerGearD101_c::createHeap() {
}
fn_80067340(field_0x3A0, &mdl, "model0");
position = field_0x3A0;
position.rotY(rotation.y);
position.rotY(mRotation.y);
return true;
}
@@ -123,12 +123,12 @@ void dAcOTowerGearD101_c::initTransform() {
mtx1.transS(position);
mWorldMtx += mtx1;
field_0x3C4.transS(mVec3_c::Zero);
field_0x3C4.ZXYrotM(rotation.x, rotation.y, rotation.z);
field_0x3C4.ZXYrotM(mRotation.x, mRotation.y, mRotation.z);
mMdl.setLocalMtx(field_0x3C4);
}
void dAcOTowerGearD101_c::playVisualEffect() {
mEffects.createContinuousEffect(
PARTICLE_RESOURCE_ID_MAPPING_572_, field_0x3F4, &rotation, nullptr, nullptr, nullptr
PARTICLE_RESOURCE_ID_MAPPING_572_, field_0x3F4, &mRotation, nullptr, nullptr, nullptr
);
}
+6 -6
View File
@@ -397,19 +397,19 @@ void dAcOTowerHandD101_c::doSomethingHold(f32 arg) {
}
int dAcOTowerHandD101_c::getDirection() const {
return params & 0xFF;
return mParams & 0xFF;
}
int dAcOTowerHandD101_c::getHoldFlag() const {
return (params >> 8) & 0xFF;
return (mParams >> 8) & 0xFF;
}
int dAcOTowerHandD101_c::getSceneFlag() const {
return (params >> 16) & 0xFF;
return (mParams >> 16) & 0xFF;
}
u32 dAcOTowerHandD101_c::getEventId() const {
return (params >> 24) & 0xFF;
return (mParams >> 24) & 0xFF;
}
bool dAcOTowerHandD101_c::getBgWMtx(int index, mMtx_c *&outMtx) {
@@ -545,7 +545,7 @@ void dAcOTowerHandD101_c::eventCallback(void *arg) {
}
void dAcOTowerHandD101_c::calcItemPosition(const mVec3_c &offset, mVec3_c &outPosition) const {
transformMtx(position, rotation, offset, outPosition);
transformMtx(position, mRotation, offset, outPosition);
}
void dAcOTowerHandD101_c::initializeState_RemainOpen() {
@@ -773,7 +773,7 @@ void dAcOTowerHandD101_c::executeState_Hold() {
mMtx_c tmpMtx1;
tmpMtx1.transS(position);
// Different address calculation here
tmpMtx1.ZXYrotM(rotation.x, rotation.y, rotation.z);
tmpMtx1.ZXYrotM(mRotation.x, mRotation.y, mRotation.z);
mVec3_c linkVec;
getLinkOffset(linkVec);
mMtx_c tmpMtx2;
+11 -11
View File
@@ -26,8 +26,8 @@ bool dAcOtrapRock1_c::createHeap() {
}
int dAcOtrapRock1_c::create() {
mActivationSceneFlag = params & 0xFF;
mReturnSceneFlag = (params >> 8) & 0xFF;
mActivationSceneFlag = mParams & 0xFF;
mReturnSceneFlag = (mParams >> 8) & 0xFF;
CREATE_ALLOCATOR(dAcOtrapRock1_c);
mBgW.SetCrrFunc(dBgS_MoveBGProc_Typical);
@@ -82,18 +82,18 @@ void dAcOtrapRock1_c::executeState_TrapAction() {
if (SceneflagManager::sInstance->checkBoolFlag(roomid, mReturnSceneFlag)) {
mStateMgr.changeState(StateID_TrapReturn);
} else if (field_0x59E == 0 || mFrameCounter > 4) {
// After 5 frames, move rotation.x to 0x4000, then stay until return
bool reachedPoint = sLib::chaseAngle(&rotation.x.mVal, 0x4000, 0x14);
// After 5 frames, move mRotation.x to 0x4000, then stay until return
bool reachedPoint = sLib::chaseAngle(&mRotation.x.mVal, 0x4000, 0x14);
if (reachedPoint) {
return;
}
} else {
f32 ratio;
if (mFrameCounter == 0 && rotation.x < 0x4000) {
if (mFrameCounter == 0 && mRotation.x < 0x4000) {
ratio = 0.1f;
} else {
f32 b = field_0x5A0;
f32 r = (rotation.x - 0x4000) / b;
f32 r = (mRotation.x - 0x4000) / b;
ratio = nw4r::math::FAbs(r);
}
if (ratio > 1.0f) {
@@ -111,10 +111,10 @@ void dAcOtrapRock1_c::executeState_TrapAction() {
newAng = -sSomeValue;
}
rotation.x += (int)newAng;
if (field_0x59E > 0 && rotation.x > field_0x59E + 0x4000 ||
field_0x59E < 0 && rotation.x < field_0x59E + 0x4000) {
rotation.x = field_0x59E + 0x4000;
mRotation.x += (int)newAng;
if (field_0x59E > 0 && mRotation.x > field_0x59E + 0x4000 ||
field_0x59E < 0 && mRotation.x < field_0x59E + 0x4000) {
mRotation.x = field_0x59E + 0x4000;
u8 r6 = field_0x5A5;
field_0x5A5 = r6 - (r6 * 2);
field_0x5A0 = field_0x59E;
@@ -132,7 +132,7 @@ void dAcOtrapRock1_c::executeState_TrapAction() {
void dAcOtrapRock1_c::finalizeState_TrapAction() {}
void dAcOtrapRock1_c::initializeState_TrapReturn() {}
void dAcOtrapRock1_c::executeState_TrapReturn() {
bool reachedReturnPoint = sLib::chaseAngle(&rotation.x.mVal, 0, 0x222);
bool reachedReturnPoint = sLib::chaseAngle(&mRotation.x.mVal, 0, 0x222);
if (reachedReturnPoint) {
mStateMgr.changeState(StateID_TrapWait);
}
+1 -1
View File
@@ -69,7 +69,7 @@ bool dAcOtreasureIsland_c::createHeap() {
}
int dAcOtreasureIsland_c::create() {
subtype = params & 0xf;
subtype = mParams & 0xf;
if (subtype == 2) {
dStageMgr_c::GetInstance()->initUnkWithWater(0, &waterStuff);
}
+5 -5
View File
@@ -388,11 +388,11 @@ void dAcOtubo_c::finalizeState_Slope() {}
void dAcOtubo_c::initializeState_Rebirth() {
SpecialItemDropMgr *mgr = SpecialItemDropMgr::GetInstance();
mgr->giveSpecialDropItem(getParams2UpperByte(), roomid, &position, 0, rotation.y, -1);
mgr->giveSpecialDropItem(getParams2UpperByte(), roomid, &position, 0, mRotation.y, -1);
mField_0x9AC = position;
obj_pos = &mField_0x9AC;
mField_0x9F6 = 0;
rotation = rot_copy;
mRotation = rot_copy;
mQuat_0x98C.set(1.f, 0.f, 0.f, 0.f);
@@ -416,7 +416,7 @@ void dAcOtubo_c::initializeState_Rebirth() {
clearActorProperty(0x1);
}
void dAcOtubo_c::executeState_Rebirth() {
setPostion(pos_copy);
setPosition(pos_copy);
mOldPosition = pos_copy;
u8 count = -1;
switch (mField_0x9FC) {
@@ -491,7 +491,7 @@ void dAcOtubo_c::calcRoll() {
f32 vel_mag = VEC3Len(velocity);
f32 f1 = mAng(vel_mag * (mField_0x9D4 + 200.f)).radian();
f32 f2 = mAng(vel_mag * 182.0f * 0.2f).radian();
f32 f0 = mAng(angle.y - rotation.y).radian();
f32 f0 = mAng(angle.y - mRotation.y).radian();
mQuat_c q0, q1, q2, q3;
q1.setAxisRotation(mVec3_c::Ey, f0);
@@ -679,7 +679,7 @@ void dAcOtubo_c::attemptDestroyOnWall(const u32 &param0, const bool &param1) {
mVec3_c dAcOtubo_c::getCenter() const {
mMtx_c m;
m.ZXYrotS(rotation.x, rotation.y, rotation.z);
m.ZXYrotS(mRotation.x, mRotation.y, mRotation.z);
mVec3_c dir;
PSMTXMultVecSR(m, mVec3_c::Ey, dir);
+2 -2
View File
@@ -273,7 +273,7 @@ void dAcOTumbleWeed_c::calcMatrix() {
f32 vel_mag = VEC3Len(velocity);
f32 f1 = mAng(vel_mag * (mField_0x978 + 200.f)).radian();
f32 f2 = mAng(vel_mag * 182.0f * 0.2f).radian();
f32 f0 = mAng(angle.y - rotation.y).radian();
f32 f0 = mAng(angle.y - mRotation.y).radian();
mQuat_c q0, q1, q2, q3;
q1.setAxisRotation(mVec3_c::Ey, f0);
@@ -386,7 +386,7 @@ void dAcOTumbleWeed_c::calcWind() {
mVec3_c dAcOTumbleWeed_c::getPosition() const {
mMtx_c mtx;
mVec3_c vec;
mtx.ZXYrotS(rotation.x, rotation.y, rotation.z);
mtx.ZXYrotS(mRotation.x, mRotation.y, mRotation.z);
PSMTXMultVecSR(mtx, mVec3_c::Ey, vec);
return position + vec * 40.f;
}
@@ -37,9 +37,9 @@ bool dAcOUgSwitch_c::createHeap() {
}
int dAcOUgSwitch_c::create() {
mActiveSceneFlag = params & 0xFF;
field_0x3BD = (params >> 8) & 0xFF;
setVariant((params >> 16) & 0xF);
mActiveSceneFlag = mParams & 0xFF;
field_0x3BD = (mParams >> 8) & 0xFF;
setVariant((mParams >> 16) & 0xF);
if (!initAllocatorWork1Heap(0x1000, "dAcOUgSwitch_c::m_allocator", 0x20)) {
return FAILED;
}
+4 -4
View File
@@ -42,7 +42,7 @@ bool dAcOutajimaIsland_c::createHeap() {
int dAcOutajimaIsland_c::actorCreate() {
mInitialPos = position;
mInitialRot = rotation;
mInitialRot = mRotation;
mRingLayer = getRingLayer();
mParam2 = getParm2();
@@ -135,7 +135,7 @@ void dAcOutajimaIsland_c::movePlatforms() {
sLib::chaseAngle2(&field_0x5BE.x.mVal, field_0x5BC, field_0x5BE.y);
rotation.y = mInitialRot.y - field_0x5BE.x;
position.z = mInitialPos.z + ((mRingLayer - 1) * 1400.0f + 2500.0f) * rotation.y.cos();
position.x = mInitialPos.x + ((mRingLayer - 1) * 1400.0f + 2500.0f) * rotation.y.sin();
mRotation.y = mInitialRot.y - field_0x5BE.x;
position.z = mInitialPos.z + ((mRingLayer - 1) * 1400.0f + 2500.0f) * mRotation.y.cos();
position.x = mInitialPos.x + ((mRingLayer - 1) * 1400.0f + 2500.0f) * mRotation.y.sin();
}
+7 -7
View File
@@ -12,10 +12,10 @@
SPECIAL_ACTOR_PROFILE(ACTION_TAG, dTgAction_c, fProfile::ACTION_TAG, 0x20, 0, 0);
int dTgAction_c::create() {
mEnableFlag1 = (params >> 6) & 0xFF;
mEnableFlag2 = (params >> 14) & 0xFF;
mType = (params >> 0) & 0x3F;
matrixCreateFromPosRotYScale(mActiveMtx, position, rotation.y, mScale, nullptr, 0.f);
mEnableFlag1 = (mParams >> 6) & 0xFF;
mEnableFlag2 = (mParams >> 14) & 0xFF;
mType = (mParams >> 0) & 0x3F;
matrixCreateFromPosRotYScale(mActiveMtx, position, mRotation.y, mScale, nullptr, 0.f);
return SUCCEEDED;
}
@@ -26,14 +26,14 @@ int dTgAction_c::doDelete() {
void dTgAction_c::setActiveArea(f32 scale) {
if (mScaleIncrease < 0.1f) {
mScaleIncrease = scale;
matrixCreateFromPosRotYScale(mActiveMtx, position, rotation.y, mScale, nullptr, mScaleIncrease);
matrixCreateFromPosRotYScale(mActiveMtx, position, mRotation.y, mScale, nullptr, mScaleIncrease);
}
}
void dTgAction_c::resetActiveArea() {
if (mScaleIncrease > 0.f) {
mScaleIncrease = 0.f;
matrixCreateFromPosRotYScale(mActiveMtx, position, rotation.y, mScale, nullptr, 0.f);
matrixCreateFromPosRotYScale(mActiveMtx, position, mRotation.y, mScale, nullptr, 0.f);
field_0x134 = 0;
}
}
@@ -74,7 +74,7 @@ int dTgAction_c::actorExecute() {
player->onForceOrPreventActionFlags(0x400000);
setActiveArea(15.f);
} else if (mType == SHOW_DASH_PROMPT) {
if (mAng::abs(player->rotation.y - rotation.y) < (0x2000 + field_0x134)) {
if (mAng::abs(player->mRotation.y - mRotation.y) < (0x2000 + field_0x134)) {
player->onForceOrPreventActionFlags(0x20000000);
setActiveArea(50.f);
field_0x134.set(0x38E);
+4 -2
View File
@@ -1,11 +1,13 @@
#include "d/t/d_t_col_bomb_shield.h"
#include "common.h"
#include "d/a/obj/d_a_obj_base.h"
#include "d/a/d_a_player.h"
#include "d/a/obj/d_a_obj_base.h"
#include "d/col/cc/d_cc_s.h"
#include "m/m_mtx.h"
#include "rvl/MTX/mtx.h"
SPECIAL_ACTOR_PROFILE(COL_BOMSLD, dTgColBombShield, fProfile::COL_BOMSLD, 0x12, 0, 0);
STATE_DEFINE(dTgColBombShield, Wait);
@@ -22,7 +24,7 @@ int dTgColBombShield::create() {
mScale.y += offset;
mScale.z += offset;
mColMtx.transS(position.x, position.y + mScale.y * 0.5f - 0.05f, position.z);
mColMtx.ZXYrotM(rotation.x, rotation.y, rotation.z);
mColMtx.ZXYrotM(mRotation.x, mRotation.y, mRotation.z);
mMtx_c tmp;
PSMTXScale(tmp, mScale.x, mScale.y, mScale.z);
mColMtx += tmp;
+1 -1
View File
@@ -16,7 +16,7 @@ int dTgDowsing_c::create() {
}
mUntriggerStoryFlag = getUntriggerStoryFlag();
mTriggerStoryFlag = getTriggerStoryFlag();
rotation.z.set(0);
mRotation.z.set(0);
bool doThing = getDowsingOptionNum() <= DOWSING_MAX && (1 << getDowsingOptionNum() & 0xC3F) != 0;
mDowsingTarget.initialize(!doThing ? DowsingTarget::SLOT_QUEST : DowsingTarget::SLOT_STORY_EVENT, 0, nullptr, 0);
+3 -4
View File
@@ -2,7 +2,6 @@
#include "c/c_math.h"
SPECIAL_ACTOR_PROFILE(T_FAIRY, dTgFairy_c, fProfile::T_FAIRY, 0x0296, 0, 0);
bool dTgFairy_c::createHeap() {
@@ -11,7 +10,7 @@ bool dTgFairy_c::createHeap() {
}
int dTgFairy_c::create() {
mCount = params & 0x3F;
mCount = mParams & 0x3F;
if (mCount == 0 || mCount == 7) {
mCount = 1;
}
@@ -38,7 +37,7 @@ int dTgFairy_c::draw() {
}
void dTgFairy_c::createFairies() {
u32 parms = params;
u32 parms = mParams;
u32 someNum = (parms >> 6) & 0xFF;
u32 fairyParams1 = (parms >> 14) & 0x3F;
if (someNum > 100) {
@@ -68,7 +67,7 @@ mVec3_c dTgFairy_c::calcLocation(const f32 &offset) {
v.y = mScale.y * 0.5f;
v.x = mScale.x * calcRnd(0.5f, offset);
v.z = mScale.z * calcRnd(0.5f, offset);
v.rotY(rotation.y);
v.rotY(mRotation.y);
return position + v;
}
+2 -2
View File
@@ -13,7 +13,7 @@
SPECIAL_ACTOR_PROFILE(GATE2GND_TAG, dTgGateToGround_c, fProfile::GATE2GND_TAG, 0x22, 0, 0);
int dTgGateToGround_c::create() {
matrixCreateFromPosRotYScale(matrix, position, rotation.y, mScale, nullptr, 0.0f);
matrixCreateFromPosRotYScale(matrix, position, mRotation.y, mScale, nullptr, 0.0f);
delayFrames = 0;
@@ -25,7 +25,7 @@ int dTgGateToGround_c::create() {
u8 c;
};
} v;
v.val = params;
v.val = mParams;
params_FF_FF_00_00 = v.a;
params_00_00_FF_00 = v.b;
params_00_00_00_FF = v.c;
+2 -2
View File
@@ -64,8 +64,8 @@ void dTgGekoTag::doExecute() {
}
field_0x1FD = 0xFF;
u32 gekoParmTmp = (params & 0xFF) | 0x3FC00000;
gekoParmTmp = (gekoParmTmp & 0xFFFF00FF) | (params & 0xFF00);
u32 gekoParmTmp = (mParams & 0xFF) | 0x3FC00000;
gekoParmTmp = (gekoParmTmp & 0xFFFF00FF) | (mParams & 0xFF00);
u32 gekoParm = gekoParmTmp | ((mGekoParam != 0 ? 3 : 1) << 16);
mAng3_c gekoRot;
+1 -1
View File
@@ -65,5 +65,5 @@ int dTgGenkiDwsTgt_c::actorExecute() {
}
u16 dTgGenkiDwsTgt_c::getSceneFlagFromParams() {
return params & 0xFF;
return mParams & 0xFF;
}
+2 -2
View File
@@ -7,9 +7,9 @@
SPECIAL_ACTOR_PROFILE(TAG_HEAT_RESIST, dTgHeatResist_c, fProfile::TAG_HEAT_RESIST, 0x223, 0, 4);
int dTgHeatResist_c::create() {
mInverted = static_cast<u8>(params & 0x3);
mInverted = static_cast<u8>(mParams & 0x3);
matrixCreateFromPosRotYScale(matrix, position, rotation.y, mScale, nullptr, 0.0f);
matrixCreateFromPosRotYScale(matrix, position, mRotation.y, mScale, nullptr, 0.0f);
return SUCCEEDED;
}
+1 -1
View File
@@ -3,7 +3,7 @@
SPECIAL_ACTOR_PROFILE(TAG_MAP_INST, dTgMapInst_c, fProfile::TAG_MAP_INST, 0x021d, 0, 0);
int dTgMapInst_c::create() {
field_0xfc = params & 0xff;
field_0xfc = mParams & 0xff;
return SUCCEEDED;
}
+1 -1
View File
@@ -10,7 +10,7 @@ const f32 dTgNoEffectArea_c::sFloat2 = 100.0f;
int dTgNoEffectArea_c::create() {
mScale *= 0.01f;
PSMTXTrans(mMtx, position.x, position.y, position.z);
mMtx.YrotM(rotation.y);
mMtx.YrotM(mRotation.y);
PSMTXInverse(mMtx, mMtx);
addToList(sList);
return SUCCEEDED;
+4 -4
View File
@@ -46,8 +46,8 @@ int dTgReaction_c::create() {
}
}
field_0x4E0 = rotation.x & 0xFF;
rotation.x = angle.x = 0;
field_0x4E0 = mRotation.x & 0xFF;
mRotation.x = angle.x = 0;
if (field_0x4E0 < 0xFF && !SceneflagManager::sInstance->checkBoolFlag(roomid, field_0x4E0)) {
return FAILED;
@@ -165,7 +165,7 @@ void dTgReaction_c::checkForBonkItem() {
if (field_0x4DD == 0) {
mVec3_c c = mVec3_c::Ez * rad;
mVec3_c c2 = position;
c.rotY(rotation.y);
c.rotY(mRotation.y);
c2 += c;
c2.y += field_0x4E4;
u32 newItemParms = dAcItem_c::createItemParams(ITEM_HEART_PIECE, 1, 0, getSceneFlag(), 1, 0xFF);
@@ -186,7 +186,7 @@ void dTgReaction_c::checkForBonkItem() {
} else if (p == 1) {
uVar3 = 5;
mVec3_c c = mVec3_c::Ez * rad;
c.rotY(rotation.y);
c.rotY(mRotation.y);
pos += c;
} else {
uVar3 = 6;
+6 -6
View File
@@ -9,12 +9,12 @@ STATE_DEFINE(dTgShipWindow_c, On);
STATE_DEFINE(dTgShipWindow_c, Off);
int dTgShipWindow_c::create() {
mInitialStateFlag = params & 0xFF;
mOutputStateFlagBase = (params >> 8) & 0xFF;
mOffEventId = (params >> 16) & 0xFF;
mOnEventId = (params >> 24) & 0xFF;
mAlwaysPlayEvent = rotation.x & 1;
rotation.x = 0;
mInitialStateFlag = mParams & 0xFF;
mOutputStateFlagBase = (mParams >> 8) & 0xFF;
mOffEventId = (mParams >> 16) & 0xFF;
mOnEventId = (mParams >> 24) & 0xFF;
mAlwaysPlayEvent = mRotation.x & 1;
mRotation.x = 0;
if (SceneflagManager::sInstance->checkBoolFlag(roomid, mInitialStateFlag)) {
SceneflagManager::sInstance->setFlag(roomid, mOutputStateFlagBase);
mStateMgr.changeState(StateID_On);
+6 -5
View File
@@ -5,6 +5,7 @@
#include "d/col/c/c_m3d_g_cps.h"
#include "d/snd/d_snd_3d_manager.h"
#include "d/t/d_t_sound_area_mgr.h"
#include "rvl/MTX.h" // IWYU pragma: export
SPECIAL_ACTOR_PROFILE(TAG_SOUND_AREA, dTgSndAr_c, fProfile::TAG_SOUND_AREA, 0x0146, 0, 0);
@@ -23,10 +24,10 @@ int dTgSndAr_c::create() {
switch (getTypeFromParams()) {
case 0:
PSMTXTrans(mtx.m, position.x, position.y, position.z);
mtx.YrotM(rotation.y);
mtx.YrotM(mRotation.y);
PSMTXInverse(mtx.m, mtx.m);
break;
case 3: mRail.initWithPathIndex(params >> 8 & 0xFF, roomid, 0); break;
case 3: mRail.initWithPathIndex(mParams >> 8 & 0xFF, roomid, 0); break;
}
fBase_c *base = nullptr;
@@ -36,7 +37,7 @@ int dTgSndAr_c::create() {
}
dAcBase_c *ac = static_cast<dAcBase_c *>(base);
if (!ac->isActorPlayer() && checkPosInArea(ac->position)) {
ac->setTgSndAreaFlag(params & 0xFF);
ac->setTgSndAreaFlag(mParams & 0xFF);
}
}
return SUCCEEDED;
@@ -49,12 +50,12 @@ int dTgSndAr_c::doDelete() {
int dTgSndAr_c::actorExecute() {
dAcBase_c *link = dAcPy_c::LINK;
if (link != nullptr && checkPosInArea(link->position)) {
link->setTgSndAreaFlag(params & 0xFF);
link->setTgSndAreaFlag(mParams & 0xFF);
}
if (dSnd3DManager_c::GetInstance() != nullptr) {
mVec3_c pos(dSnd3DManager_c::GetInstance()->getCameraTargetPos());
if (checkPosInArea(pos) && dTgSndMg_c::GetInstance() != nullptr) {
dTgSndMg_c::GetInstance()->setSndFlag(params & 0xFF);
dTgSndMg_c::GetInstance()->setSndFlag(mParams & 0xFF);
}
}
return SUCCEEDED;
+5 -5
View File
@@ -14,10 +14,10 @@ int dTgSwArea_c::create() {
setStoryflag = getSetStoryflag();
unsetStoryflag = getUnsetStoryflag();
rotation.x = 0;
rotation.z = 0;
mRotation.x = 0;
mRotation.z = 0;
matrixCreateFromPosRotYScale(area, position, rotation.y, mScale, nullptr, 0.0f);
matrixCreateFromPosRotYScale(area, position, mRotation.y, mScale, nullptr, 0.0f);
return SUCCEEDED;
}
@@ -46,12 +46,12 @@ int dTgSwArea_c::actorExecute() {
if (scale < 1.0f) {
scale = 50.0f;
matrixCreateFromPosRotYScale(area, position, rotation.y, mScale, nullptr, scale);
matrixCreateFromPosRotYScale(area, position, mRotation.y, mScale, nullptr, scale);
}
} else {
if (scale > 1.0f) {
scale = 0.0f;
matrixCreateFromPosRotYScale(area, position, rotation.y, mScale, nullptr, scale);
matrixCreateFromPosRotYScale(area, position, mRotation.y, mScale, nullptr, scale);
}
if (isTemporary) {
+2 -3
View File
@@ -3,12 +3,11 @@
#include "d/flag/sceneflag_manager.h"
#include "toBeSorted/time_area_mgr.h"
SPECIAL_ACTOR_PROFILE(TAG_TIME_AREA_CHECK, dTgTimeAreaCheck_c, fProfile::TAG_TIME_AREA_CHECK, 0x01AC, 0, 0);
int dTgTimeAreaCheck_c::create() {
mPastSceneFlag = params & 0xFF;
mPresentSceneFlag = (params >> 8) & 0xFF;
mPastSceneFlag = mParams & 0xFF;
mPresentSceneFlag = (mParams >> 8) & 0xFF;
return SUCCEEDED;
}
+3 -1
View File
@@ -1,11 +1,13 @@
#include "d/t/d_t_time_door_beam.h"
#include "d/a/d_a_player.h"
#include "toBeSorted/area_math.h"
SPECIAL_ACTOR_PROFILE(TAG_TIME_DOOR_BEAM, dTgTimeDoorBeam_c, fProfile::TAG_TIME_DOOR_BEAM, 0x252, 0, 0);
int dTgTimeDoorBeam_c::create() {
matrixCreateFromPosRotYScale(matrix, position, rotation.y, mScale, nullptr, 0.0f);
matrixCreateFromPosRotYScale(matrix, position, mRotation.y, mScale, nullptr, 0.0f);
return SUCCEEDED;
}
+4 -5
View File
@@ -2,7 +2,6 @@
#include "d/flag/sceneflag_manager.h"
SPECIAL_ACTOR_PROFILE(TAG_TIMER, dTgTimer_c, fProfile::TAG_TIMER, 0x029F, 0, 0);
// TODO counter abstraction
@@ -45,19 +44,19 @@ int dTgTimer_c::actorExecute() {
}
int dTgTimer_c::getSubtypeFromParams() {
return params & 0xFF;
return mParams & 0xFF;
}
u16 dTgTimer_c::getTimerFromParams() {
return params >> 8 & 0xFF;
return mParams >> 8 & 0xFF;
}
u16 dTgTimer_c::getCheckSceneflag() {
return params >> 0x10 & 0xFF;
return mParams >> 0x10 & 0xFF;
}
u16 dTgTimer_c::getSetSceneflag() {
return params >> 0x18 & 0xFF;
return mParams >> 0x18 & 0xFF;
}
u16 dTgTimer_c::getTimer() {
+1 -1
View File
@@ -18,7 +18,7 @@ int dTgTouchTag::create() {
mActivatorIndex = !(getActivatorIndex() == 0xF) ? getActivatorIndex() : 0;
mZoneFlag = getZoneFlag();
mChkFlag = getChkFlag();
matrixCreateFromPosRotYScale(mAreaOfEffect, position, rotation.y, mScale, nullptr, 0.0f);
matrixCreateFromPosRotYScale(mAreaOfEffect, position, mRotation.y, mScale, nullptr, 0.0f);
mStateMgr.changeState(StateID_Wait);
return SUCCEEDED;
}
+9 -10
View File
@@ -60,15 +60,15 @@ dAcBase_c::dAcBase_c()
someStr[0] = 0;
if (s_Create_Position) {
setPostion(*s_Create_Position);
setPosition(*s_Create_Position);
}
if (s_Create_Rotation) {
SetRotation(*s_Create_Rotation);
mRotation = *s_Create_Rotation;
}
if (s_Create_Scale) {
SetScale(*s_Create_Scale);
mScale = *s_Create_Scale;
} else {
mScale.set(1.0f, 1.0f, 1.0f);
}
@@ -179,7 +179,7 @@ int dAcBase_c::create() {
void dAcBase_c::postCreate(fBase_c::MAIN_STATE_e state) {
if (state == SUCCESS) {
pos_copy = position;
rot_copy = rotation;
rot_copy = mRotation;
room_id_copy = roomid;
}
dBase_c::postCreate(state);
@@ -227,7 +227,6 @@ int dAcBase_c::preDelete() {
}
}
if (checkActorProperty(0x02000000)) {
changeLoadedEntitiesNoSet();
}
@@ -304,7 +303,7 @@ bool dAcBase_c::restorePosRotFromCopy() {
return 0;
}
position = pos_copy;
rotation = rot_copy;
mRotation = rot_copy;
return 1;
}
@@ -449,8 +448,8 @@ bool dAcBase_c::getDistanceAndAngleToActor(
angleToActorX.set(cLib::targetAngleX(position, actor->position));
if ((distSquared <= distThresh * distThresh)) {
if (mAng::abs((s32)(rotation.y - angleToActorY)) <= yAngle &&
mAng::abs((s32)(rotation.x - angleToActorX)) <= xAngle) {
if (mAng::abs((s32)(mRotation.y - angleToActorY)) <= yAngle &&
mAng::abs((s32)(mRotation.x - angleToActorX)) <= xAngle) {
isWithinRange = true;
}
}
@@ -666,7 +665,7 @@ dAcBase_c *dAcBase_c::createActor(
}
if (actorRotation == nullptr) {
actorRotation = &rotation;
actorRotation = &mRotation;
}
if (actorScale == nullptr) {
@@ -697,7 +696,7 @@ dAcBase_c *dAcBase_c::createActorStage(
}
if (actorRotation == nullptr) {
actorRotation = &rotation;
actorRotation = &mRotation;
}
if (actorScale == nullptr) {
+1 -1
View File
@@ -24,7 +24,7 @@ int dAcBirdBase_c::draw() {
void dAcBirdBase_c::updateMatrixBird() {
mWorldMtx.transS(position);
mWorldMtx.concat(field_0xF80);
mWorldMtx.ZrotM(rotation.z);
mWorldMtx.ZrotM(mRotation.z);
mWorldMtx.scaleM(field_0xF50.x, field_0xF50.y, field_0xF50.z);
mMdl.getModel().setLocalMtx(mWorldMtx);
mMdl.getModel().calc(false);
+1 -1
View File
@@ -219,7 +219,7 @@ bool dAcOInsect_c::fn_8018FAD0() {
void dAcOInsect_c::fn_8018FDF0(const mVec3_c &point) {
mMtx_c mtx;
field_0x360 = point;
mtx.setAxisRotation(field_0x360, rotation.y.radian2());
mtx.setAxisRotation(field_0x360, mRotation.y.radian2());
// TODO
f32 a_comparision = 0.99f;
}
+6 -6
View File
@@ -263,7 +263,7 @@ void dAcSalbageObj_c::calcMtxFromSalbageNpc(mMtx_c &ret) {
dAcNpcSlb_c *npc = dSalvageMgr_c::sInstance->mSlbRef.get();
if (npc == nullptr) {
ret.transS(position.x, position.y, position.z);
ret.ZXYrotM(rotation);
ret.ZXYrotM(mRotation);
} else {
ret = npc->getCarriedObjMtx();
mMtx_c rotMtx = dSalvageMgr_c::sInstance->getCarryRotMtx2(mSalvageIf.getSalvageObjId());
@@ -278,7 +278,7 @@ mMtx_c dAcSalbageObj_c::calcWorldMtx() {
calcMtxFromSalbageNpc(ret);
} else {
ret.transS(position);
ret.ZXYrotM(rotation);
ret.ZXYrotM(mRotation);
}
return ret;
@@ -364,11 +364,11 @@ void dAcSalbageObj_c::initializeState_DemoThrow() {
mVec3_c result;
MTXMultVecSR(mWorldSRMtx, mVec3_c::Ez, result);
rotation.y = result.atan2sX_Z();
rotation.x = -cM::atan2s(result.y, result.absXZ());
rotation.z = field_0x904;
mRotation.y = result.atan2sX_Z();
mRotation.x = -cM::atan2s(result.y, result.absXZ());
mRotation.z = field_0x904;
angle.x = 0;
angle.y = rotation.y;
angle.y = mRotation.y;
angle.z = 0;
forwardMaxSpeed = -40.0f;
mBgObjAcch.Set(this, 1, &mBgAcchCir);
+2 -3
View File
@@ -268,7 +268,6 @@ void dNpcMdlCallbackAng_c::finishTarget() {
mForceCalc = true;
}
void dNpcMdlCallbackAng_c::calc() {
mAng3_c ang = mCurrent;
@@ -305,7 +304,7 @@ void dNpcMdlCallbackYXZFixed_c::apply(mMtx_c *result) const {
}
void dNpcMdlCallbackYXZFixed_c::vt_0x20(const dAcBase_c *ac) {
mActorRotation = ac->rotation;
mActorRotation = ac->mRotation;
}
void dNpcMdlCallbackYZX_c::apply(mMtx_c *result) const {
@@ -333,7 +332,7 @@ void dNpcMdlCallbackQuat_c::apply(mMtx_c *result) const {
mQuat_c resultQuat;
mVec3_c trans;
mMtx_c tmp;
mStart.slerpTo(mTarget, mSlerpFactor, resultQuat);
quatMtx.fromQuat(resultQuat);
+1 -1
View File
@@ -61,7 +61,7 @@ bool dAcArrow_c::createHeap() {
extern "C" void fn_8025E5E0(void *);
int dAcArrow_c::create() {
mSubType = params & 0xFF;
mSubType = mParams & 0xFF;
CREATE_ALLOCATOR(dAcArrow_c);
field_0x67C |= 4;
+3 -3
View File
@@ -422,9 +422,9 @@ void dAcBoomerang_c::initializeState_Move() {
angle.x = 2000 - player->vt_0x198();
rotation.x.set(-angle.x);
rotation.y.set(angle.y);
rotation.z.set(0);
mRotation.x.set(-angle.x);
mRotation.y.set(angle.y);
mRotation.z.set(0);
field_0x8B2 = 0;
mOldPosition = position;
+6 -6
View File
@@ -89,14 +89,14 @@ bool dAcOsw_c::createHeap() {
}
int dAcOsw_c::actorCreate() {
mSwitchType = params & 0xF;
mOnSceneFlag = (params >> 0xE);
mSwitchType = mParams & 0xF;
mOnSceneFlag = (mParams >> 0xE);
CREATE_ALLOCATOR(dAcOsw_c);
mCollision.SetRideCallback(rideCallback);
mModel.setCallback(&mButtonCtrl);
dBgS::GetInstance()->Regist(&mCollision, this);
mOffSceneFlag = (params >> 0x4);
mCanBeSeen = ((params >> 0xC) & 3) == 0;
mOffSceneFlag = (mParams >> 0x4);
mCanBeSeen = ((mParams >> 0xC) & 3) == 0;
nw4r::g3d::ResMdl resMdl = mModel.getResMdl();
nw4r::g3d::ResNode node = resMdl.GetResNode("button");
mButtonCtrl.init(node.GetID());
@@ -158,7 +158,7 @@ int dAcOsw_c::actorExecute() {
if (mScale.x >= 1.0f) {
if (!mHidden) {
dJEffManager_c::spawnEffect(
PARTICLE_RESOURCE_ID_MAPPING_754_, position, &rotation, nullptr, nullptr, nullptr, 0, 0
PARTICLE_RESOURCE_ID_MAPPING_754_, position, &mRotation, nullptr, nullptr, nullptr, 0, 0
);
startSound(SE_TIMESLIP_TIMESLIP_REV);
mHidden = true;
@@ -173,7 +173,7 @@ int dAcOsw_c::actorExecute() {
if (mScale.x <= 0.0f) {
if (!mShown) {
dJEffManager_c::spawnEffect(
PARTICLE_RESOURCE_ID_MAPPING_754_, position, &rotation, nullptr, nullptr, nullptr, 0, 0
PARTICLE_RESOURCE_ID_MAPPING_754_, position, &mRotation, nullptr, nullptr, nullptr, 0, 0
);
startSound(SE_TIMESLIP_TIMESLIP);
mShown = true;
+21 -21
View File
@@ -963,7 +963,7 @@ int dAcTbox_c::create() {
roomid = roomId_tmp;
changeLoadedEntitiesWithSet();
}
setItemId((ITEM_ID)(rotation.z & 0x1FF));
setItemId((ITEM_ID)(mRotation.z & 0x1FF));
if (mItemId > MAX_ITEM_ID) {
return FAILED;
}
@@ -971,22 +971,22 @@ int dAcTbox_c::create() {
if (mVariant == GODDESS) {
setItemId((ITEM_ID)(MAX_ITEM_ID - mItemId));
}
mSpawnSceneFlag = (params >> 0x14) & 0xFF;
mSetSceneFlag = rotation.x & 0xFF;
mSpawnSceneFlag = (mParams >> 0x14) & 0xFF;
mSetSceneFlag = mRotation.x & 0xFF;
setChestFlag();
field_0x120F = ((rotation.x >> 8) & 1) == 0;
field_0x120F = ((mRotation.x >> 8) & 1) == 0;
if (!noObstructionCheck()) {
setDoObstructionCheck();
}
field_0x1208 = (rotation.x >> 0xA) & 0xF;
field_0x1208 = (mRotation.x >> 0xA) & 0xF;
switch (fn_8026B370()) {
case 0: field_0x120A = 0; break;
case 1: field_0x120A = 1; break;
case 3: field_0x120A = 3; break;
default: field_0x120A = 3; break;
}
rotation.z.set(0);
rotation.x.set(0);
mRotation.z.set(0);
mRotation.x.set(0);
// This part of the code checks if there's another chest with similar properties
// and only keeps one of them.
@@ -1218,7 +1218,7 @@ int dAcTbox_c::actorExecute() {
v1 *= field_0x11E8;
v2 *= field_0x11E8;
mCcD3.Set(v1, v2);
mCcD3.Set(position, rotation.y);
mCcD3.Set(position, mRotation.y);
mVec3_c cylC;
f32 width, height;
getCylParams(&cylC, &width, &height);
@@ -1280,7 +1280,7 @@ int dAcTbox_c::actorExecute() {
v1 *= field_0x11E8;
v2 *= field_0x11E8;
mCcD1.Set(v1, v2);
mCcD1.Set(position, rotation.y);
mCcD1.Set(position, mRotation.y);
if (field_0x120C == 1) {
mCcD2.OnTgSet();
switch ((u32)mVariant) {
@@ -1304,7 +1304,7 @@ int dAcTbox_c::actorExecute() {
v1 *= field_0x11E8;
v2 *= field_0x11E8;
mCcD2.Set(v1, v2);
mCcD2.Set(field_0x11D8, rotation.y);
mCcD2.Set(field_0x11D8, mRotation.y);
} else {
mCcD2.ClrTgSet();
}
@@ -1368,7 +1368,7 @@ int dAcTbox_c::actorExecuteInEvent() {
if (field_0x120B < 3) {
mVec3_c pos = link->position;
f32 f9 = cLib::addCalcPosXZ(&pos, v1, 0.25, 200.0f, 0.1f);
s16 rot2 = link->rotation.y;
s16 rot2 = link->mRotation.y;
s16 d = sLib::addCalcAngle(&rot2, a1, 2, 0x3FFF, 1);
if (f9 < 1.0f && labs(d) < 0xB6) {
link->setPosYRot(v1, a1, 0, 0, 0);
@@ -1404,7 +1404,7 @@ int dAcTbox_c::actorExecuteInEvent() {
v1 *= field_0x11E8;
v2 *= field_0x11E8;
mCcD3.Set(v1, v2);
mCcD3.Set(position, rotation.y);
mCcD3.Set(position, mRotation.y);
mVec3_c cylC;
f32 width, height;
getCylParams(&cylC, &width, &height);
@@ -1466,7 +1466,7 @@ int dAcTbox_c::actorExecuteInEvent() {
v1 *= field_0x11E8;
v2 *= field_0x11E8;
mCcD1.Set(v1, v2);
mCcD1.Set(position, rotation.y);
mCcD1.Set(position, mRotation.y);
if (field_0x120C == 1) {
mCcD2.OnTgSet();
switch ((u32)mVariant) {
@@ -1490,7 +1490,7 @@ int dAcTbox_c::actorExecuteInEvent() {
v1 *= field_0x11E8;
v2 *= field_0x11E8;
mCcD2.Set(v1, v2);
mCcD2.Set(field_0x11D8, rotation.y);
mCcD2.Set(field_0x11D8, mRotation.y);
} else {
mCcD2.ClrTgSet();
}
@@ -1586,15 +1586,15 @@ void dAcTbox_c::setDoObstructionCheck() {
}
int dAcTbox_c::isActualVisibleBox() const {
return (params >> 0x1C);
return (mParams >> 0x1C);
}
bool dAcTbox_c::noObstructionCheck() const {
return (rotation.x >> 9) & 1;
return (mRotation.x >> 9) & 1;
}
int dAcTbox_c::fn_8026B370() const {
return (rotation.x >> 0xE) & 0x3;
return (mRotation.x >> 0xE) & 0x3;
}
void dAcTbox_c::fn_8026B380(mVec3_c &out) const {
@@ -1950,7 +1950,7 @@ void dAcTbox_c::initializeState_Open() {
mVec3_c pos;
fn_8026B380(pos);
mVec3_c p2 = fn_8026B3C0();
dJEffManager_c::spawnEffect(PARTICLE_RESOURCE_ID_MAPPING_209_, pos, &rotation, &p2, nullptr, nullptr, 0, 0);
dJEffManager_c::spawnEffect(PARTICLE_RESOURCE_ID_MAPPING_209_, pos, &mRotation, &p2, nullptr, nullptr, 0, 0);
}
fn_8026D140();
ITEM_ID itemId = mItemId != 0 ? (ITEM_ID)mItemId : ITEM_GODDESS_HARP;
@@ -2253,7 +2253,7 @@ void dAcTbox_c::fn_8026D3C0() {
}
void dAcTbox_c::setChestFlag() {
field_0x1207 = (rotation.z >> 9) & 0x3F;
field_0x1207 = (mRotation.z >> 9) & 0x3F;
}
void dAcTbox_c::setTboxFlag() {
@@ -2369,7 +2369,7 @@ void dAcTbox_c::unregisterDowsing() {
void dAcTbox_c::spawnAppearEffect() {
dJEffManager_c::spawnEffect(
PARTICLE_RESOURCE_ID_MAPPING_208_, position, &rotation, nullptr, nullptr, nullptr, 0, 0
PARTICLE_RESOURCE_ID_MAPPING_208_, position, &mRotation, nullptr, nullptr, nullptr, 0, 0
);
}
@@ -2414,7 +2414,7 @@ bool dAcTbox_c::checkIsClear() const {
}
void dAcTbox_c::fn_8026DAC0(mAng &ang) {
ang = rotation.y - 0x8000;
ang = mRotation.y - 0x8000;
}
void dAcTbox_c::fn_8026DAD0(const mVec3_c *a, mVec3_c *b) const {
+2 -2
View File
@@ -35,7 +35,7 @@ int dAcOwaterSpout_c::create() {
updateMatrix();
mMdl.getModel().setLocalMtx(mWorldMtx);
mStateMgr.changeState(StateID_Wait);
if (params == 1) {
if (mParams == 1) {
mScale.y *= 4.0f;
}
mMdl.getModel().setScale(mScale);
@@ -61,7 +61,7 @@ int dAcOwaterSpout_c::draw() {
}
void dAcOwaterSpout_c::initializeState_Wait() {
if (params == 1) {
if (mParams == 1) {
return;
}
dJEffManager_c::spawnEffect(PARTICLE_RESOURCE_ID_MAPPING_213_, position, nullptr, &mScale, nullptr, nullptr, 0, 0);
+14 -12
View File
@@ -262,7 +262,7 @@ bool cBgS::LineCross(cBgS_LinChk *pLine) {
do {
if (chkElm->CheckAll(pLine) && chkElm->mpBgW->LineCheck(pLine)) {
const dAcObjBase_c *pObj = chkElm->mObj.get();
pLine->SetActorInfo(i, chkElm->mpBgW, pObj ? pObj->unique_ID : 0);
pLine->SetActorInfo(i, chkElm->mpBgW, pObj ? pObj->mID : 0);
pLine->SetHit();
}
@@ -290,7 +290,7 @@ f32 cBgS::GroundCross(cBgS_GndChk *pGnd) {
do {
if (chkElm->CheckAll(pGnd) && chkElm->mpBgW->GroundCross(pGnd)) {
const dAcObjBase_c *pObj = chkElm->mObj.get();
pGnd->SetActorInfo(i, chkElm->mpBgW, pObj ? pObj->unique_ID : 0);
pGnd->SetActorInfo(i, chkElm->mpBgW, pObj ? pObj->mID : 0);
}
i++;
chkElm++;
@@ -344,7 +344,7 @@ bool cBgS::ChkPolySafe(cBgS_PolyInfo const &info) const {
return false;
}
const dAcObjBase_c *pObj = mChkElem[bgIndex].mObj.get();
return info.ChkSafe(mChkElem[bgIndex].mpBgW, pObj ? pObj->unique_ID : 0);
return info.ChkSafe(mChkElem[bgIndex].mpBgW, pObj ? pObj->mID : 0);
}
bool cBgS::GetTriPla(cBgS_PolyInfo const &info, cM3dGPla *pPlane) const {
@@ -431,7 +431,7 @@ void dBgS::ClrMoveFlag() {
for (cBgS_ChkElm *chkElm = mChkElem; chkElm < end; chkElm++) {
if (chkElm->mpBgW) {
if (chkElm->mObj.get()) {
chkElm->mpBgW->CalcDiffShapeAngleY(chkElm->mObj.get()->rotation.y);
chkElm->mpBgW->CalcDiffShapeAngleY(chkElm->mObj.get()->mRotation.y);
}
chkElm->mpBgW->OffMoveFlag();
}
@@ -446,7 +446,7 @@ bool dBgS::Regist(dBgW_Base *pBg, dAcObjBase_c *pObj) {
return false;
}
if (pObj && pBg->ChkMoveBg()) {
pBg->SetOldShapeAngleY(pObj->rotation.y);
pBg->SetOldShapeAngleY(pObj->mRotation.y);
pBg->SetRoomId(pObj->getRoomId());
}
return cBgS::Regist(pBg, pObj);
@@ -771,7 +771,7 @@ f32 dBgS::RoofChk(dBgS_RoofChk *pRoof) {
if (pBgW->RoofChk(pRoof)) {
const dAcObjBase_c *pObj = chkElm->mObj.get();
pRoof->SetActorInfo(i, chkElm->mpBgW, pObj ? pObj->unique_ID : 0);
pRoof->SetActorInfo(i, chkElm->mpBgW, pObj ? pObj->mID : 0);
}
}
++i;
@@ -799,7 +799,7 @@ bool dBgS::SplGrpChk(dBgS_SplGrpChk *pSplGrp) {
if (pBgW->SplGrpChk(pSplGrp)) {
ret = true;
const dAcObjBase_c *pObj = chkElm->mObj.get();
pSplGrp->SetActorInfo(i, chkElm->mpBgW, pObj ? pObj->unique_ID : 0);
pSplGrp->SetActorInfo(i, chkElm->mpBgW, pObj ? pObj->mID : 0);
pSplGrp->OnFind();
}
}
@@ -830,10 +830,10 @@ bool dBgS::SphChk(dBgS_SphChk *pSph, void *p1) {
const dAcObjBase_c *pObj = chkElm->mObj.get();
dBgW_Base *pBgW = chkElm->mpBgW;
pSph->SetInfo(i, pBgW, pObj ? pObj->unique_ID : 0);
pSph->SetInfo(i, pBgW, pObj ? pObj->mID : 0);
if (pBgW->SphChk(pSph, p1)) {
const dAcObjBase_c *pObj = chkElm->mObj.get();
pSph->SetActorInfo(i, chkElm->mpBgW, pObj ? pObj->unique_ID : 0);
pSph->SetActorInfo(i, chkElm->mpBgW, pObj ? pObj->mID : 0);
ret = true;
}
}
@@ -870,9 +870,11 @@ void dBgS::MoveBgTransPos(
dBgW_Base *pBg = mChkElem[bgIdx].mpBgW;
if (pBg && ChkPolySafe(info)) {
const dAcObjBase_c *pObj = GetInstance()->GetActorPointer(info);
if ((!pObj || (pObj->baseProperties & 4)) && pBg->ChkMoveFlag()) {
// TODO -> Check TransPos Params (void may be dAcObjBase_c)
pBg->TransPos(info, mChkElem[bgIdx].mObj.get(), param_1, i_pos, i_angle, i_shapeAngle);
if (pObj == nullptr || pObj->checkBaseProperty(dBase_c::BASE_PROP_0x4)) {
if (pBg->ChkMoveFlag()) {
// TODO -> Check TransPos Params (void may be dAcObjBase_c)
pBg->TransPos(info, mChkElem[bgIdx].mObj.get(), param_1, i_pos, i_angle, i_shapeAngle);
}
}
}
}
+31 -7
View File
@@ -37,12 +37,36 @@ void dBgS_AcchCir::SetWall(f32 wallH, f32 wallR) {
}
dBgS_Acch::dBgS_Acch()
: mFlags(0), mpPos(nullptr), mpOldPos(nullptr), mSpeed(0.0f, 0.0f, 0.0f), mpSpeed(nullptr), mpAngle(nullptr),
mpShapeAngle(nullptr), mBgIndex(0), mField_0x094(0), mField_0x098(0), mpMyObj(nullptr), mTblSize(0),
mpAcchCir(nullptr), mField_0x0A8(0.0f), mField_0x0AC(0.0f), mGroundHeight(-1e9f), mField_0x0B4(120.0f),
mField_0x0C8(0.0f), mField_0x0CC(0.0f), mRoofHeight(1e9f), mField_0x0D4(1.0f), mField_0x0D8(0.0f),
mpOutPolyInfo(nullptr), mRoofH_0x0E0(0.0f), mGroundH_0x0E4(0.0f), mField_0x0E8(1e9f), mField_0x1D0(-1.0f),
mField_0x2F4(1000.0f), mField_0x390(0), mField_0x394(0) {
: mFlags(0),
mpPos(nullptr),
mpOldPos(nullptr),
mSpeed(0.0f, 0.0f, 0.0f),
mpSpeed(nullptr),
mpAngle(nullptr),
mpShapeAngle(nullptr),
mBgIndex(0),
mField_0x094(0),
mField_0x098(0),
mpMyObj(nullptr),
mTblSize(0),
mpAcchCir(nullptr),
mField_0x0A8(0.0f),
mField_0x0AC(0.0f),
mGroundHeight(-1e9f),
mField_0x0B4(120.0f),
mField_0x0C8(0.0f),
mField_0x0CC(0.0f),
mRoofHeight(1e9f),
mField_0x0D4(1.0f),
mField_0x0D8(0.0f),
mpOutPolyInfo(nullptr),
mRoofH_0x0E0(0.0f),
mGroundH_0x0E4(0.0f),
mField_0x0E8(1e9f),
mField_0x1D0(-1.0f),
mField_0x2F4(1000.0f),
mField_0x390(0),
mField_0x394(0) {
SetPolyPassChk(GetPolyPassChkInfo());
SetGrpPassChk(GetGrpPassChkInfo());
@@ -63,7 +87,7 @@ void dBgS_Acch::Set(
mpOldPos = pOldPos;
mpMyObj = pObj;
mActorId = pObj->unique_ID;
mActorId = pObj->mID;
mpSpeed = pSpeed;
if (pSpeed) {
mSpeed = *pSpeed;
+17 -6
View File
@@ -18,9 +18,19 @@ bool cBgW::sSphCheck;
mVec3_c dBgW::sWallCorrectPos(0.0f, 0.0f, 0.0f);
cBgW::cBgW()
: mpMdlMtx(nullptr), mTransVel(0.0f, 0.0f, 0.0f), mpScale(nullptr), mFlags(GLOBAL_e), mRootGroupIdx(-1),
mpTri(nullptr), mpRwg(nullptr), mpVtxTbl(nullptr), mpBgd(nullptr), mpBlk(nullptr), mpGrp(nullptr),
mpNodeTree(nullptr), mNeedsFullTransform(true) {
: mpMdlMtx(nullptr),
mTransVel(0.0f, 0.0f, 0.0f),
mpScale(nullptr),
mFlags(GLOBAL_e),
mRootGroupIdx(-1),
mpTri(nullptr),
mpRwg(nullptr),
mpVtxTbl(nullptr),
mpBgd(nullptr),
mpBlk(nullptr),
mpGrp(nullptr),
mpNodeTree(nullptr),
mNeedsFullTransform(true) {
PSMTXIdentity(mInvMtx);
PSMTXIdentity(mMtx);
PSMTXIdentity(mMtxUnk);
@@ -497,7 +507,8 @@ void cBgW::RwgLineCheck(int polyIdx, cBgS_LinChk *pLine) {
pLine->ChkBackFlag()
)) {
dBgPc pc = *mpPolyCodes.GetDBgPc(mpBgd->mTriTbl[polyIdx].mId);
if (!dBgWKCol::ChkPolyThrough(GetId(), &pc, pLine)
if (
!dBgWKCol::ChkPolyThrough(GetId(), &pc, pLine)
// && fn_803599c0(/* params */)
) {
pLine->mLin.mEnd = cross_pos;
@@ -794,7 +805,7 @@ bool dBgW::SphChk(dBgS_SphChk *pSph, void *pV) {
}
void dBgW::CrrPos(cBgS_PolyInfo const &info, void *pObj, bool b, mVec3_c *pPos, mAng3_c *pAngle, mAng3_c *pShapeAngle) {
if (mpCrrFunc && static_cast<dAcObjBase_c *>(pObj)->baseProperties & dBase_c::BASE_PROP_0x4) {
if (mpCrrFunc && static_cast<dAcObjBase_c *>(pObj)->checkBaseProperty(dBase_c::BASE_PROP_0x4)) {
mpCrrFunc(this, pObj, info, b, pPos, pAngle, pShapeAngle);
}
}
@@ -802,7 +813,7 @@ void dBgW::CrrPos(cBgS_PolyInfo const &info, void *pObj, bool b, mVec3_c *pPos,
void dBgW::TransPos(
cBgS_PolyInfo const &info, void *pObj, bool b, mVec3_c *pPos, mAng3_c *pAngle, mAng3_c *pShapeAngle
) {
if (mpCrrFunc && static_cast<dAcObjBase_c *>(pObj)->baseProperties & dBase_c::BASE_PROP_0x4) {
if (mpCrrFunc && static_cast<dAcObjBase_c *>(pObj)->checkBaseProperty(dBase_c::BASE_PROP_0x4)) {
mpCrrFunc(this, pObj, info, b, pPos, pAngle, pShapeAngle);
}
}
+11 -14
View File
@@ -1,28 +1,27 @@
#include "d/d_base.h"
// .sbss
/* 805750c0 */ u32 dBase_c::s_ExecuteControlFlags;
/* 805750c0 */ u32 dBase_c::s_DrawControlFlags;
/* 805750c0 */ u32 dBase_c::s_NextExecuteControlFlags;
u32 dBase_c::s_ExecuteControlFlags;
u32 dBase_c::s_DrawControlFlags;
u32 dBase_c::s_NextExecuteControlFlags;
dBase_c::dBase_c() : fBase_c() {
baseProperties = (*fProfile::sProfileList)[profile_name]->mBaseProperties;
mBaseProperties = (*fProfile::sProfileList)[profile_name]->mBaseProperties;
}
void dBase_c::postDraw(fBase_c::MAIN_STATE_e status) {
if (status != CANCELED) {
baseProperties |= 0x100;
setBaseProperty(BASE_PROP_0x100);
} else {
baseProperties &= ~0x100;
unsetBaseProperty(BASE_PROP_0x100);
}
fBase_c::postDraw(status);
}
int dBase_c::preExecute() {
if (fBase_c::preExecute() == 0) {
if (NOT_READY == fBase_c::preExecute()) {
return NOT_READY;
}
if (s_ExecuteControlFlags && !isBasePropertyFlag(s_ExecuteControlFlags)) {
if (s_ExecuteControlFlags && !checkBaseProperty(s_ExecuteControlFlags)) {
return NOT_READY;
}
return SUCCEEDED;
@@ -30,9 +29,9 @@ int dBase_c::preExecute() {
void dBase_c::postExecute(fBase_c::MAIN_STATE_e status) {
if (status != CANCELED) {
baseProperties |= 0x4;
setBaseProperty(BASE_PROP_0x4);
} else {
baseProperties &= ~0x4;
unsetBaseProperty(BASE_PROP_0x4);
}
fBase_c::postExecute(status);
}
@@ -41,7 +40,7 @@ int dBase_c::preDraw() {
if (fBase_c::preDraw() == NOT_READY) {
return NOT_READY;
}
if (s_DrawControlFlags && !isBasePropertyFlag(s_DrawControlFlags)) {
if (s_DrawControlFlags && !checkBaseProperty(s_DrawControlFlags)) {
return NOT_READY;
}
return SUCCEEDED;
@@ -77,5 +76,3 @@ dBase_c *dBase_c::createBase(ProfileName profName, dBase_c *parent, u32 param, u
dBase_c *dBase_c::createRoot(ProfileName profName, u32 param, u8 groupType) {
return static_cast<dBase_c *>(fBase_c::createRoot(profName, param, groupType));
}
// dBase_c::~dBase_c() {}
+1 -1
View File
@@ -239,7 +239,7 @@ void dLinkage_c::fn_800511E0(dAcObjBase_c *pActor) {
MTXTrans(m2, 0.f, -y, 0.f);
MTXConcat(mtx, m2, mtx);
mtx.ZXYrotM(pActor->rotation);
mtx.ZXYrotM(pActor->mRotation);
if (mControllingActor.p_owner) {
pActor->roomid = static_cast<dAcObjBase_c *>(mControllingActor.p_owner)->roomid;
}
+2 -2
View File
@@ -83,8 +83,8 @@ void daPlayerActBase_c::setPosRot(const mVec3_c *pos, const mAng3_c *rot, bool f
velocity.y = 0.0f;
}
if (rot != nullptr) {
rotation = *rot;
angle.y = rotation.y;
mRotation = *rot;
angle.y = mRotation.y;
}
}
}
+12 -12
View File
@@ -1120,13 +1120,13 @@ void daPlayerModelBase_c::applyWorldRotationMaybe(
} else {
MTXTrans(work, v.x, v.y, v.z);
}
work.YrotM(rotation.y);
work.YrotM(mRotation.y);
if (order) {
work.ZYXrotM(x, y, z);
} else {
work.ZXYrotM(x, y, z);
}
work.YrotM(-rotation.y);
work.YrotM(-mRotation.y);
mMtx_c translateBack;
translateBack.transS(-v.x, -v.y, -v.z);
MTXConcat(work, translateBack, work);
@@ -1190,9 +1190,9 @@ void daPlayerModelBase_c::adjustMainModelWorldMtx(PlayerMainModelNode_e nodeId,
if (checkCurrentAction(0xA9) && (nodeId == PLAYER_MAIN_NODE_ARM_R1 || nodeId == PLAYER_MAIN_NODE_ARM_R2)) {
mMtx_c mtx;
mtx.makeQ(mQuat1);
mtx.YrotM(-rotation.y);
mtx.YrotM(-mRotation.y);
mMtx_c mtx2;
mtx2.YrotS(rotation.y);
mtx2.YrotS(mRotation.y);
MTXConcat(mtx2, mtx, mtx);
mMtx_c orig;
@@ -1208,9 +1208,9 @@ void daPlayerModelBase_c::adjustMainModelWorldMtx(PlayerMainModelNode_e nodeId,
} else if (mAnimations[3] == 0xE0 && nodeId == PLAYER_MAIN_NODE_ARM_R2) {
mMtx_c mtx;
mtx.makeQ(mQuat1);
mtx.YrotM(-rotation.y);
mtx.YrotM(-mRotation.y);
mMtx_c mtx2;
mtx2.YrotS(rotation.y);
mtx2.YrotS(mRotation.y);
MTXConcat(mtx2, mtx, mtx);
mMtx_c orig;
@@ -1261,9 +1261,9 @@ void daPlayerModelBase_c::adjustMainModelWorldMtx(PlayerMainModelNode_e nodeId,
} else if ((nodeId == PLAYER_MAIN_NODE_ARM_R2 || nodeId == PLAYER_MAIN_NODE_HAND_R) && isMPPose()) {
mMtx_c mtx;
mtx.makeQ(mQuat2);
mtx.YrotM(-rotation.y);
mtx.YrotM(-mRotation.y);
mMtx_c mtx2;
mtx2.YrotS(rotation.y);
mtx2.YrotS(mRotation.y);
MTXConcat(mtx2, mtx, mtx);
mMtx_c orig;
@@ -1529,11 +1529,11 @@ void daPlayerModelBase_c::headModelTimingB(u32 nodeId, nw4r::g3d::WorldMtxManip
mtx.setTranslation(v);
result->SetMtxUnchecked(mtx);
} else if (nodeId >= PLAYER_HEAD_NODE_HAIR_L) {
mAng oldYRot = rotation.y;
rotation.y = field_0x1256;
mAng oldYRot = mRotation.y;
mRotation.y = field_0x1256;
u32 idx = nodeId - 1;
applyWorldRotationMaybe(result, field_0x1238[idx], 0, field_0x1242[idx], nullptr, false);
rotation.y = oldYRot;
mRotation.y = oldYRot;
}
}
@@ -1881,7 +1881,7 @@ void daPlayerModelBase_c::updateCachedPositions() {
if (checkCurrentAction(/* DOWSE_LOOK */ 0x68)) {
mVec3_c v(0.0f, 18.0f, 0.0f);
v.rotX(field_0x1268);
v.rotY(rotation.y + field_0x126A);
v.rotY(mRotation.y + field_0x126A);
poscopy2 += v;
}
}
+5 -5
View File
@@ -48,7 +48,7 @@ STATE_DEFINE(dRoom_c, Active);
STATE_DEFINE(dRoom_c, NonActive);
int dRoom_c::create() {
roomid = params & 0x3F;
roomid = mParams & 0x3F;
mCanHavePastState = dStageMgr_c::GetInstance()->getSTIFunk1() == 0 &&
// SSH machine room (less sure about D303...)
!(dScGame_c::isCurrentStage("D301") && roomid == 12) &&
@@ -102,7 +102,7 @@ int dRoom_c::create() {
dStage_c::GetInstance()->setRoom(roomid, this);
BZS = CurrentStageArcManager::GetInstance()->loadFromRoomArc(roomid, "dat/room.bzs");
parseRoomBzs(roomid, BZS);
mDidAlreadyInit = (params >> 6) & 1;
mDidAlreadyInit = (mParams >> 6) & 1;
mStateMgr.changeState(StateID_Active);
if (roomid != dScGame_c::currentSpawnInfo.room) {
mFlags |= 2;
@@ -192,7 +192,7 @@ void deactivateUpdatesCb(dAcBase_c *ac) {
void dRoom_c::deactivateUpdates() {
if (!mUpdatesDeactivated) {
foreachObject(deactivateUpdatesCb);
setProcControlFlag(ROOT_DISABLE_EXECUTE | ROOT_DISABLE_DRAW);
setProcControl(ROOT_DISABLE_EXECUTE | ROOT_DISABLE_DRAW);
mUpdatesDeactivated = true;
}
}
@@ -207,8 +207,8 @@ void activateUpdatesCb(dAcBase_c *ac) {
void dRoom_c::activateUpdates() {
if (mUpdatesDeactivated) {
foreachObject(activateUpdatesCb);
clearProcControlFlag(ROOT_DISABLE_EXECUTE);
clearProcControlFlag(ROOT_DISABLE_DRAW);
unsetProcControl(ROOT_DISABLE_EXECUTE);
unsetProcControl(ROOT_DISABLE_DRAW);
mUpdatesDeactivated = false;
}
}
+1 -1
View File
@@ -140,7 +140,7 @@ sFPhaseBase::sFPhaseState dScGame_c::cb3() {
}
void dScGame_c::initializeState_Stanby() {
setProcControlFlag(ROOT_DISABLE_EXECUTE | ROOT_DISABLE_DRAW);
setProcControl(ROOT_DISABLE_EXECUTE | ROOT_DISABLE_DRAW);
if (mReloadTrigger == fProfile::STAGE_MANAGER) {
copySpawnNextToCurrent();
}
+5 -5
View File
@@ -21,7 +21,7 @@ dFader_c dScene_c::sFader;
dScene_c::dScene_c() {
lbl_80574FA0 = 0;
lbl_80574FA4 = 0;
setProcControlFlag(ROOT_DISABLE_DRAW | ROOT_DISABLE_EXECUTE);
setProcControl(ROOT_DISABLE_DRAW | ROOT_DISABLE_EXECUTE);
dPadNav::setNavEnabled(false, false);
}
@@ -53,10 +53,10 @@ int dScene_c::preExecute() {
}
return NOT_READY;
} else {
if ((proc_control & ROOT_DISABLE_EXECUTE)) {
if ((mProcControl & ROOT_DISABLE_EXECUTE)) {
if (!checkChildProcessCreateState()) {
clearProcControlFlag(ROOT_DISABLE_EXECUTE);
clearProcControlFlag(ROOT_DISABLE_DRAW);
unsetProcControl(ROOT_DISABLE_EXECUTE);
unsetProcControl(ROOT_DISABLE_DRAW);
}
return NOT_READY;
}
@@ -72,7 +72,7 @@ void dScene_c::postExecute(MAIN_STATE_e status) {
dReset::Manage_c::GetInstance()->SetSoftResetScene();
}
dBase_c::postExecute(status);
if (proc_control & ROOT_DISABLE_EXECUTE) {
if (mProcControl & ROOT_DISABLE_EXECUTE) {
lbl_80574FA0++;
lbl_80574FA4++;
}
+2 -2
View File
@@ -224,8 +224,8 @@ void dStageMgr_c::executeState_ReadObjectSound() {
void dStageMgr_c::finalizeState_ReadObjectSound() {
mpDvdCallback2->do_delete();
// mpDvdCallback2 = nullptr;
clearProcControlFlag(ROOT_DISABLE_EXECUTE);
clearProcControlFlag(ROOT_DISABLE_DRAW);
unsetProcControl(ROOT_DISABLE_EXECUTE);
unsetProcControl(ROOT_DISABLE_DRAW);
dLast_c::setExecuteCallback(lastExecuteCallback);
}

Some files were not shown because too many files have changed in this diff Show More