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).
This commit is contained in:
ragnarok-clanker 2026-11-07 08:26:53 +00:00
commit f49f3f33cb

View file

@ -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<const struct matrix*>(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<const struct matrix*>(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];