X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_ca.h;h=b69e96d4d43b1b76366aed1037444d32575c2ef4;hb=181c6beee3d42da41fc53f44f0aa3e9315016ad2;hp=87c90fba569d141aa82dabe6f274a53ee14dde60;hpb=30b59dda179a11477b5e7787720d83395bd61520;p=16.git diff --git a/src/lib/16_ca.h b/src/lib/16_ca.h old mode 100644 new mode 100755 index 87c90fba..b69e96d4 --- a/src/lib/16_ca.h +++ b/src/lib/16_ca.h @@ -1,29 +1,29 @@ -/* 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__ -#include -#include -#include - #ifndef __16_MM__ #include "src/lib/16_head.h" #include "src/lib/16_mm.h" @@ -31,20 +31,29 @@ //=========================================================================== -//#define NOMAPS -//#define NOGRAPHICS -//#define NOAUDIO +/*moved to src/lib/16_tdef.h +#define NOMAPS +#define NOGRAPHICS +#define NOAUDIO -//#define MAPHEADERLINKED +#define MAPHEADERLINKED //#define GRHEADERLINKED -//#define AUDIOHEADERLINKED +#define AUDIOHEADERLINKED -//#define NUMMAPS 39 -//#define MAPPLANES 3 +#define NUMMAPS 39 +#define MAPPLANES 3*/ +//++++#define PROFILE//++++ //=========================================================================== -/*typedef struct +/*typedef struct +{ + unsigned RLEWtag; + long headeroffsets[100]; + byte tileinfo[]; +} mapfiletype; + +typedef struct { long planestart[3]; unsigned planelength[3]; @@ -65,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 @@ -84,32 +93,35 @@ extern void (*finishcachebox) (void); //=========================================================================== -void CA_OpenDebug (void); -void CA_CloseDebug (void); -boolean CA_FarRead (int handle, byte far *dest, dword length); -boolean CA_FarWrite (int handle, byte far *source, dword length); -boolean CA_ReadFile (char *filename, memptr *ptr); -boolean CA_LoadFile (char *filename, memptr *ptr, mminfo_t *mm, mminfotype *mmi); +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); + +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); -//long CA_RLEWCompress (unsigned huge *source, long length, unsigned huge *dest,unsigned rlewtag); +long CA_RLEWCompress (unsigned far *source, long length, unsigned far *dest,unsigned rlewtag); -//void CA_RLEWexpand (unsigned huge *source, unsigned huge *dest,long length,unsigned rlewtag); +void CA_RLEWexpand (unsigned far *source, unsigned far *dest,long length,unsigned rlewtag); -void CA_Startup (void); -void CA_Shutdown (void); +void CA_Startup (global_game_variables_t *gvar); +void CA_Shutdown (global_game_variables_t *gvar); //void CA_CacheAudioChunk (int chunk); //void CA_LoadAllSounds (void); /*void CA_UpLevel (void); -void CA_DownLevel (void); +void CA_DownLevel (void);*/ -void CA_SetAllPurge (void); +void CA_SetGrPurge (global_game_variables_t *gvar); +void CA_SetAllPurge (global_game_variables_t *gvar); -void CA_ClearMarks (void); -void CA_ClearAllMarks (void); +void CA_ClearMarks (global_game_variables_t *gvar); +void CA_ClearAllMarks (global_game_variables_t *gvar); -#define CA_MarkGrChunk(chunk) grneeded[chunk]|=ca_levelbit +/*#define CA_MarkGrChunk(chunk) grneeded[chunk]|=ca_levelbit void CA_CacheGrChunk (int chunk); void CA_CacheMap (int mapnum);