f_op_actor_mng matching (#2325)

This commit is contained in:
Caroline Madsen 2025-03-12 18:57:14 -04:00 committed by GitHub
parent 854e460a36
commit 3ad60c1b17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 19 deletions

View File

@ -429,7 +429,7 @@ config.libs = [
Object(MatchingFor("GZ2E01"), "f_op/f_op_actor.cpp", extra_cflags=['-pragma "nosyminline on"']),
Object(MatchingFor("GZ2E01"), "f_op/f_op_actor_iter.cpp"),
Object(MatchingFor("GZ2E01"), "f_op/f_op_actor_tag.cpp"),
Object(NonMatching, "f_op/f_op_actor_mng.cpp", extra_cflags=['-pragma "nosyminline on"']),
Object(MatchingFor("GZ2E01"), "f_op/f_op_actor_mng.cpp", extra_cflags=['-pragma "nosyminline on"']),
Object(MatchingFor("GZ2E01"), "f_op/f_op_camera.cpp"),
Object(MatchingFor("GZ2E01"), "f_op/f_op_camera_mng.cpp"),
Object(MatchingFor("GZ2E01"), "f_op/f_op_overlap.cpp"),

View File

@ -379,7 +379,7 @@ inline BOOL fopAcM_CULLSIZE_IS_BOX(int i_culltype) {
return (i_culltype >= 0 && i_culltype < 14) || i_culltype == 14;
}
inline const Vec& fopAcM_getCullSizeSphereCenter(const fopAc_ac_c* i_actor) {
inline const cXyz& fopAcM_getCullSizeSphereCenter(const fopAc_ac_c* i_actor) {
return i_actor->cull.sphere.center;
}

View File

@ -20,7 +20,7 @@ struct mDoLib_clipper {
return mClipper.clip(m, (Vec*)param_1, (Vec*)param_2);
}
static int clip(const Mtx m, Vec param_1, f32 param_2) {
static s32 clip(const Mtx m, Vec param_1, f32 param_2) {
return mClipper.clip(m, param_1, param_2);
}

View File

@ -776,25 +776,13 @@ s32 fopAcM_cullingCheck(fopAc_ac_c const* i_actor) {
if (fopAcM_GetCullSize(i_actor) == 23) {
if (fopAcM_getCullSizeFar(i_actor) > 0.0f) {
mDoLib_clipper::changeFar(cullsize_far * mDoLib_clipper::getFar());
f32 radius = fopAcM_getCullSizeSphereR(i_actor);
const Vec& center_p = fopAcM_getCullSizeSphereCenter(i_actor);
Vec center;
center.x = center_p.x;
center.y = center_p.y;
center.z = center_p.z;
u32 ret = mDoLib_clipper::clip(mtx_p, center, radius);
u32 ret = mDoLib_clipper::clip(mtx_p, fopAcM_getCullSizeSphereCenter(i_actor),
fopAcM_getCullSizeSphereR(i_actor));
mDoLib_clipper::resetFar();
return ret;
} else {
f32 radius = fopAcM_getCullSizeSphereR(i_actor);
const Vec& center_p = fopAcM_getCullSizeSphereCenter(i_actor);
Vec center;
center.x = center_p.x;
center.y = center_p.y;
center.z = center_p.z;
return mDoLib_clipper::clip(mtx_p, center, radius);
return mDoLib_clipper::clip(mtx_p, fopAcM_getCullSizeSphereCenter(i_actor),
fopAcM_getCullSizeSphereR(i_actor));
}
} else {
cull_sphere* sphere = &l_cullSizeSphere[cullsize - 15];