Subversion Repositories Games.Carmageddon

Rev

Rev 18 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 pmbaty 1
#ifndef _SPARK_H_
2
#define _SPARK_H_
3
 
20 pmbaty 4
#include "brender/br_types.h"
1 pmbaty 5
#include "dr_types.h"
6
 
7
extern int gNext_spark;
8
extern int gSpark_flags;
9
extern int gNext_shrapnel;
10
extern int gShrapnel_flags;
11
extern br_model* gShrapnel_model[2];
12
extern int gSmoke_flags;
13
extern int gSmoke_num;
14
extern int gOffset;
15
extern int gColumn_flags;
16
extern int gNext_column;
17
extern br_pixelmap* gBlack_smoke_shade_table;
18
extern br_pixelmap* gDark_smoke_shade_table;
19
extern br_pixelmap* gGrey_smoke_shade_table;
20
extern int gSmoke_on;
21
extern int gNum_splash_types;
22
extern int gIt_type;
23
extern br_pixelmap* gIt_shade_table;
24
extern br_pixelmap** gDust_table;
25
extern br_pixelmap* gFlame_map[20];
26
extern tBRender_smoke* gBR_smoke_pointers[30];
27
extern tSplash gSplash[32];
28
extern br_material* gSplash_material[20];
29
extern tBRender_smoke gBR_smoke_structs[30];
30
extern tSmoke_column gSmoke_column[25];
31
extern br_matrix4 gCameraToScreen;
32
extern tSpark gSparks[32];
33
extern br_pixelmap* gShade_list[16];
34
extern int gN_BR_smoke_structs;
35
extern tSmoke gSmoke[25];
36
extern tU32 gSplash_flags;
37
extern tU32 gNext_splash;
38
extern br_model* gLollipop_model;
39
extern int gNum_dust_tables;
40
extern br_model* gSplash_model;
41
extern int gDust_rotate;
42
extern br_camera* gSpark_cam;
43
extern br_material* gBlack_material;
44
extern tShrapnel gShrapnel[15];
45
 
46
void DrawDot(br_scalar z, tU8* scr_ptr, tU16* depth_ptr, tU8* shade_ptr);
47
 
48
void SetWorldToScreen(br_pixelmap* pScreen);
49
 
50
void DrawLine3DThroughBRender(br_vector3* pStart, br_vector3* pEnd);
51
 
52
int DrawLine3D(br_vector3* start, br_vector3* end, br_pixelmap* pScreen, br_pixelmap* pDepth_buffer, br_pixelmap* shade_table);
53
 
54
int DrawLine2D(br_vector3* o, br_vector3* p, br_pixelmap* pScreen, br_pixelmap* pDepth_buffer, br_scalar brightness, br_pixelmap* shade_table);
55
 
56
void SetLineModelCols(tU8 pCol);
57
 
58
void ReplaySparks(br_pixelmap* pRender_screen, br_pixelmap* pDepth_buffer, br_actor* pCamera, tU32 pTime);
59
 
60
void RenderSparks(br_pixelmap* pRender_screen, br_pixelmap* pDepth_buffer, br_actor* pCamera, br_matrix34* pCamera_to_world, tU32 pTime);
61
 
62
void CreateSingleSpark(tCar_spec* pCar, br_vector3* pPos, br_vector3* pVel);
63
 
64
void CreateSparks(br_vector3* pos, br_vector3* v, br_vector3* pForce, br_scalar sparkiness, tCar_spec* pCar);
65
 
66
void CreateSparkShower(br_vector3* pos, br_vector3* v, br_vector3* pForce, tCar_spec* pCar1, tCar_spec* pCar2);
67
 
68
void AdjustSpark(int pSpark_num, br_vector3* pos, br_vector3* length);
69
 
70
void AdjustShrapnel(int pShrapnel_num, br_vector3* pos, tU16 pAge, br_material* pMaterial);
71
 
72
void ResetSparks(void);
73
 
74
void ResetShrapnel(void);
75
 
76
void CreateShrapnelShower(br_vector3* pos, br_vector3* v, br_vector3* pNormal, br_scalar pForce, tCar_spec* c1, tCar_spec* c2);
77
 
78
void InitShrapnel(void);
79
 
80
void LoadInShrapnel(void);
81
 
82
void KillShrapnel(int i);
83
 
84
void DisposeShrapnel(void);
85
 
86
void ReplayShrapnel(tU32 pTime);
87
 
88
void MungeShrapnel(tU32 pTime);
89
 
90
void DrMatrix34Rotate(br_matrix34* mat, br_angle r, br_vector3* a);
91
 
92
void SmokeLine(int l, int x, br_scalar zbuff, int r_squared, tU8* scr_ptr, tU16* depth_ptr, tU8* shade_ptr, br_scalar r_multiplier, br_scalar z_multiplier, br_scalar shade_offset);
93
 
94
void SmokeCircle(br_vector3* o, br_scalar r, br_scalar extra_z, br_scalar strength, br_scalar pAspect, br_pixelmap* pRender_screen, br_pixelmap* pDepth_buffer, br_pixelmap* pShade_table);
95
 
96
int CmpSmokeZ(void* p1, void* p2);
97
 
98
void RenderRecordedSmokeCircles(void);
99
 
100
void RecordSmokeCircle(br_vector3* pCent, br_scalar pR, br_scalar pStrength, br_pixelmap* pShade, br_scalar pAspect);
101
 
102
void SmokeCircle3D(br_vector3* o, br_scalar r, br_scalar strength, br_scalar pAspect, br_pixelmap* pRender_screen, br_pixelmap* pDepth_buffer, br_pixelmap* pShade_table, br_actor* pCam);
103
 
104
void ReplaySmoke(br_pixelmap* pRender_screen, br_pixelmap* pDepth_buffer, br_actor* pCamera);
105
 
106
void GenerateContinuousSmoke(tCar_spec* pCar, int wheel, tU32 pTime);
107
 
108
void DustRotate(void);
109
 
110
void RenderSmoke(br_pixelmap* pRender_screen, br_pixelmap* pDepth_buffer, br_actor* pCamera, br_matrix34* pCamera_to_world, tU32 pTime);
111
 
112
void CreatePuffOfSmoke(br_vector3* pos, br_vector3* v, br_scalar strength, br_scalar pDecay_factor, int pType, tCar_spec* pC);
113
 
114
void ResetSmoke(void);
115
 
116
void AdjustSmoke(int pIndex, tU8 pType, br_vector3* pPos, br_scalar pRadius, br_scalar pStrength);
117
 
118
void ActorError(void);
119
 
120
void AdjustSmokeColumn(int pIndex, tCar_spec* pCar, int pVertex, int pColour);
121
 
122
void CreateSmokeColumn(tCar_spec* pCar, int pColour, int pVertex_index, tU32 pLifetime);
123
 
124
void GenerateSmokeShades(void);
125
 
126
void GenerateItFoxShadeTable(void);
127
 
128
void AdjustFlame(int pIndex, int pFrame_count, br_scalar pScale_x, br_scalar pScale_y, br_scalar pOffset_x, br_scalar pOffset_z);
129
 
130
void ReplayFlame(tSmoke_column* col, br_actor* actor);
131
 
132
void FlameAnimate(int c, br_vector3* pPos, tU32 pTime);
133
 
134
void DoSmokeColumn(int i, tU32 pTime, br_vector3* pRet_car_pos);
135
 
136
void ReplaySmokeColumn(tU32 pTime);
137
 
138
void MungeSmokeColumn(tU32 pTime);
139
 
140
void DisposeFlame(void);
141
 
142
void InitFlame(void);
143
 
144
void InitSplash(FILE* pF);
145
 
146
void DisposeSplash(void);
147
 
148
void DrawTheGlow(br_pixelmap* pRender_screen, br_pixelmap* pDepth_buffer, br_actor* pCamera);
149
 
150
void PipeInstantUnSmudge(tCar_spec* pCar);
151
 
152
void SmudgeCar(tCar_spec* pCar, int fire_point);
153
 
154
void ResetSmokeColumns(void);
155
 
156
void SetSmokeOn(int pSmoke_on);
157
 
158
void ReallySetSmokeOn(int pSmoke_on);
159
 
160
void SetSmoke(int pSmoke_on);
161
 
162
int GetSmokeOn(void);
163
 
164
void StopCarSmoking(tCar_spec* pCar);
165
 
166
void StopCarSmokingInstantly(tCar_spec* pCar);
167
 
168
void ConditionalSmokeColumn(tCar_spec* pCar, int pDamage_index, int pColour);
169
 
170
void SingleSplash(tCar_spec* pCar, br_vector3* sp, br_vector3* normal, tU32 pTime);
171
 
172
void CreateSplash(tCar_spec* pCar, tU32 pTime);
173
 
174
void MungeSplash(tU32 pTime);
175
 
176
void RenderSplashes(void);
177
 
178
void GetSmokeShadeTables(FILE* f);
179
 
180
void FreeSmokeShadeTables(void);
181
 
182
void LoadInKevStuff(FILE* pF);
183
 
184
void DisposeKevStuff(void);
185
 
186
void DisposeKevStuffCar(tCar_spec* pCar);
187
 
188
void DoTrueColModelThing(br_actor* actor, br_model* pModel, br_material* material, void* render_data, br_uint_8 style, int on_screen);
189
 
190
void DoModelThing(br_actor* actor, br_model* pModel, br_material* material, void* render_data, br_uint_8 style, int on_screen);
191
 
192
void SetModelShade(br_actor* pActor, br_pixelmap* pShade);
193
 
194
void MakeCarIt(tCar_spec* pCar);
195
 
196
void StopCarBeingIt(tCar_spec* pCar);
197
 
198
#endif