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 "whilevarl", // 389
"whilevarvarl", // 390 "whilevarvarl", // 390
"klabs", // 391 "klabs", // 391
"ifvarle", // 392
"ifvarge", // 393
"ifvarboth", // 394
"<null>" "<null>"
}; };
#endif #endif
@ -4479,12 +4482,15 @@ DO_DEFSTATE:
continue; continue;
case CON_IFVARL: case CON_IFVARL:
case CON_IFVARLE:
case CON_IFVARG: case CON_IFVARG:
case CON_IFVARGE:
case CON_IFVARE: case CON_IFVARE:
case CON_IFVARN: case CON_IFVARN:
case CON_IFVARAND: case CON_IFVARAND:
case CON_IFVAROR: case CON_IFVAROR:
case CON_IFVARXOR: case CON_IFVARXOR:
case CON_IFVARBOTH:
case CON_IFVAREITHER: case CON_IFVAREITHER:
case CON_WHILEVARN: case CON_WHILEVARN:
case CON_WHILEVARL: case CON_WHILEVARL:

View file

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

View file

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