mirror of
https://github.com/zeldaret/tp
synced 2026-07-08 14:36:36 -04:00
d_ky_thunder done / d_scope wip / m_Do_graphic wip (#308)
* d_ky_thunder OK + misc build fixes * d_scope mostly done * some m_Do_graphic wip * remove asm
This commit is contained in:
@@ -19628,7 +19628,7 @@ void daPy_py_c::setForcePutPos(cXyz const& param_0) {
|
||||
}
|
||||
|
||||
/* 801416CC-801416D4 13C00C 0008+00 1/0 0/0 0/0 .text checkPlayerNoDraw__9daPy_py_cFv */
|
||||
bool daPy_py_c::checkPlayerNoDraw() {
|
||||
BOOL daPy_py_c::checkPlayerNoDraw() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -19742,8 +19742,8 @@ bool daPy_py_c::checkSetNpcTks(cXyz* param_0, int param_1, int param_2) {
|
||||
}
|
||||
|
||||
/* 8014174C-80141754 13C08C 0008+00 1/0 0/0 0/0 .text setRollJump__9daPy_py_cFffs */
|
||||
bool daPy_py_c::setRollJump(f32 param_0, f32 param_1, s16 param_2) {
|
||||
return false;
|
||||
int daPy_py_c::setRollJump(f32 param_0, f32 param_1, s16 param_2) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 80141754-80141758 13C094 0004+00 1/0 0/0 0/0 .text playerStartCollisionSE__9daPy_py_cFUlUl */
|
||||
|
||||
+28
-28
@@ -56,11 +56,11 @@ struct dBgS_CamSphChk {
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" static void func_8015FA2C();
|
||||
extern "C" static void func_8015FA4C();
|
||||
extern "C" static void func_8015FADC();
|
||||
extern "C" static void func_8015FB28();
|
||||
extern "C" static void func_8015FBF8();
|
||||
extern "C" static void func_8015FA2C(f32 param_0, f32 param_1, f32 param_2);
|
||||
extern "C" static void func_8015FA4C(fopAc_ac_c* param_0);
|
||||
extern "C" static void func_8015FADC(f32 param_0, f32 param_1, f32 param_2);
|
||||
extern "C" static void func_8015FB28(cXyz* param_0, cXyz* param_1, cXyz* param_2);
|
||||
extern "C" static void func_8015FBF8(fopAc_ac_c* param_0, fopAc_ac_c* param_1, cXyz* param_2, f32 param_3, cSAngle param_4);
|
||||
extern "C" void Set__15dCamMapToolDataFllP10fopAc_ac_cUsUc();
|
||||
extern "C" void __ct__9dCamera_cFP12camera_class();
|
||||
extern "C" void func_801602C4();
|
||||
@@ -125,21 +125,21 @@ extern "C" void bumpCheck__9dCamera_cFUl();
|
||||
extern "C" void __dt__Q214cCcD_ShapeAttr5ShapeFv();
|
||||
extern "C" void lineBGCheckBoth__9dCamera_cFP4cXyzP4cXyzP11dBgS_LinChkUl();
|
||||
extern "C" void radiusActorInSight__9dCamera_cFP10fopAc_ac_cP10fopAc_ac_cP10fopAc_ac_c();
|
||||
extern "C" static void func_80167CB8();
|
||||
extern "C" static void func_80167CB8(fopAc_ac_c* param_0);
|
||||
extern "C" void jutOutCheck__9dCamera_cFP4cXyzf();
|
||||
extern "C" void tooNearEscape__9dCamera_cFP4cXyz();
|
||||
extern "C" void getWaterSurfaceHeight__9dCamera_cFP4cXyz();
|
||||
extern "C" void checkGroundInfo__9dCamera_cFv();
|
||||
extern "C" void chaseCamera__9dCamera_cFl();
|
||||
extern "C" static void func_8016C25C();
|
||||
extern "C" static void func_8016C25C(daAlink_c* param_0);
|
||||
extern "C" void Val__7cSAngleCFv();
|
||||
extern "C" static void func_8016C2D4();
|
||||
extern "C" static void func_8016C2D4(cXyz& param_0);
|
||||
extern "C" void getHoldA__8mDoCPd_cFUl();
|
||||
extern "C" static void func_8016C330();
|
||||
extern "C" static void func_8016C34C();
|
||||
extern "C" static void func_8016C368();
|
||||
extern "C" static void func_8016C330(u32 param_0, u32 param_1);
|
||||
extern "C" static void func_8016C34C(u32 param_0);
|
||||
extern "C" static void func_8016C368(u32 param_0, u32 param_1);
|
||||
extern "C" void lockonCamera__9dCamera_cFl();
|
||||
extern "C" static void func_8016E410();
|
||||
extern "C" static void func_8016E410(f32 param_0, f32 param_1, f32 param_2);
|
||||
extern "C" void __ct__7cSGlobeFv();
|
||||
extern "C" void LockEdge__12dAttention_cFv();
|
||||
extern "C" void getMsgCmdSpeaker__9dCamera_cFv();
|
||||
@@ -147,7 +147,7 @@ extern "C" void getMsgCmdCut__9dCamera_cFl();
|
||||
extern "C" void talktoCamera__9dCamera_cFl();
|
||||
extern "C" void talkBasePos__9dCamera_cFP10fopAc_ac_c();
|
||||
extern "C" void talkEyePos__9dCamera_cFP10fopAc_ac_c();
|
||||
extern "C" static void func_80174E50();
|
||||
extern "C" static void func_80174E50(cXyz param_0, cXyz param_1, fopAc_ac_c* param_2, fopAc_ac_c* param_3, fopAc_ac_c* param_4);
|
||||
extern "C" bool CalcSubjectAngle__9dCamera_cFPsPs();
|
||||
extern "C" void SaveZoomRatio__9dCamera_cFv();
|
||||
extern "C" void subjectCamera__9dCamera_cFl();
|
||||
@@ -160,7 +160,7 @@ extern "C" void hookshotCamera__9dCamera_cFl();
|
||||
extern "C" void railCamera__9dCamera_cFl();
|
||||
extern "C" void paraRailCamera__9dCamera_cFl();
|
||||
extern "C" void rideCamera__9dCamera_cFl();
|
||||
extern "C" static void func_8017D934();
|
||||
extern "C" static void func_8017D934(cXyz& param_0);
|
||||
extern "C" bool manualCamera__9dCamera_cFl();
|
||||
extern "C" void observeCamera__9dCamera_cFl();
|
||||
extern "C" void fixedFrameCamera__9dCamera_cFl();
|
||||
@@ -601,7 +601,7 @@ extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void func_8015FA2C() {
|
||||
static asm void func_8015FA2C(f32 param_0, f32 param_1, f32 param_2) {
|
||||
nofralloc
|
||||
#include "asm/d/d_camera/func_8015FA2C.s"
|
||||
}
|
||||
@@ -612,7 +612,7 @@ static asm void func_8015FA2C() {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void func_8015FA4C() {
|
||||
static asm void func_8015FA4C(fopAc_ac_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/d_camera/func_8015FA4C.s"
|
||||
}
|
||||
@@ -623,7 +623,7 @@ static asm void func_8015FA4C() {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void func_8015FADC() {
|
||||
static asm void func_8015FADC(f32 param_0, f32 param_1, f32 param_2) {
|
||||
nofralloc
|
||||
#include "asm/d/d_camera/func_8015FADC.s"
|
||||
}
|
||||
@@ -634,7 +634,7 @@ static asm void func_8015FADC() {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void func_8015FB28() {
|
||||
static asm void func_8015FB28(cXyz* param_0, cXyz* param_1, cXyz* param_2) {
|
||||
nofralloc
|
||||
#include "asm/d/d_camera/func_8015FB28.s"
|
||||
}
|
||||
@@ -656,7 +656,7 @@ SECTION_SDATA2 static f64 lit_4448 = 4503601774854144.0 /* cast s32 to float */;
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void func_8015FBF8() {
|
||||
static asm void func_8015FBF8(fopAc_ac_c* param_0, fopAc_ac_c* param_1, cXyz* param_2, f32 param_3, cSAngle param_4) {
|
||||
nofralloc
|
||||
#include "asm/d/d_camera/func_8015FBF8.s"
|
||||
}
|
||||
@@ -2409,7 +2409,7 @@ asm void dCamera_c::radiusActorInSight(fopAc_ac_c* param_0, fopAc_ac_c* param_1,
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void func_80167CB8() {
|
||||
static asm void func_80167CB8(fopAc_ac_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/d_camera/func_80167CB8.s"
|
||||
}
|
||||
@@ -2590,7 +2590,7 @@ asm void dCamera_c::chaseCamera(s32 param_0) {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void func_8016C25C() {
|
||||
static asm void func_8016C25C(daAlink_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/d_camera/func_8016C25C.s"
|
||||
}
|
||||
@@ -2611,7 +2611,7 @@ extern "C" asm void Val__7cSAngleCFv() {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void func_8016C2D4() {
|
||||
static asm void func_8016C2D4(cXyz& param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/d_camera/func_8016C2D4.s"
|
||||
}
|
||||
@@ -2633,7 +2633,7 @@ extern "C" asm void getHoldA__8mDoCPd_cFUl() {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void func_8016C330() {
|
||||
static asm void func_8016C330(u32 param_0, u32 param_1) {
|
||||
nofralloc
|
||||
#include "asm/d/d_camera/func_8016C330.s"
|
||||
}
|
||||
@@ -2644,7 +2644,7 @@ static asm void func_8016C330() {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void func_8016C34C() {
|
||||
static asm void func_8016C34C(u32 param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/d_camera/func_8016C34C.s"
|
||||
}
|
||||
@@ -2655,7 +2655,7 @@ static asm void func_8016C34C() {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void func_8016C368() {
|
||||
static asm void func_8016C368(u32 param_0, u32 param_1) {
|
||||
nofralloc
|
||||
#include "asm/d/d_camera/func_8016C368.s"
|
||||
}
|
||||
@@ -2703,7 +2703,7 @@ asm void dCamera_c::lockonCamera(s32 param_0) {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void func_8016E410() {
|
||||
static asm void func_8016E410(f32 param_0, f32 param_1, f32 param_2) {
|
||||
nofralloc
|
||||
#include "asm/d/d_camera/func_8016E410.s"
|
||||
}
|
||||
@@ -2871,7 +2871,7 @@ asm void dCamera_c::talkEyePos(fopAc_ac_c* param_0) {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void func_80174E50() {
|
||||
static asm void func_80174E50(cXyz param_0, cXyz param_1, fopAc_ac_c* param_2, fopAc_ac_c* param_3, fopAc_ac_c* param_4) {
|
||||
nofralloc
|
||||
#include "asm/d/d_camera/func_80174E50.s"
|
||||
}
|
||||
@@ -3118,7 +3118,7 @@ asm void dCamera_c::rideCamera(s32 param_0) {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void func_8017D934() {
|
||||
static asm void func_8017D934(cXyz& param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/d_camera/func_8017D934.s"
|
||||
}
|
||||
|
||||
+10
-10
@@ -230,21 +230,21 @@ 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) {
|
||||
mXOrig = xOrig;
|
||||
mYOrig = yOrig;
|
||||
mWidth = width;
|
||||
mHeight = height;
|
||||
mNearZ = nearZ;
|
||||
mFarZ = farZ;
|
||||
mViewport.mXOrig = xOrig;
|
||||
mViewport.mYOrig = yOrig;
|
||||
mViewport.mWidth = width;
|
||||
mViewport.mHeight = height;
|
||||
mViewport.mNearZ = nearZ;
|
||||
mViewport.mFarZ = farZ;
|
||||
}
|
||||
|
||||
/* 80051ADC-80051AF0 04C41C 0014+00 0/0 4/4 0/0 .text setScissor__14dDlst_window_cFffff
|
||||
*/
|
||||
void dDlst_window_c::setScissor(f32 xOrig, f32 yOrig, f32 width, f32 height) {
|
||||
mScissorXOrig = xOrig;
|
||||
mScissorYOrig = yOrig;
|
||||
mScissorWidth = width;
|
||||
mScissorHeight = height;
|
||||
mViewport.mScissor.mXOrig = xOrig;
|
||||
mViewport.mScissor.mYOrig = yOrig;
|
||||
mViewport.mScissor.mWidth = width;
|
||||
mViewport.mScissor.mHeight = height;
|
||||
}
|
||||
|
||||
/* 80051AF0-80051CF0 04C430 0200+00 1/0 0/0 0/0 .text draw__13dDlst_2DTri_cFv */
|
||||
|
||||
+237
-286
@@ -1,342 +1,293 @@
|
||||
//
|
||||
// Generated By: dol2asm
|
||||
// Translation Unit: d/d_ky_thunder
|
||||
//
|
||||
/**
|
||||
* d_ky_thunder.cpp
|
||||
* Environment - Thunder
|
||||
*/
|
||||
|
||||
#include "d/d_ky_thunder.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
#include "SSystem/SComponent/c_counter.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
#include "d/kankyo/d_kankyo_rain.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct kankyo_class {};
|
||||
|
||||
|
||||
|
||||
struct dRes_info_c {};
|
||||
|
||||
struct dRes_control_c {
|
||||
/* 8003C2EC */ void getRes(char const*, s32, dRes_info_c*, int);
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void createHeap__10dThunder_cFv();
|
||||
extern "C" void adjustHeap__10dThunder_cFv();
|
||||
extern "C" static void dThunder_Draw__FP10dThunder_c();
|
||||
extern "C" static void dThunder_Execute__FP10dThunder_c();
|
||||
extern "C" static bool dThunder_IsDelete__FP10dThunder_c();
|
||||
extern "C" static void dThunder_Delete__FP10dThunder_c();
|
||||
extern "C" static void dThunder_Create__FP12kankyo_class();
|
||||
extern "C" void create__10dThunder_cFv();
|
||||
extern "C" extern char const* const d_d_ky_thunder__stringBase0;
|
||||
extern "C" extern void* g_profile_KY_THUNDER[10 + 1 /* padding */];
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void __dt__4cXyzFv();
|
||||
extern "C" void mDoMtx_XrotM__FPA4_fs();
|
||||
extern "C" void mDoMtx_YrotM__FPA4_fs();
|
||||
extern "C" void mDoMtx_ZrotM__FPA4_fs();
|
||||
extern "C" void play__14mDoExt_baseAnmFv();
|
||||
extern "C" void init__13mDoExt_brkAnmFP16J3DMaterialTableP15J3DAnmTevRegKeyiifss();
|
||||
extern "C" void entry__13mDoExt_brkAnmFP16J3DMaterialTablef();
|
||||
extern "C" void mDoExt_modelUpdateDL__FP8J3DModel();
|
||||
extern "C" void mDoExt_createSolidHeapFromGameToCurrent__FUlUl();
|
||||
extern "C" void mDoExt_adjustSolidHeap__FP12JKRSolidHeap();
|
||||
extern "C" void mDoExt_destroySolidHeap__FP12JKRSolidHeap();
|
||||
extern "C" void mDoExt_restoreCurrentHeap__Fv();
|
||||
extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl();
|
||||
extern "C" void fopKyM_Delete__FPv();
|
||||
extern "C" void getRes__14dRes_control_cFPCclP11dRes_info_ci();
|
||||
extern "C" void dKyr_get_vectle_calc__FP4cXyzP4cXyzP4cXyz();
|
||||
extern "C" void cM_atan2s__Fff();
|
||||
extern "C" void cM_rndF__Ff();
|
||||
extern "C" void cM_rndFX__Ff();
|
||||
extern "C" void cLib_addCalc__FPfffff();
|
||||
extern "C" void cLib_targetAngleY__FPC3VecPC3Vec();
|
||||
extern "C" void startFarThunderSe__10Z2EnvSeMgrFP3VecSc();
|
||||
extern "C" void init__12J3DFrameCtrlFs();
|
||||
extern "C" void removeTevRegAnimator__16J3DMaterialTableFP15J3DAnmTevRegKey();
|
||||
extern "C" void __register_global_object();
|
||||
extern "C" void _savegpr_27();
|
||||
extern "C" void _restgpr_27();
|
||||
extern "C" void strcmp();
|
||||
extern "C" extern void* __vt__12J3DFrameCtrl[3];
|
||||
extern "C" extern void* g_fopKy_Method[5 + 1 /* padding */];
|
||||
extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */];
|
||||
extern "C" u8 now__14mDoMtx_stack_c[48];
|
||||
extern "C" extern u8 g_dComIfG_gameInfo[122384];
|
||||
extern "C" extern u8 g_env_light[4880];
|
||||
extern "C" extern u8 g_Counter[12 + 4 /* padding */];
|
||||
extern "C" u8 sincosTable___5JMath[65536];
|
||||
extern "C" extern u8 mStayNo__20dStage_roomControl_c[4];
|
||||
extern "C" extern u8 struct_80451070[8];
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
#define EF_THUNDER01_BMD 0x1E
|
||||
#define EF_THUNDER02_BMD 0x1F
|
||||
#define EF_THUNDER_BRK 0x2F
|
||||
|
||||
/* 801ADF58-801ADFB4 1A8898 005C+00 1/1 0/0 0/0 .text createHeap__10dThunder_cFv */
|
||||
int dThunder_c::createHeap() {
|
||||
if (!mpHeap) {
|
||||
mpHeap = mDoExt_createSolidHeapFromGameToCurrent(0,0x20);
|
||||
if (!mpHeap) {
|
||||
if (mpHeap == NULL) {
|
||||
mpHeap = mDoExt_createSolidHeapFromGameToCurrent(0, 0x20);
|
||||
|
||||
if (mpHeap == NULL) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 801ADFB4-801AE000 1A88F4 004C+00 1/1 0/0 0/0 .text adjustHeap__10dThunder_cFv */
|
||||
void dThunder_c::adjustHeap() {
|
||||
mDoExt_restoreCurrentHeap();
|
||||
|
||||
if ((s32)mDoExt_adjustSolidHeap(mpHeap) >= 0) {
|
||||
DCStoreRangeNoSync(mpHeap->getStartAddr(),mpHeap->getHeapSize());
|
||||
DCStoreRangeNoSync(mpHeap->getStartAddr(), mpHeap->getHeapSize());
|
||||
}
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 8042E7F0-8042E7FC 05B510 000C+00 1/1 0/0 0/0 .bss @3816 */
|
||||
static u8 lit_3816[12];
|
||||
int dThunder_c::draw() {
|
||||
static cXyz l_offsetPos(0.0f, 40.0f, -250.0f);
|
||||
static cXyz l_scale(1.0f, 1.0f, 1.0f);
|
||||
|
||||
/* 8042E7FC-8042E808 05B51C 000C+00 1/1 0/0 0/0 .bss @3818 */
|
||||
static u8 lit_3818[12];
|
||||
camera_class* camera_p = dComIfGp_getCamera(0);
|
||||
|
||||
/* 8042E808-8042E814 05B528 000C+00 1/1 0/0 0/0 .bss l_offsetPos$localstatic3$draw__10dThunder_cFv
|
||||
*/
|
||||
static f32 data_8042E808[3];
|
||||
mDoMtx_stack_c::transS(mThunderPos.x, mThunderPos.y, mThunderPos.z);
|
||||
mDoMtx_stack_c::YrotM(field_0x168);
|
||||
mDoMtx_stack_c::ZrotM(field_0x15c);
|
||||
mDoMtx_stack_c::XrotM(field_0x15c);
|
||||
|
||||
/* 8042E814-8042E820 05B534 000C+00 1/1 0/0 0/0 .bss l_scale$localstatic5$draw__10dThunder_cFv */
|
||||
static f32 data_8042E814[3];
|
||||
Mtx m;
|
||||
PSMTXCopy(mDoMtx_stack_c::get(), m);
|
||||
|
||||
/* 80453E70-80453E74 002470 0004+00 2/2 0/0 0/0 .sdata2 @3882 */
|
||||
SECTION_SDATA2 static u8 lit_3882[4] = {
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
};
|
||||
mModelInfo.mpModel->setBaseScale(field_0x138);
|
||||
mModelInfo.mpModel->i_setBaseTRMtx(m);
|
||||
mModelInfo.mBrk.entry(mModelInfo.mpModel->getModelData());
|
||||
|
||||
/* 80453E74-80453E78 002474 0004+00 1/1 0/0 0/0 .sdata2 @3883 */
|
||||
SECTION_SDATA2 static f32 lit_3883 = 40.0f;
|
||||
|
||||
/* 80453E78-80453E7C 002478 0004+00 1/1 0/0 0/0 .sdata2 @3884 */
|
||||
SECTION_SDATA2 static f32 lit_3884 = -250.0f;
|
||||
|
||||
/* 80453E7C-80453E80 00247C 0004+00 3/3 0/0 0/0 .sdata2 @3885 */
|
||||
SECTION_SDATA2 static f32 lit_3885 = 1.0f;
|
||||
dComIfGd_setList();
|
||||
mDoExt_modelUpdateDL(mModelInfo.mpModel);
|
||||
mModelInfo.mBrk.remove(mModelInfo.mpModel->getModelData());
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 801AE000-801AE19C 1A8940 019C+00 1/0 0/0 0/0 .text dThunder_Draw__FP10dThunder_c */
|
||||
#ifdef NONMATCHING
|
||||
// needs to have inline defined
|
||||
void dThunder_Draw(dThunder_c* i_dthunderP) {
|
||||
i_dthunderP->draw();
|
||||
static int dThunder_Draw(dThunder_c* i_this) {
|
||||
return i_this->draw();
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void dThunder_Draw(dThunder_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/d_ky_thunder/dThunder_Draw__FP10dThunder_c.s"
|
||||
|
||||
int dThunder_c::execute(dThunder_c* i_thunder) {
|
||||
dScnKy_env_light_c* env_light = i_dKy_getEnvlight();
|
||||
|
||||
if (env_light->mThunderEff.mStateTimer < 10) {
|
||||
cLib_addCalc(&mBrkSpeed, 0.1f, 0.05f, 0.017f, 9.999999747378752e-06f);
|
||||
}
|
||||
|
||||
mModelInfo.mBrk.setPlaySpeed(mBrkSpeed);
|
||||
if (mModelInfo.mBrk.play()) {
|
||||
mDoAud_mEnvSe_startFarThunderSe(&mThunderPos);
|
||||
fopKyM_Delete(i_thunder);
|
||||
}
|
||||
|
||||
f32 fvar7;
|
||||
if (dComIfGd_getView() != NULL) {
|
||||
fvar7 = dComIfGd_getView()->mFovy / 60.0f;
|
||||
if (fvar7 >= 1.0f) {
|
||||
fvar7 = 1.0f;
|
||||
}
|
||||
|
||||
fvar7 = fvar7 * fvar7 * fvar7;
|
||||
} else {
|
||||
fvar7 = 1.0f;
|
||||
}
|
||||
|
||||
fvar7 *= mBrkSpeed;
|
||||
|
||||
if (env_light->mThunderEff.mStateTimer < 10) {
|
||||
field_0x138.x += fvar7 * field_0x138.x * 0.01f * cM_ssin(field_0x16a);
|
||||
field_0x138.y += fvar7 * field_0x138.y * 0.01f * cM_scos(field_0x16c);
|
||||
field_0x16a += -25000;
|
||||
field_0x16c += 28900;
|
||||
} else {
|
||||
field_0x138.x += fvar7 * field_0x138.x * 0.02f * cM_ssin(field_0x16a);
|
||||
field_0x138.y += fvar7 * field_0x138.y * 0.02f * cM_scos(field_0x16c);
|
||||
field_0x16a += -35000;
|
||||
field_0x16c += 38900;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80453E80-80453E84 002480 0004+00 2/2 0/0 0/0 .sdata2 @3923 */
|
||||
SECTION_SDATA2 static f32 lit_3923 = 1.0f / 10.0f;
|
||||
|
||||
/* 80453E84-80453E88 002484 0004+00 1/1 0/0 0/0 .sdata2 @3924 */
|
||||
SECTION_SDATA2 static f32 lit_3924 = 1.0f / 20.0f;
|
||||
|
||||
/* 80453E88-80453E8C 002488 0004+00 1/1 0/0 0/0 .sdata2 @3925 */
|
||||
SECTION_SDATA2 static f32 lit_3925 = 0.017000000923871994f;
|
||||
|
||||
/* 80453E8C-80453E90 00248C 0004+00 1/1 0/0 0/0 .sdata2 @3926 */
|
||||
SECTION_SDATA2 static f32 lit_3926 = 9.999999747378752e-06f;
|
||||
|
||||
/* 80453E90-80453E94 002490 0004+00 1/1 0/0 0/0 .sdata2 @3927 */
|
||||
SECTION_SDATA2 static f32 lit_3927 = 60.0f;
|
||||
|
||||
/* 80453E94-80453E98 002494 0004+00 1/1 0/0 0/0 .sdata2 @3928 */
|
||||
SECTION_SDATA2 static f32 lit_3928 = 1.0f / 100.0f;
|
||||
|
||||
/* 80453E98-80453E9C 002498 0004+00 1/1 0/0 0/0 .sdata2 @3929 */
|
||||
SECTION_SDATA2 static f32 lit_3929 = 1.0f / 50.0f;
|
||||
|
||||
/* 801AE19C-801AE374 1A8ADC 01D8+00 1/0 0/0 0/0 .text dThunder_Execute__FP10dThunder_c */
|
||||
#ifdef NONMATCHING
|
||||
// needs to have inline defined
|
||||
void dThunder_Execute(dThunder_c* i_dthunderP) {
|
||||
i_dthunderP->execute();
|
||||
static int dThunder_Execute(dThunder_c* i_this) {
|
||||
return i_this->execute(i_this);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void dThunder_Execute(dThunder_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/d_ky_thunder/dThunder_Execute__FP10dThunder_c.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 801AE374-801AE37C 1A8CB4 0008+00 1/0 0/0 0/0 .text dThunder_IsDelete__FP10dThunder_c
|
||||
*/
|
||||
static bool dThunder_IsDelete(dThunder_c* param_0) {
|
||||
return true;
|
||||
static int dThunder_IsDelete(dThunder_c* i_this) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int dThunder_c::thunder_delete(dThunder_c* i_thunder) {
|
||||
i_thunder->~dThunder_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 801AE37C-801AE3FC 1A8CBC 0080+00 1/0 0/0 0/0 .text dThunder_Delete__FP10dThunder_c */
|
||||
#ifdef NONMATCHING
|
||||
// needs to have destructor defined
|
||||
void dThunder_Delete(dThunder_c* i_dthunderP) {
|
||||
thunder_delete(i_dthunderP);
|
||||
static int dThunder_Delete(dThunder_c* i_this) {
|
||||
return i_this->thunder_delete(i_this);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void dThunder_Delete(dThunder_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/d_ky_thunder/dThunder_Delete__FP10dThunder_c.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 801AE3FC-801AE458 1A8D3C 005C+00 1/0 0/0 0/0 .text dThunder_Create__FP12kankyo_class
|
||||
*/
|
||||
static int dThunder_Create(kankyo_class* param_0) {
|
||||
dThunder_c* thunder_ptr = (dThunder_c*)param_0;
|
||||
int ret;
|
||||
static int dThunder_Create(kankyo_class* i_this) {
|
||||
dThunder_c* this_ = (dThunder_c*)i_this;
|
||||
|
||||
if (thunder_ptr->createHeap() == 0) {
|
||||
return 5;
|
||||
} else {
|
||||
ret = thunder_ptr->create();
|
||||
thunder_ptr->adjustHeap();
|
||||
if (!this_->createHeap()) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
int ret = this_->create();
|
||||
this_->adjustHeap();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80394F40-80394F40 0215A0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DEAD static char const* const stringBase_80394F40 = "Always";
|
||||
SECTION_DEAD static char const* const stringBase_80394F47 = "R_SP30";
|
||||
/* @stringBase0 padding */
|
||||
SECTION_DEAD static char const* const pad_80394F4E = "\0";
|
||||
#pragma pop
|
||||
|
||||
/* 80453E9C-80453EA0 00249C 0004+00 1/1 0/0 0/0 .sdata2 @4079 */
|
||||
SECTION_SDATA2 static f32 lit_4079 = 0.5f;
|
||||
|
||||
/* 80453EA0-80453EA4 0024A0 0004+00 1/1 0/0 0/0 .sdata2 @4080 */
|
||||
SECTION_SDATA2 static f32 lit_4080 = 0.25f;
|
||||
|
||||
/* 80453EA4-80453EA8 0024A4 0004+00 1/1 0/0 0/0 .sdata2 @4081 */
|
||||
SECTION_SDATA2 static f32 lit_4081 = 14.0f;
|
||||
|
||||
/* 80453EA8-80453EAC 0024A8 0004+00 1/1 0/0 0/0 .sdata2 @4082 */
|
||||
SECTION_SDATA2 static f32 lit_4082 = 20.0f;
|
||||
|
||||
/* 80453EAC-80453EB0 0024AC 0004+00 1/1 0/0 0/0 .sdata2 @4083 */
|
||||
SECTION_SDATA2 static f32 lit_4083 = 60000.0f;
|
||||
|
||||
/* 80453EB0-80453EB4 0024B0 0004+00 1/1 0/0 0/0 .sdata2 @4084 */
|
||||
SECTION_SDATA2 static f32 lit_4084 = -5000.0f;
|
||||
|
||||
/* 80453EB4-80453EB8 0024B4 0004+00 1/1 0/0 0/0 .sdata2 @4085 */
|
||||
SECTION_SDATA2 static f32 lit_4085 = 2000.0f;
|
||||
|
||||
/* 80453EB8-80453EBC 0024B8 0004+00 1/1 0/0 0/0 .sdata2 @4086 */
|
||||
SECTION_SDATA2 static f32 lit_4086 = 24.0f;
|
||||
|
||||
/* 80453EBC-80453EC0 0024BC 0004+00 1/1 0/0 0/0 .sdata2 @4087 */
|
||||
SECTION_SDATA2 static f32 lit_4087 = 2500.0f;
|
||||
|
||||
/* 80453EC0-80453EC4 0024C0 0004+00 1/1 0/0 0/0 .sdata2 @4088 */
|
||||
SECTION_SDATA2 static f32 lit_4088 = 6000.0f;
|
||||
|
||||
/* 80453EC4-80453EC8 0024C4 0004+00 1/1 0/0 0/0 .sdata2 @4089 */
|
||||
SECTION_SDATA2 static f32 lit_4089 = 3.0f / 20.0f;
|
||||
|
||||
/* 80453EC8-80453ED0 0024C8 0004+04 1/1 0/0 0/0 .sdata2 @4090 */
|
||||
SECTION_SDATA2 static f32 lit_4090[1 + 1 /* padding */] = {
|
||||
1.0f / 5.0f,
|
||||
/* padding */
|
||||
0.0f,
|
||||
};
|
||||
|
||||
/* 80453ED0-80453ED8 0024D0 0008+00 1/1 0/0 0/0 .sdata2 @4091 */
|
||||
SECTION_SDATA2 static f64 lit_4091 = 0.5;
|
||||
|
||||
/* 80453ED8-80453EDC 0024D8 0004+00 1/1 0/0 0/0 .sdata2 @4092 */
|
||||
SECTION_SDATA2 static f32 lit_4092 = -1.0f;
|
||||
|
||||
/* 80453EDC-80453EE0 0024DC 0004+00 1/1 0/0 0/0 .sdata2 @4093 */
|
||||
SECTION_SDATA2 static f32 lit_4093 = 100000.0f;
|
||||
|
||||
/* 80453EE0-80453EE4 0024E0 0004+00 1/1 0/0 0/0 .sdata2 @4094 */
|
||||
SECTION_SDATA2 static f32 lit_4094 = 19635.0f;
|
||||
|
||||
/* 80453EE4-80453EE8 0024E4 0004+00 1/1 0/0 0/0 .sdata2 @4095 */
|
||||
SECTION_SDATA2 static f32 lit_4095 = 260.0f;
|
||||
|
||||
/* 80453EE8-80453EEC 0024E8 0004+00 1/1 0/0 0/0 .sdata2 @4096 */
|
||||
SECTION_SDATA2 static f32 lit_4096 = 4592.0f;
|
||||
|
||||
/* 80453EEC-80453EF0 0024EC 0004+00 1/1 0/0 0/0 .sdata2 @4097 */
|
||||
SECTION_SDATA2 static f32 lit_4097 = 1507.0f;
|
||||
|
||||
/* 80453EF0-80453EF4 0024F0 0004+00 1/1 0/0 0/0 .sdata2 @4098 */
|
||||
SECTION_SDATA2 static f32 lit_4098 = 100.0f;
|
||||
|
||||
/* 80453EF4-80453EF8 0024F4 0004+00 1/1 0/0 0/0 .sdata2 @4099 */
|
||||
SECTION_SDATA2 static f32 lit_4099 = 3.0f / 10.0f;
|
||||
|
||||
/* 801AE458-801AE938 1A8D98 04E0+00 1/1 0/0 0/0 .text create__10dThunder_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm int dThunder_c::create() {
|
||||
nofralloc
|
||||
#include "asm/d/d_ky_thunder/create__10dThunder_cFv.s"
|
||||
int dThunder_c::create() {
|
||||
dScnKy_env_light_c* env_light = i_dKy_getEnvlight();
|
||||
camera_class* camera_p = dComIfGp_getCamera(0);
|
||||
cXyz spB8;
|
||||
cXyz spC4;
|
||||
cXyz spD0;
|
||||
f32 var_f31;
|
||||
f32 var_f30;
|
||||
f32 var_f29;
|
||||
f32 var_f29_2;
|
||||
f32 var_r28;
|
||||
f32 var_r27;
|
||||
|
||||
new (this) dThunder_c();
|
||||
|
||||
J3DModelData* modelData;
|
||||
if (cM_rndF(1.0f) < 0.5f) {
|
||||
modelData = (J3DModelData*)dComIfG_getObjectRes("Always", EF_THUNDER01_BMD);
|
||||
} else {
|
||||
modelData = (J3DModelData*)dComIfG_getObjectRes("Always", EF_THUNDER02_BMD);
|
||||
}
|
||||
|
||||
mModelInfo.mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x1000000);
|
||||
if (mModelInfo.mpModel == NULL) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
J3DAnmTevRegKey* canm = (J3DAnmTevRegKey*)dComIfG_getObjectRes("Always", EF_THUNDER_BRK);
|
||||
if (!mModelInfo.mBrk.init(modelData, canm, TRUE, 0, 1.0f, 0, -1)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
mBrkSpeed = 1.0f;
|
||||
mModelInfo.mBrk.setPlaySpeed(mBrkSpeed);
|
||||
|
||||
if (env_light->mThunderEff.mStateTimer < 10) {
|
||||
var_f29 = 1.0f;
|
||||
} else {
|
||||
var_f29 = 0.25f;
|
||||
}
|
||||
|
||||
field_0x168 = cLib_targetAngleY(&camera_p->mLookat.mEye, &camera_p->mLookat.mCenter);
|
||||
|
||||
if (!(g_Counter.mCounter0 & 1)) {
|
||||
field_0x168 += 0x7FFF;
|
||||
}
|
||||
|
||||
var_r28 = 14.0f;
|
||||
var_r27 = 20.0f;
|
||||
var_f31 = var_r28;
|
||||
var_f30 = var_r27;
|
||||
spC4.set(60000.0f, -5000.0f, 0.0f);
|
||||
field_0x15c = 2000.0f;
|
||||
|
||||
if (env_light->mThunderEff.mStateTimer >= 10) {
|
||||
var_f31 = var_r27;
|
||||
var_f30 = 24.0f;
|
||||
field_0x15c = 2500.0f;
|
||||
spC4.y = 6000.0f;
|
||||
}
|
||||
|
||||
if (!strcmp(dComIfGp_getStartStageName(), "R_SP30") && dComIfGp_roomControl_getStayNo() == 4) {
|
||||
var_r28 = 0.1f;
|
||||
var_r27 = 0.25f;
|
||||
var_f31 = 0.15f;
|
||||
var_f30 = 0.2f;
|
||||
}
|
||||
|
||||
field_0x15c = var_f29 * cM_rndFX(field_0x15c);
|
||||
field_0x138.x = var_f29 * (var_r28 + cM_rndF(var_r27 - var_r28));
|
||||
|
||||
if (cM_rndFX(1.0f) >= 0.5) {
|
||||
field_0x138.x *= -1.0f;
|
||||
}
|
||||
|
||||
field_0x138.y = var_f29 * (var_f31 + cM_rndF(var_f30 - var_f31));
|
||||
field_0x138.z = 1.0f;
|
||||
|
||||
dKyr_get_vectle_calc(&camera_p->mLookat.mEye, &camera_p->mLookat.mCenter, &spB8);
|
||||
|
||||
// JMAFastSqrt doesn't match here when it should, probably needs to be fixed
|
||||
// var_f29_2 = JMAFastSqrt(spB8.x * spB8.x + spB8.z * spB8.z);
|
||||
|
||||
var_f29_2 = spB8.x * spB8.x + spB8.z * spB8.z;
|
||||
if (var_f29_2 > 0.0f) {
|
||||
f32 tmp = __frsqrtes(var_f29_2);
|
||||
var_f29_2 = tmp * var_f29_2;
|
||||
}
|
||||
|
||||
s16 temp_r28 = cM_atan2s(spB8.x, spB8.z);
|
||||
s16 temp_r31 = cM_atan2s(spB8.y, var_f29_2);
|
||||
|
||||
if (cM_rndFX(1.0f) >= 0.0f) {
|
||||
temp_r28 += 0x4000;
|
||||
} else {
|
||||
temp_r28 -= 0x4000;
|
||||
}
|
||||
|
||||
spD0.x = cM_scos(temp_r31) * cM_ssin(temp_r28);
|
||||
spD0.z = cM_scos(temp_r31) * cM_scos(temp_r28);
|
||||
|
||||
f32 temp_f1_3 = cM_rndF(spC4.x);
|
||||
mThunderPos.x = camera_p->mLookat.mEye.x + (spB8.x * 100000.0f) + (spD0.x * temp_f1_3);
|
||||
mThunderPos.y = camera_p->mLookat.mEye.y + 2000.0f + cM_rndF(spC4.y);
|
||||
mThunderPos.z = camera_p->mLookat.mEye.z + (spB8.z * 100000.0f) + (spD0.z * temp_f1_3);
|
||||
|
||||
if (!strcmp(dComIfGp_getStartStageName(), "R_SP30") && dComIfGp_roomControl_getStayNo() == 4) {
|
||||
mThunderPos.x = cM_rndFX(260.0f) + 19635.0f;
|
||||
mThunderPos.y = 4592.0f;
|
||||
mThunderPos.z = cM_rndFX(100.0f) + 1507.0f;
|
||||
}
|
||||
|
||||
if (cM_rndF(1.0f) < 0.3f) {
|
||||
field_0x150.x = -mThunderPos.x;
|
||||
field_0x150.y = -mThunderPos.y;
|
||||
field_0x150.z = -mThunderPos.z;
|
||||
mDoAud_mEnvSe_startFarThunderSe(&field_0x150);
|
||||
}
|
||||
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803BC1D8-803BC1EC -00001 0014+00 1/0 0/0 0/0 .data l_dThunder_Method */
|
||||
SECTION_DATA static void* l_dThunder_Method[5] = {
|
||||
(void*)dThunder_Create__FP12kankyo_class, (void*)dThunder_Delete__FP10dThunder_c,
|
||||
(void*)dThunder_Execute__FP10dThunder_c, (void*)dThunder_IsDelete__FP10dThunder_c,
|
||||
(void*)dThunder_Draw__FP10dThunder_c,
|
||||
static leafdraw_method_class l_dThunder_Method = {
|
||||
(process_method_func)dThunder_Create, (process_method_func)dThunder_Delete,
|
||||
(process_method_func)dThunder_Execute, (process_method_func)dThunder_IsDelete,
|
||||
(process_method_func)dThunder_Draw,
|
||||
};
|
||||
|
||||
/* 803BC1EC-803BC218 -00001 0028+04 0/0 0/0 1/0 .data g_profile_KY_THUNDER */
|
||||
SECTION_DATA extern void* g_profile_KY_THUNDER[10 + 1 /* padding */] = {
|
||||
(void*)0xFFFFFFFD,
|
||||
(void*)0x0007FFFD,
|
||||
(void*)0x02D90000,
|
||||
(void*)&g_fpcLf_Method,
|
||||
(void*)0x00000170,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)&g_fopKy_Method,
|
||||
(void*)0x00060000,
|
||||
(void*)&l_dThunder_Method,
|
||||
/* padding */
|
||||
NULL,
|
||||
extern kankyo_process_profile_definition g_profile_KY_THUNDER = {
|
||||
-3,
|
||||
7,
|
||||
-3,
|
||||
PROC_KY_THUNDER,
|
||||
0,
|
||||
&g_fpcLf_Method.mBase,
|
||||
sizeof(dThunder_c),
|
||||
0,
|
||||
0,
|
||||
&g_fopKy_Method,
|
||||
6,
|
||||
0,
|
||||
0,
|
||||
&l_dThunder_Method,
|
||||
};
|
||||
|
||||
/* 80394F40-80394F40 0215A0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
|
||||
+261
-204
@@ -4,46 +4,59 @@
|
||||
//
|
||||
|
||||
#include "d/d_scope.h"
|
||||
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct dScope_c {
|
||||
class dScope_c : public dMeterSub_c {
|
||||
public:
|
||||
enum {
|
||||
/* 0 */ PROC_OPEN,
|
||||
/* 1 */ PROC_MOVE,
|
||||
/* 2 */ PROC_CLOSE,
|
||||
};
|
||||
|
||||
/* 80193690 */ dScope_c(u8);
|
||||
/* 8019396C */ ~dScope_c();
|
||||
/* 80193B90 */ void _execute(u32);
|
||||
/* 80193C68 */ void draw();
|
||||
/* 80193FA0 */ void isDead();
|
||||
/* 80193FB4 */ void open_init();
|
||||
/* 80193FD0 */ void open_proc();
|
||||
/* 80194048 */ void move_init();
|
||||
/* 8019404C */ void move_proc();
|
||||
/* 80194050 */ void close_init();
|
||||
/* 80194054 */ void close_proc();
|
||||
};
|
||||
|
||||
struct dMeterSub_c {
|
||||
/* 801940D4 */ ~dMeterSub_c();
|
||||
/* 8019411C */ bool _create();
|
||||
/* 80194124 */ bool _delete();
|
||||
/* 8019412C */ void draw();
|
||||
/* 80194130 */ bool _execute(u32);
|
||||
/* 80194138 */ bool isDead();
|
||||
};
|
||||
/* 80193C68 */ virtual void draw();
|
||||
/* 8019396C */ virtual ~dScope_c();
|
||||
/* 80193B90 */ virtual int _execute(u32);
|
||||
/* 80193FA0 */ virtual int isDead();
|
||||
|
||||
struct ResTIMG {};
|
||||
|
||||
struct JUtility {
|
||||
struct TColor {
|
||||
/* 80193960 */ TColor();
|
||||
};
|
||||
};
|
||||
|
||||
struct J2DPicture {
|
||||
/* 802FC708 */ J2DPicture(ResTIMG const*);
|
||||
/* 0x04 */ J2DScreen* mHawkEyeScrn;
|
||||
/* 0x08 */ J2DScreen* mZoomInOutScrn;
|
||||
/* 0x0C */ CPaneMgr* mHawkEyeRootPane;
|
||||
/* 0x10 */ CPaneMgr* mZoomInOutRootPane;
|
||||
/* 0x14 */ CPaneMgr* mHawkEyePanes[3];
|
||||
/* 0x20 */ CPaneMgr* mZoomInOutPanes[3][2];
|
||||
/* 0x38 */ J2DPicture* mpWipeTex;
|
||||
/* 0x3C */ J2DPicture* mpBlackTex;
|
||||
/* 0x40 */ u8 field_0x40[0x48 - 0x40];
|
||||
/* 0x48 */ JUtility::TColor field_0x48[2];
|
||||
/* 0x50 */ JUtility::TColor field_0x50[2];
|
||||
/* 0x58 */ u32 field_0x58;
|
||||
/* 0x5C */ u32 field_0x5c;
|
||||
/* 0x60 */ u8 field_0x60[0x78 - 0x60];
|
||||
/* 0x78 */ f32 mWidth;
|
||||
/* 0x7C */ f32 mHeight;
|
||||
/* 0x80 */ f32 mScale;
|
||||
/* 0x84 */ f32 mAlpha;
|
||||
/* 0x88 */ s16 mOpenTimer;
|
||||
/* 0x8A */ s16 field_0x8a;
|
||||
/* 0x8C */ u8 mProcess;
|
||||
/* 0x8D */ u8 field_0x8d;
|
||||
/* 0x8E */ u8 mIsDead;
|
||||
/* 0x8F */ u8 field_0x8f;
|
||||
};
|
||||
|
||||
//
|
||||
@@ -63,11 +76,11 @@ extern "C" void move_proc__8dScope_cFv();
|
||||
extern "C" void close_init__8dScope_cFv();
|
||||
extern "C" void close_proc__8dScope_cFv();
|
||||
extern "C" void __dt__11dMeterSub_cFv();
|
||||
extern "C" bool _create__11dMeterSub_cFv();
|
||||
extern "C" bool _delete__11dMeterSub_cFv();
|
||||
extern "C" int _create__11dMeterSub_cFv();
|
||||
extern "C" int _delete__11dMeterSub_cFv();
|
||||
extern "C" void draw__11dMeterSub_cFv();
|
||||
extern "C" bool _execute__11dMeterSub_cFUl();
|
||||
extern "C" bool isDead__11dMeterSub_cFv();
|
||||
extern "C" int _execute__11dMeterSub_cFUl();
|
||||
extern "C" int isDead__11dMeterSub_cFv();
|
||||
extern "C" void __sinit_d_scope_cpp();
|
||||
extern "C" extern char const* const d_d_scope__stringBase0;
|
||||
|
||||
@@ -86,102 +99,82 @@ extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_23();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" extern void* __vt__12dDlst_base_c[3];
|
||||
extern "C" extern u8 g_dComIfG_gameInfo[122384];
|
||||
extern "C" extern u8 g_meter2_info[248];
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803949F0-803949F0 021050 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DEAD static char const* const stringBase_803949F0 = "wipe_00.bti";
|
||||
SECTION_DEAD static char const* const stringBase_803949FC = "tt_block8x8.bti";
|
||||
/* @stringBase0 padding */
|
||||
SECTION_DEAD static char const* const pad_80394A0C = "\0\0\0";
|
||||
#pragma pop
|
||||
|
||||
/* 803BB618-803BB624 018738 000C+00 1/1 0/0 0/0 .data cNullVec__6Z2Calc */
|
||||
SECTION_DATA static u8 cNullVec__6Z2Calc[12] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/* 803BB624-803BB630 -00001 000C+00 0/1 0/0 0/0 .data @3693 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DATA static void* lit_3693[3] = {
|
||||
(void*)NULL,
|
||||
(void*)0xFFFFFFFF,
|
||||
(void*)open_init__8dScope_cFv,
|
||||
};
|
||||
#pragma pop
|
||||
|
||||
/* 803BB630-803BB63C -00001 000C+00 0/1 0/0 0/0 .data @3694 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DATA static void* lit_3694[3] = {
|
||||
(void*)NULL,
|
||||
(void*)0xFFFFFFFF,
|
||||
(void*)move_init__8dScope_cFv,
|
||||
};
|
||||
#pragma pop
|
||||
|
||||
/* 803BB63C-803BB648 -00001 000C+00 0/1 0/0 0/0 .data @3695 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DATA static void* lit_3695[3] = {
|
||||
(void*)NULL,
|
||||
(void*)0xFFFFFFFF,
|
||||
(void*)close_init__8dScope_cFv,
|
||||
};
|
||||
#pragma pop
|
||||
|
||||
/* 803BB648-803BB66C 018768 0024+00 2/3 0/0 0/0 .data init_process */
|
||||
SECTION_DATA static u8 init_process[36] = {
|
||||
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, 0x00,
|
||||
typedef void (dScope_c::*initFunc)();
|
||||
SECTION_DATA initFunc init_process[] = {
|
||||
&dScope_c::open_init,
|
||||
&dScope_c::move_init,
|
||||
&dScope_c::close_init,
|
||||
};
|
||||
|
||||
/* 803BB66C-803BB678 -00001 000C+00 0/1 0/0 0/0 .data @3696 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DATA static void* lit_3696[3] = {
|
||||
(void*)NULL,
|
||||
(void*)0xFFFFFFFF,
|
||||
(void*)open_proc__8dScope_cFv,
|
||||
};
|
||||
#pragma pop
|
||||
|
||||
/* 803BB678-803BB684 -00001 000C+00 0/1 0/0 0/0 .data @3697 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DATA static void* lit_3697[3] = {
|
||||
(void*)NULL,
|
||||
(void*)0xFFFFFFFF,
|
||||
(void*)move_proc__8dScope_cFv,
|
||||
};
|
||||
#pragma pop
|
||||
|
||||
/* 803BB684-803BB690 -00001 000C+00 0/1 0/0 0/0 .data @3698 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DATA static void* lit_3698[3] = {
|
||||
(void*)NULL,
|
||||
(void*)0xFFFFFFFF,
|
||||
(void*)close_proc__8dScope_cFv,
|
||||
};
|
||||
#pragma pop
|
||||
|
||||
/* 803BB690-803BB6B4 0187B0 0024+00 1/2 0/0 0/0 .data move_process */
|
||||
SECTION_DATA static u8 move_process[36] = {
|
||||
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, 0x00,
|
||||
typedef void (dScope_c::*moveFunc)();
|
||||
SECTION_DATA moveFunc move_process[] = {
|
||||
&dScope_c::open_proc,
|
||||
&dScope_c::move_proc,
|
||||
&dScope_c::close_proc,
|
||||
};
|
||||
|
||||
/* 80453A10-80453A14 002010 0004+00 4/4 0/0 0/0 .sdata2 @3756 */
|
||||
SECTION_SDATA2 static f32 lit_3756 = 3.0f;
|
||||
|
||||
/* 80453A14-80453A18 002014 0004+00 4/4 0/0 0/0 .sdata2 @3757 */
|
||||
SECTION_SDATA2 static u8 lit_3757[4] = {
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
};
|
||||
|
||||
extern void* __vt__11dMeterSub_c[8 + 3 /* padding */];
|
||||
|
||||
/* 80193690-80193960 18DFD0 02D0+00 0/0 1/1 0/0 .text __ct__8dScope_cFUc */
|
||||
dScope_c::dScope_c(u8 param_0) : field_0x58(-1), field_0x5c(-1) {
|
||||
field_0x8d = param_0;
|
||||
ResTIMG* mp_image = (ResTIMG*)dComIfGp_getMain2DArchive()->getResource('TIMG', "wipe_00.bti");
|
||||
|
||||
mHawkEyeScrn = NULL;
|
||||
mHawkEyeRootPane = NULL;
|
||||
mZoomInOutScrn = NULL;
|
||||
mZoomInOutRootPane = NULL;
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
mHawkEyePanes[i] = NULL;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
mZoomInOutPanes[i][j] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
mpWipeTex = new J2DPicture(mp_image);
|
||||
mpWipeTex->setBlackWhite(JUtility::TColor(0, 0, 0, 0), JUtility::TColor(0, 0, 0, 255));
|
||||
mWidth = mp_image->width;
|
||||
mHeight = mp_image->height;
|
||||
|
||||
mp_image = (ResTIMG*)dComIfGp_getMain2DArchive()->getResource('TIMG', "tt_block8x8.bti");
|
||||
mpBlackTex = new J2DPicture(mp_image);
|
||||
mpBlackTex->setBlackWhite(JUtility::TColor(0, 0, 0, 0), JUtility::TColor(0, 0, 0, 255));
|
||||
mScale = lit_3756;
|
||||
mAlpha = FLOAT_LABEL(lit_3757);
|
||||
mOpenTimer = 0;
|
||||
field_0x8a = 0;
|
||||
mProcess = PROC_OPEN;
|
||||
mIsDead = false;
|
||||
(this->*init_process[mProcess])();
|
||||
}
|
||||
|
||||
/* 803BB6B4-803BB6D4 0187D4 0020+00 2/2 0/0 0/0 .data __vt__8dScope_c */
|
||||
SECTION_DATA extern void* __vt__8dScope_c[8] = {
|
||||
(void*)NULL /* RTTI */, (void*)NULL,
|
||||
@@ -206,59 +199,76 @@ SECTION_DATA extern void* __vt__11dMeterSub_c[8 + 3 /* padding */] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
/* 80453A10-80453A14 002010 0004+00 4/4 0/0 0/0 .sdata2 @3756 */
|
||||
SECTION_SDATA2 static f32 lit_3756 = 3.0f;
|
||||
|
||||
/* 80453A14-80453A18 002014 0004+00 4/4 0/0 0/0 .sdata2 @3757 */
|
||||
SECTION_SDATA2 static u8 lit_3757[4] = {
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* 80453A18-80453A20 002018 0008+00 1/1 0/0 0/0 .sdata2 @3759 */
|
||||
SECTION_SDATA2 static f64 lit_3759 = 4503599627370496.0 /* cast u32 to float */;
|
||||
|
||||
/* 80193690-80193960 18DFD0 02D0+00 0/0 1/1 0/0 .text __ct__8dScope_cFUc */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm dScope_c::dScope_c(u8 param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/d_scope/__ct__8dScope_cFUc.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80193960-8019396C 18E2A0 000C+00 1/1 20/20 0/0 .text __ct__Q28JUtility6TColorFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm JUtility::TColor::TColor() {
|
||||
nofralloc
|
||||
#include "asm/d/d_scope/__ct__Q28JUtility6TColorFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8019396C-80193B90 18E2AC 0224+00 1/0 0/0 0/0 .text __dt__8dScope_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm dScope_c::~dScope_c() {
|
||||
nofralloc
|
||||
#include "asm/d/d_scope/__dt__8dScope_cFv.s"
|
||||
dScope_c::~dScope_c() {
|
||||
if (mHawkEyeScrn != NULL) {
|
||||
delete mHawkEyeScrn;
|
||||
mHawkEyeScrn = NULL;
|
||||
}
|
||||
|
||||
if (mHawkEyeRootPane != NULL) {
|
||||
delete mHawkEyeRootPane;
|
||||
mHawkEyeRootPane = NULL;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (mHawkEyePanes[i] != NULL) {
|
||||
delete mHawkEyePanes[i];
|
||||
mHawkEyePanes[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (mZoomInOutScrn != NULL) {
|
||||
delete mZoomInOutScrn;
|
||||
mZoomInOutScrn = NULL;
|
||||
}
|
||||
|
||||
if (mZoomInOutRootPane != NULL) {
|
||||
delete mZoomInOutRootPane;
|
||||
mZoomInOutRootPane = NULL;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
if (mZoomInOutPanes[i][j] != NULL) {
|
||||
delete mZoomInOutPanes[i][j];
|
||||
mZoomInOutPanes[i][j] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
delete mpWipeTex;
|
||||
mpWipeTex = NULL;
|
||||
|
||||
delete mpBlackTex;
|
||||
mpBlackTex = NULL;
|
||||
|
||||
dMeter2Info_setScopeZoomPointer(0);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80193B90-80193C68 18E4D0 00D8+00 1/0 0/0 0/0 .text _execute__8dScope_cFUl */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dScope_c::_execute(u32 param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/d_scope/_execute__8dScope_cFUl.s"
|
||||
int dScope_c::_execute(u32) {
|
||||
u8 old_proc = mProcess;
|
||||
(this->*move_process[mProcess])();
|
||||
|
||||
if (!dComIfGp_checkCameraAttentionStatus(0, 8)) {
|
||||
mProcess = PROC_CLOSE;
|
||||
}
|
||||
|
||||
if (mProcess != old_proc) {
|
||||
(this->*init_process[mProcess])();
|
||||
}
|
||||
|
||||
if (mProcess != PROC_CLOSE) {
|
||||
dComIfGp_setCStickStatusForce(61, 10, 3);
|
||||
|
||||
if (i_dComIfGp_checkPlayerStatus0(0, 0x1000)) {
|
||||
dComIfGp_setRStatusForce(0x11, 3);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80453A20-80453A24 002020 0004+00 1/1 0/0 0/0 .sdata2 @3879 */
|
||||
@@ -277,34 +287,68 @@ SECTION_SDATA2 static f32 lit_3882 = 224.0f;
|
||||
SECTION_SDATA2 static f32 lit_3883 = 608.0f;
|
||||
|
||||
/* 80193C68-80193FA0 18E5A8 0338+00 1/0 0/0 0/0 .text draw__8dScope_cFv */
|
||||
// matches with literals and when vtables in this TU are fixed
|
||||
#ifdef NONMATCHING
|
||||
void dScope_c::draw() {
|
||||
dComIfGp_getCurrentGrafPort()->setup2D();
|
||||
f32 temp_f1 = mScale;
|
||||
f32 temp_f31 = mWidth * temp_f1;
|
||||
f32 temp_f30 = mHeight * temp_f1;
|
||||
u8 alpha = mAlpha * 255.0f;
|
||||
|
||||
if (i_dComIfGp_checkPlayerStatus0(0, 0x1000)) {
|
||||
J2DDrawLine(304.0f, mDoGph_gInf_c::getMinYF(), 304.0f, mDoGph_gInf_c::getMaxYF(),
|
||||
JUtility::TColor(255, 0, 0, alpha), 6);
|
||||
J2DDrawLine(mDoGph_gInf_c::getMinXF(), 224.0f, mDoGph_gInf_c::getMaxXF(), 224.0f,
|
||||
JUtility::TColor(255, 0, 0, alpha), 6);
|
||||
}
|
||||
|
||||
mpWipeTex->setAlpha(alpha);
|
||||
mpBlackTex->setAlpha(alpha);
|
||||
|
||||
f32 temp_f29 = 304.0f - temp_f31;
|
||||
f32 temp_f28 = 304.0f + temp_f31;
|
||||
f32 temp_f27 = 224.0f - temp_f30;
|
||||
f32 temp_f26 = 224.0f + temp_f30;
|
||||
|
||||
mpWipeTex->draw(temp_f29, temp_f27, temp_f31, temp_f30, false, false, false);
|
||||
mpWipeTex->draw(304.0f, temp_f27, temp_f31, temp_f30, true, false, false);
|
||||
mpWipeTex->draw(temp_f29, 224.0f, temp_f31, temp_f30, false, true, false);
|
||||
mpWipeTex->draw(304.0f, 224.0f, temp_f31, temp_f30, true, true, false);
|
||||
|
||||
mpBlackTex->draw(mDoGph_gInf_c::getMinXF(), mDoGph_gInf_c::getMinYF(),
|
||||
mDoGph_gInf_c::getWidthF(), temp_f27 - mDoGph_gInf_c::getMinYF(), false, false,
|
||||
false);
|
||||
mpBlackTex->draw(mDoGph_gInf_c::getMinXF(), temp_f26, mDoGph_gInf_c::getWidthF(),
|
||||
mDoGph_gInf_c::getMaxYF() - temp_f26, false, false, false);
|
||||
mpBlackTex->draw(mDoGph_gInf_c::getMinXF(), temp_f27, temp_f29 - mDoGph_gInf_c::getMinXF(),
|
||||
temp_f26 - temp_f27, false, false, false);
|
||||
mpBlackTex->draw(temp_f28, temp_f27, mDoGph_gInf_c::getMaxXF() - temp_f28, temp_f26 - temp_f27,
|
||||
false, false, false);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dScope_c::draw() {
|
||||
// asm void dScope_c::draw() {
|
||||
extern "C" asm void draw__8dScope_cFv() {
|
||||
nofralloc
|
||||
#include "asm/d/d_scope/draw__8dScope_cFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 80193FA0-80193FB4 18E8E0 0014+00 1/0 0/0 0/0 .text isDead__8dScope_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dScope_c::isDead() {
|
||||
nofralloc
|
||||
#include "asm/d/d_scope/isDead__8dScope_cFv.s"
|
||||
int dScope_c::isDead() {
|
||||
return mIsDead != false;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80193FB4-80193FD0 18E8F4 001C+00 1/0 0/0 0/0 .text open_init__8dScope_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dScope_c::open_init() {
|
||||
nofralloc
|
||||
#include "asm/d/d_scope/open_init__8dScope_cFv.s"
|
||||
void dScope_c::open_init() {
|
||||
mScale = lit_3756;
|
||||
mAlpha = FLOAT_LABEL(lit_3757);
|
||||
mOpenTimer = 0;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80453A34-80453A38 002034 0004+00 2/2 0/0 0/0 .sdata2 @3902 */
|
||||
@@ -320,6 +364,20 @@ SECTION_SDATA2 static f32 lit_3904 = 1.0f;
|
||||
SECTION_SDATA2 static f64 lit_3906 = 4503601774854144.0 /* cast s32 to float */;
|
||||
|
||||
/* 80193FD0-80194048 18E910 0078+00 1/0 0/0 0/0 .text open_proc__8dScope_cFv */
|
||||
// matches with literals
|
||||
#ifdef NONMATCHING
|
||||
void dScope_c::open_proc() {
|
||||
mOpenTimer++;
|
||||
mScale = 3.0f - (mOpenTimer / 5.0f) * 1.5f;
|
||||
mAlpha = 1.0f;
|
||||
|
||||
if (mOpenTimer >= 5) {
|
||||
mScale = 1.5f;
|
||||
mAlpha = 1.0f;
|
||||
mProcess = PROC_MOVE;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -328,23 +386,32 @@ asm void dScope_c::open_proc() {
|
||||
#include "asm/d/d_scope/open_proc__8dScope_cFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 80194048-8019404C 18E988 0004+00 1/0 0/0 0/0 .text move_init__8dScope_cFv */
|
||||
void dScope_c::move_init() {
|
||||
/* empty function */
|
||||
}
|
||||
void dScope_c::move_init() {}
|
||||
|
||||
/* 8019404C-80194050 18E98C 0004+00 1/0 0/0 0/0 .text move_proc__8dScope_cFv */
|
||||
void dScope_c::move_proc() {
|
||||
/* empty function */
|
||||
}
|
||||
void dScope_c::move_proc() {}
|
||||
|
||||
/* 80194050-80194054 18E990 0004+00 1/0 0/0 0/0 .text close_init__8dScope_cFv */
|
||||
void dScope_c::close_init() {
|
||||
/* empty function */
|
||||
}
|
||||
void dScope_c::close_init() {}
|
||||
|
||||
/* 80194054-801940D4 18E994 0080+00 1/0 0/0 0/0 .text close_proc__8dScope_cFv */
|
||||
// matches with literals
|
||||
#ifdef NONMATCHING
|
||||
void dScope_c::close_proc() {
|
||||
if (mOpenTimer > 0) {
|
||||
mOpenTimer--;
|
||||
mScale = 3.0f - (mOpenTimer / 5.0f) * 1.5f;
|
||||
mAlpha = 1.0f;
|
||||
} else {
|
||||
mScale = 3.0f;
|
||||
mAlpha = 0.0f;
|
||||
mIsDead = true;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -353,55 +420,45 @@ asm void dScope_c::close_proc() {
|
||||
#include "asm/d/d_scope/close_proc__8dScope_cFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 801940D4-8019411C 18EA14 0048+00 1/0 0/0 0/0 .text __dt__11dMeterSub_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm dMeterSub_c::~dMeterSub_c() {
|
||||
// asm dMeterSub_c::~dMeterSub_c() {
|
||||
extern "C" asm void __dt__11dMeterSub_cFv() {
|
||||
nofralloc
|
||||
#include "asm/d/d_scope/__dt__11dMeterSub_cFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8019411C-80194124 18EA5C 0008+00 2/0 0/0 0/0 .text _create__11dMeterSub_cFv */
|
||||
bool dMeterSub_c::_create() {
|
||||
// int dMeterSub_c::_create() {
|
||||
extern "C" int _create__11dMeterSub_cFv() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 80194124-8019412C 18EA64 0008+00 2/0 0/0 0/0 .text _delete__11dMeterSub_cFv */
|
||||
bool dMeterSub_c::_delete() {
|
||||
// int dMeterSub_c::_delete() {
|
||||
extern "C" int _delete__11dMeterSub_cFv() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 8019412C-80194130 18EA6C 0004+00 1/0 0/0 0/0 .text draw__11dMeterSub_cFv */
|
||||
void dMeterSub_c::draw() {
|
||||
// void dMeterSub_c::draw() {
|
||||
extern "C" void draw__11dMeterSub_cFv() {
|
||||
/* empty function */
|
||||
}
|
||||
|
||||
/* 80194130-80194138 18EA70 0008+00 1/0 0/0 0/0 .text _execute__11dMeterSub_cFUl */
|
||||
bool dMeterSub_c::_execute(u32 param_0) {
|
||||
// int dMeterSub_c::_execute(u32 param_0) {
|
||||
extern "C" int _execute__11dMeterSub_cFUl() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 80194138-80194140 18EA78 0008+00 1/0 3/0 0/0 .text isDead__11dMeterSub_cFv */
|
||||
bool dMeterSub_c::isDead() {
|
||||
// int dMeterSub_c::isDead() {
|
||||
extern "C" int isDead__11dMeterSub_cFv() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 80194140-801941E4 18EA80 00A4+00 0/0 1/0 0/0 .text __sinit_d_scope_cpp */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void __sinit_d_scope_cpp() {
|
||||
nofralloc
|
||||
#include "asm/d/d_scope/__sinit_d_scope_cpp.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
REGISTER_CTORS(0x80194140, __sinit_d_scope_cpp);
|
||||
#pragma pop
|
||||
|
||||
/* 803949F0-803949F0 021050 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
|
||||
@@ -4097,12 +4097,3 @@ extern "C" asm void __dt__18dScnKy_env_light_cFv() {
|
||||
#include "asm/d/kankyo/d_kankyo/__dt__18dScnKy_env_light_cFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80451070-80451078 -00001 0008+00 0/0 1/1 0/0 .sbss None */
|
||||
/* 80451070 0001+00 data_80451070 None */
|
||||
/* 80451071 0007+00 data_80451071 None */
|
||||
extern u8 struct_80451070[8];
|
||||
u8 struct_80451070[8];
|
||||
|
||||
/* 80394C6C-80394C6C 0212CC 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
|
||||
+42
-41
@@ -4,11 +4,11 @@
|
||||
*/
|
||||
|
||||
#include "d/save/d_save.h"
|
||||
#include "d/save/d_save_init.h"
|
||||
#include "Z2AudioLib/Z2AudioMgr.h"
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
#include "d/meter/d_meter2_info.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "rel/d/a/obj/d_a_obj_carry/d_a_obj_carry.h"
|
||||
|
||||
//
|
||||
@@ -28,7 +28,6 @@ extern "C" u8 saveBitLabels__16dSv_event_flag_c[1644 + 4 /* padding */];
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void setInitEventBit__Fv();
|
||||
extern "C" void _savegpr_22();
|
||||
extern "C" void _restgpr_22();
|
||||
extern "C" void __div2i();
|
||||
@@ -377,26 +376,24 @@ u8 dSv_player_item_c::getItem(int i_slotNo, bool i_checkCombo) const {
|
||||
return NO_ITEM;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803A7270-803A7288 004390 0017+01 1/1 0/0 0/0 .data i_item_lst$4006 */
|
||||
static u8 i_item_lst[23] = {
|
||||
0x0A, 0x08, 0x06, 0x02, 0x09, 0x04, 0x03, 0x00, 0x01, 0x17, 0x14, 0x05,
|
||||
0x0F, 0x10, 0x11, 0x0B, 0x0C, 0x0D, 0x0E, 0x13, 0x12, 0x16, 0x15,
|
||||
};
|
||||
|
||||
/* 800332F8-80033354 02DC38 005C+00 2/2 0/0 0/0 .text setLineUpItem__17dSv_player_item_cFv */
|
||||
void dSv_player_item_c::setLineUpItem() {
|
||||
int i2 = 0;
|
||||
static u8 i_item_lst[23] = {
|
||||
0x0A, 0x08, 0x06, 0x02, 0x09, 0x04, 0x03, 0x00, 0x01, 0x17, 0x14, 0x05,
|
||||
0x0F, 0x10, 0x11, 0x0B, 0x0C, 0x0D, 0x0E, 0x13, 0x12, 0x16, 0x15,
|
||||
};
|
||||
|
||||
for (int i1 = 0; i1 < 24; i1++) {
|
||||
mItemSlots[i1] = NO_ITEM;
|
||||
int slot_idx = 0;
|
||||
|
||||
for (int i = 0; i < 24; i++) {
|
||||
mItemSlots[i] = NO_ITEM;
|
||||
}
|
||||
|
||||
for (int i1 = 0; i1 < 23; i1++) {
|
||||
u32 current = i_item_lst[i1];
|
||||
for (int i = 0; i < 23; i++) {
|
||||
u32 current = i_item_lst[i];
|
||||
if (mItems[current] != NO_ITEM) {
|
||||
mItemSlots[i2] = current;
|
||||
i2++;
|
||||
mItemSlots[slot_idx] = current;
|
||||
slot_idx++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1198,24 +1195,24 @@ void dSv_event_c::init() {
|
||||
for (int i = 0; i < MAX_EVENTS; i++) {
|
||||
mEvent[i] = 0;
|
||||
}
|
||||
setInitEventBit__Fv();
|
||||
setInitEventBit();
|
||||
}
|
||||
|
||||
/* 8003498C-800349A4 02F2CC 0018+00 1/1 27/27 58/58 .text onEventBit__11dSv_event_cFUs */
|
||||
void dSv_event_c::onEventBit(u16 i_no) {
|
||||
mEvent[(i_no >> 8)] |= (u8)i_no;
|
||||
mEvent[i_no >> 8] |= (u8)i_no;
|
||||
}
|
||||
|
||||
/* 800349A4-800349BC 02F2E4 0018+00 1/1 14/14 23/23 .text offEventBit__11dSv_event_cFUs
|
||||
*/
|
||||
void dSv_event_c::offEventBit(u16 i_no) {
|
||||
mEvent[(i_no >> 8)] &= ~(u8)i_no;
|
||||
mEvent[i_no >> 8] &= ~(u8)i_no;
|
||||
}
|
||||
|
||||
/* 800349BC-800349E0 02F2FC 0024+00 3/3 77/77 153/153 .text isEventBit__11dSv_event_cCFUs
|
||||
*/
|
||||
BOOL dSv_event_c::isEventBit(u16 i_no) const {
|
||||
return mEvent[(i_no >> 8)] & (i_no & 0xFF) ? TRUE : FALSE;
|
||||
return mEvent[i_no >> 8] & (i_no & 0xFF) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
/* 800349E0-80034A04 02F320 0024+00 0/0 12/12 17/17 .text setEventReg__11dSv_event_cFUsUc
|
||||
@@ -1693,18 +1690,20 @@ SECTION_DEAD static char const* const stringBase_8037926C = "SAVE size:%d\n";
|
||||
int dSv_info_c::memory_to_card(char* card_ptr, int dataNum) {
|
||||
BOOL lantern_stolen;
|
||||
BOOL lantern_dropped;
|
||||
|
||||
OSTime start;
|
||||
OSTime time;
|
||||
OSTime play_time;
|
||||
|
||||
bool lantern_not_recovered = false;
|
||||
bool tmp_lantern_check = false;
|
||||
u16 current_lantern_oil = 0;
|
||||
|
||||
|
||||
// If haven't gotten then lantern back from the monkey
|
||||
if (!i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[226])) {
|
||||
// Store whether or not it's stolen and dropped
|
||||
lantern_stolen = i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[224]);
|
||||
lantern_dropped = i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[225]);
|
||||
lantern_dropped = i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[224]);
|
||||
lantern_stolen = i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[225]);
|
||||
|
||||
// Then turn those events off
|
||||
dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[224]);
|
||||
@@ -1730,9 +1729,10 @@ int dSv_info_c::memory_to_card(char* card_ptr, int dataNum) {
|
||||
card_ptr += dataNum * QUEST_LOG_SIZE;
|
||||
dSv_save_c* savedata = dComIfGs_getSaveData();
|
||||
|
||||
play_time = OSGetTime() - dComIfGs_getSaveStartTime();
|
||||
play_time += dComIfGs_getSaveTotalTime();
|
||||
// play_time += ();
|
||||
start = dComIfGs_getSaveStartTime();
|
||||
time = OSGetTime();
|
||||
|
||||
play_time = (time - start) + dComIfGs_getSaveTotalTime();
|
||||
|
||||
// 3599940 = 999:59 in seconds
|
||||
if (dComIfGs_getSaveTotalTime() / OS_TIMER_CLOCK < 3599940) {
|
||||
@@ -1740,15 +1740,16 @@ int dSv_info_c::memory_to_card(char* card_ptr, int dataNum) {
|
||||
}
|
||||
|
||||
savedata->getPlayer().getPlayerStatusB().setDateIpl(OSGetTime());
|
||||
|
||||
memcpy(card_ptr, savedata, sizeof(dSv_save_c));
|
||||
printf("Write size:%d\n", sizeof(dSv_save_c));
|
||||
|
||||
// Now that we've saved, reset events if needed
|
||||
if (lantern_not_recovered == true) {
|
||||
if (lantern_stolen) {
|
||||
if (lantern_dropped) {
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[224]);
|
||||
}
|
||||
if (lantern_dropped) {
|
||||
if (lantern_stolen) {
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[225]);
|
||||
}
|
||||
}
|
||||
@@ -1774,9 +1775,9 @@ asm int dSv_info_c::memory_to_card(char* card_ptr, int dataNum) {
|
||||
#endif
|
||||
|
||||
/* 80035A04-80035BD0 030344 01CC+00 0/0 2/2 0/0 .text card_to_memory__10dSv_info_cFPci */
|
||||
int dSv_info_c::card_to_memory(char* card_ptr, int dataNum) {
|
||||
card_ptr = card_ptr + dataNum * QUEST_LOG_SIZE;
|
||||
memcpy(dComIfGs_getSaveData(), card_ptr, sizeof(dSv_save_c));
|
||||
int dSv_info_c::card_to_memory(char* i_cardPtr, int i_dataNum) {
|
||||
i_cardPtr = i_cardPtr + i_dataNum * QUEST_LOG_SIZE;
|
||||
memcpy(dComIfGs_getSaveData(), i_cardPtr, sizeof(dSv_save_c));
|
||||
|
||||
if (OSGetSoundMode() == OS_SOUND_MODE_MONO) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getConfig().setSound(OS_SOUND_MODE_MONO);
|
||||
@@ -1795,12 +1796,12 @@ int dSv_info_c::card_to_memory(char* card_ptr, int dataNum) {
|
||||
|
||||
dComIfGs_setKeyNum(6, 0);
|
||||
|
||||
if (dComIfGs_getItem(SLOT_9, 1) == W_HOOKSHOT) {
|
||||
if (dComIfGs_getItem(SLOT_9, true) == W_HOOKSHOT) {
|
||||
dComIfGs_setItem(SLOT_10, W_HOOKSHOT);
|
||||
dComIfGs_setItem(SLOT_9, NO_ITEM);
|
||||
}
|
||||
|
||||
if (dComIfGs_getItem(SLOT_9, 1) == HOOKSHOT && dComIfGs_getItem(SLOT_10, true) == W_HOOKSHOT) {
|
||||
if (dComIfGs_getItem(SLOT_9, true) == HOOKSHOT && dComIfGs_getItem(SLOT_10, true) == W_HOOKSHOT) {
|
||||
dComIfGs_setItem(SLOT_9, NO_ITEM);
|
||||
}
|
||||
|
||||
@@ -1818,15 +1819,15 @@ int dSv_info_c::card_to_memory(char* card_ptr, int dataNum) {
|
||||
|
||||
/* 80035BD0-80035C88 030510 00B8+00 0/0 3/3 0/0 .text initdata_to_card__10dSv_info_cFPci
|
||||
*/
|
||||
int dSv_info_c::initdata_to_card(char* card_ptr, int dataNum) {
|
||||
card_ptr = card_ptr + (dataNum * QUEST_LOG_SIZE);
|
||||
dSv_save_c tmp;
|
||||
int dSv_info_c::initdata_to_card(char* i_cardPtr, int i_dataNum) {
|
||||
i_cardPtr = i_cardPtr + (i_dataNum * QUEST_LOG_SIZE);
|
||||
dSv_save_c save;
|
||||
|
||||
tmp.init();
|
||||
tmp.getPlayer().getPlayerInfo().setPlayerName("");
|
||||
tmp.getPlayer().getPlayerInfo().setHorseName("");
|
||||
memcpy(card_ptr, &tmp, 0x958);
|
||||
printf("INIT size:%d\n", 0x958);
|
||||
save.init();
|
||||
save.getPlayer().getPlayerInfo().setPlayerName("");
|
||||
save.getPlayer().getPlayerInfo().setHorseName("");
|
||||
memcpy(i_cardPtr, &save, sizeof(dSv_save_c));
|
||||
printf("INIT size:%d\n", sizeof(dSv_save_c));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,4 @@
|
||||
#include "d/save/d_save_init.h"
|
||||
|
||||
/* 80035C88-80035C8C 0305C8 0004+00 0/0 1/1 0/0 .text setInitEventBit__Fv */
|
||||
void setInitEventBit() {
|
||||
/* empty function */
|
||||
}
|
||||
void setInitEventBit() {}
|
||||
|
||||
+299
-20
@@ -19,7 +19,7 @@
|
||||
//
|
||||
|
||||
struct J2DPrint {
|
||||
/* 802F4658 */ void setBuffer(u32);
|
||||
/* 802F4658 */ static void setBuffer(u32);
|
||||
};
|
||||
|
||||
struct J2DOrthoGraph {
|
||||
@@ -164,10 +164,10 @@ extern "C" u8 sManager__10JUTProcBar[4];
|
||||
static ResTIMG* createTimg(u16 width, u16 height, u32 format) {
|
||||
u32 bufferSize = GXGetTexBufferSize(width, height, format, GX_FALSE, 0) + 0x20;
|
||||
ResTIMG* timg;
|
||||
|
||||
|
||||
timg = (ResTIMG*)JKRHeap::alloc(bufferSize, 0x20, NULL);
|
||||
|
||||
if (timg==NULL) {
|
||||
if (timg == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -239,14 +239,34 @@ bool data_80450BE7;
|
||||
#pragma pop
|
||||
|
||||
/* 80007E44-80007F90 002784 014C+00 1/1 0/0 0/0 .text create__13mDoGph_gInf_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void mDoGph_gInf_c::create() {
|
||||
nofralloc
|
||||
#include "asm/m_Do/m_Do_graphic/create__13mDoGph_gInf_cFv.s"
|
||||
void mDoGph_gInf_c::create() {
|
||||
JFWDisplay::createManager(NULL, JKRHeap::sCurrentHeap, JUTXfb::UNK_2, true);
|
||||
JFWDisplay::getManager()->setDrawDoneMethod(JFWDisplay::UNK_METHOD_1);
|
||||
|
||||
JUTFader* faderPtr = new JUTFader(0, 0, JUTVideo::getManager()->getRenderMode()->fb_width,
|
||||
JUTVideo::getManager()->getRenderMode()->efb_height,
|
||||
JUtility::TColor(0, 0, 0, 0));
|
||||
setFader(faderPtr);
|
||||
JFWDisplay::getManager()->setFader(faderPtr);
|
||||
JUTProcBar::getManager()->setVisibleHeapBar(false);
|
||||
JUTProcBar::getManager()->setVisible(false);
|
||||
JUTDbPrint::getManager()->setVisible(false);
|
||||
|
||||
mFrameBufferTimg = createTimg(304, 224, 6);
|
||||
mFrameBufferTex = (char*)mFrameBufferTimg + sizeof(ResTIMG);
|
||||
|
||||
mZbufferTimg = createTimg(304, 224, 3);
|
||||
mZbufferTex = (char*)mZbufferTimg + sizeof(ResTIMG);
|
||||
|
||||
J2DPrint::setBuffer(0x400);
|
||||
mBlureFlag = false;
|
||||
mFade = 0;
|
||||
|
||||
mBackColor = g_clearColor;
|
||||
mFadeColor = g_clearColor;
|
||||
|
||||
VISetBlack(TRUE);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80450BE8-80450BF0 0000E8 0008+00 1/1 0/0 0/0 .sbss None */
|
||||
@@ -257,6 +277,7 @@ void mDoGph_gInf_c::beginRender() {
|
||||
if (data_80450BE8) {
|
||||
JUTXfb::getManager()->setDrawingXfbIndex(-1);
|
||||
}
|
||||
|
||||
JFWDisplay::getManager()->beginRender();
|
||||
}
|
||||
|
||||
@@ -434,14 +455,10 @@ asm void mDoGph_gInf_c::calcFade() {
|
||||
#endif
|
||||
|
||||
/* 8000841C-80008420 002D5C 0004+00 0/0 1/0 0/0 .text mDoGph_BlankingON__Fv */
|
||||
void mDoGph_BlankingON() {
|
||||
/* empty function */
|
||||
}
|
||||
void mDoGph_BlankingON() {}
|
||||
|
||||
/* 80008420-80008424 002D60 0004+00 0/0 1/0 0/0 .text mDoGph_BlankingOFF__Fv */
|
||||
void mDoGph_BlankingOFF() {
|
||||
/* empty function */
|
||||
}
|
||||
void mDoGph_BlankingOFF() {}
|
||||
|
||||
/* 80008424-80008450 002D64 002C+00 1/1 0/0 0/0 .text dScnPly_BeforeOfPaint__Fv */
|
||||
static void dScnPly_BeforeOfPaint() {
|
||||
@@ -708,6 +725,38 @@ asm void mDoGph_gInf_c::bloom_c::draw() {
|
||||
|
||||
/* 8000A160-8000A290 004AA0 0130+00 1/1 0/0 0/0 .text
|
||||
* retry_captue_frame__FP10view_classP15view_port_classi */
|
||||
#ifdef NONMATCHING
|
||||
static void retry_captue_frame(view_class* param_0, view_port_class* param_1, int param_2) {
|
||||
s16 width;
|
||||
s16 x_orig;
|
||||
s16 y_orig;
|
||||
s16 height;
|
||||
void* tex;
|
||||
|
||||
x_orig = (int)param_1->mXOrig & 0xFFFFFFF8;
|
||||
y_orig = (int)param_1->mYOrig & 0xFFFFFFF8;
|
||||
width = (int)param_1->mWidth & 0xFFFFFFF8;
|
||||
height = (int)param_1->mHeight & 0xFFFFFFF8;
|
||||
tex = mDoGph_gInf_c::getFrameBufferTex();
|
||||
|
||||
if (!dComIfGp_isPauseFlag()) {
|
||||
if (y_orig < 0) {
|
||||
height += y_orig;
|
||||
y_orig = -y_orig >> 1;
|
||||
tex = (char*)tex + GXGetTexBufferSize(304, y_orig,
|
||||
mDoGph_gInf_c::getFrameBufferTimg()->format,
|
||||
GX_FALSE, 0);
|
||||
}
|
||||
|
||||
GXSetTexCopySrc(x_orig, y_orig, width, height);
|
||||
GXSetTexCopyDst(width >> 1, height >> 1, mDoGph_gInf_c::getFrameBufferTimg()->format,
|
||||
GX_TRUE);
|
||||
GXCopyTex(tex, GX_FALSE);
|
||||
GXPixModeSync();
|
||||
GXInvalidateTexAll();
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -716,6 +765,7 @@ static asm void retry_captue_frame(view_class* param_0, view_port_class* param_1
|
||||
#include "asm/m_Do/m_Do_graphic/retry_captue_frame__FP10view_classP15view_port_classi.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8000A290-8000A504 004BD0 0274+00 1/1 0/0 0/0 .text motionBlure__FP10view_class */
|
||||
#pragma push
|
||||
@@ -813,6 +863,237 @@ SECTION_SDATA2 static f32 lit_5031[1 + 1 /* padding */] = {
|
||||
};
|
||||
|
||||
/* 8000A604-8000B118 004F44 0B14+00 0/0 1/0 0/0 .text mDoGph_Painter__Fv */
|
||||
// lots of regalloc / various issues
|
||||
#ifdef NONMATCHING
|
||||
int mDoGph_Painter() {
|
||||
dComIfGp_particle_calcMenu();
|
||||
|
||||
JFWDisplay::getManager()->setFader(mDoGph_gInf_c::getFader());
|
||||
mDoGph_gInf_c::setClearColor(mDoGph_gInf_c::getBackColor());
|
||||
mDoGph_gInf_c::beginRender();
|
||||
GXSetAlphaUpdate(GX_DISABLE);
|
||||
mDoGph_gInf_c::setBackColor(g_clearColor);
|
||||
|
||||
j3dSys.drawInit();
|
||||
GXSetDither(GX_ENABLE);
|
||||
|
||||
J2DOrthoGraph ortho(0.0f, 0.0f, 608.0f, 448.0f, -1.0f, 1.0f);
|
||||
ortho.setOrtho(JGeometry::TBox2<f32>(mDoGph_gInf_c::getHeightF(), mDoGph_gInf_c::getWidthF(),
|
||||
mDoGph_gInf_c::getMinYF(), mDoGph_gInf_c::getMinXF()),
|
||||
-1.0f, 1.0f);
|
||||
ortho.setPort();
|
||||
|
||||
dComIfGp_setCurrentGrafPort(&ortho);
|
||||
dComIfGd_drawCopy2D();
|
||||
|
||||
if (dComIfGp_getWindowNum() != 0) {
|
||||
dDlst_window_c* window_p = dComIfGp_getWindow(0);
|
||||
int camera_id = window_p->getCameraID();
|
||||
camera_class* camera_p = dComIfGp_getCamera(camera_id);
|
||||
|
||||
if (camera_p != NULL) {
|
||||
dComIfGd_imageDrawShadow(camera_p->mViewMtx);
|
||||
view_port_class* view_port = window_p->getViewPort();
|
||||
|
||||
if (view_port->mXOrig != 0.0f || view_port->mYOrig != 0.0f) {
|
||||
view_port_class new_port;
|
||||
new_port.mXOrig = 0.0f;
|
||||
new_port.mYOrig = 0.0f;
|
||||
new_port.mWidth = 608.0f;
|
||||
new_port.mHeight = 448.0f;
|
||||
new_port.mNearZ = view_port->mNearZ;
|
||||
new_port.mFarZ = view_port->mFarZ;
|
||||
new_port.mScissor = view_port->mScissor;
|
||||
|
||||
view_port = &new_port;
|
||||
}
|
||||
|
||||
GXSetViewport(view_port->mXOrig, view_port->mYOrig, view_port->mWidth,
|
||||
view_port->mHeight, view_port->mNearZ, view_port->mFarZ);
|
||||
GXSetScissor(view_port->mXOrig, view_port->mYOrig, view_port->mWidth,
|
||||
view_port->mHeight);
|
||||
|
||||
JPADrawInfo draw_info(camera_p->mViewMtx, camera_p->mFovy, camera_p->mAspect);
|
||||
|
||||
dComIfGp_setCurrentWindow(window_p);
|
||||
dComIfGp_setCurrentView(camera_p);
|
||||
dComIfGp_setCurrentViewport(view_port);
|
||||
GXSetProjection(camera_p->mProjMtx, GX_PERSPECTIVE);
|
||||
PPCSync();
|
||||
|
||||
j3dSys.setViewMtx(camera_p->mViewMtx);
|
||||
dKy_setLight();
|
||||
dComIfGd_drawOpaListSky();
|
||||
dComIfGd_drawXluListSky();
|
||||
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
dComIfGd_drawOpaListBG();
|
||||
dComIfGd_drawOpaListDarkBG();
|
||||
dComIfGd_drawOpaListMiddle();
|
||||
|
||||
dComIfGp_particle_drawFogPri0_B(&draw_info);
|
||||
dComIfGp_particle_drawNormalPri0_B(&draw_info);
|
||||
|
||||
dComIfGd_drawShadow(camera_p->mViewMtx);
|
||||
|
||||
dComIfGd_drawOpaList();
|
||||
dComIfGd_drawOpaListDark();
|
||||
dComIfGd_drawOpaListPacket();
|
||||
dComIfGd_drawXluListBG();
|
||||
dComIfGd_drawXluListDarkBG();
|
||||
|
||||
dComIfGp_particle_drawFogPri0_A(&draw_info);
|
||||
dComIfGp_particle_drawNormalPri0_A(&draw_info);
|
||||
|
||||
dComIfGd_drawXluList();
|
||||
dComIfGd_drawXluListDark();
|
||||
|
||||
j3dSys.reinitGX();
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
|
||||
if (!dComIfGp_isPauseFlag()) {
|
||||
motionBlure(camera_p);
|
||||
drawDepth2(camera_p, view_port, dComIfGp_getCameraZoomForcus(camera_id));
|
||||
GXInvalidateTexAll();
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
|
||||
if (g_env_light.field_0x12fa == 0) {
|
||||
dComIfGd_drawOpaListInvisible();
|
||||
dComIfGd_drawXluListInvisible();
|
||||
}
|
||||
|
||||
dComIfGp_particle_drawFogPri4(&draw_info);
|
||||
dComIfGp_particle_drawProjection(&draw_info);
|
||||
|
||||
dComIfGd_drawListZxlu();
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
|
||||
dComIfGd_drawOpaListFilter();
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
|
||||
dComIfGp_particle_drawFogPri1(&draw_info);
|
||||
dComIfGp_particle_draw(&draw_info);
|
||||
dComIfGp_particle_drawFogPri2(&draw_info);
|
||||
dComIfGp_particle_drawFog(&draw_info);
|
||||
dComIfGp_particle_drawFogPri3(&draw_info);
|
||||
dComIfGp_particle_drawP1(&draw_info);
|
||||
dComIfGp_particle_drawDarkworld(&draw_info);
|
||||
|
||||
retry_captue_frame(camera_p, view_port, dComIfGp_getCameraZoomForcus(camera_id));
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
|
||||
if (g_env_light.field_0x12fa == 1) {
|
||||
dComIfGd_drawOpaListInvisible();
|
||||
dComIfGd_drawXluListInvisible();
|
||||
}
|
||||
|
||||
dComIfGp_particle_drawScreen(&draw_info);
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
|
||||
dComIfGd_drawIndScreen();
|
||||
|
||||
if (!strcmp(dComIfGp_getStartStageName(), "F_SP124")) {
|
||||
retry_captue_frame(camera_p, view_port,
|
||||
dComIfGp_getCameraZoomForcus(camera_id));
|
||||
}
|
||||
|
||||
GXSetViewport(0.0f, 0.0f, 608.0f, 448.0f, 0.0f, 1.0f);
|
||||
|
||||
Mtx44 m;
|
||||
C_MTXPerspective(m, 60.0f, 1.357143f, 1.0f, 100000.0f);
|
||||
GXSetProjection(m, GX_PERSPECTIVE);
|
||||
cXyz sp38c(0.0f, 0.0f, -2.0f);
|
||||
cXyz sp398(0.0f, 1.0f, 0.0f);
|
||||
|
||||
Mtx m2;
|
||||
mDoMtx_lookAt(m2, &sp38c, &cXyz::Zero, &sp398, 0);
|
||||
j3dSys.setViewMtx(m2);
|
||||
dComIfGd_drawXluList2DScreen();
|
||||
|
||||
j3dSys.setViewMtx(camera_p->mViewMtx);
|
||||
GXSetProjection(camera_p->mProjMtx, GX_PERSPECTIVE);
|
||||
j3dSys.reinitGX();
|
||||
|
||||
if ((g_env_light.mCameraInWater ||
|
||||
!strcmp(dComIfGp_getStartStageName(), "D_MN08")) &&
|
||||
mDoGph_gInf_c::getBloom()->getEnable() &&
|
||||
mDoGph_gInf_c::getBloom()->getMonoColor())
|
||||
{
|
||||
retry_captue_frame(camera_p, view_port,
|
||||
dComIfGp_getCameraZoomForcus(camera_id));
|
||||
}
|
||||
|
||||
mDoGph_gInf_c::getBloom()->draw();
|
||||
j3dSys.setViewMtx(camera_p->mViewMtx);
|
||||
GXSetProjection(camera_p->mProjMtx, GX_PERSPECTIVE);
|
||||
|
||||
dComIfGd_drawOpaList3Dlast();
|
||||
ortho.setOrtho(
|
||||
JGeometry::TBox2<f32>(mDoGph_gInf_c::getHeightF(), mDoGph_gInf_c::getWidthF(),
|
||||
mDoGph_gInf_c::getMinYF(), mDoGph_gInf_c::getMinXF()),
|
||||
100000.0f, -100000.0f);
|
||||
ortho.setPort();
|
||||
|
||||
Mtx m3;
|
||||
PSMTXTrans(m3, 304.0f, 224.0f, 0.0f);
|
||||
JPADrawInfo draw_info2(m3, 0.0f, 448.0f, 0.0f, 608.0f);
|
||||
dComIfGp_particle_draw2Dgame(&draw_info2);
|
||||
|
||||
trimming(camera_p, view_port);
|
||||
|
||||
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127") && !mDoGph_gInf_c::isFade()) {
|
||||
mDoGph_gInf_c::calcFade();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
dDlst_list_c::calcWipe();
|
||||
j3dSys.reinitGX();
|
||||
|
||||
ortho.setOrtho(JGeometry::TBox2<f32>(mDoGph_gInf_c::getHeightF(), mDoGph_gInf_c::getWidthF(),
|
||||
mDoGph_gInf_c::getMinYF(), mDoGph_gInf_c::getMinXF()),
|
||||
100000.0f, -100000.0f);
|
||||
ortho.setPort();
|
||||
|
||||
Mtx m4;
|
||||
PSMTXCopy(j3dSys.getViewMtx(), m4);
|
||||
|
||||
Mtx m5;
|
||||
PSMTXTrans(m5, 304.0f, 224.0f, 0.0f);
|
||||
|
||||
JPADrawInfo draw_info3(m5, 0.0f, 448.0f, 0.0f, 608.0f);
|
||||
|
||||
if (!dComIfGp_isPauseFlag()) {
|
||||
dComIfGp_particle_draw2Dback(&draw_info3);
|
||||
}
|
||||
|
||||
dComIfGp_particle_draw2DmenuBack(&draw_info3);
|
||||
ortho.setPort();
|
||||
|
||||
dComIfGd_draw2DOpa();
|
||||
drawItem3D();
|
||||
ortho.setPort();
|
||||
|
||||
dComIfGd_draw2DOpaTop();
|
||||
dComIfGd_draw2DXlu();
|
||||
|
||||
if (!dComIfGp_isPauseFlag()) {
|
||||
dComIfGp_particle_draw2Dback(&draw_info3);
|
||||
}
|
||||
|
||||
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127") && !mDoGph_gInf_c::isFade()) {
|
||||
mDoGph_gInf_c::calcFade();
|
||||
}
|
||||
|
||||
dComIfGp_particle_draw2DmenuFore(&draw_info3);
|
||||
j3dSys.setViewMtx(m4);
|
||||
|
||||
mDoGph_gInf_c::endRender();
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -821,6 +1102,7 @@ asm void mDoGph_Painter() {
|
||||
#include "asm/m_Do/m_Do_graphic/mDoGph_Painter__Fv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8000B118-8000B174 005A58 005C+00 0/0 1/0 0/0 .text __dt__13J2DOrthoGraphFv */
|
||||
#pragma push
|
||||
@@ -846,8 +1128,7 @@ int mDoGph_Create() {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void __sinit_m_Do_graphic_cpp() {
|
||||
nofralloc
|
||||
asm void __sinit_m_Do_graphic_cpp(){nofralloc
|
||||
#include "asm/m_Do/m_Do_graphic/__sinit_m_Do_graphic_cpp.s"
|
||||
}
|
||||
#pragma pop
|
||||
@@ -861,5 +1142,3 @@ REGISTER_CTORS(0x8000B1D0, __sinit_m_Do_graphic_cpp);
|
||||
s32 daPy_py_c::getAtnActorID() const {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* 80373DD0-80373DD0 000430 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
|
||||
Reference in New Issue
Block a user