mame/src/emu/cheat.h
Aaron Giles 4a36b515ed Changes to the cheat.xml format:
- new tag <comment> (within <cheat>) is read and preserved 
    when saved
 - removed variable attribute from <parameter>; it is now 
    assumed to be 'param'
 - added default attribute for <parameter>

Added new variable 'frame' accessible from cheat scripts. This
can be used in the conditional to prevent execution on every
frame, or for other effects (like displaying temporary messages).

Added new variable 'argindex' which is the index when processing
an <argument> with a count attribute greater than 1. Can be used
in expressions like:

  <argument count="3">main.pb@(1000+argindex)</argument>

Reinstated the cheat menu. It now displays all loaded cheats and
allows for them to be activated. All known cheat behaviors should
be working now.
2008-08-06 05:24:31 +00:00

49 lines
1.2 KiB
C

/*********************************************************************
cheat.h
Cheat system.
Copyright Nicola Salmoria and the MAME Team.
Visit http://mamedev.org for licensing and usage restrictions.
*********************************************************************/
#pragma once
#ifndef __CHEAT_H__
#define __CHEAT_H__
#include "mamecore.h"
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
/* ----- core system management ----- */
/* initialize the cheat system, loading any cheat files */
void cheat_init(running_machine *machine);
/* ----- cheat UI helpers ----- */
/* render any text overlays */
void cheat_render_text(running_machine *machine);
/* return data about the next menu entry, or the first entry if previous == NULL */
void *cheat_get_next_menu_entry(running_machine *machine, void *previous, const char **description, const char **state, UINT32 *flags);
/* select the previous menu state */
int cheat_select_previous_state(running_machine *machine, void *entry);
/* select the next menu state */
int cheat_select_next_state(running_machine *machine, void *entry);
#endif /* __CHEAT_H__ */