PARE

From Battlepedia
Jump to navigationJump to search
PARE
Particle Emitter
Type Object
Object ID 0x26
Games used Night of 100 Frights
Battle for Bikini Bottom
The SpongeBob SquarePants Movie
Rise of the Underminer

Format

A Particle Emitter asset is defined by a xParEmitterAsset struct, which inherits xBaseAsset (Object Asset):

struct xParEmitterAsset : xBaseAsset
{
	unsigned char emit_flags;
	unsigned char emit_type;
	unsigned short pad;
	unsigned int propID;
	union
	{
		xPECircle e_circle;
		_tagEmitSphere e_sphere;
		_tagEmitRect e_rect;
		_tagEmitLine e_line;
		_tagEmitVolume e_volume;
		_tagEmitOffsetPoint e_offsetp;
		xPEVCyl e_vcyl;
		xPEEntBone e_entbone;
		xPEEntBound e_entbound;
	};
	unsigned int attachToID;
	xVec3 pos;
	xVec3 vel;
	float vel_angle_variation;
	unsigned int cull_mode;
	float cull_dist_sqr;
};
  • emit_flags
    • 0x1 - On/Off?
  • emit_type
    • Point (0)
    • Circle Edge (1)
    • Circle (2)
    • Rect Edge (3)
    • Rect (4)
    • Line (5)
    • Volume (6)
    • Sphere Edge (7)
    • Sphere (8)
    • Offset Point (9)
    • Sphere Edge (10)
    • Sphere Edge (11)
    • VCyl Edge (12)
    • OCircle Edge (13)
    • OCircle (14)
    • Entity Bone (15)
    • Entity Bound (16)
  • propID is the ID of the Particle Emitter Property asset to use.
  • e_circle
  • e_sphere
  • e_rect
  • e_line
  • e_volume
  • e_offsetp
  • e_vcyl
  • e_entbone
  • e_entbound
  • attachToID is the ID of an Object Asset (when emit_type == Entity Bone/Entity Bound?) or Marker (when emit_type == Point?).
  • pos is the position of the particle emitter.
  • vel
  • vel_angle_variation
  • cull_mode
  • cull_dist_sqr

At the end of the xParEmitterAsset is a list of Links.

struct xPECircle
{
	float radius;
	float deflection;
	xVec3 dir;
};
  • radius
  • deflection
  • dir
struct _tagEmitSphere
{
	float radius;
};
  • radius
struct _tagEmitRect
{
	float x_len;
	float z_len;
};
  • x_len
  • z_len
struct _tagEmitLine
{
	xVec3 pos1;
	xVec3 pos2;
	float radius;
};
  • pos1
  • pos2
  • radius
struct _tagEmitVolume
{
	unsigned int emit_volumeID;
};
  • emit_volumeID
struct _tagEmitOffsetPoint
{
	xVec3 offset;
};
  • offset
struct xPEVCyl
{
	float height;
	float radius;
	float deflection;
};
  • height
  • radius
  • deflection
struct xPEEntBone
{
	unsigned char flags;
	unsigned char type;
	unsigned char bone;
	unsigned char pad1;
	xVec3 offset;
	float radius;
	float deflection;
};
  • flags
  • type
  • bone
  • offset
  • radius
  • deflection
struct xPEEntBound
{
	unsigned char flags;
	unsigned char type;
	unsigned char pad1;
	unsigned char pad2;
	float expand;
	float deflection;
};
  • flags
  • type
  • expand
  • deflection

Events

Emit

On

Off

Reset