Adds logic CON commands:

ifvaror |
ifvarxor ^
ifvareither || (rename?)


git-svn-id: https://svn.eduke32.com/eduke32@1060 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hnt_ts 2008-09-07 12:36:20 +00:00
parent b664f7686e
commit 0c77f4a6f5
3 changed files with 54 additions and 0 deletions

View file

@ -471,6 +471,12 @@ const char *keyw[] =
"setgamepalette", // 334
"setdefname", // 335
"setcfgname", // 336
"ifvaror", // 337
"ifvarvaror", // 338
"ifvarxor", // 339
"ifvarvarxor", // 340
"ifvareither", // 341
"ifvarvareither", // 342
"<null>"
};
@ -4001,6 +4007,9 @@ static int parsecommand(void)
case CON_IFVARVARE:
case CON_IFVARVARN:
case CON_IFVARVARAND:
case CON_IFVARVAROR:
case CON_IFVARVARXOR:
case CON_IFVARVAREITHER:
case CON_WHILEVARVARN:
{
intptr_t offset;
@ -4040,6 +4049,9 @@ static int parsecommand(void)
case CON_IFVARE:
case CON_IFVARN:
case CON_IFVARAND:
case CON_IFVAROR:
case CON_IFVARXOR:
case CON_IFVAREITHER:
case CON_WHILEVARN:
{
intptr_t offset;

View file

@ -859,5 +859,11 @@ enum keywords
CON_SETGAMEPALETTE, // 334
CON_SETDEFNAME, // 335
CON_SETCFGNAME, // 336
CON_IFVAROR, // 337
CON_IFVARVAROR, // 338
CON_IFVARXOR, // 339
CON_IFVARVARXOR, // 340
CON_IFVAREITHER, // 341
CON_IFVARVAREITHER, // 342
CON_END
};

View file

@ -3821,6 +3821,24 @@ static int parse(void)
parseifelse(GetGameVarID(j, g_i, g_p) & GetGameVarID(*(insptr), g_i, g_p));
break;
case CON_IFVARVAROR:
insptr++;
j=*insptr++;
parseifelse(GetGameVarID(j, g_i, g_p) | GetGameVarID(*(insptr), g_i, g_p));
break;
case CON_IFVARVARXOR:
insptr++;
j=*insptr++;
parseifelse(GetGameVarID(j, g_i, g_p) ^ GetGameVarID(*(insptr), g_i, g_p));
break;
case CON_IFVARVAREITHER:
insptr++;
j=*insptr++;
parseifelse(GetGameVarID(j, g_i, g_p) || GetGameVarID(*(insptr), g_i, g_p));
break;
case CON_IFVARVARN:
insptr++;
j=*insptr++;
@ -3896,6 +3914,24 @@ static int parse(void)
parseifelse(GetGameVarID(j, g_i, g_p) & *insptr);
break;
case CON_IFVAROR:
insptr++;
j=*insptr++;
parseifelse(GetGameVarID(j, g_i, g_p) | *insptr);
break;
case CON_IFVARXOR:
insptr++;
j=*insptr++;
parseifelse(GetGameVarID(j, g_i, g_p) ^ *insptr);
break;
case CON_IFVAREITHER:
insptr++;
j=*insptr++;
parseifelse(GetGameVarID(j, g_i, g_p) || *insptr);
break;
case CON_IFVARG:
insptr++;
j=*insptr++;