From 7b91d489540864d29a40fe9571312774c2aa27f4 Mon Sep 17 00:00:00 2001 From: PJB3005 Date: Mon, 2 Mar 2026 21:40:35 +0100 Subject: [PATCH] vrbox/vrbox2 rendering: take two just disable only the broken code, it does nothing according to Jasper --- src/d/actor/d_a_vrbox.cpp | 10 ++++------ src/d/actor/d_a_vrbox2.cpp | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/d/actor/d_a_vrbox.cpp b/src/d/actor/d_a_vrbox.cpp index 4df3e233b8..24fa1fb9d3 100644 --- a/src/d/actor/d_a_vrbox.cpp +++ b/src/d/actor/d_a_vrbox.cpp @@ -12,12 +12,6 @@ static int daVrbox_color_set(vrbox_class* i_this); static int daVrbox_Draw(vrbox_class* i_this) { -#if TARGET_PC - // This code is broken but happens to work on hardware. Does not work on PC. - // Not decomp's fault! - return 1; -#endif - J3DModel* soraModel_p = i_this->mpSoraModel; f32 fvar = 0.0f; dStage_FileList_dt_c* filelist_p = NULL; @@ -49,6 +43,9 @@ static int daVrbox_Draw(vrbox_class* i_this) { soraModel_p->setBaseTRMtx(mDoMtx_stack_c::get()); dKy_GxFog_set(); +#if !TARGET_PC + // This code is broken but happens to not do anything on the real game. + // these casts look like fake matches, but this ptr is used as both J3DModel and J3DModelData? for (int i = ((J3DModelData*)soraModel_p)->getMaterialNum() - 1; i >= 0; i--) { J3DMaterial* material_p = ((J3DModelData*)soraModel_p)->getMaterialNodePointer(i); @@ -60,6 +57,7 @@ static int daVrbox_Draw(vrbox_class* i_this) { fogInfo_p->mType = 2; } +#endif dComIfGd_setListSky(); mDoExt_modelUpdateDL(soraModel_p); diff --git a/src/d/actor/d_a_vrbox2.cpp b/src/d/actor/d_a_vrbox2.cpp index d86f2d74f3..5644ddd5a0 100644 --- a/src/d/actor/d_a_vrbox2.cpp +++ b/src/d/actor/d_a_vrbox2.cpp @@ -25,12 +25,6 @@ static void texScrollCheck(f32& param_0) { } static int daVrbox2_Draw(vrbox2_class* i_this) { -#if TARGET_PC - // This code is broken but happens to work on hardware. Does not work on PC. - // Not decomp's fault! - return 1; -#endif - camera_class* camera_p; dKankyo_sunlenz_Packet* lenz_p; J3DModel* kumo_model_p; @@ -57,6 +51,9 @@ static int daVrbox2_Draw(vrbox2_class* i_this) { filelist_p = NULL; dKy_GxFog_set(); +#if !TARGET_PC + // Code is broken but does nothing on real hardware. + // these casts look like fake matches, but this ptr is used as both J3DModel and J3DModelData? sp38 = (J3DModelData*)kumo_model_p; sp34 = (J3DModelData*)sun_model_p; @@ -93,6 +90,7 @@ static int daVrbox2_Draw(vrbox2_class* i_this) { fogInfo_p->mType = 2; } +#endif if ((g_env_light.vrbox_kasumi_outer_col.r + g_env_light.vrbox_kasumi_outer_col.g + g_env_light.vrbox_kasumi_outer_col.b + g_env_light.vrbox_sky_col.r + g_env_light.vrbox_sky_col.g +