VarAction2: Add last_value variants of JZ/JNZ ops

This commit is contained in:
Jonathan G Rennison
2022-07-30 23:32:23 +01:00
parent cbc6199542
commit 9a4c31b0da
3 changed files with 37 additions and 20 deletions

View File

@@ -208,6 +208,8 @@ enum DeterministicSpriteGroupAdjustOperation : uint8 {
DSGA_OP_ABS, ///< abs(a)
DSGA_OP_JZ, ///< jump forward fixed number of adjusts (to adjust after DSGAF_END_BLOCK marker (taking into account nesting)) if b is zero. return 0 if jumped, return a if not jumped
DSGA_OP_JNZ, ///< jump forward fixed number of adjusts (to adjust after DSGAF_END_BLOCK marker (taking into account nesting)) if b is non-zero. return b if jumped, return a if not jumped
DSGA_OP_JZ_LV, ///< jump forward fixed number of adjusts (to adjust after DSGAF_END_BLOCK marker (taking into account nesting)) if a is zero. return a
DSGA_OP_JNZ_LV, ///< jump forward fixed number of adjusts (to adjust after DSGAF_END_BLOCK marker (taking into account nesting)) if a is non-zero. return a
DSGA_OP_SPECIAL_END,
};
@@ -408,6 +410,8 @@ inline bool IsEvalAdjustJumpOperation(DeterministicSpriteGroupAdjustOperation op
switch (op) {
case DSGA_OP_JZ:
case DSGA_OP_JNZ:
case DSGA_OP_JZ_LV:
case DSGA_OP_JNZ_LV:
return true;
default: