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

Batch #6184 by eAthena: 0 byte-identical, 2 confirmed by peer review.

- fn_12951 UIRPImageWnd2::SetImage: logic confirmed by peer review
- fn_12966 UIStaticText_LF::SetText: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, alisonrag, System4z
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-10-30 20:58:52 +00:00
commit b79407bc49
4 changed files with 32 additions and 0 deletions

View file

@ -43,3 +43,23 @@ void UIStaticText_LF::Slot35(int delta) {
this->parent->Slot35(delta);
}
}
// OFFSET: 0x00951BF0
// FUNCTION: fn_12966
void UIStaticText_LF::SetText(std::string text) {
*reinterpret_cast<std::string*>(reinterpret_cast<char*>(this) + 0x7C) = text;
std::list<std::string> lines;
this->WrapFormattedText(
text, &lines, this->geometry.width,
*reinterpret_cast<const int*>(reinterpret_cast<const char*>(this) + 0x9C),
*reinterpret_cast<const int*>(reinterpret_cast<const char*>(this) + 0xA0),
*reinterpret_cast<const unsigned char*>(reinterpret_cast<const char*>(this) + 0xA8)
);
const int count = static_cast<int>(lines.size());
this->Resize(
this->geometry.width,
(count - 1) * *reinterpret_cast<const int*>(reinterpret_cast<const char*>(this) + 0x94) +
*reinterpret_cast<const int*>(reinterpret_cast<const char*>(this) + 0xA0) * count
);
this->Invalidate();
}