Decompile fn_02251 (RenderVertex::Reset)
Batch #4 by ragnarok-clanker: 1 byte-identical, 0 confirmed by peer review. - fn_02251 RenderVertex::Reset: byte-identical Merged automatically: every function is byte-identical to the original.
This commit is contained in:
parent
d456e8f64a
commit
57a754c75b
2 changed files with 28 additions and 0 deletions
|
|
@ -1,6 +1,24 @@
|
|||
#include "Render/RenderPrimitive.h"
|
||||
#include "Render/Renderer.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <new>
|
||||
|
||||
// GLOBAL: gl_24481
|
||||
CRenderer* g_renderer;
|
||||
|
||||
// FUNCTION: fn_02251
|
||||
RenderVertex* RenderVertex::Reset() {
|
||||
this->x = 0;
|
||||
this->y = 0;
|
||||
this->z = 0;
|
||||
this->rhw = 0;
|
||||
this->diffuse = 0;
|
||||
this->specular = 0xFF000000;
|
||||
this->u = 0;
|
||||
this->v = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00569560
|
||||
// FUNCTION: fn_02263
|
||||
|
|
@ -47,6 +65,7 @@ RenderPrimitive::RenderPrimitive(const RenderPrimitive& other) : RenderPrimitive
|
|||
std::memcpy(this->quad, other.quad, sizeof(this->quad));
|
||||
}
|
||||
|
||||
|
||||
// OFFSET: 0x005692F0
|
||||
// FUNCTION: fn_02253
|
||||
RenderCommand* RenderCommand::FreeVertices() {
|
||||
|
|
@ -56,3 +75,6 @@ RenderCommand* RenderCommand::FreeVertices() {
|
|||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ struct RenderVertex {
|
|||
std::uint32_t specular;
|
||||
float u;
|
||||
float v;
|
||||
|
||||
RenderVertex* Reset();
|
||||
};
|
||||
|
||||
struct RenderTriangle {
|
||||
|
|
@ -43,6 +45,9 @@ struct RenderCommand {
|
|||
|
||||
RenderCommand();
|
||||
RenderCommand* FreeVertices();
|
||||
void AllocateTriangles(std::uint32_t triangleCount);
|
||||
void SetPosition(std::uint32_t index, const float* position);
|
||||
void Draw(int unused);
|
||||
};
|
||||
|
||||
// Quad command acquired from renderer's reusable pool.
|
||||
|
|
@ -51,6 +56,7 @@ struct RenderPrimitive : RenderCommand {
|
|||
|
||||
RenderPrimitive();
|
||||
RenderPrimitive(const RenderPrimitive& other);
|
||||
RenderPrimitive& operator=(const RenderPrimitive& other);
|
||||
};
|
||||
|
||||
static_assert(sizeof(RenderVertex) == 32);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue