-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparticledef.h
53 lines (48 loc) · 1.25 KB
/
particledef.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
* object code is restricted to non-commercial enhancements to products from
* Valve LLC. All other use, distribution, or modification is prohibited
* without written permission from Valve LLC.
*
****/
#pragma once
typedef enum
{
pt_static,
pt_grav,
pt_slowgrav,
pt_fire,
pt_explode,
pt_explode2,
pt_blob,
pt_blob2,
pt_vox_slowgrav,
pt_vox_grav,
pt_clientcustom // Must have callback function specified
} ptype_t;
// !!! if this is changed, it must be changed in d_ifacea.h too !!!
typedef struct particle_s
{
// driver-usable fields
Vector org;
short color;
short packedColor;
// drivers never touch the following fields
struct particle_s* next;
Vector vel;
float ramp;
float die;
ptype_t type;
void (*deathfunc)(struct particle_s* particle);
// for pt_clientcusttom, we'll call this function each frame
void (*callback)(struct particle_s* particle, float frametime);
// For deathfunc, etc.
unsigned char context;
} particle_t;