VarAction2: Add a JNZ op analogous to JZ for OR ops
This commit is contained in:
@@ -207,6 +207,7 @@ enum DeterministicSpriteGroupAdjustOperation : uint8 {
|
||||
DSGA_OP_STO_NC, ///< store b into temporary storage, indexed by c. return a
|
||||
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_SPECIAL_END,
|
||||
};
|
||||
@@ -402,6 +403,18 @@ inline bool IsEvalAdjustWithZeroLastValueAlwaysZero(DeterministicSpriteGroupAdju
|
||||
}
|
||||
}
|
||||
|
||||
inline bool IsEvalAdjustJumpOperation(DeterministicSpriteGroupAdjustOperation op)
|
||||
{
|
||||
switch (op) {
|
||||
case DSGA_OP_JZ:
|
||||
case DSGA_OP_JNZ:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
inline bool IsConstantComparisonAdjustType(DeterministicSpriteGroupAdjustType adjust_type)
|
||||
{
|
||||
switch (adjust_type) {
|
||||
|
Reference in New Issue
Block a user