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 _RACESTRT_H_
  2. #define _RACESTRT_H_
  3.  
  4. #include "dr_types.h"
  5.  
  6. extern int gGrid_number_colour[4];
  7. extern int gJust_bought_part;
  8. extern tU32 gLast_host_query;
  9. extern br_pixelmap* gDead_car;
  10. extern int gFade_away_parts_shop;
  11. extern tU32 gDare_start_time;
  12. extern int gRefund_rate;
  13. extern int gSwap_grid_2;
  14. extern int gSwap_grid_1;
  15. extern int gChange_race_net_mode;
  16. extern tParts_category gPart_category;
  17. extern tU32 gNet_synch_start;
  18. extern tNet_game_details* gChoose_car_net_game;
  19. extern int gPart_index;
  20. extern int gChallenger_index__racestrt; // suffix added to avoid duplicate symbol
  21. extern tGrid_draw gDraw_grid_status;
  22. extern tNet_sequence_type gNet_race_sequence__racestrt; // suffix added to avoid duplicate symbol
  23. extern br_pixelmap* gTaken_image;
  24. extern int gGrid_number_x_coords[31];
  25. extern int gGrid_transition_stage;
  26. extern int gGrid_y_adjust;
  27. extern br_pixelmap* gBullet_image;
  28. extern br_pixelmap* gDeceased_image;
  29. extern int gBest_pos_available;
  30. extern int gChallenger_position;
  31. extern int gOpponent_index;
  32. extern int gChallenge_time;
  33. extern int gOriginal_position;
  34. extern int gCurrent_race_index;
  35. extern tInterface_spec* gStart_interface_spec;
  36. extern int gCurrent_car_index;
  37. extern int gOur_starting_position;
  38.  
  39. void DrawRaceList(int pOffset);
  40.  
  41. void MoveRaceList(int pFrom, int pTo, tS32 pTime_to_move);
  42.  
  43. int UpRace(int* pCurrent_choice, int* pCurrent_mode);
  44.  
  45. int DownRace(int* pCurrent_choice, int* pCurrent_mode);
  46.  
  47. int ClickOnRace(int* pCurrent_choice, int* pCurrent_mode, int pX_offset, int pY_offset);
  48.  
  49. int UpClickRace(int* pCurrent_choice, int* pCurrent_mode, int pX_offset, int pY_offset);
  50.  
  51. int DownClickRace(int* pCurrent_choice, int* pCurrent_mode, int pX_offset, int pY_offset);
  52.  
  53. void StartChangeRace(void);
  54.  
  55. int ChangeRace(int* pRace_index, int pNet_mode, tNet_sequence_type pNet_race_sequence);
  56.  
  57. void DoChangeRace(void);
  58.  
  59. void DrawCar(int pCurrent_choice, int pCurrent_mode);
  60.  
  61. void SetCarFlic(void);
  62.  
  63. int UpCar(int* pCurrent_choice, int* pCurrent_mode);
  64.  
  65. int DownCar(int* pCurrent_choice, int* pCurrent_mode);
  66.  
  67. int UpClickCar(int* pCurrent_choice, int* pCurrent_mode, int pX_offset, int pY_offset);
  68.  
  69. int DownClickCar(int* pCurrent_choice, int* pCurrent_mode, int pX_offset, int pY_offset);
  70.  
  71. int ChangeCarGoAhead(int* pCurrent_choice, int* pCurrent_mode);
  72.  
  73. int ChangeCar(int pNet_mode, int* pCar_index, tNet_game_details* pNet_game);
  74.  
  75. void DoChangeCar(void);
  76.  
  77. int PartsShopRecommended(void);
  78.  
  79. void CalcPartPrice(int pCategory, int pIndex, int* pPrice, int* pCost);
  80.  
  81. int BuyPart(int pCategory, int pIndex);
  82.  
  83. void DoAutoParts(void);
  84.  
  85. void DrawPartsLabel(void);
  86.  
  87. void ErasePartsText(int pTotal_as_well);
  88.  
  89. void DrawPartsText(void);
  90.  
  91. void SetPartsImage(void);
  92.  
  93. int GetPartsMax(void);
  94.  
  95. void CalcPartsIndex(void);
  96.  
  97. void DoExchangePart(void);
  98.  
  99. int PartsShopGoAhead(int* pCurrent_choice, int* pCurrent_mode);
  100.  
  101. int UpPart(int* pCurrent_choice, int* pCurrent_mode);
  102.  
  103. int DownPart(int* pCurrent_choice, int* pCurrent_mode);
  104.  
  105. int UpClickPart(int* pCurrent_choice, int* pCurrent_mode, int pX_offset, int pY_offset);
  106.  
  107. int DownClickPart(int* pCurrent_choice, int* pCurrent_mode, int pX_offset, int pY_offset);
  108.  
  109. int PartsArrowsOn(int* pCurrent_choice, int* pCurrent_mode);
  110.  
  111. int PartsArrowsOff(int* pCurrent_choice, int* pCurrent_mode);
  112.  
  113. void StartPartsShop(void);
  114.  
  115. int DonePartsShop(int pCurrent_choice, int pCurrent_mode, int pGo_ahead, int pEscaped, int pTimed_out);
  116.  
  117. void DrawPartsShop(int pCurrent_choice, int pCurrent_mode);
  118.  
  119. void DoPartsShop(int pFade_away);
  120.  
  121. int AutoPartsDone(int pCurrent_choice, int pCurrent_mode, int pGo_ahead, int pEscaped, int pTimed_out);
  122.  
  123. tSO_result DoAutoPartsShop(void);
  124.  
  125. void SetOpponentFlic(void);
  126.  
  127. void DrawSceneyMappyInfoVieweyThing(void);
  128.  
  129. void DismissSceneyMappyInfoVieweyThing(void);
  130.  
  131. int SelectRaceDone(int pCurrent_choice, int pCurrent_mode, int pGo_ahead, int pEscaped, int pTimed_out);
  132.  
  133. int StartRaceGoAhead(int* pCurrent_choice, int* pCurrent_mode);
  134.  
  135. int TryToMoveToArrows(int* pCurrent_choice, int* pCurrent_mode);
  136.  
  137. int UpOpponent(int* pCurrent_choice, int* pCurrent_mode);
  138.  
  139. int DownOpponent(int* pCurrent_choice, int* pCurrent_mode);
  140.  
  141. int UpClickOpp(int* pCurrent_choice, int* pCurrent_mode, int pX_offset, int pY_offset);
  142.  
  143. int DownClickOpp(int* pCurrent_choice, int* pCurrent_mode, int pX_offset, int pY_offset);
  144.  
  145. void SelectRaceStart(void);
  146.  
  147. int SuggestRace(void);
  148.  
  149. void SelectRaceDraw(int pCurrent_choice, int pCurrent_mode);
  150.  
  151. tSO_result DoSelectRace(int* pSecond_time_around);
  152.  
  153. void DrawGridCar(int pX, int pY, br_pixelmap* pImage);
  154.  
  155. void DrawGrid(int pOffset, int pDraw_it);
  156.  
  157. void MoveGrid(int pFrom, int pTo, tS32 pTime_to_move);
  158.  
  159. int CalcGridOffset(int pPosition);
  160.  
  161. void GridDraw(int pCurrent_choice, int pCurrent_mode);
  162.  
  163. void ActuallySwapOrder(int pFirst_index, int pSecond_index);
  164.  
  165. void DoGridTransition(int pFirst_index, int pSecond_index);
  166.  
  167. void ChallengeStart(void);
  168.  
  169. int CheckNextStage(int* pCurrent_choice, int* pCurrent_mode);
  170.  
  171. int ChallengeDone(int pCurrent_choice, int pCurrent_mode, int pGo_ahead, int pEscaped, int pTimed_out);
  172.  
  173. void DoChallengeScreen(void);
  174.  
  175. int GridDone(int pCurrent_choice, int pCurrent_mode, int pGo_ahead, int pEscaped, int pTimed_out);
  176.  
  177. void GridStart(void);
  178.  
  179. int GridMoveLeft(int* pCurrent_choice, int* pCurrent_mode);
  180.  
  181. int GridMoveRight(int* pCurrent_choice, int* pCurrent_mode);
  182.  
  183. int GridClickCar(int* pCurrent_choice, int* pCurrent_mode, int pX_offset, int pY_offset);
  184.  
  185. int GridClickNumbers(int* pCurrent_choice, int* pCurrent_mode, int pX_offset, int pY_offset);
  186.  
  187. int GridClickLeft(int* pCurrent_choice, int* pCurrent_mode, int pX_offset, int pY_offset);
  188.  
  189. int GridClickRight(int* pCurrent_choice, int* pCurrent_mode, int pX_offset, int pY_offset);
  190.  
  191. int CheckChallenge(int* pCurrent_choice, int* pCurrent_mode);
  192.  
  193. int FindBestPos(int pOur_rank);
  194.  
  195. int SortGridFunction(const void* pFirst_one, const void* pSecond_one);
  196.  
  197. void SortOpponents(void);
  198.  
  199. tSO_result DoGridPosition(void);
  200.  
  201. void CheckPlayersAreResponding(void);
  202.  
  203. void NetSynchStartStart(void);
  204.  
  205. // Suffix added to avoid duplicate symbol
  206. void DrawAnItem__racestrt(int pX, int pY_index, int pFont_index, char* pText);
  207.  
  208. void NetSynchStartDraw(int pCurrent_choice, int pCurrent_mode);
  209.  
  210. int NetSynchStartDone(int pCurrent_choice, int pCurrent_mode, int pGo_ahead, int pEscaped, int pTimed_out);
  211.  
  212. int NetSynchStartGoAhead(int* pCurrent_choice, int* pCurrent_mode);
  213.  
  214. int ExitWhenReady(int* pCurrent_choice, int* pCurrent_mode);
  215.  
  216. tSO_result NetSynchRaceStart2(tNet_synch_mode pMode);
  217.  
  218. tSO_result NetSynchRaceStart(void);
  219.  
  220. #endif
  221.