Decompile 3 functions in Source/Render/Primitives/LightmappedPrimitive.cpp, Source/Render/Primitives/LightmappedPrimitive.h
Batch #1571 by eAthena: 0 byte-identical, 3 confirmed by peer review. - fn_02247 ModelRenderCommand::ModelRenderCommand: logic confirmed by peer review - fn_02258 LightmappedPrimitive::DrawLightmapped: logic confirmed by peer review - fn_02259 LightmappedPrimitive::DrawAuxiliary: logic confirmed by peer review Reviewed-by: ragnarok-clanker
This commit is contained in:
parent
7dc26e0b3f
commit
51202904b1
2 changed files with 39 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#include "Render/Primitives/DepthAlpha.h"
|
||||
#include "Render/Primitives/LightmappedPrimitive.h"
|
||||
#include "Render/Renderer.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
|
@ -13,6 +14,13 @@ LightmappedCommand::LightmappedCommand()
|
|||
: vertices(nullptr), vertexCount(0), indices(nullptr), indexCount(0), texture(nullptr), lightmap(nullptr), primitiveType(D3DPT_TRIANGLESTRIP) {
|
||||
}
|
||||
|
||||
// OFFSET: 0x00569090
|
||||
// FUNCTION: fn_02247
|
||||
ModelRenderCommand::ModelRenderCommand()
|
||||
: vertices(nullptr), vertexCount(0), texture(nullptr), indices(nullptr), indexCount(0), unknown_0014(1), unknown_0018(0), unknown_001C(0), unknown_0020(0),
|
||||
primitiveType(D3DPT_TRIANGLELIST) {
|
||||
}
|
||||
|
||||
struct LightmappedBuffer {
|
||||
void* vertices;
|
||||
int count;
|
||||
|
|
@ -54,6 +62,18 @@ LightmappedPrimitive::LightmappedPrimitive(const LightmappedPrimitive& other) :
|
|||
std::memcpy(this->quad, other.quad, sizeof(this->quad));
|
||||
}
|
||||
|
||||
// OFFSET: 0x00569480
|
||||
// FUNCTION: fn_02258
|
||||
void LightmappedPrimitive::DrawLightmapped(int unused) {
|
||||
g_renderer->DrawLightmappedPrimitive(this);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00569490
|
||||
// FUNCTION: fn_02259
|
||||
void LightmappedPrimitive::DrawAuxiliary(int unused) {
|
||||
g_renderer->DrawAuxiliaryPrimitive(this);
|
||||
}
|
||||
|
||||
// INLINED
|
||||
LightmappedPrimitivePool::LightmappedPrimitivePool() {
|
||||
this->m_commands.resize(8192, LightmappedPrimitive());
|
||||
|
|
|
|||
|
|
@ -32,9 +32,27 @@ struct LightmappedCommand {
|
|||
/* 0018 */ std::uint32_t primitiveType;
|
||||
};
|
||||
|
||||
struct ModelRenderCommand {
|
||||
ModelRenderCommand();
|
||||
|
||||
/* 0000 */ void* vertices;
|
||||
/* 0004 */ std::int32_t vertexCount;
|
||||
/* 0008 */ CTexture* texture;
|
||||
/* 000C */ std::uint16_t* indices;
|
||||
/* 0010 */ std::uint32_t indexCount;
|
||||
/* 0014 */ std::uint16_t unknown_0014;
|
||||
/* 0016 */ std::uint16_t unknown_0016;
|
||||
/* 0018 */ std::uint32_t unknown_0018;
|
||||
/* 001C */ std::uint32_t unknown_001C;
|
||||
/* 0020 */ std::uint32_t unknown_0020;
|
||||
/* 0024 */ std::uint32_t primitiveType;
|
||||
};
|
||||
|
||||
struct LightmappedPrimitive {
|
||||
LightmappedPrimitive();
|
||||
LightmappedPrimitive(const LightmappedPrimitive& other);
|
||||
void DrawAuxiliary(int unused);
|
||||
void DrawLightmapped(int unused);
|
||||
|
||||
/* 0000 */ LightmappedVertex* vertices;
|
||||
/* 0004 */ std::int32_t vertexCount;
|
||||
|
|
@ -68,6 +86,7 @@ static_assert(sizeof(LightmappedVertex) == 40);
|
|||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
static_assert(sizeof(LightmappedPrimitive) == 188);
|
||||
static_assert(sizeof(LightmappedCommand) == 28);
|
||||
static_assert(sizeof(ModelRenderCommand) == 40);
|
||||
static_assert(sizeof(LightmappedPrimitivePool) == 0x20);
|
||||
static_assert(sizeof(LightmappedQueues) == 0x18);
|
||||
static_assert(offsetof(LightmappedVertex, lightU) == 0x0020);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue