Work on d_debug_camera (#3024)

This commit is contained in:
hatal175
2026-01-08 16:53:40 +02:00
committed by GitHub
parent 0e7b42e9ea
commit 2d4a8ee46a
11 changed files with 47 additions and 26 deletions
+1
View File
@@ -151,6 +151,7 @@ public:
u32 GetMtrlSndId(const cBgS_PolyInfo& param_0) { return dKy_pol_sound_get(&param_0); }
void DebugDrawPoly(dBgW_Base *param_1) {}
void DebugDrawPoly(dBgW_Base const& param_1) {}
void DrawPoly(cBgS_PolyInfo const& param_0, GXColor const& param_1);
fopAc_ac_c* GetActorPointer(cBgS_PolyInfo const& param_0) const { return cBgS::GetActorPointer(param_0); }
bool LineCross(cBgS_LinChk* i_linChk) {
#if DEBUG
+7
View File
@@ -4,6 +4,7 @@
#include "SSystem/SComponent/c_bg_s_poly_info.h"
#include "SSystem/SComponent/c_bg_w.h"
#include "SSystem/SComponent/c_m3d_g_pla.h"
#include "dolphin/gx.h"
#include "f_pc/f_pc_base.h"
class cBgS_GndChk;
@@ -104,6 +105,12 @@ public:
virtual void CallRideCallBack(fopAc_ac_c*, fopAc_ac_c*);
virtual void CallArrowStickCallBack(fopAc_ac_c*, fopAc_ac_c*, cXyz&);
#if DEBUG
virtual void DebugDraw() {}
virtual void DrawPoly(cBgS_PolyInfo const& param_0, GXColor const& param_1) {}
virtual void DebugBox() {}
#endif
PushPull_CallBack GetPushPullCallback() const { return m_pushPull_Callback; }
s16 GetDiffShapeAngleY() { return m_diff_ShapeAngleY; }
int GetRoomId() { return m_roomId; }
+1 -1
View File
@@ -161,7 +161,7 @@ public:
public:
/* 0x000 */ int field_0x0;
/* 0x004 */ int field_0x4;
/* 0x008 */ u8 field_0x8[0x010 - 0x008];
/* 0x008 */ int field_0x8[2];
/* 0x010 */ cXyz field_0x10[32];
/* 0x190 */ cXyz field_0x190[32];
} /* 0x704 */ field_0x704;
+1 -1
View File
@@ -1823,7 +1823,7 @@ void daObjBm_c::debugDraw() {
}
if (CHECK_DRAW) {
mpBgW->CalcPlane();
mpBgW->DebugDraw();
}
}
#endif
+1 -1
View File
@@ -365,7 +365,7 @@ int daObjFallObj_c::Draw() {
#if DEBUG
if (l_HIO.mCheckDisplay) {
mpBgW->CalcPlane();
mpBgW->DebugDraw();
daPy_py_c* player = daPy_getPlayerActorClass();
GXColor color = (GXColor){0xff, 0, 0, 0xff};
cXyz cStack_1c(attention_info.position);
+1 -1
View File
@@ -210,7 +210,7 @@ void daRotBridge_c::moveBridge() {
int daRotBridge_c::Draw() {
#if DEBUG
if (l_HIO.draw_wall_collision && mpBgW2 != NULL) {
mpBgW2->CalcPlane();
mpBgW2->DebugDraw();
}
#endif
+1 -1
View File
@@ -387,7 +387,7 @@ int daObjSmgDoor_c::Draw() {
#if DEBUG
if (l_HIO.field_0x6 != 0) {
mpBgW->CalcPlane();
mpBgW->DebugDraw();
}
#endif
+1 -1
View File
@@ -437,7 +437,7 @@ int daObjSwLight_c::Draw() {
#if DEBUG
if (l_HIO.mCheckRendering) {
mpBgW->CalcPlane();
mpBgW->DebugDraw();
}
#endif
+1 -1
View File
@@ -521,7 +521,7 @@ int daObjTobyHouse_c::Draw() {
#if DEBUG
if (l_HIO.mDrawCollision) {
mpBgW->CalcPlane();
mpBgW->DebugDraw();
}
#endif
+11
View File
@@ -789,6 +789,17 @@ fopAc_ac_c* dBgS::PushPullCallBack(cBgS_PolyInfo const& param_0, fopAc_ac_c* i_p
i_label);
}
#if DEBUG
void dBgS::DrawPoly(cBgS_PolyInfo const& polyInfo, GXColor const& color) {
dBgW_Base* pdBgw = dComIfG_Bgsp().GetBgWBasePointer(polyInfo);
if (pdBgw != NULL) {
pdBgw->DrawPoly(polyInfo, color);
}
}
#endif
bool dBgS_CheckBWallPoly(cBgS_PolyInfo const& poly) {
cM3dGPla pla;
+21 -19
View File
@@ -519,26 +519,27 @@ int dDbgCamera_c::moveTool() {
mKeys[field_0x58] = PlaneKey();
}
mRunKey.mCenter = mKeys[field_0x58].mCenter;
mRunKey = mKeys[field_0x58];
break;
}
cXyz* sp30;
fopAc_ac_c* player;
if (mCmdMode == 3) {
fopAc_ac_c* sp2C = dComIfGp_getPlayer(0);
/* if (this->unk730 != 0x3E7) {
&field_0x704 = &sp2C->unk558
this->unk730 = 0x3E7;
player = dComIfGp_getPlayer(0);
if (*(int*)&field_0x704.field_0x10[2].y != 999) {
*(cXyz*)&field_0x704.field_0x0 = player->attention_info.position;
*(int*)&field_0x704.field_0x10[2].y = 999;
} else {
(sp15C, (Vec* ) &sp2C->unk558);
&mRunKey.mCenter += sp15C
&field_0x704 = &sp2C->unk558
} */
mRunKey.mCenter += player->attention_info.position - *(cXyz*)&field_0x704.field_0x0;
*(cXyz*)&field_0x704.field_0x0 = player->attention_info.position;
}
} else {
// this->unk730 = 3;
*(int*)&field_0x704.field_0x10[2].y = 3;
}
cXyz* var_r28;
cXyz* sp30;
f32 temp_f31;
f32 var_f30;
f32 var_f29;
@@ -634,11 +635,9 @@ int dDbgCamera_c::moveTool() {
mRunKey.mBank -= cDegree(mCamSetup.FovyTick()) * 0.1f;
break;
case 8:
s16 temp_r26 = mCamSetup.Rotate(var_f29 * (stick_x * field_0xc14));
field_0x44.U(field_0x44.U() + temp_r26);
temp_r26 = mCamSetup.Rotate(var_f29 * (stick_y * field_0xc14));
field_0x44.V(field_0x44.V() + temp_r26);
field_0x44.U(field_0x44.U() + mCamSetup.Rotate(var_f29 * (stick_x * field_0xc14)));
field_0x44.V(field_0x44.V() + mCamSetup.Rotate(var_f29 * (stick_y * field_0xc14)));
break;
}
if (sp8 != 0) {
@@ -1697,11 +1696,14 @@ int dDbgCamera_c::DrawShape() {
if (mCamSetup.CheckFlag(0x10)) {
switch (mLchkNum) {
case 2:
// dComIfG_Bgsp().DrawPoly(mLchk[1], l_color2);
case 2: {
static GXColor l_color2 = {0xC0, 0x78, 0x0, 0x80};
dComIfG_Bgsp().DrawPoly(mLchk[1], l_color2);
/* fallthrough */
}
case 1:
// dComIfG_Bgsp().DrawPoly(mLchk[0], l_color1);
static GXColor l_color1 = {0xC0, 0x78, 0x78, 0x80};
dComIfG_Bgsp().DrawPoly(mLchk[0], l_color1);
break;
}
}