Subversion Repositories eduke32

Rev

Rev 4645 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4645 Rev 4647
1
//-------------------------------------------------------------------------
1
//-------------------------------------------------------------------------
2
/*
2
/*
3
Copyright (C) 2010 EDuke32 developers and contributors
3
Copyright (C) 2010 EDuke32 developers and contributors
4

4

5
This file is part of EDuke32.
5
This file is part of EDuke32.
6

6

7
EDuke32 is free software; you can redistribute it and/or
7
EDuke32 is free software; you can redistribute it and/or
8
modify it under the terms of the GNU General Public License version 2
8
modify it under the terms of the GNU General Public License version 2
9
as published by the Free Software Foundation.
9
as published by the Free Software Foundation.
10

10

11
This program is distributed in the hope that it will be useful,
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14

14

15
See the GNU General Public License for more details.
15
See the GNU General Public License for more details.
16

16

17
You should have received a copy of the GNU General Public License
17
You should have received a copy of the GNU General Public License
18
along with this program; if not, write to the Free Software
18
along with this program; if not, write to the Free Software
19
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20
*/
20
*/
21
//-------------------------------------------------------------------------
21
//-------------------------------------------------------------------------
22
22
23
#include "duke3d.h"
23
#include "duke3d.h"
24
#include "net.h"
24
#include "net.h"
25
#include "player.h"
25
#include "player.h"
26
#include "mouse.h"
26
#include "mouse.h"
27
#include "joystick.h"
27
#include "joystick.h"
28
#include "osd.h"
28
#include "osd.h"
29
#include "osdcmds.h"
29
#include "osdcmds.h"
30
#include "gamedef.h"
30
#include "gamedef.h"
31
#include "gameexec.h"
31
#include "gameexec.h"
32
#include "savegame.h"
32
#include "savegame.h"
33
#include "premap.h"
33
#include "premap.h"
34
#include "demo.h"
34
#include "demo.h"
35
#include "xxhash.h"
35
#include "xxhash.h"
36
#include "common.h"
36
#include "common.h"
37
#include "common_game.h"
37
#include "common_game.h"
38
#include "input.h"
38
#include "input.h"
39
#include "menus.h"
39
#include "menus.h"
40
40
41
#include <sys/stat.h>
41
#include <sys/stat.h>
42
42
43
int32_t g_skillSoundVoice = -1;
43
int32_t g_skillSoundVoice = -1;
44
44
45
extern int32_t voting;
45
extern int32_t voting;
46
46
47
#define USERMAPENTRYLENGTH 25
47
#define USERMAPENTRYLENGTH 25
48
48
49
#define mgametext(x,y,t,s,dabits) G_PrintGameText(2,STARTALPHANUM, x,y,t,s,0,dabits,0, 0, xdim-1, ydim-1, 65536)
49
#define mgametext(x,y,t,s,dabits) G_PrintGameText(2,STARTALPHANUM, x,y,t,s,0,dabits,0, 0, xdim-1, ydim-1, 65536)
50
#define mgametextpal(x,y,t,s,p) G_PrintGameText(2,STARTALPHANUM, x,y,t,s,p,26,0, 0, xdim-1, ydim-1, 65536)
50
#define mgametextpal(x,y,t,s,p) G_PrintGameText(2,STARTALPHANUM, x,y,t,s,p,26,0, 0, xdim-1, ydim-1, 65536)
51
51
52
52
53
53
54
int32_t menutext_(int32_t x,int32_t y,int32_t s,int32_t p,char *t,int32_t bits)
54
int32_t menutext_(int32_t x,int32_t y,int32_t s,int32_t p,char *t,int32_t bits)
55
{
55
{
56
    vec2_t dim;
56
    vec2_t dim;
57
    int32_t f = TEXT_BIGALPHANUM|TEXT_UPPERCASE|TEXT_LITERALESCAPE;
57
    int32_t f = TEXT_BIGALPHANUM|TEXT_UPPERCASE|TEXT_LITERALESCAPE;
58
58
59
    if (x == 160)
59
    if (x == 160)
60
        f |= TEXT_XCENTER;
60
        f |= TEXT_XCENTER;
61
61
62
    dim = G_ScreenText(BIGALPHANUM, x, y-12, 65536L, 0, 0, t, s, p, bits, 0, 5, 16, 0, 0, f, 0, 0, xdim-1, ydim-1);
62
    dim = G_ScreenText(BIGALPHANUM, x, y-12, 65536L, 0, 0, t, s, p, bits, 0, 5, 16, 0, 0, f, 0, 0, xdim-1, ydim-1);
63
63
64
    return dim.x;
64
    return dim.x;
65
}
65
}
66
66
67
#pragma pack(push,1)
67
#pragma pack(push,1)
68
static savehead_t savehead;
68
static savehead_t savehead;
69
//static struct savehead_ savehead;
69
//static struct savehead_ savehead;
70
#pragma pack(pop)
70
#pragma pack(pop)
71
71
72
static void M_DrawBackground(void)
72
static void M_DrawBackground(void)
73
{
73
{
74
    rotatesprite_fs(160<<16,100<<16,65536L,0,MENUSCREEN,16,0,10+64);
74
    rotatesprite_fs(160<<16,100<<16,65536L,0,MENUSCREEN,16,0,10+64);
75
}
75
}
76
76
77
static void M_DrawTopBar(void)
77
static void M_DrawTopBar(void)
78
{
78
{
79
    rotatesprite_fs(160<<16,19<<16,65536L,0,MENUBAR,16,0,10);
79
    rotatesprite_fs(160<<16,19<<16,65536L,0,MENUBAR,16,0,10);
80
}
80
}
81
81
82
static void M_DrawTopBarCaption(const char *caption)
82
static void M_DrawTopBarCaption(const char *caption)
83
{
83
{
84
    char *s = Bstrdup(caption), p = Bstrlen(caption)-1;
84
    char *s = Bstrdup(caption), p = Bstrlen(caption)-1;
85
    if (s[p] == ':') s[p] = 0;
85
    if (s[p] == ':') s[p] = 0;
86
    menutext(160,24,0,0,s);
86
    menutext(160,24,0,0,s);
87
    Bfree(s);
87
    Bfree(s);
88
}
88
}
89
89
90
extern int32_t g_quitDeadline;
90
extern int32_t g_quitDeadline;
91
91
92
92
93
93
94
94
95
95
96
96
97
97
98
98
99
99
100
100
101
101
102
102
103
103
104
/*
104
/*
105
All MAKE_* macros are generally for the purpose of keeping state initialization
105
All MAKE_* macros are generally for the purpose of keeping state initialization
106
separate from actual data. Alternatively, they can serve to factor out repetitive
106
separate from actual data. Alternatively, they can serve to factor out repetitive
107
stuff and keep the important bits from getting lost to our eyes.
107
stuff and keep the important bits from getting lost to our eyes.
108

108

109
They serve as a stand-in for C++ default value constructors, since we're using C89.
109
They serve as a stand-in for C++ default value constructors, since we're using C89.
110
*/
110
*/
111
111
112
112
113
// common font types
113
// common font types
114
// tilenums are set after namesdyn runs
114
// tilenums are set after namesdyn runs
115
static MenuTextType_t MF_Redfont          = { -1, 10, 0,  1,  5<<16, 15<<16,  0<<16, 0<<16, TEXT_BIGALPHANUM | TEXT_UPPERCASE, };
115
static MenuTextType_t MF_Redfont          = { -1, 10, 0,  1,  5<<16, 15<<16,  0<<16, 0<<16, TEXT_BIGALPHANUM | TEXT_UPPERCASE, };
116
static MenuTextType_t MF_RedfontRt        = { -1, 10, 0,  1,  5<<16, 15<<16,  0<<16, 0<<16, TEXT_BIGALPHANUM | TEXT_UPPERCASE | TEXT_XRIGHT, };
116
static MenuTextType_t MF_RedfontRt        = { -1, 10, 0,  1,  5<<16, 15<<16,  0<<16, 0<<16, TEXT_BIGALPHANUM | TEXT_UPPERCASE | TEXT_XRIGHT, };
117
static MenuTextType_t MF_RedfontBlue      = { -1, 10, 1,  1,  5<<16, 15<<16,  0<<16, 0<<16, TEXT_BIGALPHANUM | TEXT_UPPERCASE, };
117
static MenuTextType_t MF_RedfontBlue      = { -1, 10, 1,  1,  5<<16, 15<<16,  0<<16, 0<<16, TEXT_BIGALPHANUM | TEXT_UPPERCASE, };
118
static MenuTextType_t MF_RedfontGreen     = { -1, 10, 8,  1,  5<<16, 15<<16,  0<<16, 0<<16, TEXT_BIGALPHANUM | TEXT_UPPERCASE, };
118
static MenuTextType_t MF_RedfontGreen     = { -1, 10, 8,  1,  5<<16, 15<<16,  0<<16, 0<<16, TEXT_BIGALPHANUM | TEXT_UPPERCASE, };
119
static MenuTextType_t MF_Bluefont         = { -1, 10, 0,  16, 5<<16,  7<<16, -1<<16, 0<<16, TEXT_YBOTTOM, };
119
static MenuTextType_t MF_Bluefont         = { -1, 10, 0,  16, 5<<16,  7<<16, -1<<16, 0<<16, TEXT_YBOTTOM, };
120
static MenuTextType_t MF_BluefontRed      = { -1, 10, 10, 16, 5<<16,  7<<16, -1<<16, 0<<16, TEXT_YBOTTOM, };
120
static MenuTextType_t MF_BluefontRed      = { -1, 10, 10, 16, 5<<16,  7<<16, -1<<16, 0<<16, TEXT_YBOTTOM, };
121
static MenuTextType_t MF_Minifont         = { -1, 10, 0,  16, 4<<16,  5<<16,  1<<16, 1<<16, 0, };
121
static MenuTextType_t MF_Minifont         = { -1, 10, 0,  16, 4<<16,  5<<16,  1<<16, 1<<16, 0, };
122
static MenuTextType_t MF_MinifontRed      = { -1, 16, 21, 16, 4<<16,  5<<16,  1<<16, 1<<16, 0, };
122
static MenuTextType_t MF_MinifontRed      = { -1, 16, 21, 16, 4<<16,  5<<16,  1<<16, 1<<16, 0, };
123
static MenuTextType_t MF_MinifontDarkGray = { -1, 10, 13, 16, 4<<16,  5<<16,  1<<16, 1<<16, 0, };
123
static MenuTextType_t MF_MinifontDarkGray = { -1, 10, 13, 16, 4<<16,  5<<16,  1<<16, 1<<16, 0, };
124
124
125
125
126
// common positions
126
// common positions
127
#define MENU_MARGIN_REGULAR 40
127
#define MENU_MARGIN_REGULAR 40
128
#define MENU_MARGIN_WIDE    32
128
#define MENU_MARGIN_WIDE    32
129
#define MENU_MARGIN_CENTER  160
129
#define MENU_MARGIN_CENTER  160
130
#define MENU_HEIGHT_CENTER  100
130
#define MENU_HEIGHT_CENTER  100
131
131
132
132
133
static MenuPos_t MP_TOP_MAIN =             { { MENU_MARGIN_CENTER<<16,       55<<16, }, 0,     4<<16,  0,       -170<<16, 110<<16, 65536, };
133
static MenuPos_t MP_TOP_MAIN =             { { MENU_MARGIN_CENTER<<16,       55<<16, }, 0,     4<<16,  0,       -170<<16, 110<<16, 65536, };
134
static MenuPos_t MP_TOP_EPISODE =          { { MENU_MARGIN_CENTER<<16,       48<<16, }, 4<<16, 7<<16,  0,       -190<<16, 110<<16, 65536, };
134
static MenuPos_t MP_TOP_EPISODE =          { { MENU_MARGIN_CENTER<<16,       48<<16, }, 4<<16, 7<<16,  0,       -190<<16, 110<<16, 65536, };
135
static MenuPos_t MP_TOP_SKILL =            { { MENU_MARGIN_CENTER<<16,       58<<16, }, 0,     7<<16, 0,       -190<<16, 110<<16, 65536, };
135
static MenuPos_t MP_TOP_SKILL =            { { MENU_MARGIN_CENTER<<16,       58<<16, }, 0,     7<<16, 0,       -190<<16, 110<<16, 65536, };
136
static MenuPos_t MP_TOP_OPTIONS =          { { MENU_MARGIN_CENTER<<16,       38<<16, }, 0,     7<<16,  0,       -190<<16, 110<<16, 65536, };
136
static MenuPos_t MP_TOP_OPTIONS =          { { MENU_MARGIN_CENTER<<16,       38<<16, }, 0,     7<<16,  0,       -190<<16, 110<<16, 65536, };
137
static MenuPos_t MP_TOP_JOYSTICK_NETWORK = { { MENU_MARGIN_CENTER<<16,       70<<16, }, 0,     7<<16,  0,       -190<<16, 110<<16, 65536, };
137
static MenuPos_t MP_TOP_JOYSTICK_NETWORK = { { MENU_MARGIN_CENTER<<16,       70<<16, }, 0,     7<<16,  0,       -190<<16, 110<<16, 65536, };
138
static MenuPos_t MP_BIGOPTIONS =           { { MENU_MARGIN_WIDE<<16,         38<<16, }, 2<<16, 4<<16,  190<<16, -190<<16,  20<<16, 65536, };
138
static MenuPos_t MP_BIGOPTIONS =           { { MENU_MARGIN_WIDE<<16,         38<<16, }, 2<<16, 4<<16,  190<<16, -190<<16,  20<<16, 65536, };
139
static MenuPos_t MP_BIGOPTIONSRT =         { { MENU_MARGIN_WIDE<<16,         38<<16, }, 2<<16, 4<<16,  260<<16, -190<<16,  20<<16, 65536, };
139
static MenuPos_t MP_BIGOPTIONSRT =         { { MENU_MARGIN_WIDE<<16,         38<<16, }, 2<<16, 4<<16,  260<<16, -190<<16,  20<<16, 65536, };
-
 
140
#ifdef USE_OPENGL
140
static MenuPos_t MP_OPTIONS =              { { MENU_MARGIN_WIDE<<16,         37<<16, }, 4<<16, 1<<16,  216<<16, 160<<16,  10<<16, 32768, };
141
static MenuPos_t MP_OPTIONS =              { { MENU_MARGIN_WIDE<<16,         37<<16, }, 4<<16, 1<<16,  216<<16, 160<<16,  10<<16, 32768, };
-
 
142
#endif
141
static MenuPos_t MP_PLAYER_1 =             { { MENU_MARGIN_WIDE<<16,         37<<16, }, 4<<16, 1<<16,   90<<16, 160<<16,  10<<16, 32768, };
143
static MenuPos_t MP_PLAYER_1 =             { { MENU_MARGIN_WIDE<<16,         37<<16, }, 4<<16, 1<<16,   90<<16, 160<<16,  10<<16, 32768, };
142
static MenuPos_t MP_PLAYER_3 =             { { MENU_MARGIN_WIDE<<16,         37<<16, }, 8<<16, 1<<16,  190<<16, 160<<16,  10<<16, 32768, };
144
static MenuPos_t MP_PLAYER_3 =             { { MENU_MARGIN_WIDE<<16,         37<<16, }, 8<<16, 1<<16,  190<<16, 160<<16,  10<<16, 32768, };
143
static MenuPos_t MP_MACROS =               { { 26<<16,                       40<<16, }, 4<<16, 2<<16,    1<<16, 160<<16,  10<<16, 32768, };
145
static MenuPos_t MP_MACROS =               { { 26<<16,                       40<<16, }, 4<<16, 2<<16,    1<<16, 160<<16,  10<<16, 32768, };
144
static MenuPos_t MP_VIDEOSETUP =           { { MENU_MARGIN_REGULAR<<16,      38<<16, }, 6<<16, 7<<16,  168<<16, -190<<16,  20<<16, 65536, };
146
static MenuPos_t MP_VIDEOSETUP =           { { MENU_MARGIN_REGULAR<<16,      38<<16, }, 6<<16, 7<<16,  168<<16, -190<<16,  20<<16, 65536, };
145
static MenuPos_t MP_VIDEOSETUP_APPLY =     { { (MENU_MARGIN_REGULAR+16)<<16, 38<<16, }, 6<<16, 7<<16,  168<<16, -190<<16,  36<<16, 65536, };
147
static MenuPos_t MP_VIDEOSETUP_APPLY =     { { (MENU_MARGIN_REGULAR+16)<<16, 38<<16, }, 6<<16, 7<<16,  168<<16, -190<<16,  36<<16, 65536, };
146
static MenuPos_t MP_KEYBOARDSETUPFUNCS =   { { 70<<16,                       34<<16, }, 4<<16, 3<<16,  100<<16, 151<<16,  10<<16, 32768, };
148
static MenuPos_t MP_KEYBOARDSETUPFUNCS =   { { 70<<16,                       34<<16, }, 4<<16, 3<<16,  100<<16, 151<<16,  10<<16, 32768, };
147
static MenuPos_t MP_MOUSEJOYSETUPBTNS =    { { 76<<16,                       34<<16, }, 4<<16, 3<<16,  100<<16, 143<<16,  10<<16, 32768, };
149
static MenuPos_t MP_MOUSEJOYSETUPBTNS =    { { 76<<16,                       34<<16, }, 4<<16, 3<<16,  100<<16, 143<<16,  10<<16, 32768, };
148
static MenuPos_t MP_GAMEFUNCLIST =         { { 100<<16,                      51<<16, }, 4<<16, 3<<16,  100<<16, 152<<16,  10<<16, 32768, };
150
static MenuPos_t MP_GAMEFUNCLIST =         { { 100<<16,                      51<<16, }, 4<<16, 3<<16,  100<<16, 152<<16,  10<<16, 32768, };
149
static MenuPos_t MP_COLCORR =              { { MENU_MARGIN_REGULAR<<16,      86<<16, }, 8<<16, 2<<16, -240<<16, 190<<16,  20<<16, 65536, };
151
static MenuPos_t MP_COLCORR =              { { MENU_MARGIN_REGULAR<<16,      86<<16, }, 8<<16, 2<<16, -240<<16, 190<<16,  20<<16, 65536, };
150
static MenuPos_t MP_REDSLIDE =             { { MENU_MARGIN_WIDE<<16,         37<<16, }, 8<<16, 2<<16,  170<<16, 190<<16,  20<<16, 65536, };
152
static MenuPos_t MP_REDSLIDE =             { { MENU_MARGIN_WIDE<<16,         37<<16, }, 8<<16, 2<<16,  170<<16, 190<<16,  20<<16, 65536, };
151
static MenuPos_t MP_LOADSAVE =             { { 223<<16,                      48<<16, }, 4<<16, 7<<16,    1<<16, 320<<16,  20<<16, 65536, };
153
static MenuPos_t MP_LOADSAVE =             { { 223<<16,                      48<<16, }, 4<<16, 7<<16,    1<<16, 320<<16,  20<<16, 65536, };
152
static MenuPos_t MP_NETSETUP =             { { (MENU_MARGIN_REGULAR-4)<<16,  38<<16, }, 4<<16, 2<<16,  114<<16, 190<<16,  20<<16, 65536, };;
154
static MenuPos_t MP_NETSETUP =             { { (MENU_MARGIN_REGULAR-4)<<16,  38<<16, }, 4<<16, 2<<16,  114<<16, 190<<16,  20<<16, 65536, };
153
155
154
156
155
// common menu option sets
157
// common menu option sets
156
#define MAKE_MENUOPTIONSET(a, b, c) { a, b, c, ARRAY_SIZE(b), &MP_GAMEFUNCLIST, -1, 0, }
158
#define MAKE_MENUOPTIONSET(a, b, c) { a, b, c, ARRAY_SIZE(b), &MP_GAMEFUNCLIST, -1, 0, }
157
#define MAKE_MENUOPTIONSETLIST(a, b, c, d) { a, b, c, ARRAY_SIZE(b), d, -1, 0, }
159
#define MAKE_MENUOPTIONSETLIST(a, b, c, d) { a, b, c, ARRAY_SIZE(b), d, -1, 0, }
158
#define MAKE_MENUOPTIONSETDYN(...) { __VA_ARGS__, &MP_GAMEFUNCLIST, -1, 0, }
160
#define MAKE_MENUOPTIONSETDYN(...) { __VA_ARGS__, &MP_GAMEFUNCLIST, -1, 0, }
159
#define MAKE_MENUOPTIONSETDYNLIST(...) { __VA_ARGS__, -1, 0, }
161
#define MAKE_MENUOPTIONSETDYNLIST(...) { __VA_ARGS__, -1, 0, }
160
162
161
static char *MEOSN_OffOn[] = { "Off", "On", };
163
static char *MEOSN_OffOn[] = { "Off", "On", };
162
static MenuOptionSet_t MEOS_OffOn = MAKE_MENUOPTIONSET( 0x3, MEOSN_OffOn, NULL );
164
static MenuOptionSet_t MEOS_OffOn = MAKE_MENUOPTIONSET( 0x3, MEOSN_OffOn, NULL );
163
static char *MEOSN_OnOff[] = { "On", "Off", };
165
static char *MEOSN_OnOff[] = { "On", "Off", };
164
static MenuOptionSet_t MEOS_OnOff = MAKE_MENUOPTIONSET( 0x3, MEOSN_OnOff, NULL );
166
static MenuOptionSet_t MEOS_OnOff = MAKE_MENUOPTIONSET( 0x3, MEOSN_OnOff, NULL );
165
static char *MEOSN_NoYes[] = { "No", "Yes", };
167
static char *MEOSN_NoYes[] = { "No", "Yes", };
166
static MenuOptionSet_t MEOS_NoYes = MAKE_MENUOPTIONSET( 0x3, MEOSN_NoYes, NULL );
168
static MenuOptionSet_t MEOS_NoYes = MAKE_MENUOPTIONSET( 0x3, MEOSN_NoYes, NULL );
167
static char *MEOSN_YesNo[] = { "Yes", "No", };
169
static char *MEOSN_YesNo[] = { "Yes", "No", };
168
static MenuOptionSet_t MEOS_YesNo = MAKE_MENUOPTIONSET( 0x3, MEOSN_YesNo, NULL );
170
static MenuOptionSet_t MEOS_YesNo = MAKE_MENUOPTIONSET( 0x3, MEOSN_YesNo, NULL );
169
171
170
172
171
static char MenuGameFuncs[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN];
173
static char MenuGameFuncs[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN];
172
static char *MenuGameFuncNone = "  -None-";
174
static char *MenuGameFuncNone = "  -None-";
173
static char *MEOSN_Gamefuncs[NUMGAMEFUNCTIONS+1];
175
static char *MEOSN_Gamefuncs[NUMGAMEFUNCTIONS+1];
174
static MenuOptionSet_t MEOS_Gamefuncs = MAKE_MENUOPTIONSET( 0x1, MEOSN_Gamefuncs, NULL );
176
static MenuOptionSet_t MEOS_Gamefuncs = MAKE_MENUOPTIONSET( 0x1, MEOSN_Gamefuncs, NULL );
175
177
176
178
177
179
178
/*
180
/*
179
MenuEntry_t and MenuGroup_t are passed in arrays of pointers so that the callback function
181
MenuEntry_t and MenuGroup_t are passed in arrays of pointers so that the callback function
180
that is called when an entry is modified or activated can test equality of the current
182
that is called when an entry is modified or activated can test equality of the current
181
entry/group pointer directly against the known ones, instead of relying on an ID number.
183
entry/group pointer directly against the known ones, instead of relying on an ID number.
182

184

183
That way, individual menu entries/groups can be ifdef'd out painlessly.
185
That way, individual menu entries/groups can be ifdef'd out painlessly.
184
*/
186
*/
185
187
186
static MenuLink_t MEO_NULL = { MENU_NULL, };
188
static MenuLink_t MEO_NULL = { MENU_NULL, };
187
static const char* MenuCustom = "Custom";
189
static const char* MenuCustom = "Custom";
188
190
189
#define MAKE_MENUSTRING(...) { __VA_ARGS__, NULL, }
191
#define MAKE_MENUSTRING(...) { __VA_ARGS__, NULL, }
190
#define MAKE_MENUOPTION(...) { __VA_ARGS__, -1, }
192
#define MAKE_MENUOPTION(...) { __VA_ARGS__, -1, }
191
#define MAKE_MENURANGE(...) { __VA_ARGS__, }
193
#define MAKE_MENURANGE(...) { __VA_ARGS__, }
192
#define MAKE_MENUENTRY(...) { __VA_ARGS__, 0, 0, 0, }
194
#define MAKE_MENUENTRY(...) { __VA_ARGS__, 0, 0, 0, }
193
195
194
#define MAKE_MENU_TOP_ENTRYLINK(EntryName, LinkID, Title) \
196
#define MAKE_MENU_TOP_ENTRYLINK(EntryName, LinkID, Title) \
195
static MenuLink_t MEO_ ## EntryName = { LinkID, };\
197
static MenuLink_t MEO_ ## EntryName = { LinkID, };\
196
static MenuEntry_t ME_ ## EntryName = MAKE_MENUENTRY( &MF_Redfont, Title, Link, &MEO_ ## EntryName )
198
static MenuEntry_t ME_ ## EntryName = MAKE_MENUENTRY( &MF_Redfont, Title, Link, &MEO_ ## EntryName )
197
199
198
200
199
MAKE_MENU_TOP_ENTRYLINK( MAIN_NEWGAME, MENU_EPISODE, "New Game" );
201
MAKE_MENU_TOP_ENTRYLINK( MAIN_NEWGAME, MENU_EPISODE, "New Game" );
200
MAKE_MENU_TOP_ENTRYLINK( MAIN_NEWGAME_INGAME, MENU_NEWVERIFY, "New Game" );
202
MAKE_MENU_TOP_ENTRYLINK( MAIN_NEWGAME_INGAME, MENU_NEWVERIFY, "New Game" );
201
static MenuLink_t MEO_MAIN_NEWGAME_NETWORK = { MENU_NETWORK, };
203
static MenuLink_t MEO_MAIN_NEWGAME_NETWORK = { MENU_NETWORK, };
202
MAKE_MENU_TOP_ENTRYLINK( MAIN_SAVEGAME, MENU_SAVE, "Save Game" );
204
MAKE_MENU_TOP_ENTRYLINK( MAIN_SAVEGAME, MENU_SAVE, "Save Game" );
203
MAKE_MENU_TOP_ENTRYLINK( MAIN_LOADGAME, MENU_LOAD, "Load Game" );
205
MAKE_MENU_TOP_ENTRYLINK( MAIN_LOADGAME, MENU_LOAD, "Load Game" );
204
MAKE_MENU_TOP_ENTRYLINK( MAIN_OPTIONS, MENU_OPTIONS, "Options" );
206
MAKE_MENU_TOP_ENTRYLINK( MAIN_OPTIONS, MENU_OPTIONS, "Options" );
205
MAKE_MENU_TOP_ENTRYLINK( MAIN_HELP, MENU_STORY, "Help" );
207
MAKE_MENU_TOP_ENTRYLINK( MAIN_HELP, MENU_STORY, "Help" );
206
MAKE_MENU_TOP_ENTRYLINK( MAIN_CREDITS, MENU_CREDITS, "Credits" );
208
MAKE_MENU_TOP_ENTRYLINK( MAIN_CREDITS, MENU_CREDITS, "Credits" );
207
MAKE_MENU_TOP_ENTRYLINK( MAIN_QUITTOTITLE, MENU_QUITTOTITLE, "Quit To Title" );
209
MAKE_MENU_TOP_ENTRYLINK( MAIN_QUITTOTITLE, MENU_QUITTOTITLE, "Quit To Title" );
208
MAKE_MENU_TOP_ENTRYLINK( MAIN_QUIT, MENU_QUIT, "Quit" );
210
MAKE_MENU_TOP_ENTRYLINK( MAIN_QUIT, MENU_QUIT, "Quit" );
209
MAKE_MENU_TOP_ENTRYLINK( MAIN_QUITGAME, MENU_QUIT, "Quit Game" );
211
MAKE_MENU_TOP_ENTRYLINK( MAIN_QUITGAME, MENU_QUIT, "Quit Game" );
210
212
211
static MenuEntry_t *MEL_MAIN[] = {
213
static MenuEntry_t *MEL_MAIN[] = {
212
    &ME_MAIN_NEWGAME,
214
    &ME_MAIN_NEWGAME,
213
    &ME_MAIN_OPTIONS,
215
    &ME_MAIN_OPTIONS,
214
    &ME_MAIN_LOADGAME,
216
    &ME_MAIN_LOADGAME,
215
#ifndef DROIDMENU
217
#ifndef DROIDMENU
216
    &ME_MAIN_HELP,
218
    &ME_MAIN_HELP,
217
#endif
219
#endif
218
    &ME_MAIN_CREDITS,
220
    &ME_MAIN_CREDITS,
219
    &ME_MAIN_QUIT,
221
    &ME_MAIN_QUIT,
220
};
222
};
221
223
222
static MenuEntry_t *MEL_MAIN_INGAME[] = {
224
static MenuEntry_t *MEL_MAIN_INGAME[] = {
223
    &ME_MAIN_NEWGAME_INGAME,
225
    &ME_MAIN_NEWGAME_INGAME,
224
    &ME_MAIN_SAVEGAME,
226
    &ME_MAIN_SAVEGAME,
225
    &ME_MAIN_LOADGAME,
227
    &ME_MAIN_LOADGAME,
226
    &ME_MAIN_OPTIONS,
228
    &ME_MAIN_OPTIONS,
227
#ifndef DROIDMENU
229
#ifndef DROIDMENU
228
    &ME_MAIN_HELP,
230
    &ME_MAIN_HELP,
229
#endif
231
#endif
230
    &ME_MAIN_QUITTOTITLE,
232
    &ME_MAIN_QUITTOTITLE,
231
    &ME_MAIN_QUITGAME,
233
    &ME_MAIN_QUITGAME,
232
};
234
};
233
235
234
// Episode and Skill will be dynamically generated after CONs are parsed
236
// Episode and Skill will be dynamically generated after CONs are parsed
235
static MenuLink_t MEO_EPISODE = { MENU_SKILL, };
237
static MenuLink_t MEO_EPISODE = { MENU_SKILL, };
236
static MenuLink_t MEO_EPISODE_SHAREWARE = { MENU_BUYDUKE, };
238
static MenuLink_t MEO_EPISODE_SHAREWARE = { MENU_BUYDUKE, };
237
static MenuEntry_t ME_EPISODE_TEMPLATE = MAKE_MENUENTRY( &MF_Redfont, NULL, Link, &MEO_EPISODE );
239
static MenuEntry_t ME_EPISODE_TEMPLATE = MAKE_MENUENTRY( &MF_Redfont, NULL, Link, &MEO_EPISODE );
238
static MenuEntry_t ME_EPISODE[MAXVOLUMES];
240
static MenuEntry_t ME_EPISODE[MAXVOLUMES];
239
static MenuEntry_t *MEL_EPISODE[MAXVOLUMES];
241
static MenuEntry_t *MEL_EPISODE[MAXVOLUMES];
240
242
241
static MenuLink_t MEO_EPISODE_USERMAP = { MENU_USERMAP, };
243
static MenuLink_t MEO_EPISODE_USERMAP = { MENU_USERMAP, };
242
static MenuEntry_t ME_EPISODE_USERMAP = MAKE_MENUENTRY( &MF_Redfont, "User Map", Link, &MEO_EPISODE_USERMAP );
244
static MenuEntry_t ME_EPISODE_USERMAP = MAKE_MENUENTRY( &MF_Redfont, "User Map", Link, &MEO_EPISODE_USERMAP );
243
static MenuEntry_t *MEL_EPISODE_USERMAP[] = {
245
static MenuEntry_t *MEL_EPISODE_USERMAP[] = {
244
    &ME_EPISODE_USERMAP,
246
    &ME_EPISODE_USERMAP,
245
};
247
};
246
248
247
static MenuEntry_t ME_SKILL_TEMPLATE = MAKE_MENUENTRY( &MF_Redfont, NULL, Link, &MEO_NULL );
249
static MenuEntry_t ME_SKILL_TEMPLATE = MAKE_MENUENTRY( &MF_Redfont, NULL, Link, &MEO_NULL );
248
static MenuEntry_t ME_SKILL[MAXSKILLS];
250
static MenuEntry_t ME_SKILL[MAXSKILLS];
249
static MenuEntry_t *MEL_SKILL[MAXSKILLS];
251
static MenuEntry_t *MEL_SKILL[MAXSKILLS];
250
252
251
// All NULL MenuEntry_t are to-do.
253
// All NULL MenuEntry_t are to-do.
252
254
253
static MenuOption_t MEO_GAMESETUP_STARTWIN = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_OffOn, &ud.config.ForceSetup );
255
static MenuOption_t MEO_GAMESETUP_STARTWIN = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_OffOn, &ud.config.ForceSetup );
254
static MenuEntry_t ME_GAMESETUP_STARTWIN = MAKE_MENUENTRY( &MF_Redfont, "Startup window:", Option, &MEO_GAMESETUP_STARTWIN );
256
static MenuEntry_t ME_GAMESETUP_STARTWIN = MAKE_MENUENTRY( &MF_Redfont, "Startup window:", Option, &MEO_GAMESETUP_STARTWIN );
255
257
256
static char *MEOSN_GAMESETUP_AIM_AUTO[] = { "None", "Regular", "Bullets only",
258
static char *MEOSN_GAMESETUP_AIM_AUTO[] = { "None", "Regular", "Bullets only",
257
#ifdef DROIDMENU
259
#ifdef DROIDMENU
258
"Extra wide"
260
"Extra wide"
259
#endif
261
#endif
260
};
262
};
261
static int32_t MEOSV_GAMESETUP_AIM_AUTO[] = { 0, 1, 2,
263
static int32_t MEOSV_GAMESETUP_AIM_AUTO[] = { 0, 1, 2,
262
#ifdef DROIDMENU
264
#ifdef DROIDMENU
263
3,
265
3,
264
#endif
266
#endif
265
};
267
};
266
268
267
static MenuOptionSet_t MEOS_GAMESETUP_AIM_AUTO = MAKE_MENUOPTIONSET(0x2, MEOSN_GAMESETUP_AIM_AUTO, MEOSV_GAMESETUP_AIM_AUTO);
269
static MenuOptionSet_t MEOS_GAMESETUP_AIM_AUTO = MAKE_MENUOPTIONSET(0x2, MEOSN_GAMESETUP_AIM_AUTO, MEOSV_GAMESETUP_AIM_AUTO);
268
static MenuOption_t MEO_GAMESETUP_AIM_AUTO = MAKE_MENUOPTION(&MF_RedfontRt, &MEOS_GAMESETUP_AIM_AUTO, &ud.config.AutoAim);
270
static MenuOption_t MEO_GAMESETUP_AIM_AUTO = MAKE_MENUOPTION(&MF_RedfontRt, &MEOS_GAMESETUP_AIM_AUTO, &ud.config.AutoAim);
269
static MenuEntry_t ME_GAMESETUP_AIM_AUTO = MAKE_MENUENTRY(&MF_Redfont, "Auto aim:", Option, &MEO_GAMESETUP_AIM_AUTO);
271
static MenuEntry_t ME_GAMESETUP_AIM_AUTO = MAKE_MENUENTRY(&MF_Redfont, "Auto aim:", Option, &MEO_GAMESETUP_AIM_AUTO);
270
272
271
static char *MEOSN_GAMESETUP_WEAPSWITCH_PICKUP[] = { "Never", "If new", "By rating", };
273
static char *MEOSN_GAMESETUP_WEAPSWITCH_PICKUP[] = { "Never", "If new", "By rating", };
272
static MenuOptionSet_t MEOS_GAMESETUP_WEAPSWITCH_PICKUP = MAKE_MENUOPTIONSET(0x2, MEOSN_GAMESETUP_WEAPSWITCH_PICKUP, NULL);
274
static MenuOptionSet_t MEOS_GAMESETUP_WEAPSWITCH_PICKUP = MAKE_MENUOPTIONSET(0x2, MEOSN_GAMESETUP_WEAPSWITCH_PICKUP, NULL);
273
static MenuOption_t MEO_GAMESETUP_WEAPSWITCH_PICKUP = MAKE_MENUOPTION(&MF_RedfontRt, &MEOS_GAMESETUP_WEAPSWITCH_PICKUP, NULL);
275
static MenuOption_t MEO_GAMESETUP_WEAPSWITCH_PICKUP = MAKE_MENUOPTION(&MF_RedfontRt, &MEOS_GAMESETUP_WEAPSWITCH_PICKUP, NULL);
274
static MenuEntry_t ME_GAMESETUP_WEAPSWITCH_PICKUP = MAKE_MENUENTRY(&MF_Redfont, "Equip pickups:", Option, &MEO_GAMESETUP_WEAPSWITCH_PICKUP);
276
static MenuEntry_t ME_GAMESETUP_WEAPSWITCH_PICKUP = MAKE_MENUENTRY(&MF_Redfont, "Equip pickups:", Option, &MEO_GAMESETUP_WEAPSWITCH_PICKUP);
275
277
276
static char *MEOSN_DemoRec[] = { "Off", "Running", };
278
static char *MEOSN_DemoRec[] = { "Off", "Running", };
277
static MenuOptionSet_t MEOS_DemoRec = MAKE_MENUOPTIONSET( 0x3, MEOSN_DemoRec, NULL );
279
static MenuOptionSet_t MEOS_DemoRec = MAKE_MENUOPTIONSET( 0x3, MEOSN_DemoRec, NULL );
278
static MenuOption_t MEO_GAMESETUP_DEMOREC = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_OffOn, &ud.m_recstat );
280
static MenuOption_t MEO_GAMESETUP_DEMOREC = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_OffOn, &ud.m_recstat );
279
static MenuEntry_t ME_GAMESETUP_DEMOREC = MAKE_MENUENTRY( &MF_Redfont, "Record demo:", Option, &MEO_GAMESETUP_DEMOREC );
281
static MenuEntry_t ME_GAMESETUP_DEMOREC = MAKE_MENUENTRY( &MF_Redfont, "Record demo:", Option, &MEO_GAMESETUP_DEMOREC );
280
282
281
#ifdef _WIN32
283
#ifdef _WIN32
282
static MenuOption_t MEO_GAMESETUP_UPDATES = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_NoYes, &ud.config.CheckForUpdates );
284
static MenuOption_t MEO_GAMESETUP_UPDATES = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_NoYes, &ud.config.CheckForUpdates );
283
static MenuEntry_t ME_GAMESETUP_UPDATES = MAKE_MENUENTRY( &MF_Redfont, "Online updates:", Option, &MEO_GAMESETUP_UPDATES );
285
static MenuEntry_t ME_GAMESETUP_UPDATES = MAKE_MENUENTRY( &MF_Redfont, "Online updates:", Option, &MEO_GAMESETUP_UPDATES );
284
#endif
286
#endif
285
287
286
static MenuOption_t MEO_ADULTMODE = MAKE_MENUOPTION(&MF_RedfontRt, &MEOS_OffOn, &ud.lockout);
288
static MenuOption_t MEO_ADULTMODE = MAKE_MENUOPTION(&MF_RedfontRt, &MEOS_OffOn, &ud.lockout);
287
static MenuEntry_t ME_ADULTMODE = MAKE_MENUENTRY(&MF_Redfont, "Parental lock:", Option, &MEO_ADULTMODE);
289
static MenuEntry_t ME_ADULTMODE = MAKE_MENUENTRY(&MF_Redfont, "Parental lock:", Option, &MEO_ADULTMODE);
288
// static MenuLink_t MEO_ADULTMODE_PASSWORD = { MENU_ADULTPASSWORD, };
290
// static MenuLink_t MEO_ADULTMODE_PASSWORD = { MENU_ADULTPASSWORD, };
289
// static MenuEntry_t ME_ADULTMODE_PASSWORD = MAKE_MENUENTRY( &MF_Redfont, "Enter Password", Link, &MEO_ADULTMODE_PASSWORD );
291
// static MenuEntry_t ME_ADULTMODE_PASSWORD = MAKE_MENUENTRY( &MF_Redfont, "Enter Password", Link, &MEO_ADULTMODE_PASSWORD );
290
292
291
static MenuEntry_t *MEL_GAMESETUP1[] = {
293
static MenuEntry_t *MEL_GAMESETUP1[] = {
292
        &ME_ADULTMODE,
294
        &ME_ADULTMODE,
293
#ifndef DROIDMENU
295
#ifndef DROIDMENU
294
    &ME_GAMESETUP_STARTWIN,
296
    &ME_GAMESETUP_STARTWIN,
295
#endif
297
#endif
296
        &ME_GAMESETUP_AIM_AUTO,
298
        &ME_GAMESETUP_AIM_AUTO,
297
        &ME_GAMESETUP_WEAPSWITCH_PICKUP,
299
        &ME_GAMESETUP_WEAPSWITCH_PICKUP,
298
#ifndef DROIDMENU
300
#ifndef DROIDMENU
299
    &ME_GAMESETUP_DEMOREC,
301
    &ME_GAMESETUP_DEMOREC,
300
#ifdef _WIN32
302
#ifdef _WIN32
301
        &ME_GAMESETUP_UPDATES,
303
        &ME_GAMESETUP_UPDATES,
302
#endif
304
#endif
303
#endif
305
#endif
304
};
306
};
305
307
306
MAKE_MENU_TOP_ENTRYLINK( OPTIONS_GAMESETUP, MENU_GAMESETUP, "Game Setup" );
308
MAKE_MENU_TOP_ENTRYLINK( OPTIONS_GAMESETUP, MENU_GAMESETUP, "Game Setup" );
307
MAKE_MENU_TOP_ENTRYLINK( OPTIONS_SOUNDSETUP, MENU_SOUND, "Sound Setup" );
309
MAKE_MENU_TOP_ENTRYLINK( OPTIONS_SOUNDSETUP, MENU_SOUND, "Sound Setup" );
308
MAKE_MENU_TOP_ENTRYLINK( OPTIONS_DISPLAYSETUP, MENU_DISPLAYSETUP, "Display Setup" );
310
MAKE_MENU_TOP_ENTRYLINK( OPTIONS_DISPLAYSETUP, MENU_DISPLAYSETUP, "Display Setup" );
309
MAKE_MENU_TOP_ENTRYLINK( OPTIONS_PLAYERSETUP, MENU_PLAYER, "Player Setup" );
311
MAKE_MENU_TOP_ENTRYLINK( OPTIONS_PLAYERSETUP, MENU_PLAYER, "Player Setup" );
310
MAKE_MENU_TOP_ENTRYLINK( OPTIONS_CONTROLS, MENU_CONTROLS, "Control Setup" );
312
MAKE_MENU_TOP_ENTRYLINK( OPTIONS_CONTROLS, MENU_CONTROLS, "Control Setup" );
311
MAKE_MENU_TOP_ENTRYLINK( OPTIONS_KEYBOARDSETUP, MENU_KEYBOARDSETUP, "Keyboard Setup" );
313
MAKE_MENU_TOP_ENTRYLINK( OPTIONS_KEYBOARDSETUP, MENU_KEYBOARDSETUP, "Keyboard Setup" );
312
MAKE_MENU_TOP_ENTRYLINK( OPTIONS_MOUSESETUP, MENU_MOUSESETUP, "Mouse Setup" );
314
MAKE_MENU_TOP_ENTRYLINK( OPTIONS_MOUSESETUP, MENU_MOUSESETUP, "Mouse Setup" );
313
MAKE_MENU_TOP_ENTRYLINK( OPTIONS_JOYSTICKSETUP, MENU_JOYSTICKSETUP, "Joystick Setup" );
315
MAKE_MENU_TOP_ENTRYLINK( OPTIONS_JOYSTICKSETUP, MENU_JOYSTICKSETUP, "Joystick Setup" );
314
316
315
317
316
static int32_t newresolution, newrendermode, newfullscreen;
318
static int32_t newresolution, newrendermode, newfullscreen;
317
319
318
enum resflags_t {
320
enum resflags_t {
319
    RES_FS  = 0x1,
321
    RES_FS  = 0x1,
320
    RES_WIN = 0x2,
322
    RES_WIN = 0x2,
321
};
323
};
322
324
323
#define MAXRESOLUTIONSTRINGLENGTH 16
325
#define MAXRESOLUTIONSTRINGLENGTH 16
324
326
325
typedef struct resolution_t {
327
typedef struct resolution_t {
326
    int32_t xdim, ydim;
328
    int32_t xdim, ydim;
327
    int32_t flags;
329
    int32_t flags;
328
    int32_t bppmax;
330
    int32_t bppmax;
329
    char name[MAXRESOLUTIONSTRINGLENGTH];
331
    char name[MAXRESOLUTIONSTRINGLENGTH];
330
} resolution_t;
332
} resolution_t;
331
333
332
resolution_t resolution[MAXVALIDMODES];
334
resolution_t resolution[MAXVALIDMODES];
333
335
334
static char *MEOSN_VIDEOSETUP_RESOLUTION[MAXVALIDMODES];
336
static char *MEOSN_VIDEOSETUP_RESOLUTION[MAXVALIDMODES];
335
static MenuOptionSet_t MEOS_VIDEOSETUP_RESOLUTION = MAKE_MENUOPTIONSETDYN( 0x0, MEOSN_VIDEOSETUP_RESOLUTION, NULL, 0 );
337
static MenuOptionSet_t MEOS_VIDEOSETUP_RESOLUTION = MAKE_MENUOPTIONSETDYN( 0x0, MEOSN_VIDEOSETUP_RESOLUTION, NULL, 0 );
336
static MenuOption_t MEO_VIDEOSETUP_RESOLUTION = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_VIDEOSETUP_RESOLUTION, &newresolution );
338
static MenuOption_t MEO_VIDEOSETUP_RESOLUTION = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_VIDEOSETUP_RESOLUTION, &newresolution );
337
static MenuEntry_t ME_VIDEOSETUP_RESOLUTION = MAKE_MENUENTRY( &MF_Redfont, "Resolution:", Option, &MEO_VIDEOSETUP_RESOLUTION );
339
static MenuEntry_t ME_VIDEOSETUP_RESOLUTION = MAKE_MENUENTRY( &MF_Redfont, "Resolution:", Option, &MEO_VIDEOSETUP_RESOLUTION );
338
340
339
#ifdef USE_OPENGL
341
#ifdef USE_OPENGL
340
#ifdef POLYMER
342
#ifdef POLYMER
341
static char *MEOSN_VIDEOSETUP_RENDERER[] = { "Classic", "Polymost.f", "Polymer", };
343
static char *MEOSN_VIDEOSETUP_RENDERER[] = { "Classic", "Polymost.f", "Polymer", };
342
static int32_t MEOSV_VIDEOSETUP_RENDERER[] = { REND_CLASSIC, REND_POLYMOST, REND_POLYMER, };
344
static int32_t MEOSV_VIDEOSETUP_RENDERER[] = { REND_CLASSIC, REND_POLYMOST, REND_POLYMER, };
343
#else
345
#else
344
static char *MEOSN_VIDEOSETUP_RENDERER[] = { "Classic", "OpenGL", };
346
static char *MEOSN_VIDEOSETUP_RENDERER[] = { "Classic", "OpenGL", };
345
static int32_t MEOSV_VIDEOSETUP_RENDERER[] = { REND_CLASSIC, REND_POLYMOST, };
347
static int32_t MEOSV_VIDEOSETUP_RENDERER[] = { REND_CLASSIC, REND_POLYMOST, };
346
#endif
348
#endif
347
#else
349
#else
348
static char *MEOSN_VIDEOSETUP_RENDERER[] = { "Classic", };
350
static char *MEOSN_VIDEOSETUP_RENDERER[] = { "Classic", };
349
static int32_t MEOSV_VIDEOSETUP_RENDERER[] = { REND_CLASSIC, };
351
static int32_t MEOSV_VIDEOSETUP_RENDERER[] = { REND_CLASSIC, };
350
#endif
352
#endif
351
353
352
static MenuOptionSet_t MEOS_VIDEOSETUP_RENDERER = MAKE_MENUOPTIONSET( 0x2, MEOSN_VIDEOSETUP_RENDERER, MEOSV_VIDEOSETUP_RENDERER );
354
static MenuOptionSet_t MEOS_VIDEOSETUP_RENDERER = MAKE_MENUOPTIONSET( 0x2, MEOSN_VIDEOSETUP_RENDERER, MEOSV_VIDEOSETUP_RENDERER );
353
355
354
static MenuOption_t MEO_VIDEOSETUP_RENDERER = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_VIDEOSETUP_RENDERER, &newrendermode );
356
static MenuOption_t MEO_VIDEOSETUP_RENDERER = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_VIDEOSETUP_RENDERER, &newrendermode );
355
static MenuEntry_t ME_VIDEOSETUP_RENDERER = MAKE_MENUENTRY( &MF_Redfont, "Renderer:", Option, &MEO_VIDEOSETUP_RENDERER );
357
static MenuEntry_t ME_VIDEOSETUP_RENDERER = MAKE_MENUENTRY( &MF_Redfont, "Renderer:", Option, &MEO_VIDEOSETUP_RENDERER );
356
static MenuOption_t MEO_VIDEOSETUP_FULLSCREEN = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_NoYes, &newfullscreen );
358
static MenuOption_t MEO_VIDEOSETUP_FULLSCREEN = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_NoYes, &newfullscreen );
357
static MenuEntry_t ME_VIDEOSETUP_FULLSCREEN = MAKE_MENUENTRY( &MF_Redfont, "Fullscreen:", Option, &MEO_VIDEOSETUP_FULLSCREEN );
359
static MenuEntry_t ME_VIDEOSETUP_FULLSCREEN = MAKE_MENUENTRY( &MF_Redfont, "Fullscreen:", Option, &MEO_VIDEOSETUP_FULLSCREEN );
358
static MenuEntry_t ME_VIDEOSETUP_APPLY = MAKE_MENUENTRY( &MF_Redfont, "Apply Changes", Link, &MEO_NULL );
360
static MenuEntry_t ME_VIDEOSETUP_APPLY = MAKE_MENUENTRY( &MF_Redfont, "Apply Changes", Link, &MEO_NULL );
359
361
360
362
361
static MenuLink_t MEO_DISPLAYSETUP_COLORCORR =  { MENU_COLCORR, };
363
static MenuLink_t MEO_DISPLAYSETUP_COLORCORR =  { MENU_COLCORR, };
362
static MenuEntry_t ME_DISPLAYSETUP_COLORCORR = MAKE_MENUENTRY( &MF_Redfont, "Color Correction", Link, &MEO_DISPLAYSETUP_COLORCORR );
364
static MenuEntry_t ME_DISPLAYSETUP_COLORCORR = MAKE_MENUENTRY( &MF_Redfont, "Color Correction", Link, &MEO_DISPLAYSETUP_COLORCORR );
363
static MenuOption_t MEO_DISPLAYSETUP_PIXELDOUBLING = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OnOff, &ud.detail );
365
static MenuOption_t MEO_DISPLAYSETUP_PIXELDOUBLING = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OnOff, &ud.detail );
364
static MenuEntry_t ME_DISPLAYSETUP_PIXELDOUBLING = MAKE_MENUENTRY( &MF_Redfont, "Pixel Doubling:", Option, &MEO_DISPLAYSETUP_PIXELDOUBLING );
366
static MenuEntry_t ME_DISPLAYSETUP_PIXELDOUBLING = MAKE_MENUENTRY( &MF_Redfont, "Pixel Doubling:", Option, &MEO_DISPLAYSETUP_PIXELDOUBLING );
365
367
366
368
367
#ifdef USE_OPENGL
369
#ifdef USE_OPENGL
368
static MenuOption_t MEO_DISPLAYSETUP_ASPECTRATIO = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, NULL);
370
static MenuOption_t MEO_DISPLAYSETUP_ASPECTRATIO = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, NULL);
369
#else
371
#else
370
static MenuOption_t MEO_DISPLAYSETUP_ASPECTRATIO = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &r_usenewaspect);
372
static MenuOption_t MEO_DISPLAYSETUP_ASPECTRATIO = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &r_usenewaspect);
371
#endif
373
#endif
372
static MenuEntry_t ME_DISPLAYSETUP_ASPECTRATIO = MAKE_MENUENTRY(&MF_Redfont, "Widescreen:", Option, &MEO_DISPLAYSETUP_ASPECTRATIO);
374
static MenuEntry_t ME_DISPLAYSETUP_ASPECTRATIO = MAKE_MENUENTRY(&MF_Redfont, "Widescreen:", Option, &MEO_DISPLAYSETUP_ASPECTRATIO);
373
#ifdef POLYMER
375
#ifdef POLYMER
374
static char *MEOSN_DISPLAYSETUP_ASPECTRATIO_POLYMER[] = { "Auto", "4:3", "16:10", "5:3", "16:9", "1.85:1", "2.39:1", };
376
static char *MEOSN_DISPLAYSETUP_ASPECTRATIO_POLYMER[] = { "Auto", "4:3", "16:10", "5:3", "16:9", "1.85:1", "2.39:1", };
375
static double MEOSV_DISPLAYSETUP_ASPECTRATIO_POLYMER[] = { 0., 1.33, 1.6, 1.66, 1.78, 1.85, 2.39, };
377
static double MEOSV_DISPLAYSETUP_ASPECTRATIO_POLYMER[] = { 0., 1.33, 1.6, 1.66, 1.78, 1.85, 2.39, };
376
static MenuOptionSet_t MEOS_DISPLAYSETUP_ASPECTRATIO_POLYMER = MAKE_MENUOPTIONSET(0x1, MEOSN_DISPLAYSETUP_ASPECTRATIO_POLYMER, NULL);
378
static MenuOptionSet_t MEOS_DISPLAYSETUP_ASPECTRATIO_POLYMER = MAKE_MENUOPTIONSET(0x1, MEOSN_DISPLAYSETUP_ASPECTRATIO_POLYMER, NULL);
377
static MenuOption_t MEO_DISPLAYSETUP_ASPECTRATIO_POLYMER = MAKE_MENUOPTION(&MF_Redfont, &MEOS_DISPLAYSETUP_ASPECTRATIO_POLYMER, NULL);
379
static MenuOption_t MEO_DISPLAYSETUP_ASPECTRATIO_POLYMER = MAKE_MENUOPTION(&MF_Redfont, &MEOS_DISPLAYSETUP_ASPECTRATIO_POLYMER, NULL);
378
static MenuEntry_t ME_DISPLAYSETUP_ASPECTRATIO_POLYMER = MAKE_MENUENTRY(&MF_Redfont, "Aspect ratio:", Option, &MEO_DISPLAYSETUP_ASPECTRATIO_POLYMER);
380
static MenuEntry_t ME_DISPLAYSETUP_ASPECTRATIO_POLYMER = MAKE_MENUENTRY(&MF_Redfont, "Aspect ratio:", Option, &MEO_DISPLAYSETUP_ASPECTRATIO_POLYMER);
379
#endif
381
#endif
380
382
381
383
382
#ifdef USE_OPENGL
384
#ifdef USE_OPENGL
383
static char *MEOSN_DISPLAYSETUP_TEXFILTER[] = { "Classic", "Filtered" };
385
static char *MEOSN_DISPLAYSETUP_TEXFILTER[] = { "Classic", "Filtered" };
384
static MenuOptionSet_t MEOS_DISPLAYSETUP_TEXFILTER = MAKE_MENUOPTIONSET( 0x2, MEOSN_DISPLAYSETUP_TEXFILTER, NULL );
386
static MenuOptionSet_t MEOS_DISPLAYSETUP_TEXFILTER = MAKE_MENUOPTIONSET( 0x2, MEOSN_DISPLAYSETUP_TEXFILTER, NULL );
385
int32_t menufiltermode;
387
int32_t menufiltermode;
386
static MenuOption_t MEO_DISPLAYSETUP_TEXFILTER = MAKE_MENUOPTION( &MF_Redfont, &MEOS_DISPLAYSETUP_TEXFILTER, &menufiltermode );
388
static MenuOption_t MEO_DISPLAYSETUP_TEXFILTER = MAKE_MENUOPTION( &MF_Redfont, &MEOS_DISPLAYSETUP_TEXFILTER, &menufiltermode );
387
static MenuEntry_t ME_DISPLAYSETUP_TEXFILTER = MAKE_MENUENTRY( &MF_Redfont, "Texture Mode:", Option, &MEO_DISPLAYSETUP_TEXFILTER );
389
static MenuEntry_t ME_DISPLAYSETUP_TEXFILTER = MAKE_MENUENTRY( &MF_Redfont, "Texture Mode:", Option, &MEO_DISPLAYSETUP_TEXFILTER );
388
390
389
static char *MEOSN_DISPLAYSETUP_ANISOTROPY[] = { "None", "2x", "4x", "8x", "16x", };
391
static char *MEOSN_DISPLAYSETUP_ANISOTROPY[] = { "None", "2x", "4x", "8x", "16x", };
390
static int32_t MEOSV_DISPLAYSETUP_ANISOTROPY[] = { 0, 2, 4, 8, 16, };
392
static int32_t MEOSV_DISPLAYSETUP_ANISOTROPY[] = { 0, 2, 4, 8, 16, };
391
static MenuOptionSet_t MEOS_DISPLAYSETUP_ANISOTROPY = MAKE_MENUOPTIONSET(0x0, MEOSN_DISPLAYSETUP_ANISOTROPY, MEOSV_DISPLAYSETUP_ANISOTROPY);
393
static MenuOptionSet_t MEOS_DISPLAYSETUP_ANISOTROPY = MAKE_MENUOPTIONSET(0x0, MEOSN_DISPLAYSETUP_ANISOTROPY, MEOSV_DISPLAYSETUP_ANISOTROPY);
392
static MenuOption_t MEO_DISPLAYSETUP_ANISOTROPY = MAKE_MENUOPTION(&MF_Redfont, &MEOS_DISPLAYSETUP_ANISOTROPY, &glanisotropy);
394
static MenuOption_t MEO_DISPLAYSETUP_ANISOTROPY = MAKE_MENUOPTION(&MF_Redfont, &MEOS_DISPLAYSETUP_ANISOTROPY, &glanisotropy);
393
static MenuEntry_t ME_DISPLAYSETUP_ANISOTROPY = MAKE_MENUENTRY(&MF_Redfont, "Anisotropy:", Option, &MEO_DISPLAYSETUP_ANISOTROPY);
395
static MenuEntry_t ME_DISPLAYSETUP_ANISOTROPY = MAKE_MENUENTRY(&MF_Redfont, "Anisotropy:", Option, &MEO_DISPLAYSETUP_ANISOTROPY);
394
static char *MEOSN_DISPLAYSETUP_VSYNC[] = { "NVIDIA", "Off", "On", };
396
static char *MEOSN_DISPLAYSETUP_VSYNC[] = { "NVIDIA", "Off", "On", };
395
static int32_t MEOSV_DISPLAYSETUP_VSYNC[] = { -1, 0, 1, };
397
static int32_t MEOSV_DISPLAYSETUP_VSYNC[] = { -1, 0, 1, };
396
static MenuOptionSet_t MEOS_DISPLAYSETUP_VSYNC = MAKE_MENUOPTIONSET(0x2, MEOSN_DISPLAYSETUP_VSYNC, MEOSV_DISPLAYSETUP_VSYNC);
398
static MenuOptionSet_t MEOS_DISPLAYSETUP_VSYNC = MAKE_MENUOPTIONSET(0x2, MEOSN_DISPLAYSETUP_VSYNC, MEOSV_DISPLAYSETUP_VSYNC);
397
static MenuOption_t MEO_DISPLAYSETUP_VSYNC = MAKE_MENUOPTION(&MF_Redfont, &MEOS_DISPLAYSETUP_VSYNC, &vsync);
399
static MenuOption_t MEO_DISPLAYSETUP_VSYNC = MAKE_MENUOPTION(&MF_Redfont, &MEOS_DISPLAYSETUP_VSYNC, &vsync);
398
static MenuEntry_t ME_DISPLAYSETUP_VSYNC = MAKE_MENUENTRY(&MF_Redfont, "VSync:", Option, &MEO_DISPLAYSETUP_VSYNC);
400
static MenuEntry_t ME_DISPLAYSETUP_VSYNC = MAKE_MENUENTRY(&MF_Redfont, "VSync:", Option, &MEO_DISPLAYSETUP_VSYNC);
399
401
400
#endif
402
#endif
401
403
402
static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.crosshair);
404
static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.crosshair);
403
static MenuEntry_t ME_SCREENSETUP_CROSSHAIR = MAKE_MENUENTRY(&MF_Redfont, "Crosshair:", Option, &MEO_SCREENSETUP_CROSSHAIR);
405
static MenuEntry_t ME_SCREENSETUP_CROSSHAIR = MAKE_MENUENTRY(&MF_Redfont, "Crosshair:", Option, &MEO_SCREENSETUP_CROSSHAIR);
404
static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE(&MF_Redfont, 2, 25, 100, 16, 0, &ud.crosshairscale);
406
static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE(&MF_Redfont, 2, 25, 100, 16, 0, &ud.crosshairscale);
405
static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY(&MF_Redfont, "Size:", RangeInt32, &MEO_SCREENSETUP_CROSSHAIRSIZE);
407
static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY(&MF_Redfont, "Size:", RangeInt32, &MEO_SCREENSETUP_CROSSHAIRSIZE);
406
408
407
static int32_t vpsize;
409
static int32_t vpsize;
408
static MenuRangeInt32_t MEO_SCREENSETUP_SCREENSIZE = MAKE_MENURANGE(&MF_Redfont, 0, 12, 0, 4, 0, &vpsize);
410
static MenuRangeInt32_t MEO_SCREENSETUP_SCREENSIZE = MAKE_MENURANGE(&MF_Redfont, 0, 12, 0, 4, 0, &vpsize);
409
static MenuEntry_t ME_SCREENSETUP_SCREENSIZE = MAKE_MENUENTRY(&MF_Redfont, "Screen size:", RangeInt32, &MEO_SCREENSETUP_SCREENSIZE);
411
static MenuEntry_t ME_SCREENSETUP_SCREENSIZE = MAKE_MENUENTRY(&MF_Redfont, "Screen size:", RangeInt32, &MEO_SCREENSETUP_SCREENSIZE);
410
static MenuRangeInt32_t MEO_SCREENSETUP_TEXTSIZE = MAKE_MENURANGE(&MF_Redfont, 2, 100, 400, 7, 0, &ud.textscale);
412
static MenuRangeInt32_t MEO_SCREENSETUP_TEXTSIZE = MAKE_MENURANGE(&MF_Redfont, 2, 100, 400, 7, 0, &ud.textscale);
411
static MenuEntry_t ME_SCREENSETUP_TEXTSIZE = MAKE_MENUENTRY(&MF_Redfont, "Size:", RangeInt32, &MEO_SCREENSETUP_TEXTSIZE);
413
static MenuEntry_t ME_SCREENSETUP_TEXTSIZE = MAKE_MENUENTRY(&MF_Redfont, "Size:", RangeInt32, &MEO_SCREENSETUP_TEXTSIZE);
412
static MenuOption_t MEO_SCREENSETUP_LEVELSTATS = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.levelstats);
414
static MenuOption_t MEO_SCREENSETUP_LEVELSTATS = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.levelstats);
413
static MenuEntry_t ME_SCREENSETUP_LEVELSTATS = MAKE_MENUENTRY(&MF_Redfont, "Level stats:", Option, &MEO_SCREENSETUP_LEVELSTATS);
415
static MenuEntry_t ME_SCREENSETUP_LEVELSTATS = MAKE_MENUENTRY(&MF_Redfont, "Level stats:", Option, &MEO_SCREENSETUP_LEVELSTATS);
414
416
415
417
416
static MenuOption_t MEO_SCREENSETUP_SHOWPICKUPMESSAGES = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.fta_on);
418
static MenuOption_t MEO_SCREENSETUP_SHOWPICKUPMESSAGES = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.fta_on);
417
static MenuEntry_t ME_SCREENSETUP_SHOWPICKUPMESSAGES = MAKE_MENUENTRY(&MF_Redfont, "Pickup messages:", Option, &MEO_SCREENSETUP_SHOWPICKUPMESSAGES);
419
static MenuEntry_t ME_SCREENSETUP_SHOWPICKUPMESSAGES = MAKE_MENUENTRY(&MF_Redfont, "Pickup messages:", Option, &MEO_SCREENSETUP_SHOWPICKUPMESSAGES);
418
420
419
static char *MEOSN_SCREENSETUP_NEWSTATUSBAR[] = { "Classic", "New",
421
static char *MEOSN_SCREENSETUP_NEWSTATUSBAR[] = { "Classic", "New",
420
#ifdef DROIDMENU
422
#ifdef DROIDMENU
421
"On top",
423
"On top",
422
#endif
424
#endif
423
};
425
};
424
426
425
static int32_t MEOSV_SCREENSETUP_NEWSTATUSBAR[] = { 0, 1,
427
static int32_t MEOSV_SCREENSETUP_NEWSTATUSBAR[] = { 0, 1,
426
#ifdef DROIDMENU
428
#ifdef DROIDMENU
427
2,
429
2,
428
#endif
430
#endif
429
};
431
};
430
432
431
static MenuOptionSet_t MEOS_SCREENSETUP_NEWSTATUSBAR = MAKE_MENUOPTIONSET(0x2, MEOSN_SCREENSETUP_NEWSTATUSBAR, MEOSV_SCREENSETUP_NEWSTATUSBAR);
433
static MenuOptionSet_t MEOS_SCREENSETUP_NEWSTATUSBAR = MAKE_MENUOPTIONSET(0x2, MEOSN_SCREENSETUP_NEWSTATUSBAR, MEOSV_SCREENSETUP_NEWSTATUSBAR);
432
static MenuOption_t MEO_SCREENSETUP_NEWSTATUSBAR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_SCREENSETUP_NEWSTATUSBAR, &ud.althud);
434
static MenuOption_t MEO_SCREENSETUP_NEWSTATUSBAR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_SCREENSETUP_NEWSTATUSBAR, &ud.althud);
433
static MenuEntry_t ME_SCREENSETUP_NEWSTATUSBAR = MAKE_MENUENTRY(&MF_Redfont, "Status bar:", Option, &MEO_SCREENSETUP_NEWSTATUSBAR);
435
static MenuEntry_t ME_SCREENSETUP_NEWSTATUSBAR = MAKE_MENUENTRY(&MF_Redfont, "Status bar:", Option, &MEO_SCREENSETUP_NEWSTATUSBAR);
434
436
435
437
436
438
437
static MenuRangeInt32_t MEO_SCREENSETUP_SBARSIZE = MAKE_MENURANGE(&MF_Redfont, 2, 36, 100, 17, 0, &ud.statusbarscale);
439
static MenuRangeInt32_t MEO_SCREENSETUP_SBARSIZE = MAKE_MENURANGE(&MF_Redfont, 2, 36, 100, 17, 0, &ud.statusbarscale);
438
static MenuEntry_t ME_SCREENSETUP_SBARSIZE = MAKE_MENUENTRY(&MF_Redfont, "Size:", RangeInt32, &MEO_SCREENSETUP_SBARSIZE);
440
static MenuEntry_t ME_SCREENSETUP_SBARSIZE = MAKE_MENUENTRY(&MF_Redfont, "Size:", RangeInt32, &MEO_SCREENSETUP_SBARSIZE);
439
441
440
442
441
static MenuLink_t MEO_DISPLAYSETUP_SCREENSETUP = { MENU_SCREENSETUP, };
443
static MenuLink_t MEO_DISPLAYSETUP_SCREENSETUP = { MENU_SCREENSETUP, };
442
static MenuEntry_t ME_DISPLAYSETUP_SCREENSETUP = MAKE_MENUENTRY(&MF_Redfont, "On-screen displays", Link, &MEO_DISPLAYSETUP_SCREENSETUP);
444
static MenuEntry_t ME_DISPLAYSETUP_SCREENSETUP = MAKE_MENUENTRY(&MF_Redfont, "On-screen displays", Link, &MEO_DISPLAYSETUP_SCREENSETUP);
443
445
444
446
445
static MenuLink_t MEO_DISPLAYSETUP_RENDERERSETUP =  { MENU_RENDERERSETUP, };
447
static MenuLink_t MEO_DISPLAYSETUP_RENDERERSETUP =  { MENU_RENDERERSETUP, };
446
static MenuEntry_t ME_DISPLAYSETUP_RENDERERSETUP = MAKE_MENUENTRY( &MF_Redfont, "Advanced", Link, &MEO_DISPLAYSETUP_RENDERERSETUP );
448
static MenuEntry_t ME_DISPLAYSETUP_RENDERERSETUP = MAKE_MENUENTRY( &MF_Redfont, "Advanced", Link, &MEO_DISPLAYSETUP_RENDERERSETUP );
447
449
448
static MenuLink_t MEO_DISPLAYSETUP_VIDEOSETUP = { MENU_VIDEOSETUP, };
450
static MenuLink_t MEO_DISPLAYSETUP_VIDEOSETUP = { MENU_VIDEOSETUP, };
449
static MenuEntry_t ME_DISPLAYSETUP_VIDEOSETUP = MAKE_MENUENTRY(&MF_Redfont, "Video mode", Link, &MEO_DISPLAYSETUP_VIDEOSETUP);
451
static MenuEntry_t ME_DISPLAYSETUP_VIDEOSETUP = MAKE_MENUENTRY(&MF_Redfont, "Video mode", Link, &MEO_DISPLAYSETUP_VIDEOSETUP);
450
452
451
static MenuEntry_t *MEL_OPTIONS[] = {
453
static MenuEntry_t *MEL_OPTIONS[] = {
452
    &ME_OPTIONS_GAMESETUP,
454
    &ME_OPTIONS_GAMESETUP,
453
    &ME_OPTIONS_SOUNDSETUP,
455
    &ME_OPTIONS_SOUNDSETUP,
454
    &ME_OPTIONS_DISPLAYSETUP,
456
    &ME_OPTIONS_DISPLAYSETUP,
455
#ifndef DROIDMENU
457
#ifndef DROIDMENU
456
    &ME_OPTIONS_PLAYERSETUP,
458
    &ME_OPTIONS_PLAYERSETUP,
457
#endif
459
#endif
458
    &ME_OPTIONS_CONTROLS,
460
    &ME_OPTIONS_CONTROLS,
459
};
461
};
460
462
461
static MenuEntry_t *MEL_CONTROLS[] = {
463
static MenuEntry_t *MEL_CONTROLS[] = {
462
        &ME_OPTIONS_KEYBOARDSETUP,
464
        &ME_OPTIONS_KEYBOARDSETUP,
463
        &ME_OPTIONS_MOUSESETUP,
465
        &ME_OPTIONS_MOUSESETUP,
464
        &ME_OPTIONS_JOYSTICKSETUP,
466
        &ME_OPTIONS_JOYSTICKSETUP,
465
};
467
};
466
468
467
469
468
static MenuEntry_t *MEL_VIDEOSETUP1[] = {
470
static MenuEntry_t *MEL_VIDEOSETUP1[] = {
469
    &ME_VIDEOSETUP_RESOLUTION,
471
    &ME_VIDEOSETUP_RESOLUTION,
470
    &ME_VIDEOSETUP_RENDERER,
472
    &ME_VIDEOSETUP_RENDERER,
471
    &ME_VIDEOSETUP_FULLSCREEN,
473
    &ME_VIDEOSETUP_FULLSCREEN,
472
};
474
};
473
static MenuEntry_t *MEL_VIDEOSETUP_APPLY[] = {
475
static MenuEntry_t *MEL_VIDEOSETUP_APPLY[] = {
474
    &ME_VIDEOSETUP_APPLY,
476
    &ME_VIDEOSETUP_APPLY,
475
};
477
};
476
static MenuEntry_t *MEL_DISPLAYSETUP[] = {
478
static MenuEntry_t *MEL_DISPLAYSETUP[] = {
477
    &ME_DISPLAYSETUP_SCREENSETUP,
479
    &ME_DISPLAYSETUP_SCREENSETUP,
478
    &ME_DISPLAYSETUP_COLORCORR,
480
    &ME_DISPLAYSETUP_COLORCORR,
479
#ifndef DROIDMENU
481
#ifndef DROIDMENU
480
        &ME_DISPLAYSETUP_VIDEOSETUP,
482
        &ME_DISPLAYSETUP_VIDEOSETUP,
481
#endif
483
#endif
482
        &ME_DISPLAYSETUP_ASPECTRATIO,
484
        &ME_DISPLAYSETUP_ASPECTRATIO,
483
        &ME_DISPLAYSETUP_PIXELDOUBLING,
485
        &ME_DISPLAYSETUP_PIXELDOUBLING,
484
#ifndef DROIDMENU
486
#ifndef DROIDMENU
485
    &ME_DISPLAYSETUP_RENDERERSETUP,
487
    &ME_DISPLAYSETUP_RENDERERSETUP,
486
#endif
488
#endif
487
};
489
};
488
490
489
#ifdef USE_OPENGL
491
#ifdef USE_OPENGL
490
static MenuEntry_t *MEL_DISPLAYSETUP_GL[] = {
492
static MenuEntry_t *MEL_DISPLAYSETUP_GL[] = {
491
        &ME_DISPLAYSETUP_SCREENSETUP,
493
        &ME_DISPLAYSETUP_SCREENSETUP,
492
    &ME_DISPLAYSETUP_COLORCORR,
494
    &ME_DISPLAYSETUP_COLORCORR,
493
#ifndef DROIDMENU
495
#ifndef DROIDMENU
494
        &ME_DISPLAYSETUP_VIDEOSETUP,
496
        &ME_DISPLAYSETUP_VIDEOSETUP,
495
#endif
497
#endif
496
        &ME_DISPLAYSETUP_ASPECTRATIO,
498
        &ME_DISPLAYSETUP_ASPECTRATIO,
497
        &ME_DISPLAYSETUP_TEXFILTER,
499
        &ME_DISPLAYSETUP_TEXFILTER,
498
#ifndef DROIDMENU
500
#ifndef DROIDMENU
499
        &ME_DISPLAYSETUP_ANISOTROPY,
501
        &ME_DISPLAYSETUP_ANISOTROPY,
500
        &ME_DISPLAYSETUP_VSYNC,
502
        &ME_DISPLAYSETUP_VSYNC,
501
    &ME_DISPLAYSETUP_RENDERERSETUP,
503
    &ME_DISPLAYSETUP_RENDERERSETUP,
502
#endif
504
#endif
503
};
505
};
504
506
505
#ifdef POLYMER
507
#ifdef POLYMER
506
static MenuEntry_t *MEL_DISPLAYSETUP_GL_POLYMER[] = {
508
static MenuEntry_t *MEL_DISPLAYSETUP_GL_POLYMER[] = {
507
        &ME_DISPLAYSETUP_SCREENSETUP,
509
        &ME_DISPLAYSETUP_SCREENSETUP,
508
        &ME_DISPLAYSETUP_COLORCORR,
510
        &ME_DISPLAYSETUP_COLORCORR,
509
#ifndef DROIDMENU
511
#ifndef DROIDMENU
510
        &ME_DISPLAYSETUP_VIDEOSETUP,
512
        &ME_DISPLAYSETUP_VIDEOSETUP,
511
#endif
513
#endif
512
        &ME_DISPLAYSETUP_ASPECTRATIO_POLYMER,
514
        &ME_DISPLAYSETUP_ASPECTRATIO_POLYMER,
513
        &ME_DISPLAYSETUP_TEXFILTER,
515
        &ME_DISPLAYSETUP_TEXFILTER,
514
#ifndef DROIDMENU
516
#ifndef DROIDMENU
515
        &ME_DISPLAYSETUP_ANISOTROPY,
517
        &ME_DISPLAYSETUP_ANISOTROPY,
516
        &ME_DISPLAYSETUP_VSYNC,
518
        &ME_DISPLAYSETUP_VSYNC,
517
        &ME_DISPLAYSETUP_RENDERERSETUP,
519
        &ME_DISPLAYSETUP_RENDERERSETUP,
518
#endif
520
#endif
519
};
521
};
520
522
521
#endif
523
#endif
522
#endif
524
#endif
523
525
524
526
525
527
526
static char *MenuKeyNone = "  -";
528
static char *MenuKeyNone = "  -";
527
static char *MEOSN_Keys[NUMKEYS];
529
static char *MEOSN_Keys[NUMKEYS];
528
530
529
static MenuCustom2Col_t MEO_KEYBOARDSETUPFUNCS_TEMPLATE = { &MF_MinifontRed, 54<<16, MEOSN_Keys, NUMKEYS, { NULL, NULL, }, 0, };
531
static MenuCustom2Col_t MEO_KEYBOARDSETUPFUNCS_TEMPLATE = { &MF_MinifontRed, 54<<16, MEOSN_Keys, NUMKEYS, { NULL, NULL, }, 0, };
530
static MenuCustom2Col_t MEO_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
532
static MenuCustom2Col_t MEO_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
531
static MenuEntry_t ME_KEYBOARDSETUPFUNCS_TEMPLATE = MAKE_MENUENTRY( &MF_Minifont, NULL, Custom2Col, &MEO_KEYBOARDSETUPFUNCS_TEMPLATE );
533
static MenuEntry_t ME_KEYBOARDSETUPFUNCS_TEMPLATE = MAKE_MENUENTRY( &MF_Minifont, NULL, Custom2Col, &MEO_KEYBOARDSETUPFUNCS_TEMPLATE );
532
static MenuEntry_t ME_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
534
static MenuEntry_t ME_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
533
static MenuEntry_t *MEL_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
535
static MenuEntry_t *MEL_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
534
536
535
static MenuLink_t MEO_KEYBOARDSETUP_KEYS =  { MENU_KEYBOARDKEYS, };
537
static MenuLink_t MEO_KEYBOARDSETUP_KEYS =  { MENU_KEYBOARDKEYS, };
536
static MenuEntry_t ME_KEYBOARDSETUP_KEYS = MAKE_MENUENTRY( &MF_Redfont, "Configure Keys", Link, &MEO_KEYBOARDSETUP_KEYS );
538
static MenuEntry_t ME_KEYBOARDSETUP_KEYS = MAKE_MENUENTRY( &MF_Redfont, "Configure Keys", Link, &MEO_KEYBOARDSETUP_KEYS );
537
static MenuEntry_t ME_KEYBOARDSETUP_RESET = MAKE_MENUENTRY( &MF_Redfont, "Reset To Defaults", Link, &MEO_NULL );
539
static MenuEntry_t ME_KEYBOARDSETUP_RESET = MAKE_MENUENTRY( &MF_Redfont, "Reset To Defaults", Link, &MEO_NULL );
538
static MenuEntry_t ME_KEYBOARDSETUP_RESETCLASSIC = MAKE_MENUENTRY( &MF_Redfont, "Reset To Classic", Link, &MEO_NULL );
540
static MenuEntry_t ME_KEYBOARDSETUP_RESETCLASSIC = MAKE_MENUENTRY( &MF_Redfont, "Reset To Classic", Link, &MEO_NULL );
539
541
540
static MenuEntry_t *MEL_KEYBOARDSETUP[] = {
542
static MenuEntry_t *MEL_KEYBOARDSETUP[] = {
541
    &ME_KEYBOARDSETUP_KEYS,
543
    &ME_KEYBOARDSETUP_KEYS,
542
    &ME_KEYBOARDSETUP_RESET,
544
    &ME_KEYBOARDSETUP_RESET,
543
    &ME_KEYBOARDSETUP_RESETCLASSIC,
545
    &ME_KEYBOARDSETUP_RESETCLASSIC,
544
};
546
};
545
547
546
548
547
// There is no better way to do this than manually.
549
// There is no better way to do this than manually.
548
550
549
#define MENUMOUSEFUNCTIONS 12
551
#define MENUMOUSEFUNCTIONS 12
550
552
551
static char *MenuMouseNames[MENUMOUSEFUNCTIONS] = {
553
static char *MenuMouseNames[MENUMOUSEFUNCTIONS] = {
552
    "Button 1",
554
    "Button 1",
553
    "Double Button 1",
555
    "Double Button 1",
554
    "Button 2",
556
    "Button 2",
555
    "Double Button 2",
557
    "Double Button 2",
556
    "Button 3",
558
    "Button 3",
557
    "Double Button 3",
559
    "Double Button 3",
558
560
559
    "Wheel Up",
561
    "Wheel Up",
560
    "Wheel Down",
562
    "Wheel Down",
561
563
562
    "Button 4",
564
    "Button 4",
563
    "Double Button 4",
565
    "Double Button 4",
564
    "Button 5",
566
    "Button 5",
565
    "Double Button 5",
567
    "Double Button 5",
566
};
568
};
567
static int32_t MenuMouseDataIndex[MENUMOUSEFUNCTIONS][2] = {
569
static int32_t MenuMouseDataIndex[MENUMOUSEFUNCTIONS][2] = {
568
    { 0, 0, },
570
    { 0, 0, },
569
    { 0, 1, },
571
    { 0, 1, },
570
    { 1, 0, },
572
    { 1, 0, },
571
    { 1, 1, },
573
    { 1, 1, },
572
    { 2, 0, },
574
    { 2, 0, },
573
    { 2, 1, },
575
    { 2, 1, },
574
576
575
    // note the mouse wheel
577
    // note the mouse wheel
576
    { 4, 0, },
578
    { 4, 0, },
577
    { 5, 0, },
579
    { 5, 0, },
578
580
579
    { 3, 0, },
581
    { 3, 0, },
580
    { 3, 1, },
582
    { 3, 1, },
581
    { 6, 0, },
583
    { 6, 0, },
582
    { 6, 1, },
584
    { 6, 1, },
583
};
585
};
584
586
585
static MenuOption_t MEO_MOUSEJOYSETUPBTNS_TEMPLATE = MAKE_MENUOPTION( &MF_Minifont, &MEOS_Gamefuncs, NULL );
587
static MenuOption_t MEO_MOUSEJOYSETUPBTNS_TEMPLATE = MAKE_MENUOPTION( &MF_Minifont, &MEOS_Gamefuncs, NULL );
586
static MenuOption_t MEO_MOUSESETUPBTNS[MENUMOUSEFUNCTIONS];
588
static MenuOption_t MEO_MOUSESETUPBTNS[MENUMOUSEFUNCTIONS];
587
static MenuEntry_t ME_MOUSEJOYSETUPBTNS_TEMPLATE = MAKE_MENUENTRY( &MF_Minifont, NULL, Option, NULL );
589
static MenuEntry_t ME_MOUSEJOYSETUPBTNS_TEMPLATE = MAKE_MENUENTRY( &MF_Minifont, NULL, Option, NULL );
588
static MenuEntry_t ME_MOUSESETUPBTNS[MENUMOUSEFUNCTIONS];
590
static MenuEntry_t ME_MOUSESETUPBTNS[MENUMOUSEFUNCTIONS];
589
static MenuEntry_t *MEL_MOUSESETUPBTNS[MENUMOUSEFUNCTIONS];
591
static MenuEntry_t *MEL_MOUSESETUPBTNS[MENUMOUSEFUNCTIONS];
590
592
591
static MenuLink_t MEO_MOUSESETUP_BTNS =  { MENU_MOUSEBTNS, };
593
static MenuLink_t MEO_MOUSESETUP_BTNS =  { MENU_MOUSEBTNS, };
592
static MenuEntry_t ME_MOUSESETUP_BTNS = MAKE_MENUENTRY( &MF_Redfont, "Button assignment", Link, &MEO_MOUSESETUP_BTNS );
594
static MenuEntry_t ME_MOUSESETUP_BTNS = MAKE_MENUENTRY( &MF_Redfont, "Button assignment", Link, &MEO_MOUSESETUP_BTNS );
593
static MenuRangeFloat_t MEO_MOUSESETUP_SENSITIVITY = MAKE_MENURANGE( &MF_RedfontRt, 1, .5f, 16.f, 32, 0.f, &CONTROL_MouseSensitivity );
595
static MenuRangeFloat_t MEO_MOUSESETUP_SENSITIVITY = MAKE_MENURANGE( &MF_RedfontRt, 1, .5f, 16.f, 32, 0.f, &CONTROL_MouseSensitivity );
594
static MenuEntry_t ME_MOUSESETUP_SENSITIVITY = MAKE_MENUENTRY( &MF_Redfont, "Sensitivity:", RangeFloat, &MEO_MOUSESETUP_SENSITIVITY );
596
static MenuEntry_t ME_MOUSESETUP_SENSITIVITY = MAKE_MENUENTRY( &MF_Redfont, "Sensitivity:", RangeFloat, &MEO_MOUSESETUP_SENSITIVITY );
595
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMING = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_NoYes, &g_myAimMode );
597
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMING = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_NoYes, &g_myAimMode );
596
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMING = MAKE_MENUENTRY( &MF_Redfont, "Vertical aiming:", Option, &MEO_MOUSESETUP_MOUSEAIMING );
598
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMING = MAKE_MENUENTRY( &MF_Redfont, "Vertical aiming:", Option, &MEO_MOUSESETUP_MOUSEAIMING );
597
static MenuOption_t MEO_MOUSESETUP_INVERT = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_YesNo, &ud.mouseflip );
599
static MenuOption_t MEO_MOUSESETUP_INVERT = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_YesNo, &ud.mouseflip );
598
static MenuEntry_t ME_MOUSESETUP_INVERT = MAKE_MENUENTRY( &MF_Redfont, "Invert aiming:", Option, &MEO_MOUSESETUP_INVERT );
600
static MenuEntry_t ME_MOUSESETUP_INVERT = MAKE_MENUENTRY( &MF_Redfont, "Invert aiming:", Option, &MEO_MOUSESETUP_INVERT );
599
static MenuOption_t MEO_MOUSESETUP_SMOOTH = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_NoYes, &ud.config.SmoothInput );
601
static MenuOption_t MEO_MOUSESETUP_SMOOTH = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_NoYes, &ud.config.SmoothInput );
600
static MenuEntry_t ME_MOUSESETUP_SMOOTH = MAKE_MENUENTRY( &MF_Redfont, "Filter input:", Option, &MEO_MOUSESETUP_SMOOTH );
602
static MenuEntry_t ME_MOUSESETUP_SMOOTH = MAKE_MENUENTRY( &MF_Redfont, "Filter input:", Option, &MEO_MOUSESETUP_SMOOTH );
601
static MenuLink_t MEO_MOUSESETUP_ADVANCED =  { MENU_MOUSEADVANCED, };
603
static MenuLink_t MEO_MOUSESETUP_ADVANCED =  { MENU_MOUSEADVANCED, };
602
static MenuEntry_t ME_MOUSESETUP_ADVANCED = MAKE_MENUENTRY( &MF_Redfont, "Advanced setup", Link, &MEO_MOUSESETUP_ADVANCED );
604
static MenuEntry_t ME_MOUSESETUP_ADVANCED = MAKE_MENUENTRY( &MF_Redfont, "Advanced setup", Link, &MEO_MOUSESETUP_ADVANCED );
603
605
604
static MenuEntry_t *MEL_MOUSESETUP1[] = {
606
static MenuEntry_t *MEL_MOUSESETUP1[] = {
605
    &ME_MOUSESETUP_SENSITIVITY,
607
    &ME_MOUSESETUP_SENSITIVITY,
606
        &ME_MOUSESETUP_BTNS,
608
        &ME_MOUSESETUP_BTNS,
607
};
609
};
608
610
609
static MenuEntry_t *MEL_MOUSESETUP2[] = {
611
static MenuEntry_t *MEL_MOUSESETUP2[] = {
610
        &ME_MOUSESETUP_MOUSEAIMING,
612
        &ME_MOUSESETUP_MOUSEAIMING,
611
        &ME_MOUSESETUP_INVERT,
613
        &ME_MOUSESETUP_INVERT,
612
        &ME_MOUSESETUP_SMOOTH,
614
        &ME_MOUSESETUP_SMOOTH,
613
        &ME_MOUSESETUP_ADVANCED,
615
        &ME_MOUSESETUP_ADVANCED,
614
};
616
};
615
617
616
MAKE_MENU_TOP_ENTRYLINK( JOYSTICK_EDITBUTTONS, MENU_JOYSTICKBTNS, "Edit Buttons" );
618
MAKE_MENU_TOP_ENTRYLINK( JOYSTICK_EDITBUTTONS, MENU_JOYSTICKBTNS, "Edit Buttons" );
617
MAKE_MENU_TOP_ENTRYLINK( JOYSTICK_EDITAXES, MENU_JOYSTICKAXES, "Edit Axes" );
619
MAKE_MENU_TOP_ENTRYLINK( JOYSTICK_EDITAXES, MENU_JOYSTICKAXES, "Edit Axes" );
618
620
619
static MenuEntry_t *MEL_JOYSTICKSETUP[] = {
621
static MenuEntry_t *MEL_JOYSTICKSETUP[] = {
620
    &ME_JOYSTICK_EDITBUTTONS,
622
    &ME_JOYSTICK_EDITBUTTONS,
621
    &ME_JOYSTICK_EDITAXES,
623
    &ME_JOYSTICK_EDITAXES,
622
};
624
};
623
625
624
#define MAXJOYBUTTONSTRINGLENGTH 32
626
#define MAXJOYBUTTONSTRINGLENGTH 32
625
627
626
static char MenuJoystickNames[MAXJOYBUTTONS<<1][MAXJOYBUTTONSTRINGLENGTH];
628
static char MenuJoystickNames[MAXJOYBUTTONS<<1][MAXJOYBUTTONSTRINGLENGTH];
627
629
628
static MenuOption_t MEO_JOYSTICKBTNS[MAXJOYBUTTONS<<1];
630
static MenuOption_t MEO_JOYSTICKBTNS[MAXJOYBUTTONS<<1];
629
static MenuEntry_t ME_JOYSTICKBTNS[MAXJOYBUTTONS<<1];
631
static MenuEntry_t ME_JOYSTICKBTNS[MAXJOYBUTTONS<<1];
630
static MenuEntry_t *MEL_JOYSTICKBTNS[MAXJOYBUTTONS<<1];
632
static MenuEntry_t *MEL_JOYSTICKBTNS[MAXJOYBUTTONS<<1];
631
633
632
static MenuLink_t MEO_JOYSTICKAXES = { MENU_JOYSTICKAXIS, };
634
static MenuLink_t MEO_JOYSTICKAXES = { MENU_JOYSTICKAXIS, };
633
static MenuEntry_t ME_JOYSTICKAXES_TEMPLATE = MAKE_MENUENTRY( &MF_Redfont, NULL, Link, &MEO_JOYSTICKAXES );
635
static MenuEntry_t ME_JOYSTICKAXES_TEMPLATE = MAKE_MENUENTRY( &MF_Redfont, NULL, Link, &MEO_JOYSTICKAXES );
634
static MenuEntry_t ME_JOYSTICKAXES[MAXJOYAXES];
636
static MenuEntry_t ME_JOYSTICKAXES[MAXJOYAXES];
635
static char MenuJoystickAxes[MAXJOYAXES][MAXJOYBUTTONSTRINGLENGTH];
637
static char MenuJoystickAxes[MAXJOYAXES][MAXJOYBUTTONSTRINGLENGTH];
636
638
637
static MenuEntry_t *MEL_JOYSTICKAXES[MAXJOYAXES];
639
static MenuEntry_t *MEL_JOYSTICKAXES[MAXJOYAXES];
638
640
639
static MenuRangeInt32_t MEO_MOUSEADVANCED_SCALEX = MAKE_MENURANGE( &MF_Bluefont, 3, -262144, 262144, 65, 65536, &ud.config.MouseAnalogueScale[0] );
641
static MenuRangeInt32_t MEO_MOUSEADVANCED_SCALEX = MAKE_MENURANGE( &MF_Bluefont, 3, -262144, 262144, 65, 65536, &ud.config.MouseAnalogueScale[0] );
640
static MenuEntry_t ME_MOUSEADVANCED_SCALEX = MAKE_MENUENTRY( &MF_Redfont, "X-Axis Scale", RangeInt32, &MEO_MOUSEADVANCED_SCALEX );
642
static MenuEntry_t ME_MOUSEADVANCED_SCALEX = MAKE_MENUENTRY( &MF_Redfont, "X-Axis Scale", RangeInt32, &MEO_MOUSEADVANCED_SCALEX );
641
static MenuRangeInt32_t MEO_MOUSEADVANCED_SCALEY = MAKE_MENURANGE( &MF_Bluefont, 3, -262144, 262144, 65, 65536, &ud.config.MouseAnalogueScale[1] );
643
static MenuRangeInt32_t MEO_MOUSEADVANCED_SCALEY = MAKE_MENURANGE( &MF_Bluefont, 3, -262144, 262144, 65, 65536, &ud.config.MouseAnalogueScale[1] );
642
static MenuEntry_t ME_MOUSEADVANCED_SCALEY = MAKE_MENUENTRY( &MF_Redfont, "Y-Axis Scale", RangeInt32, &MEO_MOUSEADVANCED_SCALEY );
644
static MenuEntry_t ME_MOUSEADVANCED_SCALEY = MAKE_MENUENTRY( &MF_Redfont, "Y-Axis Scale", RangeInt32, &MEO_MOUSEADVANCED_SCALEY );
643
645
644
static MenuEntry_t *MEL_MOUSEADVANCED[] = {
646
static MenuEntry_t *MEL_MOUSEADVANCED[] = {
645
    &ME_MOUSEADVANCED_SCALEX,
647
    &ME_MOUSEADVANCED_SCALEX,
646
    &ME_MOUSEADVANCED_SCALEY,
648
    &ME_MOUSEADVANCED_SCALEY,
647
};
649
};
648
650
649
static MenuOption_t MEO_MOUSEADVANCED_DAXES_UP = MAKE_MENUOPTION( &MF_BluefontRed, &MEOS_Gamefuncs, &ud.config.MouseDigitalFunctions[1][0] );
651
static MenuOption_t MEO_MOUSEADVANCED_DAXES_UP = MAKE_MENUOPTION( &MF_BluefontRed, &MEOS_Gamefuncs, &ud.config.MouseDigitalFunctions[1][0] );
650
static MenuEntry_t ME_MOUSEADVANCED_DAXES_UP = MAKE_MENUENTRY( &MF_Redfont, "Digital Up", Option, &MEO_MOUSEADVANCED_DAXES_UP );
652
static MenuEntry_t ME_MOUSEADVANCED_DAXES_UP = MAKE_MENUENTRY( &MF_Redfont, "Digital Up", Option, &MEO_MOUSEADVANCED_DAXES_UP );
651
static MenuOption_t MEO_MOUSEADVANCED_DAXES_DOWN = MAKE_MENUOPTION( &MF_BluefontRed, &MEOS_Gamefuncs, &ud.config.MouseDigitalFunctions[1][1] );
653
static MenuOption_t MEO_MOUSEADVANCED_DAXES_DOWN = MAKE_MENUOPTION( &MF_BluefontRed, &MEOS_Gamefuncs, &ud.config.MouseDigitalFunctions[1][1] );
652
static MenuEntry_t ME_MOUSEADVANCED_DAXES_DOWN = MAKE_MENUENTRY( &MF_Redfont, "Digital Down", Option, &MEO_MOUSEADVANCED_DAXES_DOWN );
654
static MenuEntry_t ME_MOUSEADVANCED_DAXES_DOWN = MAKE_MENUENTRY( &MF_Redfont, "Digital Down", Option, &MEO_MOUSEADVANCED_DAXES_DOWN );
653
static MenuOption_t MEO_MOUSEADVANCED_DAXES_LEFT = MAKE_MENUOPTION( &MF_BluefontRed, &MEOS_Gamefuncs, &ud.config.MouseDigitalFunctions[0][0] );
655
static MenuOption_t MEO_MOUSEADVANCED_DAXES_LEFT = MAKE_MENUOPTION( &MF_BluefontRed, &MEOS_Gamefuncs, &ud.config.MouseDigitalFunctions[0][0] );
654
static MenuEntry_t ME_MOUSEADVANCED_DAXES_LEFT = MAKE_MENUENTRY( &MF_Redfont, "Digital Left", Option, &MEO_MOUSEADVANCED_DAXES_LEFT );
656
static MenuEntry_t ME_MOUSEADVANCED_DAXES_LEFT = MAKE_MENUENTRY( &MF_Redfont, "Digital Left", Option, &MEO_MOUSEADVANCED_DAXES_LEFT );
655
static MenuOption_t MEO_MOUSEADVANCED_DAXES_RIGHT = MAKE_MENUOPTION( &MF_BluefontRed, &MEOS_Gamefuncs, &ud.config.MouseDigitalFunctions[0][1] );
657
static MenuOption_t MEO_MOUSEADVANCED_DAXES_RIGHT = MAKE_MENUOPTION( &MF_BluefontRed, &MEOS_Gamefuncs, &ud.config.MouseDigitalFunctions[0][1] );
656
static MenuEntry_t ME_MOUSEADVANCED_DAXES_RIGHT = MAKE_MENUENTRY( &MF_Redfont, "Digital Right", Option, &MEO_MOUSEADVANCED_DAXES_RIGHT );
658
static MenuEntry_t ME_MOUSEADVANCED_DAXES_RIGHT = MAKE_MENUENTRY( &MF_Redfont, "Digital Right", Option, &MEO_MOUSEADVANCED_DAXES_RIGHT );
657
659
658
static MenuEntry_t *MEL_MOUSEADVANCED_DAXES[] = {
660
static MenuEntry_t *MEL_MOUSEADVANCED_DAXES[] = {
659
    &ME_MOUSEADVANCED_DAXES_UP,
661
    &ME_MOUSEADVANCED_DAXES_UP,
660
    &ME_MOUSEADVANCED_DAXES_DOWN,
662
    &ME_MOUSEADVANCED_DAXES_DOWN,
661
    &ME_MOUSEADVANCED_DAXES_LEFT,
663
    &ME_MOUSEADVANCED_DAXES_LEFT,
662
    &ME_MOUSEADVANCED_DAXES_RIGHT,
664
    &ME_MOUSEADVANCED_DAXES_RIGHT,
663
};
665
};
664
666
665
static const char *MenuJoystickHatDirections[] = { "Up", "Right", "Down", "Left", };
667
static const char *MenuJoystickHatDirections[] = { "Up", "Right", "Down", "Left", };
666
668
667
static char *MEOSN_JOYSTICKAXIS_ANALOG[] = { "  -None-", "Turning", "Strafing", "Looking", "Moving", };
669
static char *MEOSN_JOYSTICKAXIS_ANALOG[] = { "  -None-", "Turning", "Strafing", "Looking", "Moving", };
668
static int32_t MEOSV_JOYSTICKAXIS_ANALOG[] = { -1, analog_turning, analog_strafing, analog_lookingupanddown, analog_moving, };
670
static int32_t MEOSV_JOYSTICKAXIS_ANALOG[] = { -1, analog_turning, analog_strafing, analog_lookingupanddown, analog_moving, };
669
static MenuOptionSet_t MEOS_JOYSTICKAXIS_ANALOG = MAKE_MENUOPTIONSET( 0x0, MEOSN_JOYSTICKAXIS_ANALOG, MEOSV_JOYSTICKAXIS_ANALOG );
671
static MenuOptionSet_t MEOS_JOYSTICKAXIS_ANALOG = MAKE_MENUOPTIONSET( 0x0, MEOSN_JOYSTICKAXIS_ANALOG, MEOSV_JOYSTICKAXIS_ANALOG );
670
static MenuOption_t MEO_JOYSTICKAXIS_ANALOG = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_JOYSTICKAXIS_ANALOG, NULL );
672
static MenuOption_t MEO_JOYSTICKAXIS_ANALOG = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_JOYSTICKAXIS_ANALOG, NULL );
671
static MenuEntry_t ME_JOYSTICKAXIS_ANALOG = MAKE_MENUENTRY( &MF_Redfont, "Analog", Option, &MEO_JOYSTICKAXIS_ANALOG );
673
static MenuEntry_t ME_JOYSTICKAXIS_ANALOG = MAKE_MENUENTRY( &MF_Redfont, "Analog", Option, &MEO_JOYSTICKAXIS_ANALOG );
672
static MenuRangeInt32_t MEO_JOYSTICKAXIS_SCALE = MAKE_MENURANGE( &MF_Bluefont, 3, -262144, 262144, 65, 65536, NULL );
674
static MenuRangeInt32_t MEO_JOYSTICKAXIS_SCALE = MAKE_MENURANGE( &MF_Bluefont, 3, -262144, 262144, 65, 65536, NULL );
673
static MenuEntry_t ME_JOYSTICKAXIS_SCALE = MAKE_MENUENTRY( &MF_Redfont, "Scale", RangeInt32, &MEO_JOYSTICKAXIS_SCALE );
675
static MenuEntry_t ME_JOYSTICKAXIS_SCALE = MAKE_MENUENTRY( &MF_Redfont, "Scale", RangeInt32, &MEO_JOYSTICKAXIS_SCALE );
674
static MenuRangeInt32_t MEO_JOYSTICKAXIS_DEAD = MAKE_MENURANGE( &MF_Bluefont, 2, 0, 1000000, 33, 0, NULL );
676
static MenuRangeInt32_t MEO_JOYSTICKAXIS_DEAD = MAKE_MENURANGE( &MF_Bluefont, 2, 0, 1000000, 33, 0, NULL );
675
static MenuEntry_t ME_JOYSTICKAXIS_DEAD = MAKE_MENUENTRY( &MF_Redfont, "Dead Zone", RangeInt32, &MEO_JOYSTICKAXIS_DEAD );
677
static MenuEntry_t ME_JOYSTICKAXIS_DEAD = MAKE_MENUENTRY( &MF_Redfont, "Dead Zone", RangeInt32, &MEO_JOYSTICKAXIS_DEAD );
676
static MenuRangeInt32_t MEO_JOYSTICKAXIS_SATU = MAKE_MENURANGE( &MF_Bluefont, 2, 0, 1000000, 33, 0, NULL );
678
static MenuRangeInt32_t MEO_JOYSTICKAXIS_SATU = MAKE_MENURANGE( &MF_Bluefont, 2, 0, 1000000, 33, 0, NULL );
677
static MenuEntry_t ME_JOYSTICKAXIS_SATU = MAKE_MENUENTRY( &MF_Redfont, "Saturation", RangeInt32, &MEO_JOYSTICKAXIS_SATU );
679
static MenuEntry_t ME_JOYSTICKAXIS_SATU = MAKE_MENUENTRY( &MF_Redfont, "Saturation", RangeInt32, &MEO_JOYSTICKAXIS_SATU );
678
680
679
static MenuOption_t MEO_JOYSTICKAXIS_DIGITALNEGATIVE = MAKE_MENUOPTION( &MF_Minifont, &MEOS_Gamefuncs, NULL );
681
static MenuOption_t MEO_JOYSTICKAXIS_DIGITALNEGATIVE = MAKE_MENUOPTION( &MF_Minifont, &MEOS_Gamefuncs, NULL );
680
static MenuEntry_t ME_JOYSTICKAXIS_DIGITALNEGATIVE = MAKE_MENUENTRY( &MF_BluefontRed, "Digital -", Option, &MEO_JOYSTICKAXIS_DIGITALNEGATIVE );
682
static MenuEntry_t ME_JOYSTICKAXIS_DIGITALNEGATIVE = MAKE_MENUENTRY( &MF_BluefontRed, "Digital -", Option, &MEO_JOYSTICKAXIS_DIGITALNEGATIVE );
681
static MenuOption_t MEO_JOYSTICKAXIS_DIGITALPOSITIVE = MAKE_MENUOPTION( &MF_Minifont, &MEOS_Gamefuncs, NULL );
683
static MenuOption_t MEO_JOYSTICKAXIS_DIGITALPOSITIVE = MAKE_MENUOPTION( &MF_Minifont, &MEOS_Gamefuncs, NULL );
682
static MenuEntry_t ME_JOYSTICKAXIS_DIGITALPOSITIVE = MAKE_MENUENTRY( &MF_BluefontRed, "Digital +", Option, &MEO_JOYSTICKAXIS_DIGITALPOSITIVE );
684
static MenuEntry_t ME_JOYSTICKAXIS_DIGITALPOSITIVE = MAKE_MENUENTRY( &MF_BluefontRed, "Digital +", Option, &MEO_JOYSTICKAXIS_DIGITALPOSITIVE );
683
685
684
static MenuEntry_t *MEL_JOYSTICKAXIS[] = {
686
static MenuEntry_t *MEL_JOYSTICKAXIS[] = {
685
    &ME_JOYSTICKAXIS_ANALOG,
687
    &ME_JOYSTICKAXIS_ANALOG,
686
    &ME_JOYSTICKAXIS_SCALE,
688
    &ME_JOYSTICKAXIS_SCALE,
687
    &ME_JOYSTICKAXIS_DEAD,
689
    &ME_JOYSTICKAXIS_DEAD,
688
    &ME_JOYSTICKAXIS_SATU,
690
    &ME_JOYSTICKAXIS_SATU,
689
};
691
};
690
692
691
static MenuEntry_t *MEL_JOYSTICKAXIS_DIGITAL[] = {
693
static MenuEntry_t *MEL_JOYSTICKAXIS_DIGITAL[] = {
692
    &ME_JOYSTICKAXIS_DIGITALNEGATIVE,
694
    &ME_JOYSTICKAXIS_DIGITALNEGATIVE,
693
    &ME_JOYSTICKAXIS_DIGITALPOSITIVE,
695
    &ME_JOYSTICKAXIS_DIGITALPOSITIVE,
694
};
696
};
695
697
696
#ifdef USE_OPENGL
698
#ifdef USE_OPENGL
697
static MenuOption_t MEO_RENDERERSETUP_HIGHTILE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &usehightile );
699
static MenuOption_t MEO_RENDERERSETUP_HIGHTILE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &usehightile );
698
static MenuEntry_t ME_RENDERERSETUP_HIGHTILE = MAKE_MENUENTRY( &MF_BluefontRed, "Hires textures:", Option, &MEO_RENDERERSETUP_HIGHTILE );
700
static MenuEntry_t ME_RENDERERSETUP_HIGHTILE = MAKE_MENUENTRY( &MF_BluefontRed, "Hires textures:", Option, &MEO_RENDERERSETUP_HIGHTILE );
699
static MenuRangeInt32_t MEO_RENDERERSETUP_TEXQUALITY = MAKE_MENURANGE( &MF_Bluefont, 0, 2, 0, 3, 0, &r_downsize );
701
static MenuRangeInt32_t MEO_RENDERERSETUP_TEXQUALITY = MAKE_MENURANGE( &MF_Bluefont, 0, 2, 0, 3, 0, &r_downsize );
700
static MenuEntry_t ME_RENDERERSETUP_TEXQUALITY = MAKE_MENUENTRY( &MF_BluefontRed, "Hires texture quality", RangeInt32, &MEO_RENDERERSETUP_TEXQUALITY );
702
static MenuEntry_t ME_RENDERERSETUP_TEXQUALITY = MAKE_MENUENTRY( &MF_BluefontRed, "Hires texture quality", RangeInt32, &MEO_RENDERERSETUP_TEXQUALITY );
701
static MenuOption_t MEO_RENDERERSETUP_PRECACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &ud.config.useprecache );
703
static MenuOption_t MEO_RENDERERSETUP_PRECACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &ud.config.useprecache );
702
static MenuEntry_t ME_RENDERERSETUP_PRECACHE = MAKE_MENUENTRY( &MF_BluefontRed, "Pre-load map textures", Option, &MEO_RENDERERSETUP_PRECACHE );
704
static MenuEntry_t ME_RENDERERSETUP_PRECACHE = MAKE_MENUENTRY( &MF_BluefontRed, "Pre-load map textures", Option, &MEO_RENDERERSETUP_PRECACHE );
703
static char *MEOSN_RENDERERSETUP_TEXCACHE[] = { "Off", "On", "Compress", };
705
static char *MEOSN_RENDERERSETUP_TEXCACHE[] = { "Off", "On", "Compress", };
704
static MenuOptionSet_t MEOS_RENDERERSETUP_TEXCACHE = MAKE_MENUOPTIONSET( 0x2, MEOSN_RENDERERSETUP_TEXCACHE, NULL );
706
static MenuOptionSet_t MEOS_RENDERERSETUP_TEXCACHE = MAKE_MENUOPTIONSET( 0x2, MEOSN_RENDERERSETUP_TEXCACHE, NULL );
705
static MenuOption_t MEO_RENDERERSETUP_TEXCACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_RENDERERSETUP_TEXCACHE, &glusetexcache );
707
static MenuOption_t MEO_RENDERERSETUP_TEXCACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_RENDERERSETUP_TEXCACHE, &glusetexcache );
706
static MenuEntry_t ME_RENDERERSETUP_TEXCACHE = MAKE_MENUENTRY( &MF_BluefontRed, "On disk texture cache", Option, &MEO_RENDERERSETUP_TEXCACHE );
708
static MenuEntry_t ME_RENDERERSETUP_TEXCACHE = MAKE_MENUENTRY( &MF_BluefontRed, "On disk texture cache", Option, &MEO_RENDERERSETUP_TEXCACHE );
707
static MenuOption_t MEO_RENDERERSETUP_DETAILTEX = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &r_detailmapping );
709
static MenuOption_t MEO_RENDERERSETUP_DETAILTEX = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &r_detailmapping );
708
static MenuEntry_t ME_RENDERERSETUP_DETAILTEX = MAKE_MENUENTRY( &MF_BluefontRed, "Detail textures:", Option, &MEO_RENDERERSETUP_DETAILTEX );
710
static MenuEntry_t ME_RENDERERSETUP_DETAILTEX = MAKE_MENUENTRY( &MF_BluefontRed, "Detail textures:", Option, &MEO_RENDERERSETUP_DETAILTEX );
709
static MenuOption_t MEO_RENDERERSETUP_MODELS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &usemodels );
711
static MenuOption_t MEO_RENDERERSETUP_MODELS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &usemodels );
710
static MenuEntry_t ME_RENDERERSETUP_MODELS = MAKE_MENUENTRY( &MF_BluefontRed, "Models:", Option, &MEO_RENDERERSETUP_MODELS );
712
static MenuEntry_t ME_RENDERERSETUP_MODELS = MAKE_MENUENTRY( &MF_BluefontRed, "Models:", Option, &MEO_RENDERERSETUP_MODELS );
711
#endif
713
#endif
712
714
713
#ifdef USE_OPENGL
715
#ifdef USE_OPENGL
714
static MenuEntry_t *MEL_RENDERERSETUP_GL2[] = {
716
static MenuEntry_t *MEL_RENDERERSETUP_GL2[] = {
715
    &ME_RENDERERSETUP_HIGHTILE,
717
    &ME_RENDERERSETUP_HIGHTILE,
716
    &ME_RENDERERSETUP_TEXQUALITY,
718
    &ME_RENDERERSETUP_TEXQUALITY,
717
    &ME_RENDERERSETUP_PRECACHE,
719
    &ME_RENDERERSETUP_PRECACHE,
718
    &ME_RENDERERSETUP_TEXCACHE,
720
    &ME_RENDERERSETUP_TEXCACHE,
719
    &ME_RENDERERSETUP_DETAILTEX,
721
    &ME_RENDERERSETUP_DETAILTEX,
720
};
722
};
721
static MenuEntry_t *MEL_RENDERERSETUP_GL3[] = {
723
static MenuEntry_t *MEL_RENDERERSETUP_GL3[] = {
722
    &ME_RENDERERSETUP_MODELS,
724
    &ME_RENDERERSETUP_MODELS,
723
};
725
};
724
#endif
726
#endif
725
727
726
#ifdef DROIDMENU
728
#ifdef DROIDMENU
727
static MenuRangeFloat_t MEO_COLCORR_GAMMA = MAKE_MENURANGE( &MF_Bluefont, 1.f, 1.f, 2.5f, 39.f, 0.f, &vid_gamma );
729
static MenuRangeFloat_t MEO_COLCORR_GAMMA = MAKE_MENURANGE( &MF_Bluefont, 1.f, 1.f, 2.5f, 39.f, 0.f, &vid_gamma );
728
#else
730
#else
729
static MenuRangeFloat_t MEO_COLCORR_GAMMA = MAKE_MENURANGE( &MF_Bluefont, 1.f, 0.2f, 4.f, 39.f, 0.f, &vid_gamma );
731
static MenuRangeFloat_t MEO_COLCORR_GAMMA = MAKE_MENURANGE( &MF_Bluefont, 1.f, 0.2f, 4.f, 39.f, 0.f, &vid_gamma );
730
#endif
732
#endif
731
static MenuEntry_t ME_COLCORR_GAMMA = MAKE_MENUENTRY( &MF_Redfont, "Gamma:", RangeFloat, &MEO_COLCORR_GAMMA );
733
static MenuEntry_t ME_COLCORR_GAMMA = MAKE_MENUENTRY( &MF_Redfont, "Gamma:", RangeFloat, &MEO_COLCORR_GAMMA );
732
static MenuRangeFloat_t MEO_COLCORR_CONTRAST = MAKE_MENURANGE( &MF_Bluefont, 1.f, 0.1f, 2.7f, 53.f, 0.f, &vid_contrast );
734
static MenuRangeFloat_t MEO_COLCORR_CONTRAST = MAKE_MENURANGE( &MF_Bluefont, 1.f, 0.1f, 2.7f, 53.f, 0.f, &vid_contrast );
733
static MenuEntry_t ME_COLCORR_CONTRAST = MAKE_MENUENTRY( &MF_Redfont, "Contrast:", RangeFloat, &MEO_COLCORR_CONTRAST );
735
static MenuEntry_t ME_COLCORR_CONTRAST = MAKE_MENUENTRY( &MF_Redfont, "Contrast:", RangeFloat, &MEO_COLCORR_CONTRAST );
734
static MenuRangeFloat_t MEO_COLCORR_BRIGHTNESS = MAKE_MENURANGE( &MF_Bluefont, 1.f, -0.8f, 0.8f, 33.f, 0.f, &vid_brightness );
736
static MenuRangeFloat_t MEO_COLCORR_BRIGHTNESS = MAKE_MENURANGE( &MF_Bluefont, 1.f, -0.8f, 0.8f, 33.f, 0.f, &vid_brightness );
735
static MenuEntry_t ME_COLCORR_BRIGHTNESS = MAKE_MENUENTRY( &MF_Redfont, "Brightness:", RangeFloat, &MEO_COLCORR_BRIGHTNESS );
737
static MenuEntry_t ME_COLCORR_BRIGHTNESS = MAKE_MENUENTRY( &MF_Redfont, "Brightness:", RangeFloat, &MEO_COLCORR_BRIGHTNESS );
736
static MenuEntry_t ME_COLCORR_RESET = MAKE_MENUENTRY( &MF_Redfont, "Reset To Defaults", Link, &MEO_NULL );
738
static MenuEntry_t ME_COLCORR_RESET = MAKE_MENUENTRY( &MF_Redfont, "Reset To Defaults", Link, &MEO_NULL );
737
static MenuRangeFloat_t MEO_COLCORR_AMBIENT = MAKE_MENURANGE(&MF_Bluefont, 1.f, 0.125f, 4.f, 32.f, 0.f, &r_ambientlight);
739
static MenuRangeFloat_t MEO_COLCORR_AMBIENT = MAKE_MENURANGE(&MF_Bluefont, 1.f, 0.125f, 4.f, 32.f, 0.f, &r_ambientlight);
738
static MenuEntry_t ME_COLCORR_AMBIENT = MAKE_MENUENTRY(&MF_Redfont, "Visibility:", RangeFloat, &MEO_COLCORR_AMBIENT);
740
static MenuEntry_t ME_COLCORR_AMBIENT = MAKE_MENUENTRY(&MF_Redfont, "Visibility:", RangeFloat, &MEO_COLCORR_AMBIENT);
739
741
740
static MenuEntry_t *MEL_COLCORR[] = {
742
static MenuEntry_t *MEL_COLCORR[] = {
741
    &ME_COLCORR_GAMMA,
743
    &ME_COLCORR_GAMMA,
742
#ifndef DROIDMENU
744
#ifndef DROIDMENU
743
    &ME_COLCORR_CONTRAST,
745
    &ME_COLCORR_CONTRAST,
744
    &ME_COLCORR_BRIGHTNESS,
746
    &ME_COLCORR_BRIGHTNESS,
745
#endif
747
#endif
746
        &ME_COLCORR_AMBIENT,
748
        &ME_COLCORR_AMBIENT,
747
};
749
};
748
750
749
static MenuEntry_t *MEL_COLCORR_RESET[] = {
751
static MenuEntry_t *MEL_COLCORR_RESET[] = {
750
    &ME_COLCORR_RESET,
752
    &ME_COLCORR_RESET,
751
};
753
};
752
754
753
static MenuEntry_t *MEL_SCREENSETUP1[] = {
755
static MenuEntry_t *MEL_SCREENSETUP1[] = {
754
        &ME_SCREENSETUP_SCREENSIZE,
756
        &ME_SCREENSETUP_SCREENSIZE,
755
};
757
};
756
758
757
static MenuEntry_t *MEL_SCREENSETUP2[] = {
759
static MenuEntry_t *MEL_SCREENSETUP2[] = {
758
        &ME_SCREENSETUP_NEWSTATUSBAR,
760
        &ME_SCREENSETUP_NEWSTATUSBAR,
759
        &ME_SCREENSETUP_SBARSIZE,
761
        &ME_SCREENSETUP_SBARSIZE,
760
};
762
};
761
763
762
static MenuEntry_t *MEL_SCREENSETUP3[] = {
764
static MenuEntry_t *MEL_SCREENSETUP3[] = {
763
        &ME_SCREENSETUP_CROSSHAIR,
765
        &ME_SCREENSETUP_CROSSHAIR,
764
        &ME_SCREENSETUP_CROSSHAIRSIZE,
766
        &ME_SCREENSETUP_CROSSHAIRSIZE,
765
};
767
};
766
768
767
static MenuEntry_t *MEL_SCREENSETUP4[] = {
769
static MenuEntry_t *MEL_SCREENSETUP4[] = {
768
        &ME_SCREENSETUP_LEVELSTATS,
770
        &ME_SCREENSETUP_LEVELSTATS,
769
        &ME_SCREENSETUP_TEXTSIZE,
771
        &ME_SCREENSETUP_TEXTSIZE,
770
};
772
};
771
773
772
static MenuEntry_t *MEL_SCREENSETUP5[] = {
774
static MenuEntry_t *MEL_SCREENSETUP5[] = {
773
        &ME_SCREENSETUP_SHOWPICKUPMESSAGES,
775
        &ME_SCREENSETUP_SHOWPICKUPMESSAGES,
774
};
776
};
775
777
776
// Save and load will be filled in before every viewing of the save/load screen.
778
// Save and load will be filled in before every viewing of the save/load screen.
777
static MenuLink_t MEO_LOAD = { MENU_NULL, };
779
static MenuLink_t MEO_LOAD = { MENU_NULL, };
778
static MenuLink_t MEO_LOAD_VALID = { MENU_LOADVERIFY, };
780
static MenuLink_t MEO_LOAD_VALID = { MENU_LOADVERIFY, };
779
static MenuEntry_t ME_LOAD_TEMPLATE = MAKE_MENUENTRY( &MF_MinifontRed, NULL, Link, &MEO_LOAD );
781
static MenuEntry_t ME_LOAD_TEMPLATE = MAKE_MENUENTRY( &MF_MinifontRed, NULL, Link, &MEO_LOAD );
780
static MenuEntry_t ME_LOAD[MAXSAVEGAMES];
782
static MenuEntry_t ME_LOAD[MAXSAVEGAMES];
781
static MenuEntry_t *MEL_LOAD[MAXSAVEGAMES];
783
static MenuEntry_t *MEL_LOAD[MAXSAVEGAMES];
782
784
783
static MenuString_t MEO_SAVE_TEMPLATE = MAKE_MENUSTRING( &MF_MinifontRed, NULL, MAXSAVEGAMENAME, 0 );
785
static MenuString_t MEO_SAVE_TEMPLATE = MAKE_MENUSTRING( &MF_MinifontRed, NULL, MAXSAVEGAMENAME, 0 );
784
static MenuString_t MEO_SAVE[MAXSAVEGAMES];
786
static MenuString_t MEO_SAVE[MAXSAVEGAMES];
785
static MenuEntry_t ME_SAVE_TEMPLATE = MAKE_MENUENTRY( &MF_MinifontRed, NULL, String, &MEO_SAVE_TEMPLATE );
787
static MenuEntry_t ME_SAVE_TEMPLATE = MAKE_MENUENTRY( &MF_MinifontRed, NULL, String, &MEO_SAVE_TEMPLATE );
786
static MenuEntry_t ME_SAVE[MAXSAVEGAMES];
788
static MenuEntry_t ME_SAVE[MAXSAVEGAMES];
787
static MenuEntry_t *MEL_SAVE[MAXSAVEGAMES];
789
static MenuEntry_t *MEL_SAVE[MAXSAVEGAMES];
788
790
789
static int32_t soundrate, soundbits, soundvoices;
791
static int32_t soundrate, soundbits, soundvoices;
790
static MenuOption_t MEO_SOUND = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_OffOn, &ud.config.SoundToggle );
792
static MenuOption_t MEO_SOUND = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_OffOn, &ud.config.SoundToggle );
791
static MenuEntry_t ME_SOUND = MAKE_MENUENTRY( &MF_Redfont, "Sound:", Option, &MEO_SOUND );
793
static MenuEntry_t ME_SOUND = MAKE_MENUENTRY( &MF_Redfont, "Sound:", Option, &MEO_SOUND );
792
794
793
static MenuOption_t MEO_SOUND_MUSIC = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_OffOn, &ud.config.MusicToggle );
795
static MenuOption_t MEO_SOUND_MUSIC = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_OffOn, &ud.config.MusicToggle );
794
static MenuEntry_t ME_SOUND_MUSIC = MAKE_MENUENTRY( &MF_Redfont, "Music:", Option, &MEO_SOUND_MUSIC );
796
static MenuEntry_t ME_SOUND_MUSIC = MAKE_MENUENTRY( &MF_Redfont, "Music:", Option, &MEO_SOUND_MUSIC );
795
797
796
static MenuRangeInt32_t MEO_SOUND_VOLUME_MASTER = MAKE_MENURANGE( &MF_RedfontRt, 2, 0, 255, 33, 0, &ud.config.MasterVolume );
798
static MenuRangeInt32_t MEO_SOUND_VOLUME_MASTER = MAKE_MENURANGE( &MF_RedfontRt, 2, 0, 255, 33, 0, &ud.config.MasterVolume );
797
static MenuEntry_t ME_SOUND_VOLUME_MASTER = MAKE_MENUENTRY( &MF_Redfont, "Volume:", RangeInt32, &MEO_SOUND_VOLUME_MASTER );
799
static MenuEntry_t ME_SOUND_VOLUME_MASTER = MAKE_MENUENTRY( &MF_Redfont, "Volume:", RangeInt32, &MEO_SOUND_VOLUME_MASTER );
798
800
799
static MenuRangeInt32_t MEO_SOUND_VOLUME_EFFECTS = MAKE_MENURANGE( &MF_RedfontRt, 2, 0, 255, 33, 0, &ud.config.FXVolume );
801
static MenuRangeInt32_t MEO_SOUND_VOLUME_EFFECTS = MAKE_MENURANGE( &MF_RedfontRt, 2, 0, 255, 33, 0, &ud.config.FXVolume );
800
static MenuEntry_t ME_SOUND_VOLUME_EFFECTS = MAKE_MENUENTRY( &MF_Redfont, "Effects:", RangeInt32, &MEO_SOUND_VOLUME_EFFECTS );
802
static MenuEntry_t ME_SOUND_VOLUME_EFFECTS = MAKE_MENUENTRY( &MF_Redfont, "Effects:", RangeInt32, &MEO_SOUND_VOLUME_EFFECTS );
801
803
802
static MenuRangeInt32_t MEO_SOUND_VOLUME_MUSIC = MAKE_MENURANGE( &MF_RedfontRt, 2, 0, 255, 33, 0, &ud.config.MusicVolume );
804
static MenuRangeInt32_t MEO_SOUND_VOLUME_MUSIC = MAKE_MENURANGE( &MF_RedfontRt, 2, 0, 255, 33, 0, &ud.config.MusicVolume );
803
static MenuEntry_t ME_SOUND_VOLUME_MUSIC = MAKE_MENUENTRY( &MF_Redfont, "Music:", RangeInt32, &MEO_SOUND_VOLUME_MUSIC );
805
static MenuEntry_t ME_SOUND_VOLUME_MUSIC = MAKE_MENUENTRY( &MF_Redfont, "Music:", RangeInt32, &MEO_SOUND_VOLUME_MUSIC );
804
806
805
static MenuOption_t MEO_SOUND_DUKETALK = MAKE_MENUOPTION(&MF_RedfontRt, &MEOS_NoYes, NULL);
807
static MenuOption_t MEO_SOUND_DUKETALK = MAKE_MENUOPTION(&MF_RedfontRt, &MEOS_NoYes, NULL);
806
static MenuEntry_t ME_SOUND_DUKETALK = MAKE_MENUENTRY(&MF_Redfont, "Duke talk:", Option, &MEO_SOUND_DUKETALK);
808
static MenuEntry_t ME_SOUND_DUKETALK = MAKE_MENUENTRY(&MF_Redfont, "Duke talk:", Option, &MEO_SOUND_DUKETALK);
807
809
808
static char *MEOSN_SOUND_SAMPLINGRATE[] = { "22050Hz", "44100Hz", "48000Hz", };
810
static char *MEOSN_SOUND_SAMPLINGRATE[] = { "22050Hz", "44100Hz", "48000Hz", };
809
static int32_t MEOSV_SOUND_SAMPLINGRATE[] = { 22050, 44100, 48000, };
811
static int32_t MEOSV_SOUND_SAMPLINGRATE[] = { 22050, 44100, 48000, };
810
static MenuOptionSet_t MEOS_SOUND_SAMPLINGRATE = MAKE_MENUOPTIONSET( 0x3, MEOSN_SOUND_SAMPLINGRATE, MEOSV_SOUND_SAMPLINGRATE );
812
static MenuOptionSet_t MEOS_SOUND_SAMPLINGRATE = MAKE_MENUOPTIONSET( 0x3, MEOSN_SOUND_SAMPLINGRATE, MEOSV_SOUND_SAMPLINGRATE );
811
static MenuOption_t MEO_SOUND_SAMPLINGRATE = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_SOUND_SAMPLINGRATE, &soundrate );
813
static MenuOption_t MEO_SOUND_SAMPLINGRATE = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_SOUND_SAMPLINGRATE, &soundrate );
812
static MenuEntry_t ME_SOUND_SAMPLINGRATE = MAKE_MENUENTRY( &MF_Redfont, "Sample rate:", Option, &MEO_SOUND_SAMPLINGRATE );
814
static MenuEntry_t ME_SOUND_SAMPLINGRATE = MAKE_MENUENTRY( &MF_Redfont, "Sample rate:", Option, &MEO_SOUND_SAMPLINGRATE );
813
815
814
static char *MEOSN_SOUND_SAMPLESIZE[] = { "8-bit", "16-bit", };
816
static char *MEOSN_SOUND_SAMPLESIZE[] = { "8-bit", "16-bit", };
815
static int32_t MEOSV_SOUND_SAMPLESIZE[] = { 8, 16, };
817
static int32_t MEOSV_SOUND_SAMPLESIZE[] = { 8, 16, };
816
static MenuOptionSet_t MEOS_SOUND_SAMPLESIZE = MAKE_MENUOPTIONSET( 0x3, MEOSN_SOUND_SAMPLESIZE, MEOSV_SOUND_SAMPLESIZE );
818
static MenuOptionSet_t MEOS_SOUND_SAMPLESIZE = MAKE_MENUOPTIONSET( 0x3, MEOSN_SOUND_SAMPLESIZE, MEOSV_SOUND_SAMPLESIZE );
817
static MenuOption_t MEO_SOUND_SAMPLESIZE = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_SOUND_SAMPLESIZE, &soundbits );
819
static MenuOption_t MEO_SOUND_SAMPLESIZE = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_SOUND_SAMPLESIZE, &soundbits );
818
static MenuEntry_t ME_SOUND_SAMPLESIZE = MAKE_MENUENTRY( &MF_Redfont, "Sample size:", Option, &MEO_SOUND_SAMPLESIZE );
820
static MenuEntry_t ME_SOUND_SAMPLESIZE = MAKE_MENUENTRY( &MF_Redfont, "Sample size:", Option, &MEO_SOUND_SAMPLESIZE );
819
821
820
static MenuRangeInt32_t MEO_SOUND_NUMVOICES = MAKE_MENURANGE( &MF_RedfontRt, 1, 16, 256, 16, 0, &soundvoices );
822
static MenuRangeInt32_t MEO_SOUND_NUMVOICES = MAKE_MENURANGE( &MF_RedfontRt, 1, 16, 256, 16, 0, &soundvoices );
821
static MenuEntry_t ME_SOUND_NUMVOICES = MAKE_MENUENTRY( &MF_Redfont, "Voices:", RangeInt32, &MEO_SOUND_NUMVOICES );
823
static MenuEntry_t ME_SOUND_NUMVOICES = MAKE_MENUENTRY( &MF_Redfont, "Voices:", RangeInt32, &MEO_SOUND_NUMVOICES );
822
824
823
static MenuEntry_t ME_SOUND_RESTART = MAKE_MENUENTRY( &MF_Redfont, "Restart sound system", Link, &MEO_NULL );
825
static MenuEntry_t ME_SOUND_RESTART = MAKE_MENUENTRY( &MF_Redfont, "Restart sound system", Link, &MEO_NULL );
824
826
825
static MenuLink_t MEO_ADVSOUND = { MENU_ADVSOUND, };
827
static MenuLink_t MEO_ADVSOUND = { MENU_ADVSOUND, };
826
#ifndef DROIDMENU
828
#ifndef DROIDMENU
827
static MenuEntry_t ME_SOUND_ADVSOUND = MAKE_MENUENTRY( &MF_Redfont, "Advanced", Link, &MEO_ADVSOUND );
829
static MenuEntry_t ME_SOUND_ADVSOUND = MAKE_MENUENTRY( &MF_Redfont, "Advanced", Link, &MEO_ADVSOUND );
828
#endif
830
#endif
829
831
830
static MenuEntry_t *MEL_SOUND1[] = {
832
static MenuEntry_t *MEL_SOUND1[] = {
831
    &ME_SOUND,
833
    &ME_SOUND,
832
    &ME_SOUND_MUSIC,
834
    &ME_SOUND_MUSIC,
833
};
835
};
834
static MenuEntry_t *MEL_SOUND2[] = {
836
static MenuEntry_t *MEL_SOUND2[] = {
835
        &ME_SOUND_VOLUME_MASTER,
837
        &ME_SOUND_VOLUME_MASTER,
836
        &ME_SOUND_VOLUME_EFFECTS,
838
        &ME_SOUND_VOLUME_EFFECTS,
837
        &ME_SOUND_VOLUME_MUSIC,
839
        &ME_SOUND_VOLUME_MUSIC,
838
};
840
};
839
static MenuEntry_t *MEL_SOUND3[] = {
841
static MenuEntry_t *MEL_SOUND3[] = {
840
    &ME_SOUND_DUKETALK,
842
    &ME_SOUND_DUKETALK,
841
#ifndef DROIDMENU
843
#ifndef DROIDMENU
842
        &ME_SOUND_ADVSOUND,
844
        &ME_SOUND_ADVSOUND,
843
#endif
845
#endif
844
};
846
};
845
847
846
static MenuEntry_t *MEL_ADVSOUND1[] = {
848
static MenuEntry_t *MEL_ADVSOUND1[] = {
847
        &ME_SOUND_SAMPLINGRATE,
849
        &ME_SOUND_SAMPLINGRATE,
848
        &ME_SOUND_SAMPLESIZE,
850
        &ME_SOUND_SAMPLESIZE,
849
};
851
};
850
852
851
static MenuEntry_t *MEL_ADVSOUND2[] = {
853
static MenuEntry_t *MEL_ADVSOUND2[] = {
852
        &ME_SOUND_NUMVOICES,
854
        &ME_SOUND_NUMVOICES,
853
};
855
};
854
856
855
static MenuEntry_t *MEL_ADVSOUND3[] = {
857
static MenuEntry_t *MEL_ADVSOUND3[] = {
856
        &ME_SOUND_RESTART,
858
        &ME_SOUND_RESTART,
857
};
859
};
858
860
859
MAKE_MENU_TOP_ENTRYLINK( NETWORK_PLAYERSETUP, MENU_PLAYER, "Player Setup" );
861
MAKE_MENU_TOP_ENTRYLINK( NETWORK_PLAYERSETUP, MENU_PLAYER, "Player Setup" );
860
MAKE_MENU_TOP_ENTRYLINK( NETWORK_JOINGAME, MENU_NETJOIN, "Join Game" );
862
MAKE_MENU_TOP_ENTRYLINK( NETWORK_JOINGAME, MENU_NETJOIN, "Join Game" );
861
MAKE_MENU_TOP_ENTRYLINK( NETWORK_HOSTGAME, MENU_NETHOST, "Host Game" );
863
MAKE_MENU_TOP_ENTRYLINK( NETWORK_HOSTGAME, MENU_NETHOST, "Host Game" );
862
864
863
static MenuEntry_t *MEL_NETWORK[] = {
865
static MenuEntry_t *MEL_NETWORK[] = {
864
    &ME_NETWORK_PLAYERSETUP,
866
    &ME_NETWORK_PLAYERSETUP,
865
    &ME_NETWORK_JOINGAME,
867
    &ME_NETWORK_JOINGAME,
866
    &ME_NETWORK_HOSTGAME,
868
    &ME_NETWORK_HOSTGAME,
867
};
869
};
868
870
869
static MenuString_t MEO_PLAYER_NAME = MAKE_MENUSTRING( &MF_Bluefont, szPlayerName, MAXPLAYERNAME, 0 );
871
static MenuString_t MEO_PLAYER_NAME = MAKE_MENUSTRING( &MF_Bluefont, szPlayerName, MAXPLAYERNAME, 0 );
870
static MenuEntry_t ME_PLAYER_NAME = MAKE_MENUENTRY( &MF_BluefontRed, "Name", String, &MEO_PLAYER_NAME );
872
static MenuEntry_t ME_PLAYER_NAME = MAKE_MENUENTRY( &MF_BluefontRed, "Name", String, &MEO_PLAYER_NAME );
871
static char *MEOSN_PLAYER_COLOR[] = { "Auto", "Blue", "Red", "Green", "Gray", "Dark gray", "Dark green", "Brown", "Dark blue", "Bright red", "Yellow", };
873
static char *MEOSN_PLAYER_COLOR[] = { "Auto", "Blue", "Red", "Green", "Gray", "Dark gray", "Dark green", "Brown", "Dark blue", "Bright red", "Yellow", };
872
static int32_t MEOSV_PLAYER_COLOR[] = { 0, 9, 10, 11, 12, 13, 14, 15, 16, 22, 23, };
874
static int32_t MEOSV_PLAYER_COLOR[] = { 0, 9, 10, 11, 12, 13, 14, 15, 16, 22, 23, };
873
static MenuOptionSet_t MEOS_PLAYER_COLOR = MAKE_MENUOPTIONSET( 0x2, MEOSN_PLAYER_COLOR, MEOSV_PLAYER_COLOR );
875
static MenuOptionSet_t MEOS_PLAYER_COLOR = MAKE_MENUOPTIONSET( 0x2, MEOSN_PLAYER_COLOR, MEOSV_PLAYER_COLOR );
874
static MenuOption_t MEO_PLAYER_COLOR = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_PLAYER_COLOR, &ud.color );
876
static MenuOption_t MEO_PLAYER_COLOR = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_PLAYER_COLOR, &ud.color );
875
static MenuEntry_t ME_PLAYER_COLOR = MAKE_MENUENTRY( &MF_BluefontRed, "Color", Option, &MEO_PLAYER_COLOR );
877
static MenuEntry_t ME_PLAYER_COLOR = MAKE_MENUENTRY( &MF_BluefontRed, "Color", Option, &MEO_PLAYER_COLOR );
876
static char *MEOSN_PLAYER_TEAM[] = { "Blue", "Red", "Green", "Gray", };
878
static char *MEOSN_PLAYER_TEAM[] = { "Blue", "Red", "Green", "Gray", };
877
static MenuOptionSet_t MEOS_PLAYER_TEAM = MAKE_MENUOPTIONSET( 0x2, MEOSN_PLAYER_TEAM, NULL );
879
static MenuOptionSet_t MEOS_PLAYER_TEAM = MAKE_MENUOPTIONSET( 0x2, MEOSN_PLAYER_TEAM, NULL );
878
static MenuOption_t MEO_PLAYER_TEAM = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_PLAYER_TEAM, &ud.team );
880
static MenuOption_t MEO_PLAYER_TEAM = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_PLAYER_TEAM, &ud.team );
879
static MenuEntry_t ME_PLAYER_TEAM = MAKE_MENUENTRY( &MF_BluefontRed, "Team", Option, &MEO_PLAYER_TEAM );
881
static MenuEntry_t ME_PLAYER_TEAM = MAKE_MENUENTRY( &MF_BluefontRed, "Team", Option, &MEO_PLAYER_TEAM );
880
static MenuLink_t MEO_PLAYER_MACROS = { MENU_MACROS, };
882
static MenuLink_t MEO_PLAYER_MACROS = { MENU_MACROS, };
881
static MenuEntry_t ME_PLAYER_MACROS = MAKE_MENUENTRY( &MF_BluefontRed, "Multiplayer macros", Link, &MEO_PLAYER_MACROS );
883
static MenuEntry_t ME_PLAYER_MACROS = MAKE_MENUENTRY( &MF_BluefontRed, "Multiplayer macros", Link, &MEO_PLAYER_MACROS );
882
884
883
static MenuEntry_t *MEL_PLAYER_NAME[] = {
885
static MenuEntry_t *MEL_PLAYER_NAME[] = {
884
    &ME_PLAYER_NAME,
886
    &ME_PLAYER_NAME,
885
};
887
};
886
static MenuEntry_t *MEL_PLAYER_COLOR[] = {
888
static MenuEntry_t *MEL_PLAYER_COLOR[] = {
887
    &ME_PLAYER_COLOR,
889
    &ME_PLAYER_COLOR,
888
};
890
};
889
static MenuEntry_t *MEL_PLAYER_TEAM[] = {
891
static MenuEntry_t *MEL_PLAYER_TEAM[] = {
890
    &ME_PLAYER_TEAM,
892
    &ME_PLAYER_TEAM,
891
};
893
};
892
static MenuEntry_t *MEL_PLAYER_MACROS[] = {
894
static MenuEntry_t *MEL_PLAYER_MACROS[] = {
893
    &ME_PLAYER_MACROS,
895
    &ME_PLAYER_MACROS,
894
};
896
};
895
897
896
static MenuString_t MEO_MACROS_TEMPLATE = MAKE_MENUSTRING( &MF_Bluefont, NULL, MAXRIDECULELENGTH, 0 );
898
static MenuString_t MEO_MACROS_TEMPLATE = MAKE_MENUSTRING( &MF_Bluefont, NULL, MAXRIDECULELENGTH, 0 );
897
static MenuString_t MEO_MACROS[MAXSAVEGAMES];
899
static MenuString_t MEO_MACROS[MAXSAVEGAMES];
898
static MenuEntry_t ME_MACROS_TEMPLATE = MAKE_MENUENTRY( &MF_Bluefont, NULL, String, &MEO_MACROS_TEMPLATE );
900
static MenuEntry_t ME_MACROS_TEMPLATE = MAKE_MENUENTRY( &MF_Bluefont, NULL, String, &MEO_MACROS_TEMPLATE );
899
static MenuEntry_t ME_MACROS[MAXRIDECULE];
901
static MenuEntry_t ME_MACROS[MAXRIDECULE];
900
static MenuEntry_t *MEL_MACROS[MAXRIDECULE];
902
static MenuEntry_t *MEL_MACROS[MAXRIDECULE];
901
903
902
static char *MenuUserMap = "User Map";
904
static char *MenuUserMap = "User Map";
903
static char *MenuSkillNone = "None";
905
static char *MenuSkillNone = "None";
904
906
905
static char *MEOSN_NetGametypes[MAXGAMETYPES];
907
static char *MEOSN_NetGametypes[MAXGAMETYPES];
906
static char *MEOSN_NetEpisodes[MAXVOLUMES+1];
908
static char *MEOSN_NetEpisodes[MAXVOLUMES+1];
907
static char *MEOSN_NetLevels[MAXVOLUMES][MAXLEVELS];
909
static char *MEOSN_NetLevels[MAXVOLUMES][MAXLEVELS];
908
static char *MEOSN_NetSkills[MAXSKILLS+1];
910
static char *MEOSN_NetSkills[MAXSKILLS+1];
909
911
910
static MenuLink_t MEO_NETHOST_OPTIONS =  { MENU_NETOPTIONS, };
912
static MenuLink_t MEO_NETHOST_OPTIONS =  { MENU_NETOPTIONS, };
911
static MenuEntry_t ME_NETHOST_OPTIONS = MAKE_MENUENTRY( &MF_Redfont, "Game Options", Link, &MEO_NETHOST_OPTIONS );
913
static MenuEntry_t ME_NETHOST_OPTIONS = MAKE_MENUENTRY( &MF_Redfont, "Game Options", Link, &MEO_NETHOST_OPTIONS );
912
static MenuEntry_t ME_NETHOST_LAUNCH = MAKE_MENUENTRY( &MF_Redfont, "Launch Game", Link, &MEO_NULL );
914
static MenuEntry_t ME_NETHOST_LAUNCH = MAKE_MENUENTRY( &MF_Redfont, "Launch Game", Link, &MEO_NULL );
913
915
914
static MenuEntry_t *MEL_NETHOST[] = {
916
static MenuEntry_t *MEL_NETHOST[] = {
915
    &ME_NETHOST_OPTIONS,
917
    &ME_NETHOST_OPTIONS,
916
    &ME_NETHOST_LAUNCH,
918
    &ME_NETHOST_LAUNCH,
917
};
919
};
918
920
919
static MenuOptionSet_t MEOS_NETOPTIONS_GAMETYPE = MAKE_MENUOPTIONSET( 0x0, MEOSN_NetGametypes, NULL );
921
static MenuOptionSet_t MEOS_NETOPTIONS_GAMETYPE = MAKE_MENUOPTIONSET( 0x0, MEOSN_NetGametypes, NULL );
920
static MenuOption_t MEO_NETOPTIONS_GAMETYPE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NETOPTIONS_GAMETYPE, &ud.m_coop );
922
static MenuOption_t MEO_NETOPTIONS_GAMETYPE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NETOPTIONS_GAMETYPE, &ud.m_coop );
921
static MenuEntry_t ME_NETOPTIONS_GAMETYPE = MAKE_MENUENTRY( &MF_Redfont, "Game Type", Option, &MEO_NETOPTIONS_GAMETYPE );
923
static MenuEntry_t ME_NETOPTIONS_GAMETYPE = MAKE_MENUENTRY( &MF_Redfont, "Game Type", Option, &MEO_NETOPTIONS_GAMETYPE );
922
static MenuOptionSet_t MEOS_NETOPTIONS_EPISODE = MAKE_MENUOPTIONSET( 0x0, MEOSN_NetEpisodes, NULL );
924
static MenuOptionSet_t MEOS_NETOPTIONS_EPISODE = MAKE_MENUOPTIONSET( 0x0, MEOSN_NetEpisodes, NULL );
923
static MenuOption_t MEO_NETOPTIONS_EPISODE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NETOPTIONS_EPISODE, NULL );
925
static MenuOption_t MEO_NETOPTIONS_EPISODE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NETOPTIONS_EPISODE, NULL );
924
static MenuEntry_t ME_NETOPTIONS_EPISODE = MAKE_MENUENTRY( &MF_Redfont, "Episode", Option, &MEO_NETOPTIONS_EPISODE );
926
static MenuEntry_t ME_NETOPTIONS_EPISODE = MAKE_MENUENTRY( &MF_Redfont, "Episode", Option, &MEO_NETOPTIONS_EPISODE );
925
static MenuOptionSet_t MEOS_NETOPTIONS_LEVEL[MAXVOLUMES];
927
static MenuOptionSet_t MEOS_NETOPTIONS_LEVEL[MAXVOLUMES];
926
static MenuOption_t MEO_NETOPTIONS_LEVEL = MAKE_MENUOPTION( &MF_Bluefont, NULL, &ud.m_level_number );
928
static MenuOption_t MEO_NETOPTIONS_LEVEL = MAKE_MENUOPTION( &MF_Bluefont, NULL, &ud.m_level_number );
927
static MenuEntry_t ME_NETOPTIONS_LEVEL = MAKE_MENUENTRY( &MF_Redfont, "Level", Option, &MEO_NETOPTIONS_LEVEL );
929
static MenuEntry_t ME_NETOPTIONS_LEVEL = MAKE_MENUENTRY( &MF_Redfont, "Level", Option, &MEO_NETOPTIONS_LEVEL );
928
static MenuLink_t MEO_NETOPTIONS_USERMAP =  { MENU_NETUSERMAP, };
930
static MenuLink_t MEO_NETOPTIONS_USERMAP =  { MENU_NETUSERMAP, };
929
static MenuEntry_t ME_NETOPTIONS_USERMAP = MAKE_MENUENTRY( &MF_Redfont, "User Map", Link, &MEO_NETOPTIONS_USERMAP );
931
static MenuEntry_t ME_NETOPTIONS_USERMAP = MAKE_MENUENTRY( &MF_Redfont, "User Map", Link, &MEO_NETOPTIONS_USERMAP );
930
static MenuOptionSet_t MEOS_NETOPTIONS_MONSTERS = MAKE_MENUOPTIONSET( 0x0, MEOSN_NetSkills, NULL );
932
static MenuOptionSet_t MEOS_NETOPTIONS_MONSTERS = MAKE_MENUOPTIONSET( 0x0, MEOSN_NetSkills, NULL );
931
static MenuOption_t MEO_NETOPTIONS_MONSTERS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NETOPTIONS_MONSTERS, NULL );
933
static MenuOption_t MEO_NETOPTIONS_MONSTERS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NETOPTIONS_MONSTERS, NULL );
932
static MenuEntry_t ME_NETOPTIONS_MONSTERS = MAKE_MENUENTRY( &MF_Redfont, "Monsters", Option, &MEO_NETOPTIONS_MONSTERS );
934
static MenuEntry_t ME_NETOPTIONS_MONSTERS = MAKE_MENUENTRY( &MF_Redfont, "Monsters", Option, &MEO_NETOPTIONS_MONSTERS );
933
static MenuOption_t MEO_NETOPTIONS_MARKERS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &ud.m_marker );
935
static MenuOption_t MEO_NETOPTIONS_MARKERS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &ud.m_marker );
934
static MenuEntry_t ME_NETOPTIONS_MARKERS = MAKE_MENUENTRY( &MF_Redfont, "Markers", Option, &MEO_NETOPTIONS_MARKERS );
936
static MenuEntry_t ME_NETOPTIONS_MARKERS = MAKE_MENUENTRY( &MF_Redfont, "Markers", Option, &MEO_NETOPTIONS_MARKERS );
935
static MenuEntry_t ME_NETOPTIONS_MARKERS_DISABLED = MAKE_MENUENTRY( &MF_RedfontBlue, "Markers", Dummy, NULL );
937
static MenuEntry_t ME_NETOPTIONS_MARKERS_DISABLED = MAKE_MENUENTRY( &MF_RedfontBlue, "Markers", Dummy, NULL );
936
static MenuOption_t MEO_NETOPTIONS_MAPEXITS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OnOff, &ud.m_noexits );
938
static MenuOption_t MEO_NETOPTIONS_MAPEXITS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OnOff, &ud.m_noexits );
937
static MenuEntry_t ME_NETOPTIONS_MAPEXITS = MAKE_MENUENTRY( &MF_Redfont, "Map Exits", Option, &MEO_NETOPTIONS_MAPEXITS );
939
static MenuEntry_t ME_NETOPTIONS_MAPEXITS = MAKE_MENUENTRY( &MF_Redfont, "Map Exits", Option, &MEO_NETOPTIONS_MAPEXITS );
938
static MenuOption_t MEO_NETOPTIONS_FRFIRE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &ud.m_ffire );
940
static MenuOption_t MEO_NETOPTIONS_FRFIRE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &ud.m_ffire );
939
static MenuEntry_t ME_NETOPTIONS_FRFIRE = MAKE_MENUENTRY( &MF_Redfont, "Fr. Fire", Option, &MEO_NETOPTIONS_FRFIRE );
941
static MenuEntry_t ME_NETOPTIONS_FRFIRE = MAKE_MENUENTRY( &MF_Redfont, "Fr. Fire", Option, &MEO_NETOPTIONS_FRFIRE );
940
static MenuEntry_t ME_NETOPTIONS_ACCEPT = MAKE_MENUENTRY( &MF_RedfontGreen, "Accept", Link, &MEO_NULL );
942
static MenuEntry_t ME_NETOPTIONS_ACCEPT = MAKE_MENUENTRY( &MF_RedfontGreen, "Accept", Link, &MEO_NULL );
941
943
942
static MenuEntry_t *MEL_NETOPTIONS[] = {
944
static MenuEntry_t *MEL_NETOPTIONS[] = {
943
    &ME_NETOPTIONS_GAMETYPE,
945
    &ME_NETOPTIONS_GAMETYPE,
944
    &ME_NETOPTIONS_EPISODE,
946
    &ME_NETOPTIONS_EPISODE,
945
    &ME_NETOPTIONS_LEVEL,
947
    &ME_NETOPTIONS_LEVEL,
946
    &ME_NETOPTIONS_MONSTERS,
948
    &ME_NETOPTIONS_MONSTERS,
947
    &ME_NETOPTIONS_MARKERS,
949
    &ME_NETOPTIONS_MARKERS,
948
    &ME_NETOPTIONS_MAPEXITS,
950
    &ME_NETOPTIONS_MAPEXITS,
949
    &ME_NETOPTIONS_ACCEPT,
951
    &ME_NETOPTIONS_ACCEPT,
950
};
952
};
951
953
952
static char MenuServer[BMAX_PATH] = "localhost";
954
static char MenuServer[BMAX_PATH] = "localhost";
953
static MenuString_t MEO_NETJOIN_SERVER = MAKE_MENUSTRING( &MF_Bluefont, MenuServer, BMAX_PATH, 0 );
955
static MenuString_t MEO_NETJOIN_SERVER = MAKE_MENUSTRING( &MF_Bluefont, MenuServer, BMAX_PATH, 0 );
954
static MenuEntry_t ME_NETJOIN_SERVER = MAKE_MENUENTRY( &MF_Redfont, "Server", String, &MEO_NETJOIN_SERVER );
956
static MenuEntry_t ME_NETJOIN_SERVER = MAKE_MENUENTRY( &MF_Redfont, "Server", String, &MEO_NETJOIN_SERVER );
955
#define MAXPORTSTRINGLENGTH 6 // unsigned 16-bit integer
957
#define MAXPORTSTRINGLENGTH 6 // unsigned 16-bit integer
956
static char MenuPort[MAXPORTSTRINGLENGTH] = "19014";
958
static char MenuPort[MAXPORTSTRINGLENGTH] = "19014";
957
static MenuString_t MEO_NETJOIN_PORT = MAKE_MENUSTRING( &MF_Bluefont, MenuPort, MAXPORTSTRINGLENGTH, INPUT_NUMERIC );
959
static MenuString_t MEO_NETJOIN_PORT = MAKE_MENUSTRING( &MF_Bluefont, MenuPort, MAXPORTSTRINGLENGTH, INPUT_NUMERIC );
958
static MenuEntry_t ME_NETJOIN_PORT = MAKE_MENUENTRY( &MF_Redfont, "Port", String, &MEO_NETJOIN_PORT );
960
static MenuEntry_t ME_NETJOIN_PORT = MAKE_MENUENTRY( &MF_Redfont, "Port", String, &MEO_NETJOIN_PORT );
959
static MenuEntry_t ME_NETJOIN_CONNECT = MAKE_MENUENTRY( &MF_RedfontGreen, "Connect", Link, &MEO_NULL );
961
static MenuEntry_t ME_NETJOIN_CONNECT = MAKE_MENUENTRY( &MF_RedfontGreen, "Connect", Link, &MEO_NULL );
960
962
961
static MenuEntry_t *MEL_NETJOIN[] = {
963
static MenuEntry_t *MEL_NETJOIN[] = {
962
    &ME_NETJOIN_SERVER,
964
    &ME_NETJOIN_SERVER,
963
    &ME_NETJOIN_PORT,
965
    &ME_NETJOIN_PORT,
964
    &ME_NETJOIN_CONNECT,
966
    &ME_NETJOIN_CONNECT,
965
};
967
};
966
968
967
969
968
#define MAKE_MENUGROUP(Entries, ...) { Entries, ARRAY_SIZE(Entries), __VA_ARGS__, 0, 0, }
970
#define MAKE_MENUGROUP(Entries, ...) { Entries, ARRAY_SIZE(Entries), __VA_ARGS__, 0, 0, }
969
971
970
static MenuGroup_t MG_MAIN = MAKE_MENUGROUP( MEL_MAIN, &MP_TOP_MAIN );
972
static MenuGroup_t MG_MAIN = MAKE_MENUGROUP( MEL_MAIN, &MP_TOP_MAIN );
971
static MenuGroup_t *MGL_MAIN[] = {
973
static MenuGroup_t *MGL_MAIN[] = {
972
    &MG_MAIN,
974
    &MG_MAIN,
973
};
975
};
974
976
975
static MenuGroup_t MG_MAIN_INGAME = MAKE_MENUGROUP( MEL_MAIN_INGAME, &MP_TOP_MAIN );
977
static MenuGroup_t MG_MAIN_INGAME = MAKE_MENUGROUP( MEL_MAIN_INGAME, &MP_TOP_MAIN );
976
static MenuGroup_t *MGL_MAIN_INGAME[] = {
978
static MenuGroup_t *MGL_MAIN_INGAME[] = {
977
    &MG_MAIN_INGAME,
979
    &MG_MAIN_INGAME,
978
};
980
};
979
981
980
static MenuGroup_t MG_EPISODE = MAKE_MENUGROUP( MEL_EPISODE, &MP_TOP_EPISODE );
982
static MenuGroup_t MG_EPISODE = MAKE_MENUGROUP( MEL_EPISODE, &MP_TOP_EPISODE );
981
static MenuGroup_t MG_EPISODE_USERMAP = MAKE_MENUGROUP( MEL_EPISODE_USERMAP, &MP_TOP_EPISODE );
983
static MenuGroup_t MG_EPISODE_USERMAP = MAKE_MENUGROUP( MEL_EPISODE_USERMAP, &MP_TOP_EPISODE );
982
static MenuGroup_t *MGL_EPISODE[] = {
984
static MenuGroup_t *MGL_EPISODE[] = {
983
    &MG_EPISODE,
985
    &MG_EPISODE,
984
    &MG_EPISODE_USERMAP,
986
    &MG_EPISODE_USERMAP,
985
};
987
};
986
static MenuGroup_t *MGL_EPISODE_SHAREWARE[] = {
988
static MenuGroup_t *MGL_EPISODE_SHAREWARE[] = {
987
    &MG_EPISODE,
989
    &MG_EPISODE,
988
};
990
};
989
991
990
static MenuGroup_t MG_SKILL = MAKE_MENUGROUP( MEL_SKILL, &MP_TOP_SKILL );
992
static MenuGroup_t MG_SKILL = MAKE_MENUGROUP( MEL_SKILL, &MP_TOP_SKILL );
991
static MenuGroup_t *MGL_SKILL[] = {
993
static MenuGroup_t *MGL_SKILL[] = {
992
    &MG_SKILL,
994
    &MG_SKILL,
993
};
995
};
994
996
995
static MenuGroup_t MG_GAMESETUP1 = MAKE_MENUGROUP( MEL_GAMESETUP1, &MP_BIGOPTIONSRT );
997
static MenuGroup_t MG_GAMESETUP1 = MAKE_MENUGROUP( MEL_GAMESETUP1, &MP_BIGOPTIONSRT );
996
998
997
static MenuGroup_t MG_SCREENSETUP1 = MAKE_MENUGROUP( MEL_SCREENSETUP1, &MP_BIGOPTIONS );
999
static MenuGroup_t MG_SCREENSETUP1 = MAKE_MENUGROUP( MEL_SCREENSETUP1, &MP_BIGOPTIONS );
998
static MenuGroup_t MG_SCREENSETUP2 = MAKE_MENUGROUP( MEL_SCREENSETUP2, &MP_BIGOPTIONS );
1000
static MenuGroup_t MG_SCREENSETUP2 = MAKE_MENUGROUP( MEL_SCREENSETUP2, &MP_BIGOPTIONS );
999
static MenuGroup_t MG_SCREENSETUP3 = MAKE_MENUGROUP( MEL_SCREENSETUP3, &MP_BIGOPTIONS );
1001
static MenuGroup_t MG_SCREENSETUP3 = MAKE_MENUGROUP( MEL_SCREENSETUP3, &MP_BIGOPTIONS );
1000
static MenuGroup_t MG_SCREENSETUP4 = MAKE_MENUGROUP( MEL_SCREENSETUP4, &MP_BIGOPTIONS );
1002
static MenuGroup_t MG_SCREENSETUP4 = MAKE_MENUGROUP( MEL_SCREENSETUP4, &MP_BIGOPTIONS );
1001
static MenuGroup_t MG_SCREENSETUP5 = MAKE_MENUGROUP( MEL_SCREENSETUP5, &MP_BIGOPTIONS );
1003
static MenuGroup_t MG_SCREENSETUP5 = MAKE_MENUGROUP( MEL_SCREENSETUP5, &MP_BIGOPTIONS );
1002
1004
1003
static MenuGroup_t *MGL_SCREENSETUP[] = {
1005
static MenuGroup_t *MGL_SCREENSETUP[] = {
1004
#ifndef DROIDMENU
1006
#ifndef DROIDMENU
1005
        &MG_SCREENSETUP1,
1007
        &MG_SCREENSETUP1,
1006
#endif
1008
#endif
1007
        &MG_SCREENSETUP2,
1009
        &MG_SCREENSETUP2,
1008
        &MG_SCREENSETUP3,
1010
        &MG_SCREENSETUP3,
1009
        &MG_SCREENSETUP4,
1011
        &MG_SCREENSETUP4,
1010
        &MG_SCREENSETUP5,
1012
        &MG_SCREENSETUP5,
1011
};
1013
};
1012
1014
1013
1015
1014
static MenuGroup_t MG_DISPLAYSETUP = MAKE_MENUGROUP(MEL_DISPLAYSETUP, &MP_BIGOPTIONS);
1016
static MenuGroup_t MG_DISPLAYSETUP = MAKE_MENUGROUP(MEL_DISPLAYSETUP, &MP_BIGOPTIONS);
1015
1017
1016
static MenuGroup_t *MGL_DISPLAYSETUP[] = {
1018
static MenuGroup_t *MGL_DISPLAYSETUP[] = {
1017
        &MG_DISPLAYSETUP,
1019
        &MG_DISPLAYSETUP,
1018
};
1020
};
1019
1021
1020
#ifdef USE_OPENGL
1022
#ifdef USE_OPENGL
1021
static MenuGroup_t MG_DISPLAYSETUP_GL = MAKE_MENUGROUP(MEL_DISPLAYSETUP_GL, &MP_BIGOPTIONS);
1023
static MenuGroup_t MG_DISPLAYSETUP_GL = MAKE_MENUGROUP(MEL_DISPLAYSETUP_GL, &MP_BIGOPTIONS);
1022
1024
1023
static MenuGroup_t *MGL_DISPLAYSETUP_GL[] = {
1025
static MenuGroup_t *MGL_DISPLAYSETUP_GL[] = {
1024
        &MG_DISPLAYSETUP_GL,
1026
        &MG_DISPLAYSETUP_GL,
1025
};
1027
};
1026
1028
1027
#ifdef POLYMER
1029
#ifdef POLYMER
1028
static MenuGroup_t MG_DISPLAYSETUP_GL_POLYMER = MAKE_MENUGROUP(MEL_DISPLAYSETUP_GL_POLYMER, &MP_BIGOPTIONS);
1030
static MenuGroup_t MG_DISPLAYSETUP_GL_POLYMER = MAKE_MENUGROUP(MEL_DISPLAYSETUP_GL_POLYMER, &MP_BIGOPTIONS);
1029
1031
1030
static MenuGroup_t *MGL_DISPLAYSETUP_GL_POLYMER[] = {
1032
static MenuGroup_t *MGL_DISPLAYSETUP_GL_POLYMER[] = {
1031
        &MG_DISPLAYSETUP_GL_POLYMER,
1033
        &MG_DISPLAYSETUP_GL_POLYMER,
1032
};
1034
};
1033
#endif
1035
#endif
1034
#endif
1036
#endif
1035
1037
1036
static MenuGroup_t *MGL_GAMESETUP[] = {
1038
static MenuGroup_t *MGL_GAMESETUP[] = {
1037
    &MG_GAMESETUP1,
1039
    &MG_GAMESETUP1,
1038
};
1040
};
1039
1041
1040
static MenuGroup_t MG_OPTIONS = MAKE_MENUGROUP( MEL_OPTIONS, &MP_TOP_OPTIONS );
1042
static MenuGroup_t MG_OPTIONS = MAKE_MENUGROUP( MEL_OPTIONS, &MP_TOP_OPTIONS );
1041
static MenuGroup_t *MGL_OPTIONS[] = {
1043
static MenuGroup_t *MGL_OPTIONS[] = {
1042
    &MG_OPTIONS,
1044
    &MG_OPTIONS,
1043
};
1045
};
1044
1046
1045
static MenuGroup_t MG_VIDEOSETUP1 = MAKE_MENUGROUP( MEL_VIDEOSETUP1, &MP_BIGOPTIONSRT );
1047
static MenuGroup_t MG_VIDEOSETUP1 = MAKE_MENUGROUP( MEL_VIDEOSETUP1, &MP_BIGOPTIONSRT );
1046
static MenuGroup_t MG_VIDEOSETUP_APPLY = MAKE_MENUGROUP( MEL_VIDEOSETUP_APPLY, &MP_VIDEOSETUP_APPLY );
1048
static MenuGroup_t MG_VIDEOSETUP_APPLY = MAKE_MENUGROUP( MEL_VIDEOSETUP_APPLY, &MP_VIDEOSETUP_APPLY );
1047
static MenuGroup_t *MGL_VIDEOSETUP[] = {
1049
static MenuGroup_t *MGL_VIDEOSETUP[] = {
1048
    &MG_VIDEOSETUP1,
1050
    &MG_VIDEOSETUP1,
1049
    &MG_VIDEOSETUP_APPLY,
1051
    &MG_VIDEOSETUP_APPLY,
1050
};
1052
};
1051
1053
1052
static MenuGroup_t MG_CONTROLS = MAKE_MENUGROUP(MEL_CONTROLS, &MP_TOP_OPTIONS);
1054
static MenuGroup_t MG_CONTROLS = MAKE_MENUGROUP(MEL_CONTROLS, &MP_TOP_OPTIONS);
1053
static MenuGroup_t *MGL_CONTROLS[] = {
1055
static MenuGroup_t *MGL_CONTROLS[] = {
1054
        &MG_CONTROLS,
1056
        &MG_CONTROLS,
1055
};
1057
};
1056
1058
1057
static MenuGroup_t MG_KEYBOARDSETUP = MAKE_MENUGROUP( MEL_KEYBOARDSETUP, &MP_TOP_OPTIONS );
1059
static MenuGroup_t MG_KEYBOARDSETUP = MAKE_MENUGROUP( MEL_KEYBOARDSETUP, &MP_TOP_OPTIONS );
1058
static MenuGroup_t *MGL_KEYBOARDSETUP[] = {
1060
static MenuGroup_t *MGL_KEYBOARDSETUP[] = {
1059
    &MG_KEYBOARDSETUP,
1061
    &MG_KEYBOARDSETUP,
1060
};
1062
};
1061
1063
1062
static MenuGroup_t MG_MOUSESETUP1 = MAKE_MENUGROUP( MEL_MOUSESETUP1, &MP_BIGOPTIONS );
1064
static MenuGroup_t MG_MOUSESETUP1 = MAKE_MENUGROUP( MEL_MOUSESETUP1, &MP_BIGOPTIONS );
1063
static MenuGroup_t MG_MOUSESETUP2 = MAKE_MENUGROUP( MEL_MOUSESETUP2, &MP_BIGOPTIONSRT );
1065
static MenuGroup_t MG_MOUSESETUP2 = MAKE_MENUGROUP( MEL_MOUSESETUP2, &MP_BIGOPTIONSRT );
1064
1066
1065
static MenuGroup_t *MGL_MOUSESETUP[] = {
1067
static MenuGroup_t *MGL_MOUSESETUP[] = {
1066
    &MG_MOUSESETUP1,
1068
    &MG_MOUSESETUP1,
1067
        &MG_MOUSESETUP2,
1069
        &MG_MOUSESETUP2,
1068
};
1070
};
1069
1071
1070
static MenuGroup_t MG_JOYSTICKSETUP = MAKE_MENUGROUP( MEL_JOYSTICKSETUP, &MP_TOP_JOYSTICK_NETWORK );
1072
static MenuGroup_t MG_JOYSTICKSETUP = MAKE_MENUGROUP( MEL_JOYSTICKSETUP, &MP_TOP_JOYSTICK_NETWORK );
1071
static MenuGroup_t *MGL_JOYSTICKSETUP[] = {
1073
static MenuGroup_t *MGL_JOYSTICKSETUP[] = {
1072
    &MG_JOYSTICKSETUP,
1074
    &MG_JOYSTICKSETUP,
1073
};
1075
};
1074
1076
1075
static MenuGroup_t MG_JOYSTICKBTNS = MAKE_MENUGROUP( MEL_JOYSTICKBTNS, &MP_MOUSEJOYSETUPBTNS );
1077
static MenuGroup_t MG_JOYSTICKBTNS = MAKE_MENUGROUP( MEL_JOYSTICKBTNS, &MP_MOUSEJOYSETUPBTNS );
1076
static MenuGroup_t *MGL_JOYSTICKBTNS[] = {
1078
static MenuGroup_t *MGL_JOYSTICKBTNS[] = {
1077
    &MG_JOYSTICKBTNS,
1079
    &MG_JOYSTICKBTNS,
1078
};
1080
};
1079
1081
1080
static MenuGroup_t MG_KEYBOARDSETUPFUNCS = MAKE_MENUGROUP( MEL_KEYBOARDSETUPFUNCS, &MP_KEYBOARDSETUPFUNCS );
1082
static MenuGroup_t MG_KEYBOARDSETUPFUNCS = MAKE_MENUGROUP( MEL_KEYBOARDSETUPFUNCS, &MP_KEYBOARDSETUPFUNCS );
1081
static MenuGroup_t *MGL_KEYBOARDKEYS[] = {
1083
static MenuGroup_t *MGL_KEYBOARDKEYS[] = {
1082
    &MG_KEYBOARDSETUPFUNCS,
1084
    &MG_KEYBOARDSETUPFUNCS,
1083
};
1085
};
1084
1086
1085
static MenuGroup_t MG_MOUSESETUPBTNS = MAKE_MENUGROUP( MEL_MOUSESETUPBTNS, &MP_MOUSEJOYSETUPBTNS );
1087
static MenuGroup_t MG_MOUSESETUPBTNS = MAKE_MENUGROUP( MEL_MOUSESETUPBTNS, &MP_MOUSEJOYSETUPBTNS );
1086
static MenuGroup_t *MGL_MOUSEBTNS[] = {
1088
static MenuGroup_t *MGL_MOUSEBTNS[] = {
1087
    &MG_MOUSESETUPBTNS,
1089
    &MG_MOUSESETUPBTNS,
1088
};
1090
};
1089
1091
1090
static MenuGroup_t MG_JOYSTICKAXES = MAKE_MENUGROUP( MEL_JOYSTICKAXES, &MP_REDSLIDE );
1092
static MenuGroup_t MG_JOYSTICKAXES = MAKE_MENUGROUP( MEL_JOYSTICKAXES, &MP_REDSLIDE );
1091
static MenuGroup_t *MGL_JOYSTICKAXES[] = {
1093
static MenuGroup_t *MGL_JOYSTICKAXES[] = {
1092
    &MG_JOYSTICKAXES,
1094
    &MG_JOYSTICKAXES,
1093
};
1095
};
1094
1096
1095
static MenuGroup_t MG_MOUSEADVANCED = MAKE_MENUGROUP( MEL_MOUSEADVANCED, &MP_REDSLIDE );
1097
static MenuGroup_t MG_MOUSEADVANCED = MAKE_MENUGROUP( MEL_MOUSEADVANCED, &MP_REDSLIDE );
1096
static MenuGroup_t MG_MOUSEADVANCED_DAXES = MAKE_MENUGROUP( MEL_MOUSEADVANCED_DAXES, &MP_REDSLIDE );
1098
static MenuGroup_t MG_MOUSEADVANCED_DAXES = MAKE_MENUGROUP( MEL_MOUSEADVANCED_DAXES, &MP_REDSLIDE );
1097
static MenuGroup_t *MGL_MOUSEADVANCED[] = {
1099
static MenuGroup_t *MGL_MOUSEADVANCED[] = {
1098
    &MG_MOUSEADVANCED,
1100
    &MG_MOUSEADVANCED,
1099
    &MG_MOUSEADVANCED_DAXES,
1101
    &MG_MOUSEADVANCED_DAXES,
1100
};
1102
};
1101
1103
1102
static MenuGroup_t MG_JOYSTICKAXIS = MAKE_MENUGROUP( MEL_JOYSTICKAXIS, &MP_REDSLIDE );
1104
static MenuGroup_t MG_JOYSTICKAXIS = MAKE_MENUGROUP( MEL_JOYSTICKAXIS, &MP_REDSLIDE );
1103
static MenuGroup_t MG_JOYSTICKAXIS_DIGITAL = MAKE_MENUGROUP( MEL_JOYSTICKAXIS_DIGITAL, &MP_REDSLIDE );
1105
static MenuGroup_t MG_JOYSTICKAXIS_DIGITAL = MAKE_MENUGROUP( MEL_JOYSTICKAXIS_DIGITAL, &MP_REDSLIDE );
1104
static MenuGroup_t *MGL_JOYSTICKAXIS[] = {
1106
static MenuGroup_t *MGL_JOYSTICKAXIS[] = {
1105
    &MG_JOYSTICKAXIS,
1107
    &MG_JOYSTICKAXIS,
1106
    &MG_JOYSTICKAXIS_DIGITAL,
1108
    &MG_JOYSTICKAXIS_DIGITAL,
1107
};
1109
};
1108
1110
1109
#ifdef USE_OPENGL
1111
#ifdef USE_OPENGL
1110
static MenuGroup_t MG_RENDERERSETUP_GL2 = MAKE_MENUGROUP( MEL_RENDERERSETUP_GL2, &MP_OPTIONS );
1112
static MenuGroup_t MG_RENDERERSETUP_GL2 = MAKE_MENUGROUP( MEL_RENDERERSETUP_GL2, &MP_OPTIONS );
1111
static MenuGroup_t MG_RENDERERSETUP_GL3 = MAKE_MENUGROUP( MEL_RENDERERSETUP_GL3, &MP_OPTIONS );
1113
static MenuGroup_t MG_RENDERERSETUP_GL3 = MAKE_MENUGROUP( MEL_RENDERERSETUP_GL3, &MP_OPTIONS );
1112
1114
1113
static MenuGroup_t *MGL_RENDERERSETUP[] = {
1115
static MenuGroup_t *MGL_RENDERERSETUP[] = {
1114
    &MG_RENDERERSETUP_GL2,
1116
    &MG_RENDERERSETUP_GL2,
1115
    &MG_RENDERERSETUP_GL3,
1117
    &MG_RENDERERSETUP_GL3,
1116
};
1118
};
1117
#endif
1119
#endif
1118
1120
1119
static MenuGroup_t MG_COLCORR = MAKE_MENUGROUP( MEL_COLCORR, &MP_COLCORR );
1121
static MenuGroup_t MG_COLCORR = MAKE_MENUGROUP( MEL_COLCORR, &MP_COLCORR );
1120
static MenuGroup_t MG_COLCORR_RESET = MAKE_MENUGROUP( MEL_COLCORR_RESET, &MP_COLCORR );
1122
static MenuGroup_t MG_COLCORR_RESET = MAKE_MENUGROUP( MEL_COLCORR_RESET, &MP_COLCORR );
1121
static MenuGroup_t *MGL_COLCORR[] = {
1123
static MenuGroup_t *MGL_COLCORR[] = {
1122
    &MG_COLCORR,
1124
    &MG_COLCORR,
1123
    &MG_COLCORR_RESET,
1125
    &MG_COLCORR_RESET,
1124
};
1126
};
1125
1127
1126
static MenuGroup_t MG_LOAD = MAKE_MENUGROUP( MEL_LOAD, &MP_LOADSAVE );
1128
static MenuGroup_t MG_LOAD = MAKE_MENUGROUP( MEL_LOAD, &MP_LOADSAVE );
1127
static MenuGroup_t *MGL_LOAD[] = {
1129
static MenuGroup_t *MGL_LOAD[] = {
1128
    &MG_LOAD,
1130
    &MG_LOAD,
1129
};
1131
};
1130
1132
1131
static MenuGroup_t MG_SAVE = MAKE_MENUGROUP( MEL_SAVE, &MP_LOADSAVE );
1133
static MenuGroup_t MG_SAVE = MAKE_MENUGROUP( MEL_SAVE, &MP_LOADSAVE );
1132
static MenuGroup_t *MGL_SAVE[] = {
1134
static MenuGroup_t *MGL_SAVE[] = {
1133
    &MG_SAVE,
1135
    &MG_SAVE,
1134
};
1136
};
1135
1137
1136
static MenuGroup_t MG_SOUND1 = MAKE_MENUGROUP( MEL_SOUND1, &MP_BIGOPTIONSRT );
1138
static MenuGroup_t MG_SOUND1 = MAKE_MENUGROUP( MEL_SOUND1, &MP_BIGOPTIONSRT );
1137
static MenuGroup_t MG_SOUND2 = MAKE_MENUGROUP( MEL_SOUND2, &MP_BIGOPTIONS );
1139
static MenuGroup_t MG_SOUND2 = MAKE_MENUGROUP( MEL_SOUND2, &MP_BIGOPTIONS );
1138
static MenuGroup_t MG_SOUND3 = MAKE_MENUGROUP( MEL_SOUND3, &MP_BIGOPTIONSRT );
1140
static MenuGroup_t MG_SOUND3 = MAKE_MENUGROUP( MEL_SOUND3, &MP_BIGOPTIONSRT );
1139
1141
1140
static MenuGroup_t *MGL_SOUND[] = {
1142
static MenuGroup_t *MGL_SOUND[] = {
1141
        &MG_SOUND1,
1143
        &MG_SOUND1,
1142
        &MG_SOUND2,
1144
        &MG_SOUND2,
1143
        &MG_SOUND3,
1145
        &MG_SOUND3,
1144
};
1146
};
1145
1147
1146
static MenuGroup_t MG_ADVSOUND1 = MAKE_MENUGROUP( MEL_ADVSOUND1, &MP_BIGOPTIONSRT );
1148
static MenuGroup_t MG_ADVSOUND1 = MAKE_MENUGROUP( MEL_ADVSOUND1, &MP_BIGOPTIONSRT );
1147
static MenuGroup_t MG_ADVSOUND2 = MAKE_MENUGROUP( MEL_ADVSOUND2, &MP_BIGOPTIONS );
1149
static MenuGroup_t MG_ADVSOUND2 = MAKE_MENUGROUP( MEL_ADVSOUND2, &MP_BIGOPTIONS );
1148
static MenuGroup_t MG_ADVSOUND3 = MAKE_MENUGROUP( MEL_ADVSOUND3, &MP_BIGOPTIONSRT );
1150
static MenuGroup_t MG_ADVSOUND3 = MAKE_MENUGROUP( MEL_ADVSOUND3, &MP_BIGOPTIONSRT );
1149
1151
1150
static MenuGroup_t *MGL_ADVSOUND[] = {
1152
static MenuGroup_t *MGL_ADVSOUND[] = {
1151
        &MG_ADVSOUND1,
1153
        &MG_ADVSOUND1,
1152
        &MG_ADVSOUND2,
1154
        &MG_ADVSOUND2,
1153
        &MG_ADVSOUND3,
1155
        &MG_ADVSOUND3,
1154
};
1156
};
1155
1157
1156
1158
1157
static MenuGroup_t MG_NETWORK = MAKE_MENUGROUP( MEL_NETWORK, &MP_TOP_JOYSTICK_NETWORK );
1159
static MenuGroup_t MG_NETWORK = MAKE_MENUGROUP( MEL_NETWORK, &MP_TOP_JOYSTICK_NETWORK );
1158
static MenuGroup_t *MGL_NETWORK[] = {
1160
static MenuGroup_t *MGL_NETWORK[] = {
1159
    &MG_NETWORK,
1161
    &MG_NETWORK,
1160
};
1162
};
1161
1163
1162
static MenuGroup_t MG_PLAYER_NAME = MAKE_MENUGROUP( MEL_PLAYER_NAME, &MP_PLAYER_1 );
1164
static MenuGroup_t MG_PLAYER_NAME = MAKE_MENUGROUP( MEL_PLAYER_NAME, &MP_PLAYER_1 );
1163
static MenuGroup_t MG_PLAYER_COLOR = MAKE_MENUGROUP( MEL_PLAYER_COLOR, &MP_PLAYER_1 );
1165
static MenuGroup_t MG_PLAYER_COLOR = MAKE_MENUGROUP( MEL_PLAYER_COLOR, &MP_PLAYER_1 );
1164
static MenuGroup_t MG_PLAYER_TEAM = MAKE_MENUGROUP( MEL_PLAYER_TEAM, &MP_PLAYER_1 );
1166
static MenuGroup_t MG_PLAYER_TEAM = MAKE_MENUGROUP( MEL_PLAYER_TEAM, &MP_PLAYER_1 );
1165
static MenuGroup_t MG_PLAYER_MACROS = MAKE_MENUGROUP( MEL_PLAYER_MACROS, &MP_PLAYER_3 );
1167
static MenuGroup_t MG_PLAYER_MACROS = MAKE_MENUGROUP( MEL_PLAYER_MACROS, &MP_PLAYER_3 );
1166
static MenuGroup_t *MGL_PLAYER[] = {
1168
static MenuGroup_t *MGL_PLAYER[] = {
1167
    &MG_PLAYER_NAME,
1169
    &MG_PLAYER_NAME,
1168
    &MG_PLAYER_COLOR,
1170
    &MG_PLAYER_COLOR,
1169
    &MG_PLAYER_TEAM,
1171
    &MG_PLAYER_TEAM,
1170
#ifndef DROIDMENU
1172
#ifndef DROIDMENU
1171
    &MG_PLAYER_MACROS,
1173
    &MG_PLAYER_MACROS,
1172
#endif
1174
#endif
1173
};
1175
};
1174
1176
1175
static MenuGroup_t MG_MACROS = MAKE_MENUGROUP( MEL_MACROS, &MP_MACROS );
1177
static MenuGroup_t MG_MACROS = MAKE_MENUGROUP( MEL_MACROS, &MP_MACROS );
1176
static MenuGroup_t *MGL_MACROS[] = {
1178
static MenuGroup_t *MGL_MACROS[] = {
1177
    &MG_MACROS,
1179
    &MG_MACROS,
1178
};
1180
};
1179
1181
1180
static MenuGroup_t MG_NETHOST = MAKE_MENUGROUP( MEL_NETHOST, &MP_VIDEOSETUP );
1182
static MenuGroup_t MG_NETHOST = MAKE_MENUGROUP( MEL_NETHOST, &MP_VIDEOSETUP );
1181
static MenuGroup_t *MGL_NETHOST[] = {
1183
static MenuGroup_t *MGL_NETHOST[] = {
1182
    &MG_NETHOST,
1184
    &MG_NETHOST,
1183
};
1185
};
1184
1186
1185
static MenuGroup_t MG_NETOPTIONS = MAKE_MENUGROUP( MEL_NETOPTIONS, &MP_NETSETUP );
1187
static MenuGroup_t MG_NETOPTIONS = MAKE_MENUGROUP( MEL_NETOPTIONS, &MP_NETSETUP );
1186
static MenuGroup_t *MGL_NETOPTIONS[] = {
1188
static MenuGroup_t *MGL_NETOPTIONS[] = {
1187
    &MG_NETOPTIONS,
1189
    &MG_NETOPTIONS,
1188
};
1190
};
1189
1191
1190
static MenuGroup_t MG_NETJOIN = MAKE_MENUGROUP( MEL_NETJOIN, &MP_VIDEOSETUP );
1192
static MenuGroup_t MG_NETJOIN = MAKE_MENUGROUP( MEL_NETJOIN, &MP_VIDEOSETUP );
1191
static MenuGroup_t *MGL_NETJOIN[] = {
1193
static MenuGroup_t *MGL_NETJOIN[] = {
1192
    &MG_NETJOIN,
1194
    &MG_NETJOIN,
1193
};
1195
};
1194
1196
1195
1197
1196
1198
1197
#define NoTitle NULL
1199
#define NoTitle NULL
1198
1200
1199
#define MAKE_MENUMENU(Groups, ...) { Groups, ARRAY_SIZE(Groups), __VA_ARGS__, 0, INT32_MAX, INT32_MIN, 0, 0, }
1201
#define MAKE_MENUMENU(Groups, ...) { Groups, ARRAY_SIZE(Groups), __VA_ARGS__, 0, INT32_MAX, INT32_MIN, 0, 0, }
1200
1202
1201
static MenuMenu_t M_MAIN = MAKE_MENUMENU( MGL_MAIN, NoTitle );
1203
static MenuMenu_t M_MAIN = MAKE_MENUMENU( MGL_MAIN, NoTitle );
1202
static MenuMenu_t M_MAIN_INGAME = MAKE_MENUMENU( MGL_MAIN_INGAME, NoTitle );
1204
static MenuMenu_t M_MAIN_INGAME = MAKE_MENUMENU( MGL_MAIN_INGAME, NoTitle );
1203
static MenuMenu_t M_EPISODE = MAKE_MENUMENU( MGL_EPISODE, "Select An Episode" );
1205
static MenuMenu_t M_EPISODE = MAKE_MENUMENU( MGL_EPISODE, "Select An Episode" );
1204
static MenuMenu_t M_SKILL = MAKE_MENUMENU( MGL_SKILL, "Select Skill" );
1206
static MenuMenu_t M_SKILL = MAKE_MENUMENU( MGL_SKILL, "Select Skill" );
1205
static MenuMenu_t M_GAMESETUP = MAKE_MENUMENU( MGL_GAMESETUP, "Game Setup" );
1207
static MenuMenu_t M_GAMESETUP = MAKE_MENUMENU( MGL_GAMESETUP, "Game Setup" );
1206
static MenuMenu_t M_OPTIONS = MAKE_MENUMENU( MGL_OPTIONS, "Options" );
1208
static MenuMenu_t M_OPTIONS = MAKE_MENUMENU( MGL_OPTIONS, "Options" );
1207
static MenuMenu_t M_VIDEOSETUP = MAKE_MENUMENU( MGL_VIDEOSETUP, "Video Mode" );
1209
static MenuMenu_t M_VIDEOSETUP = MAKE_MENUMENU( MGL_VIDEOSETUP, "Video Mode" );
1208
static MenuMenu_t M_KEYBOARDSETUP = MAKE_MENUMENU( MGL_KEYBOARDSETUP, "Keyboard Setup" );
1210
static MenuMenu_t M_KEYBOARDSETUP = MAKE_MENUMENU( MGL_KEYBOARDSETUP, "Keyboard Setup" );
1209
static MenuMenu_t M_CONTROLS = MAKE_MENUMENU( MGL_CONTROLS, "Control Setup" );
1211
static MenuMenu_t M_CONTROLS = MAKE_MENUMENU( MGL_CONTROLS, "Control Setup" );
1210
static MenuMenu_t M_MOUSESETUP = MAKE_MENUMENU( MGL_MOUSESETUP, "Mouse Setup" );
1212
static MenuMenu_t M_MOUSESETUP = MAKE_MENUMENU( MGL_MOUSESETUP, "Mouse Setup" );
1211
static MenuMenu_t M_JOYSTICKSETUP = MAKE_MENUMENU( MGL_JOYSTICKSETUP, "Joystick Setup" );
1213
static MenuMenu_t M_JOYSTICKSETUP = MAKE_MENUMENU( MGL_JOYSTICKSETUP, "Joystick Setup" );
1212
static MenuMenu_t M_JOYSTICKBTNS = MAKE_MENUMENU( MGL_JOYSTICKBTNS, "Joystick Buttons" );
1214
static MenuMenu_t M_JOYSTICKBTNS = MAKE_MENUMENU( MGL_JOYSTICKBTNS, "Joystick Buttons" );
1213
static MenuMenu_t M_JOYSTICKAXES = MAKE_MENUMENU( MGL_JOYSTICKAXES, "Joystick Axes" );
1215
static MenuMenu_t M_JOYSTICKAXES = MAKE_MENUMENU( MGL_JOYSTICKAXES, "Joystick Axes" );
1214
static MenuMenu_t M_KEYBOARDKEYS = MAKE_MENUMENU( MGL_KEYBOARDKEYS, "Keyboard Keys" );
1216
static MenuMenu_t M_KEYBOARDKEYS = MAKE_MENUMENU( MGL_KEYBOARDKEYS, "Keyboard Keys" );
1215
static MenuMenu_t M_MOUSEBTNS = MAKE_MENUMENU( MGL_MOUSEBTNS, "Mouse Buttons" );
1217
static MenuMenu_t M_MOUSEBTNS = MAKE_MENUMENU( MGL_MOUSEBTNS, "Mouse Buttons" );
1216
static MenuMenu_t M_MOUSEADVANCED = MAKE_MENUMENU( MGL_MOUSEADVANCED, "Advanced Mouse" );
1218
static MenuMenu_t M_MOUSEADVANCED = MAKE_MENUMENU( MGL_MOUSEADVANCED, "Advanced Mouse" );
1217
static MenuMenu_t M_JOYSTICKAXIS = MAKE_MENUMENU( MGL_JOYSTICKAXIS, NULL );
1219
static MenuMenu_t M_JOYSTICKAXIS = MAKE_MENUMENU( MGL_JOYSTICKAXIS, NULL );
1218
#ifdef USE_OPENGL
1220
#ifdef USE_OPENGL
1219
static MenuMenu_t M_RENDERERSETUP = MAKE_MENUMENU( MGL_RENDERERSETUP, "Advanced Video" );
1221
static MenuMenu_t M_RENDERERSETUP = MAKE_MENUMENU( MGL_RENDERERSETUP, "Advanced Video" );
1220
#endif
1222
#endif
1221
static MenuMenu_t M_COLCORR = MAKE_MENUMENU( MGL_COLCORR, "Color Correction" );
1223
static MenuMenu_t M_COLCORR = MAKE_MENUMENU( MGL_COLCORR, "Color Correction" );
1222
static MenuMenu_t M_SCREENSETUP = MAKE_MENUMENU( MGL_SCREENSETUP, "On-Screen Displays" );
1224
static MenuMenu_t M_SCREENSETUP = MAKE_MENUMENU( MGL_SCREENSETUP, "On-Screen Displays" );
1223
static MenuMenu_t M_DISPLAYSETUP = MAKE_MENUMENU( MGL_DISPLAYSETUP, "Display Setup" );
1225
static MenuMenu_t M_DISPLAYSETUP = MAKE_MENUMENU( MGL_DISPLAYSETUP, "Display Setup" );
1224
static MenuMenu_t M_LOAD = MAKE_MENUMENU( MGL_LOAD, "Load Game" );
1226
static MenuMenu_t M_LOAD = MAKE_MENUMENU( MGL_LOAD, "Load Game" );
1225
static MenuMenu_t M_SAVE = MAKE_MENUMENU( MGL_SAVE, "Save Game" );
1227
static MenuMenu_t M_SAVE = MAKE_MENUMENU( MGL_SAVE, "Save Game" );
1226
static MenuMenu_t M_SOUND = MAKE_MENUMENU( MGL_SOUND, "Sound Setup" );
1228
static MenuMenu_t M_SOUND = MAKE_MENUMENU( MGL_SOUND, "Sound Setup" );
1227
static MenuMenu_t M_ADVSOUND = MAKE_MENUMENU( MGL_ADVSOUND, "Sound Setup" );
1229
static MenuMenu_t M_ADVSOUND = MAKE_MENUMENU( MGL_ADVSOUND, "Sound Setup" );
1228
static MenuMenu_t M_NETWORK = MAKE_MENUMENU( MGL_NETWORK, "Network Game" );
1230
static MenuMenu_t M_NETWORK = MAKE_MENUMENU( MGL_NETWORK, "Network Game" );
1229
static MenuMenu_t M_PLAYER = MAKE_MENUMENU( MGL_PLAYER, "Player Setup" );
1231
static MenuMenu_t M_PLAYER = MAKE_MENUMENU( MGL_PLAYER, "Player Setup" );
1230
static MenuMenu_t M_MACROS = MAKE_MENUMENU( MGL_MACROS, "Multiplayer Macros" );
1232
static MenuMenu_t M_MACROS = MAKE_MENUMENU( MGL_MACROS, "Multiplayer Macros" );
1231
static MenuMenu_t M_NETHOST = MAKE_MENUMENU( MGL_NETHOST, "Host Network Game" );
1233
static MenuMenu_t M_NETHOST = MAKE_MENUMENU( MGL_NETHOST, "Host Network Game" );
1232
static MenuMenu_t M_NETOPTIONS = MAKE_MENUMENU( MGL_NETOPTIONS, "Net Game Options" );
1234
static MenuMenu_t M_NETOPTIONS = MAKE_MENUMENU( MGL_NETOPTIONS, "Net Game Options" );
1233
static MenuMenu_t M_NETJOIN = MAKE_MENUMENU( MGL_NETJOIN, "Join Network Game" );
1235
static MenuMenu_t M_NETJOIN = MAKE_MENUMENU( MGL_NETJOIN, "Join Network Game" );
1234
1236
1235
#ifdef DROIDMENU
1237
#ifdef DROIDMENU
1236
static MenuPanel_t M_STORY = { NoTitle, MENU_STORY, MENU_STORY, };
1238
static MenuPanel_t M_STORY = { NoTitle, MENU_STORY, MENU_STORY, };
1237
#else
1239
#else
1238
static MenuPanel_t M_STORY = { NoTitle, MENU_F1HELP, MENU_F1HELP, };
1240
static MenuPanel_t M_STORY = { NoTitle, MENU_F1HELP, MENU_F1HELP, };
1239
#endif
1241
#endif
1240
1242
1241
static MenuPanel_t M_F1HELP = { NoTitle, MENU_STORY, MENU_STORY, };
1243
static MenuPanel_t M_F1HELP = { NoTitle, MENU_STORY, MENU_STORY, };
1242
static const char* MenuCredits = "Credits";
1244
static const char* MenuCredits = "Credits";
1243
static MenuPanel_t M_CREDITS = { NoTitle, MENU_CREDITS5, MENU_CREDITS2, };
1245
static MenuPanel_t M_CREDITS = { NoTitle, MENU_CREDITS5, MENU_CREDITS2, };
1244
static MenuPanel_t M_CREDITS2 = { NoTitle, MENU_CREDITS, MENU_CREDITS3, };
1246
static MenuPanel_t M_CREDITS2 = { NoTitle, MENU_CREDITS, MENU_CREDITS3, };
1245
static MenuPanel_t M_CREDITS3 = { NoTitle, MENU_CREDITS2, MENU_CREDITS4, };
1247
static MenuPanel_t M_CREDITS3 = { NoTitle, MENU_CREDITS2, MENU_CREDITS4, };
1246
#ifdef DROIDMENU
1248
#ifdef DROIDMENU
1247
static MenuPanel_t M_CREDITS4 = { "Meltdown Collection", MENU_CREDITS3, MENU_CREDITS5, };
1249
static MenuPanel_t M_CREDITS4 = { "Meltdown Collection", MENU_CREDITS3, MENU_CREDITS5, };
1248
#else
1250
#else
1249
static MenuPanel_t M_CREDITS4 = { "About EDuke32", MENU_CREDITS3, MENU_CREDITS5, };
1251
static MenuPanel_t M_CREDITS4 = { "About EDuke32", MENU_CREDITS3, MENU_CREDITS5, };
1250
#endif
1252
#endif
1251
static MenuPanel_t M_CREDITS5 = { "About EDuke32", MENU_CREDITS4, MENU_CREDITS, };
1253
static MenuPanel_t M_CREDITS5 = { "About EDuke32", MENU_CREDITS4, MENU_CREDITS, };
1252
1254
1253
#define CURSOR_CENTER_2LINE { 160<<16, 120<<16, }
1255
#define CURSOR_CENTER_2LINE { 160<<16, 120<<16, }
1254
#define CURSOR_CENTER_3LINE { 160<<16, 129<<16, }
1256
#define CURSOR_CENTER_3LINE { 160<<16, 129<<16, }
1255
#define CURSOR_BOTTOMRIGHT { 304<<16, 186<<16, }
1257
#define CURSOR_BOTTOMRIGHT { 304<<16, 186<<16, }
1256
1258
1257
static MenuVerify_t M_QUIT = { CURSOR_CENTER_2LINE, MENU_CLOSE, };
1259
static MenuVerify_t M_QUIT = { CURSOR_CENTER_2LINE, MENU_CLOSE, };
1258
static MenuVerify_t M_QUITTOTITLE = { CURSOR_CENTER_2LINE, MENU_CLOSE, };
1260
static MenuVerify_t M_QUITTOTITLE = { CURSOR_CENTER_2LINE, MENU_CLOSE, };
1259
static MenuVerify_t M_LOADVERIFY = { CURSOR_CENTER_3LINE, MENU_CLOSE, };
1261
static MenuVerify_t M_LOADVERIFY = { CURSOR_CENTER_3LINE, MENU_CLOSE, };
1260
static MenuVerify_t M_NEWVERIFY = { CURSOR_CENTER_2LINE, MENU_EPISODE, };
1262
static MenuVerify_t M_NEWVERIFY = { CURSOR_CENTER_2LINE, MENU_EPISODE, };
1261
static MenuVerify_t M_SAVEVERIFY = { CURSOR_CENTER_2LINE, MENU_SAVE, };
1263
static MenuVerify_t M_SAVEVERIFY = { CURSOR_CENTER_2LINE, MENU_SAVE, };
1262
static MenuVerify_t M_RESETPLAYER = { CURSOR_CENTER_3LINE, MENU_CLOSE, };
1264
static MenuVerify_t M_RESETPLAYER = { CURSOR_CENTER_3LINE, MENU_CLOSE, };
1263
1265
1264
static MenuMessage_t M_NETWAITMASTER = { CURSOR_BOTTOMRIGHT, MENU_NULL, };
1266
static MenuMessage_t M_NETWAITMASTER = { CURSOR_BOTTOMRIGHT, MENU_NULL, };
1265
static MenuMessage_t M_NETWAITVOTES = { CURSOR_BOTTOMRIGHT, MENU_NULL, };
1267
static MenuMessage_t M_NETWAITVOTES = { CURSOR_BOTTOMRIGHT, MENU_NULL, };
1266
static MenuMessage_t M_BUYDUKE = { CURSOR_BOTTOMRIGHT, MENU_EPISODE, };
1268
static MenuMessage_t M_BUYDUKE = { CURSOR_BOTTOMRIGHT, MENU_EPISODE, };
1267
1269
1268
static MenuPassword_t M_ADULTPASSWORD = { MAXPWLOCKOUT, NULL, };
1270
static MenuPassword_t M_ADULTPASSWORD = { MAXPWLOCKOUT, NULL, };
1269
1271
1270
#define MAKE_MENUFILESELECT(...) { __VA_ARGS__, FNLIST_INITIALIZER, { NULL, NULL, }, 0, { 0, 0, }, }
1272
#define MAKE_MENUFILESELECT(...) { __VA_ARGS__, FNLIST_INITIALIZER, { NULL, NULL, }, 0, { 0, 0, }, }
1271
1273
1272
static MenuFileSelect_t M_USERMAP = MAKE_MENUFILESELECT( "Select A User Map", { &MF_Minifont, &MF_MinifontRed, }, "*.map", boardfilename );
1274
static MenuFileSelect_t M_USERMAP = MAKE_MENUFILESELECT( "Select A User Map", { &MF_Minifont, &MF_MinifontRed, }, "*.map", boardfilename );
1273
1275
1274
static const int32_t MenuFileSelect_entryheight = 8<<16;
1276
static const int32_t MenuFileSelect_entryheight = 8<<16;
1275
static const int32_t MenuFileSelect_startx[2] = { 40<<16, 180<<16, };
1277
static const int32_t MenuFileSelect_startx[2] = { 40<<16, 180<<16, };
1276
static const int32_t MenuFileSelect_ytop[2] = { ((1+12+32+8)<<16), (1+12+32)<<16, };
1278
static const int32_t MenuFileSelect_ytop[2] = { ((1+12+32+8)<<16), (1+12+32)<<16, };
1277
static const int32_t MenuFileSelect_ybottom = (1+12+32+8*13)<<16;
1279
static const int32_t MenuFileSelect_ybottom = (1+12+32+8*13)<<16;
1278
1280
1279
// MUST be in ascending order of MenuID enum values due to binary search
1281
// MUST be in ascending order of MenuID enum values due to binary search
1280
static Menu_t Menus[] = {
1282
static Menu_t Menus[] = {
1281
    { MENU_MAIN, MENU_CLOSE, Menu, &M_MAIN, },
1283
    { MENU_MAIN, MENU_CLOSE, Menu, &M_MAIN, },
1282
    { MENU_MAIN_INGAME, MENU_CLOSE, Menu, &M_MAIN_INGAME, },
1284
    { MENU_MAIN_INGAME, MENU_CLOSE, Menu, &M_MAIN_INGAME, },
1283
    { MENU_EPISODE, MENU_MAIN, Menu, &M_EPISODE, },
1285
    { MENU_EPISODE, MENU_MAIN, Menu, &M_EPISODE, },
1284
    { MENU_USERMAP, MENU_EPISODE, FileSelect, &M_USERMAP, },
1286
    { MENU_USERMAP, MENU_EPISODE, FileSelect, &M_USERMAP, },
1285
    { MENU_SKILL, MENU_EPISODE, Menu, &M_SKILL, },
1287
    { MENU_SKILL, MENU_EPISODE, Menu, &M_SKILL, },
1286
    { MENU_GAMESETUP, MENU_OPTIONS, Menu, &M_GAMESETUP, },
1288
    { MENU_GAMESETUP, MENU_OPTIONS, Menu, &M_GAMESETUP, },
1287
    { MENU_OPTIONS, MENU_MAIN, Menu, &M_OPTIONS, },
1289
    { MENU_OPTIONS, MENU_MAIN, Menu, &M_OPTIONS, },
1288
    { MENU_VIDEOSETUP, MENU_DISPLAYSETUP, Menu, &M_VIDEOSETUP, },
1290
    { MENU_VIDEOSETUP, MENU_DISPLAYSETUP, Menu, &M_VIDEOSETUP, },
1289
    { MENU_KEYBOARDSETUP, MENU_CONTROLS, Menu, &M_KEYBOARDSETUP, },
1291
    { MENU_KEYBOARDSETUP, MENU_CONTROLS, Menu, &M_KEYBOARDSETUP, },
1290
    { MENU_MOUSESETUP, MENU_CONTROLS, Menu, &M_MOUSESETUP, },
1292
    { MENU_MOUSESETUP, MENU_CONTROLS, Menu, &M_MOUSESETUP, },
1291
    { MENU_JOYSTICKSETUP, MENU_CONTROLS, Menu, &M_JOYSTICKSETUP, },
1293
    { MENU_JOYSTICKSETUP, MENU_CONTROLS, Menu, &M_JOYSTICKSETUP, },
1292
    { MENU_JOYSTICKBTNS, MENU_JOYSTICKSETUP, Menu, &M_JOYSTICKBTNS, },
1294
    { MENU_JOYSTICKBTNS, MENU_JOYSTICKSETUP, Menu, &M_JOYSTICKBTNS, },
1293
    { MENU_JOYSTICKAXES, MENU_JOYSTICKSETUP, Menu, &M_JOYSTICKAXES, },
1295
    { MENU_JOYSTICKAXES, MENU_JOYSTICKSETUP, Menu, &M_JOYSTICKAXES, },
1294
    { MENU_KEYBOARDKEYS, MENU_KEYBOARDSETUP, Menu, &M_KEYBOARDKEYS, },
1296
    { MENU_KEYBOARDKEYS, MENU_KEYBOARDSETUP, Menu, &M_KEYBOARDKEYS, },
1295
    { MENU_MOUSEBTNS, MENU_MOUSESETUP, Menu, &M_MOUSEBTNS, },
1297
    { MENU_MOUSEBTNS, MENU_MOUSESETUP, Menu, &M_MOUSEBTNS, },
1296
    { MENU_MOUSEADVANCED, MENU_MOUSESETUP, Menu, &M_MOUSEADVANCED, },
1298
    { MENU_MOUSEADVANCED, MENU_MOUSESETUP, Menu, &M_MOUSEADVANCED, },
1297
    { MENU_JOYSTICKAXIS, MENU_JOYSTICKAXES, Menu, &M_JOYSTICKAXIS, },
1299
    { MENU_JOYSTICKAXIS, MENU_JOYSTICKAXES, Menu, &M_JOYSTICKAXIS, },
1298
        { MENU_CONTROLS, MENU_OPTIONS, Menu, &M_CONTROLS, },
1300
        { MENU_CONTROLS, MENU_OPTIONS, Menu, &M_CONTROLS, },
1299
#ifdef USE_OPENGL
1301
#ifdef USE_OPENGL
1300
    { MENU_RENDERERSETUP, MENU_DISPLAYSETUP, Menu, &M_RENDERERSETUP, },
1302
    { MENU_RENDERERSETUP, MENU_DISPLAYSETUP, Menu, &M_RENDERERSETUP, },
1301
#endif
1303
#endif
1302
    { MENU_COLCORR, MENU_DISPLAYSETUP, Menu, &M_COLCORR, },
1304
    { MENU_COLCORR, MENU_DISPLAYSETUP, Menu, &M_COLCORR, },
1303
    { MENU_COLCORR_INGAME, MENU_CLOSE, Menu, &M_COLCORR, },
1305
    { MENU_COLCORR_INGAME, MENU_CLOSE, Menu, &M_COLCORR, },
1304
        { MENU_SCREENSETUP, MENU_DISPLAYSETUP, Menu, &M_SCREENSETUP, },
1306
        { MENU_SCREENSETUP, MENU_DISPLAYSETUP, Menu, &M_SCREENSETUP, },
1305
        { MENU_DISPLAYSETUP, MENU_OPTIONS, Menu, &M_DISPLAYSETUP, },
1307
        { MENU_DISPLAYSETUP, MENU_OPTIONS, Menu, &M_DISPLAYSETUP, },
1306
    { MENU_LOAD, MENU_MAIN, Menu, &M_LOAD, },
1308
    { MENU_LOAD, MENU_MAIN, Menu, &M_LOAD, },
1307
    { MENU_SAVE, MENU_MAIN, Menu, &M_SAVE, },
1309
    { MENU_SAVE, MENU_MAIN, Menu, &M_SAVE, },
1308
    { MENU_STORY, MENU_MAIN, Panel, &M_STORY, },
1310
    { MENU_STORY, MENU_MAIN, Panel, &M_STORY, },
1309
    { MENU_F1HELP, MENU_MAIN, Panel, &M_F1HELP, },
1311
    { MENU_F1HELP, MENU_MAIN, Panel, &M_F1HELP, },
1310
    { MENU_QUIT, MENU_PREVIOUS, Verify, &M_QUIT, },
1312
    { MENU_QUIT, MENU_PREVIOUS, Verify, &M_QUIT, },
1311
    { MENU_QUITTOTITLE, MENU_PREVIOUS, Verify, &M_QUITTOTITLE, },
1313
    { MENU_QUITTOTITLE, MENU_PREVIOUS, Verify, &M_QUITTOTITLE, },
1312
    { MENU_QUIT_INGAME, MENU_CLOSE, Verify, &M_QUIT, },
1314
    { MENU_QUIT_INGAME, MENU_CLOSE, Verify, &M_QUIT, },
1313
    { MENU_NETSETUP, MENU_MAIN, Menu, &M_NETHOST, },
1315
    { MENU_NETSETUP, MENU_MAIN, Menu, &M_NETHOST, },
1314
    { MENU_NETWAITMASTER, MENU_MAIN, Message, &M_NETWAITMASTER, },
1316
    { MENU_NETWAITMASTER, MENU_MAIN, Message, &M_NETWAITMASTER, },
1315
    { MENU_NETWAITVOTES, MENU_MAIN, Message, &M_NETWAITVOTES, },
1317
    { MENU_NETWAITVOTES, MENU_MAIN, Message, &M_NETWAITVOTES, },
1316
    { MENU_SOUND, MENU_OPTIONS, Menu, &M_SOUND, },
1318
    { MENU_SOUND, MENU_OPTIONS, Menu, &M_SOUND, },
1317
    { MENU_SOUND_INGAME, MENU_CLOSE, Menu, &M_SOUND, },
1319
    { MENU_SOUND_INGAME, MENU_CLOSE, Menu, &M_SOUND, },
1318
    { MENU_ADVSOUND, MENU_SOUND, Menu, &M_ADVSOUND, },
1320
    { MENU_ADVSOUND, MENU_SOUND, Menu, &M_ADVSOUND, },
1319
    { MENU_CREDITS, MENU_MAIN, Panel, &M_CREDITS, },
1321
    { MENU_CREDITS, MENU_MAIN, Panel, &M_CREDITS, },
1320
    { MENU_CREDITS2, MENU_MAIN, Panel, &M_CREDITS2, },
1322
    { MENU_CREDITS2, MENU_MAIN, Panel, &M_CREDITS2, },
1321
    { MENU_CREDITS3, MENU_MAIN, Panel, &M_CREDITS3, },
1323
    { MENU_CREDITS3, MENU_MAIN, Panel, &M_CREDITS3, },
1322
    { MENU_CREDITS4, MENU_MAIN, Panel, &M_CREDITS4, },
1324
    { MENU_CREDITS4, MENU_MAIN, Panel, &M_CREDITS4, },
1323
    { MENU_CREDITS5, MENU_MAIN, Panel, &M_CREDITS5, },
1325
    { MENU_CREDITS5, MENU_MAIN, Panel, &M_CREDITS5, },
1324
    { MENU_LOADVERIFY, MENU_LOAD, Verify, &M_LOADVERIFY, },
1326
    { MENU_LOADVERIFY, MENU_LOAD, Verify, &M_LOADVERIFY, },
1325
    { MENU_NEWVERIFY, MENU_MAIN, Verify, &M_NEWVERIFY, },
1327
    { MENU_NEWVERIFY, MENU_MAIN, Verify, &M_NEWVERIFY, },
1326
    { MENU_SAVEVERIFY, MENU_SAVE, Verify, &M_SAVEVERIFY, },
1328
    { MENU_SAVEVERIFY, MENU_SAVE, Verify, &M_SAVEVERIFY, },
1327
    { MENU_ADULTPASSWORD, MENU_GAMESETUP, Password, &M_ADULTPASSWORD, },
1329
    { MENU_ADULTPASSWORD, MENU_GAMESETUP, Password, &M_ADULTPASSWORD, },
1328
    { MENU_RESETPLAYER, MENU_CLOSE, Verify, &M_RESETPLAYER, },
1330
    { MENU_RESETPLAYER, MENU_CLOSE, Verify, &M_RESETPLAYER, },
1329
    { MENU_BUYDUKE, MENU_EPISODE, Message, &M_BUYDUKE, },
1331
    { MENU_BUYDUKE, MENU_EPISODE, Message, &M_BUYDUKE, },
1330
    { MENU_NETWORK, MENU_MAIN, Menu, &M_NETWORK, },
1332
    { MENU_NETWORK, MENU_MAIN, Menu, &M_NETWORK, },
1331
    { MENU_PLAYER, MENU_OPTIONS, Menu, &M_PLAYER, },
1333
    { MENU_PLAYER, MENU_OPTIONS, Menu, &M_PLAYER, },
1332
    { MENU_MACROS, MENU_PLAYER, Menu, &M_MACROS, },
1334
    { MENU_MACROS, MENU_PLAYER, Menu, &M_MACROS, },
1333
    { MENU_NETHOST, MENU_NETWORK, Menu, &M_NETHOST, },
1335
    { MENU_NETHOST, MENU_NETWORK, Menu, &M_NETHOST, },
1334
    { MENU_NETOPTIONS, MENU_NETWORK, Menu, &M_NETOPTIONS, },
1336
    { MENU_NETOPTIONS, MENU_NETWORK, Menu, &M_NETOPTIONS, },
1335
    { MENU_NETUSERMAP, MENU_NETOPTIONS, FileSelect, &M_USERMAP, },
1337
    { MENU_NETUSERMAP, MENU_NETOPTIONS, FileSelect, &M_USERMAP, },
1336
    { MENU_NETJOIN, MENU_NETWORK, Menu, &M_NETJOIN, },
1338
    { MENU_NETJOIN, MENU_NETWORK, Menu, &M_NETJOIN, },
1337
};
1339
};
1338
1340
1339
static const size_t numMenus = ARRAY_SIZE(Menus);
1341
static const size_t numMenus = ARRAY_SIZE(Menus);
1340
1342
1341
Menu_t *m_currentMenu = &Menus[0];
1343
Menu_t *m_currentMenu = &Menus[0];
1342
static Menu_t *m_previousMenu = &Menus[0];
1344
static Menu_t *m_previousMenu = &Menus[0];
1343
1345
1344
MenuID_t g_currentMenu;
1346
MenuID_t g_currentMenu;
1345
static MenuID_t g_previousMenu;
1347
static MenuID_t g_previousMenu;
1346
1348
1347
1349
1348
#define MenuMenu_ChangeGroupList(_, gl)\
1350
#define MenuMenu_ChangeGroupList(_, gl)\
1349
    do {\
1351
    do {\
1350
        _.grouplist = gl;\
1352
        _.grouplist = gl;\
1351
        _.numGroups = ARRAY_SIZE(gl);\
1353
        _.numGroups = ARRAY_SIZE(gl);\
1352
    } while (0)
1354
    } while (0)
1353
1355
1354
#define MenuGroup_ChangeEntryList(g, el)\
1356
#define MenuGroup_ChangeEntryList(g, el)\
1355
    do {\
1357
    do {\
1356
        g.entrylist = el;\
1358
        g.entrylist = el;\
1357
        g.numEntries = ARRAY_SIZE(el);\
1359
        g.numEntries = ARRAY_SIZE(el);\
1358
    } while (0)
1360
    } while (0)
1359
1361
1360
1362
1361
/*
1363
/*
1362
This function prepares data after ART and CON have been processed.
1364
This function prepares data after ART and CON have been processed.
1363
It also initializes some data in loops rather than statically at compile time.
1365
It also initializes some data in loops rather than statically at compile time.
1364
*/
1366
*/
1365
void M_Init(void)
1367
void M_Init(void)
1366
{
1368
{
1367
    int32_t i, j, k;
1369
    int32_t i, j, k;
1368
1370
1369
    // prepare menu fonts
1371
    // prepare menu fonts
1370
    MF_Redfont.tilenum = MF_RedfontRt.tilenum = MF_RedfontBlue.tilenum = MF_RedfontGreen.tilenum = BIGALPHANUM;
1372
    MF_Redfont.tilenum = MF_RedfontRt.tilenum = MF_RedfontBlue.tilenum = MF_RedfontGreen.tilenum = BIGALPHANUM;
1371
    MF_Bluefont.tilenum = MF_BluefontRed.tilenum = STARTALPHANUM;
1373
    MF_Bluefont.tilenum = MF_BluefontRed.tilenum = STARTALPHANUM;
1372
    MF_Minifont.tilenum = MF_MinifontRed.tilenum = MF_MinifontDarkGray.tilenum = MINIFONT;
1374
    MF_Minifont.tilenum = MF_MinifontRed.tilenum = MF_MinifontDarkGray.tilenum = MINIFONT;
1373
    if (!minitext_lowercase)
1375
    if (!minitext_lowercase)
1374
    {
1376
    {
1375
        MF_Minifont.textflags |= TEXT_UPPERCASE;
1377
        MF_Minifont.textflags |= TEXT_UPPERCASE;
1376
        MF_MinifontRed.textflags |= TEXT_UPPERCASE;
1378
        MF_MinifontRed.textflags |= TEXT_UPPERCASE;
1377
        MF_MinifontDarkGray.textflags |= TEXT_UPPERCASE;
1379
        MF_MinifontDarkGray.textflags |= TEXT_UPPERCASE;
1378
    }
1380
    }
1379
1381
1380
    // prepare gamefuncs and keys
1382
    // prepare gamefuncs and keys
1381
    for (i = 0; i < NUMGAMEFUNCTIONS; ++i)
1383
    for (i = 0; i < NUMGAMEFUNCTIONS; ++i)
1382
    {
1384
    {
1383
        Bstrcpy(MenuGameFuncs[i], gamefunctions[i]);
1385
        Bstrcpy(MenuGameFuncs[i], gamefunctions[i]);
1384
1386
1385
        for (j = 0; j < MAXGAMEFUNCLEN; ++j)
1387
        for (j = 0; j < MAXGAMEFUNCLEN; ++j)
1386
            if (MenuGameFuncs[i][j] == '_')
1388
            if (MenuGameFuncs[i][j] == '_')
1387
                MenuGameFuncs[i][j] = ' ';
1389
                MenuGameFuncs[i][j] = ' ';
1388
1390
1389
        MEOSN_Gamefuncs[i] = MenuGameFuncs[i];
1391
        MEOSN_Gamefuncs[i] = MenuGameFuncs[i];
1390
    }
1392
    }
1391
    MEOSN_Gamefuncs[NUMGAMEFUNCTIONS] = MenuGameFuncNone;
1393
    MEOSN_Gamefuncs[NUMGAMEFUNCTIONS] = MenuGameFuncNone;
1392
    for (i = 0; i < NUMKEYS; ++i)
1394
    for (i = 0; i < NUMKEYS; ++i)
1393
        MEOSN_Keys[i] = key_names[i];
1395
        MEOSN_Keys[i] = key_names[i];
1394
    MEOSN_Keys[NUMKEYS-1] = MenuKeyNone;
1396
    MEOSN_Keys[NUMKEYS-1] = MenuKeyNone;
1395
1397
1396
1398
1397
    // prepare episodes
1399
    // prepare episodes
1398
    k = -1;
1400
    k = -1;
1399
    for (i = 0; i < MAXVOLUMES; ++i)
1401
    for (i = 0; i < MAXVOLUMES; ++i)
1400
    {
1402
    {
1401
        if (EpisodeNames[i][0])
1403
        if (EpisodeNames[i][0])
1402
        {
1404
        {
1403
            MEL_EPISODE[i] = &ME_EPISODE[i];
1405
            MEL_EPISODE[i] = &ME_EPISODE[i];
1404
            ME_EPISODE[i] = ME_EPISODE_TEMPLATE;
1406
            ME_EPISODE[i] = ME_EPISODE_TEMPLATE;
1405
            ME_EPISODE[i].name = EpisodeNames[i];
1407
            ME_EPISODE[i].name = EpisodeNames[i];
1406
1408
1407
            MEOSN_NetEpisodes[i] = EpisodeNames[i];
1409
            MEOSN_NetEpisodes[i] = EpisodeNames[i];
1408
1410
1409
            k = i;
1411
            k = i;
1410
        }
1412
        }
1411
1413
1412
        // prepare levels
1414
        // prepare levels
1413
        for (j = 0; j < MAXLEVELS; ++j)
1415
        for (j = 0; j < MAXLEVELS; ++j)
1414
        {
1416
        {
1415
            MEOSN_NetLevels[i][j] = MapInfo[MAXLEVELS*i+j].name;
1417
            MEOSN_NetLevels[i][j] = MapInfo[MAXLEVELS*i+j].name;
1416
            if (MapInfo[i*MAXLEVELS+j].filename != NULL)
1418
            if (MapInfo[i*MAXLEVELS+j].filename != NULL)
1417
                MEOS_NETOPTIONS_LEVEL[i].numOptions = j+1;
1419
                MEOS_NETOPTIONS_LEVEL[i].numOptions = j+1;
1418
        }
1420
        }
1419
        MEOS_NETOPTIONS_LEVEL[i].optionNames = MEOSN_NetLevels[i];
1421
        MEOS_NETOPTIONS_LEVEL[i].optionNames = MEOSN_NetLevels[i];
1420
    }
1422
    }
1421
    ++k;
1423
    ++k;
1422
    MG_EPISODE.numEntries = g_numVolumes; // k;
1424
    MG_EPISODE.numEntries = g_numVolumes; // k;
1423
    MEOS_NETOPTIONS_EPISODE.numOptions = g_numVolumes + 1; // k+1;
1425
    MEOS_NETOPTIONS_EPISODE.numOptions = g_numVolumes + 1; // k+1;
1424
    MEOSN_NetEpisodes[g_numVolumes] = MenuUserMap;
1426
    MEOSN_NetEpisodes[g_numVolumes] = MenuUserMap;
1425
    MP_TOP_EPISODE.pos.y = (48-(g_numVolumes*2))<<16;
1427
    MP_TOP_EPISODE.pos.y = (48-(g_numVolumes*2))<<16;
1426
1428
1427
    // prepare skills
1429
    // prepare skills
1428
    k = -1;
1430
    k = -1;
1429
    for (i = 0; i < g_numSkills && SkillNames[i][0]; ++i)
1431
    for (i = 0; i < g_numSkills && SkillNames[i][0]; ++i)
1430
    {
1432
    {
1431
        MEL_SKILL[i] = &ME_SKILL[i];
1433
        MEL_SKILL[i] = &ME_SKILL[i];
1432
        ME_SKILL[i] = ME_SKILL_TEMPLATE;
1434
        ME_SKILL[i] = ME_SKILL_TEMPLATE;
1433
        ME_SKILL[i].name = SkillNames[i];
1435
        ME_SKILL[i].name = SkillNames[i];
1434
1436
1435
        MEOSN_NetSkills[i] = SkillNames[i];
1437
        MEOSN_NetSkills[i] = SkillNames[i];
1436
1438
1437
        k = i;
1439
        k = i;
1438
    }
1440
    }
1439
    ++k;
1441
    ++k;
1440
    MG_SKILL.numEntries = g_numSkills; // k;
1442
    MG_SKILL.numEntries = g_numSkills; // k;
1441
    MEOS_NETOPTIONS_MONSTERS.numOptions = g_numSkills + 1; // k+1;
1443
    MEOS_NETOPTIONS_MONSTERS.numOptions = g_numSkills + 1; // k+1;
1442
    MEOSN_NetSkills[g_numSkills] = MenuSkillNone;
1444
    MEOSN_NetSkills[g_numSkills] = MenuSkillNone;
1443
    MP_TOP_SKILL.pos.y = (58 + (4-g_numSkills)*6)<<16;
1445
    MP_TOP_SKILL.pos.y = (58 + (4-g_numSkills)*6)<<16;
1444
    MG_SKILL.currentEntry = 1;
1446
    MG_SKILL.currentEntry = 1;
1445
1447
1446
    // prepare multiplayer gametypes
1448
    // prepare multiplayer gametypes
1447
    k = -1;
1449
    k = -1;
1448
    for (i = 0; i < MAXGAMETYPES; ++i)
1450
    for (i = 0; i < MAXGAMETYPES; ++i)
1449
        if (GametypeNames[i][0])
1451
        if (GametypeNames[i][0])
1450
        {
1452
        {
1451
            MEOSN_NetGametypes[i] = GametypeNames[i];
1453
            MEOSN_NetGametypes[i] = GametypeNames[i];
1452
            k = i;
1454
            k = i;
1453
        }
1455
        }
1454
    ++k;
1456
    ++k;
1455
    MEOS_NETOPTIONS_GAMETYPE.numOptions = k;
1457
    MEOS_NETOPTIONS_GAMETYPE.numOptions = k;
1456
1458
1457
    // prepare savegames
1459
    // prepare savegames
1458
    for (i = 0; i < MAXSAVEGAMES; ++i)
1460
    for (i = 0; i < MAXSAVEGAMES; ++i)
1459
    {
1461
    {
1460
        MEL_LOAD[i] = &ME_LOAD[i];
1462
        MEL_LOAD[i] = &ME_LOAD[i];
1461
        MEL_SAVE[i] = &ME_SAVE[i];
1463
        MEL_SAVE[i] = &ME_SAVE[i];
1462
        ME_LOAD[i] = ME_LOAD_TEMPLATE;
1464
        ME_LOAD[i] = ME_LOAD_TEMPLATE;
1463
        ME_SAVE[i] = ME_SAVE_TEMPLATE;
1465
        ME_SAVE[i] = ME_SAVE_TEMPLATE;
1464
        ME_SAVE[i].entry = &MEO_SAVE[i];
1466
        ME_SAVE[i].entry = &MEO_SAVE[i];
1465
        MEO_SAVE[i] = MEO_SAVE_TEMPLATE;
1467
        MEO_SAVE[i] = MEO_SAVE_TEMPLATE;
1466
1468
1467
        ME_LOAD[i].name = ud.savegame[i];
1469
        ME_LOAD[i].name = ud.savegame[i];
1468
        MEO_SAVE[i].variable = ud.savegame[i];
1470
        MEO_SAVE[i].variable = ud.savegame[i];
1469
    }
1471
    }
1470
1472
1471
    // prepare text chat macros
1473
    // prepare text chat macros
1472
    for (i = 0; i < MAXRIDECULE; ++i)
1474
    for (i = 0; i < MAXRIDECULE; ++i)
1473
    {
1475
    {
1474
        MEL_MACROS[i] = &ME_MACROS[i];
1476
        MEL_MACROS[i] = &ME_MACROS[i];
1475
        ME_MACROS[i] = ME_MACROS_TEMPLATE;
1477
        ME_MACROS[i] = ME_MACROS_TEMPLATE;
1476
        ME_MACROS[i].entry = &MEO_MACROS[i];
1478
        ME_MACROS[i].entry = &MEO_MACROS[i];
1477
        MEO_MACROS[i] = MEO_MACROS_TEMPLATE;
1479
        MEO_MACROS[i] = MEO_MACROS_TEMPLATE;
1478
1480
1479