Subversion Repositories eduke32

Rev

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

Rev 4623 Rev 4624
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;
-
 
85
    if (s[p] == ':') s[p] = 0;
84
    menutext(160,24,0,0,caption);
86
    menutext(160,24,0,0,s);
-
 
87
    Bfree(s);
85
}
88
}
86
89
87
extern int32_t g_quitDeadline;
90
extern int32_t g_quitDeadline;
88
91
89
92
90
93
91
94
92
95
93
96
94
97
95
98
96
99
97
100
98
101
99
102
100
103
101
/*
104
/*
102
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
103
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
104
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.
105

108

106
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.
107
*/
110
*/
108
111
109
112
110
// common font types
113
// common font types
111
// tilenums are set after namesdyn runs
114
// tilenums are set after namesdyn runs
112
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, };
113
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, };
114
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, };
115
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, };
116
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, };
117
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, };
118
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, };
119
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, };
120
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, };
121
124
122
125
123
// common positions
126
// common positions
124
#define MENU_MARGIN_REGULAR 40
127
#define MENU_MARGIN_REGULAR 40
125
#define MENU_MARGIN_WIDE    32
128
#define MENU_MARGIN_WIDE    32
126
#define MENU_MARGIN_CENTER  160
129
#define MENU_MARGIN_CENTER  160
127
#define MENU_HEIGHT_CENTER  100
130
#define MENU_HEIGHT_CENTER  100
128
131
129
132
130
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, };
131
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, };
132
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, };
133
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, };
134
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, };
135
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, };
136
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, };
137
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, };
138
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, };
139
static MenuPos_t MP_PLAYER_2 =             { { MENU_MARGIN_WIDE<<16,         37<<16, }, 8<<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, };
140
static MenuPos_t MP_PLAYER_3 =             { { MENU_MARGIN_WIDE<<16,         37<<16, }, 8<<16, 1<<16,  190<<16, 160<<16,  10<<16, 32768, };
143
static MenuPos_t MP_PLAYER_3 =             { { MENU_MARGIN_WIDE<<16,         37<<16, }, 8<<16, 1<<16,  190<<16, 160<<16,  10<<16, 32768, };
141
static MenuPos_t MP_MACROS =               { { 26<<16,                       40<<16, }, 4<<16, 2<<16,    1<<16, 160<<16,  10<<16, 32768, };
144
static MenuPos_t MP_MACROS =               { { 26<<16,                       40<<16, }, 4<<16, 2<<16,    1<<16, 160<<16,  10<<16, 32768, };
142
static MenuPos_t MP_VIDEOSETUP =           { { MENU_MARGIN_REGULAR<<16,      38<<16, }, 6<<16, 7<<16,  168<<16, -190<<16,  20<<16, 65536, };
145
static MenuPos_t MP_VIDEOSETUP =           { { MENU_MARGIN_REGULAR<<16,      38<<16, }, 6<<16, 7<<16,  168<<16, -190<<16,  20<<16, 65536, };
143
static MenuPos_t MP_VIDEOSETUP_APPLY =     { { (MENU_MARGIN_REGULAR+16)<<16, 38<<16, }, 6<<16, 7<<16,  168<<16, -190<<16,  36<<16, 65536, };
146
static MenuPos_t MP_VIDEOSETUP_APPLY =     { { (MENU_MARGIN_REGULAR+16)<<16, 38<<16, }, 6<<16, 7<<16,  168<<16, -190<<16,  36<<16, 65536, };
144
static MenuPos_t MP_KEYBOARDSETUPFUNCS =   { { 70<<16,                       34<<16, }, 4<<16, 3<<16,  100<<16, 151<<16,  10<<16, 32768, };
147
static MenuPos_t MP_KEYBOARDSETUPFUNCS =   { { 70<<16,                       34<<16, }, 4<<16, 3<<16,  100<<16, 151<<16,  10<<16, 32768, };
145
static MenuPos_t MP_KEYBOARDSETUP =        { { MENU_MARGIN_CENTER<<16,       37<<16, }, 4<<16, 0<<16,  0,       160<<16,  92<<16, 32768, };
148
static MenuPos_t MP_KEYBOARDSETUP =        { { MENU_MARGIN_CENTER<<16,       37<<16, }, 4<<16, 0<<16,  0,       160<<16,  92<<16, 32768, };
146
static MenuPos_t MP_MOUSEJOYSETUPBTNS =    { { 76<<16,                       34<<16, }, 4<<16, 3<<16,  100<<16, 143<<16,  10<<16, 32768, };
149
static MenuPos_t MP_MOUSEJOYSETUPBTNS =    { { 76<<16,                       34<<16, }, 4<<16, 3<<16,  100<<16, 143<<16,  10<<16, 32768, };
147
static MenuPos_t MP_GAMEFUNCLIST =         { { 100<<16,                      51<<16, }, 4<<16, 3<<16,  100<<16, 152<<16,  10<<16, 32768, };
150
static MenuPos_t MP_GAMEFUNCLIST =         { { 100<<16,                      51<<16, }, 4<<16, 3<<16,  100<<16, 152<<16,  10<<16, 32768, };
148
static MenuPos_t MP_MOUSESETUP =           { { MENU_MARGIN_REGULAR<<16,      37<<16, }, 4<<16, 2<<16,  200<<16, 160<<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, };
149
static MenuPos_t MP_COLCORR =              { { MENU_MARGIN_REGULAR<<16,      86<<16, }, 8<<16, 2<<16, -240<<16, 190<<16,  20<<16, 65536, };
152
static MenuPos_t MP_COLCORR =              { { MENU_MARGIN_REGULAR<<16,      86<<16, }, 8<<16, 2<<16, -240<<16, 190<<16,  20<<16, 65536, };
150
static MenuPos_t MP_REDSLIDE =             { { MENU_MARGIN_WIDE<<16,         37<<16, }, 8<<16, 2<<16,  170<<16, 190<<16,  20<<16, 65536, };
153
static MenuPos_t MP_REDSLIDE =             { { MENU_MARGIN_WIDE<<16,         37<<16, }, 8<<16, 2<<16,  170<<16, 190<<16,  20<<16, 65536, };
151
static MenuPos_t MP_LOADSAVE =             { { 223<<16,                      48<<16, }, 4<<16, 7<<16,    1<<16, 320<<16,  20<<16, 65536, };
154
static MenuPos_t MP_LOADSAVE =             { { 223<<16,                      48<<16, }, 4<<16, 7<<16,    1<<16, 320<<16,  20<<16, 65536, };
152
static MenuPos_t MP_NETSETUP =             { { (MENU_MARGIN_REGULAR-4)<<16,  38<<16, }, 4<<16, 2<<16,  114<<16, 190<<16,  20<<16, 65536, };
155
static MenuPos_t MP_NETSETUP =             { { (MENU_MARGIN_REGULAR-4)<<16,  38<<16, }, 4<<16, 2<<16,  114<<16, 190<<16,  20<<16, 65536, };
153
static MenuPos_t MP_ADULTMODE =            { { (MENU_MARGIN_REGULAR+20)<<16, 54<<16, }, 4<<16, 4<<16,  200<<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, };
154
157
155
158
156
// common menu option sets
159
// common menu option sets
157
#define MAKE_MENUOPTIONSET(a, b, c) { a, b, c, ARRAY_SIZE(b), &MP_GAMEFUNCLIST, -1, 0, }
160
#define MAKE_MENUOPTIONSET(a, b, c) { a, b, c, ARRAY_SIZE(b), &MP_GAMEFUNCLIST, -1, 0, }
158
#define MAKE_MENUOPTIONSETLIST(a, b, c, d) { a, b, c, ARRAY_SIZE(b), d, -1, 0, }
161
#define MAKE_MENUOPTIONSETLIST(a, b, c, d) { a, b, c, ARRAY_SIZE(b), d, -1, 0, }
159
#define MAKE_MENUOPTIONSETDYN(...) { __VA_ARGS__, &MP_GAMEFUNCLIST, -1, 0, }
162
#define MAKE_MENUOPTIONSETDYN(...) { __VA_ARGS__, &MP_GAMEFUNCLIST, -1, 0, }
160
#define MAKE_MENUOPTIONSETDYNLIST(...) { __VA_ARGS__, -1, 0, }
163
#define MAKE_MENUOPTIONSETDYNLIST(...) { __VA_ARGS__, -1, 0, }
161
164
162
static char *MEOSN_OffOn[] = { "Off", "On", };
165
static char *MEOSN_OffOn[] = { "Off", "On", };
163
static MenuOptionSet_t MEOS_OffOn = MAKE_MENUOPTIONSET( 0x3, MEOSN_OffOn, NULL );
166
static MenuOptionSet_t MEOS_OffOn = MAKE_MENUOPTIONSET( 0x3, MEOSN_OffOn, NULL );
164
static char *MEOSN_OnOff[] = { "On", "Off", };
167
static char *MEOSN_OnOff[] = { "On", "Off", };
165
static MenuOptionSet_t MEOS_OnOff = MAKE_MENUOPTIONSET( 0x3, MEOSN_OnOff, NULL );
168
static MenuOptionSet_t MEOS_OnOff = MAKE_MENUOPTIONSET( 0x3, MEOSN_OnOff, NULL );
166
static char *MEOSN_NoYes[] = { "No", "Yes", };
169
static char *MEOSN_NoYes[] = { "No", "Yes", };
167
static MenuOptionSet_t MEOS_NoYes = MAKE_MENUOPTIONSET( 0x3, MEOSN_NoYes, NULL );
170
static MenuOptionSet_t MEOS_NoYes = MAKE_MENUOPTIONSET( 0x3, MEOSN_NoYes, NULL );
168
static char *MEOSN_YesNo[] = { "Yes", "No", };
171
static char *MEOSN_YesNo[] = { "Yes", "No", };
169
static MenuOptionSet_t MEOS_YesNo = MAKE_MENUOPTIONSET( 0x3, MEOSN_YesNo, NULL );
172
static MenuOptionSet_t MEOS_YesNo = MAKE_MENUOPTIONSET( 0x3, MEOSN_YesNo, NULL );
170
173
171
174
172
static char MenuGameFuncs[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN];
175
static char MenuGameFuncs[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN];
173
static char *MenuGameFuncNone = "  -None-";
176
static char *MenuGameFuncNone = "  -None-";
174
static char *MEOSN_Gamefuncs[NUMGAMEFUNCTIONS+1];
177
static char *MEOSN_Gamefuncs[NUMGAMEFUNCTIONS+1];
175
static MenuOptionSet_t MEOS_Gamefuncs = MAKE_MENUOPTIONSET( 0x1, MEOSN_Gamefuncs, NULL );
178
static MenuOptionSet_t MEOS_Gamefuncs = MAKE_MENUOPTIONSET( 0x1, MEOSN_Gamefuncs, NULL );
176
179
177
180
178
181
179
/*
182
/*
180
MenuEntry_t and MenuGroup_t are passed in arrays of pointers so that the callback function
183
MenuEntry_t and MenuGroup_t are passed in arrays of pointers so that the callback function
181
that is called when an entry is modified or activated can test equality of the current
184
that is called when an entry is modified or activated can test equality of the current
182
entry/group pointer directly against the known ones, instead of relying on an ID number.
185
entry/group pointer directly against the known ones, instead of relying on an ID number.
183

186

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