]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_ca.c
updated the copyleft wwww i am not deAD! i just been 2 busy last 6 monthes
[16.git] / src / lib / 16_ca.c
index 6580e2393065732cb8ddcaa170eb63e4fa77d6f3..2ed42cd88e713061eab42f57ad006bf47f0007f6 100755 (executable)
@@ -1,19 +1,23 @@
-/* Catacomb Apocalypse Source Code\r
- * Copyright (C) 1993-2014 Flat Rock Software\r
+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2018 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.C\r
@@ -163,7 +167,7 @@ CASVT GRFILEPOS(int c, global_game_variables_t *gvar)
 }\r
 #endif\r
 \r
-#define EXTENSION      "hb1"\r
+//#define EXTENSION    "hb1"\r
 \r
 /*\r
 =============================================================================\r
@@ -1041,7 +1045,7 @@ void CAL_SetupGrFile (global_game_variables_t *gvar)
 //\r
 \r
        strcpy(fname,GDICTNAME);\r
-       strcat(fname,EXTENSION);\r
+       strcat(fname,"hb1");\r
 \r
        if ((handle = open(fname,\r
                 O_RDONLY | O_BINARY, S_IREAD)) == -1)\r
@@ -1056,7 +1060,7 @@ void CAL_SetupGrFile (global_game_variables_t *gvar)
        MM_GetPtr (MEMPTRCONV gvar->ca.grstarts,(NUMCHUNKS+1)*FILEPOSSIZE, gvar);\r
 \r
        strcpy(fname,GHEADNAME);\r
-       strcat(fname,EXTENSION);\r
+       strcat(fname,"hb1");\r
 \r
        if ((handle = open(fname,\r
                 O_RDONLY | O_BINARY, S_IREAD)) == -1)\r
@@ -1073,7 +1077,7 @@ void CAL_SetupGrFile (global_game_variables_t *gvar)
 // Open the graphics file, leaving it open until the game is finished\r
 //\r
        strcpy(fname,GFILENAME);\r
-       strcat(fname,EXTENSION);\r
+       strcat(fname,"hb1");\r
 \r
        gvar->ca.file.grhandle = open(fname, O_RDONLY | O_BINARY);\r
        if (gvar->ca.file.grhandle == -1)\r
@@ -1885,7 +1889,7 @@ void CA_CacheGrChunk (int chunk)
        CAL_ExpandGrChunk (chunk,source);\r
 \r
        if (compressed>BUFFERSIZE)\r
-               MM_FreePtr(&bigbufferseg);\r
+               MM_FreePtr (MEMPTRCONV bigbufferseg);\r
 }\r
 */\r
 \r
@@ -1978,8 +1982,8 @@ void CA_CacheMap (global_game_variables_t *gvar)
                        source = gvar->mm.bufferseg;\r
                else\r
                {\r
-                       MM_GetPtr(&bigbufferseg,compressed, gvar);\r
-                       MM_SetLock (&bigbufferseg,true, gvar);\r
+                       MM_GetPtr(MEMPTRCONV bigbufferseg,compressed, gvar);\r
+                       MM_SetLock (MEMPTRCONV bigbufferseg,true, gvar);\r
                        source = bigbufferseg;\r
                }\r
 \r
@@ -2008,7 +2012,7 @@ void CA_CacheMap (global_game_variables_t *gvar)
 #endif\r
 \r
                if (compressed>BUFFERSIZE)\r
-                       MM_FreePtr(&bigbufferseg, gvar);\r
+                       MM_FreePtr(MEMPTRCONV bigbufferseg, gvar);\r
        }\r
 }\r
 \r
@@ -2116,7 +2120,7 @@ void CA_SetGrPurge (global_game_variables_t *gvar)
 \r
        for (i=0;i<NUMCHUNKS;i++)\r
                if (gvar->ca.grsegs[i])\r
-                       MM_SetPurge (gvar->ca.grsegs[i],3, gvar);\r
+                       MM_SetPurge (MEMPTRCONV gvar->ca.grsegs[i],3, gvar);\r
 }\r
 \r
 \r