Merge remote-tracking branch 'origin/develop' into merge-macready-805

This commit is contained in:
Adam Bird
2024-02-28 23:49:06 -05:00
474 changed files with 19391 additions and 10366 deletions

View File

@@ -48,7 +48,7 @@ void func_800432A0(CollisionContext* colCtx, s32 bgId, Actor* actor) {
s16 rot = colCtx->dyna.bgActors[bgId].curTransform.rot.y - colCtx->dyna.bgActors[bgId].prevTransform.rot.y;
if (actor->id == ACTOR_PLAYER) {
((Player*)actor)->currentYaw += rot;
((Player*)actor)->yaw += rot;
}
actor->shape.rot.y += rot;

View File

@@ -2065,16 +2065,40 @@ void func_800EE404(void) {
void Audio_OcaMemoryGameStart(u8 minigameRound) {
u8 i;
// #region SOH [Enhancement]
if (CVarGetInteger("gCustomizeOcarinaGame", 0)) {
u8 startingNotes = 3;
u8 roundOneCount = CVarGetInteger("gOcarinaGameRoundOneNotes", 5);
u8 roundTwoCount = CVarGetInteger("gOcarinaGameRoundTwoNotes", 6);
u8 roundThreeCount = CVarGetInteger("gOcarinaGameRoundThreeNotes", 8);
u8 modMinigameNoteCnts[] = { roundOneCount, roundTwoCount, roundThreeCount };
if (minigameRound > 2) {
minigameRound = 2;
}
sOcaMinigameAppendPos = 0;
sOcaMinigameEndPos = sOcaMinigameNoteCnts[minigameRound];
startingNotes = CVarGetInteger("gOcarinaGameStartingNotes", 3);
for (i = 0; i < 3; i++) {
Audio_OcaMemoryGameGenNote();
if (minigameRound > 2) {
minigameRound = 2;
}
sOcaMinigameAppendPos = 0;
sOcaMinigameEndPos = modMinigameNoteCnts[minigameRound];
for (i = 0; i < startingNotes; i++) {
Audio_OcaMemoryGameGenNote();
}
// #endregion
} else {
if (minigameRound > 2) {
minigameRound = 2;
}
sOcaMinigameAppendPos = 0;
sOcaMinigameEndPos = sOcaMinigameNoteCnts[minigameRound];
for (i = 0; i < 3; i++) {
Audio_OcaMemoryGameGenNote();
}
}
}
@@ -2093,11 +2117,24 @@ s32 Audio_OcaMemoryGameGenNote(void) {
rndNote = sOcarinaNoteValues[(rnd + 1) % 5];
}
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].noteIdx = rndNote;
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].unk_02 = 0x2D;
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].volume = 0x50;
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].vibrato = 0;
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].tone = 0;
// #region SOH [Enhancement]
if (CVarGetInteger("gCustomizeOcarinaGame", 0)) {
int noteSpeed = 0x2D;
noteSpeed = noteSpeed / CVarGetInteger("gOcarinaGameNoteSpeed", 1);
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].noteIdx = rndNote;
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].unk_02 = noteSpeed;
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].volume = 0x50;
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].vibrato = 0;
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].tone = 0;
// #endregion
} else {
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].noteIdx = rndNote;
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].unk_02 = 0x2D;
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].volume = 0x50;
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].vibrato = 0;
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].tone = 0;
}
sOcaMinigameAppendPos++;
@@ -4735,7 +4772,7 @@ void Audio_SetSequenceMode(u8 seqMode) {
seqMode = SEQ_MODE_IGNORE;
}
seqId = D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254;
seqId = gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId;
if (seqId == NA_BGM_FIELD_LOGIC && func_800FA0B4(SEQ_PLAYER_BGM_SUB) == (NA_BGM_ENEMY | 0x800)) {
seqMode = SEQ_MODE_IGNORE;
@@ -4746,10 +4783,10 @@ void Audio_SetSequenceMode(u8 seqMode) {
if (seqMode != (sPrevSeqMode & 0x7F)) {
if (seqMode == SEQ_MODE_ENEMY) {
// Start playing enemy bgm
if (D_8016E750[SEQ_PLAYER_BGM_SUB].volScales[1] - sAudioEnemyVol < 0) {
volumeFadeInTimer = -(D_8016E750[SEQ_PLAYER_BGM_SUB].volScales[1] - sAudioEnemyVol);
if (gActiveSeqs[SEQ_PLAYER_BGM_SUB].volScales[1] - sAudioEnemyVol < 0) {
volumeFadeInTimer = -(gActiveSeqs[SEQ_PLAYER_BGM_SUB].volScales[1] - sAudioEnemyVol);
} else {
volumeFadeInTimer = D_8016E750[SEQ_PLAYER_BGM_SUB].volScales[1] - sAudioEnemyVol;
volumeFadeInTimer = gActiveSeqs[SEQ_PLAYER_BGM_SUB].volScales[1] - sAudioEnemyVol;
}
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 3, sAudioEnemyVol, volumeFadeInTimer);
@@ -4812,11 +4849,11 @@ void Audio_SetBgmEnemyVolume(f32 dist) {
sAudioEnemyVol = ((350.0f - adjDist) * 127.0f) / 350.0f;
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 3, sAudioEnemyVol, 10);
if (D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 != NA_BGM_NATURE_AMBIENCE) {
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE) {
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 3, (0x7F - sAudioEnemyVol), 10);
}
}
if (D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 != NA_BGM_NATURE_AMBIENCE) {
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE) {
Audio_SplitBgmChannels(sAudioEnemyVol);
}
}
@@ -4973,7 +5010,7 @@ void Audio_SetExtraFilter(u8 filter) {
sAudioExtraFilter2 = filter;
sAudioExtraFilter = filter;
if (D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 == NA_BGM_NATURE_AMBIENCE) {
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId == NA_BGM_NATURE_AMBIENCE) {
for (i = 0; i < 16; i++) {
t = i;
// CHAN_UPD_SCRIPT_IO (seq player 0, all channels, slot 6)
@@ -5097,7 +5134,7 @@ void Audio_SetNatureAmbienceChannelIO(u8 channelIdxRange, u8 port, u8 val) {
u8 lastChannelIdx;
u8 channelIdx;
if ((D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 != NA_BGM_NATURE_AMBIENCE) && func_800FA11C(1, 0xF00000FF)) {
if ((gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE) && func_800FA11C(1, 0xF00000FF)) {
sAudioNatureFailed = true;
return;
}
@@ -5159,8 +5196,8 @@ void Audio_PlayNatureAmbienceSequence(u8 natureAmbienceId) {
u8 port;
u8 val;
if ((D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 == NA_BGM_DISABLED) ||
!(sSeqFlags[((u8)D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254) & 0xFF] & 0x80)) {
if ((gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId == NA_BGM_DISABLED) ||
!(sSeqFlags[((u8)gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId) & 0xFF] & 0x80)) {
Audio_StartNatureAmbienceSequence(sNatureAmbienceDataIO[natureAmbienceId].playerIO,
sNatureAmbienceDataIO[natureAmbienceId].channelMask);
@@ -5202,12 +5239,12 @@ void func_800F71BC(s32 arg0) {
func_800F6C34();
func_800EE930();
Audio_ResetSfxChannelState();
func_800FADF8();
Audio_ResetActiveSequences();
Audio_ResetSounds();
}
void func_800F7208(void) {
func_800FADF8();
Audio_ResetActiveSequences();
Audio_QueueCmdS32(0xF2000000, 1);
func_800F6C34();
Audio_ResetSfxChannelState();

View File

@@ -12,9 +12,9 @@ typedef struct {
#define GET_PLAYER_IDX(cmd) (cmd & 0xF000000) >> 24
Struct_8016E320 D_8016E320[4][5];
u8 D_8016E348[4];
u8 sNumSeqRequests[4];
u32 sAudioSeqCmds[0x100];
unk_D_8016E750 D_8016E750[4];
ActiveSequence gActiveSeqs[4];
u8 sSeqCmdWrPos = 0;
u8 sSeqCmdRdPos = 0;
@@ -51,33 +51,33 @@ void func_800F9280(u8 playerIdx, u8 seqId, u8 arg2, u16 fadeTimer) {
(fadeTimer * (u16)gAudioContext.audioBufferParameters.updatesPerFrame) / 4);
}
D_8016E750[playerIdx].unk_254 = seqId | (arg2 << 8);
D_8016E750[playerIdx].unk_256 = seqId | (arg2 << 8);
gActiveSeqs[playerIdx].seqId = seqId | (arg2 << 8);
gActiveSeqs[playerIdx].prevSeqId = seqId | (arg2 << 8);
if (D_8016E750[playerIdx].volCur != 1.0f) {
Audio_QueueCmdF32(0x41000000 | _SHIFTL(playerIdx, 16, 8), D_8016E750[playerIdx].volCur);
if (gActiveSeqs[playerIdx].volCur != 1.0f) {
Audio_QueueCmdF32(0x41000000 | _SHIFTL(playerIdx, 16, 8), gActiveSeqs[playerIdx].volCur);
}
D_8016E750[playerIdx].unk_28 = 0;
D_8016E750[playerIdx].unk_18 = 0;
D_8016E750[playerIdx].unk_14 = 0;
gActiveSeqs[playerIdx].tempoTimer = 0;
gActiveSeqs[playerIdx].tempoOriginal = 0;
gActiveSeqs[playerIdx].tempoCmd = 0;
for (i = 0; i < 0x10; i++) {
D_8016E750[playerIdx].unk_50[i].unk_00 = 1.0f;
D_8016E750[playerIdx].unk_50[i].unk_0C = 0;
D_8016E750[playerIdx].unk_50[i].unk_10 = 1.0f;
D_8016E750[playerIdx].unk_50[i].unk_1C = 0;
gActiveSeqs[playerIdx].channelData[i].volCur = 1.0f;
gActiveSeqs[playerIdx].channelData[i].volTimer = 0;
gActiveSeqs[playerIdx].channelData[i].freqScaleCur = 1.0f;
gActiveSeqs[playerIdx].channelData[i].freqScaleTimer = 0;
}
D_8016E750[playerIdx].unk_250 = 0;
D_8016E750[playerIdx].unk_252 = 0;
gActiveSeqs[playerIdx].freqScaleChannelFlags = 0;
gActiveSeqs[playerIdx].volChannelFlags = 0;
}
}
void func_800F9474(u8 playerIdx, u16 arg1) {
Audio_QueueCmdS32(0x83000000 | ((u8)playerIdx << 16),
(arg1 * (u16)gAudioContext.audioBufferParameters.updatesPerFrame) / 4);
D_8016E750[playerIdx].unk_254 = NA_BGM_DISABLED;
gActiveSeqs[playerIdx].seqId = NA_BGM_DISABLED;
}
typedef enum {
@@ -133,7 +133,7 @@ void Audio_ProcessSeqCmd(u32 cmd) {
seqId = cmd & 0xFF;
seqArgs = (cmd & 0xFF00) >> 8;
fadeTimer = (cmd & 0xFF0000) >> 13;
if ((D_8016E750[playerIdx].unk_260 == 0) && (seqArgs < 0x80)) {
if ((gActiveSeqs[playerIdx].isWaitingForFonts == 0) && (seqArgs < 0x80)) {
func_800F9280(playerIdx, seqId, seqArgs, fadeTimer);
}
break;
@@ -150,7 +150,7 @@ void Audio_ProcessSeqCmd(u32 cmd) {
seqArgs = (cmd & 0xFF00) >> 8;
fadeTimer = (cmd & 0xFF0000) >> 13;
new_var = seqArgs;
for (i = 0; i < D_8016E348[playerIdx]; i++) {
for (i = 0; i < sNumSeqRequests[playerIdx]; i++) {
if (D_8016E320[playerIdx][i].unk_0 == seqId) {
if (i == 0) {
func_800F9280(playerIdx, seqId, seqArgs, fadeTimer);
@@ -159,18 +159,18 @@ void Audio_ProcessSeqCmd(u32 cmd) {
}
}
found = D_8016E348[playerIdx];
for (i = 0; i < D_8016E348[playerIdx]; i++) {
found = sNumSeqRequests[playerIdx];
for (i = 0; i < sNumSeqRequests[playerIdx]; i++) {
if (D_8016E320[playerIdx][i].unk_1 <= new_var) {
found = i;
i = D_8016E348[playerIdx]; // "break;"
i = sNumSeqRequests[playerIdx]; // "break;"
}
}
if (D_8016E348[playerIdx] < 5) {
D_8016E348[playerIdx]++;
if (sNumSeqRequests[playerIdx] < 5) {
sNumSeqRequests[playerIdx]++;
}
for (i = D_8016E348[playerIdx] - 1; i != found; i--) {
for (i = sNumSeqRequests[playerIdx] - 1; i != found; i--) {
D_8016E320[playerIdx][i].unk_1 = D_8016E320[playerIdx][i - 1].unk_1;
D_8016E320[playerIdx][i].unk_0 = D_8016E320[playerIdx][i - 1].unk_0;
}
@@ -187,25 +187,25 @@ void Audio_ProcessSeqCmd(u32 cmd) {
seqId = cmd & 0xFF;
fadeTimer = (cmd & 0xFF0000) >> 13;
found = D_8016E348[playerIdx];
for (i = 0; i < D_8016E348[playerIdx]; i++) {
found = sNumSeqRequests[playerIdx];
for (i = 0; i < sNumSeqRequests[playerIdx]; i++) {
if (D_8016E320[playerIdx][i].unk_0 == seqId) {
found = i;
i = D_8016E348[playerIdx]; // "break;"
i = sNumSeqRequests[playerIdx]; // "break;"
}
}
if (found != D_8016E348[playerIdx]) {
for (i = found; i < D_8016E348[playerIdx] - 1; i++) {
if (found != sNumSeqRequests[playerIdx]) {
for (i = found; i < sNumSeqRequests[playerIdx] - 1; i++) {
D_8016E320[playerIdx][i].unk_1 = D_8016E320[playerIdx][i + 1].unk_1;
D_8016E320[playerIdx][i].unk_0 = D_8016E320[playerIdx][i + 1].unk_0;
}
D_8016E348[playerIdx]--;
sNumSeqRequests[playerIdx]--;
}
if (found == 0) {
func_800F9474(playerIdx, fadeTimer);
if (D_8016E348[playerIdx] != 0) {
if (sNumSeqRequests[playerIdx] != 0) {
func_800F9280(playerIdx, D_8016E320[playerIdx][0].unk_0, D_8016E320[playerIdx][0].unk_1, fadeTimer);
}
}
@@ -218,11 +218,11 @@ void Audio_ProcessSeqCmd(u32 cmd) {
if (duration == 0) {
duration++;
}
D_8016E750[playerIdx].volTarget = (f32)val / 127.0f;
if (D_8016E750[playerIdx].volCur != D_8016E750[playerIdx].volTarget) {
D_8016E750[playerIdx].unk_08 =
(D_8016E750[playerIdx].volCur - D_8016E750[playerIdx].volTarget) / (f32)duration;
D_8016E750[playerIdx].unk_0C = duration;
gActiveSeqs[playerIdx].volTarget = (f32)val / 127.0f;
if (gActiveSeqs[playerIdx].volCur != gActiveSeqs[playerIdx].volTarget) {
gActiveSeqs[playerIdx].volStep =
(gActiveSeqs[playerIdx].volCur - gActiveSeqs[playerIdx].volTarget) / (f32)duration;
gActiveSeqs[playerIdx].volTimer = duration;
}
break;
@@ -235,12 +235,12 @@ void Audio_ProcessSeqCmd(u32 cmd) {
}
freqScale = (f32)val / 1000.0f;
for (i = 0; i < 16; i++) {
D_8016E750[playerIdx].unk_50[i].unk_14 = freqScale;
D_8016E750[playerIdx].unk_50[i].unk_1C = duration;
D_8016E750[playerIdx].unk_50[i].unk_18 =
(D_8016E750[playerIdx].unk_50[i].unk_10 - freqScale) / (f32)duration;
gActiveSeqs[playerIdx].channelData[i].freqScaleTarget = freqScale;
gActiveSeqs[playerIdx].channelData[i].freqScaleTimer = duration;
gActiveSeqs[playerIdx].channelData[i].freqScaleStep =
(gActiveSeqs[playerIdx].channelData[i].freqScaleCur - freqScale) / (f32)duration;
}
D_8016E750[playerIdx].unk_250 = 0xFFFF;
gActiveSeqs[playerIdx].freqScaleChannelFlags = 0xFFFF;
break;
case 0xD:
@@ -252,11 +252,11 @@ void Audio_ProcessSeqCmd(u32 cmd) {
duration++;
}
freqScale = (f32)val / 1000.0f;
D_8016E750[playerIdx].unk_50[chanIdx].unk_14 = freqScale;
D_8016E750[playerIdx].unk_50[chanIdx].unk_18 =
(D_8016E750[playerIdx].unk_50[chanIdx].unk_10 - freqScale) / (f32)duration;
D_8016E750[playerIdx].unk_50[chanIdx].unk_1C = duration;
D_8016E750[playerIdx].unk_250 |= 1 << chanIdx;
gActiveSeqs[playerIdx].channelData[chanIdx].freqScaleTarget = freqScale;
gActiveSeqs[playerIdx].channelData[chanIdx].freqScaleStep =
(gActiveSeqs[playerIdx].channelData[chanIdx].freqScaleCur - freqScale) / (f32)duration;
gActiveSeqs[playerIdx].channelData[chanIdx].freqScaleTimer = duration;
gActiveSeqs[playerIdx].freqScaleChannelFlags |= 1 << chanIdx;
break;
case 0x6:
@@ -267,13 +267,13 @@ void Audio_ProcessSeqCmd(u32 cmd) {
if (duration == 0) {
duration++;
}
D_8016E750[playerIdx].unk_50[chanIdx].unk_04 = (f32)val / 127.0f;
if (D_8016E750[playerIdx].unk_50[chanIdx].unk_00 != D_8016E750[playerIdx].unk_50[chanIdx].unk_04) {
D_8016E750[playerIdx].unk_50[chanIdx].unk_08 =
(D_8016E750[playerIdx].unk_50[chanIdx].unk_00 - D_8016E750[playerIdx].unk_50[chanIdx].unk_04) /
gActiveSeqs[playerIdx].channelData[chanIdx].volTarget = (f32)val / 127.0f;
if (gActiveSeqs[playerIdx].channelData[chanIdx].volCur != gActiveSeqs[playerIdx].channelData[chanIdx].volTarget) {
gActiveSeqs[playerIdx].channelData[chanIdx].volStep =
(gActiveSeqs[playerIdx].channelData[chanIdx].volCur - gActiveSeqs[playerIdx].channelData[chanIdx].volTarget) /
(f32)duration;
D_8016E750[playerIdx].unk_50[chanIdx].unk_0C = duration;
D_8016E750[playerIdx].unk_252 |= 1 << chanIdx;
gActiveSeqs[playerIdx].channelData[chanIdx].volTimer = duration;
gActiveSeqs[playerIdx].volChannelFlags |= 1 << chanIdx;
}
break;
@@ -289,7 +289,7 @@ void Audio_ProcessSeqCmd(u32 cmd) {
chanIdx = (cmd & 0xF00) >> 8;
port = (cmd & 0xFF0000) >> 16;
val = cmd & 0xFF;
if ((D_8016E750[playerIdx].unk_258 & (1 << chanIdx)) == 0) {
if ((gActiveSeqs[playerIdx].channelPortMask & (1 << chanIdx)) == 0) {
Audio_QueueCmdS8(0x06000000 | _SHIFTL(playerIdx, 16, 8) | _SHIFTL(chanIdx, 8, 8) | _SHIFTL(port, 0, 8),
val);
}
@@ -297,7 +297,7 @@ void Audio_ProcessSeqCmd(u32 cmd) {
case 0x9:
// set channel mask for command 0x8
D_8016E750[playerIdx].unk_258 = cmd & 0xFFFF;
gActiveSeqs[playerIdx].channelPortMask = cmd & 0xFFFF;
break;
case 0xA:
@@ -319,22 +319,22 @@ void Audio_ProcessSeqCmd(u32 cmd) {
case 0xB:
// update tempo
D_8016E750[playerIdx].unk_14 = cmd;
gActiveSeqs[playerIdx].tempoCmd = cmd;
break;
case 0xC:
// start sequence with setup commands
subOp = (cmd & 0xF00000) >> 20;
if (subOp != 0xF) {
if (D_8016E750[playerIdx].unk_4D < 7) {
found = D_8016E750[playerIdx].unk_4D++;
if (gActiveSeqs[playerIdx].setupCmdNum < 7) {
found = gActiveSeqs[playerIdx].setupCmdNum++;
if (found < 8) {
D_8016E750[playerIdx].unk_2C[found] = cmd;
D_8016E750[playerIdx].unk_4C = 2;
gActiveSeqs[playerIdx].setupCmd[found] = cmd;
gActiveSeqs[playerIdx].setupCmdTimer = 2;
}
}
} else {
D_8016E750[playerIdx].unk_4D = 0;
gActiveSeqs[playerIdx].setupCmdNum = 0;
}
break;
@@ -400,7 +400,7 @@ u16 func_800FA0B4(u8 playerIdx) {
if (!gAudioContext.seqPlayers[playerIdx].enabled) {
return NA_BGM_DISABLED;
}
return D_8016E750[playerIdx].unk_254;
return gActiveSeqs[playerIdx].seqId;
}
s32 func_800FA11C(u32 arg0, u32 arg1) {
@@ -416,17 +416,17 @@ s32 func_800FA11C(u32 arg0, u32 arg1) {
}
void func_800FA174(u8 playerIdx) {
D_8016E348[playerIdx] = 0;
sNumSeqRequests[playerIdx] = 0;
}
void func_800FA18C(u8 playerIdx, u8 arg1) {
u8 i;
for (i = 0; i < D_8016E750[playerIdx].unk_4D; i++) {
u8 unkb = (D_8016E750[playerIdx].unk_2C[i] & 0xF00000) >> 20;
for (i = 0; i < gActiveSeqs[playerIdx].setupCmdNum; i++) {
u8 unkb = (gActiveSeqs[playerIdx].setupCmd[i] & 0xF00000) >> 20;
if (unkb == arg1) {
D_8016E750[playerIdx].unk_2C[i] = 0xFF000000;
gActiveSeqs[playerIdx].setupCmd[i] = 0xFF000000;
}
}
}
@@ -435,14 +435,14 @@ void Audio_SetVolScale(u8 playerIdx, u8 scaleIdx, u8 targetVol, u8 volFadeTimer)
f32 volScale;
u8 i;
D_8016E750[playerIdx].volScales[scaleIdx] = targetVol & 0x7F;
gActiveSeqs[playerIdx].volScales[scaleIdx] = targetVol & 0x7F;
if (volFadeTimer != 0) {
D_8016E750[playerIdx].fadeVolUpdate = 1;
D_8016E750[playerIdx].volFadeTimer = volFadeTimer;
gActiveSeqs[playerIdx].fadeVolUpdate = 1;
gActiveSeqs[playerIdx].volFadeTimer = volFadeTimer;
} else {
for (i = 0, volScale = 1.0f; i < 4; i++) {
volScale *= D_8016E750[playerIdx].volScales[i] / 127.0f;
volScale *= gActiveSeqs[playerIdx].volScales[i] / 127.0f;
}
Audio_SetVolScaleNow(playerIdx, volFadeTimer, volScale);
@@ -468,41 +468,41 @@ void func_800FA3DC(void) {
u8 k;
for (playerIdx = 0; playerIdx < 4; playerIdx++) {
if (D_8016E750[playerIdx].unk_260 != 0) {
if (gActiveSeqs[playerIdx].isWaitingForFonts != 0) {
switch (func_800E5E20(&dummy)) {
case 1:
case 2:
case 3:
case 4:
D_8016E750[playerIdx].unk_260 = 0;
Audio_ProcessSeqCmd(D_8016E750[playerIdx].unk_25C);
gActiveSeqs[playerIdx].isWaitingForFonts = 0;
Audio_ProcessSeqCmd(gActiveSeqs[playerIdx].startSeqCmd);
break;
}
}
if (D_8016E750[playerIdx].fadeVolUpdate) {
if (gActiveSeqs[playerIdx].fadeVolUpdate) {
phi_f0 = 1.0f;
for (j = 0; j < 4; j++) {
phi_f0 *= (D_8016E750[playerIdx].volScales[j] / 127.0f);
phi_f0 *= (gActiveSeqs[playerIdx].volScales[j] / 127.0f);
}
Audio_SeqCmd4(playerIdx, D_8016E750[playerIdx].volFadeTimer, (u8)(phi_f0 * 127.0f));
D_8016E750[playerIdx].fadeVolUpdate = 0;
Audio_SeqCmd4(playerIdx, gActiveSeqs[playerIdx].volFadeTimer, (u8)(phi_f0 * 127.0f));
gActiveSeqs[playerIdx].fadeVolUpdate = 0;
}
if (D_8016E750[playerIdx].unk_0C != 0) {
D_8016E750[playerIdx].unk_0C--;
if (gActiveSeqs[playerIdx].volTimer != 0) {
gActiveSeqs[playerIdx].volTimer--;
if (D_8016E750[playerIdx].unk_0C != 0) {
D_8016E750[playerIdx].volCur = D_8016E750[playerIdx].volCur - D_8016E750[playerIdx].unk_08;
if (gActiveSeqs[playerIdx].volTimer != 0) {
gActiveSeqs[playerIdx].volCur = gActiveSeqs[playerIdx].volCur - gActiveSeqs[playerIdx].volStep;
} else {
D_8016E750[playerIdx].volCur = D_8016E750[playerIdx].volTarget;
gActiveSeqs[playerIdx].volCur = gActiveSeqs[playerIdx].volTarget;
}
Audio_QueueCmdF32(0x41000000 | _SHIFTL(playerIdx, 16, 8), D_8016E750[playerIdx].volCur);
Audio_QueueCmdF32(0x41000000 | _SHIFTL(playerIdx, 16, 8), gActiveSeqs[playerIdx].volCur);
}
if (D_8016E750[playerIdx].unk_14 != 0) {
temp_a1 = D_8016E750[playerIdx].unk_14;
if (gActiveSeqs[playerIdx].tempoCmd != 0) {
temp_a1 = gActiveSeqs[playerIdx].tempoCmd;
phi_t0 = (temp_a1 & 0xFF0000) >> 15;
phi_a2 = temp_a1 & 0xFFF;
if (phi_t0 == 0) {
@@ -525,8 +525,8 @@ void func_800FA3DC(void) {
phi_a2 = temp_lo * (phi_a2 / 100.0f);
break;
case 4:
if (D_8016E750[playerIdx].unk_18) {
phi_a2 = D_8016E750[playerIdx].unk_18;
if (gActiveSeqs[playerIdx].tempoOriginal) {
phi_a2 = gActiveSeqs[playerIdx].tempoOriginal;
} else {
phi_a2 = temp_lo;
}
@@ -537,71 +537,71 @@ void func_800FA3DC(void) {
phi_a2 = 300;
}
if (D_8016E750[playerIdx].unk_18 == 0) {
D_8016E750[playerIdx].unk_18 = temp_lo;
if (gActiveSeqs[playerIdx].tempoOriginal == 0) {
gActiveSeqs[playerIdx].tempoOriginal = temp_lo;
}
D_8016E750[playerIdx].unk_20 = phi_a2;
D_8016E750[playerIdx].unk_1C = gAudioContext.seqPlayers[playerIdx].tempo / 0x30;
D_8016E750[playerIdx].unk_24 = (D_8016E750[playerIdx].unk_1C - D_8016E750[playerIdx].unk_20) / phi_t0;
D_8016E750[playerIdx].unk_28 = phi_t0;
D_8016E750[playerIdx].unk_14 = 0;
gActiveSeqs[playerIdx].tempoTarget = phi_a2;
gActiveSeqs[playerIdx].tempoCur = gAudioContext.seqPlayers[playerIdx].tempo / 0x30;
gActiveSeqs[playerIdx].tempoStep = (gActiveSeqs[playerIdx].tempoCur - gActiveSeqs[playerIdx].tempoTarget) / phi_t0;
gActiveSeqs[playerIdx].tempoTimer = phi_t0;
gActiveSeqs[playerIdx].tempoCmd = 0;
}
}
if (D_8016E750[playerIdx].unk_28 != 0) {
D_8016E750[playerIdx].unk_28--;
if (D_8016E750[playerIdx].unk_28 != 0) {
D_8016E750[playerIdx].unk_1C = D_8016E750[playerIdx].unk_1C - D_8016E750[playerIdx].unk_24;
if (gActiveSeqs[playerIdx].tempoTimer != 0) {
gActiveSeqs[playerIdx].tempoTimer--;
if (gActiveSeqs[playerIdx].tempoTimer != 0) {
gActiveSeqs[playerIdx].tempoCur = gActiveSeqs[playerIdx].tempoCur - gActiveSeqs[playerIdx].tempoStep;
} else {
D_8016E750[playerIdx].unk_1C = D_8016E750[playerIdx].unk_20;
gActiveSeqs[playerIdx].tempoCur = gActiveSeqs[playerIdx].tempoTarget;
}
// set tempo
Audio_QueueCmdS32(0x47000000 | _SHIFTL(playerIdx, 16, 8), D_8016E750[playerIdx].unk_1C);
Audio_QueueCmdS32(0x47000000 | _SHIFTL(playerIdx, 16, 8), gActiveSeqs[playerIdx].tempoCur);
}
if (D_8016E750[playerIdx].unk_252 != 0) {
if (gActiveSeqs[playerIdx].volChannelFlags != 0) {
for (k = 0; k < 0x10; k++) {
if (D_8016E750[playerIdx].unk_50[k].unk_0C != 0) {
D_8016E750[playerIdx].unk_50[k].unk_0C--;
if (D_8016E750[playerIdx].unk_50[k].unk_0C != 0) {
D_8016E750[playerIdx].unk_50[k].unk_00 -= D_8016E750[playerIdx].unk_50[k].unk_08;
if (gActiveSeqs[playerIdx].channelData[k].volTimer != 0) {
gActiveSeqs[playerIdx].channelData[k].volTimer--;
if (gActiveSeqs[playerIdx].channelData[k].volTimer != 0) {
gActiveSeqs[playerIdx].channelData[k].volCur -= gActiveSeqs[playerIdx].channelData[k].volStep;
} else {
D_8016E750[playerIdx].unk_50[k].unk_00 = D_8016E750[playerIdx].unk_50[k].unk_04;
D_8016E750[playerIdx].unk_252 ^= (1 << k);
gActiveSeqs[playerIdx].channelData[k].volCur = gActiveSeqs[playerIdx].channelData[k].volTarget;
gActiveSeqs[playerIdx].volChannelFlags ^= (1 << k);
}
// CHAN_UPD_VOL_SCALE (playerIdx = seq, k = chan)
Audio_QueueCmdF32(0x01000000 | _SHIFTL(playerIdx, 16, 8) | _SHIFTL(k, 8, 8),
D_8016E750[playerIdx].unk_50[k].unk_00);
gActiveSeqs[playerIdx].channelData[k].volCur);
}
}
}
if (D_8016E750[playerIdx].unk_250 != 0) {
if (gActiveSeqs[playerIdx].freqScaleChannelFlags != 0) {
for (k = 0; k < 0x10; k++) {
if (D_8016E750[playerIdx].unk_50[k].unk_1C != 0) {
D_8016E750[playerIdx].unk_50[k].unk_1C--;
if (D_8016E750[playerIdx].unk_50[k].unk_1C != 0) {
D_8016E750[playerIdx].unk_50[k].unk_10 -= D_8016E750[playerIdx].unk_50[k].unk_18;
if (gActiveSeqs[playerIdx].channelData[k].freqScaleTimer != 0) {
gActiveSeqs[playerIdx].channelData[k].freqScaleTimer--;
if (gActiveSeqs[playerIdx].channelData[k].freqScaleTimer != 0) {
gActiveSeqs[playerIdx].channelData[k].freqScaleCur -= gActiveSeqs[playerIdx].channelData[k].freqScaleStep;
} else {
D_8016E750[playerIdx].unk_50[k].unk_10 = D_8016E750[playerIdx].unk_50[k].unk_14;
D_8016E750[playerIdx].unk_250 ^= (1 << k);
gActiveSeqs[playerIdx].channelData[k].freqScaleCur = gActiveSeqs[playerIdx].channelData[k].freqScaleTarget;
gActiveSeqs[playerIdx].freqScaleChannelFlags ^= (1 << k);
}
// CHAN_UPD_FREQ_SCALE
Audio_QueueCmdF32(0x04000000 | _SHIFTL(playerIdx, 16, 8) | _SHIFTL(k, 8, 8),
D_8016E750[playerIdx].unk_50[k].unk_10);
gActiveSeqs[playerIdx].channelData[k].freqScaleCur);
}
}
}
if (D_8016E750[playerIdx].unk_4D != 0) {
if (gActiveSeqs[playerIdx].setupCmdNum != 0) {
if (func_800FA11C(0xF0000000, 0xF0000000) == 0) {
D_8016E750[playerIdx].unk_4D = 0;
gActiveSeqs[playerIdx].setupCmdNum = 0;
return;
}
if (D_8016E750[playerIdx].unk_4C != 0) {
D_8016E750[playerIdx].unk_4C--;
if (gActiveSeqs[playerIdx].setupCmdTimer != 0) {
gActiveSeqs[playerIdx].setupCmdTimer--;
continue;
}
@@ -609,28 +609,28 @@ void func_800FA3DC(void) {
continue;
}
for (j = 0; j < D_8016E750[playerIdx].unk_4D; j++) {
temp_a0 = (D_8016E750[playerIdx].unk_2C[j] & 0x00F00000) >> 20;
temp_s1 = (D_8016E750[playerIdx].unk_2C[j] & 0x000F0000) >> 16;
temp_s0_3 = (D_8016E750[playerIdx].unk_2C[j] & 0xFF00) >> 8;
temp_a3_3 = D_8016E750[playerIdx].unk_2C[j] & 0xFF;
for (j = 0; j < gActiveSeqs[playerIdx].setupCmdNum; j++) {
temp_a0 = (gActiveSeqs[playerIdx].setupCmd[j] & 0x00F00000) >> 20;
temp_s1 = (gActiveSeqs[playerIdx].setupCmd[j] & 0x000F0000) >> 16;
temp_s0_3 = (gActiveSeqs[playerIdx].setupCmd[j] & 0xFF00) >> 8;
temp_a3_3 = gActiveSeqs[playerIdx].setupCmd[j] & 0xFF;
switch (temp_a0) {
case 0:
Audio_SetVolScale(temp_s1, 1, 0x7F, temp_a3_3);
break;
case 7:
if (D_8016E348[playerIdx] == temp_a3_3) {
if (sNumSeqRequests[playerIdx] == temp_a3_3) {
Audio_SetVolScale(temp_s1, 1, 0x7F, temp_s0_3);
}
break;
case 1:
Audio_SeqCmd3(playerIdx, D_8016E750[playerIdx].unk_254);
Audio_SeqCmd3(playerIdx, gActiveSeqs[playerIdx].seqId);
break;
case 2:
Audio_StartSeq(temp_s1, 1, D_8016E750[temp_s1].unk_254);
D_8016E750[temp_s1].fadeVolUpdate = 1;
D_8016E750[temp_s1].volScales[1] = 0x7F;
Audio_StartSeq(temp_s1, 1, gActiveSeqs[temp_s1].seqId);
gActiveSeqs[temp_s1].fadeVolUpdate = 1;
gActiveSeqs[temp_s1].volScales[1] = 0x7F;
break;
case 3:
Audio_SeqCmdB30(temp_s1, temp_s0_3, temp_a3_3);
@@ -639,13 +639,13 @@ void func_800FA3DC(void) {
Audio_SeqCmdB40(temp_s1, temp_a3_3, 0);
break;
case 5:
temp_v1 = D_8016E750[playerIdx].unk_2C[j] & 0xFFFF;
Audio_StartSeq(temp_s1, D_8016E750[temp_s1].unk_4E, temp_v1);
temp_v1 = gActiveSeqs[playerIdx].setupCmd[j] & 0xFFFF;
Audio_StartSeq(temp_s1, gActiveSeqs[temp_s1].setupFadeTimer, temp_v1);
Audio_SetVolScale(temp_s1, 1, 0x7F, 0);
D_8016E750[temp_s1].unk_4E = 0;
gActiveSeqs[temp_s1].setupFadeTimer = 0;
break;
case 6:
D_8016E750[playerIdx].unk_4E = temp_s0_3;
gActiveSeqs[playerIdx].setupFadeTimer = temp_s0_3;
break;
case 8:
Audio_SetVolScale(temp_s1, temp_s0_3, 0x7F, temp_a3_3);
@@ -662,7 +662,7 @@ void func_800FA3DC(void) {
}
break;
case 9:
temp_v1 = D_8016E750[playerIdx].unk_2C[j] & 0xFFFF;
temp_v1 = gActiveSeqs[playerIdx].setupCmd[j] & 0xFFFF;
Audio_SeqCmdA(temp_s1, temp_v1);
break;
case 10:
@@ -671,7 +671,7 @@ void func_800FA3DC(void) {
}
}
D_8016E750[playerIdx].unk_4D = 0;
gActiveSeqs[playerIdx].setupCmdNum = 0;
}
}
}
@@ -695,26 +695,29 @@ u8 func_800FAD34(void) {
return D_80133418;
}
void func_800FADF8(void) {
u8 playerIdx, j;
void Audio_ResetActiveSequences(void) {
u8 seqPlayerIndex;
u8 scaleIndex;
for (playerIdx = 0; playerIdx < 4; playerIdx++) {
D_8016E348[playerIdx] = 0;
D_8016E750[playerIdx].unk_254 = NA_BGM_DISABLED;
D_8016E750[playerIdx].unk_256 = NA_BGM_DISABLED;
D_8016E750[playerIdx].unk_28 = 0;
D_8016E750[playerIdx].unk_18 = 0;
D_8016E750[playerIdx].unk_14 = 0;
D_8016E750[playerIdx].unk_258 = 0;
D_8016E750[playerIdx].unk_4D = 0;
D_8016E750[playerIdx].unk_4E = 0;
D_8016E750[playerIdx].unk_250 = 0;
D_8016E750[playerIdx].unk_252 = 0;
for (j = 0; j < 4; j++) {
D_8016E750[playerIdx].volScales[j] = 0x7F;
for (seqPlayerIndex = 0; seqPlayerIndex < 4; seqPlayerIndex++) {
sNumSeqRequests[seqPlayerIndex] = 0;
gActiveSeqs[seqPlayerIndex].seqId = NA_BGM_DISABLED;
gActiveSeqs[seqPlayerIndex].prevSeqId = NA_BGM_DISABLED;
gActiveSeqs[seqPlayerIndex].tempoTimer = 0;
gActiveSeqs[seqPlayerIndex].tempoOriginal = 0;
gActiveSeqs[seqPlayerIndex].tempoCmd = 0;
gActiveSeqs[seqPlayerIndex].channelPortMask = 0;
gActiveSeqs[seqPlayerIndex].setupCmdNum = 0;
gActiveSeqs[seqPlayerIndex].setupFadeTimer = 0;
gActiveSeqs[seqPlayerIndex].freqScaleChannelFlags = 0;
gActiveSeqs[seqPlayerIndex].volChannelFlags = 0;
for (scaleIndex = 0; scaleIndex < 4; scaleIndex++) {
gActiveSeqs[seqPlayerIndex].volScales[scaleIndex] = 0x7F;
}
D_8016E750[playerIdx].volFadeTimer = 1;
D_8016E750[playerIdx].fadeVolUpdate = 1;
gActiveSeqs[seqPlayerIndex].volFadeTimer = 1;
gActiveSeqs[seqPlayerIndex].fadeVolUpdate = true;
}
}
@@ -722,12 +725,12 @@ void func_800FAEB4(void) {
u8 playerIdx, j;
for (playerIdx = 0; playerIdx < 4; playerIdx++) {
D_8016E750[playerIdx].volCur = 1.0f;
D_8016E750[playerIdx].unk_0C = 0;
D_8016E750[playerIdx].fadeVolUpdate = 0;
gActiveSeqs[playerIdx].volCur = 1.0f;
gActiveSeqs[playerIdx].volTimer = 0;
gActiveSeqs[playerIdx].fadeVolUpdate = 0;
for (j = 0; j < 4; j++) {
D_8016E750[playerIdx].volScales[j] = 0x7F;
gActiveSeqs[playerIdx].volScales[j] = 0x7F;
}
}
func_800FADF8();
Audio_ResetActiveSequences();
}

View File

@@ -7,6 +7,7 @@
#include <stdlib.h>
#include "soh/Enhancements/debugger/colViewer.h"
#include "soh/Enhancements/debugger/valueViewer.h"
#include "soh/Enhancements/gameconsole.h"
#include "soh/OTRGlobals.h"
@@ -289,6 +290,28 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
OPEN_DISPS(gfxCtx);
if (CVarGetInteger("gValueViewer.EnablePrinting", 0)) {
Gfx* gfx;
Gfx* polyOpa;
GfxPrint printer;
polyOpa = POLY_OPA_DISP;
gfx = Graph_GfxPlusOne(polyOpa);
gSPDisplayList(OVERLAY_DISP++, gfx);
GfxPrint_Init(&printer);
GfxPrint_Open(&printer, gfx);
ValueViewer_Draw(&printer);
gfx = GfxPrint_Close(&printer);
GfxPrint_Destroy(&printer);
gSPEndDisplayList(gfx++);
Graph_BranchDlist(polyOpa, gfx);
POLY_OPA_DISP = gfx;
}
gDPNoOpString(WORK_DISP++, "WORK_DISP 終了", 0);
gDPNoOpString(POLY_OPA_DISP++, "POLY_OPA_DISP 終了", 0);
gDPNoOpString(POLY_XLU_DISP++, "POLY_XLU_DISP 終了", 0);

View File

@@ -297,6 +297,11 @@ void PadMgr_ProcessInputs(PadMgr* padMgr) {
PadUtils_UpdateRelXY(input);
input->press.stick_x += (s8)(input->cur.stick_x - input->prev.stick_x);
input->press.stick_y += (s8)(input->cur.stick_y - input->prev.stick_y);
// #region SOH [Enhancement]
PadUtils_UpdateRelRXY(input);
input->press.right_stick_x += (s8)(input->cur.right_stick_x - input->prev.right_stick_x);
input->press.right_stick_y += (s8)(input->cur.right_stick_y - input->prev.right_stick_y);
// #endregion
}
uint8_t rumble = (padMgr->rumbleEnable[0] > 0);
@@ -389,6 +394,11 @@ void PadMgr_RequestPadData(PadMgr* padMgr, Input* inputs, s32 mode) {
PadUtils_UpdateRelXY(newInput);
newInput->press.stick_x += (s8)(newInput->cur.stick_x - newInput->prev.stick_x);
newInput->press.stick_y += (s8)(newInput->cur.stick_y - newInput->prev.stick_y);
// #region SOH [Enhancement]
PadUtils_UpdateRelRXY(newInput);
newInput->press.right_stick_x += (s8)(newInput->cur.right_stick_x - newInput->prev.right_stick_x);
newInput->press.right_stick_y += (s8)(newInput->cur.right_stick_y - newInput->prev.right_stick_y);
// #endregion
}
ogInput++;
newInput++;

View File

@@ -92,3 +92,60 @@ void PadUtils_UpdateRelXY(Input* input) {
PadUtils_SetRelXY(input, relX, relY);
}
// #region SOH [Enhancement]
s8 PadUtils_GetCurRX(Input* input) {
return input->cur.right_stick_x;
}
s8 PadUtils_GetCurRY(Input* input) {
return input->cur.right_stick_y;
}
void PadUtils_SetRelRXY(Input* input, s32 x, s32 y) {
input->rel.right_stick_x = x;
input->rel.right_stick_y = y;
}
s8 PadUtils_GetRelRXImpl(Input* input) {
return input->rel.right_stick_x;
}
s8 PadUtils_GetRelRYImpl(Input* input) {
return input->rel.right_stick_y;
}
s8 PadUtils_GetRelRX(Input* input) {
return PadUtils_GetRelRXImpl(input);
}
s8 PadUtils_GetRelRY(Input* input) {
return PadUtils_GetRelRYImpl(input);
}
void PadUtils_UpdateRelRXY(Input* input) {
s32 curX = PadUtils_GetCurRX(input);
s32 curY = PadUtils_GetCurRY(input);
s32 relX;
s32 relY;
if (curX > 7) {
relX = (curX < 0x43) ? curX - 7 : 0x43 - 7;
} else if (curX < -7) {
relX = (curX > -0x43) ? curX + 7 : -0x43 + 7;
} else {
relX = 0;
}
if (curY > 7) {
relY = (curY < 0x43) ? curY - 7 : 0x43 - 7;
} else if (curY < -7) {
relY = (curY > -0x43) ? curY + 7 : -0x43 + 7;
} else {
relY = 0;
}
PadUtils_SetRelRXY(input, relX, relY);
}
// #endregion

View File

@@ -486,7 +486,7 @@ void func_8002C124(TargetContext* targetCtx, PlayState* play) {
func_8002BE64(targetCtx, targetCtx->unk_4C, spBC.x, spBC.y, spBC.z);
if ((!(player->stateFlags1 & 0x40)) || (actor != player->unk_664)) {
if ((!(player->stateFlags1 & PLAYER_STATE1_TEXT_ON_SCREEN)) || (actor != player->unk_664)) {
OVERLAY_DISP = Gfx_SetupDL(OVERLAY_DISP, 0x39);
for (spB0 = 0, spAC = targetCtx->unk_4C; spB0 < spB8; spB0++, spAC = (spAC + 1) % 3) {
@@ -662,26 +662,32 @@ s32 Flags_GetSwitch(PlayState* play, s32 flag) {
* Sets current scene switch flag.
*/
void Flags_SetSwitch(PlayState* play, s32 flag) {
lusprintf(__FILE__, __LINE__, 2, "Switch Flag Set - %#x", flag);
u8 previouslyOff = !Flags_GetSwitch(play, flag);
if (flag < 0x20) {
play->actorCtx.flags.swch |= (1 << flag);
} else {
play->actorCtx.flags.tempSwch |= (1 << (flag - 0x20));
}
GameInteractor_ExecuteOnSceneFlagSet(play->sceneNum, FLAG_SCENE_SWITCH, flag);
if (previouslyOff) {
LUSLOG_INFO("Switch Flag Set - %#x", flag);
GameInteractor_ExecuteOnSceneFlagSet(play->sceneNum, FLAG_SCENE_SWITCH, flag);
}
}
/**
* Unsets current scene switch flag.
*/
void Flags_UnsetSwitch(PlayState* play, s32 flag) {
lusprintf(__FILE__, __LINE__, 2, "Switch Flag Unset - %#x", flag);
u8 previouslyOn = Flags_GetSwitch(play, flag);
if (flag < 0x20) {
play->actorCtx.flags.swch &= ~(1 << flag);
} else {
play->actorCtx.flags.tempSwch &= ~(1 << (flag - 0x20));
}
GameInteractor_ExecuteOnSceneFlagUnset(play->sceneNum, FLAG_SCENE_SWITCH, flag);
if (previouslyOn) {
LUSLOG_INFO("Switch Flag Unset - %#x", flag);
GameInteractor_ExecuteOnSceneFlagUnset(play->sceneNum, FLAG_SCENE_SWITCH, flag);
}
}
/**
@@ -728,9 +734,12 @@ s32 Flags_GetTreasure(PlayState* play, s32 flag) {
* Sets current scene chest flag.
*/
void Flags_SetTreasure(PlayState* play, s32 flag) {
lusprintf(__FILE__, __LINE__, 2, "Treasure Flag Set - %#x", flag);
u8 previouslyOff = !Flags_GetTreasure(play, flag);
play->actorCtx.flags.chest |= (1 << flag);
GameInteractor_ExecuteOnSceneFlagSet(play->sceneNum, FLAG_SCENE_TREASURE, flag);
if (previouslyOff) {
LUSLOG_INFO("Treasure Flag Set - %#x", flag);
GameInteractor_ExecuteOnSceneFlagSet(play->sceneNum, FLAG_SCENE_TREASURE, flag);
}
}
/**
@@ -744,16 +753,24 @@ s32 Flags_GetClear(PlayState* play, s32 flag) {
* Sets current scene clear flag.
*/
void Flags_SetClear(PlayState* play, s32 flag) {
u8 previouslyOff = !Flags_GetClear(play, flag);
play->actorCtx.flags.clear |= (1 << flag);
GameInteractor_ExecuteOnSceneFlagSet(play->sceneNum, FLAG_SCENE_CLEAR, flag);
if (previouslyOff) {
LUSLOG_INFO("Clear Flag Set - %#x", flag);
GameInteractor_ExecuteOnSceneFlagSet(play->sceneNum, FLAG_SCENE_CLEAR, flag);
}
}
/**
* Unsets current scene clear flag.
*/
void Flags_UnsetClear(PlayState* play, s32 flag) {
u8 previouslyOn = Flags_GetClear(play, flag);
play->actorCtx.flags.clear &= ~(1 << flag);
GameInteractor_ExecuteOnSceneFlagUnset(play->sceneNum, FLAG_SCENE_CLEAR, flag);
if (previouslyOn) {
LUSLOG_INFO("Clear Flag Unset - %#x", flag);
GameInteractor_ExecuteOnSceneFlagUnset(play->sceneNum, FLAG_SCENE_CLEAR, flag);
}
}
/**
@@ -792,7 +809,7 @@ s32 Flags_GetCollectible(PlayState* play, s32 flag) {
* Sets current scene collectible flag.
*/
void Flags_SetCollectible(PlayState* play, s32 flag) {
lusprintf(__FILE__, __LINE__, 2, "Collectible Flag Set - %#x", flag);
u8 previouslyOff = !Flags_GetCollectible(play, flag);
if (flag != 0) {
if (flag < 0x20) {
play->actorCtx.flags.collect |= (1 << flag);
@@ -800,7 +817,10 @@ void Flags_SetCollectible(PlayState* play, s32 flag) {
play->actorCtx.flags.tempCollect |= (1 << (flag - 0x20));
}
}
GameInteractor_ExecuteOnSceneFlagSet(play->sceneNum, FLAG_SCENE_COLLECTIBLE, flag);
if (previouslyOff) {
LUSLOG_INFO("Collectible Flag Set - %#x", flag);
GameInteractor_ExecuteOnSceneFlagSet(play->sceneNum, FLAG_SCENE_COLLECTIBLE, flag);
}
}
void func_8002CDE4(PlayState* play, TitleCardContext* titleCtx) {
@@ -1356,7 +1376,7 @@ f32 Actor_HeightDiff(Actor* actorA, Actor* actorB) {
}
f32 Player_GetHeight(Player* player) {
f32 offset = (player->stateFlags1 & 0x800000) ? 32.0f : 0.0f;
f32 offset = (player->stateFlags1 & PLAYER_STATE1_ON_HORSE) ? 32.0f : 0.0f;
if (LINK_IS_ADULT) {
return offset + 68.0f;
@@ -1366,9 +1386,9 @@ f32 Player_GetHeight(Player* player) {
}
f32 func_8002DCE4(Player* player) {
if (player->stateFlags1 & 0x800000) {
if (player->stateFlags1 & PLAYER_STATE1_ON_HORSE) {
return 8.0f;
} else if (player->stateFlags1 & 0x8000000) {
} else if (player->stateFlags1 & PLAYER_STATE1_IN_WATER) {
return (R_RUN_SPEED_LIMIT / 100.0f) * 0.6f;
} else {
return R_RUN_SPEED_LIMIT / 100.0f;
@@ -1376,7 +1396,7 @@ f32 func_8002DCE4(Player* player) {
}
s32 func_8002DD6C(Player* player) {
return player->stateFlags1 & 0x8;
return player->stateFlags1 & PLAYER_STATE1_ITEM_IN_HAND;
}
s32 func_8002DD78(Player* player) {
@@ -1386,19 +1406,19 @@ s32 func_8002DD78(Player* player) {
s32 func_8002DDA8(PlayState* play) {
Player* player = GET_PLAYER(play);
return (player->stateFlags1 & 0x800) || func_8002DD78(player);
return (player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) || func_8002DD78(player);
}
s32 func_8002DDE4(PlayState* play) {
Player* player = GET_PLAYER(play);
return player->stateFlags2 & 0x8;
return player->stateFlags2 & PLAYER_STATE2_FOOTSTEP;
}
s32 func_8002DDF4(PlayState* play) {
Player* player = GET_PLAYER(play);
return player->stateFlags2 & 0x1000;
return player->stateFlags2 & PLAYER_STATE2_STATIONARY_LADDER;
}
void func_8002DE04(PlayState* play, Actor* actorA, Actor* actorB) {
@@ -1420,32 +1440,32 @@ void func_8002DE74(PlayState* play, Player* player) {
void Actor_MountHorse(PlayState* play, Player* player, Actor* horse) {
player->rideActor = horse;
player->stateFlags1 |= 0x800000;
player->stateFlags1 |= PLAYER_STATE1_ON_HORSE;
horse->child = &player->actor;
}
s32 func_8002DEEC(Player* player) {
return (player->stateFlags1 & 0x20000080) || (player->csMode != 0);
return (player->stateFlags1 & (PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_CUTSCENE)) || (player->csAction != 0);
}
void func_8002DF18(PlayState* play, Player* player) {
func_8006DC68(play, player);
}
s32 func_8002DF38(PlayState* play, Actor* actor, u8 csMode) {
s32 func_8002DF38(PlayState* play, Actor* actor, u8 csAction) {
Player* player = GET_PLAYER(play);
player->csMode = csMode;
player->unk_448 = actor;
player->csAction = csAction;
player->csActor = actor;
player->doorBgCamIndex = 0;
return true;
}
s32 func_8002DF54(PlayState* play, Actor* actor, u8 csMode) {
s32 func_8002DF54(PlayState* play, Actor* actor, u8 csAction) {
Player* player = GET_PLAYER(play);
func_8002DF38(play, actor, csMode);
func_8002DF38(play, actor, csAction);
player->doorBgCamIndex = 1;
return true;
@@ -1985,10 +2005,13 @@ u32 Actor_HasParent(Actor* actor, PlayState* play) {
s32 GiveItemEntryWithoutActor(PlayState* play, GetItemEntry getItemEntry) {
Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
if (!(player->stateFlags1 &
(PLAYER_STATE1_DEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE |
PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER)) &&
Player_GetExplosiveHeld(player) < 0) {
if (((player->heldActor != NULL) && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX)) ||
(IS_RANDO && (getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))) ||
(!(player->stateFlags1 & 0x20000800))) {
(!(player->stateFlags1 & (PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_IN_CUTSCENE)))) {
if ((getItemEntry.getItemId != GI_NONE)) {
player->getItemEntry = getItemEntry;
player->getItemId = getItemEntry.getItemId;
@@ -2021,11 +2044,14 @@ s32 GiveItemEntryWithoutActor(PlayState* play, GetItemEntry getItemEntry) {
s32 GiveItemEntryFromActor(Actor* actor, PlayState* play, GetItemEntry getItemEntry, f32 xzRange, f32 yRange) {
Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
if (!(player->stateFlags1 &
(PLAYER_STATE1_DEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE |
PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER)) &&
Player_GetExplosiveHeld(player) < 0) {
if ((((player->heldActor != NULL) || (actor == player->targetActor)) &&
((!IS_RANDO && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX))) ||
(IS_RANDO && ((getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))))) ||
(!(player->stateFlags1 & 0x20000800))) {
(!(player->stateFlags1 & (PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_IN_CUTSCENE)))) {
if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) {
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
s32 absYawDiff = ABS(yawDiff);
@@ -2063,10 +2089,13 @@ void GiveItemEntryFromActorWithFixedRange(Actor* actor, PlayState* play, GetItem
s32 func_8002F434(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32 yRange) {
Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
if (!(player->stateFlags1 &
(PLAYER_STATE1_DEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE |
PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER)) &&
Player_GetExplosiveHeld(player) < 0) {
if ((((player->heldActor != NULL) || (actor == player->targetActor)) &&
((!IS_RANDO && ((getItemId > GI_NONE) && (getItemId < GI_MAX))) || (IS_RANDO && ((getItemId > RG_NONE) && (getItemId < RG_MAX))))) ||
(!(player->stateFlags1 & 0x20000800))) {
(!(player->stateFlags1 & (PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_IN_CUTSCENE)))) {
if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) {
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
s32 absYawDiff = ABS(yawDiff);
@@ -2120,8 +2149,8 @@ void func_8002F5C4(Actor* actorA, Actor* actorB, PlayState* play) {
void func_8002F5F0(Actor* actor, PlayState* play) {
Player* player = GET_PLAYER(play);
if (actor->xyzDistToPlayerSq < player->unk_6A4) {
player->unk_6A4 = actor->xyzDistToPlayerSq;
if (actor->xyzDistToPlayerSq < player->closestSecretDistSq) {
player->closestSecretDistSq = actor->xyzDistToPlayerSq;
}
}
@@ -2136,7 +2165,9 @@ s32 Actor_IsMounted(PlayState* play, Actor* horse) {
u32 Actor_SetRideActor(PlayState* play, Actor* horse, s32 mountSide) {
Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 & 0x003C7880)) {
if (!(player->stateFlags1 &
(PLAYER_STATE1_DEAD | PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE |
PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER))) {
player->rideActor = horse;
player->mountSide = mountSide;
return true;
@@ -2481,8 +2512,18 @@ void func_800304DC(PlayState* play, ActorContext* actorCtx, ActorEntry* actorEnt
}
u32 D_80116068[ACTORCAT_MAX] = {
0x100000C0, 0x100000C0, 0x00000000, 0x100004C0, 0x00000080, 0x300000C0,
0x10000080, 0x00000000, 0x300000C0, 0x100004C0, 0x00000000, 0x100000C0,
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS,
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS,
0,
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS,
PLAYER_STATE1_DEAD,
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE,
PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS,
0,
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE,
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS,
0,
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS,
};
void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
@@ -2523,11 +2564,11 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
sp80 = &D_80116068[0];
if (player->stateFlags2 & 0x8000000) {
if (player->stateFlags2 & PLAYER_STATE2_OCARINA_PLAYING) {
unkFlag = ACTOR_FLAG_NO_FREEZE_OCARINA;
}
if ((player->stateFlags1 & 0x40) && ((player->actor.textId & 0xFF00) != 0x600)) {
if ((player->stateFlags1 & PLAYER_STATE1_TEXT_ON_SCREEN) && ((player->actor.textId & 0xFF00) != 0x600)) {
sp74 = player->targetActor;
}
@@ -3871,7 +3912,7 @@ s16 Actor_TestFloorInDirection(Actor* actor, PlayState* play, f32 distance, s16
s32 Actor_IsTargeted(PlayState* play, Actor* actor) {
Player* player = GET_PLAYER(play);
if ((player->stateFlags1 & 0x10) && actor->isTargeted) {
if ((player->stateFlags1 & PLAYER_STATE1_ENEMY_TARGET) && actor->isTargeted) {
return true;
} else {
return false;
@@ -3884,7 +3925,7 @@ s32 Actor_IsTargeted(PlayState* play, Actor* actor) {
s32 Actor_OtherIsTargeted(PlayState* play, Actor* actor) {
Player* player = GET_PLAYER(play);
if ((player->stateFlags1 & 0x10) && !actor->isTargeted) {
if ((player->stateFlags1 & PLAYER_STATE1_ENEMY_TARGET) && !actor->isTargeted) {
return true;
} else {
return false;
@@ -4733,16 +4774,24 @@ s32 Flags_GetEventChkInf(s32 flag) {
* Sets "eventChkInf" flag.
*/
void Flags_SetEventChkInf(s32 flag) {
u8 previouslyOff = !Flags_GetEventChkInf(flag);
gSaveContext.eventChkInf[flag >> 4] |= (1 << (flag & 0xF));
GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_CHECK_INF, flag);
if (previouslyOff) {
LUSLOG_INFO("EventChkInf Flag Set - %#x", flag);
GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_CHECK_INF, flag);
}
}
/**
* Unsets "eventChkInf" flag.
*/
void Flags_UnsetEventChkInf(s32 flag) {
u8 previouslyOn = Flags_GetEventChkInf(flag);
gSaveContext.eventChkInf[flag >> 4] &= ~(1 << (flag & 0xF));
GameInteractor_ExecuteOnFlagUnset(FLAG_EVENT_CHECK_INF, flag);
if (previouslyOn) {
LUSLOG_INFO("EventChkInf Flag Unset - %#x", flag);
GameInteractor_ExecuteOnFlagUnset(FLAG_EVENT_CHECK_INF, flag);
}
}
/**
@@ -4756,16 +4805,24 @@ s32 Flags_GetItemGetInf(s32 flag) {
* Sets "itemGetInf" flag.
*/
void Flags_SetItemGetInf(s32 flag) {
u8 previouslyOff = !Flags_GetItemGetInf(flag);
gSaveContext.itemGetInf[flag >> 4] |= (1 << (flag & 0xF));
GameInteractor_ExecuteOnFlagSet(FLAG_ITEM_GET_INF, flag);
if (previouslyOff) {
LUSLOG_INFO("ItemGetInf Flag Set - %#x", flag);
GameInteractor_ExecuteOnFlagSet(FLAG_ITEM_GET_INF, flag);
}
}
/**
* Unsets "itemGetInf" flag.
*/
void Flags_UnsetItemGetInf(s32 flag) {
u8 previouslyOn = Flags_GetItemGetInf(flag);
gSaveContext.itemGetInf[flag >> 4] &= ~(1 << (flag & 0xF));
GameInteractor_ExecuteOnFlagUnset(FLAG_ITEM_GET_INF, flag);
if (previouslyOn) {
LUSLOG_INFO("ItemGetInf Flag Unset - %#x", flag);
GameInteractor_ExecuteOnFlagUnset(FLAG_ITEM_GET_INF, flag);
}
}
/**
@@ -4779,16 +4836,24 @@ s32 Flags_GetInfTable(s32 flag) {
* Sets "infTable" flag.
*/
void Flags_SetInfTable(s32 flag) {
u8 previouslyOff = !Flags_GetInfTable(flag);
gSaveContext.infTable[flag >> 4] |= (1 << (flag & 0xF));
GameInteractor_ExecuteOnFlagSet(FLAG_INF_TABLE, flag);
if (previouslyOff) {
LUSLOG_INFO("InfTable Flag Set - %#x", flag);
GameInteractor_ExecuteOnFlagSet(FLAG_INF_TABLE, flag);
}
}
/**
* Unsets "infTable" flag.
*/
void Flags_UnsetInfTable(s32 flag) {
u8 previouslyOn = Flags_GetInfTable(flag);
gSaveContext.infTable[flag >> 4] &= ~(1 << (flag & 0xF));
GameInteractor_ExecuteOnFlagUnset(FLAG_INF_TABLE, flag);
if (previouslyOn) {
LUSLOG_INFO("InfTable Flag Unset - %#x", flag);
GameInteractor_ExecuteOnFlagUnset(FLAG_INF_TABLE, flag);
}
}
/**
@@ -4802,16 +4867,24 @@ s32 Flags_GetEventInf(s32 flag) {
* Sets "eventInf" flag.
*/
void Flags_SetEventInf(s32 flag) {
u8 previouslyOff = !Flags_GetEventInf(flag);
gSaveContext.eventInf[flag >> 4] |= (1 << (flag & 0xF));
GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_INF, flag);
if (previouslyOff) {
LUSLOG_INFO("EventInf Flag Set - %#x", flag);
GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_INF, flag);
}
}
/**
* Unsets "eventInf" flag.
*/
void Flags_UnsetEventInf(s32 flag) {
u8 previouslyOn = Flags_GetEventInf(flag);
gSaveContext.eventInf[flag >> 4] &= ~(1 << (flag & 0xF));
GameInteractor_ExecuteOnFlagUnset(FLAG_EVENT_INF, flag);
if (previouslyOn) {
LUSLOG_INFO("EventInf Flag Unset - %#x", flag);
GameInteractor_ExecuteOnFlagUnset(FLAG_EVENT_INF, flag);
}
}
/**
@@ -4825,16 +4898,24 @@ s32 Flags_GetRandomizerInf(RandomizerInf flag) {
* Sets "randomizerInf" flag.
*/
void Flags_SetRandomizerInf(RandomizerInf flag) {
u8 previouslyOff = !Flags_GetRandomizerInf(flag);
gSaveContext.randomizerInf[flag >> 4] |= (1 << (flag & 0xF));
GameInteractor_ExecuteOnFlagSet(FLAG_RANDOMIZER_INF, flag);
if (previouslyOff) {
LUSLOG_INFO("RandomizerInf Flag Set - %#x", flag);
GameInteractor_ExecuteOnFlagSet(FLAG_RANDOMIZER_INF, flag);
}
}
/**
* Unsets "randomizerInf" flag.
*/
void Flags_UnsetRandomizerInf(RandomizerInf flag) {
u8 previouslyOn = Flags_GetRandomizerInf(flag);
gSaveContext.randomizerInf[flag >> 4] &= ~(1 << (flag & 0xF));
GameInteractor_ExecuteOnFlagUnset(FLAG_RANDOMIZER_INF, flag);
if (previouslyOn) {
LUSLOG_INFO("RandomizerInf Flag Unset - %#x", flag);
GameInteractor_ExecuteOnFlagUnset(FLAG_RANDOMIZER_INF, flag);
}
}
u32 func_80035BFC(PlayState* play, s16 arg1) {
@@ -6147,7 +6228,7 @@ s32 func_80038154(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, f32 a
actor->focus.pos = actor->world.pos;
actor->focus.pos.y += arg4;
if (!(((play->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE))) {
if (!(((play->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0))) {
var = actor->yawTowardsPlayer - actor->shape.rot.y;
abs_var = ABS(var);
if (abs_var >= 0x4300) {
@@ -6156,7 +6237,7 @@ s32 func_80038154(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, f32 a
}
}
if (((play->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE)) {
if (((play->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0)) {
sp2C = play->view.eye;
} else {
sp2C = player->actor.focus.pos;
@@ -6176,7 +6257,7 @@ s32 func_80038290(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, Vec3f
actor->focus.pos = arg4;
if (!(((play->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE))) {
if (!(((play->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0))) {
var = actor->yawTowardsPlayer - actor->shape.rot.y;
abs_var = ABS(var);
if (abs_var >= 0x4300) {
@@ -6185,7 +6266,7 @@ s32 func_80038290(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, Vec3f
}
}
if (((play->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE)) {
if (((play->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0)) {
sp24 = play->view.eye;
} else {
sp24 = player->actor.focus.pos;

View File

@@ -522,7 +522,7 @@ s32 Camera_GetWaterBoxDataIdx(Camera* camera, f32* waterY) {
return -1;
}
if (!(camera->player->stateFlags1 & 0x8000000)) {
if (!(camera->player->stateFlags1 & PLAYER_STATE1_IN_WATER)) {
// player is not swimming
*waterY = BGCHECK_Y_MIN;
return -1;
@@ -1031,7 +1031,7 @@ s32 Camera_CalcAtForParallel(Camera* camera, VecSph* arg1, f32 yOffset, f32* arg
}
if (camera->playerGroundY == camera->playerPosRot.pos.y || camera->player->actor.gravity > -0.1f ||
camera->player->stateFlags1 & 0x200000) {
camera->player->stateFlags1 & PLAYER_STATE1_CLIMBING_LADDER) {
*arg3 = Camera_LERPCeilF(playerPosRot->pos.y, *arg3, PCT(OREG(43)), 0.1f);
phi_f20 = playerPosRot->pos.y - *arg3;
posOffsetTarget.y -= phi_f20;
@@ -1134,7 +1134,7 @@ s32 Camera_CalcAtForLockOn(Camera* camera, VecSph* eyeAtDir, Vec3f* targetPos, f
tmpPos0.z = tmpPos0.z + lookFromOffset.z;
if (camera->playerGroundY == camera->playerPosRot.pos.y || camera->player->actor.gravity > -0.1f ||
camera->player->stateFlags1 & 0x200000) {
camera->player->stateFlags1 & PLAYER_STATE1_CLIMBING_LADDER) {
*yPosOffset = Camera_LERPCeilF(playerPosRot->pos.y, *yPosOffset, PCT(OREG(43)), 0.1f);
yPosDelta = playerPosRot->pos.y - *yPosOffset;
tmpPos0.y -= yPosDelta;
@@ -1679,7 +1679,9 @@ s32 Camera_Normal1(Camera* camera) {
if (anim->startSwingTimer <= 0) {
// idle camera re-center
if (CVarGetInteger("gA11yDisableIdleCam", 0)) return;
if (CVarGetInteger("gA11yDisableIdleCam", 0)) {
return 1;
}
eyeAdjustment.pitch = atEyeNextGeo.pitch;
eyeAdjustment.yaw =
Camera_LERPCeilS(anim->swingYawTarget, atEyeNextGeo.yaw, 1.0f / camera->yawUpdateRateInv, 0xA);
@@ -2203,7 +2205,7 @@ s32 Camera_Parallel1(Camera* camera) {
}
if (camera->playerGroundY == camera->playerPosRot.pos.y || camera->player->actor.gravity > -0.1f ||
camera->player->stateFlags1 & 0x200000) {
camera->player->stateFlags1 & PLAYER_STATE1_CLIMBING_LADDER) {
anim->yTarget = playerPosRot->pos.y;
sp6A = 0;
} else {
@@ -2907,7 +2909,7 @@ s32 Camera_Battle1(Camera* camera) {
sp78 = batt1->swingPitchFinal;
fov = batt1->fov;
if (camera->player->stateFlags1 & 0x1000) {
if (camera->player->stateFlags1 & PLAYER_STATE1_CHARGING_SPIN_ATTACK) {
// charging sword.
anim->unk_10 = Camera_LERPCeilF(PCT(OREG(12)) * 0.5f, anim->unk_10, PCT(OREG(25)), 0.1f);
camera->xzOffsetUpdateRate = Camera_LERPCeilF(0.2f, camera->xzOffsetUpdateRate, PCT(OREG(25)), 0.1f);
@@ -2978,7 +2980,7 @@ s32 Camera_Battle1(Camera* camera) {
}
if (camera->playerGroundY == camera->playerPosRot.pos.y || camera->player->actor.gravity > -0.1f ||
camera->player->stateFlags1 & 0x200000) {
camera->player->stateFlags1 & PLAYER_STATE1_CLIMBING_LADDER) {
isOffGround = false;
anim->yPosOffset = playerPosRot->pos.y;
} else {
@@ -3303,7 +3305,7 @@ s32 Camera_KeepOn1(Camera* camera) {
anim->unk_0C = NULL;
cont:
if (camera->playerGroundY == camera->playerPosRot.pos.y || camera->player->actor.gravity > -0.1f ||
camera->player->stateFlags1 & 0x200000) {
camera->player->stateFlags1 & PLAYER_STATE1_CLIMBING_LADDER) {
anim->unk_08 = playerPosRot->pos.y;
sp80 = 0;
} else {
@@ -3724,7 +3726,7 @@ s32 Camera_KeepOn4(Camera* camera) {
keep4->unk_04 = playerHeight * 1.6f * yNormal;
keep4->unk_08 = -2.0f;
keep4->unk_0C = 120.0f;
keep4->unk_10 = player->stateFlags1 & 0x8000000 ? 0.0f : 20.0f;
keep4->unk_10 = player->stateFlags1 & PLAYER_STATE1_IN_WATER ? 0.0f : 20.0f;
keep4->unk_1C = 0x3212;
keep4->unk_1E = 0x1E;
keep4->unk_18 = 50.0f;
@@ -4521,7 +4523,7 @@ s32 Camera_Subj4(Camera* camera) {
if ((anim->unk_28 < temp_f16) && !anim->unk_2E) {
player = camera->player;
anim->unk_2E = true;
func_800F4010(&player->actor.projectedPos, player->unk_89E + 0x8B0, 4.0f);
func_800F4010(&player->actor.projectedPos, player->floorSfxOffset + 0x8B0, 4.0f);
} else if (anim->unk_28 > temp_f16) {
anim->unk_2E = false;
}
@@ -4982,7 +4984,7 @@ s32 Camera_Unique0(Camera* camera) {
camera->animState++;
}
if (player->stateFlags1 & 0x20000000) {
if (player->stateFlags1 & PLAYER_STATE1_IN_CUTSCENE) {
anim->initalPos = playerPosRot->pos;
}
@@ -4990,7 +4992,7 @@ s32 Camera_Unique0(Camera* camera) {
if (anim->animTimer > 0) {
anim->animTimer--;
anim->initalPos = playerPosRot->pos;
} else if ((!(player->stateFlags1 & 0x20000000)) &&
} else if ((!(player->stateFlags1 & PLAYER_STATE1_IN_CUTSCENE)) &&
((OLib_Vec3fDistXZ(&playerPosRot->pos, &anim->initalPos) >= 10.0f) ||
CHECK_BTN_ALL(D_8015BD7C->state.input[0].press.button, BTN_A) ||
CHECK_BTN_ALL(D_8015BD7C->state.input[0].press.button, BTN_B) ||
@@ -5018,7 +5020,7 @@ s32 Camera_Unique0(Camera* camera) {
anim->initalPos = playerPosRot->pos;
}
if ((!(player->stateFlags1 & 0x20000000)) &&
if ((!(player->stateFlags1 & PLAYER_STATE1_IN_CUTSCENE)) &&
((0.001f < camera->xzSpeed) || CHECK_BTN_ALL(D_8015BD7C->state.input[0].press.button, BTN_A) ||
CHECK_BTN_ALL(D_8015BD7C->state.input[0].press.button, BTN_B) ||
CHECK_BTN_ALL(D_8015BD7C->state.input[0].press.button, BTN_CLEFT) ||
@@ -5235,7 +5237,7 @@ s32 Camera_Unique9(Camera* camera) {
D_8011D3AC = anim->curKeyFrame->unk_01 & 0xF;
} else if ((anim->curKeyFrame->unk_01 & 0xF0) == 0xC0) {
Camera_UpdateInterface(0xF000 | ((anim->curKeyFrame->unk_01 & 0xF) << 8));
} else if (camera->player->stateFlags1 & 0x8000000 && player->currentBoots != PLAYER_BOOTS_IRON) {
} else if (camera->player->stateFlags1 & PLAYER_STATE1_IN_WATER && player->currentBoots != PLAYER_BOOTS_IRON) {
func_8002DF38(camera->play, camera->target, 8);
osSyncPrintf("camera: demo: player demo set WAIT\n");
} else {
@@ -5610,7 +5612,7 @@ s32 Camera_Unique9(Camera* camera) {
// Set the player's position
camera->player->actor.world.pos.x = anim->playerPos.x;
camera->player->actor.world.pos.z = anim->playerPos.z;
if (camera->player->stateFlags1 & 0x8000000 && player->currentBoots != PLAYER_BOOTS_IRON) {
if (camera->player->stateFlags1 & PLAYER_STATE1_IN_WATER && player->currentBoots != PLAYER_BOOTS_IRON) {
camera->player->actor.world.pos.y = anim->playerPos.y;
}
} else {
@@ -6171,16 +6173,16 @@ s32 Camera_Demo5(Camera* camera) {
sDemo5PrevSfxFrame = camera->play->state.frames;
if (camera->player->stateFlags1 & 0x8000000 && (player->currentBoots != PLAYER_BOOTS_IRON)) {
if (camera->player->stateFlags1 & PLAYER_STATE1_IN_WATER && (player->currentBoots != PLAYER_BOOTS_IRON)) {
// swimming, and not iron boots
player->stateFlags1 |= 0x20000000;
player->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE;
// env frozen
player->actor.freezeTimer = camera->timer;
} else {
sp4A = playerhead.rot.y - playerTargetGeo.yaw;
if (camera->target->category == ACTORCAT_PLAYER) {
pad = camera->play->state.frames - sDemo5PrevAction12Frame;
if (player->stateFlags1 & 0x800) {
if (player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) {
// holding object over head.
func_8002DF54(camera->play, camera->target, 8);
} else if (ABS(pad) > 3000) {
@@ -7240,7 +7242,7 @@ s32 Camera_UpdateWater(Camera* camera) {
}
if (camera->unk_14C & 0x200) {
if (player->stateFlags2 & 0x800) {
if (player->stateFlags2 & PLAYER_STATE2_DIVING) {
Camera_ChangeSettingFlags(camera, CAM_SET_PIVOT_WATER_SURFACE, 6);
camera->unk_14C |= (s16)0x8000;
} else if (camera->unk_14C & (s16)0x8000) {
@@ -7594,7 +7596,7 @@ Vec3s Camera_Update(Camera* camera) {
D_8011D3F0--;
sCameraInterfaceFlags = 0x3200;
Camera_UpdateInterface(sCameraInterfaceFlags);
} else if (camera->play->transitionMode != 0) {
} else if (camera->play->transitionMode != TRANS_MODE_OFF) {
sCameraInterfaceFlags = 0xF200;
Camera_UpdateInterface(sCameraInterfaceFlags);
} else if (camera->play->csCtx.state != CS_STATE_IDLE) {
@@ -7730,9 +7732,9 @@ void Camera_Finish(Camera* camera) {
if ((camera->parentCamIdx == MAIN_CAM) && (camera->csId != 0)) {
player->actor.freezeTimer = 0;
player->stateFlags1 &= ~0x20000000;
player->stateFlags1 &= ~PLAYER_STATE1_IN_CUTSCENE;
if (player->csMode != 0) {
if (player->csAction != 0) {
func_8002DF54(camera->play, &player->actor, 7);
osSyncPrintf("camera: player demo end!!\n");
}
@@ -7933,7 +7935,8 @@ s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) {
return -5;
}
if (setting == CAM_SET_NONE || setting >= CAM_SET_MAX) {
//modified from "==" to "<=" to not crash when "setting" is a negative value
if (setting <= CAM_SET_NONE || setting >= CAM_SET_MAX) {
osSyncPrintf(VT_COL(RED, WHITE) "camera: error: illegal camera set (%d) !!!!\n" VT_RST, setting);
return -99;
}

View File

@@ -14,6 +14,6 @@ void SaveContext_Init(void) {
gSaveContext.nextDayTime = 0xFFFF;
gSaveContext.skyboxTime = 0;
gSaveContext.dogIsLost = true;
gSaveContext.nextTransitionType = 0xFF;
gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT;
gSaveContext.unk_13EE = 50;
}

View File

@@ -430,7 +430,9 @@ void Regs_InitDataImpl(void) {
WREG(28) = 0;
R_OW_MINIMAP_X = 238;
R_OW_MINIMAP_Y = 164;
R_MINIMAP_DISABLED = CVarGetInteger("gMinimalUI", 0);
if (!CVarGetInteger("gEnhancements.RememberMapToggleState", 0)) {
R_MINIMAP_DISABLED = CVarGetInteger("gMinimalUI", 0);
}
WREG(32) = 122;
WREG(33) = 60;
WREG(35) = 0;

File diff suppressed because it is too large Load Diff

View File

@@ -1043,7 +1043,7 @@ void GetItem_DrawTriforcePiece(PlayState* play, s16 drawId) {
Matrix_Scale(0.035f, 0.035f, 0.035f, MTXMODE_APPLY);
uint16_t index = gSaveContext.triforcePiecesCollected % 3;
uint8_t index = gSaveContext.triforcePiecesCollected % 3;
Gfx* triforcePieceDL;
switch (index) {

View File

@@ -203,13 +203,17 @@ s32 EffectBlure_Update(void* thisx) {
EffectBlure* this = (EffectBlure*)thisx;
s32 i;
Color_RGBA8 color;
u8 changed = 0;
static u8 changed = 0;
u8 reset = 0;
switch (this->trailType) { //there HAS to be a better way to do this.
case 2:
if (CVarGetInteger("gCosmetics.Trails_Boomerang.Changed", 0)) {
color = CVarGetColor("gCosmetics.Trails_Boomerang.Value", (Color_RGBA8){ 255, 255, 100, 255 });
changed = 1;
} else if (changed) {
color = (Color_RGBA8){ 255, 255, 100, 255 };
reset = 1;
}
break;
case 3:
@@ -227,36 +231,65 @@ s32 EffectBlure_Update(void* thisx) {
this->p2StartColor.b = color.b * 0.8f;
this->p1EndColor.b = color.b * 0.6f;
this->p2EndColor.b = color.b * 0.4f;
} else if (changed) {
color = (Color_RGBA8){ 250, 0, 0, 255 };
this->p1StartColor.r = color.r;
this->p2StartColor.r = color.r * 0.8f;
this->p1EndColor.r = color.r * 0.6f;
this->p2EndColor.r = color.r * 0.4f;
this->p1StartColor.g = color.g;
this->p2StartColor.g = color.g * 0.8f;
this->p1EndColor.g = color.g * 0.6f;
this->p2EndColor.g = color.g * 0.4f;
this->p1StartColor.b = color.b;
this->p2StartColor.b = color.b * 0.8f;
this->p1EndColor.b = color.b * 0.6f;
this->p2EndColor.b = color.b * 0.4f;
}
break;
case 4:
if (CVarGetInteger("gCosmetics.Trails_KokiriSword.Changed", 0)) {
color = CVarGetColor("gCosmetics.Trails_KokiriSword.Value", (Color_RGBA8){ 255, 255, 255, 255 });
changed = 1;
} else if (changed) {
color = (Color_RGBA8){ 255, 255, 255, 255 };
reset = 1;
}
break;
case 5:
if (CVarGetInteger("gCosmetics.Trails_MasterSword.Changed", 0)) {
color = CVarGetColor("gCosmetics.Trails_MasterSword.Value", (Color_RGBA8){ 255, 255, 255, 255 });
changed = 1;
} else if (changed) {
color = (Color_RGBA8){ 255, 255, 255, 255 };
reset = 1;
}
break;
case 6:
if (CVarGetInteger("gCosmetics.Trails_BiggoronSword.Changed", 0)) {
color = CVarGetColor("gCosmetics.Trails_BiggoronSword.Value", (Color_RGBA8){ 255, 255, 255, 255 });
changed = 1;
} else if (changed) {
color = (Color_RGBA8){ 255, 255, 255, 255 };
reset = 1;
}
break;
case 7:
if (CVarGetInteger("gCosmetics.Trails_Stick.Changed", 0)) {
color = CVarGetColor("gCosmetics.Trails_Stick.Value", (Color_RGBA8){ 255, 255, 255, 255 });
changed = 1;
} else if (changed) {
color = (Color_RGBA8){ 255, 255, 255, 255 };
reset = 1;
}
break;
case 8:
if (CVarGetInteger("gCosmetics.Trails_Hammer.Changed", 0)) {
color = CVarGetColor("gCosmetics.Trails_Hammer.Value", (Color_RGBA8){ 255, 255, 255, 255 });
changed = 1;
} else if (changed) {
color = (Color_RGBA8){ 255, 255, 255, 255 };
reset = 1;
}
break;
default: // don't do anything
@@ -278,6 +311,9 @@ s32 EffectBlure_Update(void* thisx) {
this->p1EndColor.b = color.b;
this->p2EndColor.b = color.b;
}
if (reset) {
changed = 0;
}
// Don't override boomerang and bombchu trail durations
if (this->trailType != 2 && this->trailType != 3) {

View File

@@ -39,16 +39,16 @@ Gfx __sCircleDList[] = {
void TransitionCircle_Start(void* thisx) {
TransitionCircle* this = (TransitionCircle*)thisx;
this->isDone = 0;
this->isDone = false;
switch (this->effect) {
case 1:
switch (this->appearanceType) {
case TCA_WAVE:
this->texture = sTransCircleWaveTex;
break;
case 2:
case TCA_RIPPLE:
this->texture = sTransCircleRippleTex;
break;
case 3:
case TCA_STARBURST:
this->texture = sTransCircleStarburstTex;
break;
default:
@@ -56,34 +56,34 @@ void TransitionCircle_Start(void* thisx) {
break;
}
if (this->speed == 0) {
this->step = 0x14;
if (this->speedType == TCS_FAST) {
this->speed = 20;
} else {
this->step = 0xA;
this->speed = 10;
}
if (this->typeColor == 0) {
if (this->colorType == TCC_BLACK) {
this->color.rgba = RGBA8(0, 0, 0, 255);
} else if (this->typeColor == 1) {
} else if (this->colorType == TCC_WHITE) {
this->color.rgba = RGBA8(160, 160, 160, 255);
} else if (this->typeColor == 2) {
} else if (this->colorType == TCC_GRAY) {
// yes, really.
this->color.r = 100;
this->color.g = 100;
this->color.b = 100;
this->color.a = 255;
} else {
this->step = 0x28;
this->color.rgba = this->effect == 1 ? RGBA8(0, 0, 0, 255) : RGBA8(160, 160, 160, 255);
this->speed = 40;
this->color.rgba = this->appearanceType == TCA_WAVE ? RGBA8(0, 0, 0, 255) : RGBA8(160, 160, 160, 255);
}
if (this->unk_14 != 0) {
if (this->direction != 0) {
this->texY = 0;
if (this->typeColor == 3) {
if (this->colorType == TCC_SPECIAL) {
this->texY = 0xFA;
}
} else {
this->texY = 0x1F4;
if (this->effect == 2) {
if (this->appearanceType == TCA_RIPPLE) {
Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_OUT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
}
@@ -106,28 +106,28 @@ void TransitionCircle_Update(void* thisx, s32 updateRate) {
s32 temp_t2;
s32 temp_t3;
if (this->unk_14 != 0) {
if (this->direction != 0) {
if (this->texY == 0) {
if (this->effect == 2) {
if (this->appearanceType == TCA_RIPPLE) {
Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_IN, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
}
this->texY += this->step * 3 / updateRate;
this->texY += this->speed * 3 / updateRate;
if (this->texY >= 0x1F4) {
this->texY = 0x1F4;
this->isDone = 1;
this->isDone = true;
}
} else {
this->texY -= this->step * 3 / updateRate;
if (this->typeColor != 3) {
this->texY -= this->speed * 3 / updateRate;
if (this->colorType != TCC_SPECIAL) {
if (this->texY <= 0) {
this->texY = 0;
this->isDone = 1;
this->isDone = true;
}
} else {
if (this->texY < 0xFB) {
this->texY = 0xFA;
this->isDone = 1;
this->isDone = true;
}
}
}
@@ -194,15 +194,17 @@ s32 TransitionCircle_IsDone(void* thisx) {
void TransitionCircle_SetType(void* thisx, s32 type) {
TransitionCircle* this = (TransitionCircle*)thisx;
if (type & 0x80) {
this->unk_14 = (type >> 5) & 0x1;
this->typeColor = (type >> 3) & 0x3;
this->speed = type & 0x1;
this->effect = (type >> 1) & 0x3;
if (type & TC_SET_PARAMS) {
// SetType is called twice for circles, the actual direction value will be set on the second call.
// The direction set here will be overwritten on that second call.
this->direction = (type >> 5) & 0x1;
this->colorType = (type >> 3) & 0x3;
this->speedType = type & 0x1;
this->appearanceType = (type >> 1) & 0x3;
} else if (type == 1) {
this->unk_14 = 1;
this->direction = 1;
} else {
this->unk_14 = 0;
this->direction = 0;
}
}

View File

@@ -64,18 +64,18 @@ void TransitionWipe_Destroy(void* thisx) {
void TransitionWipe_Update(void* thisx, s32 updateRate) {
TransitionWipe* this = (TransitionWipe*)thisx;
u8 unk1419;
u8 speed;
if (this->direction != 0) {
unk1419 = gSaveContext.transWipeSpeed;
this->texY += (unk1419 * 3) / updateRate;
speed = gSaveContext.transWipeSpeed;
this->texY += (speed * 3) / updateRate;
if (this->texY >= 0x264) {
this->texY = 0x264;
this->isDone = 1;
}
} else {
unk1419 = gSaveContext.transWipeSpeed;
this->texY -= (unk1419 * 3) / updateRate;
speed = gSaveContext.transWipeSpeed;
this->texY -= (speed * 3) / updateRate;
if (this->texY < 0x14E) {
this->texY = 0x14D;
this->isDone = 1;

View File

@@ -18,9 +18,10 @@ s32 FrameAdvance_Update(FrameAdvanceContext* frameAdvCtx, Input* input) {
frameAdvCtx->enabled = !frameAdvCtx->enabled;
}
if (!frameAdvCtx->enabled || (CHECK_BTN_ALL(input->cur.button, BTN_Z) &&
if (!frameAdvCtx->enabled || CVarGetInteger("gFrameAdvance", 0) || (CHECK_BTN_ALL(input->cur.button, BTN_Z) &&
(CHECK_BTN_ALL(input->press.button, BTN_R) ||
(CHECK_BTN_ALL(input->cur.button, BTN_R) && (++frameAdvCtx->timer >= 9))))) {
CVarClear("gFrameAdvance");
frameAdvCtx->timer = 0;
return true;
}

View File

@@ -68,7 +68,7 @@ void func_8006D0EC(PlayState* play, Player* player) {
horseActor =
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 3586.0f, 1413.0f, -402.0f, 0, 0x4000, 0, 1, true);
horseActor->room = -1;
} else if ((gSaveContext.entranceIndex == 1230) && (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED))) {
} else if ((gSaveContext.entranceIndex == ENTR_LON_LON_RANCH_7) && (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED))) {
Actor* horseActor =
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -25.0f, 0.0f, -1600.0f, 0, -0x4000, 0, 1, true);
assert(horseActor != NULL);
@@ -134,8 +134,8 @@ void func_8006D684(PlayState* play, Player* player) {
s32 i;
Vec3s spawnPos;
if ((gSaveContext.entranceIndex == 0x028A || gSaveContext.entranceIndex == 0x028E ||
gSaveContext.entranceIndex == 0x0292 || gSaveContext.entranceIndex == 0x0476) &&
if ((gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_11 || gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_12 ||
gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_13 || gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_15) &&
(gSaveContext.respawnFlag == 0)) {
Vec3s spawnPositions[] = {
{ 0xF46F, 0x0139, 0x1E14 },
@@ -144,13 +144,13 @@ void func_8006D684(PlayState* play, Player* player) {
{ 0xF6F7, 0x0139, 0x1766 },
};
if (gSaveContext.entranceIndex == 0x028A) {
if (gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_11) {
spawnPos = spawnPositions[0];
} else if (gSaveContext.entranceIndex == 0x028E) {
} else if (gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_12) {
spawnPos = spawnPositions[1];
} else if (gSaveContext.entranceIndex == 0x0292) {
} else if (gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_13) {
spawnPos = spawnPositions[2];
} else {
} else { // entranceIndex == ENTR_HYRULE_FIELD_15
spawnPos = spawnPositions[3];
}
@@ -253,8 +253,8 @@ void func_8006DC68(PlayState* play, Player* player) {
if (func_8006CFC0(play->sceneNum)) {
if ((gSaveContext.sceneSetupIndex > 3) ||
((gSaveContext.entranceIndex == 0x028A || gSaveContext.entranceIndex == 0x028E ||
gSaveContext.entranceIndex == 0x0292 || gSaveContext.entranceIndex == 0x0476) &&
((gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_11 || gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_12 ||
gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_13 || gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_15) &&
(gSaveContext.respawnFlag == 0)) ||
((play->sceneNum == SCENE_LON_LON_RANCH) && ((gSaveContext.eventInf[0] & 0xF) == 6) &&
!Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) && (DREG(1) == 0))) {

View File

@@ -1,5 +1,6 @@
#include "global.h"
#include "vt.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
void (*sKaleidoScopeUpdateFunc)(PlayState* play);
void (*sKaleidoScopeDrawFunc)(PlayState* play);
@@ -56,6 +57,8 @@ void KaleidoScopeCall_Update(PlayState* play) {
KaleidoMgrOverlay* kaleidoScopeOvl = &gKaleidoMgrOverlayTable[KALEIDO_OVL_KALEIDO_SCOPE];
PauseContext* pauseCtx = &play->pauseCtx;
GameInteractor_ExecuteOnKaleidoUpdate();
if (!gSaveContext.sohStats.gameComplete &&
(!IS_BOSS_RUSH || !gSaveContext.isBossRushPaused)) {
gSaveContext.sohStats.pauseTimer++;

View File

@@ -13,7 +13,7 @@ void KaleidoSetup_Update(PlayState* play) {
Input* input = &play->state.input[0];
if (pauseCtx->state == 0 && pauseCtx->debugState == 0 && play->gameOverCtx.state == GAMEOVER_INACTIVE &&
play->sceneLoadFlag == 0 && play->transitionMode == 0 && gSaveContext.cutsceneIndex < 0xFFF0 &&
play->transitionTrigger == TRANS_TRIGGER_OFF && play->transitionMode == TRANS_MODE_OFF && gSaveContext.cutsceneIndex < 0xFFF0 &&
gSaveContext.nextCutsceneIndex < 0xFFF0 && !Play_InCsMode(play) &&
play->shootingGalleryStatus <= 1 && gSaveContext.magicState != MAGIC_STATE_STEP_CAPACITY && gSaveContext.magicState != MAGIC_STATE_FILL &&
(play->sceneNum != SCENE_BOMBCHU_BOWLING_ALLEY || !Flags_GetSwitch(play, 0x38))) {

View File

@@ -289,7 +289,7 @@ void Environment_Init(PlayState* play2, EnvironmentContext* envCtx, s32 unused)
envCtx->skyboxFilterColor[1] = 0;
envCtx->skyboxFilterColor[2] = 0;
envCtx->skyboxFilterColor[3] = 0;
envCtx->sandstormState = 0;
envCtx->sandstormState = SANDSTORM_OFF;
envCtx->sandstormPrimA = 0;
envCtx->sandstormEnvA = 0;
@@ -925,7 +925,7 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
if ((pauseCtx->state == 0) && (gameOverCtx->state == GAMEOVER_INACTIVE)) {
if (((msgCtx->msgLength == 0) && (msgCtx->msgMode == 0)) || (((void)0, gSaveContext.gameMode) == 3)) {
if ((envCtx->unk_1A == 0) && !FrameAdvance_IsEnabled(play) &&
(play->transitionMode == 0 || ((void)0, gSaveContext.gameMode) != 0)) {
(play->transitionMode == TRANS_MODE_OFF || ((void)0, gSaveContext.gameMode) != 0)) {
if (IS_DAY || gTimeIncrement >= 0x190) {
gSaveContext.dayTime += gTimeIncrement;
@@ -1322,7 +1322,7 @@ void Environment_DrawSunAndMoon(PlayState* play) {
play->envCtx.sunPos.z = +(Math_CosS(((void)0, gSaveContext.dayTime) - 0x8000) * 20.0f) * 25.0f;
}
if (gSaveContext.entranceIndex != 0xCD || ((void)0, gSaveContext.sceneSetupIndex) != 5) {
if (gSaveContext.entranceIndex != ENTR_HYRULE_FIELD_0 || ((void)0, gSaveContext.sceneSetupIndex) != 5) {
Matrix_Translate(play->view.eye.x + play->envCtx.sunPos.x,
play->view.eye.y + play->envCtx.sunPos.y,
play->view.eye.z + play->envCtx.sunPos.z, MTXMODE_NEW);
@@ -2004,7 +2004,7 @@ void Environment_PlaySceneSequence(PlayState* play) {
play->envCtx.unk_E0 = 0xFF;
// both lost woods exits on the bridge from kokiri to hyrule field
if (((void)0, gSaveContext.entranceIndex) == 0x4DE || ((void)0, gSaveContext.entranceIndex) == 0x5E0) {
if (((void)0, gSaveContext.entranceIndex) == ENTR_LOST_WOODS_8 || ((void)0, gSaveContext.entranceIndex) == ENTR_LOST_WOODS_9) {
Audio_PlayNatureAmbienceSequence(NATURE_ID_KOKIRI_REGION);
} else if (((void)0, gSaveContext.forcedSeqId) != NA_BGM_GENERAL_SFX) {
if (!Environment_IsForcedSequenceDisabled()) {
@@ -2336,7 +2336,7 @@ void Environment_DrawSandstorm(PlayState* play, u8 sandstormState) {
Environment_PatchSandstorm(play);
switch (sandstormState) {
case 3:
case SANDSTORM_ACTIVE:
if ((play->sceneNum == SCENE_HAUNTED_WASTELAND) && (play->roomCtx.curRoom.num == 0)) {
envA1 = 0;
primA1 = (play->envCtx.sandstormEnvA > 128) ? 255 : play->envCtx.sandstormEnvA >> 1;
@@ -2349,11 +2349,11 @@ void Environment_DrawSandstorm(PlayState* play, u8 sandstormState) {
envA1 = 128;
}
break;
case 1:
case SANDSTORM_FILL:
primA1 = 255;
envA1 = (play->envCtx.sandstormPrimA >= 255) ? 255 : 128;
break;
case 2:
case SANDSTORM_UNFILL:
envA1 = 128;
if (play->envCtx.sandstormEnvA > 128) {
primA1 = 0xFF;
@@ -2365,15 +2365,15 @@ void Environment_DrawSandstorm(PlayState* play, u8 sandstormState) {
primA1 += 73;
}
if ((primA1 >= primA) && (primA1 != 255)) {
play->envCtx.sandstormState = 3;
play->envCtx.sandstormState = SANDSTORM_ACTIVE;
}
break;
case 4:
case SANDSTORM_DISSIPATE:
envA1 = 0;
primA1 = (play->envCtx.sandstormEnvA > 128) ? 255 : play->envCtx.sandstormEnvA >> 1;
if (primA == 0) {
play->envCtx.sandstormState = 0;
play->envCtx.sandstormState = SANDSTORM_OFF;
}
break;
}
@@ -2541,27 +2541,27 @@ void Environment_WarpSongLeave(PlayState* play) {
gSaveContext.cutsceneIndex = 0;
gSaveContext.respawnFlag = -3;
play->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_RETURN].entranceIndex;
play->sceneLoadFlag = 0x14;
play->fadeTransition = 3;
gSaveContext.nextTransitionType = 3;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
switch (play->nextEntranceIndex) {
case 0x147:
case ENTR_DEATH_MOUNTAIN_CRATER_0:
Flags_SetEventChkInf(EVENTCHKINF_ENTERED_DEATH_MOUNTAIN_CRATER);
break;
case 0x0102:
case ENTR_LAKE_HYLIA_0:
Flags_SetEventChkInf(EVENTCHKINF_ENTERED_LAKE_HYLIA);
break;
case 0x0123:
case ENTR_DESERT_COLOSSUS_0:
Flags_SetEventChkInf(EVENTCHKINF_ENTERED_DESERT_COLOSSUS);
break;
case 0x00E4:
case ENTR_GRAVEYARD_0:
Flags_SetEventChkInf(EVENTCHKINF_ENTERED_GRAVEYARD);
break;
case 0x0053:
case ENTR_TEMPLE_OF_TIME_0:
Flags_SetEventChkInf(EVENTCHKINF_ENTERED_TEMPLE_OF_TIME);
break;
case 0x00FC:
case ENTR_SACRED_FOREST_MEADOW_0:
break;
}
}

View File

@@ -601,13 +601,24 @@ void HealthMeter_Draw(PlayState* play) {
{
Mtx* matrix = Graph_Alloc(gfxCtx, sizeof(Mtx));
Matrix_SetTranslateScaleMtx2(matrix,
HeartsScale+(HeartsScale/3) - ((HeartsScale/3) * sp144),
HeartsScale+(HeartsScale/3) - ((HeartsScale/3) * sp144),
HeartsScale+(HeartsScale/3) - ((HeartsScale/3) * sp144),
-130+offsetX, //Pos X
(-94+offsetY) *-1, //Pos Y
0.0f);
if (CVarGetInteger("gNoHUDHeartAnimation", 0)) {
Matrix_SetTranslateScaleMtx2(matrix,
HeartsScale, // Scale X
HeartsScale, // Scale Y
HeartsScale, // Scale Z
-130 + offsetX, // Pos X
(-94 + offsetY) * -1, // Pos Y
0.0f);
} else {
Matrix_SetTranslateScaleMtx2(matrix, HeartsScale + (HeartsScale / 3) - ((HeartsScale / 3) * sp144),
HeartsScale + (HeartsScale / 3) - ((HeartsScale / 3) * sp144),
HeartsScale + (HeartsScale / 3) - ((HeartsScale / 3) * sp144),
-130 + offsetX, // Pos X
(-94 + offsetY) * -1, // Pos Y
0.0f);
}
gSPMatrix(OVERLAY_DISP++, matrix, G_MTX_MODELVIEW | G_MTX_LOAD);
gSPVertex(OVERLAY_DISP++, sp154, 4, 0);
gSP1Quadrangle(OVERLAY_DISP++, 0, 2, 3, 1, 0);

View File

@@ -454,19 +454,20 @@ void Message_SetTextColor(MessageContext* msgCtx, u16 colorParameter) {
}
void Message_DrawTextboxIcon(PlayState* play, Gfx** p, s16 x, s16 y) {
static Color_RGB8 sIconPrimColors[2] = {
// SoH [Cosmetics] The following Color_RGB8 were originally static
Color_RGB8 sIconPrimColors[2] = {
{ 0, 80, 200 },
{ 50, 130, 255 },
};
static Color_RGB8 sIconEnvColors[2] = {
Color_RGB8 sIconEnvColors[2] = {
{ 0, 0, 0 },
{ 0, 130, 255 },
};
if (CVarGetInteger("gCosmetics.Hud_AButton.Changed", 0)) {
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_AButton.Value", (Color_RGB8){ 50, 130, 255 });
sIconPrimColors[0].r = (color.r / 255) * 95;
sIconPrimColors[0].g = (color.g / 255) * 95;
sIconPrimColors[0].b = (color.b / 255) * 95;
sIconPrimColors[0].r = color.r - 50;
sIconPrimColors[0].g = color.g - 50;
sIconPrimColors[0].b = color.b - 50;
sIconPrimColors[1] = color;
sIconEnvColors[1] = color;
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
@@ -2007,19 +2008,21 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
static void* sOcarinaNoteTextures[] = {
gOcarinaBtnIconATex, gOcarinaBtnIconCDownTex, gOcarinaBtnIconCRightTex, gOcarinaBtnIconCLeftTex, gOcarinaBtnIconCUpTex,
};
static Color_RGB8 sOcarinaNoteAPrimColors[2] = {
// SoH [Cosmetics] The following Color_RGB8 were originally static
Color_RGB8 sOcarinaNoteAPrimColors[2] = {
{ 80, 150, 255 },
{ 100, 200, 255 },
};
static Color_RGB8 sOcarinaNoteAEnvColors[2] = {
Color_RGB8 sOcarinaNoteAEnvColors[2] = {
{ 10, 10, 10 },
{ 50, 50, 255 },
};
if (CVarGetInteger("gCosmetics.Hud_AButton.Changed", 0)) {
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_AButton.Value", (Color_RGB8){ 100, 200, 255 });
sOcarinaNoteAPrimColors[0].r = (color.r / 255) * 95;
sOcarinaNoteAPrimColors[0].g = (color.g / 255) * 95;
sOcarinaNoteAPrimColors[0].b = (color.b / 255) * 95;
sOcarinaNoteAPrimColors[0].r = (color.r / 255.0f) * 95;
sOcarinaNoteAPrimColors[0].g = (color.g / 255.0f) * 95;
sOcarinaNoteAPrimColors[0].b = (color.b / 255.0f) * 95;
sOcarinaNoteAPrimColors[1] = color;
sOcarinaNoteAEnvColors[1] = color;
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
@@ -2028,11 +2031,11 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
sOcarinaNoteAEnvColors[1] = (Color_RGB8){ 50, 255, 50 };
}
static Color_RGB8 sOcarinaNoteCPrimColors[2] = {
Color_RGB8 sOcarinaNoteCPrimColors[2] = {
{ 255, 255, 50 },
{ 255, 255, 180 },
};
static Color_RGB8 sOcarinaNoteCEnvColors[2] = {
Color_RGB8 sOcarinaNoteCEnvColors[2] = {
{ 10, 10, 10 },
{ 110, 110, 50 },
};
@@ -2040,16 +2043,16 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_CButtons.Value", (Color_RGB8){ 100, 200, 255 });
sOcarinaNoteCPrimColors[0] = color;
sOcarinaNoteCPrimColors[1] = color;
sOcarinaNoteCEnvColors[1].r = (color.r / 255) * 95;
sOcarinaNoteCEnvColors[1].g = (color.g / 255) * 95;
sOcarinaNoteCEnvColors[1].b = (color.b / 255) * 95;
sOcarinaNoteCEnvColors[1].r = (color.r / 255.0f) * 95;
sOcarinaNoteCEnvColors[1].g = (color.g / 255.0f) * 95;
sOcarinaNoteCEnvColors[1].b = (color.b / 255.0f) * 95;
}
static Color_RGB8 sOcarinaNoteCUpPrimColors[2] = {
Color_RGB8 sOcarinaNoteCUpPrimColors[2] = {
{ 255, 255, 50 },
{ 255, 255, 180 },
};
static Color_RGB8 sOcarinaNoteCUpEnvColors[2] = {
Color_RGB8 sOcarinaNoteCUpEnvColors[2] = {
{ 10, 10, 10 },
{ 110, 110, 50 },
};
@@ -2057,16 +2060,16 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_CUpButton.Value", (Color_RGB8){ 100, 200, 255 });
sOcarinaNoteCUpPrimColors[0] = color;
sOcarinaNoteCUpPrimColors[1] = color;
sOcarinaNoteCUpEnvColors[1].r = (color.r / 255) * 95;
sOcarinaNoteCUpEnvColors[1].g = (color.g / 255) * 95;
sOcarinaNoteCUpEnvColors[1].b = (color.b / 255) * 95;
sOcarinaNoteCUpEnvColors[1].r = (color.r / 255.0f) * 95;
sOcarinaNoteCUpEnvColors[1].g = (color.g / 255.0f) * 95;
sOcarinaNoteCUpEnvColors[1].b = (color.b / 255.0f) * 95;
}
static Color_RGB8 sOcarinaNoteCDownPrimColors[2] = {
Color_RGB8 sOcarinaNoteCDownPrimColors[2] = {
{ 255, 255, 50 },
{ 255, 255, 180 },
};
static Color_RGB8 sOcarinaNoteCDownEnvColors[2] = {
Color_RGB8 sOcarinaNoteCDownEnvColors[2] = {
{ 10, 10, 10 },
{ 110, 110, 50 },
};
@@ -2074,16 +2077,16 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_CDownButton.Value", (Color_RGB8){ 100, 200, 255 });
sOcarinaNoteCDownPrimColors[0] = color;
sOcarinaNoteCDownPrimColors[1] = color;
sOcarinaNoteCDownEnvColors[1].r = (color.r / 255) * 95;
sOcarinaNoteCDownEnvColors[1].g = (color.g / 255) * 95;
sOcarinaNoteCDownEnvColors[1].b = (color.b / 255) * 95;
sOcarinaNoteCDownEnvColors[1].r = (color.r / 255.0f) * 95;
sOcarinaNoteCDownEnvColors[1].g = (color.g / 255.0f) * 95;
sOcarinaNoteCDownEnvColors[1].b = (color.b / 255.0f) * 95;
}
static Color_RGB8 sOcarinaNoteCLeftPrimColors[2] = {
Color_RGB8 sOcarinaNoteCLeftPrimColors[2] = {
{ 255, 255, 50 },
{ 255, 255, 180 },
};
static Color_RGB8 sOcarinaNoteCLeftEnvColors[2] = {
Color_RGB8 sOcarinaNoteCLeftEnvColors[2] = {
{ 10, 10, 10 },
{ 110, 110, 50 },
};
@@ -2091,16 +2094,16 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_CLeftButton.Value", (Color_RGB8){ 100, 200, 255 });
sOcarinaNoteCLeftPrimColors[0] = color;
sOcarinaNoteCLeftPrimColors[1] = color;
sOcarinaNoteCLeftEnvColors[1].r = (color.r / 255) * 95;
sOcarinaNoteCLeftEnvColors[1].g = (color.g / 255) * 95;
sOcarinaNoteCLeftEnvColors[1].b = (color.b / 255) * 95;
sOcarinaNoteCLeftEnvColors[1].r = (color.r / 255.0f) * 95;
sOcarinaNoteCLeftEnvColors[1].g = (color.g / 255.0f) * 95;
sOcarinaNoteCLeftEnvColors[1].b = (color.b / 255.0f) * 95;
}
static Color_RGB8 sOcarinaNoteCRightPrimColors[2] = {
Color_RGB8 sOcarinaNoteCRightPrimColors[2] = {
{ 255, 255, 50 },
{ 255, 255, 180 },
};
static Color_RGB8 sOcarinaNoteCRightEnvColors[2] = {
Color_RGB8 sOcarinaNoteCRightEnvColors[2] = {
{ 10, 10, 10 },
{ 110, 110, 50 },
};
@@ -2108,9 +2111,9 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_CRightButton.Value", (Color_RGB8){ 100, 200, 255 });
sOcarinaNoteCRightPrimColors[0] = color;
sOcarinaNoteCRightPrimColors[1] = color;
sOcarinaNoteCRightEnvColors[1].r = (color.r / 255) * 95;
sOcarinaNoteCRightEnvColors[1].g = (color.g / 255) * 95;
sOcarinaNoteCRightEnvColors[1].b = (color.b / 255) * 95;
sOcarinaNoteCRightEnvColors[1].r = (color.r / 255.0f) * 95;
sOcarinaNoteCRightEnvColors[1].g = (color.g / 255.0f) * 95;
sOcarinaNoteCRightEnvColors[1].b = (color.b / 255.0f) * 95;
}
static s16 sOcarinaNoteFlashTimer = 12;
@@ -3364,8 +3367,13 @@ void Message_Update(PlayState* play) {
}
if ((s32)(gSaveContext.inventory.questItems & 0xF0000000) == 0x40000000) {
gSaveContext.inventory.questItems ^= 0x40000000;
gSaveContext.healthCapacity += 0x10;
gSaveContext.health += 0x10;
if (!CVarGetInteger("gHurtContainer", 0)) {
gSaveContext.healthCapacity += 0x10;
gSaveContext.health += 0x10;
} else {
gSaveContext.healthCapacity -= 0x10;
gSaveContext.health -= 0x10;
}
}
if (msgCtx->ocarinaAction != OCARINA_ACTION_CHECK_NOWARP_DONE) {
if (sLastPlayedSong == OCARINA_SONG_SARIAS) {

View File

@@ -69,7 +69,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
PosRot sp8C;
f32 tempRand;
Unique9OnePointCs* csInfo = ONEPOINT_CS_INFO(csCam);
// #region SOH [Enhancement]
//the default is 90, lower values necessary to prevent camera swing as animation speeds up
s16 camCrawlTemp = CVarGetInteger("gCrawlSpeed", 1);
s16 camCrawlTimer = D_8012042C / camCrawlTemp;
// #endregion
switch (csId) {
case 1020:
if (timer < 20) {
@@ -330,13 +336,26 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
case 9601:
Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
Play_CameraChangeSetting(play, MAIN_CAM, mainCam->prevSetting);
OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120398);
if (CVarGetInteger("gCrawlSpeed", 1) > 1) {
OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, camCrawlTimer, D_80120308, D_80120398);
} else {
OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120398);
}
break;
case 9602:
Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
Play_CameraChangeSetting(play, MAIN_CAM, mainCam->prevSetting);
OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120434);
break;
// #region SOH [Enhancement]
if (CVarGetInteger("gCrawlSpeed", 1) > 1) {
Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
Play_CameraChangeSetting(play, MAIN_CAM, mainCam->prevSetting);
OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, camCrawlTimer, D_80120308, D_80120434);
break;
// #endregion
} else {
Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
Play_CameraChangeSetting(play, MAIN_CAM, mainCam->prevSetting);
OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120434);
break;
}
case 4175:
csInfo->keyFrames = D_8012147C;
csInfo->keyFrameCnt = 4;
@@ -615,7 +634,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
Play_CameraSetAtEye(play, camIdx, &spC0, &spB4);
csCam->roll = 0;
csCam->fov = 75.0f;
player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = spD0.yaw + 0x7FFF;
player->actor.shape.rot.y = player->actor.world.rot.y = player->yaw = spD0.yaw + 0x7FFF;
func_8002DF54(play, NULL, 8);
break;
case 3240:
@@ -655,7 +674,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
Quake_SetCountdown(i, D_80120698 - 20);
break;
case 3390:
player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = -0x3FD9;
player->actor.shape.rot.y = player->actor.world.rot.y = player->yaw = -0x3FD9;
csInfo->keyFrames = D_80121DB4;
csInfo->keyFrameCnt = 9;
@@ -678,7 +697,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
D_80121F1C[0].eyeTargetInit = play->view.eye;
D_80121F1C[0].fovTargetInit = play->view.fovy;
Actor_GetFocus(&spA0, actor);
player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = spA0.rot.y;
player->actor.shape.rot.y = player->actor.world.rot.y = player->yaw = spA0.rot.y;
csInfo->keyFrames = D_80121F1C;
csInfo->keyFrameCnt = 4;
@@ -769,7 +788,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
func_8002DF54(play, NULL, 8);
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
player->stateFlags1 |= 0x20000000;
player->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE;
player->actor.freezeTimer = 90;
i = Quake_Add(csCam, 1);
@@ -798,7 +817,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
csInfo->keyFrameCnt = 2;
}
player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = 0x3FFC;
player->actor.shape.rot.y = player->actor.world.rot.y = player->yaw = 0x3FFC;
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
func_8002DF54(play, NULL, 8);
break;
@@ -971,7 +990,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
if (func_800C0CB8(play)) {
D_801231B4[0].eyeTargetInit.z = D_801231B4[1].eyeTargetInit.z = !LINK_IS_ADULT ? 100.0f : 120.0f;
if (player->stateFlags1 & 0x08000000) {
if (player->stateFlags1 & PLAYER_STATE1_IN_WATER) {
D_801231B4[2].atTargetInit.z = 0.0f;
}
Actor_GetWorldPosShapeRot(&spA0, &player->actor);

View File

@@ -893,7 +893,7 @@ void func_80083108(PlayState* play) {
Interface_ChangeAlpha(6);
}
if (play->transitionMode != 0) {
if (play->transitionMode != TRANS_MODE_OFF) {
Interface_ChangeAlpha(1);
} else if (gSaveContext.minigameState == 1) {
Interface_ChangeAlpha(8);
@@ -1344,7 +1344,7 @@ void func_80083108(PlayState* play) {
if (sp28) {
gSaveContext.unk_13EA = 0;
if ((play->sceneLoadFlag == 0) && (play->transitionMode == 0)) {
if ((play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF)) {
Interface_ChangeAlpha(50);
osSyncPrintf("???????? alpha_change( 50 ); ?????\n");
} else {
@@ -1738,7 +1738,7 @@ void GameplayStats_SetTimestamp(PlayState* play, u8 item) {
}
// Use ITEM_KEY_BOSS only for Ganon's boss key - not any other boss keys
if (play != NULL) {
if (item == ITEM_KEY_BOSS && play->sceneNum != 13 && play->sceneNum != 10) {
if (item == ITEM_KEY_BOSS && play->sceneNum != SCENE_INSIDE_GANONS_CASTLE && play->sceneNum != SCENE_GANONS_TOWER) {
return;
}
}
@@ -1815,15 +1815,25 @@ u8 Return_Item_Entry(GetItemEntry itemEntry, ItemID returnItem ) {
u8 Return_Item(u8 itemID, ModIndex modId, ItemID returnItem) {
// ITEM_SOLD_OUT doesn't have an ItemTable entry, so pass custom entry instead
if (itemID == ITEM_SOLD_OUT) {
GetItemEntry gie = { ITEM_SOLD_OUT, 0, 0, 0, 0, 0, 0, 0, false, ITEM_FROM_NPC, ITEM_CATEGORY_LESSER, NULL };
GetItemEntry gie = { ITEM_SOLD_OUT, 0, 0, 0, 0, 0, 0, 0, 0, false, ITEM_FROM_NPC, ITEM_CATEGORY_LESSER, NULL };
return Return_Item_Entry(gie, returnItem);
}
int32_t get = GetGIID(itemID);
if (get == -1) {
modId = MOD_RANDOMIZER;
get = itemID;
GetItemID getItemID = RetrieveGetItemIDFromItemID(itemID);
if (getItemID != GI_MAX) {
// Vanilla ItemID with an associated GetItemID
return Return_Item_Entry(ItemTable_RetrieveEntry(modId, getItemID), returnItem);
}
return Return_Item_Entry(ItemTable_RetrieveEntry(modId, get), returnItem);
RandomizerGet randomizerGet = RetrieveRandomizerGetFromItemID(itemID);
if (randomizerGet != RG_MAX) {
// Vanilla ItemID with an associated RandomizerGet (These are items in extendedVanillaGetItemTable)
return Return_Item_Entry(ItemTable_RetrieveEntry(MOD_RANDOMIZER, randomizerGet), returnItem);
}
// All randomizer items should go through Randomizer_Item_Give, so this should never be reached
// but leaving this here just in case, as it was in the original behavior
return Return_Item_Entry(ItemTable_RetrieveEntry(MOD_RANDOMIZER, itemID), returnItem);
}
/**
@@ -2268,8 +2278,13 @@ u8 Item_Give(PlayState* play, u8 item) {
gSaveContext.sohStats.heartPieces++;
return Return_Item(item, MOD_NONE, ITEM_NONE);
} else if (item == ITEM_HEART_CONTAINER) {
gSaveContext.healthCapacity += 0x10;
gSaveContext.health += 0x10;
if (!CVarGetInteger("gHurtContainer", 0)) {
gSaveContext.healthCapacity += 0x10;
gSaveContext.health += 0x10;
} else {
gSaveContext.healthCapacity -= 0x10;
gSaveContext.health -= 0x10;
}
gSaveContext.sohStats.heartContainers++;
return Return_Item(item, MOD_NONE, ITEM_NONE);
} else if (item == ITEM_HEART) {
@@ -2619,6 +2634,7 @@ u16 Randomizer_Item_Give(PlayState* play, GetItemEntry giEntry) {
if (gSaveContext.triforcePiecesCollected == Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED)) {
gSaveContext.sohStats.itemTimestamp[TIMESTAMP_TRIFORCE_COMPLETED] = GAMEPLAYSTAT_TOTAL_TIME;
gSaveContext.sohStats.gameComplete = 1;
Flags_SetRandomizerInf(RAND_INF_GRANT_GANONS_BOSSKEY);
Play_PerformSave(play);
GameInteractor_SetTriforceHuntCreditsWarpActive(true);
}
@@ -3477,7 +3493,7 @@ void Interface_UpdateMagicBar(PlayState* play) {
case MAGIC_STATE_CONSUME_LENS:
if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0) &&
(msgCtx->msgMode == MSGMODE_NONE) && (play->gameOverCtx.state == GAMEOVER_INACTIVE) &&
(play->sceneLoadFlag == 0) && (play->transitionMode == 0) && !Play_InCsMode(play)) {
(play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF) && !Play_InCsMode(play)) {
bool hasLens = false;
for (int buttonIndex = 1; buttonIndex < (CVarGetInteger("gDpadEquips", 0) != 0) ? ARRAY_COUNT(gSaveContext.equips.buttonItems) : 4; buttonIndex++) {
if (gSaveContext.equips.buttonItems[buttonIndex] == ITEM_LENS) {
@@ -3572,7 +3588,7 @@ void Interface_DrawLineupTick(PlayState* play) {
s16 width = 32;
s16 height = 32;
s16 x = -8 + (SCREEN_WIDTH / 2);
s16 y = CVarGetInteger("gOpenMenuBar", 0) ? -4 : -6;
s16 y = -6;
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gEmptyCDownArrowTex, width, height, x, y, width, height, 2 << 10, 2 << 10);
@@ -3821,7 +3837,7 @@ void Interface_DrawEnemyHealthBar(TargetContext* targetCtx, PlayState* play) {
Interface_CreateQuadVertexGroup(&sEnemyHealthVtx[12], -floorf(halfBarWidth) + endTexWidth, (-texHeight / 2) + 3,
healthBarFill, 7, 0);
if (((!(player->stateFlags1 & 0x40)) || (actor != player->unk_664)) && targetCtx->unk_44 < 500.0f) {
if (((!(player->stateFlags1 & PLAYER_STATE1_TEXT_ON_SCREEN)) || (actor != player->unk_664)) && targetCtx->unk_44 < 500.0f) {
f32 slideInOffsetY = 0;
// Slide in the health bar from edge of the screen (mimic the Z-Target triangles fly in)
@@ -4300,7 +4316,7 @@ void Interface_DrawItemButtons(PlayState* play) {
if ((gSaveContext.unk_13EA == 1) || (gSaveContext.unk_13EA == 2) || (gSaveContext.unk_13EA == 5)) {
temp = 0;
} else if ((player->stateFlags1 & 0x00200000) || (Player_GetEnvironmentalHazard(play) == 4) ||
} else if ((player->stateFlags1 & PLAYER_STATE1_CLIMBING_LADDER) || (Player_GetEnvironmentalHazard(play) == 4) ||
(player->stateFlags2 & PLAYER_STATE2_CRAWLING)) {
temp = 70;
} else {
@@ -5085,7 +5101,7 @@ void Interface_Draw(PlayState* play) {
aButtonColor = (Color_RGB8){ 0, 200, 50 };
}
static s16 spoilingItemEntrances[] = { 0x01AD, 0x0153, 0x0153 };
static s16 spoilingItemEntrances[] = { ENTR_LOST_WOODS_2, ENTR_ZORAS_DOMAIN_3, ENTR_ZORAS_DOMAIN_3 };
static f32 D_80125B54[] = { -40.0f, -35.0f }; // unused
static s16 D_80125B5C[] = { 91, 91 }; // unused
static s16 D_8015FFE0;
@@ -5373,7 +5389,7 @@ void Interface_Draw(PlayState* play) {
Interface_DrawItemIconTexture(play, gItemIcons[gSaveContext.equips.buttonItems[0]], 0);
}
if ((player->stateFlags1 & 0x00800000) || (play->shootingGalleryStatus > 1) ||
if ((player->stateFlags1 & PLAYER_STATE1_ON_HORSE) || (play->shootingGalleryStatus > 1) ||
((play->sceneNum == SCENE_BOMBCHU_BOWLING_ALLEY) && Flags_GetSwitch(play, 0x38))) {
if (!fullUi) {
@@ -5802,8 +5818,8 @@ void Interface_Draw(PlayState* play) {
// Trade quest timer reached 0
D_8015FFE6 = 40;
gSaveContext.cutsceneIndex = 0;
play->sceneLoadFlag = 0x14;
play->fadeTransition = 3;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.timer2State = 0;
if ((gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI) &&
@@ -5838,8 +5854,8 @@ void Interface_Draw(PlayState* play) {
if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0) &&
(play->gameOverCtx.state == GAMEOVER_INACTIVE) && (msgCtx->msgMode == MSGMODE_NONE) &&
!(player->stateFlags2 & 0x01000000) && (play->sceneLoadFlag == 0) &&
(play->transitionMode == 0) && !Play_InCsMode(play) && (gSaveContext.minigameState != 1) &&
!(player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
(play->transitionMode == TRANS_MODE_OFF) && !Play_InCsMode(play) && (gSaveContext.minigameState != 1) &&
(play->shootingGalleryStatus <= 1) &&
!((play->sceneNum == SCENE_BOMBCHU_BOWLING_ALLEY) && Flags_GetSwitch(play, 0x38))) {
svar6 = 0;
@@ -6530,8 +6546,8 @@ void Interface_Update(PlayState* play) {
HealthMeter_Update(play);
if ((gSaveContext.timer1State >= 3) && (play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0) &&
(msgCtx->msgMode == MSGMODE_NONE) && !(player->stateFlags2 & 0x01000000) && (play->sceneLoadFlag == 0) &&
(play->transitionMode == 0) && !Play_InCsMode(play)) {}
(msgCtx->msgMode == MSGMODE_NONE) && !(player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
(play->transitionMode == TRANS_MODE_OFF) && !Play_InCsMode(play)) {}
if (gSaveContext.rupeeAccumulator != 0) {
if (gSaveContext.rupeeAccumulator > 0) {
@@ -6569,11 +6585,15 @@ void Interface_Update(PlayState* play) {
gSaveContext.pendingSale = ITEM_NONE;
gSaveContext.pendingSaleMod = MOD_NONE;
if (tempSaleMod == MOD_NONE) {
s16 giid = GetGIID(tempSaleItem);
if (giid == -1) {
tempSaleMod = MOD_RANDOMIZER;
GetItemID getItemID = RetrieveGetItemIDFromItemID(tempSaleItem);
RandomizerGet randomizerGet = RetrieveRandomizerGetFromItemID(tempSaleItem);
if (getItemID != GI_MAX) {
tempSaleItem = getItemID;
} else {
tempSaleItem = giid;
if (randomizerGet != RG_MAX) {
tempSaleItem = randomizerGet;
}
tempSaleMod = MOD_RANDOMIZER;
}
}
GameInteractor_ExecuteOnSaleEndHooks(ItemTable_RetrieveEntry(tempSaleMod, tempSaleItem));
@@ -6626,8 +6646,8 @@ void Interface_Update(PlayState* play) {
WREG(7) = interfaceCtx->unk_1F4;
if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0) &&
(msgCtx->msgMode == MSGMODE_NONE) && (play->sceneLoadFlag == 0) &&
(play->gameOverCtx.state == GAMEOVER_INACTIVE) && (play->transitionMode == 0) &&
(msgCtx->msgMode == MSGMODE_NONE) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
(play->gameOverCtx.state == GAMEOVER_INACTIVE) && (play->transitionMode == TRANS_MODE_OFF) &&
((play->csCtx.state == CS_STATE_IDLE) || !Player_InCsMode(play))) {
if ((gSaveContext.isMagicAcquired != 0) && (gSaveContext.magicLevel == 0)) {
gSaveContext.magicLevel = gSaveContext.isDoubleMagicAcquired + 1;
@@ -6724,19 +6744,19 @@ void Interface_Update(PlayState* play) {
(interfaceCtx->restrictions.sunsSong != 3)) {
if ((gSaveContext.dayTime >= 0x4555) && (gSaveContext.dayTime < 0xC001)) {
gSaveContext.nextDayTime = 0;
play->fadeTransition = 4;
gSaveContext.nextTransitionType = 2;
play->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
play->unk_11DE9 = 1;
} else {
gSaveContext.nextDayTime = 0x8001;
play->fadeTransition = 5;
gSaveContext.nextTransitionType = 3;
play->transitionType = TRANS_TYPE_FADE_WHITE_FAST;
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
play->unk_11DE9 = 1;
}
if (play->sceneNum == SCENE_HAUNTED_WASTELAND) {
play->fadeTransition = 14;
gSaveContext.nextTransitionType = 14;
play->transitionType = TRANS_TYPE_SANDSTORM_PERSIST;
gSaveContext.nextTransitionType = TRANS_TYPE_SANDSTORM_PERSIST;
}
gSaveContext.respawnFlag = -2;
@@ -6747,7 +6767,7 @@ void Interface_Update(PlayState* play) {
Grotto_ForceGrottoReturn();
}
play->sceneLoadFlag = 0x14;
play->transitionTrigger = TRANS_TRIGGER_START;
gSaveContext.sunsSongState = SUNSSONG_INACTIVE;
func_800F6964(30);
gSaveContext.seqId = (u8)NA_BGM_DISABLED;

View File

@@ -72,13 +72,14 @@ void func_800BC590(PlayState* play) {
}
}
void func_800BC5E0(PlayState* play, s32 transitionType) {
void Gameplay_SetupTransition(PlayState* play, s32 transitionType) {
TransitionContext* transitionCtx = &play->transitionCtx;
memset(transitionCtx,0, sizeof(TransitionContext));
transitionCtx->transitionType = transitionType;
// Circle Transition Types
if ((transitionCtx->transitionType >> 5) == 1) {
transitionCtx->init = TransitionCircle_Init;
transitionCtx->destroy = TransitionCircle_Destroy;
@@ -91,7 +92,7 @@ void func_800BC5E0(PlayState* play, s32 transitionType) {
transitionCtx->setEnvColor = TransitionCircle_SetEnvColor;
} else {
switch (transitionCtx->transitionType) {
case 1:
case TRANS_TYPE_TRIFORCE:
transitionCtx->init = TransitionTriforce_Init;
transitionCtx->destroy = TransitionTriforce_Destroy;
transitionCtx->start = TransitionTriforce_Start;
@@ -102,8 +103,8 @@ void func_800BC5E0(PlayState* play, s32 transitionType) {
transitionCtx->setColor = TransitionTriforce_SetColor;
transitionCtx->setEnvColor = NULL;
break;
case 0:
case 8:
case TRANS_TYPE_WIPE:
case TRANS_TYPE_WIPE_FAST:
transitionCtx->init = TransitionWipe_Init;
transitionCtx->destroy = TransitionWipe_Destroy;
transitionCtx->start = TransitionWipe_Start;
@@ -114,16 +115,16 @@ void func_800BC5E0(PlayState* play, s32 transitionType) {
transitionCtx->setColor = TransitionWipe_SetColor;
transitionCtx->setEnvColor = NULL;
break;
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 13:
case 17:
case 18:
case 19:
case TRANS_TYPE_FADE_BLACK:
case TRANS_TYPE_FADE_WHITE:
case TRANS_TYPE_FADE_BLACK_FAST:
case TRANS_TYPE_FADE_WHITE_FAST:
case TRANS_TYPE_FADE_BLACK_SLOW:
case TRANS_TYPE_FADE_WHITE_SLOW:
case TRANS_TYPE_FADE_WHITE_CS_DELAYED:
case TRANS_TYPE_FADE_WHITE_INSTANT:
case TRANS_TYPE_FADE_GREEN:
case TRANS_TYPE_FADE_BLUE:
transitionCtx->init = TransitionFade_Init;
transitionCtx->destroy = TransitionFade_Destroy;
transitionCtx->start = TransitionFade_Start;
@@ -134,24 +135,24 @@ void func_800BC5E0(PlayState* play, s32 transitionType) {
transitionCtx->setColor = TransitionFade_SetColor;
transitionCtx->setEnvColor = NULL;
break;
case 9:
case 10:
play->transitionMode = 4;
case TRANS_TYPE_FILL_WHITE2:
case TRANS_TYPE_FILL_WHITE:
play->transitionMode = TRANS_MODE_FILL_WHITE_INIT;
break;
case 11:
play->transitionMode = 10;
case TRANS_TYPE_INSTANT:
play->transitionMode = TRANS_MODE_INSTANT;
break;
case 12:
play->transitionMode = 7;
case TRANS_TYPE_FILL_BROWN:
play->transitionMode = TRANS_MODE_FILL_BROWN_INIT;
break;
case 14:
play->transitionMode = 12;
case TRANS_TYPE_SANDSTORM_PERSIST:
play->transitionMode = TRANS_MODE_SANDSTORM_INIT;
break;
case 15:
play->transitionMode = 14;
case TRANS_TYPE_SANDSTORM_END:
play->transitionMode = TRANS_MODE_SANDSTORM_END_INIT;
break;
case 16:
play->transitionMode = 16;
case TRANS_TYPE_CS_BLACK_FILL:
play->transitionMode = TRANS_MODE_CS_BLACK_FILL_INIT;
break;
default:
Fault_AddHungupAndCrash(__FILE__, __LINE__);
@@ -200,10 +201,10 @@ void Play_Destroy(GameState* thisx) {
gTrnsnUnkState = 0;
}
if (play->transitionMode == 3) {
if (play->transitionMode == TRANS_MODE_INSTANCE_RUNNING) {
play->transitionCtx.destroy(&play->transitionCtx.data);
func_800BC88C(play);
play->transitionMode = 0;
play->transitionMode = TRANS_MODE_OFF;
}
ShrinkWindow_Destroy();
@@ -228,8 +229,8 @@ void Play_Destroy(GameState* thisx) {
void GivePlayerRandoRewardSongOfTime(PlayState* play, RandomizerCheck check) {
Player* player = GET_PLAYER(play);
if (gSaveContext.entranceIndex == 0x050F && player != NULL && !Player_InBlockingCsMode(play, player) &&
!Flags_GetTreasure(play, 0x1F) && gSaveContext.nextTransitionType == 0xFF && !gSaveContext.pendingIceTrapCount) {
if (gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_16 && player != NULL && !Player_InBlockingCsMode(play, player) &&
!Flags_GetTreasure(play, 0x1F) && gSaveContext.nextTransitionType == TRANS_NEXT_TYPE_DEFAULT && !gSaveContext.pendingIceTrapCount) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_SONG_OF_TIME);
GiveItemEntryWithoutActor(play, getItemEntry);
player->pendingFlag.flagID = 0x1F;
@@ -240,9 +241,9 @@ void GivePlayerRandoRewardSongOfTime(PlayState* play, RandomizerCheck check) {
void GivePlayerRandoRewardNocturne(PlayState* play, RandomizerCheck check) {
Player* player = GET_PLAYER(play);
if ((gSaveContext.entranceIndex == 0x00DB ||
gSaveContext.entranceIndex == 0x0191 ||
gSaveContext.entranceIndex == 0x0195) && LINK_IS_ADULT && CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST) &&
if ((gSaveContext.entranceIndex == ENTR_KAKARIKO_VILLAGE_0 ||
gSaveContext.entranceIndex == ENTR_KAKARIKO_VILLAGE_1 ||
gSaveContext.entranceIndex == ENTR_KAKARIKO_VILLAGE_2) && LINK_IS_ADULT && CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST) &&
CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE) && CHECK_QUEST_ITEM(QUEST_MEDALLION_WATER) && player != NULL &&
!Player_InBlockingCsMode(play, player) && !Flags_GetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL)) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_NOCTURNE_OF_SHADOW);
@@ -256,7 +257,7 @@ void GivePlayerRandoRewardRequiem(PlayState* play, RandomizerCheck check) {
Player* player = GET_PLAYER(play);
if ((gSaveContext.gameMode == 0) && (gSaveContext.respawnFlag <= 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
if ((gSaveContext.entranceIndex == 0x01E1) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT) && player != NULL &&
if ((gSaveContext.entranceIndex == ENTR_DESERT_COLOSSUS_1) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT) && player != NULL &&
!Player_InBlockingCsMode(play, player)) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_SONG_OF_TIME);
GiveItemEntryWithoutActor(play, getItemEntry);
@@ -269,7 +270,7 @@ void GivePlayerRandoRewardRequiem(PlayState* play, RandomizerCheck check) {
void GivePlayerRandoRewardMasterSword(PlayState* play, RandomizerCheck check) {
Player* player = GET_PLAYER(play);
if (gSaveContext.entranceIndex == 0x02CA && LINK_IS_ADULT && player != NULL &&
if (gSaveContext.entranceIndex == ENTR_TEMPLE_OF_TIME_2 && LINK_IS_ADULT && player != NULL &&
!Player_InBlockingCsMode(play, player) && Randomizer_GetSettingValue(RSK_SHUFFLE_MASTER_SWORD) &&
!Flags_GetRandomizerInf(RAND_INF_TOT_MASTER_SWORD)) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_MASTER_SWORD);
@@ -442,7 +443,7 @@ void GivePlayerRandoRewardZeldaLightArrowsGift(PlayState* play, RandomizerCheck
if (meetsRequirements && LINK_IS_ADULT &&
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_TEMPLE_OF_TIME) &&
!Flags_GetTreasure(play, 0x1E) && player != NULL && !Player_InBlockingCsMode(play, player) &&
play->sceneLoadFlag == 0) {
play->transitionTrigger == TRANS_TRIGGER_OFF) {
GetItemEntry getItem = Randomizer_GetItemFromKnownCheck(check, GI_ARROW_LIGHT);
if (GiveItemEntryWithoutActor(play, getItem)) {
player->pendingFlag.flagID = 0x1E;
@@ -453,7 +454,7 @@ void GivePlayerRandoRewardZeldaLightArrowsGift(PlayState* play, RandomizerCheck
void GivePlayerRandoRewardSariaGift(PlayState* play, RandomizerCheck check) {
Player* player = GET_PLAYER(play);
if (gSaveContext.entranceIndex == 0x05E0) {
if (gSaveContext.entranceIndex == ENTR_LOST_WOODS_9) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_ZELDAS_LULLABY);
if (!Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE) && player != NULL && !Player_InBlockingCsMode(play, player)) {
@@ -482,12 +483,12 @@ void Play_Init(GameState* thisx) {
// Skip Child Stealth when option is enabled, Zelda's Letter isn't obtained and Impa's reward hasn't been received
// eventChkInf[4] & 1 = Got Zelda's Letter
// eventChkInf[5] & 0x200 = Got Impa's reward
// entranceIndex 0x7A, Castle Courtyard - Day from crawlspace
// entranceIndex 0x400, Zelda's Courtyard
// entranceIndex 0x7A, ENTR_CASTLE_COURTYARD_GUARDS_DAY_0, Castle Courtyard - Day from crawlspace
// entranceIndex 0x400, ENTR_CASTLE_COURTYARD_ZELDA_0, Zelda's Courtyard
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SKIP_CHILD_STEALTH) &&
!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_ZELDAS_LULLABY)) {
if (gSaveContext.entranceIndex == 0x7A) {
gSaveContext.entranceIndex = 0x400;
if (gSaveContext.entranceIndex == ENTR_CASTLE_COURTYARD_GUARDS_DAY_0) {
gSaveContext.entranceIndex = ENTR_CASTLE_COURTYARD_ZELDA_0;
}
}
@@ -498,7 +499,7 @@ void Play_Init(GameState* thisx) {
}
// Invalid entrance, so immediately exit the game to opening title
if (gSaveContext.entranceIndex == -1) {
if (gSaveContext.entranceIndex == ENTR_LOAD_OPENING) {
gSaveContext.entranceIndex = 0;
play->state.running = false;
SET_NEXT_GAMESTATE(&play->state, Opening_Init, OpeningContext);
@@ -624,12 +625,12 @@ void Play_Init(GameState* thisx) {
PreRender_SetValuesSave(&play->pauseBgPreRender, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 0);
PreRender_SetValues(&play->pauseBgPreRender, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
gTrnsnUnkState = 0;
play->transitionMode = 0;
play->transitionMode = TRANS_MODE_OFF;
if (CVarGetInteger("gSceneTransitions", 255)!= 255){
play->transitionMode = CVarGetInteger("gSceneTransitions", 0);
gSaveContext.nextTransitionType = CVarGetInteger("gSceneTransitions", 0);
play->fadeTransition = CVarGetInteger("gSceneTransitions", 0);
play->transitionType = CVarGetInteger("gSceneTransitions", 0);
}
FrameAdvance_Init(&play->frameAdvCtx);
@@ -637,21 +638,21 @@ void Play_Init(GameState* thisx) {
Matrix_Init(&play->state);
play->state.main = Play_Main;
play->state.destroy = Play_Destroy;
play->sceneLoadFlag = -0x14;
play->transitionTrigger = TRANS_TRIGGER_END;
play->unk_11E16 = 0xFF;
play->unk_11E18 = 0;
play->unk_11DE9 = 0;
if (gSaveContext.gameMode != 1) {
if (gSaveContext.nextTransitionType == 0xFF) {
play->fadeTransition =
(gEntranceTable[((void)0, gSaveContext.entranceIndex) + tempSetupIndex].field >> 7) & 0x7F; // Fade In
if (gSaveContext.nextTransitionType == TRANS_NEXT_TYPE_DEFAULT) {
play->transitionType = ENTRANCE_INFO_END_TRANS_TYPE(
gEntranceTable[((void)0, gSaveContext.entranceIndex) + tempSetupIndex].field); // Fade In
} else {
play->fadeTransition = gSaveContext.nextTransitionType;
gSaveContext.nextTransitionType = 0xFF;
play->transitionType = gSaveContext.nextTransitionType;
gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT;
}
} else {
play->fadeTransition = 6;
play->transitionType = TRANS_TYPE_FADE_BLACK_SLOW;
}
ShrinkWindow_Init();
@@ -808,8 +809,8 @@ void Play_Update(PlayState* play) {
gSegments[2] = VIRTUAL_TO_PHYSICAL(play->sceneSegment);
if (FrameAdvance_Update(&play->frameAdvCtx, &input[1])) {
if ((play->transitionMode == 0) && (play->sceneLoadFlag != 0)) {
play->transitionMode = 1;
if ((play->transitionMode == TRANS_MODE_OFF) && (play->transitionTrigger != TRANS_TRIGGER_OFF)) {
play->transitionMode = TRANS_MODE_SETUP;
}
// Gameplay stats: Count button presses
@@ -858,8 +859,8 @@ void Play_Update(PlayState* play) {
if (play->transitionMode) {
switch (play->transitionMode) {
case 1:
if (play->sceneLoadFlag != -0x14) {
case TRANS_MODE_SETUP:
if (play->transitionTrigger != TRANS_TRIGGER_END) {
s16 sp6E = 0;
Interface_ChangeAlpha(1);
@@ -867,10 +868,10 @@ void Play_Update(PlayState* play) {
sp6E = (gSaveContext.cutsceneIndex & 0xF) + 4;
}
if (!(gEntranceTable[play->nextEntranceIndex + sp6E].field & 0x8000)) { // Continue BGM Off
if (!(gEntranceTable[play->nextEntranceIndex + sp6E].field & ENTRANCE_INFO_CONTINUE_BGM_FLAG)) { // Continue BGM Off
// "Sound initalized. 111"
osSyncPrintf("\n\n\nサウンドイニシャル来ました。111");
if ((play->fadeTransition < 56) && !Environment_IsForcedSequenceDisabled()) {
if ((play->transitionType < TRANS_TYPE_MAX) && !Environment_IsForcedSequenceDisabled()) {
// "Sound initalized. 222"
osSyncPrintf("\n\n\nサウンドイニシャル来ました。222");
func_800F6964(0x14);
@@ -880,58 +881,59 @@ void Play_Update(PlayState* play) {
}
}
if (CREG(11) == 0) {
func_800BC5E0(play, play->fadeTransition);
if (!R_TRANS_DBG_ENABLED) {
Gameplay_SetupTransition(play, play->transitionType);
} else {
func_800BC5E0(play, CREG(12));
Gameplay_SetupTransition(play, R_TRANS_DBG_TYPE);
}
if (play->transitionMode >= 4) {
if (play->transitionMode >= TRANS_MODE_FILL_WHITE_INIT) {
break;
}
case 2:
case TRANS_MODE_INSTANCE_INIT:
play->transitionCtx.init(&play->transitionCtx.data);
// Circle Transition Types
if ((play->transitionCtx.transitionType >> 5) == 1) {
play->transitionCtx.setType(&play->transitionCtx.data,
play->transitionCtx.transitionType | 0x80);
play->transitionCtx.transitionType | TC_SET_PARAMS);
}
gSaveContext.transWipeSpeed = 14;
if ((play->transitionCtx.transitionType == 8) ||
(play->transitionCtx.transitionType == 9)) {
if ((play->transitionCtx.transitionType == TRANS_TYPE_WIPE_FAST) ||
(play->transitionCtx.transitionType == TRANS_TYPE_FILL_WHITE2)) {
gSaveContext.transWipeSpeed = 28;
}
gSaveContext.transFadeDuration = 60;
if ((play->transitionCtx.transitionType == 4) ||
(play->transitionCtx.transitionType == 5)) {
if ((play->transitionCtx.transitionType == TRANS_TYPE_FADE_BLACK_FAST) ||
(play->transitionCtx.transitionType == TRANS_TYPE_FADE_WHITE_FAST)) {
gSaveContext.transFadeDuration = 20;
} else if ((play->transitionCtx.transitionType == 6) ||
(play->transitionCtx.transitionType == 7)) {
} else if ((play->transitionCtx.transitionType == TRANS_TYPE_FADE_BLACK_SLOW) ||
(play->transitionCtx.transitionType == TRANS_TYPE_FADE_WHITE_SLOW)) {
gSaveContext.transFadeDuration = 150;
} else if (play->transitionCtx.transitionType == 17) {
} else if (play->transitionCtx.transitionType == TRANS_TYPE_FADE_WHITE_INSTANT) {
gSaveContext.transFadeDuration = 2;
}
if ((play->transitionCtx.transitionType == 3) ||
(play->transitionCtx.transitionType == 5) ||
(play->transitionCtx.transitionType == 7) ||
(play->transitionCtx.transitionType == 13) ||
(play->transitionCtx.transitionType == 17)) {
if ((play->transitionCtx.transitionType == TRANS_TYPE_FADE_WHITE) ||
(play->transitionCtx.transitionType == TRANS_TYPE_FADE_WHITE_FAST) ||
(play->transitionCtx.transitionType == TRANS_TYPE_FADE_WHITE_SLOW) ||
(play->transitionCtx.transitionType == TRANS_TYPE_FADE_WHITE_CS_DELAYED) ||
(play->transitionCtx.transitionType == TRANS_TYPE_FADE_WHITE_INSTANT)) {
play->transitionCtx.setColor(&play->transitionCtx.data, RGBA8(160, 160, 160, 255));
if (play->transitionCtx.setEnvColor != NULL) {
play->transitionCtx.setEnvColor(&play->transitionCtx.data,
RGBA8(160, 160, 160, 255));
}
} else if (play->transitionCtx.transitionType == 18) {
} else if (play->transitionCtx.transitionType == TRANS_TYPE_FADE_GREEN) {
play->transitionCtx.setColor(&play->transitionCtx.data, RGBA8(140, 140, 100, 255));
if (play->transitionCtx.setEnvColor != NULL) {
play->transitionCtx.setEnvColor(&play->transitionCtx.data,
RGBA8(140, 140, 100, 255));
}
} else if (play->transitionCtx.transitionType == 19) {
} else if (play->transitionCtx.transitionType == TRANS_TYPE_FADE_BLUE) {
play->transitionCtx.setColor(&play->transitionCtx.data, RGBA8(70, 100, 110, 255));
if (play->transitionCtx.setEnvColor != NULL) {
play->transitionCtx.setEnvColor(&play->transitionCtx.data,
@@ -944,7 +946,7 @@ void Play_Update(PlayState* play) {
}
}
if (play->sceneLoadFlag == -0x14) {
if (play->transitionTrigger == TRANS_TRIGGER_END) {
play->transitionCtx.setType(&play->transitionCtx.data, 1);
} else {
play->transitionCtx.setType(&play->transitionCtx.data, 2);
@@ -952,22 +954,22 @@ void Play_Update(PlayState* play) {
play->transitionCtx.start(&play->transitionCtx);
if (play->transitionCtx.transitionType == 13) {
play->transitionMode = 11;
if (play->transitionCtx.transitionType == TRANS_TYPE_FADE_WHITE_CS_DELAYED) {
play->transitionMode = TRANS_MODE_INSTANCE_WAIT;
} else {
play->transitionMode = 3;
play->transitionMode = TRANS_MODE_INSTANCE_RUNNING;
}
break;
case 3:
case TRANS_MODE_INSTANCE_RUNNING:
if (play->transitionCtx.isDone(&play->transitionCtx) != 0) {
if (play->transitionCtx.transitionType >= 56) {
if (play->sceneLoadFlag == -0x14) {
if (play->transitionCtx.transitionType >= TRANS_TYPE_MAX) {
if (play->transitionTrigger == TRANS_TRIGGER_END) {
play->transitionCtx.destroy(&play->transitionCtx);
func_800BC88C(play);
play->transitionMode = 0;
play->transitionMode = TRANS_MODE_OFF;
}
} else if (play->sceneLoadFlag != -0x14) {
} else if (play->transitionTrigger != TRANS_TRIGGER_END) {
play->state.running = 0;
if (gSaveContext.gameMode != 2) {
SET_NEXT_GAMESTATE(&play->state, Play_Init, PlayState);
@@ -981,7 +983,7 @@ void Play_Update(PlayState* play) {
} else {
play->transitionCtx.destroy(&play->transitionCtx);
func_800BC88C(play);
play->transitionMode = 0;
play->transitionMode = TRANS_MODE_OFF;
if (gTrnsnUnkState == 3) {
TransitionUnk_Destroy(&sTrnsnUnk);
gTrnsnUnkState = 0;
@@ -991,7 +993,7 @@ void Play_Update(PlayState* play) {
// Transition end for standard transitions
GameInteractor_ExecuteOnTransitionEndHooks(play->sceneNum);
}
play->sceneLoadFlag = 0;
play->transitionTrigger = TRANS_TRIGGER_OFF;
} else {
play->transitionCtx.update(&play->transitionCtx.data, R_UPDATE_RATE);
}
@@ -999,104 +1001,104 @@ void Play_Update(PlayState* play) {
}
switch (play->transitionMode) {
case 4:
case TRANS_MODE_FILL_WHITE_INIT:
D_801614C8 = 0;
play->envCtx.fillScreen = true;
play->envCtx.screenFillColor[0] = 160;
play->envCtx.screenFillColor[1] = 160;
play->envCtx.screenFillColor[2] = 160;
if (play->sceneLoadFlag != -0x14) {
if (play->transitionTrigger != TRANS_TRIGGER_END) {
play->envCtx.screenFillColor[3] = 0;
play->transitionMode = 5;
play->transitionMode = TRANS_MODE_FILL_IN;
} else {
play->envCtx.screenFillColor[3] = 255;
play->transitionMode = 6;
play->transitionMode = TRANS_MODE_FILL_OUT;
}
break;
case 5:
case TRANS_MODE_FILL_IN:
play->envCtx.screenFillColor[3] = (D_801614C8 / 20.0f) * 255.0f;
if (D_801614C8 >= 20 && 1) {
play->state.running = 0;
SET_NEXT_GAMESTATE(&play->state, Play_Init, PlayState);
gSaveContext.entranceIndex = play->nextEntranceIndex;
play->sceneLoadFlag = 0;
play->transitionMode = 0;
play->transitionTrigger = TRANS_TRIGGER_OFF;
play->transitionMode = TRANS_MODE_OFF;
} else {
D_801614C8++;
}
break;
case 6:
case TRANS_MODE_FILL_OUT:
play->envCtx.screenFillColor[3] = (1 - D_801614C8 / 20.0f) * 255.0f;
if (D_801614C8 >= 20 && 1) {
gTrnsnUnkState = 0;
R_UPDATE_RATE = 3;
play->sceneLoadFlag = 0;
play->transitionMode = 0;
play->transitionTrigger = TRANS_TRIGGER_OFF;
play->transitionMode = TRANS_MODE_OFF;
play->envCtx.fillScreen = false;
} else {
D_801614C8++;
}
break;
case 7:
case TRANS_MODE_FILL_BROWN_INIT:
D_801614C8 = 0;
play->envCtx.fillScreen = true;
play->envCtx.screenFillColor[0] = 170;
play->envCtx.screenFillColor[1] = 160;
play->envCtx.screenFillColor[2] = 150;
if (play->sceneLoadFlag != -0x14) {
if (play->transitionTrigger != TRANS_TRIGGER_END) {
play->envCtx.screenFillColor[3] = 0;
play->transitionMode = 5;
play->transitionMode = TRANS_MODE_FILL_IN;
} else {
play->envCtx.screenFillColor[3] = 255;
play->transitionMode = 6;
play->transitionMode = TRANS_MODE_FILL_OUT;
}
break;
case 10:
if (play->sceneLoadFlag != -0x14) {
case TRANS_MODE_INSTANT:
if (play->transitionTrigger != TRANS_TRIGGER_END) {
play->state.running = 0;
SET_NEXT_GAMESTATE(&play->state, Play_Init, PlayState);
gSaveContext.entranceIndex = play->nextEntranceIndex;
play->sceneLoadFlag = 0;
play->transitionMode = 0;
play->transitionTrigger = TRANS_TRIGGER_OFF;
play->transitionMode = TRANS_MODE_OFF;
} else {
gTrnsnUnkState = 0;
R_UPDATE_RATE = 3;
play->sceneLoadFlag = 0;
play->transitionMode = 0;
play->transitionTrigger = TRANS_TRIGGER_OFF;
play->transitionMode = TRANS_MODE_OFF;
}
break;
case 11:
case TRANS_MODE_INSTANCE_WAIT:
if (gSaveContext.cutsceneTransitionControl != 0) {
play->transitionMode = 3;
play->transitionMode = TRANS_MODE_INSTANCE_RUNNING;
}
break;
case 12:
if (play->sceneLoadFlag != -0x14) {
play->envCtx.sandstormState = 1;
play->transitionMode = 13;
case TRANS_MODE_SANDSTORM_INIT:
if (play->transitionTrigger != TRANS_TRIGGER_END) {
play->envCtx.sandstormState = SANDSTORM_FILL;
play->transitionMode = TRANS_MODE_SANDSTORM;
} else {
play->envCtx.sandstormState = 2;
play->envCtx.sandstormState = SANDSTORM_UNFILL;
play->envCtx.sandstormPrimA = 255;
play->envCtx.sandstormEnvA = 255;
play->transitionMode = 13;
play->transitionMode = TRANS_MODE_SANDSTORM;
}
break;
case 13:
case TRANS_MODE_SANDSTORM:
Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
if (play->sceneLoadFlag == -0x14) {
if (play->transitionTrigger == TRANS_TRIGGER_END) {
if (play->envCtx.sandstormPrimA < 110) {
gTrnsnUnkState = 0;
R_UPDATE_RATE = 3;
play->sceneLoadFlag = 0;
play->transitionMode = 0;
play->transitionTrigger = TRANS_TRIGGER_OFF;
play->transitionMode = TRANS_MODE_OFF;
// Transition end for sandstorm effect (delayed until effect is finished)
GameInteractor_ExecuteOnTransitionEndHooks(play->sceneNum);
@@ -1106,34 +1108,34 @@ void Play_Update(PlayState* play) {
play->state.running = 0;
SET_NEXT_GAMESTATE(&play->state, Play_Init, PlayState);
gSaveContext.entranceIndex = play->nextEntranceIndex;
play->sceneLoadFlag = 0;
play->transitionMode = 0;
play->transitionTrigger = TRANS_TRIGGER_OFF;
play->transitionMode = TRANS_MODE_OFF;
}
}
break;
case 14:
if (play->sceneLoadFlag == -0x14) {
play->envCtx.sandstormState = 4;
case TRANS_MODE_SANDSTORM_END_INIT:
if (play->transitionTrigger == TRANS_TRIGGER_END) {
play->envCtx.sandstormState = SANDSTORM_DISSIPATE;
play->envCtx.sandstormPrimA = 255;
play->envCtx.sandstormEnvA = 255;
// "It's here!!!!!!!!!"
LOG_STRING("来た!!!!!!!!!!!!!!!!!!!!!");
play->transitionMode = 15;
play->transitionMode = TRANS_MODE_SANDSTORM_END;
} else {
play->transitionMode = 12;
play->transitionMode = TRANS_MODE_SANDSTORM_INIT;
}
break;
case 15:
case TRANS_MODE_SANDSTORM_END:
Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
if (play->sceneLoadFlag == -0x14) {
if (play->transitionTrigger == TRANS_TRIGGER_END) {
if (play->envCtx.sandstormPrimA <= 0) {
gTrnsnUnkState = 0;
R_UPDATE_RATE = 3;
play->sceneLoadFlag = 0;
play->transitionMode = 0;
play->transitionTrigger = TRANS_TRIGGER_OFF;
play->transitionMode = TRANS_MODE_OFF;
// Transition end for sandstorm effect (delayed until effect is finished)
GameInteractor_ExecuteOnTransitionEndHooks(play->sceneNum);
@@ -1141,24 +1143,24 @@ void Play_Update(PlayState* play) {
}
break;
case 16:
case TRANS_MODE_CS_BLACK_FILL_INIT:
D_801614C8 = 0;
play->envCtx.fillScreen = true;
play->envCtx.screenFillColor[0] = 0;
play->envCtx.screenFillColor[1] = 0;
play->envCtx.screenFillColor[2] = 0;
play->envCtx.screenFillColor[3] = 255;
play->transitionMode = 17;
play->transitionMode = TRANS_MODE_CS_BLACK_FILL;
break;
case 17:
case TRANS_MODE_CS_BLACK_FILL:
if (gSaveContext.cutsceneTransitionControl != 0) {
play->envCtx.screenFillColor[3] = gSaveContext.cutsceneTransitionControl;
if (gSaveContext.cutsceneTransitionControl < 0x65) {
gTrnsnUnkState = 0;
R_UPDATE_RATE = 3;
play->sceneLoadFlag = 0;
play->transitionMode = 0;
play->transitionTrigger = TRANS_TRIGGER_OFF;
play->transitionMode = TRANS_MODE_OFF;
}
}
break;
@@ -1546,8 +1548,8 @@ void Play_Draw(PlayState* play) {
gSPDisplayList(OVERLAY_DISP++, gfxP);
gSPGrayscale(gfxP++, false);
if ((play->transitionMode == 3) || (play->transitionMode == 11) ||
(play->transitionCtx.transitionType >= 56)) {
if ((play->transitionMode == TRANS_MODE_INSTANCE_RUNNING) || (play->transitionMode == TRANS_MODE_INSTANCE_WAIT) ||
(play->transitionCtx.transitionType >= TRANS_TYPE_MAX)) {
View view;
View_Init(&view, gfxCtx);
@@ -1709,7 +1711,7 @@ void Play_Draw(PlayState* play) {
}
if ((HREG(80) != 10) || (HREG(88) != 0)) {
if (play->envCtx.sandstormState != 0) {
if (play->envCtx.sandstormState != SANDSTORM_OFF) {
Environment_DrawSandstorm(play, play->envCtx.sandstormState);
}
}
@@ -2253,27 +2255,27 @@ void Play_TriggerVoidOut(PlayState* play) {
gSaveContext.respawn[RESPAWN_MODE_DOWN].tempSwchFlags = play->actorCtx.flags.tempSwch;
gSaveContext.respawn[RESPAWN_MODE_DOWN].tempCollectFlags = play->actorCtx.flags.tempCollect;
gSaveContext.respawnFlag = 1;
play->sceneLoadFlag = 0x14;
play->transitionTrigger = TRANS_TRIGGER_START;
play->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex;
play->fadeTransition = 2;
play->transitionType = TRANS_TYPE_FADE_BLACK;
}
void Play_LoadToLastEntrance(PlayState* play) {
gSaveContext.respawnFlag = -1;
play->sceneLoadFlag = 0x14;
play->transitionTrigger = TRANS_TRIGGER_START;
if ((play->sceneNum == SCENE_GANONS_TOWER_COLLAPSE_INTERIOR) || (play->sceneNum == SCENE_GANONS_TOWER_COLLAPSE_EXTERIOR) ||
(play->sceneNum == SCENE_INSIDE_GANONS_CASTLE_COLLAPSE) || (play->sceneNum == SCENE_GANON_BOSS)) {
play->nextEntranceIndex = 0x043F;
play->nextEntranceIndex = ENTR_GANONS_TOWER_COLLAPSE_EXTERIOR_0;
Item_Give(play, ITEM_SWORD_MASTER);
} else if ((gSaveContext.entranceIndex == 0x028A) || (gSaveContext.entranceIndex == 0x028E) ||
(gSaveContext.entranceIndex == 0x0292) || (gSaveContext.entranceIndex == 0x0476)) {
play->nextEntranceIndex = 0x01F9;
} else if ((gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_11) || (gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_12) ||
(gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_13) || (gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_15)) {
play->nextEntranceIndex = ENTR_HYRULE_FIELD_6;
} else {
play->nextEntranceIndex = gSaveContext.entranceIndex;
}
play->fadeTransition = 2;
play->transitionType = TRANS_TYPE_FADE_BLACK;
}
void Play_TriggerRespawn(PlayState* play) {

View File

@@ -101,15 +101,6 @@ u8 sActionModelGroups[] = {
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_GERUDO
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_TRUTH
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_LENS_OF_TRUTH
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_SHIELD_DEKU
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_SHIELD_HYLIAN
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_SHIELD_MIRROR
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_TUNIC_KOKIRI
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_TUNIC_GORON
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_TUNIC_ZORA
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_BOOTS_KOKIRI
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_BOOTS_IRON
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_BOOTS_HOVER
};
TextTriggerEntry sTextTriggers[] = {
@@ -535,7 +526,7 @@ void Player_SetBootData(PlayState* play, Player* this) {
currentBoots = PLAYER_BOOTS_KOKIRI_CHILD;
}
} else if (currentBoots == PLAYER_BOOTS_IRON) {
if (this->stateFlags1 & 0x8000000) {
if (this->stateFlags1 & PLAYER_STATE1_IN_WATER) {
currentBoots = PLAYER_BOOTS_IRON_UNDERWATER;
}
REG(27) = 500;
@@ -573,8 +564,8 @@ uint8_t Player_IsCustomLinkModel() {
}
s32 Player_InBlockingCsMode(PlayState* play, Player* this) {
return (this->stateFlags1 & 0x20000080) || (this->csMode != 0) || (play->sceneLoadFlag == 0x14) ||
(this->stateFlags1 & 1) || (this->stateFlags3 & 0x80) ||
return (this->stateFlags1 & (PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_CUTSCENE)) || (this->csAction != 0) || (play->transitionTrigger == TRANS_TRIGGER_START) ||
(this->stateFlags1 & PLAYER_STATE1_LOADING) || (this->stateFlags3 & PLAYER_STATE3_HOOKSHOT_TRAVELLING) ||
((gSaveContext.magicState != MAGIC_STATE_IDLE) && (Player_ActionToMagicSpell(this, this->itemAction) >= 0));
}
@@ -585,7 +576,7 @@ s32 Player_InCsMode(PlayState* play) {
}
s32 func_8008E9C4(Player* this) {
return (this->stateFlags1 & 0x10);
return (this->stateFlags1 & PLAYER_STATE1_ENEMY_TARGET);
}
s32 Player_IsChildWithHylianShield(Player* this) {
@@ -604,18 +595,28 @@ s32 Player_ActionToModelGroup(Player* this, s32 actionParam) {
}
void Player_SetModelsForHoldingShield(Player* this) {
if ((this->stateFlags1 & 0x400000) &&
if ((this->stateFlags1 & PLAYER_STATE1_SHIELDING) &&
((this->itemAction < 0) || (this->itemAction == this->heldItemAction))) {
if ((CVarGetInteger("gShieldTwoHanded", 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK) ||
!Player_HoldsTwoHandedWeapon(this)) && !Player_IsChildWithHylianShield(this)) {
this->rightHandType = PLAYER_MODELTYPE_RH_SHIELD;
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][gSaveContext.linkAge];
if (LINK_IS_CHILD && (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && (this->currentShield == PLAYER_SHIELD_MIRROR)) {
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][0];
} else if (LINK_IS_ADULT && (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && (this->currentShield == PLAYER_SHIELD_DEKU)) {
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][1];
} else {
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][gSaveContext.linkAge];
}
if (this->sheathType == PLAYER_MODELTYPE_SHEATH_18) {
this->sheathType = PLAYER_MODELTYPE_SHEATH_16;
} else if (this->sheathType == PLAYER_MODELTYPE_SHEATH_19) {
this->sheathType = PLAYER_MODELTYPE_SHEATH_17;
}
this->sheathDLists = &sPlayerDListGroups[this->sheathType][gSaveContext.linkAge];
if ((CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && LINK_IS_CHILD &&
gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI) {
this->sheathDLists = &sPlayerDListGroups[this->sheathType][0];
}
this->modelAnimType = PLAYER_ANIMTYPE_2;
this->itemAction = -1;
}
@@ -626,12 +627,40 @@ void Player_SetModels(Player* this, s32 modelGroup) {
// Left hand
this->leftHandType = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_LEFT_HAND];
this->leftHandDLists = &sPlayerDListGroups[this->leftHandType][gSaveContext.linkAge];
if (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
if (LINK_IS_CHILD &&
(this->leftHandType == PLAYER_MODELTYPE_LH_HAMMER ||
((this->leftHandType == PLAYER_MODELTYPE_LH_SWORD || this->leftHandType == PLAYER_MODELTYPE_LH_BGS) &&
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)))) {
this->leftHandDLists = &sPlayerDListGroups[this->leftHandType][0];
}
if (LINK_IS_ADULT && (this->leftHandType == PLAYER_MODELTYPE_LH_BOOMERANG ||
(this->leftHandType == PLAYER_MODELTYPE_LH_SWORD && gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KOKIRI))) {
this->leftHandDLists = &sPlayerDListGroups[this->leftHandType][1];
}
}
// Right hand
this->rightHandType = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_RIGHT_HAND];
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][gSaveContext.linkAge];
if (CVarGetInteger("gBowSlingShotAmmoFix", 0) && this->rightHandType == 11) { // If holding Bow/Slingshot
this->rightHandType = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_RIGHT_HAND];
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][gSaveContext.linkAge];
if (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
if (LINK_IS_CHILD &&
(this->rightHandType == PLAYER_MODELTYPE_RH_HOOKSHOT ||
(this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD && this->currentShield == PLAYER_SHIELD_MIRROR))) {
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][0];
}
if (LINK_IS_ADULT &&
(this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD && this->currentShield == PLAYER_SHIELD_DEKU)) {
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][1];
}
}
if ((CVarGetInteger("gBowSlingShotAmmoFix", 0) || CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && this->rightHandType == 11) { // If holding Bow/Slingshot
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][Player_HoldsSlingshot(this)];
}
@@ -639,6 +668,23 @@ void Player_SetModels(Player* this, s32 modelGroup) {
this->sheathType = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_SHEATH];
this->sheathDLists = &sPlayerDListGroups[this->sheathType][gSaveContext.linkAge];
if (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
if (LINK_IS_CHILD &&
(this->currentShield == PLAYER_SHIELD_HYLIAN || this->currentShield == PLAYER_SHIELD_MIRROR) &&
((gSaveContext.equips.buttonItems[0] == ITEM_SWORD_MASTER) ||
(gSaveContext.equips.buttonItems[0] == ITEM_SWORD_BGS))) {
this->sheathDLists = &sPlayerDListGroups[this->sheathType][0];
} else if (LINK_IS_CHILD && this->currentShield == PLAYER_SHIELD_MIRROR && gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KOKIRI &&
this->sheathType == PLAYER_MODELTYPE_SHEATH_18) {
this->sheathDLists = &sPlayerDListGroups[this->sheathType][0];
} else if (LINK_IS_ADULT && this->currentShield == PLAYER_SHIELD_DEKU) {
this->sheathDLists = &sPlayerDListGroups[this->sheathType][1];
} else if (LINK_IS_CHILD && this->sheathType == PLAYER_MODELTYPE_SHEATH_17 &&
((gSaveContext.equips.buttonItems[0] == ITEM_SWORD_MASTER) || (gSaveContext.equips.buttonItems[0] == ITEM_SWORD_BGS))) {
this->sheathDLists = &sPlayerDListGroups[this->sheathType][0];
}
}
// Waist
this->waistDLists = &sPlayerDListGroups[gPlayerModelTypes[modelGroup][4]][gSaveContext.linkAge];
@@ -668,7 +714,7 @@ void func_8008EC70(Player* this) {
}
void Player_SetEquipmentData(PlayState* play, Player* this) {
if (this->csMode != 0x56) {
if (this->csAction != 0x56) {
this->currentShield = SHIELD_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD));
this->currentTunic = TUNIC_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC));
this->currentBoots = BOOTS_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_BOOTS));
@@ -691,15 +737,15 @@ void Player_UpdateBottleHeld(PlayState* play, Player* this, s32 item, s32 action
void func_8008EDF0(Player* this) {
this->unk_664 = NULL;
this->stateFlags2 &= ~0x2000;
this->stateFlags2 &= ~PLAYER_STATE2_SWITCH_TARGETING;
}
void func_8008EE08(Player* this) {
if ((this->actor.bgCheckFlags & 1) || (this->stateFlags1 & 0x8A00000) ||
(!(this->stateFlags1 & 0xC0000) && ((this->actor.world.pos.y - this->actor.floorHeight) < 100.0f))) {
this->stateFlags1 &= ~0x400F8000;
} else if (!(this->stateFlags1 & 0x2C0000)) {
this->stateFlags1 |= 0x80000;
if ((this->actor.bgCheckFlags & 1) || (this->stateFlags1 & (PLAYER_STATE1_CLIMBING_LADDER | PLAYER_STATE1_ON_HORSE | PLAYER_STATE1_IN_WATER)) ||
(!(this->stateFlags1 & (PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL)) && ((this->actor.world.pos.y - this->actor.floorHeight) < 100.0f))) {
this->stateFlags1 &= ~(PLAYER_STATE1_TARGETING | PLAYER_STATE1_TARGET_LOCKED | PLAYER_STATE1_TARGET_NOTHING | PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_30);
} else if (!(this->stateFlags1 & (PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_CLIMBING_LADDER))) {
this->stateFlags1 |= PLAYER_STATE1_FREEFALL;
}
func_8008EDF0(this);
@@ -711,7 +757,7 @@ void func_8008EEAC(PlayState* play, Actor* actor) {
func_8008EE08(this);
this->unk_664 = actor;
this->unk_684 = actor;
this->stateFlags1 |= 0x10000;
this->stateFlags1 |= PLAYER_STATE1_TARGET_LOCKED;
Camera_SetParam(Play_GetCamera(play, 0), 8, actor);
Camera_ChangeMode(Play_GetCamera(play, 0), 2);
}
@@ -719,7 +765,7 @@ void func_8008EEAC(PlayState* play, Actor* actor) {
s32 func_8008EF30(PlayState* play) {
Player* this = GET_PLAYER(play);
return (this->stateFlags1 & 0x800000);
return (this->stateFlags1 & PLAYER_STATE1_ON_HORSE);
}
s32 func_8008EF44(PlayState* play, s32 ammo) {
@@ -743,6 +789,10 @@ s32 Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 y
s32 Player_GetStrength(void) {
s32 strengthUpgrade = CUR_UPG_VALUE(UPG_STRENGTH);
if (CVarGetInteger("gToggleStrength", 0) && CVarGetInteger("gStrengthDisabled", 0)) {
return PLAYER_STR_NONE;
}
if (CVarGetInteger("gTimelessEquipment", 0) || LINK_IS_ADULT) {
return strengthUpgrade;
} else if (strengthUpgrade != 0) {
@@ -889,10 +939,10 @@ s32 Player_GetEnvironmentalHazard(PlayState* play) {
if (play->roomCtx.curRoom.behaviorType2 == ROOM_BEHAVIOR_TYPE2_3) { // Room is hot
var = 0;
} else if ((this->unk_840 > 80) &&
((this->currentBoots == PLAYER_BOOTS_IRON) || (this->unk_840 >= 300))) { // Deep underwater
} else if ((this->underwaterTimer > 80) &&
((this->currentBoots == PLAYER_BOOTS_IRON) || (this->underwaterTimer >= 300))) { // Deep underwater
var = ((this->currentBoots == PLAYER_BOOTS_IRON) && (this->actor.bgCheckFlags & 1)) ? 1 : 3;
} else if (this->stateFlags1 & 0x8000000) { // Swimming
} else if (this->stateFlags1 & PLAYER_STATE1_IN_WATER) { // Swimming
var = 2;
} else {
return 0;
@@ -1121,7 +1171,7 @@ void func_8008F87C(PlayState* play, Player* this, SkelAnime* skelAnime, Vec3f* p
s16 temp2;
s32 temp3;
if ((this->actor.scale.y >= 0.0f) && !(this->stateFlags1 & 0x80) &&
if ((this->actor.scale.y >= 0.0f) && !(this->stateFlags1 & PLAYER_STATE1_DEAD) &&
(Player_ActionToMagicSpell(this, this->itemAction) < 0)) {
s32 pad;
@@ -1192,6 +1242,42 @@ void func_8008F87C(PlayState* play, Player* this, SkelAnime* skelAnime, Vec3f* p
s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
Player* this = (Player*)thisx;
if (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0) && CVarGetInteger("gEnhancements.ScaleAdultEquimentAsChild", 0) && LINK_IS_CHILD) {
if (limbIndex == PLAYER_LIMB_L_HAND) {
if ((gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI && sLeftHandType == PLAYER_MODELTYPE_LH_SWORD) ||
(sLeftHandType == PLAYER_MODELTYPE_LH_BGS) || (sLeftHandType == PLAYER_MODELTYPE_LH_HAMMER)) {
Matrix_Scale(0.8, 0.8, 0.8, MTXMODE_APPLY);
}
}
if (limbIndex == PLAYER_LIMB_R_HAND) {
if ((this->currentShield == PLAYER_SHIELD_MIRROR && sRightHandType == PLAYER_MODELTYPE_RH_SHIELD) ||
(this->currentShield == PLAYER_SHIELD_HYLIAN && (gSaveContext.equips.buttonItems[0] == ITEM_SWORD_MASTER ||
gSaveContext.equips.buttonItems[0] == ITEM_SWORD_BGS)) || (sRightHandType == PLAYER_MODELTYPE_RH_HOOKSHOT) ||
(sRightHandType == PLAYER_MODELTYPE_RH_BOW_SLINGSHOT && Player_HoldsBow(this))) {
Matrix_Scale(0.8, 0.8, 0.8, MTXMODE_APPLY);
}
}
if (limbIndex == PLAYER_LIMB_SHEATH) {
if ((this->currentShield == PLAYER_SHIELD_MIRROR ||
(this->currentShield == PLAYER_SHIELD_HYLIAN &&
(gSaveContext.equips.buttonItems[0] == ITEM_SWORD_MASTER ||
gSaveContext.equips.buttonItems[0] == ITEM_SWORD_BGS))) &&
((this->sheathType == PLAYER_MODELTYPE_SHEATH_16) || (this->sheathType == PLAYER_MODELTYPE_SHEATH_17) ||
(this->sheathType == PLAYER_MODELTYPE_SHEATH_18) ||
(this->sheathType == PLAYER_MODELTYPE_SHEATH_19))) {
Matrix_Translate(218, -100, 62, MTXMODE_APPLY);
Matrix_Scale(0.8, 0.8, 0.8, MTXMODE_APPLY);
}
if ((this->currentShield == PLAYER_SHIELD_DEKU &&
gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI &&
(this->sheathType == PLAYER_MODELTYPE_SHEATH_16 ||
this->sheathType == PLAYER_MODELTYPE_SHEATH_17))) {
Matrix_Translate(218, -100, 62, MTXMODE_APPLY);
Matrix_Scale(0.8, 0.8, 0.8, MTXMODE_APPLY);
}
}
}
if (limbIndex == PLAYER_LIMB_ROOT) {
sLeftHandType = this->leftHandType;
@@ -1281,10 +1367,10 @@ s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx**
if ((sLeftHandType == PLAYER_MODELTYPE_LH_BGS) && (gSaveContext.swordHealth <= 0.0f)) {
dLists += 4;
} else if ((sLeftHandType == PLAYER_MODELTYPE_LH_BOOMERANG) && (this->stateFlags1 & 0x2000000)) {
} else if ((sLeftHandType == PLAYER_MODELTYPE_LH_BOOMERANG) && (this->stateFlags1 & PLAYER_STATE1_THREW_BOOMERANG)) {
dLists = &gPlayerLeftHandOpenDLs[gSaveContext.linkAge];
sLeftHandType = 0;
} else if ((this->leftHandType == PLAYER_MODELTYPE_LH_OPEN) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & 0x8000000)) {
sLeftHandType = PLAYER_MODELTYPE_LH_OPEN;
} else if ((this->leftHandType == PLAYER_MODELTYPE_LH_OPEN) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & PLAYER_STATE1_IN_WATER)) {
dLists = &gPlayerLeftHandClosedDLs[gSaveContext.linkAge];
sLeftHandType = PLAYER_MODELTYPE_LH_CLOSED;
}
@@ -1295,7 +1381,7 @@ s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx**
if (sRightHandType == PLAYER_MODELTYPE_RH_SHIELD) {
dLists += this->currentShield * 4;
} else if ((this->rightHandType == PLAYER_MODELTYPE_RH_OPEN) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & 0x8000000)) {
} else if ((this->rightHandType == PLAYER_MODELTYPE_RH_OPEN) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & PLAYER_STATE1_IN_WATER)) {
dLists = &sPlayerRightHandClosedDLs[gSaveContext.linkAge];
sRightHandType = PLAYER_MODELTYPE_RH_CLOSED;
}
@@ -1310,9 +1396,11 @@ s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx**
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)) {
dLists += PLAYER_SHIELD_MAX * 4;
}
} else if (!LINK_IS_ADULT && ((this->sheathType == PLAYER_MODELTYPE_SHEATH_16) || (this->sheathType == PLAYER_MODELTYPE_SHEATH_17)) &&
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)) {
dLists = &sSheathWithSwordDLs[PLAYER_SHIELD_MAX * 4];
} else if (!CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
if (!LINK_IS_ADULT && ((this->sheathType == PLAYER_MODELTYPE_SHEATH_16) || (this->sheathType == PLAYER_MODELTYPE_SHEATH_17)) &&
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)) {
dLists = &sSheathWithSwordDLs[PLAYER_SHIELD_MAX * 4];
}
}
if (dLists[sDListsLodOffset] != NULL) {
@@ -1350,7 +1438,7 @@ s32 Player_OverrideLimbDrawGameplayFirstPerson(PlayState* play, s32 limbIndex, G
*dList = sFirstPersonLeftForearmDLs[gSaveContext.linkAge];
} else if (limbIndex == PLAYER_LIMB_L_HAND) {
s32 handOutDlIndex = gSaveContext.linkAge;
if (CVarGetInteger("gBowSlingShotAmmoFix", 0) && LINK_IS_ADULT && Player_HoldsSlingshot(this)) {
if ((CVarGetInteger("gBowSlingShotAmmoFix", 0) || CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && LINK_IS_ADULT && Player_HoldsSlingshot(this)) {
handOutDlIndex = 1;
}
*dList = sFirstPersonLeftHandDLs[handOutDlIndex];
@@ -1360,7 +1448,7 @@ s32 Player_OverrideLimbDrawGameplayFirstPerson(PlayState* play, s32 limbIndex, G
*dList = sFirstPersonForearmDLs[gSaveContext.linkAge];
} else if (limbIndex == PLAYER_LIMB_R_HAND) {
s32 firstPersonWeaponIndex = gSaveContext.linkAge;
if (CVarGetInteger("gBowSlingShotAmmoFix", 0)) {
if (CVarGetInteger("gBowSlingShotAmmoFix", 0) || CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
if (Player_HoldsBow(this)) {
firstPersonWeaponIndex = 0;
} else if (Player_HoldsSlingshot(this)) {
@@ -1422,7 +1510,7 @@ void Player_UpdateShieldCollider(PlayState* play, Player* this, ColliderQuad* co
COLTYPE_METAL,
};
if (this->stateFlags1 & 0x400000) {
if (this->stateFlags1 & PLAYER_STATE1_SHIELDING) {
Vec3f quadDest[4];
this->shieldQuad.base.colType = shieldColTypes[this->currentShield];
@@ -1456,12 +1544,12 @@ void func_800906D4(PlayState* play, Player* this, Vec3f* newTipPos) {
Matrix_MultVec3f(&D_801260A4[2], &newBasePos[2]);
if (func_80090480(play, NULL, &this->meleeWeaponInfo[0], &newTipPos[0], &newBasePos[0]) &&
!(this->stateFlags1 & 0x400000)) {
!(this->stateFlags1 & PLAYER_STATE1_SHIELDING)) {
EffectBlure_AddVertex(Effect_GetByIndex(this->meleeWeaponEffectIndex), &this->meleeWeaponInfo[0].tip,
&this->meleeWeaponInfo[0].base);
}
if ((this->meleeWeaponState > 0) && ((this->meleeWeaponAnimation < 0x18) || (this->stateFlags2 & 0x20000))) {
if ((this->meleeWeaponState > 0) && ((this->meleeWeaponAnimation < 0x18) || (this->stateFlags2 & PLAYER_STATE2_SPIN_ATTACKING))) {
func_80090480(play, &this->meleeWeaponQuads[0], &this->meleeWeaponInfo[1], &newTipPos[1], &newBasePos[1]);
func_80090480(play, &this->meleeWeaponQuads[1], &this->meleeWeaponInfo[2], &newTipPos[2], &newBasePos[2]);
}
@@ -1730,13 +1818,13 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
if (this->actor.scale.y >= 0.0f) {
if (!Player_HoldsHookshot(this) && ((hookedActor = this->heldActor) != NULL)) {
if (this->stateFlags1 & 0x200) {
if (this->stateFlags1 & PLAYER_STATE1_READY_TO_FIRE) {
Matrix_MultVec3f(&sLeftHandArrowVec3, &hookedActor->world.pos);
Matrix_RotateZYX(0x69E8, -0x5708, 0x458E, MTXMODE_APPLY);
Matrix_Get(&sp14C);
Matrix_MtxFToYXZRotS(&sp14C, &hookedActor->world.rot, 0);
hookedActor->shape.rot = hookedActor->world.rot;
} else if (this->stateFlags1 & 0x800) {
} else if (this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) {
Vec3s spB8;
Matrix_Get(&sp14C);
@@ -1760,7 +1848,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
Matrix_Get(&this->shieldMf);
} else if ((this->rightHandType == PLAYER_MODELTYPE_RH_BOW_SLINGSHOT) || (this->rightHandType == PLAYER_MODELTYPE_RH_BOW_SLINGSHOT_2)) {
s32 stringModelToUse = gSaveContext.linkAge;
if(CVarGetInteger("gBowSlingShotAmmoFix", 0)){
if (CVarGetInteger("gBowSlingShotAmmoFix", 0) || CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
stringModelToUse = Player_HoldsSlingshot(this);
}
BowStringData* stringData = &sBowStringData[stringModelToUse];
@@ -1770,7 +1858,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
Matrix_Push();
Matrix_Translate(stringData->pos.x, stringData->pos.y, stringData->pos.z, MTXMODE_APPLY);
if ((this->stateFlags1 & 0x200) && (this->unk_860 >= 0) && (this->unk_834 <= 10)) {
if ((this->stateFlags1 & PLAYER_STATE1_READY_TO_FIRE) && (this->unk_860 >= 0) && (this->unk_834 <= 10)) {
Vec3f sp90;
f32 distXYZ;
@@ -1850,7 +1938,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
}
if ((this->unk_862 != 0) || ((func_8002DD6C(this) == 0) && (heldActor != NULL))) {
if (!(this->stateFlags1 & 0x400) && (this->unk_862 != 0) && (this->exchangeItemId != EXCH_ITEM_NONE)) {
if (!(this->stateFlags1 & PLAYER_STATE1_GETTING_ITEM) && (this->unk_862 != 0) && (this->exchangeItemId != EXCH_ITEM_NONE)) {
Math_Vec3f_Copy(&sGetItemRefPos, &this->leftHandPos);
} else {
sGetItemRefPos.x = (this->bodyPartsPos[15].x + this->leftHandPos.x) * 0.5f;

View File

@@ -575,6 +575,13 @@ u32 func_80096FE8(PlayState* play, RoomContext* roomCtx) {
frontRoom = gSaveContext.respawnFlag > 0 ? ((void)0, gSaveContext.respawn[gSaveContext.respawnFlag - 1].roomIndex)
: play->setupEntranceList[play->curSpawn].room;
// In ER, override roomNum to load based on scene and spawn during scene init
if (IS_RANDO && gSaveContext.respawnFlag <= 0 &&
Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
frontRoom = Entrance_OverrideSpawnSceneRoom(play->sceneNum, play->curSpawn, frontRoom);
}
func_8009728C(play, roomCtx, frontRoom);
return maxRoomSize;
@@ -583,12 +590,6 @@ u32 func_80096FE8(PlayState* play, RoomContext* roomCtx) {
s32 func_8009728C(PlayState* play, RoomContext* roomCtx, s32 roomNum) {
size_t size;
// In ER, override roomNum to load based on scene and spawn
if (IS_RANDO && gSaveContext.respawnFlag <= 0 &&
Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
roomNum = Entrance_OverrideSpawnSceneRoom(play->sceneNum, play->curSpawn, roomNum);
}
return OTRfunc_8009728C(play, roomCtx, roomNum);
if (roomCtx->status == 0) {

View File

@@ -363,7 +363,7 @@ void Scene_CommandTimeSettings(PlayState* play, SceneCmd* cmd) {
play->envCtx.sunPos.z = (Math_CosS(((void)0, gSaveContext.dayTime) - 0x8000) * 20.0f) * 25.0f;
if (((play->envCtx.timeIncrement == 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) ||
(gSaveContext.entranceIndex == 0x0604)) {
(gSaveContext.entranceIndex == ENTR_LAKE_HYLIA_8)) {
gSaveContext.skyboxTime = ((void)0, gSaveContext.dayTime);
if ((gSaveContext.skyboxTime >= 0x2AAC) && (gSaveContext.skyboxTime < 0x4555)) {
gSaveContext.skyboxTime = 0x3556;

View File

@@ -26,793 +26,20 @@
#include "soh/mq_asset_hacks.h"
#include "soh/Enhancements/randomizer/adult_trade_shuffle.h"
#define ENTRANCE(scene, spawn, continueBgm, displayTitleCard, fadeIn, fadeOut) \
{ \
scene, spawn, \
((continueBgm & 1) << 15) | ((displayTitleCard & 1) << 14) | ((fadeIn & 0x7F) << 7) | (fadeOut & 0x7F) \
}
// Entrance Table definition
#define DEFINE_ENTRANCE(_0, sceneId, spawn, continueBgm, displayTitleCard, endTransType, startTransType) \
{ sceneId, spawn, \
(((continueBgm) ? ENTRANCE_INFO_CONTINUE_BGM_FLAG : 0) | \
((displayTitleCard) ? ENTRANCE_INFO_DISPLAY_TITLE_CARD_FLAG : 0) | \
(((endTransType) << ENTRANCE_INFO_END_TRANS_TYPE_SHIFT) & ENTRANCE_INFO_END_TRANS_TYPE_MASK) | \
(((startTransType) << ENTRANCE_INFO_START_TRANS_TYPE_SHIFT) & ENTRANCE_INFO_START_TRANS_TYPE_MASK)) },
EntranceInfo gEntranceTable[] = {
ENTRANCE(0x00, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x00, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x00, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x00, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x01, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x01, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x01, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x01, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x0B, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x0B, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x0B, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x0B, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x14, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x14, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x14, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x14, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x05, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x05, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x05, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x05, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x6E, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x6E, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x6E, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x6E, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x6C, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x6C, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x6C, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x6C, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x68, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x68, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x68, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x68, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x69, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x69, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x69, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x69, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x6D, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x6D, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x6D, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x6D, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x02, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x02, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x02, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x02, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x02, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x41, 0x00, 0, 1, 0x02, 0x26),
ENTRANCE(0x41, 0x00, 0, 1, 0x02, 0x26), ENTRANCE(0x41, 0x00, 0, 1, 0x02, 0x26),
ENTRANCE(0x41, 0x00, 0, 1, 0x02, 0x26), ENTRANCE(0x41, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x41, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x1B, 0x00, 1, 1, 0x03, 0x03),
ENTRANCE(0x1C, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x1D, 0x00, 1, 1, 0x03, 0x03),
ENTRANCE(0x1D, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x07, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x07, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x07, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x07, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x42, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x42, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x42, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x42, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x3E, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x38, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x38, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x38, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x38, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x6A, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x6A, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x6A, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x6A, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x40, 0x00, 0, 1, 0x02, 0x26),
ENTRANCE(0x40, 0x00, 0, 1, 0x02, 0x26), ENTRANCE(0x40, 0x00, 0, 1, 0x02, 0x26),
ENTRANCE(0x40, 0x00, 0, 1, 0x02, 0x26), ENTRANCE(0x4C, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x4C, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x4C, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x4C, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x43, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x43, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x43, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x43, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x43, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x43, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x43, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x43, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x43, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x43, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x43, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x43, 0x00, 0, 1, 0x0B, 0x0B), ENTRANCE(0x43, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x43, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x43, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x43, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x10, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x10, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x10, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x10, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x1E, 0x03, 1, 1, 0x03, 0x03),
ENTRANCE(0x1F, 0x03, 1, 1, 0x02, 0x02), ENTRANCE(0x1E, 0x03, 1, 1, 0x02, 0x02),
ENTRANCE(0x1F, 0x03, 1, 1, 0x02, 0x02), ENTRANCE(0x44, 0x00, 0, 1, 0x07, 0x07),
ENTRANCE(0x44, 0x00, 0, 1, 0x07, 0x07), ENTRANCE(0x44, 0x00, 0, 1, 0x07, 0x07),
ENTRANCE(0x44, 0x00, 0, 1, 0x07, 0x07), ENTRANCE(0x44, 0x00, 0, 1, 0x0D, 0x02),
ENTRANCE(0x44, 0x00, 0, 1, 0x0D, 0x02), ENTRANCE(0x44, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x4E, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x4E, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x4E, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x4E, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x6B, 0x00, 0, 1, 0x22, 0x22), ENTRANCE(0x6B, 0x00, 0, 1, 0x22, 0x22),
ENTRANCE(0x6B, 0x00, 0, 1, 0x22, 0x22), ENTRANCE(0x6B, 0x00, 0, 1, 0x22, 0x22),
ENTRANCE(0x45, 0x00, 0, 1, 0x22, 0x04), ENTRANCE(0x46, 0x00, 0, 1, 0x22, 0x04),
ENTRANCE(0x45, 0x00, 0, 1, 0x22, 0x04), ENTRANCE(0x46, 0x00, 0, 1, 0x22, 0x04),
ENTRANCE(0x4D, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x4D, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x4D, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x4D, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x06, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x06, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x06, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x06, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x06, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x06, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x09, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x09, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x09, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x09, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x09, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x17, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x17, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x17, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x17, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x17, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x17, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x17, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x65, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x65, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x65, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x65, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x08, 0x00, 0, 1, 0x04, 0x04), ENTRANCE(0x08, 0x00, 0, 1, 0x04, 0x04),
ENTRANCE(0x08, 0x00, 0, 1, 0x04, 0x04), ENTRANCE(0x08, 0x00, 0, 1, 0x04, 0x04),
ENTRANCE(0x27, 0x00, 0, 1, 0x04, 0x04), ENTRANCE(0x27, 0x00, 0, 1, 0x04, 0x04),
ENTRANCE(0x27, 0x00, 0, 1, 0x04, 0x04), ENTRANCE(0x27, 0x00, 0, 1, 0x04, 0x04),
ENTRANCE(0x47, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x47, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x47, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x47, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x47, 0x00, 0, 1, 0x0A, 0x0A), ENTRANCE(0x47, 0x00, 0, 1, 0x02, 0x0A),
ENTRANCE(0x47, 0x00, 1, 1, 0x0A, 0x0A), ENTRANCE(0x47, 0x00, 0, 1, 0x0B, 0x0B),
ENTRANCE(0x47, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x47, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x47, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x47, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x47, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x1E, 0x00, 1, 1, 0x03, 0x03),
ENTRANCE(0x1F, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x1E, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x1F, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x20, 0x00, 1, 1, 0x03, 0x03),
ENTRANCE(0x21, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x22, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x22, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x20, 0x00, 0, 1, 0x08, 0x08),
ENTRANCE(0x67, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x2C, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x2C, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x2C, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x2C, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x34, 0x00, 0, 1, 0x04, 0x04),
ENTRANCE(0x34, 0x00, 0, 1, 0x04, 0x04), ENTRANCE(0x34, 0x00, 0, 1, 0x04, 0x04),
ENTRANCE(0x34, 0x00, 0, 1, 0x04, 0x04), ENTRANCE(0x34, 0x00, 0, 1, 0x04, 0x02),
ENTRANCE(0x34, 0x00, 0, 1, 0x10, 0x10), ENTRANCE(0x2D, 0x00, 0, 1, 0x04, 0x04),
ENTRANCE(0x2D, 0x00, 0, 1, 0x04, 0x04), ENTRANCE(0x2D, 0x00, 0, 1, 0x04, 0x04),
ENTRANCE(0x2D, 0x00, 0, 1, 0x04, 0x04), ENTRANCE(0x01, 0x01, 1, 0, 0x02, 0x02),
ENTRANCE(0x01, 0x01, 1, 0, 0x02, 0x02), ENTRANCE(0x01, 0x01, 1, 0, 0x02, 0x02),
ENTRANCE(0x01, 0x01, 1, 0, 0x02, 0x02), ENTRANCE(0x26, 0x00, 0, 1, 0x04, 0x04),
ENTRANCE(0x26, 0x00, 0, 1, 0x04, 0x04), ENTRANCE(0x26, 0x00, 0, 1, 0x04, 0x04),
ENTRANCE(0x26, 0x00, 0, 1, 0x04, 0x04), ENTRANCE(0x51, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x51, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x51, 0x00, 0, 1, 0x04, 0x02),
ENTRANCE(0x51, 0x00, 0, 1, 0x21, 0x21), ENTRANCE(0x51, 0x00, 0, 1, 0x21, 0x21),
ENTRANCE(0x51, 0x00, 0, 1, 0x23, 0x23), ENTRANCE(0x51, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x51, 0x00, 0, 1, 0x23, 0x23),
ENTRANCE(0x51, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x51, 0x00, 0, 1, 0x29, 0x29),
ENTRANCE(0x51, 0x00, 1, 1, 0x03, 0x03), ENTRANCE(0x52, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x52, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x52, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x52, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x52, 0x00, 0, 1, 0x26, 0x26),
ENTRANCE(0x52, 0x00, 0, 1, 0x21, 0x21), ENTRANCE(0x52, 0x00, 1, 1, 0x21, 0x21),
ENTRANCE(0x52, 0x00, 0, 1, 0x21, 0x21), ENTRANCE(0x52, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x53, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x53, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x53, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x53, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x53, 0x00, 0, 1, 0x04, 0x02), ENTRANCE(0x53, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x54, 0x00, 1, 1, 0x03, 0x03), ENTRANCE(0x54, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x54, 0x00, 1, 1, 0x03, 0x03), ENTRANCE(0x54, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x55, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x55, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x55, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x55, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x55, 0x00, 1, 1, 0x0A, 0x0A), ENTRANCE(0x55, 0x00, 0, 1, 0x0A, 0x0A),
ENTRANCE(0x55, 0x00, 1, 1, 0x0A, 0x0A), ENTRANCE(0x55, 0x00, 0, 1, 0x0D, 0x0A),
ENTRANCE(0x55, 0x00, 0, 1, 0x0A, 0x0A), ENTRANCE(0x55, 0x00, 0, 1, 0x0A, 0x0A),
ENTRANCE(0x55, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x55, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x55, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x55, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x56, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x56, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x56, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x56, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x56, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x56, 0x00, 0, 1, 0x00, 0x00),
ENTRANCE(0x57, 0x00, 1, 1, 0x03, 0x03), ENTRANCE(0x57, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x57, 0x00, 1, 1, 0x03, 0x03), ENTRANCE(0x57, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x57, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x57, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x58, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x58, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x58, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x58, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x58, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x58, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x59, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x59, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x59, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x59, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x59, 0x00, 0, 1, 0x0D, 0x00), ENTRANCE(0x59, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x59, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x59, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x59, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x5A, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x5A, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x5A, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x5A, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x5A, 0x00, 1, 1, 0x0C, 0x0A),
ENTRANCE(0x5A, 0x00, 1, 1, 0x0A, 0x0A), ENTRANCE(0x5A, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x5B, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x5B, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x5B, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x5B, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x5B, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x5C, 0x00, 1, 1, 0x0F, 0x0F),
ENTRANCE(0x5C, 0x00, 1, 1, 0x0F, 0x0F), ENTRANCE(0x5C, 0x00, 1, 1, 0x0F, 0x0F),
ENTRANCE(0x5C, 0x00, 1, 1, 0x0F, 0x0F), ENTRANCE(0x5C, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x5C, 0x00, 1, 1, 0x0F, 0x0F), ENTRANCE(0x5D, 0x00, 1, 1, 0x03, 0x03),
ENTRANCE(0x5D, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x5D, 0x00, 1, 1, 0x03, 0x03),
ENTRANCE(0x5D, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x5D, 0x00, 1, 1, 0x21, 0x21),
ENTRANCE(0x5D, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x5D, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x5E, 0x00, 1, 1, 0x0E, 0x0E), ENTRANCE(0x5E, 0x00, 1, 1, 0x0E, 0x0E),
ENTRANCE(0x5E, 0x00, 1, 1, 0x0E, 0x0E), ENTRANCE(0x5E, 0x00, 1, 1, 0x0E, 0x0E),
ENTRANCE(0x0E, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x0E, 0x01, 1, 1, 0x02, 0x02),
ENTRANCE(0x0E, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x0E, 0x01, 1, 1, 0x02, 0x02),
ENTRANCE(0x5F, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x5F, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x64, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x64, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x64, 0x00, 0, 1, 0x04, 0x02), ENTRANCE(0x60, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x60, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x60, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x60, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x60, 0x00, 1, 1, 0x0A, 0x0A),
ENTRANCE(0x60, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x60, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x60, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x60, 0x00, 1, 1, 0x03, 0x03),
ENTRANCE(0x60, 0x00, 1, 1, 0x03, 0x03), ENTRANCE(0x61, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x61, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x61, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x61, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x61, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x61, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x62, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x62, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x62, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x62, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x62, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x62, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x58, 0x03, 0, 1, 0x00, 0x00),
ENTRANCE(0x58, 0x03, 0, 1, 0x00, 0x00), ENTRANCE(0x58, 0x03, 0, 1, 0x00, 0x00),
ENTRANCE(0x58, 0x03, 0, 1, 0x00, 0x00), ENTRANCE(0x63, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x63, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x63, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x63, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x63, 0x00, 0, 1, 0x20, 0x20),
ENTRANCE(0x63, 0x00, 0, 1, 0x2A, 0x2A), ENTRANCE(0x63, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x63, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x63, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x63, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x63, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x63, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x63, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x63, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x04, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x04, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x04, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x04, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x03, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x03, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x03, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x03, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x42, 0x01, 0, 1, 0x04, 0x20),
ENTRANCE(0x42, 0x01, 0, 1, 0x04, 0x20), ENTRANCE(0x42, 0x01, 0, 1, 0x04, 0x20),
ENTRANCE(0x42, 0x01, 0, 1, 0x04, 0x20), ENTRANCE(0x23, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x24, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x25, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x25, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x04, 0x01, 1, 1, 0x02, 0x02),
ENTRANCE(0x04, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x04, 0x01, 1, 1, 0x02, 0x02),
ENTRANCE(0x04, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x0E, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x0E, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x0E, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x0E, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x51, 0x01, 0, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x51, 0x01, 0, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x51, 0x02, 1, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x02, 1, 1, 0x02, 0x02), ENTRANCE(0x51, 0x02, 1, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x02, 1, 1, 0x02, 0x02), ENTRANCE(0x51, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x51, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x51, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x51, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x51, 0x04, 1, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x04, 1, 1, 0x02, 0x02), ENTRANCE(0x51, 0x04, 1, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x04, 1, 1, 0x02, 0x02), ENTRANCE(0x51, 0x05, 0, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x05, 0, 1, 0x02, 0x02), ENTRANCE(0x51, 0x05, 0, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x05, 0, 1, 0x02, 0x02), ENTRANCE(0x52, 0x01, 0, 1, 0x03, 0x03),
ENTRANCE(0x52, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x52, 0x01, 0, 1, 0x03, 0x03),
ENTRANCE(0x52, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x52, 0x02, 0, 1, 0x03, 0x03),
ENTRANCE(0x52, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x52, 0x02, 0, 1, 0x03, 0x03),
ENTRANCE(0x52, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x54, 0x01, 1, 1, 0x03, 0x03),
ENTRANCE(0x54, 0x01, 1, 1, 0x03, 0x03), ENTRANCE(0x54, 0x01, 1, 1, 0x03, 0x03),
ENTRANCE(0x54, 0x01, 1, 1, 0x03, 0x03), ENTRANCE(0x54, 0x02, 0, 1, 0x03, 0x03),
ENTRANCE(0x54, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x54, 0x02, 0, 1, 0x03, 0x03),
ENTRANCE(0x54, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x58, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x58, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x58, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x58, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x5A, 0x01, 0, 1, 0x03, 0x03),
ENTRANCE(0x5A, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x5A, 0x01, 0, 1, 0x03, 0x03),
ENTRANCE(0x5A, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x5B, 0x01, 1, 1, 0x02, 0x02),
ENTRANCE(0x5B, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x5B, 0x01, 1, 1, 0x02, 0x02),
ENTRANCE(0x5B, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x5B, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x5B, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x5B, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x5B, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x5B, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x5B, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x5B, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x5B, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x0E, 0x02, 1, 1, 0x02, 0x02),
ENTRANCE(0x0E, 0x02, 1, 1, 0x02, 0x02), ENTRANCE(0x0E, 0x02, 1, 1, 0x02, 0x02),
ENTRANCE(0x0E, 0x02, 1, 1, 0x02, 0x02), ENTRANCE(0x60, 0x01, 0, 1, 0x03, 0x03),
ENTRANCE(0x60, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x60, 0x01, 0, 1, 0x03, 0x03),
ENTRANCE(0x60, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x60, 0x02, 0, 1, 0x03, 0x03),
ENTRANCE(0x60, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x60, 0x02, 0, 1, 0x03, 0x03),
ENTRANCE(0x60, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x62, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x62, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x62, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x62, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x38, 0x01, 0, 1, 0x04, 0x20),
ENTRANCE(0x38, 0x01, 0, 1, 0x04, 0x20), ENTRANCE(0x38, 0x01, 0, 1, 0x04, 0x20),
ENTRANCE(0x38, 0x01, 0, 1, 0x04, 0x20), ENTRANCE(0x1A, 0x05, 1, 1, 0x02, 0x02),
ENTRANCE(0x1A, 0x05, 1, 1, 0x02, 0x02), ENTRANCE(0x1A, 0x05, 1, 1, 0x02, 0x02),
ENTRANCE(0x1A, 0x05, 1, 1, 0x02, 0x02), ENTRANCE(0x20, 0x08, 0, 1, 0x04, 0x02),
ENTRANCE(0x21, 0x08, 0, 1, 0x04, 0x02), ENTRANCE(0x22, 0x08, 0, 1, 0x04, 0x02),
ENTRANCE(0x22, 0x08, 0, 1, 0x04, 0x02), ENTRANCE(0x20, 0x09, 0, 1, 0x04, 0x02),
ENTRANCE(0x21, 0x09, 0, 1, 0x04, 0x02), ENTRANCE(0x22, 0x09, 0, 1, 0x04, 0x02),
ENTRANCE(0x22, 0x09, 0, 1, 0x04, 0x02), ENTRANCE(0x20, 0x0A, 0, 1, 0x04, 0x02),
ENTRANCE(0x21, 0x0A, 0, 1, 0x04, 0x02), ENTRANCE(0x22, 0x0A, 0, 1, 0x04, 0x02),
ENTRANCE(0x22, 0x0A, 0, 1, 0x04, 0x02), ENTRANCE(0x54, 0x03, 1, 1, 0x03, 0x03),
ENTRANCE(0x54, 0x03, 1, 1, 0x02, 0x02), ENTRANCE(0x54, 0x03, 1, 1, 0x03, 0x03),
ENTRANCE(0x54, 0x03, 1, 1, 0x02, 0x02), ENTRANCE(0x54, 0x04, 0, 1, 0x2C, 0x2C),
ENTRANCE(0x54, 0x04, 0, 1, 0x2C, 0x2C), ENTRANCE(0x54, 0x04, 0, 1, 0x2C, 0x2C),
ENTRANCE(0x54, 0x04, 0, 1, 0x2C, 0x2C), ENTRANCE(0x5C, 0x01, 0, 1, 0x03, 0x03),
ENTRANCE(0x5C, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x5C, 0x01, 0, 1, 0x03, 0x03),
ENTRANCE(0x5C, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x5C, 0x02, 0, 0, 0x03, 0x03),
ENTRANCE(0x5C, 0x02, 0, 0, 0x02, 0x02), ENTRANCE(0x5C, 0x02, 0, 0, 0x03, 0x03),
ENTRANCE(0x5C, 0x02, 0, 0, 0x02, 0x02), ENTRANCE(0x5C, 0x03, 0, 0, 0x03, 0x03),
ENTRANCE(0x5C, 0x03, 0, 0, 0x02, 0x02), ENTRANCE(0x5C, 0x03, 0, 0, 0x03, 0x03),
ENTRANCE(0x5C, 0x03, 0, 0, 0x02, 0x02), ENTRANCE(0x5C, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x5C, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x5C, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x5C, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x5C, 0x05, 0, 1, 0x03, 0x03),
ENTRANCE(0x5C, 0x05, 0, 1, 0x02, 0x02), ENTRANCE(0x5C, 0x05, 0, 1, 0x03, 0x03),
ENTRANCE(0x5C, 0x05, 0, 1, 0x02, 0x02), ENTRANCE(0x5C, 0x06, 1, 0, 0x0F, 0x0F),
ENTRANCE(0x5C, 0x06, 1, 0, 0x0F, 0x0F), ENTRANCE(0x5C, 0x06, 1, 0, 0x0F, 0x0F),
ENTRANCE(0x5C, 0x06, 1, 0, 0x0F, 0x0F), ENTRANCE(0x51, 0x06, 0, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x06, 0, 1, 0x02, 0x02), ENTRANCE(0x51, 0x06, 0, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x06, 0, 1, 0x02, 0x02), ENTRANCE(0x51, 0x07, 0, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x07, 0, 1, 0x02, 0x02), ENTRANCE(0x51, 0x07, 0, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x07, 0, 1, 0x02, 0x02), ENTRANCE(0x52, 0x03, 0, 1, 0x04, 0x02),
ENTRANCE(0x52, 0x03, 0, 1, 0x04, 0x02), ENTRANCE(0x52, 0x03, 0, 1, 0x04, 0x02),
ENTRANCE(0x52, 0x03, 0, 1, 0x04, 0x02), ENTRANCE(0x53, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x53, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x53, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x53, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x55, 0x01, 0, 1, 0x03, 0x03),
ENTRANCE(0x55, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x55, 0x01, 0, 1, 0x03, 0x03),
ENTRANCE(0x55, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x55, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x55, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x55, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x55, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x55, 0x03, 0, 1, 0x04, 0x04),
ENTRANCE(0x55, 0x03, 0, 1, 0x04, 0x04), ENTRANCE(0x55, 0x03, 0, 1, 0x04, 0x04),
ENTRANCE(0x55, 0x03, 0, 1, 0x04, 0x04), ENTRANCE(0x56, 0x01, 0, 1, 0x12, 0x12),
ENTRANCE(0x56, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x56, 0x01, 0, 1, 0x12, 0x12),
ENTRANCE(0x56, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x57, 0x01, 0, 1, 0x03, 0x03),
ENTRANCE(0x57, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x57, 0x01, 0, 1, 0x03, 0x03),
ENTRANCE(0x57, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x57, 0x02, 0, 1, 0x13, 0x13),
ENTRANCE(0x57, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x57, 0x02, 0, 1, 0x13, 0x13),
ENTRANCE(0x57, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x59, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x59, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x59, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x59, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x59, 0x02, 0, 1, 0x03, 0x03),
ENTRANCE(0x59, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x59, 0x02, 0, 1, 0x03, 0x03),
ENTRANCE(0x59, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x5A, 0x02, 1, 1, 0x03, 0x03),
ENTRANCE(0x5A, 0x02, 1, 1, 0x02, 0x02), ENTRANCE(0x5A, 0x02, 1, 1, 0x03, 0x03),
ENTRANCE(0x5A, 0x02, 1, 1, 0x02, 0x02), ENTRANCE(0x5A, 0x03, 1, 1, 0x03, 0x03),
ENTRANCE(0x5A, 0x03, 1, 1, 0x02, 0x02), ENTRANCE(0x5A, 0x03, 1, 1, 0x03, 0x03),
ENTRANCE(0x5A, 0x03, 1, 1, 0x02, 0x02), ENTRANCE(0x5D, 0x01, 0, 1, 0x03, 0x03),
ENTRANCE(0x5D, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x5D, 0x01, 0, 1, 0x03, 0x03),
ENTRANCE(0x5D, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x5D, 0x02, 0, 1, 0x03, 0x03),
ENTRANCE(0x5D, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x5D, 0x02, 0, 1, 0x03, 0x03),
ENTRANCE(0x5D, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x5D, 0x03, 0, 1, 0x03, 0x03),
ENTRANCE(0x5D, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x5D, 0x03, 0, 1, 0x03, 0x03),
ENTRANCE(0x5D, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x5F, 0x01, 0, 1, 0x03, 0x03),
ENTRANCE(0x5F, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x64, 0x01, 0, 1, 0x05, 0x05),
ENTRANCE(0x64, 0x01, 0, 1, 0x05, 0x05), ENTRANCE(0x5F, 0x01, 0, 1, 0x00, 0x00),
ENTRANCE(0x60, 0x03, 0, 1, 0x03, 0x03), ENTRANCE(0x60, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x60, 0x03, 0, 1, 0x03, 0x03), ENTRANCE(0x60, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x61, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x61, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x61, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x61, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x61, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x61, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x61, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x61, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x03, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x03, 0x01, 1, 1, 0x02, 0x02),
ENTRANCE(0x03, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x03, 0x01, 1, 1, 0x02, 0x02),
ENTRANCE(0x00, 0x01, 1, 0, 0x02, 0x02), ENTRANCE(0x00, 0x01, 1, 0, 0x02, 0x02),
ENTRANCE(0x00, 0x01, 1, 0, 0x02, 0x02), ENTRANCE(0x00, 0x01, 1, 0, 0x02, 0x02),
ENTRANCE(0x0E, 0x03, 1, 1, 0x02, 0x02), ENTRANCE(0x0E, 0x03, 1, 1, 0x02, 0x02),
ENTRANCE(0x0E, 0x03, 1, 1, 0x02, 0x02), ENTRANCE(0x0E, 0x03, 1, 1, 0x02, 0x02),
ENTRANCE(0x20, 0x01, 0, 1, 0x03, 0x03), ENTRANCE(0x21, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x22, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x22, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x20, 0x02, 0, 1, 0x03, 0x03), ENTRANCE(0x21, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x22, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x22, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x20, 0x03, 1, 1, 0x03, 0x03), ENTRANCE(0x21, 0x03, 1, 1, 0x02, 0x02),
ENTRANCE(0x22, 0x03, 1, 1, 0x02, 0x02), ENTRANCE(0x22, 0x03, 1, 1, 0x02, 0x02),
ENTRANCE(0x55, 0x04, 0, 0, 0x04, 0x04), ENTRANCE(0x55, 0x04, 0, 0, 0x04, 0x04),
ENTRANCE(0x55, 0x04, 0, 0, 0x04, 0x04), ENTRANCE(0x55, 0x04, 0, 0, 0x04, 0x04),
ENTRANCE(0x55, 0x05, 0, 0, 0x04, 0x04), ENTRANCE(0x55, 0x05, 0, 0, 0x04, 0x04),
ENTRANCE(0x55, 0x05, 0, 0, 0x04, 0x04), ENTRANCE(0x55, 0x05, 0, 0, 0x04, 0x04),
ENTRANCE(0x1B, 0x02, 0, 0, 0x02, 0x02), ENTRANCE(0x1C, 0x02, 0, 0, 0x02, 0x02),
ENTRANCE(0x1D, 0x02, 0, 0, 0x02, 0x02), ENTRANCE(0x1D, 0x02, 0, 0, 0x02, 0x02),
ENTRANCE(0x34, 0x01, 0, 1, 0x04, 0x04), ENTRANCE(0x34, 0x01, 0, 1, 0x04, 0x04),
ENTRANCE(0x34, 0x01, 0, 1, 0x04, 0x04), ENTRANCE(0x34, 0x01, 0, 1, 0x04, 0x04),
ENTRANCE(0x1B, 0x01, 0, 1, 0x03, 0x03), ENTRANCE(0x1C, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x1D, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x1D, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x51, 0x08, 1, 1, 0x03, 0x03), ENTRANCE(0x51, 0x08, 1, 1, 0x02, 0x02),
ENTRANCE(0x51, 0x08, 1, 1, 0x03, 0x03), ENTRANCE(0x51, 0x08, 1, 1, 0x02, 0x02),
ENTRANCE(0x51, 0x09, 0, 1, 0x03, 0x03), ENTRANCE(0x51, 0x09, 0, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x09, 0, 1, 0x03, 0x03), ENTRANCE(0x51, 0x09, 0, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x0A, 0, 1, 0x03, 0x03), ENTRANCE(0x51, 0x0A, 0, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x0A, 0, 1, 0x03, 0x03), ENTRANCE(0x51, 0x0A, 0, 1, 0x03, 0x03),
ENTRANCE(0x55, 0x06, 0, 1, 0x02, 0x02), ENTRANCE(0x55, 0x06, 0, 1, 0x02, 0x02),
ENTRANCE(0x55, 0x06, 0, 1, 0x02, 0x02), ENTRANCE(0x55, 0x06, 0, 1, 0x02, 0x02),
ENTRANCE(0x51, 0x0B, 0, 1, 0x05, 0x05), ENTRANCE(0x51, 0x0B, 0, 1, 0x04, 0x02),
ENTRANCE(0x51, 0x0B, 0, 1, 0x05, 0x05), ENTRANCE(0x51, 0x0B, 0, 1, 0x04, 0x02),
ENTRANCE(0x51, 0x0C, 0, 1, 0x05, 0x05), ENTRANCE(0x51, 0x0C, 0, 1, 0x04, 0x02),
ENTRANCE(0x51, 0x0C, 0, 1, 0x05, 0x05), ENTRANCE(0x51, 0x0C, 0, 1, 0x04, 0x02),
ENTRANCE(0x51, 0x0D, 0, 1, 0x05, 0x05), ENTRANCE(0x51, 0x0D, 0, 1, 0x04, 0x02),
ENTRANCE(0x51, 0x0D, 0, 1, 0x05, 0x05), ENTRANCE(0x51, 0x0D, 0, 1, 0x04, 0x02),
ENTRANCE(0x45, 0x01, 0, 1, 0x03, 0x03), ENTRANCE(0x46, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x45, 0x01, 0, 1, 0x03, 0x03), ENTRANCE(0x46, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x1E, 0x01, 1, 1, 0x03, 0x03), ENTRANCE(0x1F, 0x01, 1, 1, 0x02, 0x02),
ENTRANCE(0x1E, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x1F, 0x01, 1, 1, 0x02, 0x02),
ENTRANCE(0x20, 0x04, 1, 1, 0x03, 0x03), ENTRANCE(0x21, 0x04, 1, 1, 0x02, 0x02),
ENTRANCE(0x22, 0x04, 1, 1, 0x02, 0x02), ENTRANCE(0x22, 0x04, 1, 1, 0x02, 0x02),
ENTRANCE(0x20, 0x05, 0, 1, 0x04, 0x02), ENTRANCE(0x21, 0x05, 0, 1, 0x04, 0x02),
ENTRANCE(0x22, 0x05, 0, 1, 0x04, 0x02), ENTRANCE(0x22, 0x05, 0, 1, 0x04, 0x02),
ENTRANCE(0x52, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x52, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x52, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x52, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x04, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x04, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x63, 0x01, 0, 0, 0x03, 0x03), ENTRANCE(0x63, 0x01, 0, 0, 0x02, 0x02),
ENTRANCE(0x63, 0x01, 0, 0, 0x03, 0x03), ENTRANCE(0x63, 0x01, 0, 0, 0x02, 0x02),
ENTRANCE(0x07, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x07, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x07, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x07, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x07, 0x02, 1, 1, 0x02, 0x02), ENTRANCE(0x07, 0x02, 1, 1, 0x02, 0x02),
ENTRANCE(0x07, 0x02, 1, 1, 0x02, 0x02), ENTRANCE(0x07, 0x02, 1, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x05, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x05, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x05, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x05, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x06, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x06, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x06, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x06, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x07, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x07, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x07, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x07, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x08, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x08, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x08, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x08, 0, 1, 0x02, 0x02),
ENTRANCE(0x43, 0x02, 0, 1, 0x0A, 0x0A), ENTRANCE(0x43, 0x02, 0, 1, 0x0A, 0x0A),
ENTRANCE(0x43, 0x02, 0, 1, 0x0A, 0x0A), ENTRANCE(0x43, 0x02, 0, 1, 0x0A, 0x0A),
ENTRANCE(0x44, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x44, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x44, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x44, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x09, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x09, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x09, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x09, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x0A, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x0A, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x0A, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x0A, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x0B, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x0B, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x0B, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x0B, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x0C, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x0C, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x0C, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x0C, 0, 1, 0x02, 0x02),
ENTRANCE(0x63, 0x02, 0, 1, 0x03, 0x03), ENTRANCE(0x63, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x63, 0x02, 0, 1, 0x03, 0x03), ENTRANCE(0x63, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x63, 0x03, 0, 1, 0x03, 0x03), ENTRANCE(0x63, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x63, 0x03, 0, 1, 0x03, 0x03), ENTRANCE(0x63, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x42, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x42, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x42, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x42, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x56, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x47, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x42, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x42, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x42, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x42, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x42, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x06, 0x01, 1, 1, 0x02, 0x02),
ENTRANCE(0x06, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x06, 0x01, 1, 1, 0x02, 0x02),
ENTRANCE(0x06, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x36, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x36, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x36, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x36, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x2A, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x2A, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x2A, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x2A, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x13, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x13, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x13, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x13, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x15, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x15, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x15, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x15, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x57, 0x06, 0, 1, 0x04, 0x02),
ENTRANCE(0x57, 0x06, 0, 1, 0x04, 0x02), ENTRANCE(0x57, 0x06, 0, 1, 0x04, 0x02),
ENTRANCE(0x57, 0x06, 0, 1, 0x04, 0x02), ENTRANCE(0x3A, 0x00, 0, 1, 0x02, 0x20),
ENTRANCE(0x3A, 0x00, 0, 1, 0x02, 0x20), ENTRANCE(0x3A, 0x00, 0, 1, 0x02, 0x20),
ENTRANCE(0x3A, 0x00, 0, 1, 0x02, 0x20), ENTRANCE(0x51, 0x0E, 1, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x0E, 1, 1, 0x03, 0x03), ENTRANCE(0x51, 0x0E, 1, 1, 0x03, 0x03),
ENTRANCE(0x51, 0x0E, 1, 1, 0x03, 0x03), ENTRANCE(0x3B, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x3B, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x3B, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x3B, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x3B, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x3B, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x3B, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x3F, 0x00, 0, 1, 0x02, 0x26), ENTRANCE(0x3F, 0x00, 0, 1, 0x02, 0x26),
ENTRANCE(0x3F, 0x00, 0, 1, 0x02, 0x26), ENTRANCE(0x3F, 0x00, 0, 1, 0x02, 0x26),
ENTRANCE(0x43, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x43, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x43, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x43, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x43, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x43, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x43, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x43, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x58, 0x04, 0, 1, 0x2C, 0x2C), ENTRANCE(0x58, 0x04, 0, 1, 0x2C, 0x2C),
ENTRANCE(0x58, 0x04, 0, 1, 0x2C, 0x2C), ENTRANCE(0x58, 0x04, 0, 1, 0x2C, 0x2C),
ENTRANCE(0x1A, 0x02, 1, 1, 0x02, 0x02), ENTRANCE(0x1A, 0x02, 1, 1, 0x02, 0x02),
ENTRANCE(0x1A, 0x02, 1, 1, 0x02, 0x02), ENTRANCE(0x1A, 0x02, 1, 1, 0x02, 0x02),
ENTRANCE(0x1A, 0x03, 1, 1, 0x02, 0x02), ENTRANCE(0x1A, 0x03, 1, 1, 0x02, 0x02),
ENTRANCE(0x1A, 0x03, 1, 1, 0x02, 0x02), ENTRANCE(0x1A, 0x03, 1, 1, 0x02, 0x02),
ENTRANCE(0x1A, 0x04, 1, 1, 0x02, 0x02), ENTRANCE(0x1A, 0x04, 1, 1, 0x02, 0x02),
ENTRANCE(0x1A, 0x04, 1, 1, 0x02, 0x02), ENTRANCE(0x1A, 0x04, 1, 1, 0x02, 0x02),
ENTRANCE(0x55, 0x07, 0, 0, 0x04, 0x04), ENTRANCE(0x55, 0x07, 0, 0, 0x04, 0x04),
ENTRANCE(0x55, 0x07, 0, 0, 0x04, 0x04), ENTRANCE(0x55, 0x07, 0, 0, 0x04, 0x04),
ENTRANCE(0x55, 0x08, 0, 0, 0x04, 0x04), ENTRANCE(0x55, 0x08, 0, 0, 0x04, 0x04),
ENTRANCE(0x55, 0x08, 0, 0, 0x04, 0x04), ENTRANCE(0x55, 0x08, 0, 0, 0x04, 0x04),
ENTRANCE(0x5F, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x5F, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x64, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x64, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x5F, 0x02, 0, 1, 0x00, 0x00), ENTRANCE(0x52, 0x05, 0, 1, 0x04, 0x02),
ENTRANCE(0x52, 0x05, 0, 1, 0x04, 0x02), ENTRANCE(0x52, 0x05, 0, 1, 0x04, 0x02),
ENTRANCE(0x52, 0x05, 0, 1, 0x04, 0x02), ENTRANCE(0x52, 0x06, 0, 1, 0x04, 0x02),
ENTRANCE(0x52, 0x06, 0, 1, 0x04, 0x02), ENTRANCE(0x52, 0x06, 0, 1, 0x04, 0x02),
ENTRANCE(0x52, 0x06, 0, 1, 0x04, 0x02), ENTRANCE(0x52, 0x07, 0, 1, 0x04, 0x02),
ENTRANCE(0x52, 0x07, 0, 1, 0x04, 0x02), ENTRANCE(0x52, 0x07, 0, 1, 0x04, 0x02),
ENTRANCE(0x52, 0x07, 0, 1, 0x04, 0x02), ENTRANCE(0x52, 0x08, 0, 1, 0x04, 0x02),
ENTRANCE(0x52, 0x08, 0, 1, 0x04, 0x02), ENTRANCE(0x52, 0x08, 0, 1, 0x04, 0x02),
ENTRANCE(0x52, 0x08, 0, 1, 0x04, 0x02), ENTRANCE(0x53, 0x02, 0, 1, 0x04, 0x02),
ENTRANCE(0x53, 0x02, 0, 1, 0x04, 0x02), ENTRANCE(0x53, 0x02, 0, 1, 0x04, 0x02),
ENTRANCE(0x53, 0x02, 0, 1, 0x04, 0x02), ENTRANCE(0x53, 0x03, 0, 1, 0x03, 0x03),
ENTRANCE(0x53, 0x03, 0, 1, 0x03, 0x03), ENTRANCE(0x53, 0x03, 0, 1, 0x03, 0x03),
ENTRANCE(0x53, 0x03, 0, 1, 0x03, 0x03), ENTRANCE(0x53, 0x04, 0, 1, 0x03, 0x03),
ENTRANCE(0x53, 0x04, 0, 1, 0x03, 0x03), ENTRANCE(0x53, 0x04, 0, 1, 0x03, 0x03),
ENTRANCE(0x53, 0x04, 0, 1, 0x03, 0x03), ENTRANCE(0x53, 0x05, 0, 1, 0x03, 0x03),
ENTRANCE(0x53, 0x05, 0, 1, 0x03, 0x03), ENTRANCE(0x53, 0x05, 0, 1, 0x03, 0x03),
ENTRANCE(0x53, 0x05, 0, 1, 0x03, 0x03), ENTRANCE(0x5E, 0x01, 1, 1, 0x0E, 0x0E),
ENTRANCE(0x5E, 0x01, 1, 1, 0x0E, 0x0E), ENTRANCE(0x5E, 0x01, 1, 1, 0x0E, 0x0E),
ENTRANCE(0x5E, 0x01, 1, 1, 0x0E, 0x0E), ENTRANCE(0x5E, 0x02, 0, 1, 0x0E, 0x0E),
ENTRANCE(0x5E, 0x02, 0, 1, 0x0E, 0x0E), ENTRANCE(0x5E, 0x02, 0, 1, 0x0E, 0x0E),
ENTRANCE(0x5E, 0x02, 0, 1, 0x0E, 0x0E), ENTRANCE(0x3C, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x3C, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x3C, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x3C, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x3D, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x3D, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x3D, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x3D, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x3D, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x3D, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x3D, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x63, 0x04, 0, 1, 0x04, 0x02), ENTRANCE(0x63, 0x04, 0, 1, 0x04, 0x02),
ENTRANCE(0x63, 0x04, 0, 1, 0x04, 0x02), ENTRANCE(0x63, 0x04, 0, 1, 0x04, 0x02),
ENTRANCE(0x2E, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x2E, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x2E, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x2E, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x2F, 0x00, 0, 1, 0x04, 0x04), ENTRANCE(0x2F, 0x00, 0, 1, 0x04, 0x04),
ENTRANCE(0x2F, 0x00, 0, 1, 0x04, 0x04), ENTRANCE(0x2F, 0x00, 0, 1, 0x04, 0x04),
ENTRANCE(0x30, 0x00, 0, 0, 0x04, 0x20), ENTRANCE(0x30, 0x00, 0, 0, 0x04, 0x20),
ENTRANCE(0x30, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x30, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x31, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x31, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x31, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x31, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x1E, 0x04, 0, 1, 0x04, 0x02), ENTRANCE(0x1F, 0x04, 0, 1, 0x04, 0x02),
ENTRANCE(0x1E, 0x04, 0, 1, 0x04, 0x02), ENTRANCE(0x1F, 0x04, 0, 1, 0x04, 0x02),
ENTRANCE(0x32, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x32, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x32, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x32, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x59, 0x05, 0, 1, 0x03, 0x03), ENTRANCE(0x59, 0x05, 0, 1, 0x03, 0x03),
ENTRANCE(0x59, 0x05, 0, 1, 0x03, 0x03), ENTRANCE(0x59, 0x05, 0, 1, 0x03, 0x03),
ENTRANCE(0x35, 0x00, 0, 1, 0x04, 0x02), ENTRANCE(0x35, 0x00, 0, 1, 0x04, 0x02),
ENTRANCE(0x35, 0x00, 0, 1, 0x04, 0x02), ENTRANCE(0x35, 0x00, 0, 1, 0x04, 0x02),
ENTRANCE(0x37, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x37, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x37, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x37, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x39, 0x00, 0, 1, 0x04, 0x04), ENTRANCE(0x39, 0x00, 0, 1, 0x04, 0x04),
ENTRANCE(0x39, 0x00, 0, 1, 0x04, 0x04), ENTRANCE(0x39, 0x00, 0, 1, 0x04, 0x04),
ENTRANCE(0x5D, 0x0D, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x0D, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x0D, 0, 1, 0x03, 0x03), ENTRANCE(0x5D, 0x0D, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x0E, 0, 1, 0x03, 0x05), ENTRANCE(0x5D, 0x0E, 0, 1, 0x02, 0x04),
ENTRANCE(0x5D, 0x0E, 0, 1, 0x03, 0x05), ENTRANCE(0x5D, 0x0E, 0, 1, 0x02, 0x04),
ENTRANCE(0x5D, 0x0F, 1, 1, 0x0F, 0x0F), ENTRANCE(0x5D, 0x0F, 1, 1, 0x0F, 0x0F),
ENTRANCE(0x5D, 0x0F, 1, 1, 0x0F, 0x0F), ENTRANCE(0x5D, 0x0F, 1, 1, 0x0F, 0x0F),
ENTRANCE(0x5D, 0x10, 0, 1, 0x02, 0x02), ENTRANCE(0x5D, 0x10, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x10, 0, 1, 0x02, 0x02), ENTRANCE(0x5D, 0x10, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x11, 0, 1, 0x02, 0x02), ENTRANCE(0x5D, 0x11, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x11, 0, 1, 0x02, 0x02), ENTRANCE(0x5D, 0x11, 0, 1, 0x02, 0x02),
ENTRANCE(0x20, 0x06, 0, 1, 0x04, 0x02), ENTRANCE(0x21, 0x06, 0, 1, 0x04, 0x02),
ENTRANCE(0x22, 0x06, 0, 1, 0x04, 0x02), ENTRANCE(0x22, 0x06, 0, 1, 0x04, 0x02),
ENTRANCE(0x20, 0x07, 0, 1, 0x04, 0x02), ENTRANCE(0x21, 0x07, 0, 1, 0x04, 0x02),
ENTRANCE(0x22, 0x07, 0, 1, 0x04, 0x02), ENTRANCE(0x22, 0x07, 0, 1, 0x04, 0x02),
ENTRANCE(0x1E, 0x02, 0, 1, 0x04, 0x02), ENTRANCE(0x1F, 0x02, 0, 1, 0x04, 0x02),
ENTRANCE(0x1E, 0x02, 0, 1, 0x03, 0x03), ENTRANCE(0x1F, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x58, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x58, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x58, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x58, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x57, 0x03, 0, 1, 0x03, 0x03), ENTRANCE(0x57, 0x03, 0, 1, 0x03, 0x03),
ENTRANCE(0x57, 0x03, 0, 1, 0x03, 0x03), ENTRANCE(0x57, 0x03, 0, 1, 0x03, 0x03),
ENTRANCE(0x57, 0x04, 0, 1, 0x04, 0x02), ENTRANCE(0x57, 0x04, 0, 1, 0x04, 0x02),
ENTRANCE(0x57, 0x04, 0, 1, 0x04, 0x02), ENTRANCE(0x57, 0x04, 0, 1, 0x04, 0x02),
ENTRANCE(0x5A, 0x04, 0, 1, 0x04, 0x02), ENTRANCE(0x5A, 0x04, 0, 1, 0x04, 0x02),
ENTRANCE(0x5A, 0x04, 0, 1, 0x04, 0x02), ENTRANCE(0x5A, 0x04, 0, 1, 0x04, 0x02),
ENTRANCE(0x59, 0x03, 0, 1, 0x03, 0x03), ENTRANCE(0x59, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x59, 0x03, 0, 1, 0x03, 0x03), ENTRANCE(0x59, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x59, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x59, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x59, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x59, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x0E, 0x04, 1, 1, 0x02, 0x02), ENTRANCE(0x0E, 0x04, 1, 1, 0x02, 0x02),
ENTRANCE(0x0E, 0x04, 1, 1, 0x02, 0x02), ENTRANCE(0x0E, 0x04, 1, 1, 0x02, 0x02),
ENTRANCE(0x0E, 0x05, 1, 1, 0x02, 0x02), ENTRANCE(0x0E, 0x05, 1, 1, 0x02, 0x02),
ENTRANCE(0x0E, 0x05, 1, 1, 0x02, 0x02), ENTRANCE(0x0E, 0x05, 1, 1, 0x02, 0x02),
ENTRANCE(0x0E, 0x06, 1, 1, 0x02, 0x02), ENTRANCE(0x0E, 0x06, 1, 1, 0x02, 0x02),
ENTRANCE(0x0E, 0x06, 1, 1, 0x02, 0x02), ENTRANCE(0x0E, 0x06, 1, 1, 0x02, 0x02),
ENTRANCE(0x30, 0x01, 0, 0, 0x04, 0x20), ENTRANCE(0x30, 0x01, 0, 0, 0x04, 0x20),
ENTRANCE(0x30, 0x01, 0, 1, 0x04, 0x20), ENTRANCE(0x30, 0x01, 0, 1, 0x04, 0x20),
ENTRANCE(0x30, 0x02, 0, 0, 0x04, 0x20), ENTRANCE(0x30, 0x02, 0, 0, 0x04, 0x20),
ENTRANCE(0x30, 0x02, 0, 1, 0x04, 0x20), ENTRANCE(0x30, 0x02, 0, 1, 0x04, 0x20),
ENTRANCE(0x06, 0x02, 0, 0, 0x02, 0x02), ENTRANCE(0x06, 0x02, 0, 0, 0x02, 0x02),
ENTRANCE(0x06, 0x02, 0, 0, 0x02, 0x02), ENTRANCE(0x06, 0x02, 0, 0, 0x02, 0x02),
ENTRANCE(0x06, 0x03, 0, 0, 0x02, 0x02), ENTRANCE(0x06, 0x03, 0, 0, 0x02, 0x02),
ENTRANCE(0x06, 0x03, 0, 0, 0x02, 0x02), ENTRANCE(0x06, 0x03, 0, 0, 0x02, 0x02),
ENTRANCE(0x06, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x06, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x06, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x06, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x62, 0x02, 0, 1, 0x04, 0x02), ENTRANCE(0x62, 0x02, 0, 1, 0x04, 0x02),
ENTRANCE(0x62, 0x02, 0, 1, 0x04, 0x02), ENTRANCE(0x62, 0x02, 0, 1, 0x04, 0x02),
ENTRANCE(0x4A, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x4A, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x4A, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x4A, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x4A, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x4A, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x4A, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x02, 0x01, 1, 1, 0x02, 0x02),
ENTRANCE(0x02, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x02, 0x01, 1, 1, 0x02, 0x02),
ENTRANCE(0x02, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x12, 0x00, 1, 0, 0x02, 0x02),
ENTRANCE(0x12, 0x00, 1, 0, 0x02, 0x02), ENTRANCE(0x12, 0x00, 1, 0, 0x02, 0x02),
ENTRANCE(0x12, 0x00, 1, 0, 0x02, 0x02), ENTRANCE(0x11, 0x00, 1, 0, 0x02, 0x02),
ENTRANCE(0x11, 0x00, 1, 0, 0x02, 0x02), ENTRANCE(0x11, 0x00, 1, 0, 0x02, 0x02),
ENTRANCE(0x11, 0x00, 1, 0, 0x02, 0x02), ENTRANCE(0x18, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x18, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x18, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x18, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x16, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x16, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x16, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x16, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x0A, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x0A, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x0A, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x0A, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x19, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x19, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x19, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x19, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x05, 0x01, 1, 1, 0x03, 0x02),
ENTRANCE(0x05, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x05, 0x01, 1, 1, 0x03, 0x02),
ENTRANCE(0x05, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x0A, 0x01, 1, 1, 0x02, 0x02),
ENTRANCE(0x0A, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x0A, 0x01, 1, 1, 0x02, 0x02),
ENTRANCE(0x0A, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x0A, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x0A, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x0A, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x0A, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x63, 0x05, 0, 1, 0x04, 0x02),
ENTRANCE(0x63, 0x05, 0, 1, 0x04, 0x02), ENTRANCE(0x63, 0x05, 0, 1, 0x04, 0x02),
ENTRANCE(0x63, 0x05, 0, 1, 0x04, 0x02), ENTRANCE(0x28, 0x00, 0, 1, 0x04, 0x04),
ENTRANCE(0x28, 0x00, 0, 1, 0x04, 0x04), ENTRANCE(0x28, 0x00, 0, 1, 0x04, 0x04),
ENTRANCE(0x28, 0x00, 0, 1, 0x04, 0x04), ENTRANCE(0x29, 0x00, 0, 1, 0x04, 0x04),
ENTRANCE(0x29, 0x00, 0, 1, 0x04, 0x04), ENTRANCE(0x29, 0x00, 0, 1, 0x04, 0x04),
ENTRANCE(0x29, 0x00, 0, 1, 0x04, 0x04), ENTRANCE(0x2B, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x2B, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x2B, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x2B, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x1A, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x1A, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x1A, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x1A, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x55, 0x09, 0, 0, 0x04, 0x04),
ENTRANCE(0x55, 0x09, 0, 0, 0x04, 0x04), ENTRANCE(0x55, 0x09, 0, 0, 0x04, 0x04),
ENTRANCE(0x55, 0x09, 0, 0, 0x04, 0x04), ENTRANCE(0x55, 0x0A, 0, 0, 0x04, 0x04),
ENTRANCE(0x55, 0x0A, 0, 0, 0x04, 0x04), ENTRANCE(0x55, 0x0A, 0, 0, 0x04, 0x04),
ENTRANCE(0x55, 0x0A, 0, 0, 0x04, 0x04), ENTRANCE(0x52, 0x09, 0, 1, 0x04, 0x04),
ENTRANCE(0x52, 0x09, 0, 1, 0x04, 0x04), ENTRANCE(0x52, 0x09, 0, 1, 0x04, 0x04),
ENTRANCE(0x52, 0x09, 0, 1, 0x04, 0x04), ENTRANCE(0x48, 0x00, 0, 1, 0x02, 0x26),
ENTRANCE(0x48, 0x00, 0, 1, 0x02, 0x26), ENTRANCE(0x48, 0x00, 0, 1, 0x02, 0x26),
ENTRANCE(0x48, 0x00, 0, 1, 0x02, 0x26), ENTRANCE(0x48, 0x01, 0, 1, 0x04, 0x20),
ENTRANCE(0x48, 0x01, 0, 1, 0x04, 0x20), ENTRANCE(0x48, 0x01, 0, 1, 0x04, 0x20),
ENTRANCE(0x48, 0x01, 0, 1, 0x04, 0x20), ENTRANCE(0x55, 0x0B, 0, 1, 0x04, 0x02),
ENTRANCE(0x55, 0x0B, 0, 1, 0x04, 0x02), ENTRANCE(0x55, 0x0B, 0, 1, 0x04, 0x02),
ENTRANCE(0x55, 0x0B, 0, 1, 0x04, 0x02), ENTRANCE(0x60, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x60, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x60, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x60, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x49, 0x00, 0, 1, 0x02, 0x20),
ENTRANCE(0x49, 0x00, 0, 1, 0x02, 0x20), ENTRANCE(0x49, 0x00, 0, 1, 0x02, 0x20),
ENTRANCE(0x49, 0x00, 0, 1, 0x02, 0x20), ENTRANCE(0x52, 0x0A, 0, 1, 0x04, 0x02),
ENTRANCE(0x52, 0x0A, 0, 1, 0x04, 0x02), ENTRANCE(0x52, 0x0A, 0, 1, 0x04, 0x02),
ENTRANCE(0x52, 0x0A, 0, 1, 0x04, 0x02), ENTRANCE(0x0D, 0x00, 0, 1, 0x04, 0x02),
ENTRANCE(0x0D, 0x00, 0, 1, 0x04, 0x02), ENTRANCE(0x0D, 0x00, 0, 1, 0x04, 0x02),
ENTRANCE(0x0D, 0x00, 0, 1, 0x04, 0x02), ENTRANCE(0x0D, 0x00, 0, 1, 0x04, 0x02),
ENTRANCE(0x0D, 0x00, 0, 1, 0x04, 0x02), ENTRANCE(0x0D, 0x00, 0, 1, 0x04, 0x02),
ENTRANCE(0x0D, 0x00, 0, 1, 0x04, 0x02), ENTRANCE(0x0D, 0x00, 0, 1, 0x04, 0x02),
ENTRANCE(0x0D, 0x00, 0, 1, 0x04, 0x02), ENTRANCE(0x0D, 0x00, 0, 1, 0x04, 0x02),
ENTRANCE(0x23, 0x01, 0, 1, 0x04, 0x02), ENTRANCE(0x24, 0x01, 0, 1, 0x04, 0x02),
ENTRANCE(0x25, 0x01, 0, 1, 0x04, 0x02), ENTRANCE(0x25, 0x01, 0, 1, 0x04, 0x02),
ENTRANCE(0x51, 0x0F, 0, 1, 0x05, 0x05), ENTRANCE(0x51, 0x0F, 0, 1, 0x04, 0x02),
ENTRANCE(0x51, 0x0F, 0, 1, 0x05, 0x05), ENTRANCE(0x51, 0x0F, 0, 1, 0x04, 0x02),
ENTRANCE(0x60, 0x05, 0, 1, 0x04, 0x02), ENTRANCE(0x60, 0x05, 0, 1, 0x04, 0x02),
ENTRANCE(0x60, 0x05, 0, 1, 0x04, 0x02), ENTRANCE(0x60, 0x05, 0, 1, 0x04, 0x02),
ENTRANCE(0x5F, 0x04, 0, 1, 0x03, 0x03), ENTRANCE(0x5F, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x64, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x64, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x61, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x61, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x61, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x61, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x05, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x05, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x05, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x05, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x06, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x06, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x06, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x06, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x07, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x07, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x07, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x07, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x08, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x08, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x08, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x08, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x09, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x09, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x09, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x09, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x0A, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x0A, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x0A, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x0A, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x0B, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x0B, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x0B, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x0B, 0, 1, 0x02, 0x02),
ENTRANCE(0x0E, 0x07, 1, 1, 0x02, 0x02), ENTRANCE(0x0E, 0x07, 1, 1, 0x02, 0x02),
ENTRANCE(0x0E, 0x07, 1, 1, 0x02, 0x02), ENTRANCE(0x0E, 0x07, 1, 1, 0x02, 0x02),
ENTRANCE(0x1A, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x1A, 0x01, 1, 1, 0x02, 0x02),
ENTRANCE(0x1A, 0x01, 1, 1, 0x02, 0x02), ENTRANCE(0x1A, 0x01, 1, 1, 0x02, 0x02),
ENTRANCE(0x3B, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x3B, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x3B, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x3B, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x3B, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x3B, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x3B, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x3B, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x5B, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x5B, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x5B, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x5B, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x63, 0x06, 0, 0, 0x02, 0x26), ENTRANCE(0x63, 0x06, 0, 0, 0x02, 0x26),
ENTRANCE(0x63, 0x06, 0, 0, 0x02, 0x26), ENTRANCE(0x63, 0x06, 0, 0, 0x02, 0x26),
ENTRANCE(0x63, 0x07, 0, 0, 0x2E, 0x2E), ENTRANCE(0x63, 0x07, 0, 0, 0x2E, 0x2E),
ENTRANCE(0x63, 0x07, 0, 0, 0x2E, 0x2E), ENTRANCE(0x63, 0x07, 0, 0, 0x2E, 0x2E),
ENTRANCE(0x5B, 0x05, 0, 1, 0x02, 0x02), ENTRANCE(0x5B, 0x05, 0, 1, 0x02, 0x02),
ENTRANCE(0x5B, 0x05, 0, 1, 0x02, 0x02), ENTRANCE(0x5B, 0x05, 0, 1, 0x02, 0x02),
ENTRANCE(0x5B, 0x06, 0, 1, 0x2C, 0x2C), ENTRANCE(0x5B, 0x06, 0, 1, 0x2C, 0x2C),
ENTRANCE(0x5B, 0x06, 0, 1, 0x2C, 0x2C), ENTRANCE(0x5B, 0x06, 0, 1, 0x2C, 0x2C),
ENTRANCE(0x5B, 0x07, 0, 1, 0x2C, 0x2C), ENTRANCE(0x5B, 0x07, 0, 1, 0x2C, 0x2C),
ENTRANCE(0x5B, 0x07, 0, 1, 0x2C, 0x2C), ENTRANCE(0x5B, 0x07, 0, 1, 0x2C, 0x2C),
ENTRANCE(0x5B, 0x08, 0, 0, 0x02, 0x02), ENTRANCE(0x5B, 0x08, 0, 0, 0x02, 0x02),
ENTRANCE(0x5B, 0x08, 0, 0, 0x02, 0x02), ENTRANCE(0x5B, 0x08, 0, 0, 0x02, 0x02),
ENTRANCE(0x62, 0x03, 0, 1, 0x2C, 0x2C), ENTRANCE(0x62, 0x03, 0, 1, 0x2C, 0x2C),
ENTRANCE(0x62, 0x03, 0, 1, 0x2C, 0x2C), ENTRANCE(0x62, 0x03, 0, 1, 0x2C, 0x2C),
ENTRANCE(0x57, 0x05, 0, 1, 0x02, 0x02), ENTRANCE(0x57, 0x05, 0, 1, 0x02, 0x02),
ENTRANCE(0x57, 0x05, 0, 1, 0x02, 0x02), ENTRANCE(0x57, 0x05, 0, 1, 0x02, 0x02),
ENTRANCE(0x07, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x07, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x07, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x07, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x52, 0x0B, 0, 1, 0x04, 0x02), ENTRANCE(0x52, 0x0B, 0, 1, 0x04, 0x02),
ENTRANCE(0x52, 0x0B, 0, 1, 0x04, 0x02), ENTRANCE(0x52, 0x0B, 0, 1, 0x04, 0x02),
ENTRANCE(0x3B, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x3B, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x3B, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x3B, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x61, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x61, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x61, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x61, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x5F, 0x03, 0, 1, 0x03, 0x03), ENTRANCE(0x5F, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x64, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x64, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x5F, 0x03, 0, 1, 0x00, 0x00), ENTRANCE(0x52, 0x0C, 0, 1, 0x04, 0x02),
ENTRANCE(0x52, 0x0C, 0, 1, 0x04, 0x02), ENTRANCE(0x52, 0x0C, 0, 1, 0x04, 0x02),
ENTRANCE(0x52, 0x0C, 0, 1, 0x04, 0x02), ENTRANCE(0x48, 0x02, 1, 1, 0x04, 0x20),
ENTRANCE(0x48, 0x02, 1, 1, 0x04, 0x20), ENTRANCE(0x48, 0x02, 1, 1, 0x04, 0x20),
ENTRANCE(0x48, 0x02, 1, 1, 0x04, 0x20), ENTRANCE(0x4B, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x4B, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x4B, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x4B, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x53, 0x06, 0, 1, 0x03, 0x03),
ENTRANCE(0x53, 0x06, 0, 1, 0x03, 0x03), ENTRANCE(0x53, 0x06, 0, 1, 0x03, 0x03),
ENTRANCE(0x53, 0x06, 0, 1, 0x03, 0x03), ENTRANCE(0x51, 0x10, 0, 1, 0x0B, 0x0B),
ENTRANCE(0x51, 0x10, 0, 1, 0x0B, 0x0B), ENTRANCE(0x51, 0x10, 0, 1, 0x0B, 0x0B),
ENTRANCE(0x51, 0x10, 0, 1, 0x0B, 0x0B), ENTRANCE(0x52, 0x0D, 0, 1, 0x03, 0x03),
ENTRANCE(0x52, 0x0D, 0, 1, 0x02, 0x02), ENTRANCE(0x52, 0x0D, 0, 1, 0x03, 0x03),
ENTRANCE(0x52, 0x0D, 0, 1, 0x02, 0x02), ENTRANCE(0x4F, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x4F, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x4F, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x4F, 0x00, 0, 1, 0x03, 0x03), ENTRANCE(0x4F, 0x00, 0, 1, 0x03, 0x03),
ENTRANCE(0x1A, 0x06, 1, 1, 0x02, 0x02), ENTRANCE(0x1A, 0x06, 1, 1, 0x02, 0x02),
ENTRANCE(0x1A, 0x06, 1, 1, 0x02, 0x02), ENTRANCE(0x1A, 0x06, 1, 1, 0x02, 0x02),
ENTRANCE(0x66, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x66, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x66, 0x00, 0, 1, 0x02, 0x02), ENTRANCE(0x66, 0x00, 0, 1, 0x02, 0x02),
ENTRANCE(0x1A, 0x07, 1, 1, 0x02, 0x02), ENTRANCE(0x1A, 0x07, 1, 1, 0x02, 0x02),
ENTRANCE(0x1A, 0x07, 1, 1, 0x02, 0x02), ENTRANCE(0x1A, 0x07, 1, 1, 0x02, 0x02),
ENTRANCE(0x32, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x32, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x32, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x32, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x2C, 0x01, 0, 1, 0x04, 0x20), ENTRANCE(0x2C, 0x01, 0, 1, 0x04, 0x20),
ENTRANCE(0x2C, 0x01, 0, 1, 0x04, 0x20), ENTRANCE(0x2C, 0x01, 0, 1, 0x04, 0x20),
ENTRANCE(0x33, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x33, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x33, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x33, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x0D, 0x01, 0, 0, 0x04, 0x02), ENTRANCE(0x0D, 0x01, 0, 0, 0x04, 0x02),
ENTRANCE(0x0D, 0x01, 0, 0, 0x04, 0x02), ENTRANCE(0x0D, 0x01, 0, 0, 0x04, 0x02),
ENTRANCE(0x0D, 0x02, 0, 1, 0x04, 0x02), ENTRANCE(0x0D, 0x02, 0, 1, 0x04, 0x02),
ENTRANCE(0x0D, 0x02, 0, 1, 0x04, 0x02), ENTRANCE(0x0D, 0x02, 0, 1, 0x04, 0x02),
ENTRANCE(0x0D, 0x03, 0, 1, 0x04, 0x02), ENTRANCE(0x0D, 0x03, 0, 1, 0x04, 0x02),
ENTRANCE(0x0D, 0x03, 0, 1, 0x04, 0x02), ENTRANCE(0x0D, 0x03, 0, 1, 0x04, 0x02),
ENTRANCE(0x0D, 0x04, 0, 1, 0x04, 0x02), ENTRANCE(0x0D, 0x04, 0, 1, 0x04, 0x02),
ENTRANCE(0x0D, 0x04, 0, 1, 0x04, 0x02), ENTRANCE(0x0D, 0x04, 0, 1, 0x04, 0x02),
ENTRANCE(0x0D, 0x05, 0, 1, 0x04, 0x02), ENTRANCE(0x0D, 0x05, 0, 1, 0x04, 0x02),
ENTRANCE(0x0D, 0x05, 0, 1, 0x04, 0x02), ENTRANCE(0x0D, 0x05, 0, 1, 0x04, 0x02),
ENTRANCE(0x0D, 0x06, 0, 1, 0x04, 0x02), ENTRANCE(0x0D, 0x06, 0, 1, 0x04, 0x02),
ENTRANCE(0x0D, 0x06, 0, 1, 0x04, 0x02), ENTRANCE(0x0D, 0x06, 0, 1, 0x04, 0x02),
ENTRANCE(0x0D, 0x07, 0, 1, 0x04, 0x02), ENTRANCE(0x0D, 0x07, 0, 1, 0x04, 0x02),
ENTRANCE(0x0D, 0x07, 0, 1, 0x04, 0x02), ENTRANCE(0x0D, 0x07, 0, 1, 0x04, 0x02),
ENTRANCE(0x50, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x50, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x50, 0x00, 0, 1, 0x04, 0x20), ENTRANCE(0x50, 0x00, 0, 1, 0x04, 0x20),
ENTRANCE(0x52, 0x0E, 0, 1, 0x03, 0x03), ENTRANCE(0x52, 0x0E, 0, 1, 0x02, 0x02),
ENTRANCE(0x52, 0x0E, 0, 1, 0x03, 0x03), ENTRANCE(0x52, 0x0E, 0, 1, 0x02, 0x02),
ENTRANCE(0x63, 0x08, 0, 0, 0x20, 0x20), ENTRANCE(0x63, 0x08, 0, 0, 0x20, 0x20),
ENTRANCE(0x63, 0x08, 0, 0, 0x20, 0x20), ENTRANCE(0x63, 0x08, 0, 0, 0x20, 0x20),
ENTRANCE(0x63, 0x09, 0, 0, 0x02, 0x02), ENTRANCE(0x63, 0x09, 0, 0, 0x02, 0x02),
ENTRANCE(0x63, 0x09, 0, 0, 0x02, 0x02), ENTRANCE(0x63, 0x09, 0, 0, 0x02, 0x02),
ENTRANCE(0x57, 0x07, 0, 1, 0x2C, 0x2C), ENTRANCE(0x57, 0x07, 0, 1, 0x2C, 0x2C),
ENTRANCE(0x57, 0x07, 0, 1, 0x2C, 0x2C), ENTRANCE(0x57, 0x07, 0, 1, 0x2C, 0x2C),
ENTRANCE(0x61, 0x05, 0, 1, 0x02, 0x02), ENTRANCE(0x61, 0x05, 0, 1, 0x02, 0x02),
ENTRANCE(0x61, 0x05, 0, 1, 0x02, 0x02), ENTRANCE(0x61, 0x05, 0, 1, 0x02, 0x02),
ENTRANCE(0x53, 0x07, 0, 1, 0x03, 0x03), ENTRANCE(0x53, 0x07, 0, 1, 0x03, 0x03),
ENTRANCE(0x53, 0x07, 0, 1, 0x03, 0x03), ENTRANCE(0x53, 0x07, 0, 1, 0x03, 0x03),
ENTRANCE(0x0F, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x0F, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x0F, 0x00, 1, 1, 0x02, 0x02), ENTRANCE(0x0F, 0x00, 1, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x0C, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x0C, 0, 1, 0x02, 0x02),
ENTRANCE(0x0C, 0x0C, 0, 1, 0x02, 0x02), ENTRANCE(0x0C, 0x0C, 0, 1, 0x02, 0x02),
ENTRANCE(0x41, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x41, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x41, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x41, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x3D, 0x01, 0, 1, 0x04, 0x04), ENTRANCE(0x3D, 0x01, 0, 1, 0x04, 0x04),
ENTRANCE(0x3D, 0x01, 0, 1, 0x04, 0x04), ENTRANCE(0x3D, 0x01, 0, 1, 0x04, 0x04),
ENTRANCE(0x5C, 0x07, 0, 1, 0x03, 0x03), ENTRANCE(0x5C, 0x07, 0, 1, 0x02, 0x02),
ENTRANCE(0x5C, 0x07, 0, 1, 0x03, 0x03), ENTRANCE(0x5C, 0x07, 0, 1, 0x02, 0x02),
ENTRANCE(0x53, 0x08, 0, 1, 0x03, 0x03), ENTRANCE(0x53, 0x08, 0, 1, 0x03, 0x03),
ENTRANCE(0x53, 0x08, 0, 1, 0x03, 0x03), ENTRANCE(0x53, 0x08, 0, 1, 0x03, 0x03),
ENTRANCE(0x03, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x03, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x03, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x03, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x3D, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x3D, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x3D, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x3D, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x43, 0x05, 0, 1, 0x02, 0x02), ENTRANCE(0x43, 0x05, 0, 1, 0x02, 0x02),
ENTRANCE(0x43, 0x05, 0, 1, 0x02, 0x02), ENTRANCE(0x43, 0x05, 0, 1, 0x02, 0x02),
ENTRANCE(0x43, 0x06, 0, 1, 0x02, 0x02), ENTRANCE(0x43, 0x06, 0, 1, 0x02, 0x02),
ENTRANCE(0x43, 0x06, 0, 1, 0x02, 0x02), ENTRANCE(0x43, 0x06, 0, 1, 0x02, 0x02),
ENTRANCE(0x51, 0x11, 0, 1, 0x03, 0x03), ENTRANCE(0x51, 0x11, 0, 1, 0x02, 0x02),
ENTRANCE(0x51, 0x11, 0, 1, 0x03, 0x03), ENTRANCE(0x51, 0x11, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x02, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x03, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x03, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x04, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x04, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x05, 0, 1, 0x02, 0x03), ENTRANCE(0x3E, 0x05, 0, 1, 0x02, 0x03),
ENTRANCE(0x3E, 0x05, 0, 1, 0x02, 0x03), ENTRANCE(0x3E, 0x05, 0, 1, 0x02, 0x03),
ENTRANCE(0x3E, 0x06, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x06, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x06, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x06, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x07, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x07, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x07, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x07, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x08, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x08, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x08, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x08, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x09, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x09, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x09, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x09, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x0A, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x0A, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x0A, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x0A, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x0B, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x0B, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x0B, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x0B, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x0C, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x0C, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x0C, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x0C, 0, 1, 0x02, 0x02),
ENTRANCE(0x37, 0x01, 0, 1, 0x04, 0x20), ENTRANCE(0x37, 0x01, 0, 1, 0x04, 0x20),
ENTRANCE(0x37, 0x01, 0, 1, 0x04, 0x20), ENTRANCE(0x37, 0x01, 0, 1, 0x04, 0x20),
ENTRANCE(0x08, 0x01, 0, 1, 0x04, 0x04), ENTRANCE(0x08, 0x01, 0, 1, 0x04, 0x04),
ENTRANCE(0x08, 0x01, 0, 1, 0x04, 0x04), ENTRANCE(0x08, 0x01, 0, 1, 0x04, 0x04),
ENTRANCE(0x4C, 0x01, 0, 1, 0x04, 0x20), ENTRANCE(0x4C, 0x01, 0, 1, 0x04, 0x20),
ENTRANCE(0x4C, 0x01, 0, 1, 0x04, 0x20), ENTRANCE(0x4C, 0x01, 0, 1, 0x04, 0x20),
ENTRANCE(0x63, 0x0A, 0, 1, 0x04, 0x02), ENTRANCE(0x63, 0x0A, 0, 1, 0x04, 0x02),
ENTRANCE(0x63, 0x0A, 0, 1, 0x04, 0x02), ENTRANCE(0x63, 0x0A, 0, 1, 0x04, 0x02),
ENTRANCE(0x09, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x09, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x09, 0x01, 0, 1, 0x02, 0x02), ENTRANCE(0x09, 0x01, 0, 1, 0x02, 0x02),
ENTRANCE(0x52, 0x0F, 0, 1, 0x03, 0x03), ENTRANCE(0x52, 0x0F, 0, 1, 0x02, 0x02),
ENTRANCE(0x52, 0x0F, 0, 1, 0x03, 0x03), ENTRANCE(0x52, 0x0F, 0, 1, 0x02, 0x02),
ENTRANCE(0x5B, 0x09, 0, 0, 0x02, 0x02), ENTRANCE(0x5B, 0x09, 0, 0, 0x02, 0x02),
ENTRANCE(0x5B, 0x09, 0, 0, 0x02, 0x02), ENTRANCE(0x5B, 0x09, 0, 0, 0x02, 0x02),
ENTRANCE(0x4C, 0x02, 0, 1, 0x04, 0x20), ENTRANCE(0x4C, 0x02, 0, 1, 0x04, 0x20),
ENTRANCE(0x4C, 0x02, 0, 1, 0x04, 0x20), ENTRANCE(0x4C, 0x02, 0, 1, 0x04, 0x20),
ENTRANCE(0x55, 0x0C, 0, 1, 0x04, 0x02), ENTRANCE(0x55, 0x0C, 0, 1, 0x04, 0x02),
ENTRANCE(0x55, 0x0C, 0, 1, 0x04, 0x02), ENTRANCE(0x55, 0x0C, 0, 1, 0x04, 0x02),
ENTRANCE(0x17, 0x02, 1, 1, 0x02, 0x02), ENTRANCE(0x17, 0x02, 1, 1, 0x02, 0x02),
ENTRANCE(0x17, 0x02, 1, 1, 0x02, 0x02), ENTRANCE(0x17, 0x02, 1, 1, 0x02, 0x02),
ENTRANCE(0x4A, 0x01, 0, 0, 0x03, 0x03), ENTRANCE(0x4A, 0x01, 0, 0, 0x02, 0x02),
ENTRANCE(0x4A, 0x01, 0, 0, 0x03, 0x03), ENTRANCE(0x4A, 0x01, 0, 0, 0x02, 0x02),
ENTRANCE(0x43, 0x07, 0, 1, 0x02, 0x02), ENTRANCE(0x43, 0x07, 0, 1, 0x02, 0x02),
ENTRANCE(0x43, 0x07, 0, 1, 0x02, 0x02), ENTRANCE(0x43, 0x07, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x12, 0, 1, 0x02, 0x02), ENTRANCE(0x5D, 0x12, 0, 1, 0x02, 0x02),
ENTRANCE(0x5D, 0x12, 0, 1, 0x02, 0x02), ENTRANCE(0x5D, 0x12, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x0D, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x0D, 0, 1, 0x02, 0x02),
ENTRANCE(0x3E, 0x0D, 0, 1, 0x02, 0x02), ENTRANCE(0x3E, 0x0D, 0, 1, 0x02, 0x02),
ENTRANCE(0x56, 0x02, 0, 1, 0x12, 0x12), ENTRANCE(0x56, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x56, 0x02, 0, 1, 0x12, 0x12), ENTRANCE(0x56, 0x02, 0, 1, 0x02, 0x02),
ENTRANCE(0x57, 0x08, 0, 1, 0x02, 0x02), ENTRANCE(0x57, 0x08, 0, 1, 0x02, 0x02),
ENTRANCE(0x57, 0x08, 0, 1, 0x02, 0x02), ENTRANCE(0x57, 0x08, 0, 1, 0x02, 0x02),
ENTRANCE(0x56, 0x03, 0, 1, 0x03, 0x03), ENTRANCE(0x56, 0x03, 0, 1, 0x03, 0x03),
ENTRANCE(0x56, 0x03, 0, 1, 0x03, 0x03), ENTRANCE(0x56, 0x03, 0, 1, 0x03, 0x03),
ENTRANCE(0x57, 0x09, 0, 1, 0x03, 0x03), ENTRANCE(0x57, 0x09, 0, 1, 0x03, 0x03),
ENTRANCE(0x57, 0x09, 0, 1, 0x03, 0x03), ENTRANCE(0x57, 0x09, 0, 1, 0x03, 0x03),
ENTRANCE(0x5C, 0x08, 0, 1, 0x03, 0x03), ENTRANCE(0x5C, 0x08, 0, 1, 0x03, 0x03),
ENTRANCE(0x5C, 0x08, 0, 1, 0x03, 0x03), ENTRANCE(0x5C, 0x08, 0, 1, 0x03, 0x03),
#include "tables/entrance_table.h"
};
#undef DEFINE_ENTRANCE
//#define TITLED_SCENE(name, title, unk_10, config, unk_12) \
// { \
// (u32) _##name##SegmentRomStart, (u32)_##name##SegmentRomEnd, (u32)_##title##SegmentRomStart, \
@@ -858,24 +85,24 @@ Gfx sDefaultDisplayList[] = {
};
// Computes next entrance index based on age and day time to set the fade out transition
void func_800994A0(PlayState* play) {
s16 computedEntranceIndex;
void Scene_SetTransitionForNextEntrance(PlayState* play) {
s16 entranceIndex;
if (!IS_DAY) {
if (!LINK_IS_ADULT) {
computedEntranceIndex = play->nextEntranceIndex + 1;
entranceIndex = play->nextEntranceIndex + 1;
} else {
computedEntranceIndex = play->nextEntranceIndex + 3;
entranceIndex = play->nextEntranceIndex + 3;
}
} else {
if (!LINK_IS_ADULT) {
computedEntranceIndex = play->nextEntranceIndex;
entranceIndex = play->nextEntranceIndex;
} else {
computedEntranceIndex = play->nextEntranceIndex + 2;
entranceIndex = play->nextEntranceIndex + 2;
}
}
play->fadeTransition = gEntranceTable[computedEntranceIndex].field & 0x7F; // Fade out
play->transitionType = ENTRANCE_INFO_START_TRANS_TYPE(gEntranceTable[entranceIndex].field); // Fade out
}
// Scene Draw Config 0

View File

@@ -38,6 +38,25 @@ void Sram_InitBossRushSave(void) {
BossRush_InitSave();
}
static s16 sDungeonEntrances[] = {
ENTR_DEKU_TREE_0, // SCENE_DEKU_TREE
ENTR_DODONGOS_CAVERN_0, // SCENE_DODONGOS_CAVERN
ENTR_JABU_JABU_0, // SCENE_JABU_JABU
ENTR_FOREST_TEMPLE_0, // SCENE_FOREST_TEMPLE
ENTR_FIRE_TEMPLE_0, // SCENE_FIRE_TEMPLE
ENTR_WATER_TEMPLE_0, // SCENE_WATER_TEMPLE
ENTR_SPIRIT_TEMPLE_0, // SCENE_SPIRIT_TEMPLE
ENTR_SHADOW_TEMPLE_0, // SCENE_SHADOW_TEMPLE
ENTR_BOTTOM_OF_THE_WELL_0, // SCENE_BOTTOM_OF_THE_WELL
ENTR_ICE_CAVERN_0, // SCENE_ICE_CAVERN
ENTR_GANONS_TOWER_0, // SCENE_GANONS_TOWER
ENTR_GERUDO_TRAINING_GROUND_0, // SCENE_GERUDO_TRAINING_GROUND
ENTR_THIEVES_HIDEOUT_0, // SCENE_THIEVES_HIDEOUT
ENTR_INSIDE_GANONS_CASTLE_0, // SCENE_INSIDE_GANONS_CASTLE
ENTR_GANONS_TOWER_COLLAPSE_INTERIOR_0, // SCENE_GANONS_TOWER_COLLAPSE_INTERIOR
ENTR_INSIDE_GANONS_CASTLE_COLLAPSE_0, // SCENE_INSIDE_GANONS_CASTLE_COLLAPSE
};
/**
* Copy save currently on the buffer to Save Context and complete various tasks to open the save.
* This includes:
@@ -49,10 +68,6 @@ void Sram_InitBossRushSave(void) {
* - Revert any trade items that spoil
*/
void Sram_OpenSave() {
static s16 dungeonEntrances[] = {
0x0000, 0x0004, 0x0028, 0x0169, 0x0165, 0x0010, 0x0082, 0x0037,
0x0098, 0x0088, 0x041B, 0x0008, 0x0486, 0x0467, 0x0179, 0x056C,
};
u16 i;
u16 j;
u8* ptr;
@@ -74,38 +89,38 @@ void Sram_OpenSave() {
case SCENE_GERUDO_TRAINING_GROUND:
case SCENE_THIEVES_HIDEOUT:
case SCENE_INSIDE_GANONS_CASTLE:
gSaveContext.entranceIndex = dungeonEntrances[gSaveContext.savedSceneNum];
gSaveContext.entranceIndex = sDungeonEntrances[gSaveContext.savedSceneNum];
break;
case SCENE_DEKU_TREE_BOSS:
gSaveContext.entranceIndex = 0;
gSaveContext.entranceIndex = ENTR_DEKU_TREE_0;
break;
case SCENE_DODONGOS_CAVERN_BOSS:
gSaveContext.entranceIndex = 4;
gSaveContext.entranceIndex = ENTR_DODONGOS_CAVERN_0;
break;
case SCENE_JABU_JABU_BOSS:
gSaveContext.entranceIndex = 0x28;
gSaveContext.entranceIndex = ENTR_JABU_JABU_0;
break;
case SCENE_FOREST_TEMPLE_BOSS:
gSaveContext.entranceIndex = 0x169;
gSaveContext.entranceIndex = ENTR_FOREST_TEMPLE_0;
break;
case SCENE_FIRE_TEMPLE_BOSS:
gSaveContext.entranceIndex = 0x165;
gSaveContext.entranceIndex = ENTR_FIRE_TEMPLE_0;
break;
case SCENE_WATER_TEMPLE_BOSS:
gSaveContext.entranceIndex = 0x10;
gSaveContext.entranceIndex = ENTR_WATER_TEMPLE_0;
break;
case SCENE_SPIRIT_TEMPLE_BOSS:
gSaveContext.entranceIndex = 0x82;
gSaveContext.entranceIndex = ENTR_SPIRIT_TEMPLE_0;
break;
case SCENE_SHADOW_TEMPLE_BOSS:
gSaveContext.entranceIndex = 0x37;
gSaveContext.entranceIndex = ENTR_SHADOW_TEMPLE_0;
break;
case SCENE_GANONS_TOWER_COLLAPSE_INTERIOR:
case SCENE_INSIDE_GANONS_CASTLE_COLLAPSE:
case SCENE_GANONDORF_BOSS:
case SCENE_GANONS_TOWER_COLLAPSE_EXTERIOR:
case SCENE_GANON_BOSS:
gSaveContext.entranceIndex = 0x41B;
gSaveContext.entranceIndex = ENTR_GANONS_TOWER_0;
break;
default:
@@ -116,9 +131,9 @@ void Sram_OpenSave() {
}
if (gSaveContext.savedSceneNum != SCENE_LINKS_HOUSE) {
gSaveContext.entranceIndex = (LINK_AGE_IN_YEARS == YEARS_CHILD) ? 0xBB : 0x5F4;
gSaveContext.entranceIndex = (LINK_AGE_IN_YEARS == YEARS_CHILD) ? ENTR_LINKS_HOUSE_0 : ENTR_TEMPLE_OF_TIME_7;
} else {
gSaveContext.entranceIndex = 0xBB;
gSaveContext.entranceIndex = ENTR_LINKS_HOUSE_0;
}
break;
}
@@ -212,7 +227,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
Sram_InitDebugSave();
}
gSaveContext.entranceIndex = 0xBB;
gSaveContext.entranceIndex = ENTR_LINKS_HOUSE_0;
gSaveContext.linkAge = 1;
gSaveContext.dayTime = 0x6AAB;
gSaveContext.cutsceneIndex = 0xFFF1;