Subversion Repositories Games.Carmageddon

Rev

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