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 02110-1301 USA
17  */
18 
19 #ifndef __LINUX_H__
20 #define __LINUX_H__
21 
22 #include "config.h"
23 
24 #include "../libpcsxcore/psxcommon.h"
25 #include <gtk/gtk.h>
26 
27 #include "Cheat.h"
28 
29 #define DEFAULT_MEM_CARD_1 "/.pcsxr/memcards/card1.mcd"
30 #define DEFAULT_MEM_CARD_2 "/.pcsxr/memcards/card2.mcd"
31 #define MEMCARD_DIR "/.pcsxr/memcards/"
32 #define PLUGINS_DIR "/.pcsxr/plugins/"
33 #define PLUGINS_CFG_DIR "/.pcsxr/plugins/cfg/"
34 #define PCSXR_DOT_DIR "/.pcsxr/"
35 #define BIOS_DIR "/.pcsxr/bios/"
36 #define STATES_DIR "/.pcsxr/sstates/"
37 #define CHEATS_DIR "/.pcsxr/cheats/"
38 #define PATCHES_DIR "/.pcsxr/patches/"
39 
40 #define OLD_SLOT 1000
41 #define NUM_OLD_SLOTS 2
42 #define LAST_OLD_SLOT (OLD_SLOT + NUM_OLD_SLOTS - 1)
43 
44 extern gboolean UseGui;
45 extern int StatesC;
46 extern char cfgfile[MAXPATHLEN];	/* ADB Comment this out - make a local var, or at least use gchar funcs */
47 extern char cfgfile_basename[MAXPATHLEN];	/* ADB Comment this out - make a local var, or at least use gchar funcs */
48 
49 int LoadConfig();
50 void SaveConfig();
51 
52 void StartGui();
53 
54 void autoloadCheats(); // try load cheat file from default path and filename
55 
56 void PADhandleKey(int key);
57 
58 int UpdateMenuSlots();
59 
60 gchar* get_state_filename(int i);
61 gchar* get_cdrom_label_id(const gchar* suffix); // get cdrom label and id and append suffix to string
62 gchar* get_cdrom_label_trim(); // trim cdrom label out of whitespaces
63 
64 void state_save(gchar *state_filename);
65 void state_load(gchar *state_filename);
66 
67 int match(const char* string, char* pattern);
68 int plugins_configured();
69 
70 void UpdatePluginsBIOS();
71 
72 void SysErrorMessage(gchar *primary, gchar *secondary);
73 void SysInfoMessage(gchar *primary, gchar *secondary);
74 
75 #endif /* __LINUX_H__ */
76