2010-05-25 10:56:00 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
/*
|
|
|
|
Copyright (C) 2010 EDuke32 developers and contributors
|
|
|
|
|
|
|
|
This file is part of EDuke32.
|
|
|
|
|
|
|
|
EDuke32 is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License version 2
|
|
|
|
as published by the Free Software Foundation.
|
|
|
|
|
|
|
|
This program 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
|
2014-07-20 08:55:56 +00:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2010-05-25 10:56:00 +00:00
|
|
|
*/
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
2019-09-21 18:59:54 +00:00
|
|
|
#include "ns.h" // Must come before everything else!
|
|
|
|
|
2006-07-07 18:41:05 +00:00
|
|
|
#include "baselayer.h"
|
|
|
|
#include "cache1d.h"
|
2018-11-18 18:09:48 +00:00
|
|
|
#include "common_game.h"
|
|
|
|
#include "compat.h"
|
2006-07-07 18:41:05 +00:00
|
|
|
#include "crc32.h"
|
2006-07-22 05:20:25 +00:00
|
|
|
#include "duke3d.h"
|
|
|
|
#include "grpscan.h"
|
2018-11-18 18:09:48 +00:00
|
|
|
#include "scriptfile.h"
|
2006-07-07 18:41:05 +00:00
|
|
|
|
2019-03-01 08:51:50 +00:00
|
|
|
#include "vfs.h"
|
|
|
|
|
2017-01-18 22:21:08 +00:00
|
|
|
#ifndef EDUKE32_STANDALONE
|
2015-03-23 08:30:41 +00:00
|
|
|
static void process_vaca13(int32_t crcval);
|
|
|
|
static void process_vacapp15(int32_t crcval);
|
2015-03-23 06:28:27 +00:00
|
|
|
|
2013-04-25 17:49:10 +00:00
|
|
|
// custom GRP support for the startup window, file format reflects the structure below
|
|
|
|
#define GAMELISTFILE "games.list"
|
2016-01-11 05:06:10 +00:00
|
|
|
// name crc size flags dependency scriptname postprocessing
|
|
|
|
static internalgrpinfo_t const internalgrpfiles[] =
|
2007-08-25 01:05:00 +00:00
|
|
|
{
|
2016-01-11 05:06:10 +00:00
|
|
|
{ "Duke Nukem 3D", DUKE13_CRC, 26524524, GAMEFLAG_DUKE, 0, NULL, NULL},
|
|
|
|
{ "Duke Nukem 3D (South Korean Censored)", DUKEKR_CRC, 26385383, GAMEFLAG_DUKE, 0, NULL, NULL},
|
|
|
|
{ "Duke Nukem 3D: Atomic Edition", DUKE15_CRC, 44356548, GAMEFLAG_DUKE, 0, NULL, NULL},
|
2017-04-09 13:08:58 +00:00
|
|
|
{ "Duke Nukem 3D: Atomic Edition (WT)", DUKEWT_CRC, 44356548, GAMEFLAG_DUKE, 0, NULL, NULL},
|
2016-01-11 05:06:10 +00:00
|
|
|
{ "Duke Nukem 3D: Plutonium Pak", DUKEPP_CRC, 44348015, GAMEFLAG_DUKE, 0, NULL, NULL},
|
|
|
|
{ "Duke Nukem 3D Shareware 0.99", DUKE099_CRC, 9690241, GAMEFLAG_DUKE|GAMEFLAG_DUKEBETA, 0, NULL, NULL},
|
|
|
|
{ "Duke Nukem 3D Shareware 1.0", DUKE10_CRC, 10429258, GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE, 0, NULL, NULL},
|
|
|
|
{ "Duke Nukem 3D Shareware 1.1", DUKE11_CRC, 10442980, GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE, 0, NULL, NULL},
|
|
|
|
{ "Duke Nukem 3D Shareware 1.3D", DUKESW_CRC, 11035779, GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE, 0, NULL, NULL},
|
|
|
|
{ "Duke Nukem 3D Mac Demo", DUKEMD_CRC, 10444391, GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE, 0, NULL, NULL},
|
2017-04-24 04:35:32 +00:00
|
|
|
{ "Duke Nukem 3D MacUser Demo", DUKEMD2_CRC, 10628573, GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE, 0, NULL, NULL },
|
2016-01-11 05:06:10 +00:00
|
|
|
{ "Duke it out in D.C. (1.3D)", DUKEDC13_CRC, 7926624, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE13_CRC, NULL, NULL},
|
|
|
|
{ "Duke it out in D.C.", DUKEDCPP_CRC, 8225517, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, NULL, NULL},
|
|
|
|
{ "Duke it out in D.C.", DUKEDC_CRC, 8410183, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, NULL, NULL},
|
|
|
|
{ "Duke it out in D.C.", (int32_t) 0x39A692BF, 8410187, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, "DUKEDC.CON", NULL},
|
|
|
|
{ "Duke Caribbean: Life's a Beach (1.3D)", VACA13_CRC, 23559381, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE13_CRC, NULL, process_vaca13},
|
|
|
|
{ "Duke Caribbean: Life's a Beach (PPak)", VACAPP_CRC, 22551333, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKEPP_CRC, NULL, process_vacapp15},
|
|
|
|
{ "Duke Caribbean: Life's a Beach", VACA15_CRC, 22521880, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, NULL, process_vacapp15},
|
|
|
|
{ "Duke Caribbean: Life's a Beach", DUKECB_CRC, 22213819, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, NULL, NULL},
|
|
|
|
{ "Duke Caribbean: Life's a Beach", (int32_t) 0x65B5F690, 22397273, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, "VACATION.CON", NULL},
|
|
|
|
{ "Duke: Nuclear Winter", DUKENW_CRC, 16169365, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, "NWINTER.CON", NULL},
|
2018-01-28 04:31:00 +00:00
|
|
|
{ "Duke: Nuclear Winter Demo", (int32_t) 0xC7EFBFA9, 10965909, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, "NWINTER.CON", NULL},
|
2016-01-11 05:06:10 +00:00
|
|
|
{ "Duke!ZONE II (1.3D)", DZ2_13_CRC, 26135388, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE13_CRC, "DZ-GAME.CON", NULL},
|
|
|
|
{ "Duke!ZONE II", DZ2_PP_CRC, 44100411, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, "DZ-GAME.CON", NULL},
|
|
|
|
{ "Duke!ZONE II", (int32_t) 0x1E9516F1, 3186656, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, "DZ-GAME.CON", NULL},
|
|
|
|
{ "NAM", NAM_CRC, 43448927, GAMEFLAG_NAM, 0, NULL, NULL},
|
|
|
|
{ "NAPALM", NAPALM_CRC, 44365728, GAMEFLAG_NAM|GAMEFLAG_NAPALM, 0, NULL, NULL},
|
|
|
|
{ "WWII GI", WW2GI_CRC, 77939508, GAMEFLAG_WW2GI, 0, NULL, NULL},
|
2017-10-15 23:10:06 +00:00
|
|
|
{ "Platoon Leader", PLATOONL_CRC, 37852572, GAMEFLAG_WW2GI|GAMEFLAG_ADDON, WW2GI_CRC, "PLATOONL.DEF", NULL},
|
2007-08-25 01:05:00 +00:00
|
|
|
};
|
2017-01-18 22:21:08 +00:00
|
|
|
#endif
|
2015-03-26 20:39:02 +00:00
|
|
|
|
2015-03-27 12:30:35 +00:00
|
|
|
struct grpfile_t *foundgrps = NULL;
|
|
|
|
struct grpinfo_t *listgrps = NULL;
|
2013-04-25 17:49:10 +00:00
|
|
|
|
|
|
|
static void LoadList(const char * filename)
|
|
|
|
{
|
|
|
|
scriptfile *script = scriptfile_fromfile(filename);
|
|
|
|
|
|
|
|
if (!script)
|
|
|
|
return;
|
|
|
|
|
2017-01-18 22:21:08 +00:00
|
|
|
#ifndef EDUKE32_STANDALONE
|
2013-04-25 17:49:10 +00:00
|
|
|
scriptfile_addsymbolvalue("GAMEFLAG_DUKE", GAMEFLAG_DUKE);
|
|
|
|
scriptfile_addsymbolvalue("GAMEFLAG_ADDON", GAMEFLAG_DUKE|GAMEFLAG_ADDON);
|
2015-03-08 07:59:03 +00:00
|
|
|
scriptfile_addsymbolvalue("GAMEFLAG_NAM", GAMEFLAG_NAM);
|
|
|
|
scriptfile_addsymbolvalue("GAMEFLAG_NAPALM", GAMEFLAG_NAM|GAMEFLAG_NAPALM);
|
|
|
|
scriptfile_addsymbolvalue("GAMEFLAG_WW2GI", GAMEFLAG_NAM|GAMEFLAG_WW2GI);
|
2013-04-25 17:49:10 +00:00
|
|
|
scriptfile_addsymbolvalue("DUKE15_CRC", DUKE15_CRC);
|
2015-03-08 07:59:03 +00:00
|
|
|
scriptfile_addsymbolvalue("DUKEPP_CRC", DUKEPP_CRC);
|
2013-04-25 17:49:10 +00:00
|
|
|
scriptfile_addsymbolvalue("DUKE13_CRC", DUKE13_CRC);
|
2015-03-23 06:28:27 +00:00
|
|
|
scriptfile_addsymbolvalue("DUKEDC13_CRC", DUKEDC13_CRC);
|
|
|
|
scriptfile_addsymbolvalue("DUKEDCPP_CRC", DUKEDCPP_CRC);
|
2013-04-25 17:49:10 +00:00
|
|
|
scriptfile_addsymbolvalue("DUKEDC_CRC", DUKEDC_CRC);
|
2015-03-23 06:28:27 +00:00
|
|
|
scriptfile_addsymbolvalue("VACA13_CRC", VACA13_CRC);
|
|
|
|
scriptfile_addsymbolvalue("VACAPP_CRC", VACAPP_CRC);
|
|
|
|
scriptfile_addsymbolvalue("VACA15_CRC", VACA15_CRC);
|
2013-04-25 17:49:10 +00:00
|
|
|
scriptfile_addsymbolvalue("DUKECB_CRC", DUKECB_CRC);
|
|
|
|
scriptfile_addsymbolvalue("DUKENW_CRC", DUKENW_CRC);
|
2015-05-13 08:57:27 +00:00
|
|
|
scriptfile_addsymbolvalue("DZ2_13_CRC", DZ2_13_CRC);
|
|
|
|
scriptfile_addsymbolvalue("DZ2_PP_CRC", DZ2_PP_CRC);
|
2015-03-08 07:59:03 +00:00
|
|
|
scriptfile_addsymbolvalue("NAM_CRC", NAM_CRC);
|
|
|
|
scriptfile_addsymbolvalue("NAPALM_CRC", NAPALM_CRC);
|
|
|
|
scriptfile_addsymbolvalue("WW2GI_CRC", WW2GI_CRC);
|
2017-01-18 22:21:08 +00:00
|
|
|
#endif
|
2013-04-25 17:49:10 +00:00
|
|
|
|
|
|
|
while (!scriptfile_eof(script))
|
|
|
|
{
|
2013-04-25 21:10:25 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
T_GRPINFO,
|
|
|
|
T_GAMENAME,
|
|
|
|
T_CRC,
|
|
|
|
T_SIZE,
|
|
|
|
T_DEPCRC,
|
|
|
|
T_SCRIPTNAME,
|
|
|
|
T_DEFNAME,
|
|
|
|
T_FLAGS,
|
2018-02-11 05:03:55 +00:00
|
|
|
T_RTSNAME,
|
2013-04-25 21:10:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static const tokenlist profiletokens[] =
|
|
|
|
{
|
|
|
|
{ "grpinfo", T_GRPINFO },
|
|
|
|
};
|
|
|
|
|
2014-03-22 09:25:15 +00:00
|
|
|
int32_t token = getatoken(script,profiletokens,ARRAY_SIZE(profiletokens));
|
2013-04-25 17:49:10 +00:00
|
|
|
switch (token)
|
|
|
|
{
|
|
|
|
case T_GRPINFO:
|
2013-04-25 21:10:25 +00:00
|
|
|
{
|
|
|
|
int32_t gsize = 0, gcrcval = 0, gflags = GAMEFLAG_DUKE, gdepcrc = DUKE15_CRC;
|
|
|
|
char *gname = NULL, *gscript = NULL, *gdef = NULL;
|
2018-02-11 05:03:55 +00:00
|
|
|
char *grts = NULL;
|
2015-03-27 12:30:35 +00:00
|
|
|
char *grpend = NULL;
|
2013-04-25 21:10:25 +00:00
|
|
|
|
|
|
|
static const tokenlist grpinfotokens[] =
|
2013-04-25 17:49:10 +00:00
|
|
|
{
|
2013-04-25 21:10:25 +00:00
|
|
|
{ "name", T_GAMENAME },
|
|
|
|
{ "scriptname", T_SCRIPTNAME },
|
|
|
|
{ "defname", T_DEFNAME },
|
2018-02-11 05:03:55 +00:00
|
|
|
{ "rtsname", T_RTSNAME },
|
2013-04-25 21:10:25 +00:00
|
|
|
{ "crc", T_CRC },
|
|
|
|
{ "dependency", T_DEPCRC },
|
|
|
|
{ "size", T_SIZE },
|
|
|
|
{ "flags", T_FLAGS },
|
2013-04-25 17:49:10 +00:00
|
|
|
|
2013-04-25 21:10:25 +00:00
|
|
|
};
|
2013-04-25 17:49:10 +00:00
|
|
|
|
2013-04-25 21:10:25 +00:00
|
|
|
if (scriptfile_getbraces(script,&grpend)) break;
|
2013-04-25 17:49:10 +00:00
|
|
|
|
2013-04-25 21:10:25 +00:00
|
|
|
while (script->textptr < grpend)
|
|
|
|
{
|
2014-03-22 09:25:15 +00:00
|
|
|
int32_t token = getatoken(script,grpinfotokens,ARRAY_SIZE(grpinfotokens));
|
2013-04-25 17:49:10 +00:00
|
|
|
|
2013-04-25 21:10:25 +00:00
|
|
|
switch (token)
|
2013-04-25 17:49:10 +00:00
|
|
|
{
|
2013-04-25 21:10:25 +00:00
|
|
|
case T_GAMENAME:
|
|
|
|
scriptfile_getstring(script,&gname); break;
|
|
|
|
case T_SCRIPTNAME:
|
|
|
|
scriptfile_getstring(script,&gscript); break;
|
|
|
|
case T_DEFNAME:
|
|
|
|
scriptfile_getstring(script,&gdef); break;
|
2018-02-11 05:03:55 +00:00
|
|
|
case T_RTSNAME:
|
|
|
|
scriptfile_getstring(script,&grts); break;
|
2013-04-25 21:10:25 +00:00
|
|
|
|
|
|
|
case T_FLAGS:
|
2015-03-08 07:59:03 +00:00
|
|
|
scriptfile_getsymbol(script,&gflags); gflags &= GAMEFLAGMASK; break;
|
2013-04-25 21:10:25 +00:00
|
|
|
case T_DEPCRC:
|
|
|
|
scriptfile_getsymbol(script,&gdepcrc); break;
|
|
|
|
case T_CRC:
|
|
|
|
scriptfile_getsymbol(script,&gcrcval); break;
|
|
|
|
case T_SIZE:
|
|
|
|
scriptfile_getnumber(script,&gsize); break;
|
|
|
|
default:
|
|
|
|
break;
|
2013-04-25 17:49:10 +00:00
|
|
|
}
|
|
|
|
|
2015-03-27 12:30:35 +00:00
|
|
|
grpinfo_t * const fg = (grpinfo_t *)Xcalloc(1, sizeof(grpinfo_t));
|
2013-04-25 21:10:25 +00:00
|
|
|
fg->next = listgrps;
|
|
|
|
listgrps = fg;
|
|
|
|
|
|
|
|
if (gname)
|
2014-05-30 00:02:19 +00:00
|
|
|
fg->name = Xstrdup(gname);
|
2013-04-25 21:10:25 +00:00
|
|
|
|
|
|
|
fg->size = gsize;
|
|
|
|
fg->crcval = gcrcval;
|
|
|
|
fg->dependency = gdepcrc;
|
|
|
|
fg->game = gflags;
|
|
|
|
|
|
|
|
if (gscript)
|
|
|
|
fg->scriptname = dup_filename(gscript);
|
|
|
|
|
|
|
|
if (gdef)
|
|
|
|
fg->defname = dup_filename(gdef);
|
2018-02-11 05:03:55 +00:00
|
|
|
|
|
|
|
if (grts)
|
|
|
|
fg->rtsname = dup_filename(grts);
|
2013-04-25 21:10:25 +00:00
|
|
|
}
|
2013-04-25 17:49:10 +00:00
|
|
|
break;
|
2013-04-25 21:10:25 +00:00
|
|
|
}
|
|
|
|
|
2013-04-25 17:49:10 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
scriptfile_close(script);
|
|
|
|
scriptfile_clearsymbols();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void LoadGameList(void)
|
|
|
|
{
|
2017-01-18 22:21:08 +00:00
|
|
|
#ifndef EDUKE32_STANDALONE
|
2015-03-23 06:28:27 +00:00
|
|
|
for (size_t i = 0; i < ARRAY_SIZE(internalgrpfiles); i++)
|
2013-04-25 17:49:10 +00:00
|
|
|
{
|
2015-03-27 12:30:35 +00:00
|
|
|
grpinfo_t * const fg = (grpinfo_t *)Xcalloc(1, sizeof(grpinfo_t));
|
2013-04-25 17:49:10 +00:00
|
|
|
|
2014-05-30 00:02:19 +00:00
|
|
|
fg->name = Xstrdup(internalgrpfiles[i].name);
|
2013-04-25 17:49:10 +00:00
|
|
|
fg->crcval = internalgrpfiles[i].crcval;
|
|
|
|
fg->size = internalgrpfiles[i].size;
|
|
|
|
fg->game = internalgrpfiles[i].game;
|
|
|
|
fg->dependency = internalgrpfiles[i].dependency;
|
|
|
|
|
|
|
|
if (internalgrpfiles[i].scriptname)
|
|
|
|
fg->scriptname = dup_filename(internalgrpfiles[i].scriptname);
|
|
|
|
|
2015-03-23 06:28:27 +00:00
|
|
|
fg->postprocessing = internalgrpfiles[i].postprocessing;
|
|
|
|
|
2013-04-25 17:49:10 +00:00
|
|
|
fg->next = listgrps;
|
|
|
|
listgrps = fg;
|
|
|
|
}
|
2017-01-18 22:21:08 +00:00
|
|
|
#endif
|
2013-04-25 17:49:10 +00:00
|
|
|
|
2019-03-01 08:51:50 +00:00
|
|
|
#ifdef USE_PHYSFS
|
|
|
|
auto const base = PHYSFS_getBaseDir();
|
|
|
|
#else
|
|
|
|
static char const base[] = "/";
|
|
|
|
#endif
|
|
|
|
CACHE1D_FIND_REC * const srch = klistpath(base, "*.grpinfo", CACHE1D_FIND_FILE);
|
2013-04-25 17:49:10 +00:00
|
|
|
|
2015-03-27 12:30:35 +00:00
|
|
|
for (CACHE1D_FIND_REC *sidx = srch; sidx; sidx = sidx->next)
|
|
|
|
LoadList(sidx->name);
|
2013-04-25 17:49:10 +00:00
|
|
|
|
|
|
|
klistfree(srch);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void FreeGameList(void)
|
|
|
|
{
|
|
|
|
while (listgrps)
|
|
|
|
{
|
2019-06-25 11:29:08 +00:00
|
|
|
Xfree(listgrps->name);
|
|
|
|
Xfree(listgrps->scriptname);
|
|
|
|
Xfree(listgrps->defname);
|
|
|
|
Xfree(listgrps->rtsname);
|
2013-04-25 17:49:10 +00:00
|
|
|
|
2015-03-27 12:30:35 +00:00
|
|
|
grpinfo_t * const fg = listgrps->next;
|
2019-06-25 11:29:08 +00:00
|
|
|
Xfree(listgrps);
|
2013-04-25 17:49:10 +00:00
|
|
|
listgrps = fg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-07-07 18:41:05 +00:00
|
|
|
|
|
|
|
#define GRPCACHEFILE "grpfiles.cache"
|
2006-11-15 01:16:55 +00:00
|
|
|
static struct grpcache
|
|
|
|
{
|
2006-07-07 18:41:05 +00:00
|
|
|
struct grpcache *next;
|
2009-01-09 09:29:17 +00:00
|
|
|
int32_t size;
|
|
|
|
int32_t mtime;
|
|
|
|
int32_t crcval;
|
2009-07-12 01:55:34 +00:00
|
|
|
char name[BMAX_PATH];
|
2006-11-15 01:16:55 +00:00
|
|
|
}
|
|
|
|
*grpcache = NULL, *usedgrpcache = NULL;
|
2006-07-07 18:41:05 +00:00
|
|
|
|
2009-01-09 09:29:17 +00:00
|
|
|
static int32_t LoadGroupsCache(void)
|
2006-07-07 18:41:05 +00:00
|
|
|
{
|
|
|
|
struct grpcache *fg;
|
|
|
|
|
2009-01-09 09:29:17 +00:00
|
|
|
int32_t fsize, fmtime, fcrcval;
|
2006-07-07 18:41:05 +00:00
|
|
|
char *fname;
|
|
|
|
|
|
|
|
scriptfile *script;
|
|
|
|
|
|
|
|
script = scriptfile_fromfile(GRPCACHEFILE);
|
|
|
|
if (!script) return -1;
|
|
|
|
|
2006-11-15 01:16:55 +00:00
|
|
|
while (!scriptfile_eof(script))
|
|
|
|
{
|
2012-06-03 16:09:33 +00:00
|
|
|
if (scriptfile_getstring(script, &fname)) break; // filename
|
|
|
|
if (scriptfile_getnumber(script, &fsize)) break; // filesize
|
|
|
|
if (scriptfile_getnumber(script, &fmtime)) break; // modification time
|
|
|
|
if (scriptfile_getnumber(script, &fcrcval)) break; // crc checksum
|
2006-07-07 18:41:05 +00:00
|
|
|
|
2014-05-30 00:02:19 +00:00
|
|
|
fg = (struct grpcache *)Xcalloc(1, sizeof(struct grpcache));
|
2006-07-07 18:41:05 +00:00
|
|
|
fg->next = grpcache;
|
|
|
|
grpcache = fg;
|
|
|
|
|
2009-02-02 01:49:14 +00:00
|
|
|
Bstrncpy(fg->name, fname, BMAX_PATH);
|
2006-07-07 18:41:05 +00:00
|
|
|
fg->size = fsize;
|
|
|
|
fg->mtime = fmtime;
|
|
|
|
fg->crcval = fcrcval;
|
|
|
|
}
|
|
|
|
|
|
|
|
scriptfile_close(script);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void FreeGroupsCache(void)
|
|
|
|
{
|
2006-11-15 01:16:55 +00:00
|
|
|
while (grpcache)
|
|
|
|
{
|
2015-03-27 12:30:35 +00:00
|
|
|
struct grpcache * const fg = grpcache->next;
|
2019-06-25 11:29:08 +00:00
|
|
|
Xfree(grpcache);
|
2006-07-07 18:41:05 +00:00
|
|
|
grpcache = fg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-03-27 12:30:35 +00:00
|
|
|
static void RemoveGroup(grpfile_t *igrp)
|
2013-04-08 18:30:39 +00:00
|
|
|
{
|
2015-03-27 12:30:35 +00:00
|
|
|
for (grpfile_t *prev = NULL, *grp = foundgrps; grp; grp=grp->next)
|
2013-04-08 18:30:39 +00:00
|
|
|
{
|
2015-03-27 12:30:35 +00:00
|
|
|
if (grp == igrp)
|
2013-04-08 18:30:39 +00:00
|
|
|
{
|
|
|
|
if (grp == foundgrps)
|
|
|
|
foundgrps = grp->next;
|
2013-04-10 23:47:14 +00:00
|
|
|
else
|
2015-03-27 12:30:35 +00:00
|
|
|
prev->next = grp->next;
|
2013-04-08 18:30:39 +00:00
|
|
|
|
2019-06-25 11:29:08 +00:00
|
|
|
Xfree((char *)grp->filename);
|
|
|
|
Xfree(grp);
|
2013-04-08 18:30:39 +00:00
|
|
|
|
2015-03-27 12:30:35 +00:00
|
|
|
return;
|
2013-04-08 18:30:39 +00:00
|
|
|
}
|
2015-03-27 12:30:35 +00:00
|
|
|
|
|
|
|
prev = grp;
|
2013-04-08 18:30:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-03-27 12:30:35 +00:00
|
|
|
grpfile_t * FindGroup(int32_t crcval)
|
2013-04-08 18:30:39 +00:00
|
|
|
{
|
2015-03-27 12:30:35 +00:00
|
|
|
grpfile_t *grp;
|
2013-04-08 18:30:39 +00:00
|
|
|
|
|
|
|
for (grp = foundgrps; grp; grp=grp->next)
|
|
|
|
{
|
2015-03-27 12:30:35 +00:00
|
|
|
if (grp->type->crcval == crcval)
|
2013-04-08 18:30:39 +00:00
|
|
|
return grp;
|
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2019-03-01 08:51:50 +00:00
|
|
|
#ifndef USE_PHYSFS
|
2015-03-27 12:30:35 +00:00
|
|
|
static grpinfo_t const * FindGrpInfo(int32_t crcval, int32_t size)
|
|
|
|
{
|
|
|
|
grpinfo_t *grpinfo;
|
|
|
|
|
|
|
|
for (grpinfo = listgrps; grpinfo; grpinfo=grpinfo->next)
|
|
|
|
{
|
|
|
|
if (grpinfo->crcval == crcval && grpinfo->size == size)
|
|
|
|
return grpinfo;
|
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2015-03-23 06:28:27 +00:00
|
|
|
static void ProcessGroups(CACHE1D_FIND_REC *srch)
|
2006-07-07 18:41:05 +00:00
|
|
|
{
|
2015-03-23 06:28:27 +00:00
|
|
|
CACHE1D_FIND_REC *sidx;
|
2006-07-07 18:41:05 +00:00
|
|
|
struct grpcache *fg, *fgg;
|
|
|
|
char *fn;
|
|
|
|
struct Bstat st;
|
2015-03-23 06:28:27 +00:00
|
|
|
|
2018-11-18 18:05:56 +00:00
|
|
|
static constexpr int ReadSize = 65536;
|
|
|
|
|
2018-12-15 01:39:51 +00:00
|
|
|
auto buf = (uint8_t *)Xmalloc(ReadSize);
|
2006-07-07 18:41:05 +00:00
|
|
|
|
2006-11-15 01:16:55 +00:00
|
|
|
for (sidx = srch; sidx; sidx = sidx->next)
|
|
|
|
{
|
|
|
|
for (fg = grpcache; fg; fg = fg->next)
|
|
|
|
{
|
2006-07-07 18:41:05 +00:00
|
|
|
if (!Bstrcmp(fg->name, sidx->name)) break;
|
|
|
|
}
|
|
|
|
|
2006-11-15 01:16:55 +00:00
|
|
|
if (fg)
|
|
|
|
{
|
2012-06-03 16:09:33 +00:00
|
|
|
if (findfrompath(sidx->name, &fn)) continue; // failed to resolve the filename
|
2006-11-15 01:16:55 +00:00
|
|
|
if (Bstat(fn, &st))
|
|
|
|
{
|
2019-06-25 11:29:08 +00:00
|
|
|
Xfree(fn);
|
2006-11-15 01:16:55 +00:00
|
|
|
continue;
|
2012-06-03 16:09:33 +00:00
|
|
|
} // failed to stat the file
|
2019-06-25 11:29:08 +00:00
|
|
|
Xfree(fn);
|
2015-02-11 05:22:48 +00:00
|
|
|
if (fg->size == (int32_t)st.st_size && fg->mtime == (int32_t)st.st_mtime)
|
2006-11-15 01:16:55 +00:00
|
|
|
{
|
2015-03-27 12:30:35 +00:00
|
|
|
grpinfo_t const * const grptype = FindGrpInfo(fg->crcval, fg->size);
|
|
|
|
if (grptype)
|
|
|
|
{
|
|
|
|
grpfile_t * const grp = (grpfile_t *)Xcalloc(1, sizeof(grpfile_t));
|
|
|
|
grp->filename = Xstrdup(sidx->name);
|
|
|
|
grp->type = grptype;
|
|
|
|
grp->next = foundgrps;
|
|
|
|
foundgrps = grp;
|
|
|
|
}
|
2006-07-07 18:41:05 +00:00
|
|
|
|
2014-05-30 00:02:19 +00:00
|
|
|
fgg = (struct grpcache *)Xcalloc(1, sizeof(struct grpcache));
|
2006-07-07 18:41:05 +00:00
|
|
|
strcpy(fgg->name, fg->name);
|
|
|
|
fgg->size = fg->size;
|
|
|
|
fgg->mtime = fg->mtime;
|
|
|
|
fgg->crcval = fg->crcval;
|
|
|
|
fgg->next = usedgrpcache;
|
|
|
|
usedgrpcache = fgg;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2009-01-09 09:29:17 +00:00
|
|
|
int32_t b, fh;
|
2014-09-30 04:15:04 +00:00
|
|
|
int32_t crcval = 0;
|
2006-07-07 18:41:05 +00:00
|
|
|
|
|
|
|
fh = openfrompath(sidx->name, BO_RDONLY|BO_BINARY, BS_IREAD);
|
|
|
|
if (fh < 0) continue;
|
2012-11-15 14:28:07 +00:00
|
|
|
if (Bfstat(fh, &st)) continue;
|
2006-07-07 18:41:05 +00:00
|
|
|
|
|
|
|
initprintf(" Checksumming %s...", sidx->name);
|
2006-11-15 01:16:55 +00:00
|
|
|
do
|
|
|
|
{
|
2018-11-18 18:05:56 +00:00
|
|
|
b = read(fh, buf, ReadSize);
|
2014-10-01 17:09:54 +00:00
|
|
|
if (b > 0) crcval = Bcrc32((uint8_t *)buf, b, crcval);
|
2006-11-15 01:16:55 +00:00
|
|
|
}
|
2018-11-18 18:05:56 +00:00
|
|
|
while (b == ReadSize);
|
2006-07-07 18:41:05 +00:00
|
|
|
close(fh);
|
|
|
|
initprintf(" Done\n");
|
|
|
|
|
2015-03-27 12:30:35 +00:00
|
|
|
grpinfo_t const * const grptype = FindGrpInfo(crcval, st.st_size);
|
|
|
|
if (grptype)
|
|
|
|
{
|
|
|
|
grpfile_t * const grp = (grpfile_t *)Xcalloc(1, sizeof(grpfile_t));
|
|
|
|
grp->filename = Xstrdup(sidx->name);
|
|
|
|
grp->type = grptype;
|
|
|
|
grp->next = foundgrps;
|
|
|
|
foundgrps = grp;
|
|
|
|
}
|
2006-07-07 18:41:05 +00:00
|
|
|
|
2014-05-30 00:02:19 +00:00
|
|
|
fgg = (struct grpcache *)Xcalloc(1, sizeof(struct grpcache));
|
2009-02-02 01:49:14 +00:00
|
|
|
Bstrncpy(fgg->name, sidx->name, BMAX_PATH);
|
2006-07-07 18:41:05 +00:00
|
|
|
fgg->size = st.st_size;
|
|
|
|
fgg->mtime = st.st_mtime;
|
|
|
|
fgg->crcval = crcval;
|
|
|
|
fgg->next = usedgrpcache;
|
|
|
|
usedgrpcache = fgg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-25 11:29:08 +00:00
|
|
|
Xfree(buf);
|
2015-03-23 06:28:27 +00:00
|
|
|
}
|
2019-03-01 08:51:50 +00:00
|
|
|
#endif
|
2015-03-23 06:28:27 +00:00
|
|
|
|
|
|
|
int32_t ScanGroups(void)
|
|
|
|
{
|
2019-03-01 08:51:50 +00:00
|
|
|
#ifndef USE_PHYSFS
|
2015-03-23 06:28:27 +00:00
|
|
|
struct grpcache *fg, *fgg;
|
|
|
|
|
|
|
|
initprintf("Searching for game data...\n");
|
|
|
|
|
|
|
|
LoadGameList();
|
|
|
|
LoadGroupsCache();
|
|
|
|
|
2017-10-15 23:10:03 +00:00
|
|
|
static char const *extensions[] =
|
|
|
|
{
|
|
|
|
"*.grp",
|
|
|
|
"*.ssi",
|
|
|
|
"*.dat",
|
|
|
|
};
|
2015-03-23 06:28:27 +00:00
|
|
|
|
2017-10-15 23:10:03 +00:00
|
|
|
for (char const *extension : extensions)
|
|
|
|
{
|
|
|
|
CACHE1D_FIND_REC *srch = klistpath("/", extension, CACHE1D_FIND_FILE);
|
|
|
|
ProcessGroups(srch);
|
|
|
|
klistfree(srch);
|
|
|
|
}
|
2015-03-23 06:28:27 +00:00
|
|
|
|
2006-07-07 18:41:05 +00:00
|
|
|
FreeGroupsCache();
|
|
|
|
|
2015-03-27 12:30:35 +00:00
|
|
|
for (grpfile_t *grp = foundgrps; grp; grp=grp->next)
|
2013-04-08 18:30:39 +00:00
|
|
|
{
|
2015-03-27 12:30:35 +00:00
|
|
|
if (grp->type->dependency)
|
2013-04-08 18:30:39 +00:00
|
|
|
{
|
2015-03-27 12:30:35 +00:00
|
|
|
if (FindGroup(grp->type->dependency) == NULL) // couldn't find dependency
|
2013-04-08 18:30:39 +00:00
|
|
|
{
|
|
|
|
//initprintf("removing %s\n", grp->name);
|
2015-03-27 12:30:35 +00:00
|
|
|
RemoveGroup(grp);
|
2013-04-08 18:30:39 +00:00
|
|
|
grp = foundgrps;
|
2015-03-27 12:30:35 +00:00
|
|
|
// start from the beginning so we can remove anything that depended on this grp
|
2013-04-08 18:30:39 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-11-15 01:16:55 +00:00
|
|
|
if (usedgrpcache)
|
|
|
|
{
|
2009-01-09 09:29:17 +00:00
|
|
|
int32_t i = 0;
|
2019-03-01 08:51:50 +00:00
|
|
|
buildvfs_FILE fp = buildvfs_fopen_write(GRPCACHEFILE);
|
2006-11-15 01:16:55 +00:00
|
|
|
if (fp)
|
|
|
|
{
|
|
|
|
for (fg = usedgrpcache; fg; fg=fgg)
|
|
|
|
{
|
2006-07-07 18:41:05 +00:00
|
|
|
fgg = fg->next;
|
|
|
|
fprintf(fp, "\"%s\" %d %d %d\n", fg->name, fg->size, fg->mtime, fg->crcval);
|
2019-06-25 11:29:08 +00:00
|
|
|
Xfree(fg);
|
2008-08-22 23:10:54 +00:00
|
|
|
i++;
|
2006-07-07 18:41:05 +00:00
|
|
|
}
|
2019-03-01 08:51:50 +00:00
|
|
|
buildvfs_fclose(fp);
|
2006-07-07 18:41:05 +00:00
|
|
|
}
|
2008-12-10 11:36:53 +00:00
|
|
|
// initprintf("Found %d recognized GRP %s.\n",i,i>1?"files":"file");
|
2012-09-02 13:57:39 +00:00
|
|
|
|
2008-08-22 23:10:54 +00:00
|
|
|
return 0;
|
2006-07-07 18:41:05 +00:00
|
|
|
}
|
2010-05-16 22:53:08 +00:00
|
|
|
|
|
|
|
initprintf("Found no recognized game data!\n");
|
2019-03-01 08:51:50 +00:00
|
|
|
#endif
|
2010-05-16 22:53:08 +00:00
|
|
|
|
2006-07-07 18:41:05 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-04-08 18:30:39 +00:00
|
|
|
|
2006-07-07 18:41:05 +00:00
|
|
|
void FreeGroups(void)
|
|
|
|
{
|
2006-11-15 01:16:55 +00:00
|
|
|
while (foundgrps)
|
|
|
|
{
|
2019-06-25 11:29:08 +00:00
|
|
|
Xfree((char *)foundgrps->filename);
|
2015-03-27 12:30:35 +00:00
|
|
|
grpfile_t * const fg = foundgrps->next;
|
2019-06-25 11:29:08 +00:00
|
|
|
Xfree(foundgrps);
|
2006-07-07 18:41:05 +00:00
|
|
|
foundgrps = fg;
|
|
|
|
}
|
2013-04-25 17:49:10 +00:00
|
|
|
|
|
|
|
FreeGameList();
|
2006-07-07 18:41:05 +00:00
|
|
|
}
|
|
|
|
|
2017-01-18 22:21:08 +00:00
|
|
|
#ifndef EDUKE32_STANDALONE
|
2015-03-23 08:30:41 +00:00
|
|
|
static void process_vaca13(int32_t crcval)
|
2015-03-23 06:28:27 +00:00
|
|
|
{
|
2015-03-23 08:30:41 +00:00
|
|
|
krename(crcval, 0, "ADDREE.VOC");
|
|
|
|
krename(crcval, 1, "BALLBOOM.VOC");
|
|
|
|
krename(crcval, 2, "BARMUSIC.VOC");
|
|
|
|
krename(crcval, 3, "BCHBALL.VOC");
|
|
|
|
krename(crcval, 4, "BOING.VOC");
|
|
|
|
krename(crcval, 5, "CHACHA.VOC");
|
|
|
|
krename(crcval, 6, "CHAINDRV.VOC");
|
|
|
|
krename(crcval, 7, "CHEAP01.VOC");
|
|
|
|
krename(crcval, 8, "CHEER.VOC");
|
|
|
|
krename(crcval, 9, "CHNSQRT.VOC");
|
|
|
|
krename(crcval, 10, "COCOANUT.VOC");
|
|
|
|
krename(crcval, 11, "CRUSH2.VOC");
|
|
|
|
krename(crcval, 12, "DEFLATE2.VOC");
|
|
|
|
krename(crcval, 13, "DRAGHURT.VOC");
|
|
|
|
krename(crcval, 14, "DRAGROAM.VOC");
|
|
|
|
krename(crcval, 15, "DRAGSHOT.VOC");
|
|
|
|
krename(crcval, 16, "DUKE01.VOC");
|
|
|
|
krename(crcval, 17, "ELEV1.VOC");
|
|
|
|
krename(crcval, 18, "GMEOVR05.VOC");
|
|
|
|
krename(crcval, 19, "GULLDIE.VOC");
|
|
|
|
krename(crcval, 20, "GULLHURT.VOC");
|
|
|
|
krename(crcval, 21, "GULLROAM.VOC");
|
|
|
|
krename(crcval, 22, "GULLSHIT.VOC");
|
|
|
|
krename(crcval, 23, "HELP04.VOC");
|
|
|
|
krename(crcval, 24, "ICECONCH.VOC");
|
|
|
|
krename(crcval, 25, "IDLEBOAT.VOC");
|
|
|
|
krename(crcval, 26, "KICKHEAD.VOC");
|
|
|
|
krename(crcval, 27, "LANI05.VOC");
|
|
|
|
krename(crcval, 28, "LANI08.VOC");
|
|
|
|
krename(crcval, 29, "LANIDUK2.VOC");
|
|
|
|
krename(crcval, 30, "MUSCLE01.VOC");
|
|
|
|
krename(crcval, 31, "MUSCLE04.VOC");
|
|
|
|
krename(crcval, 32, "MUZAK.VOC");
|
|
|
|
krename(crcval, 33, "PINEFALL.VOC");
|
|
|
|
krename(crcval, 34, "POINT07.VOC");
|
|
|
|
krename(crcval, 35, "POINT08.VOC");
|
|
|
|
krename(crcval, 36, "RADIO.VOC");
|
|
|
|
krename(crcval, 37, "RUIN01.VOC");
|
|
|
|
krename(crcval, 38, "SCREAM.VOC");
|
|
|
|
krename(crcval, 39, "SCREAM04.VOC");
|
|
|
|
krename(crcval, 40, "SCREAM9.VOC");
|
|
|
|
krename(crcval, 41, "SHIPHORN.VOC");
|
|
|
|
krename(crcval, 42, "SNGLGULL.VOC");
|
|
|
|
krename(crcval, 43, "SQRT4.VOC");
|
|
|
|
krename(crcval, 44, "SQUIRT1.VOC");
|
|
|
|
krename(crcval, 45, "SSCOOL1.VOC");
|
|
|
|
krename(crcval, 46, "SSCOOL2.VOC");
|
|
|
|
krename(crcval, 47, "SSCOOL3.VOC");
|
|
|
|
krename(crcval, 48, "SSDIE1.VOC");
|
|
|
|
krename(crcval, 49, "SSDIE2.VOC");
|
|
|
|
krename(crcval, 50, "SSNORM01.VOC");
|
|
|
|
krename(crcval, 51, "SSNORM02.VOC");
|
|
|
|
krename(crcval, 52, "SSNORM03.VOC");
|
|
|
|
krename(crcval, 53, "SSNORM04.VOC");
|
|
|
|
krename(crcval, 54, "SSNORM05.VOC");
|
|
|
|
krename(crcval, 55, "SSNORM06.VOC");
|
|
|
|
krename(crcval, 56, "SSNORM07.VOC");
|
|
|
|
krename(crcval, 57, "SSNORM08.VOC");
|
|
|
|
krename(crcval, 58, "SSNORM10.VOC");
|
|
|
|
krename(crcval, 59, "SSNORM11.VOC");
|
|
|
|
krename(crcval, 60, "SSNORM12.VOC");
|
|
|
|
krename(crcval, 61, "SSNORM13.VOC");
|
|
|
|
krename(crcval, 62, "SSNORM14.VOC");
|
|
|
|
krename(crcval, 63, "SSNORM15.VOC");
|
|
|
|
krename(crcval, 64, "SSNORM16.VOC");
|
|
|
|
krename(crcval, 65, "SSNORM17.VOC");
|
|
|
|
krename(crcval, 66, "SSNORM18.VOC");
|
|
|
|
krename(crcval, 67, "SSNORM19.VOC");
|
|
|
|
krename(crcval, 68, "SSNORM20.VOC");
|
|
|
|
krename(crcval, 69, "SSTAUNT1.VOC");
|
|
|
|
krename(crcval, 70, "SSTAUNT2.VOC");
|
|
|
|
krename(crcval, 71, "SSTAUNT3.VOC");
|
|
|
|
krename(crcval, 72, "SSTAUNT4.VOC");
|
|
|
|
krename(crcval, 73, "SSTAUNT5.VOC");
|
|
|
|
krename(crcval, 74, "SSTAUNT6.VOC");
|
|
|
|
krename(crcval, 75, "SSTAUNT7.VOC");
|
|
|
|
krename(crcval, 76, "SSTAUNT8.VOC");
|
|
|
|
krename(crcval, 77, "SURF.VOC");
|
|
|
|
krename(crcval, 78, "TAN01.VOC");
|
|
|
|
krename(crcval, 79, "TAN04.VOC");
|
|
|
|
krename(crcval, 80, "VINESNAP.VOC");
|
|
|
|
krename(crcval, 81, "VOODRUMS.VOC");
|
|
|
|
krename(crcval, 82, "WIND54.VOC");
|
|
|
|
krename(crcval, 83, "DOOMSDAY.MID");
|
|
|
|
krename(crcval, 84, "DUKE-O.MID");
|
|
|
|
krename(crcval, 85, "IRIEPRTY.MID");
|
|
|
|
krename(crcval, 86, "JUNGVEIN.MID");
|
|
|
|
krename(crcval, 87, "PRTYCRUZ.MID");
|
|
|
|
krename(crcval, 88, "SOL-MAN1.MID");
|
|
|
|
krename(crcval, 90, "CINEOV3.ANM");
|
|
|
|
krename(crcval, 91, "DUKETEAM.ANM");
|
|
|
|
krename(crcval, 92, "BEACHBAB.CON");
|
|
|
|
krename(crcval, 93, "BEACHBAL.CON");
|
|
|
|
krename(crcval, 94, "BEACHBTH.CON");
|
|
|
|
krename(crcval, 95, "DEFS.CON");
|
|
|
|
krename(crcval, 96, "DRAGON.CON");
|
|
|
|
krename(crcval, 97, "GAME.CON");
|
|
|
|
krename(crcval, 98, "SEAGULL.CON");
|
|
|
|
krename(crcval, 99, "SOUNDS.CON");
|
|
|
|
krename(crcval, 100, "USER.CON");
|
|
|
|
krename(crcval, 101, "DEMO1.DMO");
|
|
|
|
krename(crcval, 102, "DEMO2.DMO");
|
|
|
|
krename(crcval, 103, "DEMO3.DMO");
|
|
|
|
krename(crcval, 104, "VACA1.MAP");
|
|
|
|
krename(crcval, 105, "VACA2.MAP");
|
|
|
|
krename(crcval, 106, "VACA3.MAP");
|
|
|
|
krename(crcval, 107, "VACA4.MAP");
|
|
|
|
krename(crcval, 108, "VACA5.MAP");
|
|
|
|
krename(crcval, 109, "VACA6.MAP");
|
|
|
|
krename(crcval, 110, "VACA7.MAP");
|
|
|
|
krename(crcval, 111, "VACADM1.MAP");
|
|
|
|
krename(crcval, 112, "VACADM2.MAP");
|
|
|
|
krename(crcval, 113, "VACADM3.MAP");
|
|
|
|
krename(crcval, 114, "VACADM4.MAP");
|
|
|
|
krename(crcval, 115, "VACASL.MAP");
|
|
|
|
krename(crcval, 120, "TILES000.ART");
|
|
|
|
krename(crcval, 121, "TILES001.ART");
|
|
|
|
krename(crcval, 122, "TILES003.ART");
|
|
|
|
krename(crcval, 123, "TILES005.ART");
|
|
|
|
krename(crcval, 124, "TILES006.ART");
|
|
|
|
krename(crcval, 125, "TILES007.ART");
|
|
|
|
krename(crcval, 126, "TILES008.ART");
|
|
|
|
krename(crcval, 127, "TILES009.ART");
|
|
|
|
krename(crcval, 128, "TILES010.ART");
|
|
|
|
krename(crcval, 129, "TILES012.ART");
|
|
|
|
krename(crcval, 130, "TILES014.ART");
|
2015-03-23 06:28:27 +00:00
|
|
|
}
|
|
|
|
|
2015-03-23 08:30:41 +00:00
|
|
|
static void process_vacapp15(int32_t crcval)
|
2015-03-23 06:28:27 +00:00
|
|
|
{
|
2015-03-23 08:30:41 +00:00
|
|
|
krename(crcval, 5, "DEFS.CON");
|
|
|
|
krename(crcval, 6, "GAME.CON");
|
|
|
|
krename(crcval, 7, "USER.CON");
|
|
|
|
krename(crcval, 8, "DEMO1.DMO");
|
|
|
|
krename(crcval, 9, "DEMO2.DMO");
|
|
|
|
krename(crcval, 10, "DEMO3.DMO");
|
2015-03-23 06:28:27 +00:00
|
|
|
|
|
|
|
initgroupfile("VACATION.PRG");
|
|
|
|
}
|
2017-01-18 22:21:08 +00:00
|
|
|
#endif
|