RetroArch
Classes | Macros | Enumerations | Functions | Variables
cheevos.c File Reference
#include <string.h>
#include <ctype.h>
#include <file/file_path.h>
#include <string/stdstring.h>
#include <streams/interface_stream.h>
#include <streams/file_stream.h>
#include <features/features_cpu.h>
#include <compat/strl.h>
#include <rhash.h>
#include <retro_miscellaneous.h>
#include <retro_math.h>
#include <net/net_http.h>
#include <libretro.h>
#include "badges.h"
#include "cheevos.h"
#include "fixup.h"
#include "parser.h"
#include "hash.h"
#include "util.h"
#include "../file_path_special.h"
#include "../paths.h"
#include "../command.h"
#include "../dynamic.h"
#include "../configuration.h"
#include "../performance_counters.h"
#include "../msg_hash.h"
#include "../retroarch.h"
#include "../core.h"
#include "../network/net_http_special.h"
#include "../tasks/tasks_internal.h"
#include <rcheevos.h>
#include <rurl.h>
#include "coro.h"
Include dependency graph for cheevos.c:

Classes

struct  cheevos_cheevo_t
 
struct  cheevos_lboard_t
 
struct  cheevos_locals_t
 
struct  cheevos_finder_t
 
struct  cheevos_nes_header_t
 
struct  coro_t
 

Macros

#define CHEEVOS_LOCK(l)
 
#define CHEEVOS_UNLOCK(l)
 
#define CHEEVOS_MB(x)   ((x) * 1024 * 1024)
 

Enumerations

enum  {
  SNES_MD5 = -1, GENESIS_MD5 = -2, LYNX_MD5 = -3, NES_MD5 = -4,
  GENERIC_MD5 = -5, FILENAME_MD5 = -6, EVAL_MD5 = -7, FILL_MD5 = -8,
  GET_GAMEID = -9, GET_CHEEVOS = -10, GET_BADGES = -11, LOGIN = -12,
  HTTP_GET = -13, DEACTIVATE = -14, PLAYING = -15, DELAY = -16
}
 

Functions

void cheevos_log (const char *fmt,...)
 
static void cheevos_log_url (const char *format, const char *url)
 
static const char * cheevos_rc_error (int ret)
 
static int cheevos_parse (const char *json)
 
static void cheevos_award_task_softcore (void *task_data, void *user_data, const char *error)
 
static void cheevos_award_task_hardcore (void *task_data, void *user_data, const char *error)
 
static void cheevos_award (cheevos_cheevo_t *cheevo, int mode)
 
static unsigned cheevos_peek (unsigned address, unsigned num_bytes, void *ud)
 
static void cheevos_test_cheevo_set (bool official)
 
static void cheevos_lboard_submit_task (void *task_data, void *user_data, const char *error)
 
static void cheevos_lboard_submit (cheevos_lboard_t *lboard)
 
static void cheevos_test_leaderboards (void)
 
void cheevos_reset_game (void)
 
void cheevos_populate_menu (void *data)
 
bool cheevos_get_description (cheevos_ctx_desc_t *desc)
 
bool cheevos_apply_cheats (bool *data_bool)
 
bool cheevos_unload (void)
 
bool cheevos_toggle_hardcore_mode (void)
 
void cheevos_test (void)
 
bool cheevos_set_cheats (void)
 
void cheevos_set_support_cheevos (bool state)
 
bool cheevos_get_support_cheevos (void)
 
int cheevos_get_console (void)
 
static void cheevos_unlock_cb (unsigned id, void *userdata)
 
static int cheevos_iterate (coro_t *coro)
 
static void cheevos_task_handler (retro_task_t *task)
 
bool cheevos_load (const void *data)
 

Variables

static cheevos_locals_t cheevos_locals
 
bool cheevos_loaded = false
 
bool cheevos_hardcore_active = false
 
bool cheevos_hardcore_paused = false
 
bool cheevos_state_loaded_flag = false
 
int cheats_are_enabled = 0
 
int cheats_were_enabled = 0
 

Macro Definition Documentation

◆ CHEEVOS_LOCK

#define CHEEVOS_LOCK (   l)

◆ CHEEVOS_MB

#define CHEEVOS_MB (   x)    ((x) * 1024 * 1024)

◆ CHEEVOS_UNLOCK

#define CHEEVOS_UNLOCK (   l)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SNES_MD5 
GENESIS_MD5 
LYNX_MD5 
NES_MD5 
GENERIC_MD5 
FILENAME_MD5 
EVAL_MD5 
FILL_MD5 
GET_GAMEID 
GET_CHEEVOS 
GET_BADGES 
LOGIN 
HTTP_GET 
DEACTIVATE 
PLAYING 
DELAY 

Function Documentation

◆ cheevos_apply_cheats()

bool cheevos_apply_cheats ( bool data_bool)

◆ cheevos_award()

static void cheevos_award ( cheevos_cheevo_t cheevo,
int  mode 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_award_task_hardcore()

static void cheevos_award_task_hardcore ( void task_data,
void user_data,
const char *  error 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_award_task_softcore()

static void cheevos_award_task_softcore ( void task_data,
void user_data,
const char *  error 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_get_console()

int cheevos_get_console ( void  )

◆ cheevos_get_description()

bool cheevos_get_description ( cheevos_ctx_desc_t desc)
Here is the call graph for this function:

◆ cheevos_get_support_cheevos()

bool cheevos_get_support_cheevos ( void  )

◆ cheevos_iterate()

static int cheevos_iterate ( coro_t coro)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_lboard_submit()

static void cheevos_lboard_submit ( cheevos_lboard_t lboard)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_lboard_submit_task()

static void cheevos_lboard_submit_task ( void task_data,
void user_data,
const char *  error 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_load()

bool cheevos_load ( const void data)
Here is the call graph for this function:

◆ cheevos_log()

void cheevos_log ( const char *  fmt,
  ... 
)
Here is the call graph for this function:

◆ cheevos_log_url()

static void cheevos_log_url ( const char *  format,
const char *  url 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_parse()

static int cheevos_parse ( const char *  json)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_peek()

static unsigned cheevos_peek ( unsigned  address,
unsigned  num_bytes,
void ud 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_populate_menu()

void cheevos_populate_menu ( void data)
Here is the call graph for this function:

◆ cheevos_rc_error()

static const char* cheevos_rc_error ( int  ret)
static
Here is the caller graph for this function:

◆ cheevos_reset_game()

void cheevos_reset_game ( void  )

◆ cheevos_set_cheats()

bool cheevos_set_cheats ( void  )

◆ cheevos_set_support_cheevos()

void cheevos_set_support_cheevos ( bool  state)

◆ cheevos_task_handler()

static void cheevos_task_handler ( retro_task_t task)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_test()

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

◆ cheevos_test_cheevo_set()

static void cheevos_test_cheevo_set ( bool  official)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cheevos_test_leaderboards()

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

◆ cheevos_toggle_hardcore_mode()

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

◆ cheevos_unload()

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

◆ cheevos_unlock_cb()

static void cheevos_unlock_cb ( unsigned  id,
void userdata 
)
static
Here is the caller graph for this function:

Variable Documentation

◆ cheats_are_enabled

int cheats_are_enabled = 0

◆ cheats_were_enabled

int cheats_were_enabled = 0

◆ cheevos_hardcore_active

bool cheevos_hardcore_active = false

◆ cheevos_hardcore_paused

bool cheevos_hardcore_paused = false

◆ cheevos_loaded

bool cheevos_loaded = false

◆ cheevos_locals

cheevos_locals_t cheevos_locals
static
Initial value:
=
{
NULL,
true,
{0},
NULL,
NULL,
NULL,
{0},
{0},
}
#define NULL
Pointer to 0.
Definition: gctypes.h:65

◆ cheevos_state_loaded_flag

bool cheevos_state_loaded_flag = false