Subversion Repositories Games.Carmageddon

Rev

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

  1. #ifndef _PEDESTRN_H_
  2. #define _PEDESTRN_H_
  3.  
  4. #include "brender/br_types.h"
  5. #include "dr_types.h"
  6.  
  7. extern int gDetect_peds;
  8. extern int gReally_stupid_ped_bug_enable;
  9. extern int gPed_sound_disable;
  10. extern int gVesuvians_last_time;
  11. extern int gSend_peds;
  12. extern tU32 gLast_ped_message_send;
  13. extern tPedestrian_instruction* gInitial_instruction;
  14. extern char* gRate_commands[3];
  15. extern char* gCollide_commands[1];
  16. extern char* gInstruc_commands[10];
  17. extern float gMin_ped_gib_speeds[4];
  18. extern float gPed_gib_distrib[4];
  19. extern float gPed_gib_speeds[4];
  20. extern int gPed_size_counts[4];
  21. extern char* gPed_gib_names[4][5];
  22. extern char* gPed_geb_names[4][5];
  23. extern int gPed_gib_maxes[4][5];
  24. extern br_scalar gExploding_ped_scale[3];
  25. extern br_vector3 gZero_v__pedestrn; // suffix added to avoid duplicate symbol
  26. extern int gPed_instruc_count;
  27. extern int gPed_count;
  28. extern br_actor* gPath_actor;
  29. extern br_actor* gCurrent_ped_path_actor;
  30. extern int gPedestrians_on;
  31. extern int gVesuvian_corpses;
  32. extern br_material* gPed_material;
  33. extern int gPed_gib_counts[4][5];
  34. extern tPedestrian_instruction gPed_instrucs[100];
  35. extern tPed_gib gPed_gibs[30];
  36. extern tPed_gib_materials gPed_gib_materials[4];
  37. extern tProximity_ray gProximity_rays[20];
  38. extern int gPed_colliding;
  39. extern float gZombie_factor;
  40. extern int gRespawn_variance;
  41. extern br_scalar gPed_scale_factor;
  42. extern int gTotal_peds;
  43. extern int gPedestrian_harvest;
  44. extern br_vector3 gPed_pos_camera;
  45. extern int gMin_respawn_time;
  46. extern br_material* gPath_mat_calc;
  47. extern float gPedestrian_speed_factor;
  48. extern int gExploding_pedestrians;
  49. extern int gBlind_pedestrians;
  50. extern br_material* gPath_mat_normal;
  51. extern br_material* gInit_pos_mat_calc;
  52. extern int gPed_other;
  53. extern int gAttracted_pedestrians;
  54. extern int gPed_ref_num;
  55. extern br_scalar gMax_distance_squared;
  56. extern br_model* gPed_model;
  57. extern float gDanger_level;
  58. extern br_vector3 gDanger_direction;
  59. extern int gInit_ped_instruc;
  60. extern int gCurrent_lollipop_index;
  61. extern int gVesuvians_this_time;
  62. extern int gNumber_of_ped_gibs;
  63. extern tPedestrian_data* gFlag_waving_bastard;
  64. extern int gNumber_of_pedestrians;
  65. extern br_pixelmap* gProx_ray_shade_table;
  66. extern tPedestrian_data* gPedestrian_array;
  67. extern tU32 gLast_ped_splat_time;
  68. extern int gCurrent_ped_multiplier;
  69.  
  70. void PedModelUpdate(br_model* pModel, br_scalar x0, br_scalar y0, br_scalar x1, br_scalar y1, br_scalar x2, br_scalar y2, br_scalar x3, br_scalar y3);
  71.  
  72. int ActorIsPedestrian(br_actor* pActor);
  73.  
  74. br_scalar PedHeightFromActor(br_actor* pActor);
  75.  
  76. int GetPedestrianValue(br_actor* pActor);
  77.  
  78. int PedestrianActorIsPerson(br_actor* pActor);
  79.  
  80. br_actor* GetPedestrianActor(int pIndex);
  81.  
  82. br_pixelmap* GetPedestrianTexture(br_actor* pActor, int* pFlipped);
  83.  
  84. void TogglePedestrians(void);
  85.  
  86. void InitPedGibs(void);
  87.  
  88. void SetPedMaterialForRender(br_actor* pActor);
  89.  
  90. void PedCallBack(br_actor* pActor, br_model* pModel, br_material* pMaterial, void* pRender_data, br_uint_8 pStyle, int pOn_screen);
  91.  
  92. void InitPeds(void);
  93.  
  94. void MungeModelSize(br_actor* pActor, br_scalar pScaling_factor);
  95.  
  96. int BurstPedestrian(tPedestrian_data* pPedestrian, float pSplattitudinalitude, int pAllow_explosion);
  97.  
  98. void ResetAllPedGibs(void);
  99.  
  100. void AdjustPedGib(int pIndex, int pSize, int pGib_index, int pPed_index, br_matrix34* pTrans);
  101.  
  102. void MungePedGibs(tU32 pFrame_period);
  103.  
  104. void KillPedestrian(tPedestrian_data* pPedestrian);
  105.  
  106. void CalcPedWidthNHeight(tPedestrian_data* pPedestrian, br_pixelmap* pPixelmap, br_scalar* pHeight, br_scalar* pWidth);
  107.  
  108. int PedestrianNextInstruction(tPedestrian_data* pPedestrian, float pDanger_level, int pPosition_explicitly, int pMove_pc);
  109.  
  110. void MungePedestrianSequence(tPedestrian_data* pPedestrian, int pAction_changed);
  111.  
  112. void DetachPedFromCar(tPedestrian_data* pPedestrian);
  113.  
  114. void SetPedPos(tPedestrian_data* pPedestrian);
  115.  
  116. void DetachPedActorFromCar(br_actor* pActor);
  117.  
  118. void MungePedestrianFrames(tPedestrian_data* pPedestrian);
  119.  
  120. void MungePedModel(tPedestrian_data* pPedestrian);
  121.  
  122. void ChangeActionTo(tPedestrian_data* pPedestrian, int pAction_index, int pRedo_frames_etc);
  123.  
  124. int MungePedestrianAction(tPedestrian_data* pPedestrian, float pDanger_level);
  125.  
  126. void MakeFlagWavingBastardWaveHisFlagWhichIsTheProbablyTheLastThingHeWillEverDo(void);
  127.  
  128. void MungePedestrianPath(tPedestrian_data* pPedestrian, float pDanger_level, br_vector3* pDanger_direction);
  129.  
  130. float CalcPedestrianDangerLevel(tPedestrian_data* pPedestrian, br_vector3* pDanger_direction);
  131.  
  132. tPed_hit_position MoveToEdgeOfCar(tPedestrian_data* pPedestrian, tCollision_info* pCar, br_actor* pCar_actor, br_scalar pPed_x, br_scalar pPed_z, br_scalar pCar_bounds_min_x, br_scalar pCar_bounds_max_x, br_scalar pCar_bounds_min_z, br_scalar pCar_bounds_max_z, br_vector3* pMin_ped_bounds_car, br_vector3* pMax_ped_bounds_car);
  133.  
  134. void CheckLastPed(void);
  135.  
  136. int BloodyWheels(tCar_spec* pCar, br_vector3* pPed_car, br_scalar pSize, br_vector3* pPed_glob);
  137.  
  138. int FancyATossOffMate(tPedestrian_data* pPedestrian, tCollision_info* pCar, float pImpact_speed);
  139.  
  140. void CheckPedestrianDeathScenario(tPedestrian_data* pPedestrian);
  141.  
  142. void SendPedestrian(tPedestrian_data* pPedestrian, int pIndex);
  143.  
  144. void DoPedestrian(tPedestrian_data* pPedestrian, int pIndex);
  145.  
  146. void AdjustPedestrian(int pIndex, int pAction_index, int pFrame_index, int pHit_points, int pDone_initial, tU16 pParent, br_actor* pParent_actor, float pSpin_period, br_scalar pJump_magnitude, br_vector3* pOffset, br_vector3* pTrans);
  147.  
  148. void SquirtPathVertex(br_vertex* pFirst_vertex, br_vector3* pPoint);
  149.  
  150. void ResetAllPedestrians(void);
  151.  
  152. void GroundPedestrian(tPedestrian_data* pPedestrian);
  153.  
  154. void RevivePedestrian(tPedestrian_data* pPedestrian, int pAnimate);
  155.  
  156. void MungePedestrians(tU32 pFrame_period);
  157.  
  158. void RespawnPedestrians(void);
  159.  
  160. int GetPedCount(void);
  161.  
  162. int GetPedPosition(int pIndex, br_vector3* pPos);
  163.  
  164. void CreatePedestrian(FILE* pG, tPedestrian_instruction* pInstructions, int pInstruc_count, int pInit_instruc, int pRef_num, int pForce_read);
  165.  
  166. void ResetProxRay(void);
  167.  
  168. void PedMaterialFromHell(void);
  169.  
  170. void ResetPedMaterial(void);
  171.  
  172. void LoadInPedestrians(FILE* pF, int pSubs_count, tPed_subs* pSubs_array);
  173.  
  174. br_actor* BuildPedPaths(tPedestrian_instruction* pInstructions, int pInstruc_count, int pInit_instruc);
  175.  
  176. void WriteOutPeds(void);
  177.  
  178. void AddPed(void);
  179.  
  180. void NewPed(int pRef_num);
  181.  
  182. void RemoveCurrentPedPath(void);
  183.  
  184. void ScrubPedestrian(void);
  185.  
  186. void TogglePedDetect(void);
  187.  
  188. void NewPed0(void);
  189.  
  190. void NewPed1(void);
  191.  
  192. void NewPed2(void);
  193.  
  194. void NewPed3(void);
  195.  
  196. void NewPed4(void);
  197.  
  198. void NewPed5(void);
  199.  
  200. void NewPed6(void);
  201.  
  202. void NewPed7(void);
  203.  
  204. void NewPed8(void);
  205.  
  206. void NewPed9(void);
  207.  
  208. void NewPed0B(void);
  209.  
  210. void NewPed1B(void);
  211.  
  212. void NewPed2B(void);
  213.  
  214. void NewPed3B(void);
  215.  
  216. void NewPed4B(void);
  217.  
  218. void NewPed5B(void);
  219.  
  220. void NewPed6B(void);
  221.  
  222. void NewPed7B(void);
  223.  
  224. void NewPed8B(void);
  225.  
  226. void NewPed9B(void);
  227.  
  228. void MungeShowPedPath(void);
  229.  
  230. void DropPedPoint2(void);
  231.  
  232. void DropPedPoint(void);
  233.  
  234. void DropInitPedPoint(void);
  235.  
  236. void DropPedPointAir2(void);
  237.  
  238. void DropPedPointAir(void);
  239.  
  240. void DropInitPedPointAir(void);
  241.  
  242. intptr_t KillActorsModel(br_actor* pActor, void* pArg);
  243.  
  244. void DisposePedPaths(void);
  245.  
  246. void GetPedPos(int* pPed_index, int* pPoint_index);
  247.  
  248. void ShowPedPos(void);
  249.  
  250. void ShowPedPaths(void);
  251.  
  252. void PullPedPoint(void);
  253.  
  254. void PullPedPointAir(void);
  255.  
  256. void DeletePedPath(void);
  257.  
  258. void DeletePedPoint(void);
  259.  
  260. void DisposePedestrians(void);
  261.  
  262. void DoPedReport(void);
  263.  
  264. void RenderProximityRays(br_pixelmap* pRender_screen, br_pixelmap* pDepth_buffer, br_actor* pCamera, br_matrix34* pCamera_to_world, tU32 pTime);
  265.  
  266. void AdjustProxRay(int pRay_index, tU16 pCar_ID, tU16 pPed_index, tU32 pTime);
  267.  
  268. void ReceivedPedestrian(tNet_contents* pContents, tNet_message* pMessage, tU32 pReceive_time);
  269.  
  270. void SendAllPedestrianPositions(tPlayer_ID pPlayer);
  271.  
  272. #endif
  273.