From c9e97fa9547b9f851024cf50f025f47f7eabec91 Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 19 Aug 2007 00:15:30 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@558 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/sdlayer.c | 2 +- polymer/build/src/winlayer.c | 4 +-- polymer/eduke32/source/astub.c | 2 +- polymer/eduke32/source/duke3d.h | 2 +- polymer/eduke32/source/game.c | 16 +++++------ polymer/eduke32/source/gamedef.c | 13 +++++++++ polymer/eduke32/source/gamedef.h | 9 +++++- polymer/eduke32/source/gameexec.c | 47 +++++++++++++++++++++++++++++++ polymer/eduke32/source/gamevars.c | 2 ++ 9 files changed, 83 insertions(+), 14 deletions(-) diff --git a/polymer/build/src/sdlayer.c b/polymer/build/src/sdlayer.c index fa20ad920..8da6b87f1 100644 --- a/polymer/build/src/sdlayer.c +++ b/polymer/build/src/sdlayer.c @@ -45,7 +45,7 @@ static unsigned long mwheelup, mwheeldown; int _buildargc = 1; const char **_buildargv = NULL; -extern long app_main(long argc, char *argv[]); +extern long app_main(long argc, const char *argv[]); char quitevent=0, appactive=1; diff --git a/polymer/build/src/winlayer.c b/polymer/build/src/winlayer.c index 758e143b1..4660b0874 100644 --- a/polymer/build/src/winlayer.c +++ b/polymer/build/src/winlayer.c @@ -46,7 +46,7 @@ int _buildargc = 0; const char **_buildargv = NULL; static char *argvbuf = NULL; -extern long app_main(long argc, char *argv[]); +extern long app_main(long argc, const char *argv[]); // Windows crud static HINSTANCE hInstance = 0; @@ -318,7 +318,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC } *wp = 0; - _buildargv = (char**)malloc(sizeof(char*)*_buildargc); + _buildargv = (const char**)malloc(sizeof(char*)*_buildargc); wp = argvbuf; for (i=0; i<_buildargc; i++,wp++) { _buildargv[i] = wp; diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 3fd10f4d4..5f39d2dbd 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -38,7 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "scriptfile.h" #include "crc32.h" -#define VERSION " 1.1.0 svn" +#define VERSION " 1.1.0 rc1" static int floor_over_floor; diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 37773e001..4747bbdc1 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ //------------------------------------------------------------------------- -#define VERSION " 1.4.0 svn" +#define VERSION " 1.4.0 rc1" #define HEAD "EDuke32"VERSION" (shareware mode)" #define HEAD2 "EDuke32"VERSION diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 037261626..9097e252b 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -8573,7 +8573,7 @@ static void addgamepath(const char *buffer) } -static void checkcommandline(int argc,char **argv) +static void checkcommandline(int argc,const char **argv) { short i, j; char *c; @@ -8604,7 +8604,7 @@ static void checkcommandline(int argc,char **argv) { while (i < argc) { - c = argv[i]; + c = (char *)argv[i]; if (((*c == '/') || (*c == '-')) && (!firstnet)) { if (!Bstrcasecmp(c+1,"?") || !Bstrcasecmp(c+1,"help") || !Bstrcasecmp(c+1,"-help")) @@ -8707,7 +8707,7 @@ static void checkcommandline(int argc,char **argv) { NoSetup = TRUE; networkmode = 1; - netcfg = argv[i+1]; + netcfg = (char *)argv[i+1]; i++; } i++; @@ -8726,7 +8726,7 @@ static void checkcommandline(int argc,char **argv) { if (argc > i+1) { - CommandName = argv[i+1]; + CommandName = (char *)argv[i+1]; i++; } i++; @@ -8736,7 +8736,7 @@ static void checkcommandline(int argc,char **argv) { if (argc > i+1) { - CommandMap = argv[i+1]; + CommandMap = (char *)argv[i+1]; i++; } i++; @@ -8781,7 +8781,7 @@ static void checkcommandline(int argc,char **argv) } } - netparam[i-firstnet-1] = argv[i]; + netparam[i-firstnet-1] = (char *)argv[i]; i++; continue; } @@ -9416,7 +9416,7 @@ static void genspriteremaps(void) extern int startwin_run(void); static void SetupGameButtons(void); -static void Startup(long argc, char **argv) +static void Startup(long argc, const char **argv) { int i; @@ -9789,7 +9789,7 @@ int load_script(const char *szScript) return 1; } -void app_main(int argc,char **argv) +void app_main(int argc,const char **argv) { int i, j; char cwd[BMAX_PATH]; diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 3ac9fdf39..ff2b06aa4 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -432,6 +432,12 @@ static const char *keyw[] = "getincangle", // 300 "quake", // 301 "showview", // 302 + "headspritestat", // 303 + "prevspritestat", // 304 + "nextspritestat", // 305 + "headspritesect", // 306 + "prevspritesect", // 307 + "nextspritesect", // 308 "" }; @@ -539,6 +545,7 @@ LABELS actorlabels[]= { "mdxoff", ACTOR_MDXOFF, 0, 0 }, { "mdyoff", ACTOR_MDYOFF, 0, 0 }, { "mdzoff", ACTOR_MDZOFF, 0, 0 }, + { "mdflags", ACTOR_MDFLAGS, 0, 0 }, { "", -1, 0, 0 } // END OF LIST }; @@ -3718,6 +3725,12 @@ repeatcase: case CON_QSTRCAT: case CON_QSTRCPY: case CON_QSTRLEN: + case CON_HEADSPRITESTAT: + case CON_PREVSPRITESTAT: + case CON_NEXTSPRITESTAT: + case CON_HEADSPRITESECT: + case CON_PREVSPRITESECT: + case CON_NEXTSPRITESECT: transmultvars(2); return 0; case CON_SETACTORANGLE: diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index c5333dc65..8d9da49ac 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -414,7 +414,8 @@ enum actorlabels { ACTOR_ROLL, ACTOR_MDXOFF, ACTOR_MDYOFF, - ACTOR_MDZOFF + ACTOR_MDZOFF, + ACTOR_MDFLAGS }; enum inputlabels { @@ -761,5 +762,11 @@ enum keywords { CON_GETINCANGLE, // 300 CON_QUAKE, // 301 CON_SHOWVIEW, // 302 + CON_HEADSPRITESTAT, // 303 + CON_PREVSPRITESTAT, // 304 + CON_NEXTSPRITESTAT, // 305 + CON_HEADSPRITESECT, // 306 + CON_PREVSPRITESECT, // 307 + CON_NEXTSPRITESECT, // 308 END }; diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 85aa7c1e2..65775616b 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -2703,6 +2703,13 @@ static void DoActor(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2) SetGameVarID(lVar2,spriteext[iActor].zoff, g_i, g_p); break; + case ACTOR_MDFLAGS: + if (iSet) + spriteext[iActor].flags=lValue; + else + SetGameVarID(lVar2,spriteext[iActor].flags, g_i, g_p); + break; + default: break; } @@ -4239,6 +4246,46 @@ static int parse(void) break; } + case CON_HEADSPRITESTAT: + case CON_PREVSPRITESTAT: + case CON_NEXTSPRITESTAT: + case CON_HEADSPRITESECT: + case CON_PREVSPRITESECT: + case CON_NEXTSPRITESECT: + insptr++; + { + int i=*insptr++; + j=GetGameVarID(*insptr++, g_i, g_p); + switch (tw) + { + case CON_HEADSPRITESTAT: + if (j < MAXSTATUS) + SetGameVarID(i,headspritestat[j],g_i,g_p); + break; + case CON_PREVSPRITESTAT: + if (j < MAXSPRITES) + SetGameVarID(i,prevspritestat[j],g_i,g_p); + break; + case CON_NEXTSPRITESTAT: + if (j < MAXSPRITES) + SetGameVarID(i,nextspritestat[j],g_i,g_p); + break; + case CON_HEADSPRITESECT: + if (j < MAXSECTORS) + SetGameVarID(i,headspritesect[j],g_i,g_p); + break; + case CON_PREVSPRITESECT: + if (j < MAXSPRITES) + SetGameVarID(i,prevspritesect[j],g_i,g_p); + break; + case CON_NEXTSPRITESECT: + if (j < MAXSPRITES) + SetGameVarID(i,nextspritesect[j],g_i,g_p); + break; + } + break; + } + case CON_GETPNAME: case CON_QSTRCAT: case CON_QSTRCPY: diff --git a/polymer/eduke32/source/gamevars.c b/polymer/eduke32/source/gamevars.c index 81e382c82..bfd2ee5fe 100755 --- a/polymer/eduke32/source/gamevars.c +++ b/polymer/eduke32/source/gamevars.c @@ -1193,6 +1193,7 @@ static void AddSystemVars() AddGameVar("myreturntocenter",(long)&myreturntocenter, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_PCHAR | GAMEVAR_FLAG_SYNCCHECK); AddGameVar("display_mirror",(long)&display_mirror, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_PCHAR | GAMEVAR_FLAG_SYNCCHECK); + AddGameVar("randomseed",(long)&randomseed, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_PLONG); } void InitGameVars(void) @@ -1331,4 +1332,5 @@ static void ResetPointerVars(void) aGameVars[GetGameID("myreturntocenter")].lValue = (long)&myreturntocenter; aGameVars[GetGameID("display_mirror")].lValue = (long)&display_mirror; + aGameVars[GetGameID("randomseed")].lValue = (long)&randomseed; }