diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2026-05-28 13:49:11 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-28 13:49:11 -0400 |
| commit | 8b46c357e4b435b8bee091b66300816a8f508d8d (patch) | |
| tree | f98e94d6a9d15878935ab6cb6c82f3b50ea49177 /src/f_op | |
| parent | a70388d63fd14bbeaad776b07a90504e8be86bcc (diff) | |
Demo work and fakematch cleanup (#1034)
Diffstat (limited to 'src/f_op')
| -rw-r--r-- | src/f_op/f_op_actor_mng.cpp | 21 | ||||
| -rw-r--r-- | src/f_op/f_op_msg_mng.cpp | 2 | ||||
| -rw-r--r-- | src/f_op/f_op_overlap_req.cpp | 3 | ||||
| -rw-r--r-- | src/f_op/f_op_scene_mng.cpp | 2 |
4 files changed, 17 insertions, 11 deletions
diff --git a/src/f_op/f_op_actor_mng.cpp b/src/f_op/f_op_actor_mng.cpp index b7ec1016..b48dcd09 100644 --- a/src/f_op/f_op_actor_mng.cpp +++ b/src/f_op/f_op_actor_mng.cpp @@ -539,12 +539,16 @@ s32 fopAcM_rollPlayerCrash(fopAc_ac_c* i_this, f32 distAdjust, u32 flag) { } /* 800255B4-80025660 .text fopAcM_checkCullingBox__FPA4_fffffff */ -s32 fopAcM_checkCullingBox(Mtx m, f32 x0, f32 y0, f32 z0, f32 x1, f32 y1, f32 z1) { +bool fopAcM_checkCullingBox(Mtx m, f32 x0, f32 y0, f32 z0, f32 x1, f32 y1, f32 z1) { Vec p0 = { x0, y0, z0 }; Vec p1 = { x1, y1, z1 }; Mtx viewMtx; cMtx_concat(j3dSys.getViewMtx(), m, viewMtx); - return mDoLib_clipper::clip(viewMtx, &p1, &p0) != 0; + if (mDoLib_clipper::clip(viewMtx, &p1, &p0)) { + return true; + } else { + return false; + } } static l_HIO l_hio; @@ -584,7 +588,7 @@ static void dummy() { } /* 80025660-800259A8 .text fopAcM_cullingCheck__FP10fopAc_ac_c */ -s32 fopAcM_cullingCheck(fopAc_ac_c* i_this) { +BOOL fopAcM_cullingCheck(fopAc_ac_c* i_this) { MtxP pMtx; if (fopAcM_GetMtx(i_this) == NULL) { pMtx = j3dSys.getViewMtx(); @@ -603,7 +607,7 @@ s32 fopAcM_cullingCheck(fopAc_ac_c* i_this) { if (fopAcM_GetCullSize(i_this) == fopAc_CULLBOX_CUSTOM_e) { if (fopAcM_getCullSizeFar(i_this) > 0.0f) { mDoLib_clipper::changeFar(cullFar * mDoLib_clipper::getFar()); - s32 ret = mDoLib_clipper::clip(pMtx, fopAcM_getCullSizeBoxMax(i_this), fopAcM_getCullSizeBoxMin(i_this)); + BOOL ret = mDoLib_clipper::clip(pMtx, fopAcM_getCullSizeBoxMax(i_this), fopAcM_getCullSizeBoxMin(i_this)); mDoLib_clipper::resetFar(); return ret; } else { @@ -613,7 +617,7 @@ s32 fopAcM_cullingCheck(fopAc_ac_c* i_this) { fopAc_cullSizeBox* box = &l_cullSizeBox[fopAcM_CULLSIZE_IDX(fopAcM_GetCullSize(i_this))]; if (fopAcM_getCullSizeFar(i_this) > 0.0f) { mDoLib_clipper::changeFar(cullFar * mDoLib_clipper::getFar()); - s32 ret = mDoLib_clipper::clip(pMtx, &box->max, &box->min); + BOOL ret = mDoLib_clipper::clip(pMtx, &box->max, &box->min); mDoLib_clipper::resetFar(); return ret; } else { @@ -624,7 +628,7 @@ s32 fopAcM_cullingCheck(fopAc_ac_c* i_this) { if (fopAcM_GetCullSize(i_this) == fopAc_CULLSPHERE_CUSTOM_e) { if (fopAcM_getCullSizeFar(i_this) > 0.0f) { mDoLib_clipper::changeFar(cullFar * mDoLib_clipper::getFar()); - s32 ret = mDoLib_clipper::clip(pMtx, *fopAcM_getCullSizeSphereCenter(i_this), fopAcM_getCullSizeSphereR(i_this)); + BOOL ret = mDoLib_clipper::clip(pMtx, *fopAcM_getCullSizeSphereCenter(i_this), fopAcM_getCullSizeSphereR(i_this)); mDoLib_clipper::resetFar(); return ret; } else { @@ -635,7 +639,7 @@ s32 fopAcM_cullingCheck(fopAc_ac_c* i_this) { fopAc_cullSizeSphere* sphere = &l_cullSizeSphere[fopAcM_CULLSIZE_Q_IDX(fopAcM_GetCullSize(i_this))]; if (fopAcM_getCullSizeFar(i_this) > 0.0f) { mDoLib_clipper::changeFar(cullFar * mDoLib_clipper::getFar()); - s32 ret = mDoLib_clipper::clip(pMtx, sphere->center, sphere->radius); + BOOL ret = mDoLib_clipper::clip(pMtx, sphere->center, sphere->radius); mDoLib_clipper::resetFar(); return ret; } else { @@ -1260,7 +1264,8 @@ fpc_ProcID fopAcM_createIball(cXyz* p_pos, int itemTableIdx, int i_roomNo, csXyz /* 800278D8-80027920 .text fopAcM_createWarpFlower__FP4cXyzP5csXyziUc */ void fopAcM_createWarpFlower(cXyz* p_pos, csXyz* p_angle, int i_roomNo, u8 param_4) { - u32 params = param_4; + u32 mask = 0x0FFFFFFF; + u32 params = mask & param_4; fopAcM_create(fpcNm_WARPFLOWER_e, params, p_pos, i_roomNo, p_angle); } diff --git a/src/f_op/f_op_msg_mng.cpp b/src/f_op/f_op_msg_mng.cpp index 7c40a496..5e87f6eb 100644 --- a/src/f_op/f_op_msg_mng.cpp +++ b/src/f_op/f_op_msg_mng.cpp @@ -1474,8 +1474,8 @@ const char* fopMsgM_msgGet_c::getMessage(mesg_header* msg) { mMsgIdx = i; if (mMsgNo == info->mEntries[i].mMsgNo) { JMSMesgEntry_c* entry = &info->mEntries[mMsgIdx]; - mResMsgNo = entry->mMsgNo; ret = &data[entry->mDataOffs]; + mResMsgNo = entry->mMsgNo; break; } } diff --git a/src/f_op/f_op_overlap_req.cpp b/src/f_op/f_op_overlap_req.cpp index 727a8aaf..e2540d1c 100644 --- a/src/f_op/f_op_overlap_req.cpp +++ b/src/f_op/f_op_overlap_req.cpp @@ -78,7 +78,8 @@ static cPhs_State fopOvlpReq_phase_IsCreated(overlap_request_class* i_this) { static cPhs_State fopOvlpReq_phase_Create(overlap_request_class* i_this) { fpcLy_SetCurrentLayer(i_this->pCurrentLayer); - i_this->mPId = fpcSCtRq_Request(fpcLy_CurrentLayer(), i_this->mProcName, NULL, NULL, NULL); + s16 procName = i_this->mProcName; + i_this->mPId = fpcSCtRq_Request(fpcLy_CurrentLayer(), procName, NULL, NULL, NULL); return cPhs_NEXT_e; } diff --git a/src/f_op/f_op_scene_mng.cpp b/src/f_op/f_op_scene_mng.cpp index 88307167..08ac4625 100644 --- a/src/f_op/f_op_scene_mng.cpp +++ b/src/f_op/f_op_scene_mng.cpp @@ -46,7 +46,7 @@ u32 fopScnM_ReRequest(s16 procName, u32 user) { void fopScnM_Management() { if (!fopScnRq_Handler()) - JUT_ASSERT(326, FALSE); + JUT_ASSERT(DEMO_SELECT(284, 326), FALSE); } void fopScnM_Init() { |
