From 884c59ab22652255f928f2f33fe61943e6f683e8 Mon Sep 17 00:00:00 2001 From: derickso Date: Mon, 20 Apr 2020 02:18:04 -0700 Subject: [PATCH 1/2] Carry over bHideDialogueMenu bugfix from LE version "Fixed that dialog topics may not be displayed correctly when bHideDialogueMenu=1." --- Menus.cpp | 42 +++++++++++++++++------------------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/Menus.cpp b/Menus.cpp index 42c6146..465a180 100644 --- a/Menus.cpp +++ b/Menus.cpp @@ -92,7 +92,7 @@ namespace Tralala NextFrame_t NextFrame = (NextFrame_t)g_dialNextFrameAddr; GFxMovieView* view = (Tralala::GFxMovieView*)menu->view; - if(!view || !Settings::bHideDialogueMenu) + if(!view || !g_zoom || !Settings::bHideDialogueMenu) return NextFrame(menu, unk1, unk2); GFxValue topicListHolder; @@ -103,13 +103,15 @@ namespace Tralala if (topicListHolder.GetDisplayInfo(&displayInfo)) { - MenuTopicManager* mtm = MenuTopicManager::GetSingleton(); + PlayerCamera* camera = PlayerCamera::GetSingleton(); + + //GFxValue greetingState(0); + //GFxValue topicShownState(1); + GFxValue topicClickedState(2); - GFxValue greetingState(0); - GFxValue topicShownState(1); - GFxValue topicClickedState(2); GFxValue curState; + view->GetVariable(&curState, "_root.DialogueMenu_mc.eMenuState"); if (!g_zoom) { @@ -121,36 +123,27 @@ namespace Tralala return NextFrame(menu, unk1, unk2); } - view->GetVariable(&curState, "_root.DialogueMenu_mc.eMenuState"); - PlayerCamera* camera = PlayerCamera::GetSingleton(); - - if (Settings::bSwitchTarget && (Settings::bForceThirdPerson || camera->IsCameraThirdPerson())) + if ((curState.GetType() == 3 && curState.data.number == 0) || (mtm->unk70 && !mtm->unkB9)) + { + view->SetVariable("_root.DialogueMenu_mc.eMenuState", &topicClickedState, 0); + displayInfo.SetVisible(false); + } + else if (Settings::bSwitchTarget && (Settings::bForceThirdPerson || camera->IsCameraThirdPerson())) { if (camera->cameraRefHandle == PlayerRefHandle) { - if (curState.GetType() == 3 && curState.data.number == 1) - view->SetVariable("_root.DialogueMenu_mc.eMenuState", &topicClickedState, 0); - displayInfo.SetVisible(false); } - else + else if (curState.GetType() == 3 && curState.data.number == 1) { - view->SetVariable("_root.DialogueMenu_mc.eMenuState", &topicShownState, 0); displayInfo.SetVisible(true); } } else { - - if ((curState.GetType() == 3 && curState.data.number == 0) || (mtm->unk70 && !mtm->unkB9)) - { - view->SetVariable("_root.DialogueMenu_mc.eMenuState", &topicClickedState, 0); - displayInfo.SetVisible(false); - } - else + if (curState.GetType() == 3 && curState.data.number == 1) { - if (curState.GetType() == 3 && curState.data.number == 1) - displayInfo.SetVisible(true); + displayInfo.SetVisible(true); } } @@ -158,7 +151,6 @@ namespace Tralala } } - return NextFrame(menu, unk1, unk2); } } @@ -369,4 +361,4 @@ namespace Menus return true; } -} \ No newline at end of file +} From 430e17d6cfcb12e15aba3058f04d3691e07b9eeb Mon Sep 17 00:00:00 2001 From: derickso Date: Mon, 20 Apr 2020 02:20:12 -0700 Subject: [PATCH 2/2] Update Menus.cpp --- Menus.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Menus.cpp b/Menus.cpp index 465a180..7bfb979 100644 --- a/Menus.cpp +++ b/Menus.cpp @@ -113,16 +113,6 @@ namespace Tralala GFxValue curState; view->GetVariable(&curState, "_root.DialogueMenu_mc.eMenuState"); - if (!g_zoom) - { - if (curState.GetType() == 3 && curState.data.number == 1) - displayInfo.SetVisible(true); - - topicListHolder.SetDisplayInfo(&displayInfo); - - return NextFrame(menu, unk1, unk2); - } - if ((curState.GetType() == 3 && curState.data.number == 0) || (mtm->unk70 && !mtm->unkB9)) { view->SetVariable("_root.DialogueMenu_mc.eMenuState", &topicClickedState, 0);