OSDN Git Service

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