mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
VarAction2: Convert boolean, invert sequence to ternary
This commit is contained in:
parent
90a2aa57fc
commit
2f09eff404
@ -5800,6 +5800,14 @@ static void NewSpriteGroup(ByteReader *buf)
|
||||
inference = VA2AIF_SIGNED_NON_NEGATIVE | VA2AIF_ONE_OR_ZERO;
|
||||
break;
|
||||
}
|
||||
if (prev.operation == DSGA_OP_UMIN && prev.type == DSGA_TYPE_NONE && prev.variable == 0x1A && prev.shift_num == 0 && prev.and_mask == 1) {
|
||||
prev.operation = DSGA_OP_TERNARY;
|
||||
prev.and_mask = 0;
|
||||
prev.add_val = 1;
|
||||
group->adjusts.pop_back();
|
||||
inference = VA2AIF_PREV_TERNARY;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (adjust.and_mask <= 1) inference = prev_inference & (VA2AIF_SIGNED_NON_NEGATIVE | VA2AIF_ONE_OR_ZERO);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user