rodecomp/Source/Resource/TextureNames.cpp
ragnarok-clanker f464cd3f17 Decompile 41 functions in Source/Client/Input/InputCharset.cpp, Source/Client/Input/InputCharset.h, ...
Batch #1607 by ragnarok-clanker: 0 byte-identical, 41 confirmed by peer review.

- fn_11718 DrawItemIconById: logic confirmed by peer review
- fn_11719 DrawItemSlotBackground: logic confirmed by peer review
- fn_11721 UICntWnd::DrawBorder: logic confirmed by peer review
- fn_11760 UIBank_NewWnd::Paint: logic confirmed by peer review
- fn_11761 UIChatRoomWnd::Paint: logic confirmed by peer review
- fn_11767 UIMerInfoWnd::Paint: logic confirmed by peer review
- fn_12085 UIWindow::DrawPanelBackground: logic confirmed by peer review
- fn_12086 UIWindow::DrawPanelBackgroundAt: logic confirmed by peer review
- fn_12088 UIWindow::DrawButtonBar: logic confirmed by peer review
- fn_12089 UIWindow::DrawButtonBarAt: logic confirmed by peer review
- fn_12098 UIWindow::DrawTitleBar: logic confirmed by peer review
- fn_12099 UIWindow::DrawTitleBarAt: logic confirmed by peer review
- fn_12120 UIWindow::LoadStyledBitmap: logic confirmed by peer review
- fn_12219 UIDisconnectedServerMsgWnd::Paint: logic confirmed by peer review
- fn_12233 UINoticeConfirmWnd::Paint: logic confirmed by peer review
- fn_12245 UIQuitWnd::Paint: logic confirmed by peer review
- fn_12246 UIRestartWnd::Paint: logic confirmed by peer review
- fn_12258 UIWaitWnd::Paint: logic confirmed by peer review
- fn_14470 CUIFrameWnd::RefreshSkinColors: logic confirmed by peer review
- fn_14471 CUIFrameWnd::Paint: logic confirmed by peer review
- fn_14472 CUIFrameWnd::SetSkinColors: logic confirmed by peer review
- fn_14635 CUIControl::LoadBitmapResource: logic confirmed by peer review
- fn_17781 InputCharset::Prefix: logic confirmed by peer review
- fn_17788 InputCharset::ServiceName: logic confirmed by peer review
- fn_17847 FadeOutMode: logic confirmed by peer review
- fn_18378 Resolve: logic confirmed by peer review
- fn_02111 RendererDX7Operations::SaveLogo: logic confirmed by peer review
- fn_09446 UICashEmotionPack::Paint: logic confirmed by peer review
- fn_09453 UICashEmotionPack::SetSaleBadge: logic confirmed by peer review
- fn_09483 UICashEmotionPiece::Paint: logic confirmed by peer review
- fn_45445 CSkinMgr::CSkinMgr: logic confirmed by peer review
- fn_09681 CSkinMgr::~CSkinMgr: logic confirmed by peer review
- fn_09683 CSkinMgr::Prepare: logic confirmed by peer review
- fn_09684 SkinPaletteColor: logic confirmed by peer review
- fn_09685 SkinPaletteChannels: logic confirmed by peer review
- fn_09686 CSkinMgr::Name: logic confirmed by peer review
- fn_09687 CSkinMgr::Prefix: logic confirmed by peer review
- fn_09688 CSkinMgr::Name: logic confirmed by peer review
- fn_09690 CSkinMgr::Selected: logic confirmed by peer review
- fn_10758 UIEditCtrl::DrawSelectionAt: logic confirmed by peer review
- fn_10759 UIEditCtrl::DrawSelection: logic confirmed by peer review

Reviewed-by: ragnarok-clanker
Adds to the build: Source/Contents/SkinMgr.cpp
2026-10-28 19:13:07 +00:00

80 lines
2 KiB
C++

#include "Client/Input/InputCharset.h"
#include "Client/Mode/ActiveGameMode.h"
#include "Contents/Configuration/ServiceConfiguration.h"
#include "Contents/SkinMgr.h"
#include "Resource/ResourceMgr.h"
#include "File/ResourcePath.h"
#include "Resource/TextureNames.h"
#include <cstring>
#include <string>
// OFFSET: 0x00ACE510
// FUNCTION: fn_17788
const char* InputCharset::ServiceName(const char* name) {
if (g_serviceType == 0 || g_serviceType == 2 || g_serviceType == 20) {
return name;
}
// STATIC: 0x016D3860
// GLOBAL: gl_24372
static char path[260];
std::strcpy(path, this->servicePrefix.c_str());
std::strcat(path, name);
const bool exists = std::strstr(name, ".txt") || std::strstr(name, ".xml") ? ResourceExists(path, 0) : ResourceMgr::Instance().Exists(path);
return exists ? path : name;
}
// OFFSET: 0x00B01200
// FUNCTION: fn_18378
const char* Resolve(const char* name) {
if (*name == '\0') {
return name;
}
const std::string original(name);
constexpr char marker[] = "유저인터페이스";
if (original.find(marker, 0, 14) == std::string::npos) {
return name;
}
if (g_world.gameMode && g_skinInfo.Selected()) {
const std::string prefix(g_skinInfo.Prefix());
// STATIC: 0x016D58CC
// GLOBAL: gl_24385
static std::string selectedPath;
selectedPath = prefix;
if (original.size() > 15) {
selectedPath.append(original.data() + 15, original.size() - 15);
}
g_skinInfo.Prepare();
if (ResourceMgr::Instance().Exists(selectedPath.c_str())) {
return selectedPath.c_str();
}
}
if (g_serviceType != 0) {
if (ResourceMgr::Instance().Exists(g_serverLanguage->ServiceName(name))) {
return g_serverLanguage->ServiceName(name);
}
// STATIC: 0x016D58E8
// GLOBAL: gl_24386
static std::string uiPath;
uiPath = "UI\\";
if (original.size() > 15) {
uiPath.append(original.data() + 15, original.size() - 15);
}
if (ResourceMgr::Instance().Exists(uiPath.c_str())) {
return uiPath.c_str();
}
}
return name;
}