obj_mkiek demo match, remove fake inlines from cXyz

This commit is contained in:
LagoLunatic
2025-07-14 19:11:39 -04:00
parent e58f66b8e4
commit ea02e17b83
8 changed files with 35 additions and 46 deletions
+2 -2
View File
@@ -1530,7 +1530,7 @@ config.libs = [
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_tornado", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(NonMatching, "d_a_warpf"),
ActorRel(NonMatching, "d_a_wind_tag"),
ActorRel(MatchingFor("D44J01", "GZLJ01", "GZLE01", "GZLP01"), "d_a_acorn_leaf", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(Matching, "d_a_acorn_leaf", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(NonMatching, "d_a_atdoor"),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_auction", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(NonMatching, "d_a_bb"),
@@ -1693,7 +1693,7 @@ config.libs = [
ActorRel(Matching, "d_a_obj_ladder", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(NonMatching, "d_a_obj_light"),
ActorRel(NonMatching, "d_a_obj_mkie"),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_mkiek", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(Matching, "d_a_obj_mkiek", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_mknjd", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(NonMatching, "d_a_obj_mmrr"),
ActorRel(NonMatching, "d_a_obj_msdan"),
+2 -30
View File
@@ -93,39 +93,12 @@ struct cXyz : Vec {
}
void setall(f32 f) { set(f, f, f); }
void zero() { x = y = z = 0.0f; }
void setMin(const cXyz& other) {
if (x > other.x) {
x = other.x;
}
if (y > other.y) {
y = other.y;
}
if (z > other.z) {
z = other.z;
}
}
void setMax(const cXyz& other) {
if (x < other.x) {
x = other.x;
}
if (y < other.y) {
y = other.y;
}
if (z < other.z) {
z = other.z;
}
}
f32 getSquareMag() const { return VECSquareMag(this); }
f32 getSquareDistance(const Vec& other) const { return VECSquareDistance(this, &other); }
static f32 getNearZeroValue() { return 8e-11f; }
bool isNearZeroSquare() const { return (this->getSquareMag() < getNearZeroValue()); }
bool isNearZeroSquare(const cXyz& other) const { return (VECSquareMag(&other) < getNearZeroValue()); }
bool isNearZeroSquare() const { return (this->getSquareMag() < 8e-11f); }
bool isNearZeroSquare(const cXyz& other) const { return (VECSquareMag(&other) < 8e-11f); }
f32 abs2() const { return this->getSquareMag(); }
f32 abs2(const Vec& other) const { return this->getSquareDistance(other); }
f32 abs2XZ() const {
@@ -141,7 +114,6 @@ struct cXyz : Vec {
f32 abs(const Vec& other) const { return std::sqrtf(this->abs2(other)); }
f32 absXZ() const { return std::sqrtf(this->abs2XZ()); }
f32 absXZ(const Vec& other) const { return std::sqrtf(this->abs2XZ(other)); }
f32 getMagXZ() const { return cXyz(this->x, 0, this->z).getSquareMag(); }
f32 getDotProduct(const Vec& other) const { return VECDotProduct(this, &other); }
f32 inprod(const Vec& other) const { return getDotProduct(other); }
+18 -2
View File
@@ -13,10 +13,26 @@ void cM3dGAab::SetMinMax(const cXyz& pMinMax) {
/* 80251D08-80251D48 .text SetMin__8cM3dGAabFRC4cXyz */
void cM3dGAab::SetMin(const cXyz& pMin) {
mMin.setMin(pMin);
if (mMin.x > pMin.x) {
mMin.x = pMin.x;
}
if (mMin.y > pMin.y) {
mMin.y = pMin.y;
}
if (mMin.z > pMin.z) {
mMin.z = pMin.z;
}
}
/* 80251D48-80251D88 .text SetMax__8cM3dGAabFRC4cXyz */
void cM3dGAab::SetMax(const cXyz& pMax) {
mMax.setMax(pMax);
if (mMax.x < pMax.x) {
mMax.x = pMax.x;
}
if (mMax.y < pMax.y) {
mMax.y = pMax.y;
}
if (mMax.z < pMax.z) {
mMax.z = pMax.z;
}
}
+5 -7
View File
@@ -9,7 +9,7 @@
#include "d/d_cc_d.h"
#include "d/d_com_inf_game.h"
#include "f_op/f_op_actor_mng.h"
#include "JSystem/J3DGraphANimator/J3DModel.h"
#include "JSystem/J3DGraphAnimator/J3DModel.h"
#include "d/actor/d_a_tsubo.h"
#include "d/actor/d_a_player.h"
#include "d/res/res_vigah.h"
@@ -151,8 +151,7 @@ void daAleaf_c::set_mtx() {
/* 000008D0-00000C44 .text _execute__9daAleaf_cFv */
bool daAleaf_c::_execute() {
daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
fpc_ProcID sp14 = unk_424;
fopAc_ac_c* actor = fopAcM_Search(fpcSch_JudgeByID, &sp14);
fopAc_ac_c* actor = fopAcM_SearchByID(unk_424);
bool var_r29 = false;
@@ -180,7 +179,7 @@ bool daAleaf_c::_execute() {
unk_408.setPlaySpeed(1.0f);
}
f32 var_f31 = std::sqrtf((player->current.pos - current.pos).getMagXZ());
f32 var_f31 = (player->current.pos - current.pos).absXZ();
if (var_f31 < 50.0f && (unk_42C - var_f31) > 3.0f && std::fabsf(player->current.pos.y - current.pos.y) < 5.0f) {
unk_418 = true;
@@ -188,11 +187,10 @@ bool daAleaf_c::_execute() {
}
if (var_f31 < 200.0f && unk_428 != player->getGrabActorID() && player->getGrabActorID() == fpcM_ERROR_PROCESS_ID_e) {
fpc_ProcID sp14 = unk_428;
fopAc_ac_c* actor = fopAcM_Search(fpcSch_JudgeByID, &sp14);
fopAc_ac_c* actor = fopAcM_SearchByID(unk_428);
if (actor != NULL) {
f32 var_f1 = std::sqrtf((actor->current.pos - current.pos).getMagXZ());
f32 var_f1 = (actor->current.pos - current.pos).absXZ();
if (var_f1 < 70.0f) {
unk_418 = true;
+4 -1
View File
@@ -109,7 +109,7 @@ BOOL daObjMkiek::Act_c::Delete() {
BOOL daObjMkiek::Act_c::Mthd_Delete() {
BOOL result = this->MoveBGDelete();
if (fpcM_CreateResult(this) != cPhs_STOP_e) {
dComIfG_resDelete(&mPhs, M_arcname);
dComIfG_resDeleteDemo(&mPhs, M_arcname);
}
return result;
}
@@ -150,6 +150,9 @@ void daObjMkiek::Act_c::demo_wait() {
if (prm_get_sound() == 0) {
mDoAud_seStart(JA_SE_READ_RIDDLE_1);
}
#if VERSION == VERSION_DEMO
dComIfGp_getVibration().StartShock(4, -0x21, cXyz(0.0f, 1.0f, 0.0f));
#endif
if (m460 < 0x14) {
m460++;
} else {
+1 -1
View File
@@ -2612,7 +2612,7 @@ void daPy_lk_c::posMove() {
}
}
m3644 = 0.0f;
mStts.GetCCMoveP()->zero();
mStts.GetCCMoveP()->x = mStts.GetCCMoveP()->y = mStts.GetCCMoveP()->z = 0.0f;
if (m34C2 == 1 || m34C2 == 8 || m34C2 == 9 || m34C2 == 5) {
cXyz sp5C;
if (m34C2 == 1 || m34C2 == 5) {
+1 -1
View File
@@ -227,7 +227,7 @@ void daSea_packet_c::CleanUp() {
for (s32 z = 0; z < GRID_CELLS; z++)
for (s32 x = 0; x < GRID_CELLS; x++)
mpHeightTable[idx++] = BASE_HEIGHT;
mCurPos.zero();
mCurPos.x = mCurPos.y = mCurPos.z = 0.0f;
}
/* 8015B7E4-8015B84C .text __ct__14daSea_packet_cFv */
+2 -2
View File
@@ -883,7 +883,7 @@ void wave_move() {
}
dKy_set_eyevect_calc2(pCamera, &eyevect, g_env_light.mWaveChan.mWaveSpawnDist, 0.0f);
d0.zero();
d0.x = d0.y = d0.z = 0.0f;
windVecP = dKyw_get_wind_vec();
windPow = dKyw_get_wind_pow();
@@ -924,7 +924,7 @@ void wave_move() {
windPow = 0.6f;
}
d0.zero();
d0.x = d0.y = d0.z = 0.0f;
deltaXZ.x = pCamera->mLookat.mCenter.x - pCamera->mLookat.mEye.x;
deltaXZ.y = 0.0f;