Implement archi and hide rando hash in archi save
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
@@ -416,6 +416,9 @@ static const ALIGN_ASSET(2) char gFileSelBossRushSettingsJPNText[] = dgFileSelBo
|
||||
#define dgFileSelRANDButtonTex "__OTR__textures/title_static/gFileSelRANDButtonTex"
|
||||
static const ALIGN_ASSET(2) char gFileSelRANDButtonTex[] = dgFileSelRANDButtonTex;
|
||||
|
||||
#define dgFileSelArchiButtonTex "__OTR__textures/title_static/gFileSelArchiButtonTex"
|
||||
static const ALIGN_ASSET(2) char gFileSelArchiButtonTex[] = dgFileSelArchiButtonTex;
|
||||
|
||||
#define dgFileSelLangEnglishENGTex "__OTR__textures/title_static/gFileSelLangEnglishENGTex"
|
||||
static const ALIGN_ASSET(2) char gFileSelLangEnglishENGTex[] = dgFileSelLangEnglishENGTex;
|
||||
|
||||
|
||||
@@ -146,6 +146,7 @@ SaveManager::SaveManager() {
|
||||
}
|
||||
|
||||
info.randoSave = 0;
|
||||
info.archiSave = 0;
|
||||
info.requiresMasterQuest = 0;
|
||||
info.requiresOriginal = 0;
|
||||
|
||||
@@ -486,7 +487,8 @@ void SaveManager::InitMeta(int fileNum) {
|
||||
fileMetaInfo[fileNum].seedHash[i] = randoContext->hashIconIndexes[i];
|
||||
}
|
||||
|
||||
fileMetaInfo[fileNum].randoSave = IS_RANDO;
|
||||
fileMetaInfo[fileNum].randoSave = IS_RANDO && !IS_ARCHIPELAGO;
|
||||
fileMetaInfo[fileNum].archiSave = IS_ARCHIPELAGO;
|
||||
// If the file is marked as a Master Quest file or if we're randomized and have at least one master quest dungeon,
|
||||
// we need the mq otr.
|
||||
fileMetaInfo[fileNum].requiresMasterQuest =
|
||||
@@ -2345,6 +2347,7 @@ void SaveManager::CopyZeldaFile(int from, int to) {
|
||||
fileMetaInfo[to].defense = fileMetaInfo[from].defense;
|
||||
fileMetaInfo[to].health = fileMetaInfo[from].health;
|
||||
fileMetaInfo[to].randoSave = fileMetaInfo[from].randoSave;
|
||||
fileMetaInfo[to].archiSave = fileMetaInfo[from].archiSave;
|
||||
fileMetaInfo[to].requiresMasterQuest = fileMetaInfo[from].requiresMasterQuest;
|
||||
fileMetaInfo[to].requiresOriginal = fileMetaInfo[from].requiresOriginal;
|
||||
fileMetaInfo[to].buildVersionMajor = fileMetaInfo[from].buildVersionMajor;
|
||||
@@ -2361,6 +2364,7 @@ void SaveManager::DeleteZeldaFile(int fileNum) {
|
||||
}
|
||||
fileMetaInfo[fileNum].valid = false;
|
||||
fileMetaInfo[fileNum].randoSave = false;
|
||||
fileMetaInfo[fileNum].archiSave = false;
|
||||
fileMetaInfo[fileNum].requiresMasterQuest = false;
|
||||
fileMetaInfo[fileNum].requiresOriginal = false;
|
||||
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnDeleteFile>(fileNum);
|
||||
|
||||
@@ -16,6 +16,7 @@ typedef struct {
|
||||
u32 requiresOriginal;
|
||||
u8 seedHash[5];
|
||||
u8 randoSave;
|
||||
u8 archiSave;
|
||||
char buildVersion[50];
|
||||
s16 buildVersionMajor;
|
||||
s16 buildVersionMinor;
|
||||
|
||||
@@ -452,7 +452,7 @@ u8 ShouldRenderItem(s16 fileIndex, u8 item) {
|
||||
|
||||
// greg
|
||||
if (item == ITEM_RUPEE_GREEN) {
|
||||
return Save_GetSaveMetaInfo(fileIndex)->randoSave;
|
||||
return Save_GetSaveMetaInfo(fileIndex)->randoSave || Save_GetSaveMetaInfo(fileIndex)->archiSave;
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -3018,7 +3018,7 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
|
||||
gSP1Quadrangle(POLY_OPA_DISP++, 8, 10, 11, 9, 0);
|
||||
}
|
||||
|
||||
// draw rando label
|
||||
// Draw rando label
|
||||
if (Save_GetSaveMetaInfo(i)->randoSave) {
|
||||
if (!FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(i))) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, sWindowContentColors[1][0], sWindowContentColors[1][1],
|
||||
@@ -3049,6 +3049,21 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
|
||||
G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSP1Quadrangle(POLY_OPA_DISP++, 8, 10, 11, 9, 0);
|
||||
}
|
||||
// Draw archipelago label
|
||||
if (Save_GetSaveMetaInfo(i)->archiSave) {
|
||||
if (!FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(i))) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, sWindowContentColors[1][0], sWindowContentColors[1][1],
|
||||
sWindowContentColors[1][2], this->nameBoxAlpha[i]);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, sWindowContentColors[isActive][0],
|
||||
sWindowContentColors[isActive][1], sWindowContentColors[isActive][2],
|
||||
this->nameAlpha[i]);
|
||||
}
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, gFileSelArchiButtonTex, G_IM_FMT_IA, G_IM_SIZ_16b, 44, 16, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
||||
G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSP1Quadrangle(POLY_OPA_DISP++, 8, 10, 11, 9, 0);
|
||||
}
|
||||
|
||||
// draw connectors
|
||||
if (!FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(i)) && Save_GetSaveMetaInfo(i)->valid) {
|
||||
@@ -3064,7 +3079,7 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
|
||||
G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSP1Quadrangle(POLY_OPA_DISP++, 12, 14, 15, 13, 0);
|
||||
|
||||
if (this->n64ddFlags[i] || Save_GetSaveMetaInfo(i)->randoSave ||
|
||||
if (this->n64ddFlags[i] || Save_GetSaveMetaInfo(i)->randoSave || Save_GetSaveMetaInfo(i)->archiSave ||
|
||||
Save_GetSaveMetaInfo(i)->requiresMasterQuest) {
|
||||
gSP1Quadrangle(POLY_OPA_DISP++, 16, 18, 19, 17, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user