diff --git a/Source/UI/Cooldowns/CooldownDrawing.cpp b/Source/UI/Cooldowns/CooldownDrawing.cpp index dc738681..c0c75c42 100644 --- a/Source/UI/Cooldowns/CooldownDrawing.cpp +++ b/Source/UI/Cooldowns/CooldownDrawing.cpp @@ -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; diff --git a/Source/UI/Cooldowns/CooldownDrawing.h b/Source/UI/Cooldowns/CooldownDrawing.h index 237dd0c0..77d35543 100644 --- a/Source/UI/Cooldowns/CooldownDrawing.h +++ b/Source/UI/Cooldowns/CooldownDrawing.h @@ -6,8 +6,6 @@ #include #include -class RenderCommandPool; -class CRenderSystemBase; struct RenderQueues; struct CooldownDrawing { @@ -15,14 +13,13 @@ struct CooldownDrawing { /* 0010 */ std::vector 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) diff --git a/Source/UI/Shortcuts/ShortcutCooldowns.cpp b/Source/UI/Shortcuts/ShortcutCooldowns.cpp index 817fa99b..df411053 100644 --- a/Source/UI/Shortcuts/ShortcutCooldowns.cpp +++ b/Source/UI/Shortcuts/ShortcutCooldowns.cpp @@ -216,24 +216,22 @@ bool ShortcutCooldowns::RotateRows(int amount, int bank, int& rotation0, int& ro // INLINED void ShortcutCooldowns::PaintMain( - const std::list& icons, int rows, int x, int y, CooldownDrawing& drawing, RenderCommandPool& pool, - CRenderSystemBase& system + const std::list& 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& icons, int x, int y, CooldownDrawing& drawing, RenderCommandPool& pool, - CRenderSystemBase& system + const std::list& 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& icons, std::list ShortcutCooldownRecord::* values, int limit, int x, int y, CooldownDrawing& drawing, RenderCommandPool& pool, CRenderSystemBase& system + const std::list& icons, std::list 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(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(g_session.m_requestTimers).PaintAlternate(g_session.m_alternateCooldownIcons, this->geometry.x, this->geometry.y, g_cooldownOwner->Drawing()); } // OFFSET: 0x00924A50 diff --git a/Source/UI/Shortcuts/ShortcutCooldowns.h b/Source/UI/Shortcuts/ShortcutCooldowns.h index e7d75b15..fbf2bc21 100644 --- a/Source/UI/Shortcuts/ShortcutCooldowns.h +++ b/Source/UI/Shortcuts/ShortcutCooldowns.h @@ -36,17 +36,15 @@ struct ShortcutCooldowns { bool RotateRows(int amount, int bank, int& rotation0, int& rotation1); void PaintMain( - const std::list& icons, int rows, int x, int y, CooldownDrawing& drawing, RenderCommandPool& pool, - CRenderSystemBase& system + const std::list& icons, int rows, int x, int y, CooldownDrawing& drawing ); void PaintAlternate( - const std::list& icons, int x, int y, CooldownDrawing& drawing, RenderCommandPool& pool, - CRenderSystemBase& system + const std::list& icons, int x, int y, CooldownDrawing& drawing ); private: void Paint( - const std::list& icons, std::list ShortcutCooldownRecord::* values, int limit, int x, int y, CooldownDrawing& drawing, RenderCommandPool& pool, CRenderSystemBase& system + const std::list& icons, std::list ShortcutCooldownRecord::* values, int limit, int x, int y, CooldownDrawing& drawing ); }; diff --git a/Source/UI/Shortcuts/ShortcutPainting.cpp b/Source/UI/Shortcuts/ShortcutPainting.cpp index f63d393d..29627404 100644 --- a/Source/UI/Shortcuts/ShortcutPainting.cpp +++ b/Source/UI/Shortcuts/ShortcutPainting.cpp @@ -174,5 +174,5 @@ void UIShortCutWnd::Paint() { } reinterpret_cast(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()); } diff --git a/Source/UI/Shortcuts/ShortcutPainting.h b/Source/UI/Shortcuts/ShortcutPainting.h index 466636fe..3e352f68 100644 --- a/Source/UI/Shortcuts/ShortcutPainting.h +++ b/Source/UI/Shortcuts/ShortcutPainting.h @@ -11,9 +11,4 @@ class UIWindow; class ResourceMgr; -struct ShortcutPainting { - RenderCommandPool& commands; - CRenderSystemBase& system; -}; - #endif diff --git a/Source/UI/Shortcuts/UIQuickSlotWnd.h b/Source/UI/Shortcuts/UIQuickSlotWnd.h index e6917510..c21dd024 100644 --- a/Source/UI/Shortcuts/UIQuickSlotWnd.h +++ b/Source/UI/Shortcuts/UIQuickSlotWnd.h @@ -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); diff --git a/Source/UI/Shortcuts/UIShortCutWnd.h b/Source/UI/Shortcuts/UIShortCutWnd.h index ebd7cff3..80032fd8 100644 --- a/Source/UI/Shortcuts/UIShortCutWnd.h +++ b/Source/UI/Shortcuts/UIShortCutWnd.h @@ -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)