Proposal:
Add an attribute to the <cheat> tag called "preload" which, when it equals 1, sets the default status of an onoff cheat to RUN. This may also require modification of the code at default line 695.
DIFF starting at line ~180:
Code: Select all
/* a single cheat */
typedef struct _cheat_entry cheat_entry;
struct _cheat_entry
{
cheat_entry * next; /* next cheat entry */
astring description; /* string description/menu title */
UINT32 preload; /* preload cheat? */
astring comment; /* comment data */
cheat_parameter * parameter; /* parameter */
cheat_script * script[SCRIPT_STATE_COUNT]; /* up to 1 script for each state */
symbol_table * symbols; /* symbol table for this cheat */
script_state state; /* current cheat state */
UINT32 numtemp; /* number of temporary variables */
UINT64 argindex; /* argument index variable */
UINT64 * tempvar; /* value of the temporary variables */
};
DIFF starting at line ~1262:
Code: Select all
/* set the initial state */
if (is_onoff_cheat(cheat))
{
if (xml_get_attribute_int(cheatnode, "preload", NULL) == 1)
{
cheat->state = SCRIPT_STATE_RUN;
}
else
{
cheat->state = SCRIPT_STATE_OFF;
}
}
else
{
cheat->state = SCRIPT_STATE_OFF;
}