git-svn-id: https://svn.eduke32.com/eduke32@558 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2007-08-19 00:15:30 +00:00
parent 9704ade66c
commit c9e97fa954
9 changed files with 83 additions and 14 deletions

View file

@ -45,7 +45,7 @@ static unsigned long mwheelup, mwheeldown;
int _buildargc = 1; int _buildargc = 1;
const char **_buildargv = NULL; 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; char quitevent=0, appactive=1;

View file

@ -46,7 +46,7 @@
int _buildargc = 0; int _buildargc = 0;
const char **_buildargv = NULL; const char **_buildargv = NULL;
static char *argvbuf = NULL; static char *argvbuf = NULL;
extern long app_main(long argc, char *argv[]); extern long app_main(long argc, const char *argv[]);
// Windows crud // Windows crud
static HINSTANCE hInstance = 0; static HINSTANCE hInstance = 0;
@ -318,7 +318,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
} }
*wp = 0; *wp = 0;
_buildargv = (char**)malloc(sizeof(char*)*_buildargc); _buildargv = (const char**)malloc(sizeof(char*)*_buildargc);
wp = argvbuf; wp = argvbuf;
for (i=0; i<_buildargc; i++,wp++) { for (i=0; i<_buildargc; i++,wp++) {
_buildargv[i] = wp; _buildargv[i] = wp;

View file

@ -38,7 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "scriptfile.h" #include "scriptfile.h"
#include "crc32.h" #include "crc32.h"
#define VERSION " 1.1.0 svn" #define VERSION " 1.1.0 rc1"
static int floor_over_floor; static int floor_over_floor;

View file

@ -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 HEAD "EDuke32"VERSION" (shareware mode)"
#define HEAD2 "EDuke32"VERSION #define HEAD2 "EDuke32"VERSION

View file

@ -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; short i, j;
char *c; char *c;
@ -8604,7 +8604,7 @@ static void checkcommandline(int argc,char **argv)
{ {
while (i < argc) while (i < argc)
{ {
c = argv[i]; c = (char *)argv[i];
if (((*c == '/') || (*c == '-')) && (!firstnet)) if (((*c == '/') || (*c == '-')) && (!firstnet))
{ {
if (!Bstrcasecmp(c+1,"?") || !Bstrcasecmp(c+1,"help") || !Bstrcasecmp(c+1,"-help")) 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; NoSetup = TRUE;
networkmode = 1; networkmode = 1;
netcfg = argv[i+1]; netcfg = (char *)argv[i+1];
i++; i++;
} }
i++; i++;
@ -8726,7 +8726,7 @@ static void checkcommandline(int argc,char **argv)
{ {
if (argc > i+1) if (argc > i+1)
{ {
CommandName = argv[i+1]; CommandName = (char *)argv[i+1];
i++; i++;
} }
i++; i++;
@ -8736,7 +8736,7 @@ static void checkcommandline(int argc,char **argv)
{ {
if (argc > i+1) if (argc > i+1)
{ {
CommandMap = argv[i+1]; CommandMap = (char *)argv[i+1];
i++; i++;
} }
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++; i++;
continue; continue;
} }
@ -9416,7 +9416,7 @@ static void genspriteremaps(void)
extern int startwin_run(void); extern int startwin_run(void);
static void SetupGameButtons(void); static void SetupGameButtons(void);
static void Startup(long argc, char **argv) static void Startup(long argc, const char **argv)
{ {
int i; int i;
@ -9789,7 +9789,7 @@ int load_script(const char *szScript)
return 1; return 1;
} }
void app_main(int argc,char **argv) void app_main(int argc,const char **argv)
{ {
int i, j; int i, j;
char cwd[BMAX_PATH]; char cwd[BMAX_PATH];

View file

@ -432,6 +432,12 @@ static const char *keyw[] =
"getincangle", // 300 "getincangle", // 300
"quake", // 301 "quake", // 301
"showview", // 302 "showview", // 302
"headspritestat", // 303
"prevspritestat", // 304
"nextspritestat", // 305
"headspritesect", // 306
"prevspritesect", // 307
"nextspritesect", // 308
"<null>" "<null>"
}; };
@ -539,6 +545,7 @@ LABELS actorlabels[]=
{ "mdxoff", ACTOR_MDXOFF, 0, 0 }, { "mdxoff", ACTOR_MDXOFF, 0, 0 },
{ "mdyoff", ACTOR_MDYOFF, 0, 0 }, { "mdyoff", ACTOR_MDYOFF, 0, 0 },
{ "mdzoff", ACTOR_MDZOFF, 0, 0 }, { "mdzoff", ACTOR_MDZOFF, 0, 0 },
{ "mdflags", ACTOR_MDFLAGS, 0, 0 },
{ "", -1, 0, 0 } // END OF LIST { "", -1, 0, 0 } // END OF LIST
}; };
@ -3718,6 +3725,12 @@ repeatcase:
case CON_QSTRCAT: case CON_QSTRCAT:
case CON_QSTRCPY: case CON_QSTRCPY:
case CON_QSTRLEN: case CON_QSTRLEN:
case CON_HEADSPRITESTAT:
case CON_PREVSPRITESTAT:
case CON_NEXTSPRITESTAT:
case CON_HEADSPRITESECT:
case CON_PREVSPRITESECT:
case CON_NEXTSPRITESECT:
transmultvars(2); transmultvars(2);
return 0; return 0;
case CON_SETACTORANGLE: case CON_SETACTORANGLE:

View file

@ -414,7 +414,8 @@ enum actorlabels {
ACTOR_ROLL, ACTOR_ROLL,
ACTOR_MDXOFF, ACTOR_MDXOFF,
ACTOR_MDYOFF, ACTOR_MDYOFF,
ACTOR_MDZOFF ACTOR_MDZOFF,
ACTOR_MDFLAGS
}; };
enum inputlabels { enum inputlabels {
@ -761,5 +762,11 @@ enum keywords {
CON_GETINCANGLE, // 300 CON_GETINCANGLE, // 300
CON_QUAKE, // 301 CON_QUAKE, // 301
CON_SHOWVIEW, // 302 CON_SHOWVIEW, // 302
CON_HEADSPRITESTAT, // 303
CON_PREVSPRITESTAT, // 304
CON_NEXTSPRITESTAT, // 305
CON_HEADSPRITESECT, // 306
CON_PREVSPRITESECT, // 307
CON_NEXTSPRITESECT, // 308
END END
}; };

View file

@ -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); SetGameVarID(lVar2,spriteext[iActor].zoff, g_i, g_p);
break; break;
case ACTOR_MDFLAGS:
if (iSet)
spriteext[iActor].flags=lValue;
else
SetGameVarID(lVar2,spriteext[iActor].flags, g_i, g_p);
break;
default: default:
break; break;
} }
@ -4239,6 +4246,46 @@ static int parse(void)
break; 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_GETPNAME:
case CON_QSTRCAT: case CON_QSTRCAT:
case CON_QSTRCPY: case CON_QSTRCPY:

View file

@ -1193,6 +1193,7 @@ static void AddSystemVars()
AddGameVar("myreturntocenter",(long)&myreturntocenter, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_PCHAR | GAMEVAR_FLAG_SYNCCHECK); 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("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) void InitGameVars(void)
@ -1331,4 +1332,5 @@ static void ResetPointerVars(void)
aGameVars[GetGameID("myreturntocenter")].lValue = (long)&myreturntocenter; aGameVars[GetGameID("myreturntocenter")].lValue = (long)&myreturntocenter;
aGameVars[GetGameID("display_mirror")].lValue = (long)&display_mirror; aGameVars[GetGameID("display_mirror")].lValue = (long)&display_mirror;
aGameVars[GetGameID("randomseed")].lValue = (long)&randomseed;
} }