C-CON: Add ifvarge, ifvarle, and ifvarboth in line with ifvarvarge, ifvarvarle, and ifvarvarboth.

git-svn-id: https://svn.eduke32.com/eduke32@5530 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2016-01-08 01:33:39 +00:00
parent 3a8d53573c
commit f403d6234c
3 changed files with 27 additions and 0 deletions

View file

@ -568,6 +568,9 @@ const char *keyw[] =
"whilevarl", // 389
"whilevarvarl", // 390
"klabs", // 391
"ifvarle", // 392
"ifvarge", // 393
"ifvarboth", // 394
"<null>"
};
#endif
@ -4479,12 +4482,15 @@ DO_DEFSTATE:
continue;
case CON_IFVARL:
case CON_IFVARLE:
case CON_IFVARG:
case CON_IFVARGE:
case CON_IFVARE:
case CON_IFVARN:
case CON_IFVARAND:
case CON_IFVAROR:
case CON_IFVARXOR:
case CON_IFVARBOTH:
case CON_IFVAREITHER:
case CON_WHILEVARN:
case CON_WHILEVARL:

View file

@ -1059,6 +1059,9 @@ enum ScriptKeywords_t
CON_WHILEVARL, // 389
CON_WHILEVARVARL, // 390
CON_KLABS, // 391
CON_IFVARLE, // 392
CON_IFVARGE, // 393
CON_IFVARBOTH, // 394
CON_END
};
// KEEPINSYNC with the keyword list in lunatic/con_lang.lua

View file

@ -5256,18 +5256,36 @@ finish_qsprintf:
VM_CONDITIONAL(tw || *insptr);
continue;
case CON_IFVARBOTH:
insptr++;
tw = Gv_GetVarX(*insptr++);
VM_CONDITIONAL(tw && *insptr);
continue;
case CON_IFVARG:
insptr++;
tw = Gv_GetVarX(*insptr++);
VM_CONDITIONAL(tw > *insptr);
continue;
case CON_IFVARGE:
insptr++;
tw = Gv_GetVarX(*insptr++);
VM_CONDITIONAL(tw >= *insptr);
continue;
case CON_IFVARL:
insptr++;
tw = Gv_GetVarX(*insptr++);
VM_CONDITIONAL(tw < *insptr);
continue;
case CON_IFVARLE:
insptr++;
tw = Gv_GetVarX(*insptr++);
VM_CONDITIONAL(tw <= *insptr);
continue;
case CON_IFPHEALTHL:
insptr++;
VM_CONDITIONAL(sprite[ps->i].extra < *insptr);