| 1 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
| 2 | * Mupen64plus - main.h * |
| 3 | * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * |
| 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 "api/m64p_types.h" |
| 27 | |
| 28 | /* globals */ |
| 29 | extern m64p_handle g_CoreConfig; |
| 30 | |
| 31 | extern int g_MemHasBeenBSwapped; |
| 32 | extern int g_EmulatorRunning; |
| 33 | |
| 34 | extern m64p_frame_callback g_FrameCallback; |
| 35 | |
| 36 | const char* get_savestatepath(void); |
| 37 | const char* get_savesrampath(void); |
| 38 | |
| 39 | void new_frame(void); |
| 40 | void new_vi(void); |
| 41 | |
| 42 | int main_set_core_defaults(void); |
| 43 | void main_message(m64p_msg_level level, unsigned int osd_corner, const char *format, ...); |
| 44 | |
| 45 | m64p_error main_run(void); |
| 46 | void main_stop(void); |
| 47 | void main_toggle_pause(void); |
| 48 | void main_advance_one(void); |
| 49 | |
| 50 | void main_speedup(int percent); |
| 51 | void main_speeddown(int percent); |
| 52 | void main_set_fastforward(int enable); |
| 53 | |
| 54 | void main_take_next_screenshot(void); |
| 55 | |
| 56 | void main_state_set_slot(int slot); |
| 57 | void main_state_inc_slot(void); |
| 58 | void main_state_load(const char *filename); |
| 59 | void main_state_save(int format, const char *filename); |
| 60 | |
| 61 | m64p_error main_core_state_query(m64p_core_param param, int *rval); |
| 62 | m64p_error main_core_state_set(m64p_core_param param, int val); |
| 63 | |
| 64 | m64p_error main_get_screen_size(int *width, int *height); |
| 65 | m64p_error main_read_screen(void *pixels, int bFront); |
| 66 | |
| 67 | m64p_error main_volume_up(void); |
| 68 | m64p_error main_volume_down(void); |
| 69 | m64p_error main_volume_get_level(int *level); |
| 70 | m64p_error main_volume_set_level(int level); |
| 71 | m64p_error main_volume_mute(void); |
| 72 | int main_volume_get_muted(void); |
| 73 | |
| 74 | m64p_error main_reset(int do_hard_reset); |
| 75 | |
| 76 | #endif /* __MAIN_H__ */ |
| 77 | |