Maintenance: [forced, user-approved] CLanguage steps 2-4 (resubmit of #10182, which was returned only for the global rule). Fix: the

Batch #10183 by ragnarok-clanker: forced by an admin (6 lower score(s), 50 changed function(s)); checked with 115 compiled unit(s), including every includer of Source/Client/Input/InputCharset.h, Source/Client/Input/Language.h, Source/Client/Input/LanguageTC.h, Source/UI/Chat/ChatNotifications.h, Source/UI/Edit/UIEditCtrl.h, Source/UI/Text/TextWrapping.h, Source/Client/Input/ImeInput.h.
Deletes: Source/Client/Input/ImeInput.h
This commit is contained in:
ragnarok-clanker 2026-11-02 19:33:35 +00:00
commit 309774e67b
28 changed files with 207 additions and 240 deletions

View file

@ -1,3 +1,4 @@
#include "Client/Input/InputCharset.h"
#include "Contents/Items/ItemDescription.h"
#include "Contents/Items/ItemInfo.h"
#include "Render/Text/TextContext.h"
@ -14,7 +15,7 @@
// OFFSET: 0x009B4220
// FUNCTION: fn_13829
void WrapPlainText(const char* text, std::vector<std::string>& lines, int width, unsigned short codePage) {
void WrapPlainText(const char* text, std::vector<std::string>& lines, int width) {
const char* begin = text;
const char* chunk = text;
const char* current = text;
@ -25,7 +26,7 @@ void WrapPlainText(const char* text, std::vector<std::string>& lines, int width,
const char* marker = text + TextContext::Marker(text, bytes);
while (current < end) {
current = CharNextExA(codePage, current, 0);
current = g_serverLanguage->NextChar(current, static_cast<int>(end - current));
while (*current == ' ') {
++current;
@ -80,7 +81,7 @@ namespace {
// OFFSET: 0x009B4730
// FUNCTION: fn_13833
void WrapRichText(
const char* text, std::vector<std::string>& lines, int width, bool carriageReturns, unsigned short codePage, ItemDescriptions& items
const char* text, std::vector<std::string>& lines, int width, bool carriageReturns, ItemDescriptions& items
) {
const char* begin = text;
const char* current = text;
@ -144,7 +145,7 @@ void WrapRichText(
lines.emplace_back(name);
}
} else {
current = CharNextExA(codePage, current, 0);
current = g_serverLanguage->NextChar(current, static_cast<int>(end - current));
}
}