From f49f3f33cb6788155d8480c1a2fb3dc179fe82cb Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 7 Nov 2026 08:26:53 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/Models/ModelRendering.cpp Batch #13735 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_17499 C3dNodeV1::Draw: logic confirmed by peer review - fn_17500 C3dNodeV2::Draw: logic confirmed by peer review Peer-reviewed-by: Yommy, secret, codeplay Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Models/ModelRendering.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Source/Contents/Models/ModelRendering.cpp b/Source/Contents/Models/ModelRendering.cpp index 4509bea22..7fd406770 100644 --- a/Source/Contents/Models/ModelRendering.cpp +++ b/Source/Contents/Models/ModelRendering.cpp @@ -58,12 +58,11 @@ inline void TransformModelUV(float& u, float& v, const ModelTextureTransform& tr // OFFSET: 0x00AB7D40 // FUNCTION: fn_17499 void C3dNodeV1::Draw(const float* matrix, unsigned char reversed, bool clip, unsigned char commandMode) { - // GLOBAL: gl_24586 - static ProjectedVertex projected[30000]; - struct matrix camera; - std::memcpy(camera.values, matrix, sizeof(camera.values)); + const struct matrix& camera = *reinterpret_cast(matrix); struct matrix combined; combined.Compose(this->transform, camera); + // GLOBAL: gl_24586 + static ProjectedVertex projected[30000]; float ambient[3]; std::memcpy(ambient, g_worldLighting.ambient, sizeof(ambient)); float lightColor[3]; @@ -184,11 +183,11 @@ void C3dNodeV1::Draw(const float* matrix, unsigned char reversed, bool clip, uns // OFFSET: 0x00AB84B0 // FUNCTION: fn_17500 void C3dNodeV2::Draw(const float* matrix, unsigned char reversed, bool clip, unsigned char commandMode) { - // GLOBAL: gl_24587 - static ProjectedVertex projected[30000]; const struct matrix& camera = *reinterpret_cast(matrix); struct matrix combined; combined.Compose(this->transform, camera); + // GLOBAL: gl_24587 + static ProjectedVertex projected[30000]; float ambient[3]; std::memcpy(ambient, g_worldLighting.ambient, sizeof(ambient)); float lightColor[3];