Misc small cleanup

This commit is contained in:
LagoLunatic
2025-04-09 01:49:35 -04:00
parent 2ae6d899f7
commit 556e578f23
6 changed files with 14 additions and 14 deletions
@@ -626,6 +626,7 @@ struct J3DFog : public J3DFogInfo {
// J3DFog() { *getFogInfo() = j3dDefaultFogInfo; } // Produces the wrong codegen for mDoExt_backupMatBlock_c's constructor
J3DFog() { J3DFogInfo::operator=(j3dDefaultFogInfo); }
explicit J3DFog(const J3DFogInfo& info) { J3DFogInfo::operator=(info); }
~J3DFog() {}
J3DFogInfo* getFogInfo() { return (J3DFogInfo*)this; }
void load() const {
+7 -1
View File
@@ -2,6 +2,7 @@
#define D_A_TBOX_H
#include "f_op/f_op_actor.h"
#include "d/d_com_inf_game.h"
#include "d/d_cc_d.h"
#include "SSystem/SComponent/c_phase.h"
#include "d/d_bg_w.h"
@@ -41,7 +42,12 @@ public:
request_of_phase_process_class* getPhase() { return &mPhase; }
bool action() { return (this->*mActionFunc)(); }
void setAction(ActionFunc func) { mActionFunc = func; }
void deleteProc() {} // Maybe only used in the demo
void deleteProc() {
if (mpBgWCurrent != NULL) {
dComIfG_Bgsp()->Release(mpBgWCurrent);
}
mSmokeCB.remove();
}
inline BOOL draw();
BOOL execute();
+1 -1
View File
@@ -238,7 +238,7 @@ public:
void setScissor(f32, f32, f32, f32);
view_port_class* getViewPort() { return &mViewport; }
s8 getCameraID() { return mCameraID; }
int getCameraID() { return mCameraID; }
void setCameraID(int id) { mCameraID = id; }
void setMode(int mode) { mMode = mode; }
+2 -2
View File
@@ -1924,7 +1924,7 @@ void demo_camera(fganon_class* i_this) {
player->changeOriginalDemo();
camera2 = g_dComIfG_gameInfo.play.mCameraInfo[0].mpCamera;
camera2 = dComIfGp_getCamera(0);
i_this->mB5C = camera2->mLookat.mEye;
i_this->mB68 = camera2->mLookat.mCenter;
@@ -2497,7 +2497,7 @@ static BOOL daFganon_Execute(fganon_class* i_this) {
i_this->m684 = 0;
i_this->mWeponSph.SetC(local_84);
}
g_dComIfG_gameInfo.play.mCcS.Set(&i_this->mWeponSph);
dComIfG_Ccsp()->Set(&i_this->mWeponSph);
i_this->m686 = 0;
mant_class* cape = (mant_class*)fopAcM_SearchByID(i_this->mCapeID);
if (cape != NULL) {
+1 -3
View File
@@ -1849,7 +1849,6 @@ BOOL daShip_c::procCrane() {
return TRUE;
}
setControllAngle(0);
dComIfG_play_c* play = &g_dComIfG_gameInfo.play;
if (!dComIfGp_event_runCheck() && !daPy_getPlayerLinkActorClass()->checkNoControll()) {
if (m0398 == m039A) {
if(std::fabsf(speedF) < 3.0f &&
@@ -1867,8 +1866,7 @@ BOOL daShip_c::procCrane() {
setControllAngle(-0xA00);
}
if (m0353 && (sVar1 != mCurrentRopeSegmentIndex)) {
//dComIfGp_getVibration().StartShock(5, -0x31, cXyz(0.0f, 1.0f, 0.0f));
play->getVibration().StartShock(5, -0x31, cXyz(0.0f, 1.0f, 0.0f)); //Fakematch
dComIfGp_getVibration().StartShock(5, -0x31, cXyz(0.0f, 1.0f, 0.0f));
}
}
else if (m039A > 0) {
+2 -7
View File
@@ -1233,11 +1233,7 @@ static s32 daTbox_IsDelete(daTbox_c*) {
/* 00002FD8-00003070 .text daTbox_Delete__FP8daTbox_c */
static s32 daTbox_Delete(daTbox_c* i_tbox) {
if (i_tbox->mpBgWCurrent != NULL) {
dComIfG_Bgsp()->Release(i_tbox->mpBgWCurrent);
}
i_tbox->mSmokeCB.end();
i_tbox->deleteProc();
dComIfG_resDelete(i_tbox->getPhase(), "Dalways");
if (l_HIO.mNo >= 0) {
@@ -1265,11 +1261,10 @@ static cPhs_State daTbox_Create(fopAc_ac_c* i_actor) {
};
daTbox_c* tbox = static_cast<daTbox_c*>(i_actor);
s32 result;
fopAcM_SetupActor(tbox, daTbox_c);
result = dComIfG_resLoad(tbox->getPhase(), "Dalways");
cPhs_State result = dComIfG_resLoad(tbox->getPhase(), "Dalways");
if (result == cPhs_COMPLEATE_e) {
tbox->mRoomNo = tbox->home.angle.x & 0x3F;