RetroArch
Classes | Macros | Typedefs | Enumerations | Functions | Variables
cheat_manager.h File Reference
#include <boolean.h>
#include <retro_common_api.h>
#include "../setting_list.h"
Include dependency graph for cheat_manager.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  item_cheat
 
struct  cheat_manager
 

Macros

#define CHEAT_CODE_SCRATCH_SIZE   16*1024
 
#define CHEAT_DESC_SCRATCH_SIZE   255
 

Typedefs

typedef struct cheat_manager cheat_manager_t
 

Enumerations

enum  cheat_handler_type { CHEAT_HANDLER_TYPE_EMU = 0, CHEAT_HANDLER_TYPE_RETRO, CHEAT_HANDLER_TYPE_END }
 
enum  cheat_type {
  CHEAT_TYPE_DISABLED = 0, CHEAT_TYPE_SET_TO_VALUE, CHEAT_TYPE_INCREASE_VALUE, CHEAT_TYPE_DECREASE_VALUE,
  CHEAT_TYPE_RUN_NEXT_IF_EQ, CHEAT_TYPE_RUN_NEXT_IF_NEQ, CHEAT_TYPE_RUN_NEXT_IF_LT, CHEAT_TYPE_RUN_NEXT_IF_GT
}
 
enum  cheat_search_type {
  CHEAT_SEARCH_TYPE_EXACT = 0, CHEAT_SEARCH_TYPE_LT, CHEAT_SEARCH_TYPE_LTE, CHEAT_SEARCH_TYPE_GT,
  CHEAT_SEARCH_TYPE_GTE, CHEAT_SEARCH_TYPE_EQ, CHEAT_SEARCH_TYPE_NEQ, CHEAT_SEARCH_TYPE_EQPLUS,
  CHEAT_SEARCH_TYPE_EQMINUS
}
 
enum  cheat_match_action_type { CHEAT_MATCH_ACTION_TYPE_VIEW = 0, CHEAT_MATCH_ACTION_TYPE_DELETE, CHEAT_MATCH_ACTION_TYPE_COPY, CHEAT_MATCH_ACTION_TYPE_BROWSE }
 
enum  cheat_rumble_type {
  RUMBLE_TYPE_DISABLED = 0, RUMBLE_TYPE_CHANGES, RUMBLE_TYPE_DOES_NOT_CHANGE, RUMBLE_TYPE_INCREASE,
  RUMBLE_TYPE_DECREASE, RUMBLE_TYPE_EQ_VALUE, RUMBLE_TYPE_NEQ_VALUE, RUMBLE_TYPE_LT_VALUE,
  RUMBLE_TYPE_GT_VALUE, RUMBLE_TYPE_INCREASE_BY_VALUE, RUMBLE_TYPE_DECREASE_BY_VALUE, RUMBLE_TYPE_END_LIST
}
 

Functions

unsigned cheat_manager_get_size (void)
 
bool cheat_manager_load (const char *path, bool append)
 
bool cheat_manager_save (const char *path, const char *cheat_database, bool overwrite)
 
bool cheat_manager_realloc (unsigned new_size, unsigned default_handler)
 
void cheat_manager_set_code (unsigned index, const char *str)
 
void cheat_manager_free (void)
 
void cheat_manager_index_next (void)
 
void cheat_manager_index_prev (void)
 
void cheat_manager_toggle (void)
 
void cheat_manager_apply_cheats (void)
 
void cheat_manager_update (cheat_manager_t *handle, unsigned handle_idx)
 
void cheat_manager_toggle_index (unsigned i)
 
unsigned cheat_manager_get_buf_size (void)
 
const char * cheat_manager_get_desc (unsigned i)
 
const char * cheat_manager_get_code (unsigned i)
 
bool cheat_manager_get_code_state (unsigned i)
 
void cheat_manager_state_free (void)
 
bool cheat_manager_alloc_if_empty (void)
 
bool cheat_manager_copy_idx_to_working (unsigned idx)
 
bool cheat_manager_copy_working_to_idx (unsigned idx)
 
void cheat_manager_load_game_specific_cheats (void)
 
void cheat_manager_save_game_specific_cheats (void)
 
int cheat_manager_initialize_memory (rarch_setting_t *setting, bool wraparound)
 
int cheat_manager_search_exact (rarch_setting_t *setting, bool wraparound)
 
int cheat_manager_search_lt (rarch_setting_t *setting, bool wraparound)
 
int cheat_manager_search_gt (rarch_setting_t *setting, bool wraparound)
 
int cheat_manager_search_lte (rarch_setting_t *setting, bool wraparound)
 
int cheat_manager_search_gte (rarch_setting_t *setting, bool wraparound)
 
int cheat_manager_search_eq (rarch_setting_t *setting, bool wraparound)
 
int cheat_manager_search_neq (rarch_setting_t *setting, bool wraparound)
 
int cheat_manager_search_eqplus (rarch_setting_t *setting, bool wraparound)
 
int cheat_manager_search_eqminus (rarch_setting_t *setting, bool wraparound)
 
int cheat_manager_add_matches (const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx)
 
void cheat_manager_apply_retro_cheats (void)
 
int cheat_manager_search (enum cheat_search_type search_type)
 
void cheat_manager_match_action (enum cheat_match_action_type match_action, unsigned int target_match_idx, unsigned int *address, unsigned int *address_mask, unsigned int *prev_value, unsigned int *curr_value)
 
int cheat_manager_copy_match (rarch_setting_t *setting, bool wraparound)
 
int cheat_manager_delete_match (rarch_setting_t *setting, bool wraparound)
 

Variables

cheat_manager_t cheat_manager_state
 

Macro Definition Documentation

◆ CHEAT_CODE_SCRATCH_SIZE

#define CHEAT_CODE_SCRATCH_SIZE   16*1024

◆ CHEAT_DESC_SCRATCH_SIZE

#define CHEAT_DESC_SCRATCH_SIZE   255

Typedef Documentation

◆ cheat_manager_t

Enumeration Type Documentation

◆ cheat_handler_type

Enumerator
CHEAT_HANDLER_TYPE_EMU 
CHEAT_HANDLER_TYPE_RETRO 
CHEAT_HANDLER_TYPE_END 

◆ cheat_match_action_type

Enumerator
CHEAT_MATCH_ACTION_TYPE_VIEW 
CHEAT_MATCH_ACTION_TYPE_DELETE 
CHEAT_MATCH_ACTION_TYPE_COPY 
CHEAT_MATCH_ACTION_TYPE_BROWSE 

◆ cheat_rumble_type

Enumerator
RUMBLE_TYPE_DISABLED 
RUMBLE_TYPE_CHANGES 
RUMBLE_TYPE_DOES_NOT_CHANGE 
RUMBLE_TYPE_INCREASE 
RUMBLE_TYPE_DECREASE 
RUMBLE_TYPE_EQ_VALUE 
RUMBLE_TYPE_NEQ_VALUE 
RUMBLE_TYPE_LT_VALUE 
RUMBLE_TYPE_GT_VALUE 
RUMBLE_TYPE_INCREASE_BY_VALUE 
RUMBLE_TYPE_DECREASE_BY_VALUE 
RUMBLE_TYPE_END_LIST 

◆ cheat_search_type

Enumerator
CHEAT_SEARCH_TYPE_EXACT 
CHEAT_SEARCH_TYPE_LT 
CHEAT_SEARCH_TYPE_LTE 
CHEAT_SEARCH_TYPE_GT 
CHEAT_SEARCH_TYPE_GTE 
CHEAT_SEARCH_TYPE_EQ 
CHEAT_SEARCH_TYPE_NEQ 
CHEAT_SEARCH_TYPE_EQPLUS 
CHEAT_SEARCH_TYPE_EQMINUS 

◆ cheat_type

enum cheat_type
Enumerator
CHEAT_TYPE_DISABLED 
CHEAT_TYPE_SET_TO_VALUE 
CHEAT_TYPE_INCREASE_VALUE 
CHEAT_TYPE_DECREASE_VALUE 
CHEAT_TYPE_RUN_NEXT_IF_EQ 
CHEAT_TYPE_RUN_NEXT_IF_NEQ 
CHEAT_TYPE_RUN_NEXT_IF_LT 
CHEAT_TYPE_RUN_NEXT_IF_GT 

Function Documentation

◆ cheat_manager_add_matches()

int cheat_manager_add_matches ( const char *  path,
const char *  label,
unsigned  type,
size_t  idx,
size_t  entry_idx 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_alloc_if_empty()

bool cheat_manager_alloc_if_empty ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_apply_cheats()

void cheat_manager_apply_cheats ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_apply_retro_cheats()

void cheat_manager_apply_retro_cheats ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_copy_idx_to_working()

bool cheat_manager_copy_idx_to_working ( unsigned  idx)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_copy_match()

int cheat_manager_copy_match ( rarch_setting_t setting,
bool  wraparound 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_copy_working_to_idx()

bool cheat_manager_copy_working_to_idx ( unsigned  idx)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_delete_match()

int cheat_manager_delete_match ( rarch_setting_t setting,
bool  wraparound 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_free()

void cheat_manager_free ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_get_buf_size()

unsigned cheat_manager_get_buf_size ( void  )
Here is the caller graph for this function:

◆ cheat_manager_get_code()

const char* cheat_manager_get_code ( unsigned  i)
Here is the caller graph for this function:

◆ cheat_manager_get_code_state()

bool cheat_manager_get_code_state ( unsigned  i)
Here is the caller graph for this function:

◆ cheat_manager_get_desc()

const char* cheat_manager_get_desc ( unsigned  i)
Here is the caller graph for this function:

◆ cheat_manager_get_size()

unsigned cheat_manager_get_size ( void  )
Here is the caller graph for this function:

◆ cheat_manager_index_next()

void cheat_manager_index_next ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_index_prev()

void cheat_manager_index_prev ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_initialize_memory()

int cheat_manager_initialize_memory ( rarch_setting_t setting,
bool  wraparound 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_load()

bool cheat_manager_load ( const char *  path,
bool  append 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_load_game_specific_cheats()

void cheat_manager_load_game_specific_cheats ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_match_action()

void cheat_manager_match_action ( enum cheat_match_action_type  match_action,
unsigned int  target_match_idx,
unsigned int *  address,
unsigned int *  address_mask,
unsigned int *  prev_value,
unsigned int *  curr_value 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_realloc()

bool cheat_manager_realloc ( unsigned  new_size,
unsigned  default_handler 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_save()

bool cheat_manager_save ( const char *  path,
const char *  cheat_database,
bool  overwrite 
)

cheat_manager_save: : Path to cheats file (absolute path).

Saves cheats to file on disk.

Returns: true (1) if successful, otherwise false (0).

cheat_manager_save: : Path to cheats file (relative path).

Saves cheats to file on disk.

Returns: true (1) if successful, otherwise false (0).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_save_game_specific_cheats()

void cheat_manager_save_game_specific_cheats ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_search()

int cheat_manager_search ( enum cheat_search_type  search_type)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_search_eq()

int cheat_manager_search_eq ( rarch_setting_t setting,
bool  wraparound 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_search_eqminus()

int cheat_manager_search_eqminus ( rarch_setting_t setting,
bool  wraparound 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_search_eqplus()

int cheat_manager_search_eqplus ( rarch_setting_t setting,
bool  wraparound 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_search_exact()

int cheat_manager_search_exact ( rarch_setting_t setting,
bool  wraparound 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_search_gt()

int cheat_manager_search_gt ( rarch_setting_t setting,
bool  wraparound 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_search_gte()

int cheat_manager_search_gte ( rarch_setting_t setting,
bool  wraparound 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_search_lt()

int cheat_manager_search_lt ( rarch_setting_t setting,
bool  wraparound 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_search_lte()

int cheat_manager_search_lte ( rarch_setting_t setting,
bool  wraparound 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_search_neq()

int cheat_manager_search_neq ( rarch_setting_t setting,
bool  wraparound 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_set_code()

void cheat_manager_set_code ( unsigned  index,
const char *  str 
)
Here is the call graph for this function:

◆ cheat_manager_state_free()

void cheat_manager_state_free ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_toggle()

void cheat_manager_toggle ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_toggle_index()

void cheat_manager_toggle_index ( unsigned  i)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_update()

void cheat_manager_update ( cheat_manager_t handle,
unsigned  handle_idx 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ cheat_manager_state

cheat_manager_t cheat_manager_state