rodecomp/Source/Render/Primitives/RenderPrimitivePool.cpp
ragnarok-clanker 7a52c9a911 Decompile fn_01811 (RenderPrimitivePool::Acquire)
Batch #16159 by youko: 0 byte-identical, 1 confirmed by peer review.

- fn_01811 RenderPrimitivePool::Acquire: logic confirmed by peer review

Peer-reviewed-by: Yommy, kyoshi
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-10 15:35:30 +00:00

23 lines
561 B
C++

#include "Render/Primitives/RenderPrimitivePool.h"
#include <new>
// OFFSET: 0x00561A50
// FUNCTION: fn_02167
RenderPrimitivePool::~RenderPrimitivePool() = default;
// OFFSET: 0x00543EC0
// FUNCTION: fn_01811
RenderPrimitive* RenderPrimitivePool::Acquire() {
if (this->m_current == this->m_commands.end()) {
this->m_commands.emplace_back();
this->m_current = this->m_commands.end();
return &this->m_commands.back();
}
RenderPrimitive* command = &*this->m_current;
++this->m_current;
new (command) RenderPrimitive;
return command;
}