1 /* Project 16 Source Code~
\r
2 * Copyright (C) 2012-2019 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover
\r
4 * This file is part of Project 16.
\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
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
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
28 #include "src/lib/16_head.h"
\r
29 #include "src/lib/16_mm.h"
\r
32 //===========================================================================
\r
34 /*moved to src/lib/16_tdef.h
\r
39 #define MAPHEADERLINKED
\r
40 //#define GRHEADERLINKED
\r
41 #define AUDIOHEADERLINKED
\r
44 #define MAPPLANES 3*/
\r
45 //++++#define PROFILE//++++
\r
47 //===========================================================================
\r
52 long headeroffsets[100];
\r
59 unsigned planelength[3];
\r
60 unsigned width,height;
\r
64 //===========================================================================
\r
66 /*extern byte _seg *tinf;
\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
74 extern byte far grneeded[NUMCHUNKS];
\r
75 extern byte ca_levelbit,ca_levelnum;
\r
77 extern char *titleptr[8];*/
\r
82 // hooks for custom cache dialogs
\r
84 extern void (*drawcachebox) (char *title, unsigned numcache);
\r
85 extern void (*updatecachebox) (void);
\r
86 extern void (*finishcachebox) (void);
\r
88 //===========================================================================
\r
90 // just for the score box reshifting
\r
92 //void CAL_ShiftSprite (unsigned segment,unsigned source,unsigned dest,unsigned width, unsigned height, unsigned pixshift, boolean domask);
\r
94 //===========================================================================
\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
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
105 long CA_RLEWCompress (unsigned far *source, long length, unsigned far *dest,unsigned rlewtag);
\r
107 void CA_RLEWexpand (unsigned far *source, unsigned far *dest,long length,unsigned rlewtag);
\r
109 void CA_Startup (global_game_variables_t *gvar);
\r
110 void CA_Shutdown (global_game_variables_t *gvar);
\r
112 //void CA_CacheAudioChunk (int chunk);
\r
113 //void CA_LoadAllSounds (void);
\r
115 /*void CA_UpLevel (void);
\r
116 void CA_DownLevel (void);*/
\r
118 void CA_SetGrPurge (global_game_variables_t *gvar);
\r
119 void CA_SetAllPurge (global_game_variables_t *gvar);
\r
121 void CA_ClearMarks (global_game_variables_t *gvar);
\r
122 void CA_ClearAllMarks (global_game_variables_t *gvar);
\r
124 /*#define CA_MarkGrChunk(chunk) grneeded[chunk]|=ca_levelbit
\r
126 void CA_CacheGrChunk (int chunk);
\r
127 void CA_CacheMap (int mapnum);
\r
129 void CA_CacheMarks (char *title);*/
\r