Subversion Repositories eduke32

Rev

Rev 4624 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4624 Rev 4645
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
static MenuPos_t MP_OPTIONS =              { { MENU_MARGIN_WIDE<<16,         37<<16, }, 4<<16, 1<<16,  216<<16, 160<<16,  10<<16, 32768, };
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_PLAYER_1 =             { { MENU_MARGIN_WIDE<<16,         37<<16, }, 4<<16, 1<<16,   90<<16, 160<<16,  10<<16, 32768, };
141
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_2 =             { { MENU_MARGIN_WIDE<<16,         37<<16, }, 8<<16, 1<<16,   90<<16, 160<<16,  10<<16, 32768, };
-
 
143
static MenuPos_t MP_PLAYER_3 =             { { MENU_MARGIN_WIDE<<16,         37<<16, }, 8<<16, 1<<16,  190<<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_MACROS =               { { 26<<16,                       40<<16, }, 4<<16, 2<<16,    1<<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_VIDEOSETUP =           { { MENU_MARGIN_REGULAR<<16,      38<<16, }, 6<<16, 7<<16,  168<<16, -190<<16,  20<<16, 65536, };
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_APPLY =     { { (MENU_MARGIN_REGULAR+16)<<16, 38<<16, }, 6<<16, 7<<16,  168<<16, -190<<16,  36<<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_KEYBOARDSETUPFUNCS =   { { 70<<16,                       34<<16, }, 4<<16, 3<<16,  100<<16, 151<<16,  10<<16, 32768, };
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_KEYBOARDSETUP =        { { MENU_MARGIN_CENTER<<16,       37<<16, }, 4<<16, 0<<16,  0,       160<<16,  92<<16, 32768, };
-
 
149
static MenuPos_t MP_MOUSEJOYSETUPBTNS =    { { 76<<16,                       34<<16, }, 4<<16, 3<<16,  100<<16, 143<<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, };
150
static MenuPos_t MP_GAMEFUNCLIST =         { { 100<<16,                      51<<16, }, 4<<16, 3<<16,  100<<16, 152<<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, };
151
static MenuPos_t MP_MOUSESETUP =           { { MENU_MARGIN_REGULAR<<16,      37<<16, }, 4<<16, 2<<16,  200<<16, 160<<16,  10<<16, 32768, };
-
 
152
static MenuPos_t MP_COLCORR =              { { MENU_MARGIN_REGULAR<<16,      86<<16, }, 8<<16, 2<<16, -240<<16, 190<<16,  20<<16, 65536, };
149
static MenuPos_t MP_COLCORR =              { { MENU_MARGIN_REGULAR<<16,      86<<16, }, 8<<16, 2<<16, -240<<16, 190<<16,  20<<16, 65536, };
153
static MenuPos_t MP_REDSLIDE =             { { MENU_MARGIN_WIDE<<16,         37<<16, }, 8<<16, 2<<16,  170<<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, };
154
static MenuPos_t MP_LOADSAVE =             { { 223<<16,                      48<<16, }, 4<<16, 7<<16,    1<<16, 320<<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, };
155
static MenuPos_t MP_NETSETUP =             { { (MENU_MARGIN_REGULAR-4)<<16,  38<<16, }, 4<<16, 2<<16,  114<<16, 190<<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, };;
156
static MenuPos_t MP_ADULTMODE =            { { (MENU_MARGIN_REGULAR+20)<<16, 54<<16, }, 4<<16, 4<<16,  200<<16, -190<<16,  20<<16, 65536, };
-
 
157
153
158
154
159
// common menu option sets
155
// common menu option sets
160
#define MAKE_MENUOPTIONSET(a, b, c) { a, b, c, ARRAY_SIZE(b), &MP_GAMEFUNCLIST, -1, 0, }
156
#define MAKE_MENUOPTIONSET(a, b, c) { a, b, c, ARRAY_SIZE(b), &MP_GAMEFUNCLIST, -1, 0, }
161
#define MAKE_MENUOPTIONSETLIST(a, b, c, d) { a, b, c, ARRAY_SIZE(b), d, -1, 0, }
157
#define MAKE_MENUOPTIONSETLIST(a, b, c, d) { a, b, c, ARRAY_SIZE(b), d, -1, 0, }
162
#define MAKE_MENUOPTIONSETDYN(...) { __VA_ARGS__, &MP_GAMEFUNCLIST, -1, 0, }
158
#define MAKE_MENUOPTIONSETDYN(...) { __VA_ARGS__, &MP_GAMEFUNCLIST, -1, 0, }
163
#define MAKE_MENUOPTIONSETDYNLIST(...) { __VA_ARGS__, -1, 0, }
159
#define MAKE_MENUOPTIONSETDYNLIST(...) { __VA_ARGS__, -1, 0, }
164
160
165
static char *MEOSN_OffOn[] = { "Off", "On", };
161
static char *MEOSN_OffOn[] = { "Off", "On", };
166
static MenuOptionSet_t MEOS_OffOn = MAKE_MENUOPTIONSET( 0x3, MEOSN_OffOn, NULL );
162
static MenuOptionSet_t MEOS_OffOn = MAKE_MENUOPTIONSET( 0x3, MEOSN_OffOn, NULL );
167
static char *MEOSN_OnOff[] = { "On", "Off", };
163
static char *MEOSN_OnOff[] = { "On", "Off", };
168
static MenuOptionSet_t MEOS_OnOff = MAKE_MENUOPTIONSET( 0x3, MEOSN_OnOff, NULL );
164
static MenuOptionSet_t MEOS_OnOff = MAKE_MENUOPTIONSET( 0x3, MEOSN_OnOff, NULL );
169
static char *MEOSN_NoYes[] = { "No", "Yes", };
165
static char *MEOSN_NoYes[] = { "No", "Yes", };
170
static MenuOptionSet_t MEOS_NoYes = MAKE_MENUOPTIONSET( 0x3, MEOSN_NoYes, NULL );
166
static MenuOptionSet_t MEOS_NoYes = MAKE_MENUOPTIONSET( 0x3, MEOSN_NoYes, NULL );
171
static char *MEOSN_YesNo[] = { "Yes", "No", };
167
static char *MEOSN_YesNo[] = { "Yes", "No", };
172
static MenuOptionSet_t MEOS_YesNo = MAKE_MENUOPTIONSET( 0x3, MEOSN_YesNo, NULL );
168
static MenuOptionSet_t MEOS_YesNo = MAKE_MENUOPTIONSET( 0x3, MEOSN_YesNo, NULL );
173
169
174
170
175
static char MenuGameFuncs[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN];
171
static char MenuGameFuncs[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN];
176
static char *MenuGameFuncNone = "  -None-";
172
static char *MenuGameFuncNone = "  -None-";
177
static char *MEOSN_Gamefuncs[NUMGAMEFUNCTIONS+1];
173
static char *MEOSN_Gamefuncs[NUMGAMEFUNCTIONS+1];
178
static MenuOptionSet_t MEOS_Gamefuncs = MAKE_MENUOPTIONSET( 0x1, MEOSN_Gamefuncs, NULL );
174
static MenuOptionSet_t MEOS_Gamefuncs = MAKE_MENUOPTIONSET( 0x1, MEOSN_Gamefuncs, NULL );
179
175
180
176
181
177
182
/*
178
/*
183
MenuEntry_t and MenuGroup_t are passed in arrays of pointers so that the callback function
179
MenuEntry_t and MenuGroup_t are passed in arrays of pointers so that the callback function
184
that is called when an entry is modified or activated can test equality of the current
180
that is called when an entry is modified or activated can test equality of the current
185
entry/group pointer directly against the known ones, instead of relying on an ID number.
181
entry/group pointer directly against the known ones, instead of relying on an ID number.
186

182

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