1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
/* gui.h
*
* Copyright (C) 2010 dking <dking024@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public Licens e as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __GUI_H__
#define __GUI_H__
#include "ds2_types.h"
#include "fs_api.h"
#include "gcheat.h"
#ifdef DS2_DMA
#define UP_SCREEN_UPDATE_METHOD 1
#else
#define UP_SCREEN_UPDATE_METHOD 0
#endif
#define DOWN_SCREEN_UPDATE_METHOD 2
#define MAX_GAMEPAD_MAP 16
#ifdef __cplusplus
extern "C" {
#endif
//
struct _EMU_CONFIG
{
u32 language;
char rom_file[256];
char rom_path[256];
char latest_file[5][512];
u32 HotkeyReturnToMenu;
u32 HotkeyTemporaryFastForward;
u32 HotkeyToggleSound;
u32 Reserved[61];
};
struct _GAME_CONFIG
{
u32 clock_speed_number;
u32 Reserved0;
u32 frameskip_value;
u32 graphic;
u32 enable_audio;
u32 Reserved1;
u32 backward;
u32 backward_time;
u32 HotkeyReturnToMenu;
u32 HotkeyTemporaryFastForward;
u32 HotkeyToggleSound;
u32 SoundSync;
u32 Reserved2[44];
};
typedef enum
{
CURSOR_NONE = 0,
CURSOR_UP,
CURSOR_DOWN,
CURSOR_LEFT,
CURSOR_RIGHT,
CURSOR_SELECT,
CURSOR_BACK,
CURSOR_EXIT,
CURSOR_RTRIGGER,
CURSOR_LTRIGGER,
CURSOR_KEY_SELECT,
CURSOR_TOUCH
} gui_action_type;
typedef enum
{
BUTTON_ID_A = 0x01,
BUTTON_ID_B = 0x02,
BUTTON_ID_SELECT = 0x04,
BUTTON_ID_START = 0x08,
BUTTON_ID_RIGHT = 0x10,
BUTTON_ID_LEFT = 0x20,
BUTTON_ID_UP = 0x40,
BUTTON_ID_DOWN = 0x80,
BUTTON_ID_R = 0x100,
BUTTON_ID_L = 0x200,
BUTTON_ID_X = 0x400,
BUTTON_ID_Y = 0x800,
BUTTON_ID_TOUCH = 0x1000,
BUTTON_ID_LID = 0x2000,
BUTTON_ID_FA = 0x4000,
BUTTON_ID_FB = 0x8000,
BUTTON_ID_NONE = 0
} input_buttons_id_type;
extern char main_path[MAX_PATH];
extern char rom_path[MAX_PATH];
extern u32 game_enable_audio;
extern u32 clock_speed_number;
extern u32 game_fast_forward;
extern u32 temporary_fast_forward;
/******************************************************************************
******************************************************************************/
extern char g_default_rom_dir[MAX_PATH];
extern char DEFAULT_RTS_DIR[MAX_PATH];
extern char DEFAULT_CFG_DIR[MAX_PATH];
extern char DEFAULT_SS_DIR[MAX_PATH];
extern char DEFAULT_CHEAT_DIR[MAX_PATH];
typedef struct _EMU_CONFIG EMU_CONFIG;
typedef struct _GAME_CONFIG GAME_CONFIG;
extern EMU_CONFIG emu_config;
extern GAME_CONFIG game_config;
/******************************************************************************
******************************************************************************/
extern void gui_init(u32 lang_id);
extern u32 menu(u16 *original_screen, bool8 FirstInvocation);
extern void game_disableAudio();
extern void game_set_frameskip();
extern void game_set_fluidity();
extern void LowFrequencyCPU();
extern void HighFrequencyCPU();
extern void GameFrequencyCPU();
extern int load_language_msg(char *filename, u32 language);
#ifdef __cplusplus
}
#endif
#endif //__GUI_H__
|