Decompile 2 functions in Source/UI/Window/UIWindowMgr.cpp, Source/UI/Window/UIWindowMgr.h, ...

Batch #1030 by ragnarok-clanker: 0 byte-identical, 2 confirmed by peer review.

- fn_17179 UIWindowMgr::InitializeWindowPolicy: logic confirmed by peer review
- fn_17227 UIWindowMgr::LookupWindow: logic confirmed by peer review

Reviewed-by: ragnarok-clanker
This commit is contained in:
ragnarok-clanker 2026-10-27 10:04:20 +00:00
commit 6d6e55e3f2

View file

@ -4,8 +4,248 @@
#include "UI/Window/UIWindowMgr.h"
// OFFSET: 0x00A94FD0
// FUNCTION: fn_17179
void UIWindowMgr::InitializeWindowPolicy() {
for (WindowPolicyEntry& entry : this->policy) {
entry = {};
entry.actions[3] = 1;
}
this->policy[15].actions[3] = 0;
this->policy[16].actions[3] = 0;
this->policy[17].actions[3] = 0;
this->policy[22].actions[3] = 0;
this->policy[23].actions[3] = 0;
this->policy[24].actions[3] = 0;
this->policy[25].actions[3] = 0;
this->policy[27].actions[3] = 0;
this->policy[28].actions[3] = 0;
this->policy[31].actions[3] = 0;
this->policy[32].actions[3] = 0;
this->policy[35].actions[3] = 0;
this->policy[39].actions[3] = 0;
this->policy[41].actions[3] = 0;
this->policy[43].actions[3] = 1;
this->policy[44].actions[3] = 0;
this->policy[45].actions[3] = 0;
this->policy[56].actions[3] = 0;
this->policy[70].actions[3] = 0;
this->policy[73].actions[3] = 0;
this->policy[74].actions[3] = 0;
this->policy[79].actions[3] = 0;
this->policy[80].actions[3] = 0;
this->policy[88].actions[3] = 0;
this->policy[90].actions[3] = 0;
this->policy[94].actions[3] = 0;
this->policy[99].actions[3] = 0;
this->policy[100].actions[3] = 0;
this->policy[105].actions[3] = 0;
this->policy[107].actions[3] = 0;
this->policy[109].actions[3] = 0;
this->policy[110].actions[3] = 0;
this->policy[111].actions[3] = 0;
this->policy[113].actions[3] = 0;
this->policy[119].actions[3] = 0;
this->policy[125].actions[3] = 0;
this->policy[160].actions[3] = 1;
this->policy[161].actions[3] = 1;
this->policy[174].actions[3] = 0;
this->policy[176].actions[3] = 0;
this->policy[178].actions[3] = 0;
this->policy[177].actions[3] = 0;
this->policy[179].actions[3] = 0;
this->policy[203].actions[3] = 0;
this->policy[157].actions[3] = 0;
this->policy[209].actions[3] = 0;
this->policy[210].actions[3] = 0;
this->policy[275].actions[3] = 0;
this->policy[315].actions[3] = 0;
this->policy[8].actions[5] = 1;
this->policy[22].actions[5] = 1;
this->policy[23].actions[5] = 1;
this->policy[24].actions[5] = 1;
this->policy[31].actions[5] = 1;
this->policy[10011].actions[5] = 1;
this->policy[33].actions[5] = 1;
this->policy[40].actions[5] = 1;
this->policy[41].actions[5] = 1;
this->policy[42].actions[5] = 1;
this->policy[43].actions[5] = 1;
this->policy[44].actions[5] = 1;
this->policy[160].actions[5] = 1;
this->policy[161].actions[5] = 1;
this->policy[174].actions[5] = 1;
this->policy[175].actions[5] = 1;
this->policy[178].actions[5] = 1;
this->policy[36].actions[5] = 1;
this->policy[159].actions[5] = 1;
this->policy[80].actions[5] = 1;
this->policy[1].actions[6] = 1;
this->policy[4].actions[6] = 1;
this->policy[15].actions[6] = 1;
this->policy[27].actions[6] = 1;
this->policy[28].actions[6] = 1;
this->policy[31].actions[6] = 1;
this->policy[10011].actions[6] = 1;
this->policy[41].actions[6] = 1;
this->policy[55].actions[6] = 1;
this->policy[56].actions[6] = 1;
this->policy[84].actions[6] = 1;
this->policy[88].actions[6] = 1;
this->policy[100].actions[6] = 1;
this->policy[101].actions[6] = 1;
this->policy[113].actions[6] = 1;
this->policy[116].actions[6] = 1;
this->policy[120].actions[6] = 1;
this->policy[121].actions[6] = 1;
this->policy[128].actions[6] = 1;
this->policy[125].actions[6] = 1;
this->policy[130].actions[6] = 1;
this->policy[145].actions[6] = 1;
this->policy[168].actions[6] = 1;
this->policy[169].actions[6] = 1;
this->policy[174].actions[6] = 1;
this->policy[181].actions[6] = 1;
this->policy[191].actions[6] = 1;
this->policy[203].actions[6] = 1;
this->policy[16].actions[7] = 1;
this->policy[17].actions[7] = 1;
this->policy[23].actions[7] = 1;
this->policy[24].actions[7] = 1;
this->policy[25].actions[7] = 1;
this->policy[28].actions[7] = 1;
this->policy[31].actions[7] = 1;
this->policy[10011].actions[7] = 1;
this->policy[32].actions[7] = 1;
this->policy[33].actions[7] = 1;
this->policy[35].actions[7] = 1;
this->policy[39].actions[7] = 1;
this->policy[41].actions[7] = 1;
this->policy[43].actions[7] = 1;
this->policy[44].actions[7] = 1;
this->policy[45].actions[7] = 1;
this->policy[70].actions[7] = 1;
this->policy[73].actions[7] = 1;
this->policy[74].actions[7] = 1;
this->policy[79].actions[7] = 1;
this->policy[80].actions[7] = 1;
this->policy[94].actions[7] = 1;
this->policy[105].actions[7] = 1;
this->policy[107].actions[7] = 1;
this->policy[109].actions[7] = 1;
this->policy[110].actions[7] = 1;
this->policy[111].actions[7] = 1;
this->policy[119].actions[7] = 1;
this->policy[161].actions[7] = 1;
this->policy[174].actions[7] = 1;
this->policy[176].actions[7] = 1;
this->policy[178].actions[7] = 1;
this->policy[177].actions[7] = 1;
this->policy[179].actions[7] = 1;
this->policy[203].actions[7] = 1;
this->policy[157].actions[7] = 1;
this->policy[209].actions[7] = 1;
this->policy[210].actions[7] = 1;
this->policy[321].actions[7] = 1;
this->policy[322].actions[7] = 1;
this->policy[307].actions[7] = 1;
this->policy[247].actions[7] = 1;
this->policy[316].actions[7] = 1;
}
// OFFSET: 0x00AA5F70
// FUNCTION: fn_17227
UIWindow* UIWindowMgr::LookupWindow(int id) {
if (g_replayAnimationScaling != 0 && id == 600) {
return this->window_4F16C;
}
switch (id) {
case 1:
return this->window_01C8;
case 3:
return this->window_01CC;
case 27:
return this->window_0274;
case 28:
return this->window_027C;
case 30:
return this->window_0278;
case 33:
return this->window_0288;
case 34:
return this->window_02C8;
case 37:
return this->window_02C4;
case 60:
return this->window_0320;
case 61:
return this->window_0324;
case 63:
return this->window_032C;
case 88:
return this->window_038C;
case 103:
return this->window_0388;
case 113:
return this->window_03C0;
case 114:
return this->window_03C4;
case 125:
return this->window_03C8;
case 126:
return this->window_03CC;
case 180:
return this->window_01D0;
case 196:
return this->window_4F18C;
case 203:
return this->window_4F174;
case 204:
return this->window_0428;
case 237:
return this->window_0444;
case 253:
return this->window_044C;
case 273:
return this->window_4F1CC;
case 274:
return this->window_4F1D0;
case 275:
return this->window_0448;
case 277:
return this->window_03D4;
case 284:
return this->window_4F1E8;
case 285:
return this->window_4F1EC;
case 286:
return this->window_4F1F0;
case 287:
return this->window_4F1F4;
case 288:
return this->window_4F1F8;
case 315:
return this->window_0468;
case 325:
return this->window_4F25C;
case 359:
return this->window_4F288;
case 10024:
return this->window_4F2AC;
case 301:
if (!this->snapExcluded.empty()) {
return this->snapExcluded.front();
}
[[fallthrough]];
case 318:
return this->window_4F254;
default: {
const auto found = this->windows.find(id);
return found != this->windows.end() ? found->second : nullptr;
}
}
}
// OFFSET: 0x00AA1800