OSDN Git Service

updated copyleft and need to test and fix newer version of open watcom
[proj16/16.git] / src / lib / 16_ca.h
old mode 100644 (file)
new mode 100755 (executable)
index d424b80..7a199ec
@@ -1,29 +1,29 @@
-/* Catacomb Apocalypse Source Code\r
- * Copyright (C) 1993-2014 Flat Rock Software\r
+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2022 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
  *\r
- * This program is free software; you can redistribute it and/or modify\r
+ * This file is part of Project 16.\r
+ *\r
+ * Project 16 is free software; you can redistribute it and/or modify\r
  * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 2 of the License, or\r
+ * the Free Software Foundation; either version 3 of the License, or\r
  * (at your option) any later version.\r
  *\r
- * This program is distributed in the hope that it will be useful,\r
+ * Project 16 is distributed in the hope that it will be useful,\r
  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
  * GNU General Public License for more details.\r
  *\r
- * You should have received a copy of the GNU General Public License along\r
- * with this program; if not, write to the Free Software Foundation, Inc.,\r
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or\r
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
+ * Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
  */\r
 \r
 // ID_CA.H\r
 #ifndef __16_CA__\r
 #define __16_CA__\r
 \r
-#include <unistd.h>\r
-#include <fcntl.h>\r
-#include <sys/stat.h>\r
-\r
 #ifndef __16_MM__\r
 #include "src/lib/16_head.h"\r
 #include "src/lib/16_mm.h"\r
 \r
 //===========================================================================\r
 \r
-//#define NOMAPS\r
-//#define NOGRAPHICS\r
-//#define NOAUDIO\r
+/*moved to src/lib/16_tdef.h\r
+#define NOMAPS\r
+#define NOGRAPHICS\r
+#define NOAUDIO\r
 \r
-//#define MAPHEADERLINKED\r
+#define MAPHEADERLINKED\r
 //#define GRHEADERLINKED\r
-//#define AUDIOHEADERLINKED\r
+#define AUDIOHEADERLINKED\r
 \r
-//#define NUMMAPS              39\r
-//#define MAPPLANES            3\r
+#define NUMMAPS                39\r
+#define MAPPLANES              3*/\r
+//++++#define PROFILE//++++\r
 \r
 //===========================================================================\r
 \r
-/*typedef      struct\r
+/*typedef struct\r
+{\r
+       unsigned        RLEWtag;\r
+       long            headeroffsets[100];\r
+       byte            tileinfo[];\r
+} mapfiletype;\r
+\r
+typedef        struct\r
 {\r
        long            planestart[3];\r
        unsigned        planelength[3];\r
@@ -65,9 +74,9 @@ extern        void            _seg    *grsegs[NUMCHUNKS];
 extern byte            far     grneeded[NUMCHUNKS];\r
 extern byte            ca_levelbit,ca_levelnum;\r
 \r
-extern char            *titleptr[8];\r
+extern char            *titleptr[8];*/\r
 \r
-extern int                     profilehandle,debughandle;*/\r
+//extern\r
 \r
 //\r
 // hooks for custom cache dialogs\r
@@ -84,32 +93,35 @@ extern      void    (*finishcachebox)       (void);
 \r
 //===========================================================================\r
 \r
-void CA_OpenDebug (void);\r
-void CA_CloseDebug (void);\r
-boolean CA_FarRead (int handle, byte huge *dest, dword length);\r
-boolean CA_FarWrite (int handle, byte huge *source, dword length);\r
-boolean CA_ReadFile (char *filename, memptr *ptr);\r
-boolean CA_LoadFile (char *filename, memptr *ptr, mminfo_t *mm, mminfotype *mmi);\r
+void CA_OpenDebug (global_game_variables_t *gvar);\r
+void CA_CloseDebug (global_game_variables_t *gvar);\r
+boolean CA_FarRead (int handle, byte far *dest, dword length, global_game_variables_t *gvar);\r
+boolean CA_FarWrite (int handle, byte far *source, dword length, global_game_variables_t *gvar);\r
+\r
+boolean CA_ReadFile (char *filename, memptr *ptr, global_game_variables_t *gvar);\r
+boolean CA_WriteFile (char *filename, void far *ptr, long length, global_game_variables_t *gvar);\r
+boolean CA_LoadFile (char *filename, memptr *ptr, global_game_variables_t *gvar);\r
 \r
-//long CA_RLEWCompress (unsigned huge *source, long length, unsigned huge *dest,unsigned rlewtag);\r
+long CA_RLEWCompress (unsigned far *source, long length, unsigned far *dest,unsigned rlewtag);\r
 \r
-//void CA_RLEWexpand (unsigned huge *source, unsigned huge *dest,long length,unsigned rlewtag);\r
+void CA_RLEWexpand (unsigned far *source, unsigned far *dest,long length,unsigned rlewtag);\r
 \r
-void CA_Startup (void);\r
-void CA_Shutdown (void);\r
+void CA_Startup (global_game_variables_t *gvar);\r
+void CA_Shutdown (global_game_variables_t *gvar);\r
 \r
 //void CA_CacheAudioChunk (int chunk);\r
 //void CA_LoadAllSounds (void);\r
 \r
 /*void CA_UpLevel (void);\r
-void CA_DownLevel (void);\r
+void CA_DownLevel (void);*/\r
 \r
-void CA_SetAllPurge (void);\r
+void CA_SetGrPurge (global_game_variables_t *gvar);\r
+void CA_SetAllPurge (global_game_variables_t *gvar);\r
 \r
-void CA_ClearMarks (void);\r
-void CA_ClearAllMarks (void);\r
+void CA_ClearMarks (global_game_variables_t *gvar);\r
+void CA_ClearAllMarks (global_game_variables_t *gvar);\r
 \r
-#define CA_MarkGrChunk(chunk)  grneeded[chunk]|=ca_levelbit\r
+/*#define CA_MarkGrChunk(chunk)        grneeded[chunk]|=ca_levelbit\r
 \r
 void CA_CacheGrChunk (int chunk);\r
 void CA_CacheMap (int mapnum);\r