diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2026-05-22 15:08:59 -0400 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2026-05-22 15:08:59 -0400 |
| commit | 98956b312d4e8ad4c18286e23f48c5e1d68aa9fe (patch) | |
| tree | cee7c3905518b0ccb18125b8167f6017c2b9ddc6 /src | |
| parent | 02b81a670b1ee28c1fbb172fc2d43bfb659e06b7 (diff) | |
Clean up JGeometry::TVec3 jank/fakematches
It seems the const parameters might not be necessary after all, and these can be matched with (f32)/(s16) casts in set(T, T, T) instead.
Diffstat (limited to 'src')
| -rw-r--r-- | src/d/actor/d_a_npc_md.cpp | 10 | ||||
| -rw-r--r-- | src/d/actor/d_a_player_particle.inc | 6 | ||||
| -rw-r--r-- | src/d/actor/d_a_steam_tag.cpp | 8 | ||||
| -rw-r--r-- | src/d/d_particle.cpp | 5 |
4 files changed, 5 insertions, 24 deletions
diff --git a/src/d/actor/d_a_npc_md.cpp b/src/d/actor/d_a_npc_md.cpp index b1347911..c44688fc 100644 --- a/src/d/actor/d_a_npc_md.cpp +++ b/src/d/actor/d_a_npc_md.cpp @@ -5998,10 +5998,7 @@ void daNpc_Md_c::emitterTrace(JPABaseEmitter* emitter, MtxP mtx, csXyz* angle) { JGeometry::TVec3<f32> pos(mtx[0][3], mtx[1][3], mtx[2][3]); emitter->setGlobalTranslation(pos); if (angle) { - JGeometry::TVec3<s16> rot; - rot.z = angle->z; - rot.y = angle->y; - rot.x = angle->x; + JGeometry::TVec3<s16> rot(angle->x, angle->y, angle->z); emitter->setGlobalRotation(rot); } } @@ -6069,10 +6066,7 @@ static BOOL daNpc_Md_IsDelete(daNpc_Md_c* i_this) { /* 0001114C-0001119C .text execute__26daNpc_Md_followEcallBack_cFP14JPABaseEmitter */ void daNpc_Md_followEcallBack_c::execute(JPABaseEmitter* emitter) { emitter->setGlobalTranslation(mPos.x, mPos.y, mPos.z); - JGeometry::TVec3<s16> rot; - rot.z = mAngle.z; - rot.y = mAngle.y; - rot.x = mAngle.x; + JGeometry::TVec3<s16> rot(mAngle.x, mAngle.y, mAngle.z); emitter->setGlobalRotation(rot); } diff --git a/src/d/actor/d_a_player_particle.inc b/src/d/actor/d_a_player_particle.inc index 953f49d0..0240ae27 100644 --- a/src/d/actor/d_a_player_particle.inc +++ b/src/d/actor/d_a_player_particle.inc @@ -77,8 +77,7 @@ void daPy_swimTailEcallBack_c::execute(JPABaseEmitter* emitter) { if (field_0x20 != NULL) { emitter->setGlobalTranslation(mPos.x, mPos.y, mPos.z); - JGeometry::TVec3<s16> rot(0, 0, 0); - rot.y = field_0x20->y; + JGeometry::TVec3<s16> rot(0, field_0x20->y, 0); emitter->setGlobalRotation(rot); }else { JGeometry::TVec3<f32> sp20; @@ -381,8 +380,7 @@ void daPy_waterDropPcallBack_c::execute(JPABaseEmitter* emitter, JPABaseParticle /* 80129F48-80129F98 .text execute__22daPy_followEcallBack_cFP14JPABaseEmitter */ void daPy_followEcallBack_c::execute(JPABaseEmitter* emitter) { emitter->setGlobalTranslation(mPos.x, mPos.y, mPos.z); - JGeometry::TVec3<s16> rot; - rot.set(mAngle.x, mAngle.y, mAngle.z); + JGeometry::TVec3<s16> rot(mAngle.x, mAngle.y, mAngle.z); emitter->setGlobalRotation(rot); } diff --git a/src/d/actor/d_a_steam_tag.cpp b/src/d/actor/d_a_steam_tag.cpp index d578f46b..d63eb31b 100644 --- a/src/d/actor/d_a_steam_tag.cpp +++ b/src/d/actor/d_a_steam_tag.cpp @@ -131,15 +131,7 @@ BOOL daSteamTag_c::execute() { mCreateTimer--; if (mCreateTimer == 0) { if (createEmitter()) { - // TODO: Fakematch? The demo debug map indicates TVec3(s16, s16, s16) constructor - // was used here, but just doing that doesn't match for either the demo or retail. - // Assigning x/y/z with 3 individual assignments matches for retail, but doesn't - // match for the demo. However, first using the TVec3(s16, s16, s16) ctor and then - // *also* assigning x/y/z separately matches for both demo and retail. JGeometry::TVec3<s16> angle(current.angle.x, current.angle.y, current.angle.z); - angle.x = current.angle.x; - angle.y = current.angle.y; - angle.z = current.angle.z; JGeometry::TVec3<f32> pos(current.pos.x, current.pos.y, current.pos.z); mpEmitter->setGlobalTranslation(pos); mpEmitter->setGlobalRotation(angle); diff --git a/src/d/d_particle.cpp b/src/d/d_particle.cpp index 20d9c4b7..c26a7457 100644 --- a/src/d/d_particle.cpp +++ b/src/d/d_particle.cpp @@ -1049,10 +1049,7 @@ void dPa_waveEcallBack::executeAfter(JPABaseEmitter* emitter) { } f32 speed = mVelFade1 * vel * mVelFade2; - JGeometry::TVec3<s16> rot; - rot.x = 0; - rot.y = mpRot->y; - rot.z = 0; + JGeometry::TVec3<s16> rot(0, mpRot->y, 0); emitter->setGlobalRotation(rot); if (std::fabsf(speed - mVel) > mVelSpeed) { |
