Decompile 6 functions in Source/UI/Text/TextMarkup.cpp, Source/UI/Text/TextMarkup.h, ...

Batch #12699 by Yommy: 0 byte-identical, 6 confirmed by peer review.

- fn_11210 UITextViewer::SplitTextLinkArguments: logic confirmed by peer review
- fn_11205 UITextViewer::AddItemLinks: logic confirmed by peer review
- fn_11206 UITextViewer::AddNaviLinks: logic confirmed by peer review
- fn_11209 UITextViewer::AddQuestLinks: logic confirmed by peer review
- fn_11211 UITextViewer::AddTipLinks: logic confirmed by peer review
- fn_11212 UITextViewer::AddUrlLinks: logic confirmed by peer review

Peer-reviewed-by: Tanke, aDw, cremane
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-11-06 01:55:56 +00:00
commit 5df36e74a3
4 changed files with 31 additions and 22 deletions

View file

@ -1,5 +1,7 @@
#include "UI/Text/ColoredText.h"
#include "UI/Text/TextMarkup.h"
#include "UI/Buttons/UITextButton.h"
#include "UI/Text/UITextViewer.h"
#include <windows.h>
#include <utility>
@ -271,20 +273,27 @@ void ExtractTextLinks(const std::string& source, const std::string& begin, const
} while (position != std::string::npos);
}
// INLINED
static void AddTextLinkArgument(std::vector<std::string>& lines, std::string argument) {
lines.push_back(argument);
}
// OFFSET: 0x00877650
// FUNCTION: fn_11210
void SplitTextLinkArguments(std::string text, std::vector<std::string>& arguments) {
void UITextViewer::SplitTextLinkArguments(std::string text, UITextButton* button) {
if (text.empty()) {
return;
}
auto comma = text.find(',');
std::string remaining = text;
auto comma = remaining.find(",");
while (comma != std::string::npos) {
arguments.push_back(text.substr(0, comma));
text = text.substr(comma + 1);
comma = text.find(',');
const std::string argument = remaining.substr(0, comma);
AddTextLinkArgument(button->m_lines, argument);
remaining = remaining.substr(comma + 1);
comma = remaining.find(',');
}
arguments.push_back(text);
AddTextLinkArgument(button->m_lines, remaining);
}