Maintenance: [forced, user-approved] R8: remove the last members of ShortcutPainting and QuickSlotPainting (RenderCommandPool& comman

Batch #10249 by ragnarok-clanker: forced by an admin (0 lower score(s), 4 changed function(s)); checked with 242 compiled unit(s), including every includer of Source/UI/Cooldowns/CooldownDrawing.h, Source/UI/Shortcuts/ShortcutCooldowns.h, Source/UI/Shortcuts/ShortcutPainting.h, Source/UI/Shortcuts/UIQuickSlotWnd.h, Source/UI/Shortcuts/UIShortCutWnd.h.
This commit is contained in:
ragnarok-clanker 2026-11-03 12:23:10 +00:00
commit 8a743ea8e7
8 changed files with 24 additions and 42 deletions

View file

@ -1,6 +1,7 @@
#include "Render/Primitives/RenderCommandPool.h" #include "Render/Primitives/RenderCommandPool.h"
#include "Render/Primitives/RenderQueues.h" #include "Render/Primitives/RenderQueues.h"
#include "Render/RenderSystemBase.h" #include "Render/Renderer.h"
#include "Render/Textures/TextureCache.h"
#include "UI/Cooldowns/CooldownDrawing.h" #include "UI/Cooldowns/CooldownDrawing.h"
namespace { namespace {
@ -17,8 +18,7 @@ namespace {
// OFFSET: 0x00CA66B0 // OFFSET: 0x00CA66B0
// FUNCTION: fn_20964 // FUNCTION: fn_20964
void CooldownDrawing::Draw( void CooldownDrawing::Draw(
int centerX, int centerY, int radiusX, int radiusY, CooldownState& value, int limit, int offsetX, int offsetY, int centerX, int centerY, int radiusX, int radiusY, CooldownState& value, int limit, int offsetX, int offsetY
RenderCommandPool& pool, CRenderSystemBase& system
) { ) {
if (value.x <= 0 || value.y <= 0 || (value.color & 0xFF000000u) == 0) { if (value.x <= 0 || value.y <= 0 || (value.color & 0xFF000000u) == 0) {
return; return;
@ -71,7 +71,7 @@ void CooldownDrawing::Draw(
value.AddEdge(7, vertices[reversed ? 22 : 2].x, radiusX, 1); value.AddEdge(7, vertices[reversed ? 22 : 2].x, radiusX, 1);
if (reversed) { if (reversed) {
this->DrawReverse(value, pool, system); this->DrawReverse(value);
return; return;
} }
@ -94,8 +94,8 @@ void CooldownDrawing::Draw(
return; return;
} }
RenderCommand* command = pool.Acquire(); RenderCommand* command = g_renderer->commands.Acquire();
command->texture = system.BackBufferTexture(); command->texture = g_texMgr.Default();
command->vertices = vertices; command->vertices = vertices;
command->vertexCount = value.vertexCount; command->vertexCount = value.vertexCount;
@ -109,7 +109,7 @@ void CooldownDrawing::Draw(
// OFFSET: 0x00CA6C00 // OFFSET: 0x00CA6C00
// FUNCTION: fn_20965 // FUNCTION: fn_20965
void CooldownDrawing::DrawReverse(CooldownState& value, RenderCommandPool& pool, CRenderSystemBase& system) { void CooldownDrawing::DrawReverse(CooldownState& value) {
if (value.duration == 0) { if (value.duration == 0) {
return; return;
} }
@ -130,8 +130,8 @@ void CooldownDrawing::DrawReverse(CooldownState& value, RenderCommandPool& pool,
} }
} }
RenderCommand* command = pool.Acquire(); RenderCommand* command = g_renderer->commands.Acquire();
command->texture = system.BackBufferTexture(); command->texture = g_texMgr.Default();
command->vertices = value.vertices; command->vertices = value.vertices;
command->vertexCount = value.vertexCount; command->vertexCount = value.vertexCount;

View file

@ -6,8 +6,6 @@
#include <cstddef> #include <cstddef>
#include <vector> #include <vector>
class RenderCommandPool;
class CRenderSystemBase;
struct RenderQueues; struct RenderQueues;
struct CooldownDrawing { struct CooldownDrawing {
@ -15,14 +13,13 @@ struct CooldownDrawing {
/* 0010 */ std::vector<RenderCommand*> reverse; /* 0010 */ std::vector<RenderCommand*> reverse;
void Draw( void Draw(
int centerX, int centerY, int radiusX, int radiusY, CooldownState& value, int limit, int offsetX, int offsetY, int centerX, int centerY, int radiusX, int radiusY, CooldownState& value, int limit, int offsetX, int offsetY
RenderCommandPool& pool, CRenderSystemBase& system
); );
void SubmitNormal(RenderQueues& queues, bool depthAlpha, float depthStart, float depthEnd); void SubmitNormal(RenderQueues& queues, bool depthAlpha, float depthStart, float depthEnd);
void SubmitReverse(RenderQueues& queues, bool depthAlpha, float depthStart, float depthEnd); void SubmitReverse(RenderQueues& queues, bool depthAlpha, float depthStart, float depthEnd);
private: private:
void DrawReverse(CooldownState& value, RenderCommandPool& pool, CRenderSystemBase& system); void DrawReverse(CooldownState& value);
}; };
#if defined(_WIN32) && !defined(_WIN64) #if defined(_WIN32) && !defined(_WIN64)

View file

@ -216,24 +216,22 @@ bool ShortcutCooldowns::RotateRows(int amount, int bank, int& rotation0, int& ro
// INLINED // INLINED
void ShortcutCooldowns::PaintMain( void ShortcutCooldowns::PaintMain(
const std::list<ShortcutCooldownIcon>& icons, int rows, int x, int y, CooldownDrawing& drawing, RenderCommandPool& pool, const std::list<ShortcutCooldownIcon>& icons, int rows, int x, int y, CooldownDrawing& drawing
CRenderSystemBase& system
) { ) {
const int limit = rows * 33 + 4; const int limit = rows * 33 + 4;
this->Paint(icons, &ShortcutCooldownRecord::main, limit, x, y, drawing, pool, system); this->Paint(icons, &ShortcutCooldownRecord::main, limit, x, y, drawing);
} }
// INLINED // INLINED
void ShortcutCooldowns::PaintAlternate( void ShortcutCooldowns::PaintAlternate(
const std::list<ShortcutCooldownIcon>& icons, int x, int y, CooldownDrawing& drawing, RenderCommandPool& pool, const std::list<ShortcutCooldownIcon>& icons, int x, int y, CooldownDrawing& drawing
CRenderSystemBase& system
) { ) {
this->Paint(icons, &ShortcutCooldownRecord::alternate, 0, x, y, drawing, pool, system); this->Paint(icons, &ShortcutCooldownRecord::alternate, 0, x, y, drawing);
} }
// INLINED // INLINED
void ShortcutCooldowns::Paint( void ShortcutCooldowns::Paint(
const std::list<ShortcutCooldownIcon>& icons, std::list<CooldownState> ShortcutCooldownRecord::* values, int limit, int x, int y, CooldownDrawing& drawing, RenderCommandPool& pool, CRenderSystemBase& system const std::list<ShortcutCooldownIcon>& icons, std::list<CooldownState> ShortcutCooldownRecord::* values, int limit, int x, int y, CooldownDrawing& drawing
) { ) {
const std::uint32_t now = CooldownNow(); const std::uint32_t now = CooldownNow();
@ -256,7 +254,7 @@ void ShortcutCooldowns::Paint(
} }
for (CooldownState& state : states) { for (CooldownState& state : states) {
drawing.Draw(0, 0, 12, 12, state, limit, x, y, pool, system); drawing.Draw(0, 0, 12, 12, state, limit, x, y);
} }
++entry; ++entry;
@ -447,7 +445,7 @@ void UIQuickSlotWnd::Paint() {
} }
} }
reinterpret_cast<ShortcutCooldowns&>(g_session.m_requestTimers).PaintAlternate(g_session.m_alternateCooldownIcons, this->geometry.x, this->geometry.y, g_cooldownOwner->Drawing(), this->m_painting->commands, this->m_painting->system); reinterpret_cast<ShortcutCooldowns&>(g_session.m_requestTimers).PaintAlternate(g_session.m_alternateCooldownIcons, this->geometry.x, this->geometry.y, g_cooldownOwner->Drawing());
} }
// OFFSET: 0x00924A50 // OFFSET: 0x00924A50

View file

@ -36,17 +36,15 @@ struct ShortcutCooldowns {
bool RotateRows(int amount, int bank, int& rotation0, int& rotation1); bool RotateRows(int amount, int bank, int& rotation0, int& rotation1);
void PaintMain( void PaintMain(
const std::list<ShortcutCooldownIcon>& icons, int rows, int x, int y, CooldownDrawing& drawing, RenderCommandPool& pool, const std::list<ShortcutCooldownIcon>& icons, int rows, int x, int y, CooldownDrawing& drawing
CRenderSystemBase& system
); );
void PaintAlternate( void PaintAlternate(
const std::list<ShortcutCooldownIcon>& icons, int x, int y, CooldownDrawing& drawing, RenderCommandPool& pool, const std::list<ShortcutCooldownIcon>& icons, int x, int y, CooldownDrawing& drawing
CRenderSystemBase& system
); );
private: private:
void Paint( void Paint(
const std::list<ShortcutCooldownIcon>& icons, std::list<CooldownState> ShortcutCooldownRecord::* values, int limit, int x, int y, CooldownDrawing& drawing, RenderCommandPool& pool, CRenderSystemBase& system const std::list<ShortcutCooldownIcon>& icons, std::list<CooldownState> ShortcutCooldownRecord::* values, int limit, int x, int y, CooldownDrawing& drawing
); );
}; };

View file

@ -174,5 +174,5 @@ void UIShortCutWnd::Paint() {
} }
reinterpret_cast<ShortcutCooldowns&>(g_session.m_requestTimers) reinterpret_cast<ShortcutCooldowns&>(g_session.m_requestTimers)
.PaintMain(g_session.m_mainCooldownIcons, grid.rows, window.geometry.x, window.geometry.y, g_cooldownOwner->Drawing(), this->m_painting->commands, this->m_painting->system); .PaintMain(g_session.m_mainCooldownIcons, grid.rows, window.geometry.x, window.geometry.y, g_cooldownOwner->Drawing());
} }

View file

@ -11,9 +11,4 @@
class UIWindow; class UIWindow;
class ResourceMgr; class ResourceMgr;
struct ShortcutPainting {
RenderCommandPool& commands;
CRenderSystemBase& system;
};
#endif #endif

View file

@ -10,11 +10,6 @@
struct ITEM_INFO; struct ITEM_INFO;
class AutomaticSkills; class AutomaticSkills;
struct QuickSlotPainting {
RenderCommandPool& commands;
CRenderSystemBase& system;
};
#pragma pack(push, 1) #pragma pack(push, 1)
struct QuickSlotEntry { struct QuickSlotEntry {
/* 0000 */ unsigned char skill; /* 0000 */ unsigned char skill;
@ -45,7 +40,7 @@ protected:
/* 00B4 */ int m_selected; /* 00B4 */ int m_selected;
/* 00B8 */ QuickSlotWndInfo* m_saved; /* 00B8 */ QuickSlotWndInfo* m_saved;
/* 00BC */ QuickSlotEntry m_entries[2]; /* 00BC */ QuickSlotEntry m_entries[2];
QuickSlotPainting* m_painting; void* unknown_painting;
}; };
static_assert(sizeof(QuickSlotEntry) == 7); static_assert(sizeof(QuickSlotEntry) == 7);

View file

@ -6,7 +6,6 @@
#include "UI/Window/UIFrameWnd.h" #include "UI/Window/UIFrameWnd.h"
struct ModeDragState; struct ModeDragState;
struct ShortcutPainting;
struct NormalItemSlot; struct NormalItemSlot;
struct NormalItemSlotWindow; struct NormalItemSlotWindow;
@ -44,7 +43,7 @@ private:
NormalItemSlot* m_slots[36]; NormalItemSlot* m_slots[36];
ShortcutGrid m_grid; ShortcutGrid m_grid;
NormalItemSlot* m_itemSlots[9]; NormalItemSlot* m_itemSlots[9];
ShortcutPainting* m_painting; void* unknown_painting;
}; };
#if defined(_WIN32) && !defined(_WIN64) #if defined(_WIN32) && !defined(_WIN64)