Rev 18 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | pmbaty | 1 | #ifndef _PIPING_H_ |
2 | #define _PIPING_H_ |
||
3 | |||
20 | pmbaty | 4 | #include "brender/br_types.h" |
1 | pmbaty | 5 | #include "dr_types.h" |
6 | |||
7 | extern tU8* gPipe_buffer_start; |
||
8 | extern int gDisable_sound; |
||
9 | extern int gDisable_advance; |
||
10 | extern int gMax_rewind_chunks; |
||
11 | extern float gWall_severity; |
||
12 | extern tPipe_reset_proc* gReset_procs[32]; |
||
13 | extern tPiped_registration_snapshot gRegistration_snapshots[5]; |
||
14 | extern tPipe_smudge_data* gSmudge_space; |
||
15 | extern tU32 gOldest_time; |
||
16 | extern int gCurrent_snapshot_registration_index; |
||
17 | extern tPipe_chunk* gMr_chunky; |
||
18 | extern tCar_spec* gCar_ptr; |
||
19 | extern br_vector3 gZero_vector; |
||
20 | extern tPipe_chunk_type gReentrancy_array[5]; |
||
21 | extern tU32 gLast_time; |
||
22 | extern tPipe_model_geometry_data* gModel_geometry_space; |
||
23 | extern tU32 gEnd_time; |
||
24 | extern tU32 gTrigger_time; |
||
25 | extern int gReentrancy_count; |
||
26 | extern br_vector3 gCar_pos; |
||
27 | extern br_vector3 gReference_pos; |
||
28 | extern br_scalar gMax_distance; |
||
29 | extern tU32 gLoop_abort_time; |
||
30 | extern br_vector3 gWall_impact_point; |
||
31 | extern tU8* gPipe_buffer_working_end; |
||
32 | extern tU32 gYoungest_time; |
||
33 | extern tU8* gPipe_buffer_phys_end; |
||
34 | extern tU8* gLocal_buffer_record_ptr; |
||
35 | extern tU8* gPipe_play_ptr; |
||
36 | extern tU8* gEnd_of_session; |
||
37 | extern tU8* gPipe_record_ptr; |
||
38 | extern tU8* gPipe_buffer_oldest; |
||
39 | extern tU32 gPipe_buffer_size; |
||
40 | extern tU8* gLocal_buffer; |
||
41 | extern tU32 gLocal_buffer_size; |
||
42 | |||
43 | void GetReducedPos(br_vector3* v, tReduced_pos* p); |
||
44 | |||
45 | void SaveReducedPos(tReduced_pos* p, br_vector3* v); |
||
46 | |||
47 | int PipeSearchForwards(void); |
||
48 | |||
49 | int IsActionReplayAvailable(void); |
||
50 | |||
51 | int SomeReplayLeft(void); |
||
52 | |||
53 | void DisablePipedSounds(void); |
||
54 | |||
55 | void EnablePipedSounds(void); |
||
56 | |||
57 | tU32 LengthOfSession(tPipe_session* pSession); |
||
58 | |||
59 | void StartPipingSession2(tPipe_chunk_type pThe_type, int pMunge_reentrancy); |
||
60 | |||
61 | void StartPipingSession(tPipe_chunk_type pThe_type); |
||
62 | |||
63 | void EndPipingSession2(int pMunge_reentrancy); |
||
64 | |||
65 | void EndPipingSession(void); |
||
66 | |||
67 | void AddDataToSession(int pSubject_index, void* pData, tU32 pData_length); |
||
68 | |||
69 | void AddModelGeometryToPipingSession(tU16 pCar_ID, int pModel_index, int pVertex_count, tChanged_vertex* pCoordinates); |
||
70 | |||
71 | void AddSmudgeToPipingSession(tU16 pCar_ID, int pModel_index, int pVertex_count, tSmudged_vertex* pCoordinates); |
||
72 | |||
73 | void AddPedestrianToPipingSession(int pPedestrian_index, br_matrix34* pTrans, tU8 pAction_index, tU8 pFrame_index, tS8 pHit_points, int pDone_initial, tU16 pParent_ID, float pSpin_period, br_scalar pJump_magnitude, br_vector3* pOffset); |
||
74 | |||
75 | void AddSparkToPipingSession(int pSpark_index, br_vector3* pPos, br_vector3* pV); |
||
76 | |||
77 | void AddShrapnelToPipingSession(int pShrapnel_index, br_vector3* pPos, tU16 pAge, br_material* pMaterial); |
||
78 | |||
79 | void AddScreenWobbleToPipingSession(int pWobble_x, int pWobble_y); |
||
80 | |||
81 | void AddGrooveStopToPipingSession(int pGroove_index, br_matrix34* pMatrix, int pPath_interrupt, int pObject_interrupt, float pPath_resumption, float pObject_resumption); |
||
82 | |||
83 | void AddNonCarToPipingSession(int pIndex, br_actor* pActor); |
||
84 | |||
85 | void AddSmokeToPipingSession(int pIndex, tU8 pType, br_vector3* pPos, br_scalar pRadius, br_scalar pStrength); |
||
86 | |||
87 | void AddSmokeColumnToPipingSession(int pIndex, tCar_spec* pCar, int pVertex, int pColour); |
||
88 | |||
89 | void AddFlameToPipingSession(int pIndex, int pFrame_count, br_scalar pScale_x, br_scalar pScale_y, br_scalar pOffset_x, br_scalar pOffset_z); |
||
90 | |||
91 | void AddSplashToPipingSession(tCollision_info* pCar); |
||
92 | |||
93 | void AddOilSpillToPipingSession(int pIndex, br_matrix34* pMat, br_scalar pFull_size, br_scalar pGrow_rate, tU32 pSpill_time, tU32 pStop_time, tCar_spec* pCar, br_vector3* pOriginal_pos, br_pixelmap* pPixelmap); |
||
94 | |||
95 | void AddFrameFinishToPipingSession(tU32 pThe_time); |
||
96 | |||
97 | void AddCarToPipingSession(int pCar_ID, br_matrix34* pCar_mat, br_vector3* pCar_velocity, float pSpeedo_speed, float pLf_sus_position, float pRf_sus_position, float pLr_sus_position, float pRr_sus_position, float pSteering_angle, br_scalar pRevs, int pGear, int pFrame_coll_flag); |
||
98 | |||
99 | void AddSoundToPipingSession(tS3_outlet_ptr pOutlet, int pSound_index, tS3_volume pL_volume, tS3_volume pR_volume, tS3_pitch pPitch, br_vector3* pPos); |
||
100 | |||
101 | void AddDamageToPipingSession(int pCar_ID, tS8* pDifferences); |
||
102 | |||
103 | void AddSpecialToPipingSession(tSpecial_type pType); |
||
104 | |||
105 | void AddPedGibToPipingSession(int pIndex, br_matrix34* pTrans, int pSize, int pGib_index, int pPed_index); |
||
106 | |||
107 | void AddCarIncidentToPipingSession(float pSeverity, tCar_spec* pCar, br_vector3* pImpact_point); |
||
108 | |||
109 | void AddPedIncidentToPipingSession(int pPed_index, br_actor* pActor); |
||
110 | |||
111 | void AddWallIncidentToPipingSession(float pSeverity, br_vector3* pImpact_point); |
||
112 | |||
113 | void AddProxRayToPipingSession(int pRay_index, tCar_spec* pCar, tU16 pPed_index, tU32 pTime); |
||
114 | |||
115 | void AddSkidAdjustmentToPipingSession(int pSkid_num, br_matrix34* pMatrix, int pMaterial_index); |
||
116 | |||
117 | void PipeSingleModelGeometry(tU16 pCar_ID, int pModel_index, int pVertex_count, tChanged_vertex* pCoordinates); |
||
118 | |||
119 | void PipeSinglePedestrian(int pPedestrian_index, br_matrix34* pTrans, tU8 pAction_index, tU8 pFrame_index, tS8 pHit_points, int pDone_initial, tU16 pParent_ID, float pSpin_period, br_scalar pJump_magnitude, br_vector3* pOffset); |
||
120 | |||
121 | void PipeSingleCar(int pCar_ID, br_matrix34* pCar_mat, br_vector3* pCar_velocity, float pSpeedo_speed, float pLf_sus_position, float pRf_sus_position, float pLr_sus_position, float pRr_sus_position, float pSteering_angle, br_scalar pRevs, int pGear, int pFrame_coll_flag); |
||
122 | |||
123 | void PipeSingleSound(tS3_outlet_ptr pOutlet, int pSound_index, tS3_volume pL_volume, tS3_volume pR_volume, tS3_pitch pPitch, br_vector3* pPos); |
||
124 | |||
125 | void PipeSingleOilSpill(int pIndex, br_matrix34* pMat, br_scalar pFull_size, br_scalar pGrow_rate, tU32 pSpill_time, tU32 pStop_time, tCar_spec* pCar, br_vector3* pOriginal_pos, br_pixelmap* pPixelmap); |
||
126 | |||
127 | void PipeSingleDamage(int pCar_ID, tS8* pDifferences); |
||
128 | |||
129 | void PipeSingleSpecial(tSpecial_type pType); |
||
130 | |||
131 | void PipeSinglePedGib(int pIndex, br_matrix34* pTrans, int pSize, int pGib_index, int pPed_index); |
||
132 | |||
133 | void PipeSingleCarIncident(float pSeverity, tCar_spec* pCar, br_vector3* pImpact_point); |
||
134 | |||
135 | void PipeSinglePedIncident(int pPed_index, br_actor* pActor); |
||
136 | |||
137 | void PipeSingleWallIncident(float pSeverity, br_vector3* pImpact_point); |
||
138 | |||
139 | void PipeSingleScreenShake(int pWobble_x, int pWobble_y); |
||
140 | |||
141 | void PipeSingleGrooveStop(int pGroove_index, br_matrix34* pMatrix, int pPath_interrupt, int pObject_interrupt, float pPath_resumption, float pObject_resumption); |
||
142 | |||
143 | void PipeFrameFinish(void); |
||
144 | |||
145 | void PipingFrameReset(void); |
||
146 | |||
147 | void PipeSingleSkidAdjustment(int pSkid_num, br_matrix34* pMatrix, int pMaterial_index); |
||
148 | |||
149 | void ResetPiping(void); |
||
150 | |||
151 | void InitialisePiping(void); |
||
152 | |||
153 | void DisposePiping(void); |
||
154 | |||
155 | void InitLastDamageArrayEtc(void); |
||
156 | |||
157 | void ResetCars(void); |
||
158 | |||
159 | void PipeCarPositions(void); |
||
160 | |||
161 | void ResetPipePlayToEnd(void); |
||
162 | |||
163 | void ResetPipePlayToStart(void); |
||
164 | |||
165 | tU8* GetPipePlayPtr(void); |
||
166 | |||
167 | void SetPipePlayPtr(tU8* pPtr); |
||
168 | |||
169 | void AdvanceChunkPtr(tPipe_chunk** pChunk, tChunk_subject_index pType); |
||
170 | |||
171 | void ApplyModelGeometry(tPipe_chunk** pChunk); |
||
172 | |||
173 | void DoSmudge(tPipe_chunk** pChunk, int pDir); |
||
174 | |||
175 | void ApplySmudge(tPipe_chunk** pChunk); |
||
176 | |||
177 | void ApplyPedestrian(tPipe_chunk** pChunk); |
||
178 | |||
179 | void ApplySpark(tPipe_chunk** pChunk); |
||
180 | |||
181 | void ApplyShrapnel(tPipe_chunk** pChunk); |
||
182 | |||
183 | void ApplyScreenWobble(tPipe_chunk** pChunk); |
||
184 | |||
185 | void ApplyGrooveStop(tPipe_chunk** pChunk); |
||
186 | |||
187 | void ApplyNonCar(tPipe_chunk** pChunk); |
||
188 | |||
189 | void ApplySmoke(tPipe_chunk** pChunk); |
||
190 | |||
191 | void ApplySmokeColumn(tPipe_chunk** pChunk); |
||
192 | |||
193 | void ApplyFlame(tPipe_chunk** pChunk); |
||
194 | |||
195 | void ApplySplash(tPipe_chunk** pChunk); |
||
196 | |||
197 | void ApplyOilSpill(tPipe_chunk** pChunk, tU32 pStop_time); |
||
198 | |||
199 | void ApplyFrameBoundary(tPipe_chunk** pChunk); |
||
200 | |||
201 | void ApplySound(tPipe_chunk** pChunk); |
||
202 | |||
203 | void ApplyCar(tPipe_chunk** pChunk); |
||
204 | |||
205 | void ApplyDamage(tPipe_chunk** pChunk); |
||
206 | |||
207 | void ApplySpecial(tPipe_chunk** pChunk); |
||
208 | |||
209 | void ApplyPedGib(tPipe_chunk** pChunk); |
||
210 | |||
211 | void ApplyProxRay(tPipe_chunk** pChunk); |
||
212 | |||
213 | void ApplySkidAdjustment(tPipe_chunk** pChunk); |
||
214 | |||
215 | int ApplyPipedSession(tU8** pPtr); |
||
216 | |||
217 | int MoveSessionPointerBackOne(tU8** pPtr); |
||
218 | |||
219 | int MoveSessionPointerForwardOne(tU8** pPtr); |
||
220 | |||
221 | tPipe_chunk* FindPreviousChunk(tU8* pPtr, tPipe_chunk_type pType, tChunk_subject_index pIndex); |
||
222 | |||
223 | void UndoModelGeometry(tPipe_chunk** pChunk); |
||
224 | |||
225 | void UndoSmudge(tPipe_chunk** pChunk); |
||
226 | |||
227 | void UndoPedestrian(tPipe_chunk** pChunk, tPipe_chunk* pPrev_chunk); |
||
228 | |||
229 | void UndoFrameBoundary(tPipe_chunk** pChunk, tPipe_chunk* pPrev_chunk); |
||
230 | |||
231 | void UndoCar(tPipe_chunk** pChunk, tPipe_chunk* pPrev_chunk); |
||
232 | |||
233 | void UndoSound(tPipe_chunk** pChunk); |
||
234 | |||
235 | void UndoDamage(tPipe_chunk** pChunk); |
||
236 | |||
237 | void UndoSpecial(tPipe_chunk** pChunk); |
||
238 | |||
239 | void UndoPedGib(tPipe_chunk** pChunk, tPipe_chunk* pPrev_chunk); |
||
240 | |||
241 | void UndoSpark(tPipe_chunk** pChunk, tPipe_chunk* pPrev_chunk); |
||
242 | |||
243 | void UndoShrapnel(tPipe_chunk** pChunk, tPipe_chunk* pPrev_chunk); |
||
244 | |||
245 | void UndoScreenWobble(tPipe_chunk** pChunk, tPipe_chunk* pPrev_chunk); |
||
246 | |||
247 | void UndoGrooveStop(tPipe_chunk** pChunk, tPipe_chunk* pPrev_chunk); |
||
248 | |||
249 | void UndoNonCar(tPipe_chunk** pChunk, tPipe_chunk* pPrev_chunk); |
||
250 | |||
251 | void UndoSmoke(tPipe_chunk** pChunk, tPipe_chunk* pPrev_chunk); |
||
252 | |||
253 | void UndoSmokeColumn(tPipe_chunk** pChunk, tPipe_chunk* pPrev_chunk); |
||
254 | |||
255 | void UndoFlame(tPipe_chunk** pChunk, tPipe_chunk* pPrev_chunk); |
||
256 | |||
257 | void UndoSplash(tPipe_chunk** pChunk, tPipe_chunk* pPrev_chunk); |
||
258 | |||
259 | void UndoOilSpill(tPipe_chunk** pChunk, tPipe_chunk* pPrev_chunk); |
||
260 | |||
261 | void UndoProxRay(tPipe_chunk** pChunk); |
||
262 | |||
263 | void UndoSkidAdjustment(tPipe_chunk** pChunk, tPipe_chunk* pPrev_chunk); |
||
264 | |||
265 | int UndoPipedSession(tU8** pPtr); |
||
266 | |||
267 | tU32 FindPrevFrameTime(tU8* pPtr); |
||
268 | |||
269 | void ScanBuffer(tU8** pPtr, tPipe_chunk_type pType, tU32 pDefault_time, int (*pCall_back)(tPipe_chunk*, int, tU32), int (*pTime_check)(tU32)); |
||
270 | |||
271 | int CheckSound(tPipe_chunk* pChunk_ptr, int pChunk_count, tU32 pTime); |
||
272 | |||
273 | int SoundTimeout(tU32 pTime); |
||
274 | |||
275 | void ScanAndPlaySoundsToBe(tU8* pPtr, tU32 pOldest_time, tU32 pYoungest_time); |
||
276 | |||
277 | int CheckCar(tPipe_chunk* pChunk_ptr, int pChunk_count, tU32 pTime); |
||
278 | |||
279 | int CarTimeout(tU32 pTime); |
||
280 | |||
281 | void ScanCarsPositions(tCar_spec* pCar, br_vector3* pSource_pos, br_scalar pMax_distance_sqr, tU32 pOffset_time, tU32 pTime_period, br_vector3* pCar_pos, tU32* pTime_returned); |
||
282 | |||
283 | int CheckIncident(tPipe_chunk* pChunk_ptr, int pChunk_count, tU32 pTime); |
||
284 | |||
285 | int GetNextIncident(tU32 pOffset_time, tIncident_type* pIncident_type, float* pSeverity, tIncident_info* pInfo, tU32* pTime_away); |
||
286 | |||
287 | tU32 GetARStartTime(void); |
||
288 | |||
289 | #endif |