summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTal Hayon <talhayon1@gmail.com>2023-01-29 16:55:11 +0200
committerTal Hayon <talhayon1@gmail.com>2023-01-29 16:55:11 +0200
commitcb867a05c2d3ea5e2269bdd39bd0038f025e1a86 (patch)
tree4aeef02d45d4c9e6a7e526fe49cf4f5134dabb26 /src
parent7c49fbffb66fbfb0955abb0bf269c675697ddba5 (diff)
parente0f788b3dd6ca630c5b329459b232a20d30112db (diff)
Merge remote-tracking branch 'upstream/master' into dollibs4
Diffstat (limited to 'src')
-rw-r--r--src/d/d_cam_param.cpp540
-rw-r--r--src/d/d_door_param2.cpp230
-rw-r--r--src/d/d_drawlist.cpp1683
-rw-r--r--src/d/d_gameover.cpp766
-rw-r--r--src/d/d_timer.cpp150
-rw-r--r--src/d/meter/d_meter2.cpp4
-rw-r--r--src/d/meter/d_meter2_draw.cpp361
7 files changed, 1220 insertions, 2514 deletions
diff --git a/src/d/d_cam_param.cpp b/src/d/d_cam_param.cpp
index c8569314ea..389d7e4db6 100644
--- a/src/d/d_cam_param.cpp
+++ b/src/d/d_cam_param.cpp
@@ -1,159 +1,115 @@
-//
-// Generated By: dol2asm
-// Translation Unit: d/d_cam_param
-//
+/**
+ * d_cam_param.cpp
+ *
+ */
#include "d/d_cam_param.h"
-#include "dol2asm.h"
-#include "dolphin/types.h"
+#include "SSystem/SComponent/c_math.h"
#include "d/com/d_com_inf_game.h"
+#include "dol2asm.h"
//
// Forward References:
//
-extern "C" void rationalBezierRatio__8dCamMathFff();
-extern "C" void zoomFovy__8dCamMathFff();
-extern "C" void __dt__7cDegreeFv();
-extern "C" void xyzRotateX__8dCamMathFR4cXyz7cSAngle();
-extern "C" void xyzRotateY__8dCamMathFR4cXyz7cSAngle();
-extern "C" void xyzHorizontalDistance__8dCamMathFR4cXyzR4cXyz();
-extern "C" void __ct__9dCstick_cFv();
-extern "C" bool Shift__9dCstick_cFUl();
-extern "C" void __ct__11dCamBGChk_cFv();
-extern "C" void __ct__11dCamParam_cFl();
extern "C" void __dt__11dCamParam_cFv();
-extern "C" void Change__11dCamParam_cFl();
-extern "C" void SearchStyle__11dCamParam_cFUl();
-extern "C" void __ct__11dCamSetup_cFv();
extern "C" void __dt__11dCamSetup_cFv();
-extern "C" void CheckLatitudeRange__11dCamSetup_cFPs();
-extern "C" void PlayerHideDist__11dCamSetup_cFv();
extern "C" void __dt__9dCstick_cFv();
-extern "C" extern char const* const d_d_cam_param__stringBase0;
//
// External References:
//
-extern "C" void mDoMtx_XrotS__FPA4_fs();
-extern "C" void mDoMtx_YrotS__FPA4_fs();
-extern "C" void getRes__14dRes_control_cFPCcPCcP11dRes_info_ci();
-extern "C" void EventRecoverNotime__9dCamera_cFv();
-extern "C" void dCam_getBody__Fv();
-extern "C" void cM_atan2f__Fff();
-extern "C" void __ct__7cDegreeFf();
-extern "C" void Sin__7cDegreeCFv();
-extern "C" void Cos__7cDegreeCFv();
extern "C" void __dl__FPv();
//
// Declarations:
//
-/* ############################################################################################## */
-/* 804527C8-804527D0 000DC8 0004+04 2/2 0/0 0/0 .sdata2 @3769 */
-SECTION_SDATA2 static f32 lit_3769[1 + 1 /* padding */] = {
- 0.0f,
- /* padding */
- 0.0f,
-};
-
-/* 804527D0-804527D8 000DD0 0008+00 1/1 0/0 0/0 .sdata2 @3770 */
-SECTION_SDATA2 static f64 lit_3770 = 1.0;
-
-/* 804527D8-804527E0 000DD8 0008+00 1/1 0/0 0/0 .sdata2 @3771 */
-SECTION_SDATA2 static f64 lit_3771 = -1.0;
-
-/* 804527E0-804527E8 000DE0 0008+00 1/1 0/0 0/0 .sdata2 @3772 */
-SECTION_SDATA2 static f64 lit_3772 = 2.0;
-
-/* 804527E8-804527F0 000DE8 0008+00 1/1 0/0 0/0 .sdata2 @3773 */
-SECTION_SDATA2 static f64 lit_3773 = 4.0;
-
-/* 804527F0-804527F8 000DF0 0008+00 1/1 0/0 0/0 .sdata2 @3774 */
-SECTION_SDATA2 static u8 lit_3774[8] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-/* 804527F8-80452800 000DF8 0008+00 1/1 0/0 0/0 .sdata2 @3775 */
-SECTION_SDATA2 static f64 lit_3775 = 1e-07;
-
-/* 80452800-80452808 000E00 0008+00 1/1 0/0 0/0 .sdata2 @3776 */
-SECTION_SDATA2 static f64 lit_3776 = -1e-07;
-
-/* 80452808-80452810 000E08 0008+00 1/1 0/0 0/0 .sdata2 @3777 */
-SECTION_SDATA2 static f64 lit_3777 = 1.0000000116860974e-07;
-
/* 8008813C-80088284 082A7C 0148+00 0/0 12/12 0/0 .text rationalBezierRatio__8dCamMathFff
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dCamMath::rationalBezierRatio(f32 param_0, f32 param_1) {
- nofralloc
-#include "asm/d/d_cam_param/rationalBezierRatio__8dCamMathFff.s"
+f32 dCamMath::rationalBezierRatio(f32 param_0, f32 param_1) {
+ f64 var_f31;
+ f32 var_f1 = param_0;
+
+ if (var_f1 >= 0.0f) {
+ var_f31 = 1.0;
+ } else {
+ var_f31 = -1.0;
+ var_f1 = -var_f1;
+ }
+
+ f64 temp_f2 = 2.0 * var_f1;
+ f64 temp_f2_2 = ((temp_f2 * param_1) - temp_f2) - (2.0 * param_1);
+ f64 temp_f29 = -temp_f2_2;
+ f64 temp_f28 = temp_f29 - 1.0;
+ f64 var_f1_2 = (temp_f2_2 * temp_f2_2) - (4.0 * temp_f28 * var_f1);
+
+ if (var_f1_2 > 0.0) {
+ var_f1_2 = sqrt(var_f1_2);
+ } else {
+ var_f1_2 = 0.0;
+ }
+
+ f64 temp = temp_f29 - var_f1_2;
+ f64 temp_f2_3 = temp_f28 * 2.0;
+ if (temp_f2_3 > 1e-07 || temp_f2_3 < -1e-07) {
+ f64 temp_f2_4 = temp / temp_f2_3;
+ f64 temp_f3 = temp_f2_4 * temp_f2_4;
+ f64 temp_f4 = 1.0 - temp_f2_4;
+ f64 temp_f1 = temp_f3 + ((temp_f4 * temp_f4) + (param_1 * (2.0 * temp_f4 * temp_f2_4)));
+
+ if (temp_f1 > 1.0000000116860974e-07) {
+ return var_f31 * (temp_f3 / temp_f1);
+ }
+ return 0.0f;
+ }
+
+ return 0.0f;
}
-#pragma pop
/* ############################################################################################## */
/* 80452810-80452814 000E10 0004+00 2/2 0/0 0/0 .sdata2 @3791 */
-SECTION_SDATA2 static f32 lit_3791 = 1.0f;
-
-/* 80452814-80452818 000E14 0004+00 1/1 0/0 0/0 .sdata2 @3807 */
-SECTION_SDATA2 static f32 lit_3807 = 57.2957763671875f;
+SECTION_SDATA2 static f32 lit_3791 = 1.0f; // placed in a weird order, so can't remove until fixed
/* 80088284-800882E0 082BC4 005C+00 0/0 1/1 0/0 .text zoomFovy__8dCamMathFff */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dCamMath::zoomFovy(f32 param_0, f32 param_1) {
- nofralloc
-#include "asm/d/d_cam_param/zoomFovy__8dCamMathFff.s"
-}
-#pragma pop
+f32 dCamMath::zoomFovy(f32 param_0, f32 param_1) {
+ cDegree deg(param_0);
-/* 800882E0-8008831C 082C20 003C+00 0/0 1/1 0/0 .text __dt__7cDegreeFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-// asm cDegree::~cDegree() {
-extern "C" asm void __dt__7cDegreeFv() {
- nofralloc
-#include "asm/d/d_cam_param/__dt__7cDegreeFv.s"
+ f32 radian = cM_atan2f(deg.Sin(), param_1 * deg.Cos());
+ return cAngle::r2d(radian);
}
-#pragma pop
/* 8008831C-80088384 082C5C 0068+00 0/0 1/1 0/0 .text xyzRotateX__8dCamMathFR4cXyz7cSAngle */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dCamMath::xyzRotateX(cXyz& param_0, cSAngle param_1) {
- nofralloc
-#include "asm/d/d_cam_param/xyzRotateX__8dCamMathFR4cXyz7cSAngle.s"
+cXyz dCamMath::xyzRotateX(cXyz& i_xyz, cSAngle i_angle) {
+ Mtx m;
+ cXyz rot_xyz;
+
+ s16 angle = i_angle.Val();
+ mDoMtx_XrotS(m, angle);
+ PSMTXMultVec(m, &i_xyz, &rot_xyz);
+ return rot_xyz;
}
-#pragma pop
/* 80088384-800883EC 082CC4 0068+00 0/0 13/13 0/0 .text xyzRotateY__8dCamMathFR4cXyz7cSAngle */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dCamMath::xyzRotateY(cXyz& param_0, cSAngle param_1) {
- nofralloc
-#include "asm/d/d_cam_param/xyzRotateY__8dCamMathFR4cXyz7cSAngle.s"
+cXyz dCamMath::xyzRotateY(cXyz& i_xyz, cSAngle i_angle) {
+ Mtx m;
+ cXyz rot_xyz;
+
+ s16 angle = i_angle.Val();
+ mDoMtx_YrotS(m, angle);
+ PSMTXMultVec(m, &i_xyz, &rot_xyz);
+ return rot_xyz;
}
-#pragma pop
/* 800883EC-80088434 082D2C 0048+00 0/0 9/9 0/0 .text
* xyzHorizontalDistance__8dCamMathFR4cXyzR4cXyz */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dCamMath::xyzHorizontalDistance(cXyz& param_0, cXyz& param_1) {
- nofralloc
-#include "asm/d/d_cam_param/xyzHorizontalDistance__8dCamMathFR4cXyzR4cXyz.s"
+f32 dCamMath::xyzHorizontalDistance(cXyz& i_posA, cXyz& i_posB) {
+ f64 x = i_posA.x - i_posB.x;
+ f64 z = i_posA.z - i_posB.z;
+
+ return sqrt((x * x) + (z * z));
}
-#pragma pop
/* ############################################################################################## */
/* 803AC500-803AC50C 009620 000C+00 2/2 0/0 0/0 .data __vt__11dCamSetup_c */
@@ -179,98 +135,56 @@ SECTION_DATA extern void* __vt__9dCstick_c[3 + 1 /* padding */] = {
NULL,
};
-/* 80452818-8045281C 000E18 0004+00 3/3 0/0 0/0 .sdata2 @3991 */
-SECTION_SDATA2 static f32 lit_3991 = 1.0f / 5.0f;
-
-/* 8045281C-80452820 000E1C 0004+00 1/1 0/0 0/0 .sdata2 @3992 */
-SECTION_SDATA2 static f32 lit_3992 = 19.0f / 20.0f;
-
/* 80088434-8008845C 082D74 0028+00 1/1 0/0 0/0 .text __ct__9dCstick_cFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm dCstick_c::dCstick_c() {
- nofralloc
-#include "asm/d/d_cam_param/__ct__9dCstick_cFv.s"
+dCstick_c::dCstick_c() {
+ mThresholdLow = 0.2f;
+ mThresholdHigh = 0.95f;
+ mInputSpeed = 6;
}
-#pragma pop
/* 8008845C-80088464 082D9C 0008+00 0/0 1/1 0/0 .text Shift__9dCstick_cFUl */
bool dCstick_c::Shift(u32 param_0) {
return false;
}
-/* ############################################################################################## */
-/* 80452820-80452824 000E20 0004+00 1/1 0/0 0/0 .sdata2 @4001 */
-SECTION_SDATA2 static f32 lit_4001 = 32.0f;
-
-/* 80452824-80452828 000E24 0004+00 2/2 0/0 0/0 .sdata2 @4002 */
-SECTION_SDATA2 static f32 lit_4002 = 25.0f;
-
-/* 80452828-8045282C 000E28 0004+00 2/2 0/0 0/0 .sdata2 @4003 */
-SECTION_SDATA2 static f32 lit_4003 = 2.0f / 5.0f;
-
-/* 8045282C-80452830 000E2C 0004+00 1/1 0/0 0/0 .sdata2 @4004 */
-SECTION_SDATA2 static f32 lit_4004 = 3.0f / 5.0f;
-
-/* 80452830-80452834 000E30 0004+00 1/1 0/0 0/0 .sdata2 @4005 */
-SECTION_SDATA2 static f32 lit_4005 = 3.0f;
-
-/* 80452834-80452838 000E34 0004+00 2/2 0/0 0/0 .sdata2 @4006 */
-SECTION_SDATA2 static f32 lit_4006 = 15.0f;
-
-/* 80452838-8045283C 000E38 0004+00 2/2 0/0 0/0 .sdata2 @4007 */
-SECTION_SDATA2 static f32 lit_4007 = 0.5f;
-
-/* 8045283C-80452840 000E3C 0004+00 2/2 0/0 0/0 .sdata2 @4008 */
-SECTION_SDATA2 static f32 lit_4008 = 3.0f / 10.0f;
-
-/* 80452840-80452844 000E40 0004+00 2/2 0/0 0/0 .sdata2 @4009 */
-SECTION_SDATA2 static f32 lit_4009 = 10.0f;
-
-/* 80452844-80452848 000E44 0004+00 2/2 0/0 0/0 .sdata2 @4010 */
-SECTION_SDATA2 static f32 lit_4010 = 1.0f / 10.0f;
-
-/* 80452848-8045284C 000E48 0004+00 2/2 0/0 0/0 .sdata2 @4011 */
-SECTION_SDATA2 static f32 lit_4011 = 0.75f;
-
-/* 8045284C-80452850 000E4C 0004+00 2/2 0/0 0/0 .sdata2 @4012 */
-SECTION_SDATA2 static f32 lit_4012 = 80.0f;
-
-/* 80452850-80452854 000E50 0004+00 1/1 0/0 0/0 .sdata2 @4013 */
-SECTION_SDATA2 static f32 lit_4013 = 2.0f / 25.0f;
-
-/* 80452854-80452858 000E54 0004+00 2/2 0/0 0/0 .sdata2 @4014 */
-SECTION_SDATA2 static f32 lit_4014 = 120.0f;
-
/* 80088464-800884F0 082DA4 008C+00 1/1 0/0 0/0 .text __ct__11dCamBGChk_cFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm dCamBGChk_c::dCamBGChk_c() {
- nofralloc
-#include "asm/d/d_cam_param/__ct__11dCamBGChk_cFv.s"
+dCamBGChk_c::dCamBGChk_c() {
+ mFloorMargin = 32.0f;
+
+ mChkInfo[0].mDistance = lit_3791;
+ mChkInfo[0].mChkAngle = 25.0f;
+ mChkInfo[0].mWeightH = 0.4f;
+ mChkInfo[0].mWeightL = 0.6f;
+
+ mChkInfo[1].mDistance = 3.0f;
+ mChkInfo[1].mChkAngle = 15.0f;
+ mChkInfo[1].mWeightH = 0.5f;
+ mChkInfo[1].mWeightL = 0.3f;
+
+ mFwdBackMargin = 10.0f;
+ mFwdCushion = 0.1f;
+ field_0x2c = 0.2f;
+ mGazeBackMargin = 10.0f;
+ mCornerCushion = 0.75f;
+ mWallCushion = 0.5f;
+ mWallUpDistance = 80.0f;
+ mWallBackCushion = 0.08f;
+ mCornerAngleMax = 120.0f;
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 8037A7E0-8037A7E0 006E40 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
-#pragma push
-#pragma force_active on
-SECTION_DEAD static char const* const stringBase_8037A7E0 = "camstyle.dat";
-/* @stringBase0 padding */
-SECTION_DEAD static char const* const pad_8037A7ED = "\0\0";
-#pragma pop
/* 800884F0-8008858C 082E30 009C+00 0/0 1/1 0/0 .text __ct__11dCamParam_cFl */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm dCamParam_c::dCamParam_c(s32 param_0) {
- nofralloc
-#include "asm/d/d_cam_param/__ct__11dCamParam_cFl.s"
+dCamParam_c::dCamParam_c(s32 i_styleID) {
+ u8* cam_data = (u8*)dComIfG_getObjectRes(dComIfGp_getCameraParamFileName(0), "camstyle.dat");
+
+ mCamStyleData = (dCamStyleData::StyleData*)(cam_data + 8);
+ mStyleNum = ((dCamStyleData*)cam_data)->mStyleNum;
+ Change(i_styleID);
+
+ mMapToolFovy = 0xFF;
+ mMapToolArg0 = 0xFF;
+ mMapToolArg1 = 0xFF;
+ mMapToolArg2 = -1;
}
-#pragma pop
/* 8008858C-800885D4 082ECC 0048+00 1/0 1/1 0/0 .text __dt__11dCamParam_cFv */
#pragma push
@@ -284,104 +198,118 @@ extern "C" asm void __dt__11dCamParam_cFv() {
#pragma pop
/* 800885D4-80088620 082F14 004C+00 1/1 7/7 0/0 .text Change__11dCamParam_cFl */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dCamParam_c::Change(s32 param_0) {
- nofralloc
-#include "asm/d/d_cam_param/Change__11dCamParam_cFl.s"
+int dCamParam_c::Change(s32 i_styleID) {
+ if (i_styleID >= 0 && i_styleID < mStyleNum) {
+ mStyleID = i_styleID;
+ mCurrentStyle = &mCamStyleData[mStyleID];
+ return 1;
+ }
+
+ mStyleID = 0;
+ mCurrentStyle = mCamStyleData;
+ return 0;
}
-#pragma pop
/* 80088620-80088668 082F60 0048+00 0/0 4/4 0/0 .text SearchStyle__11dCamParam_cFUl */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dCamParam_c::SearchStyle(u32 param_0) {
- nofralloc
-#include "asm/d/d_cam_param/SearchStyle__11dCamParam_cFUl.s"
+int dCamParam_c::SearchStyle(u32 param_0) {
+ int styleID = -1;
+
+ for (int i = 0; i < mStyleNum; i++) {
+ if (param_0 == mCamStyleData[i].field_0x0) {
+ styleID = i;
+ break;
+ }
+ }
+
+ return styleID;
}
-#pragma pop
/* ############################################################################################## */
/* 80452858-8045285C 000E58 0004+00 1/1 0/0 0/0 .sdata2 @4058 */
-SECTION_SDATA2 static f32 lit_4058 = 0.25f;
-
-/* 8045285C-80452860 000E5C 0004+00 1/1 0/0 0/0 .sdata2 @4119 */
-SECTION_SDATA2 static f32 lit_4119 = 100000.0f;
-
-/* 80452860-80452864 000E60 0004+00 1/1 0/0 0/0 .sdata2 @4120 */
-SECTION_SDATA2 static f32 lit_4120 = 1.0f / 20.0f;
-
-/* 80452864-80452868 000E64 0004+00 1/1 0/0 0/0 .sdata2 @4121 */
-SECTION_SDATA2 static f32 lit_4121 = -60.0f;
-
-/* 80452868-8045286C 000E68 0004+00 1/1 0/0 0/0 .sdata2 @4122 */
-SECTION_SDATA2 static f32 lit_4122 = 33.0f / 100.0f;
-
-/* 8045286C-80452870 000E6C 0004+00 1/1 0/0 0/0 .sdata2 @4123 */
-SECTION_SDATA2 static f32 lit_4123 = 1.0f / 50.0f;
-
-/* 80452870-80452874 000E70 0004+00 1/1 0/0 0/0 .sdata2 @4124 */
-SECTION_SDATA2 static f32 lit_4124 = 100.0f;
-
-/* 80452874-80452878 000E74 0004+00 1/1 0/0 0/0 .sdata2 @4125 */
-SECTION_SDATA2 static f32 lit_4125 = 7.0f / 25.0f;
-
-/* 80452878-8045287C 000E78 0004+00 1/1 0/0 0/0 .sdata2 @4126 */
-SECTION_SDATA2 static f32 lit_4126 = 3.0f / 20.0f;
-
-/* 8045287C-80452880 000E7C 0004+00 1/1 0/0 0/0 .sdata2 @4127 */
-SECTION_SDATA2 static f32 lit_4127 = 0.004999999888241291f;
-
-/* 80452880-80452884 000E80 0004+00 1/1 0/0 0/0 .sdata2 @4128 */
-SECTION_SDATA2 static f32 lit_4128 = 3.0f / 50.0f;
-
-/* 80452884-80452888 000E84 0004+00 1/1 0/0 0/0 .sdata2 @4129 */
-SECTION_SDATA2 static f32 lit_4129 = 70.0f;
-
-/* 80452888-8045288C 000E88 0004+00 1/1 0/0 0/0 .sdata2 @4130 */
-SECTION_SDATA2 static f32 lit_4130 = 60.0f;
-
-/* 8045288C-80452890 000E8C 0004+00 1/1 0/0 0/0 .sdata2 @4131 */
-SECTION_SDATA2 static f32 lit_4131 = 35.0f;
-
-/* 80452890-80452894 000E90 0004+00 1/1 0/0 0/0 .sdata2 @4132 */
-SECTION_SDATA2 static f32 lit_4132 = 65.0f;
-
-/* 80452894-80452898 000E94 0004+00 1/1 0/0 0/0 .sdata2 @4133 */
-SECTION_SDATA2 static f32 lit_4133 = 30.0f;
-
-/* 80452898-8045289C 000E98 0004+00 1/1 0/0 0/0 .sdata2 @4134 */
-SECTION_SDATA2 static f32 lit_4134 = 27.0f;
-
-/* 8045289C-804528A0 000E9C 0004+00 1/1 0/0 0/0 .sdata2 @4135 */
-SECTION_SDATA2 static f32 lit_4135 = 45.0f;
-
-/* 804528A0-804528A4 000EA0 0004+00 1/1 0/0 0/0 .sdata2 @4136 */
-SECTION_SDATA2 static f32 lit_4136 = 3500.0f;
-
-/* 804528A4-804528A8 000EA4 0004+00 1/1 0/0 0/0 .sdata2 @4137 */
-SECTION_SDATA2 static f32 lit_4137 = 4.0f;
-
-/* 804528A8-804528AC 000EA8 0004+00 1/1 0/0 0/0 .sdata2 @4138 */
-SECTION_SDATA2 static f32 lit_4138 = 1200.0f;
-
-/* 804528AC-804528B0 000EAC 0004+00 1/1 0/0 0/0 .sdata2 @4139 */
-SECTION_SDATA2 static f32 lit_4139 = 17.0f / 20.0f;
-
-/* 804528B0-804528B4 000EB0 0004+00 1/1 0/0 0/0 .sdata2 @4140 */
-SECTION_SDATA2 static f32 lit_4140 = 50.0f;
+SECTION_SDATA2 static f32 lit_4058 = 0.25f; // placed in a weird order, so can't remove until fixed
/* 80088668-800888B8 082FA8 0250+00 0/0 1/1 0/0 .text __ct__11dCamSetup_cFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm dCamSetup_c::dCamSetup_c() {
- nofralloc
-#include "asm/d/d_cam_param/__ct__11dCamSetup_cFv.s"
+dCamSetup_c::dCamSetup_c() {
+ f32 temp_1 = lit_3791;
+
+ mDrawNear = temp_1;
+ mDrawFar = 100000.0f;
+ field_0xc = 1;
+ mModeSwitchType = -1;
+ mForceType = -1;
+ mCusCus = 0.2f;
+ field_0x24 = 0.05f;
+ field_0x60 = 80.0f;
+ field_0x5c = -60.0f;
+ field_0x28 = 0.33f;
+ field_0x2c = 0.02f;
+ field_0x50 = 100.0f;
+ field_0x30 = 0.75f;
+ mBaseCushion = 0.28f;
+ mJumpCushion = temp_1;
+ field_0x58 = 0.15f;
+ field_0x44 = 0.005f;
+ field_0x54 = 0.06f;
+ mCurveWeight = temp_1;
+ field_0x34 = 25.0f;
+ mSubjLinkCullDist = 70.0f;
+ mParallelDist = 60.0f;
+ mTrimVistaHeight = 35.0f;
+ mTrimCineScopeHeight = 65.0f;
+ field_0xb0 = 150;
+ field_0xb4 = 60.0f;
+ mManualStartCThreshold = 0.3f;
+ mManualEndVal = 0.2f;
+ mFalseValue = 0.1f;
+ mFalseAngle = 30.0f;
+ mDebugFlags = 1;
+
+ field_0xa = 0x118;
+ field_0xa |= 0x200;
+ field_0xa |= 0x400;
+
+ mChargeLatitude = 27.0f;
+ mChargeTimer = 90;
+ mChargeBRatio = 0.5f;
+ mLockonChangeTimer = 40;
+ mLockonChangeCushion = lit_4058;
+ field_0x6c = 45.0f;
+ mForceLockOffDist = 3500.0f;
+ mForceLockOffTimer = 90;
+ mThrowTimer = 30;
+ mThrowVAngle = 25.0f;
+ mThrowCushion = 0.05f;
+ mThrowCtrOffset = 10.0f;
+ field_0x78 = 0.5f;
+ field_0x7c = 0.4f;
+ field_0x80 = 10.0f;
+ field_0x84 = 4.0f;
+ field_0xd4 = 60.0f;
+ field_0xd8 = 100.0f;
+ mWindShakeCtr = 15.0f;
+ mWindShakeFvy = 0.3f;
+ mMapToolCamShortTimer = 60;
+ mMapToolCamLongTimer = 120;
+ mDebugFlags |= 0x4800;
+ field_0x15c = 0.0f;
+ field_0x160 = 0.0f;
+ mDebugFlags |= 0x800;
+ mWaitRollTimer = 120;
+ mWaitRollSpeed = 0.02f;
+ field_0x16c = 1200.0f;
+ field_0xe0 = 0.06f;
+ field_0xec = 25;
+ field_0xf4 = 0.85f;
+ field_0xf8 = temp_1;
+ field_0xf0 = 12;
+ field_0xe4 = 50.0f;
+ field_0xe8 = 0.0f;
+ mScreensaverFirstWaitTimer = 30;
+ mScreensaverWaitTimer = 600;
+ mScreensaverExecTimer = 120;
+
+ dCam_getBody()->EventRecoverNotime();
}
-#pragma pop
/* 800888B8-80088918 0831F8 0060+00 1/0 1/1 0/0 .text __dt__11dCamSetup_cFv */
#pragma push
@@ -394,38 +322,32 @@ extern "C" asm void __dt__11dCamSetup_cFv() {
}
#pragma pop
-/* ############################################################################################## */
-/* 804528B4-804528B8 000EB4 0004+00 1/1 0/0 0/0 .sdata2 @4173 */
-SECTION_SDATA2 static f32 lit_4173 = 182.04444885253906f;
-
/* 80088918-80088988 083258 0070+00 0/0 1/1 0/0 .text CheckLatitudeRange__11dCamSetup_cFPs */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dCamSetup_c::CheckLatitudeRange(s16* param_0) {
- nofralloc
-#include "asm/d/d_cam_param/CheckLatitudeRange__11dCamSetup_cFPs.s"
+bool dCamSetup_c::CheckLatitudeRange(s16* param_0) {
+ s16 temp0 = cAngle::d2s(field_0x60);
+ s16 temp1 = cAngle::d2s(field_0x5c);
+
+ if (*param_0 > temp0) {
+ *param_0 = temp0;
+ return false;
+ }
+
+ if (*param_0 < temp1) {
+ *param_0 = temp1;
+ return false;
+ }
+
+ return true;
}
-#pragma pop
/* 80088988-800889B0 0832C8 0028+00 0/0 1/1 0/0 .text PlayerHideDist__11dCamSetup_cFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dCamSetup_c::PlayerHideDist() {
- nofralloc
-#include "asm/d/d_cam_param/PlayerHideDist__11dCamSetup_cFv.s"
-}
-#pragma pop
+f32 dCamSetup_c::PlayerHideDist() {
+ if (daPy_py_c::i_checkNowWolf()) {
+ return 120.0f;
+ }
-/* 800889B0-800889F8 0832F0 0048+00 1/0 0/0 0/0 .text __dt__9dCstick_cFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm dCstick_c::~dCstick_c() {
- nofralloc
-#include "asm/d/d_cam_param/__dt__9dCstick_cFv.s"
+ return mSubjLinkCullDist;
}
-#pragma pop
-/* 8037A7E0-8037A7E0 006E40 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
+/* 800889B0-800889F8 0832F0 0048+00 1/0 0/0 0/0 .text __dt__9dCstick_cFv */
+dCstick_c::~dCstick_c() {}
diff --git a/src/d/d_door_param2.cpp b/src/d/d_door_param2.cpp
index 8c98dacc82..ba9fcd64f3 100644
--- a/src/d/d_door_param2.cpp
+++ b/src/d/d_door_param2.cpp
@@ -1,257 +1,107 @@
-//
-// Generated By: dol2asm
-// Translation Unit: d/d_door_param2
-//
+/**
+ * d_door_param2.cpp
+ *
+ */
#include "d/d_door_param2.h"
-#include "dol2asm.h"
-#include "dolphin/types.h"
-
-//
-// Types:
-//
-
-struct fopAc_ac_c {};
-
-struct door_param2_c {
- /* 8003A188 */ void getKind(fopAc_ac_c*);
- /* 8003A194 */ void getDoorModel(fopAc_ac_c*);
- /* 8003A1A0 */ void getFrontOption(fopAc_ac_c*);
- /* 8003A1AC */ void getBackOption(fopAc_ac_c*);
- /* 8003A1B8 */ void getFRoomNo(fopAc_ac_c*);
- /* 8003A1C4 */ void getBRoomNo(fopAc_ac_c*);
- /* 8003A1D0 */ void getSwbit(fopAc_ac_c*);
- /* 8003A1DC */ void getSwbit2(fopAc_ac_c*);
- /* 8003A1E8 */ void getSwbit3(fopAc_ac_c*);
- /* 8003A1F4 */ void isMsgDoor(fopAc_ac_c*);
- /* 8003A200 */ void getEventNo(fopAc_ac_c*);
- /* 8003A20C */ void getEventNo2(fopAc_ac_c*);
- /* 8003A218 */ void getMsgNo(fopAc_ac_c*);
- /* 8003A224 */ void getExitNo(fopAc_ac_c*);
- /* 8003A230 */ void getFLightInf(fopAc_ac_c*);
- /* 8003A23C */ void getBLightInf(fopAc_ac_c*);
- /* 8003A248 */ void getMFLightInf(fopAc_ac_c*);
- /* 8003A254 */ void getMBLightInf(fopAc_ac_c*);
-};
-
-//
-// Forward References:
-//
-
-extern "C" void getKind__13door_param2_cFP10fopAc_ac_c();
-extern "C" void getDoorModel__13door_param2_cFP10fopAc_ac_c();
-extern "C" void getFrontOption__13door_param2_cFP10fopAc_ac_c();
-extern "C" void getBackOption__13door_param2_cFP10fopAc_ac_c();
-extern "C" void getFRoomNo__13door_param2_cFP10fopAc_ac_c();
-extern "C" void getBRoomNo__13door_param2_cFP10fopAc_ac_c();
-extern "C" void getSwbit__13door_param2_cFP10fopAc_ac_c();
-extern "C" void getSwbit2__13door_param2_cFP10fopAc_ac_c();
-extern "C" void getSwbit3__13door_param2_cFP10fopAc_ac_c();
-extern "C" void isMsgDoor__13door_param2_cFP10fopAc_ac_c();
-extern "C" void getEventNo__13door_param2_cFP10fopAc_ac_c();
-extern "C" void getEventNo2__13door_param2_cFP10fopAc_ac_c();
-extern "C" void getMsgNo__13door_param2_cFP10fopAc_ac_c();
-extern "C" void getExitNo__13door_param2_cFP10fopAc_ac_c();
-extern "C" void getFLightInf__13door_param2_cFP10fopAc_ac_c();
-extern "C" void getBLightInf__13door_param2_cFP10fopAc_ac_c();
-extern "C" void getMFLightInf__13door_param2_cFP10fopAc_ac_c();
-extern "C" void getMBLightInf__13door_param2_cFP10fopAc_ac_c();
-
-//
-// External References:
-//
-
-//
-// Declarations:
-//
/* 8003A188-8003A194 034AC8 000C+00 0/0 0/0 17/17 .text getKind__13door_param2_cFP10fopAc_ac_c */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void door_param2_c::getKind(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/d/d_door_param2/getKind__13door_param2_cFP10fopAc_ac_c.s"
+u8 door_param2_c::getKind(fopAc_ac_c* i_actor) {
+ return fopAcM_GetParamBit(i_actor, 0, 5);
}
-#pragma pop
/* 8003A194-8003A1A0 034AD4 000C+00 0/0 0/0 2/2 .text getDoorModel__13door_param2_cFP10fopAc_ac_c
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void door_param2_c::getDoorModel(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/d/d_door_param2/getDoorModel__13door_param2_cFP10fopAc_ac_c.s"
+u8 door_param2_c::getDoorModel(fopAc_ac_c* i_actor) {
+ return fopAcM_GetParamBit(i_actor, 5, 3);
}
-#pragma pop
/* 8003A1A0-8003A1AC 034AE0 000C+00 0/0 0/0 17/17 .text
* getFrontOption__13door_param2_cFP10fopAc_ac_c */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void door_param2_c::getFrontOption(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/d/d_door_param2/getFrontOption__13door_param2_cFP10fopAc_ac_c.s"
+u8 door_param2_c::getFrontOption(fopAc_ac_c* i_actor) {
+ return fopAcM_GetParamBit(i_actor, 8, 2);
}
-#pragma pop
/* 8003A1AC-8003A1B8 034AEC 000C+00 0/0 0/0 14/14 .text
* getBackOption__13door_param2_cFP10fopAc_ac_c */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void door_param2_c::getBackOption(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/d/d_door_param2/getBackOption__13door_param2_cFP10fopAc_ac_c.s"
+u8 door_param2_c::getBackOption(fopAc_ac_c* i_actor) {
+ return fopAcM_GetParamBit(i_actor, 10, 3);
}
-#pragma pop
/* 8003A1B8-8003A1C4 034AF8 000C+00 0/0 0/0 19/19 .text getFRoomNo__13door_param2_cFP10fopAc_ac_c
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void door_param2_c::getFRoomNo(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/d/d_door_param2/getFRoomNo__13door_param2_cFP10fopAc_ac_c.s"
+u8 door_param2_c::getFRoomNo(fopAc_ac_c* i_actor) {
+ return fopAcM_GetParamBit(i_actor, 13, 6);
}
-#pragma pop
/* 8003A1C4-8003A1D0 034B04 000C+00 0/0 0/0 10/10 .text getBRoomNo__13door_param2_cFP10fopAc_ac_c
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void door_param2_c::getBRoomNo(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/d/d_door_param2/getBRoomNo__13door_param2_cFP10fopAc_ac_c.s"
+u8 door_param2_c::getBRoomNo(fopAc_ac_c* i_actor) {
+ return fopAcM_GetParamBit(i_actor, 19, 6);
}
-#pragma pop
/* 8003A1D0-8003A1DC 034B10 000C+00 0/0 0/0 25/25 .text getSwbit__13door_param2_cFP10fopAc_ac_c */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void door_param2_c::getSwbit(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/d/d_door_param2/getSwbit__13door_param2_cFP10fopAc_ac_c.s"
+u8 door_param2_c::getSwbit(fopAc_ac_c* i_actor) {
+ return i_actor->orig.angle.z & 0xFF;
}
-#pragma pop
/* 8003A1DC-8003A1E8 034B1C 000C+00 0/0 0/0 12/12 .text getSwbit2__13door_param2_cFP10fopAc_ac_c
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void door_param2_c::getSwbit2(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/d/d_door_param2/getSwbit2__13door_param2_cFP10fopAc_ac_c.s"
+u8 door_param2_c::getSwbit2(fopAc_ac_c* i_actor) {
+ return (i_actor->orig.angle.z >> 8) & 0xFF;
}
-#pragma pop
/* 8003A1E8-8003A1F4 034B28 000C+00 0/0 0/0 3/3 .text getSwbit3__13door_param2_cFP10fopAc_ac_c */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void door_param2_c::getSwbit3(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/d/d_door_param2/getSwbit3__13door_param2_cFP10fopAc_ac_c.s"
+u8 door_param2_c::getSwbit3(fopAc_ac_c* i_actor) {
+ return (i_actor->orig.angle.x >> 8) & 0xFF;
}
-#pragma pop
/* 8003A1F4-8003A200 034B34 000C+00 0/0 0/0 4/4 .text isMsgDoor__13door_param2_cFP10fopAc_ac_c */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void door_param2_c::isMsgDoor(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/d/d_door_param2/isMsgDoor__13door_param2_cFP10fopAc_ac_c.s"
+u8 door_param2_c::isMsgDoor(fopAc_ac_c* i_actor) {
+ return fopAcM_GetParamBit(i_actor, 31, 1);
}
-#pragma pop
/* 8003A200-8003A20C 034B40 000C+00 0/0 0/0 3/3 .text getEventNo__13door_param2_cFP10fopAc_ac_c */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void door_param2_c::getEventNo(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/d/d_door_param2/getEventNo__13door_param2_cFP10fopAc_ac_c.s"
+u8 door_param2_c::getEventNo(fopAc_ac_c* i_actor) {
+ return i_actor->orig.angle.x & 0xFF;
}
-#pragma pop
/* 8003A20C-8003A218 034B4C 000C+00 0/0 0/0 2/2 .text getEventNo2__13door_param2_cFP10fopAc_ac_c
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void door_param2_c::getEventNo2(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/d/d_door_param2/getEventNo2__13door_param2_cFP10fopAc_ac_c.s"
+u8 door_param2_c::getEventNo2(fopAc_ac_c* i_actor) {
+ return (i_actor->orig.angle.x >> 8) & 0xFF;
}
-#pragma pop
/* 8003A218-8003A224 034B58 000C+00 0/0 0/0 2/2 .text getMsgNo__13door_param2_cFP10fopAc_ac_c */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void door_param2_c::getMsgNo(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/d/d_door_param2/getMsgNo__13door_param2_cFP10fopAc_ac_c.s"
+u16 door_param2_c::getMsgNo(fopAc_ac_c* i_actor) {
+ return i_actor->orig.angle.x;
}
-#pragma pop
/* 8003A224-8003A230 034B64 000C+00 0/0 0/0 6/6 .text getExitNo__13door_param2_cFP10fopAc_ac_c */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void door_param2_c::getExitNo(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/d/d_door_param2/getExitNo__13door_param2_cFP10fopAc_ac_c.s"
+u8 door_param2_c::getExitNo(fopAc_ac_c* i_actor) {
+ return fopAcM_GetParamBit(i_actor, 25, 6);
}
-#pragma pop
/* 8003A230-8003A23C 034B70 000C+00 0/0 0/0 1/1 .text getFLightInf__13door_param2_cFP10fopAc_ac_c
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void door_param2_c::getFLightInf(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/d/d_door_param2/getFLightInf__13door_param2_cFP10fopAc_ac_c.s"
+u8 door_param2_c::getFLightInf(fopAc_ac_c* i_actor) {
+ return fopAcM_GetParamBit(i_actor, 25, 3);
}
-#pragma pop
/* 8003A23C-8003A248 034B7C 000C+00 0/0 0/0 1/1 .text getBLightInf__13door_param2_cFP10fopAc_ac_c
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void door_param2_c::getBLightInf(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/d/d_door_param2/getBLightInf__13door_param2_cFP10fopAc_ac_c.s"
+u8 door_param2_c::getBLightInf(fopAc_ac_c* i_actor) {
+ return fopAcM_GetParamBit(i_actor, 28, 3);
}
-#pragma pop
/* 8003A248-8003A254 034B88 000C+00 0/0 0/0 1/1 .text getMFLightInf__13door_param2_cFP10fopAc_ac_c
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void door_param2_c::getMFLightInf(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/d/d_door_param2/getMFLightInf__13door_param2_cFP10fopAc_ac_c.s"
+u8 door_param2_c::getMFLightInf(fopAc_ac_c* i_actor) {
+ return fopAcM_GetParamBit(i_actor, 19, 3);
}
-#pragma pop
/* 8003A254-8003A260 034B94 000C+00 0/0 0/0 1/1 .text getMBLightInf__13door_param2_cFP10fopAc_ac_c
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void door_param2_c::getMBLightInf(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/d/d_door_param2/getMBLightInf__13door_param2_cFP10fopAc_ac_c.s"
+u8 door_param2_c::getMBLightInf(fopAc_ac_c* i_actor) {
+ return fopAcM_GetParamBit(i_actor, 22, 3);
}
-#pragma pop
diff --git a/src/d/d_drawlist.cpp b/src/d/d_drawlist.cpp
index 772ac395b5..e52dd6bcdc 100644
--- a/src/d/d_drawlist.cpp
+++ b/src/d/d_drawlist.cpp
@@ -6,13 +6,14 @@
#include "d/d_drawlist.h"
#include "JSystem/J3DGraphBase/J3DShape.h"
#include "JSystem/J3DGraphBase/J3DSys.h"
+#include "d/com/d_com_inf_game.h"
#include "dol2asm.h"
#include "dolphin/mtx/mtx44.h"
#include "dolphin/mtx/mtxvec.h"
#include "dolphin/types.h"
-#include "m_Do/m_Do_mtx.h"
-#include "m_Do/m_Do_lib.h"
#include "m_Do/m_Do_graphic.h"
+#include "m_Do/m_Do_lib.h"
+#include "m_Do/m_Do_mtx.h"
//
// Types:
@@ -50,16 +51,6 @@ struct dDlst_2DM_c {
/* 80052C58 */ void draw();
};
-struct cBgS_ShdwDraw {
- /* 80267F88 */ cBgS_ShdwDraw();
- /* 80267FD0 */ ~cBgS_ShdwDraw();
- /* 80268048 */ void Set(cXyz&, cXyz&);
-};
-
-struct cBgS {
- /* 80074840 */ void ShdwDraw(cBgS_ShdwDraw*);
-};
-
struct ShdwDrawPoly_c {
/* 80054A6C */ ~ShdwDrawPoly_c();
};
@@ -226,13 +217,9 @@ extern "C" extern void* __vt__12dDlst_base_c[3];
extern "C" extern void* __vt__9J3DPacket[5];
extern "C" u8 now__14mDoMtx_stack_c[48];
extern "C" u8 mClipper__14mDoLib_clipper[92];
-extern "C" extern u8 g_dComIfG_gameInfo[122384];
extern "C" extern u8 g_envHIO[68];
extern "C" u8 sincosTable___5JMath[65536];
extern "C" u8 mBackColor__13mDoGph_gInf_c[4];
-extern "C" extern u8 g_clearColor[4];
-extern "C" extern u32 g_blackColor;
-extern "C" extern u32 g_whiteColor;
extern "C" f32 mSystemFar__14mDoLib_clipper;
extern "C" f32 mFovyRate__14mDoLib_clipper;
extern "C" u8 sOldVcdVatCmd__8J3DShape[4];
@@ -242,8 +229,7 @@ extern "C" u8 sOldVcdVatCmd__8J3DShape[4];
//
/* 80051AC0-80051ADC 04C400 001C+00 0/0 3/3 0/0 .text setViewPort__14dDlst_window_cFffffff */
-void dDlst_window_c::setViewPort(f32 xOrig, f32 yOrig, f32 width, f32 height, f32 nearZ,
- f32 farZ) {
+void dDlst_window_c::setViewPort(f32 xOrig, f32 yOrig, f32 width, f32 height, f32 nearZ, f32 farZ) {
mXOrig = xOrig;
mYOrig = yOrig;
mWidth = width;
@@ -346,779 +332,104 @@ extern "C" asm void draw__12dDlst_2DT2_cFv() {
/* ############################################################################################## */
/* 803A87A0-803A87C0 0058C0 000C+14 2/2 0/0 0/0 .data cNullVec__6Z2Calc */
-SECTION_DATA static u8 cNullVec__6Z2Calc[12 + 20 /* padding */] = {
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- /* padding */
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
+SECTION_DATA static u8 cNullVec__6Z2Calc[12] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
/* 803A87C0-803A8800 0058E0 003C+04 0/0 0/0 0/0 .data l_frontZMat */
#pragma push
#pragma force_active on
-SECTION_DATA static u8 l_frontZMat[60 + 4 /* padding */] = {
- 0x61,
- 0x40,
- 0x00,
- 0x00,
- 0x07,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x3F,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x09,
- 0x00,
- 0x00,
- 0x00,
- 0x01,
- 0x61,
- 0x00,
- 0x00,
- 0x40,
- 0x10,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- /* padding */
- 0x00,
- 0x00,
- 0x00,
- 0x00,
+SECTION_DATA static u8 l_frontZMat[] ALIGN_DECL(32) = {
+ 0x61, 0x40, 0x00, 0x00, 0x07, 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x10,
+ 0x00, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
#pragma pop
/* 803A8800-803A882C 005920 002A+02 0/0 0/0 0/0 .data l_frontNoZSubMat */
#pragma push
#pragma force_active on
-SECTION_DATA static u8 l_frontNoZSubMat[42 + 2 /* padding */] = {
- 0x61,
- 0x40,
- 0x00,
- 0x00,
- 0x06,
- 0x61,
- 0x41,
- 0x00,
- 0x09,
- 0x35,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- /* padding */
- 0x00,
- 0x00,
+SECTION_DATA static u8 l_frontNoZSubMat[] ALIGN_DECL(32) = {
+ 0x61, 0x40, 0x00, 0x00, 0x06, 0x61, 0x41, 0x00, 0x09, 0x35, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
#pragma pop
/* 803A882C-803A88A0 00594C 0060+14 0/1 0/0 0/0 .data l_shadowVolPos */
#pragma push
#pragma force_active on
-SECTION_DATA static u8 l_shadowVolPos[96 + 20 /* padding */] = {
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0xC3,
- 0x96,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0xC3,
- 0x96,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0xC3,
- 0x96,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0xC3,
- 0x96,
- 0x00,
- 0x00,
- /* padding */
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
+SECTION_DATA static Vec l_shadowVolPos[] = {
+ {-1.0f, -1.0f, 0.0f}, {-1.0f, -1.0f, -300.0f}, {-1.0f, 1.0f, 0.0f}, {-1.0f, 1.0f, -300.0f},
+ {1.0f, -1.0f, 0.0f}, {1.0f, -1.0f, -300.0f}, {1.0f, 1.0f, 0.0f}, {1.0f, 1.0f, -300.0f},
};
#pragma pop
/* 803A88A0-803A88E0 0059C0 003B+05 0/0 0/0 0/0 .data l_shadowVolDL */
#pragma push
#pragma force_active on
-SECTION_DATA static u8 l_shadowVolDL[59 + 5 /* padding */] = {
- 0x80,
- 0x00,
- 0x18,
- 0x06,
- 0x02,
- 0x03,
- 0x07,
- 0x00,
- 0x04,
- 0x05,
- 0x01,
- 0x06,
- 0x04,
- 0x00,
- 0x02,
- 0x07,
- 0x05,
- 0x04,
- 0x06,
- 0x03,
- 0x01,
- 0x05,
- 0x07,
- 0x02,
- 0x00,
- 0x01,
- 0x03,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- /* padding */
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
+SECTION_DATA static u8 l_shadowVolDL[] ALIGN_DECL(32) = {
+ 0x80, 0x00, 0x18, 0x06, 0x02, 0x03, 0x07, 0x00, 0x04, 0x05, 0x01, 0x06, 0x04, 0x00, 0x02,
+ 0x07, 0x05, 0x04, 0x06, 0x03, 0x01, 0x05, 0x07, 0x02, 0x00, 0x01, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
#pragma pop
/* 803A88E0-803A8940 005A00 005A+06 1/1 0/0 0/0 .data l_shadowProjMat */
-SECTION_DATA static u8 l_shadowProjMat[90 + 6 /* padding */] = {
- 0x61,
- 0x28,
- 0x38,
- 0x03,
- 0xC0,
- 0x61,
- 0xC0,
- 0x08,
- 0xFF,
- 0xFF,
- 0x61,
- 0xC1,
- 0x08,
- 0xE6,
- 0x70,
- 0x61,
- 0x43,
- 0x00,
- 0x00,
- 0x01,
- 0x61,
- 0x40,
- 0x00,
- 0x00,
- 0x07,
- 0x61,
- 0x41,
- 0x00,
- 0x04,
- 0xAD,
- 0x61,
- 0xF3,
- 0x64,
- 0x00,
- 0x00,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x3F,
- 0x00,
- 0x00,
- 0x00,
- 0x01,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x09,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x61,
- 0x00,
- 0x00,
- 0x40,
- 0x01,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- /* padding */
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
+SECTION_DATA static u8 l_shadowProjMat[] ALIGN_DECL(32) = {
+ 0x61, 0x28, 0x38, 0x03, 0xC0, 0x61, 0xC0, 0x08, 0xFF, 0xFF, 0x61, 0xC1, 0x08, 0xE6, 0x70,
+ 0x61, 0x43, 0x00, 0x00, 0x01, 0x61, 0x40, 0x00, 0x00, 0x07, 0x61, 0x41, 0x00, 0x04, 0xAD,
+ 0x61, 0xF3, 0x64, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x01, 0x10,
+ 0x00, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
/* 803A8940-803A89A0 005A60 005A+06 0/0 0/0 0/0 .data l_shadowVolMat */
#pragma push
#pragma force_active on
-SECTION_DATA static u8 l_shadowVolMat[90 + 6 /* padding */] = {
- 0x61,
- 0x28,
- 0x38,
- 0x00,
- 0x00,
- 0x61,
- 0xC0,
- 0x08,
- 0xFF,
- 0xFC,
- 0x61,
- 0xC1,
- 0x08,
- 0xFF,
- 0x90,
- 0x61,
- 0x43,
- 0x00,
- 0x00,
- 0x41,
- 0x61,
- 0x40,
- 0x00,
- 0x00,
- 0x0D,
- 0x61,
- 0x41,
- 0x00,
- 0x01,
- 0x35,
- 0x61,
- 0xF3,
- 0x7F,
- 0x00,
- 0x00,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x3F,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x09,
- 0x00,
- 0x00,
- 0x00,
- 0x01,
- 0x61,
- 0x00,
- 0x00,
- 0x80,
- 0x10,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- /* padding */
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
+SECTION_DATA static u8 l_shadowVolMat[] ALIGN_DECL(32) = {
+ 0x61, 0x28, 0x38, 0x00, 0x00, 0x61, 0xC0, 0x08, 0xFF, 0xFC, 0x61, 0xC1, 0x08, 0xFF, 0x90,
+ 0x61, 0x43, 0x00, 0x00, 0x41, 0x61, 0x40, 0x00, 0x00, 0x0D, 0x61, 0x41, 0x00, 0x01, 0x35,
+ 0x61, 0xF3, 0x7F, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x10,
+ 0x00, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x80, 0x10, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
#pragma pop
/* 803A89A0-803A8A00 005AC0 0055+0B 0/1 0/0 0/0 .data l_clearMat */
#pragma push
#pragma force_active on
-SECTION_DATA static u8 l_clearMat[85 + 11 /* padding */] = {
- 0x61,
- 0x28,
- 0x38,
- 0x00,
- 0x00,
- 0x61,
- 0xC0,
- 0x08,
- 0xFF,
- 0xFF,
- 0x61,
- 0xC1,
- 0x08,
- 0xFF,
- 0xA0,
- 0x61,
- 0x40,
- 0x00,
- 0x00,
- 0x06,
- 0x61,
- 0x41,
- 0x00,
- 0x00,
- 0x14,
- 0x61,
- 0xF3,
- 0x7F,
- 0x00,
- 0x00,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x3F,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x09,
- 0x00,
- 0x00,
- 0x00,
- 0x01,
- 0x61,
- 0x00,
- 0x00,
- 0x00,
- 0x10,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- /* padding */
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
+SECTION_DATA static u8 l_clearMat[] ALIGN_DECL(32) = {
+ 0x61, 0x28, 0x38, 0x00, 0x00, 0x61, 0xC0, 0x08, 0xFF, 0xFF, 0x61, 0xC1, 0x08, 0xFF, 0xA0,
+ 0x61, 0x40, 0x00, 0x00, 0x06, 0x61, 0x41, 0x00, 0x00, 0x14, 0x61, 0xF3, 0x7F, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x09, 0x00,
+ 0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
#pragma pop
/* 803A8A00-803A8A60 005B20 0055+0B 0/1 0/0 0/0 .data l_frontMat */
#pragma push
#pragma force_active on
-SECTION_DATA static u8 l_frontMat[85 + 11 /* padding */] = {
- 0x61,
- 0x28,
- 0x38,
- 0x00,
- 0x00,
- 0x61,
- 0xC0,
- 0x08,
- 0xFF,
- 0xFF,
- 0x61,
- 0xC1,
- 0x08,
- 0xFF,
- 0x90,
- 0x61,
- 0x43,
- 0x00,
- 0x00,
- 0x41,
- 0x61,
- 0x40,
- 0x00,
- 0x00,
- 0x07,
- 0x61,
- 0x41,
- 0x00,
- 0x01,
- 0x15,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x3F,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x09,
- 0x00,
- 0x00,
- 0x00,
- 0x01,
- 0x61,
- 0x00,
- 0x00,
- 0x40,
- 0x10,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- /* padding */
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
+SECTION_DATA static u8 l_frontMat[] ALIGN_DECL(32) = {
+ 0x61, 0x28, 0x38, 0x00, 0x00, 0x61, 0xC0, 0x08, 0xFF, 0xFF, 0x61, 0xC1, 0x08, 0xFF, 0x90,
+ 0x61, 0x43, 0x00, 0x00, 0x41, 0x61, 0x40, 0x00, 0x00, 0x07, 0x61, 0x41, 0x00, 0x01, 0x15,
+ 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x09, 0x00,
+ 0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
#pragma pop
/* 803A8A60-803A8A9C 005B80 003C+00 0/1 0/0 0/0 .data l_backSubMat */
#pragma push
#pragma force_active on
-SECTION_DATA static u8 l_backSubMat[60] = {
+SECTION_DATA static u8 l_backSubMat[] ALIGN_DECL(32) = {
0x61, 0x41, 0x00, 0x09, 0x35, 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x10,
0x00, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x80, 0x10, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1129,804 +440,105 @@ SECTION_DATA static u8 l_backSubMat[60] = {
/* 803A8A9C-803A8B60 005BBC 00A8+1C 0/1 0/0 0/0 .data l_simpleShadowPos */
#pragma push
#pragma force_active on
-SECTION_DATA static u8 l_simpleShadowPos[168 + 28 /* padding */] = {
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0xBF,
- 0x80,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- 0x3F,
- 0x80,
- 0x00,
- 0x00,
- /* padding */
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
+SECTION_DATA static Vec l_simpleShadowPos[] = {
+ {0.0f, -1.0f, 0.0f}, {0.0f, 0.0f, 0.0f}, {1.0f, -1.0f, -1.0f}, {1.0f, 0.0f, -1.0f},
+ {-1.0f, -1.0f, -1.0f}, {-1.0f, 0.0f, -1.0f}, {-1.0f, -1.0f, 1.0f}, {-1.0f, 0.0f, 1.0f},
+ {1.0f, -1.0f, 1.0f}, {1.0f, 0.0f, 1.0f}, {-1.0f, 1.0f, -1.0f}, {1.0f, 1.0f, -1.0f},
+ {1.0f, 1.0f, 1.0f}, {-1.0f, 1.0f, 1.0f},
};
#pragma pop
/* 803A8B60-803A8BC0 005C80 0058+08 0/1 0/0 0/0 .data l_shadowVolumeDL */
#pragma push
#pragma force_active on
-SECTION_DATA static u8 l_shadowVolumeDL[88 + 8 /* padding */] = {
- 0x98,
- 0x00,
- 0x05,
- 0x03,
- 0x09,
- 0x01,
- 0x07,
- 0x05,
- 0x98,
- 0x00,
- 0x05,
- 0x04,
- 0x06,
- 0x00,
- 0x08,
- 0x02,
- 0x98,
- 0x00,
- 0x04,
- 0x04,
- 0x05,
- 0x06,
- 0x07,
- 0x98,
- 0x00,
- 0x04,
- 0x02,
- 0x03,
- 0x04,
- 0x05,
- 0x98,
- 0x00,
- 0x04,
- 0x08,
- 0x09,
- 0x02,
- 0x03,
- 0x98,
- 0x00,
- 0x04,
- 0x06,
- 0x07,
- 0x08,
- 0x09,
- 0x98,
- 0x00,
- 0x03,
- 0x01,
- 0x05,
- 0x03,
- 0x98,
- 0x00,
- 0x03,
- 0x00,
- 0x02,
- 0x04,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- /* padding */
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
+SECTION_DATA static u8 l_shadowVolumeDL[] ALIGN_DECL(32) = {
+ 0x98, 0x00, 0x05, 0x03, 0x09, 0x01, 0x07, 0x05, 0x98, 0x00, 0x05, 0x04, 0x06, 0x00, 0x08,
+ 0x02, 0x98, 0x00, 0x04, 0x04, 0x05, 0x06, 0x07, 0x98, 0x00, 0x04, 0x02, 0x03, 0x04, 0x05,
+ 0x98, 0x00, 0x04, 0x08, 0x09, 0x02, 0x03, 0x98, 0x00, 0x04, 0x06, 0x07, 0x08, 0x09, 0x98,
+ 0x00, 0x03, 0x01, 0x05, 0x03, 0x98, 0x00, 0x03, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
#pragma pop
/* 803A8BC0-803A8C20 005CE0 0055+0B 0/1 0/0 0/0 .data l_shadowSealTexDL */
#pragma push
#pragma force_active on
-SECTION_DATA static u8 l_shadowSealTexDL[85 + 11 /* padding */] = {
- 0x61,
- 0x28,
- 0x38,
- 0x03,
- 0xC0,
- 0x61,
- 0x40,
- 0x00,
- 0x00,
- 0x06,
- 0x61,
- 0x41,
- 0x00,
- 0x06,
- 0x15,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x3F,
- 0x00,
- 0x00,
- 0x00,
- 0x01,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x09,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x61,
- 0x00,
- 0x00,
- 0x40,
- 0x01,
- 0x80,
- 0x00,
- 0x04,
- 0x0A,
- 0x00,
- 0x00,
- 0x0B,
- 0x01,
- 0x00,
- 0x0C,
- 0x01,
- 0x01,
- 0x0D,
- 0x00,
- 0x01,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- /* padding */
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
+SECTION_DATA static u8 l_shadowSealTexDL[] ALIGN_DECL(32) = {
+ 0x61, 0x28, 0x38, 0x03, 0xC0, 0x61, 0x40, 0x00, 0x00, 0x06, 0x61, 0x41, 0x00, 0x06, 0x15,
+ 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x10, 0x09, 0x00,
+ 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x40, 0x01, 0x80, 0x00, 0x04, 0x0A, 0x00, 0x00, 0x0B,
+ 0x01, 0x00, 0x0C, 0x01, 0x01, 0x0D, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
#pragma pop
/* 803A8C20-803A8C80 005D40 0055+0B 0/1 0/0 0/0 .data l_shadowSealTex2DL */
#pragma push
#pragma force_active on
-SECTION_DATA static u8 l_shadowSealTex2DL[85 + 11 /* padding */] = {
- 0x61,
- 0x28,
- 0x38,
- 0x03,
- 0xC0,
- 0x61,
- 0x40,
- 0x00,
- 0x00,
- 0x06,
- 0x61,
- 0x41,
- 0x00,
- 0x06,
- 0x15,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x3F,
- 0x00,
- 0x00,
- 0x00,
- 0x01,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x09,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x61,
- 0x00,
- 0x00,
- 0x40,
- 0x01,
- 0x80,
- 0x00,
- 0x04,
- 0x0A,
- 0x00,
- 0x00,
- 0x0B,
- 0x02,
- 0x00,
- 0x0C,
- 0x02,
- 0x01,
- 0x0D,
- 0x00,
- 0x01,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- /* padding */
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
+SECTION_DATA static u8 l_shadowSealTex2DL[] ALIGN_DECL(32) = {
+ 0x61, 0x28, 0x38, 0x03, 0xC0, 0x61, 0x40, 0x00, 0x00, 0x06, 0x61, 0x41, 0x00, 0x06, 0x15,
+ 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x10, 0x09, 0x00,
+ 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x40, 0x01, 0x80, 0x00, 0x04, 0x0A, 0x00, 0x00, 0x0B,
+ 0x02, 0x00, 0x0C, 0x02, 0x01, 0x0D, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
#pragma pop
/* 803A8C80-803A8D00 005DA0 0069+17 0/1 0/0 0/0 .data l_shadowSealDL */
#pragma push
#pragma force_active on
-SECTION_DATA static u8 l_shadowSealDL[105 + 23 /* padding */] = {
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x0E,
- 0x00,
- 0x00,
- 0x05,
- 0x00,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x10,
- 0x00,
- 0x00,
- 0x05,
- 0x00,
- 0x61,
- 0x28,
- 0x38,
- 0x00,
- 0x00,
- 0x61,
- 0xC0,
- 0x08,
- 0xFF,
- 0xFF,
- 0x61,
- 0xC1,
- 0x08,
- 0xFF,
- 0xB0,
- 0x61,
- 0x40,
- 0x00,
- 0x00,
- 0x06,
- 0x61,
- 0x41,
- 0x00,
- 0x06,
- 0xED,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x3F,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x09,
- 0x00,
- 0x00,
- 0x00,
- 0x01,
- 0x61,
- 0x00,
- 0x00,
- 0x40,
- 0x10,
- 0x80,
- 0x00,
- 0x04,
- 0x0A,
- 0x0B,
- 0x0C,
- 0x0D,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- /* padding */
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
+SECTION_DATA static u8 l_shadowSealDL[] ALIGN_DECL(32) = {
+ 0x10, 0x00, 0x00, 0x10, 0x0E, 0x00, 0x00, 0x05, 0x00, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00,
+ 0x00, 0x05, 0x00, 0x61, 0x28, 0x38, 0x00, 0x00, 0x61, 0xC0, 0x08, 0xFF, 0xFF, 0x61, 0xC1,
+ 0x08, 0xFF, 0xB0, 0x61, 0x40, 0x00, 0x00, 0x06, 0x61, 0x41, 0x00, 0x06, 0xED, 0x10, 0x00,
+ 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00,
+ 0x01, 0x61, 0x00, 0x00, 0x40, 0x10, 0x80, 0x00, 0x04, 0x0A, 0x0B, 0x0C, 0x0D, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
#pragma pop
/* 803A8D00-803A8D7C 005E20 007B+01 1/1 0/0 0/0 .data l_matDL$5404 */
-SECTION_DATA static u8 l_matDL[123 + 1 /* padding */] = {
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x0E,
- 0x00,
- 0x00,
- 0x04,
- 0x00,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x10,
- 0x00,
- 0x00,
- 0x04,
- 0x00,
- 0x61,
- 0x28,
- 0x38,
- 0x00,
- 0x00,
- 0x61,
- 0xC0,
- 0x08,
- 0xFF,
- 0xF2,
- 0x61,
- 0xC1,
- 0x08,
- 0xFF,
- 0x90,
- 0x61,
- 0x43,
- 0x00,
- 0x00,
- 0x41,
- 0x61,
- 0xF3,
- 0x7F,
- 0x00,
- 0x00,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x3F,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x10,
- 0x00,
- 0x00,
- 0x10,
- 0x09,
- 0x00,
- 0x00,
- 0x00,
- 0x01,
- 0x61,
- 0x00,
- 0x00,
- 0x40,
- 0x10,
- 0x61,
- 0xEE,
- 0x00,
- 0x00,
- 0x00,
- 0x61,
- 0xEF,
- 0x00,
- 0x00,
- 0x00,
- 0x61,
- 0xF0,
- 0x00,
- 0x00,
- 0x00,
- 0x61,
- 0xF1,
- 0x00,
- 0x00,
- 0x00,
- 0x61,
- 0xF2,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- 0x00,
- /* padding */
- 0x00,
+SECTION_DATA static u8 l_matDL[] ALIGN_DECL(32) = {
+ 0x10, 0x00, 0x00, 0x10, 0x0E, 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,
+ 0x04, 0x00, 0x61, 0x28, 0x38, 0x00, 0x00, 0x61, 0xC0, 0x08, 0xFF, 0xF2, 0x61, 0xC1, 0x08, 0xFF,
+ 0x90, 0x61, 0x43, 0x00, 0x00, 0x41, 0x61, 0xF3, 0x7F, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3F,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x01, 0x61, 0x00, 0x00,
+ 0x40, 0x10, 0x61, 0xEE, 0x00, 0x00, 0x00, 0x61, 0xEF, 0x00, 0x00, 0x00, 0x61, 0xF0, 0x00, 0x00,
+ 0x00, 0x61, 0xF1, 0x00, 0x00, 0x00, 0x61, 0xF2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
/* 803A8D7C-803A8D8C 005E9C 0010+00 1/1 0/0 0/0 .data l_imageDrawColor$5405 */
-SECTION_DATA static GXColor l_imageDrawColor[4] = {{0xFF, 0x00, 0x00, 0x00},
- {0x00, 0xFF, 0x00, 0x00},
- {0x00, 0x00, 0xFF, 0x00},
- {0x00, 0x00, 0x00, 0xFF}};
+SECTION_DATA static GXColor l_imageDrawColor[4] = {
+ {255, 0, 0, 0},
+ {0, 255, 0, 0},
+ {0, 0, 255, 0},
+ {0, 0, 0, 255},
+};
/* 803A8D8C-803A8D9C 005EAC 0010+00 0/1 0/0 0/0 .data l_tevColorChan$5438 */
#pragma push
#pragma force_active on
-SECTION_DATA static GXTevColor l_tevColorChan[4] = {GX_CH_RED, GX_CH_GREEN, GX_CH_BLUE,
- GX_CH_ALPHA};
+SECTION_DATA static GXTevColor l_tevColorChan[4] = {
+ GX_CH_RED,
+ GX_CH_GREEN,
+ GX_CH_BLUE,
+ GX_CH_ALPHA,
+};
#pragma pop
/* 803A8D9C-803A8DCC 005EBC 0030+00 0/0 0/0 0/0 .data mtx_adj$5842 */
#pragma push
#pragma force_active on
-SECTION_DATA static u8 mtx_adj[48] = {
- 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+SECTION_DATA static Mtx mtx_adj = {
+ {0.5f, 0.0f, 0.0f, 0.5f},
+ {0.0f, -0.5f, 0.0f, 0.5f},
+ {0.0f, 0.0f, 1.0f, 0.0f},
};
#pragma pop
@@ -2759,52 +1371,20 @@ dDlst_shadowSimple_c::dDlst_shadowSimple_c() {
/* ############################################################################################## */
/* 8037A178-8037A1A4 0067D8 002A+02 1/1 0/0 0/0 .rodata l_drawlistSize$5656 */
SECTION_RODATA static u16 const l_drawlistSize[21] = {
- 0x0001,
- 0x0001,
- 0x0001,
- 0x0080,
- 0x0001,
- 0x0001,
- 0x0001,
- 0x0080,
- 0x0100,
- 0x0001,
- 0x0100,
- 0x0001,
- 0x0020,
- 0x0010,
- 0x0010,
- 0x0020,
- 0x0020,
- 0x0100,
- 0x0001,
- 0x0004,
- 0x0004,
+ 0x0001, 0x0001, 0x0001, 0x0080, 0x0001, 0x0001, 0x0001, 0x0080, 0x0100, 0x0001, 0x0100,
+ 0x0001, 0x0020, 0x0010, 0x0010, 0x0020, 0x0020, 0x0100, 0x0001, 0x0004, 0x0004,
};
COMPILER_STRIP_GATE(0x8037A178, &l_drawlistSize);
/* 8037A1A4-8037A1B0 006804 0009+03 1/1 0/0 0/0 .rodata l_nonSortId$5662 */
SECTION_RODATA static u8 const l_nonSortId[9] = {
- 0x00,
- 0x01,
- 0x02,
- 0x04,
- 0x05,
- 0x06,
- 0x09,
- 0x12,
- 0x0D,
+ 0x00, 0x01, 0x02, 0x04, 0x05, 0x06, 0x09, 0x12, 0x0D,
};
COMPILER_STRIP_GATE(0x8037A1A4, &l_nonSortId);
/* 804520C4-804520CC 0006C4 0006+02 1/1 0/0 0/0 .sdata2 l_zSortId$5668 */
SECTION_SDATA2 static u8 l_zSortId[6] = {
- 0x08,
- 0x0A,
- 0x0C,
- 0x0E,
- 0x10,
- 0x11,
+ 0x08, 0x0A, 0x0C, 0x0E, 0x10, 0x11,
};
/* 80056390-8005648C 050CD0 00FC+00 0/0 1/1 0/0 .text init__12dDlst_list_cFv */
@@ -2812,7 +1392,7 @@ SECTION_SDATA2 static u8 l_zSortId[6] = {
void dDlst_list_c::init() {
J3DDrawBuffer** buffer = mDrawBuffers;
const u16* size = l_drawlistSize;
-
+
for (int i = 0; i < 21; i++) {
u32 bufSize = *size;
size++;
@@ -2959,7 +1539,7 @@ u8 dDlst_list_c::mWipe;
f32 dDlst_list_c::mWipeRate;
/* 80450ED8-80450EE0 0003D8 0004+04 2/2 0/0 0/0 .sbss mWipeSpeed__12dDlst_list_c */
-f32 dDlst_list_c::mWipeSpeed[1 + 1 /* padding */];
+f32 dDlst_list_c::mWipeSpeed;
/* 804520D0-804520D4 0006D0 0004+00 1/1 0/0 0/0 .sdata2 @5809 */
SECTION_SDATA2 static f32 lit_5809 = 608.0f;
@@ -2972,24 +1552,35 @@ SECTION_SDATA2 static f32 lit_5811 = 2.436000108718872f;
/* 8005681C-800568D8 05115C 00BC+00 1/1 0/0 0/0 .text wipeIn__12dDlst_list_cFfR8_GXColor
*/
+// matches with literals
+#ifdef NONMATCHING
+void dDlst_list_c::wipeIn(f32 i_wipeSpeed, GXColor& i_wipeColor) {
+ mWipe = true;
+ mWipeSpeed = i_wipeSpeed;
+ mWipeColor = i_wipeColor;
+ mWipeRate = i_wipeSpeed >= 0.0f ? 0.0f : 1.0f;
+
+ JKRArchive* main2d = dComIfGp_getMain2DArchive();
+ ResTIMG* texture = (ResTIMG*)JKRArchive::getGlbResource('TIMG', "wipe_00.bti", main2d);
+
+ mWipeDlst.init(texture, mDoGph_gInf_c::getMinX(), mDoGph_gInf_c::getMinY(),
+ mDoGph_gInf_c::getWidth(), mDoGph_gInf_c::getHeight(), 0, 1, 1, 2.0f, 2.436f);
+}
+#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
-asm void dDlst_list_c::wipeIn(f32 param_0, _GXColor& param_1) {
+asm void dDlst_list_c::wipeIn(f32 i_wipeSpeed, GXColor& i_wipeColor) {
nofralloc
#include "asm/d/d_drawlist/wipeIn__12dDlst_list_cFfR8_GXColor.s"
}
#pragma pop
+#endif
/* 800568D8-80056900 051218 0028+00 0/0 1/1 0/0 .text wipeIn__12dDlst_list_cFf */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dDlst_list_c::wipeIn(f32 param_0) {
- nofralloc
-#include "asm/d/d_drawlist/wipeIn__12dDlst_list_cFf.s"
+void dDlst_list_c::wipeIn(f32 i_wipeSpeed) {
+ wipeIn(-i_wipeSpeed, g_blackColor);
}
-#pragma pop
/* ############################################################################################## */
/* 804520DC-804520E0 0006DC 0004+00 1/1 0/0 0/0 .sdata2 @5838 */
@@ -3060,6 +1651,6 @@ SECTION_DATA extern void* __vt__13dDlst_2DTri_c[3] = {
/* 80450EE0-80450EE8 0003E0 0008+00 0/0 1/1 0/0 .sbss None */
extern u8 data_80450EE0[8];
-u8 data_80450EE0[8];
+u8 data_80450EE0[8] ALIGN_DECL(8);
/* 8037A1B0-8037A1B0 006810 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
diff --git a/src/d/d_gameover.cpp b/src/d/d_gameover.cpp
index 6385a1aa39..db84dfce6f 100644
--- a/src/d/d_gameover.cpp
+++ b/src/d/d_gameover.cpp
@@ -4,128 +4,23 @@
//
#include "d/d_gameover.h"
+#include "d/com/d_com_inf_game.h"
+#include "d/d_procname.h"
+#include "d/menu/d_menu_save.h"
+#include "d/meter/d_meter_HIO.h"
#include "dol2asm.h"
-#include "dolphin/types.h"
+#include "f_op/f_op_msg_mng.h"
//
// Types:
//
-struct request_of_phase_process_class {};
-
-struct mDoRst {
- static u8 mResetData[4 + 4 /* padding */];
-};
-
-struct mDoGph_gInf_c {
- static u8 mFadeColor[4];
- static u8 mFader[4];
- static u8 mFrameBufferTimg[4];
- static u8 mFrameBufferTex[4];
- static u8 mZbufferTex[4];
- static f32 mFadeRate;
-};
-
-struct dSv_player_item_c {
- /* 80032FB8 */ void setItem(int, u8);
- /* 80033030 */ void getItem(int, bool) const;
-};
-
-struct dSv_player_get_item_c {
- /* 80033EC8 */ void isFirstBit(u8) const;
-};
-
-struct dSv_event_flag_c {
- static u8 saveBitLabels[1644 + 4 /* padding */];
-};
-
-struct dSv_event_c {
- /* 800349A4 */ void offEventBit(u16);
- /* 800349BC */ void isEventBit(u16) const;
-};
-
-struct dRes_info_c {};
-
-struct dRes_control_c {
- /* 8003C1E4 */ void getResInfo(char const*, dRes_info_c*, int);
-};
-
-struct JUtility {
- struct TColor {};
-};
-
struct dMsgScrnLight_c {
/* 80245934 */ dMsgScrnLight_c(u8, u8);
/* 80245F90 */ void draw(f32*, f32, f32, f32, f32, f32, f32, JUtility::TColor,
JUtility::TColor);
-};
-
-struct JMSMesgEntry_c {};
-
-struct dMeter2Info_c {
- /* 8021C250 */ void getString(u32, char*, JMSMesgEntry_c*);
- /* 8021E0C4 */ void resetMiniGameItem(bool);
-};
-
-struct dMenu_save_c {
- /* 8019C314 */ ~dMenu_save_c();
- /* 801EF6A0 */ dMenu_save_c();
- /* 801EF7AC */ void _create();
- /* 801F09AC */ void _open();
- /* 801F0B28 */ void _delete();
- /* 801F1048 */ void _move();
- /* 801F69FC */ void _draw2();
-};
-
-class dGov_HIO_c {
-public:
- /* 8019AFE0 */ dGov_HIO_c();
- /* 8019C06C */ virtual ~dGov_HIO_c();
-
- /* 0x04 */ s8 field_0x4;
- /* 0x08 */ f32 mScale;
- /* 0x0C */ f32 mAlpha;
- /* 0x10 */ f32 mAnimSpeed;
- /* 0x14 */ GXColor mBlack;
- /* 0x18 */ GXColor mWhite;
-}; // Size: 0x1C
-
-struct dDlst_base_c {};
-struct dDlst_list_c {
- /* 80056794 */ void set(dDlst_base_c**&, dDlst_base_c**&, dDlst_base_c*);
-};
-
-struct dDlst_Gameover_CAPTURE_c {
- /* 8019ACF8 */ void draw();
- /* 8019C2CC */ ~dDlst_Gameover_CAPTURE_c();
-};
-
-struct dDlst_GameOverScrnDraw_c {
- /* 8019B940 */ dDlst_GameOverScrnDraw_c(JKRArchive*);
- /* 8019BBFC */ ~dDlst_GameOverScrnDraw_c();
- /* 8019BCB0 */ void setBackAlpha(f32);
- /* 8019BCF4 */ void draw();
-};
-
-struct JFWDisplay {
- static u8 sManager[4];
-};
-
-struct J2DTextBox {
- /* 80300660 */ void setString(char const*, ...);
-};
-
-struct J2DGrafContext {};
-
-struct J2DScreen {
- /* 802F8498 */ J2DScreen();
- /* 802F8648 */ void setPriority(char const*, u32, JKRArchive*);
- /* 802F8ED4 */ void draw(f32, f32, J2DGrafContext const*);
-};
-
-struct J2DPicture {
- /* 802FC800 */ J2DPicture(u64, JGeometry::TBox2<f32> const&, ResTIMG const*, ResTLUT const*);
+ /* 0x00 */ u8 field_0x0[0x24];
};
//
@@ -221,26 +116,19 @@ extern "C" void _savegpr_29();
extern "C" void _restgpr_24();
extern "C" void _restgpr_28();
extern "C" void _restgpr_29();
-extern "C" void strcmp();
-extern "C" extern u8 g_mDoMtx_identity[48 + 24 /* padding */];
extern "C" extern void* g_fopMsg_Method[5 + 1 /* padding */];
extern "C" extern void* __vt__12dDlst_base_c[3];
extern "C" u8 saveBitLabels__16dSv_event_flag_c[1644 + 4 /* padding */];
extern "C" extern void* __vt__14mDoHIO_entry_c[3];
extern "C" extern void* __vt__16dDlst_MenuSave_c[4];
extern "C" extern void* __vt__23dDlst_MenuSaveExplain_c[4 + 18 /* padding */];
-extern "C" extern u8 g_dComIfG_gameInfo[122384];
-extern "C" extern u8 g_meter2_info[248];
extern "C" u8 mFadeColor__13mDoGph_gInf_c[4];
-extern "C" extern u8 g_clearColor[4];
-extern "C" extern u32 g_blackColor;
extern "C" u8 mFader__13mDoGph_gInf_c[4];
extern "C" u8 mFrameBufferTimg__13mDoGph_gInf_c[4];
extern "C" u8 mFrameBufferTex__13mDoGph_gInf_c[4];
extern "C" u8 mZbufferTex__13mDoGph_gInf_c[4];
extern "C" f32 mFadeRate__13mDoGph_gInf_c;
extern "C" u8 mResetData__6mDoRst[4 + 4 /* padding */];
-extern "C" extern u8 g_menuHIO[8];
extern "C" u8 sManager__10JFWDisplay[4];
//
@@ -264,6 +152,65 @@ SECTION_SDATA2 static f32 lit_3870 = 10.0f;
/* 8019ACF8-8019AFE0 195638 02E8+00 1/0 0/0 0/0 .text draw__24dDlst_Gameover_CAPTURE_cFv
*/
+// matches with literals
+#ifdef NONMATCHING
+void dDlst_Gameover_CAPTURE_c::draw() {
+ GXTexObj tex_obj;
+ Mtx44 m;
+
+ GXSetTexCopySrc(0, 0, 608, 448);
+ GXSetTexCopyDst(304, 224, GX_TF_RGB565, 1);
+ GXCopyTex(mDoGph_gInf_c::mZbufferTex, 0);
+ GXPixModeSync();
+ GXInitTexObj(&tex_obj, mDoGph_gInf_c::mFrameBufferTex, 304, 224,
+ (GXTexFmt)mDoGph_gInf_c::mFrameBufferTimg->format, GX_CLAMP, GX_CLAMP, GX_FALSE);
+ GXInitTexObjLOD(&tex_obj, GX_LINEAR, GX_LINEAR, 0.0f, 0.0f, 0.0f, GX_FALSE, GX_FALSE,
+ GX_ANISO_1);
+ GXLoadTexObj(&tex_obj, GX_TEXMAP0);
+ GXSetNumChans(0);
+ GXSetNumTexGens(1);
+ GXSetTexCoordGen2(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, 60, GX_FALSE, 125);
+ GXSetNumTevStages(1);
+ GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR_NULL);
+ GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_ZERO, GX_CC_ZERO, GX_CC_ZERO, GX_CC_TEXC);
+ GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
+ GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO);
+ GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
+ GXSetZCompLoc(1);
+ GXSetZMode(GX_FALSE, GX_ALWAYS, GX_FALSE);
+ GXSetBlendMode(GX_BM_NONE, GX_BL_ZERO, GX_BL_ZERO, GX_LO_OR);
+ GXSetAlphaCompare(GX_ALWAYS, 0, GX_AOP_OR, GX_ALWAYS, 0);
+ GXSetFog(GX_FOG_NONE, 0.0f, 0.0f, 0.0f, 0.0f, g_clearColor);
+ GXSetFogRangeAdj(GX_FALSE, 0, NULL);
+ GXSetCullMode(GX_CULL_NONE);
+ GXSetDither(1);
+ C_MTXOrtho(m, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 10.0f);
+ GXSetProjection(m, GX_ORTHOGRAPHIC);
+ GXLoadPosMtxImm(g_mDoMtx_identity, GX_PNMTX0);
+ GXSetCurrentMtx(0);
+ GXClearVtxDesc();
+ GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
+ GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
+ GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_RGB8, 0);
+ GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGB8, 0);
+
+ GXBegin(GX_QUADS, GX_VTXFMT0, 4);
+
+ GXPosition3s8(0, 0, -5);
+ GXTexCoord2s8(0, 0);
+
+ GXPosition3s8(1, 0, -5);
+ GXTexCoord2s8(1, 0);
+
+ GXPosition3s8(1, 1, -5);
+ GXTexCoord2s8(1, 1);
+
+ GXPosition3s8(0, 1, -5);
+ GXTexCoord2s8(0, 1);
+
+ i_GXEnd();
+}
+#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -272,6 +219,7 @@ asm void dDlst_Gameover_CAPTURE_c::draw() {
#include "asm/d/d_gameover/draw__24dDlst_Gameover_CAPTURE_cFv.s"
}
#pragma pop
+#endif
/* ############################################################################################## */
/* 803BBB50-803BBB5C 018C70 000C+00 1/1 0/0 0/0 .data cNullVec__6Z2Calc */
@@ -380,6 +328,13 @@ SECTION_DATA static u8 init_process[108] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
+/* typedef void (dGameover_c::*initFunc)();
+SECTION_DATA initFunc init_process[] = {
+ &dGameover_c::playerAnmWait_init, &dGameover_c::dispFadeOut_init, &dGameover_c::dispWait_init,
+ &dGameover_c::demoFadeIn_init, &dGameover_c::demoFadeOut_init, &dGameover_c::saveOpen_init,
+ &dGameover_c::saveMove_init, &dGameover_c::saveClose_init, &dGameover_c::deleteWait_init,
+}; */
+
/* 803BBC34-803BBC40 -00001 000C+00 0/1 0/0 0/0 .data @3892 */
#pragma push
#pragma force_active on
@@ -481,10 +436,16 @@ SECTION_DATA static u8 move_process[108] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
+/* typedef void (dGameover_c::*moveFunc)();
+SECTION_DATA moveFunc move_process[] = {
+ &dGameover_c::playerAnmWait_proc, &dGameover_c::dispFadeOut_proc, &dGameover_c::dispWait_proc,
+ &dGameover_c::demoFadeIn_proc, &dGameover_c::demoFadeOut_proc, &dGameover_c::saveOpen_proc,
+ &dGameover_c::saveMove_proc, &dGameover_c::saveClose_proc, &dGameover_c::deleteWait_proc,
+}; */
+
/* 803BBD0C-803BBD2C 018E2C 0020+00 1/1 0/0 0/0 .data offset$4331 */
-SECTION_DATA static u8 offset[32] = {
- 0xC3, 0x0A, 0x00, 0x00, 0xC2, 0xC0, 0x00, 0x00, 0xC2, 0x60, 0x00, 0x00, 0xC1, 0x90, 0x00, 0x00,
- 0x42, 0x28, 0x00, 0x00, 0x42, 0x96, 0x00, 0x00, 0x42, 0xDC, 0x00, 0x00, 0x43, 0x0F, 0x00, 0x00,
+SECTION_DATA static f32 offset[8] = {
+ -138.0f, -96.0f, -56.0f, -18.0f, 42.0f, 75.0f, 110.0f, 143.0f,
};
/* 803BBD2C-803BBD40 -00001 0014+00 1/0 0/0 0/0 .data l_dGameover_Method */
@@ -533,21 +494,22 @@ SECTION_DATA extern void* __vt__10dGov_HIO_c[3 + 3 /* padding */] = {
NULL,
};
-/* 80453B8C-80453B90 00218C 0004+00 1/1 0/0 0/0 .sdata2 @3878 */
-SECTION_SDATA2 static f32 lit_3878 = 27.0f / 10.0f;
-
-/* 80453B90-80453B94 002190 0004+00 1/1 0/0 0/0 .sdata2 @3879 */
-SECTION_SDATA2 static f32 lit_3879 = 1.0f / 5.0f;
-
/* 8019AFE0-8019B044 195920 0064+00 1/1 0/0 0/0 .text __ct__10dGov_HIO_cFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm dGov_HIO_c::dGov_HIO_c() {
- nofralloc
-#include "asm/d/d_gameover/__ct__10dGov_HIO_cFv.s"
+dGov_HIO_c::dGov_HIO_c() {
+ mScale = 2.7f;
+ mAlpha = lit_3869;
+ mAnimSpeed = 0.2f;
+
+ mBlack.r = 0;
+ mBlack.g = 0;
+ mBlack.b = 0;
+ mBlack.a = 0;
+
+ mWhite.r = 255;
+ mWhite.g = 220;
+ mWhite.b = 125;
+ mWhite.a = 255;
}
-#pragma pop
/* ############################################################################################## */
/* 80394C28-80394C28 021288 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
@@ -566,207 +528,288 @@ SECTION_DATA extern void* __vt__24dDlst_Gameover_CAPTURE_c[4] = {
};
/* 8019B044-8019B2F4 195984 02B0+00 1/1 0/0 0/0 .text _create__11dGameover_cFv */
+#ifdef NONMATCHING
+int dGameover_c::_create() {
+ int phase = dComIfG_resLoad(&mPhase, "Gover");
+
+ if (dComIfGp_isPauseFlag() ||
+ (dComIfGp_isHeapLockFlag() != 0 && dComIfGp_isHeapLockFlag() != 6) ||
+ dComIfGp_getMesgStatus() != 0)
+ {
+ return 0;
+ }
+
+ if (phase == cPhs_COMPLEATE_e) {
+ if (dMeter2Info_getGameOverType() == 0) {
+ mDoGph_gInf_c::setFadeColor(*(JUtility::TColor*)&g_blackColor);
+ dComIfGs_addDeathCount();
+ }
+
+ dRes_info_c* resInfo = dComIfG_getObjectResInfo("Gover");
+
+ mpHeap = dComIfGp_getExpHeap2D();
+ dComIfGp_setHeapLockFlag(6);
+ JKRHeap* old_heap = mDoExt_setCurrentHeap(mpHeap);
+ mpHeap->getTotalFreeSize();
+
+ dgo_screen_c = new dDlst_GameOverScrnDraw_c(resInfo->getArchive());
+ dMs_c = new dMenu_save_c();
+
+ if (dMeter2Info_getGameOverType() == 1) {
+ if (!strcmp(dComIfGp_getLastPlayStageName(), "D_MN10A")) {
+ // Last stage was Stallord Arena
+ // Remove Ooccoo from inventory
+ dComIfGs_setItem(SLOT_18, NO_ITEM);
+ dComIfGs_resetLastWarpAcceptStage();
+ }
+
+ dMs_c->setUseType(3);
+ } else if (dMeter2Info_getGameOverType() == 2) {
+ dMs_c->setUseType(4);
+ } else {
+ dMs_c->setUseType(2);
+ }
+
+ dMs_c->_create();
+ dgo_capture_c = new dDlst_Gameover_CAPTURE_c();
+
+ mDoExt_setCurrentHeap(old_heap);
+ field_0x116 = g_menuHIO.mGameover;
+
+ if (dMeter2Info_getGameOverType() == 1 || dMeter2Info_getGameOverType() == 2) {
+ mIsDemoSave = true;
+ mProc = PROC_DEMO_FADE_IN;
+ dgo_screen_c->setBackAlpha(1.0f);
+ } else {
+ mIsDemoSave = false;
+ mProc = PROC_PLAYER_ANM_WAIT;
+ }
+
+ (this->*init_process[mProc])();
+ return cPhs_COMPLEATE_e;
+ }
+
+ return phase;
+}
+#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
-asm void dGameover_c::_create() {
+asm int dGameover_c::_create() {
nofralloc
#include "asm/d/d_gameover/_create__11dGameover_cFv.s"
}
#pragma pop
+#endif
/* 8019B2F4-8019B384 195C34 0090+00 1/1 0/0 0/0 .text _execute__11dGameover_cFv */
+// matches with sinit
+#ifdef NONMATCHING
+int dGameover_c::_execute() {
+ JKRHeap* old_heap = mDoExt_setCurrentHeap(mpHeap);
+ u8 old_proc = mProc;
+
+ (this->*move_process[mProc])();
+ if (mProc != old_proc) {
+ (this->*init_process[mProc])();
+ }
+
+ mDoExt_setCurrentHeap(old_heap);
+ return 1;
+}
+#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
-asm void dGameover_c::_execute() {
+asm int dGameover_c::_execute() {
nofralloc
#include "asm/d/d_gameover/_execute__11dGameover_cFv.s"
}
#pragma pop
+#endif
/* 8019B384-8019B388 195CC4 0004+00 1/0 0/0 0/0 .text playerAnmWait_init__11dGameover_cFv
*/
-void dGameover_c::playerAnmWait_init() {
- /* empty function */
-}
+void dGameover_c::playerAnmWait_init() {}
/* 8019B388-8019B3A0 195CC8 0018+00 1/0 0/0 0/0 .text playerAnmWait_proc__11dGameover_cFv
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dGameover_c::playerAnmWait_proc() {
- nofralloc
-#include "asm/d/d_gameover/playerAnmWait_proc__11dGameover_cFv.s"
+void dGameover_c::playerAnmWait_proc() {
+ if (mIsDemoSave) {
+ mProc = PROC_DISP_FADE_OUT;
+ }
}
-#pragma pop
/* 8019B3A0-8019B3E8 195CE0 0048+00 1/0 0/0 0/0 .text dispFadeOut_init__11dGameover_cFv
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dGameover_c::dispFadeOut_init() {
- nofralloc
-#include "asm/d/d_gameover/dispFadeOut_init__11dGameover_cFv.s"
+void dGameover_c::dispFadeOut_init() {
+ mTimer = 30;
+ mDoGph_gInf_c::startFadeOut(15);
}
-#pragma pop
/* 8019B3E8-8019B40C 195D28 0024+00 1/0 0/0 0/0 .text dispFadeOut_proc__11dGameover_cFv
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dGameover_c::dispFadeOut_proc() {
- nofralloc
-#include "asm/d/d_gameover/dispFadeOut_proc__11dGameover_cFv.s"
+void dGameover_c::dispFadeOut_proc() {
+ if (mTimer != 0) {
+ mTimer--;
+ } else {
+ mProc = PROC_DISP_WAIT;
+ }
}
-#pragma pop
/* 8019B40C-8019B454 195D4C 0048+00 1/0 0/0 0/0 .text dispWait_init__11dGameover_cFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dGameover_c::dispWait_init() {
- nofralloc
-#include "asm/d/d_gameover/dispWait_init__11dGameover_cFv.s"
+void dGameover_c::dispWait_init() {
+ mTimer = 90;
+ mDoGph_gInf_c::startFadeIn(30);
}
-#pragma pop
/* 8019B454-8019B478 195D94 0024+00 1/0 0/0 0/0 .text dispWait_proc__11dGameover_cFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dGameover_c::dispWait_proc() {
- nofralloc
-#include "asm/d/d_gameover/dispWait_proc__11dGameover_cFv.s"
+void dGameover_c::dispWait_proc() {
+ if (mTimer != 0) {
+ mTimer--;
+ } else {
+ mProc = PROC_SAVE_OPEN;
+ }
}
-#pragma pop
/* 8019B478-8019B484 195DB8 000C+00 1/0 0/0 0/0 .text demoFadeIn_init__11dGameover_cFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dGameover_c::demoFadeIn_init() {
- nofralloc
-#include "asm/d/d_gameover/demoFadeIn_init__11dGameover_cFv.s"
+void dGameover_c::demoFadeIn_init() {
+ mTimer = 0;
}
-#pragma pop
/* 8019B484-8019B4D8 195DC4 0054+00 1/0 0/0 0/0 .text demoFadeIn_proc__11dGameover_cFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dGameover_c::demoFadeIn_proc() {
- nofralloc
-#include "asm/d/d_gameover/demoFadeIn_proc__11dGameover_cFv.s"
+void dGameover_c::demoFadeIn_proc() {
+ mTimer++;
+ dgo_screen_c->setBackAlpha(lit_3869);
+
+ if (mTimer >= 30) {
+ mProc = PROC_SAVE_OPEN;
+ }
}
-#pragma pop
/* 8019B4D8-8019B4E4 195E18 000C+00 1/0 0/0 0/0 .text demoFadeOut_init__11dGameover_cFv
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dGameover_c::demoFadeOut_init() {
- nofralloc
-#include "asm/d/d_gameover/demoFadeOut_init__11dGameover_cFv.s"
+void dGameover_c::demoFadeOut_init() {
+ mTimer = 30;
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 80453B94-80453B98 002194 0004+00 1/1 0/0 0/0 .sdata2 @4069 */
-SECTION_SDATA2 static f32 lit_4069 = 900.0f;
-
-/* 80453B98-80453BA0 002198 0008+00 1/1 0/0 0/0 .sdata2 @4071 */
-SECTION_SDATA2 static f64 lit_4071 = 4503601774854144.0 /* cast s32 to float */;
/* 8019B4E4-8019B560 195E24 007C+00 1/0 0/0 0/0 .text demoFadeOut_proc__11dGameover_cFv
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dGameover_c::demoFadeOut_proc() {
- nofralloc
-#include "asm/d/d_gameover/demoFadeOut_proc__11dGameover_cFv.s"
+void dGameover_c::demoFadeOut_proc() {
+ mTimer--;
+ dgo_screen_c->setBackAlpha((mTimer * mTimer) / 900.0f);
+
+ if (mTimer <= 0) {
+ mProc = PROC_DELETE_WAIT;
+ }
}
-#pragma pop
/* 8019B560-8019B564 195EA0 0004+00 1/0 0/0 0/0 .text saveOpen_init__11dGameover_cFv */
-void dGameover_c::saveOpen_init() {
- /* empty function */
-}
+void dGameover_c::saveOpen_init() {}
/* 8019B564-8019B5A4 195EA4 0040+00 1/0 0/0 0/0 .text saveOpen_proc__11dGameover_cFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dGameover_c::saveOpen_proc() {
- nofralloc
-#include "asm/d/d_gameover/saveOpen_proc__11dGameover_cFv.s"
+void dGameover_c::saveOpen_proc() {
+ if (dMs_c->_open()) {
+ mProc = PROC_SAVE_MOVE;
+ }
}
-#pragma pop
/* 8019B5A4-8019B5A8 195EE4 0004+00 1/0 0/0 0/0 .text saveMove_init__11dGameover_cFv */
-void dGameover_c::saveMove_init() {
- /* empty function */
-}
+void dGameover_c::saveMove_init() {}
/* 8019B5A8-8019B5F0 195EE8 0048+00 1/0 0/0 0/0 .text saveMove_proc__11dGameover_cFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dGameover_c::saveMove_proc() {
- nofralloc
-#include "asm/d/d_gameover/saveMove_proc__11dGameover_cFv.s"
+void dGameover_c::saveMove_proc() {
+ dMs_c->_move();
+
+ if (dMs_c->getSaveStatus() == 3) {
+ mProc = PROC_SAVE_CLOSE;
+ }
}
-#pragma pop
/* 8019B5F0-8019B5F4 195F30 0004+00 1/0 0/0 0/0 .text saveClose_init__11dGameover_cFv */
-void dGameover_c::saveClose_init() {
- /* empty function */
-}
+void dGameover_c::saveClose_init() {}
/* 8019B5F4-8019B7BC 195F34 01C8+00 1/0 0/0 0/0 .text saveClose_proc__11dGameover_cFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dGameover_c::saveClose_proc() {
- nofralloc
-#include "asm/d/d_gameover/saveClose_proc__11dGameover_cFv.s"
+void dGameover_c::saveClose_proc() {
+ if (dMs_c->getEndStatus() == 0) {
+ dComIfGp_setGameoverStatus(3);
+ dComIfGp_offPauseFlag();
+ mDoRst::onReset();
+ } else if (dMs_c->getEndStatus() == 1) {
+ if (dMeter2Info_getGameOverType() == 1 || dMeter2Info_getGameOverType() == 2) {
+ dComIfGp_setGameoverStatus(1);
+ } else {
+ dComIfGp_setGameoverStatus(2);
+ }
+
+ dComIfGp_offPauseFlag();
+
+ // Reset Monkey lantern steal sequence flags if player hasn't regained lantern
+ if (!i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[226])) {
+ dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[224]);
+ dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[225]);
+ }
+
+ // Reset Lantern and oil status back into inventory if gameover during monkey steal sequence
+ if (i_dComIfGs_isItemFirstBit(KANTERA) && dComIfGs_getItem(SLOT_1, true) == NO_ITEM) {
+ dComIfGs_setItem(SLOT_1, KANTERA);
+ dComIfGs_setOil(dMeter2Info_getOilGaugeBackUp());
+ }
+
+ dMeter2Info_resetMiniGameItem(false);
+ }
+
+ if (dMeter2Info_getGameOverType() == 1 && dMeter2Info_getGameOverType() == 2 &&
+ dComIfGp_getGameoverStatus() == 1)
+ {
+ mProc = PROC_DEMO_FADE_OUT;
+ } else {
+ mProc = PROC_DELETE_WAIT;
+ }
}
-#pragma pop
/* 8019B7BC-8019B7C0 1960FC 0004+00 1/0 0/0 0/0 .text deleteWait_init__11dGameover_cFv */
-void dGameover_c::deleteWait_init() {
- /* empty function */
-}
+void dGameover_c::deleteWait_init() {}
/* 8019B7C0-8019B7C4 196100 0004+00 1/0 0/0 0/0 .text deleteWait_proc__11dGameover_cFv */
-void dGameover_c::deleteWait_proc() {
- /* empty function */
-}
+void dGameover_c::deleteWait_proc() {}
/* 8019B7C4-8019B864 196104 00A0+00 1/1 0/0 0/0 .text _draw__11dGameover_cFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dGameover_c::_draw() {
- nofralloc
-#include "asm/d/d_gameover/_draw__11dGameover_cFv.s"
+int dGameover_c::_draw() {
+ if (dgo_capture_c != NULL && dComIfGp_isPauseFlag()) {
+ dComIfGd_set2DOpa(dgo_capture_c);
+ }
+
+ if (mIsDemoSave && mProc >= PROC_DISP_WAIT) {
+ if (dgo_screen_c != NULL) {
+ dComIfGd_set2DOpa(dgo_screen_c);
+ }
+ dMs_c->_draw2();
+ }
+
+ return 1;
}
-#pragma pop
/* 8019B864-8019B940 1961A4 00DC+00 1/1 0/0 0/0 .text _delete__11dGameover_cFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dGameover_c::_delete() {
- nofralloc
-#include "asm/d/d_gameover/_delete__11dGameover_cFv.s"
+int dGameover_c::_delete() {
+ JKRHeap* old_heap = mDoExt_setCurrentHeap(mpHeap);
+
+ if (dgo_screen_c != NULL) {
+ delete dgo_screen_c;
+ dgo_screen_c = NULL;
+ }
+
+ dMs_c->_delete();
+ delete dMs_c;
+ delete dgo_capture_c;
+
+ mpHeap->freeAll();
+ dComIfGp_offHeapLockFlag(0);
+ mDoExt_setCurrentHeap(old_heap);
+
+ dComIfG_resDelete(&mPhase, "Gover");
+ return 1;
}
-#pragma pop
/* ############################################################################################## */
/* 80394C28-80394C28 021288 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
@@ -786,6 +829,46 @@ SECTION_SDATA2 static f32 lit_4291 = 660.0f;
/* 8019B940-8019BBFC 196280 02BC+00 1/1 0/0 0/0 .text
* __ct__24dDlst_GameOverScrnDraw_cFP10JKRArchive */
+// matches with literals
+#ifdef NONMATCHING
+dDlst_GameOverScrnDraw_c::dDlst_GameOverScrnDraw_c(JKRArchive* i_archive) {
+ mpScreen = new J2DScreen();
+ mpScreen->setPriority("zelda_game_over.blo", 0x100000, i_archive);
+ dPaneClass_showNullPane(mpScreen);
+
+ mFadeColor.set(0, 0, 0, 0);
+
+ if (dMeter2Info_getGameOverType() != 0) {
+ mpScreen->search('n_base')->hide();
+
+ if (mDoGph_gInf_c::getFadeRate() == 1.0f) {
+ mFadeColor = mDoGph_gInf_c::getFadeColor();
+ }
+ }
+
+ mpScreen->search('base_b')->hide();
+
+ JUtility::TColor img_white(mFadeColor);
+ JUtility::TColor img_black(mFadeColor);
+ img_white.a = 0;
+ img_black.a = 255;
+
+ ResTIMG* img = (ResTIMG*)dComIfGp_getMain2DArchive()->getResource('TIMG', "tt_block8x8.bti");
+ mpBackImg =
+ new J2DPicture('PICT01', JGeometry::TBox2<f32>(0.0f, 486.0f, 0.0f, 660.0f), img, NULL);
+ mpBackImg->setBlackWhite(img_white, img_black);
+
+ J2DTextBox* gold_tbox = (J2DTextBox*)mpScreen->search('gold_00');
+ gold_tbox->setFont(mDoExt_getSubFont());
+
+ char string[64];
+ dMeter2Info_getString(0x381, string, NULL);
+ gold_tbox->setString(string);
+
+ mpLight = new dMsgScrnLight_c(6, 0xFF);
+ field_0x10 = 0.0f;
+}
+#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -794,39 +877,21 @@ asm dDlst_GameOverScrnDraw_c::dDlst_GameOverScrnDraw_c(JKRArchive* param_0) {
#include "asm/d/d_gameover/__ct__24dDlst_GameOverScrnDraw_cFP10JKRArchive.s"
}
#pragma pop
+#endif
/* 8019BBFC-8019BCB0 19653C 00B4+00 1/0 0/0 0/0 .text __dt__24dDlst_GameOverScrnDraw_cFv
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm dDlst_GameOverScrnDraw_c::~dDlst_GameOverScrnDraw_c() {
- nofralloc
-#include "asm/d/d_gameover/__dt__24dDlst_GameOverScrnDraw_cFv.s"
+dDlst_GameOverScrnDraw_c::~dDlst_GameOverScrnDraw_c() {
+ delete mpBackImg;
+ delete mpScreen;
+ dComIfGp_getMain2DArchive()->removeResourceAll();
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 80453BA8-80453BAC 0021A8 0004+00 1/1 0/0 0/0 .sdata2 @4316 */
-SECTION_SDATA2 static f32 lit_4316 = 255.0f;
/* 8019BCB0-8019BCF4 1965F0 0044+00 3/3 0/0 0/0 .text setBackAlpha__24dDlst_GameOverScrnDraw_cFf
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dDlst_GameOverScrnDraw_c::setBackAlpha(f32 param_0) {
- nofralloc
-#include "asm/d/d_gameover/setBackAlpha__24dDlst_GameOverScrnDraw_cFf.s"
+void dDlst_GameOverScrnDraw_c::setBackAlpha(f32 i_alpha) {
+ mpBackImg->setAlpha(i_alpha * 255.0f);
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 8042CA20-8042CA2C 059740 000C+00 1/1 0/0 0/0 .bss @3882 */
-static u8 lit_3882[12];
-
-/* 8042CA2C-8042CA48 05974C 001C+00 2/2 0/0 0/0 .bss l_HIO */
-static u8 l_HIO[28];
/* 80453BAC-80453BB0 0021AC 0004+00 1/1 0/0 0/0 .sdata2 @4374 */
SECTION_SDATA2 static f32 lit_4374 = 608.0f;
@@ -846,82 +911,119 @@ SECTION_SDATA2 static f32 lit_4377[1 + 1 /* padding */] = {
/* 8019BCF4-8019BF3C 196634 0248+00 1/0 0/0 0/0 .text draw__24dDlst_GameOverScrnDraw_cFv
*/
+// matches with literals / sinit
+#ifdef NONMATCHING
+/* ############################################################################################## */
+/* 8042CA20-8042CA2C 059740 000C+00 1/1 0/0 0/0 .bss @3882 */
+static u8 lit_3882[12];
+
+/* 8042CA2C-8042CA48 05974C 001C+00 2/2 0/0 0/0 .bss l_HIO */
+static dGov_HIO_c l_HIO;
+
+void dDlst_GameOverScrnDraw_c::draw() {
+ J2DGrafContext* graf_ctx = dComIfGp_getCurrentGrafPort();
+ graf_ctx->setup2D();
+
+ if (dMeter2Info_getGameOverType() == 1 || dMeter2Info_getGameOverType() == 2) {
+ if (mDoGph_gInf_c::getFadeRate() == 1.0f) {
+ mFadeColor = mDoGph_gInf_c::getFadeColor();
+ }
+
+ JUtility::TColor img_black(mFadeColor);
+ JUtility::TColor img_white(mFadeColor);
+ img_black.a = 0;
+ img_white.a = 255;
+
+ mpBackImg->setBlackWhite(img_black, img_white);
+ mpBackImg->draw(0.0f, 0.0f, 608.0f, 448.0f, false, false, false);
+ } else {
+ JUtility::TColor img_black;
+ JUtility::TColor img_white;
+
+ img_black.r = l_HIO.mBlack.r;
+ img_black.g = l_HIO.mBlack.g;
+ img_black.b = l_HIO.mBlack.b;
+ img_black.a = l_HIO.mBlack.a;
+
+ img_white.r = l_HIO.mWhite.r;
+ img_white.g = l_HIO.mWhite.g;
+ img_white.b = l_HIO.mWhite.b;
+ img_white.a = l_HIO.mWhite.a;
+
+ mpBackImg->draw(0.0f, 0.0f, 608.0f, 448.0f, false, false, false);
+
+ for (int i = 0; i < 8; i++) {
+ mpLight->draw(&field_0x10, offset[i] + 304.0f, 224.0f, l_HIO.mScale, l_HIO.mScale,
+ l_HIO.mAlpha, l_HIO.mAnimSpeed, img_black, img_white);
+ }
+ }
+
+ mpScreen->draw(0.0f, 0.0f, graf_ctx);
+}
+#else
+/* ############################################################################################## */
+/* 8042CA20-8042CA2C 059740 000C+00 1/1 0/0 0/0 .bss @3882 */
+static u8 lit_3882[12];
+
+/* 8042CA2C-8042CA48 05974C 001C+00 2/2 0/0 0/0 .bss l_HIO */
+static u8 l_HIO[28];
+
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
-asm void dDlst_GameOverScrnDraw_c::draw() {
+// asm void dDlst_GameOverScrnDraw_c::draw() {
+extern "C" asm void draw__24dDlst_GameOverScrnDraw_cFv() {
nofralloc
#include "asm/d/d_gameover/draw__24dDlst_GameOverScrnDraw_cFv.s"
}
#pragma pop
+#endif
/* 8019BF3C-8019BF5C 19687C 0020+00 1/0 0/0 0/0 .text dGameover_Draw__FP11dGameover_c */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void dGameover_Draw(dGameover_c* param_0) {
- nofralloc
-#include "asm/d/d_gameover/dGameover_Draw__FP11dGameover_c.s"
+static int dGameover_Draw(dGameover_c* i_this) {
+ return i_this->_draw();
}
-#pragma pop
/* 8019BF5C-8019BF7C 19689C 0020+00 1/0 0/0 0/0 .text dGameover_Execute__FP11dGameover_c
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void dGameover_Execute(dGameover_c* param_0) {
- nofralloc
-#include "asm/d/d_gameover/dGameover_Execute__FP11dGameover_c.s"
+static int dGameover_Execute(dGameover_c* i_this) {
+ return i_this->_execute();
}
-#pragma pop
/* 8019BF7C-8019BF84 1968BC 0008+00 1/0 0/0 0/0 .text dGameover_IsDelete__FP11dGameover_c
*/
-static bool dGameover_IsDelete(dGameover_c* param_0) {
- return true;
+static int dGameover_IsDelete(dGameover_c* i_this) {
+ return 1;
}
/* 8019BF84-8019BFA4 1968C4 0020+00 1/0 0/0 0/0 .text dGameover_Delete__FP11dGameover_c
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void dGameover_Delete(dGameover_c* param_0) {
- nofralloc
-#include "asm/d/d_gameover/dGameover_Delete__FP11dGameover_c.s"
+static int dGameover_Delete(dGameover_c* i_this) {
+ return i_this->_delete();
}
-#pragma pop
/* 8019BFA4-8019BFC4 1968E4 0020+00 1/0 0/0 0/0 .text dGameover_Create__FP9msg_class */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void dGameover_Create(msg_class* param_0) {
- nofralloc
-#include "asm/d/d_gameover/dGameover_Create__FP9msg_class.s"
+static int dGameover_Create(msg_class* i_this) {
+ return static_cast<dGameover_c*>(i_this)->_create();
}
-#pragma pop
/* 8019BFC4-8019C008 196904 0044+00 0/0 2/2 0/0 .text d_GameOver_Create__FUc */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm s32 d_GameOver_Create(u8 param_0) {
- nofralloc
-#include "asm/d/d_gameover/d_GameOver_Create__FUc.s"
+s32 d_GameOver_Create(u8 i_gameoverType) {
+ dMeter2Info_setGameOverType(i_gameoverType);
+ return fopMsgM_create(PROC_GAMEOVER, NULL, NULL, NULL, NULL, NULL);
}
-#pragma pop
/* 8019C008-8019C06C 196948 0064+00 0/0 1/1 0/0 .text d_GameOver_Delete__FRUi */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void d_GameOver_Delete(unsigned int& param_0) {
- nofralloc
-#include "asm/d/d_gameover/d_GameOver_Delete__FRUi.s"
+bool d_GameOver_Delete(unsigned int& i_id) {
+ if (i_id != UINT32_MAX) {
+ fopMsgM_Delete(fopMsgM_SearchByID(i_id));
+ i_id = -1;
+ dMeter2Info_setGameOverType(0);
+ return true;
+ }
+
+ return false;
}
-#pragma pop
/* 8019C06C-8019C0C8 1969AC 005C+00 2/1 0/0 0/0 .text __dt__10dGov_HIO_cFv */
#pragma push
@@ -938,8 +1040,7 @@ extern "C" asm void __dt__10dGov_HIO_cFv() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
-asm void __sinit_d_gameover_cpp() {
- nofralloc
+asm void __sinit_d_gameover_cpp(){nofralloc
#include "asm/d/d_gameover/__sinit_d_gameover_cpp.s"
}
#pragma pop
@@ -964,7 +1065,8 @@ asm dDlst_Gameover_CAPTURE_c::~dDlst_Gameover_CAPTURE_c() {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
-asm dMenu_save_c::~dMenu_save_c() {
+// asm dMenu_save_c::~dMenu_save_c() {
+extern "C" asm void __dt__12dMenu_save_cFv() {
nofralloc
#include "asm/d/d_gameover/__dt__12dMenu_save_cFv.s"
}
diff --git a/src/d/d_timer.cpp b/src/d/d_timer.cpp
index a887623e67..7edfb5108b 100644
--- a/src/d/d_timer.cpp
+++ b/src/d/d_timer.cpp
@@ -5,9 +5,9 @@
#include "d/d_timer.h"
#include "d/com/d_com_inf_game.h"
-#include "f_op/f_op_msg_mng.h"
+#include "d/d_procname.h"
#include "dol2asm.h"
-#include "dolphin/types.h"
+#include "f_op/f_op_msg_mng.h"
#include "m_Do/m_Do_lib.h"
//
@@ -195,18 +195,12 @@ asm void dTimer_c::_execute() {
/* 8025D33C-8025D3BC 257C7C 0080+00 1/1 0/0 0/0 .text _draw__8dTimer_cFv */
int dTimer_c::_draw() {
- int ret;
-
if (dComIfGp_isPauseFlag() || dMsgObject_isTalkNowCheck()) {
- ret = 1;
- } else {
- dComIfGd_set2DOpa((dDlst_base_c*)field_0xfc);
- ret = 1;
+ return 1;
}
-
- return ret;
-
+ dComIfGd_set2DOpa(mp_tm_scrn);
+ return 1;
}
/* 8025D3BC-8025D524 257CFC 0168+00 1/1 0/0 0/0 .text _delete__8dTimer_cFv */
@@ -252,7 +246,7 @@ bool dTimer_c::stock_start() {
OSTime current_time = dLib_time_c::getTime();
mTime1 = current_time;
mTime2 = current_time;
-
+
mTime1 -= OS_TIMER_CLOCK_MS * dComIfG_getTimerNowTimeMs();
}
return mDeleteCheck == 5;
@@ -275,61 +269,54 @@ int dTimer_c::stock_start(s16 param_0) {
mDeleteCheck = 5;
return 1;
}
+
return 0;
}
/* 8025D7E8-8025D86C 258128 0084+00 3/3 1/1 0/0 .text stop__8dTimer_cFUc */
int dTimer_c::stop(u8 param_0) {
- int ret;
-
if (field_0x16A == 1 || field_0x16B != 0) {
- ret = 0;
+ return 0;
} else if (mDeleteCheck != 4) {
- ret = 0;
+ return 0;
} else {
mTime3 = dLib_time_c::getTime();
field_0x16A = 1;
field_0x16B = param_0;
- ret = 1;
+ return 1;
}
-
- return ret;
}
/* 8025D86C-8025D920 2581AC 00B4+00 1/1 1/1 0/0 .text restart__8dTimer_cFUc */
int dTimer_c::restart(u8 param_0) {
if (field_0x16A != 1 || field_0x16B != param_0) {
return 0;
+ } else if (mDeleteCheck != 4 && mDeleteCheck != 2) {
+ return 0;
} else {
- if (mDeleteCheck != 4 && mDeleteCheck != 2) {
- return 0;
- } else {
- mTime2 = dLib_time_c::getTime();
- mTime5 += mTime2 - mTime3;
- field_0x16A = 0;
- field_0x16B = 0;
- return 1;
- }
+ mTime2 = dLib_time_c::getTime();
+ mTime5 += mTime2 - mTime3;
+ field_0x16A = 0;
+ field_0x16B = 0;
+ return 1;
}
}
/* 8025D920-8025D9E0 258260 00C0+00 0/0 1/1 0/0 .text end__8dTimer_cFi */
int dTimer_c::end(int param_0) {
- int ret;
if (mDeleteCheck != 4) {
- ret = 0;
-
- } else {
- mTime6 = dLib_time_c::getTime();
- mDeleteCheck = 6;
- dComIfG_setTimerNowTimeMs((mTime6 - mTime1 - mTime5) / OS_TIMER_CLOCK_MS);
- if (param_0 != -1) {
- field_0x158 = param_0;
- }
- ret = 1;
+ return 0;
}
- return ret;
+ mTime6 = dLib_time_c::getTime();
+ mDeleteCheck = 6;
+ dComIfG_setTimerNowTimeMs((mTime6 - mTime1 - mTime5) / OS_TIMER_CLOCK_MS);
+
+ if (param_0 != -1) {
+ field_0x158 = param_0;
+ }
+
+ return 1;
}
/* 8025D9E0-8025D9F0 258320 0010+00 0/0 1/1 0/0 .text deleteRequest__8dTimer_cFv */
@@ -353,8 +340,8 @@ int dTimer_c::getLimitTimeMs() {
int dTimer_c::getRestTimeMs() {
OSTime tmpTime2 = mTime2 - mTime1 - mTime5;
// OSTime tmpTime = (mTime5) - mLimitTime;
-
- return (tmpTime2 - mLimitTime) / OS_TIMER_CLOCK_MS;
+
+ return (tmpTime2 - mLimitTime) / OS_TIMER_CLOCK_MS;
}
#else
#pragma push
@@ -372,6 +359,7 @@ int dTimer_c::isStart() {
if (field_0x16A != 1 && mDeleteCheck == 4) {
return 1;
}
+
return 0;
}
/* ############################################################################################## */
@@ -422,10 +410,10 @@ dDlst_TimerScrnDraw_c::dDlst_TimerScrnDraw_c() {
field_0x3D0 = -1;
field_0x3D4 = 0;
- field_0x3B0 = 0; // fix
- field_0x3B4 = 0; // fix
- field_0x3B8 = 0; // fix
- field_0x3BC = 0; // fix
+ field_0x3B0 = 0; // fix
+ field_0x3B4 = 0; // fix
+ field_0x3B8 = 0; // fix
+ field_0x3BC = 0; // fix
field_0x3DE = 0;
field_0x3DF = 0;
@@ -790,43 +778,39 @@ asm void dDlst_TimerScrnDraw_c::drawPikari(int param_0) {
#pragma pop
/* 80260F04-80260F24 25B844 0020+00 1/0 0/0 0/0 .text dTimer_Draw__FP8dTimer_c */
-static void dTimer_Draw(dTimer_c* i_timer) {
- i_timer->_draw();
+static void dTimer_Draw(dTimer_c* i_this) {
+ i_this->_draw();
}
/* 80260F24-80260F44 25B864 0020+00 1/0 0/0 0/0 .text dTimer_Execute__FP8dTimer_c */
-static void dTimer_Execute(dTimer_c* i_timer) {
- i_timer->_execute();
+static void dTimer_Execute(dTimer_c* i_this) {
+ i_this->_execute();
}
/* 80260F44-80260F4C 25B884 0008+00 1/0 0/0 0/0 .text dTimer_IsDelete__FP8dTimer_c */
-static bool dTimer_IsDelete(dTimer_c* i_timer) {
+static bool dTimer_IsDelete(dTimer_c* i_this) {
return true;
}
/* 80260F4C-80260F6C 25B88C 0020+00 1/0 0/0 0/0 .text dTimer_Delete__FP8dTimer_c */
-static void dTimer_Delete(dTimer_c* i_timer) {
- i_timer->_delete();
+static void dTimer_Delete(dTimer_c* i_this) {
+ i_this->_delete();
}
/* 80260F6C-80260F8C 25B8AC 0020+00 1/0 0/0 0/0 .text dTimer_Create__FP9msg_class */
-static void dTimer_Create(msg_class* i_timer) {
- ((dTimer_c*)i_timer)->_create();
+static void dTimer_Create(msg_class* i_this) {
+ ((dTimer_c*)i_this)->_create();
}
/* 80260F8C-80261034 25B8CC 00A8+00 0/0 1/1 9/9 .text dTimer_createTimer__FlUlUcUcffff */
-s32 dTimer_createTimer(s32 param_0, u32 param_1, u8 param_2, u8 param_3, f32 param_4,
- f32 param_5, f32 param_6, f32 param_7) {
- s32 ret;
-
+s32 dTimer_createTimer(s32 param_0, u32 param_1, u8 param_2, u8 param_3, f32 param_4, f32 param_5,
+ f32 param_6, f32 param_7) {
if (dComIfG_getTimerMode() == -1) {
- ret = fopMsgM_Timer_create(0x315,param_0,param_1,param_2,param_3,param_4,param_5,param_6,param_7,0);
- }
- else {
- ret = -1;
+ return fopMsgM_Timer_create(PROC_TIMER, param_0, param_1, param_2, param_3, param_4,
+ param_5, param_6, param_7, 0);
}
-
- return ret;
+
+ return -1;
}
/* ############################################################################################## */
/* 8039A3D8-8039A3D8 026A38 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
@@ -852,12 +836,16 @@ SECTION_SDATA2 static f32 lit_5547 = 419.0f;
/* 80261034-80261100 25B974 00CC+00 0/0 1/1 0/0 .text dTimer_createStockTimer__Fv */
s32 dTimer_createStockTimer() {
if (dComIfG_getTimerMode() != -1) {
- if ((dComIfG_getTimerMode() == 3 || dComIfG_getTimerMode() == 4) && strcmp(dComIfGp_getStartStageName(),"F_SP115")) {
+ if ((dComIfG_getTimerMode() == 3 || dComIfG_getTimerMode() == 4) &&
+ strcmp(dComIfGp_getStartStageName(), "F_SP115"))
+ {
dComIfG_setTimerMode(-1);
return -1;
} else {
u8 timer_type = dComIfG_getTimerType();
- return fopMsgM_Timer_create(0x315,10,0,timer_type,0,FLOAT_LABEL(lit_5544),FLOAT_LABEL(lit_5545),FLOAT_LABEL(lit_5546),FLOAT_LABEL(lit_5547),0);
+ return fopMsgM_Timer_create(PROC_TIMER, 10, 0, timer_type, 0, FLOAT_LABEL(lit_5544),
+ FLOAT_LABEL(lit_5545), FLOAT_LABEL(lit_5546),
+ FLOAT_LABEL(lit_5547), 0);
}
} else {
return -1;
@@ -868,7 +856,7 @@ s32 dTimer_createStockTimer() {
u32 dTimer_createGetIn2D(s32 param_0, cXyz param_1) {
if (dComIfG_getTimerPtr()) {
cXyz tmp;
- mDoLib_project(&param_1,&tmp);
+ mDoLib_project(&param_1, &tmp);
param_0 = dComIfG_getTimerPtr()->createGetIn(tmp);
} else {
param_0 = 0;
@@ -890,28 +878,20 @@ static int dTimer_createStart2D(s32 param_0, u16 param_1) {
/* 802611F0-80261244 25BB30 0054+00 0/0 0/0 5/5 .text dTimer_isStart__Fv */
int dTimer_isStart() {
- int ret;
-
if (dComIfG_getTimerPtr()) {
- ret = dComIfG_getTimerPtr()->isStart();
- } else {
- ret = 0;
+ return dComIfG_getTimerPtr()->isStart();
}
- return ret;
-
+ return 0;
}
+
/* 80261244-80261298 25BB84 0054+00 0/0 0/0 2/2 .text dTimer_getRestTimeMs__Fv */
int dTimer_getRestTimeMs() {
- int ret;
-
if (dComIfG_getTimerPtr()) {
- ret = dComIfG_getTimerPtr()->getRestTimeMs();
- } else {
- ret = 0;
+ return dComIfG_getTimerPtr()->getRestTimeMs();
}
- return ret;
+ return 0;
}
/* 80261298-802612EC 25BBD8 0054+00 0/0 0/0 2/2 .text dTimer_show__Fv */
@@ -930,15 +910,11 @@ void dTimer_hide() {
/* 80261340-80261394 25BC80 0054+00 0/0 0/0 1/1 .text dTimer_isReadyFlag__Fv */
u32 dTimer_isReadyFlag() {
- u32 ret;
-
if (dComIfG_getTimerPtr()) {
- ret = dComIfG_getTimerPtr()->isReadyFlag();
- } else {
- ret = 0;
+ return dComIfG_getTimerPtr()->isReadyFlag();
}
- return ret;
+ return 0;
}
/* 80261394-802613DC 25BCD4 0048+00 1/0 0/0 0/0 .text __dt__21dDlst_TimerScrnDraw_cFv */
diff --git a/src/d/meter/d_meter2.cpp b/src/d/meter/d_meter2.cpp
index 869e615b7f..315b13bea9 100644
--- a/src/d/meter/d_meter2.cpp
+++ b/src/d/meter/d_meter2.cpp
@@ -809,18 +809,22 @@ void dMeter2_c::moveLife() {
field_0x204 = g_drawHIO.mLifeGaugePosX;
setDraw = true;
}
+
if (field_0x208 != g_drawHIO.mLifeGaugePosY) {
field_0x208 = g_drawHIO.mLifeGaugePosY;
setDraw = true;
}
+
if (field_0x20c != g_drawHIO.mLifeGaugeScale) {
field_0x20c = g_drawHIO.mLifeGaugeScale;
setDraw = true;
}
+
if (field_0x210 != g_drawHIO.mHeartScale) {
field_0x210 = g_drawHIO.mHeartScale;
setDraw = true;
}
+
if (field_0x214 != g_drawHIO.mLargeHeartScale) {
field_0x214 = g_drawHIO.mLargeHeartScale;
setDraw = true;
diff --git a/src/d/meter/d_meter2_draw.cpp b/src/d/meter/d_meter2_draw.cpp
index d47a40a9b6..32d6b2b72e 100644
--- a/src/d/meter/d_meter2_draw.cpp
+++ b/src/d/meter/d_meter2_draw.cpp
@@ -637,8 +637,8 @@ dMeter2Draw_c::~dMeter2Draw_c() {
mpMagicFrameR = NULL;
for (int i = 0; i < 3; i++) {
- delete field_0x53c[i];
- field_0x53c[i] = NULL;
+ delete mpOxygenBpk[i];
+ mpOxygenBpk[i] = NULL;
}
delete mpMagicMeter;
@@ -961,7 +961,8 @@ void dMeter2Draw_c::exec(u32 param_0) {
if (param_0 & 0x1000000) {
if (mButtonsPosX != g_drawHIO.mRingHUDButtonsPosX ||
- mButtonsPosY != g_drawHIO.mRingHUDButtonsPosY) {
+ mButtonsPosY != g_drawHIO.mRingHUDButtonsPosY)
+ {
mButtonsPosX = g_drawHIO.mRingHUDButtonsPosX;
mButtonsPosY = g_drawHIO.mRingHUDButtonsPosY;
mpButtonParent->paneTrans(g_drawHIO.mRingHUDButtonsPosX, g_drawHIO.mRingHUDButtonsPosY);
@@ -973,7 +974,8 @@ void dMeter2Draw_c::exec(u32 param_0) {
}
} else {
if (mButtonsPosX != g_drawHIO.mMainHUDButtonsPosX ||
- mButtonsPosY != g_drawHIO.mMainHUDButtonsPosY) {
+ mButtonsPosY != g_drawHIO.mMainHUDButtonsPosY)
+ {
mButtonsPosX = g_drawHIO.mMainHUDButtonsPosX;
mButtonsPosY = g_drawHIO.mMainHUDButtonsPosY;
mpButtonParent->paneTrans(g_drawHIO.mMainHUDButtonsPosX, g_drawHIO.mMainHUDButtonsPosY);
@@ -1004,6 +1006,57 @@ SECTION_SDATA2 static f32 lit_4923[1 + 1 /* padding */] = {
SECTION_SDATA2 static f64 lit_4925 = 4503601774854144.0 /* cast s32 to float */;
/* 8021151C-80211BEC 20BE5C 06D0+00 1/0 0/0 0/0 .text draw__13dMeter2Draw_cFv */
+#ifdef NONMATCHING
+void dMeter2Draw_c::draw() {
+ J2DGrafContext* graf = dComIfGp_getCurrentGrafPort();
+
+ mpScreen->draw(0.0f, 0.0f, graf);
+ drawKanteraScreen(1);
+ drawKanteraScreen(2);
+
+ for (int i = 0; i < 2; i++) {
+ if (mpItemXY[i] != NULL) {
+ for (int j = 0; j < 3; j++) {
+ JGeometry::TVec3<f32> vtx1 = pane->getPanePtr()->getGlbVtx(0);
+ JGeometry::TVec3<f32> vtx2 = pane->getPanePtr()->getGlbVtx(3);
+
+ // mpItemNumTex[i][j]->
+ }
+ }
+ }
+
+ for (int i = 0; i < 2; i++) {
+ mpKanteraMeter[i]->drawSelf();
+ }
+
+ if (!dComIfGp_isPauseFlag() && mpButtonParent->getAlphaRate() != 0.0f) {
+ if (field_0x608 > 0.0f) {
+ drawPikari(mpBTextA, &field_0x608, g_drawHIO.mAButtonHighlightScale,
+ g_drawHIO.mAButtonHighlightFrontOuter, g_drawHIO.mAButtonHighlightFrontInner,
+ g_drawHIO.mAButtonHighlightBackOuter, g_drawHIO.mAButtonHighlightBackInner,
+ g_drawHIO.mAButtonHighlightAnimSpeed, field_0x759);
+ }
+
+ if (field_0x60c > 0.0f) {
+ drawPikari(mpBTextB, &field_0x60c, g_drawHIO.mBButtonHighlightScale,
+ g_drawHIO.mBButtonHighlightFrontOuter, g_drawHIO.mBButtonHighlightFrontInner,
+ g_drawHIO.mBButtonHighlightBackOuter, g_drawHIO.mBButtonHighlightBackInner,
+ g_drawHIO.mBButtonHighlightAnimSpeed, field_0x75a);
+ }
+
+ for (int i = 0; i < 2; i++) {
+ if (field_0x60c > 0.0f) {
+ drawPikari(mpBTextXY[i], &field_0x620[i], g_drawHIO.mXYButtonHighlightScale,
+ g_drawHIO.mXYButtonHighlightFrontOuter, g_drawHIO.mXYButtonHighlightFrontInner,
+ g_drawHIO.mXYButtonHighlightBackOuter, g_drawHIO.XYButtonHighlightBackInner,
+ g_drawHIO.mXYButtonHighlightAnimSpeed, field_0x768[i]);
+ }
+ }
+ }
+
+ // TODO
+}
+#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -1012,6 +1065,7 @@ asm void dMeter2Draw_c::draw() {
#include "asm/d/meter/d_meter2_draw/draw__13dMeter2Draw_cFv.s"
}
#pragma pop
+#endif
/* ############################################################################################## */
/* 80398320-803983C0 024980 00A0+00 0/1 0/0 0/0 .rodata life_tag$4931 */
@@ -1139,18 +1193,18 @@ void dMeter2Draw_c::initMagic() {
void* res = JKRFileLoader::getGlbResource("zelda_game_image_sanso_10percent.bpk",
dComIfGp_getMain2DArchive());
- field_0x53c[0] = (J2DAnmColorKey*)J2DAnmLoaderDataBase::load(res);
- field_0x53c[0]->searchUpdateMaterialID(mpKanteraScreen);
+ mpOxygenBpk[0] = (J2DAnmColorKey*)J2DAnmLoaderDataBase::load(res);
+ mpOxygenBpk[0]->searchUpdateMaterialID(mpKanteraScreen);
res = JKRFileLoader::getGlbResource("zelda_game_image_sanso_25percent.bpk",
dComIfGp_getMain2DArchive());
- field_0x53c[1] = (J2DAnmColorKey*)J2DAnmLoaderDataBase::load(res);
- field_0x53c[1]->searchUpdateMaterialID(mpKanteraScreen);
+ mpOxygenBpk[1] = (J2DAnmColorKey*)J2DAnmLoaderDataBase::load(res);
+ mpOxygenBpk[1]->searchUpdateMaterialID(mpKanteraScreen);
res = JKRFileLoader::getGlbResource("zelda_game_image_sanso_50percent.bpk",
dComIfGp_getMain2DArchive());
- field_0x53c[2] = (J2DAnmColorKey*)J2DAnmLoaderDataBase::load(res);
- field_0x53c[2]->searchUpdateMaterialID(mpKanteraScreen);
+ mpOxygenBpk[2] = (J2DAnmColorKey*)J2DAnmLoaderDataBase::load(res);
+ mpOxygenBpk[2]->searchUpdateMaterialID(mpKanteraScreen);
field_0x558 = 0.0f;
mpMagicParent->setAlphaRate(0.0f);
@@ -1163,7 +1217,7 @@ void dMeter2Draw_c::initMagic() {
}
for (int i = 0; i < 3; i++) {
- field_0x5fc[i] = 0.0f;
+ mMeterAlphaRate[i] = 0.0f;
field_0x742[i] = 0;
}
@@ -1486,6 +1540,60 @@ asm void dMeter2Draw_c::setAlphaLifeAnimeMax() {
SECTION_SDATA2 static f32 lit_6143 = 0.25f;
/* 80214EB4-80215290 20F7F4 03DC+00 1/1 0/0 0/0 .text drawKanteraScreen__13dMeter2Draw_cFUc */
+// matches with literals
+#ifdef NONMATCHING
+void dMeter2Draw_c::drawKanteraScreen(u8 i_meterType) {
+ J2DGrafContext* graf = dComIfGp_getCurrentGrafPort();
+
+ mpMagicParent->setAlphaRate(mMeterAlphaRate[i_meterType]);
+
+ if (i_meterType == 0) {
+ JUtility::TColor black = mpMagicMeter->getInitBlack();
+ black.a = 255;
+
+ mpMagicMeter->setBlackWhite(black, mpMagicMeter->getInitWhite());
+ setAlphaMagicChange(true);
+ } else if (i_meterType == 1) {
+ mpMagicMeter->setBlackWhite(JUtility::TColor(255, 255, 140, 255),
+ JUtility::TColor(230, 170, 0, 255));
+ setAlphaKanteraChange(true);
+ } else if (i_meterType == 2) {
+ f32 oxygen_percent = (f32)dComIfGp_getOxygen() / (f32)dComIfGp_getMaxOxygen();
+
+ if (oxygen_percent <= 0.25f) {
+ mpMagicMeter->setBlackWhite(JUtility::TColor(255, 100, 100, 255),
+ JUtility::TColor(255, 10, 10, 255));
+ playOxygenBpkAnimation(mpOxygenBpk[0]);
+
+ if (mMeterAlphaRate[i_meterType] > 0.0f) {
+ Z2GetAudioMgr()->mSeMgr.seStartLevel(Z2SE_SWIM_TIMER_BLINK_2, NULL, 0, 0, 1.0f,
+ 1.0f, -1.0f, -1.0f, 0);
+ }
+ } else if (oxygen_percent <= 0.5f) {
+ mpMagicMeter->setBlackWhite(JUtility::TColor(200, 200, 255, 255),
+ JUtility::TColor(80, 180, 255, 255));
+ playOxygenBpkAnimation(mpOxygenBpk[1]);
+
+ if (mMeterAlphaRate[i_meterType] > 0.0f) {
+ Z2GetAudioMgr()->mSeMgr.seStartLevel(Z2SE_SWIM_TIMER_BLINK_1, NULL, 0, 0, 1.0f,
+ 1.0f, -1.0f, -1.0f, 0);
+ }
+ } else {
+ mpMagicMeter->setBlackWhite(JUtility::TColor(200, 200, 255, 255),
+ JUtility::TColor(80, 180, 255, 255));
+ }
+
+ setAlphaOxygenChange(true);
+ }
+
+ mpMagicMeter->resize(field_0x584[i_meterType], field_0x590[i_meterType]);
+ mpMagicFrameR->move(field_0x59c[i_meterType], field_0x5a8[i_meterType]);
+ mpMagicBase->resize(field_0x5b4[i_meterType], field_0x5c0[i_meterType]);
+ mpMagicParent->scale(field_0x5cc[i_meterType], field_0x5d8[i_meterType]);
+ mpMagicParent->paneTrans(field_0x5e4[i_meterType], field_0x5f0[i_meterType]);
+ mpKanteraScreen->draw(0.0f, 0.0f, graf);
+}
+#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -1494,6 +1602,7 @@ asm void dMeter2Draw_c::drawKanteraScreen(u8 param_0) {
#include "asm/d/meter/d_meter2_draw/drawKanteraScreen__13dMeter2Draw_cFUc.s"
}
#pragma pop
+#endif
/* ############################################################################################## */
/* 804548B8-804548BC 002EB8 0004+00 1/1 0/0 0/0 .sdata2 @6175 */
@@ -1501,29 +1610,31 @@ SECTION_SDATA2 static f32 lit_6175 = 0.03125f;
/* 80215290-80215380 20FBD0 00F0+00 1/1 0/0 0/0 .text drawMagic__13dMeter2Draw_cFssff */
#ifdef NONMATCHING
-void dMeter2Draw_c::drawMagic(s16 max_count, s16 now_count, f32 x_pos, f32 y_pos) {
- f32 x_diff = mpMagicFrameR->getInitPosX() - mpMagicFrameL->getInitPosX();
+void dMeter2Draw_c::drawMagic(s16 i_maxMagic, s16 i_nowMagic, f32 i_xPos, f32 i_yPos) {
+ f32 frameL_posX = mpMagicFrameL->getInitPosX();
+ f32 frameR_posX = mpMagicFrameR->getInitPosX();
- field_0x584 = mpMagicMeter->getInitSizeX() * (lit_6175 * now_count);
- field_0x590 = mpMagicMeter->getInitSizeY();
+ field_0x584[0] = (mpMagicMeter->getInitSizeX() * i_nowMagic) * 0.03125f;
+ field_0x590[0] = mpMagicMeter->getInitSizeY();
- field_0x59c = mpMagicFrameL->getInitPosX() * x_diff * (max_count * lit_6175);
- field_0x5a8 = mpMagicFrameL->getInitPosY();
+ field_0x59c[0] =
+ ((f32)i_maxMagic * (frameR_posX - frameL_posX)) * 0.03125f + mpMagicFrameL->getInitPosX();
+ field_0x5a8[0] = mpMagicFrameL->getInitPosY();
- field_0x5b4 = mpMagicBase->getInitSizeX() * (max_count * lit_6175);
- field_0x5c0 = mpMagicBase->getInitSizeY();
+ field_0x5b4[0] = (f32)i_maxMagic * mpMagicBase->getInitSizeX() * 0.03125f;
+ field_0x5c0[0] = mpMagicBase->getInitSizeY();
- field_0x5cc = g_drawHIO.mMagicMeterScale;
- field_0x5d8 = g_drawHIO.mMagicMeterScale;
+ field_0x5cc[0] = g_drawHIO.mMagicMeterScale;
+ field_0x5d8[0] = g_drawHIO.mMagicMeterScale;
- field_0x5e4 = x_pos;
- field_0x5f0 = y_pos;
+ field_0x5e4[0] = i_xPos;
+ field_0x5f0[0] = i_yPos;
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
-asm void dMeter2Draw_c::drawMagic(s16 param_0, s16 param_1, f32 param_2, f32 param_3) {
+asm void dMeter2Draw_c::drawMagic(s16 i_maxMagic, s16 i_nowMagic, f32 i_xPos, f32 i_yPos) {
nofralloc
#include "asm/d/meter/d_meter2_draw/drawMagic__13dMeter2Draw_cFssff.s"
}
@@ -1531,14 +1642,35 @@ asm void dMeter2Draw_c::drawMagic(s16 param_0, s16 param_1, f32 param_2, f32 par
#endif
/* 80215380-802154A8 20FCC0 0128+00 2/2 0/0 0/0 .text setAlphaMagicChange__13dMeter2Draw_cFb */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dMeter2Draw_c::setAlphaMagicChange(bool param_0) {
- nofralloc
-#include "asm/d/meter/d_meter2_draw/setAlphaMagicChange__13dMeter2Draw_cFb.s"
+void dMeter2Draw_c::setAlphaMagicChange(bool i_forceSet) {
+ bool meter_parent_alpha_set = false;
+ bool meter_alpha_set = false;
+ bool meter_frame_alpha_set = false;
+
+ if (field_0x7a4 != mpMagicParent->getAlphaRate() || i_forceSet) {
+ field_0x7a4 = mpMagicParent->getAlphaRate();
+ meter_parent_alpha_set = true;
+ }
+
+ if (mMagicMeterAlpha != g_drawHIO.mMagicMeterAlpha || i_forceSet) {
+ mMagicMeterAlpha = g_drawHIO.mMagicMeterAlpha;
+ meter_alpha_set = true;
+ }
+
+ if (mMagicMeterFrameAlpha != g_drawHIO.mMagicMeterFrameAlpha || i_forceSet) {
+ mMagicMeterFrameAlpha = g_drawHIO.mMagicMeterFrameAlpha;
+ meter_frame_alpha_set = true;
+ }
+
+ if (meter_parent_alpha_set || meter_alpha_set || i_forceSet) {
+ mpMagicMeter->setAlphaRate(mMagicMeterAlpha * field_0x7a4);
+ }
+
+ if (meter_parent_alpha_set || meter_frame_alpha_set || i_forceSet) {
+ mpMagicFrameL->setAlphaRate(mMagicMeterFrameAlpha * field_0x7a4);
+ mpMagicFrameR->setAlphaRate(mMagicMeterFrameAlpha * field_0x7a4);
+ }
}
-#pragma pop
/* ############################################################################################## */
/* 804548BC-804548C0 002EBC 0004+00 4/4 0/0 0/0 .sdata2 @6210 */
@@ -1552,24 +1684,60 @@ SECTION_SDATA2 static f64 lit_6293 = 4503599627370496.0 /* cast u32 to float */;
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
-asm void dMeter2Draw_c::drawKantera(s32 param_0, s32 param_1, f32 param_2, f32 param_3) {
+asm void dMeter2Draw_c::drawKantera(s32 i_maxOil, s32 i_nowOil, f32 i_xPos, f32 i_yPos) {
nofralloc
#include "asm/d/meter/d_meter2_draw/drawKantera__13dMeter2Draw_cFllff.s"
}
#pragma pop
/* 802155B8-802156E0 20FEF8 0128+00 2/2 1/1 0/0 .text setAlphaKanteraChange__13dMeter2Draw_cFb */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dMeter2Draw_c::setAlphaKanteraChange(bool param_0) {
- nofralloc
-#include "asm/d/meter/d_meter2_draw/setAlphaKanteraChange__13dMeter2Draw_cFb.s"
+void dMeter2Draw_c::setAlphaKanteraChange(bool i_forceSet) {
+ bool meter_parent_alpha_set = false;
+ bool meter_alpha_set = false;
+ bool meter_frame_alpha_set = false;
+
+ if (field_0x7b0 != mpMagicParent->getAlphaRate() || i_forceSet) {
+ field_0x7b0 = mpMagicParent->getAlphaRate();
+ meter_parent_alpha_set = true;
+ }
+
+ if (mLanternMeterAlpha != g_drawHIO.mLanternMeterAlpha || i_forceSet) {
+ mLanternMeterAlpha = g_drawHIO.mLanternMeterAlpha;
+ meter_alpha_set = true;
+ }
+
+ if (mLanternMeterFrameAlpha != g_drawHIO.mLanternMeterFrameAlpha || i_forceSet) {
+ mLanternMeterFrameAlpha = g_drawHIO.mLanternMeterFrameAlpha;
+ meter_frame_alpha_set = true;
+ }
+
+ if (meter_parent_alpha_set || meter_alpha_set || i_forceSet) {
+ mpMagicMeter->setAlphaRate(mLanternMeterAlpha * field_0x7b0);
+ }
+
+ if (meter_parent_alpha_set || meter_frame_alpha_set || i_forceSet) {
+ mpMagicFrameL->setAlphaRate(mLanternMeterFrameAlpha * field_0x7b0);
+ mpMagicFrameR->setAlphaRate(mLanternMeterFrameAlpha * field_0x7b0);
+ }
}
-#pragma pop
/* 802156E0-8021575C 210020 007C+00 0/0 1/1 0/0 .text setAlphaKanteraAnimeMin__13dMeter2Draw_cFv
*/
+// matches with literals
+#ifdef NONMATCHING
+void dMeter2Draw_c::setAlphaKanteraAnimeMin() {
+ if (field_0x742[1] <= 0) {
+ mMeterAlphaRate[1] = 0.0f;
+ } else {
+ field_0x742[1]--;
+ if (field_0x742[1] < 0) {
+ field_0x742[1] = 0;
+ }
+
+ mMeterAlphaRate[1] = (field_0x742[1] / 5.0f) * g_drawHIO.mHUDAlpha;
+ }
+}
+#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -1578,9 +1746,25 @@ asm void dMeter2Draw_c::setAlphaKanteraAnimeMin() {
#include "asm/d/meter/d_meter2_draw/setAlphaKanteraAnimeMin__13dMeter2Draw_cFv.s"
}
#pragma pop
+#endif
/* 8021575C-802157E0 21009C 0084+00 0/0 1/1 0/0 .text setAlphaKanteraAnimeMax__13dMeter2Draw_cFv
*/
+// matches with literals
+#ifdef NONMATCHING
+void dMeter2Draw_c::setAlphaKanteraAnimeMax() {
+ if (field_0x742[1] >= 5) {
+ mMeterAlphaRate[1] = g_drawHIO.mHUDAlpha;
+ } else {
+ field_0x742[1]++;
+ if (field_0x742[1] > 5) {
+ field_0x742[1] = 5;
+ }
+
+ mMeterAlphaRate[1] = (field_0x742[1] / 5.0f) * g_drawHIO.mHUDAlpha;
+ }
+}
+#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -1589,6 +1773,7 @@ asm void dMeter2Draw_c::setAlphaKanteraAnimeMax() {
#include "asm/d/meter/d_meter2_draw/setAlphaKanteraAnimeMax__13dMeter2Draw_cFv.s"
}
#pragma pop
+#endif
/* 802157E0-802158F0 210120 0110+00 0/0 1/1 0/0 .text drawOxygen__13dMeter2Draw_cFllff */
#pragma push
@@ -1601,16 +1786,52 @@ asm void dMeter2Draw_c::drawOxygen(s32 param_0, s32 param_1, f32 param_2, f32 pa
#pragma pop
/* 802158F0-80215A18 210230 0128+00 1/1 1/1 0/0 .text setAlphaOxygenChange__13dMeter2Draw_cFb */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void dMeter2Draw_c::setAlphaOxygenChange(bool param_0) {
- nofralloc
-#include "asm/d/meter/d_meter2_draw/setAlphaOxygenChange__13dMeter2Draw_cFb.s"
+void dMeter2Draw_c::setAlphaOxygenChange(bool i_forceSet) {
+ bool meter_parent_alpha_set = false;
+ bool meter_alpha_set = false;
+ bool meter_frame_alpha_set = false;
+
+ if (field_0x7bc != mpMagicParent->getAlphaRate() || i_forceSet) {
+ field_0x7bc = mpMagicParent->getAlphaRate();
+ meter_parent_alpha_set = true;
+ }
+
+ if (mOxygenMeterAlpha != g_drawHIO.mOxygenMeterAlpha || i_forceSet) {
+ mOxygenMeterAlpha = g_drawHIO.mOxygenMeterAlpha;
+ meter_alpha_set = true;
+ }
+
+ if (mOxygenMeterFrameAlpha != g_drawHIO.mOxygenMeterFrameAlpha || i_forceSet) {
+ mOxygenMeterFrameAlpha = g_drawHIO.mOxygenMeterFrameAlpha;
+ meter_frame_alpha_set = true;
+ }
+
+ if (meter_parent_alpha_set || meter_alpha_set || i_forceSet) {
+ mpMagicMeter->setAlphaRate(mOxygenMeterAlpha * field_0x7bc);
+ }
+
+ if (meter_parent_alpha_set || meter_frame_alpha_set || i_forceSet) {
+ mpMagicFrameL->setAlphaRate(mOxygenMeterFrameAlpha * field_0x7bc);
+ mpMagicFrameR->setAlphaRate(mOxygenMeterFrameAlpha * field_0x7bc);
+ }
}
-#pragma pop
/* 80215A18-80215A94 210358 007C+00 0/0 1/1 0/0 .text setAlphaOxygenAnimeMin__13dMeter2Draw_cFv */
+// matches with literals
+#ifdef NONMATCHING
+void dMeter2Draw_c::setAlphaOxygenAnimeMin() {
+ if (field_0x742[2] <= 0) {
+ mMeterAlphaRate[2] = 0.0f;
+ } else {
+ field_0x742[2]--;
+ if (field_0x742[2] < 0) {
+ field_0x742[2] = 0;
+ }
+
+ mMeterAlphaRate[2] = (field_0x742[2] / 5.0f) * g_drawHIO.mHUDAlpha;
+ }
+}
+#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -1619,8 +1840,24 @@ asm void dMeter2Draw_c::setAlphaOxygenAnimeMin() {
#include "asm/d/meter/d_meter2_draw/setAlphaOxygenAnimeMin__13dMeter2Draw_cFv.s"
}
#pragma pop
+#endif
/* 80215A94-80215B18 2103D4 0084+00 0/0 1/1 0/0 .text setAlphaOxygenAnimeMax__13dMeter2Draw_cFv */
+// matches with literals
+#ifdef NONMATCHING
+void dMeter2Draw_c::setAlphaOxygenAnimeMax() {
+ if (field_0x742[2] >= 5) {
+ mMeterAlphaRate[2] = g_drawHIO.mHUDAlpha;
+ } else {
+ field_0x742[2]++;
+ if (field_0x742[2] > 5) {
+ field_0x742[2] = 5;
+ }
+
+ mMeterAlphaRate[2] = (field_0x742[2] / 5.0f) * g_drawHIO.mHUDAlpha;
+ }
+}
+#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -1629,6 +1866,7 @@ asm void dMeter2Draw_c::setAlphaOxygenAnimeMax() {
#include "asm/d/meter/d_meter2_draw/setAlphaOxygenAnimeMax__13dMeter2Draw_cFv.s"
}
#pragma pop
+#endif
/* ############################################################################################## */
/* 804548C8-804548CC 002EC8 0004+00 4/4 0/0 0/0 .sdata2 @6524 */
@@ -1647,9 +1885,7 @@ asm void dMeter2Draw_c::drawLightDrop(u8 param_0, u8 param_1, f32 param_2, f32 p
/* 80215DA4-80215DA8 2106E4 0004+00 1/1 1/1 0/0 .text setAlphaLightDropChange__13dMeter2Draw_cFb
*/
-void dMeter2Draw_c::setAlphaLightDropChange(bool param_0) {
- /* empty function */
-}
+void dMeter2Draw_c::setAlphaLightDropChange(bool param_0) {}
/* 80215DA8-80215E40 2106E8 0098+00 0/0 1/1 0/0 .text getNowLightDropRateCalc__13dMeter2Draw_cFv
*/
@@ -2192,6 +2428,29 @@ SECTION_SBSS2 static u8 lit_8747[4];
SECTION_SBSS2 static u8 data_80456B9C[4];
/* 8021AF78-8021B0C8 2158B8 0150+00 0/0 1/1 0/0 .text drawKanteraMeter__13dMeter2Draw_cFUcf */
+#ifdef NONMATCHING
+void dMeter2Draw_c::drawKanteraMeter(u8 i_button, f32 i_alphaRate) {
+ CPaneMgr* pane = mpItemXY[i_button];
+ f32 local_68[2][2];
+ local_68[1][0] = 0.0f;
+ local_68[1][1] = 0.0f;
+ local_68[0][0] = 0.0f;
+ local_68[0][1] = 0.0f;
+
+ if (i_alphaRate == 1.0f) {
+ i_alphaRate = pane->getAlphaRate();
+ }
+
+ JGeometry::TVec3<f32> vtx1 = pane->getPanePtr()->getGlbVtx(0);
+ JGeometry::TVec3<f32> vtx2 = pane->getPanePtr()->getGlbVtx(3);
+
+ mpKanteraMeter[i_button]->setPos((vtx1.x + vtx2.x) * 0.5f + 9.0f + local_68[1][i_button],
+ vtx2.y + local_68[0][i_button]);
+ mpKanteraMeter[i_button]->setScale(0.6f, 0.6f);
+ mpKanteraMeter[i_button]->setNowGauge(dComIfGs_getMaxOil(), dComIfGs_getOil());
+ mpKanteraMeter[i_button]->setAlphaRate(i_alphaRate);
+}
+#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@@ -2200,6 +2459,7 @@ asm void dMeter2Draw_c::drawKanteraMeter(u8 param_0, f32 param_1) {
#include "asm/d/meter/d_meter2_draw/drawKanteraMeter__13dMeter2Draw_cFUcf.s"
}
#pragma pop
+#endif
/* 8021B0C8-8021B104 215A08 003C+00 0/0 3/3 0/0 .text isButtonVisible__13dMeter2Draw_cFv
*/
@@ -2414,7 +2674,8 @@ SECTION_DEAD static char const* const pad_80398A77 = "";
*/
bool dMeter2Draw_c::getCanoeFishing() {
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127") &&
- g_dComIfG_gameInfo.play.mPlayer[0]->checkCanoeRide()) {
+ g_dComIfG_gameInfo.play.mPlayer[0]->checkCanoeRide())
+ {
return TRUE;
} else {
return FALSE;