summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Roncace <me@caseif.net>2025-11-26 16:52:12 -0500
committerGitHub <noreply@github.com>2025-11-26 13:52:12 -0800
commit3080360a2a3b845078375f303cea187bf9e52976 (patch)
treeda01ae64af68434ed33a30d480cca0ff79d91ab9 /src
parent5d0da9be7c486a1907a9f4ced12afa87ddafb515 (diff)
d_kankyo matching (#2872)
Diffstat (limited to 'src')
-rw-r--r--src/d/d_kankyo.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/d/d_kankyo.cpp b/src/d/d_kankyo.cpp
index 54716d735a..c798f70c18 100644
--- a/src/d/d_kankyo.cpp
+++ b/src/d/d_kankyo.cpp
@@ -8,6 +8,7 @@
#include "SSystem/SComponent/c_math.h"
#include "d/actor/d_a_kytag08.h"
#include "d/actor/d_a_player.h"
+#include "d/d_bg_s_gnd_chk.h"
#include "d/d_debug_viewer.h"
#include "d/d_debug_pad.h"
#include "d/d_kankyo_rain.h"
@@ -7511,6 +7512,13 @@ void dKy_ParticleColor_get_base(cXyz* param_0, dKy_tevstr_c* param_1, GXColor* p
param_3->b = (sp18 * (sp50.b * (1.0f - param_6))) + (param_5->b * param_6);
}
+// Dummy data to force 0x30 bytes of padding between parcent_table and dScnKy_env_light's vtable.
+// This extra space is likely allocated for stripped vtables - debug indicates that dBgS_ObjGndChk
+// is used somewhere which has a 0x30 byte vtable, but I can't find a way to generate it without
+// also reserving space for cBgS_GrpPassChk and cBgS_PolyPassChk which ends up making .data too
+// large.
+static u8 dummy_padding_data_0x354[0x30] = {};
+
/* 801A9BE4-801A9CBC 1A4524 00D8+00 0/0 3/3 0/0 .text
* dKy_ParticleColor_get_actor__FP4cXyzP12dKy_tevstr_cP8_GXColorP8_GXColorP8_GXColorP8_GXColorf */
void dKy_ParticleColor_get_actor(cXyz* param_0, dKy_tevstr_c* tevstr_p, GXColor* param_2,
@@ -7860,12 +7868,12 @@ void dKy_WaterIn_Light_set() {
sp8 = 3;
}
-#if PLATFORM_SHIELD
- for (int i = 0; i < 6; i++)
+#if PLATFORM_GCN
+#define WATERIN_LIGHT_SET_LOOP_MAX 1
#else
- int i = 0;
+#define WATERIN_LIGHT_SET_LOOP_MAX 6
#endif
- {
+ for (int i = 0; i < WATERIN_LIGHT_SET_LOOP_MAX; i++) {
if (kankyo->field_0x0c18[i].field_0x26 != 1) {
dKy_twi_wolflight_set(i);
kankyo->field_0x0c18[i].mColor.r = 0x8A;
@@ -7977,9 +7985,7 @@ void dKy_WaterIn_Light_set() {
kankyo->field_0x0c18[i].field_0x26 = 1;
sp10 = 1;
-#if PLATFORM_SHIELD
break;
-#endif
}
}
}