mirror of
https://github.com/holub/mame
synced 2025-05-07 23:02:33 +03:00

memory regions. Extended error codes to report incorrect memory spaces, memory names, or memory sizes. Added verification callback to the debugger to validate CPU and memory region names, as well as verifying that a requested address space exists for a given CPU. Added support for oneshot cheats (those with only an "on" script). They are activated via UI_SELECT in the cheat menu, and pop up a message when activated. Also added a "Reset All" item in the cheat menu to reset all cheats back to their default state, and added support for UI_SELECT on a non-oneshot cheat so that it resets that cheat to its default value. Restored previous behavior that allowed popmessage() messages to overlay menus and other UI.
55 lines
1.4 KiB
C
55 lines
1.4 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);
|
|
|
|
/* activate a oneshot cheat */
|
|
int cheat_activate(running_machine *machine, void *entry);
|
|
|
|
/* select the default menu state */
|
|
int cheat_select_default_state(running_machine *machine, void *entry);
|
|
|
|
/* 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__ */
|