RetroArch
cheevos.h
Go to the documentation of this file.
1 /* RetroArch - A frontend for libretro.
2  * Copyright (C) 2015-2018 - Andre Leiradella
3  *
4  * RetroArch is free software: you can redistribute it and/or modify it under the terms
5  * of the GNU General Public License as published by the Free Software Found-
6  * ation, either version 3 of the License, or (at your option) any later version.
7  *
8  * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10  * PURPOSE. See the GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License along with RetroArch.
13  * If not, see <http://www.gnu.org/licenses/>.
14  */
15 
16 #ifndef __RARCH_CHEEVOS_OLD_H
17 #define __RARCH_CHEEVOS_OLD_H
18 
19 #ifdef HAVE_NEW_CHEEVOS
20 #include "../cheevos-new/cheevos.h"
21 #else
22 
23 #include <stdint.h>
24 #include <stdlib.h>
25 
26 #include <boolean.h>
27 
28 #include <retro_common_api.h>
29 
31 
32 /*****************************************************************************
33 Setup - mainly for debugging
34 *****************************************************************************/
35 
36 /* Define this macro to get extra-verbose log for cheevos. */
37 #undef CHEEVOS_VERBOSE
38 
39 /*****************************************************************************
40 End of setup
41 *****************************************************************************/
42 
43 #define CHEEVOS_TAG "[CHEEVOS]: "
44 
45 #ifdef CHEEVOS_VERBOSE
46 
47 #define CHEEVOS_LOG RARCH_LOG
48 #define CHEEVOS_ERR RARCH_ERR
49 
50 #else
51 
52 void cheevos_log(const char *fmt, ...);
53 
54 #define CHEEVOS_LOG cheevos_log
55 #define CHEEVOS_ERR cheevos_log
56 
57 #endif
58 
59 typedef struct cheevos_ctx_desc
60 {
61  unsigned idx;
62  char *s;
63  size_t len;
65 
66 typedef enum
67 {
69  /* Don't change those, the values match the console IDs
70  * at retroachievements.org. */
104 
105 enum
106 {
116 
117  CHEEVOS_DIRTY_ALL = (1 << 9) - 1
118 };
119 
120 enum
121 {
124 };
125 
126 enum
127 {
134 };
135 
136 bool cheevos_load(const void *data);
137 
138 void cheevos_reset_game(void);
139 
140 void cheevos_populate_menu(void *data);
141 
143 
144 bool cheevos_apply_cheats(bool *data_bool);
145 
146 bool cheevos_unload(void);
147 
149 
150 void cheevos_test(void);
151 
152 bool cheevos_set_cheats(void);
153 
155 
156 bool cheevos_get_support_cheevos(void);
157 
159 
160 extern bool cheevos_loaded;
161 extern bool cheevos_hardcore_active;
162 extern bool cheevos_hardcore_paused;
163 extern bool cheevos_state_loaded_flag;
164 extern int cheats_are_enabled;
165 extern int cheats_were_enabled;
166 
168 
169 #endif
170 
171 #endif /* __RARCH_CHEEVOS_H */
bool cheevos_get_support_cheevos(void)
Definition: cheevos.c:2487
int cheats_are_enabled
Definition: cheevos.c:292
Definition: cheevos.h:94
Definition: cheevos.h:99
unsigned idx
Definition: cheevos.h:61
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
Definition: cheevos.h:115
Definition: cheevos.h:76
void cheevos_log(const char *fmt,...)
Definition: cheevos.c:309
Definition: cheevos.h:97
Definition: cheevos.h:123
Definition: cheevos.h:129
Definition: cheevos.h:96
Definition: cheevos.h:92
size_t len
Definition: cheevos.h:63
Definition: cheevos.h:75
Definition: cheevos.h:130
bool cheevos_hardcore_paused
Definition: cheevos.c:290
Definition: ibxm.h:9
Definition: cheevos.h:71
char * s
Definition: cheevos.h:62
Definition: cheevos.h:84
bool cheevos_get_description(cheevos_ctx_desc_t *desc)
Definition: cheevos.c:2186
Definition: cheevos.h:107
Definition: cheevos.h:77
void cheevos_set_support_cheevos(bool state)
Definition: cheevos.c:2482
Definition: cheevos.h:108
Definition: cheevos.h:114
Definition: cheevos.h:112
Definition: cheevos.h:85
bool cheevos_unload(void)
Definition: cheevos.c:2221
Definition: cheevos.h:110
Definition: cheevos.h:79
Definition: cheevos.h:133
Definition: cheevos.h:100
Definition: cheevos.h:117
Definition: cheevos.h:91
Definition: cheevos.h:87
Definition: cheevos.h:74
static uint64_t state[MAX_PADS]
Definition: xenon360_input.c:33
Definition: cheevos.h:102
Definition: cheevos.h:95
void cheevos_test(void)
Definition: cheevos.c:2449
bool cheevos_load(const void *data)
Definition: cheevos.c:3658
Definition: cheevos.h:90
bool cheevos_toggle_hardcore_mode(void)
Definition: cheevos.c:2261
Definition: cheevos.h:72
Definition: cheevos.h:113
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
struct cheevos_ctx_desc cheevos_ctx_desc_t
Definition: cheevos.h:89
cheevos_console_t
Definition: cheevos.h:66
void cheevos_populate_menu(void *data)
Definition: cheevos.c:2073
int cheats_were_enabled
Definition: cheevos.c:293
Definition: cheevos.h:81
Definition: cheevos.h:82
Definition: cheevos.h:128
Definition: cheevos.h:88
bool cheevos_state_loaded_flag
Definition: cheevos.c:291
Definition: cheevos.h:132
cheevos_console_t cheevos_get_console(void)
Definition: cheevos.c:2492
Definition: cheevos.h:80
bool cheevos_set_cheats(void)
Definition: cheevos.c:2476
void cheevos_reset_game(void)
Definition: cheevos.c:2053
Definition: cheevos.h:78
Definition: cheevos.h:122
Definition: cheevos.h:131
bool cheevos_apply_cheats(bool *data_bool)
Definition: cheevos.c:2213
Definition: cheevos.h:109
Definition: cheevos.h:93
Definition: cheevos.h:73
Definition: cheevos.h:59
bool cheevos_hardcore_active
Definition: cheevos.c:289
Definition: cheevos.h:98
bool cheevos_loaded
Definition: cheevos.c:288
Definition: cheevos.h:86
Definition: cheevos.h:83
Definition: cheevos.h:101
Definition: cheevos.h:111
Definition: cheevos.h:68