Subversion Repositories Games.Carmageddon

Rev

Rev 1 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

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