From cba58265b9ad60c9f8ae17a8c585ccc4e080e6c1 Mon Sep 17 00:00:00 2001 From: terminx Date: Tue, 2 Jan 2007 02:27:57 +0000 Subject: [PATCH] Control over the cache1d size... git-svn-id: https://svn.eduke32.com/eduke32@442 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 3b522070c..b3801c8cf 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -124,9 +124,9 @@ char user_quote[MAXUSERQUOTES][178]; // char typebuflen,typebuf[41]; #ifdef JFAUD -#define MAXCACHE1DSIZE (16*1048576) +int MAXCACHE1DSIZE = (16*1048576); #else -#define MAXCACHE1DSIZE (32*1048576) +int MAXCACHE1DSIZE = (32*1048576); #endif long tempwallptr; @@ -148,6 +148,7 @@ enum T_INTERFACE = 0, T_LOADGRP = 0, T_MODE = 1, + T_CACHESIZE = 1, T_ALLOW }; @@ -8125,7 +8126,7 @@ static void comlinehelp(void) "-i#\t\tNetwork mode (1/0) (multiplayer only) (default == 1)\n" "-f#\t\tSend fewer packets (1, 2, 4) (multiplayer only)\n" "-gFILE\t\tUse multiple group files (must be last on command line)\n" - "-jDIRECTORY\t\tAdd a directory to the file path stack\n" + "-jDIRECTORY\tAdd a directory to the file path stack\n" "-hFILE\t\tUse FILE instead of DUKE3D.DEF\n" "-xFILE\t\tUse specified CON file (default EDUKE.CON/GAME.CON)\n" "-u#########\tUser's favorite weapon order (default: 3425689071)\n" @@ -8326,6 +8327,7 @@ int loadgroupfiles(char *fn) tokenlist grptokens[] = { { "loadgrp", T_LOADGRP }, + { "cachesize", T_CACHESIZE }, }; script = scriptfile_fromfile(fn); @@ -8350,6 +8352,13 @@ int loadgroupfiles(char *fn) initprintf("Using group file %s.\n",fn); } } + case T_CACHESIZE: + { + int j; + if (scriptfile_getnumber(script,&j)) break; + + if (j > 0) MAXCACHE1DSIZE = j<<10; + } break; case T_EOF: return(0);