RetroArch
var.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_VAR_H
17 #define __RARCH_CHEEVOS_VAR_H
18 
19 #include <stdint.h>
20 
21 #include "cheevos.h"
22 
23 #include <retro_common_api.h>
24 
26 
27 typedef enum
28 {
39  /* Byte, */
44 
45 typedef enum
46 {
47  /* compare to the value of a live address in RAM */
49 
50  /* a number. assume 32 bit */
52 
53  /* the value last known at this address. */
55 
56  /* a custom user-set variable */
59 
60 typedef struct
61 {
64  int bank_id;
65  bool is_bcd;
66  unsigned value;
67  unsigned previous;
69 
70 void cheevos_var_parse(cheevos_var_t* var, const char** memaddr);
72 
75 
77 
78 #endif /* __RARCH_CHEEVOS_VAR_H */
Definition: var.h:38
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
cheevos_var_type_t
Definition: var.h:45
Definition: var.h:35
Definition: var.h:34
Definition: var.h:60
void cheevos_var_parse(cheevos_var_t *var, const char **memaddr)
Definition: var.c:110
Definition: var.h:33
cheevos_var_size_t
Definition: var.h:27
Definition: var.h:57
Definition: var.h:48
uint8_t * cheevos_var_get_memory(const cheevos_var_t *var)
Definition: var.c:290
Definition: var.h:32
Definition: var.h:41
Definition: var.h:36
void cheevos_var_patch_addr(cheevos_var_t *var, cheevos_console_t console)
Definition: var.c:161
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
cheevos_console_t
Definition: cheevos.h:66
int bank_id
Definition: var.h:64
cheevos_var_size_t size
Definition: var.h:62
Definition: var.h:37
cheevos_var_type_t type
Definition: var.h:63
Definition: var.h:51
unsigned value
Definition: var.h:66
Definition: var.h:40
unsigned previous
Definition: var.h:67
Definition: var.h:54
Definition: var.h:30
bool is_bcd
Definition: var.h:65
Definition: var.h:29
unsigned cheevos_var_get_value(cheevos_var_t *var)
Definition: var.c:334
unsigned char uint8_t
Definition: stdint.h:124
Definition: var.h:31