-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathxEntBoulder.h
More file actions
90 lines (83 loc) · 2.02 KB
/
Copy pathxEntBoulder.h
File metadata and controls
90 lines (83 loc) · 2.02 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#ifndef XENTBOULDER_H
#define XENTBOULDER_H
#include "xEnt.h"
#include "xDynAsset.h"
#include "xShadowSimple.h"
struct xEntBoulderAsset
{
F32 gravity;
F32 mass;
F32 bounce;
F32 friction;
F32 statFric;
F32 maxVel;
F32 maxAngVel;
F32 stickiness;
F32 bounceDamp;
U32 flags;
F32 killtimer;
U32 hitpoints;
U32 soundID;
F32 volume;
F32 minSoundVel;
F32 maxSoundVel;
F32 innerRadius;
F32 outerRadius;
};
struct xEntBoulder : xEnt
{
xEntBoulderAsset* basset;
xShadowSimpleCache simpShadow_embedded;
xEntShadow entShadow_embedded;
xVec3 localCenter;
xVec3 vel;
xVec3 rotVec;
xVec3 force;
xVec3 instForce;
F32 angVel;
F32 timeToLive;
S32 hitpoints;
F32 lastRolling;
U32 rollingID;
U8 collis_chk;
U8 collis_pen;
U8 pad1[2];
};
struct xBoulderGeneratorAsset : xDynAsset
{
U32 object;
xVec3 offset;
F32 offsetRand;
xVec3 initvel;
F32 velAngleRand;
F32 velMagRand;
xVec3 initaxis;
F32 angvel;
};
struct xBoulderGenerator : xBase
{
xBoulderGeneratorAsset* bgasset;
S32 numBoulders;
S32 nextBoulder;
xEntBoulder** boulderList;
S32* boulderAges;
U32 isMarker;
void* objectPtr;
F32 lengthOfInitVel;
xVec3 perp1;
xVec3 perp2;
};
void xEntBoulder_Init(void* ent, void* asset);
void xEntBoulder_Init(xEntBoulder* ent, xEntAsset* asset);
void xEntBoulder_BubbleBowl(F32 multiplier);
void xEntBoulder_Setup(xEntBoulder* ent);
void xEntBoulder_Reset(xEntBoulder* ent, xScene* scene);
void xEntBoulder_RealBUpdate(xEnt* ent, xVec3* pos);
void xEntBoulder_Kill(xEntBoulder* ent);
void xBoulderGenerator_Init(xBase& data, xDynAsset& asset, size_t);
void xBoulderGenerator_Init(xBoulderGenerator* bg, xBoulderGeneratorAsset* asset);
void xBoulderGenerator_Init(xBase& data, xDynAsset& asset);
S32 xEntBoulderEventCB(xBase*, xBase*, U32, const F32*, xBase*);
void xEntBoulder_ApplyForces(xEntCollis* collis);
void xEntBoulder_AddForce(xEntBoulder* boulder, xVec3* force);
#endif