Decompile fn_19762 (EffectPrimitiveSlot::EffectPrimitiveSlot)
Batch #1273 by ragnarok-clanker: 1 byte-identical, 0 confirmed by peer review. - fn_19762 EffectPrimitiveSlot::EffectPrimitiveSlot: byte-identical Merged automatically: every function is byte-identical to the original.
This commit is contained in:
parent
d30c7a352d
commit
4342eec591
2 changed files with 43 additions and 17 deletions
|
|
@ -1,11 +1,20 @@
|
|||
#include "Contents/Effects/EffectPrimitiveState.h"
|
||||
#include "Contents/Effects/RagEffectState.h"
|
||||
#include "Contents/Actors/RenderObjectState.h"
|
||||
#include "Resource/Sprites/ActionResource.h"
|
||||
#include "Utility/Math/AffineMatrix.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
// OFFSET: 0x00BAE170
|
||||
// FUNCTION: fn_19762
|
||||
EffectPrimitiveSlot::EffectPrimitiveSlot() {
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
this->unknown_0084[i] = {0.0f, 0.0f, 0.0f};
|
||||
}
|
||||
}
|
||||
|
||||
// INLINED
|
||||
EffectPrimitiveState::EffectPrimitiveState(RenderObjectState& render) {
|
||||
this->textures = nullptr;
|
||||
|
|
@ -152,6 +161,26 @@ EffectPrimitiveState::~EffectPrimitiveState() {
|
|||
std::free(this->textures);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00BAE3A0
|
||||
|
||||
// OFFSET: 0x00BAE460
|
||||
// FUNCTION: fn_19765
|
||||
void EffectPrimitiveState::GetColorOverride(unsigned char* red, unsigned char* green, unsigned char* blue) {
|
||||
if (this->parent->unknown_11C88[0] != -1) {
|
||||
*red = static_cast<unsigned char>(this->parent->unknown_11C88[0]);
|
||||
}
|
||||
|
||||
if (this->parent->unknown_11C88[1] != -1) {
|
||||
*green = static_cast<unsigned char>(this->parent->unknown_11C88[1]);
|
||||
}
|
||||
|
||||
if (this->parent->unknown_11C88[2] != -1) {
|
||||
*blue = static_cast<unsigned char>(this->parent->unknown_11C88[2]);
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00BAE4B0
|
||||
|
||||
// OFFSET: 0x00BAE5D0
|
||||
// FUNCTION: fn_19767
|
||||
void EffectPrimitiveState::Initialize(
|
||||
|
|
@ -169,19 +198,3 @@ void EffectPrimitiveState::Initialize(
|
|||
render.position[2] = this->origin.z;
|
||||
this->unknown_013C = 0;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00BAE460
|
||||
// FUNCTION: fn_19765
|
||||
void EffectPrimitiveState::GetColorOverride(unsigned char* red, unsigned char* green, unsigned char* blue) {
|
||||
if (this->parent->unknown_11C88[0] != -1) {
|
||||
*red = static_cast<unsigned char>(this->parent->unknown_11C88[0]);
|
||||
}
|
||||
|
||||
if (this->parent->unknown_11C88[1] != -1) {
|
||||
*green = static_cast<unsigned char>(this->parent->unknown_11C88[1]);
|
||||
}
|
||||
|
||||
if (this->parent->unknown_11C88[2] != -1) {
|
||||
*blue = static_cast<unsigned char>(this->parent->unknown_11C88[2]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
struct RenderObjectState;
|
||||
#include "Contents/Actors/RenderObjectState.h"
|
||||
struct RagEffectState;
|
||||
class CTexture;
|
||||
|
||||
|
|
@ -32,6 +32,7 @@ struct EffectPrimitiveRecord {
|
|||
};
|
||||
|
||||
struct EffectPrimitiveSlot {
|
||||
EffectPrimitiveSlot();
|
||||
/* 0000 */ unsigned char active;
|
||||
/* 0001 */ unsigned char unknown_0001;
|
||||
/* 0002 */ std::int16_t unknown_0002;
|
||||
|
|
@ -164,6 +165,18 @@ struct EffectPrimitiveState {
|
|||
/* FA14 */ std::uint32_t unknown_FA14;
|
||||
};
|
||||
|
||||
class CActRes;
|
||||
|
||||
struct EffectPrimitiveObject {
|
||||
/* 0000 */ RenderObjectState render;
|
||||
/* 0138 */ EffectPrimitiveState state;
|
||||
|
||||
CActRes* ActionResource();
|
||||
bool AdvanceFrame();
|
||||
};
|
||||
|
||||
void CalculateVectorAngle(float x, float y, std::int16_t* angle);
|
||||
|
||||
static_assert(sizeof(EffectVector3) == 12);
|
||||
static_assert(sizeof(EffectPrimitiveRecord) == 140);
|
||||
static_assert(sizeof(EffectPrimitiveSlot) == 0xB4);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue