From ea009478438d16dc49ca10fe39f3848b6afbe135 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 05:45:20 +0000 Subject: [PATCH] Decompile 2 functions in Source/Render/Primitives/LightmappedPrimitive.cpp, Source/Render/Primitives/LightmappedPrimitive.h Batch #11553 by Yommy: 0 byte-identical, 2 confirmed by peer review. - fn_02245 LightmappedPrimitive::LightmappedPrimitive: logic confirmed by peer review - fn_02246 LightmappedPrimitive::LightmappedPrimitive: logic confirmed by peer review Peer-reviewed-by: KWDev, cremane, StrawberrysherbetIX Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Render/Primitives/LightmappedPrimitive.cpp | 13 ++----------- Source/Render/Primitives/LightmappedPrimitive.h | 4 ++++ 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Source/Render/Primitives/LightmappedPrimitive.cpp b/Source/Render/Primitives/LightmappedPrimitive.cpp index f7712901..b68cff3e 100644 --- a/Source/Render/Primitives/LightmappedPrimitive.cpp +++ b/Source/Render/Primitives/LightmappedPrimitive.cpp @@ -44,21 +44,12 @@ void LightmappedBuffer::Clear() { // OFFSET: 0x00569020 // FUNCTION: fn_02246 LightmappedPrimitive::LightmappedPrimitive() : vertices(this->quad), vertexCount(4), indices(nullptr), indexCount(0), primitiveType(D3DPT_TRIANGLESTRIP) { - for (LightmappedVertex& vertex : this->quad) { - vertex.x = 0.0f; - vertex.y = 0.0f; - vertex.z = 0.0f; - vertex.rhw = 0.0f; - vertex.diffuse = 0; - vertex.specular = 0xFF000000u; - vertex.u = 0.0f; - vertex.v = 0.0f; - } } // OFFSET: 0x00568F90 // FUNCTION: fn_02245 -LightmappedPrimitive::LightmappedPrimitive(const LightmappedPrimitive& other) : LightmappedPrimitive() { +LightmappedPrimitive::LightmappedPrimitive(const LightmappedPrimitive& other) + : vertices(this->quad), vertexCount(4), indices(nullptr), indexCount(0), primitiveType(D3DPT_TRIANGLESTRIP) { std::memcpy(this->quad, other.quad, sizeof(this->quad)); } diff --git a/Source/Render/Primitives/LightmappedPrimitive.h b/Source/Render/Primitives/LightmappedPrimitive.h index 908141f9..a14aa671 100644 --- a/Source/Render/Primitives/LightmappedPrimitive.h +++ b/Source/Render/Primitives/LightmappedPrimitive.h @@ -9,6 +9,10 @@ class CTexture; struct LightmappedVertex { + // INLINED + LightmappedVertex() : x(0.0f), y(0.0f), z(0.0f), rhw(0.0f), diffuse(0), specular(0xFF000000u), u(0.0f), v(0.0f) { + } + /* 0000 */ float x; /* 0004 */ float y; /* 0008 */ float z;