From 1e5c387f03a5c62fa4fa134eefc24005bb265538 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 00:54:23 +0000 Subject: [PATCH] Decompile fn_10120 (UIRPData::Draw) Batch #17576 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_10120 UIRPData::Draw: logic confirmed by peer review Peer-reviewed-by: Yommy, cremane, bibinir Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Linkage/Source/Render/Primitives/UIRPData.cpp.h | 7 +++++++ Source/Render/Primitives/UIRPData.cpp | 9 ++++----- 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 Source/Linkage/Source/Render/Primitives/UIRPData.cpp.h diff --git a/Source/Linkage/Source/Render/Primitives/UIRPData.cpp.h b/Source/Linkage/Source/Render/Primitives/UIRPData.cpp.h new file mode 100644 index 000000000..95e5356f7 --- /dev/null +++ b/Source/Linkage/Source/Render/Primitives/UIRPData.cpp.h @@ -0,0 +1,7 @@ +#pragma once + +#include "Render/Primitives/RenderPrimitive.h" + +#include + +extern template void std::list::push_back(RenderPrimitive* const&); diff --git a/Source/Render/Primitives/UIRPData.cpp b/Source/Render/Primitives/UIRPData.cpp index eead29893..ce43161d9 100644 --- a/Source/Render/Primitives/UIRPData.cpp +++ b/Source/Render/Primitives/UIRPData.cpp @@ -28,9 +28,8 @@ void UIRPData::Draw(int x, int y, CTexture* texture, std::uint32_t color, int wi return; } - RenderPrimitive* primitive; if (stretched == true) { - primitive = g_renderer->primitives.Acquire(); + RenderPrimitive* primitive = g_renderer->primitives.Acquire(); primitive->texture = texture; const int right = x + width; const int bottom = y + height; @@ -62,8 +61,9 @@ void UIRPData::Draw(int x, int y, CTexture* texture, std::uint32_t color, int wi primitive->quad[3].z = 0.000001f; primitive->quad[3].rhw = 0.999999f; primitive->quad[3].diffuse = color; + this->m_primitives.push_back(primitive); } else { - primitive = g_renderer->primitives.Acquire(); + RenderPrimitive* primitive = g_renderer->primitives.Acquire(); primitive->texture = texture; const int imageWidth = texture->Width(); const int imageHeight = texture->Height(); @@ -109,7 +109,6 @@ void UIRPData::Draw(int x, int y, CTexture* texture, std::uint32_t color, int wi primitive->quad[3].z = 0.000001f; primitive->quad[3].rhw = 0.999999f; primitive->quad[3].diffuse = color; + this->m_primitives.push_back(primitive); } - - this->m_primitives.push_back(primitive); }