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

View file

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

View file

@ -216,24 +216,22 @@ bool ShortcutCooldowns::RotateRows(int amount, int bank, int& rotation0, int& ro
// INLINED
void ShortcutCooldowns::PaintMain(
const std::list<ShortcutCooldownIcon>& icons, int rows, int x, int y, CooldownDrawing& drawing, RenderCommandPool& pool,
CRenderSystemBase& system
const std::list<ShortcutCooldownIcon>& icons, int rows, int x, int y, CooldownDrawing& drawing
) {
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
void ShortcutCooldowns::PaintAlternate(
const std::list<ShortcutCooldownIcon>& icons, int x, int y, CooldownDrawing& drawing, RenderCommandPool& pool,
CRenderSystemBase& system
const std::list<ShortcutCooldownIcon>& icons, int x, int y, CooldownDrawing& drawing
) {
this->Paint(icons, &ShortcutCooldownRecord::alternate, 0, x, y, drawing, pool, system);
this->Paint(icons, &ShortcutCooldownRecord::alternate, 0, x, y, drawing);
}
// INLINED
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();
@ -256,7 +254,7 @@ void ShortcutCooldowns::Paint(
}
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;
@ -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

View file

@ -36,17 +36,15 @@ struct ShortcutCooldowns {
bool RotateRows(int amount, int bank, int& rotation0, int& rotation1);
void PaintMain(
const std::list<ShortcutCooldownIcon>& icons, int rows, int x, int y, CooldownDrawing& drawing, RenderCommandPool& pool,
CRenderSystemBase& system
const std::list<ShortcutCooldownIcon>& icons, int rows, int x, int y, CooldownDrawing& drawing
);
void PaintAlternate(
const std::list<ShortcutCooldownIcon>& icons, int x, int y, CooldownDrawing& drawing, RenderCommandPool& pool,
CRenderSystemBase& system
const std::list<ShortcutCooldownIcon>& icons, int x, int y, CooldownDrawing& drawing
);
private:
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)
.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 ResourceMgr;
struct ShortcutPainting {
RenderCommandPool& commands;
CRenderSystemBase& system;
};
#endif

View file

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

View file

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