53 lines
2.4 KiB
C
53 lines
2.4 KiB
C
#ifndef GLOBALS_H__
|
|||
|
|
#define GLOBALS_H__
|
||
|
|
|
||
|
|
#include "CG.h"
|
||
|
|
#include "ResourceManager.h"
|
||
|
|
#include "Types.h"
|
||
|
|
|
||
|
|
#ifndef SAFE_DELETE
|
||
|
|
#define SAFE_DELETE(p) { if (p) { delete (p); (p)=NULL; } }
|
||
|
|
#endif
|
||
|
|
#ifndef SAFE_DELETE_ARRAY
|
||
|
|
#define SAFE_DELETE_ARRAY(p) { if (p) { delete[] (p); (p)=NULL; } }
|
||
|
|
#endif
|
||
|
|
#ifndef SAFE_RELEASE
|
||
|
|
#define SAFE_RELEASE(p) { if (p) { for(int lll=0; lll<100;lll++)(p)->Release(); (p)=NULL; } }
|
||
|
|
#endif
|
||
|
|
|
||
|
|
enum ParticleBlendType
|
||
|
|
{
|
||
|
|
ParticleBlendType_AlphaBased,
|
||
|
|
ParticleBlendType_ColorBased,
|
||
|
|
ParticleBlendType_Additive,
|
||
|
|
ParticleBlendType_None
|
||
|
|
};
|
||
|
|
|
||
|
|
enum EParticleFlags
|
||
|
|
{
|
||
|
|
PART_FLAG_BILLBOARD = 0, // Usual particle
|
||
|
|
PART_FLAG_HORIZONTAL = 1, // Flat horisontal rounds on the water
|
||
|
|
PART_FLAG_UNDERWATER = 2, // Particle will be removed if go out from outdoor water
|
||
|
|
PART_FLAG_LINEPARTICLE = 4, // Draw billboarded line from vPosition to vPosition+vDirection
|
||
|
|
PART_FLAG_SWAP_XY = 8, // Alternative order of rotation (zxy)
|
||
|
|
PART_FLAG_SIZE_LINEAR = 16, // Change size liner with time
|
||
|
|
PART_FLAG_NO_OFFSET = 32, // Disable centering of static objects
|
||
|
|
PART_FLAG_DRAW_NEAR = 64, // Render particle in near space (weapon)
|
||
|
|
PART_FLAG_FOCUS_PLANE = 128, // Focus will spread partices along normal plane instead of direction axis.
|
||
|
|
PART_FLAG_NO_DRAW_UNDERWATER = 256, // Particle will be not visible when it position is under water
|
||
|
|
PART_FLAG_RIGIDBODY = 512, // If bRealPhysics set to true, physicalizing particles as rigid bodies
|
||
|
|
PART_FLAG_SPACELOOP = 1024, // Lock paticles in box around emitter position, use ParticleParams::vSpaceLoopBoxSize to set box size
|
||
|
|
PART_FLAG_SPACELIMIT = 2048, // Limit paticles by box around emitter position, use ParticleParams::vSpaceLoopBoxSize to set box size
|
||
|
|
PART_FLAG_SPEED_IN_GRAVITY_DIRECTION = 4096, // Ignores normal passed to particle effect and always uses gravity direction for initial speed direction.
|
||
|
|
PART_FLAG_BIND_POSITION_TO_EMITTER = 0x2000, // Always keep particle position binded to position of the emitter (for rockets etc...)
|
||
|
|
PART_FLAG_BIND_EMITTER_TO_CAMERA = 0x4000, // Attach emitter to camera pos
|
||
|
|
PART_FLAG_NO_INDOOR = 0x8000, // Kill particle if it enters indoor
|
||
|
|
};
|
||
|
|
|
||
|
|
enum QUALITY
|
||
|
|
{
|
||
|
|
Q_HIGH = 0,
|
||
|
|
Q_MED = 1,
|
||
|
|
Q_LOW = 2
|
||
|
|
};
|
||
|
|
#endif
|