From 5b211422dadb35bbc9a2140229e55388974ccf02 Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 2 Aug 2006 20:51:50 +0000 Subject: [PATCH] Added detection for stupid mistakes people make with the 'move' command and doubled the CACHE1D size when not using JFAud. git-svn-id: https://svn.eduke32.com/eduke32@253 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/defs.c | 10 ++++++++++ polymer/eduke32/source/duke3d.h | 2 -- polymer/eduke32/source/game.c | 6 ++++++ polymer/eduke32/source/gamedef.c | 7 ++++++- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/polymer/build/src/defs.c b/polymer/build/src/defs.c index f8f759244..67b8b19b3 100644 --- a/polymer/build/src/defs.c +++ b/polymer/build/src/defs.c @@ -451,6 +451,11 @@ static int defsparser(scriptfile *script) if(xsiz >= 0) tilesizx[tile] = xsiz; if(ysiz >= 0) tilesizy[tile] = ysiz; invalidatetile(tile,-1,-1); + if (waloff[tile] == 0) + { + walock[tile] = 199; + allocache(&waloff[tile],xsiz*ysiz,&walock[tile]); + } break; } case T_DUMMYTILERANGE: @@ -476,6 +481,11 @@ static int defsparser(scriptfile *script) if(xsiz >= 0) tilesizx[i] = xsiz; if(ysiz >= 0) tilesizy[i] = ysiz; invalidatetile(i,-1,-1); + if (waloff[i] == 0) + { + walock[i] = 199; + allocache(&waloff[i],xsiz*ysiz,&walock[i]); + } } } } diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 4518c51bf..cf98da3d4 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -92,8 +92,6 @@ extern int conversion, shareware, gametype; #define TICRATE (120) #define TICSPERFRAME (TICRATE/26) -#define MAXCACHE1DSIZE (16*1048576) - // #define GC (TICSPERFRAME*44) #define NUM_SOUNDS 1500 diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 34a3b0bc8..4d5b9655a 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -113,6 +113,12 @@ short user_quote_time[MAXUSERQUOTES]; char user_quote[MAXUSERQUOTES][178]; // char typebuflen,typebuf[41]; +#ifdef JFAUD +#define MAXCACHE1DSIZE (16*1048576) +#else +#define MAXCACHE1DSIZE (32*1048576) +#endif + long tempwallptr; long nonsharedtimer; diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index ce217b347..5e9585c8d 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -2247,7 +2247,12 @@ char parsecommand(void) { if(!CheckEventSync(current_event)) ReportError(WARNING_EVENTSYNC); - transnum(LABEL_MOVE); + + if((transnum(LABEL_MOVE) != LABEL_MOVE) && (*(scriptptr-1) != 0)) + { + error++; + ReportError(ERROR_SYNTAXERROR); + } j = 0; while(keyword() == -1)