mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07: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
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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