mirror of
https://github.com/holub/mame
synced 2025-05-22 05:38:52 +03:00
> -----Original Message-----
> Sent: Wednesday, September 09, 2009 10:32 PM > To: submit@mamedev.org > Subject: cheat update > > Simple update for add "increase or equal" and "decrease or equal" in > cheatnext conditions [Sandro Ronco]
This commit is contained in:
parent
647b726571
commit
6051f45409
@ -1927,6 +1927,8 @@ static void execute_cheatnext(running_machine *machine, int ref, int params, con
|
||||
CHEAT_NOTEQUALTO,
|
||||
CHEAT_DECREASE,
|
||||
CHEAT_INCREASE,
|
||||
CHEAT_DECREASE_OR_EQUAL,
|
||||
CHEAT_INCREASE_OR_EQUAL,
|
||||
CHEAT_DECREASEOF,
|
||||
CHEAT_INCREASEOF,
|
||||
CHEAT_SMALLEROF,
|
||||
@ -1957,6 +1959,10 @@ static void execute_cheatnext(running_machine *machine, int ref, int params, con
|
||||
condition = (params > 1) ? CHEAT_DECREASEOF : CHEAT_DECREASE;
|
||||
else if (!strcmp(param[0], "increase") || !strcmp(param[0], "in") || !strcmp(param[0], "+"))
|
||||
condition = (params > 1) ? CHEAT_INCREASEOF : CHEAT_INCREASE;
|
||||
else if (!strcmp(param[0], "decreaseorequal") || !strcmp(param[0], "deeq"))
|
||||
condition = CHEAT_DECREASE_OR_EQUAL;
|
||||
else if (!strcmp(param[0], "increaseorequal") || !strcmp(param[0], "ineq"))
|
||||
condition = CHEAT_INCREASE_OR_EQUAL;
|
||||
else if (!strcmp(param[0], "smallerof") || !strcmp(param[0], "lt") || !strcmp(param[0], "<"))
|
||||
condition = CHEAT_SMALLEROF;
|
||||
else if (!strcmp(param[0], "greaterof") || !strcmp(param[0], "gt") || !strcmp(param[0], ">"))
|
||||
@ -2012,6 +2018,20 @@ static void execute_cheatnext(running_machine *machine, int ref, int params, con
|
||||
disable_byte = ((UINT64)cheat_value <= (UINT64)comp_byte);
|
||||
break;
|
||||
|
||||
case CHEAT_DECREASE_OR_EQUAL:
|
||||
if (cheat.signed_cheat)
|
||||
disable_byte = ((INT64)cheat_value > (INT64)comp_byte);
|
||||
else
|
||||
disable_byte = ((UINT64)cheat_value > (UINT64)comp_byte);
|
||||
break;
|
||||
|
||||
case CHEAT_INCREASE_OR_EQUAL:
|
||||
if (cheat.signed_cheat)
|
||||
disable_byte = ((INT64)cheat_value < (INT64)comp_byte);
|
||||
else
|
||||
disable_byte = ((UINT64)cheat_value < (UINT64)comp_byte);
|
||||
break;
|
||||
|
||||
case CHEAT_DECREASEOF:
|
||||
disable_byte = (cheat_value != comp_byte - comp_value);
|
||||
break;
|
||||
|
@ -1112,6 +1112,12 @@ static const help_item static_help_list[] =
|
||||
" increase [in, -]\n"
|
||||
" without <comparisonvalue> search for all bytes that have increased since the last search.\n"
|
||||
" with <comparisonvalue> search for all bytes that have increased by the <comparisonvalue> since the last search.\n"
|
||||
" decreaseorequal [deeq]\n"
|
||||
" no <comparisonvalue> needed.\n"
|
||||
" search for all bytes that have decreased or have same value since the last search.\n"
|
||||
" increaseorequal [ineq]\n"
|
||||
" no <comparisonvalue> needed.\n"
|
||||
" search for all bytes that have decreased or have same value since the last search.\n"
|
||||
" smallerof [lt]\n"
|
||||
" without <comparisonvalue> this condition is invalid\n"
|
||||
" with <comparisonvalue> search for all bytes that are smaller than the <comparisonvalue>.\n"
|
||||
@ -1149,6 +1155,12 @@ static const help_item static_help_list[] =
|
||||
" increase [in, -]\n"
|
||||
" without <comparisonvalue> search for all bytes that have increased since the initial search.\n"
|
||||
" with <comparisonvalue> search for all bytes that have increased by the <comparisonvalue> since the initial search.\n"
|
||||
" decreaseorequal [deeq]\n"
|
||||
" no <comparisonvalue> needed.\n"
|
||||
" search for all bytes that have decreased or have same value since the initial search.\n"
|
||||
" increaseorequal [ineq]\n"
|
||||
" no <comparisonvalue> needed.\n"
|
||||
" search for all bytes that have decreased or have same value since the initial search.\n"
|
||||
" smallerof [lt]\n"
|
||||
" without <comparisonvalue> this condition is invalid.\n"
|
||||
" with <comparisonvalue> search for all bytes that are smaller than the <comparisonvalue>.\n"
|
||||
|
Loading…
Reference in New Issue
Block a user