Decompile fn_02254 (LightmappedBuffer::Clear)
Batch #1389 by ragnarok-clanker: 0 byte-identical, 1 confirmed by peer review. - fn_02254 LightmappedBuffer::Clear: logic confirmed by peer review Reviewed-by: ragnarok-clanker
This commit is contained in:
parent
2830117a5d
commit
545678314f
1 changed files with 21 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include "Render/Primitives/DepthAlpha.h"
|
||||
#include "Render/Primitives/LightmappedPrimitive.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <windows.h>
|
||||
#include <d3d9types.h>
|
||||
|
|
@ -12,6 +13,26 @@ LightmappedCommand::LightmappedCommand()
|
|||
: vertices(nullptr), vertexCount(0), indices(nullptr), indexCount(0), texture(nullptr), lightmap(nullptr), primitiveType(D3DPT_TRIANGLESTRIP) {
|
||||
}
|
||||
|
||||
struct LightmappedBuffer {
|
||||
void* vertices;
|
||||
int count;
|
||||
void* indices;
|
||||
void Clear();
|
||||
};
|
||||
|
||||
// OFFSET: 0x00569310
|
||||
// FUNCTION: fn_02254
|
||||
void LightmappedBuffer::Clear() {
|
||||
if (this->vertices) {
|
||||
std::free(this->vertices);
|
||||
this->vertices = nullptr;
|
||||
}
|
||||
if (this->indices) {
|
||||
std::free(this->indices);
|
||||
this->indices = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00569020
|
||||
// FUNCTION: fn_02246
|
||||
LightmappedPrimitive::LightmappedPrimitive() : vertices(this->quad), vertexCount(4), indices(nullptr), indexCount(0), primitiveType(D3DPT_TRIANGLESTRIP) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue