2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 04:27:42 +00:00

Move CParticleGlobals from the executable and onto the heap, minor fixes, update wiki link

This commit is contained in:
2019-12-03 00:47:05 -08:00
parent 697a100bca
commit 34e78a2dd0
29 changed files with 162 additions and 161 deletions

View File

@@ -5,7 +5,7 @@
#include "zeus/Math.hpp"
#include "CGenDescription.hpp"
/* Documentation at: http://www.metroid2002.com/retromodding/wiki/Particle_Script#Color_Elements */
/* Documentation at: https://wiki.axiodl.com/w/Particle_Script#Color_Elements */
namespace urde {
@@ -25,7 +25,7 @@ CCEKeyframeEmitter::CCEKeyframeEmitter(CInputStream& in) {
bool CCEKeyframeEmitter::GetValue(int frame, zeus::CColor& valOut) const {
if (!x4_percent) {
int emitterTime = CParticleGlobals::g_EmitterTime;
int emitterTime = CParticleGlobals::instance()->m_EmitterTime;
int calcKey = emitterTime;
if (xc_loop) {
if (emitterTime >= x10_loopEnd) {
@@ -41,8 +41,8 @@ bool CCEKeyframeEmitter::GetValue(int frame, zeus::CColor& valOut) const {
}
valOut = x18_keys[calcKey];
} else {
int ltPerc = CParticleGlobals::g_ParticleLifetimePercentage;
float ltPercRem = CParticleGlobals::g_ParticleLifetimePercentageRemainder;
int ltPerc = CParticleGlobals::instance()->m_ParticleLifetimePercentage;
float ltPercRem = CParticleGlobals::instance()->m_ParticleLifetimePercentageRemainder;
if (ltPerc == 100)
valOut = x18_keys[100];
else