This is litterally all that was required to build on Solaris 11. Portability FTW.
[pcsx_rearmed.git] / frontend / main.h
CommitLineData
ef79bbde
P
1/* Pcsx - Pc Psx Emulator
2 * Copyright (C) 1999-2002 Pcsx Team
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA
17 */
18
69e482e3 19#ifndef __FRONTEND_MAIN_H__
20#define __FRONTEND_MAIN_H__
ef79bbde
P
21
22#include "config.h"
23
ef79bbde
P
24#define DEFAULT_MEM_CARD_1 "/.pcsx/memcards/card1.mcd"
25#define DEFAULT_MEM_CARD_2 "/.pcsx/memcards/card2.mcd"
26#define MEMCARD_DIR "/.pcsx/memcards/"
27#define PLUGINS_DIR "/.pcsx/plugins/"
28#define PLUGINS_CFG_DIR "/.pcsx/plugins/cfg/"
29#define PCSX_DOT_DIR "/.pcsx/"
ef79bbde
P
30#define STATES_DIR "/.pcsx/sstates/"
31#define CHEATS_DIR "/.pcsx/cheats/"
32#define PATCHES_DIR "/.pcsx/patches/"
1bd9ee68 33#define BIOS_DIR "/bios/"
ef79bbde 34
c5061935 35extern char cfgfile_basename[MAXPATHLEN];
ef79bbde 36
8f892648 37extern int state_slot;
38c2028e 38
39/* emu_core_preinit - must be the very first call
40 * emu_core_init - to be called after platform-specific setup */
41int emu_core_preinit(void);
42int emu_core_init(void);
43
69e482e3 44void emu_core_ask_exit(void);
45
33400707 46void emu_set_default_config(void);
79f216e3 47void emu_on_new_cd(int show_hud_msg);
9c27c205 48
c5061935 49int get_state_filename(char *buf, int size, int i);
8f892648 50int emu_check_state(int slot);
51int emu_save_state(int slot);
52int emu_load_state(int slot);
53
e16a7e51 54void set_cd_image(const char *fname);
ef79bbde 55
c5061935 56extern unsigned long gpuDisp;
69e482e3 57extern int ready_to_go, g_emu_want_quit, g_emu_resetting;
ef79bbde 58
8f892648 59extern char hud_msg[64];
60extern int hud_new_msg;
61
62enum sched_action {
63 SACTION_NONE,
64 SACTION_ENTER_MENU,
65 SACTION_LOAD_STATE,
66 SACTION_SAVE_STATE,
67 SACTION_NEXT_SSLOT,
68 SACTION_PREV_SSLOT,
69 SACTION_TOGGLE_FSKIP,
fa56d360 70 SACTION_SWITCH_DISPMODE,
456f1b86 71 SACTION_FAST_FORWARD,
29a8c4f3 72 SACTION_SCREENSHOT,
69e482e3 73 SACTION_VOLUME_UP, // 10
221be40d 74 SACTION_VOLUME_DOWN,
a805c855 75 SACTION_MINIMIZE,
dde7da71 76 SACTION_TOGGLE_FPS,
a8376201 77 SACTION_TOGGLE_FULLSCREEN,
4c08b9e7 78 SACTION_GUN_TRIGGER = 16,
79 SACTION_GUN_A,
80 SACTION_GUN_B,
81 SACTION_GUN_TRIGGER2,
8f892648 82};
83
4c08b9e7 84#define SACTION_GUN_MASK (0x0f << SACTION_GUN_TRIGGER)
85
8f892648 86static inline void emu_set_action(enum sched_action action_)
87{
88 extern enum sched_action emu_action, emu_action_old;
89 extern int stop;
90
91 if (action_ == SACTION_NONE)
92 emu_action_old = 0;
93 else if (action_ != emu_action_old)
94 stop = 1;
95 emu_action = action_;
96}
97
69e482e3 98#endif /* __FRONTEND_MAIN_H__ */