diff --git a/soh/assets/custom/textures/title_static/gFileSelArchiButtonTex.ia16.png b/soh/assets/custom/textures/title_static/gFileSelArchiButtonTex.ia16.png new file mode 100644 index 000000000..e6b80d6c5 Binary files /dev/null and b/soh/assets/custom/textures/title_static/gFileSelArchiButtonTex.ia16.png differ diff --git a/soh/assets/soh_assets.h b/soh/assets/soh_assets.h index a331c4319..26799f8e7 100644 --- a/soh/assets/soh_assets.h +++ b/soh/assets/soh_assets.h @@ -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; diff --git a/soh/soh/SaveManager.cpp b/soh/soh/SaveManager.cpp index f6a760c79..1390ed14b 100644 --- a/soh/soh/SaveManager.cpp +++ b/soh/soh/SaveManager.cpp @@ -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(fileNum); diff --git a/soh/soh/SaveManager.h b/soh/soh/SaveManager.h index 6d7ef3b33..8cdb16a91 100644 --- a/soh/soh/SaveManager.h +++ b/soh/soh/SaveManager.h @@ -16,6 +16,7 @@ typedef struct { u32 requiresOriginal; u8 seedHash[5]; u8 randoSave; + u8 archiSave; char buildVersion[50]; s16 buildVersionMajor; s16 buildVersionMinor; diff --git a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c index 6ec8fbe48..ebc2e1a4a 100644 --- a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c +++ b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c @@ -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); }