X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_ca.h;h=b08b6dcd80d0ec33e7ad2c2994a2082a7dac4417;hb=9faff683f275abe93daa14b968af0126a21c50e5;hp=49a3e91e2d7b8711bb8caa5946dcb29807673ca3;hpb=17998320acbe20dc2bbca909922109fc65e82e9f;p=16.git
diff --git a/src/lib/16_ca.h b/src/lib/16_ca.h
old mode 100644
new mode 100755
index 49a3e91e..b08b6dcd
--- a/src/lib/16_ca.h
+++ b/src/lib/16_ca.h
@@ -1,49 +1,59 @@
-/* Catacomb Apocalypse Source Code
- * Copyright (C) 1993-2014 Flat Rock Software
+/* Project 16 Source Code~
+ * Copyright (C) 2012-2023 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
-
-#ifndef __16_MM__
-#include "src/lib/16_head.h"
+#define __16_CA__
+
+#ifndef __16_MM__
+#include "src/lib/16_head.h"
#include "src/lib/16_mm.h"
#endif
//===========================================================================
-//#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];
@@ -64,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,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);
+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);