From 9b409f5ff4396b4a69b910517fe74c4a1911996a Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Sat, 24 Aug 2024 02:38:50 +0200 Subject: [PATCH] Match z_select.c (#2076) --- src/overlays/gamestates/ovl_select/z_select.c | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/overlays/gamestates/ovl_select/z_select.c b/src/overlays/gamestates/ovl_select/z_select.c index 5836fb9d07..ed249540c5 100644 --- a/src/overlays/gamestates/ovl_select/z_select.c +++ b/src/overlays/gamestates/ovl_select/z_select.c @@ -8,6 +8,13 @@ #include "global.h" #include "terminal.h" #include "alloca.h" +#include "z64.h" + +#if PLATFORM_N64 +#include "n64dd.h" +// TODO n64dd functions +void n64dd_SetDiskVersion(s32); +#endif void MapSelect_LoadTitle(MapSelectState* this) { this->state.running = false; @@ -44,6 +51,20 @@ void MapSelect_LoadGame(MapSelectState* this, s32 entranceIndex) { SET_NEXT_GAMESTATE(&this->state, Play_Init, PlayState); } +#if PLATFORM_N64 +void func_80800AD0_unknown(MapSelectState* this, s32 arg1) { + if (B_80121AE2 != 0) { + n64dd_SetDiskVersion(1); + } +} + +void func_80800B08_unknown(MapSelectState* this, s32 arg1) { + if (B_80121AE2 != 0) { + n64dd_SetDiskVersion(0); + } +} +#endif + // "Translation" (Actual name) static SceneSelectEntry sScenes[] = { { " 1:SPOT00", MapSelect_LoadGame, ENTR_HYRULE_FIELD_0 }, @@ -288,6 +309,10 @@ static SceneSelectEntry sScenes[] = { #endif // "title" (Title Screen) { "title", (void*)MapSelect_LoadTitle, 0 }, +#if PLATFORM_N64 + { "64DD TEST n64dd_SetDiskVersion(1)", (void*)func_80800AD0_unknown, 0 }, + { "64DD TEST2 n64dd_SetDiskVersion(0)", (void*)func_80800B08_unknown, 0 }, +#endif }; void MapSelect_UpdateMenu(MapSelectState* this) {