105 static void *
operator new(
size_t nSize);
114 static void operator delete(
void *pBlock);
360 void UpdateParticles(
float flDeltaFrames);
368 void SpawnParticles(
float flDeltaFrames);
379 void RemoveObjectRefs();
392 void AddObjectRefs();
426 float mEmitAccumulator;
429 std::list<ParticleSys *> mSharers;
454 unsigned char mReserved168[0x08];
469 unsigned char mReserved1b4[0xc];
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Animatable()
Construct an animatable with no children, no filters, and a zero frame.
Sink that the engine formats its diagnostic and failure text into.
Definition dbg.h:33
Drawable()
Construct a visible drawable with no children.
Surface description a Rnd::Mesh draws with.
Definition mat.h:36
Base of every object the renderer can load, resolve by name, and serialise.
Definition object.h:43
Emitter that spawns, integrates, and draws a population of particles.
Definition particlesys.h:60
float mEmitRateLow
Definition particlesys.h:444
Color mStartColorLow
Definition particlesys.h:459
Particle * AllocParticle()
Take one particle from the pool of the owner and push it onto the live list.
void SetMat(Mat *pMat)
Point the system at a material, moving its reference registration from the old one.
float mSizeHigh
Definition particlesys.h:451
std::vector< Particle > mParticles
Definition particlesys.h:410
virtual void Load(Stream &stream)
Load the system.
void SetForce(const Vector3 &force)
Replace the force every particle accelerates by.
Definition particlesys.h:307
virtual void Copy(const Object *pSource, unsigned nFlags)
Copy another system over this one.
Color mEndColorLow
Definition particlesys.h:463
ParticleSys(const HxStr &name)
Construct an empty system that owns its own particles.
virtual void Save(Stream &stream)
Serialise the system.
Particle * GetLiveParticles() const
Report the head of the live list.
Definition particlesys.h:294
int mLineLength
Definition particlesys.h:492
Particle * mLiveParticles
Definition particlesys.h:415
Type mMode
Definition particlesys.h:480
Type
Primitive a system draws each particle as.
Definition particlesys.h:70
@ kModeSprite
Definition particlesys.h:73
@ kModePoint
Definition particlesys.h:71
@ kModeLine
Definition particlesys.h:72
Color mStartColorHigh
Definition particlesys.h:461
Vector3 & GetForce()
Report the force every particle accelerates by.
Definition particlesys.h:320
void SetNumParticles(int nCount)
Resize the particle owner's pool, the count the dump labels "numParticles:".
void RandomizeColorAndSize(Particle *pParticle)
Draw a random spawn colour and size for one particle.
void SetParticlesOwner(ParticleSys *pOwner)
Draw the particles of another system, or of this one.
virtual void Replace(Object *pFrom, Object *pTo)
Replace one object reference with another.
float mEmitRateHigh
Definition particlesys.h:446
Mat * mMat
Definition particlesys.h:477
virtual void StartAnim()
Restart the emission and release every live particle.
void FreeAllParticles()
Release every live particle back to the pool of its owner.
virtual const HxStr & ClassName() const
Return the registered class name, "ParticleSys".
int mReadZ
Definition particlesys.h:488
Color mEndColorHigh
Definition particlesys.h:465
virtual void DumpText(Dbg &sink)
Write the system to the engine text sink.
float mSizeLow
Definition particlesys.h:449
virtual void SetFrameSelf(float flFrame)
Advance the emission to a frame.
static constexpr unsigned kCopyShareParticles
Copy() flag that shares the source's particles rather than copying its pool.
Definition particlesys.h:77
Particle * FreeParticle(Particle *pParticle)
Unlink one live particle and push it onto the free list of the owner.
ParticleSys * mParticlesOwner
Definition particlesys.h:402
Byte stream that every renderer object serialises itself through.
Definition stream.h:31
The rendering engine.
Definition animhelper.h:3
ParticleSys * NewParticleSysThroughHook(const HxStr &name)
Build a system through the creator hook, the same shape as Rnd::NewButtonThroughHook().
void RegisterParticleSysClass()
Point g_pfnNewParticleSys at NewParticleSys() and register the "ParticleSys" class.
Definition particlesys.h:564
ParticleSys *(* g_pfnNewParticleSys)(const HxStr &name)
Creator the registered "ParticleSys" class builds through.
Manager TheManager
The renderer's object registry.
ParticleSys * NewParticleSys(const HxStr &name)
Allocate and construct a particle system.
HxStr g_particleSysClassName
Registered class name of Rnd::ParticleSys, the string "ParticleSys".
Object * CreateRegisteredParticleSys(const HxStr &name)
Build a system for the registered "ParticleSys" class.
Linear colour with four float components.
Definition color.h:10
Plane equation, padded to a PlayStation 2 quadword.
Definition plane.h:14
One live particle of a Rnd::ParticleSys.
Definition particle.h:33
Two-component vector, used for texture coordinates.
Definition vector2.h:10
Three-component vector, padded to a PlayStation 2 quadword.
Definition vector3.h:12