X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_ca.c;h=2ed42cd88e713061eab42f57ad006bf47f0007f6;hb=6021fc3f27b895d382fbd30488ead35657e39196;hp=6580e2393065732cb8ddcaa170eb63e4fa77d6f3;hpb=2fb58644b5c539decd246968bc9cc99b94069364;p=16.git diff --git a/src/lib/16_ca.c b/src/lib/16_ca.c index 6580e239..2ed42cd8 100755 --- a/src/lib/16_ca.c +++ b/src/lib/16_ca.c @@ -1,19 +1,23 @@ -/* Catacomb Apocalypse Source Code - * Copyright (C) 1993-2014 Flat Rock Software +/* Project 16 Source Code~ + * Copyright (C) 2012-2018 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.C @@ -163,7 +167,7 @@ CASVT GRFILEPOS(int c, global_game_variables_t *gvar) } #endif -#define EXTENSION "hb1" +//#define EXTENSION "hb1" /* ============================================================================= @@ -1041,7 +1045,7 @@ void CAL_SetupGrFile (global_game_variables_t *gvar) // strcpy(fname,GDICTNAME); - strcat(fname,EXTENSION); + strcat(fname,"hb1"); if ((handle = open(fname, O_RDONLY | O_BINARY, S_IREAD)) == -1) @@ -1056,7 +1060,7 @@ void CAL_SetupGrFile (global_game_variables_t *gvar) MM_GetPtr (MEMPTRCONV gvar->ca.grstarts,(NUMCHUNKS+1)*FILEPOSSIZE, gvar); strcpy(fname,GHEADNAME); - strcat(fname,EXTENSION); + strcat(fname,"hb1"); if ((handle = open(fname, O_RDONLY | O_BINARY, S_IREAD)) == -1) @@ -1073,7 +1077,7 @@ void CAL_SetupGrFile (global_game_variables_t *gvar) // Open the graphics file, leaving it open until the game is finished // strcpy(fname,GFILENAME); - strcat(fname,EXTENSION); + strcat(fname,"hb1"); gvar->ca.file.grhandle = open(fname, O_RDONLY | O_BINARY); if (gvar->ca.file.grhandle == -1) @@ -1885,7 +1889,7 @@ void CA_CacheGrChunk (int chunk) CAL_ExpandGrChunk (chunk,source); if (compressed>BUFFERSIZE) - MM_FreePtr(&bigbufferseg); + MM_FreePtr (MEMPTRCONV bigbufferseg); } */ @@ -1978,8 +1982,8 @@ void CA_CacheMap (global_game_variables_t *gvar) source = gvar->mm.bufferseg; else { - MM_GetPtr(&bigbufferseg,compressed, gvar); - MM_SetLock (&bigbufferseg,true, gvar); + MM_GetPtr(MEMPTRCONV bigbufferseg,compressed, gvar); + MM_SetLock (MEMPTRCONV bigbufferseg,true, gvar); source = bigbufferseg; } @@ -2008,7 +2012,7 @@ void CA_CacheMap (global_game_variables_t *gvar) #endif if (compressed>BUFFERSIZE) - MM_FreePtr(&bigbufferseg, gvar); + MM_FreePtr(MEMPTRCONV bigbufferseg, gvar); } } @@ -2116,7 +2120,7 @@ void CA_SetGrPurge (global_game_variables_t *gvar) for (i=0;ica.grsegs[i]) - MM_SetPurge (gvar->ca.grsegs[i],3, gvar); + MM_SetPurge (MEMPTRCONV gvar->ca.grsegs[i],3, gvar); }