mirror of https://github.com/zeldaret/mm.git
Name the weekeventreg that corresponds with the Clock Tower opening (#1303)
* Name the weekeventreg that corresponds with the Clock Tower opening * Explanatory comment * Drop IS * Try to clean up the comment
This commit is contained in:
parent
96a1d37084
commit
11dac8d020
|
@ -603,8 +603,15 @@ typedef enum {
|
||||||
#define WEEKEVENTREG_08_10 PACK_WEEKEVENTREG_FLAG(8, 0x10)
|
#define WEEKEVENTREG_08_10 PACK_WEEKEVENTREG_FLAG(8, 0x10)
|
||||||
#define WEEKEVENTREG_RECEIVED_DOGGY_RACETRACK_HEART_PIECE PACK_WEEKEVENTREG_FLAG(8, 0x20)
|
#define WEEKEVENTREG_RECEIVED_DOGGY_RACETRACK_HEART_PIECE PACK_WEEKEVENTREG_FLAG(8, 0x20)
|
||||||
|
|
||||||
// Related to final hours
|
// This is set under three circumstances:
|
||||||
#define WEEKEVENTREG_08_40 PACK_WEEKEVENTREG_FLAG(8, 0x40)
|
// 1. The player watches the cutscene of the Clock Tower opening.
|
||||||
|
// 2. The player sees the Clock Tower opening outside of a cutscene. After the first cycle, this
|
||||||
|
// can be seen in Termina Field or in North, East, or West Clock Town.
|
||||||
|
// 3. The player enters Termina Field or North, South, East, or West Clock Town any time after
|
||||||
|
// midnight on the Final Day.
|
||||||
|
// Thus, it is possible for the player to be in the final six hours and still have this unset; all
|
||||||
|
// the player needs to do is avoid certain areas.
|
||||||
|
#define WEEKEVENTREG_CLOCK_TOWER_OPENED PACK_WEEKEVENTREG_FLAG(8, 0x40)
|
||||||
|
|
||||||
#define WEEKEVENTREG_08_80 PACK_WEEKEVENTREG_FLAG(8, 0x80)
|
#define WEEKEVENTREG_08_80 PACK_WEEKEVENTREG_FLAG(8, 0x80)
|
||||||
#define WEEKEVENTREG_09_01 PACK_WEEKEVENTREG_FLAG(9, 0x01)
|
#define WEEKEVENTREG_09_01 PACK_WEEKEVENTREG_FLAG(9, 0x01)
|
||||||
|
|
|
@ -26,7 +26,7 @@ u16 QuestHint_GetTatlTextId(PlayState* play) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_79_10)) {
|
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_79_10)) {
|
||||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_08_40)) {
|
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLOCK_TOWER_OPENED)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1173,7 +1173,7 @@ void DmStk_StartTelescopeCutscene(DmStk* this, PlayState* play) {
|
||||||
|
|
||||||
if (gSaveContext.save.day < 3) {
|
if (gSaveContext.save.day < 3) {
|
||||||
csId = dayOneAndTwoCsId;
|
csId = dayOneAndTwoCsId;
|
||||||
} else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_08_40) ||
|
} else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLOCK_TOWER_OPENED) ||
|
||||||
((CURRENT_DAY == 3) && (gSaveContext.save.time < CLOCK_TIME(6, 0)))) {
|
((CURRENT_DAY == 3) && (gSaveContext.save.time < CLOCK_TIME(6, 0)))) {
|
||||||
csId = finalHoursCsId;
|
csId = finalHoursCsId;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -183,7 +183,7 @@ void ElfMsg6_Init(Actor* thisx, PlayState* play) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_08_40)) {
|
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLOCK_TOWER_OPENED)) {
|
||||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_88_20)) {
|
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_88_20)) {
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
return;
|
return;
|
||||||
|
@ -276,7 +276,7 @@ void func_80BA1CF8(ElfMsg6* this, PlayState* play) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((this->actor.textId == 0x224) && CHECK_WEEKEVENTREG(WEEKEVENTREG_08_40)) {
|
if ((this->actor.textId == 0x224) && CHECK_WEEKEVENTREG(WEEKEVENTREG_CLOCK_TOWER_OPENED)) {
|
||||||
this->actor.textId = 0x25B;
|
this->actor.textId = 0x25B;
|
||||||
} else if (func_80BA1C00(this) && (player->actor.speed > 1.0f)) {
|
} else if (func_80BA1C00(this) && (player->actor.speed > 1.0f)) {
|
||||||
player->tatlTextId = -this->actor.textId;
|
player->tatlTextId = -this->actor.textId;
|
||||||
|
|
|
@ -56,7 +56,7 @@ void EnTimeTag_Init(Actor* thisx, PlayState* play) {
|
||||||
|
|
||||||
switch (TIMETAG_GET_TYPE(&this->actor)) {
|
switch (TIMETAG_GET_TYPE(&this->actor)) {
|
||||||
case TIMETAG_KICKOUT_FINAL_HOURS:
|
case TIMETAG_KICKOUT_FINAL_HOURS:
|
||||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_08_40) || (CURRENT_DAY != 3)) {
|
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLOCK_TOWER_OPENED) || (CURRENT_DAY != 3)) {
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,7 +128,7 @@ void ObjTokeidai_ExteriorGear_Init(ObjTokeidai* this, PlayState* play) {
|
||||||
this->actionFunc = ObjTokeidai_ExteriorGear_OpenedIdle;
|
this->actionFunc = ObjTokeidai_ExteriorGear_OpenedIdle;
|
||||||
this->actor.world.pos.y += this->actor.scale.y * 1900.0f;
|
this->actor.world.pos.y += this->actor.scale.y * 1900.0f;
|
||||||
this->actor.shape.yOffset = 1500.0f;
|
this->actor.shape.yOffset = 1500.0f;
|
||||||
SET_WEEKEVENTREG(WEEKEVENTREG_08_40);
|
SET_WEEKEVENTREG(WEEKEVENTREG_CLOCK_TOWER_OPENED);
|
||||||
} else {
|
} else {
|
||||||
this->actionFunc = ObjTokeidai_ExteriorGear_Idle;
|
this->actionFunc = ObjTokeidai_ExteriorGear_Idle;
|
||||||
}
|
}
|
||||||
|
@ -444,7 +444,7 @@ void ObjTokeidai_TerminaFieldWalls_Idle(ObjTokeidai* this, PlayState* play) {
|
||||||
void ObjTokeidai_TowerOpening_EndCutscene(ObjTokeidai* this, PlayState* play) {
|
void ObjTokeidai_TowerOpening_EndCutscene(ObjTokeidai* this, PlayState* play) {
|
||||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_132) &&
|
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_132) &&
|
||||||
(play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_132)]->id == 5)) {
|
(play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_132)]->id == 5)) {
|
||||||
SET_WEEKEVENTREG(WEEKEVENTREG_08_40);
|
SET_WEEKEVENTREG(WEEKEVENTREG_CLOCK_TOWER_OPENED);
|
||||||
if (((play->sceneId == SCENE_CLOCKTOWER) && (gSaveContext.sceneLayer == 2) && (play->csCtx.scriptIndex == 0)) ||
|
if (((play->sceneId == SCENE_CLOCKTOWER) && (gSaveContext.sceneLayer == 2) && (play->csCtx.scriptIndex == 0)) ||
|
||||||
((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneLayer == 2) && (play->csCtx.scriptIndex == 0))) {
|
((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneLayer == 2) && (play->csCtx.scriptIndex == 0))) {
|
||||||
Audio_SetCutsceneFlag(false);
|
Audio_SetCutsceneFlag(false);
|
||||||
|
@ -593,7 +593,7 @@ void ObjTokeidai_TowerOpening_RaiseTower(ObjTokeidai* this, PlayState* play) {
|
||||||
void ObjTokeidai_TowerOpening_Start(ObjTokeidai* this, PlayState* play) {
|
void ObjTokeidai_TowerOpening_Start(ObjTokeidai* this, PlayState* play) {
|
||||||
if ((Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_132) &&
|
if ((Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_132) &&
|
||||||
(play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_132)]->id == 4)) ||
|
(play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_132)]->id == 4)) ||
|
||||||
CHECK_WEEKEVENTREG(WEEKEVENTREG_08_40)) {
|
CHECK_WEEKEVENTREG(WEEKEVENTREG_CLOCK_TOWER_OPENED)) {
|
||||||
this->actionFunc = ObjTokeidai_TowerOpening_RaiseTower;
|
this->actionFunc = ObjTokeidai_TowerOpening_RaiseTower;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -616,7 +616,7 @@ void ObjTokeidai_DoNothing(ObjTokeidai* this, PlayState* play) {
|
||||||
|
|
||||||
void ObjTokeidai_StaircaseToRooftop_Idle(ObjTokeidai* this, PlayState* play) {
|
void ObjTokeidai_StaircaseToRooftop_Idle(ObjTokeidai* this, PlayState* play) {
|
||||||
if ((((CURRENT_DAY == 3) && (gSaveContext.save.time < CLOCK_TIME(6, 0))) || (CURRENT_DAY >= 4)) ||
|
if ((((CURRENT_DAY == 3) && (gSaveContext.save.time < CLOCK_TIME(6, 0))) || (CURRENT_DAY >= 4)) ||
|
||||||
CHECK_WEEKEVENTREG(WEEKEVENTREG_08_40)) {
|
CHECK_WEEKEVENTREG(WEEKEVENTREG_CLOCK_TOWER_OPENED)) {
|
||||||
this->actor.draw = ObjTokeidai_Draw;
|
this->actor.draw = ObjTokeidai_Draw;
|
||||||
} else {
|
} else {
|
||||||
this->actor.draw = NULL;
|
this->actor.draw = NULL;
|
||||||
|
@ -691,7 +691,7 @@ void ObjTokeidai_TowerClock_Idle(ObjTokeidai* this, PlayState* play) {
|
||||||
if ((CURRENT_DAY == 3) && (this->clockHour < 6) && (gSaveContext.save.time < CLOCK_TIME(6, 0))) {
|
if ((CURRENT_DAY == 3) && (this->clockHour < 6) && (gSaveContext.save.time < CLOCK_TIME(6, 0))) {
|
||||||
this->actor.draw = ObjTokeidai_Clock_Draw;
|
this->actor.draw = ObjTokeidai_Clock_Draw;
|
||||||
ObjTokeidai_SetupTowerOpening(this);
|
ObjTokeidai_SetupTowerOpening(this);
|
||||||
SET_WEEKEVENTREG(WEEKEVENTREG_08_40);
|
SET_WEEKEVENTREG(WEEKEVENTREG_CLOCK_TOWER_OPENED);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ weekEventReg = {
|
||||||
( 8 << 8) | 0x08: "WEEKEVENTREG_08_08",
|
( 8 << 8) | 0x08: "WEEKEVENTREG_08_08",
|
||||||
( 8 << 8) | 0x10: "WEEKEVENTREG_08_10",
|
( 8 << 8) | 0x10: "WEEKEVENTREG_08_10",
|
||||||
( 8 << 8) | 0x20: "WEEKEVENTREG_RECEIVED_DOGGY_RACETRACK_HEART_PIECE",
|
( 8 << 8) | 0x20: "WEEKEVENTREG_RECEIVED_DOGGY_RACETRACK_HEART_PIECE",
|
||||||
( 8 << 8) | 0x40: "WEEKEVENTREG_08_40",
|
( 8 << 8) | 0x40: "WEEKEVENTREG_CLOCK_TOWER_OPENED",
|
||||||
( 8 << 8) | 0x80: "WEEKEVENTREG_08_80",
|
( 8 << 8) | 0x80: "WEEKEVENTREG_08_80",
|
||||||
( 9 << 8) | 0x01: "WEEKEVENTREG_09_01",
|
( 9 << 8) | 0x01: "WEEKEVENTREG_09_01",
|
||||||
( 9 << 8) | 0x02: "WEEKEVENTREG_09_02",
|
( 9 << 8) | 0x02: "WEEKEVENTREG_09_02",
|
||||||
|
|
Loading…
Reference in New Issue