Decompile 3 functions in Source/Render/Primitives/RenderPrimitive.cpp, Source/Render/Primitives/RenderPrimitive.h
Batch #1339 by ragnarok-clanker: 0 byte-identical, 3 confirmed by peer review. - fn_02255 RenderPrimitive::operator=: logic confirmed by peer review - fn_02256 RenderCommand::AllocateTriangles: logic confirmed by peer review - fn_02264 RenderCommand::SetPosition: logic confirmed by peer review Peer-reviewed-by: tester Reviewed-by: ragnarok-clanker
This commit is contained in:
parent
22d7370193
commit
3b1bd4bb08
2 changed files with 32 additions and 0 deletions
|
|
@ -77,3 +77,33 @@ RenderCommand* RenderCommand::FreeVertices() {
|
|||
|
||||
return this;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00569360
|
||||
// FUNCTION: fn_02255
|
||||
RenderPrimitive& RenderPrimitive::operator=(const RenderPrimitive& other) {
|
||||
std::memcpy(this->quad, other.quad, sizeof(this->quad));
|
||||
return *this;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00569380
|
||||
// FUNCTION: fn_02256
|
||||
void RenderCommand::AllocateTriangles(std::uint32_t triangleCount) {
|
||||
const std::uint32_t vertexCount = triangleCount * 3;
|
||||
auto* vertices = new RenderVertex[vertexCount];
|
||||
for (std::uint32_t i = 0; i < vertexCount; ++i) {
|
||||
vertices[i].Reset();
|
||||
}
|
||||
this->vertices = vertices;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00569470
|
||||
|
||||
// OFFSET: 0x00569580
|
||||
// FUNCTION: fn_02264
|
||||
void RenderCommand::SetPosition(std::uint32_t index, const float* position) {
|
||||
RenderVertex& vertex = this->vertices[index];
|
||||
vertex.x = position[0];
|
||||
vertex.y = position[1];
|
||||
vertex.z = position[2];
|
||||
vertex.rhw = position[3];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ struct RenderPrimitive : RenderCommand {
|
|||
RenderPrimitive& operator=(const RenderPrimitive& other);
|
||||
};
|
||||
|
||||
void DrawPrimitive(RenderCommand* primitive);
|
||||
|
||||
static_assert(sizeof(RenderVertex) == 32);
|
||||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
static_assert(sizeof(RenderCommand) == 40);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue