Decompile 2 functions in Source/UI/MiniPartyPlacement.cpp, Source/UI/MiniPartyUsableArea.cpp, ...
Batch #11595 by cremane: 1 byte-identical, 1 confirmed by peer review. - fn_07657 CMiniPartyWndAreaMgr::FindFreeCell: logic confirmed by peer review - fn_17166 UIWindowMgr::GetMiniPartyUsableArea: byte-identical Peer-reviewed-by: Yommy, KWDev Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
6ccc604369
commit
3ddb52d9c1
3 changed files with 19 additions and 17 deletions
|
|
@ -42,19 +42,19 @@ UIWindow* UIWindowMgr::FindSnapExcludedWindow(int cell) {
|
|||
// OFFSET: 0x00737B00
|
||||
// FUNCTION: fn_07657
|
||||
int CMiniPartyWndAreaMgr::FindFreeCell() {
|
||||
RECT usable;
|
||||
g_windowMgr.GetMiniPartyUsableArea(&usable);
|
||||
CMiniPartyWndSortArea area(usable);
|
||||
CMiniPartyWndSortArea area(g_windowMgr.GetMiniPartyUsableArea());
|
||||
const std::list<int> cells = area.GetCells();
|
||||
|
||||
for (int id : this->available) {
|
||||
for (int cell : cells) {
|
||||
if (cell == id) {
|
||||
if (g_windowMgr.FindSnapExcludedWindow(id) == nullptr) {
|
||||
return id;
|
||||
}
|
||||
break;
|
||||
}
|
||||
for (std::vector<int>::iterator it = this->available.begin(); it != this->available.end(); ++it) {
|
||||
const std::list<int>::const_iterator found = std::find(cells.begin(), cells.end(), *it);
|
||||
|
||||
if (found == cells.end()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const UIWindow* const window = g_windowMgr.FindSnapExcludedWindow(*it);
|
||||
if (window == nullptr) {
|
||||
return *it;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,15 +4,17 @@
|
|||
|
||||
// OFFSET: 0x00A918B0
|
||||
// FUNCTION: fn_17166
|
||||
void UIWindowMgr::GetMiniPartyUsableArea(RECT* area) {
|
||||
RECT UIWindowMgr::GetMiniPartyUsableArea() {
|
||||
const int height = this->unknown_0480;
|
||||
int top = static_cast<int>(height * 0.3f);
|
||||
if (UIWindow* window = g_windowMgr.LookupWindow(307)) {
|
||||
top = window->geometry.height;
|
||||
}
|
||||
|
||||
area->right = this->unknown_047C;
|
||||
area->top = top;
|
||||
area->left = 0;
|
||||
area->bottom = height - g_miniPartyCellHeight * 3;
|
||||
RECT area;
|
||||
area.right = this->unknown_047C;
|
||||
area.top = top;
|
||||
area.left = 0;
|
||||
area.bottom = height - g_miniPartyCellHeight * 3;
|
||||
return area;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -473,7 +473,7 @@ public:
|
|||
UIWindow* EnsureWindow(int id);
|
||||
UIWindow* sub_A978D0(int id);
|
||||
UIWindow* CreateLayoutWindow(int id);
|
||||
void GetMiniPartyUsableArea(RECT* area);
|
||||
RECT GetMiniPartyUsableArea();
|
||||
UIWindow* FindSnapExcludedWindow(int cell);
|
||||
void Schedule(UIWindow* window);
|
||||
__declspec(noinline) void AddRendered(UIWindow* window);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue