Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. #ifndef __ID_CA__
  2. #define __ID_CA__
  3.  
  4. //===========================================================================
  5.  
  6. #define NUMMAPS         60
  7. #ifdef USE_FLOORCEILINGTEX
  8.     #define MAPPLANES       3
  9. #else
  10.     #define MAPPLANES       2
  11. #endif
  12.  
  13. #define UNCACHEGRCHUNK(chunk) {if(grsegs[chunk]) {free(grsegs[chunk]); grsegs[chunk]=NULL;}}
  14. #define UNCACHEAUDIOCHUNK(chunk) {if(audiosegs[chunk]) {free(audiosegs[chunk]); audiosegs[chunk]=NULL;}}
  15.  
  16. //===========================================================================
  17.  
  18. typedef struct
  19. {
  20.     int32_t planestart[3];
  21.     word    planelength[3];
  22.     word    width,height;
  23.     char    name[16];
  24. } maptype;
  25.  
  26. //===========================================================================
  27.  
  28. extern  int   mapon;
  29.  
  30. extern  word *mapsegs[MAPPLANES];
  31. extern  byte *audiosegs[NUMSNDCHUNKS];
  32. extern  byte *grsegs[NUMCHUNKS];
  33.  
  34. extern  char  extension[5];
  35. extern  char  graphext[5];
  36. extern  char  audioext[5];
  37.  
  38. //===========================================================================
  39.  
  40. boolean CA_LoadFile (const char *filename, memptr *ptr);
  41. boolean CA_WriteFile (const char *filename, void *ptr, int32_t length);
  42.  
  43. int32_t CA_RLEWCompress (word *source, int32_t length, word *dest, word rlewtag);
  44.  
  45. void CA_RLEWexpand (word *source, word *dest, int32_t length, word rlewtag);
  46.  
  47. void CA_Startup (void);
  48. void CA_Shutdown (void);
  49.  
  50. int32_t CA_CacheAudioChunk (int chunk);
  51. void CA_LoadAllSounds (void);
  52.  
  53. void CA_CacheGrChunk (int chunk);
  54. void CA_CacheMap (int mapnum);
  55.  
  56. void CA_CacheScreen (int chunk);
  57.  
  58. void CA_CannotOpen(const char *name);
  59.  
  60. #endif
  61.