summaryrefslogtreecommitdiff
path: root/src/d/d_bg_w.cpp
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-11-24 01:07:35 -0500
committerGitHub <noreply@github.com>2025-11-23 22:07:35 -0800
commit97c60c9092016f609a6bf432519f322db8940f33 (patch)
treee45ec2ed1931c22bb052f050ebcd8177308005b9 /src/d/d_bg_w.cpp
parent178191908cc998cbc0d973df275ebfc0ac86f2f2 (diff)
Match 5 d_bg_w_kcol funcs (#2856)
* dBgWKCol::CaptPoly equivalent * dBgWKCol::CaptPoly OK * Switch s32->int for the rest of the dBgW functions just in case This doesn't immediately help any other functions besides CaptPoly, but I suspect it could help prevent issues in the future since it's more likely to be what the original devs did. * Debug var fix * Match 3 more kcol funcs * Remove unused lits * Update nonmatching comments * Fix ChkShdwDrawThrough
Diffstat (limited to 'src/d/d_bg_w.cpp')
-rw-r--r--src/d/d_bg_w.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/d/d_bg_w.cpp b/src/d/d_bg_w.cpp
index ac30796b4d..f6dbfc1e23 100644
--- a/src/d/d_bg_w.cpp
+++ b/src/d/d_bg_w.cpp
@@ -309,7 +309,7 @@ void cBgW::MakeNodeTreeGrpRp(int i_grp_idx) {
*pm_node_tree[pm_bgd->m_g_tbl[i_grp_idx].m_tree_idx].GetMaxP());
}
- s32 child_idx = pm_bgd->m_g_tbl[i_grp_idx].m_first_child;
+ int child_idx = pm_bgd->m_g_tbl[i_grp_idx].m_first_child;
while (true) {
if (child_idx == 0xFFFF)
break;
@@ -518,7 +518,7 @@ bool cBgW::LineCheckGrpRp(cBgS_LinChk* i_linchk, int i_grp_idx, int depth) {
chk = true;
}
- s32 child_idx = pm_bgd->m_g_tbl[i_grp_idx].m_first_child;
+ int child_idx = pm_bgd->m_g_tbl[i_grp_idx].m_first_child;
while (true) {
if (child_idx == 0xFFFF)
break;
@@ -655,7 +655,7 @@ bool cBgW::GroundCrossGrpRp(cBgS_GndChk* i_gndchk, int i_grp_idx, int i_depth) {
chk = true;
}
- s32 child_idx = pm_bgd->m_g_tbl[i_grp_idx].m_first_child;
+ int child_idx = pm_bgd->m_g_tbl[i_grp_idx].m_first_child;
while (true) {
if (child_idx == 0xFFFF)
break;
@@ -772,7 +772,7 @@ void cBgW::ShdwDrawGrpRp(cBgS_ShdwDraw* i_shdw, int i_idx) {
ShdwDrawRp(i_shdw, pm_bgd->m_g_tbl[i_idx].m_tree_idx);
}
- s32 child_idx = pm_bgd->m_g_tbl[i_idx].m_first_child;
+ int child_idx = pm_bgd->m_g_tbl[i_idx].m_first_child;
while (true) {
if (child_idx == 0xFFFF) {
break;
@@ -806,7 +806,7 @@ bool cBgW::ChkGrpThrough(int param_0, cBgS_GrpPassChk* param_1, int param_2) {
}
/* 8007B0E4-8007B164 075A24 0080+00 2/0 1/0 0/0 .text GetGrpRoomIndex__4cBgWCFRC13cBgS_PolyInfo */
-s32 cBgW::GetGrpRoomIndex(cBgS_PolyInfo const& poly) const {
+int cBgW::GetGrpRoomIndex(cBgS_PolyInfo const& poly) const {
int grp_index = GetTriGrp(poly.GetPolyIndex());
u16 parent_idx = pm_bgd->m_g_tbl[grp_index].m_parent;
@@ -888,12 +888,12 @@ u32 cBgW::GetMaskPolyInf0_NoShift(int poly_index, u32 mask) const {
/* 8007B3AC-8007B3D8 075CEC 002C+00 1/0 1/0 0/0 .text GetExitId__4dBgWFRC13cBgS_PolyInfo
*/
-s32 dBgW::GetExitId(cBgS_PolyInfo const& poly) {
+int dBgW::GetExitId(cBgS_PolyInfo const& poly) {
return GetPolyInf0(poly.GetPolyIndex(), 0x3F, 0);
}
/* 8007B3D8-8007B404 075D18 002C+00 1/0 1/0 0/0 .text GetPolyColor__4dBgWFRC13cBgS_PolyInfo */
-s32 dBgW::GetPolyColor(cBgS_PolyInfo const& poly) {
+int dBgW::GetPolyColor(cBgS_PolyInfo const& poly) {
return GetPolyInf0(poly.GetPolyIndex(), 0x3FC0, 6);
}
@@ -986,7 +986,7 @@ int dBgW::GetLinkNo(cBgS_PolyInfo const& poly) {
}
/* 8007B6D8-8007B704 076018 002C+00 1/0 1/0 0/0 .text GetWallCode__4dBgWFRC13cBgS_PolyInfo */
-s32 dBgW::GetWallCode(cBgS_PolyInfo const& poly) {
+int dBgW::GetWallCode(cBgS_PolyInfo const& poly) {
return GetPolyInf1(poly.GetPolyIndex(), 0xF00, 8);
}
@@ -1029,22 +1029,22 @@ u32 cBgW::GetPolyInf2(int poly_index, u32 mask, u32 shift) const {
}
/* 8007B87C-8007B8A8 0761BC 002C+00 1/0 1/0 0/0 .text GetCamMoveBG__4dBgWFRC13cBgS_PolyInfo */
-s32 dBgW::GetCamMoveBG(cBgS_PolyInfo const& poly) {
+int dBgW::GetCamMoveBG(cBgS_PolyInfo const& poly) {
return GetPolyInf2(poly.GetPolyIndex(), 0xFF, 0);
}
/* 8007B8A8-8007B8D8 0761E8 0030+00 1/0 1/0 0/0 .text GetRoomCamId__4dBgWFRC13cBgS_PolyInfo */
-s32 dBgW::GetRoomCamId(cBgS_PolyInfo const& poly) {
+int dBgW::GetRoomCamId(cBgS_PolyInfo const& poly) {
return GetPolyInf2(poly.GetPolyIndex(), 0xFF00, 8);
}
/* 8007B8D8-8007B904 076218 002C+00 1/0 1/0 0/0 .text GetRoomPathId__4dBgWFRC13cBgS_PolyInfo */
-s32 dBgW::GetRoomPathId(cBgS_PolyInfo const& poly) {
+int dBgW::GetRoomPathId(cBgS_PolyInfo const& poly) {
return GetPolyInf2(poly.GetPolyIndex(), 0xFF0000, 16);
}
/* 8007B904-8007B930 076244 002C+00 1/0 1/0 0/0 .text GetRoomPathPntNo__4dBgWFRC13cBgS_PolyInfo */
-s32 dBgW::GetRoomPathPntNo(cBgS_PolyInfo const& poly) {
+int dBgW::GetRoomPathPntNo(cBgS_PolyInfo const& poly) {
return GetPolyInf2(poly.GetPolyIndex(), 0xFF000000, 24);
}
@@ -1369,7 +1369,7 @@ bool dBgW::WallCorrectGrpRp(dBgS_Acch* i_acch, int i_idx, int i_depth) {
chk = true;
}
- s32 child_idx = pm_bgd->m_g_tbl[i_idx].m_first_child;
+ int child_idx = pm_bgd->m_g_tbl[i_idx].m_first_child;
while (true) {
if (child_idx == 0xFFFF) {
break;
@@ -1527,7 +1527,7 @@ bool dBgW::WallCorrectGrpRpSort(dBgS_Acch* i_acch, int i_idx, int i_depth) {
WallCorrectRpSort(i_acch, pm_bgd->m_g_tbl[i_idx].m_tree_idx);
}
- s32 child_idx = pm_bgd->m_g_tbl[i_idx].m_first_child;
+ int child_idx = pm_bgd->m_g_tbl[i_idx].m_first_child;
while (true) {
if (child_idx == 0xFFFF) {
break;
@@ -1832,7 +1832,7 @@ bool dBgW::RoofChkGrpRp(dBgS_RoofChk* i_roofchk, int i_idx, int i_depth) {
chk = true;
}
- s32 child_idx = data->m_first_child;
+ int child_idx = data->m_first_child;
while (true) {
if (child_idx == 0xFFFF) {
break;
@@ -1929,7 +1929,7 @@ bool dBgW::SplGrpChkGrpRp(dBgS_SplGrpChk* i_splchk, int i_idx, int i_depth) {
chk = true;
}
- s32 child_idx = data->m_first_child;
+ int child_idx = data->m_first_child;
while (true) {
if (child_idx == 0xFFFF) {
break;
@@ -2008,7 +2008,7 @@ void dBgW::CaptPolyGrpRp(dBgS_CaptPoly& i_captpoly, int i_idx, int i_depth) {
CaptPolyRp(i_captpoly, pm_bgd->m_g_tbl[i_idx].m_tree_idx);
}
- s32 child_idx = pm_bgd->m_g_tbl[i_idx].m_first_child;
+ int child_idx = pm_bgd->m_g_tbl[i_idx].m_first_child;
while (true) {
if (child_idx == 0xFFFF) {
break;
@@ -2112,7 +2112,7 @@ bool dBgW::SphChkGrpRp(dBgS_SphChk* i_sphchk, void* i_data, int i_idx, int i_dep
chk = true;
}
- s32 child_idx = data->m_first_child;
+ int child_idx = data->m_first_child;
while (true) {
if (child_idx == 0xFFFF) {
break;