summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2025-06-07 18:01:48 -0600
committerGitHub <noreply@github.com>2025-06-07 18:01:48 -0600
commitf2708a137c081a2adbb549e19badbde3c869a0f9 (patch)
tree7aac53137856a984636beb77a3b2629fe1b1f45d
parentf4d5c6b186638bf948cdc4af42b08699dafccde3 (diff)
Update render.inc.c
-rw-r--r--src/actors/item_box/render.inc.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/actors/item_box/render.inc.c b/src/actors/item_box/render.inc.c
index 12cc17497..fabf16861 100644
--- a/src/actors/item_box/render.inc.c
+++ b/src/actors/item_box/render.inc.c
@@ -82,18 +82,28 @@ void render_actor_item_box(Camera* camera, struct ItemBox* item_box) {
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
- // if ((item_box->rot[1] < 0xAA1) && (item_box->rot[1] > 0)) {
- // gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
- // } else if ((item_box->rot[1] >= 0x6AA5) && (item_box->rot[1] < 0x754E)) {
- // gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
- // } else if ((item_box->rot[1] >= 0x38E1) && (item_box->rot[1] < 0x438A)) {
- // gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
- // } else if ((item_box->rot[1] >= 0xC711) && (item_box->rot[1] < 0xD1BA)) {
- // gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
- // } else {
+
+ /*
+ * In the original game, the question mark texture would become corrupted. Thus, this code
+ * makes it disappear to hide the issue. Since the texture no longer becomes corrupted, this
+ * fix can be removed.
+ */
+#ifdef TARGET_N64
+ if ((item_box->rot[1] < 0xAA1) && (item_box->rot[1] > 0)) {
+ gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
+ } else if ((item_box->rot[1] >= 0x6AA5) && (item_box->rot[1] < 0x754E)) {
+ gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
+ } else if ((item_box->rot[1] >= 0x38E1) && (item_box->rot[1] < 0x438A)) {
+ gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
+ } else if ((item_box->rot[1] >= 0xC711) && (item_box->rot[1] < 0xD1BA)) {
+ gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
+ } else {
+#endif
gDPSetBlendMask(gDisplayListHead++, 0xFF);
gDPSetRenderMode(gDisplayListHead++, G_RM_ZB_CLD_SURF, G_RM_ZB_CLD_SURF2);
- // }
+#ifdef TARGET_N64
+ }
+#endif
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPDisplayList(gDisplayListHead++, D_0D003090);