mirror of
https://github.com/korenkonder/ReDIVA.git
synced 2026-10-10 16:18:35 +03:00
Temp commit. Auth3D Object HRC breakdown
This commit is contained in:
@@ -20,6 +20,7 @@ namespace Glitter {
|
||||
color = { 0xFF, 0xFF, 0xFF, 0xFF };
|
||||
name_hash = GLT_VAL != Glitter::FT
|
||||
? hash_murmurhash_empty : hash_fnv1a64m_empty;
|
||||
ext_anim_is_x = GLT_VAL == Glitter::X;
|
||||
}
|
||||
|
||||
Effect::Effect(GLT) : data(GLT_VAL) {
|
||||
@@ -29,5 +30,38 @@ namespace Glitter {
|
||||
Effect::~Effect() {
|
||||
for (Emitter*& i : emitters)
|
||||
delete i;
|
||||
|
||||
if (data.ext_anim)
|
||||
free(data.ext_anim);
|
||||
}
|
||||
|
||||
Effect& Effect::operator=(const Effect& eff) {
|
||||
if (data.ext_anim)
|
||||
free(data.ext_anim);
|
||||
|
||||
data = eff.data;
|
||||
version = eff.version;
|
||||
|
||||
if (eff.data.ext_anim)
|
||||
if (!data.ext_anim_is_x) {
|
||||
data.ext_anim = force_malloc_s(Effect::ExtAnim, 1);
|
||||
*data.ext_anim = *eff.data.ext_anim;
|
||||
}
|
||||
else {
|
||||
data.ext_anim_x = force_malloc_s(Effect::ExtAnimX, 1);
|
||||
*data.ext_anim_x = *eff.data.ext_anim_x;
|
||||
}
|
||||
|
||||
for (Emitter*& i : emitters)
|
||||
delete i;
|
||||
emitters.clear();
|
||||
|
||||
emitters.reserve(eff.emitters.size());
|
||||
for (Emitter* i : eff.emitters) {
|
||||
Emitter* emit = new Emitter(i->version > 0x02 ? Glitter::X : Glitter::F2);
|
||||
*emit = *i;
|
||||
emitters.push_back(emit);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user