mirror of
https://github.com/zeldaret/tp
synced 2026-09-01 09:43:27 -04:00
Kytag00 / Vrbox2 work, some cphase / kankyo doc (#1886)
* kytag00 work * d_a_vrbox2 close to done * rename cPhase enum values * some enums from noclip / kankyo doc * remove asm * use macro * uncomment ok-check.yml
This commit is contained in:
@@ -854,7 +854,7 @@ int daBg_c::draw() {
|
||||
s16 var_r0;
|
||||
s16 var_r3;
|
||||
s16 var_r5;
|
||||
switch (g_env_light.field_0x12fe) {
|
||||
switch (g_env_light.mPondSeason) {
|
||||
case 2:
|
||||
var_r5 = -3;
|
||||
var_r0 = 0;
|
||||
|
||||
@@ -66,10 +66,10 @@ static int daVrbox_Draw(vrbox_class* i_this) {
|
||||
/* 804986B8-80498850 000218 0198+00 1/1 0/0 0/0 .text daVrbox_color_set__FP11vrbox_class
|
||||
*/
|
||||
static int daVrbox_color_set(vrbox_class* i_this) {
|
||||
if ((g_env_light.mCloudOuterHazeColor.r + g_env_light.mCloudOuterHazeColor.g +
|
||||
g_env_light.mCloudOuterHazeColor.b + g_env_light.mSkyColor.r + g_env_light.mSkyColor.g +
|
||||
g_env_light.mSkyColor.b + g_env_light.mUpperCloudColor.r + g_env_light.mUpperCloudColor.g +
|
||||
g_env_light.mUpperCloudColor.b) == 0)
|
||||
if ((g_env_light.mVrKasumiCol.r + g_env_light.mVrKasumiCol.g +
|
||||
g_env_light.mVrKasumiCol.b + g_env_light.mVrSkyCol.r + g_env_light.mVrSkyCol.g +
|
||||
g_env_light.mVrSkyCol.b + g_env_light.mVrkumoCol.r + g_env_light.mVrkumoCol.g +
|
||||
g_env_light.mVrkumoCol.b) == 0)
|
||||
{
|
||||
g_env_light.mVrboxInvisible = true;
|
||||
return 1;
|
||||
@@ -85,9 +85,9 @@ static int daVrbox_color_set(vrbox_class* i_this) {
|
||||
material_0->setCullMode(0);
|
||||
material_0->change();
|
||||
|
||||
color.r = g_env_light.mSkyColor.r;
|
||||
color.g = g_env_light.mSkyColor.g;
|
||||
color.b = g_env_light.mSkyColor.b;
|
||||
color.r = g_env_light.mVrSkyCol.r;
|
||||
color.g = g_env_light.mVrSkyCol.g;
|
||||
color.b = g_env_light.mVrSkyCol.b;
|
||||
color.a = 255;
|
||||
material_0->setTevColor(0, &color);
|
||||
}
|
||||
@@ -97,10 +97,10 @@ static int daVrbox_color_set(vrbox_class* i_this) {
|
||||
material_1->setCullMode(0);
|
||||
material_1->change();
|
||||
|
||||
color.r = g_env_light.mCloudInnerHazeColor.r;
|
||||
color.g = g_env_light.mCloudInnerHazeColor.g;
|
||||
color.b = g_env_light.mCloudInnerHazeColor.b;
|
||||
color.a = g_env_light.mCloudInnerHazeColor.a;
|
||||
color.r = g_env_light.mVrOkuKasumiCol.r;
|
||||
color.g = g_env_light.mVrOkuKasumiCol.g;
|
||||
color.b = g_env_light.mVrOkuKasumiCol.b;
|
||||
color.a = g_env_light.mVrOkuKasumiCol.a;
|
||||
material_1->setTevColor(0, &color);
|
||||
}
|
||||
|
||||
|
||||
+438
-127
@@ -4,54 +4,29 @@
|
||||
//
|
||||
|
||||
#include "rel/d/a/d_a_vrbox2/d_a_vrbox2.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "d/kankyo/d_kankyo_rain.h"
|
||||
#include "dol2asm.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct vrbox2_class {};
|
||||
|
||||
struct mDoMtx_stack_c {
|
||||
/* 8000CE38 */ void scaleM(f32, f32, f32);
|
||||
|
||||
static u8 now[48];
|
||||
};
|
||||
|
||||
struct J3DAnmTextureSRTKey {};
|
||||
|
||||
struct J3DMaterialTable {
|
||||
/* 8032F7B4 */ void removeTexMtxAnimator(J3DAnmTextureSRTKey*);
|
||||
};
|
||||
|
||||
struct mDoExt_btkAnm {
|
||||
/* 8000D63C */ void init(J3DMaterialTable*, J3DAnmTextureSRTKey*, int, int, f32, s16, s16);
|
||||
/* 8000D6D8 */ void entry(J3DMaterialTable*, f32);
|
||||
};
|
||||
|
||||
struct mDoExt_baseAnm {
|
||||
/* 8000D428 */ void play();
|
||||
};
|
||||
|
||||
struct fopAc_ac_c {
|
||||
/* 80018B64 */ fopAc_ac_c();
|
||||
};
|
||||
|
||||
struct dStage_roomControl_c {
|
||||
/* 80024384 */ void getStatusRoomDt(int);
|
||||
};
|
||||
|
||||
struct cXyz {};
|
||||
|
||||
struct Vec {};
|
||||
|
||||
struct J3DModelData {};
|
||||
|
||||
struct J3DModel {};
|
||||
|
||||
struct J3DFrameCtrl {
|
||||
/* 803283FC */ void init(s16);
|
||||
/* 80499A1C */ ~J3DFrameCtrl();
|
||||
class vrbox2_class : public fopAc_ac_c {
|
||||
public:
|
||||
/* 0x568 */ u8 field_0x568[0x56C - 0x568];
|
||||
/* 0x56C */ J3DModel* mpKumoModel;
|
||||
/* 0x570 */ u8 field_0x570[0x574 - 0x570];
|
||||
/* 0x574 */ J3DModel* model2;
|
||||
/* 0x578 */ J3DModel* model2_und;
|
||||
/* 0x57C */ u8 field_0x57C[0x580 - 0x57C];
|
||||
/* 0x580 */ mDoExt_btkAnm mSunBtk;
|
||||
/* 0x598 */ J3DModel* mpKasumimModel;
|
||||
/* 0x59C */ u8 field_0x59C[0x5A0 - 0x59C];
|
||||
};
|
||||
|
||||
//
|
||||
@@ -99,25 +74,18 @@ extern "C" void cLib_targetAngleX__FPC4cXyzPC4cXyz();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void init__12J3DFrameCtrlFs();
|
||||
extern "C" void removeTexMtxAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKey();
|
||||
extern "C" void PSMTXCopy();
|
||||
extern "C" void PSMTXTrans();
|
||||
extern "C" void _savegpr_17();
|
||||
extern "C" void _savegpr_25();
|
||||
extern "C" void _restgpr_17();
|
||||
extern "C" void _restgpr_25();
|
||||
extern "C" void strcmp();
|
||||
extern "C" extern void* g_fopAc_Method[8];
|
||||
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 j3dSys[284];
|
||||
extern "C" extern u8 mStayNo__20dStage_roomControl_c[4];
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
static int daVrbox2_color_set(vrbox2_class* param_0);
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80499A6C-80499A70 000000 0004+00 4/4 0/0 0/0 .rodata @3627 */
|
||||
SECTION_RODATA static f32 const lit_3627 = 1.0f;
|
||||
@@ -133,6 +101,16 @@ SECTION_RODATA static u8 const lit_3628[4] = {
|
||||
COMPILER_STRIP_GATE(0x80499A70, &lit_3628);
|
||||
|
||||
/* 80498A78-80498ACC 000078 0054+00 1/1 0/0 0/0 .text texScrollCheck__FRf */
|
||||
// matches with literals
|
||||
#ifdef NONMATCHING
|
||||
static void texScrollCheck(f32& param_0) {
|
||||
while (param_0 < 0.0f)
|
||||
param_0 += 1.0f;
|
||||
|
||||
while (param_0 > 1.0f)
|
||||
param_0 -= 1.0f;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -141,6 +119,7 @@ static asm void texScrollCheck(f32& param_0) {
|
||||
#include "asm/rel/d/a/d_a_vrbox2/d_a_vrbox2/texScrollCheck__FRf.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80499A74-80499A78 000008 0004+00 0/1 0/0 0/0 .rodata @3835 */
|
||||
@@ -232,17 +211,178 @@ SECTION_DEAD static char const* const stringBase_80499ACC = "F_SP127";
|
||||
#pragma pop
|
||||
|
||||
/* 80499B78-80499B7C 000000 0002+02 1/1 0/0 0/0 .bss mangZ$3688 */
|
||||
static u8 mangZ[2 + 2 /* padding */];
|
||||
static s16 mangZ;
|
||||
|
||||
/* 80498ACC-804990DC 0000CC 0610+00 1/0 0/0 0/0 .text daVrbox2_Draw__FP12vrbox2_class */
|
||||
// reg alloc
|
||||
#ifdef NONMATCHING
|
||||
static int daVrbox2_Draw(vrbox2_class* i_this) {
|
||||
cXyz sp14;
|
||||
cXyz sp8;
|
||||
|
||||
camera_class* camera_p = dComIfGp_getCamera(0);
|
||||
dKankyo_sunlenz_Packet* lenz_p = g_env_light.mpSunLenzPacket;
|
||||
J3DModel* kumo_model_p = i_this->mpKumoModel;
|
||||
J3DModel* sun_model_p = i_this->model2;
|
||||
J3DModel* sun2_model_p = i_this->model2_und;
|
||||
J3DModel* kasumim_model_p = i_this->mpKasumimModel;
|
||||
dKankyo_sun_Packet* sun_p = g_env_light.mpSunPacket;
|
||||
|
||||
f32 var_f31 = 0.0f;
|
||||
dStage_FileList_dt_c* filelist_p = NULL;
|
||||
dKy_GxFog_set();
|
||||
|
||||
// these casts look like fake matches, but this ptr is used as both J3DModel and J3DModelData?
|
||||
for (int i = ((J3DModelData*)kumo_model_p)->getMaterialNum() - 1; i >= 0; i--) {
|
||||
J3DMaterial* material_p = ((J3DModelData*)kumo_model_p)->getMaterialNodePointer(i);
|
||||
|
||||
J3DFogInfo* fogInfo_p;
|
||||
if (material_p != NULL) {
|
||||
fogInfo_p = material_p->getFog()->getFogInfo();
|
||||
}
|
||||
|
||||
fogInfo_p->field_0x0 = 2;
|
||||
}
|
||||
|
||||
// these casts look like fake matches, but this ptr is used as both J3DModel and J3DModelData?
|
||||
for (int i = ((J3DModelData*)sun_model_p)->getMaterialNum() - 1; i >= 0; i--) {
|
||||
J3DMaterial* material_p = ((J3DModelData*)sun_model_p)->getMaterialNodePointer(i);
|
||||
|
||||
J3DFogInfo* fogInfo_p;
|
||||
if (material_p != NULL) {
|
||||
fogInfo_p = material_p->getFog()->getFogInfo();
|
||||
}
|
||||
|
||||
fogInfo_p->field_0x0 = 2;
|
||||
}
|
||||
|
||||
// these casts look like fake matches, but this ptr is used as both J3DModel and J3DModelData?
|
||||
for (int i = ((J3DModelData*)kasumim_model_p)->getMaterialNum() - 1; i >= 0; i--) {
|
||||
J3DMaterial* material_p = ((J3DModelData*)kasumim_model_p)->getMaterialNodePointer(i);
|
||||
|
||||
J3DFogInfo* fogInfo_p;
|
||||
if (material_p != NULL) {
|
||||
fogInfo_p = material_p->getFog()->getFogInfo();
|
||||
}
|
||||
|
||||
fogInfo_p->field_0x0 = 2;
|
||||
}
|
||||
|
||||
if ((g_env_light.mVrKasumiCol.r + g_env_light.mVrKasumiCol.g +
|
||||
g_env_light.mVrKasumiCol.b + g_env_light.mVrSkyCol.r + g_env_light.mVrSkyCol.g +
|
||||
g_env_light.mVrSkyCol.b + g_env_light.mVrkumoCol.r + g_env_light.mVrkumoCol.g +
|
||||
g_env_light.mVrkumoCol.b) == 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
i_this->mSunBtk.entry(i_this->model2->getModelData());
|
||||
daVrbox2_color_set(i_this);
|
||||
|
||||
if (dComIfGp_roomControl_getStayNo() >= 0) {
|
||||
s32 stayNo = dComIfGp_roomControl_getStayNo();
|
||||
filelist_p = dComIfGp_roomControl_getStatusRoomDt(stayNo)->mRoomDt.getFileListInfo();
|
||||
}
|
||||
|
||||
if (filelist_p != NULL) {
|
||||
var_f31 = dStage_FileList_dt_SeaLevel(filelist_p);
|
||||
}
|
||||
|
||||
if (dComIfGd_getView() != NULL) {
|
||||
var_f31 = (dComIfGd_getInvViewMtx()[1][3] - var_f31) * 0.09f;
|
||||
} else {
|
||||
var_f31 = 0.0f;
|
||||
}
|
||||
|
||||
dComIfGd_setListSky();
|
||||
mDoMtx_stack_c::transS(dComIfGd_getInvViewMtx()[0][3], dComIfGd_getInvViewMtx()[1][3] - var_f31,
|
||||
dComIfGd_getInvViewMtx()[2][3]);
|
||||
kasumim_model_p->i_setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
mDoExt_modelUpdateDL(kasumim_model_p);
|
||||
|
||||
mDoMtx_stack_c::transS(dComIfGd_getInvViewMtx()[0][3], dComIfGd_getInvViewMtx()[1][3] - var_f31,
|
||||
dComIfGd_getInvViewMtx()[2][3]);
|
||||
kumo_model_p->i_setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
mDoExt_modelUpdateDL(kumo_model_p);
|
||||
|
||||
if (dStage_stagInfo_GetArg0(i_dComIfGp_getStage()->getStagInfo()) != 0 && sun_model_p != NULL &&
|
||||
sun_p != NULL && sun_p->mSunAlpha > 0.0f)
|
||||
{
|
||||
sp14 = sun_p->mPos[0];
|
||||
|
||||
if (strcmp(dComIfGp_getStartStageName(), "F_SP102") == 0) {
|
||||
dKyr_get_vectle_calc(&camera_p->mLookat.mEye, &g_env_light.mSunPos, &sp8);
|
||||
sp14.x = camera_p->mLookat.mEye.x + (8000.0f * sp8.x);
|
||||
sp14.y = camera_p->mLookat.mEye.y + (8000.0f * sp8.y);
|
||||
sp14.z = camera_p->mLookat.mEye.z + (8000.0f * sp8.z);
|
||||
}
|
||||
|
||||
s16 temp_r19 = cLib_targetAngleX(&camera_p->mLookat.mEye, &sp14);
|
||||
s16 temp_r18 = cLib_targetAngleY(&camera_p->mLookat.mEye, &sp14);
|
||||
mDoMtx_stack_c::transS(sp14.x, sp14.y, sp14.z);
|
||||
mDoMtx_stack_c::YrotM((s16)temp_r18);
|
||||
mDoMtx_stack_c::XrotM(0x7FFF - temp_r19);
|
||||
|
||||
f32 scale;
|
||||
if (g_env_light.mDaytime < 255.0f) {
|
||||
f32 temp_f4 = 1.0f - lenz_p->mDistFalloff;
|
||||
scale = 1.0f;
|
||||
|
||||
if (sun_p->mVisibility > 0.0f) {
|
||||
scale = 1.0f + (sun_p->mVisibility * (0.4f * (temp_f4 * temp_f4)));
|
||||
}
|
||||
} else {
|
||||
f32 var_f1;
|
||||
if (g_env_light.mDaytime < 270.0f) {
|
||||
var_f1 = dKy_get_parcent(270.0f, 240.0f, g_env_light.mDaytime);
|
||||
} else {
|
||||
var_f1 = 1.0f;
|
||||
}
|
||||
|
||||
scale = 1.0f + (0.2f * var_f1);
|
||||
}
|
||||
|
||||
mDoMtx_stack_c::scaleM(scale, scale, scale);
|
||||
sun_model_p->i_setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
mDoExt_modelUpdateDL(sun_model_p);
|
||||
|
||||
if (strcmp(dComIfGp_getStartStageName(), "F_SP127") == 0) {
|
||||
sp14 = sun_p->mPos[0];
|
||||
sp14.y = 300.0f - (sp14.y * 0.85f);
|
||||
|
||||
s16 temp_r19_2 = cLib_targetAngleX(&camera_p->mLookat.mEye, &sp14);
|
||||
s16 temp_r18_2 = cLib_targetAngleY(&camera_p->mLookat.mEye, &sp14);
|
||||
mDoMtx_stack_c::transS(sp14.x, sp14.y, sp14.z);
|
||||
mDoMtx_stack_c::YrotM((s16)temp_r18_2);
|
||||
mDoMtx_stack_c::XrotM(0x7FFF - temp_r19_2);
|
||||
mDoMtx_stack_c::ZrotM(mangZ);
|
||||
|
||||
mDoMtx_stack_c::scaleM(scale, scale + 0.15f, scale);
|
||||
mDoMtx_stack_c::ZrotM(-mangZ);
|
||||
sun2_model_p->i_setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
mDoExt_modelUpdateDL(sun2_model_p);
|
||||
mangZ += (s16)(483.0f + cM_rndF(100.0f));
|
||||
}
|
||||
}
|
||||
|
||||
dComIfGd_setList();
|
||||
|
||||
if (sun_model_p != NULL) {
|
||||
i_this->mSunBtk.remove(i_this->model2->getModelData());
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void daVrbox2_Draw(vrbox2_class* param_0) {
|
||||
static asm int daVrbox2_Draw(vrbox2_class* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/d_a_vrbox2/d_a_vrbox2/daVrbox2_Draw__FP12vrbox2_class.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80499AA4-80499AA8 000038 0004+00 0/1 0/0 0/0 .rodata @4069 */
|
||||
@@ -308,106 +448,277 @@ SECTION_DEAD static char const* const stringBase_80499AD4 = "R_SP30";
|
||||
#pragma pop
|
||||
|
||||
/* 804990DC-804997E8 0006DC 070C+00 1/1 0/0 0/0 .text daVrbox2_color_set__FP12vrbox2_class */
|
||||
// one small weird block and some regalloc at the end
|
||||
#ifdef NONMATCHING
|
||||
static int daVrbox2_color_set(vrbox2_class* i_this) {
|
||||
dKankyo_sun_Packet* sun_p = g_env_light.mpSunPacket;
|
||||
|
||||
if ((g_env_light.mVrKasumiCol.r + g_env_light.mVrKasumiCol.g +
|
||||
g_env_light.mVrKasumiCol.b + g_env_light.mVrSkyCol.r + g_env_light.mVrSkyCol.g +
|
||||
g_env_light.mVrSkyCol.b + g_env_light.mVrkumoCol.r + g_env_light.mVrkumoCol.g +
|
||||
g_env_light.mVrkumoCol.b) == 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
camera_class* camera_p = dComIfGp_getCamera(0);
|
||||
|
||||
cXyz cam_eye;
|
||||
cXyz cam_center;
|
||||
cXyz camFwdXZ;
|
||||
cXyz wind_vec;
|
||||
|
||||
cXyz* windVec_p = dKyw_get_wind_vec();
|
||||
f32 wind_pow = dKyw_get_wind_pow();
|
||||
|
||||
wind_vec = *windVec_p;
|
||||
|
||||
dStage_stagInfo_GetSTType(i_dComIfGp_getStage()->getStagInfo());
|
||||
|
||||
cam_eye = camera_p->mLookat.mEye;
|
||||
cam_center = camera_p->mLookat.mCenter;
|
||||
cam_eye.y = 0.0f;
|
||||
cam_center.y = 0.0f;
|
||||
|
||||
dKyr_get_vectle_calc(&cam_eye, &cam_center, &camFwdXZ);
|
||||
f32 temp_f30 =
|
||||
cM3d_VectorProduct2d(0.0f, 0.0f, -wind_vec.x, -wind_vec.z, camFwdXZ.x, camFwdXZ.z) *
|
||||
0.0005f;
|
||||
f32 var_f29 = temp_f30 * wind_pow;
|
||||
|
||||
if (strcmp(dComIfGp_getStartStageName(), "R_SP30") == 0) {
|
||||
dKyw_get_wind_vec();
|
||||
var_f29 = temp_f30 * (wind_pow + 0.3f);
|
||||
}
|
||||
|
||||
J3DModelData* modelData = i_this->mpKumoModel->getModelData();
|
||||
J3DMaterial* material_0 = modelData->getMaterialNodePointer(0);
|
||||
if (material_0 != NULL) {
|
||||
material_0->setCullMode(0);
|
||||
|
||||
if (material_0->getTexMtx(0) != NULL) {
|
||||
J3DTexMtxInfo& mtx_info = material_0->getTexMtx(0)->getTexMtxInfo();
|
||||
mtx_info.mSRT.mTranslationX += var_f29;
|
||||
texScrollCheck(mtx_info.mSRT.mTranslationX);
|
||||
}
|
||||
|
||||
if (material_0->getTexMtx(1) != NULL) {
|
||||
J3DTexMtxInfo& mtx_info = material_0->getTexMtx(1)->getTexMtxInfo();
|
||||
mtx_info.mSRT.mTranslationX += var_f29 * 1.75f;
|
||||
texScrollCheck(mtx_info.mSRT.mTranslationX);
|
||||
}
|
||||
}
|
||||
|
||||
J3DMaterial* material_1 = modelData->getMaterialNodePointer(1);
|
||||
if (material_1 != NULL) {
|
||||
material_1->setCullMode(0);
|
||||
|
||||
if (material_1->getTexMtx(0) != NULL) {
|
||||
J3DTexMtxInfo& mtx_info = material_1->getTexMtx(0)->getTexMtxInfo();
|
||||
mtx_info.mSRT.mTranslationX += var_f29 * 4.4f;
|
||||
texScrollCheck(mtx_info.mSRT.mTranslationX);
|
||||
}
|
||||
|
||||
if (material_1->getTexMtx(1) != NULL) {
|
||||
J3DTexMtxInfo& mtx_info = material_1->getTexMtx(1)->getTexMtxInfo();
|
||||
mtx_info.mSRT.mTranslationX += var_f29 * 2.2f;
|
||||
texScrollCheck(mtx_info.mSRT.mTranslationX);
|
||||
}
|
||||
}
|
||||
|
||||
modelData = i_this->mpKumoModel->getModelData();
|
||||
J3DGXColor k_color;
|
||||
J3DGXColorS10 color;
|
||||
|
||||
J3DMaterial* kumo_material0 = modelData->getMaterialNodePointer(0);
|
||||
if (kumo_material0 != NULL) {
|
||||
kumo_material0->setCullMode(0);
|
||||
kumo_material0->change();
|
||||
|
||||
k_color.r = g_env_light.mVrShitaGumoCol.r;
|
||||
k_color.g = g_env_light.mVrShitaGumoCol.g;
|
||||
k_color.b = g_env_light.mVrShitaGumoCol.b;
|
||||
k_color.a = g_env_light.mVrkumoCol.a;
|
||||
kumo_material0->setTevKColor(0, &k_color);
|
||||
|
||||
color.r = g_env_light.mVrShitaUneiCol.r;
|
||||
color.g = g_env_light.mVrShitaUneiCol.g;
|
||||
color.b = g_env_light.mVrShitaUneiCol.b;
|
||||
color.a = (u8)g_env_light.mVrkumoCol.a;
|
||||
kumo_material0->setTevColor(0, &color);
|
||||
}
|
||||
|
||||
J3DMaterial* kumo_material1 = modelData->getMaterialNodePointer(1);
|
||||
if (kumo_material1 != NULL) {
|
||||
kumo_material1->setCullMode(0);
|
||||
kumo_material1->change();
|
||||
|
||||
k_color.r = g_env_light.mVrShitaGumoCol.r;
|
||||
k_color.g = g_env_light.mVrShitaGumoCol.g;
|
||||
k_color.b = g_env_light.mVrShitaGumoCol.b;
|
||||
k_color.a = g_env_light.mVrkumoCol.a;
|
||||
kumo_material1->setTevKColor(0, &k_color);
|
||||
|
||||
color.r = g_env_light.mVrShitaUneiCol.r;
|
||||
color.g = g_env_light.mVrShitaUneiCol.g;
|
||||
color.b = g_env_light.mVrShitaUneiCol.b;
|
||||
color.a = g_env_light.mVrkumoCol.a;
|
||||
kumo_material1->setTevColor(0, &color);
|
||||
}
|
||||
|
||||
modelData = i_this->mpKasumimModel->getModelData();
|
||||
J3DMaterial* kasumim_material0 = modelData->getMaterialNodePointer(0);
|
||||
if (kasumim_material0 != NULL) {
|
||||
kasumim_material0->setCullMode(0);
|
||||
kasumim_material0->change();
|
||||
|
||||
color.r = g_env_light.mVrKasumiCol.r;
|
||||
color.g = g_env_light.mVrKasumiCol.g;
|
||||
color.b = g_env_light.mVrKasumiCol.b;
|
||||
color.a = g_env_light.mVrKasumiCol.a;
|
||||
kasumim_material0->setTevColor(0, &color);
|
||||
}
|
||||
|
||||
if (sun_p != NULL) {
|
||||
J3DModelData* modelData = i_this->model2->getModelData();
|
||||
for (int i = 0; i < 3; i++) {
|
||||
J3DMaterial* material_p = modelData->getMaterialNodePointer(i);
|
||||
|
||||
if (material_p != NULL) {
|
||||
material_p->setCullMode(0);
|
||||
material_p->change();
|
||||
|
||||
color.r = sun_p->mColor.r;
|
||||
color.g = sun_p->mColor.g;
|
||||
color.b = sun_p->mColor.b;
|
||||
|
||||
k_color.r = sun_p->field_0x74.r;
|
||||
k_color.g = sun_p->field_0x74.g;
|
||||
k_color.b = sun_p->field_0x74.b;
|
||||
k_color.a = sun_p->field_0x74.a;
|
||||
|
||||
if (i == 1) {
|
||||
if (g_env_light.mDaytime > 255.0f || g_env_light.mDaytime < 97.5f) {
|
||||
cLib_addCalc(&sun_p->field_0x64, 1.0f, 0.2f, 0.1f, 0.0001f);
|
||||
} else {
|
||||
cLib_addCalc(&sun_p->field_0x64, 0.0f, 0.2f, 0.1f, 0.0001f);
|
||||
}
|
||||
|
||||
int alpha = sun_p->field_0x64 * 255.0f * sun_p->mSunAlpha;
|
||||
color.a = alpha;
|
||||
k_color.a = alpha;
|
||||
} else if (i == 2) {
|
||||
int alpha = sun_p->mSunAlpha * 255.0f * (1.0f - sun_p->field_0x64);
|
||||
color.a = alpha;
|
||||
k_color.a = alpha;
|
||||
} else {
|
||||
int alpha = sun_p->mSunAlpha * 255.0f;
|
||||
color.a = alpha;
|
||||
k_color.a = alpha;
|
||||
}
|
||||
|
||||
material_p->setTevColor(0, &color);
|
||||
material_p->setTevKColor(0, &k_color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void daVrbox2_color_set(vrbox2_class* param_0) {
|
||||
static asm int daVrbox2_color_set(vrbox2_class* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/d_a_vrbox2/d_a_vrbox2/daVrbox2_color_set__FP12vrbox2_class.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 804997E8-8049982C 000DE8 0044+00 1/0 0/0 0/0 .text daVrbox2_Execute__FP12vrbox2_class
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void daVrbox2_Execute(vrbox2_class* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/d_a_vrbox2/d_a_vrbox2/daVrbox2_Execute__FP12vrbox2_class.s"
|
||||
static int daVrbox2_Execute(vrbox2_class* i_this) {
|
||||
if (g_env_light.mDaytime > FLOAT_LABEL(lit_3837)) {
|
||||
i_this->mSunBtk.play();
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8049982C-80499834 000E2C 0008+00 1/0 0/0 0/0 .text daVrbox2_IsDelete__FP12vrbox2_class
|
||||
*/
|
||||
static bool daVrbox2_IsDelete(vrbox2_class* param_0) {
|
||||
return true;
|
||||
static int daVrbox2_IsDelete(vrbox2_class* i_this) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80499834-8049983C 000E34 0008+00 1/0 0/0 0/0 .text daVrbox2_Delete__FP12vrbox2_class
|
||||
*/
|
||||
static bool daVrbox2_Delete(vrbox2_class* param_0) {
|
||||
return true;
|
||||
static int daVrbox2_Delete(vrbox2_class* i_this) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80499AC4-80499AC4 000058 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DEAD static char const* const stringBase_80499ADB = "vrbox_kumo.bmd";
|
||||
SECTION_DEAD static char const* const stringBase_80499AEA = "vrbox_sun.bmd";
|
||||
SECTION_DEAD static char const* const stringBase_80499AF8 = "vrbox_sun.btk";
|
||||
SECTION_DEAD static char const* const stringBase_80499B06 = "vrbox_kasumiM.bmd";
|
||||
#pragma pop
|
||||
|
||||
/* 8049983C-80499978 000E3C 013C+00 1/1 0/0 0/0 .text daVrbox2_solidHeapCB__FP10fopAc_ac_c */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void daVrbox2_solidHeapCB(fopAc_ac_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/d_a_vrbox2/d_a_vrbox2/daVrbox2_solidHeapCB__FP10fopAc_ac_c.s"
|
||||
static int daVrbox2_solidHeapCB(fopAc_ac_c* i_this) {
|
||||
vrbox2_class* a_this = (vrbox2_class*)i_this;
|
||||
|
||||
a_this->mpKumoModel = mDoExt_J3DModel__create(
|
||||
(J3DModelData*)dComIfG_getStageRes("vrbox_kumo.bmd"), 0x80000, 0x11020202);
|
||||
|
||||
J3DModelData* sun_modelData = (J3DModelData*)dComIfG_getStageRes("vrbox_sun.bmd");
|
||||
if (sun_modelData != NULL) {
|
||||
a_this->model2 = mDoExt_J3DModel__create(sun_modelData, 0x80000, 0x11020202);
|
||||
a_this->model2_und = mDoExt_J3DModel__create(sun_modelData, 0x80000, 0x11020202);
|
||||
|
||||
J3DAnmTextureSRTKey* pbtk = (J3DAnmTextureSRTKey*)dComIfG_getStageRes("vrbox_sun.btk");
|
||||
if (!a_this->mSunBtk.init(sun_modelData, pbtk, TRUE, J3DFrameCtrl::LOOP_REPEAT_e, FLOAT_LABEL(lit_3627), 0, -1)) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
J3DModelData* kasumi_modelData = (J3DModelData*)dComIfG_getStageRes("vrbox_kasumiM.bmd");
|
||||
if (kasumi_modelData != NULL) {
|
||||
a_this->mpKasumimModel = mDoExt_J3DModel__create(kasumi_modelData, 0x80000, 0x11020202);
|
||||
}
|
||||
|
||||
return a_this->mpKumoModel != NULL && a_this->model2 != NULL && a_this->model2_und != NULL;
|
||||
}
|
||||
|
||||
/* 80499978-80499A1C 000F78 00A4+00 1/0 0/0 0/0 .text daVrbox2_Create__FP10fopAc_ac_c */
|
||||
static int daVrbox2_Create(fopAc_ac_c* i_this) {
|
||||
fopAcM_SetupActor(i_this, vrbox2_class);
|
||||
vrbox2_class* a_this = (vrbox2_class*)i_this;
|
||||
|
||||
int phase = cPhs_COMPLEATE_e;
|
||||
if (!fopAcM_entrySolidHeap(a_this, daVrbox2_solidHeapCB, 0x80004340)) {
|
||||
phase = cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
return phase;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80499B18-80499B38 -00001 0020+00 1/0 0/0 0/0 .data l_daVrbox2_Method */
|
||||
SECTION_DATA static void* l_daVrbox2_Method[8] = {
|
||||
(void*)daVrbox2_Create__FP10fopAc_ac_c,
|
||||
(void*)daVrbox2_Delete__FP12vrbox2_class,
|
||||
(void*)daVrbox2_Execute__FP12vrbox2_class,
|
||||
(void*)daVrbox2_IsDelete__FP12vrbox2_class,
|
||||
(void*)daVrbox2_Draw__FP12vrbox2_class,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
static actor_method_class l_daVrbox2_Method = {
|
||||
(process_method_func)daVrbox2_Create, (process_method_func)daVrbox2_Delete,
|
||||
(process_method_func)daVrbox2_Execute, (process_method_func)daVrbox2_IsDelete,
|
||||
(process_method_func)daVrbox2_Draw,
|
||||
};
|
||||
|
||||
/* 80499B38-80499B68 -00001 0030+00 0/0 0/0 1/0 .data g_profile_VRBOX2 */
|
||||
SECTION_DATA extern void* g_profile_VRBOX2[12] = {
|
||||
(void*)0xFFFFFFFD, (void*)0x0007FFFD,
|
||||
(void*)0x02DB0000, (void*)&g_fpcLf_Method,
|
||||
(void*)0x000005A0, (void*)NULL,
|
||||
(void*)NULL, (void*)&g_fopAc_Method,
|
||||
(void*)0x00040000, (void*)&l_daVrbox2_Method,
|
||||
(void*)0x00044000, (void*)NULL,
|
||||
extern actor_process_profile_definition g_profile_VRBOX2 = {
|
||||
-3,
|
||||
7,
|
||||
-3,
|
||||
PROC_VRBOX2,
|
||||
&g_fpcLf_Method.mBase,
|
||||
sizeof(vrbox2_class),
|
||||
0,
|
||||
0,
|
||||
&g_fopAc_Method.base,
|
||||
4,
|
||||
&l_daVrbox2_Method,
|
||||
0x44000,
|
||||
0,
|
||||
0,
|
||||
};
|
||||
|
||||
/* 80499B68-80499B74 000050 000C+00 2/2 0/0 0/0 .data __vt__12J3DFrameCtrl */
|
||||
SECTION_DATA extern void* __vt__12J3DFrameCtrl[3] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__12J3DFrameCtrlFv,
|
||||
};
|
||||
|
||||
/* 80499978-80499A1C 000F78 00A4+00 1/0 0/0 0/0 .text daVrbox2_Create__FP10fopAc_ac_c */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void daVrbox2_Create(fopAc_ac_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/d_a_vrbox2/d_a_vrbox2/daVrbox2_Create__FP10fopAc_ac_c.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80499A1C-80499A64 00101C 0048+00 1/0 0/0 0/0 .text __dt__12J3DFrameCtrlFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm J3DFrameCtrl::~J3DFrameCtrl() {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/d_a_vrbox2/d_a_vrbox2/__dt__12J3DFrameCtrlFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80499AC4-80499AC4 000058 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
|
||||
@@ -4,22 +4,11 @@
|
||||
//
|
||||
|
||||
#include "rel/d/a/kytag/d_a_kytag00/d_a_kytag00.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "dol2asm.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct kytag00_class {};
|
||||
|
||||
struct fopAc_ac_c {
|
||||
/* 80018B64 */ fopAc_ac_c();
|
||||
};
|
||||
|
||||
struct dSv_info_c {
|
||||
/* 80035360 */ void isSwitch(int, int) const;
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
@@ -36,7 +25,6 @@ extern "C" static void daKytag00_Execute__FP13kytag00_class();
|
||||
extern "C" static bool daKytag00_IsDelete__FP13kytag00_class();
|
||||
extern "C" static void daKytag00_Delete__FP13kytag00_class();
|
||||
extern "C" static void daKytag00_Create__FP10fopAc_ac_c();
|
||||
extern "C" extern void* g_profile_KYTAG00[12];
|
||||
|
||||
//
|
||||
// External References:
|
||||
@@ -46,18 +34,10 @@ extern "C" void __ct__10fopAc_ac_cFv();
|
||||
extern "C" void isSwitch__10dSv_info_cCFii();
|
||||
extern "C" void cLib_addCalc__FPfffff();
|
||||
extern "C" void setSnowPower__10Z2EnvSeMgrFSc();
|
||||
extern "C" void PSVECSquareDistance();
|
||||
extern "C" void _savegpr_27();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_27();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" extern void* g_fopAc_Method[8];
|
||||
extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */];
|
||||
extern "C" extern u8 g_dComIfG_gameInfo[122384];
|
||||
extern "C" extern u8 g_env_light[4880];
|
||||
extern "C" extern u8 g_mEnvSeMgr[780];
|
||||
extern "C" extern u32 __float_nan;
|
||||
extern "C" extern u8 mStayNo__20dStage_roomControl_c[4];
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
@@ -106,25 +86,48 @@ COMPILER_STRIP_GATE(0x8046C998, &lit_3801);
|
||||
#pragma pop
|
||||
|
||||
/* 8046B718-8046B9DC 000078 02C4+00 2/2 0/0 0/0 .text get_check_pos__FP13kytag00_class */
|
||||
// reg r31/r30 swap
|
||||
#ifdef NONMATCHING
|
||||
static cXyz get_check_pos(kytag00_class* i_this) {
|
||||
camera_class* camera_p = dComIfGp_getCamera(0);
|
||||
fopAc_ac_c* player_p = dComIfGp_getPlayer(0);
|
||||
cXyz ret;
|
||||
|
||||
if (player_p != NULL) {
|
||||
f32 temp_f = i_this->current.pos.abs(camera_p->mLookat.mEye);
|
||||
f32 temp_f2 = i_this->current.pos.abs(player_p->current.pos);
|
||||
|
||||
ret = player_p->current.pos;
|
||||
if (i_dComIfGp_event_runCheck() && temp_f < temp_f2) {
|
||||
ret = camera_p->mLookat.mEye;
|
||||
}
|
||||
} else {
|
||||
ret.set(0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void get_check_pos(kytag00_class* param_0) {
|
||||
static asm cXyz get_check_pos(kytag00_class* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/kytag/d_a_kytag00/d_a_kytag00/get_check_pos__FP13kytag00_class.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8046B9DC-8046BA10 00033C 0034+00 2/2 0/0 0/0 .text wether_tag_reset__FP13kytag00_class
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void wether_tag_reset(kytag00_class* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/kytag/d_a_kytag00/d_a_kytag00/wether_tag_reset__FP13kytag00_class.s"
|
||||
static void wether_tag_reset(kytag00_class* i_this) {
|
||||
i_this->field_0x56d = 0;
|
||||
|
||||
g_env_light.mColpatPrevGather = g_env_light.mColpatWeather;
|
||||
g_env_light.mColpatCurrGather = g_env_light.mColpatWeather;
|
||||
g_env_light.mColPatBlendGather = FLOAT_LABEL(lit_3798);
|
||||
g_env_light.mColPatModeGather = 1;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 8046C9A0-8046C9A4 000020 0004+00 0/3 0/0 0/0 .rodata @3906 */
|
||||
@@ -166,6 +169,102 @@ COMPILER_STRIP_GATE(0x8046C9B0, &lit_3911);
|
||||
|
||||
/* 8046BA10-8046BD60 000370 0350+00 1/1 0/0 0/0 .text wether_tag_move__FP13kytag00_class
|
||||
*/
|
||||
// regswaps, but should be equivalent
|
||||
#ifdef NONMATCHING
|
||||
static void wether_tag_move(kytag00_class* i_this) {
|
||||
cXyz spC;
|
||||
cXyz check_pos = get_check_pos(i_this);
|
||||
|
||||
f32 temp_f31 = i_this->field_0x57c * 100.0f;
|
||||
|
||||
spC.x = check_pos.x;
|
||||
spC.y = i_this->current.pos.y;
|
||||
spC.z = check_pos.z;
|
||||
f32 var_f1 = i_this->current.pos.abs(spC);
|
||||
|
||||
if (var_f1 < i_this->field_0x584 && check_pos.y >= i_this->current.pos.y - temp_f31 &&
|
||||
check_pos.y < temp_f31 + (i_this->current.pos.y + (5000.0f * i_this->mScale.y)) &&
|
||||
i_this->field_0x588 > 0.0f)
|
||||
{
|
||||
f32 var_f9 = 1.0f;
|
||||
f32 var_f8 = 1.0f;
|
||||
|
||||
f32 temp_f10 = i_this->field_0x584 - i_this->field_0x580;
|
||||
if (0.0f != temp_f10) {
|
||||
var_f9 = (i_this->field_0x584 - var_f1) / temp_f10;
|
||||
if (var_f9 > var_f8) {
|
||||
var_f9 = var_f8;
|
||||
}
|
||||
}
|
||||
|
||||
if (check_pos.y <= i_this->current.pos.y) {
|
||||
if (0.0f != temp_f31) {
|
||||
f32 var_f2 = (i_this->current.pos.y - check_pos.y) / temp_f31;
|
||||
if (var_f2 < 0.0f) {
|
||||
var_f2 = 0.0f;
|
||||
}
|
||||
var_f8 = 1.0f - var_f2;
|
||||
}
|
||||
} else if (0.0f != temp_f31) {
|
||||
f32 var_f2_2 =
|
||||
(check_pos.y - (i_this->current.pos.y + (5000.0f * i_this->mScale.y))) / temp_f31;
|
||||
if (var_f2_2 < 0.0f) {
|
||||
var_f2_2 = 0.0f;
|
||||
}
|
||||
var_f8 = 1.0f - var_f2_2;
|
||||
}
|
||||
|
||||
var_f9 *= (var_f8 * i_this->field_0x588);
|
||||
if (g_env_light.mEnvrIdxPrev == g_env_light.mEnvrIdxCurr) {
|
||||
i_this->field_0x56d = 1;
|
||||
|
||||
switch (i_this->field_0x56f) {
|
||||
case 0:
|
||||
g_env_light.mColpatPrevGather = g_env_light.mColpatWeather;
|
||||
g_env_light.mColpatCurrGather = 0;
|
||||
g_env_light.mColPatBlendGather = var_f9;
|
||||
g_env_light.mColPatModeGather = 1;
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
if (var_f9 > 0.5f) {
|
||||
g_env_light.mColpatPrevGather = g_env_light.mColpatWeather;
|
||||
g_env_light.mColpatCurrGather = i_this->field_0x56f;
|
||||
g_env_light.mColPatBlendGather = var_f9;
|
||||
if (var_f9 >= 1.0f) {
|
||||
g_env_light.mColpatPrevGather = i_this->field_0x56f;
|
||||
}
|
||||
} else {
|
||||
g_env_light.mColpatPrevGather = i_this->field_0x56f;
|
||||
g_env_light.mColpatCurrGather = g_env_light.mColpatWeather;
|
||||
g_env_light.mColPatBlendGather = 1.0f - var_f9;
|
||||
}
|
||||
|
||||
g_env_light.mColPatModeGather = 1;
|
||||
break;
|
||||
default:
|
||||
i_this->field_0x56d = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (i_this->field_0x56d != 0) {
|
||||
wether_tag_reset(i_this);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -174,65 +273,70 @@ static asm void wether_tag_move(kytag00_class* param_0) {
|
||||
#include "asm/rel/d/a/kytag/d_a_kytag00/d_a_kytag00/wether_tag_move__FP13kytag00_class.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 8046C9B8-8046C9BC 000038 0004+00 1/1 0/0 0/0 .rodata @3918 */
|
||||
SECTION_RODATA static f32 const lit_3918 = 250.0f;
|
||||
COMPILER_STRIP_GATE(0x8046C9B8, &lit_3918);
|
||||
#endif
|
||||
|
||||
/* 8046BD60-8046BDA4 0006C0 0044+00 1/1 0/0 0/0 .text raincnt_set__Ff */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void raincnt_set(f32 param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/kytag/d_a_kytag00/d_a_kytag00/raincnt_set__Ff.s"
|
||||
static void raincnt_set(f32 param_0) {
|
||||
int cnt = param_0 * param_0 * param_0 * 250.0f;
|
||||
if (cnt > g_env_light.mRainCountOrig) {
|
||||
g_env_light.mRainCount = cnt;
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8046BDA4-8046BDB8 000704 0014+00 1/1 0/0 0/0 .text raincnt_cut__Fv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void raincnt_cut() {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/kytag/d_a_kytag00/d_a_kytag00/raincnt_cut__Fv.s"
|
||||
static void raincnt_cut() {
|
||||
g_env_light.mRainCount = g_env_light.mRainCountOrig;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 8046C9E0-8046CA2C -00001 004C+00 1/1 0/0 0/0 .data @3957 */
|
||||
SECTION_DATA static void* lit_3957[19] = {
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0xEC),
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0x40),
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0x48),
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0x60),
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0x78),
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0x78),
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0x78),
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0xCC),
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0xCC),
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0xCC),
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0xCC),
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0xCC),
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0xCC),
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0xCC),
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0x60),
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0xE0),
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0x48),
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0xCC),
|
||||
(void*)(((char*)wether_tag_efect_reset__FP13kytag00_class) + 0xCC),
|
||||
};
|
||||
|
||||
/* 8046BDB8-8046BEB8 000718 0100+00 3/2 0/0 0/0 .text wether_tag_efect_reset__FP13kytag00_class */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void wether_tag_efect_reset(kytag00_class* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/kytag/d_a_kytag00/d_a_kytag00/wether_tag_efect_reset__FP13kytag00_class.s"
|
||||
static void wether_tag_efect_reset(kytag00_class* i_this) {
|
||||
i_this->field_0x56c = 0;
|
||||
|
||||
switch (i_this->field_0x570) {
|
||||
case 1:
|
||||
raincnt_cut();
|
||||
break;
|
||||
case 2:
|
||||
case 16:
|
||||
g_env_light.mSnowCount = 0;
|
||||
g_env_light.mMoyaCount = 0;
|
||||
break;
|
||||
case 3:
|
||||
case 14:
|
||||
g_env_light.mHousiCount = 0;
|
||||
g_env_light.field_0xea9 = 0;
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
if (g_env_light.mThunderEff.mMode == 2) {
|
||||
g_env_light.mThunderEff.mMode = 0;
|
||||
}
|
||||
|
||||
if (i_this->field_0x570 == 8 || i_this->field_0x570 == 9) {
|
||||
raincnt_cut();
|
||||
}
|
||||
|
||||
if (i_this->field_0x570 == 9) {
|
||||
g_env_light.mMoyaCount = 0;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case 17:
|
||||
case 18:
|
||||
g_env_light.mMoyaCount = 0;
|
||||
break;
|
||||
case 15:
|
||||
g_env_light.field_0x1048 = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 8046CA2C-8046CA78 -00001 004C+00 1/1 0/0 0/0 .data @4108 */
|
||||
@@ -259,6 +363,193 @@ SECTION_DATA static void* lit_4108[19] = {
|
||||
};
|
||||
|
||||
/* 8046BEB8-8046C660 000818 07A8+00 3/2 0/0 0/0 .text wether_tag_efect_move__FP13kytag00_class */
|
||||
// matches with literals
|
||||
#ifdef NONMATCHING
|
||||
static void wether_tag_efect_move(kytag00_class* i_this) {
|
||||
cXyz spC;
|
||||
cXyz check_pos = get_check_pos(i_this);
|
||||
|
||||
f32 temp_f31 = i_this->field_0x57c * 100.0f;
|
||||
|
||||
spC.x = check_pos.x;
|
||||
spC.y = i_this->current.pos.y;
|
||||
spC.z = check_pos.z;
|
||||
f32 var_f1 = i_this->current.pos.abs(spC);
|
||||
|
||||
if (var_f1 < i_this->field_0x584 && check_pos.y >= i_this->current.pos.y - temp_f31 &&
|
||||
check_pos.y < temp_f31 + (i_this->current.pos.y + (5000.0f * i_this->mScale.y)) &&
|
||||
i_this->field_0x588 > 0.0f)
|
||||
{
|
||||
f32 var_f9 = 1.0f;
|
||||
f32 var_f8 = 1.0f;
|
||||
|
||||
i_this->field_0x56c = 1;
|
||||
|
||||
f32 temp_f10 = i_this->field_0x584 - i_this->field_0x580;
|
||||
if (0.0f != temp_f10) {
|
||||
var_f9 = (i_this->field_0x584 - var_f1) / temp_f10;
|
||||
if (var_f9 > var_f8) {
|
||||
var_f9 = var_f8;
|
||||
}
|
||||
}
|
||||
|
||||
if (check_pos.y <= i_this->current.pos.y) {
|
||||
if (0.0f != temp_f31) {
|
||||
f32 var_f2 = (i_this->current.pos.y - check_pos.y) / temp_f31;
|
||||
if (var_f2 < 0.0f) {
|
||||
var_f2 = 0.0f;
|
||||
}
|
||||
var_f8 = 1.0f - var_f2;
|
||||
}
|
||||
} else if (0.0f != temp_f31) {
|
||||
f32 var_f2_2 =
|
||||
(check_pos.y - (i_this->current.pos.y + (5000.0f * i_this->mScale.y))) / temp_f31;
|
||||
if (var_f2_2 < 0.0f) {
|
||||
var_f2_2 = 0.0f;
|
||||
}
|
||||
var_f8 = 1.0f - var_f2_2;
|
||||
}
|
||||
|
||||
var_f9 *= (var_f8 * i_this->field_0x588);
|
||||
|
||||
switch (i_this->field_0x570) {
|
||||
case 1:
|
||||
raincnt_set(var_f9);
|
||||
break;
|
||||
case 2:
|
||||
if (i_this->orig.roomNo == dComIfGp_roomControl_getStayNo()) {
|
||||
g_env_light.field_0xe92 = false;
|
||||
|
||||
if (g_env_light.mSnowCount < (int)(var_f9 * 500.0f)) {
|
||||
g_env_light.mSnowCount += (int)(var_f9 * 500.0f * 0.05f);
|
||||
|
||||
if (g_env_light.mSnowCount > (int)(var_f9 * 500.0f)) {
|
||||
g_env_light.mSnowCount = (int)(var_f9 * 500.0f);
|
||||
}
|
||||
}
|
||||
|
||||
g_env_light.mMoyaMode = 0;
|
||||
if (g_env_light.mMoyaCount < (int)(var_f9 * 50.0f)) {
|
||||
g_env_light.mMoyaCount += (int)(var_f9 * 50.0f * 0.05f);
|
||||
|
||||
if (g_env_light.mMoyaCount > (int)(var_f9 * 50.0f)) {
|
||||
g_env_light.mMoyaCount = (int)(var_f9 * 50.0f);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
g_env_light.mSnowCount = 0;
|
||||
g_env_light.mMoyaCount = 0;
|
||||
}
|
||||
|
||||
mDoAud_setSnowPower(var_f9 * 63.0f);
|
||||
break;
|
||||
case 3:
|
||||
case 14:
|
||||
g_env_light.field_0xea9 = 0;
|
||||
|
||||
if (i_this->orig.roomNo == dComIfGp_roomControl_getStayNo()) {
|
||||
g_env_light.mHousiCount = var_f9 * 300.0f;
|
||||
} else {
|
||||
g_env_light.mHousiCount = 0;
|
||||
}
|
||||
|
||||
if (i_this->field_0x570 == 14) {
|
||||
g_env_light.field_0xea9 = 1;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (g_env_light.mThunderEff.mMode == 0) {
|
||||
g_env_light.mThunderEff.mMode = 2;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (g_env_light.mThunderEff.mMode == 0) {
|
||||
g_env_light.mThunderEff.mMode = 2;
|
||||
}
|
||||
|
||||
raincnt_set(var_f9);
|
||||
break;
|
||||
case 6:
|
||||
g_env_light.mMoyaMode = 1;
|
||||
g_env_light.mMoyaCount = var_f9 * 50.0f;
|
||||
raincnt_set(var_f9);
|
||||
|
||||
if (g_env_light.mThunderEff.mMode == 0) {
|
||||
g_env_light.mThunderEff.mMode = 2;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
g_env_light.mMoyaMode = 0;
|
||||
g_env_light.mMoyaCount = var_f9 * 50.0f;
|
||||
break;
|
||||
case 8:
|
||||
g_env_light.mMoyaMode = 1;
|
||||
g_env_light.mMoyaCount = var_f9 * 50.0f;
|
||||
break;
|
||||
case 9:
|
||||
g_env_light.mMoyaMode = 2;
|
||||
g_env_light.mMoyaCount = var_f9 * 50.0f;
|
||||
break;
|
||||
case 10:
|
||||
g_env_light.mMoyaMode = 3;
|
||||
g_env_light.mMoyaCount = var_f9 * 50.0f;
|
||||
break;
|
||||
case 11:
|
||||
g_env_light.mMoyaMode = 50;
|
||||
g_env_light.mMoyaCount = var_f9 * 50.0f * g_env_light.field_0xf40;
|
||||
break;
|
||||
case 12:
|
||||
g_env_light.mMoyaMode = 5;
|
||||
g_env_light.mMoyaCount = var_f9 * 50.0f;
|
||||
break;
|
||||
case 13:
|
||||
g_env_light.mMoyaMode = 6;
|
||||
g_env_light.mMoyaCount = var_f9 * 50.0f;
|
||||
break;
|
||||
case 15:
|
||||
g_env_light.field_0x1048 = var_f9 * 100.0f;
|
||||
break;
|
||||
case 16:
|
||||
if (i_this->orig.roomNo == dComIfGp_roomControl_getStayNo()) {
|
||||
g_env_light.field_0xe92 = true;
|
||||
|
||||
if (g_env_light.mSnowCount < (int)(var_f9 * 500.0f)) {
|
||||
g_env_light.mSnowCount += (int)(var_f9 * 500.0f * 0.05f);
|
||||
|
||||
if (g_env_light.mSnowCount > (int)(var_f9 * 500.0f)) {
|
||||
g_env_light.mSnowCount = (int)(var_f9 * 500.0f);
|
||||
}
|
||||
}
|
||||
|
||||
g_env_light.mMoyaMode = 0;
|
||||
if (g_env_light.mMoyaCount < (int)(var_f9 * 50.0f)) {
|
||||
g_env_light.mMoyaCount += (int)(var_f9 * 50.0f * 0.05f);
|
||||
|
||||
if (g_env_light.mMoyaCount > (int)(var_f9 * 50.0f)) {
|
||||
g_env_light.mMoyaCount = (int)(var_f9 * 50.0f);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
g_env_light.mSnowCount = 0;
|
||||
g_env_light.mMoyaCount = 0;
|
||||
}
|
||||
|
||||
mDoAud_setSnowPower(var_f9 * 127.0f);
|
||||
break;
|
||||
case 17:
|
||||
g_env_light.mMoyaMode = 8;
|
||||
g_env_light.mMoyaCount = var_f9 * 50.0f;
|
||||
break;
|
||||
case 18:
|
||||
g_env_light.mMoyaMode = 9;
|
||||
g_env_light.mMoyaCount = var_f9 * 50.0f;
|
||||
break;
|
||||
}
|
||||
} else if (i_this->field_0x56c != 0) {
|
||||
wether_tag_efect_reset(i_this);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -267,17 +558,14 @@ static asm void wether_tag_efect_move(kytag00_class* param_0) {
|
||||
#include "asm/rel/d/a/kytag/d_a_kytag00/d_a_kytag00/wether_tag_efect_move__FP13kytag00_class.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8046C660-8046C684 000FC0 0024+00 1/0 0/0 0/0 .text daKytag00_Draw__FP13kytag00_class
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void daKytag00_Draw(kytag00_class* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/kytag/d_a_kytag00/d_a_kytag00/daKytag00_Draw__FP13kytag00_class.s"
|
||||
static int daKytag00_Draw(kytag00_class* i_this) {
|
||||
wether_tag_efect_move(i_this);
|
||||
return 1;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 8046C9BC-8046C9C0 00003C 0004+00 0/0 0/0 0/0 .rodata @4101 */
|
||||
@@ -344,60 +632,143 @@ COMPILER_STRIP_GATE(0x8046C9DC, &lit_4147);
|
||||
#pragma pop
|
||||
|
||||
/* 8046C684-8046C76C 000FE4 00E8+00 1/0 0/0 0/0 .text daKytag00_Execute__FP13kytag00_class */
|
||||
// matches with literals
|
||||
#ifdef NONMATCHING
|
||||
static int daKytag00_Execute(kytag00_class* i_this) {
|
||||
BOOL var_r30 = true;
|
||||
|
||||
if (i_this->field_0x571 != 0xFF) {
|
||||
s32 room_no = dComIfGp_roomControl_getStayNo();
|
||||
if (dComIfGs_isSwitch(i_this->field_0x571, room_no)) {
|
||||
var_r30 = 0;
|
||||
}
|
||||
} else if (i_this->field_0x572 != 0xFF) {
|
||||
s32 room_no = dComIfGp_roomControl_getStayNo();
|
||||
if (!dComIfGs_isSwitch(i_this->field_0x572, room_no)) {
|
||||
var_r30 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (var_r30 == TRUE) {
|
||||
cLib_addCalc(&i_this->field_0x588, 1.0f, 0.1f, 0.01f, 0.0001f);
|
||||
} else {
|
||||
cLib_addCalc(&i_this->field_0x588, 0.0f, 0.1f, 0.01f, 0.0001f);
|
||||
}
|
||||
|
||||
wether_tag_move(i_this);
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void daKytag00_Execute(kytag00_class* param_0) {
|
||||
static asm int daKytag00_Execute(kytag00_class* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/kytag/d_a_kytag00/d_a_kytag00/daKytag00_Execute__FP13kytag00_class.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8046C76C-8046C774 0010CC 0008+00 1/0 0/0 0/0 .text daKytag00_IsDelete__FP13kytag00_class */
|
||||
static bool daKytag00_IsDelete(kytag00_class* param_0) {
|
||||
return true;
|
||||
static int daKytag00_IsDelete(kytag00_class* i_this) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 8046C774-8046C7BC 0010D4 0048+00 1/0 0/0 0/0 .text daKytag00_Delete__FP13kytag00_class
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void daKytag00_Delete(kytag00_class* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/kytag/d_a_kytag00/d_a_kytag00/daKytag00_Delete__FP13kytag00_class.s"
|
||||
static int daKytag00_Delete(kytag00_class* i_this) {
|
||||
wether_tag_reset(i_this);
|
||||
wether_tag_efect_reset(i_this);
|
||||
g_env_light.mMoyaCount = 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8046C7BC-8046C978 00111C 01BC+00 1/0 0/0 0/0 .text daKytag00_Create__FP10fopAc_ac_c */
|
||||
// matches with literals
|
||||
#ifdef NONMATCHING
|
||||
static int daKytag00_Create(fopAc_ac_c* i_this) {
|
||||
fopAcM_SetupActor(i_this, kytag00_class);
|
||||
kytag00_class* a_this = (kytag00_class*)i_this;
|
||||
|
||||
a_this->field_0x56e = 0;
|
||||
a_this->field_0x56f = fopAcM_GetParam(a_this) & 0xFF;
|
||||
a_this->field_0x570 = (fopAcM_GetParam(a_this) >> 8) & 0xFF;
|
||||
a_this->field_0x578 = (fopAcM_GetParam(a_this) >> 0x10) & 0xFF;
|
||||
a_this->field_0x57c = (fopAcM_GetParam(a_this) >> 0x18) & 0xFF;
|
||||
a_this->field_0x571 = a_this->current.angle.x & 0xFF;
|
||||
a_this->field_0x572 = (a_this->current.angle.x >> 8) & 0xFF;
|
||||
|
||||
BOOL var_r30 = true;
|
||||
|
||||
if (a_this->field_0x571 != 0xFF) {
|
||||
s32 room_no = dComIfGp_roomControl_getStayNo();
|
||||
if (dComIfGs_isSwitch(a_this->field_0x571, room_no)) {
|
||||
var_r30 = 0;
|
||||
}
|
||||
} else if (a_this->field_0x572 != 0xFF) {
|
||||
s32 room_no = dComIfGp_roomControl_getStayNo();
|
||||
if (!dComIfGs_isSwitch(a_this->field_0x572, room_no)) {
|
||||
var_r30 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (var_r30 == TRUE) {
|
||||
a_this->field_0x588 = 1.0f;
|
||||
} else {
|
||||
a_this->field_0x588 = 0.0f;
|
||||
}
|
||||
|
||||
if (a_this->field_0x578 == 0xFF) {
|
||||
a_this->field_0x578 = 10;
|
||||
}
|
||||
|
||||
if (a_this->field_0x57c == 0xFF) {
|
||||
a_this->field_0x57c = 10;
|
||||
}
|
||||
|
||||
a_this->field_0x580 = a_this->mScale.x * 5000.0f;
|
||||
a_this->field_0x584 = a_this->mScale.x * 5000.0f + a_this->field_0x578 * 100.0f;
|
||||
a_this->field_0x56c = 0;
|
||||
a_this->field_0x56d = 0;
|
||||
g_env_light.mMoyaCount = 0;
|
||||
|
||||
wether_tag_efect_move(a_this);
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void daKytag00_Create(fopAc_ac_c* param_0) {
|
||||
static asm int daKytag00_Create(fopAc_ac_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/kytag/d_a_kytag00/d_a_kytag00/daKytag00_Create__FP10fopAc_ac_c.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 8046CA78-8046CA98 -00001 0020+00 1/0 0/0 0/0 .data l_daKytag00_Method */
|
||||
SECTION_DATA static void* l_daKytag00_Method[8] = {
|
||||
(void*)daKytag00_Create__FP10fopAc_ac_c,
|
||||
(void*)daKytag00_Delete__FP13kytag00_class,
|
||||
(void*)daKytag00_Execute__FP13kytag00_class,
|
||||
(void*)daKytag00_IsDelete__FP13kytag00_class,
|
||||
(void*)daKytag00_Draw__FP13kytag00_class,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
static actor_method_class l_daKytag00_Method = {
|
||||
(process_method_func)daKytag00_Create, (process_method_func)daKytag00_Delete,
|
||||
(process_method_func)daKytag00_Execute, (process_method_func)daKytag00_IsDelete,
|
||||
(process_method_func)daKytag00_Draw,
|
||||
};
|
||||
|
||||
/* 8046CA98-8046CAC8 -00001 0030+00 0/0 0/0 1/0 .data g_profile_KYTAG00 */
|
||||
SECTION_DATA extern void* g_profile_KYTAG00[12] = {
|
||||
(void*)0xFFFFFFFD, (void*)0x0007FFFD,
|
||||
(void*)0x02AA0000, (void*)&g_fpcLf_Method,
|
||||
(void*)0x0000058C, (void*)NULL,
|
||||
(void*)NULL, (void*)&g_fopAc_Method,
|
||||
(void*)0x005E0000, (void*)&l_daKytag00_Method,
|
||||
(void*)0x00044000, (void*)NULL,
|
||||
extern actor_process_profile_definition g_profile_KYTAG00 = {
|
||||
-3,
|
||||
7,
|
||||
-3,
|
||||
PROC_KYTAG00,
|
||||
&g_fpcLf_Method.mBase,
|
||||
sizeof(kytag00_class),
|
||||
0,
|
||||
0,
|
||||
&g_fopAc_Method.base,
|
||||
94,
|
||||
&l_daKytag00_Method,
|
||||
0x44000,
|
||||
0,
|
||||
0,
|
||||
};
|
||||
|
||||
@@ -28,7 +28,7 @@ static void dice_wether_execute(u8 i_weatherMode, f32 i_weatherTime, f32 i_curre
|
||||
dScnKy_env_light_c* env_light = i_dKy_getEnvlight();
|
||||
env_light->mDiceWeatherMode = i_weatherMode;
|
||||
|
||||
if (env_light->mDiceWeatherMode != 0xFF) {
|
||||
if (env_light->mDiceWeatherMode != DICE_MODE_DONE_e) {
|
||||
env_light->mDiceWeatherTime =
|
||||
i_currentTime + i_weatherTime + cM_rndF(i_weatherTime) + cM_rndF(i_weatherTime);
|
||||
|
||||
@@ -38,7 +38,7 @@ static void dice_wether_execute(u8 i_weatherMode, f32 i_weatherTime, f32 i_curre
|
||||
|
||||
env_light->mDiceWeatherCounter++;
|
||||
} else {
|
||||
env_light->mDiceWeatherMode = 0;
|
||||
env_light->mDiceWeatherMode = DICE_MODE_SUNNY_e;
|
||||
env_light->mDiceWeatherState++;
|
||||
}
|
||||
}
|
||||
@@ -105,17 +105,17 @@ static void dKy_event_proc() {
|
||||
f32 current_time = dComIfGs_getTime();
|
||||
|
||||
switch (env_light->mDiceWeatherState) {
|
||||
case 0:
|
||||
case DICE_STATE_RESET_e:
|
||||
if (current_time > env_light->mDiceWeatherChangeTime &&
|
||||
current_time - env_light->mDiceWeatherChangeTime < 15.0f)
|
||||
{
|
||||
env_light->mDiceWeatherState = 1;
|
||||
env_light->mDiceWeatherState = DICE_STATE_INIT_e;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
case DICE_STATE_INIT_e:
|
||||
u8 table_no = cM_rndF(12.99f);
|
||||
if (table_no >= 8) {
|
||||
env_light->mDiceWeatherState = 3;
|
||||
env_light->mDiceWeatherState = DICE_STATE_NEXT_e;
|
||||
} else {
|
||||
env_light->mDiceWeatherCurrPattern = S_wether_table[table_no];
|
||||
env_light->mDiceWeatherCounter = 0;
|
||||
@@ -152,7 +152,7 @@ static void dKy_event_proc() {
|
||||
env_light->mDiceWeatherState++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case DICE_STATE_EXEC_e:
|
||||
if (current_time > env_light->mDiceWeatherTime &&
|
||||
current_time - env_light->mDiceWeatherTime < 180.0f)
|
||||
{
|
||||
@@ -185,7 +185,7 @@ static void dKy_event_proc() {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
case DICE_STATE_NEXT_e:
|
||||
u8 time_table_no = cM_rndF(7.99f);
|
||||
env_light->mDiceWeatherChangeTime = current_time + S_time_table[time_table_no];
|
||||
|
||||
@@ -193,19 +193,19 @@ static void dKy_event_proc() {
|
||||
env_light->mDiceWeatherChangeTime -= 360.0f;
|
||||
}
|
||||
|
||||
env_light->mDiceWeatherState = 0;
|
||||
env_light->mDiceWeatherState = DICE_STATE_RESET_e;
|
||||
break;
|
||||
}
|
||||
|
||||
if (g_env_light.field_0x130b == 1) {
|
||||
env_light->mDiceWeatherMode = 6;
|
||||
env_light->mDiceWeatherMode = DICE_MODE_UNK6_e;
|
||||
}
|
||||
|
||||
if (g_env_light.mColPatMode == 0 && g_env_light.mColPatModeGather == 0) {
|
||||
u8 weather_colpat;
|
||||
|
||||
switch (env_light->mDiceWeatherMode) {
|
||||
case 0:
|
||||
case DICE_MODE_SUNNY_e:
|
||||
weather_colpat = 0;
|
||||
if (g_env_light.mThunderEff.mMode == 1) {
|
||||
g_env_light.mThunderEff.mMode = 0;
|
||||
@@ -213,12 +213,12 @@ static void dKy_event_proc() {
|
||||
|
||||
dice_rain_minus();
|
||||
break;
|
||||
case 1:
|
||||
case DICE_MODE_CLOUDY_e:
|
||||
g_env_light.mThunderEff.mMode = 0;
|
||||
weather_colpat = 1;
|
||||
dice_rain_minus();
|
||||
break;
|
||||
case 2:
|
||||
case DICE_MODE_RAIN_LIGHT_e:
|
||||
weather_colpat = 1;
|
||||
if (env_light->mRainCount < 40) {
|
||||
env_light->mRainCount++;
|
||||
@@ -228,21 +228,21 @@ static void dKy_event_proc() {
|
||||
dKyw_rain_set(env_light->mRainCount);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
case DICE_MODE_THUNDER_HEAVY_e:
|
||||
g_env_light.mThunderEff.mMode = 1;
|
||||
case 3:
|
||||
case DICE_MODE_RAIN_HEAVY_e:
|
||||
weather_colpat = 2;
|
||||
if (env_light->mRainCount < 250) {
|
||||
env_light->mRainCount++;
|
||||
dKyw_rain_set(env_light->mRainCount);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
case DICE_MODE_THUNDER_LIGHT_e:
|
||||
weather_colpat = 1;
|
||||
g_env_light.mThunderEff.mMode = 1;
|
||||
dice_rain_minus();
|
||||
break;
|
||||
case 6:
|
||||
case DICE_MODE_UNK6_e:
|
||||
weather_colpat = 0;
|
||||
if (g_env_light.mThunderEff.mMode == 1) {
|
||||
g_env_light.mThunderEff.mMode = 0;
|
||||
|
||||
@@ -37,7 +37,7 @@ static void fish_set(fopAc_ac_c* i_this, fish_data_s* data) {
|
||||
}
|
||||
u32 param = data->param;
|
||||
pos = data->pos;
|
||||
if ((param == 1u) && envLight->field_0x12fe != 2) {
|
||||
if ((param == 1u) && envLight->mPondSeason != 2) {
|
||||
param = 2;
|
||||
}
|
||||
param |= data->field_0x10 << 8;
|
||||
@@ -145,9 +145,9 @@ static int daNpc_Fish_Create(fopAc_ac_c* i_this) {
|
||||
} else {
|
||||
dScnKy_env_light_c* envLight = i_dKy_getEnvlight();
|
||||
s32 param = 0;
|
||||
if (envLight->field_0x12fe == 2) {
|
||||
if (envLight->mPondSeason == 2) {
|
||||
param = 160;
|
||||
} else if (envLight->field_0x12fe == 3) {
|
||||
} else if (envLight->mPondSeason == 3) {
|
||||
param = 64;
|
||||
}
|
||||
if (param != 0) {
|
||||
@@ -156,7 +156,7 @@ static int daNpc_Fish_Create(fopAc_ac_c* i_this) {
|
||||
NULL, -1);
|
||||
}
|
||||
}
|
||||
if (g_env_light.field_0x12fe == 2) {
|
||||
if (g_env_light.mPondSeason == 2) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
pos.set(cM_rndFX(700.0f) + -2936.0f, 0.0f, cM_rndFX(700.0f) + -7865.0f);
|
||||
csXyz angle(0, 0, -1);
|
||||
|
||||
@@ -1121,11 +1121,11 @@ static int daTagTWGate_Create(fopAc_ac_c* i_actor) {
|
||||
inline daTagTWGate_c::~daTagTWGate_c() {
|
||||
dComIfG_resDelete(&mPhaseZevArc, l_zevParamTbl[mType].mArcName);
|
||||
|
||||
if (mPhaseMdRes.id != cPhs_ZERO_e) {
|
||||
if (mPhaseMdRes.id != cPhs_INIT_e) {
|
||||
dComIfG_resDelete(&mPhaseMdRes, "TWGate_Md");
|
||||
}
|
||||
|
||||
if (mPhasePyRes.id != cPhs_ZERO_e) {
|
||||
if (mPhasePyRes.id != cPhs_INIT_e) {
|
||||
dComIfG_resDelete(&mPhasePyRes, mIsWolf ? "TWGate_Wf" : "TWGate_Lk");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ int daTagMagne_c::create() {
|
||||
fopAcM_SetupActor(this, daTagMagne_c);
|
||||
|
||||
if (mTagMagne != NULL && mTagMagne->current.roomNo != current.roomNo) {
|
||||
return cPhs_ZERO_e;
|
||||
return cPhs_INIT_e;
|
||||
}
|
||||
|
||||
if (!Create()) {
|
||||
|
||||
Reference in New Issue
Block a user