X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_ca.h;h=b69e96d4d43b1b76366aed1037444d32575c2ef4;hb=181c6beee3d42da41fc53f44f0aa3e9315016ad2;hp=380ae2976af9a98e094399dbfa6022510a8359e8;hpb=c4ea89ef8cb104fb6f9f9edd4f4bf55e7984a51f;p=16.git diff --git a/src/lib/16_ca.h b/src/lib/16_ca.h old mode 100644 new mode 100755 index 380ae297..b69e96d4 --- a/src/lib/16_ca.h +++ b/src/lib/16_ca.h @@ -1,63 +1,69 @@ -/* Catacomb Apocalypse Source Code - * Copyright (C) 1993-2014 Flat Rock Software +/* Project 16 Source Code~ + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * - * This program is free software; you can redistribute it and/or modify + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * Project 16 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * */ // ID_CA.H +#ifndef __16_CA__ +#define __16_CA__ -#ifndef __TYPES__ -#include "ID_TYPES.H" -#endif - -#ifndef __ID_MM__ -#include "ID_MM.H" -#endif - -#ifndef __ID_GLOB__ -#include "ID_GLOB.H" +#ifndef __16_MM__ +#include "src/lib/16_head.h" +#include "src/lib/16_mm.h" #endif -#define __ID_CA__ - //=========================================================================== -//#define NOMAPS -//#define NOGRAPHICS -//#define NOAUDIO +/*moved to src/lib/16_tdef.h +#define NOMAPS +#define NOGRAPHICS +#define NOAUDIO #define MAPHEADERLINKED -#define GRHEADERLINKED +//#define GRHEADERLINKED #define AUDIOHEADERLINKED #define NUMMAPS 39 -#define MAPPLANES 3 +#define MAPPLANES 3*/ +//++++#define PROFILE//++++ //=========================================================================== +/*typedef struct +{ + unsigned RLEWtag; + long headeroffsets[100]; + byte tileinfo[]; +} mapfiletype; + typedef struct { long planestart[3]; unsigned planelength[3]; unsigned width,height; char name[16]; -} maptype; +} maptype;*/ //=========================================================================== -extern byte _seg *tinf; +/*extern byte _seg *tinf; extern int mapon; extern unsigned _seg *mapsegs[3]; @@ -68,9 +74,9 @@ extern void _seg *grsegs[NUMCHUNKS]; extern byte far grneeded[NUMCHUNKS]; extern byte ca_levelbit,ca_levelnum; -extern char *titleptr[8]; +extern char *titleptr[8];*/ -extern int profilehandle,debughandle; +//extern // // hooks for custom cache dialogs @@ -83,42 +89,42 @@ extern void (*finishcachebox) (void); // just for the score box reshifting -void CAL_ShiftSprite (unsigned segment,unsigned source,unsigned dest, - unsigned width, unsigned height, unsigned pixshift, boolean domask); +//void CAL_ShiftSprite (unsigned segment,unsigned source,unsigned dest,unsigned width, unsigned height, unsigned pixshift, boolean domask); //=========================================================================== -void CA_OpenDebug (void); -void CA_CloseDebug (void); -boolean CA_FarRead (int handle, byte far *dest, long length); -boolean CA_FarWrite (int handle, byte far *source, long length); -boolean CA_ReadFile (char *filename, memptr *ptr); -boolean CA_LoadFile (char *filename, memptr *ptr); +void CA_OpenDebug (global_game_variables_t *gvar); +void CA_CloseDebug (global_game_variables_t *gvar); +boolean CA_FarRead (int handle, byte far *dest, dword length, global_game_variables_t *gvar); +boolean CA_FarWrite (int handle, byte far *source, dword length, global_game_variables_t *gvar); -long CA_RLEWCompress (unsigned huge *source, long length, unsigned huge *dest, - unsigned rlewtag); +boolean CA_ReadFile (char *filename, memptr *ptr, global_game_variables_t *gvar); +boolean CA_WriteFile (char *filename, void far *ptr, long length, global_game_variables_t *gvar); +boolean CA_LoadFile (char *filename, memptr *ptr, global_game_variables_t *gvar); -void CA_RLEWexpand (unsigned huge *source, unsigned huge *dest,long length, - unsigned rlewtag); +long CA_RLEWCompress (unsigned far *source, long length, unsigned far *dest,unsigned rlewtag); -void CA_Startup (void); -void CA_Shutdown (void); +void CA_RLEWexpand (unsigned far *source, unsigned far *dest,long length,unsigned rlewtag); -void CA_CacheAudioChunk (int chunk); -void CA_LoadAllSounds (void); +void CA_Startup (global_game_variables_t *gvar); +void CA_Shutdown (global_game_variables_t *gvar); -void CA_UpLevel (void); -void CA_DownLevel (void); +//void CA_CacheAudioChunk (int chunk); +//void CA_LoadAllSounds (void); -void CA_SetAllPurge (void); +/*void CA_UpLevel (void); +void CA_DownLevel (void);*/ -void CA_ClearMarks (void); -void CA_ClearAllMarks (void); +void CA_SetGrPurge (global_game_variables_t *gvar); +void CA_SetAllPurge (global_game_variables_t *gvar); -#define CA_MarkGrChunk(chunk) grneeded[chunk]|=ca_levelbit +void CA_ClearMarks (global_game_variables_t *gvar); +void CA_ClearAllMarks (global_game_variables_t *gvar); + +/*#define CA_MarkGrChunk(chunk) grneeded[chunk]|=ca_levelbit void CA_CacheGrChunk (int chunk); void CA_CacheMap (int mapnum); -void CA_CacheMarks (char *title); - +void CA_CacheMarks (char *title);*/ +#endif