mirror of
https://github.com/zeldaret/ss
synced 2026-05-23 23:05:20 -04:00
position -> mPosition
This commit is contained in:
@@ -74,7 +74,7 @@ public:
|
||||
/* 0xB5 */ s8 viewclip_index;
|
||||
/* 0xB6 */ u8 subtype;
|
||||
/* 0xB8 */ mAng3_c mRotation;
|
||||
/* 0xC0 */ mVec3_c position;
|
||||
/* 0xC0 */ mVec3_c mPosition;
|
||||
/* 0xCC */ mVec3_c mScale;
|
||||
/* 0xD8 */ u32 actor_properties;
|
||||
/* 0xDC */ dAcRef_c<dAcBase_c> actor_node;
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
dAcBase_c();
|
||||
|
||||
void setPosition(const mVec3_c &r) {
|
||||
position = r;
|
||||
mPosition = r;
|
||||
}
|
||||
void setScale(const mVec3_c &r) {
|
||||
mScale = r;
|
||||
@@ -121,30 +121,30 @@ public:
|
||||
}
|
||||
|
||||
void copyPosition() {
|
||||
pos_copy = position;
|
||||
pos_copy = mPosition;
|
||||
}
|
||||
void copyRotation() {
|
||||
rot_copy = mRotation;
|
||||
}
|
||||
|
||||
mVec3_c &GetPosition() {
|
||||
return position;
|
||||
return mPosition;
|
||||
}
|
||||
mAng3_c &GetRotation() {
|
||||
return mRotation;
|
||||
}
|
||||
|
||||
mVec3_c GetPostionDifference(const dAcBase_c &other) {
|
||||
return position - other.position;
|
||||
return mPosition - other.mPosition;
|
||||
}
|
||||
|
||||
f32 getSquareDistanceTo(const mVec3_c &point) const {
|
||||
mVec3_c diff = position - point;
|
||||
mVec3_c diff = mPosition - point;
|
||||
return diff.x * diff.x + diff.z * diff.z;
|
||||
}
|
||||
|
||||
f32 getDistanceTo(const mVec3_c &to) const {
|
||||
return position.distance(to);
|
||||
return mPosition.distance(to);
|
||||
}
|
||||
|
||||
bool IsOutOfRange(const mVec3_c &point, f32 radius) {
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
|
||||
private:
|
||||
f32 getYPos() {
|
||||
return position.y + sHeight;
|
||||
return mPosition.y + sHeight;
|
||||
}
|
||||
|
||||
const char *getModelName() const;
|
||||
|
||||
@@ -177,10 +177,10 @@ public:
|
||||
return 0;
|
||||
}
|
||||
/* vt 0x160 */ virtual f32 getYPos() {
|
||||
return position.y;
|
||||
return mPosition.y;
|
||||
}
|
||||
/* vt 0x164 */ virtual f32 vt_0x164() {
|
||||
return position.y;
|
||||
return mPosition.y;
|
||||
}
|
||||
/* vt 0x168 */ virtual f32 getCurrentAnimFrame() const {
|
||||
return 0.0f;
|
||||
@@ -198,7 +198,7 @@ public:
|
||||
return mRotation;
|
||||
}
|
||||
/* vt 0x17C */ virtual const mVec3_c &getBellowsPosOrOtherVec3F() const {
|
||||
return position;
|
||||
return mPosition;
|
||||
}
|
||||
/* vt 0x180 */ virtual void setWindMillPos() {}
|
||||
/* vt 0x184 */ virtual bool isOffeset0x435eEqual0x20() {
|
||||
@@ -375,10 +375,10 @@ public:
|
||||
return mRotation.y;
|
||||
}
|
||||
/* vt 0x278 */ virtual const mVec3_c &vt_0x278() const {
|
||||
return position;
|
||||
return mPosition;
|
||||
}
|
||||
/* vt 0x27C */ virtual const mVec3_c &getSwordPos() const {
|
||||
return position;
|
||||
return mPosition;
|
||||
}
|
||||
/* vt 0x280 */ virtual UNKWORD vt_0x280() {
|
||||
return 0;
|
||||
@@ -387,7 +387,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
/* vt 0x288 */ virtual const mVec3_c &getBugNetPos() const {
|
||||
return position;
|
||||
return mPosition;
|
||||
}
|
||||
/* vt 0x28C */ virtual bool isUsingBugnet1() {
|
||||
return false;
|
||||
|
||||
@@ -198,11 +198,11 @@ private:
|
||||
}
|
||||
|
||||
f32 getActorGroundPos(dAcObjBase_c *obj) const {
|
||||
return obj->position.y + mDepth;
|
||||
return obj->mPosition.y + mDepth;
|
||||
}
|
||||
|
||||
f32 getActorCeilPos(dAcObjBase_c *obj) const {
|
||||
return obj->position.y + mHeight;
|
||||
return obj->mPosition.y + mHeight;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
+14
-14
@@ -55,11 +55,11 @@ int dAcBombf_c::actorPostCreate() {
|
||||
mtx.ZXYrotS(mRotation.x, mRotation.y, mRotation.z);
|
||||
mVec3_c v;
|
||||
PSMTXMultVecSR(mtx, mVec3_c::Ey, v);
|
||||
mVec3_c v3 = position + v * 10.0f;
|
||||
mVec3_c v4 = position - v * 10.0f;
|
||||
mVec3_c v3 = mPosition + v * 10.0f;
|
||||
mVec3_c v4 = mPosition - v * 10.0f;
|
||||
|
||||
if (dBgS_ObjLinChk::LineCross(&v3, &v4, this)) {
|
||||
position = dBgS_ObjLinChk::GetInstance().GetLinEnd();
|
||||
mPosition = dBgS_ObjLinChk::GetInstance().GetLinEnd();
|
||||
if (mRotation.x == 0 && mRotation.z == 0 && dBgS_ObjLinChk::ChkGround()) {
|
||||
cM3dGPla pla;
|
||||
dBgS::GetInstance()->GetTriPla(dBgS_ObjLinChk::GetInstance(), &pla);
|
||||
@@ -76,7 +76,7 @@ int dAcBombf_c::actorPostCreate() {
|
||||
}
|
||||
|
||||
if (field_0x3D2 == 0 || field_0x3D2 == 2) {
|
||||
s32 b = dTimeAreaMgr_c::GetInstance()->fn_800B9B60(roomid, position);
|
||||
s32 b = dTimeAreaMgr_c::GetInstance()->fn_800B9B60(roomid, mPosition);
|
||||
if (b != 0) {
|
||||
mTimeAreaStruct.field_0x00 = 1.0f;
|
||||
}
|
||||
@@ -105,26 +105,26 @@ int dAcBombf_c::doDelete() {
|
||||
int dAcBombf_c::actorExecute() {
|
||||
if (field_0x3D3 != 0) {
|
||||
mMtx_c &mtx = mWorldMtx;
|
||||
mtx.getTranslation(position);
|
||||
mtx.getTranslation(mPosition);
|
||||
dAcBomb_c *bomb = mBombRef.get();
|
||||
if (bomb != nullptr) {
|
||||
bomb->setTransformFromFlower(mtx);
|
||||
}
|
||||
mModel.setLocalMtx(mWorldMtx);
|
||||
poscopy2 = position;
|
||||
poscopy3 = position;
|
||||
poscopy2 = mPosition;
|
||||
poscopy3 = mPosition;
|
||||
field_0x3D3 = 0;
|
||||
} else {
|
||||
if (dBgS::GetInstance()->ChkMoveBG(field_0x398, true)) {
|
||||
dBgS::GetInstance()->MoveBgTransPos(field_0x398, true, &position, &angle, &mRotation);
|
||||
dBgS::GetInstance()->MoveBgTransPos(field_0x398, true, &mPosition, &angle, &mRotation);
|
||||
updateMatrix();
|
||||
dAcBomb_c *bomb = mBombRef.get();
|
||||
if (bomb != nullptr) {
|
||||
bomb->setTransformFromFlower(mWorldMtx);
|
||||
}
|
||||
mModel.setLocalMtx(mWorldMtx);
|
||||
poscopy2 = position;
|
||||
poscopy3 = position;
|
||||
poscopy2 = mPosition;
|
||||
poscopy3 = mPosition;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ void dAcBombf_c::regrowBomb() {
|
||||
actorParams1 = 2;
|
||||
}
|
||||
dAcObjBase_c *ac = dAcObjBase_c::create(
|
||||
"Bomb", roomid, actorParams1, &position, nullptr, nullptr, 0xFFFFFFFF, 0xFFFF, viewclip_idx
|
||||
"Bomb", roomid, actorParams1, &mPosition, nullptr, nullptr, 0xFFFFFFFF, 0xFFFF, viewclip_idx
|
||||
);
|
||||
mBombRef.link(static_cast<dAcBomb_c *>(ac));
|
||||
dAcBomb_c *bomb = mBombRef.get();
|
||||
@@ -186,7 +186,7 @@ void dAcBombf_c::executeState_Wait() {
|
||||
mVec3_c up;
|
||||
PSMTXMultVecSR(mWorldMtx, mVec3_c::Ey, up);
|
||||
mVec3_c upScaled = up * 30.0f;
|
||||
mVec3_c checkPos = position + upScaled;
|
||||
mVec3_c checkPos = mPosition + upScaled;
|
||||
|
||||
if (mTimeAreaStruct.check(roomid, checkPos, 0, 30.0f, 0.1f) && field_0x3D4 != 1) {
|
||||
if (mTimeAreaStruct.field_0x04 == 1) {
|
||||
@@ -194,7 +194,7 @@ void dAcBombf_c::executeState_Wait() {
|
||||
} else {
|
||||
startSound(SE_TIMESLIP_TIMESLIP_REV);
|
||||
}
|
||||
dJEffManager_c::spawnEffect(lbl_8057A750, position, nullptr, nullptr, nullptr, nullptr, 0, 0);
|
||||
dJEffManager_c::spawnEffect(lbl_8057A750, mPosition, nullptr, nullptr, nullptr, nullptr, 0, 0);
|
||||
}
|
||||
|
||||
scaleFactor *= mTimeAreaStruct.field_0x00;
|
||||
@@ -213,7 +213,7 @@ void dAcBombf_c::executeState_Wait() {
|
||||
} else {
|
||||
if (field_0x394 != 0) {
|
||||
field_0x394--;
|
||||
} else if (field_0x3D0 == 0 || dAcPy_c::LINK->getSquareDistanceTo(position) > 22500.0f) {
|
||||
} else if (field_0x3D0 == 0 || dAcPy_c::LINK->getSquareDistanceTo(mPosition) > 22500.0f) {
|
||||
regrowBomb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ STATE_DEFINE(dAcTWoodArea_c, Wait);
|
||||
|
||||
int dAcTWoodArea_c::actorCreate() {
|
||||
mStateMgr.changeState(StateID_Init);
|
||||
PSMTXTrans(mWorldMtx.m, position.x, position.y, position.z);
|
||||
PSMTXTrans(mWorldMtx.m, mPosition.x, mPosition.y, mPosition.z);
|
||||
boundingBox.mMin = mVec3_c(-0.0f, -0.0f, -0.0f);
|
||||
boundingBox.mMax = mVec3_c(0.0f, 0.0f, 0.0f);
|
||||
return SUCCEEDED;
|
||||
@@ -57,13 +57,13 @@ void dAcTWoodArea_c::initializeState_Wait() {}
|
||||
void dAcTWoodArea_c::executeState_Wait() {
|
||||
if (dAcPy_c::LINK != nullptr && dAcPy_c::LINK->checkFlags0x350(0x2000)) {
|
||||
// This is a bit messed up
|
||||
mVec3_c dist = position - dAcPy_c::LINK->position;
|
||||
mVec3_c dist = mPosition - dAcPy_c::LINK->mPosition;
|
||||
f32 attachRadius = getAttachRadius();
|
||||
attachRadius = attachRadius * attachRadius;
|
||||
if (dist.x * dist.x + dist.z * dist.z < attachRadius) {
|
||||
bool someEffectThing = subtype != 1 ? (mParams & 0xF) != 0 ? false : true : true;
|
||||
if (someEffectThing) {
|
||||
mVec3_c tmp(position.x, position.y + getAttachHeight(), position.z);
|
||||
mVec3_c tmp(mPosition.x, mPosition.y + getAttachHeight(), mPosition.z);
|
||||
dJEffManager_c::spawnEffect(
|
||||
PARTICLE_RESOURCE_ID_MAPPING_8_, tmp, nullptr, nullptr, nullptr, nullptr, 0, 0
|
||||
);
|
||||
@@ -85,7 +85,7 @@ void dAcTWoodArea_c::attachCloseObjects(ProfileName profID) {
|
||||
|
||||
dAcObjBase_c *obj = static_cast<dAcObjBase_c *>(base);
|
||||
if (obj->canBeLinkedToWoodTag()) {
|
||||
if (!(obj->getSquareDistanceTo(position) > attachRadius)) {
|
||||
if (!(obj->getSquareDistanceTo(mPosition) > attachRadius)) {
|
||||
if (!attachObject(obj)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ int dAcEhb_leaf_c::create() {
|
||||
clearActorProperty(0x1);
|
||||
}
|
||||
|
||||
mStartingPos = position;
|
||||
mStartingPos = mPosition;
|
||||
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
+26
-26
@@ -123,9 +123,9 @@ int dAcEsm_c::actorCreate() {
|
||||
field_0xB78 = 200.f * field_0xB78;
|
||||
}
|
||||
|
||||
mStartingPos.set(position.x, position.y, position.z);
|
||||
mHomePos1.set(position.x, position.y, position.z);
|
||||
mEffPos.set(position.x, position.y, position.z);
|
||||
mStartingPos.set(mPosition.x, mPosition.y, mPosition.z);
|
||||
mHomePos1.set(mPosition.x, mPosition.y, mPosition.z);
|
||||
mEffPos.set(mPosition.x, mPosition.y, mPosition.z);
|
||||
|
||||
CREATE_ALLOCATOR(dAcEsm_c);
|
||||
|
||||
@@ -172,9 +172,9 @@ int dAcEsm_c::actorCreate() {
|
||||
|
||||
mSph.SetStts(mStts);
|
||||
|
||||
position.CopyTo(poscopy2);
|
||||
position.CopyTo(mPosCopy1);
|
||||
position.CopyTo(poscopy3);
|
||||
mPosition.CopyTo(poscopy2);
|
||||
mPosition.CopyTo(mPosCopy1);
|
||||
mPosition.CopyTo(poscopy3);
|
||||
poscopy3.y += 50.f;
|
||||
|
||||
mRotCopy.set(mRotation);
|
||||
@@ -223,8 +223,8 @@ int dAcEsm_c::actorCreate() {
|
||||
forwardAccel = -3.f;
|
||||
}
|
||||
calcVelocity();
|
||||
position += velocity;
|
||||
position += mStts.GetCcMove();
|
||||
mPosition += velocity;
|
||||
mPosition += mStts.GetCcMove();
|
||||
|
||||
mObjAcch.CrrPos(*dBgS::GetInstance());
|
||||
fn_187_4CC0();
|
||||
@@ -416,8 +416,8 @@ int dAcEsm_c::actorExecute() {
|
||||
|
||||
// TODO: Maybe Inline - Common Pattern. Check GetCcMove
|
||||
calcVelocity();
|
||||
position += velocity;
|
||||
position += mStts.GetCcMove();
|
||||
mPosition += velocity;
|
||||
mPosition += mStts.GetCcMove();
|
||||
|
||||
mObjAcch.CrrPos(*dBgS::GetInstance());
|
||||
fn_187_44C0();
|
||||
@@ -468,8 +468,8 @@ int dAcEsm_c::actorExecute() {
|
||||
|
||||
if (0 == sLib::calcTimer(&mTimer_0xBC4)) {
|
||||
calcVelocity();
|
||||
position += velocity;
|
||||
position += mStts.GetCcMove();
|
||||
mPosition += velocity;
|
||||
mPosition += mStts.GetCcMove();
|
||||
}
|
||||
|
||||
if (!mStateMgr.isState(StateID_Absorption)) {
|
||||
@@ -657,8 +657,8 @@ int dAcEsm_c::actorExecute() {
|
||||
|
||||
MTXMultVec(nodeMtx, center, mHomePos1);
|
||||
|
||||
position.CopyTo(poscopy3);
|
||||
position.CopyTo(poscopy2);
|
||||
mPosition.CopyTo(poscopy3);
|
||||
mPosition.CopyTo(poscopy2);
|
||||
poscopy2.y += 130.f * mScaleTarget.y;
|
||||
poscopy3.y += 260.f * mScaleTarget.y;
|
||||
|
||||
@@ -725,7 +725,7 @@ int dAcEsm_c::draw() {
|
||||
|
||||
s8 var = 0;
|
||||
mQuat_c q(mVec3_c(0.f, 50.f, 0.f), mScale.x * (var + 240.f));
|
||||
drawShadow(mShadowCircle, nullptr, mWorldMtx, &q, -1, -1, -1, -1, -1, position.y - mObjAcch.GetGroundH());
|
||||
drawShadow(mShadowCircle, nullptr, mWorldMtx, &q, -1, -1, -1, -1, -1, mPosition.y - mObjAcch.GetGroundH());
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
@@ -754,7 +754,7 @@ void dAcEsm_c::initializeState_Walk() {
|
||||
|
||||
endPos.y += 10.f;
|
||||
if (dBgS_ObjLinChk::LineCross(&mHomePos1, &endPos, nullptr)) {
|
||||
mStartingPos.set(position.x, position.y, position.z);
|
||||
mStartingPos.set(mPosition.x, mPosition.y, mPosition.z);
|
||||
}
|
||||
|
||||
if (mType == SM_YELLOW) {
|
||||
@@ -854,8 +854,8 @@ void dAcEsm_c::fn_187_3F60() {
|
||||
}
|
||||
|
||||
bool dAcEsm_c::fn_187_4090() {
|
||||
mVec3_c pos(position.x, position.y + 20.f, position.z);
|
||||
if (velocity.y <= 0.f && dBgS_ObjGndChk::CheckPos(pos) && dBgS_ObjGndChk::GetGroundHeight() + 5.f > position.y) {
|
||||
mVec3_c pos(mPosition.x, mPosition.y + 20.f, mPosition.z);
|
||||
if (velocity.y <= 0.f && dBgS_ObjGndChk::CheckPos(pos) && dBgS_ObjGndChk::GetGroundHeight() + 5.f > mPosition.y) {
|
||||
forwardSpeed = 0.f;
|
||||
field_0xB6C = 1.5f;
|
||||
if (field_0xB84) {
|
||||
@@ -870,7 +870,7 @@ bool dAcEsm_c::fn_187_4090() {
|
||||
startSound(SE_ESm_LAND);
|
||||
|
||||
if (field_0xBA0 == 0) {
|
||||
if (fn_800301b0(position, mRotation.y, true, 10.f) == 3 /* TODO: Enum?*/) {
|
||||
if (fn_800301b0(mPosition, 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;
|
||||
@@ -889,9 +889,9 @@ void dAcEsm_c::fn_187_4200() {
|
||||
if (mType == SM_BLUE || field_0xBCC != 0 | field_0xBA0 != 0) {
|
||||
return;
|
||||
}
|
||||
mVec3_c pos(position.x, position.y + 20.f, position.z);
|
||||
mVec3_c pos(mPosition.x, mPosition.y + 20.f, mPosition.z);
|
||||
|
||||
if (dBgS_ObjGndChk::CheckPos(pos) && position.y - dBgS_ObjGndChk::GetGroundHeight() >= 700.f) {
|
||||
if (dBgS_ObjGndChk::CheckPos(pos) && mPosition.y - dBgS_ObjGndChk::GetGroundHeight() >= 700.f) {
|
||||
if (field_0xBA0 == 0) {
|
||||
field_0xBA0 = 1;
|
||||
}
|
||||
@@ -969,7 +969,7 @@ void dAcEsm_c::fn_187_4540(int param0) {
|
||||
mScaleTarget *= 0.5f;
|
||||
mScale *= 0.5f;
|
||||
|
||||
rot.y = (s16)cLib::targetAngleY(position, player->position) + cM::rndFX(1024.f);
|
||||
rot.y = (s16)cLib::targetAngleY(mPosition, player->mPosition) + cM::rndFX(1024.f);
|
||||
|
||||
if (field_0xB98 != 2) {
|
||||
rot.y = fn_187_5150(false);
|
||||
@@ -979,7 +979,7 @@ void dAcEsm_c::fn_187_4540(int param0) {
|
||||
mVec3_c spawnPos;
|
||||
mHitPos.CopyTo(spawnPos);
|
||||
if (field_0xB98 == 1 || field_0xB98 == 2) {
|
||||
position.CopyTo(spawnPos);
|
||||
mPosition.CopyTo(spawnPos);
|
||||
}
|
||||
|
||||
f32 scale = 0.9999f;
|
||||
@@ -1132,7 +1132,7 @@ void dAcEsm_c::fn_187_4CC0() {
|
||||
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.transS(mPosition.x, mPosition.y, mPosition.z);
|
||||
mWorldMtx.XrotM(mRotUnk.x);
|
||||
mWorldMtx.ZrotM(mRotUnk.z);
|
||||
mWorldMtx.ZXYrotM(mRotation.x, mRotation.y, mRotation.z);
|
||||
@@ -1329,7 +1329,7 @@ void dAcEsm_c::fn_187_61B0(u8 param0) {
|
||||
} break;
|
||||
case 3: {
|
||||
mMtx_c mtx_scale;
|
||||
MTXTrans(mtx_trans, position.x, position.y, position.z);
|
||||
MTXTrans(mtx_trans, mPosition.x, mPosition.y, mPosition.z);
|
||||
MTXScale(mtx_scale, mScaleTarget.x, mScaleTarget.y, mScaleTarget.z);
|
||||
mtx_trans += mtx_scale;
|
||||
|
||||
@@ -1350,7 +1350,7 @@ void dAcEsm_c::fn_187_61B0(u8 param0) {
|
||||
} break;
|
||||
case 4: {
|
||||
mMtx_c mtx_scale;
|
||||
MTXTrans(mtx_trans, position.x, position.y, position.z);
|
||||
MTXTrans(mtx_trans, mPosition.x, mPosition.y, mPosition.z);
|
||||
mtx_trans.YrotM(mRotation.y);
|
||||
MTXScale(mtx_scale, mScaleTarget.x, mScaleTarget.y, mScaleTarget.z);
|
||||
mtx_trans += mtx_scale;
|
||||
|
||||
@@ -70,10 +70,10 @@ int dAcNpcSltk_c::actorPostCreate() {
|
||||
cursor = static_cast<dAcNpcSlb2_c *>(fManager_c::searchBaseByProfName(fProfile::NPC_SLB2, cursor));
|
||||
if (cursor != nullptr) {
|
||||
if (cursor->acNpc_vt_0x1F4()) {
|
||||
f32 thisDist = cursor->getSquareDistanceTo(position);
|
||||
f32 thisDist = cursor->getSquareDistanceTo(mPosition);
|
||||
if (thisDist < closestDistance) {
|
||||
closest = cursor;
|
||||
closestDistance = cursor->getSquareDistanceTo(position);
|
||||
closestDistance = cursor->getSquareDistanceTo(mPosition);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,13 +132,13 @@ bool dAcNpcSltk_c::checkSomething(mVec3_c pos) const {
|
||||
if (mAreaIndex != 0xFF) {
|
||||
return checkPosInArea(mAreaIndex, roomid, pos, &mpArea) == 1;
|
||||
} else {
|
||||
mVec3_c dist = pos - position;
|
||||
mVec3_c dist = pos - mPosition;
|
||||
if (dist.squareMagXZ() <= field_0x758 * field_0x758) {
|
||||
f32 fDist = field_0x75C + position.y;
|
||||
f32 fDist2 = position.y;
|
||||
f32 fDist = field_0x75C + mPosition.y;
|
||||
f32 fDist2 = mPosition.y;
|
||||
if (fDist <= fDist2) {
|
||||
fDist2 = fDist;
|
||||
fDist = position.y;
|
||||
fDist = mPosition.y;
|
||||
}
|
||||
return pos.y <= fDist && pos.y >= fDist2;
|
||||
} else {
|
||||
@@ -156,7 +156,7 @@ void dAcNpcSltk_c::executeState_Wait() {
|
||||
dAcNpcSlb2_c *slb = mRef.get();
|
||||
if (slb != nullptr) {
|
||||
if (isSomething0()) {
|
||||
checkResult = checkSomething(link->position);
|
||||
checkResult = checkSomething(link->mPosition);
|
||||
if (field_0x76C != 0) {
|
||||
field_0x76C = checkResult;
|
||||
} else if (!EventManager::isInEvent() && !slb->fn_61_6A10() && checkResult) {
|
||||
@@ -171,11 +171,11 @@ void dAcNpcSltk_c::executeState_Wait() {
|
||||
|
||||
if (!checkResult) {
|
||||
if (!link->checkActionFlags(0xC70852) || link->checkActionFlags(0x40000)) {
|
||||
mLinkPos = link->position;
|
||||
mLinkPos = link->mPosition;
|
||||
}
|
||||
}
|
||||
} else if (isSomething1()) {
|
||||
checkResult = checkSomething(slb->position);
|
||||
checkResult = checkSomething(slb->mPosition);
|
||||
if (field_0x76C == 0 && checkResult) {
|
||||
slb->fn_61_58C0(field_0x74C, field_0x750);
|
||||
}
|
||||
|
||||
@@ -106,8 +106,8 @@ void dAcOF302Light_c::finalizeState_Wait() {}
|
||||
|
||||
void dAcOF302Light_c::initializeState_SwitchOn() {
|
||||
mMdl.setAnm(mAnmMatClr[1]);
|
||||
mTimeArea.check(roomid, position, 0, 30.f, 0.1f);
|
||||
if (dTimeAreaMgr_c::GetInstance()->fn_800B9B60(roomid, position)) {
|
||||
mTimeArea.check(roomid, mPosition, 0, 30.f, 0.1f);
|
||||
if (dTimeAreaMgr_c::GetInstance()->fn_800B9B60(roomid, mPosition)) {
|
||||
mAnmMatClr[1].setRate(1.f, 0);
|
||||
mAnmMatClr[1].setFrame(40.f, 0);
|
||||
} else {
|
||||
@@ -116,8 +116,8 @@ void dAcOF302Light_c::initializeState_SwitchOn() {
|
||||
}
|
||||
|
||||
void dAcOF302Light_c::executeState_SwitchOn() {
|
||||
mTimeArea.check(roomid, position, 0, 30.f, 0.1f);
|
||||
if (dTimeAreaMgr_c::GetInstance()->fn_800B9B60(roomid, position)) {
|
||||
mTimeArea.check(roomid, mPosition, 0, 30.f, 0.1f);
|
||||
if (dTimeAreaMgr_c::GetInstance()->fn_800B9B60(roomid, mPosition)) {
|
||||
mAnmMatClr[1].setRate(1.f, 0);
|
||||
} else {
|
||||
if (mAnmMatClr[1].getFrame(0) == 0.f) {
|
||||
|
||||
@@ -55,7 +55,7 @@ int dAcOF400GateSeal_c::actorPostCreate() {
|
||||
dAcOdoor_c *door;
|
||||
|
||||
while (notDone && parent != nullptr) {
|
||||
if (10000.0f < PSVECSquareDistance(position, parent->position)) {
|
||||
if (10000.0f < PSVECSquareDistance(mPosition, parent->mPosition)) {
|
||||
parent = (dAcOdoor_c *)fManager_c::searchBaseByProfName(fProfile::OBJ_DOOR, parent);
|
||||
door = parent;
|
||||
} else {
|
||||
|
||||
@@ -37,7 +37,7 @@ int dAcOAmber_c::actorCreate() {
|
||||
|
||||
int dAcOAmber_c::actorPostCreate() {
|
||||
CREATE_ALLOCATOR(dAcOAmber_c);
|
||||
if (dBgS_ObjGndChk::CheckPos(position + mVec3_c::Ey * 10.0f)) {
|
||||
if (dBgS_ObjGndChk::CheckPos(mPosition + mVec3_c::Ey * 10.0f)) {
|
||||
mLightingInfo.mLightingCode = dBgS_ObjGndChk::GetLightingCode();
|
||||
if (&dBgS_ObjGndChk::GetInstance() != nullptr) {
|
||||
setPolyAttrs(dBgS_ObjGndChk::GetInstance());
|
||||
@@ -49,9 +49,9 @@ int dAcOAmber_c::actorPostCreate() {
|
||||
mShadowRot.w = ((mMax - mMin) * 0.5f).mag();
|
||||
updateMatrix();
|
||||
mMdl.setLocalMtx(mWorldMtx);
|
||||
mVec3_c chkPos = position + mVec3_c::Ey * mMax.y;
|
||||
mVec3_c chkPos = mPosition + mVec3_c::Ey * mMax.y;
|
||||
if (dBgS_ObjGndChk::CheckPos(chkPos)) {
|
||||
f32 deltaHeight = position.y - dBgS_ObjGndChk::GetGroundHeight();
|
||||
f32 deltaHeight = mPosition.y - dBgS_ObjGndChk::GetGroundHeight();
|
||||
field_0x37c = deltaHeight < 0.0f ? 0.0f : deltaHeight;
|
||||
} else {
|
||||
field_0x37c = 1.0e+9f;
|
||||
|
||||
@@ -40,7 +40,7 @@ int dAcOappearBridge_c::create() {
|
||||
dBgS::GetInstance()->Regist(&mCollision, this);
|
||||
mAreaIdx = mParams & 0xFF;
|
||||
mEventId = (mParams >> 8) & 0xFF;
|
||||
mSoundPosition = position + positionOffset;
|
||||
mSoundPosition = mPosition + positionOffset;
|
||||
obj_pos = &mSoundPosition;
|
||||
mSceneCallback.attach(mModel);
|
||||
mModel.setAnm(mSrtAnm);
|
||||
@@ -73,7 +73,7 @@ void dAcOappearBridge_c::initializeState_Wait() {
|
||||
dBgS::GetInstance()->Release(&mCollision);
|
||||
}
|
||||
void dAcOappearBridge_c::executeState_Wait() {
|
||||
if (checkPosInArea(mAreaIdx, roomid, dAcPy_c::LINK->position, nullptr)) {
|
||||
if (checkPosInArea(mAreaIdx, roomid, dAcPy_c::LINK->mPosition, nullptr)) {
|
||||
mStateMgr.changeState(StateID_Appear);
|
||||
}
|
||||
}
|
||||
@@ -104,7 +104,7 @@ void dAcOappearBridge_c::executeState_Appear() {
|
||||
}
|
||||
mSrtAnm.play();
|
||||
mClrAnm.play();
|
||||
if (!checkPosInArea(mAreaIdx, roomid, dAcPy_c::LINK->position, nullptr)) {
|
||||
if (!checkPosInArea(mAreaIdx, roomid, dAcPy_c::LINK->mPosition, nullptr)) {
|
||||
mStateMgr.changeState(StateID_Disappear);
|
||||
}
|
||||
}
|
||||
@@ -120,7 +120,7 @@ void dAcOappearBridge_c::executeState_Disappear() {
|
||||
}
|
||||
mSrtAnm.play();
|
||||
mClrAnm.play();
|
||||
if (checkPosInArea(mAreaIdx, roomid, dAcPy_c::LINK->position, nullptr)) {
|
||||
if (checkPosInArea(mAreaIdx, roomid, dAcPy_c::LINK->mPosition, nullptr)) {
|
||||
mStateMgr.changeState(StateID_Appear);
|
||||
} else {
|
||||
if (mClrAnm.isStop(0)) {
|
||||
|
||||
@@ -44,20 +44,20 @@ int dAcObjBirdSp_c::actorExecute() {
|
||||
matrix.ZXYrotS(mRotation);
|
||||
PSMTXMultVec(matrix.m, posChange, posChange);
|
||||
|
||||
f32 angle = (position - dBird_c::getInstance()->position).dot(posChange);
|
||||
f32 angle = (mPosition - dBird_c::getInstance()->mPosition).dot(posChange);
|
||||
if (angle < 0.0f) {
|
||||
posChange = -posChange;
|
||||
}
|
||||
|
||||
posChange *= 1000.0f;
|
||||
posChange += position;
|
||||
posChange -= dBird_c::getInstance()->position;
|
||||
posChange += mPosition;
|
||||
posChange -= dBird_c::getInstance()->mPosition;
|
||||
dBird_c::getInstance()->accelerateTowards(posChange);
|
||||
}
|
||||
|
||||
mCollider.SetC(position);
|
||||
mCollider.SetC(mPosition);
|
||||
dCcS::GetInstance()->Set(&mCollider);
|
||||
mWorldMtx.transS(position.x, position.y, position.z);
|
||||
mWorldMtx.transS(mPosition.x, mPosition.y, mPosition.z);
|
||||
mWorldMtx.ZXYrotM(mRotation);
|
||||
|
||||
return SUCCEEDED;
|
||||
|
||||
@@ -150,7 +150,7 @@ int dAcOBlockUnderground::actorCreate() {
|
||||
if (shouldSetCylTgType()) {
|
||||
mCyl->mTg.mSrc.mType = getCylTgType();
|
||||
}
|
||||
mCyl->SetC(position);
|
||||
mCyl->SetC(mPosition);
|
||||
}
|
||||
mBgW.Move();
|
||||
mVec3_c min, max;
|
||||
@@ -177,10 +177,10 @@ int dAcOBlockUnderground::actorExecute() {
|
||||
|
||||
if (getSubtype() == 1) {
|
||||
spawnEffect(PARTICLE_RESOURCE_ID_MAPPING_461_);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSoundAtPosition(SE_BlockUg_BROKEN_BOMB, position);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSoundAtPosition(SE_BlockUg_BROKEN_BOMB, mPosition);
|
||||
} else {
|
||||
spawnEffect(PARTICLE_RESOURCE_ID_MAPPING_462_);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSoundAtPosition(SE_BlockUg_BROKEN_CLAW, position);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSoundAtPosition(SE_BlockUg_BROKEN_CLAW, mPosition);
|
||||
}
|
||||
|
||||
u8 firstSceneFlag = getFirstSceneFlag();
|
||||
@@ -288,6 +288,6 @@ bool dAcOBlockUnderground::hasCyl() {
|
||||
}
|
||||
|
||||
void dAcOBlockUnderground::spawnEffect(u16 effectResourceId) const {
|
||||
mVec3_c pos(position.x, position.y + 50.f, position.z);
|
||||
mVec3_c pos(mPosition.x, mPosition.y + 50.f, mPosition.z);
|
||||
dJEffManager_c::spawnEffect(effectResourceId, pos, nullptr, nullptr, nullptr, nullptr, 0, 0);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
#include "rvl/GX.h" // IWYU pragma: export
|
||||
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(OBJ_BSTONE, dAcObstonec, fProfile::OBJ_BSTONE, 0x130, 0, 2);
|
||||
|
||||
bool dAcObstonec::createHeap() {
|
||||
@@ -57,7 +56,7 @@ int dAcObstonec::doDelete() {
|
||||
int dAcObstonec::actorExecute() {
|
||||
f32 tmp = 1.0f;
|
||||
if (mVariant != 0) {
|
||||
tmp = dTimeAreaMgr_c::GetInstance()->checkPositionIsInPastState(roomid, position, nullptr, mScaleMag);
|
||||
tmp = dTimeAreaMgr_c::GetInstance()->checkPositionIsInPastState(roomid, mPosition, nullptr, mScaleMag);
|
||||
if (mVariant != 1) {
|
||||
if (tmp > 0.0f) {
|
||||
mMdl.setPriorityDraw(0xB, 0);
|
||||
|
||||
@@ -197,7 +197,7 @@ int dAcOChair_c::draw() {
|
||||
void dAcOChair_c::initializeState_Wait() {}
|
||||
|
||||
void dAcOChair_c::executeState_Wait() {
|
||||
const f32 height_diff = position.y - dAcPy_c::GetLink()->position.y;
|
||||
const f32 height_diff = mPosition.y - dAcPy_c::GetLink()->mPosition.y;
|
||||
if (!isBench() || (50.f < height_diff && height_diff < 60.f)) {
|
||||
if (field_0xB1A && field_0xB1B) {
|
||||
if (dAcPy_c::GetLink()->checkActionFlagsCont(0x1000)) {
|
||||
@@ -244,7 +244,7 @@ dAcOChair_c::ChairType dAcOChair_c::getChairType(u8 ¶m) {
|
||||
void dAcOChair_c::updateChairPos() {
|
||||
if (mChairType != CHAIR_E) {
|
||||
if (isBench()) {
|
||||
poscopy2 = position;
|
||||
poscopy2 = mPosition;
|
||||
} else {
|
||||
mMdl.getNodeWorldMtxMultVecZero(mSeatNodeID, poscopy2);
|
||||
}
|
||||
@@ -256,7 +256,7 @@ void dAcOChair_c::updateChairPos() {
|
||||
work.rotY(getRelativeYRotationToPlayer());
|
||||
work.z = 0.f;
|
||||
work.rotY(mRotation.y);
|
||||
poscopy2 = position;
|
||||
poscopy2 = mPosition;
|
||||
if (work.squareMagXZ() < 10000.f) {
|
||||
poscopy2 += work;
|
||||
} else {
|
||||
|
||||
@@ -126,13 +126,13 @@ int dAcOChest_c::create() {
|
||||
mAnmMdl.setAnm(getOpenOrClose(0), m3d::PLAY_MODE_4);
|
||||
mAnmMdl.setRate(0.0f);
|
||||
|
||||
poscopy2.y = position.y + 150.0f;
|
||||
poscopy2.y = mPosition.y + 150.0f;
|
||||
poscopy3 = poscopy2;
|
||||
if ((s32)getFromParams(0x10, 0xFF) != 0xFF) {
|
||||
mInsideMdl.setLocalMtx(mWorldMtx);
|
||||
}
|
||||
if (dScGame_c::isCurrentStage("F001r") && roomid == 1 && 900.0f < position.x && position.x < 1000.0f &&
|
||||
-50.0f < position.y && position.y < 50.0f && -2730.0f < position.z && position.z < -2630.0f) {
|
||||
if (dScGame_c::isCurrentStage("F001r") && roomid == 1 && 900.0f < mPosition.x && mPosition.x < 1000.0f &&
|
||||
-50.0f < mPosition.y && mPosition.y < 50.0f && -2730.0f < mPosition.z && mPosition.z < -2630.0f) {
|
||||
mIsLinksCloset = true;
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ void dAcOChest_c::doInteraction(s32 _unused) {
|
||||
}
|
||||
|
||||
void dAcOChest_c::fn_326_C90() {
|
||||
mWorldMtx.transS(position);
|
||||
mWorldMtx.transS(mPosition);
|
||||
mWorldMtx.ZXYrotM(mRotation);
|
||||
mAnmMdl.getModel().setLocalMtx(mWorldMtx);
|
||||
mAnmMdl.getModel().calc(false);
|
||||
@@ -362,10 +362,10 @@ void dAcOChest_c::stateOpenUpdate2() {
|
||||
targetPosition = t;
|
||||
targetAngle += mRotation.y;
|
||||
targetPosition.rotY(mRotation.y);
|
||||
targetPosition += position;
|
||||
targetPosition += mPosition;
|
||||
|
||||
if (player != nullptr) {
|
||||
playerPosition = player->position;
|
||||
playerPosition = player->mPosition;
|
||||
cLib::addCalcPos(&playerPosition, targetPosition, 0.25f, 200.0f, 0.0f);
|
||||
s16 YRot = mRotation.y;
|
||||
sLib::addCalcAngle(&YRot, targetAngle, 4, 0x7FFF, 0);
|
||||
|
||||
@@ -60,7 +60,7 @@ int dAcOcloudDive_c::actorExecute() {
|
||||
mStateMgr.executeState();
|
||||
mCollider.SetR(mRadius);
|
||||
mCollider.SetH(height);
|
||||
mCollider.SetC(position - mVec3_c(0.0f, height / 2, 0.0f));
|
||||
mCollider.SetC(mPosition - mVec3_c(0.0f, height / 2, 0.0f));
|
||||
dCcS::GetInstance()->Set(&mCollider);
|
||||
return SUCCEEDED;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ bool dAcOcloudDive_c::fn_350_760() {
|
||||
bool ret = false;
|
||||
bool temp = false;
|
||||
|
||||
mVec3_c deltaPosition = dAcPy_c::GetLink()->position - position;
|
||||
mVec3_c deltaPosition = dAcPy_c::GetLink()->mPosition - mPosition;
|
||||
f32 distance = EGG::Math<f32>::sqrt(deltaPosition.squareMagXZ());
|
||||
|
||||
if (distance <= mRadius) {
|
||||
|
||||
@@ -36,7 +36,7 @@ int dAcODecoB_c::doDelete() {
|
||||
|
||||
int dAcODecoB_c::actorExecute() {
|
||||
mStateMgr.executeState();
|
||||
PSMTXTrans(mWorldMtx, position.x, position.y, position.z);
|
||||
PSMTXTrans(mWorldMtx, mPosition.x, mPosition.y, mPosition.z);
|
||||
mWorldMtx.ZXYrotM(mRotation);
|
||||
mMdl.setLocalMtx(mWorldMtx);
|
||||
return SUCCEEDED;
|
||||
@@ -53,7 +53,7 @@ f32 dAcODecoB_c::lbl_611_data_34 = 0.95f;
|
||||
|
||||
void dAcODecoB_c::executeState_Wait() {
|
||||
if (dAcPy_c::GetLink() != nullptr && dAcPy_c::GetLink()->checkFlags0x350(0x2000)) {
|
||||
mVec3_c deltaPosition = dAcPy_c::GetLink()->position - position;
|
||||
mVec3_c deltaPosition = dAcPy_c::GetLink()->mPosition - mPosition;
|
||||
f32 distance = EGG::Math<f32>::sqrt(deltaPosition.squareMagXZ());
|
||||
distance = (2000.0f - distance) / 2000.0f;
|
||||
if (distance < 0.0f) {
|
||||
|
||||
@@ -176,7 +176,7 @@ int dAcODungeonShip_c::actorExecute() {
|
||||
// I hate whatever this stupid pattern in actors is with
|
||||
// redundant casts and adding 0.0f to stuff
|
||||
int tempZero = 0;
|
||||
mVec3_c offsetPosition(position.x, position.y + 1200.0f + tempZero, position.z);
|
||||
mVec3_c offsetPosition(mPosition.x, mPosition.y + 1200.0f + tempZero, mPosition.z);
|
||||
|
||||
f32 scale = tempZero + 2100.0f;
|
||||
mVec3_c directedScale = mVec3_c::Ex * scale;
|
||||
@@ -191,7 +191,7 @@ int dAcODungeonShip_c::actorExecute() {
|
||||
mMdl.calc(false);
|
||||
if (field_0x8D8) {
|
||||
mEffects[0].createContinuousEffect(
|
||||
PARTICLE_RESOURCE_ID_MAPPING_682_, position, &mRotation, nullptr, nullptr, nullptr
|
||||
PARTICLE_RESOURCE_ID_MAPPING_682_, mPosition, &mRotation, nullptr, nullptr, nullptr
|
||||
);
|
||||
}
|
||||
|
||||
@@ -281,8 +281,8 @@ void dAcODungeonShip_c::executeState_Transparency() {
|
||||
// f32 distToLink = getSquareDistanceTo(link->position);
|
||||
f32 dist2 = 100000000.0f;
|
||||
f32 dist1 = 225000000.0f;
|
||||
bool isWithinDist2 = getSquareDistanceTo(link->position) < dist2;
|
||||
bool isWithinDist1 = getSquareDistanceTo(link->position) < dist1;
|
||||
bool isWithinDist2 = getSquareDistanceTo(link->mPosition) < dist2;
|
||||
bool isWithinDist1 = getSquareDistanceTo(link->mPosition) < dist1;
|
||||
s32 tmp1 = fn_485_1960();
|
||||
bool tmp2 = tmp1 < 0x1555;
|
||||
if (isWithinDist1 && field_0x868 == 0 && field_0x862 == 0 && tmp2) {
|
||||
@@ -370,7 +370,7 @@ void dAcODungeonShip_c::executeState_AppearEvent() {
|
||||
}
|
||||
mVec3_c vec;
|
||||
if (mEvent.getSingleVecData(&vec, 'pos0', 0) == 1) {
|
||||
position = vec;
|
||||
mPosition = vec;
|
||||
}
|
||||
field_0x8D8 = 0;
|
||||
}
|
||||
@@ -431,7 +431,7 @@ void dAcODungeonShip_c::fn_485_1660() {
|
||||
field_0x856 = 1;
|
||||
if (mPath.init(mPathIdx, roomid, 0, 0, false, time, speed, unk)) {
|
||||
mPath.setSegment(0, time);
|
||||
position = mPath.getPosition();
|
||||
mPosition = mPath.getPosition();
|
||||
mOldPosition = mPath.getPosition();
|
||||
}
|
||||
}
|
||||
@@ -443,7 +443,7 @@ void dAcODungeonShip_c::fn_485_1720() {
|
||||
mPath.setSpeed(forwardSpeed);
|
||||
mPath.execute();
|
||||
// TODO
|
||||
position = mPath.getPosition();
|
||||
mPosition = mPath.getPosition();
|
||||
|
||||
mVec3_c tmp;
|
||||
mPath.getDirection(tmp);
|
||||
@@ -479,7 +479,7 @@ u32 dAcODungeonShip_c::fn_485_1960() {
|
||||
}
|
||||
mVec3_c v = mVec3_c::Ez;
|
||||
v.rotY(angle.y + mAng(-0x4000));
|
||||
mVec3_c dist = link->position - position;
|
||||
mVec3_c dist = link->mPosition - mPosition;
|
||||
dist.y = 0.0f;
|
||||
dist.normalizeRS();
|
||||
s16 a1 = cLib::targetAngleY(mVec3_c::Zero, v);
|
||||
@@ -507,7 +507,7 @@ void dAcODungeonShip_c::fn_485_1DF0() {
|
||||
const dAcPy_c *link = dAcPy_c::GetLink();
|
||||
if (link != nullptr) {
|
||||
// unused, stack problems
|
||||
mVec3_c dist = position - link->position;
|
||||
mVec3_c dist = mPosition - link->mPosition;
|
||||
fn_485_1960();
|
||||
field_0x858 = 30.0f;
|
||||
sLib::addCalc(&forwardSpeed, 30.0f, 0.02f, 1.0f, 0.1f);
|
||||
|
||||
@@ -39,7 +39,7 @@ int dAcOfenceBoko_c::doDelete() {
|
||||
int dAcOfenceBoko_c::actorExecute() {
|
||||
// Putting these in a single if fails to match ;-;
|
||||
if (!field_0x560) {
|
||||
if (dBgS_ObjGndChk::CheckPos(position + mVec3_c::Ey * 100.f)) {
|
||||
if (dBgS_ObjGndChk::CheckPos(mPosition + mVec3_c::Ey * 100.f)) {
|
||||
mCollision.mRoomId = dBgS_ObjGndChk::GetRoomID();
|
||||
roomid = mCollision.mRoomId;
|
||||
field_0x560 = true;
|
||||
|
||||
@@ -59,7 +59,7 @@ int dAcOFlyingClawshotTarget_c::actorCreate() {
|
||||
|
||||
mSph.Set(src);
|
||||
mSph.SetStts(mStts);
|
||||
mSph.SetC(position);
|
||||
mSph.SetC(mPosition);
|
||||
mState = 0;
|
||||
|
||||
mVec3_c min, max;
|
||||
@@ -73,7 +73,7 @@ int dAcOFlyingClawshotTarget_c::actorPostCreate() {
|
||||
mVec3_c v = mVec3_c::Ez;
|
||||
v.rotX(mRotation.x);
|
||||
v.rotY(mRotation.y);
|
||||
mVec3_c diff = dAcPy_c::LINK->position - position;
|
||||
mVec3_c diff = dAcPy_c::LINK->mPosition - mPosition;
|
||||
diff.normalize();
|
||||
if (!mToLink.Set(v, diff)) {
|
||||
mToLink.set(1.f, 0.f, 0.f, 0.f);
|
||||
@@ -87,7 +87,7 @@ int dAcOFlyingClawshotTarget_c::actorExecute() {
|
||||
mVec3_c markPoint;
|
||||
PSMTXMultVec(mWorldMtx, mMarkPoint, markPoint);
|
||||
|
||||
f32 dist_to = markPoint.squareDistance(player->position);
|
||||
f32 dist_to = markPoint.squareDistance(player->mPosition);
|
||||
|
||||
if (checkObjectProperty(0x4)) {
|
||||
player->vt_0x0DC(this, mMarkPoint);
|
||||
@@ -108,7 +108,7 @@ int dAcOFlyingClawshotTarget_c::actorExecute() {
|
||||
mToLink = q * mToLink;
|
||||
|
||||
} else {
|
||||
mVec3_c vec = player->position - position;
|
||||
mVec3_c vec = player->mPosition - mPosition;
|
||||
vec.normalize();
|
||||
|
||||
mVec3_c v2;
|
||||
@@ -155,7 +155,7 @@ int dAcOFlyingClawshotTarget_c::actorExecute() {
|
||||
mWorldMtx += mtx;
|
||||
mMdl.setLocalMtx(mWorldMtx);
|
||||
mMdl.calc(false);
|
||||
mSph.SetC(position);
|
||||
mSph.SetC(mPosition);
|
||||
dCcS::GetInstance()->Set(&mSph);
|
||||
|
||||
return SUCCEEDED;
|
||||
|
||||
@@ -55,7 +55,7 @@ int dAcOFruitGutsLeaf_c::actorCreate() {
|
||||
}
|
||||
|
||||
int dAcOFruitGutsLeaf_c::actorPostCreate() {
|
||||
if (hideInPast() && !dTimeAreaMgr_c::GetInstance()->fn_800B9B60(roomid, position)) {
|
||||
if (hideInPast() && !dTimeAreaMgr_c::GetInstance()->fn_800B9B60(roomid, mPosition)) {
|
||||
mScale.x = 0.0f;
|
||||
mScale.y = 0.0f;
|
||||
mScale.z = 0.0f;
|
||||
@@ -69,7 +69,7 @@ int dAcOFruitGutsLeaf_c::actorPostCreate() {
|
||||
}
|
||||
int dAcOFruitGutsLeaf_c::actorExecute() {
|
||||
if (hideInPast()) {
|
||||
if (dTimeAreaMgr_c::GetInstance()->fn_800B9B60(roomid, position)) {
|
||||
if (dTimeAreaMgr_c::GetInstance()->fn_800B9B60(roomid, mPosition)) {
|
||||
if (mScale.x != 1.0f) {
|
||||
sLib::chase(&mScale.x, 1.0f, 0.05f);
|
||||
mScale.z = mScale.x;
|
||||
|
||||
@@ -85,7 +85,7 @@ void dAcOgirahimFoot_c::executeState_Appear() {
|
||||
return;
|
||||
}
|
||||
|
||||
dJEffManager_c::spawnEffect(PARTICLE_RESOURCE_ID_MAPPING_77_, position, nullptr, &mScale, nullptr, nullptr, 0, 0);
|
||||
dJEffManager_c::spawnEffect(PARTICLE_RESOURCE_ID_MAPPING_77_, mPosition, nullptr, &mScale, nullptr, nullptr, 0, 0);
|
||||
|
||||
deleteRequest();
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ int dAcOhole_c::create() {
|
||||
mObjAcch.Set(this, 1, &mAcchCir);
|
||||
mAcchCir.SetWall(100.0f, 100.0f);
|
||||
mObjAcch.CrrPos(*dBgS::GetInstance());
|
||||
dBgS_ObjGndChk::CheckPos(position);
|
||||
dBgS_ObjGndChk::CheckPos(mPosition);
|
||||
mStateMgr.changeState(StateID_Wait);
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
@@ -250,14 +250,14 @@ void dAcOivyRope_c::executeState_RopeCut() {
|
||||
mStateMgr.changeState(StateID_PlayerGrip);
|
||||
} else {
|
||||
if (mField_0xFCE != 0 && --mField_0xFCE == 0) {
|
||||
position = mTightropeEnd;
|
||||
mPosition = mTightropeEnd;
|
||||
}
|
||||
fn_256_8590();
|
||||
fn_256_C740();
|
||||
}
|
||||
}
|
||||
void dAcOivyRope_c::finalizeState_RopeCut() {
|
||||
position = mTightropeEnd;
|
||||
mPosition = mTightropeEnd;
|
||||
mField_0xFCE = 0;
|
||||
}
|
||||
|
||||
@@ -442,7 +442,7 @@ void dAcOivyRope_c::fn_256_AE00() {
|
||||
|
||||
m.getTranslation(mPnts2[i]);
|
||||
mVec3_c tmp = mPnts2[i];
|
||||
mVec3_c tmp2 = tmp - position;
|
||||
mVec3_c tmp2 = tmp - mPosition;
|
||||
|
||||
m.copyFrom(mWorldMtx);
|
||||
m.YrotM(mField_0xFDC);
|
||||
@@ -653,7 +653,7 @@ f32 dAcOivyRope_c::fn_256_C200(int ang) {
|
||||
void dAcOivyRope_c::fn_256_C410() {
|
||||
fn_256_3E70();
|
||||
if (mStateMgr.isState(StateID_RopeReturn)) {
|
||||
mVec3_c diff = dAcPy_c::GetLink()->position - mTightropeEnd;
|
||||
mVec3_c diff = dAcPy_c::GetLink()->mPosition - mTightropeEnd;
|
||||
if (diff.squareMagXZ() > 90000.f) {
|
||||
return;
|
||||
}
|
||||
@@ -664,8 +664,8 @@ void dAcOivyRope_c::fn_256_C410() {
|
||||
}
|
||||
|
||||
int count = mSegmentCount - 9;
|
||||
f32 f2 = dAcPy_c::GetLink()->position.y - 100.f;
|
||||
f32 f = 150.f + dAcPy_c::GetLink()->position.y;
|
||||
f32 f2 = dAcPy_c::GetLink()->mPosition.y - 100.f;
|
||||
f32 f = 150.f + dAcPy_c::GetLink()->mPosition.y;
|
||||
if (count < 0) {
|
||||
count = 0;
|
||||
}
|
||||
@@ -689,7 +689,7 @@ void dAcOivyRope_c::fn_256_C740() {
|
||||
const f32 f2 = (1.f - mField_0x1040) * 4.f + 1.1f;
|
||||
if (mField_0xFA4 <= f2) {
|
||||
const mVec3_c &pnt = fn_256_D730(mSegmentCount - 1);
|
||||
const mVec3_c diff = pnt - dAcPy_c::GetLink()->position;
|
||||
const mVec3_c diff = pnt - dAcPy_c::GetLink()->mPosition;
|
||||
const f32 diffmag = diff.squareMagXZ();
|
||||
if (diffmag < 28900.f) {
|
||||
fn_256_C980(450.f, 200.f);
|
||||
@@ -721,7 +721,7 @@ void dAcOivyRope_c::fn_256_C980(f32 f0, f32 f1) {
|
||||
UNKTYPE dAcOivyRope_c::fn_256_C9B0(UNKTYPE) {}
|
||||
|
||||
void dAcOivyRope_c::fn_256_CD40() {
|
||||
position = poscopy3 = poscopy2 = fn_256_D730(mSegmentCount - 1);
|
||||
mPosition = poscopy3 = poscopy2 = fn_256_D730(mSegmentCount - 1);
|
||||
|
||||
mCps1.Set(sCpsSrc);
|
||||
mCps1.SetStts(mStts);
|
||||
@@ -729,9 +729,9 @@ void dAcOivyRope_c::fn_256_CD40() {
|
||||
|
||||
mCps1.SetTgInfo_0x1(0xB);
|
||||
|
||||
mVec3_c tmp = position;
|
||||
mVec3_c tmp = mPosition;
|
||||
tmp.y -= 50.f;
|
||||
mCps1.cM3dGLin::Set(position, tmp);
|
||||
mCps1.cM3dGLin::Set(mPosition, tmp);
|
||||
|
||||
mCps1.OnTg_0x200000();
|
||||
}
|
||||
@@ -832,7 +832,7 @@ void dAcOivyRope_c::fn_256_D2B0() {
|
||||
}
|
||||
|
||||
void dAcOivyRope_c::fn_256_D3D0(mVec3_c &pOut1, mVec3_c &pOut2, s16 param2, bool bool0, f32 float0) {
|
||||
mVec3_c playerPos = dAcPy_c::GetLink()->position;
|
||||
mVec3_c playerPos = dAcPy_c::GetLink()->mPosition;
|
||||
mVec3_c playerCenter = dAcPy_c::GetLink()->getCenterTranslation();
|
||||
|
||||
if (bool0) {
|
||||
|
||||
@@ -49,8 +49,8 @@ int dAcOOctGrass_c::create() {
|
||||
updateMatrix();
|
||||
mMdl.setLocalMtx(mWorldMtx);
|
||||
spawnOcGrsL();
|
||||
poscopy2 = position;
|
||||
poscopy3 = position;
|
||||
poscopy2 = mPosition;
|
||||
poscopy3 = mPosition;
|
||||
poscopy3.y += 20.0f;
|
||||
mStateMgr.changeState(StateID_Wait);
|
||||
boundingBox.Set(mVec3_c(-50.0f, -10.0f, -50.0f), mVec3_c(50.0f, 100.0f, 50.0f));
|
||||
@@ -81,6 +81,7 @@ void dAcOOctGrass_c::spawnOcGrsL() {
|
||||
}
|
||||
|
||||
dAcObjBase_c::create(
|
||||
"OcGrsL", getRoomId(), type & 0xF, &position, nullptr, nullptr, getParams2_ignoreLower(), 0xFFFF, viewclip_index
|
||||
"OcGrsL", getRoomId(), type & 0xF, &mPosition, nullptr, nullptr, getParams2_ignoreLower(), 0xFFFF,
|
||||
viewclip_index
|
||||
);
|
||||
}
|
||||
|
||||
@@ -49,8 +49,8 @@ int dAcOPoolCock_c::doDelete() {
|
||||
int dAcOPoolCock_c::actorExecute() {
|
||||
mStateMgr.executeState();
|
||||
calcVelocity();
|
||||
position += velocity;
|
||||
position += mStts.mCcMove;
|
||||
mPosition += velocity;
|
||||
mPosition += mStts.mCcMove;
|
||||
updateMatrix();
|
||||
|
||||
mMtx_c mdl1Transform(mWorldMtx);
|
||||
|
||||
@@ -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, &mRotation, &mScale, getParams2_ignoreLower(), -1, viewclip_index
|
||||
"PmpknBd", getRoomId(), 0, &mPosition, &mRotation, &mScale, getParams2_ignoreLower(), -1, viewclip_index
|
||||
);
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ int dAcOring_c::create() {
|
||||
mModel.setLocalMtx(mWorldMtx);
|
||||
forwardAccel = -5.0f;
|
||||
forwardMaxSpeed = -40.0f;
|
||||
field_0x38C = dAcPy_c::LINK->position.y;
|
||||
field_0x38C = dAcPy_c::LINK->mPosition.y;
|
||||
mStateMgr.changeState(StateID_Move);
|
||||
return SUCCEEDED;
|
||||
}
|
||||
@@ -39,8 +39,8 @@ int dAcOring_c::doDelete() {
|
||||
int dAcOring_c::actorExecute() {
|
||||
mStateMgr.executeState();
|
||||
calcVelocity();
|
||||
position += velocity;
|
||||
position += mStts.mCcMove;
|
||||
mPosition += velocity;
|
||||
mPosition += mStts.mCcMove;
|
||||
updateMatrix();
|
||||
mModel.setLocalMtx(mWorldMtx);
|
||||
return SUCCEEDED;
|
||||
@@ -58,7 +58,7 @@ void dAcOring_c::executeState_Move() {
|
||||
return;
|
||||
}
|
||||
mRotation.addX(0x1000);
|
||||
if (field_0x38C >= position.y) {
|
||||
if (field_0x38C >= mPosition.y) {
|
||||
deleteRequest();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ int dAcOruinedSave_c::create() {
|
||||
CREATE_ALLOCATOR(dAcOruinedSave_c);
|
||||
updateMatrix();
|
||||
mMdl.setLocalMtx(mWorldMtx);
|
||||
poscopy2 = position;
|
||||
poscopy2 = mPosition;
|
||||
poscopy2.y += 300.0f;
|
||||
poscopy3 = poscopy2;
|
||||
field_0x40C = 0;
|
||||
|
||||
@@ -116,7 +116,7 @@ int dAcOSeatSword_c::actorExecute() {
|
||||
|
||||
if (mStateMgr.isState(StateID_Wait)) {
|
||||
actorExecuteCommon();
|
||||
mCyl.SetC(position);
|
||||
mCyl.SetC(mPosition);
|
||||
dCcS::GetInstance()->Set(&mCyl);
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ void dAcOSeatSword_c::registerInEvent() {
|
||||
mAng3_c ang = mRotation;
|
||||
ang.y += someAng;
|
||||
vec.rotY(mRotation.y);
|
||||
vec += position;
|
||||
vec += mPosition;
|
||||
player->setPosRot(&vec, &ang, 0, 1, 0);
|
||||
mField_0x7E8.set(0);
|
||||
updateSwordMdl();
|
||||
@@ -225,8 +225,8 @@ void dAcOSeatSword_c::actorExecuteCommon() {
|
||||
|
||||
mEffPos.rotY(player->mRotation.y);
|
||||
|
||||
mEffPos += player->position;
|
||||
mEffPos.y = position.y;
|
||||
mEffPos += player->mPosition;
|
||||
mEffPos.y = mPosition.y;
|
||||
|
||||
mEff.createContinuousEffect(PARTICLE_RESOURCE_ID_MAPPING_76_, mEffPos, &mRotation, &mScale, nullptr, nullptr);
|
||||
mEff.setGlobalAlpha(mField_0x7E4);
|
||||
|
||||
@@ -74,7 +74,7 @@ int dAcOspike_c::doDelete() {
|
||||
|
||||
int dAcOspike_c::actorExecute() {
|
||||
mStateMgr.executeState();
|
||||
mCollision.cM3dGUnk::Set(position, mRotation.y);
|
||||
mCollision.cM3dGUnk::Set(mPosition, mRotation.y);
|
||||
dCcS::GetInstance()->Set(&mCollision);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ int dAcOTarzanPole_c::actorExecute() {
|
||||
|
||||
mVec = mVec3_c::Ex * sXOffset + mVec3_c::Ey * sYOffset;
|
||||
mVec.rotY(mRotation.y);
|
||||
poscopy2 = position + mVec;
|
||||
poscopy2 = mPosition + mVec;
|
||||
poscopy3 = poscopy2 + mVec3_c::Ey * 20.0f;
|
||||
|
||||
// 0x400000 corresponds to dAcPy_FLG0::FLG0_SWING_ROPE
|
||||
|
||||
@@ -48,7 +48,7 @@ int dAcOtoD3StoneFigure_c::create() {
|
||||
mCollision.Set(sCcSrc);
|
||||
mCollision.SetStts(mStts);
|
||||
int zero = 0;
|
||||
mCollision.SetC(position);
|
||||
mCollision.SetC(mPosition);
|
||||
mCollision.SetR(dAcOtoD3StoneFigure_c::sRadius + zero);
|
||||
mCollision.SetH(dAcOtoD3StoneFigure_c::sHeight + zero);
|
||||
dCcS::GetInstance()->Set(&mCollision);
|
||||
@@ -56,10 +56,10 @@ int dAcOtoD3StoneFigure_c::create() {
|
||||
|
||||
// ???
|
||||
f32 a, b, c;
|
||||
c = position.z;
|
||||
c = mPosition.z;
|
||||
b = getYPos();
|
||||
b += zero;
|
||||
a = position.x;
|
||||
a = mPosition.x;
|
||||
poscopy2.x = a;
|
||||
poscopy2.y = b;
|
||||
poscopy2.z = c;
|
||||
|
||||
@@ -27,8 +27,8 @@ bool dAcOTowerGearD101_c::createHeap() {
|
||||
return false;
|
||||
}
|
||||
fn_80067340(field_0x3A0, &mdl, "model0");
|
||||
position = field_0x3A0;
|
||||
position.rotY(mRotation.y);
|
||||
mPosition = field_0x3A0;
|
||||
mPosition.rotY(mRotation.y);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -50,7 +50,7 @@ int dAcOTowerGearD101_c::actorCreate() {
|
||||
);
|
||||
|
||||
initTransform();
|
||||
if (dBgS_WtrChk::CheckPos(&position, true, 500.0f, -500.0f)) {
|
||||
if (dBgS_WtrChk::CheckPos(&mPosition, true, 500.0f, -500.0f)) {
|
||||
field_0x3F4 = mVec3_c::Zero;
|
||||
field_0x3F4.y = dBgS_WtrChk::GetWaterHeight();
|
||||
} else {
|
||||
@@ -120,7 +120,7 @@ void dAcOTowerGearD101_callback_c::timingB(u32 nodeId, nw4r::g3d::WorldMtxManip
|
||||
void dAcOTowerGearD101_c::initTransform() {
|
||||
mWorldMtx.transS(mVec3_c::Zero);
|
||||
mMtx_c mtx1;
|
||||
mtx1.transS(position);
|
||||
mtx1.transS(mPosition);
|
||||
mWorldMtx += mtx1;
|
||||
field_0x3C4.transS(mVec3_c::Zero);
|
||||
field_0x3C4.ZXYrotM(mRotation.x, mRotation.y, mRotation.z);
|
||||
|
||||
@@ -176,7 +176,7 @@ int dAcOTowerHandD101_c::actorPostCreate() {
|
||||
dAcObjBase_c *ac = dAcObjBase_c::getNextObject(&dAcItem_c::sItemList, nullptr);
|
||||
f32 distLimit = 90000.0f;
|
||||
while (handClosed && ac != nullptr) {
|
||||
if (PSVECSquareDistance(pos, ac->position) < distLimit) {
|
||||
if (PSVECSquareDistance(pos, ac->mPosition) < distLimit) {
|
||||
handClosed = false;
|
||||
mHeldItem.link(static_cast<dAcItem_c *>(ac));
|
||||
} else {
|
||||
@@ -210,11 +210,11 @@ int dAcOTowerHandD101_c::actorExecute() {
|
||||
UNKWORD w = link->IfCurrentActionToActor(this, 0x3D);
|
||||
bool b = getItem(item);
|
||||
if (!b && item->isStateWait()) {
|
||||
f32 dist = PSVECSquareDistance(item->position, link->position);
|
||||
f32 dist = PSVECSquareDistance(item->mPosition, link->mPosition);
|
||||
if (w == 0 && dist < 15625.0f) {
|
||||
item->getItemFromBWheelItem();
|
||||
} else {
|
||||
item->setItemPosition(item->position);
|
||||
item->setItemPosition(item->mPosition);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -545,7 +545,7 @@ void dAcOTowerHandD101_c::eventCallback(void *arg) {
|
||||
}
|
||||
|
||||
void dAcOTowerHandD101_c::calcItemPosition(const mVec3_c &offset, mVec3_c &outPosition) const {
|
||||
transformMtx(position, mRotation, offset, outPosition);
|
||||
transformMtx(mPosition, mRotation, offset, outPosition);
|
||||
}
|
||||
|
||||
void dAcOTowerHandD101_c::initializeState_RemainOpen() {
|
||||
@@ -572,7 +572,7 @@ void dAcOTowerHandD101_c::executeState_RemainOpen() {
|
||||
dAcPy_c *link = dAcPy_c::LINK;
|
||||
mVec3_c pos;
|
||||
getItemPos(pos);
|
||||
f32 linkDistToItem = PSVECSquareDistance(pos, link->position);
|
||||
f32 linkDistToItem = PSVECSquareDistance(pos, link->mPosition);
|
||||
if (EventManager::isInEvent() && getEventStuff().getCurrentEventCommand() == 'wait') {
|
||||
return;
|
||||
}
|
||||
@@ -597,14 +597,14 @@ void dAcOTowerHandD101_c::finalizeState_RemainOpen() {}
|
||||
void dAcOTowerHandD101_c::initializeState_Close() {
|
||||
mMdl.getAnm().setPlayState(m3d::PLAY_MODE_1);
|
||||
mMdl.setRate(getCloseRate());
|
||||
mEffects.createEffect(PARTICLE_RESOURCE_ID_MAPPING_573_, position, nullptr, nullptr, nullptr, nullptr);
|
||||
mEffects.createEffect(PARTICLE_RESOURCE_ID_MAPPING_573_, mPosition, nullptr, nullptr, nullptr, nullptr);
|
||||
startSound(SE_TowerHa_CLENCH);
|
||||
}
|
||||
void dAcOTowerHandD101_c::executeState_Close() {
|
||||
dAcPy_c *link = dAcPy_c::LINK;
|
||||
mVec3_c pos;
|
||||
getItemPos(pos);
|
||||
f32 linkDistToItem = PSVECSquareDistance(pos, link->position);
|
||||
f32 linkDistToItem = PSVECSquareDistance(pos, link->mPosition);
|
||||
if (EventManager::isInEvent() && getEventStuff().getCurrentEventCommand() == 'wait') {
|
||||
mStateMgr.changeState(StateID_Open);
|
||||
return;
|
||||
@@ -656,7 +656,7 @@ void dAcOTowerHandD101_c::executeState_Open() {
|
||||
dAcPy_c *link = dAcPy_c::LINK;
|
||||
mVec3_c pos;
|
||||
getItemPos(pos);
|
||||
f32 linkDistToItem = PSVECSquareDistance(pos, link->position);
|
||||
f32 linkDistToItem = PSVECSquareDistance(pos, link->mPosition);
|
||||
if (EventManager::isInEvent() && getEventStuff().getCurrentEventCommand() == 'wait') {
|
||||
if (mMdl.getAnm().isStop()) {
|
||||
mStateMgr.changeState(StateID_RemainOpen);
|
||||
@@ -714,7 +714,7 @@ void dAcOTowerHandD101_c::executeState_RemainClosed() {
|
||||
dAcPy_c *link = dAcPy_c::LINK;
|
||||
mVec3_c pos;
|
||||
getItemPos(pos);
|
||||
f32 linkDistToItem = PSVECSquareDistance(pos, link->position);
|
||||
f32 linkDistToItem = PSVECSquareDistance(pos, link->mPosition);
|
||||
if (EventManager::isInEvent() && getEventStuff().getCurrentEventCommand() == 'wait') {
|
||||
mStateMgr.changeState(StateID_Open);
|
||||
return;
|
||||
@@ -771,7 +771,7 @@ void dAcOTowerHandD101_c::executeState_Hold() {
|
||||
sLib::addCalcScaledDiff(&value, i * 0.25f, 0.5f, 1.0f);
|
||||
doSomethingHold(value);
|
||||
mMtx_c tmpMtx1;
|
||||
tmpMtx1.transS(position);
|
||||
tmpMtx1.transS(mPosition);
|
||||
// Different address calculation here
|
||||
tmpMtx1.ZXYrotM(mRotation.x, mRotation.y, mRotation.z);
|
||||
mVec3_c linkVec;
|
||||
|
||||
@@ -60,10 +60,10 @@ extern const u16 PARTICLE_RESOURCE_ID_MAPPING_967_;
|
||||
int dAcOtriforce_c::actorExecute() {
|
||||
int zero = 0;
|
||||
mVec3_c offset = mVec3_c::Ey * (mStartingOffset.sin() * getBounceScalar());
|
||||
position = mStartingPos + offset;
|
||||
mPosition = mStartingPos + offset;
|
||||
mStartingOffset.mVal += 0x16C;
|
||||
|
||||
mCollision.SetC(position.x, position.y + 90.0f + zero, position.z);
|
||||
mCollision.SetC(mPosition.x, mPosition.y + 90.0f + zero, mPosition.z);
|
||||
|
||||
dCcS::GetInstance()->Set(&mCollision);
|
||||
updateMatrix();
|
||||
|
||||
@@ -124,8 +124,8 @@ int dAcOtubo_c::actorPostCreate() {
|
||||
|
||||
setActorProperty(0x4);
|
||||
|
||||
if (dBgS_ObjGndChk ::CheckPos(position + mVec3_c::Ey * 50.f)) {
|
||||
position.y = dBgS_ObjGndChk::GetGroundHeight();
|
||||
if (dBgS_ObjGndChk ::CheckPos(mPosition + mVec3_c::Ey * 50.f)) {
|
||||
mPosition.y = dBgS_ObjGndChk::GetGroundHeight();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,8 +142,8 @@ int dAcOtubo_c::actorExecute() {
|
||||
if (mTimer_0x9F4 != 0) {
|
||||
mField_0x9DC = 0.f;
|
||||
|
||||
if (dBgS_ObjGndChk::CheckPos(position + mVec3_c::Ey * 500.f)) {
|
||||
if (dBgS_ObjGndChk::GetGroundHeight() - position.y > 5.f) {
|
||||
if (dBgS_ObjGndChk::CheckPos(mPosition + mVec3_c::Ey * 500.f)) {
|
||||
if (dBgS_ObjGndChk::GetGroundHeight() - mPosition.y > 5.f) {
|
||||
bOffGround = true;
|
||||
mSph.ClrTgSet();
|
||||
} else if (sLib::calcTimer(&mTimer_0x9F4) == 0) {
|
||||
@@ -162,9 +162,9 @@ int dAcOtubo_c::actorExecute() {
|
||||
if (!bOffGround) {
|
||||
if (!checkCarryType()) {
|
||||
calcVelocity();
|
||||
position += velocity;
|
||||
position += mStts.GetCcMove();
|
||||
mField_0x9DC += position.y - mOldPosition.y;
|
||||
mPosition += velocity;
|
||||
mPosition += mStts.GetCcMove();
|
||||
mField_0x9DC += mPosition.y - mOldPosition.y;
|
||||
adjustRoll();
|
||||
}
|
||||
GetLinkage().bushTpFunc(mObjAcch);
|
||||
@@ -182,7 +182,7 @@ int dAcOtubo_c::actorExecute() {
|
||||
|
||||
mMdl.setLocalMtx(mWorldMtx);
|
||||
mMdl.calc(false);
|
||||
poscopy2 = position + mVec3_c(0.f, 28.f, 0.f);
|
||||
poscopy2 = mPosition + mVec3_c(0.f, 28.f, 0.f);
|
||||
poscopy3 = poscopy2;
|
||||
poscopy3.y += 48.f;
|
||||
mbField_0x9EB = 0;
|
||||
@@ -204,7 +204,7 @@ int dAcOtubo_c::draw() {
|
||||
static mQuat_c quat(0.f, 30.f, 0.f, 40.f);
|
||||
|
||||
if (yoffset >= 0.f) {
|
||||
drawShadow(mShdw, nullptr, mWorldMtx, &quat, -1, -1, -1, -1, -1, position.y - mObjAcch.GetGroundH());
|
||||
drawShadow(mShdw, nullptr, mWorldMtx, &quat, -1, -1, -1, -1, -1, mPosition.y - mObjAcch.GetGroundH());
|
||||
}
|
||||
return SUCCEEDED;
|
||||
}
|
||||
@@ -214,7 +214,7 @@ void dAcOtubo_c::executeState_Wait() {
|
||||
if (mObjAcch.ChkGroundLanding()) {
|
||||
if (!mbField_0x9EF || !EventManager::isInEvent()) {
|
||||
if (mField_0x9F6 == 2) {
|
||||
dJEffManager_c::spawnGroundEffect(position, polyAttr0, polyAttr1, mField_0x1B4, 0, 1.0f, mField_0x1B0);
|
||||
dJEffManager_c::spawnGroundEffect(mPosition, polyAttr0, polyAttr1, mField_0x1B4, 0, 1.0f, mField_0x1B0);
|
||||
}
|
||||
if (mbField_0x9F3) {
|
||||
startSound(SE_Tubo_PUT);
|
||||
@@ -223,7 +223,7 @@ void dAcOtubo_c::executeState_Wait() {
|
||||
if (checkOnLava()) {
|
||||
if (mField_0x9F6 != 2) {
|
||||
dJEffManager_c::spawnGroundEffect(
|
||||
position, polyAttr0, polyAttr1, mField_0x1B4, 0, 1.0f, mField_0x1B0
|
||||
mPosition, polyAttr0, polyAttr1, mField_0x1B4, 0, 1.0f, mField_0x1B0
|
||||
);
|
||||
}
|
||||
startSound(SE_O_FALL_LAVA_S);
|
||||
@@ -334,11 +334,11 @@ void dAcOtubo_c::executeState_Put() {
|
||||
}
|
||||
}
|
||||
void dAcOtubo_c::finalizeState_Put() {
|
||||
if (dBgS_ObjGndChk::CheckPos(position + mVec3_c::Ey * 10.f)) {
|
||||
mbField_0x9F3 = nw4r::math::FAbs(position.y - dBgS_ObjGndChk::GetGroundHeight()) < 100.f;
|
||||
if (dBgS_ObjGndChk::CheckPos(mPosition + mVec3_c::Ey * 10.f)) {
|
||||
mbField_0x9F3 = nw4r::math::FAbs(mPosition.y - dBgS_ObjGndChk::GetGroundHeight()) < 100.f;
|
||||
}
|
||||
if (!(dBgS_ObjGndChk::CheckPos(position + mVec3_c::Ey * 10.f) &&
|
||||
nw4r::math::FAbs(position.y - dBgS_ObjGndChk::GetGroundHeight()) < 100.f)) {
|
||||
if (!(dBgS_ObjGndChk::CheckPos(mPosition + mVec3_c::Ey * 10.f) &&
|
||||
nw4r::math::FAbs(mPosition.y - dBgS_ObjGndChk::GetGroundHeight()) < 100.f)) {
|
||||
mSph.OnAtSet();
|
||||
}
|
||||
forwardSpeed = 0.f;
|
||||
@@ -357,7 +357,7 @@ void dAcOtubo_c::initializeState_Slope() {
|
||||
}
|
||||
void dAcOtubo_c::executeState_Slope() {
|
||||
if (mObjAcch.ChkGroundLanding()) {
|
||||
dJEffManager_c::spawnGroundEffect(position, polyAttr0, polyAttr1, mField_0x1B4, 0, 1.0f, mField_0x1B0);
|
||||
dJEffManager_c::spawnGroundEffect(mPosition, polyAttr0, polyAttr1, mField_0x1B4, 0, 1.0f, mField_0x1B0);
|
||||
} else if (mObjAcch.ChkGndHit()) {
|
||||
mField_0x9DC = 0.f;
|
||||
addPickupTarget();
|
||||
@@ -388,8 +388,8 @@ void dAcOtubo_c::finalizeState_Slope() {}
|
||||
|
||||
void dAcOtubo_c::initializeState_Rebirth() {
|
||||
SpecialItemDropMgr *mgr = SpecialItemDropMgr::GetInstance();
|
||||
mgr->giveSpecialDropItem(getParams2UpperByte(), roomid, &position, 0, mRotation.y, -1);
|
||||
mField_0x9AC = position;
|
||||
mgr->giveSpecialDropItem(getParams2UpperByte(), roomid, &mPosition, 0, mRotation.y, -1);
|
||||
mField_0x9AC = mPosition;
|
||||
obj_pos = &mField_0x9AC;
|
||||
mField_0x9F6 = 0;
|
||||
mRotation = rot_copy;
|
||||
@@ -435,7 +435,7 @@ void dAcOtubo_c::executeState_Rebirth() {
|
||||
void dAcOtubo_c::finalizeState_Rebirth() {
|
||||
mSph.OnCoSet();
|
||||
mSph.OnTgSet();
|
||||
obj_pos = &position;
|
||||
obj_pos = &mPosition;
|
||||
clearObjectProperty(0x200);
|
||||
setActorProperty(0x1);
|
||||
}
|
||||
@@ -451,7 +451,7 @@ void dAcOtubo_c::destroy() {
|
||||
if (!boolParam) {
|
||||
return;
|
||||
}
|
||||
fn_80022BE0(dLightEnv_c::GetPInstance(), position);
|
||||
fn_80022BE0(dLightEnv_c::GetPInstance(), mPosition);
|
||||
GetLinkage().fn_80050EA0(this);
|
||||
|
||||
dEmitterBase_c *fx_thing = dJEffManager_c::spawnEffect(
|
||||
@@ -461,7 +461,7 @@ void dAcOtubo_c::destroy() {
|
||||
fx_thing->attachEmitterCallbackId(mSubtype != 0 ? dJEffManager_c::TsuboB : dJEffManager_c::TsuboA);
|
||||
}
|
||||
fx_thing = dJEffManager_c::spawnEffect(
|
||||
PARTICLE_RESOURCE_ID_MAPPING_116_, position, nullptr, nullptr, nullptr, nullptr, 0, 0
|
||||
PARTICLE_RESOURCE_ID_MAPPING_116_, mPosition, nullptr, nullptr, nullptr, nullptr, 0, 0
|
||||
);
|
||||
if (fx_thing) {
|
||||
fx_thing->bindShpEmitter(mSubtype != 0 ? dJEffManager_c::TsuboB : dJEffManager_c::TsuboA, false);
|
||||
@@ -484,7 +484,7 @@ void dAcOtubo_c::calcRoll() {
|
||||
bool onLog = checkOnLog_0xE4E();
|
||||
if (mbMovingForward || onLog) {
|
||||
if (onLog) {
|
||||
velocity = position - mOldPosition;
|
||||
velocity = mPosition - mOldPosition;
|
||||
forwardSpeed = EGG::Math<f32>::sqrt(velocity.x * velocity.x + velocity.z * velocity.z);
|
||||
angle.y = cM::atan2s(velocity.x, velocity.z);
|
||||
}
|
||||
@@ -540,7 +540,7 @@ void dAcOtubo_c::adjustRoll() {
|
||||
mField_0x9D8 *= 0.75f;
|
||||
}
|
||||
|
||||
position += vel;
|
||||
mPosition += vel;
|
||||
}
|
||||
|
||||
void dAcOtubo_c::fn_272_2670() {
|
||||
@@ -683,13 +683,13 @@ mVec3_c dAcOtubo_c::getCenter() const {
|
||||
mVec3_c dir;
|
||||
PSMTXMultVecSR(m, mVec3_c::Ey, dir);
|
||||
|
||||
return position + dir * 28.f;
|
||||
return mPosition + dir * 28.f;
|
||||
}
|
||||
|
||||
void dAcOtubo_c::fn_272_2E60(const mVec3_c &vel) {
|
||||
if (mField_0x8F0.fn_80051780(mSph)) {
|
||||
if (mSph.ChkCoHit()) {
|
||||
position += mStts.GetCcMove();
|
||||
mPosition += mStts.GetCcMove();
|
||||
mField_0x8F0.fn_800051630();
|
||||
}
|
||||
forwardSpeed = 0.f;
|
||||
@@ -809,7 +809,7 @@ bool dAcOtubo_c::checkCarryType() const {
|
||||
}
|
||||
|
||||
bool dAcOtubo_c::checkSubmerged() {
|
||||
return mObjAcch.ChkWaterIn() && position.y + 28.f < mObjAcch.mWtr.GetGroundH();
|
||||
return mObjAcch.ChkWaterIn() && mPosition.y + 28.f < mObjAcch.mWtr.GetGroundH();
|
||||
}
|
||||
|
||||
bool dAcOtubo_c::fn_272_38A0() {
|
||||
|
||||
@@ -108,11 +108,11 @@ int dAcOTumbleWeed_c::actorExecute() {
|
||||
dLightEnv_c::GetInstance().setWind(mField_0x968, mField_0x980);
|
||||
|
||||
calcVelocity();
|
||||
position += velocity;
|
||||
position += mStts.GetCcMove();
|
||||
mPosition += velocity;
|
||||
mPosition += mStts.GetCcMove();
|
||||
|
||||
mObjAcch.CrrPos(*dBgS::GetInstance());
|
||||
mField_0x974 += position.y - mOldPosition.y;
|
||||
mField_0x974 += mPosition.y - mOldPosition.y;
|
||||
if (checkCollect()) {
|
||||
dAcPy_c::LINK->bugNetCollectTreasure(ITEM_TUMBLE_WEED);
|
||||
killNoItemDrop();
|
||||
@@ -157,7 +157,7 @@ int dAcOTumbleWeed_c::draw() {
|
||||
|
||||
static mQuat_c shadowRot(0.f, 30.f, 0.f, 50.f);
|
||||
if (0.f < mScale.x) {
|
||||
drawShadow(mShdw, nullptr, mShadowMtx, &shadowRot, -1, -1, -1, -1, -1, position.y - mObjAcch.GetGroundH());
|
||||
drawShadow(mShdw, nullptr, mShadowMtx, &shadowRot, -1, -1, -1, -1, -1, mPosition.y - mObjAcch.GetGroundH());
|
||||
}
|
||||
|
||||
return SUCCEEDED;
|
||||
@@ -286,7 +286,7 @@ void dAcOTumbleWeed_c::calcMatrix() {
|
||||
|
||||
mMtx_c mtx0, mtx1, mtx2;
|
||||
mShadowMtx.copyFrom(mWorldMtx);
|
||||
mtx1.transS(getPosition() - position);
|
||||
mtx1.transS(getPosition() - mPosition);
|
||||
mShadowMtx += mtx1;
|
||||
mtx0.fromQuat(mField_0x910);
|
||||
mtx2.transS(0.f, 40.f, 0.f);
|
||||
@@ -388,7 +388,7 @@ mVec3_c dAcOTumbleWeed_c::getPosition() const {
|
||||
mVec3_c vec;
|
||||
mtx.ZXYrotS(mRotation.x, mRotation.y, mRotation.z);
|
||||
PSMTXMultVecSR(mtx, mVec3_c::Ey, vec);
|
||||
return position + vec * 40.f;
|
||||
return mPosition + vec * 40.f;
|
||||
}
|
||||
|
||||
void float_ordering2() {
|
||||
|
||||
@@ -41,7 +41,7 @@ bool dAcOutajimaIsland_c::createHeap() {
|
||||
}
|
||||
|
||||
int dAcOutajimaIsland_c::actorCreate() {
|
||||
mInitialPos = position;
|
||||
mInitialPos = mPosition;
|
||||
mInitialRot = mRotation;
|
||||
|
||||
mRingLayer = getRingLayer();
|
||||
@@ -113,7 +113,7 @@ void dAcOutajimaIsland_c::executeState_Wait() {
|
||||
holdSound(SE_UtaLand_MoveC);
|
||||
}
|
||||
|
||||
if (mOldPosition == position) {
|
||||
if (mOldPosition == mPosition) {
|
||||
mPlaySound = false;
|
||||
if (mParam2 == 0 && !sPlatformsSettled) {
|
||||
startSound(SE_UtaLand_StopOK);
|
||||
@@ -136,6 +136,6 @@ void dAcOutajimaIsland_c::movePlatforms() {
|
||||
sLib::chaseAngle2(&field_0x5BE.x.mVal, field_0x5BC, field_0x5BE.y);
|
||||
|
||||
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();
|
||||
mPosition.z = mInitialPos.z + ((mRingLayer - 1) * 1400.0f + 2500.0f) * mRotation.y.cos();
|
||||
mPosition.x = mInitialPos.x + ((mRingLayer - 1) * 1400.0f + 2500.0f) * mRotation.y.sin();
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ int dTgAction_c::create() {
|
||||
mEnableFlag1 = (mParams >> 6) & 0xFF;
|
||||
mEnableFlag2 = (mParams >> 14) & 0xFF;
|
||||
mType = (mParams >> 0) & 0x3F;
|
||||
matrixCreateFromPosRotYScale(mActiveMtx, position, mRotation.y, mScale, nullptr, 0.f);
|
||||
matrixCreateFromPosRotYScale(mActiveMtx, mPosition, 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, mRotation.y, mScale, nullptr, mScaleIncrease);
|
||||
matrixCreateFromPosRotYScale(mActiveMtx, mPosition, mRotation.y, mScale, nullptr, mScaleIncrease);
|
||||
}
|
||||
}
|
||||
|
||||
void dTgAction_c::resetActiveArea() {
|
||||
if (mScaleIncrease > 0.f) {
|
||||
mScaleIncrease = 0.f;
|
||||
matrixCreateFromPosRotYScale(mActiveMtx, position, mRotation.y, mScale, nullptr, 0.f);
|
||||
matrixCreateFromPosRotYScale(mActiveMtx, mPosition, mRotation.y, mScale, nullptr, 0.f);
|
||||
field_0x134 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#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);
|
||||
@@ -23,7 +22,7 @@ int dTgColBombShield::create() {
|
||||
mScale.x += offset;
|
||||
mScale.y += offset;
|
||||
mScale.z += offset;
|
||||
mColMtx.transS(position.x, position.y + mScale.y * 0.5f - 0.05f, position.z);
|
||||
mColMtx.transS(mPosition.x, mPosition.y + mScale.y * 0.5f - 0.05f, mPosition.z);
|
||||
mColMtx.ZXYrotM(mRotation.x, mRotation.y, mRotation.z);
|
||||
mMtx_c tmp;
|
||||
PSMTXScale(tmp, mScale.x, mScale.y, mScale.z);
|
||||
|
||||
@@ -68,7 +68,7 @@ mVec3_c dTgFairy_c::calcLocation(const f32 &offset) {
|
||||
v.x = mScale.x * calcRnd(0.5f, offset);
|
||||
v.z = mScale.z * calcRnd(0.5f, offset);
|
||||
v.rotY(mRotation.y);
|
||||
return position + v;
|
||||
return mPosition + v;
|
||||
}
|
||||
|
||||
float dTgFairy_c::calcRnd(const f32 &a, const f32 &b) {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
SPECIAL_ACTOR_PROFILE(GATE2GND_TAG, dTgGateToGround_c, fProfile::GATE2GND_TAG, 0x22, 0, 0);
|
||||
|
||||
int dTgGateToGround_c::create() {
|
||||
matrixCreateFromPosRotYScale(matrix, position, mRotation.y, mScale, nullptr, 0.0f);
|
||||
matrixCreateFromPosRotYScale(matrix, mPosition, mRotation.y, mScale, nullptr, 0.0f);
|
||||
|
||||
delayFrames = 0;
|
||||
|
||||
@@ -47,7 +47,7 @@ int dTgGateToGround_c::actorExecute() {
|
||||
|
||||
player = dAcPy_c::LINK;
|
||||
|
||||
if (checkIfVec3fInMatrix(matrix, player->position)) {
|
||||
if (checkIfVec3fInMatrix(matrix, player->mPosition)) {
|
||||
if (player->getRidingActorType() != dAcPy_c::RIDING_LOFTWING) {
|
||||
if (delayFrames > 15) {
|
||||
Event e("CloudHole", 100, 0, nullptr, nullptr);
|
||||
|
||||
@@ -59,7 +59,7 @@ void dTgGekoTag::doExecute() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (dAcPy_c::LINK->getSquareDistanceTo(position) < mNoSpawnRadius * mNoSpawnRadius) {
|
||||
if (dAcPy_c::LINK->getSquareDistanceTo(mPosition) < mNoSpawnRadius * mNoSpawnRadius) {
|
||||
return;
|
||||
}
|
||||
field_0x1FD = 0xFF;
|
||||
@@ -76,7 +76,7 @@ void dTgGekoTag::doExecute() {
|
||||
if (mRefs[i].get() == nullptr) {
|
||||
if (mTimer2 == 0) {
|
||||
dAcObjBase_c *b =
|
||||
dAcObjBase_c::create(fProfile::E_GEKO, roomid, gekoParm, &position, &gekoRot, nullptr, 0xFFFFFFFF);
|
||||
dAcObjBase_c::create(fProfile::E_GEKO, roomid, gekoParm, &mPosition, &gekoRot, nullptr, 0xFFFFFFFF);
|
||||
|
||||
if (b != nullptr) {
|
||||
mRefs[i].link(static_cast<dAcEgeko_c *>(b));
|
||||
|
||||
@@ -9,7 +9,7 @@ SPECIAL_ACTOR_PROFILE(TAG_HEAT_RESIST, dTgHeatResist_c, fProfile::TAG_HEAT_RESIS
|
||||
int dTgHeatResist_c::create() {
|
||||
mInverted = static_cast<u8>(mParams & 0x3);
|
||||
|
||||
matrixCreateFromPosRotYScale(matrix, position, mRotation.y, mScale, nullptr, 0.0f);
|
||||
matrixCreateFromPosRotYScale(matrix, mPosition, mRotation.y, mScale, nullptr, 0.0f);
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ int dTgHeatResist_c::actorExecute() {
|
||||
dAcPy_c *player = dAcPy_c::LINK;
|
||||
|
||||
if (mInverted == 1) {
|
||||
if (!checkIfVec3fInMatrix(matrix, player->position)) {
|
||||
if (!checkIfVec3fInMatrix(matrix, player->mPosition)) {
|
||||
player->onForceOrPreventActionFlags(0x8000000);
|
||||
}
|
||||
} else {
|
||||
if (checkIfVec3fInMatrix(matrix, player->position)) {
|
||||
if (checkIfVec3fInMatrix(matrix, player->mPosition)) {
|
||||
player->onForceOrPreventActionFlags(0x8000000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include "d/a/d_a_player.h"
|
||||
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(TAG_HOLY_WATER, dTgHolyWater_c, fProfile::TAG_HOLY_WATER, 0x0224, 0, 4);
|
||||
|
||||
int dTgHolyWater_c::create() {
|
||||
@@ -31,7 +30,7 @@ int dTgHolyWater_c::draw() {
|
||||
}
|
||||
|
||||
bool dTgHolyWater_c::isLinkNearby() {
|
||||
mVec3_c diff = dAcPy_c::LINK->position - (position + mVec3_c::Ey * mScale.y * 0.5f);
|
||||
mVec3_c diff = dAcPy_c::LINK->mPosition - (mPosition + mVec3_c::Ey * mScale.y * 0.5f);
|
||||
diff.x /= mScale.x;
|
||||
diff.y /= mScale.y;
|
||||
diff.z /= mScale.z;
|
||||
|
||||
@@ -9,7 +9,7 @@ const f32 dTgNoEffectArea_c::sFloat2 = 100.0f;
|
||||
|
||||
int dTgNoEffectArea_c::create() {
|
||||
mScale *= 0.01f;
|
||||
PSMTXTrans(mMtx, position.x, position.y, position.z);
|
||||
PSMTXTrans(mMtx, mPosition.x, mPosition.y, mPosition.z);
|
||||
mMtx.YrotM(mRotation.y);
|
||||
PSMTXInverse(mMtx, mMtx);
|
||||
addToList(sList);
|
||||
|
||||
@@ -154,7 +154,7 @@ void dTgReaction_c::finalizeState_Wait() {}
|
||||
|
||||
void dTgReaction_c::checkForBonkItem() {
|
||||
if (dAcPy_c::LINK != nullptr && dAcPy_c::LINK->checkFlags0x350(0x2000)) {
|
||||
mVec3_c diff = position - dAcPy_c::LINK->position;
|
||||
mVec3_c diff = mPosition - dAcPy_c::LINK->mPosition;
|
||||
f32 dist = diff.x * diff.x + diff.z * diff.z;
|
||||
f32 rad = mScale.x * 100.0f;
|
||||
if (!(dist < rad * rad)) {
|
||||
@@ -164,7 +164,7 @@ void dTgReaction_c::checkForBonkItem() {
|
||||
if (getReactType() == REACT_4) {
|
||||
if (field_0x4DD == 0) {
|
||||
mVec3_c c = mVec3_c::Ez * rad;
|
||||
mVec3_c c2 = position;
|
||||
mVec3_c c2 = mPosition;
|
||||
c.rotY(mRotation.y);
|
||||
c2 += c;
|
||||
c2.y += field_0x4E4;
|
||||
@@ -177,7 +177,7 @@ void dTgReaction_c::checkForBonkItem() {
|
||||
}
|
||||
} else {
|
||||
u32 uVar3;
|
||||
mVec3_c pos = position;
|
||||
mVec3_c pos = mPosition;
|
||||
int p = getParam0x08();
|
||||
if (p == 0) {
|
||||
uVar3 = 6;
|
||||
@@ -205,11 +205,11 @@ void dTgReaction_c::checkForBonkItem() {
|
||||
void dTgReaction_c::checkForBubble() {
|
||||
if (mCollision.ChkTgHit() && mCollision.ChkTgAtHitType(AT_TYPE_BUBBLE)) {
|
||||
if (dAcPy_c::LINK != nullptr && dAcPy_c::LINK->checkFlags0x350(0x40)) {
|
||||
mVec3_c spawnPos = position;
|
||||
mVec3_c spawnPos = mPosition;
|
||||
dAcObjBase_c::create(fProfile::OBJ_BUBBLE, roomid, 0x4, &spawnPos, nullptr, nullptr, 0xFFFFFFFF);
|
||||
}
|
||||
}
|
||||
mCollision.SetC(position);
|
||||
mCollision.SetC(mPosition);
|
||||
dCcS::GetInstance()->Set(&mCollision);
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ void dTgReaction_c::checkForSlingBellowsItem() {
|
||||
uVar3 = 5;
|
||||
}
|
||||
}
|
||||
mVec3_c spawnPos = position;
|
||||
mVec3_c spawnPos = mPosition;
|
||||
spawnPos.y += field_0x4E4;
|
||||
if (fn_578_DB0(spawnPos, uVar3)) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_READ_RIDDLE_B);
|
||||
@@ -233,7 +233,7 @@ void dTgReaction_c::checkForSlingBellowsItem() {
|
||||
SceneflagManager::sInstance->setFlag(roomid, getSceneFlag());
|
||||
onDelete();
|
||||
}
|
||||
mCollision.SetC(position);
|
||||
mCollision.SetC(mPosition);
|
||||
dCcS::GetInstance()->Set(&mCollision);
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ bool dTgReaction_c::spawnHearts(s32 params, const mVec3_c &pos, s32 velocity_typ
|
||||
max = angle;
|
||||
min = SOME_ANG;
|
||||
} else {
|
||||
max = (s16)cLib::targetAngleY(dAcPy_c::LINK->position, pos) + 0x4000;
|
||||
max = (s16)cLib::targetAngleY(dAcPy_c::LINK->mPosition, pos) + 0x4000;
|
||||
min = -0x8000;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include "d/a/obj/d_a_obj_base.h"
|
||||
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(TAG_ROCK_BOAT, dTgRockBoat_c, fProfile::TAG_ROCK_BOAT, 0x173, 0, 3);
|
||||
|
||||
STATE_DEFINE(dTgRockBoat_c, Wait);
|
||||
@@ -29,7 +28,7 @@ int dTgRockBoat_c::draw() {
|
||||
void dTgRockBoat_c::initializeState_Wait() {}
|
||||
void dTgRockBoat_c::executeState_Wait() {
|
||||
if (cooldown > 0 && --cooldown == 0) {
|
||||
dAcObjBase_c::create(fProfile::OBJ_ROCK_BOAT, roomid, (boatNum << 0x1c) | 0xff, &position, 0, 0, -1);
|
||||
dAcObjBase_c::create(fProfile::OBJ_ROCK_BOAT, roomid, (boatNum << 0x1c) | 0xff, &mPosition, 0, 0, -1);
|
||||
cooldown = 0x259;
|
||||
if (++boatNum == 0xf) {
|
||||
boatNum = 0;
|
||||
|
||||
@@ -23,7 +23,7 @@ int dTgSndAr_c::create() {
|
||||
|
||||
switch (getTypeFromParams()) {
|
||||
case 0:
|
||||
PSMTXTrans(mtx.m, position.x, position.y, position.z);
|
||||
PSMTXTrans(mtx.m, mPosition.x, mPosition.y, mPosition.z);
|
||||
mtx.YrotM(mRotation.y);
|
||||
PSMTXInverse(mtx.m, mtx.m);
|
||||
break;
|
||||
@@ -36,7 +36,7 @@ int dTgSndAr_c::create() {
|
||||
break;
|
||||
}
|
||||
dAcBase_c *ac = static_cast<dAcBase_c *>(base);
|
||||
if (!ac->isActorPlayer() && checkPosInArea(ac->position)) {
|
||||
if (!ac->isActorPlayer() && checkPosInArea(ac->mPosition)) {
|
||||
ac->setTgSndAreaFlag(mParams & 0xFF);
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,7 @@ int dTgSndAr_c::doDelete() {
|
||||
|
||||
int dTgSndAr_c::actorExecute() {
|
||||
dAcBase_c *link = dAcPy_c::LINK;
|
||||
if (link != nullptr && checkPosInArea(link->position)) {
|
||||
if (link != nullptr && checkPosInArea(link->mPosition)) {
|
||||
link->setTgSndAreaFlag(mParams & 0xFF);
|
||||
}
|
||||
if (dSnd3DManager_c::GetInstance() != nullptr) {
|
||||
@@ -102,17 +102,17 @@ bool dTgSndAr_c::checkAlg0(const mVec3_c &pos) {
|
||||
bool dTgSndAr_c::checkAlg1(const mVec3_c &pos) {
|
||||
f32 tgtDist = mScale.x * 100.0f;
|
||||
f32 tgtDist2 = tgtDist * tgtDist;
|
||||
return PSVECSquareDistance(position, pos) < tgtDist2;
|
||||
return PSVECSquareDistance(mPosition, pos) < tgtDist2;
|
||||
}
|
||||
|
||||
// Cylinder
|
||||
bool dTgSndAr_c::checkAlg2(const mVec3_c &pos) {
|
||||
if (pos.y < position.y || pos.y > (position.y + 100.0f * mScale.y)) {
|
||||
if (pos.y < mPosition.y || pos.y > (mPosition.y + 100.0f * mScale.y)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
f32 radius = mScale.x * 100.0f;
|
||||
mVec3_c diff = pos - position;
|
||||
mVec3_c diff = pos - mPosition;
|
||||
|
||||
f32 dist = diff.x * diff.x + diff.z * diff.z;
|
||||
f32 r2 = radius * radius;
|
||||
|
||||
@@ -17,7 +17,7 @@ int dTgSwArea_c::create() {
|
||||
mRotation.x = 0;
|
||||
mRotation.z = 0;
|
||||
|
||||
matrixCreateFromPosRotYScale(area, position, mRotation.y, mScale, nullptr, 0.0f);
|
||||
matrixCreateFromPosRotYScale(area, mPosition, mRotation.y, mScale, nullptr, 0.0f);
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ bool isValidStoryFlag(u16 storyflag) {
|
||||
}
|
||||
|
||||
int dTgSwArea_c::actorExecute() {
|
||||
if (checkIfVec3fInMatrix(area, dAcPy_c::LINK->position)) {
|
||||
if (checkIfVec3fInMatrix(area, dAcPy_c::LINK->mPosition)) {
|
||||
SceneflagManager::sInstance->setFlag(roomid, setSceneflag);
|
||||
SceneflagManager::sInstance->unsetFlag(roomid, unsetSceneflag);
|
||||
|
||||
@@ -46,12 +46,12 @@ int dTgSwArea_c::actorExecute() {
|
||||
|
||||
if (scale < 1.0f) {
|
||||
scale = 50.0f;
|
||||
matrixCreateFromPosRotYScale(area, position, mRotation.y, mScale, nullptr, scale);
|
||||
matrixCreateFromPosRotYScale(area, mPosition, mRotation.y, mScale, nullptr, scale);
|
||||
}
|
||||
} else {
|
||||
if (scale > 1.0f) {
|
||||
scale = 0.0f;
|
||||
matrixCreateFromPosRotYScale(area, position, mRotation.y, mScale, nullptr, scale);
|
||||
matrixCreateFromPosRotYScale(area, mPosition, mRotation.y, mScale, nullptr, scale);
|
||||
}
|
||||
|
||||
if (isTemporary) {
|
||||
|
||||
@@ -16,7 +16,7 @@ int dTgTimeAreaCheck_c::doDelete() {
|
||||
}
|
||||
|
||||
int dTgTimeAreaCheck_c::actorExecute() {
|
||||
f32 result = dTimeAreaMgr_c::GetInstance()->checkPositionIsInPastState(roomid, position, nullptr, 10.0f);
|
||||
f32 result = dTimeAreaMgr_c::GetInstance()->checkPositionIsInPastState(roomid, mPosition, nullptr, 10.0f);
|
||||
if (result > 0.0f) {
|
||||
if (mPastSceneFlag < 0xFF && !SceneflagManager::sInstance->checkBoolFlag(roomid, mPastSceneFlag)) {
|
||||
SceneflagManager::sInstance->setFlag(roomid, mPastSceneFlag);
|
||||
|
||||
@@ -3,11 +3,10 @@
|
||||
#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, mRotation.y, mScale, nullptr, 0.0f);
|
||||
matrixCreateFromPosRotYScale(matrix, mPosition, mRotation.y, mScale, nullptr, 0.0f);
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
@@ -28,5 +27,5 @@ bool dTgTimeDoorBeam_c::checkPlayerPosInMtx() {
|
||||
return false;
|
||||
}
|
||||
|
||||
return checkIfVec3fInMatrix(matrix, dAcPy_c::LINK->position);
|
||||
return checkIfVec3fInMatrix(matrix, dAcPy_c::LINK->mPosition);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ int dTgTouchTag::create() {
|
||||
mActivatorIndex = !(getActivatorIndex() == 0xF) ? getActivatorIndex() : 0;
|
||||
mZoneFlag = getZoneFlag();
|
||||
mChkFlag = getChkFlag();
|
||||
matrixCreateFromPosRotYScale(mAreaOfEffect, position, mRotation.y, mScale, nullptr, 0.0f);
|
||||
matrixCreateFromPosRotYScale(mAreaOfEffect, mPosition, mRotation.y, mScale, nullptr, 0.0f);
|
||||
mStateMgr.changeState(StateID_Wait);
|
||||
return SUCCEEDED;
|
||||
}
|
||||
@@ -48,7 +48,7 @@ void dTgTouchTag::executeState_Wait() {
|
||||
dAcBase_c *actor = static_cast<dAcBase_c *>(fManager_c::searchBaseByProfName(ACTIVATORS[mActivatorIndex], nullptr));
|
||||
|
||||
while (actor != nullptr) {
|
||||
if (actor->roomid == roomid && checkIfVec3fInMatrix(mAreaOfEffect, actor->position)) {
|
||||
if (actor->roomid == roomid && checkIfVec3fInMatrix(mAreaOfEffect, actor->mPosition)) {
|
||||
mFlagTimer = 5;
|
||||
if (mZoneFlag != 0xFF) {
|
||||
SceneflagManager::sInstance->setFlag(roomid, mZoneFlag);
|
||||
|
||||
+17
-17
@@ -49,7 +49,7 @@ dAcBase_c::dAcBase_c()
|
||||
: heap_allocator(),
|
||||
mpActorInfo(s_Create_ActorInfo),
|
||||
sound_list(),
|
||||
obj_pos(&position),
|
||||
obj_pos(&mPosition),
|
||||
params2(s_Create_Params2),
|
||||
obj_id(s_Create_UnkFlags),
|
||||
viewclip_index(s_Create_ViewClipIdx),
|
||||
@@ -178,7 +178,7 @@ int dAcBase_c::create() {
|
||||
// 8002c8f0
|
||||
void dAcBase_c::postCreate(fBase_c::MAIN_STATE_e state) {
|
||||
if (state == SUCCESS) {
|
||||
pos_copy = position;
|
||||
pos_copy = mPosition;
|
||||
rot_copy = mRotation;
|
||||
room_id_copy = roomid;
|
||||
}
|
||||
@@ -302,7 +302,7 @@ bool dAcBase_c::restorePosRotFromCopy() {
|
||||
if (roomid != room_id_copy) {
|
||||
return 0;
|
||||
}
|
||||
position = pos_copy;
|
||||
mPosition = pos_copy;
|
||||
mRotation = rot_copy;
|
||||
return 1;
|
||||
}
|
||||
@@ -314,7 +314,7 @@ u32 dAcBase_c::itemDroppingAndGivingRelated(mVec3_c *spawnPos, int subtype) {
|
||||
}
|
||||
|
||||
if (spawnPos == nullptr) {
|
||||
spawnPos = &position;
|
||||
spawnPos = &mPosition;
|
||||
}
|
||||
|
||||
u32 param2Copy = params2;
|
||||
@@ -410,7 +410,7 @@ void dAcBase_c::forEveryActor(void *func(dAcBase_c *, dAcBase_c *), dAcBase_c *p
|
||||
|
||||
// 8002d190
|
||||
mAng dAcBase_c::getXZAngleToPlayer() {
|
||||
return cLib::targetAngleY(this->position, dAcPy_c::LINK->position);
|
||||
return cLib::targetAngleY(this->mPosition, dAcPy_c::LINK->mPosition);
|
||||
}
|
||||
|
||||
// 8002d1d0
|
||||
@@ -419,7 +419,7 @@ bool dAcBase_c::getDistanceToActor(dAcBase_c *actor, f32 distThresh, f32 *outDis
|
||||
bool isWithinThreshhold = false;
|
||||
|
||||
if (actor != nullptr) {
|
||||
distSquared = PSVECSquareDistance(position, actor->position);
|
||||
distSquared = PSVECSquareDistance(mPosition, actor->mPosition);
|
||||
|
||||
if (distSquared <= distThresh * distThresh) {
|
||||
isWithinThreshhold = true;
|
||||
@@ -443,9 +443,9 @@ bool dAcBase_c::getDistanceAndAngleToActor(
|
||||
mAng angleToActorY(0), angleToActorX(0);
|
||||
|
||||
if (actor != nullptr) {
|
||||
distSquared = PSVECSquareDistance(position, actor->position);
|
||||
angleToActorY.set(cLib::targetAngleY(position, actor->position));
|
||||
angleToActorX.set(cLib::targetAngleX(position, actor->position));
|
||||
distSquared = PSVECSquareDistance(mPosition, actor->mPosition);
|
||||
angleToActorY.set(cLib::targetAngleY(mPosition, actor->mPosition));
|
||||
angleToActorX.set(cLib::targetAngleX(mPosition, actor->mPosition));
|
||||
|
||||
if ((distSquared <= distThresh * distThresh)) {
|
||||
if (mAng::abs((s32)(mRotation.y - angleToActorY)) <= yAngle &&
|
||||
@@ -472,7 +472,7 @@ bool dAcBase_c::getDistanceAndAngleToActor(
|
||||
|
||||
// 8002d3e0
|
||||
bool dAcBase_c::isWithinPlayerRadius(f32 radius) const {
|
||||
f32 dist_diff = getSquareDistanceTo(dAcPy_c::LINK->position);
|
||||
f32 dist_diff = getSquareDistanceTo(dAcPy_c::LINK->mPosition);
|
||||
return dist_diff < radius * radius;
|
||||
}
|
||||
|
||||
@@ -485,19 +485,19 @@ bool dAcBase_c::getDistanceAndAngleToPlayer(
|
||||
|
||||
// 8002d470
|
||||
f32 dAcBase_c::getDistToPlayer() {
|
||||
return EGG::Math<f32>::sqrt(PSVECSquareDistance(position, dAcPy_c::LINK->position));
|
||||
return EGG::Math<f32>::sqrt(PSVECSquareDistance(mPosition, dAcPy_c::LINK->mPosition));
|
||||
}
|
||||
|
||||
// 8002d4a0
|
||||
f32 dAcBase_c::getSquareDistToPlayer() {
|
||||
return PSVECSquareDistance(position, dAcPy_c::LINK->position);
|
||||
return PSVECSquareDistance(mPosition, dAcPy_c::LINK->mPosition);
|
||||
}
|
||||
|
||||
// Some weirdness with the float registers being used
|
||||
// 8002d4b0
|
||||
void dAcBase_c::updateRoomId(f32 yOffset) {
|
||||
if (getConnectParent()->profile_name != fProfile::ROOM) {
|
||||
mVec3_c actorPos(position.x, position.y + yOffset, position.z);
|
||||
mVec3_c actorPos(mPosition.x, mPosition.y + yOffset, mPosition.z);
|
||||
|
||||
if (dBgS_ObjGndChk::CheckPos(actorPos)) {
|
||||
roomid = dBgS_ObjGndChk::GetRoomID();
|
||||
@@ -547,7 +547,7 @@ bool dAcBase_c::startBgHitSound(u32 soundId, const cBgS_PolyInfo &info, const mV
|
||||
}
|
||||
return mpSoundSource->startBgHitSound(
|
||||
soundId, dBgS::GetInstance()->GetPolyAtt0(info), dBgS::GetInstance()->GetPolyAtt1(info),
|
||||
position != nullptr ? position : &this->position
|
||||
position != nullptr ? position : &this->mPosition
|
||||
);
|
||||
}
|
||||
|
||||
@@ -555,7 +555,7 @@ bool dAcBase_c::startSoundAtPosition(u32 soundId, const mVec3_c *position) {
|
||||
if (mpSoundSource == nullptr) {
|
||||
return false;
|
||||
}
|
||||
return mpSoundSource->startSoundAtPosition(soundId, position != nullptr ? position : &this->position);
|
||||
return mpSoundSource->startSoundAtPosition(soundId, position != nullptr ? position : &this->mPosition);
|
||||
}
|
||||
|
||||
bool dAcBase_c::holdSound(u32 soundId) {
|
||||
@@ -661,7 +661,7 @@ dAcBase_c *dAcBase_c::createActor(
|
||||
u32 actorParams2, s32 actorRoomid, dBase_c *actorRef
|
||||
) {
|
||||
if (actorPosition == nullptr) {
|
||||
actorPosition = &position;
|
||||
actorPosition = &mPosition;
|
||||
}
|
||||
|
||||
if (actorRotation == nullptr) {
|
||||
@@ -692,7 +692,7 @@ dAcBase_c *dAcBase_c::createActorStage(
|
||||
u32 actorParams2, s32 actorRoomid, dBase_c *actorRef
|
||||
) {
|
||||
if (actorPosition == nullptr) {
|
||||
actorPosition = &position;
|
||||
actorPosition = &mPosition;
|
||||
}
|
||||
|
||||
if (actorRotation == nullptr) {
|
||||
|
||||
@@ -22,7 +22,7 @@ int dAcBirdBase_c::draw() {
|
||||
}
|
||||
|
||||
void dAcBirdBase_c::updateMatrixBird() {
|
||||
mWorldMtx.transS(position);
|
||||
mWorldMtx.transS(mPosition);
|
||||
mWorldMtx.concat(field_0xF80);
|
||||
mWorldMtx.ZrotM(mRotation.z);
|
||||
mWorldMtx.scaleM(field_0xF50.x, field_0xF50.y, field_0xF50.z);
|
||||
@@ -83,7 +83,7 @@ void dAcBirdBase_c::executeBirdAction() {
|
||||
|
||||
bool dAcBirdBase_c::chkWallGndRoofHit() {
|
||||
mVec3_c tmp;
|
||||
tmp.set(position); // unused
|
||||
tmp.set(mPosition); // unused
|
||||
|
||||
if (--mChkWallGndRoofTimer <= 0) {
|
||||
mChkWallGndRoofTimer = cM::rndInt(10) + 20;
|
||||
@@ -99,8 +99,8 @@ bool dAcBirdBase_c::chkWallGndRoofHit() {
|
||||
void dAcBirdBase_c::handleWallGndRoofHit() {
|
||||
dBgS_ObjLinChk linChk;
|
||||
mVec3_c start, end;
|
||||
start.set(position);
|
||||
end.set(position);
|
||||
start.set(mPosition);
|
||||
end.set(mPosition);
|
||||
|
||||
mVec3_c v1;
|
||||
mMtx_c m1;
|
||||
@@ -108,7 +108,7 @@ void dAcBirdBase_c::handleWallGndRoofHit() {
|
||||
|
||||
mAng rot1 = field_0xF5C.atan2sX_Z();
|
||||
if (mObjAcch2.ChkGndHit()) {
|
||||
end.set(position);
|
||||
end.set(mPosition);
|
||||
v1.set(0.0f, 0.0f, 10000.0f);
|
||||
m1.YrotS(rot1);
|
||||
m1.XrotM(-0x4000);
|
||||
@@ -121,7 +121,7 @@ void dAcBirdBase_c::handleWallGndRoofHit() {
|
||||
return;
|
||||
}
|
||||
|
||||
end.set(position);
|
||||
end.set(mPosition);
|
||||
v1.set(0.0f, 0.0f, 10000.0f);
|
||||
m1.YrotS(rot1);
|
||||
m1.XrotM(0x4000);
|
||||
@@ -145,7 +145,7 @@ void dAcBirdBase_c::handleWallGndRoofHit() {
|
||||
return;
|
||||
}
|
||||
|
||||
end.set(position);
|
||||
end.set(mPosition);
|
||||
v1.set(0.0f, 0.0f, 10000.0f);
|
||||
v1.rotY(rot1 - mAng(0x4000));
|
||||
end += v1;
|
||||
@@ -156,7 +156,7 @@ void dAcBirdBase_c::handleWallGndRoofHit() {
|
||||
return;
|
||||
}
|
||||
|
||||
end.set(position);
|
||||
end.set(mPosition);
|
||||
v1.set(0.0f, 0.0f, 10000.0f);
|
||||
m2.YrotS(rot1);
|
||||
m2.XrotM(0xC000);
|
||||
@@ -169,7 +169,7 @@ void dAcBirdBase_c::handleWallGndRoofHit() {
|
||||
return;
|
||||
}
|
||||
|
||||
end.set(position);
|
||||
end.set(mPosition);
|
||||
v1.set(0.0f, 0.0f, 10000.0f);
|
||||
m2.YrotS(rot1);
|
||||
m2.XrotM(0x4000);
|
||||
|
||||
+12
-12
@@ -18,7 +18,7 @@
|
||||
#include "toBeSorted/d_emitter.h"
|
||||
|
||||
void dAcOInsect_c::kill() {
|
||||
dJEffManager_c::spawnEffect(PARTICLE_RESOURCE_ID_MAPPING_394_, position, nullptr, nullptr, nullptr, nullptr, 0, 0);
|
||||
dJEffManager_c::spawnEffect(PARTICLE_RESOURCE_ID_MAPPING_394_, mPosition, nullptr, nullptr, nullptr, nullptr, 0, 0);
|
||||
startSound(SE_Insect_DISAPPEAR);
|
||||
deleteRequest();
|
||||
}
|
||||
@@ -26,12 +26,12 @@ void dAcOInsect_c::kill() {
|
||||
bool dAcOInsect_c::checkForLinkScare() {
|
||||
if (dAcPy_c::LINK != nullptr) {
|
||||
if (dAcPy_c::LINK->getCurrentAction() == 12 /* Rolling */) { // TODO (Player Action Enum)
|
||||
if (dAcPy_c::LINK->getDistanceTo(position) < 50.f) {
|
||||
if (dAcPy_c::LINK->getDistanceTo(mPosition) < 50.f) {
|
||||
mLinkNearby = 1;
|
||||
return true;
|
||||
}
|
||||
} else if (dAcPy_c::LINK->forwardSpeed > 1.f) {
|
||||
if (dAcPy_c::LINK->getDistanceTo(position) < 30.f) {
|
||||
if (dAcPy_c::LINK->getDistanceTo(mPosition) < 30.f) {
|
||||
mLinkNearby = 1;
|
||||
return true;
|
||||
}
|
||||
@@ -42,13 +42,13 @@ bool dAcOInsect_c::checkForLinkScare() {
|
||||
}
|
||||
|
||||
void dAcOInsect_c::checkDeath(dBgS_Acch &acch) {
|
||||
if (acch.ChkWaterHit() && acch.mWtr.GetGroundH() >= position.y) {
|
||||
if (acch.ChkWaterHit() && acch.mWtr.GetGroundH() >= mPosition.y) {
|
||||
kill();
|
||||
}
|
||||
if (acch.ChkGroundLanding() && dBgS::GetInstance()->GetSpecialCode(acch.mGnd) == POLY_ATTR_LAVA) {
|
||||
kill();
|
||||
}
|
||||
if (position.y < pos_copy.y - 5000.f) {
|
||||
if (mPosition.y < pos_copy.y - 5000.f) {
|
||||
deleteRequest();
|
||||
}
|
||||
}
|
||||
@@ -83,7 +83,7 @@ bool dAcOInsect_c::checkPlayerRadius(f32 rad) {
|
||||
}
|
||||
|
||||
bool dAcOInsect_c::checkPlayerElevationDiff(f32 dist) {
|
||||
if (dAcPy_c::LINK != nullptr && fabsf(dAcPy_c::LINK->position.y - position.y) > dist) {
|
||||
if (dAcPy_c::LINK != nullptr && fabsf(dAcPy_c::LINK->mPosition.y - mPosition.y) > dist) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -139,7 +139,7 @@ void dAcOInsect_c::addAttentionTarget() {
|
||||
}
|
||||
|
||||
void dAcOInsect_c::preAttention() {
|
||||
poscopy2 = position;
|
||||
poscopy2 = mPosition;
|
||||
poscopy2.y += 20.f;
|
||||
poscopy3 = poscopy2;
|
||||
}
|
||||
@@ -156,7 +156,7 @@ bool dAcOInsect_c::isLinkCloseAndFlag() {
|
||||
dAcPy_c *link = dAcPy_c::LINK;
|
||||
if (link != nullptr && link->checkFlags0x350(0x2000)) {
|
||||
f32 d = dAcOInsect_0x94();
|
||||
return getSquareDistanceTo(link->position) < d;
|
||||
return getSquareDistanceTo(link->mPosition) < d;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -207,7 +207,7 @@ bool dAcOInsect_c::fn_8018FAD0() {
|
||||
} else {
|
||||
f32 clampSpeed = speed < 5.0f ? forwardSpeed > 0.f ? forwardSpeed : -5.f : 5.f;
|
||||
|
||||
mVec3_c pos0 = position + field_0x360;
|
||||
mVec3_c pos0 = mPosition + field_0x360;
|
||||
mVec3_c pos1 = pos0 + field_0x36C * forwardSpeed;
|
||||
int linType = fn_801900B0(pos0, pos1);
|
||||
field_0x410[0] = pos0;
|
||||
@@ -236,7 +236,7 @@ int dAcOInsect_c::fn_801900B0(const mVec3_c &point0, const mVec3_c &point1) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
position = dBgS_ObjLinChk::GetInstance().GetLinEnd();
|
||||
mPosition = dBgS_ObjLinChk::GetInstance().GetLinEnd();
|
||||
mPlane_0x3A8 = pla;
|
||||
field_0x3BC = 1;
|
||||
fn_8018FDF0(pla.GetN());
|
||||
@@ -261,7 +261,7 @@ bool dAcOInsect_c::fn_80190180(mAng &outAng) {
|
||||
angs[3] = 0xE000;
|
||||
|
||||
if (field_0x3BF != 0) {
|
||||
f32 len = fabsf(field_0x33C.y + field_0x35C * 0.5f - position.y);
|
||||
f32 len = fabsf(field_0x33C.y + field_0x35C * 0.5f - mPosition.y);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
// mVec3_c tmp2 = field_0x3C0.multVec(vecs[i] * 20.0f);
|
||||
f32 len2 = fabsf(field_0x33C.y + field_0x35C * 0.5f - field_0x3C0.multVec(vecs[i] * 20.0f).y);
|
||||
@@ -271,7 +271,7 @@ bool dAcOInsect_c::fn_80190180(mAng &outAng) {
|
||||
}
|
||||
}
|
||||
} else if (field_0x3BE != 0) {
|
||||
mVec3_c dir = field_0x33C - position;
|
||||
mVec3_c dir = field_0x33C - mPosition;
|
||||
f32 len = dir.squareMagXZ();
|
||||
for (int i = 0; i < 4; i++) {
|
||||
// mVec3_c tmp2 = field_0x3C0.multVec(vecs[i] * 20.0f);
|
||||
|
||||
+10
-10
@@ -51,8 +51,8 @@ void dSalvageIfObj_c::doDemoThrow() {
|
||||
int dAcSalbageObj_c::actorExecute() {
|
||||
executeInternal();
|
||||
calcVelocity();
|
||||
position += velocity;
|
||||
position += mStts.GetCcMove();
|
||||
mPosition += velocity;
|
||||
mPosition += mStts.GetCcMove();
|
||||
if (isInStateWait()) {
|
||||
updateCc();
|
||||
}
|
||||
@@ -248,7 +248,7 @@ bool dAcSalbageObj_c::shouldBeActiveDowsingTarget() const {
|
||||
}
|
||||
|
||||
void dAcSalbageObj_c::updateCc() {
|
||||
mCcCyl.SetC(position);
|
||||
mCcCyl.SetC(mPosition);
|
||||
mCcCyl.SetR(getCcRadius());
|
||||
mCcCyl.SetH(getCcHeight());
|
||||
dCcS::GetInstance()->Set(&mCcCyl);
|
||||
@@ -262,13 +262,13 @@ void dAcSalbageObj_c::updateBgAcchCir() {
|
||||
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.transS(mPosition.x, mPosition.y, mPosition.z);
|
||||
ret.ZXYrotM(mRotation);
|
||||
} else {
|
||||
ret = npc->getCarriedObjMtx();
|
||||
mMtx_c rotMtx = dSalvageMgr_c::sInstance->getCarryRotMtx2(mSalvageIf.getSalvageObjId());
|
||||
MTXConcat(ret, rotMtx, ret);
|
||||
ret.getTranslation(position);
|
||||
ret.getTranslation(mPosition);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ mMtx_c dAcSalbageObj_c::calcWorldMtx() {
|
||||
if (mSalvageIf.isCarried()) {
|
||||
calcMtxFromSalbageNpc(ret);
|
||||
} else {
|
||||
ret.transS(position);
|
||||
ret.transS(mPosition);
|
||||
ret.ZXYrotM(mRotation);
|
||||
}
|
||||
|
||||
@@ -301,9 +301,9 @@ void dAcSalbageObj_c::updateMdl() {
|
||||
}
|
||||
|
||||
f32 scale = mScale.x;
|
||||
poscopy3 = position;
|
||||
poscopy3 = mPosition;
|
||||
poscopy3.y += getPoscopy3YOffset() * scale;
|
||||
poscopy2 = position;
|
||||
poscopy2 = mPosition;
|
||||
poscopy2.y += getPoscopy2YOffset() * scale;
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ void dAcSalbageObj_c::initializeState_Wait() {
|
||||
void dAcSalbageObj_c::executeState_Wait() {
|
||||
if (dSalvageMgr_c::sInstance->getCurrentSalvageObjId() != mSalvageIf.getSalvageObjId()) {
|
||||
if (!dSalvageMgr_c::sInstance->mSlbRef.isLinked()) {
|
||||
mVec3_c pos(position.x, position.y + 100000.0f, position.z);
|
||||
mVec3_c pos(mPosition.x, mPosition.y + 100000.0f, mPosition.z);
|
||||
dAcObjBase_c::create(fProfile::NPC_SLB, roomid, 0xFFFFFD01, &pos, nullptr, nullptr, -1);
|
||||
}
|
||||
|
||||
@@ -359,7 +359,7 @@ void dAcSalbageObj_c::initializeState_DemoThrow() {
|
||||
mWorldSRMtx.m[1][3] = 0.0f;
|
||||
mWorldSRMtx.m[2][3] = 0.0f;
|
||||
|
||||
mWorldMtx.getTranslation(position);
|
||||
mWorldMtx.getTranslation(mPosition);
|
||||
field_0x938 = 0.0f;
|
||||
|
||||
mVec3_c result;
|
||||
|
||||
@@ -82,7 +82,7 @@ void dAcBoomerang_c::atHitCallback(cCcD_Obj *i_objInfA, dAcObjBase_c *i_actorB,
|
||||
}
|
||||
|
||||
if (!i_objInfB->ChkTgBonk()) {
|
||||
field_0x8D8 = position - i_actorB->position;
|
||||
field_0x8D8 = mPosition - i_actorB->mPosition;
|
||||
field_0x8D8.y = 0.f;
|
||||
|
||||
if (cM::isZero(field_0x8D8.normalize())) {
|
||||
@@ -275,7 +275,7 @@ void dAcBoomerang_c::placeOnArm() {
|
||||
mWorldMtx += m;
|
||||
mWorldMtx.ZYXrotM(mAng::fromDeg(90.f), 0, mAng::fromDeg(90.f));
|
||||
mMdl.setLocalMtx(mWorldMtx);
|
||||
mWorldMtx.getTranslation(position);
|
||||
mWorldMtx.getTranslation(mPosition);
|
||||
mWorldMtx.getTranslation(mOldPosition);
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ void dAcBoomerang_c::initializeState_Move() {
|
||||
mRotation.z.set(0);
|
||||
field_0x8B2 = 0;
|
||||
|
||||
mOldPosition = position;
|
||||
mOldPosition = mPosition;
|
||||
mOldPosition.y += 60.f;
|
||||
|
||||
field_0x8BC = dPad::ex_c::m_current_ex->mMPLS.getVerticalAngle();
|
||||
@@ -571,7 +571,7 @@ int dAcBoomerang_c::draw() {
|
||||
if (!mStateMgr.isState(StateID_Wait)) {
|
||||
mProc.entry();
|
||||
static mQuat_c shadow(mVec3_c::Zero, 50.f);
|
||||
drawShadow(mShadow, nullptr, mWorldMtx, &shadow, -1, -1, -1, -1, -1, position.y - mAcch.GetGroundH());
|
||||
drawShadow(mShadow, nullptr, mWorldMtx, &shadow, -1, -1, -1, -1, -1, mPosition.y - mAcch.GetGroundH());
|
||||
}
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ int dAcObjFairy_c::draw() {
|
||||
if (!isCuring()) {
|
||||
static mQuat_c rot(0.0f, 0.0f, 0.0f, 10.0f);
|
||||
f32 f = field_0x4B0;
|
||||
drawShadow(mShadow, nullptr, mWorldMtx, &rot, -1, -1, -1, -1, -1, position.y - f);
|
||||
drawShadow(mShadow, nullptr, mWorldMtx, &rot, -1, -1, -1, -1, -1, mPosition.y - f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ void dAcObjFairy_c::finalizeState_CatchDemo() {
|
||||
bool dAcObjFairy_c::shouldAvoidLink() const {
|
||||
// TODO shuffles
|
||||
if (dAcPy_c::LINK->isUsingBugnet()) {
|
||||
mVec3_c dist = dAcPy_c::LINK->getBugNetPos() - position;
|
||||
mVec3_c dist = dAcPy_c::LINK->getBugNetPos() - mPosition;
|
||||
bool isClose = false;
|
||||
if (dist.mag() < 100.0f && velocity.dot(dist) > 0.0f) {
|
||||
isClose = true;
|
||||
|
||||
@@ -114,7 +114,7 @@ int dAcOsw_c::actorCreate() {
|
||||
|
||||
int dAcOsw_c::actorPostCreate() {
|
||||
if (mCanBeSeen) {
|
||||
field_0x5A0.check(roomid, position, 0, 30.0f, 0.1f);
|
||||
field_0x5A0.check(roomid, mPosition, 0, 30.0f, 0.1f);
|
||||
if (field_0x5A0.field_0x00 <= 0.0f) {
|
||||
mHidden = true;
|
||||
mScale.set(0.0f, 0.0f, 0.0f);
|
||||
@@ -127,8 +127,8 @@ int dAcOsw_c::actorPostCreate() {
|
||||
dAcBase_c *parent = nullptr;
|
||||
do {
|
||||
parent = static_cast<dAcBase_c *>(fManager_c::searchBaseByProfName(fProfile::OBJ_VSD, parent));
|
||||
if (parent != nullptr && nw4r::math::FAbs(parent->position.y - position.y) < 30.0f) {
|
||||
if (getSquareDistanceTo(parent->position) < 900.0f) {
|
||||
if (parent != nullptr && nw4r::math::FAbs(parent->mPosition.y - mPosition.y) < 30.0f) {
|
||||
if (getSquareDistanceTo(parent->mPosition) < 900.0f) {
|
||||
mObjRef.link(static_cast<dAcOScatterSand_tmp *>(parent));
|
||||
break;
|
||||
}
|
||||
@@ -153,12 +153,12 @@ int dAcOsw_c::doDelete() {
|
||||
int dAcOsw_c::actorExecute() {
|
||||
mStateMgr.executeState();
|
||||
if (mCanBeSeen) {
|
||||
field_0x5A0.check(roomid, position, 0, 30.0f, 0.1f);
|
||||
field_0x5A0.check(roomid, mPosition, 0, 30.0f, 0.1f);
|
||||
if (field_0x5A0.field_0x00 <= 0.0f) {
|
||||
if (mScale.x >= 1.0f) {
|
||||
if (!mHidden) {
|
||||
dJEffManager_c::spawnEffect(
|
||||
PARTICLE_RESOURCE_ID_MAPPING_754_, position, &mRotation, nullptr, nullptr, nullptr, 0, 0
|
||||
PARTICLE_RESOURCE_ID_MAPPING_754_, mPosition, &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, &mRotation, nullptr, nullptr, nullptr, 0, 0
|
||||
PARTICLE_RESOURCE_ID_MAPPING_754_, mPosition, &mRotation, nullptr, nullptr, nullptr, 0, 0
|
||||
);
|
||||
startSound(SE_TIMESLIP_TIMESLIP);
|
||||
mShown = true;
|
||||
|
||||
@@ -1152,7 +1152,7 @@ int dAcTbox_c::create() {
|
||||
mLightInfo.mClr.b = 0;
|
||||
|
||||
mLightInfo.SetScale(0.f);
|
||||
mLightInfo.SetPosition(position);
|
||||
mLightInfo.SetPosition(mPosition);
|
||||
mLightInfo.mPos.y += 100.0f;
|
||||
|
||||
return SUCCEEDED;
|
||||
@@ -1218,7 +1218,7 @@ int dAcTbox_c::actorExecute() {
|
||||
v1 *= field_0x11E8;
|
||||
v2 *= field_0x11E8;
|
||||
mCcD3.Set(v1, v2);
|
||||
mCcD3.Set(position, mRotation.y);
|
||||
mCcD3.Set(mPosition, 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, mRotation.y);
|
||||
mCcD1.Set(mPosition, mRotation.y);
|
||||
if (field_0x120C == 1) {
|
||||
mCcD2.OnTgSet();
|
||||
switch ((u32)mVariant) {
|
||||
@@ -1366,7 +1366,7 @@ int dAcTbox_c::actorExecuteInEvent() {
|
||||
fn_8026DAC0(a1);
|
||||
dAcPy_c *link = dAcPy_c::LINK;
|
||||
if (field_0x120B < 3) {
|
||||
mVec3_c pos = link->position;
|
||||
mVec3_c pos = link->mPosition;
|
||||
f32 f9 = cLib::addCalcPosXZ(&pos, v1, 0.25, 200.0f, 0.1f);
|
||||
s16 rot2 = link->mRotation.y;
|
||||
s16 d = sLib::addCalcAngle(&rot2, a1, 2, 0x3FFF, 1);
|
||||
@@ -1404,7 +1404,7 @@ int dAcTbox_c::actorExecuteInEvent() {
|
||||
v1 *= field_0x11E8;
|
||||
v2 *= field_0x11E8;
|
||||
mCcD3.Set(v1, v2);
|
||||
mCcD3.Set(position, mRotation.y);
|
||||
mCcD3.Set(mPosition, 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, mRotation.y);
|
||||
mCcD1.Set(mPosition, mRotation.y);
|
||||
if (field_0x120C == 1) {
|
||||
mCcD2.OnTgSet();
|
||||
switch ((u32)mVariant) {
|
||||
@@ -1599,9 +1599,9 @@ int dAcTbox_c::fn_8026B370() const {
|
||||
|
||||
void dAcTbox_c::fn_8026B380(mVec3_c &out) const {
|
||||
if (mVariant == BOSS) {
|
||||
out.x = position.x;
|
||||
out.y = position.y;
|
||||
out.z = position.z;
|
||||
out.x = mPosition.x;
|
||||
out.y = mPosition.y;
|
||||
out.z = mPosition.z;
|
||||
} else {
|
||||
fn_8026DAD0(&sVec1, &out);
|
||||
}
|
||||
@@ -2369,14 +2369,14 @@ void dAcTbox_c::unregisterDowsing() {
|
||||
|
||||
void dAcTbox_c::spawnAppearEffect() {
|
||||
dJEffManager_c::spawnEffect(
|
||||
PARTICLE_RESOURCE_ID_MAPPING_208_, position, &mRotation, nullptr, nullptr, nullptr, 0, 0
|
||||
PARTICLE_RESOURCE_ID_MAPPING_208_, mPosition, &mRotation, nullptr, nullptr, nullptr, 0, 0
|
||||
);
|
||||
}
|
||||
|
||||
bool dAcTbox_c::checkIsClear() const {
|
||||
f32 fs[] = {
|
||||
position.y,
|
||||
position.y,
|
||||
mPosition.y,
|
||||
mPosition.y,
|
||||
};
|
||||
fs[0] += 20.0f;
|
||||
fs[1] += 60.0f;
|
||||
@@ -2631,7 +2631,7 @@ bool dAcTbox_c::checkForLinkBonk() {
|
||||
}
|
||||
|
||||
mVec3_c linkPos;
|
||||
PSMTXMultVec(mCcD3.mInvMtx, link->position, linkPos);
|
||||
PSMTXMultVec(mCcD3.mInvMtx, link->mPosition, linkPos);
|
||||
mVec3_c ccLo, ccHi;
|
||||
getCCBounds(&ccLo, &ccHi);
|
||||
// Math performed in local coordinate space
|
||||
@@ -2669,7 +2669,7 @@ bool dAcTbox_c::checkForLinkBonk() {
|
||||
|
||||
void dAcTbox_c::fn_8026E630() {
|
||||
mVec3_c offset = mVec3_c::Ey * 10.0f;
|
||||
mVec3_c checkPos = position + offset;
|
||||
mVec3_c checkPos = mPosition + offset;
|
||||
// TODO reference vs pointer
|
||||
if (dBgS_ObjGndChk::CheckPos(checkPos) && &dBgS_ObjGndChk::GetInstance()) {
|
||||
cBgS_PolyInfo p = dBgS_ObjGndChk::GetInstance();
|
||||
|
||||
@@ -64,7 +64,7 @@ void dAcOwaterSpout_c::initializeState_Wait() {
|
||||
if (mParams == 1) {
|
||||
return;
|
||||
}
|
||||
dJEffManager_c::spawnEffect(PARTICLE_RESOURCE_ID_MAPPING_213_, position, nullptr, &mScale, nullptr, nullptr, 0, 0);
|
||||
dJEffManager_c::spawnEffect(PARTICLE_RESOURCE_ID_MAPPING_213_, mPosition, nullptr, &mScale, nullptr, nullptr, 0, 0);
|
||||
}
|
||||
void dAcOwaterSpout_c::executeState_Wait() {
|
||||
if (mMdl.getAnm().isStop()) {
|
||||
|
||||
@@ -78,8 +78,8 @@ void daPlayerActBase_c::setPosRot(const mVec3_c *pos, const mAng3_c *rot, bool f
|
||||
if (isInEvent() || force) {
|
||||
mStts.ClrCcMove();
|
||||
if (pos != nullptr) {
|
||||
position = *pos;
|
||||
mOldPosition = position;
|
||||
mPosition = *pos;
|
||||
mOldPosition = mPosition;
|
||||
velocity.y = 0.0f;
|
||||
}
|
||||
if (rot != nullptr) {
|
||||
|
||||
@@ -1892,15 +1892,15 @@ void daPlayerModelBase_c::setPosCopy3() {
|
||||
static const Vec posCopy3v2 = {0.0f, 95.0f, 0.0f};
|
||||
static const Vec posCopy3v3 = {0.0f, 14.0f, 0.0f};
|
||||
if (checkCurrentAction(/* FREE_FALL*/ 0x13) || checkCurrentAction(/* WALKING_ON_TIGHTROPE */ 0x81)) {
|
||||
poscopy3 = position;
|
||||
poscopy3 = mPosition;
|
||||
poscopy3.y += 180.0f;
|
||||
} else if (checkCurrentAction(/* BEING_PULLED_BY_CLAWS */ 0x5A)) {
|
||||
poscopy3 = poscopy2;
|
||||
} else if (checkActionFlags(FLG0_SWING_ROPE)) {
|
||||
poscopy3 = position;
|
||||
poscopy3 = mPosition;
|
||||
} else if (checkActionFlagsCont(0x20000000) || checkCurrentAction(0x70) ||
|
||||
checkCurrentAction(/* HANG_ON_ZIP */ 0x85)) {
|
||||
poscopy3 = position;
|
||||
poscopy3 = mPosition;
|
||||
poscopy3.y -= 100.0f;
|
||||
} else {
|
||||
// TODO maybe fakematch, is there a way to avoid this goto?
|
||||
@@ -1921,7 +1921,7 @@ void daPlayerModelBase_c::setPosCopy3() {
|
||||
}
|
||||
case 0x09: {
|
||||
// SLIDING
|
||||
poscopy3 = position + mVec3_c(posCopy3v2);
|
||||
poscopy3 = mPosition + mVec3_c(posCopy3v2);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
@@ -1932,7 +1932,7 @@ void daPlayerModelBase_c::setPosCopy3() {
|
||||
const Vec *v;
|
||||
if (checkActionFlags(FLG0_IN_WATER) || checkCurrentAction(/* SWIM_DASH_INFO_AIR */ 0x57)) {
|
||||
v = &posCopy3v3;
|
||||
f = position.y;
|
||||
f = mPosition.y;
|
||||
} else {
|
||||
if (checkCurrentAction(/* VOID_SAND */ 0x4C)) {
|
||||
v = &posCopy3v3;
|
||||
@@ -1942,9 +1942,9 @@ void daPlayerModelBase_c::setPosCopy3() {
|
||||
f = mtx.m[1][3];
|
||||
}
|
||||
poscopy3.copyFrom(v);
|
||||
poscopy3.x += position.x;
|
||||
poscopy3.x += mPosition.x;
|
||||
poscopy3.y += f;
|
||||
poscopy3.z += position.z;
|
||||
poscopy3.z += mPosition.z;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ void dSoundSource_c::setup() {
|
||||
if (mIsSetup) {
|
||||
return;
|
||||
}
|
||||
SetPosition(mpActor->position);
|
||||
SetPosition(mpActor->mPosition);
|
||||
resetCachedRelativePositions();
|
||||
initVolumeFade();
|
||||
if (mSourceCategory == SND_SOURCE_CATEGORY_PLAYER) {
|
||||
|
||||
@@ -419,7 +419,7 @@ void AttentionGroup::fn_800964B0() {
|
||||
extern "C" f32 lbl_8057CD9C;
|
||||
|
||||
f32 AttentionManager::targetScore(dAcObjBase_c *target, dAcObjBase_c *origin) {
|
||||
s16 angle = cLib::targetAngleY(target->position, origin->position) - origin->mRotation.y.mVal;
|
||||
s16 angle = cLib::targetAngleY(target->mPosition, origin->mPosition) - origin->mRotation.y.mVal;
|
||||
f32 viewAngle = fabsf(angle * lbl_8057CD9C);
|
||||
if (viewAngle > 0.5f) {
|
||||
return viewAngle;
|
||||
|
||||
@@ -1250,7 +1250,7 @@ void dWaterEffect_c::execute(f32 water, f32 ground) {
|
||||
if (b) {
|
||||
if (!mIsInWater) {
|
||||
mIsInWater = true;
|
||||
mVec3_c pos(ac->position.x, water, ac->position.z);
|
||||
mVec3_c pos(ac->mPosition.x, water, ac->mPosition.z);
|
||||
mVec3_c scale(mScale, mScale, mScale);
|
||||
if (mIsSmall || water - ground < 50.0f) {
|
||||
// For small objects or shallow water, create a
|
||||
@@ -1270,7 +1270,7 @@ void dWaterEffect_c::execute(f32 water, f32 ground) {
|
||||
|
||||
if (mIsInWater && getActorCeilPos(ac) > water) {
|
||||
// Spawn effect while in water
|
||||
mVec3_c pos(ac->position.x, water, ac->position.z);
|
||||
mVec3_c pos(ac->mPosition.x, water, ac->mPosition.z);
|
||||
mVec3_c scale(mScale, mScale, mScale);
|
||||
mEff.createContinuousEffect(PARTICLE_RESOURCE_ID_MAPPING_127_, pos, nullptr, &scale, nullptr, nullptr);
|
||||
f32 rate = nw4r::math::FAbs(ac->forwardSpeed) * 0.02f;
|
||||
|
||||
@@ -50,7 +50,7 @@ void DowsingTarget::reinitialize(DowsingSlot type) {
|
||||
void DowsingTarget::getPosition(mVec3_c &position) {
|
||||
mMtx_c mtx;
|
||||
mMtx_c mtx2;
|
||||
PSMTXTrans(mtx.m, mpActor->position.x, mpActor->position.y, mpActor->position.z);
|
||||
PSMTXTrans(mtx.m, mpActor->mPosition.x, mpActor->mPosition.y, mpActor->mPosition.z);
|
||||
mtx.YrotM(mpActor->mRotation.y);
|
||||
PSMTXScale(mtx2.m, mpActor->mScale.x, mpActor->mScale.y, mpActor->mScale.z);
|
||||
PSMTXConcat(mtx.m, mtx2.m, mtx.m);
|
||||
|
||||
@@ -26,6 +26,6 @@ bool SoundInfo::initSource(s32 sourceType, const char *name, const mVec3_c *posP
|
||||
bool SoundInfo::startBgHitSound(u32 soundId, const cBgS_PolyInfo &info, const mVec3_c *position) {
|
||||
return mpSource->startBgHitSound(
|
||||
soundId, dBgS::GetInstance()->GetPolyAtt0(info), dBgS::GetInstance()->GetPolyAtt1(info),
|
||||
position != nullptr ? position : &mpActor->position
|
||||
position != nullptr ? position : &mpActor->mPosition
|
||||
);
|
||||
}
|
||||
|
||||
@@ -509,7 +509,7 @@ bool SpecialItemDropMgr::spawnSpecialDropItem(int specialItemId, int roomid, mVe
|
||||
max = rot;
|
||||
min = SOME_ANG;
|
||||
} else {
|
||||
max = (s16)cLib::targetAngleY(dAcPy_c::LINK->position, *pos) + 0x4000;
|
||||
max = (s16)cLib::targetAngleY(dAcPy_c::LINK->mPosition, *pos) + 0x4000;
|
||||
min = -0x8000;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user