Commit Graph

6 Commits

Author SHA1 Message Date
abeec202c9 Make sure BAD_REPLACE is set whenever a code string cannot be replaced by the option string. 2021-08-13 08:29:39 -05:00
4e9c4cbad1 Fix a problem where the code string was not being replaced if a code that required no replacement was present after one that did 2021-08-12 12:02:28 -05:00
ed274cc1d4 Add error checking: 16bit cheat codes must be even aligned 2021-07-11 09:12:40 -05:00
92357131a4 Cheats_LoadOption was failing when a cheat was loaded that did not do replacement on the entire code string
Just added a check against the original value for the replacement counter, if it didn't increment then there was no replacement
Hopefully this change isn't naive and works as intended
2021-07-02 06:51:48 -05:00
333ccf6213 Change so that memory is allocated whenever the selected cheat is loaded in Cheats_Read
Before this was using CheatFormat which had a limit of 100 (Now reduced to 20, it's only going to store Cheat500_O at most)
Really long names that went over 100 characters were causing memory corruption and a crash to desktop, allocating memory fixes that (Size of the name + the extension + 1 for the null character)
2021-07-02 00:04:13 -05:00
a40e398a1f Major overhaul to cheats, most processing has been moved to Cheats_Preprocessor
Cheat has received the ability to have Special Option (Address replacement) and Multiple Option (Both Address and Value replacement)
These are internal names for reference only, it will still use _O and .exten (cdb and rds respectively) for the files

The interface for the Cheat Manager also received a slight overhaul, it should better handle input (There were cases that caused crashes) and it takes into account the new formats (To disable/enable the interface buttons appropriately)

Cheat support for Ranges has been dropped, these were never used so I saw no reason to keep it

As always this is a work in progress and issues will be corrected as they are found.
2021-06-17 08:39:32 -05:00