VarAction2: Handle zero adjusts simple case in callback analyser
This commit is contained in:
@@ -286,9 +286,9 @@ void DeterministicSpriteGroup::AnalyseCallbacks(AnalyseCallbackOperation &op) co
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto check_1A_range = [&]() -> bool {
|
auto check_1A_range = [&]() -> bool {
|
||||||
if (this->adjusts.size() == 1 && this->adjusts[0].variable == 0x1A) {
|
if (this->adjusts.size() == 0 || (this->adjusts.size() == 1 && this->adjusts[0].variable == 0x1A && (this->adjusts[0].operation == DSGA_OP_ADD || this->adjusts[0].operation == DSGA_OP_RST))) {
|
||||||
/* Not clear why some GRFs do this, perhaps a way of commenting out a branch */
|
/* Not clear why some GRFs do this, perhaps a way of commenting out a branch */
|
||||||
uint32 value = EvaluateDeterministicSpriteGroupAdjust(this->size, this->adjusts[0], nullptr, 0, UINT_MAX);
|
uint32 value = (this->adjusts.size() == 1) ? EvaluateDeterministicSpriteGroupAdjust(this->size, this->adjusts[0], nullptr, 0, UINT_MAX) : 0;
|
||||||
for (const auto &range : this->ranges) {
|
for (const auto &range : this->ranges) {
|
||||||
if (range.low <= value && value <= range.high) {
|
if (range.low <= value && value <= range.high) {
|
||||||
if (range.group != nullptr) range.group->AnalyseCallbacks(op);
|
if (range.group != nullptr) range.group->AnalyseCallbacks(op);
|
||||||
|
Reference in New Issue
Block a user