2020-10-03 15:22:44 +00:00
|
|
|
#include "global.h"
|
2024-08-10 00:58:46 +00:00
|
|
|
#include "region.h"
|
2024-08-20 21:19:16 +00:00
|
|
|
#include "versions.h"
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2024-08-10 00:58:46 +00:00
|
|
|
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
|
2024-04-14 21:51:32 +00:00
|
|
|
|
2024-02-28 00:01:47 +00:00
|
|
|
ALIGNED(16) SaveContext gSaveContext;
|
2020-05-26 12:50:51 +00:00
|
|
|
u32 D_8015FA88;
|
|
|
|
u32 D_8015FA8C;
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
void SaveContext_Init(void) {
|
2020-03-17 04:31:30 +00:00
|
|
|
bzero(&gSaveContext, sizeof(gSaveContext));
|
|
|
|
D_8015FA88 = 0;
|
|
|
|
D_8015FA8C = 0;
|
2021-12-03 14:49:32 +00:00
|
|
|
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
2021-12-27 17:35:05 +00:00
|
|
|
gSaveContext.natureAmbienceId = NATURE_ID_DISABLED;
|
2021-12-03 14:49:32 +00:00
|
|
|
gSaveContext.forcedSeqId = NA_BGM_GENERAL_SFX;
|
2020-04-16 21:36:12 +00:00
|
|
|
gSaveContext.nextCutsceneIndex = 0xFFEF;
|
|
|
|
gSaveContext.cutsceneTrigger = 0;
|
2023-07-05 22:36:19 +00:00
|
|
|
gSaveContext.chamberCutsceneNum = CHAMBER_CS_FOREST;
|
2022-05-20 18:40:13 +00:00
|
|
|
gSaveContext.nextDayTime = NEXT_TIME_NONE;
|
2021-09-20 16:51:35 +00:00
|
|
|
gSaveContext.skyboxTime = 0;
|
2020-04-16 21:36:12 +00:00
|
|
|
gSaveContext.dogIsLost = true;
|
2022-04-27 20:00:25 +00:00
|
|
|
gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT;
|
2022-11-22 03:01:44 +00:00
|
|
|
gSaveContext.prevHudVisibilityMode = HUD_VISIBILITY_ALL;
|
2024-08-26 15:43:59 +00:00
|
|
|
#if OOT_NTSC && OOT_VERSION < GC_US
|
2024-08-10 00:58:46 +00:00
|
|
|
if (gCurrentRegion == REGION_JP) {
|
|
|
|
gSaveContext.language = LANGUAGE_JPN;
|
|
|
|
}
|
|
|
|
if (gCurrentRegion == REGION_US) {
|
|
|
|
gSaveContext.language = LANGUAGE_ENG;
|
|
|
|
}
|
2024-08-26 15:43:59 +00:00
|
|
|
#elif OOT_VERSION == GC_US || OOT_VERSION == GC_US_MQ
|
2024-07-28 04:09:05 +00:00
|
|
|
gSaveContext.language = LANGUAGE_ENG;
|
2024-08-26 15:43:59 +00:00
|
|
|
#elif OOT_VERSION == GC_JP_CE
|
2024-08-10 00:58:46 +00:00
|
|
|
gSaveContext.language = LANGUAGE_JPN;
|
2024-07-28 04:09:05 +00:00
|
|
|
#endif
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|