Subversion Repositories Games.Carmageddon

Rev

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

  1. #ifndef _LOADING_H_
  2. #define _LOADING_H_
  3.  
  4. #include "brender/br_types.h"
  5. #include "dr_types.h"
  6.  
  7. extern tHeadup_info gHeadup_image_info[32];
  8. extern char* gYour_car_names[2][6];
  9. extern char* gDrivable_car_names[6];
  10. extern char* gDamage_names[12];
  11. extern char* gWheel_actor_names[6];
  12. extern char* gRaces_file_names[9];
  13. extern char* gNet_avail_names[4];
  14. extern char* gFloorpan_names[5];
  15. extern int gAllow_open_to_fail;
  16. extern int gDecode_thing;
  17. extern char gDecode_string[14];
  18. extern int gFunk_groove_flags[30];
  19. extern char gDef_def_water_screen_name[32];
  20. extern br_material* gDestn_screen_mat;
  21. extern br_material* gSource_screen_mat;
  22. extern int gCurrent_race_file_index;
  23. extern int gGroove_funk_offset;
  24. extern int gDemo_armour;
  25. extern int gDemo_rank;
  26. extern int gDemo_opponents[5];
  27. extern int gDemo_power;
  28. extern int gDemo_offensive;
  29.  
  30. tU32 ReadU32(FILE* pF);
  31.  
  32. tU16 ReadU16(FILE* pF);
  33.  
  34. tU8 ReadU8(FILE* pF);
  35.  
  36. tS32 ReadS32(FILE* pF);
  37.  
  38. tS16 ReadS16(FILE* pF);
  39.  
  40. tS8 ReadS8(FILE* pF);
  41.  
  42. void WriteU32L(FILE* pF, tU32 pNumber);
  43.  
  44. void WriteU16L(FILE* pF, tU16 pNumber);
  45.  
  46. void WriteU8L(FILE* pF, tU8 pNumber);
  47.  
  48. void WriteS32L(FILE* pF, tS32 pNumber);
  49.  
  50. void WriteS16L(FILE* pF, tS16 pNumber);
  51.  
  52. void WriteS8L(FILE* pF, tS8 pNumber);
  53.  
  54. void SkipBytes(FILE* pF, int pBytes_to_skip);
  55.  
  56. tU32 MemReadU32(char** pPtr);
  57.  
  58. tU16 MemReadU16(char** pPtr);
  59.  
  60. tU8 MemReadU8(char** pPtr);
  61.  
  62. tS32 MemReadS32(char** pPtr);
  63.  
  64. tS16 MemReadS16(char** pPtr);
  65.  
  66. tS8 MemReadS8(char** pPtr);
  67.  
  68. void MemSkipBytes(char** pPtr, int pBytes_to_skip);
  69.  
  70. void LoadGeneralParameters(void);
  71.  
  72. void FinishLoadingGeneral(void);
  73.  
  74. br_pixelmap* LoadPixelmap(char* pName);
  75.  
  76. br_uint_32 LoadPixelmaps(char* pFile_name, br_pixelmap** pPixelmaps, br_uint_16 pNum);
  77.  
  78. br_pixelmap* LoadShadeTable(char* pName);
  79.  
  80. br_material* LoadMaterial(char* pName);
  81.  
  82. br_model* LoadModel(char* pName);
  83.  
  84. br_actor* LoadActor(char* pName);
  85.  
  86. void DRLoadPalette(char* pPath_name);
  87.  
  88. void DRLoadShadeTable(char* pPath_name);
  89.  
  90. void RezeroPixelmaps(br_pixelmap** pPixelmap_array, int pCount);
  91.  
  92. void DRLoadPixelmaps(char* pPath_name);
  93.  
  94. void DRLoadMaterials(char* pPath_name);
  95.  
  96. void DRLoadModels(char* pPath_name);
  97.  
  98. void DRLoadActors(char* pPath_name);
  99.  
  100. void DRLoadLights(char* pPath_name);
  101.  
  102. void LoadInFiles(char* pThe_base_path, char* pThe_dir_name, void (*pLoad_routine)(char*));
  103.  
  104. void LoadInRegisteeDir(char* pThe_dir_path);
  105.  
  106. void LoadInRegistees(void);
  107.  
  108. void LoadKeyMapping(void);
  109.  
  110. void LoadInterfaceStuff(int pWithin_race);
  111.  
  112. void UnlockInterfaceStuff(void);
  113.  
  114. void InitInterfaceLoadState(void);
  115.  
  116. tS8* ConvertPixTo16BitStripMap(br_pixelmap* pBr_map);
  117.  
  118. tS8* ConvertPixToStripMap(br_pixelmap* pThe_br_map);
  119.  
  120. void KillWindscreen(br_model* pModel, br_material* pMaterial);
  121.  
  122. void DropOffDyingPeds(tCar_spec* pCar);
  123.  
  124. void DisposeCar(tCar_spec* pCar_spec, int pOwner);
  125.  
  126. void AdjustCarCoordinates(tCar_spec* pCar);
  127.  
  128. void LoadSpeedo(FILE* pF, int pIndex, tCar_spec* pCar_spec);
  129.  
  130. void LoadTacho(FILE* pF, int pIndex, tCar_spec* pCar_spec);
  131.  
  132. void LoadHeadups(FILE* pF, int pIndex, tCar_spec* pCar_spec);
  133.  
  134. void ReadNonCarMechanicsData(FILE* pF, tNon_car_spec* non_car);
  135.  
  136. void ReadMechanicsData(FILE* pF, tCar_spec* c);
  137.  
  138. void LoadGear(FILE* pF, int pIndex, tCar_spec* pCar_spec);
  139.  
  140. void AddRefOffset(int* pRef_holder);
  141.  
  142. void GetDamageProgram(FILE* pF, tCar_spec* pCar_spec, tImpact_location pImpact_location);
  143.  
  144. intptr_t LinkModel(br_actor* pActor, tModel_pool* pModel_pool);
  145.  
  146. void FreeUpBonnetModels(br_model** pModel_array, int pModel_count);
  147.  
  148. void LinkModelsToActor(br_actor* pActor, br_model** pModel_array, int pModel_count);
  149.  
  150. void ReadShrapnelMaterials(FILE* pF, tCollision_info* pCar_spec);
  151.  
  152. void CloneCar(tCar_spec** pOutput_car, tCar_spec* pInput_car);
  153.  
  154. void DisposeClonedCar(tCar_spec* pCar);
  155.  
  156. int RemoveDoubleSided(br_model* pModel);
  157.  
  158. void MungeWindscreen(br_model* pModel);
  159.  
  160. void SetModelFlags(br_model* pModel, int pOwner);
  161.  
  162. void LoadCar(char* pCar_name, tDriver pDriver, tCar_spec* pCar_spec, int pOwner, char* pDriver_name, tBrender_storage* pStorage_space);
  163.  
  164. void LoadHeadupImages(void);
  165.  
  166. void DisposeHeadupImages(void);
  167.  
  168. FILE* OpenRaceFile(void);
  169.  
  170. void SkipRestOfRace(FILE* pF);
  171.  
  172. void LoadRaces(tRace_list_spec* pRace_list, int* pCount, int pRace_type_index);
  173.  
  174. void UnlockOpponentMugshot(int pIndex);
  175.  
  176. void LoadOpponentMugShot(int pIndex);
  177.  
  178. void DisposeOpponentGridIcon(tRace_info* pRace_info, int pIndex);
  179.  
  180. void LoadOpponentGridIcon(tRace_info* pRace_info, int pIndex);
  181.  
  182. void LoadRaceInfo(int pRace_index, tRace_info* pRace_info);
  183.  
  184. void DisposeRaceInfo(tRace_info* pRace_info);
  185.  
  186. void LoadGridIcons(tRace_info* pRace_info);
  187.  
  188. void DisposeGridIcons(tRace_info* pRace_info);
  189.  
  190. void LoadOpponents(void);
  191.  
  192. br_font* LoadBRFont(char* pName);
  193.  
  194. void LoadParts(void);
  195.  
  196. void UnlockParts(void);
  197.  
  198. br_pixelmap* LoadChromeFont(void);
  199.  
  200. void DisposeChromeFont(br_pixelmap* pThe_font);
  201.  
  202. int GetALineAndInterpretCommand(FILE* pF, char** pString_list, int pCount);
  203.  
  204. int GetAnInt(FILE* pF);
  205.  
  206. float GetAFloat(FILE* pF);
  207.  
  208. float GetAFloatPercent(FILE* pF);
  209.  
  210. void GetPairOfFloats(FILE* pF, float* pF1, float* pF2);
  211.  
  212. void GetThreeFloats(FILE* pF, float* pF1, float* pF2, float* pF3);
  213.  
  214. void GetPairOfInts(FILE* pF, int* pF1, int* pF2);
  215.  
  216. void GetThreeInts(FILE* pF, int* pF1, int* pF2, int* pF3);
  217.  
  218. void GetThreeIntsAndAString(FILE* pF, int* pF1, int* pF2, int* pF3, char* pS);
  219.  
  220. void GetFourInts(FILE* pF, int* pF1, int* pF2, int* pF3, int* pF4);
  221.  
  222. br_scalar GetAScalar(FILE* pF);
  223.  
  224. void GetPairOfScalars(FILE* pF, br_scalar* pS1, br_scalar* pS2);
  225.  
  226. void GetThreeScalars(FILE* pF, br_scalar* pS1, br_scalar* pS2, br_scalar* pS3);
  227.  
  228. void GetFourScalars(FILE* pF, br_scalar* pF1, br_scalar* pF2, br_scalar* pF3, br_scalar* pF4);
  229.  
  230. void GetFiveScalars(FILE* pF, br_scalar* pF1, br_scalar* pF2, br_scalar* pF3, br_scalar* pF4, br_scalar* pF5);
  231.  
  232. void GetNScalars(FILE* pF, int pNumber, br_scalar* pScalars);
  233.  
  234. void GetPairOfFloatPercents(FILE* pF, float* pF1, float* pF2);
  235.  
  236. void GetThreeFloatPercents(FILE* pF, float* pF1, float* pF2, float* pF3);
  237.  
  238. void GetAString(FILE* pF, char* pString);
  239.  
  240. void AboutToLoadFirstCar(void);
  241.  
  242. void LoadOpponentsCars(tRace_info* pRace_info);
  243.  
  244. void DisposeOpponentsCars(tRace_info* pRace_info);
  245.  
  246. void LoadMiscStrings(void);
  247.  
  248. void FillInRaceInfo(tRace_info* pThe_race);
  249.  
  250. FILE* OldDRfopen(char* pFilename, char* pMode);
  251.  
  252. void AllowOpenToFail(void);
  253.  
  254. void DoNotAllowOpenToFail(void);
  255.  
  256. FILE* DRfopen(char* pFilename, char* pMode);
  257.  
  258. int GetCDPathFromPathsTxtFile(char* pPath_name);
  259.  
  260. int TestForOriginalCarmaCDinDrive(void);
  261.  
  262. int OriginalCarmaCDinDrive(void);
  263.  
  264. int CarmaCDinDriveOrFullGameInstalled(void);
  265.  
  266. void ReadNetworkSettings(FILE* pF, tNet_game_options* pOptions);
  267.  
  268. int PrintNetOptions(FILE* pF, int pIndex);
  269.  
  270. int SaveOptions(void);
  271.  
  272. int RestoreOptions(void);
  273.  
  274. void InitFunkGrooveFlags(void);
  275.  
  276. #endif
  277.