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:
TakaRikka
2023-08-16 13:32:40 -07:00
committed by GitHub
parent 7fd7d0c1f3
commit 114582643f
42 changed files with 1534 additions and 968 deletions
+6 -6
View File
@@ -1594,7 +1594,7 @@ static void envcolor_init() {
g_env_light.mpSchedule = dKyd_schejule_getp();
}
g_env_light.mNowRoom = dComIfGp_roomControl_getStayNo();
g_env_light.mEnvrIdxPrev = dComIfGp_roomControl_getStayNo();
g_env_light.mEnvrIdxCurr = dComIfGp_roomControl_getStayNo();
g_env_light.mColPatBlend = 1.0f;
g_env_light.field_0x12b0 = 0;
@@ -1729,7 +1729,7 @@ void dKy_clear_game_init() {
g_env_light.mDarkDaytime = 120.0f;
g_env_light.mDarktimeWeek = 0;
g_env_light.field_0x12fe = 0;
g_env_light.mPondSeason = 0;
g_env_light.field_0x130a = 0;
g_env_light.field_0x12cc = 0;
g_env_light.field_0x130c = 0;
@@ -3668,7 +3668,7 @@ void dScnKy_env_light_c::drawKankyo() {
setSunpos();
SetBaseLight();
setLight();
dKy_setLight_nowroom(g_env_light.mNowRoom);
dKy_setLight_nowroom(g_env_light.mEnvrIdxPrev);
}
/* ############################################################################################## */
@@ -4936,7 +4936,7 @@ u8 dKy_pol_sound_get(cBgS_PolyInfo const* p_poly) {
}
int att0 = dComIfG_Bgsp().GetPolyAtt0(*p_poly);
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127") && g_env_light.field_0x12fe == 4 &&
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127") && g_env_light.mPondSeason == 4 &&
att0 == 4)
{
att0 = 13;
@@ -4966,7 +4966,7 @@ u8 dKy_pol_argument_get(cBgS_PolyInfo const* p_poly) {
}
int att0 = dComIfG_Bgsp().GetPolyAtt0(*p_poly);
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127") && g_env_light.field_0x12fe == 4 &&
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127") && g_env_light.mPondSeason == 4 &&
att0 == 4)
{
att0 = 13;
@@ -4999,7 +4999,7 @@ asm u8 dKy_pol_eff_prim_get(cBgS_PolyInfo const* param_0, _GXColor* param_1) {
}
int att0 = dComIfG_Bgsp().GetPolyAtt0(*p_poly);
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127") && g_env_light.field_0x12fe == 4 && att0 ==
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127") && g_env_light.mPondSeason == 4 && att0 ==
4) { att0 = 13; } else if (!strcmp(dComIfGp_getStartStageName(), "D_MN05A") &&
dComIfGs_isStageBossEnemy() && att0 == 11) { att0 = 7;
}
+353 -209
View File
@@ -248,307 +248,451 @@ static dKyd_lightSchejule l_time_attribute_boss[11] = {
static stage_palette_info_class l_field_data[16] = {
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{0x40, 0x40,0x40},
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
0,
0,
0,
0,
0,
0,
0,
0,
},
{
{0x40, 0x40, 0x40},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
0,
0,
0,
0,
0,
0,
0,
0,
},
{
{0x40, 0x40, 0x40},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
0,
0,
0,
0,
0,
0,
0,
0,
},
{
{0x40, 0x40, 0x40},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
0,
0,
0,
0,
0,
0,
0,
0,
},
{
{0x40, 0x40, 0x40},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
0,
0,
0,
0,
0,
0,
0,
0,
},
{
{0x40, 0x40, 0x40},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
0,
0,
0,
0,
0,
0,
0,
0,
},
{
{0x40, 0x40, 0x40},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
0,
0,
0,
0,
0,
0,
0,
0,
},
{
{0x40, 0x40, 0x40},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
0,
0,
0,
0,
0,
0,
0,
0,
},
{
{0x40, 0x40, 0x40},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
0,
0,
0,
0,
0,
0,
0,
0,
},
{
{0x40, 0x40, 0x40},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
0,
0,
0,
0,
0,
0,
0,
0,
},
{
{0x40, 0x40, 0x40},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
0,
0,
0,
0,
0,
0,
0,
0,
},
{
{0x40, 0x40, 0x40},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
0,
0,
0,
0,
0,
0,
0,
0,
},
{
{0x40, 0x40, 0x40},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
0,
0,
0,
0,
0,
0,
0,
0,
},
{
{0x40, 0x40, 0x40},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
0,
0,
0,
0,
0,
0,
0,
0,
},
{
{0x40, 0x40, 0x40},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
0,
0,
0,
0,
0,
0,
0,
0,
},
{
{0x40, 0x40, 0x40},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
{0x40, 0x40, 0x40},
0x40,
0x40,
0x40,
-5000.0f,
30000.0f,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
0,
0,
0,
0,
0,
0,
0,
0,
},
};
+6 -6
View File
@@ -828,8 +828,8 @@ static void wether_move_sun() {
g_env_light.mpSunPacket->field_0x28 = 0;
g_env_light.mpSunPacket->field_0x29 = 0;
f32 tmp0 = FLOAT_LABEL(lit_4378);
g_env_light.mpSunPacket->field_0x5c = tmp0;
g_env_light.mpSunPacket->field_0x60 = tmp0;
g_env_light.mpSunPacket->mVisibility = tmp0;
g_env_light.mpSunPacket->mSunAlpha = tmp0;
g_env_light.mpSunPacket->field_0x64 = tmp0;
g_env_light.mpSunPacket->field_0x68 = tmp0;
@@ -854,7 +854,7 @@ static void wether_move_sun() {
g_env_light.mpSunLenzPacket->field_0x8c = lit_4611;
f32 tmp0_2 = FLOAT_LABEL(lit_4378);
g_env_light.mpSunLenzPacket->field_0x90 = tmp0_2;
g_env_light.mpSunLenzPacket->field_0x98 = tmp0_2;
g_env_light.mpSunLenzPacket->mDistFalloff = tmp0_2;
g_env_light.mpSunLenzPacket->mDrawLenzInSky = false;
dKyr_sun_move();
dKyr_lenzflare_move();
@@ -1149,7 +1149,7 @@ static void wether_move_housi() {
g_env_light.mpHousiPacket->mpResTex = (u8*)dComIfG_getObjectRes("Always", 0x5E);
} else {
if (g_env_light.field_0xea9 == 2) {
if (g_env_light.field_0x12fe == 3) {
if (g_env_light.mPondSeason == 3) {
g_env_light.mpHousiPacket->mpResTex =
(u8*)dComIfG_getStageRes("momiji64s3tc.bti");
} else {
@@ -1528,8 +1528,8 @@ void dKyw_wether_proc() {
// Stage is Fishing Pond
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127") &&
(g_env_light.field_0x12fe == 1 || g_env_light.field_0x12fe == 3)) {
if (g_env_light.field_0x12fe == 1) {
(g_env_light.mPondSeason == 1 || g_env_light.mPondSeason == 3)) {
if (g_env_light.mPondSeason == 1) {
g_env_light.mHousiCount = 35;
} else {
g_env_light.mHousiCount = 30;