mirror of
https://github.com/zeldaret/ss
synced 2026-07-28 07:08:38 -04:00
position -> mPosition
This commit is contained in:
+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) {
|
||||
|
||||
Reference in New Issue
Block a user