Maintenance: Fold alias global gl_24769 g_navigationWindow (0x14a67f4) into its evidenced owner member g_windowMgr.window_4F174. 0x14
Batch #10400 by ragnarok-clanker: no function's compiled code changes; checked with 13 compiled unit(s), including every includer of Source/UI/Window/UINavigationWnd.h.
This commit is contained in:
parent
e8d8624b91
commit
5903e7603e
9 changed files with 23 additions and 27 deletions
|
|
@ -2245,8 +2245,8 @@ void CGameMode::ProcessUiMessage(unsigned char* message) {
|
|||
break;
|
||||
}
|
||||
case 908:
|
||||
if (values->values[0] == 0xCB && g_navigationWindow != nullptr) {
|
||||
g_navigationWindow->SendMsg(nullptr, values->values[1], values->values[2], reinterpret_cast<std::intptr_t>(&values->values[3]), 0, 0);
|
||||
if (values->values[0] == 0xCB && g_windowMgr.window_4F174 != nullptr) {
|
||||
g_windowMgr.window_4F174->SendMsg(nullptr, values->values[1], values->values[2], reinterpret_cast<std::intptr_t>(&values->values[3]), 0, 0);
|
||||
}
|
||||
break;
|
||||
case 909:
|
||||
|
|
@ -2264,8 +2264,8 @@ void CGameMode::ProcessUiMessage(unsigned char* message) {
|
|||
std::memcpy(&states[0], values->values, states.size());
|
||||
g_windowMgr.CloseWindow(0x1A);
|
||||
g_navigationManager.LoadStates(states);
|
||||
if (g_navigationWindow != nullptr) {
|
||||
static_cast<UINavigationV4Wnd*>(g_navigationWindow)->FillRouteGroups();
|
||||
if (g_windowMgr.window_4F174 != nullptr) {
|
||||
static_cast<UINavigationV4Wnd*>(g_windowMgr.window_4F174)->FillRouteGroups();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -720,16 +720,16 @@ bool CNavigationManager::sub_B995D0(std::string name, int type, bool flag) {
|
|||
g_navigationManager.UpdateSearchResults();
|
||||
|
||||
if (!this->unknown_1248) {
|
||||
if (g_navigationWindow == nullptr) {
|
||||
if (g_windowMgr.window_4F174 == nullptr) {
|
||||
g_windowMgr.EnsureWindow(203);
|
||||
} else {
|
||||
g_navigationWindow->SendMsg(nullptr, 6, 200, 0, 0, 0);
|
||||
g_windowMgr.window_4F174->SendMsg(nullptr, 6, 200, 0, 0, 0);
|
||||
if (g_windowMgr.modal != nullptr) {
|
||||
static_cast<UINavigationWnd*>(g_windowMgr.modal)->RefreshWorldMapLevels();
|
||||
}
|
||||
}
|
||||
|
||||
g_windowMgr.Promote(g_navigationWindow);
|
||||
g_windowMgr.Promote(g_windowMgr.window_4F174);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -1687,8 +1687,8 @@ void CNavigationManager::CancelRoute() {
|
|||
this->unknown_125C = 0;
|
||||
if (!this->unknown_1248) {
|
||||
this->unknown_1258 = 1;
|
||||
if (g_navigationWindow != nullptr) {
|
||||
static_cast<UINavigationV4Wnd*>(g_navigationWindow)->RefreshLayout();
|
||||
if (g_windowMgr.window_4F174 != nullptr) {
|
||||
static_cast<UINavigationV4Wnd*>(g_windowMgr.window_4F174)->RefreshLayout();
|
||||
}
|
||||
}
|
||||
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(2309)), 0x62B0FF, 0, 0, 0);
|
||||
|
|
|
|||
|
|
@ -963,8 +963,8 @@ void CNavigationManager::ResetCurrentTarget() {
|
|||
// FUNCTION: fn_19570
|
||||
void CNavigationManager::CheckArrival(int cellX, int cellY) {
|
||||
if (this->unknown_1258 == 2) {
|
||||
if (g_navigationWindow != nullptr) {
|
||||
g_navigationWindow->Invalidate();
|
||||
if (g_windowMgr.window_4F174 != nullptr) {
|
||||
g_windowMgr.window_4F174->Invalidate();
|
||||
}
|
||||
if (this->unknown_115C) {
|
||||
NaviCell cell;
|
||||
|
|
|
|||
|
|
@ -2686,7 +2686,7 @@ void CUIMonster::SearchNavigation() {
|
|||
g_navigationManager.SetViewMode(1);
|
||||
g_navigationManager.ClearSavedTarget();
|
||||
g_windowMgr.CloseWindow(314);
|
||||
static_cast<UINavigationV4Wnd*>(g_navigationWindow)->RefreshLayout();
|
||||
static_cast<UINavigationV4Wnd*>(g_windowMgr.window_4F174)->RefreshLayout();
|
||||
g_windowMgr.Promote(g_windowMgr.LookupWindow(203));
|
||||
} else {
|
||||
g_windowMgr.EnsureWindow(203);
|
||||
|
|
|
|||
|
|
@ -407,8 +407,8 @@ int UIMenuIconWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument
|
|||
this->ToggleWindow(140);
|
||||
break;
|
||||
case 430:
|
||||
if (g_navigationWindow) {
|
||||
g_navigationWindow->SendMsg(nullptr, 6, 201, 0, 0, 0);
|
||||
if (g_windowMgr.window_4F174) {
|
||||
g_windowMgr.window_4F174->SendMsg(nullptr, 6, 201, 0, 0, 0);
|
||||
} else {
|
||||
g_windowMgr.EnsureWindow(203);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -654,9 +654,9 @@ void UIRoMapWnd::Slot31(int x, int y) {
|
|||
|
||||
g_navigationMinimized = false;
|
||||
g_navigationManager.sub_B995D0(name, 0, false);
|
||||
if (g_navigationWindow) {
|
||||
static_cast<UINavigationV4Wnd*>(g_navigationWindow)->SelectRoute(0);
|
||||
static_cast<UINavigationV4Wnd*>(g_navigationWindow)->SelectRouteNode(0);
|
||||
if (g_windowMgr.window_4F174) {
|
||||
static_cast<UINavigationV4Wnd*>(g_windowMgr.window_4F174)->SelectRoute(0);
|
||||
static_cast<UINavigationV4Wnd*>(g_windowMgr.window_4F174)->SelectRouteNode(0);
|
||||
}
|
||||
this->UpdateNavigationButtons();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,9 +35,6 @@ bool g_navigationMinimized;
|
|||
// GLOBAL: gl_24610
|
||||
int g_navigationMode;
|
||||
|
||||
// GLOBAL: gl_24769
|
||||
UIWindow* g_navigationWindow;
|
||||
|
||||
// GLOBAL: gl_24608
|
||||
bool g_navigationHidden;
|
||||
|
||||
|
|
@ -765,7 +762,7 @@ int UINavigationWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume
|
|||
return 0;
|
||||
}
|
||||
g_windowMgr.Schedule(this);
|
||||
g_navigationWindow = nullptr;
|
||||
g_windowMgr.window_4F174 = nullptr;
|
||||
return 0;
|
||||
case 0xCA:
|
||||
g_navigationMinimized = !g_navigationMinimized;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ struct NavigationWndInfo {
|
|||
|
||||
extern bool g_navigationMinimized;
|
||||
extern int g_navigationMode;
|
||||
extern UIWindow* g_navigationWindow;
|
||||
extern bool g_navigationHidden;
|
||||
extern CActRes* g_navigationActions;
|
||||
extern CSprRes* g_navigationSprites;
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ void UIRoMapWnd::ResetKafraBounds() {
|
|||
// FUNCTION: fn_12634
|
||||
void UIRoMapWnd::UpdateNavigationButtons() {
|
||||
UIWindow** buttons = reinterpret_cast<UIWindow**>(reinterpret_cast<unsigned char*>(this) + 0x20C);
|
||||
if (g_navigationWindow != nullptr && !g_navigationMinimized) {
|
||||
if (g_windowMgr.window_4F174 != nullptr && !g_navigationMinimized) {
|
||||
buttons[0]->Move(-100, -100);
|
||||
buttons[1]->Move(-100, -100);
|
||||
buttons[2]->Move(-100, -100);
|
||||
|
|
@ -763,8 +763,8 @@ int UIRoMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1,
|
|||
return 0;
|
||||
case 200:
|
||||
g_windowMgr.EnsureWindow(203);
|
||||
if (g_navigationWindow) {
|
||||
g_navigationWindow->SendMsg(nullptr, 6, 200, 0, 0, 0);
|
||||
if (g_windowMgr.window_4F174) {
|
||||
g_windowMgr.window_4F174->SendMsg(nullptr, 6, 200, 0, 0, 0);
|
||||
}
|
||||
this->UpdateNavigationButtons();
|
||||
return 0;
|
||||
|
|
@ -796,8 +796,8 @@ int UIRoMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1,
|
|||
g_navigationMinimized = false;
|
||||
g_navigationManager.sub_B995D0(name, 0, false);
|
||||
if (g_windowMgr.LookupWindow(203)) {
|
||||
static_cast<UINavigationV4Wnd*>(g_navigationWindow)->SelectRoute(0);
|
||||
static_cast<UINavigationV4Wnd*>(g_navigationWindow)->SelectRouteNode(0);
|
||||
static_cast<UINavigationV4Wnd*>(g_windowMgr.window_4F174)->SelectRoute(0);
|
||||
static_cast<UINavigationV4Wnd*>(g_windowMgr.window_4F174)->SelectRouteNode(0);
|
||||
}
|
||||
this->UpdateNavigationButtons();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue