Cheats: Use "name" instead of "description". Allow whitespace.

This commit is contained in:
Brandon Wright 2018-06-04 10:29:46 -05:00
parent 28332c5789
commit 13769eeccf
2 changed files with 27171 additions and 27171 deletions

View File

@ -546,21 +546,21 @@ SCheat S9xTextToCheat (char *text)
byte = c.byte; byte = c.byte;
} }
else if (sscanf (text, "%x=%x?%x", &c.address, &cond_byte, &byte) == 3) else if (sscanf (text, "%x = %x ? %x", &c.address, &cond_byte, &byte) == 3)
{ {
c.conditional = true; c.conditional = true;
} }
else if (sscanf (text, "%x=%x", &c.address, &byte) == 2) else if (sscanf (text, "%x = %x", &c.address, &byte) == 2)
{ {
} }
else if (sscanf (text, "%x/%x/%x", &c.address, &cond_byte, &byte) == 3) else if (sscanf (text, "%x / %x / %x", &c.address, &cond_byte, &byte) == 3)
{ {
c.conditional = true; c.conditional = true;
} }
else if (sscanf (text, "%x/%x", &c.address, &byte) == 2) else if (sscanf (text, "%x / %x", &c.address, &byte) == 2)
{ {
} }
@ -742,7 +742,7 @@ static void S9xLoadCheatsFromBMLNode (bml_node *n)
bml_node *c = n->child[i]; bml_node *c = n->child[i];
bml_node *tmp = NULL; bml_node *tmp = NULL;
tmp = bml_find_sub(c, "description"); tmp = bml_find_sub(c, "name");
desc = tmp->data; desc = tmp->data;
if (!desc) if (!desc)
desc = (char *) ""; desc = (char *) "";
@ -847,7 +847,7 @@ bool8 S9xSaveCheatFile (const char *filename)
fprintf (file, fprintf (file,
"cheat\n" "cheat\n"
" description: %s\n" " name: %s\n"
" code: %s\n" " code: %s\n"
"%s\n", "%s\n",
Cheat.g[i].name ? Cheat.g[i].name : "", Cheat.g[i].name ? Cheat.g[i].name : "",

File diff suppressed because it is too large Load Diff