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 _WORLD_H_
2
#define _WORLD_H_
3
 
20 pmbaty 4
#include "brender/br_types.h"
1 pmbaty 5
#include "dr_types.h"
6
 
7
extern int gFunkotronics_array_size;
8
extern int gGroovidelics_array_size;
9
extern int gSpec_vol_mode;
10
extern tFunkotronic_spec* gFunkotronics_array;
11
extern tGroovidelic_spec* gGroovidelics_array;
12
extern char* gFunk_type_names[5];
13
extern char* gFunk_anim_names[2];
14
extern char* gTime_mode_names[2];
15
extern char* gFunk_move_names[6];
16
extern char* gFunk_nature_names[4];
17
extern char* gGroove_nature_names[2];
18
extern char* gAxis_names[3];
19
extern char* gLollipop_names[3];
20
extern char* gGroove_path_names[2];
21
extern char* gGroove_object_names[4];
22
extern char* gDepth_effect_names[2];
23
extern br_actor* gGroove_by_proxy_actor;
24
extern tRotate_mode gCurrent_rotate_mode;
25
extern tScale_mode gCurrent_scale_mode;
26
extern int gNumber_of_additional_models;
27
extern tRoad_texturing_level gRoad_texturing_level;
28
extern tWall_texturing_level gWall_texturing_level;
29
extern tCar_texturing_level gCar_texturing_level;
30
extern int gRendering_accessories;
31
extern int gNumber_of_actors;
32
extern int gNumber_of_lights;
33
extern br_actor* gActor_array[500];
34
extern float* gGroove_funk_bindings[960];
35
extern br_actor* gDelete_list[500];
36
extern br_actor* gLight_array[50];
37
extern br_model* gAdditional_models[1000];
38
extern br_actor* gSpec_vol_actors[100];
39
extern tPath_name gAdditional_actor_path;
40
extern tPath_name gAdditional_model_path;
41
extern tU32 gPrevious_groove_times[2];
42
extern int gRace_file_version;
43
extern br_vector3 gActor_centre;
44
extern float gTemp;
45
extern br_actor* gLast_actor;
46
extern br_actor* gKnown_actor;
47
extern br_actor* gAdditional_actors;
48
extern int gDelete_count;
49
extern br_scalar gNearest_distance;
50
extern br_actor* gNearest_actor;
51
extern br_actor* gStandard_lamp;
52
extern br_scalar gSight_distance_squared;
53
 
54
float MapSawToTriangle(float pNumber);
55
 
56
void SetSightDistance(br_scalar pYon);
57
 
58
br_actor* FindActorInArray(char* pThe_name);
59
 
60
br_actor* FindLightInArray(char* pThe_name);
61
 
62
br_actor* CloneActor(br_actor* pSource_actor);
63
 
64
void InitialiseStorageSpace(tBrender_storage* pStorage_space, int pMax_pixelmaps, int pMax_shade_tables, int pMax_materials, int pMax_models);
65
 
66
void DisposeStorageSpace(tBrender_storage* pStorage_space);
67
 
68
void ClearOutStorageSpace(tBrender_storage* pStorage_space);
69
 
70
tAdd_to_storage_result AddPixelmapToStorage(tBrender_storage* pStorage_space, br_pixelmap** pThe_pm);
71
 
72
tAdd_to_storage_result AddShadeTableToStorage(tBrender_storage* pStorage_space, br_pixelmap* pThe_st);
73
 
74
tAdd_to_storage_result AddMaterialToStorage(tBrender_storage* pStorage_space, br_material* pThe_mat);
75
 
76
tAdd_to_storage_result AddModelToStorage(tBrender_storage* pStorage_space, br_model* pThe_mod);
77
 
78
int LoadNPixelmaps(tBrender_storage* pStorage_space, FILE* pF, int pCount);
79
 
80
br_pixelmap* LoadSinglePixelmap(tBrender_storage* pStorage_space, char* pName);
81
 
82
br_material* LoadSingleMaterial(tBrender_storage* pStorage_space, char* pName);
83
 
84
int LoadNShadeTables(tBrender_storage* pStorage_space, FILE* pF, int pCount);
85
 
86
br_pixelmap* LoadSingleShadeTable(tBrender_storage* pStorage_space, char* pName);
87
 
88
int LoadNMaterials(tBrender_storage* pStorage_space, FILE* pF, int pCount);
89
 
90
int LoadNModels(tBrender_storage* pStorage_space, FILE* pF, int pCount);
91
 
92
void DodgyModelUpdate(br_model* pM);
93
 
94
br_material* SuffixedMaterial(br_material* pOld, char* pSuffix);
95
 
96
int FaceIsRoad(br_model* pModel, tU16 pFace);
97
 
98
br_material* RoadPerspToUntex(br_model* pModel, tU16 pFace);
99
 
100
br_material* WallPerspToLinear(br_model* pModel, tU16 pFace);
101
 
102
br_material* WallPerspToUntex(br_model* pModel, tU16 pFace);
103
 
104
void ProcessModelFaceMaterials2(br_model* pModel, tPMFM2CB pCallback);
105
 
106
void ProcessModelFaceMaterials(br_model* pModel, tPMFMCB pCallback);
107
 
108
int LoadNTrackModels(tBrender_storage* pStorage_space, FILE* pF, int pCount);
109
 
110
void LoadSomePixelmaps(tBrender_storage* pStorage_space, FILE* pF);
111
 
112
void LoadSomeShadeTables(tBrender_storage* pStorage_space, FILE* pF);
113
 
114
void LoadSomeMaterials(tBrender_storage* pStorage_space, FILE* pF);
115
 
116
void LoadSomeModels(tBrender_storage* pStorage_space, FILE* pF);
117
 
118
void LoadSomeTrackModels(tBrender_storage* pStorage_space, FILE* pF);
119
 
120
void AddFunkGrooveBinding(int pSlot_number, float* pPeriod_address);
121
 
122
void ControlBoundFunkGroove(int pSlot_number, float pValue);
123
 
124
float ControlBoundFunkGroovePlus(int pSlot_number, float pValue);
125
 
126
void ShiftBoundGrooveFunks(char* pStart, char* pEnd, ptrdiff_t pDelta);
127
 
128
tFunkotronic_spec* AddNewFunkotronic(void);
129
 
130
void DisposeFunkotronics(int pOwner);
131
 
132
void AddProximityVertex(br_vector3* pV, tFunkotronic_spec* pThe_funk);
133
 
134
void AddProximityVertexXYZ(br_scalar pX, br_scalar pY, br_scalar pZ, tFunkotronic_spec* pThe_funk);
135
 
136
br_uint_32 CalcProximities(br_actor* pActor, br_material* pMat, tFunkotronic_spec* pThe_funk);
137
 
138
br_uint_32 AddProximities(br_actor* pActor, br_material* pMat, tFunkotronic_spec* pThe_funk);
139
 
140
void Adjust2FloatsForExceptions(float* pVictim1, float* pVictim2, br_pixelmap* pCulprit);
141
 
142
void AddFunkotronics(FILE* pF, int pOwner, int pRef_offset);
143
 
144
void DisposeGroovidelics(int pOwner);
145
 
146
tGroovidelic_spec* AddNewGroovidelic(void);
147
 
148
void AddGroovidelics(FILE* pF, int pOwner, br_actor* pParent_actor, int pRef_offset, int pAllowed_to_be_absent);
149
 
150
void KillGroovadelic(int pOwner);
151
 
152
void KillFunkotronic(int pOwner);
153
 
154
br_uint_32 DeleteBastards(br_actor* pActor, br_matrix34* pMatrix, void* pArg);
155
 
156
void DeleteAnyZeroBastards(void);
157
 
158
br_uint_32 ApplyTransToModels(br_actor* pActor, br_matrix34* pMatrix, void* pArg);
159
 
160
int FindSpecVolIndex(br_actor* pActor);
161
 
162
void MungeMaterial(br_matrix34* pMat, br_material* pMat_1, br_material* pMat_2, int pAxis_0, int pAxis_1);
163
 
164
void SetSpecVolMatSize(br_actor* pActor);
165
 
166
void FindInverseAndWorldBox(tSpecial_volume* pSpec);
167
 
168
void UpdateSpecVol(void);
169
 
170
void SaveSpecialVolumes(void);
171
 
172
void SaveAdditionalStuff(void);
173
 
174
br_uint_32 ProcessMaterials(br_actor* pActor, tPMFM2CB pCallback);
175
 
176
br_uint_32 ProcessFaceMaterials2(br_actor* pActor, tPMFM2CB pCallback);
177
 
178
void ChangePerspToSubdivCB(br_material* pMaterial);
179
 
180
void ChangePerspToSubdiv(void);
181
 
182
void ChangeSubdivToPerspCB(br_material* pMaterial);
183
 
184
void ChangeSubdivToPersp(void);
185
 
20 pmbaty 186
intptr_t ProcessFaceMaterials(br_actor* pActor, tPMFMCB pCallback);
1 pmbaty 187
 
188
int DRPixelmapHasZeros(br_pixelmap* pm);
189
 
190
int StorageContainsPixelmap(tBrender_storage* pStorage, br_pixelmap* pMap);
191
 
192
void HideStoredOpaqueTextures(tBrender_storage* pStorage);
193
 
194
void RevealStoredTransparentTextures(tBrender_storage* pStorage);
195
 
196
void HideStoredTextures(tBrender_storage* pStorage);
197
 
198
void RevealStoredTextures(tBrender_storage* pStorage);
199
 
200
void SetCarStorageTexturingLevel(tBrender_storage* pStorage, tCar_texturing_level pNew, tCar_texturing_level pOld);
201
 
202
tCar_texturing_level GetCarTexturingLevel(void);
203
 
204
void SetCarTexturingLevel(tCar_texturing_level pLevel);
205
 
206
int HasThisSuffix(char* pIdent, char* pSuffix);
207
 
208
br_material* UnsuffixedMaterial(char* pOld_ident, char* pSuffix);
209
 
210
br_material* RoadUntexToPersp(br_model* pModel, tU16 pFace);
211
 
212
br_material* WallLinearToUntex(br_model* pModel, tU16 pFace);
213
 
214
br_material* WallUntexToLinear(br_model* pModel, tU16 pFace);
215
 
216
br_material* WallUntexToPersp(br_model* pModel, tU16 pFace);
217
 
218
br_material* WallLinearToPersp(br_model* pModel, tU16 pFace);
219
 
220
tRoad_texturing_level GetRoadTexturingLevel(void);
221
 
222
void SetRoadTexturingLevel(tRoad_texturing_level pLevel);
223
 
224
void ReallySetRoadTexturingLevel(tRoad_texturing_level pLevel);
225
 
226
tWall_texturing_level GetWallTexturingLevel(void);
227
 
228
void SetWallTexturingLevel(tWall_texturing_level pLevel);
229
 
230
void ReallySetWallTexturingLevel(tWall_texturing_level pLevel);
231
 
232
br_material* DisposeSuffixedMaterials(br_model* pModel, tU16 pFace);
233
 
234
void DisposeTexturingMaterials(void);
235
 
20 pmbaty 236
/*br_uint_32*/ intptr_t SetAccessoryRenderingCB(br_actor* pActor, void* pFlag);
1 pmbaty 237
 
238
void SetAccessoryRendering(int pOn);
239
 
240
int GetAccessoryRendering(void);
241
 
242
void SetCarSimplificationLevel(int pLevel);
243
 
244
int GetCarSimplificationLevel(void);
245
 
246
void ParseSpecialVolume(FILE* pF, tSpecial_volume* pSpec, char* pScreen_name_str);
247
 
248
void AddExceptionToList(tException_list* pDst, tException_list pNew);
249
 
250
void LoadExceptionsFile(char* pName);
251
 
252
void LoadExceptionsFileForTrack(char* pTrack_file_name);
253
 
254
void FreeExceptions(void);
255
 
256
void LoadTrack(char* pFile_name, tTrack_spec* pTrack_spec, tRace_info* pRace_info);
257
 
20 pmbaty 258
intptr_t RemoveBounds(br_actor* pActor, void* pArg);
1 pmbaty 259
 
260
void RemoveBoundsStructures(br_actor* pActor);
261
 
262
void FreeTrack(tTrack_spec* pTrack_spec);
263
 
264
void ProcessTrack(br_actor* pWorld, tTrack_spec* pTrack_spec, br_actor* pCamera, br_matrix34* pCamera_to_world_transform, int pRender_blends);
265
 
266
br_scalar NormaliseDegreeAngle(br_scalar pAngle);
267
 
268
void FunkThoseTronics(void);
269
 
270
void LollipopizeActor(br_actor* pSubject_actor, br_matrix34* ref_to_world, tLollipop_mode pWhich_axis);
271
 
272
void CalcActorGlobalPos(br_vector3* pResult, br_actor* pActor);
273
 
274
int PointOutOfSight(br_vector3* pPoint, br_scalar pMax_distance);
275
 
276
void PathGrooveBastard(tGroovidelic_spec* pGroove, tU32 pTime, br_matrix34* pMat, int pInterrupt_it);
277
 
278
void ObjectGrooveBastard(tGroovidelic_spec* pGroove, tU32 pTime, br_matrix34* pMat, int pInterrupt_it);
279
 
280
void GrooveThisDelic(tGroovidelic_spec* pGroove, tU32 pTime, int pInterrupt_it);
281
 
282
void GrooveThoseDelics(void);
283
 
284
void StopGroovidelic(br_actor* pActor);
285
 
286
void SetGrooveInterrupt(int pGroove_index, br_matrix34* pMatrix, int pPath_interrupt, int pObject_interrupt, float pPath_resumption, float pObject_resumption);
287
 
288
void ResetGrooveFlags(void);
289
 
290
tSpecial_volume* GetDefaultSpecialVolumeForWater(void);
291
 
292
tSpecial_volume* FindSpecialVolume(br_vector3* pP, tSpecial_volume* pLast_vol);
293
 
294
void SaveAdditionalActors(void);
295
 
296
br_scalar DistanceFromFace(br_vector3* pPos, tFace_ref* pFace);
297
 
298
br_uint_32 CalcHighestID(br_actor* pActor, int* pHighest);
299
 
300
br_uint_32 SetID(br_actor* pActor, void* pArg);
301
 
302
void UniquificateActorsName(br_actor* pUniverse_actor, br_actor* pActor);
303
 
304
void AccessoryHeadup(br_actor* pActor, char* pPrefix);
305
 
306
br_uint_32 CalcHighestNonAmID(br_actor* pActor, int* pHighest);
307
 
308
br_uint_32 SetIDAndDupModel(br_actor* pActor, void* pArg);
309
 
310
void DuplicateIfNotAmpersand(br_actor* pActor);
311
 
312
void DropActor(int pIndex);
313
 
314
void DropActor0(void);
315
 
316
void DropActor1(void);
317
 
318
void DropActor2(void);
319
 
320
void DropActor3(void);
321
 
322
void DropActor4(void);
323
 
324
void DropActor5(void);
325
 
326
void DropActor6(void);
327
 
328
void DropActor7(void);
329
 
330
void DropActor8(void);
331
 
332
void DropActor9(void);
333
 
334
br_uint_32 IdentifyAccCB(br_actor* pActor, void* pArg);
335
 
336
void IdentifyAcc(void);
337
 
338
br_uint_32 DelGrooveRef(br_actor* pActor, void* pArg);
339
 
340
br_uint_32 DelReferencedModels(br_actor* pActor, void* pArg);
341
 
342
void DeleteAcc(void);
343
 
344
br_uint_32 OffsetModel(br_actor* pActor, void* pArg);
345
 
346
void OffsetActor(br_actor* pActor, br_vector3* pOffset);
347
 
348
void CentreActor(br_actor* pActor, br_vector3* pOffset);
349
 
350
void SnapAccToVertical(void);
351
 
352
void RotateAccessory(br_angle pAngle);
353
 
354
void ScaleAccessory(float pScaling_factor);
355
 
356
void MoveAccessory(br_scalar pX_shift, br_scalar pY_shift, br_scalar pZ_shift);
357
 
358
void RotateAccL(void);
359
 
360
void RotateAccL2(void);
361
 
362
void RotateAccL3(void);
363
 
364
void RotateAccL4(void);
365
 
366
void RotateAccR(void);
367
 
368
void RotateAccR2(void);
369
 
370
void RotateAccR3(void);
371
 
372
void RotateAccR4(void);
373
 
374
void CycleAccRotate(void);
375
 
376
void CycleAccScale(void);
377
 
378
void ScaleAccUp2(void);
379
 
380
void ScaleAccUp3(void);
381
 
382
void ScaleAccUp4(void);
383
 
384
void ScaleAccDown2(void);
385
 
386
void ScaleAccDown3(void);
387
 
388
void ScaleAccDown4(void);
389
 
390
void MoveXAccL(void);
391
 
392
void MoveXAccL2(void);
393
 
394
void MoveXAccL3(void);
395
 
396
void MoveXAccL4(void);
397
 
398
void MoveXAccR(void);
399
 
400
void MoveXAccR2(void);
401
 
402
void MoveXAccR3(void);
403
 
404
void MoveXAccR4(void);
405
 
406
void MoveYAccL(void);
407
 
408
void MoveYAccL2(void);
409
 
410
void MoveYAccL3(void);
411
 
412
void MoveYAccL4(void);
413
 
414
void MoveYAccR(void);
415
 
416
void MoveYAccR2(void);
417
 
418
void MoveYAccR3(void);
419
 
420
void MoveYAccR4(void);
421
 
422
void MoveZAccL(void);
423
 
424
void MoveZAccL2(void);
425
 
426
void MoveZAccL3(void);
427
 
428
void MoveZAccL4(void);
429
 
430
void MoveZAccR(void);
431
 
432
void MoveZAccR2(void);
433
 
434
void MoveZAccR3(void);
435
 
436
void MoveZAccR4(void);
437
 
438
br_material* GetInternalMat(void);
439
 
440
br_material* GetExternalMat(void);
441
 
442
void BuildSpecVolModel(tSpecial_volume* pSpec, int pIndex, br_material* pInt_mat, br_material* pExt_mat);
443
 
444
void DropSpecVol(int pIndex);
445
 
446
void DropSpecVol0(void);
447
 
448
void DropSpecVol1(void);
449
 
450
void DropSpecVol2(void);
451
 
452
void DropSpecVol3(void);
453
 
454
void DropSpecVol4(void);
455
 
456
void DropSpecVol5(void);
457
 
458
void DropSpecVol6(void);
459
 
460
void DropSpecVol7(void);
461
 
462
void DropSpecVol8(void);
463
 
464
void DropSpecVol9(void);
465
 
466
void IdentifySpecVol(void);
467
 
468
void DelSpecVolumeGraph(int pIndex);
469
 
470
void DeleteSpecVol(void);
471
 
472
void RotateSpecVolL(void);
473
 
474
void RotateSpecVolL2(void);
475
 
476
void RotateSpecVolL3(void);
477
 
478
void RotateSpecVolL4(void);
479
 
480
void RotateSpecVolR(void);
481
 
482
void RotateSpecVolR2(void);
483
 
484
void RotateSpecVolR3(void);
485
 
486
void RotateSpecVolR4(void);
487
 
488
void CycleSpecVolRotate(void);
489
 
490
void CycleSpecVolScale(void);
491
 
492
void ScaleSpecVolUp2(void);
493
 
494
void ScaleSpecVolUp3(void);
495
 
496
void ScaleSpecVolUp4(void);
497
 
498
void ScaleSpecVolDown2(void);
499
 
500
void ScaleSpecVolDown3(void);
501
 
502
void ScaleSpecVolDown4(void);
503
 
504
void MoveXSpecVolL(void);
505
 
506
void MoveXSpecVolL2(void);
507
 
508
void MoveXSpecVolL3(void);
509
 
510
void MoveXSpecVolL4(void);
511
 
512
void MoveXSpecVolR(void);
513
 
514
void MoveXSpecVolR2(void);
515
 
516
void MoveXSpecVolR3(void);
517
 
518
void MoveXSpecVolR4(void);
519
 
520
void MoveYSpecVolL(void);
521
 
522
void MoveYSpecVolL2(void);
523
 
524
void MoveYSpecVolL3(void);
525
 
526
void MoveYSpecVolL4(void);
527
 
528
void MoveYSpecVolR(void);
529
 
530
void MoveYSpecVolR2(void);
531
 
532
void MoveYSpecVolR3(void);
533
 
534
void MoveYSpecVolR4(void);
535
 
536
void MoveZSpecVolL(void);
537
 
538
void MoveZSpecVolL2(void);
539
 
540
void MoveZSpecVolL3(void);
541
 
542
void MoveZSpecVolL4(void);
543
 
544
void MoveZSpecVolR(void);
545
 
546
void MoveZSpecVolR2(void);
547
 
548
void MoveZSpecVolR3(void);
549
 
550
void MoveZSpecVolR4(void);
551
 
552
void SnapSpecVolToVertical(void);
553
 
554
void ShowSpecialVolumes(void);
555
 
556
void HideSpecialVolumes(void);
557
 
558
#endif