Batch #1949 by ragnarok-clanker: 1 byte-identical, 3 confirmed by peer review. - fn_21086 RenderObjectState::Reset: logic confirmed by peer review - fn_19865 DrawEffectPrimitive15: logic confirmed by peer review - fn_19762 EffectPrimitiveSlot::EffectPrimitiveSlot: byte-identical (already on main) - fn_20088 UpdatePartyEffect: logic confirmed by peer review Peer-reviewed-by: Yommy Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
27 lines
1.1 KiB
C++
27 lines
1.1 KiB
C++
#include "Contents/Effects/EffectPrimitiveState.h"
|
|
#include "Contents/Actors/RenderObjectState.h"
|
|
|
|
#include "Utility/Math/ScalarConversion.h"
|
|
#include <cstring>
|
|
|
|
// OFFSET: 0x00BAE670
|
|
// FUNCTION: fn_19768
|
|
void EffectPrimitiveState::InitializeRecords(const RenderObjectState& render) {
|
|
for (int index = 0; index < this->unknown_01F4; ++index) {
|
|
EffectPrimitiveRecord& record = this->records[index];
|
|
record.position = {render.position.x, render.position.y, render.position.z};
|
|
std::memcpy(record.corners, this->corners, sizeof(record.corners));
|
|
record.unknown_003C = this->unknown_0348;
|
|
record.scale = this->scale;
|
|
record.angle = this->unknown_030C;
|
|
std::memcpy(record.matrix, this->matrix1, sizeof(record.matrix));
|
|
record.alpha = this->alpha;
|
|
record.red = this->red;
|
|
record.green = this->green;
|
|
record.blue = this->blue;
|
|
|
|
const int alpha = TruncateToInt(this->alpha);
|
|
record.color = static_cast<unsigned char>(this->blue) +
|
|
((static_cast<unsigned char>(this->green) + ((static_cast<unsigned char>(this->red) + (static_cast<std::uint32_t>(alpha) << 8)) << 8)) << 8);
|
|
}
|
|
}
|