rodecomp/Source/Contents/Effects/EffectPrimitiveRecords.cpp
ragnarok-clanker e4be8f4190 Decompile 18 functions in Source/Client/Application/UnhandledExceptionHandler.cpp, Source/Client/Session.h, ...
Batch #2077 by ragnarok-clanker: 0 byte-identical, 18 confirmed by peer review.

- fn_04709 TopLevelExceptionFilter: logic confirmed by peer review (already on main)
- fn_08004 C3dGrannyModelRes::PlayAnimation: logic confirmed by peer review
- fn_09315 UIRequestJoinPartyWnd::SendMsg: logic confirmed by peer review
- fn_19761 EffectParticle::EffectParticle: logic confirmed by peer review
- fn_19768 EffectParticle::InitializeRecords: logic confirmed by peer review
- fn_20007 AttachedEffect::AttachedEffect: logic confirmed by peer review
- fn_20076 CreateEffectParticle: logic confirmed by peer review
- fn_20088 UpdatePartyEffect: logic confirmed by peer review
- fn_20991 CRenderObject::CRenderObject: logic confirmed by peer review
- fn_21069 ?CreatePartyEffect@?A0xba063134@@YAPAUAttachedEffect@@AAUEffectActor@@AAUPartyEffectMode@@@Z: logic confirmed by peer review
- fn_21086 RenderObjectState::Reset: logic confirmed by peer review
- fn_23396 CSession::GetJobName: logic confirmed by peer review
- fn_23495 CSession::InitJobNameTable: logic confirmed by peer review
- fn_23788 CSession::GetMonsterActName: logic confirmed by peer review
- fn_23791 CSession::GetMonsterTalkText: logic confirmed by peer review
- fn_20987 EffectActor::EffectActor: logic confirmed by peer review
- fn_22363 CSoundMaker::CSoundMaker: logic confirmed by peer review
- fn_24251 CEffectMaker::CEffectMaker: logic confirmed by peer review

Reviewed-by: ragnarok-clanker
2026-10-29 09:48:08 +00:00

30 lines
1.2 KiB
C++

#include "Contents/Effects/EffectParticle.h"
#include "Contents/Effects/EffectPrimitiveState.h"
#include "Contents/Actors/RenderObjectState.h"
#include "Utility/Math/ScalarConversion.h"
#include <cstring>
// OFFSET: 0x00BAE670
// FUNCTION: fn_19768
void EffectParticle::InitializeRecords() {
for (int index = 0; index < this->state.unknown_01F4; ++index) {
EffectPrimitiveRecord& record = this->state.records[index];
record.position = this->render.position;
std::memcpy(record.corners, this->state.corners, sizeof(record.corners));
record.unknown_003C = this->state.unknown_0348;
record.scale = this->state.scale;
record.angle = this->state.unknown_030C;
std::memcpy(record.matrix, this->state.matrix1, sizeof(record.matrix));
record.alpha = this->state.alpha;
record.red = this->state.red;
record.green = this->state.green;
record.blue = this->state.blue;
const int alpha = TruncateToInt(this->state.alpha);
record.color = static_cast<unsigned char>(this->state.blue) +
((static_cast<unsigned char>(this->state.green) +
((static_cast<unsigned char>(this->state.red) + (static_cast<std::uint32_t>(alpha) << 8)) << 8))
<< 8);
}
}