]> 4ch.mooo.com Git - 16.git/blob - src/lib/16_ca.h
16_ca needs huge amounts of work and I should remember what needs to be done soon...
[16.git] / src / lib / 16_ca.h
1 /* Catacomb Apocalypse Source Code\r
2  * Copyright (C) 1993-2014 Flat Rock Software\r
3  *\r
4  * This program is free software; you can redistribute it and/or modify\r
5  * it under the terms of the GNU General Public License as published by\r
6  * the Free Software Foundation; either version 2 of the License, or\r
7  * (at your option) any later version.\r
8  *\r
9  * This program is distributed in the hope that it will be useful,\r
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
12  * GNU General Public License for more details.\r
13  *\r
14  * You should have received a copy of the GNU General Public License along\r
15  * with this program; if not, write to the Free Software Foundation, Inc.,\r
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
17  */\r
18 \r
19 // ID_CA.H\r
20 #ifndef __16_CA__\r
21 #define __16_CA__\r
22 \r
23 #ifndef __16_MM__\r
24 #include "src/lib/16_head.h"\r
25 #include "src/lib/16_mm.h"\r
26 #endif\r
27 \r
28 //===========================================================================\r
29 \r
30 /*moved to src/lib/16_tdef.h\r
31 #define NOMAPS\r
32 #define NOGRAPHICS\r
33 #define NOAUDIO\r
34 \r
35 #define MAPHEADERLINKED\r
36 //#define GRHEADERLINKED\r
37 #define AUDIOHEADERLINKED\r
38 \r
39 #define NUMMAPS         39\r
40 #define MAPPLANES               3*/\r
41 //++++#define PROFILE//++++\r
42 \r
43 //===========================================================================\r
44 \r
45 /*typedef struct\r
46 {\r
47         unsigned        RLEWtag;\r
48         long            headeroffsets[100];\r
49         byte            tileinfo[];\r
50 } mapfiletype;\r
51 \r
52 typedef struct\r
53 {\r
54         long            planestart[3];\r
55         unsigned        planelength[3];\r
56         unsigned        width,height;\r
57         char            name[16];\r
58 } maptype;*/\r
59 \r
60 //===========================================================================\r
61 \r
62 /*extern        byte            _seg    *tinf;\r
63 extern  int                     mapon;\r
64 \r
65 extern  unsigned        _seg    *mapsegs[3];\r
66 extern  maptype         _seg    *mapheaderseg[NUMMAPS];\r
67 extern  byte            _seg    *audiosegs[NUMSNDCHUNKS];\r
68 extern  void            _seg    *grsegs[NUMCHUNKS];\r
69 \r
70 extern  byte            far     grneeded[NUMCHUNKS];\r
71 extern  byte            ca_levelbit,ca_levelnum;\r
72 \r
73 extern  char            *titleptr[8];*/\r
74 \r
75 //extern\r
76 \r
77 //\r
78 // hooks for custom cache dialogs\r
79 //\r
80 extern  void    (*drawcachebox)         (char *title, unsigned numcache);\r
81 extern  void    (*updatecachebox)       (void);\r
82 extern  void    (*finishcachebox)       (void);\r
83 \r
84 //===========================================================================\r
85 \r
86 // just for the score box reshifting\r
87 \r
88 //void CAL_ShiftSprite (unsigned segment,unsigned source,unsigned dest,unsigned width, unsigned height, unsigned pixshift, boolean domask);\r
89 \r
90 //===========================================================================\r
91 \r
92 void CA_OpenDebug (global_game_variables_t *gvar);\r
93 void CA_CloseDebug (global_game_variables_t *gvar);\r
94 boolean CA_FarRead (int handle, byte far *dest, dword length, global_game_variables_t *gvar);\r
95 boolean CA_FarWrite (int handle, byte far *source, dword length, global_game_variables_t *gvar);\r
96 \r
97 boolean CA_ReadFile (char *filename, memptr *ptr, global_game_variables_t *gvar);\r
98 boolean CA_WriteFile (char *filename, void far *ptr, long length, global_game_variables_t *gvar);\r
99 boolean CA_LoadFile (char *filename, memptr *ptr, global_game_variables_t *gvar);\r
100 \r
101 long CA_RLEWCompress (unsigned far *source, long length, unsigned far *dest,unsigned rlewtag);\r
102 \r
103 void CA_RLEWexpand (unsigned far *source, unsigned far *dest,long length,unsigned rlewtag);\r
104 \r
105 void CA_Startup (global_game_variables_t *gvar);\r
106 void CA_Shutdown (global_game_variables_t *gvar);\r
107 \r
108 //void CA_CacheAudioChunk (int chunk);\r
109 //void CA_LoadAllSounds (void);\r
110 \r
111 /*void CA_UpLevel (void);\r
112 void CA_DownLevel (void);*/\r
113 \r
114 void CA_SetGrPurge (global_game_variables_t *gvar);\r
115 void CA_SetAllPurge (global_game_variables_t *gvar);\r
116 \r
117 void CA_ClearMarks (global_game_variables_t *gvar);\r
118 void CA_ClearAllMarks (global_game_variables_t *gvar);\r
119 \r
120 /*#define CA_MarkGrChunk(chunk) grneeded[chunk]|=ca_levelbit\r
121 \r
122 void CA_CacheGrChunk (int chunk);\r
123 void CA_CacheMap (int mapnum);\r
124 \r
125 void CA_CacheMarks (char *title);*/\r
126 #endif\r