rodecomp/Source/UI/Shop/ItemDrawing.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

65 lines
2.5 KiB
C++

#include "Contents/Items/ItemDescription.h"
#include "Contents/Items/ItemInfo.h"
#include "Resource/Bitmap/BitmapResource.h"
#include "Resource/ResourceMgr.h"
#include "Resource/TextureNames.h"
#include "UI/Shop/ItemDrawing.h"
#include "UI/Window/UIWindow.h"
#include <cstdio>
// OFFSET: 0x008A8EE0
// FUNCTION: fn_11717
void DrawItemIcon(UIWindow& window, ResourceMgr& resources, ItemDescriptions& descriptions, int x, int y, const ItemInfo& item, unsigned char identified) {
char path[128];
descriptions.IconPath(path, item.itemId.c_str(), item.identified != 0 || identified != 0);
CBitmapRes* bitmap = static_cast<CBitmapRes*>(resources.Load(path));
if (bitmap) {
window.DrawBitmap(x, y, &bitmap->image, true);
}
}
// OFFSET: 0x008A8F80
// FUNCTION: fn_11718
void DrawItemIconById(UIWindow& window, ItemDescriptions& descriptions, int x, int y, const char* id, unsigned char identified) {
char path[128];
descriptions.IconPath(path, id, identified);
CBitmapRes* bitmap = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(path)));
if (bitmap) {
window.DrawBitmap(x, y, &bitmap->image, true);
}
}
// OFFSET: 0x008A9000
// FUNCTION: fn_11719
void DrawItemSlotBackground(UIWindow& window, int x, int y) {
CBitmapRes* bitmap = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_mid.bmp")));
window.DrawBitmap(x, y, bitmap ? &bitmap->image : nullptr, false);
}
// OFFSET: 0x008A9040
// FUNCTION: fn_11720
void DrawItemWithQuantity(
UIWindow& window, ResourceMgr& resources, ItemDescriptions& descriptions, FontCache& fonts, const TextLocale& locale, int x, int y, const ItemInfo& item,
unsigned char identified, unsigned char plain
) {
DrawItemIcon(window, resources, descriptions, x, y, item, identified);
if (item.quantity == -1 || item.quantity == 0) {
return;
}
char text[16];
std::sprintf(text, "%d", item.quantity);
if (plain != 0) {
window.DrawTextAt(fonts, locale, x + 16, y + 20, text, 0, 0, 11, 0, 0, 0);
} else {
const int left = x + (item.quantity < 1000 ? 14 : 0);
window.DrawTextAt(fonts, locale, left + 1, y + 15, text, 0, 0, 11, 0xFFFFFF, 0, 0);
window.DrawTextAt(fonts, locale, left - 1, y + 15, text, 0, 0, 11, 0xFFFFFF, 0, 0);
window.DrawTextAt(fonts, locale, left, y + 16, text, 0, 0, 11, 0xFFFFFF, 0, 0);
window.DrawTextAt(fonts, locale, left, y + 14, text, 0, 0, 11, 0xFFFFFF, 0, 0);
window.DrawTextAt(fonts, locale, left, y + 15, text, 0, 0, 11, 0, 0, 0);
}
}