RetroArch
Functions
cheat_manager.c File Reference
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <errno.h>
#include <file/config_file.h>
#include <file/file_path.h>
#include <compat/strl.h>
#include <compat/posix_string.h>
#include <streams/file_stream.h>
#include <string/stdstring.h>
#include <retro_miscellaneous.h>
#include <features/features_cpu.h>
#include "cheat_manager.h"
#include "../msg_hash.h"
#include "../retroarch.h"
#include "../dynamic.h"
#include "../core.h"
#include "../verbosity.h"
#include "../input/input_driver.h"
#include "../configuration.h"
Include dependency graph for cheat_manager.c:
This graph shows which files directly or indirectly include this file:

Functions

unsigned cheat_manager_get_buf_size (void)
 
unsigned cheat_manager_get_size (void)
 
void cheat_manager_apply_cheats (void)
 
void cheat_manager_set_code (unsigned i, const char *str)
 
bool cheat_manager_save (const char *path, const char *cheat_database, bool overwrite)
 
bool cheat_manager_copy_idx_to_working (unsigned idx)
 
bool cheat_manager_copy_working_to_idx (unsigned idx)
 
static void cheat_manager_new (unsigned size)
 
void cheat_manager_load_cb_first_pass (char *key, char *value)
 
void cheat_manager_load_cb_second_pass (char *key, char *value)
 
bool cheat_manager_load (const char *path, bool append)
 
bool cheat_manager_realloc (unsigned new_size, unsigned default_handler)
 
void cheat_manager_free (void)
 
void cheat_manager_update (cheat_manager_t *handle, unsigned handle_idx)
 
void cheat_manager_toggle_index (unsigned i)
 
void cheat_manager_toggle (void)
 
void cheat_manager_index_next (void)
 
void cheat_manager_index_prev (void)
 
const char * cheat_manager_get_code (unsigned i)
 
const char * cheat_manager_get_desc (unsigned i)
 
bool cheat_manager_get_code_state (unsigned i)
 
bool cheat_manager_get_game_specific_filename (char *cheat_filename, size_t max_length)
 
void cheat_manager_load_game_specific_cheats ()
 
void cheat_manager_save_game_specific_cheats ()
 
void cheat_manager_state_free (void)
 
bool cheat_manager_alloc_if_empty (void)
 
int cheat_manager_initialize_memory (rarch_setting_t *setting, bool wraparound)
 
static unsigned translate_address (unsigned address, unsigned char **curr)
 
static void cheat_manager_setup_search_meta (unsigned int bitsize, unsigned int *bytes_per_item, unsigned int *mask, unsigned int *bits)
 
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_search (enum cheat_search_type search_type)
 
bool cheat_manager_add_new_code (unsigned int memory_search_size, unsigned int address, unsigned int address_mask, bool big_endian, unsigned int value)
 
int cheat_manager_add_matches (const char *path, const char *label, unsigned type, size_t menuidx, size_t entry_idx)
 
void cheat_manager_apply_rumble (struct item_cheat *cheat, unsigned int curr_value)
 
void cheat_manager_apply_retro_cheats (void)
 
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)
 

Function Documentation

◆ cheat_manager_add_matches()

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

◆ cheat_manager_add_new_code()

bool cheat_manager_add_new_code ( unsigned int  memory_search_size,
unsigned int  address,
unsigned int  address_mask,
bool  big_endian,
unsigned int  value 
)
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_apply_rumble()

void cheat_manager_apply_rumble ( struct item_cheat cheat,
unsigned int  curr_value 
)
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_game_specific_filename()

bool cheat_manager_get_game_specific_filename ( char *  cheat_filename,
size_t  max_length 
)
Here is the call graph for this function:
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_cb_first_pass()

void cheat_manager_load_cb_first_pass ( char *  key,
char *  value 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheat_manager_load_cb_second_pass()

void cheat_manager_load_cb_second_pass ( char *  key,
char *  value 
)
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_new()

static void cheat_manager_new ( unsigned  size)
static
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 (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  i,
const char *  str 
)
Here is the call graph for this function:

◆ cheat_manager_setup_search_meta()

static void cheat_manager_setup_search_meta ( unsigned int  bitsize,
unsigned int *  bytes_per_item,
unsigned int *  mask,
unsigned int *  bits 
)
static
Here is the caller 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:

◆ translate_address()

static unsigned translate_address ( unsigned  address,
unsigned char **  curr 
)
static
Here is the caller graph for this function: