1 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
2 | * Mupen64plus - main.h * |
3 | * Mupen64Plus homepage: https://mupen64plus.org/ * |
4 | * Copyright (C) 2012 CasualJames * |
5 | * Copyright (C) 2002 Blight * |
6 | * * |
7 | * This program is free software; you can redistribute it and/or modify * |
8 | * it under the terms of the GNU General Public License as published by * |
9 | * the Free Software Foundation; either version 2 of the License, or * |
10 | * (at your option) any later version. * |
11 | * * |
12 | * This program is distributed in the hope that it will be useful, * |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
15 | * GNU General Public License for more details. * |
16 | * * |
17 | * You should have received a copy of the GNU General Public License * |
18 | * along with this program; if not, write to the * |
19 | * Free Software Foundation, Inc., * |
20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * |
21 | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
22 | |
23 | #ifndef __MAIN_H__ |
24 | #define __MAIN_H__ |
25 | |
26 | #include <stdint.h> |
27 | |
28 | #include "api/m64p_types.h" |
29 | #include "main/cheat.h" |
30 | #include "device/device.h" |
31 | #include "osal/preproc.h" |
32 | |
33 | #if defined(__GNUC__) |
34 | #define ATTR_FMT(fmtpos, attrpos) __attribute__ ((format (printf, fmtpos, attrpos))) |
35 | #else |
36 | #define ATTR_FMT(fmtpos, attrpos) |
37 | #endif |
38 | |
39 | /* globals */ |
40 | extern m64p_handle g_CoreConfig; |
41 | |
42 | extern int g_RomWordsLittleEndian; |
43 | extern int g_EmulatorRunning; |
44 | extern int g_rom_pause; |
45 | |
46 | extern struct cheat_ctx g_cheat_ctx; |
47 | |
48 | extern void* g_mem_base; |
49 | |
50 | extern struct device g_dev; |
51 | |
52 | extern m64p_media_loader g_media_loader; |
53 | |
54 | extern m64p_frame_callback g_FrameCallback; |
55 | |
56 | extern int g_gs_vi_counter; |
57 | |
58 | const char* get_savestatepath(void); |
59 | const char* get_savesrampath(void); |
60 | |
61 | void new_frame(void); |
62 | void new_vi(void); |
63 | |
64 | void main_switch_next_pak(int control_id); |
65 | void main_switch_plugin_pak(int control_id); |
66 | void main_change_gb_cart(int control_id); |
67 | |
68 | int main_set_core_defaults(void); |
69 | void main_message(m64p_msg_level level, unsigned int osd_corner, const char *format, ...) ATTR_FMT(3, 4); |
70 | |
71 | m64p_error main_run(void); |
72 | void main_stop(void); |
73 | void main_toggle_pause(void); |
74 | void main_advance_one(void); |
75 | |
76 | void main_speedup(int percent); |
77 | void main_speeddown(int percent); |
78 | void main_set_fastforward(int enable); |
79 | |
80 | void main_take_next_screenshot(void); |
81 | |
82 | void main_state_set_slot(int slot); |
83 | void main_state_inc_slot(void); |
84 | void main_state_load(const char *filename); |
85 | void main_state_save(int format, const char *filename); |
86 | |
87 | m64p_error main_core_state_query(m64p_core_param param, int *rval); |
88 | m64p_error main_core_state_set(m64p_core_param param, int val); |
89 | |
90 | m64p_error main_get_screen_size(int *width, int *height); |
91 | m64p_error main_read_screen(void *pixels, int bFront); |
92 | |
93 | m64p_error main_volume_up(void); |
94 | m64p_error main_volume_down(void); |
95 | m64p_error main_volume_get_level(int *level); |
96 | m64p_error main_volume_set_level(int level); |
97 | m64p_error main_volume_mute(void); |
98 | int main_volume_get_muted(void); |
99 | |
100 | m64p_error main_reset(int do_hard_reset); |
101 | |
102 | #endif /* __MAIN_H__ */ |
103 | |
104 | |