Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow multiple preconditions per cheat
Each cheat code can have multiple preconditions which all have to be fulfilled before it can be executed. The default implementation in mupen64plus could not handle these extra test codes because a failed test only caused a jump over the next cheatcode (ignoring whether is also a test or a non-test cheatcode). Therefore, all (negative) results before a non-test cheat code have to be aggregated. The first non-test cheatcode evaluates the result of the preconditions and only executes the non-test cheatcode when no precondition test failed. The earlier results are always dropped after a non-test cheatcode to allow a fresh start.
- Loading branch information
Showing
1 changed file
with
34 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c1636fd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@littleguy77: It seems that this was a bug which a user experience with a "mupen64plus android port" and was submitted to us as issue 598 and may intereset you too. At least when such a bug report exists at your side about some movement hacks in "WWF no mercy". I've checked the cheat file and the only other predefined cheat code using multiple preconditions was for Bomberman Hero (Levitate). There might be more because I've only used a simple regex to grep through the file and did not verify whether this regex was correct.
See https://code.google.com/p/mupen64plus/issues/detail?id=598
c1636fd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks Sven. I've already merged this into our version3 (master) branch, but I may try to merge it with our 2.4-bugfixes branch if it's not too hard. Since version3 may still be a ways from publishing, and it's always worth rewarding diligent testers.
For reference, here's the thread where the discussion began:
www.paulscode.com/forum/index.php?topic=1423.msg12505
Tagging @xperia64 on this, as he is probably the best person on our end to track down other games with the issue. And @paulscode as well. I'm least qualified for sure :)
c1636fd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pokemon Stadium (E) game difficulty cheat is the only other one I could find. So bottom line, this commit fixes cheats for three games:
Edit: This is the regex I used on mupencheat.txt:
D[012389AB][\dA-F]{6} [\dA-F]{4}[\s]*?D[012389AB]