mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-12 21:45:19 -04:00
Time Stones now with Song of Time
This commit is contained in:
@@ -3868,35 +3868,18 @@ void daAlink_c::setWolfHowlNotHappen(int param_0) {
|
||||
}
|
||||
|
||||
int daAlink_c::procWolfHowlDemoInit() {
|
||||
#if TARGET_PC
|
||||
s16 name;
|
||||
if (field_0x27f4 != NULL) {
|
||||
name = fopAcM_GetName(field_0x27f4);
|
||||
} else {
|
||||
name = fpcNm_ALINK_e;
|
||||
}
|
||||
|
||||
if (name == fpcNm_Obj_WindStone_e && !static_cast<daWindStone_c*>(field_0x27f4)->chkEveOccur() && dusk::getSettings().game.timeStones) {
|
||||
Z2GetSeMgr()->seStart(Z2SE_READ_RIDDLE_B, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
dKy_instant_timechg(0.0f);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!dComIfGp_event_compulsory(this, NULL, 0xFFFF)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
mDemo.setSpecialDemoType();
|
||||
|
||||
#if !TARGET_PC
|
||||
s16 name;
|
||||
if (field_0x27f4 != NULL) {
|
||||
name = fopAcM_GetName(field_0x27f4);
|
||||
} else {
|
||||
name = fpcNm_ALINK_e;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (name == fpcNm_Tag_WaraHowl_e) {
|
||||
shape_angle.y = field_0x27f4->shape_angle.y;
|
||||
@@ -3959,7 +3942,15 @@ int daAlink_c::procWolfHowlDemoInit() {
|
||||
} else if (name == fpcNm_TAG_HOWL_e) {
|
||||
mZ2WolfHowlMgr.setCorrectCurve(static_cast<daTag_Howl_c*>(field_0x27f4)->getCurveID());
|
||||
} else if (name == fpcNm_Obj_WindStone_e) {
|
||||
#if TARGET_PC
|
||||
if (!static_cast<daWindStone_c*>(field_0x27f4)->chkEveOccur() && dusk::getSettings().game.timeStones) {
|
||||
mZ2WolfHowlMgr.setCorrectCurve(9);
|
||||
} else {
|
||||
mZ2WolfHowlMgr.setCorrectCurve(static_cast<daWindStone_c*>(field_0x27f4)->getTuneId());
|
||||
}
|
||||
#else
|
||||
mZ2WolfHowlMgr.setCorrectCurve(static_cast<daWindStone_c*>(field_0x27f4)->getTuneId());
|
||||
#endif
|
||||
mProcVar0.field_0x3008 = static_cast<daWindStone_c*>(field_0x27f4)->getNextSceneId();
|
||||
mProcVar4.field_0x3010 = 1;
|
||||
} else if (name == fpcNm_Obj_SmWStone_e) {
|
||||
@@ -4109,6 +4100,14 @@ int daAlink_c::procWolfHowlDemo() {
|
||||
if (checkUnderMove0BckNoArcWolf(WANM_HOWL_END) || isSkipEdge) {
|
||||
if (checkAnmEnd(frameCtrl_p) || isSkipEdge) {
|
||||
if (mProcVar0.mHowlExitID >= 0) {
|
||||
#if TARGET_PC
|
||||
if (daAlink_getAlinkActorClass()->getCorrectCurveID() == 9) {
|
||||
g_env_light.time_change_rate = 1.0f;
|
||||
dComIfGp_event_reset();
|
||||
dCam_getBody()->EndEventCamera(fopAcM_GetID(this));
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
dStage_changeScene(mProcVar0.mHowlExitID, 0.0f, 0, fopAcM_GetRoomNo(this),
|
||||
shape_angle.y, -1);
|
||||
} else {
|
||||
|
||||
@@ -1540,8 +1540,21 @@ void dScnKy_env_light_c::setDaytime() {
|
||||
}
|
||||
|
||||
if (dComIfGp_roomControl_getTimePass() && !field_0x130a && temp_r29) {
|
||||
#if TARGET_PC
|
||||
f32 prev = daytime;
|
||||
#endif
|
||||
|
||||
daytime += time_change_rate;
|
||||
|
||||
#if TARGET_PC
|
||||
if (time_change_rate == 1.0f &&
|
||||
(std::fmod(daytime - 90.0f + 360.0f, 360.0f) < std::fmod(prev - 90.0f + 360.0f, 360.0f) ||
|
||||
std::fmod(daytime - 285.0f + 360.0f, 360.0f) < std::fmod(prev - 285.0f + 360.0f, 360.0f)))
|
||||
{
|
||||
g_env_light.time_change_rate = 0.012f;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Stage is Fishing Pond or Hena's Hut
|
||||
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127") ||
|
||||
!strcmp(dComIfGp_getStartStageName(), "R_SP127"))
|
||||
|
||||
Reference in New Issue
Block a user