kankyo mostly done (#2269)

* work on kankyo

* some more kankyo work

* kankyo almost done

* kankyo mostly done

* first cleanup pass

* some more renaming

* rename a bunch of kankyo vars

* fix regression
This commit is contained in:
TakaRikka
2024-12-24 06:52:12 -08:00
committed by GitHub
parent d874f05f44
commit ad2badcd29
83 changed files with 5300 additions and 3384 deletions
+2 -2
View File
@@ -6248,7 +6248,7 @@ s32 daAlink_c::setRoomInfo() {
roomID = dComIfG_Bgsp().GetRoomId(mLinkAcch.m_gnd);
if (roomID != fopAcM_GetRoomNo(this)) {
tevStr.mRoomNo = roomID;
tevStr.room_no = roomID;
mVoiceReverbIntensity = dComIfGp_getReverb(roomID);
field_0x814.SetRoomId(roomID);
fopAcM_SetRoomNo(this, roomID);
@@ -6259,7 +6259,7 @@ s32 daAlink_c::setRoomInfo() {
roomID = fopAcM_GetRoomNo(this);
}
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mLinkAcch.m_gnd);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mLinkAcch.m_gnd);
field_0x3174 = dComIfG_Bgsp().GetGroundCode(mLinkAcch.m_gnd);
field_0x2fbb = dComIfG_Bgsp().GetPolyAtt0(mLinkAcch.m_gnd);
mGndPolySpecialCode = dComIfG_Bgsp().GetSpecialCode(mLinkAcch.m_gnd);
+2 -2
View File
@@ -206,8 +206,8 @@ void daAlink_c::setGrabItemPos() {
daPy_frameCtrl_c* sp1C = &mUnderFrameCtrl[0];
s8 sp8 = fopAcM_GetRoomNo(this);
temp_r3->tevStr.mRoomNo = sp8;
temp_r3->tevStr.mEnvrIdxOverride = tevStr.mEnvrIdxOverride;
temp_r3->tevStr.room_no = sp8;
temp_r3->tevStr.YukaCol = tevStr.YukaCol;
fopAcM_SetRoomNo(temp_r3, sp8);
BOOL sp18 = checkGrabCarryActor();
+4 -4
View File
@@ -33,10 +33,10 @@ void daAlink_c::hsChainShape_c::draw() {
sp5C->getShape()->loadPreDrawSetting();
GXColor sp58;
sp58.r = temp_r29->mColorC0.r;
sp58.g = temp_r29->mColorC0.g;
sp58.b = temp_r29->mColorC0.b;
sp58.a = temp_r29->mColorC0.a;
sp58.r = temp_r29->AmbCol.r;
sp58.g = temp_r29->AmbCol.g;
sp58.b = temp_r29->AmbCol.b;
sp58.a = temp_r29->AmbCol.a;
GXSetChanAmbColor(GX_COLOR0A0, sp58);
GXSetChanMatColor(GX_COLOR0A0, g_whiteColor);
+51 -51
View File
@@ -3910,12 +3910,12 @@ void daAlink_c::setWaterDropColor(const J3DGXColorS10* i_color) {
/* 800CC7DC-800CC7FC 0C711C 0020+00 2/2 0/0 0/0 .text initTevCustomColor__9daAlink_cFv */
void daAlink_c::initTevCustomColor() {
tevStr.field_0x367 = 0;
tevStr.mFogColor.r = 0;
tevStr.mFogColor.g = 0;
tevStr.mFogColor.b = 0;
tevStr.field_0x360 = 0;
tevStr.field_0x362 = 0;
tevStr.mLightInf.a = 0;
tevStr.TevColor.r = 0;
tevStr.TevColor.g = 0;
tevStr.TevColor.b = 0;
tevStr.TevKColor.r = 0;
tevStr.TevKColor.b = 0;
}
/* 800CC7FC-800CD78C 0C713C 0F90+00 1/1 0/0 0/0 .text draw__9daAlink_cFv */
@@ -3946,13 +3946,13 @@ int daAlink_c::draw() {
if (mClothesChangeWaitTimer != 0) {
if (mProcID == PROC_METAMORPHOSE) {
if (mProcVar3.field_0x300e > 0) {
tevStr.mFogColor.r = 255;
tevStr.TevColor.r = 255;
} else {
tevStr.mFogColor.r = -255;
tevStr.TevColor.r = -255;
}
tevStr.mFogColor.g = tevStr.mFogColor.r;
tevStr.mFogColor.b = tevStr.mFogColor.r;
tevStr.TevColor.g = tevStr.TevColor.r;
tevStr.TevColor.b = tevStr.TevColor.r;
g_env_light.setLightTevColorType_MAJI(mpWlChangeModel, &tevStr);
mDoExt_modelEntryDL(mpWlChangeModel);
@@ -3965,22 +3965,22 @@ int daAlink_c::draw() {
BOOL var_r31 = 1;
if (field_0x06f4 != NULL) {
field_0x06f4->getTevColorReg(0, &tevStr.mFogColor);
field_0x06f4->getTevColorReg(0, &tevStr.TevColor);
} else if (mProcID == PROC_METAMORPHOSE || mProcID == PROC_DUNGEON_WARP ||
mProcID == PROC_DUNGEON_WARP_SCN_START)
{
tevStr.mFogColor.r = mProcVar3.field_0x300e;
tevStr.mFogColor.g = mProcVar3.field_0x300e;
tevStr.mFogColor.b = mProcVar3.field_0x300e;
tevStr.TevColor.r = mProcVar3.field_0x300e;
tevStr.TevColor.g = mProcVar3.field_0x300e;
tevStr.TevColor.b = mProcVar3.field_0x300e;
} else if (field_0x346c != 0.0f) {
f32 var_f2 = fabsf(field_0x346c);
tevStr.mFogColor.r = var_f2 * daAlinkHIO_wolf_c0::m.mLightDropR;
tevStr.mFogColor.g = var_f2 * daAlinkHIO_wolf_c0::m.mLightDropG;
tevStr.mFogColor.b = var_f2 * daAlinkHIO_wolf_c0::m.mLightDropB;
tevStr.TevColor.r = var_f2 * daAlinkHIO_wolf_c0::m.mLightDropR;
tevStr.TevColor.g = var_f2 * daAlinkHIO_wolf_c0::m.mLightDropG;
tevStr.TevColor.b = var_f2 * daAlinkHIO_wolf_c0::m.mLightDropB;
} else if (checkFreezeDamage()) {
tevStr.mFogColor.r = daAlinkHIO_damage_c0::m.mFreezeR;
tevStr.mFogColor.g = daAlinkHIO_damage_c0::m.mFreezeG;
tevStr.mFogColor.b = daAlinkHIO_damage_c0::m.mFreezeB;
tevStr.TevColor.r = daAlinkHIO_damage_c0::m.mFreezeR;
tevStr.TevColor.g = daAlinkHIO_damage_c0::m.mFreezeG;
tevStr.TevColor.b = daAlinkHIO_damage_c0::m.mFreezeB;
} else if (mDamageTimer != 0) {
if (!checkMagicArmorNoDamage()) {
int color_timer = mDamageTimer + mDamageColorTime;
@@ -4001,25 +4001,25 @@ int daAlink_c::draw() {
}
f32 var_f2 = fabsf(cM_ssin(color_timer * 0x800));
tevStr.field_0x360 = r * var_f2;
tevStr.field_0x361 = g * var_f2;
tevStr.field_0x362 = b * var_f2;
tevStr.TevKColor.r = r * var_f2;
tevStr.TevKColor.g = g * var_f2;
tevStr.TevKColor.b = b * var_f2;
var_r31 = 0;
}
} else if (mIceDamageWaitTimer != 0) {
f32 temp_f4 = 1.0f - (mIceDamageWaitTimer * (1.0f / daAlinkHIO_damage_c0::m.mFreezeTime));
f32 temp_f3 = 1.0f - temp_f4;
tevStr.mFogColor.r = (temp_f4 * daAlinkHIO_damage_c0::m.mFreezeInitR) +
tevStr.TevColor.r = (temp_f4 * daAlinkHIO_damage_c0::m.mFreezeInitR) +
(temp_f3 * daAlinkHIO_damage_c0::m.mFreezeR);
tevStr.mFogColor.g = (temp_f4 * daAlinkHIO_damage_c0::m.mFreezeInitG) +
tevStr.TevColor.g = (temp_f4 * daAlinkHIO_damage_c0::m.mFreezeInitG) +
(temp_f3 * daAlinkHIO_damage_c0::m.mFreezeG);
tevStr.mFogColor.b = (temp_f4 * daAlinkHIO_damage_c0::m.mFreezeInitB) +
tevStr.TevColor.b = (temp_f4 * daAlinkHIO_damage_c0::m.mFreezeInitB) +
(temp_f3 * daAlinkHIO_damage_c0::m.mFreezeB);
} else if (field_0x32b0[0].r != 0) {
tevStr.mFogColor.r = field_0x32b0[0].r;
tevStr.mFogColor.g = field_0x32b0[0].g;
tevStr.mFogColor.b = field_0x32b0[0].b;
tevStr.TevColor.r = field_0x32b0[0].r;
tevStr.TevColor.g = field_0x32b0[0].g;
tevStr.TevColor.b = field_0x32b0[0].b;
var_r29 = 1;
} else {
var_r31 = 0;
@@ -4036,7 +4036,7 @@ int daAlink_c::draw() {
setWaterDropColor(&field_0x32b0[1]);
} else {
mSwordUpColorIntensity = 0.0f;
setWaterDropColor((J3DGXColorS10*)&tevStr.mFogColor);
setWaterDropColor((J3DGXColorS10*)&tevStr.TevColor);
}
} else {
if (checkMagicArmorWearAbility()) {
@@ -4060,9 +4060,9 @@ int daAlink_c::draw() {
}
}
tevStr.field_0x360 = 0;
tevStr.field_0x361 = 0;
tevStr.field_0x362 = 0;
tevStr.TevKColor.r = 0;
tevStr.TevKColor.g = 0;
tevStr.TevKColor.b = 0;
if (checkSwordDraw()) {
modelDraw(mSwordModel, temp_r30);
@@ -4147,9 +4147,9 @@ int daAlink_c::draw() {
modelDraw(mpLinkFaceModel, var_r3);
}
tevStr.field_0x360 = 0;
tevStr.field_0x361 = 0;
tevStr.field_0x362 = 0;
tevStr.TevKColor.r = 0;
tevStr.TevKColor.g = 0;
tevStr.TevKColor.b = 0;
if (checkSwordDraw()) {
if (!checkNoResetFlg3(FLG3_UNK_80000000)) {
@@ -4164,9 +4164,9 @@ int daAlink_c::draw() {
if (checkShieldDraw()) {
BOOL var_r24_2;
if (checkWoodShieldEquip() && field_0x2fcb != 0 && mProcID != PROC_METAMORPHOSE) {
tevStr.mFogColor.r = -((120 - field_0x2fcb) * 32) / 120;
tevStr.mFogColor.g = tevStr.mFogColor.r;
tevStr.mFogColor.b = tevStr.mFogColor.r;
tevStr.TevColor.r = -((120 - field_0x2fcb) * 32) / 120;
tevStr.TevColor.g = tevStr.TevColor.r;
tevStr.TevColor.b = tevStr.TevColor.r;
var_r24_2 = 1;
} else {
var_r24_2 = 0;
@@ -4174,16 +4174,16 @@ int daAlink_c::draw() {
modelDraw(mShieldModel, var_r3);
if (var_r24_2) {
tevStr.mFogColor.r = 0;
tevStr.mFogColor.g = 0;
tevStr.mFogColor.b = 0;
tevStr.TevColor.r = 0;
tevStr.TevColor.g = 0;
tevStr.TevColor.b = 0;
}
}
if (var_r29) {
tevStr.mFogColor.r = 0;
tevStr.mFogColor.g = 0;
tevStr.mFogColor.b = 0;
tevStr.TevColor.r = 0;
tevStr.TevColor.g = 0;
tevStr.TevColor.b = 0;
}
if (checkItemDraw()) {
@@ -4228,22 +4228,22 @@ int daAlink_c::draw() {
}
if (checkEquipHeavyBoots()) {
GXColorS10 color = tevStr.mFogColor;
GXColorS10 color = tevStr.TevColor;
for (int i = 0; i < 2; i++) {
JPABaseEmitter* emitter_p = dComIfGp_particle_getEmitter(field_0x3228[i][0]);
if (emitter_p != NULL) {
tevStr.mFogColor.r = 5;
tevStr.mFogColor.g = tevStr.mFogColor.r;
tevStr.mFogColor.b = tevStr.mFogColor.r;
tevStr.TevColor.r = 5;
tevStr.TevColor.g = tevStr.TevColor.r;
tevStr.TevColor.b = tevStr.TevColor.r;
} else {
tevStr.mFogColor = color;
tevStr.TevColor = color;
}
modelDraw(mpLinkBootModels[i], temp_r30);
}
tevStr.mFogColor = color;
tevStr.TevColor = color;
}
}
+8 -8
View File
@@ -356,12 +356,12 @@ void daArrow_c::setRoomInfo() {
if (fopAcM_gc_c::gndCheck(&current.pos)) {
roomNo = fopAcM_gc_c::getRoomId();
tevStr.mEnvrIdxOverride = fopAcM_gc_c::getPolyColor();
tevStr.YukaCol = fopAcM_gc_c::getPolyColor();
} else {
roomNo = dComIfGp_roomControl_getStayNo();
}
tevStr.mRoomNo = roomNo;
tevStr.room_no = roomNo;
field_0x64c.SetRoomId(roomNo);
fopAcM_SetRoomNo(this, roomNo);
}
@@ -519,9 +519,9 @@ int daArrow_c::procWait() {
u32 param = fopAcM_GetParam(this);
if (param == 1 || param == 2) {
tevStr.mFogColor.r = 0;
tevStr.mFogColor.g = 0;
tevStr.mFogColor.b = 0;
tevStr.TevColor.r = 0;
tevStr.TevColor.g = 0;
tevStr.TevColor.b = 0;
daAlink_c* link = daAlink_getAlinkActorClass();
if (mArrowType == 1) {
@@ -1162,9 +1162,9 @@ int daArrow_c::draw() {
}
if (field_0x943 != 0) {
tevStr.mFogColor.r = link->getFreezeR();
tevStr.mFogColor.g = link->getFreezeG();
tevStr.mFogColor.b = link->getFreezeB();
tevStr.TevColor.r = link->getFreezeR();
tevStr.TevColor.g = link->getFreezeG();
tevStr.TevColor.b = link->getFreezeB();
}
g_env_light.setLightTevColorType_MAJI(mpModel, &tevStr);
+2 -2
View File
@@ -2515,8 +2515,8 @@ static int daB_BQ_Create(fopAc_ac_c* i_this) {
}
g_env_light.mColpatWeather = 6;
g_env_light.mColPatPrev = 6;
g_env_light.mColPatCurr = 6;
g_env_light.wether_pat0 = 6;
g_env_light.wether_pat1 = 6;
fish_set(a_this);
return cPhs_ERROR_e;
}
+2 -2
View File
@@ -3457,8 +3457,8 @@ cPhs__Step daB_YO_c::create() {
mColorMode = 4;
mColBlend = 1.0f;
g_env_light.mColpatWeather = 2;
g_env_light.mColPatPrev = 2;
g_env_light.mColPatCurr = 2;
g_env_light.wether_pat0 = 2;
g_env_light.wether_pat1 = 2;
fopAcM_OffStatus(this, 0x4000);
} else {
+1 -1
View File
@@ -4782,7 +4782,7 @@ void daB_ZANT_c::initNextRoom() {
}
}
tevStr.mRoomNo = warp_next_room[mFightPhase];
tevStr.room_no = warp_next_room[mFightPhase];
}
/* 8064B868-8064C1C0 00D848 0958+00 2/1 0/0 0/0 .text executeRoomChange__10daB_ZANT_cFv
+7 -7
View File
@@ -641,7 +641,7 @@ int daBg_c::draw() {
const char* name = modelData->getMaterialName()->getName(j);
if (!memcmp(&name[3], "MA12", 4)) {
if (g_env_light.mColPatCurr == 6) {
if (g_env_light.wether_pat1 == 6) {
field_0x5f0 = 0;
}
} else if (!memcmp(&name[3], "MA18", 4)) {
@@ -661,7 +661,7 @@ int daBg_c::draw() {
} else if (!memcmp(&name[3], "MA09", 4)) {
bgData->mBtkAnmSpeed = 1.0f - (1.0f - g_env_light.mWaterSurfaceShineRate) * 0.9f;
} else if (!memcmp(&name[3], "MA05", 4)) {
bgData->mpTevStr->field_0x378 |= (u8)j;
bgData->mpTevStr->Material_id |= (u8)j;
}
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127") ||
@@ -675,7 +675,7 @@ int daBg_c::draw() {
s16 var_r0;
s16 var_r3;
s16 var_r5;
switch (g_env_light.mPondSeason) {
switch (g_env_light.fishing_hole_season) {
case 2:
var_r5 = -3;
var_r0 = 0;
@@ -698,21 +698,21 @@ int daBg_c::draw() {
break;
}
f32 temp_f2 = bgData->mpTevStr->mColorC0.r / 10.0f;
f32 temp_f2 = bgData->mpTevStr->AmbCol.r / 10.0f;
f32 var_f2 = temp_f2 * temp_f2;
if (var_f2 > 1.0f) {
var_f2 = 1.0f;
}
colorS10.r = var_r5 * var_f2;
f32 temp_f2_2 = bgData->mpTevStr->mColorC0.g / 10.0f;
f32 temp_f2_2 = bgData->mpTevStr->AmbCol.g / 10.0f;
f32 var_f2_2 = temp_f2_2 * temp_f2_2;
if (var_f2_2 > 1.0f) {
var_f2_2 = 1.0f;
}
colorS10.g = var_r0 * var_f2_2;
f32 temp_f2_3 = bgData->mpTevStr->mColorC0.b / 10.0f;
f32 temp_f2_3 = bgData->mpTevStr->AmbCol.b / 10.0f;
f32 var_f2_3 = temp_f2_3 * temp_f2_3;
if (var_f2_3 > 1.0f) {
var_f2_3 = 1.0f;
@@ -900,4 +900,4 @@ extern "C" void calc__11J3DTexNoAnmCFPUs() {
// NONMATCHING
}
/* 804593A8-804593A8 000034 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
/* 804593A8-804593A8 000034 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
+2 -2
View File
@@ -1021,11 +1021,11 @@ void daBoomerang_c::setRoomInfo() {
int roomNo;
if (field_0x980 != -1000000000.0f) {
roomNo = dComIfG_Bgsp().GetRoomId(field_0xd6c);
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(field_0xd6c);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(field_0xd6c);
} else {
roomNo = dComIfGp_roomControl_getStayNo();
}
tevStr.mRoomNo = roomNo;
tevStr.room_no = roomNo;
field_0x953 = dComIfGp_getReverb(roomNo);
field_0x9d0.SetRoomId(roomNo);
fopAcM_SetRoomNo(this, roomNo);
+1 -1
View File
@@ -165,7 +165,7 @@ int daDbDoor00_c::CreateInit() {
u8 fRoomNo = door_param2_c::getFRoomNo(this);
if (fopAcM_GetRoomNo(this) == -1) {
fopAcM_SetRoomNo(this, fRoomNo);
tevStr.mRoomNo = current.roomNo;
tevStr.room_no = current.roomNo;
}
dComIfG_Bgsp().Regist(mpBgW, this);
field_0x584 = 1;
+2 -2
View File
@@ -153,7 +153,7 @@ void daKnob20_c::calcMtx() {
int daKnob20_c::CreateInit() {
int rt = dComIfG_Bgsp().Regist(field_0x5a0, this);
JUT_ASSERT(299, rt == 0);
tevStr.mRoomNo = current.roomNo;
tevStr.room_no = current.roomNo;
setAction(ACTION_INIT);
attention_info.position.y += 150.0f;
eyePos.y += 150.0f;
@@ -165,7 +165,7 @@ int daKnob20_c::CreateInit() {
field_0x5a0->Move();
eventInfo.setArchiveName(getEvArcName());
setEventId();
tevStr.mLightInf = knob_param_c::getDoorLightInf(this);
tevStr.mLightInf.r = knob_param_c::getDoorLightInf(this);
return 1;
}
+1 -1
View File
@@ -530,7 +530,7 @@ int daMBdoorL1_c::CreateInit() {
} else {
lightInf = door_param2_c::getMBLightInf(this);
}
tevStr.mLightInf = lightInf;
tevStr.mLightInf.r = lightInf;
return 1;
}
+8 -8
View File
@@ -790,7 +790,7 @@ int daDoor20_c::CreateInit() {
&field_0x8b8, fopAcM_GetSpeed_p(this), NULL, NULL);
int rt = dComIfG_Bgsp().Regist(field_0x5c4, this);
JUT_ASSERT(1512, !rt);
tevStr.mRoomNo = current.roomNo;
tevStr.room_no = current.roomNo;
setAction(ACTION_INIT);
attention_info.position.y += 150.0f;
eyePos.y += 150.0f;
@@ -1314,7 +1314,7 @@ int daDoor20_c::execute() {
} else {
lightInf = door_param2_c::getBLightInf(this);
}
tevStr.mLightInf = lightInf;
tevStr.mLightInf.r = lightInf;
if (strcmp(dComIfGp_getStartStageName(), "D_MN05") != 0 && strcmp(dComIfGp_getStartStageName(), "D_MN04") != 0) {
field_0x6de.CrrPos(dComIfG_Bgsp());
}
@@ -1541,19 +1541,19 @@ int daDoor20_c::drawCheck(int param_1) {
door_param2_c::getBackOption(this);
int stayNo = dComIfGp_roomControl_getStayNo();
if (fRoomNo == stayNo || bRoomNo == stayNo) {
tevStr.mRoomNo = stayNo;
tevStr.room_no = stayNo;
} else {
if (dComIfGp_roomControl_checkRoomDisp(fRoomNo)) {
tevStr.mRoomNo = fRoomNo;
tevStr.room_no = fRoomNo;
} else if (dComIfGp_roomControl_checkRoomDisp(bRoomNo)) {
tevStr.mRoomNo = bRoomNo;
tevStr.room_no = bRoomNo;
}
}
if (field_0x678 != -1) {
tevStr.mRoomNo = field_0x674;
tevStr.room_no = field_0x674;
}
fopAcM_SetRoomNo(this, tevStr.mRoomNo);
if (!dComIfGp_roomControl_checkRoomDisp(tevStr.mRoomNo)) {
fopAcM_SetRoomNo(this, tevStr.room_no);
if (!dComIfGp_roomControl_checkRoomDisp(tevStr.room_no)) {
return 1;
} else {
return 1;
+8 -8
View File
@@ -3969,8 +3969,8 @@ int daE_VA_c::create() {
if (mSwNo != 0xFF && dComIfGs_isSwitch(mSwNo, fopAcM_GetRoomNo(this))) {
g_env_light.mColpatWeather = 4;
g_env_light.mColPatPrev = 4;
g_env_light.mColPatCurr = 4;
g_env_light.wether_pat0 = 4;
g_env_light.wether_pat1 = 4;
return cPhs_ERROR_e;
}
@@ -4028,8 +4028,8 @@ int daE_VA_c::create() {
attention_info.distances[fopAc_attn_BATTLE_e] = 62;
g_env_light.mColpatWeather = 2;
g_env_light.mColPatPrev = 2;
g_env_light.mColPatCurr = 2;
g_env_light.wether_pat0 = 2;
g_env_light.wether_pat1 = 2;
if (daPy_getPlayerActorClass()->current.pos.z >= 1850.0f) {
cDmr_SkipInfo = 0;
@@ -4046,14 +4046,14 @@ int daE_VA_c::create() {
mKankyoColType = 0;
g_env_light.mColpatWeather = 2;
g_env_light.mColPatPrev = 2;
g_env_light.mColPatCurr = 2;
g_env_light.wether_pat0 = 2;
g_env_light.wether_pat1 = 2;
} else {
mAction = ACTION_DEMO_OP_WAIT_e;
mKankyoColType = 5;
g_env_light.mColpatWeather = 3;
g_env_light.mColPatPrev = 3;
g_env_light.mColPatCurr = 3;
g_env_light.wether_pat0 = 3;
g_env_light.wether_pat1 = 3;
}
daE_VA_Execute(this);
+5 -5
View File
@@ -87,7 +87,7 @@ static void wether_tag_move(kytag00_class* i_this) {
}
var_f9 *= (var_f8 * i_this->field_0x588);
if (g_env_light.mEnvrIdxPrev == g_env_light.mEnvrIdxCurr) {
if (g_env_light.PrevCol == g_env_light.UseCol) {
i_this->field_0x56d = 1;
switch (i_this->field_0x56f) {
@@ -140,14 +140,14 @@ static void wether_tag_move(kytag00_class* i_this) {
/* 8046BD60-8046BDA4 0006C0 0044+00 1/1 0/0 0/0 .text raincnt_set__Ff */
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;
if (cnt > g_env_light.base_raincnt) {
g_env_light.raincnt = cnt;
}
}
/* 8046BDA4-8046BDB8 000704 0014+00 1/1 0/0 0/0 .text raincnt_cut__Fv */
static void raincnt_cut() {
g_env_light.mRainCount = g_env_light.mRainCountOrig;
g_env_light.raincnt = g_env_light.base_raincnt;
}
/* 8046BDB8-8046BEB8 000718 0100+00 3/2 0/0 0/0 .text wether_tag_efect_reset__FP13kytag00_class */
@@ -332,7 +332,7 @@ static void wether_tag_efect_move(kytag00_class* i_this) {
break;
case 11:
g_env_light.mMoyaMode = 50;
g_env_light.mMoyaCount = var_f9 * 50.0f * g_env_light.field_0xf40;
g_env_light.mMoyaCount = var_f9 * 50.0f * g_env_light.senses_effect_strength;
break;
case 12:
g_env_light.mMoyaMode = 5;
+3 -3
View File
@@ -183,10 +183,10 @@ static int daKytag01_Create(fopAc_ac_c* i_this) {
if (a_this->mStartPoint == dComIfGs_getStartPoint() &&
i_this->home.roomNo == dComIfGp_roomControl_getStayNo())
{
a_this->field_0x59e = g_env_light.mColPatPrev;
a_this->field_0x59e = g_env_light.wether_pat0;
g_env_light.mColpatWeather = a_this->field_0x59d;
g_env_light.mColPatPrev = a_this->field_0x59d;
g_env_light.mColPatCurr = g_env_light.mColPatPrev;
g_env_light.wether_pat0 = a_this->field_0x59d;
g_env_light.wether_pat1 = g_env_light.wether_pat0;
}
} else {
a_this->mNamiSize = (int)((fopAcM_GetParam(i_this) >> 0x10) & 0xFF);
+8 -8
View File
@@ -22,7 +22,7 @@ static int daKytag02_Execute(kytag02_class* i_this) {
dKyw_evt_wind_set(0, i_this->current.angle.y);
if (i_this->field_0x578 != 99) {
env_light->mTeachWindExist = 1;
env_light->TeachWind_existence = 1;
env_light->mMoyaMode = 4;
env_light->mMoyaCount = 50;
@@ -57,18 +57,18 @@ static int daKytag02_Execute(kytag02_class* i_this) {
i_this->field_0x574--;
}
} else {
env_light->mTeachWindExist = 0xFF;
env_light->TeachWind_existence = 0xFF;
env_light->custom_windpower = 0.3f;
}
} else {
env_light = dKy_getEnvlight();
env_light->mEvtWindSet = 0;
env_light->evt_wind_go = 0;
if (i_this->field_0x578 != 99) {
env_light->mMoyaCount = 0;
}
env_light->mTeachWindExist = 0;
env_light->TeachWind_existence = 0;
}
if (i_this->field_0x578 != 99) {
@@ -91,9 +91,9 @@ static int daKytag02_IsDelete(kytag02_class* i_this) {
static int daKytag02_Delete(kytag02_class* i_this) {
dScnKy_env_light_c* env_light = dKy_getEnvlight();
env_light->mEvtWindSet = 0;
env_light->evt_wind_go = 0;
env_light->mMoyaCount = 0;
env_light->mTeachWindExist = 0;
env_light->TeachWind_existence = 0;
return 1;
}
@@ -118,9 +118,9 @@ static int daKytag02_Create(fopAc_ac_c* i_this) {
dKyw_evt_wind_set(0, a_this->current.angle.y);
if (a_this->field_0x578 == 99) {
env_light->mTeachWindExist = 0xFF;
env_light->TeachWind_existence = 0xFF;
} else {
env_light->mTeachWindExist = 1;
env_light->TeachWind_existence = 1;
env_light->mMoyaMode = 4;
env_light->mMoyaCount = 50;
}
+1 -1
View File
@@ -365,7 +365,7 @@ static int daKytag03_Execute(kytag03_class* i_this) {
i_this->mpEmitter->setGlobalEnvColor(0x44, 0x1A, 0x6B);
}
i_this->mpEmitter->setGlobalAlpha(kankyo->field_0xf40 * 223.0f + 32.0f);
i_this->mpEmitter->setGlobalAlpha(kankyo->senses_effect_strength * 223.0f + 32.0f);
}
if (i_this->field_0x585 != dComIfGs_getCollectSmell()) {
+112 -112
View File
@@ -13,32 +13,32 @@
static void dice_wether_init(u8 i_weatherMode, f32 i_weatherTime, f32 i_currentTime) {
dScnKy_env_light_c* env_light = dKy_getEnvlight();
env_light->mDiceWeatherMode = i_weatherMode;
env_light->mDiceWeatherTime =
env_light->dice_wether_mode = i_weatherMode;
env_light->dice_wether_time =
i_currentTime + i_weatherTime + cM_rndF(i_weatherTime) + cM_rndF(i_weatherTime);
if (env_light->mDiceWeatherTime >= 360.0f) {
env_light->mDiceWeatherTime -= 360.0f;
if (env_light->dice_wether_time >= 360.0f) {
env_light->dice_wether_time -= 360.0f;
}
}
/* 80857918-808579EC 000198 00D4+00 1/1 0/0 0/0 .text dice_wether_execute__FUcff */
static void dice_wether_execute(u8 i_weatherMode, f32 i_weatherTime, f32 i_currentTime) {
dScnKy_env_light_c* env_light = dKy_getEnvlight();
env_light->mDiceWeatherMode = i_weatherMode;
env_light->dice_wether_mode = i_weatherMode;
if (env_light->mDiceWeatherMode != DICE_MODE_DONE_e) {
env_light->mDiceWeatherTime =
if (env_light->dice_wether_mode != DICE_MODE_DONE_e) {
env_light->dice_wether_time =
i_currentTime + i_weatherTime + cM_rndF(i_weatherTime) + cM_rndF(i_weatherTime);
if (env_light->mDiceWeatherTime >= 360.0f) {
env_light->mDiceWeatherTime -= 360.0f;
if (env_light->dice_wether_time >= 360.0f) {
env_light->dice_wether_time -= 360.0f;
}
env_light->mDiceWeatherCounter++;
env_light->dice_wether_counter++;
} else {
env_light->mDiceWeatherMode = DICE_MODE_SUNNY_e;
env_light->mDiceWeatherState++;
env_light->dice_wether_mode = DICE_MODE_SUNNY_e;
env_light->dice_wether_state++;
}
}
@@ -48,13 +48,13 @@ static void dice_rain_minus() {
if ((g_Counter.mCounter0 & 3) == 0) {
// run block every 4 frames
if (env_light->mRainCount > 40) {
env_light->mRainCount -= 3;
} else if (env_light->mRainCount != 0) {
env_light->mRainCount--;
if (env_light->raincnt > 40) {
env_light->raincnt -= 3;
} else if (env_light->raincnt != 0) {
env_light->raincnt--;
}
dKyw_rain_set(env_light->mRainCount);
dKyw_rain_set(env_light->raincnt);
}
}
@@ -99,86 +99,86 @@ static void dKy_event_proc() {
dScnKy_env_light_c* env_light = dKy_getEnvlight();
if (!g_env_light.mCameraInWater) {
if (g_env_light.mInitAnmTimer == 0) {
if (!g_env_light.camera_water_in_status) {
if (g_env_light.light_init_timer == 0) {
f32 current_time = dComIfGs_getTime();
switch (env_light->mDiceWeatherState) {
switch (env_light->dice_wether_state) {
case DICE_STATE_RESET_e:
if (current_time > env_light->mDiceWeatherChangeTime &&
current_time - env_light->mDiceWeatherChangeTime < 15.0f)
if (current_time > env_light->dice_wether_change_time &&
current_time - env_light->dice_wether_change_time < 15.0f)
{
env_light->mDiceWeatherState = DICE_STATE_INIT_e;
env_light->dice_wether_state = DICE_STATE_INIT_e;
}
break;
case DICE_STATE_INIT_e:
u8 table_no = cM_rndF(12.99f);
if (table_no >= 8) {
env_light->mDiceWeatherState = DICE_STATE_NEXT_e;
env_light->dice_wether_state = DICE_STATE_NEXT_e;
} else {
env_light->mDiceWeatherCurrPattern = S_wether_table[table_no];
env_light->mDiceWeatherCounter = 0;
env_light->dice_wether_pat = S_wether_table[table_no];
env_light->dice_wether_counter = 0;
switch (env_light->mDiceWeatherCurrPattern) {
switch (env_light->dice_wether_pat) {
case 0:
dice_wether_init(S_wether_mode_pat01[env_light->mDiceWeatherCounter],
S_wether_time_pat01[env_light->mDiceWeatherCounter],
dice_wether_init(S_wether_mode_pat01[env_light->dice_wether_counter],
S_wether_time_pat01[env_light->dice_wether_counter],
current_time);
break;
case 1:
dice_wether_init(S_wether_mode_pat02[env_light->mDiceWeatherCounter],
S_wether_time_pat02[env_light->mDiceWeatherCounter],
dice_wether_init(S_wether_mode_pat02[env_light->dice_wether_counter],
S_wether_time_pat02[env_light->dice_wether_counter],
current_time);
break;
case 2:
dice_wether_init(S_wether_mode_pat03[env_light->mDiceWeatherCounter],
S_wether_time_pat03[env_light->mDiceWeatherCounter],
dice_wether_init(S_wether_mode_pat03[env_light->dice_wether_counter],
S_wether_time_pat03[env_light->dice_wether_counter],
current_time);
break;
case 3:
dice_wether_init(S_wether_mode_pat04[env_light->mDiceWeatherCounter],
S_wether_time_pat04[env_light->mDiceWeatherCounter],
dice_wether_init(S_wether_mode_pat04[env_light->dice_wether_counter],
S_wether_time_pat04[env_light->dice_wether_counter],
current_time);
break;
case 4:
dice_wether_init(S_wether_mode_pat05[env_light->mDiceWeatherCounter],
S_wether_time_pat05[env_light->mDiceWeatherCounter],
dice_wether_init(S_wether_mode_pat05[env_light->dice_wether_counter],
S_wether_time_pat05[env_light->dice_wether_counter],
current_time);
break;
}
env_light->mDiceWeatherCounter++;
env_light->mDiceWeatherState++;
env_light->dice_wether_counter++;
env_light->dice_wether_state++;
}
break;
case DICE_STATE_EXEC_e:
if (current_time > env_light->mDiceWeatherTime &&
current_time - env_light->mDiceWeatherTime < 180.0f)
if (current_time > env_light->dice_wether_time &&
current_time - env_light->dice_wether_time < 180.0f)
{
switch (env_light->mDiceWeatherCurrPattern) {
switch (env_light->dice_wether_pat) {
case 0:
dice_wether_execute(S_wether_mode_pat01[env_light->mDiceWeatherCounter],
S_wether_time_pat01[env_light->mDiceWeatherCounter],
dice_wether_execute(S_wether_mode_pat01[env_light->dice_wether_counter],
S_wether_time_pat01[env_light->dice_wether_counter],
current_time);
break;
case 1:
dice_wether_execute(S_wether_mode_pat02[env_light->mDiceWeatherCounter],
S_wether_time_pat02[env_light->mDiceWeatherCounter],
dice_wether_execute(S_wether_mode_pat02[env_light->dice_wether_counter],
S_wether_time_pat02[env_light->dice_wether_counter],
current_time);
break;
case 2:
dice_wether_execute(S_wether_mode_pat03[env_light->mDiceWeatherCounter],
S_wether_time_pat03[env_light->mDiceWeatherCounter],
dice_wether_execute(S_wether_mode_pat03[env_light->dice_wether_counter],
S_wether_time_pat03[env_light->dice_wether_counter],
current_time);
break;
case 3:
dice_wether_execute(S_wether_mode_pat04[env_light->mDiceWeatherCounter],
S_wether_time_pat04[env_light->mDiceWeatherCounter],
dice_wether_execute(S_wether_mode_pat04[env_light->dice_wether_counter],
S_wether_time_pat04[env_light->dice_wether_counter],
current_time);
break;
case 4:
dice_wether_execute(S_wether_mode_pat05[env_light->mDiceWeatherCounter],
S_wether_time_pat05[env_light->mDiceWeatherCounter],
dice_wether_execute(S_wether_mode_pat05[env_light->dice_wether_counter],
S_wether_time_pat05[env_light->dice_wether_counter],
current_time);
break;
}
@@ -186,24 +186,24 @@ static void dKy_event_proc() {
break;
case DICE_STATE_NEXT_e:
u8 time_table_no = cM_rndF(7.99f);
env_light->mDiceWeatherChangeTime = current_time + S_time_table[time_table_no];
env_light->dice_wether_change_time = current_time + S_time_table[time_table_no];
if (env_light->mDiceWeatherChangeTime >= 360.0f) {
env_light->mDiceWeatherChangeTime -= 360.0f;
if (env_light->dice_wether_change_time >= 360.0f) {
env_light->dice_wether_change_time -= 360.0f;
}
env_light->mDiceWeatherState = DICE_STATE_RESET_e;
env_light->dice_wether_state = DICE_STATE_RESET_e;
break;
}
if (g_env_light.field_0x130b == 1) {
env_light->mDiceWeatherMode = DICE_MODE_UNK6_e;
env_light->dice_wether_mode = DICE_MODE_UNK6_e;
}
if (g_env_light.mColPatMode == 0 && g_env_light.mColPatModeGather == 0) {
u8 weather_colpat;
switch (env_light->mDiceWeatherMode) {
switch (env_light->dice_wether_mode) {
case DICE_MODE_SUNNY_e:
weather_colpat = 0;
if (g_env_light.mThunderEff.mMode == 1) {
@@ -219,21 +219,21 @@ static void dKy_event_proc() {
break;
case DICE_MODE_RAIN_LIGHT_e:
weather_colpat = 1;
if (env_light->mRainCount < 40) {
env_light->mRainCount++;
dKyw_rain_set(env_light->mRainCount);
if (env_light->raincnt < 40) {
env_light->raincnt++;
dKyw_rain_set(env_light->raincnt);
} else {
env_light->mRainCount--;
dKyw_rain_set(env_light->mRainCount);
env_light->raincnt--;
dKyw_rain_set(env_light->raincnt);
}
break;
case DICE_MODE_THUNDER_HEAVY_e:
g_env_light.mThunderEff.mMode = 1;
case DICE_MODE_RAIN_HEAVY_e:
weather_colpat = 2;
if (env_light->mRainCount < 250) {
env_light->mRainCount++;
dKyw_rain_set(env_light->mRainCount);
if (env_light->raincnt < 250) {
env_light->raincnt++;
dKyw_rain_set(env_light->raincnt);
}
break;
case DICE_MODE_THUNDER_LIGHT_e:
@@ -247,13 +247,13 @@ static void dKy_event_proc() {
g_env_light.mThunderEff.mMode = 0;
}
if (env_light->mRainCount > 2) {
env_light->mRainCount -= 2;
if (env_light->raincnt > 2) {
env_light->raincnt -= 2;
} else {
env_light->mRainCount = 0;
env_light->raincnt = 0;
}
dKyw_rain_set(env_light->mRainCount);
dKyw_rain_set(env_light->raincnt);
}
if (env_light->mColpatWeather != weather_colpat) {
@@ -264,7 +264,7 @@ static void dKy_event_proc() {
if (g_env_light.mColPatMode == 0 && g_env_light.mColPatModeGather == 0 &&
g_env_light.mColpatCurrGather != 0xFF &&
g_env_light.mColPatCurr != g_env_light.mColpatCurrGather)
g_env_light.wether_pat1 != g_env_light.mColpatCurrGather)
{
g_env_light.mColPatBlendGather = 0.0f;
}
@@ -328,12 +328,12 @@ static void daKytag06_lv7_boss_wether_proc(kytag06_class* i_this, u8 param_1) {
switch (param_1) {
case 0:
weather_colpat = 0;
if (env_light->mRainCount > 20) {
env_light->mRainCount -= 4;
} else if (env_light->mRainCount != 0) {
env_light->mRainCount--;
if (env_light->raincnt > 20) {
env_light->raincnt -= 4;
} else if (env_light->raincnt != 0) {
env_light->raincnt--;
}
dKyw_rain_set(env_light->mRainCount);
dKyw_rain_set(env_light->raincnt);
break;
case 1:
weather_colpat = 1;
@@ -341,16 +341,16 @@ static void daKytag06_lv7_boss_wether_proc(kytag06_class* i_this, u8 param_1) {
break;
case 2:
weather_colpat = 2;
if (env_light->mRainCount < 250) {
env_light->mRainCount++;
dKyw_rain_set(env_light->mRainCount);
if (env_light->raincnt < 250) {
env_light->raincnt++;
dKyw_rain_set(env_light->raincnt);
}
g_env_light.mThunderEff.mMode = 1;
break;
}
if (env_light->mColpatWeather != weather_colpat && !g_env_light.mCameraInWater) {
if (env_light->mColpatWeather != weather_colpat && !g_env_light.camera_water_in_status) {
g_env_light.mColpatWeather = weather_colpat;
dKy_change_colpat(weather_colpat);
}
@@ -458,12 +458,12 @@ static void daKytag06_wether_proc(kytag06_class* i_this, u8 param_1) {
if ((g_Counter.mCounter0 & 3) == 0) {
// run block every 4 frames
if (env_light->mRainCount < 40) {
env_light->mRainCount++;
dKyw_rain_set(env_light->mRainCount);
if (env_light->raincnt < 40) {
env_light->raincnt++;
dKyw_rain_set(env_light->raincnt);
} else {
env_light->mRainCount--;
dKyw_rain_set(env_light->mRainCount);
env_light->raincnt--;
dKyw_rain_set(env_light->raincnt);
}
}
@@ -474,9 +474,9 @@ static void daKytag06_wether_proc(kytag06_class* i_this, u8 param_1) {
case 3:
weather_colpat = 1;
if (env_light->mRainCount < 250) {
env_light->mRainCount++;
dKyw_rain_set(env_light->mRainCount);
if (env_light->raincnt < 250) {
env_light->raincnt++;
dKyw_rain_set(env_light->raincnt);
}
if (env_light->mSnowCount != 0) {
@@ -487,9 +487,9 @@ static void daKytag06_wether_proc(kytag06_class* i_this, u8 param_1) {
g_env_light.mThunderEff.mMode = 1;
weather_colpat = 1;
if (env_light->mRainCount < 250) {
env_light->mRainCount++;
dKyw_rain_set(env_light->mRainCount);
if (env_light->raincnt < 250) {
env_light->raincnt++;
dKyw_rain_set(env_light->raincnt);
}
if (env_light->mSnowCount != 0) {
@@ -527,7 +527,7 @@ static void daKytag06_wether_proc(kytag06_class* i_this, u8 param_1) {
break;
}
if (env_light->mColpatWeather != weather_colpat && !g_env_light.mCameraInWater) {
if (env_light->mColpatWeather != weather_colpat && !g_env_light.camera_water_in_status) {
g_env_light.mColpatWeather = weather_colpat;
dKy_change_colpat(weather_colpat);
}
@@ -608,13 +608,13 @@ static void daKytag06_type_07_Execute(kytag06_class* i_this) {
if (camera != NULL) {
if (camera->lookat.eye.y > 0.0f) {
dKy_BossLight_set(&spX, &color, i_this->mWindPower * 2.0f, 0);
g_env_light.mTerrainAmbienceBG[3].r = (u8)(i_this->mWindPower * 230.0f + 25.0f);
g_env_light.mTerrainAmbienceBG[3].g = (u8)(i_this->mWindPower * 215.0f + 30.0f);
g_env_light.mTerrainAmbienceBG[3].b = (u8)(i_this->mWindPower * 155.0f + 25.0f);
g_env_light.bg_amb_col[3].r = (u8)(i_this->mWindPower * 230.0f + 25.0f);
g_env_light.bg_amb_col[3].g = (u8)(i_this->mWindPower * 215.0f + 30.0f);
g_env_light.bg_amb_col[3].b = (u8)(i_this->mWindPower * 155.0f + 25.0f);
} else {
g_env_light.mTerrainAmbienceBG[3].r = 0;
g_env_light.mTerrainAmbienceBG[3].g = 0;
g_env_light.mTerrainAmbienceBG[3].b = 0;
g_env_light.bg_amb_col[3].r = 0;
g_env_light.bg_amb_col[3].g = 0;
g_env_light.bg_amb_col[3].b = 0;
g_env_light.mThunderEff.mMode = 0;
}
}
@@ -776,9 +776,9 @@ static void daKytag06_type_06_Execute(kytag06_class* i_this) {
break;
}
g_env_light.mTerrainAmbienceBG[3].r = (u8)(i_this->mWindPower * 245.0f + 10.0f);
g_env_light.mTerrainAmbienceBG[3].g = (u8)(i_this->mWindPower * 185.0f + 15.0f);
g_env_light.mTerrainAmbienceBG[3].b = (u8)(i_this->mWindPower * 130.0f + 20.0f);
g_env_light.bg_amb_col[3].r = (u8)(i_this->mWindPower * 245.0f + 10.0f);
g_env_light.bg_amb_col[3].g = (u8)(i_this->mWindPower * 185.0f + 15.0f);
g_env_light.bg_amb_col[3].b = (u8)(i_this->mWindPower * 130.0f + 20.0f);
static cXyz c_pos(0.0f, 0.0f, 0.0f);
@@ -967,8 +967,8 @@ static void daKytag06_type_03_Execute(kytag06_class* i_this) {
case 2:
if ((g_Counter.mCounter0 & 7) == 0) {
// run block every 8 frames
if (g_env_light.mRainCount < 250) {
g_env_light.mRainCount++;
if (g_env_light.raincnt < 250) {
g_env_light.raincnt++;
} else {
i_this->mMode++;
}
@@ -1103,8 +1103,8 @@ static int daKytag06_Execute(kytag06_class* i_this) {
break;
case 2:
if (i_this->field_0x578 > 900) {
if (g_env_light.mRainCount < 250) {
g_env_light.mRainCount++;
if (g_env_light.raincnt < 250) {
g_env_light.raincnt++;
} else {
i_this->field_0x591++;
}
@@ -1129,8 +1129,8 @@ static int daKytag06_Execute(kytag06_class* i_this) {
if (i_this->field_0x578 > 0) {
g_env_light.mThunderEff.mMode = 0;
if (g_env_light.mRainCount > 0) {
g_env_light.mRainCount--;
if (g_env_light.raincnt > 0) {
g_env_light.raincnt--;
} else {
i_this->field_0x591++;
}
@@ -1251,10 +1251,10 @@ static void daKytag06_type03_init(fopAc_ac_c* i_this) {
if (dComIfGs_isSwitch(a_this->mSwNo, stayNo)) {
a_this->mMode = 9;
g_env_light.mRainCount = 250;
g_env_light.raincnt = 250;
g_env_light.mColpatWeather = a_this->field_0x591;
g_env_light.mColPatPrev = a_this->field_0x591;
g_env_light.mColPatCurr = a_this->field_0x591;
g_env_light.wether_pat0 = a_this->field_0x591;
g_env_light.wether_pat1 = a_this->field_0x591;
}
}
} else if (a_this->field_0x597 == 2 && dComIfGp_roomControl_getStayNo() != 0) {
@@ -1320,8 +1320,8 @@ static int daKytag06_Create(fopAc_ac_c* i_this) {
default:
if (strcmp(dComIfGp_getStartStageName(), "T_MUKAO") != 0) {
g_env_light.mColpatWeather = 3;
g_env_light.mColPatPrev = 3;
g_env_light.mColPatCurr = 3;
g_env_light.wether_pat0 = 3;
g_env_light.wether_pat1 = 3;
} else {
dComIfGs_setTime(210.0f);
}
+1 -1
View File
@@ -267,7 +267,7 @@ static int daKytag08_Create(fopAc_ac_c* i_this) {
a_this->mAvoidPos.y = 100.0f;
a_this->mTargetAvoidPos = a_this->mAvoidPos;
env_light->field_0x1060 = a_this;
env_light->fog_avoid_tag = a_this;
}
return phase;
+7 -7
View File
@@ -48,17 +48,17 @@ static int daKytag11_Execute(kytag11_class* i_this) {
if (!i_this->mInitTimeChange) {
if (i_this->mNewTime != 0x1F) {
env_light->mDaytime = dComIfGs_getTime();
env_light->daytime = dComIfGs_getTime();
f32 new_time = i_this->mNewTime * 15.0f;
env_light->mDaytime = new_time;
env_light->daytime = new_time;
dComIfGs_setTime(new_time);
}
i_this->mInitTimeChange = true;
}
env_light->field_0x12fb = 1;
env_light->using_time_control_tag = 1;
if (i_this->mStopTime != 0x1F && i_this->mStopTime == (u8)dKy_getdaytime_hour()) {
return 1;
@@ -67,19 +67,19 @@ static int daKytag11_Execute(kytag11_class* i_this) {
f32 new_env_time = ((i_this->mEnvTime / 255.0f) * 0.5f);
f32 current_time = dComIfGs_getTime();
env_light->mDaytime = current_time;
env_light->daytime = current_time;
env_light->mDate = dComIfGs_getDate();
new_env_time = current_time + new_env_time;
env_light->mDaytime = new_env_time;
env_light->daytime = new_env_time;
if ((u32)new_env_time >= 360.0f) {
env_light->mDaytime = 0.0f;
env_light->daytime = 0.0f;
env_light->mDate++;
dKankyo_DayProc();
}
dComIfGs_setTime(env_light->mDaytime);
dComIfGs_setTime(env_light->daytime);
dComIfGs_setDate(env_light->mDate);
return 1;
+9 -9
View File
@@ -278,9 +278,9 @@ static int daKytag12_Execute_standard(kytag12_class* i_this) {
}
for (int j = 0; j < 10; j++) {
if (g_env_light.mDalkmistInf[j] != NULL &&
g_env_light.mDalkmistInf[j]->mPos.abs(effect_p->mBasePos) <
g_env_light.mDalkmistInf[j]->field_0xc + 100.0f)
if (g_env_light.dalkmist_influence[j] != NULL &&
g_env_light.dalkmist_influence[j]->mPos.abs(effect_p->mBasePos) <
g_env_light.dalkmist_influence[j]->field_0xc + 100.0f)
{
if (effect_p->mStatus != 2 && effect_p->field_0x40 == 0 && var_r23 < 1) {
cXyz spF4;
@@ -587,9 +587,9 @@ static int daKytag12_Execute_arrival(kytag12_class* i_this) {
}
for (int j = 0; j < 10; j++) {
if (g_env_light.mDalkmistInf[j] != NULL &&
g_env_light.mDalkmistInf[j]->mPos.abs(effect_p->mBasePos) <
g_env_light.mDalkmistInf[j]->field_0xc + 100.0f)
if (g_env_light.dalkmist_influence[j] != NULL &&
g_env_light.dalkmist_influence[j]->mPos.abs(effect_p->mBasePos) <
g_env_light.dalkmist_influence[j]->field_0xc + 100.0f)
{
if (effect_p->mStatus != 3 && effect_p->field_0x40 == 0 && var_r21 < 1) {
sp80 = effect_p->mBasePos;
@@ -892,9 +892,9 @@ static int daKytag12_Execute_R00(kytag12_class* i_this) {
}
for (int j = 0; j < 10; j++) {
if (g_env_light.mDalkmistInf[j] != NULL &&
g_env_light.mDalkmistInf[j]->mPos.abs(effect_p->mBasePos) <
g_env_light.mDalkmistInf[j]->field_0xc + 100.0f)
if (g_env_light.dalkmist_influence[j] != NULL &&
g_env_light.dalkmist_influence[j]->mPos.abs(effect_p->mBasePos) <
g_env_light.dalkmist_influence[j]->field_0xc + 100.0f)
{
if (effect_p->mStatus != 2 && effect_p->field_0x40 == 0 && var_r24 < 1) {
cXyz spA4;
+1 -1
View File
@@ -59,7 +59,7 @@ static int daKytag15_Execute(kytag15_class* i_this) {
} else {
cLib_addCalc(&i_this->field_0x590, 0.0f, 0.05f, 0.01f, 1.0E-8f);
}
} else if (g_env_light.mColPatPrev == 11) {
} else if (g_env_light.wether_pat0 == 11) {
cLib_addCalc(&i_this->field_0x590, 1.0f, 0.05f, 0.01f, 1.0E-8f);
}
+1 -1
View File
@@ -35,7 +35,7 @@ static int daKytag17_Create(fopAc_ac_c* i_this) {
fopAcM_SetupActor(a_this, kytag17_class);
a_this->mParameters = fopAcM_GetParam(a_this);
g_env_light.field_0x1308 = a_this->mParameters;
g_env_light.light_mask_type = a_this->mParameters;
return cPhs_COMPLEATE_e;
}
+11 -11
View File
@@ -1044,11 +1044,11 @@ void daMidna_c::setRoomInfo() {
int room_no;
if (fopAcM_gc_c::gndCheck(&current.pos)) {
room_no = fopAcM_gc_c::getRoomId();
tevStr.mEnvrIdxOverride = fopAcM_gc_c::getPolyColor();
tevStr.YukaCol = fopAcM_gc_c::getPolyColor();
} else {
room_no = dComIfGp_roomControl_getStayNo();
}
tevStr.mRoomNo = room_no;
tevStr.room_no = room_no;
mReverb = dComIfGp_getReverb(room_no);
fopAcM_SetRoomNo(this, room_no);
}
@@ -3266,12 +3266,12 @@ int daMidna_c::draw() {
if (checkSetAnime(0, ANM_RETURN)) {
f32 end_frame = mpMorf->getEndFrame();
f32 frame = mpMorf->getFrame();
tevStr.mFogColor.r = (frame / end_frame) * -32.0f;
tevStr.mFogColor.g = tevStr.mFogColor.r;
tevStr.mFogColor.b = tevStr.mFogColor.r;
tevStr.TevColor.r = (frame / end_frame) * -32.0f;
tevStr.TevColor.g = tevStr.TevColor.r;
tevStr.TevColor.b = tevStr.TevColor.r;
} else if (link->getIceDamageWaitTimer() != 0 || link->checkFreezeDamage() != 0) {
tevStr.mFogColor = link->tevStr.mFogColor;
field_0x6e0 = link->tevStr.mFogColor;
tevStr.TevColor = link->tevStr.TevColor;
field_0x6e0 = link->tevStr.TevColor;
if (dKy_darkworld_check()) {
field_0x6e8 = (J3DGXColor)l_normalKColor;
field_0x6ec = (J3DGXColor)l_normalKColor2;
@@ -3311,7 +3311,7 @@ int daMidna_c::draw() {
} else {
g_env_light.settingTevStruct(1, &current.pos, &tevStr);
if (field_0x668 != NULL) {
field_0x668->getTevColorReg(0, &tevStr.mFogColor);
field_0x668->getTevColorReg(0, &tevStr.TevColor);
}
g_env_light.setLightTevColorType_MAJI(mpGokouBmd, &tevStr);
mDoExt_modelEntryDL(mpGokouBmd);
@@ -3359,9 +3359,9 @@ int daMidna_c::draw() {
mDoExt_modelEntryDL(mpDemoHDTmpBmd);
}
tevStr.mFogColor.r = 0;
tevStr.mFogColor.g = 0;
tevStr.mFogColor.b = 0;
tevStr.TevColor.r = 0;
tevStr.TevColor.g = 0;
tevStr.TevColor.b = 0;
dComIfGd_setList();
if (bvar1 && !checkStateFlg1(FLG1_SHADOW_NO_DRAW)) {
+4 -4
View File
@@ -207,10 +207,10 @@ void dMirror_packet_c::modelDraw(J3DModel* i_model, Mtx param_1) {
JUT_ASSERT(kankyo != 0);
GXColor color = {0};
color.r = kankyo->mTerrainAmbienceBG[0].r;
color.g = kankyo->mTerrainAmbienceBG[0].g;
color.b = kankyo->mTerrainAmbienceBG[0].b;
color.a = kankyo->mTerrainAmbienceBG[0].a;
color.r = kankyo->bg_amb_col[0].r;
color.g = kankyo->bg_amb_col[0].g;
color.b = kankyo->bg_amb_col[0].b;
color.a = kankyo->bg_amb_col[0].a;
J3DModelData* modelData = i_model->getModelData();
u16 materialNum = modelData->getMaterialNum();
+5 -5
View File
@@ -485,13 +485,13 @@ void daNbomb_c::setRoomInfo() {
int room_no;
if (mAcch.GetGroundH() != -1000000000.0f) {
room_no = dComIfG_Bgsp().GetRoomId(mAcch.m_gnd);
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mAcch.m_gnd);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mAcch.m_gnd);
mPolySound = dKy_pol_sound_get(&mAcch.m_gnd);
} else {
room_no = dComIfGp_roomControl_getStayNo();
}
tevStr.mRoomNo = room_no;
tevStr.room_no = room_no;
mSoundReverb = dComIfGp_getReverb(room_no);
mCcStts.SetRoomId(room_no);
fopAcM_SetRoomNo(this, room_no);
@@ -1679,9 +1679,9 @@ int daNbomb_c::draw() {
}
if (checkStateFlg0(FLG0_FROZEN)) {
tevStr.mFogColor.r = player->getFreezeR();
tevStr.mFogColor.g = player->getFreezeG();
tevStr.mFogColor.b = player->getFreezeB();
tevStr.TevColor.r = player->getFreezeR();
tevStr.TevColor.g = player->getFreezeG();
tevStr.TevColor.b = player->getFreezeB();
}
g_env_light.setLightTevColorType_MAJI(mpModel, &tevStr);
+26 -26
View File
@@ -1465,26 +1465,26 @@ int daNpcT_c::draw(int param_0, int i_setEffMtx, f32 param_2, GXColorS10* i_colo
return 1;
}
tevStr.mFogColor.r = 0;
tevStr.mFogColor.g = 0;
tevStr.mFogColor.b = 0;
tevStr.mFogColor.a = 0;
tevStr.TevColor.r = 0;
tevStr.TevColor.g = 0;
tevStr.TevColor.b = 0;
tevStr.TevColor.a = 0;
if (i_color != NULL) {
tevStr.mFogColor.r = i_color->r;
tevStr.mFogColor.g = i_color->g;
tevStr.mFogColor.b = i_color->b;
tevStr.mFogColor.a = i_color->a;
tevStr.TevColor.r = i_color->r;
tevStr.TevColor.g = i_color->g;
tevStr.TevColor.b = i_color->b;
tevStr.TevColor.a = i_color->a;
}
if (field_0xdb8 != 0 && mTimer != 0) {
f32 r = (f32)mTimer / (f32)field_0xdb8;
if (cM3d_IsZero(r) == false) {
tevStr.mFogColor.r = r * 20.0f;
tevStr.TevColor.r = r * 20.0f;
}
} else if (param_0 != 0) {
tevStr.mFogColor.g = 20;
tevStr.TevColor.g = 20;
}
if (field_0xd98 & 0x800) {
@@ -1555,8 +1555,8 @@ int daNpcT_c::draw(int param_0, int i_setEffMtx, f32 param_2, GXColorS10* i_colo
/* 80148C70-80148CCC 1435B0 005C+00 1/1 0/0 58/58 .text setEnvTevColor__8daNpcT_cFv */
void daNpcT_c::setEnvTevColor() {
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(field_0x930);
tevStr.mRoomNo = dComIfG_Bgsp().GetRoomId(field_0x930);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(field_0x930);
tevStr.room_no = dComIfG_Bgsp().GetRoomId(field_0x930);
}
/* 80148CCC-80148D10 14360C 0044+00 1/1 0/0 58/58 .text setRoomNo__8daNpcT_cFv */
@@ -2861,8 +2861,8 @@ void daBaseNpc_c::mainProc() {
/* 8014F0A0-8014F0FC 1499E0 005C+00 1/1 0/0 2/2 .text setEnvTevColor__11daBaseNpc_cFv */
void daBaseNpc_c::setEnvTevColor() {
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mBgSPolyInfo);
tevStr.mRoomNo = dComIfG_Bgsp().GetRoomId(mBgSPolyInfo);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mBgSPolyInfo);
tevStr.room_no = dComIfG_Bgsp().GetRoomId(mBgSPolyInfo);
}
/* 8014F0FC-8014F140 149A3C 0044+00 1/1 0/0 2/2 .text setRoomNo__11daBaseNpc_cFv */
@@ -3708,19 +3708,19 @@ int daNpcF_c::draw(BOOL i_isTest, BOOL param_1, f32 i_shadowDepth, _GXColorS10*
}
if (cM3d_IsZero_inverted(damage_ratio)) {
tevStr.mFogColor.r = (s16)(damage_ratio * 20.0f);
tevStr.mFogColor.g = 0;
tevStr.TevColor.r = (s16)(damage_ratio * 20.0f);
tevStr.TevColor.g = 0;
} else if (i_isTest) {
tevStr.mFogColor.g = 20;
tevStr.mFogColor.r = 0;
tevStr.TevColor.g = 20;
tevStr.TevColor.r = 0;
} else if (i_fogColor != NULL) {
tevStr.mFogColor.r = i_fogColor->r;
tevStr.mFogColor.g = i_fogColor->g;
tevStr.mFogColor.b = i_fogColor->b;
tevStr.mFogColor.a = i_fogColor->a;
tevStr.TevColor.r = i_fogColor->r;
tevStr.TevColor.g = i_fogColor->g;
tevStr.TevColor.b = i_fogColor->b;
tevStr.TevColor.a = i_fogColor->a;
} else {
tevStr.mFogColor.g = 0;
tevStr.mFogColor.r = 0;
tevStr.TevColor.g = 0;
tevStr.TevColor.r = 0;
}
if (mTwilight) {
@@ -4000,8 +4000,8 @@ BOOL daNpcF_c::setBrkAnm(J3DAnmTevRegKey* i_brk, J3DModelData* i_modelData, f32
/* 80152D84-80152DE0 14D6C4 005C+00 1/1 0/0 40/40 .text setEnvTevColor__8daNpcF_cFv */
void daNpcF_c::setEnvTevColor() {
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.mRoomNo = dComIfG_Bgsp().GetRoomId(mGndChk);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.room_no = dComIfG_Bgsp().GetRoomId(mGndChk);
}
/* 80152DE0-80152E24 14D720 0044+00 1/1 0/0 40/40 .text setRoomNo__8daNpcF_cFv */
+3 -3
View File
@@ -674,8 +674,8 @@ int daNpcCd_c::removeResrc(int idx, int param_1) {
/* 80156D1C-80156D78 15165C 005C+00 0/0 0/0 1/1 .text setEnvTevCol__9daNpcCd_cFv */
void daNpcCd_c::setEnvTevCol() {
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mAcch.m_gnd);
tevStr.mRoomNo = dComIfG_Bgsp().GetRoomId(mAcch.m_gnd);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mAcch.m_gnd);
tevStr.room_no = dComIfG_Bgsp().GetRoomId(mAcch.m_gnd);
}
/* 80156D78-80156DBC 1516B8 0044+00 0/0 0/0 1/1 .text setRoomNo__9daNpcCd_cFv */
@@ -1485,4 +1485,4 @@ void __sinit_d_a_npc_cd_cpp(){// NONMATCHING
REGISTER_CTORS(0x80157A10, __sinit_d_a_npc_cd_cpp);
#pragma pop
/* 80392FE8-80392FE8 01F648 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
/* 80392FE8-80392FE8 01F648 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
+3 -3
View File
@@ -1783,8 +1783,8 @@ int daNpcCd2_c::removeResrc(int idx, int param_1) {
/* 80158D88-80158DE4 1536C8 005C+00 0/0 0/0 4/4 .text setEnvTevCol__10daNpcCd2_cFv */
void daNpcCd2_c::setEnvTevCol() {
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mAcch.m_gnd);
tevStr.mRoomNo = dComIfG_Bgsp().GetRoomId(mAcch.m_gnd);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mAcch.m_gnd);
tevStr.room_no = dComIfG_Bgsp().GetRoomId(mAcch.m_gnd);
}
/* 80158DE4-80158E28 153724 0044+00 0/0 0/0 4/4 .text setRoomNo__10daNpcCd2_cFv */
@@ -2164,4 +2164,4 @@ void __sinit_d_a_npc_cd2_cpp(){// NONMATCHING
#pragma push
#pragma force_active on
REGISTER_CTORS(0x8015A90C, __sinit_d_a_npc_cd2_cpp);
#pragma pop
#pragma pop
+4 -4
View File
@@ -35,7 +35,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->mPondSeason != 2) {
if ((param == 1u) && envLight->fishing_hole_season != 2) {
param = 2;
}
param |= data->field_0x10 << 8;
@@ -138,9 +138,9 @@ static int daNpc_Fish_Create(fopAc_ac_c* i_this) {
} else {
dScnKy_env_light_c* envLight = dKy_getEnvlight();
s32 param = 0;
if (envLight->mPondSeason == 2) {
if (envLight->fishing_hole_season == 2) {
param = 160;
} else if (envLight->mPondSeason == 3) {
} else if (envLight->fishing_hole_season == 3) {
param = 64;
}
if (param != 0) {
@@ -149,7 +149,7 @@ static int daNpc_Fish_Create(fopAc_ac_c* i_this) {
NULL, -1);
}
}
if (g_env_light.mPondSeason == 2) {
if (g_env_light.fishing_hole_season == 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);
+35 -35
View File
@@ -450,22 +450,22 @@ int daNpc_zrZ_c::draw(int i_isTest, int param_1, f32 i_shadowDepth, _GXColorS10*
}
if (cM3d_IsZero_inverted(damage_ratio)) {
tevStr.mFogColor.r = (s16)(damage_ratio * 20.0f);
tevStr.mFogColor.g = 0;
tevStr.TevColor.r = (s16)(damage_ratio * 20.0f);
tevStr.TevColor.g = 0;
} else if (i_isTest) {
tevStr.mFogColor.g = 20;
tevStr.mFogColor.r = 0;
tevStr.TevColor.g = 20;
tevStr.TevColor.r = 0;
} else if (i_fogColor != NULL) {
tevStr.mFogColor.r = i_fogColor->r;
tevStr.mFogColor.g = i_fogColor->g;
tevStr.mFogColor.b = i_fogColor->b;
tevStr.mFogColor.a = i_fogColor->a;
tevStr.TevColor.r = i_fogColor->r;
tevStr.TevColor.g = i_fogColor->g;
tevStr.TevColor.b = i_fogColor->b;
tevStr.TevColor.a = i_fogColor->a;
} else {
tevStr.mFogColor.g = 0;
tevStr.mFogColor.r = 0;
tevStr.TevColor.g = 0;
tevStr.TevColor.r = 0;
}
if (tevStr.mFogColor.a == 0) {
if (tevStr.TevColor.a == 0) {
return 1;
}
@@ -656,7 +656,7 @@ void daNpc_zrZ_c::setParam() {
mAcchCir.SetWallH(daNpc_zrZ_Param_c::m.mWallH);
gravity = daNpc_zrZ_Param_c::m.mGravity;
u32 uvar4 = cLib_minMaxLimit<u32>(tevStr.mFogColor.a * 100 / 0xff, 1, 100);
u32 uvar4 = cLib_minMaxLimit<u32>(tevStr.TevColor.a * 100 / 0xff, 1, 100);
mCreatureSound.startCreatureSoundLevel(Z2SE_ZRZ_MV, uvar4, -1);
}
@@ -1053,14 +1053,14 @@ void daNpc_zrZ_c::reset() {
if (mDemoMode == DEMO_WAIT) {
mIsLeading = false;
tevStr.mFogColor.a = 0;
tevStr.TevColor.a = 0;
mpNextActionFn = &wait;
} else if (mDemoMode == DEMO_COME_HERE || mDemoMode == DEMO_COME_HERE_2) {
mIsLeading = false;
tevStr.mFogColor.a = 0xff;
tevStr.TevColor.a = 0xff;
} else {
mIsLeading = true;
tevStr.mFogColor.a = 0xff;
tevStr.TevColor.a = 0xff;
}
setLookMode(LOOK_NONE);
@@ -1688,20 +1688,20 @@ BOOL daNpc_zrZ_c::ECut_helpPrince(int i_staffID) {
case 40:
if (cLib_calcTimer(&mEventTimer) == 0) {
ret = true;
tevStr.mFogColor.a = 0xff;
tevStr.TevColor.a = 0xff;
} else {
tevStr.mFogColor.a = (u8)((60 - mEventTimer) / 60.0f * 255.0f);
tevStr.TevColor.a = (u8)((60 - mEventTimer) / 60.0f * 255.0f);
}
break;
case 103:
if (cLib_calcTimer(&mEventTimer) == 0) {
ret = true;
tevStr.mFogColor.a = 0;
tevStr.TevColor.a = 0;
} else if (mEventTimer > 30) {
tevStr.mFogColor.a = (u8)((mEventTimer - 30) / 30.0f * 255.0f);
tevStr.TevColor.a = (u8)((mEventTimer - 30) / 30.0f * 255.0f);
} else {
tevStr.mFogColor.a = 0;
tevStr.TevColor.a = 0;
}
break;
@@ -1988,11 +1988,11 @@ BOOL daNpc_zrZ_c::ECut_clothesGet(int i_staffID) {
case 90:
if (cLib_calcTimer(&mEventTimer) == 0) {
ret = true;
tevStr.mFogColor.a = 0;
tevStr.TevColor.a = 0;
} else if (mEventTimer > 0) {
tevStr.mFogColor.a = (u8)(mEventTimer / 120.0f * 255.0f);
tevStr.TevColor.a = (u8)(mEventTimer / 120.0f * 255.0f);
} else {
tevStr.mFogColor.a = 0;
tevStr.TevColor.a = 0;
}
break;
@@ -2074,11 +2074,11 @@ BOOL daNpc_zrZ_c::ECut_getAfter(int i_staffID) {
case 90:
if (cLib_calcTimer(&mEventTimer) == 0) {
ret = true;
tevStr.mFogColor.a = 0;
tevStr.TevColor.a = 0;
} else if (mEventTimer > 0) {
tevStr.mFogColor.a = (u8)(mEventTimer / 120.0f * 255.0f);
tevStr.TevColor.a = (u8)(mEventTimer / 120.0f * 255.0f);
} else {
tevStr.mFogColor.a = 0;
tevStr.TevColor.a = 0;
}
break;
@@ -2131,7 +2131,7 @@ BOOL daNpc_zrZ_c::ECut_sealRelease(int i_staffID) {
break;
case 10:
if (tevStr.mFogColor.a <= 0x1e) {
if (tevStr.TevColor.a <= 0x1e) {
ret = true;
}
break;
@@ -2150,7 +2150,7 @@ BOOL daNpc_zrZ_c::ECut_sealRelease(int i_staffID) {
if (prm >= 10) {
cXyz pos = mPath.getPntPos(mPath.getIdx());
if (!mPath.chkPassedDst(current.pos)) {
cLib_chaseS(&tevStr.mFogColor.a, 8, 8);
cLib_chaseS(&tevStr.TevColor.a, 8, 8);
cLib_addCalc2(&mSpeed, daNpc_zrZ_Param_c::m.mMaxSpeed, 0.1f, 1.0f);
s16 ang_y = cLib_targetAngleY(&current.pos, &pos);
s16 ang_x = cLib_targetAngleX(&pos, &current.pos);
@@ -2158,7 +2158,7 @@ BOOL daNpc_zrZ_c::ECut_sealRelease(int i_staffID) {
cLib_addCalcAngleS2(&mMoveAngle.x, ang_x, 2, 0x800);
} else {
mSpeed = 0.0f;
cLib_chaseS(&tevStr.mFogColor.a, 0xff, 8);
cLib_chaseS(&tevStr.TevColor.a, 0xff, 8);
mIsMoving = false;
}
} else {
@@ -2191,7 +2191,7 @@ BOOL daNpc_zrZ_c::ECut_srSkip(int i_staffID) {
current.pos = mPath.getPntPos(mPath.getIdx());
old.pos = current.pos;
setAngle(fopAcM_searchPlayerAngleY(this));
tevStr.mFogColor.a = 0xff;
tevStr.TevColor.a = 0xff;
mIsMoving = false;
if (mpRockActor != NULL) {
fopAcM_delete(mpRockActor);
@@ -2344,8 +2344,8 @@ BOOL daNpc_zrZ_c::comeHere(void* param_0) {
if (!dComIfGs_isSwitch(mSwitch1, fopAcM_GetRoomNo(this))) {
dComIfGs_onSwitch(mSwitch1, fopAcM_GetRoomNo(this));
}
cLib_chaseS(&tevStr.mFogColor.a, 0, 4);
if (tevStr.mFogColor.a == 0) {
cLib_chaseS(&tevStr.TevColor.a, 0, 4);
if (tevStr.TevColor.a == 0) {
fopAcM_delete(this);
}
}
@@ -2446,10 +2446,10 @@ BOOL daNpc_zrZ_c::comeHere2(void* param_0) {
mOrderEvtNo = EVT_SEAL_RELEASE;
break;
} else {
cLib_chaseS(&tevStr.mFogColor.a, 0x14, 8);
cLib_chaseS(&tevStr.TevColor.a, 0x14, 8);
}
} else {
cLib_chaseS(&tevStr.mFogColor.a, 0xff, 8);
cLib_chaseS(&tevStr.TevColor.a, 0xff, 8);
}
cLib_addCalc2(&mSpeed, daNpc_zrZ_Param_c::m.mMaxSpeed, 0.1f, 1.0f);
@@ -2459,7 +2459,7 @@ BOOL daNpc_zrZ_c::comeHere2(void* param_0) {
cLib_addCalcAngleS2(&mMoveAngle.x, angle_x, 2, 0x800);
} else {
cLib_chaseF(&mSpeed, 0.0f, 3.0f);
cLib_chaseS(&tevStr.mFogColor.a, 0xff, 8);
cLib_chaseS(&tevStr.TevColor.a, 0xff, 8);
}
cXyz move_speed(0.0f, 0.0f, mSpeed);
+2 -2
View File
@@ -264,8 +264,8 @@ int daObj_AutoMata_c::setAnm(int param_1, bool param_2) {
/* 80BA6634-80BA6690 001034 005C+00 2/2 0/0 0/0 .text setEnvTevColor__16daObj_AutoMata_cFv */
void daObj_AutoMata_c::setEnvTevColor() {
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.mRoomNo = dComIfG_Bgsp().GetRoomId(mGndChk);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.room_no = dComIfG_Bgsp().GetRoomId(mGndChk);
}
/* 80BA6690-80BA66D4 001090 0044+00 2/2 0/0 0/0 .text setRoomNo__16daObj_AutoMata_cFv */
+2 -2
View File
@@ -146,8 +146,8 @@ int daObj_Bed_c::isDelete() {
/* 80BADF34-80BADF90 0009B4 005C+00 2/2 0/0 0/0 .text setEnvTevColor__11daObj_Bed_cFv */
void daObj_Bed_c::setEnvTevColor() {
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.mRoomNo = dComIfG_Bgsp().GetRoomId(mGndChk);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.room_no = dComIfG_Bgsp().GetRoomId(mGndChk);
}
/* 80BADF90-80BADFD0 000A10 0040+00 2/2 0/0 0/0 .text setRoomNo__11daObj_Bed_cFv */
+1 -1
View File
@@ -32,7 +32,7 @@ int daObjBombf_c::create() {
}
fopAcM_SetMtx(this, field_0x570->getBaseTRMtx());
tevStr.mRoomNo = fopAcM_GetRoomNo(this);
tevStr.room_no = fopAcM_GetRoomNo(this);
attention_info.position = current.pos;
eyePos = attention_info.position;
field_0x574 = 0xffffffff;
+2 -2
View File
@@ -315,8 +315,8 @@ void daObj_BouMato_c::setSwayParam(fopAc_ac_c* param_1) {
/* 80BBC19C-80BBC1F8 00129C 005C+00 2/2 0/0 0/0 .text setEnvTevColor__15daObj_BouMato_cFv
*/
void daObj_BouMato_c::setEnvTevColor() {
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.mRoomNo = dComIfG_Bgsp().GetRoomId(mGndChk);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.room_no = dComIfG_Bgsp().GetRoomId(mGndChk);
}
/* 80BBC1F8-80BBC23C 0012F8 0044+00 2/2 0/0 0/0 .text setRoomNo__15daObj_BouMato_cFv */
+1 -1
View File
@@ -2579,7 +2579,7 @@ s32 daObjCarry_c::CreateInit_ironball() {
eyePos = current.pos;
fopAcM_SetRoomNo(this,getRoomNo(l_saveID));
tevStr.mRoomNo = fopAcM_GetRoomNo(this);
tevStr.room_no = fopAcM_GetRoomNo(this);
if (chkSttsFlag(l_saveID,1)) {
mDraw = 1;
+1 -1
View File
@@ -82,7 +82,7 @@ cPhs__Step daObjCdoor_c::create() {
return cPhs_ERROR_e;
}
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
tevStr.mRoomNo = dStage_roomControl_c::mStayNo;
tevStr.room_no = dStage_roomControl_c::mStayNo;
fopAcM_setCullSizeBox2(this, mpModel->getModelData());
mSw = fopAcM_GetParam(this) & 0xff;
mChainID = -1;
+1 -1
View File
@@ -310,7 +310,7 @@ int daObjCrope_c::create() {
mCcStts.SetRoomId(fopAcM_GetRoomNo(this));
mCollider.Set(l_sphSrc);
mCollider.SetStts(&mCcStts);
tevStr.mRoomNo = fopAcM_GetRoomNo(this);
tevStr.room_no = fopAcM_GetRoomNo(this);
gravity = -5.0f;
cXyz cStack_68;
cXyz cStack_74;
+1 -1
View File
@@ -36,7 +36,7 @@ int daObjDigpl_c::create() {
attention_info.position = current.pos;
eyePos = attention_info.position;
tevStr.mRoomNo = dComIfGp_roomControl_getStayNo();
tevStr.room_no = dComIfGp_roomControl_getStayNo();
fopAcM_SetMin(this, -550.0f, -250.0f, -550.0f);
fopAcM_SetMax(this, 550.0f, 250.0f, 550.0f);
attention_info.distances[fopAc_attn_ETC_e] = 27;
+5 -5
View File
@@ -39,7 +39,7 @@ int daObjFchain_c::create() {
0x10) == 0) {
return cPhs_ERROR_e;
}
tevStr.mRoomNo = dComIfGp_roomControl_getStayNo();
tevStr.room_no = dComIfGp_roomControl_getStayNo();
mShape.setUserArea((u32)this);
current.pos.y += 3.0f;
s16 local_58 = shape_angle.y;
@@ -283,10 +283,10 @@ void daObjFchain_shape_c::draw() {
material->loadSharedDL();
material->getShape()->loadPreDrawSetting();
GXColor ambColor;
ambColor.r = tevStr->mColorC0.r;
ambColor.g = tevStr->mColorC0.g;
ambColor.b = tevStr->mColorC0.b;
ambColor.a = tevStr->mColorC0.a;
ambColor.r = tevStr->AmbCol.r;
ambColor.g = tevStr->AmbCol.g;
ambColor.b = tevStr->AmbCol.b;
ambColor.a = tevStr->AmbCol.a;
GXSetChanAmbColor(GX_COLOR0A0, ambColor);
GXSetChanMatColor(GX_COLOR0A0, g_whiteColor);
dKy_setLight_again();
+2 -2
View File
@@ -93,8 +93,8 @@ void daObjGraRock_c::bombParticleSet() {
/* 80C11730-80C1178C 0006B0 005C+00 1/1 0/0 0/0 .text setEnvTevColor__14daObjGraRock_cFv
*/
void daObjGraRock_c::setEnvTevColor() {
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.mRoomNo = dComIfG_Bgsp().GetRoomId(mGndChk);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.room_no = dComIfG_Bgsp().GetRoomId(mGndChk);
}
/* 80C1178C-80C117D0 00070C 0044+00 1/1 0/0 0/0 .text setRoomNo__14daObjGraRock_cFv */
+2 -2
View File
@@ -118,8 +118,8 @@ int daGraveStone_c::setPrtcl() {
/* 80C12A38-80C12A94 0004B8 005C+00 2/2 0/0 0/0 .text setEnvTevColor__14daGraveStone_cFv
*/
void daGraveStone_c::setEnvTevColor() {
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.mRoomNo = dComIfG_Bgsp().GetRoomId(mGndChk);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.room_no = dComIfG_Bgsp().GetRoomId(mGndChk);
}
/* 80C12A94-80C12AD8 000514 0044+00 2/2 0/0 0/0 .text setRoomNo__14daGraveStone_cFv */
+2 -2
View File
@@ -1180,8 +1180,8 @@ int daObjMovebox::Act_c::Execute(Mtx** param_0) {
mBgc.proc_vertical(this);
if (mBgc.field_0x5c >= 0) {
tevStr.mRoomNo = current.roomNo;
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mBgc.M_gnd_work[mBgc.field_0x5c]);
tevStr.room_no = current.roomNo;
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mBgc.M_gnd_work[mBgc.field_0x5c]);
}
if (field_0x8fc > 0) {
+2 -2
View File
@@ -240,8 +240,8 @@ void daObj_Oiltubo_c::setParam() {
/* 80CA7318-80CA7374 000C78 005C+00 2/2 0/0 0/0 .text setEnvTevColor__15daObj_Oiltubo_cFv
*/
void daObj_Oiltubo_c::setEnvTevColor() {
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mGroundChk);
tevStr.mRoomNo = dComIfG_Bgsp().GetRoomId(mGroundChk);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mGroundChk);
tevStr.room_no = dComIfG_Bgsp().GetRoomId(mGroundChk);
}
/* 80CA7374-80CA73B8 000CD4 0044+00 2/2 0/0 0/0 .text setRoomNo__15daObj_Oiltubo_cFv */
+2 -2
View File
@@ -122,8 +122,8 @@ int daObj_Pleaf_c::isDelete() {
/* 80CB15E8-80CB1644 000988 005C+00 2/2 0/0 0/0 .text setEnvTevColor__13daObj_Pleaf_cFv
*/
void daObj_Pleaf_c::setEnvTevColor() {
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.mRoomNo = dComIfG_Bgsp().GetRoomId(mGndChk);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.room_no = dComIfG_Bgsp().GetRoomId(mGndChk);
}
/* 80CB1644-80CB1684 0009E4 0040+00 2/2 0/0 0/0 .text setRoomNo__13daObj_Pleaf_cFv */
+2 -2
View File
@@ -295,8 +295,8 @@ void daObj_SSItem_c::setParam() {
/* 80CE7C24-80CE7C80 001084 005C+00 2/2 0/0 0/0 .text setEnvTevColor__14daObj_SSItem_cFv
*/
void daObj_SSItem_c::setEnvTevColor() {
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.mRoomNo = dComIfG_Bgsp().GetRoomId(mGndChk);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.room_no = dComIfG_Bgsp().GetRoomId(mGndChk);
}
/* 80CE7C80-80CE7CC4 0010E0 0044+00 2/2 0/0 0/0 .text setRoomNo__14daObj_SSItem_cFv */
+1 -1
View File
@@ -77,7 +77,7 @@ int daObjTMoon_c::execute() {
/* 80D12EB4-80D12EDC 000394 0028+00 1/1 0/0 0/0 .text draw__12daObjTMoon_cFv */
int daObjTMoon_c::draw() {
g_env_light.mMoonPos = current.pos;
g_env_light.moon_pos = current.pos;
return 1;
}
+1 -1
View File
@@ -206,7 +206,7 @@ int daObjTrnd_c::draw() {
/* 80D1C298-80D1C2CC 000978 0034+00 1/1 0/0 0/0 .text _delete__11daObjTrnd_cFv */
int daObjTrnd_c::_delete() {
dKy_getEnvlight()->mEvtWindSet = 0;
dKy_getEnvlight()->evt_wind_go = 0;
cutPntWind();
return 1;
}
+1 -1
View File
@@ -390,7 +390,7 @@ int daObjTrnd2_c::draw() {
/* 80D1D2E8-80D1D330 000E88 0048+00 1/1 0/0 0/0 .text _delete__12daObjTrnd2_cFv */
int daObjTrnd2_c::_delete() {
dKy_getEnvlight()->mEvtWindSet = 0;
dKy_getEnvlight()->evt_wind_go = 0;
cutPntWind();
endParticle();
return 1;
+5 -5
View File
@@ -44,7 +44,7 @@ cPhs__Step daObjWchain_c::create() {
if (!fopAcM_entrySolidHeap(this, daObjWchain_createHeap, 0x820)) {
return cPhs_ERROR_e;
}
tevStr.mRoomNo = dStage_roomControl_c::mStayNo;
tevStr.room_no = dStage_roomControl_c::mStayNo;
attention_info.position = current.pos;
eyePos = attention_info.position;
attention_info.distances[fopAc_attn_LOCK_e] = 0x1c;
@@ -317,10 +317,10 @@ void daObjWchain_shape_c::draw() {
material->loadSharedDL();
material->getShape()->loadPreDrawSetting();
GXColor amb_color;
amb_color.r = tevstr.mColorC0.r;
amb_color.g = tevstr.mColorC0.g;
amb_color.b = tevstr.mColorC0.b;
amb_color.a = tevstr.mColorC0.a;
amb_color.r = tevstr.AmbCol.r;
amb_color.g = tevstr.AmbCol.g;
amb_color.b = tevstr.AmbCol.b;
amb_color.a = tevstr.AmbCol.a;
GXSetChanAmbColor(GX_COLOR0A0, amb_color);
GXSetChanMatColor(GX_COLOR0A0, g_whiteColor);
dKy_setLight_again();
+1 -1
View File
@@ -57,7 +57,7 @@ int daObjWindow_c::Create() {
mCyl.Set(l_cyl_src);
mCyl.SetStts(&mStts);
}
tevStr.mLightInf = getLightInf();
tevStr.mLightInf.r = getLightInf();
return 1;
}
+2 -2
View File
@@ -383,8 +383,8 @@ int daObj_YBag_c::isDelete() {
/* 80D3D468-80D3D4C4 001468 005C+00 2/2 0/0 0/0 .text setEnvTevColor__12daObj_YBag_cFv */
void daObj_YBag_c::setEnvTevColor() {
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.mRoomNo = dComIfG_Bgsp().GetRoomId(mGndChk);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.room_no = dComIfG_Bgsp().GetRoomId(mGndChk);
}
/* 80D3D4C4-80D3D508 0014C4 0044+00 2/2 0/0 0/0 .text setRoomNo__12daObj_YBag_cFv */
+2 -2
View File
@@ -31,8 +31,8 @@ void daObjZraRock_c::setBaseMtx() {
/* 80D44DCC-80D44E28 00018C 005C+00 1/1 0/0 0/0 .text setEnvTevColor__14daObjZraRock_cFv
*/
void daObjZraRock_c::setEnvTevColor() {
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.mRoomNo = dComIfG_Bgsp().GetRoomId(mGndChk);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.room_no = dComIfG_Bgsp().GetRoomId(mGndChk);
}
/* 80D44E28-80D44E68 0001E8 0040+00 1/1 0/0 0/0 .text setRoomNo__14daObjZraRock_cFv */
+2 -2
View File
@@ -462,12 +462,12 @@ void daSpinner_c::setRoomInfo() {
int roomNo;
if (mAcch.GetGroundH() != -1000000000.0f) {
roomNo = dComIfG_Bgsp().GetRoomId(mAcch.m_gnd);
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mAcch.m_gnd);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mAcch.m_gnd);
} else {
roomNo = dComIfGp_roomControl_getStayNo();
}
tevStr.mRoomNo = roomNo;
tevStr.room_no = roomNo;
field_0xa6e = dComIfGp_getReverb(roomNo);
mStts.SetRoomId(roomNo);
fopAcM_SetRoomNo(this, roomNo);
+1 -1
View File
@@ -44,7 +44,7 @@ int daTagHjump_c::create() {
if (phase == cPhs_COMPLEATE_e) {
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
tevStr.mRoomNo = fopAcM_GetRoomNo(this);
tevStr.room_no = fopAcM_GetRoomNo(this);
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
mDoMtx_stack_c::YrotM(shape_angle.y);
+3 -3
View File
@@ -48,13 +48,13 @@ int daTag_Lantern_c::Execute() {
s32 room_no;
if (mGroundCross != -1000000000.0f) {
room_no = dComIfG_Bgsp().GetRoomId(mGndChk);
tevStr.mEnvrIdxOverride = dComIfG_Bgsp().GetPolyColor(mGndChk);
tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mGndChk);
} else {
room_no = dComIfGp_roomControl_getStayNo();
}
tevStr.mRoomNo = room_no;
fopAcM_SetRoomNo(this, tevStr.mRoomNo);
tevStr.room_no = room_no;
fopAcM_SetRoomNo(this, tevStr.room_no);
attention_info.flags = 0;
attention_info.position = current.pos;
eyePos = attention_info.position;
+15 -15
View File
@@ -17,7 +17,7 @@ static int daVrbox_Draw(vrbox_class* i_this) {
daVrbox_color_set(i_this);
if (g_env_light.mVrboxInvisible) {
if (g_env_light.hide_vrbox) {
return 1;
}
@@ -64,16 +64,16 @@ 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.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)
if ((g_env_light.vrbox_kasumi_outer_col.r + g_env_light.vrbox_kasumi_outer_col.g +
g_env_light.vrbox_kasumi_outer_col.b + g_env_light.vrbox_sky_col.r + g_env_light.vrbox_sky_col.g +
g_env_light.vrbox_sky_col.b + g_env_light.vrbox_kumo_top_col.r + g_env_light.vrbox_kumo_top_col.g +
g_env_light.vrbox_kumo_top_col.b) == 0)
{
g_env_light.mVrboxInvisible = true;
g_env_light.hide_vrbox = true;
return 1;
}
g_env_light.mVrboxInvisible = false;
g_env_light.hide_vrbox = false;
J3DModelData* modelData = i_this->mpSoraModel->getModelData();
J3DGXColorS10 color;
@@ -83,9 +83,9 @@ static int daVrbox_color_set(vrbox_class* i_this) {
material_0->setCullMode(0);
material_0->change();
color.r = g_env_light.mVrSkyCol.r;
color.g = g_env_light.mVrSkyCol.g;
color.b = g_env_light.mVrSkyCol.b;
color.r = g_env_light.vrbox_sky_col.r;
color.g = g_env_light.vrbox_sky_col.g;
color.b = g_env_light.vrbox_sky_col.b;
color.a = 255;
material_0->setTevColor(0, &color);
}
@@ -95,10 +95,10 @@ static int daVrbox_color_set(vrbox_class* i_this) {
material_1->setCullMode(0);
material_1->change();
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;
color.r = g_env_light.vrbox_kasumi_inner_col.r;
color.g = g_env_light.vrbox_kasumi_inner_col.g;
color.b = g_env_light.vrbox_kasumi_inner_col.b;
color.a = g_env_light.vrbox_kasumi_inner_col.a;
material_1->setTevColor(0, &color);
}
@@ -142,7 +142,7 @@ static int daVrbox_Create(fopAc_ac_c* i_this) {
if (fopAcM_entrySolidHeap(this_, daVrbox_solidHeapCB, 0xC60)) {
dComIfGp_onStatus(1);
g_env_light.mVrboxInvisible = false;
g_env_light.hide_vrbox = false;
} else {
phase = cPhs_ERROR_e;
}
+34 -34
View File
@@ -240,10 +240,10 @@ static int daVrbox2_Draw(vrbox2_class* i_this) {
fogInfo_p->mType = 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)
if ((g_env_light.vrbox_kasumi_outer_col.r + g_env_light.vrbox_kasumi_outer_col.g +
g_env_light.vrbox_kasumi_outer_col.b + g_env_light.vrbox_sky_col.r + g_env_light.vrbox_sky_col.g +
g_env_light.vrbox_sky_col.b + g_env_light.vrbox_kumo_top_col.r + g_env_light.vrbox_kumo_top_col.g +
g_env_light.vrbox_kumo_top_col.b) == 0)
{
return 1;
}
@@ -283,7 +283,7 @@ static int daVrbox2_Draw(vrbox2_class* i_this) {
sp14 = sun_p->mPos[0];
if (strcmp(dComIfGp_getStartStageName(), "F_SP102") == 0) {
dKyr_get_vectle_calc(&camera_p->lookat.eye, &g_env_light.mSunPos, &sp8);
dKyr_get_vectle_calc(&camera_p->lookat.eye, &g_env_light.sun_pos, &sp8);
sp14.x = camera_p->lookat.eye.x + (8000.0f * sp8.x);
sp14.y = camera_p->lookat.eye.y + (8000.0f * sp8.y);
sp14.z = camera_p->lookat.eye.z + (8000.0f * sp8.z);
@@ -296,7 +296,7 @@ static int daVrbox2_Draw(vrbox2_class* i_this) {
mDoMtx_stack_c::XrotM(0x7FFF - temp_r19);
f32 scale;
if (g_env_light.mDaytime < 255.0f) {
if (g_env_light.daytime < 255.0f) {
f32 temp_f4 = 1.0f - lenz_p->mDistFalloff;
scale = 1.0f;
@@ -305,8 +305,8 @@ static int daVrbox2_Draw(vrbox2_class* i_this) {
}
} else {
f32 var_f1;
if (g_env_light.mDaytime < 270.0f) {
var_f1 = dKy_get_parcent(270.0f, 240.0f, g_env_light.mDaytime);
if (g_env_light.daytime < 270.0f) {
var_f1 = dKy_get_parcent(270.0f, 240.0f, g_env_light.daytime);
} else {
var_f1 = 1.0f;
}
@@ -420,10 +420,10 @@ SECTION_DEAD static char const* const stringBase_80499AD4 = "R_SP30";
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)
if ((g_env_light.vrbox_kasumi_outer_col.r + g_env_light.vrbox_kasumi_outer_col.g +
g_env_light.vrbox_kasumi_outer_col.b + g_env_light.vrbox_sky_col.r + g_env_light.vrbox_sky_col.g +
g_env_light.vrbox_sky_col.b + g_env_light.vrbox_kumo_top_col.r + g_env_light.vrbox_kumo_top_col.g +
g_env_light.vrbox_kumo_top_col.b) == 0)
{
return 1;
}
@@ -500,16 +500,16 @@ static int daVrbox2_color_set(vrbox2_class* i_this) {
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;
k_color.r = g_env_light.vrbox_kumo_bottom_col.r;
k_color.g = g_env_light.vrbox_kumo_bottom_col.g;
k_color.b = g_env_light.vrbox_kumo_bottom_col.b;
k_color.a = g_env_light.vrbox_kumo_top_col.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;
color.r = g_env_light.vrbox_kumo_shadow_col.r;
color.g = g_env_light.vrbox_kumo_shadow_col.g;
color.b = g_env_light.vrbox_kumo_shadow_col.b;
color.a = (u8)g_env_light.vrbox_kumo_top_col.a;
kumo_material0->setTevColor(0, &color);
}
@@ -518,16 +518,16 @@ static int daVrbox2_color_set(vrbox2_class* i_this) {
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;
k_color.r = g_env_light.vrbox_kumo_bottom_col.r;
k_color.g = g_env_light.vrbox_kumo_bottom_col.g;
k_color.b = g_env_light.vrbox_kumo_bottom_col.b;
k_color.a = g_env_light.vrbox_kumo_top_col.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;
color.r = g_env_light.vrbox_kumo_shadow_col.r;
color.g = g_env_light.vrbox_kumo_shadow_col.g;
color.b = g_env_light.vrbox_kumo_shadow_col.b;
color.a = g_env_light.vrbox_kumo_top_col.a;
kumo_material1->setTevColor(0, &color);
}
@@ -537,10 +537,10 @@ static int daVrbox2_color_set(vrbox2_class* i_this) {
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;
color.r = g_env_light.vrbox_kasumi_outer_col.r;
color.g = g_env_light.vrbox_kasumi_outer_col.g;
color.b = g_env_light.vrbox_kasumi_outer_col.b;
color.a = g_env_light.vrbox_kasumi_outer_col.a;
kasumim_material0->setTevColor(0, &color);
}
@@ -563,7 +563,7 @@ static int daVrbox2_color_set(vrbox2_class* i_this) {
k_color.a = sun_p->field_0x74.a;
if (i == 1) {
if (g_env_light.mDaytime > 255.0f || g_env_light.mDaytime < 97.5f) {
if (g_env_light.daytime > 255.0f || g_env_light.daytime < 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);
@@ -599,7 +599,7 @@ static int daVrbox2_color_set(vrbox2_class* param_0) {
/* 804997E8-8049982C 000DE8 0044+00 1/0 0/0 0/0 .text daVrbox2_Execute__FP12vrbox2_class
*/
static int daVrbox2_Execute(vrbox2_class* i_this) {
if (g_env_light.mDaytime > FLOAT_LABEL(lit_3837)) {
if (g_env_light.daytime > FLOAT_LABEL(lit_3837)) {
i_this->mSunBtk.play();
}
+2 -2
View File
@@ -270,7 +270,7 @@ void dGrass_packet_c::update() {
mtx[1][3] = data_p->m_pos.y;
mtx[2][3] = data_p->m_pos.z;
if (g_env_light.mInitAnmTimer == 1) {
if (g_env_light.light_init_timer == 1) {
mAngleZ[i] = 0;
}
@@ -456,4 +456,4 @@ dGrass_data_c::~dGrass_data_c() {}
/* 8052097C-80520988 004D1C 000C+00 1/1 0/0 0/0 .text __ct__13dGrass_data_cFv */
dGrass_data_c::dGrass_data_c() {
m_state = 0;
}
}