rodecomp/Source/UI/Window/WindowAncestry.cpp
ragnarok-clanker efb38781a2 Decompile 6 functions in Source/UI/Window/WindowAncestry.cpp, Source/UI/MiniPartyManager.cpp, ...
Batch #5179 by eAthena: 2 byte-identical, 4 confirmed by peer review.

- fn_16989 UIWindow::BroadcastMsg4: byte-identical
- fn_16990 UIWindow::BroadcastMsg3: byte-identical
- fn_16924 UIWindow::PropagateMsg: logic confirmed by peer review
- fn_17214 UIWindowMgr::ArrangeMiniPartyWindows: logic confirmed by peer review
- fn_17164 UIWindowMgr::FindItemWindow: logic confirmed by peer review
- fn_17230 UIWindowMgr::NotifyMemberWindows: logic confirmed by peer review

Peer-reviewed-by: alisonrag, youko
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-30 09:23:29 +00:00

76 lines
2.2 KiB
C++

#include "UI/Window/UIWindow.h"
#include "UI/Window/UIWindowMgr.h"
// OFFSET: 0x00A81C90
// FUNCTION: fn_16985
bool UIWindow::IsDescendantOf(const UIWindow* ancestor) const {
for (const UIWindow* node = this->parent; node; node = node->parent) {
if (node == ancestor) {
return true;
}
}
return false;
}
// OFFSET: 0x00A8C200
// FUNCTION: fn_17130
void UIWindowMgr::ForgetWindowReferences(UIWindow* removed) {
if (this->inputWindow && (this->inputWindow == removed || this->inputWindow->IsDescendantOf(removed))) {
this->inputWindow = nullptr;
}
if (this->hoverWindow && (this->hoverWindow == removed || this->hoverWindow->IsDescendantOf(removed))) {
this->hoverWindow = nullptr;
}
if (this->window_01B8 && (this->window_01B8 == removed || this->window_01B8->IsDescendantOf(removed))) {
this->window_01B8 = nullptr;
}
if (this->window_0A30 && this->window_0A30 == removed) {
this->window_0A30 = nullptr;
}
if (this->window_4F1D4 && (this->window_4F1D4 == removed || this->window_4F1D4->IsDescendantOf(removed))) {
this->window_4F1D4 = nullptr;
}
}
// OFFSET: 0x00AA8F30
// FUNCTION: fn_17250
void UIWindowMgr::ClearWindow01B8() {
this->window_01B8 = nullptr;
}
// OFFSET: 0x00A7AA30
// FUNCTION: fn_16924
void UIWindow::PropagateMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
if (this != sender && !this->SendMsg(sender, message, argument1, argument2, argument3, argument4)) {
for (UIWindow* child : this->m_children) {
child->PropagateMsg(sender, message, argument1, argument2, argument3, argument4);
}
}
}
// OFFSET: 0x00A81D70
// FUNCTION: fn_16989
void UIWindow::BroadcastMsg4() {
this->SendMsg(nullptr, 4, 0, 0, 0, 0);
for (std::list<UIWindow*>::iterator it = this->m_children.begin(); it != this->m_children.end(); ++it) {
if (*it) {
(*it)->SendMsg(nullptr, 4, 0, 0, 0, 0);
}
}
}
// OFFSET: 0x00A81DC0
// FUNCTION: fn_16990
void UIWindow::BroadcastMsg3() {
this->SendMsg(nullptr, 3, 0, 0, 0, 0);
for (std::list<UIWindow*>::iterator it = this->m_children.begin(); it != this->m_children.end(); ++it) {
if (*it) {
(*it)->SendMsg(nullptr, 3, 0, 0, 0, 0);
}
}
}