Subversion Repositories eduke32

Rev

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

Rev 8772 Rev 8773
1
//-------------------------------------------------------------------------
1
//-------------------------------------------------------------------------
2
/*
2
/*
3
Copyright (C) 2016 EDuke32 developers and contributors
3
Copyright (C) 2016 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 "menus.h"
23
#include "menus.h"
24
24
25
#include "al_midi.h"
25
#include "al_midi.h"
26
#include "cheats.h"
26
#include "cheats.h"
27
#include "communityapi.h"
27
#include "communityapi.h"
28
#include "compat.h"
28
#include "compat.h"
29
#include "demo.h"
29
#include "demo.h"
30
#include "duke3d.h"
30
#include "duke3d.h"
31
#include "in_android.h"
31
#include "in_android.h"
32
#include "input.h"
32
#include "input.h"
33
#include "osdcmds.h"
33
#include "osdcmds.h"
34
#include "savegame.h"
34
#include "savegame.h"
35
#include "xxhash.h"
35
#include "xxhash.h"
36
#include "music.h"
36
#include "music.h"
37
37
38
#ifndef __ANDROID__
38
#ifndef __ANDROID__
39
droidinput_t droidinput;
39
droidinput_t droidinput;
40
#endif
40
#endif
41
41
42
// common positions
42
// common positions
43
#define MENU_MARGIN_REGULAR 40
43
#define MENU_MARGIN_REGULAR 40
44
#define MENU_MARGIN_WIDE    32
44
#define MENU_MARGIN_WIDE    32
45
#define MENU_MARGIN_CENTER  160
45
#define MENU_MARGIN_CENTER  160
46
#define MENU_HEIGHT_CENTER  100
46
#define MENU_HEIGHT_CENTER  100
47
47
48
#define USERMAPENTRYLENGTH 25
48
#define USERMAPENTRYLENGTH 25
49
49
50
static FORCE_INLINE void Menu_StartTextInput()
50
static FORCE_INLINE void Menu_StartTextInput()
51
{
51
{
52
    KB_FlushKeyboardQueue();
52
    KB_FlushKeyboardQueue();
53
    KB_ClearKeysDown();
53
    KB_ClearKeysDown();
54
#if defined EDUKE32_TOUCH_DEVICES && defined SDL_MAJOR_VERSION && SDL_MAJOR_VERSION > 1
54
#if defined EDUKE32_TOUCH_DEVICES && defined SDL_MAJOR_VERSION && SDL_MAJOR_VERSION > 1
55
# if defined __ANDROID__
55
# if defined __ANDROID__
56
    AndroidShowKeyboard(1);
56
    AndroidShowKeyboard(1);
57
# else
57
# else
58
    SDL_StartTextInput();
58
    SDL_StartTextInput();
59
# endif
59
# endif
60
#endif
60
#endif
61
}
61
}
62
62
63
static FORCE_INLINE void Menu_StopTextInput()
63
static FORCE_INLINE void Menu_StopTextInput()
64
{
64
{
65
#if defined EDUKE32_TOUCH_DEVICES && defined SDL_MAJOR_VERSION && SDL_MAJOR_VERSION > 1
65
#if defined EDUKE32_TOUCH_DEVICES && defined SDL_MAJOR_VERSION && SDL_MAJOR_VERSION > 1
66
# if defined __ANDROID__
66
# if defined __ANDROID__
67
    AndroidShowKeyboard(0);
67
    AndroidShowKeyboard(0);
68
# else
68
# else
69
    SDL_StopTextInput();
69
    SDL_StopTextInput();
70
# endif
70
# endif
71
#endif
71
#endif
72
}
72
}
73
73
74
static FORCE_INLINE void rotatesprite_ybounds(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t picnum, int8_t dashade, char dapalnum, int32_t dastat, int32_t ydim_upper, int32_t ydim_lower)
74
static FORCE_INLINE void rotatesprite_ybounds(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t picnum, int8_t dashade, char dapalnum, int32_t dastat, int32_t ydim_upper, int32_t ydim_lower)
75
{
75
{
76
    rotatesprite_(sx, sy, z, a, picnum, dashade, dapalnum, dastat, 0, 0, 0, ydim_upper, xdim-1, ydim_lower);
76
    rotatesprite_(sx, sy, z, a, picnum, dashade, dapalnum, dastat, 0, 0, 0, ydim_upper, xdim-1, ydim_lower);
77
}
77
}
78
78
79
static void mgametext(int32_t x, int32_t y, char const * t)
79
static void mgametext(int32_t x, int32_t y, char const * t)
80
{
80
{
81
    G_ScreenText(MF_Bluefont.tilenum, x, y, MF_Bluefont.zoom, 0, 0, t, 0, MF_Bluefont.pal, 2|8|16, 0, MF_Bluefont.emptychar.x, MF_Bluefont.emptychar.y, MF_Bluefont.between.x, MF_Bluefont.between.y, MF_Bluefont.textflags, 0, 0, xdim-1, ydim-1);
81
    G_ScreenText(MF_Bluefont.tilenum, x, y, MF_Bluefont.zoom, 0, 0, t, 0, MF_Bluefont.pal, 2|8|16, 0, MF_Bluefont.emptychar.x, MF_Bluefont.emptychar.y, MF_Bluefont.between.x, MF_Bluefont.between.y, MF_Bluefont.textflags, 0, 0, xdim-1, ydim-1);
82
}
82
}
83
83
84
static vec2_t mgametextcenterat(int32_t x, int32_t y, char const * t, int32_t f = 0)
84
static vec2_t mgametextcenterat(int32_t x, int32_t y, char const * t, int32_t f = 0)
85
{
85
{
86
    return G_ScreenText(MF_Bluefont.tilenum, x, y, MF_Bluefont.zoom, 0, 0, t, 0, MF_Bluefont.pal, 2|8|16, 0, MF_Bluefont.emptychar.x, MF_Bluefont.emptychar.y, MF_Bluefont.between.x, MF_Bluefont.between.y, MF_Bluefont.textflags|f|TEXT_XCENTER, 0, 0, xdim-1, ydim-1);
86
    return G_ScreenText(MF_Bluefont.tilenum, x, y, MF_Bluefont.zoom, 0, 0, t, 0, MF_Bluefont.pal, 2|8|16, 0, MF_Bluefont.emptychar.x, MF_Bluefont.emptychar.y, MF_Bluefont.between.x, MF_Bluefont.between.y, MF_Bluefont.textflags|f|TEXT_XCENTER, 0, 0, xdim-1, ydim-1);
87
}
87
}
88
static vec2_t mgametextcenter(int32_t x, int32_t y, char const * t, int32_t f = 0)
88
static vec2_t mgametextcenter(int32_t x, int32_t y, char const * t, int32_t f = 0)
89
{
89
{
90
    return mgametextcenterat((MENU_MARGIN_CENTER<<16) + x, y, t, f);
90
    return mgametextcenterat((MENU_MARGIN_CENTER<<16) + x, y, t, f);
91
}
91
}
92
92
93
#define mminitext(x,y,t,p) minitext_(x, y, t, 0, p, 2|8|16|ROTATESPRITE_FULL16)
93
#define mminitext(x,y,t,p) minitext_(x, y, t, 0, p, 2|8|16|ROTATESPRITE_FULL16)
94
#define mmenutext menutext
94
#define mmenutext menutext
95
95
96
#ifndef EDUKE32_STANDALONE
96
#ifndef EDUKE32_STANDALONE
97
static void shadowminitext(int32_t x, int32_t y, const char *t, int32_t p)
97
static void shadowminitext(int32_t x, int32_t y, const char *t, int32_t p)
98
{
98
{
99
    int32_t f = 0;
99
    int32_t f = 0;
100
100
101
    if (!minitext_lowercase)
101
    if (!minitext_lowercase)
102
        f |= TEXT_UPPERCASE;
102
        f |= TEXT_UPPERCASE;
103
103
104
    G_ScreenTextShadow(1, 1, 4, MINIFONT, x, y, 65536, 0, 0, t, 0, p, 2|8|16, 0, 4<<16, 8<<16, 1<<16, 0, f, 0, 0, xdim-1, ydim-1);
104
    G_ScreenTextShadow(1, 1, 4, MINIFONT, x, y, 65536, 0, 0, t, 0, p, 2|8|16, 0, 4<<16, 8<<16, 1<<16, 0, f, 0, 0, xdim-1, ydim-1);
105
}
105
}
106
#endif
106
#endif
107
static void creditsminitext(int32_t x, int32_t y, const char *t, int32_t p)
107
static void creditsminitext(int32_t x, int32_t y, const char *t, int32_t p)
108
{
108
{
109
    int32_t f = TEXT_XCENTER;
109
    int32_t f = TEXT_XCENTER;
110
110
111
    if (!minitext_lowercase)
111
    if (!minitext_lowercase)
112
        f |= TEXT_UPPERCASE;
112
        f |= TEXT_UPPERCASE;
113
113
114
    G_ScreenTextShadow(1, 1, 4, MINIFONT, x, y, 65536, 0, 0, t, 0, p, 2|8|16, 0, 4<<16, 8<<16, 1<<16, 0, f, 0, 0, xdim-1, ydim-1);
114
    G_ScreenTextShadow(1, 1, 4, MINIFONT, x, y, 65536, 0, 0, t, 0, p, 2|8|16, 0, 4<<16, 8<<16, 1<<16, 0, f, 0, 0, xdim-1, ydim-1);
115
}
115
}
116
116
117
#pragma pack(push,1)
117
#pragma pack(push,1)
118
static savehead_t savehead;
118
static savehead_t savehead;
119
#pragma pack(pop)
119
#pragma pack(pop)
120
120
121
static void Menu_DrawBackground(const vec2_t origin)
121
static void Menu_DrawBackground(const vec2_t origin)
122
{
122
{
123
    rotatesprite_fs(origin.x + (MENU_MARGIN_CENTER<<16), origin.y + (100<<16), 65536L,0,MENUSCREEN,16,0,10+64);
123
    rotatesprite_fs(origin.x + (MENU_MARGIN_CENTER<<16), origin.y + (100<<16), 65536L,0,MENUSCREEN,16,0,10+64);
124
}
124
}
125
125
126
static void Menu_DrawTopBar(const vec2_t origin)
126
static void Menu_DrawTopBar(const vec2_t origin)
127
{
127
{
128
    if ((G_GetLogoFlags() & LOGO_NOTITLEBAR) == 0)
128
    if ((G_GetLogoFlags() & LOGO_NOTITLEBAR) == 0)
129
        rotatesprite_fs(origin.x + (MENU_MARGIN_CENTER<<16), origin.y + (19<<16), MF_Redfont.cursorScale, 0,MENUBAR,16,0,10);
129
        rotatesprite_fs(origin.x + (MENU_MARGIN_CENTER<<16), origin.y + (19<<16), MF_Redfont.cursorScale, 0,MENUBAR,16,0,10);
130
}
130
}
131
131
132
static void Menu_DrawTopBarCaption(const char *caption, const vec2_t origin)
132
static void Menu_DrawTopBarCaption(const char *caption, const vec2_t origin)
133
{
133
{
134
    static char t[64];
134
    static char t[64];
135
    size_t const srclen = strlen(caption);
135
    size_t const srclen = strlen(caption);
136
    size_t const dstlen = min(srclen, ARRAY_SIZE(t)-1);
136
    size_t const dstlen = min(srclen, ARRAY_SIZE(t)-1);
137
    memcpy(t, caption, dstlen);
137
    memcpy(t, caption, dstlen);
138
    t[dstlen] = '\0';
138
    t[dstlen] = '\0';
139
    char *p = &t[dstlen-1];
139
    char *p = &t[dstlen-1];
140
    if (*p == ':')
140
    if (*p == ':')
141
        *p = '\0';
141
        *p = '\0';
142
    captionmenutext(origin.x + (MENU_MARGIN_CENTER<<16), origin.y + (24<<16) + ((15>>1)<<16), t);
142
    captionmenutext(origin.x + (MENU_MARGIN_CENTER<<16), origin.y + (24<<16) + ((15>>1)<<16), t);
143
}
143
}
144
144
145
static FORCE_INLINE int32_t Menu_CursorShade(void)
145
static FORCE_INLINE int32_t Menu_CursorShade(void)
146
{
146
{
147
    return VM_OnEventWithReturn(EVENT_MENUCURSORSHADE, -1, myconnectindex, 4-(sintable[((int32_t) totalclock<<4)&2047]>>11));
147
    return VM_OnEventWithReturn(EVENT_MENUCURSORSHADE, -1, myconnectindex, 4-(sintable[((int32_t) totalclock<<4)&2047]>>11));
148
}
148
}
149
static void Menu_DrawCursorCommon(int32_t x, int32_t y, int32_t z, int32_t picnum, int32_t ydim_upper = 0, int32_t ydim_lower = ydim-1)
149
static void Menu_DrawCursorCommon(int32_t x, int32_t y, int32_t z, int32_t picnum, int32_t ydim_upper = 0, int32_t ydim_lower = ydim-1)
150
{
150
{
151
    rotatesprite_(x, y, z, 0, picnum, Menu_CursorShade(), 0, 2|8, 0, 0, 0, ydim_upper, xdim-1, ydim_lower);
151
    rotatesprite_(x, y, z, 0, picnum, Menu_CursorShade(), 0, 2|8, 0, 0, 0, ydim_upper, xdim-1, ydim_lower);
152
}
152
}
153
static void Menu_DrawCursorLeft(int32_t x, int32_t y, int32_t z)
153
static void Menu_DrawCursorLeft(int32_t x, int32_t y, int32_t z)
154
{
154
{
155
    if (FURY) return;
155
    if (FURY) return;
156
    Menu_DrawCursorCommon(x, y, z, VM_OnEventWithReturn(EVENT_MENUCURSORLEFT, -1, myconnectindex, SPINNINGNUKEICON+(((int32_t) totalclock>>3)%7)));
156
    Menu_DrawCursorCommon(x, y, z, VM_OnEventWithReturn(EVENT_MENUCURSORLEFT, -1, myconnectindex, SPINNINGNUKEICON+(((int32_t) totalclock>>3)%7)));
157
}
157
}
158
static void Menu_DrawCursorRight(int32_t x, int32_t y, int32_t z)
158
static void Menu_DrawCursorRight(int32_t x, int32_t y, int32_t z)
159
{
159
{
160
    if (FURY) return;
160
    if (FURY) return;
161
    Menu_DrawCursorCommon(x, y, z, VM_OnEventWithReturn(EVENT_MENUCURSORRIGHT, -1, myconnectindex, SPINNINGNUKEICON+6-((6+((int32_t) totalclock>>3))%7)));
161
    Menu_DrawCursorCommon(x, y, z, VM_OnEventWithReturn(EVENT_MENUCURSORRIGHT, -1, myconnectindex, SPINNINGNUKEICON+6-((6+((int32_t) totalclock>>3))%7)));
162
}
162
}
163
static void Menu_DrawCursorTextTile(int32_t x, int32_t y, int32_t h, int32_t picnum, vec2_16_t const & siz, int32_t ydim_upper = 0, int32_t ydim_lower = ydim-1)
163
static void Menu_DrawCursorTextTile(int32_t x, int32_t y, int32_t h, int32_t picnum, vec2_16_t const & siz, int32_t ydim_upper = 0, int32_t ydim_lower = ydim-1)
164
{
164
{
165
    vec2_t const adjsiz = { (siz.x>>1)<<16, siz.y<<16 };
165
    vec2_t const adjsiz = { (siz.x>>1)<<16, siz.y<<16 };
166
    Menu_DrawCursorCommon(x + scale(adjsiz.x, h, adjsiz.y), y, divscale16(h, adjsiz.y), picnum, ydim_upper, ydim_lower);
166
    Menu_DrawCursorCommon(x + scale(adjsiz.x, h, adjsiz.y), y, divscale16(h, adjsiz.y), picnum, ydim_upper, ydim_lower);
167
}
167
}
168
static void Menu_DrawCursorText(int32_t x, int32_t y, int32_t h, int32_t ydim_upper = 0, int32_t ydim_lower = ydim-1)
168
static void Menu_DrawCursorText(int32_t x, int32_t y, int32_t h, int32_t ydim_upper = 0, int32_t ydim_lower = ydim-1)
169
{
169
{
170
    vec2_16_t const & siz = tilesiz[SPINNINGNUKEICON];
170
    vec2_16_t const & siz = tilesiz[SPINNINGNUKEICON];
171
171
172
    if (FURY || siz.x == 0)
172
    if (FURY || siz.x == 0)
173
    {
173
    {
174
        Menu_DrawCursorTextTile(x, y, h, SMALLFNTCURSOR, tilesiz[SMALLFNTCURSOR], ydim_upper, ydim_lower);
174
        Menu_DrawCursorTextTile(x, y, h, SMALLFNTCURSOR, tilesiz[SMALLFNTCURSOR], ydim_upper, ydim_lower);
175
        return;
175
        return;
176
    }
176
    }
177
177
178
    Menu_DrawCursorTextTile(x, y, h, SPINNINGNUKEICON+(((int32_t) totalclock>>3)%7), siz, ydim_upper, ydim_lower);
178
    Menu_DrawCursorTextTile(x, y, h, SPINNINGNUKEICON+(((int32_t) totalclock>>3)%7), siz, ydim_upper, ydim_lower);
179
}
179
}
180
180
181
181
182
static uint16_t g_oldSaveCnt;
182
static uint16_t g_oldSaveCnt;
183
183
184
184
185
185
186
186
187
/*
187
/*
188
All MAKE_* macros are generally for the purpose of keeping state initialization
188
All MAKE_* macros are generally for the purpose of keeping state initialization
189
separate from actual data. Alternatively, they can serve to factor out repetitive
189
separate from actual data. Alternatively, they can serve to factor out repetitive
190
stuff and keep the important bits from getting lost to our eyes.
190
stuff and keep the important bits from getting lost to our eyes.
191

191

192
They serve as a stand-in for C++ default value constructors, since this was written
192
They serve as a stand-in for C++ default value constructors, since this was written
193
when the codebase still used C89.
193
when the codebase still used C89.
194

194

195
Note that I prefer to include a space on the inside of the macro parentheses, since
195
Note that I prefer to include a space on the inside of the macro parentheses, since
196
they effectively stand in for curly braces as struct initializers.
196
they effectively stand in for curly braces as struct initializers.
197
*/
197
*/
198
198
199
199
200
MenuGameplayStemEntry g_MenuGameplayEntries[MAXMENUGAMEPLAYENTRIES];
200
MenuGameplayStemEntry g_MenuGameplayEntries[MAXMENUGAMEPLAYENTRIES];
201
201
202
// common font types
202
// common font types
203
// tilenums are set after namesdyn runs
203
// tilenums are set after namesdyn runs
204
204
205
//                                      emptychar x,y       between x,y         zoom                cursorLeft          cursorCenter        cursorScale         textflags
205
//                                      emptychar x,y       between x,y         zoom                cursorLeft          cursorCenter        cursorScale         textflags
206
//                                      tilenum             shade_deselected    shade_disabled      pal                 pal_selected        pal_deselected      pal_disabled
206
//                                      tilenum             shade_deselected    shade_disabled      pal                 pal_selected        pal_deselected      pal_disabled
207
MenuFont_t MF_Redfont =               { { 5<<16, 15<<16 },  { 0, 0 },           65536,              20<<16,             110<<16,            65536,              TEXT_BIGALPHANUM | TEXT_UPPERCASE,
207
MenuFont_t MF_Redfont =               { { 5<<16, 15<<16 },  { 0, 0 },           65536,              20<<16,             110<<16,            65536,              TEXT_BIGALPHANUM | TEXT_UPPERCASE,
208
                                        -1,                 10,                 0,                  0,                  0,                  0,                  1,
208
                                        -1,                 10,                 0,                  0,                  0,                  0,                  1,
209
                                        0,                  0,                  1 };
209
                                        0,                  0,                  1 };
210
MenuFont_t MF_Bluefont =              { { 5<<16, 7<<16 },   { 0, 0 },           65536,              10<<16,             110<<16,            32768,              0,
210
MenuFont_t MF_Bluefont =              { { 5<<16, 7<<16 },   { 0, 0 },           65536,              10<<16,             110<<16,            32768,              0,
211
                                        -1,                 10,                 0,                  0,                  10,                 10,                 16,
211
                                        -1,                 10,                 0,                  0,                  10,                 10,                 16,
212
                                        0,                  0,                  16 };
212
                                        0,                  0,                  16 };
213
MenuFont_t MF_Minifont =              { { 4<<16, 5<<16 },   { 1<<16, 1<<16 },   65536,              10<<16,             110<<16,            32768,              0,
213
MenuFont_t MF_Minifont =              { { 4<<16, 5<<16 },   { 1<<16, 1<<16 },   65536,              10<<16,             110<<16,            32768,              0,
214
                                        -1,                 10,                 0,                  0,                  2,                  2,                  0,
214
                                        -1,                 10,                 0,                  0,                  2,                  2,                  0,
215
                                        0,                  0,                  16 };
215
                                        0,                  0,                  16 };
216
216
217
217
218
static MenuMenuFormat_t MMF_Top_Main =             { {  MENU_MARGIN_CENTER<<16, 55<<16, }, -(170<<16) };
218
static MenuMenuFormat_t MMF_Top_Main =             { {  MENU_MARGIN_CENTER<<16, 55<<16, }, -(170<<16) };
219
static MenuMenuFormat_t MMF_Top_Episode =          { {  MENU_MARGIN_CENTER<<16, 48<<16, }, -(190<<16) };
219
static MenuMenuFormat_t MMF_Top_Episode =          { {  MENU_MARGIN_CENTER<<16, 48<<16, }, -(190<<16) };
220
static MenuMenuFormat_t MMF_Top_NewGameCustom =    { {  MENU_MARGIN_CENTER<<16, 48<<16, }, -(190<<16) };
220
static MenuMenuFormat_t MMF_Top_NewGameCustom =    { {  MENU_MARGIN_CENTER<<16, 48<<16, }, -(190<<16) };
221
static MenuMenuFormat_t MMF_Top_NewGameCustomSub = { {  MENU_MARGIN_CENTER<<16, 48<<16, }, -(190<<16) };
221
static MenuMenuFormat_t MMF_Top_NewGameCustomSub = { {  MENU_MARGIN_CENTER<<16, 48<<16, }, -(190<<16) };
222
static MenuMenuFormat_t MMF_Top_Skill =            { {  MENU_MARGIN_CENTER<<16, 58<<16, }, -(190<<16) };
222
static MenuMenuFormat_t MMF_Top_Skill =            { {  MENU_MARGIN_CENTER<<16, 58<<16, }, -(190<<16) };
223
static MenuMenuFormat_t MMF_Top_Options =          { {  MENU_MARGIN_CENTER<<16, 38<<16, }, -(190<<16) };
223
static MenuMenuFormat_t MMF_Top_Options =          { {  MENU_MARGIN_CENTER<<16, 38<<16, }, -(190<<16) };
224
static MenuMenuFormat_t MMF_Top_Joystick_Network = { {  MENU_MARGIN_CENTER<<16, 70<<16, }, -(190<<16) };
224
static MenuMenuFormat_t MMF_Top_Joystick_Network = { {  MENU_MARGIN_CENTER<<16, 70<<16, }, -(190<<16) };
225
static MenuMenuFormat_t MMF_BigOptions =           { {    MENU_MARGIN_WIDE<<16, 38<<16, }, -(190<<16) };
225
static MenuMenuFormat_t MMF_BigOptions =           { {    MENU_MARGIN_WIDE<<16, 38<<16, }, -(190<<16) };
226
static MenuMenuFormat_t MMF_SmallOptions =         { {    MENU_MARGIN_WIDE<<16, 37<<16, },    170<<16 };
226
static MenuMenuFormat_t MMF_SmallOptions =         { {    MENU_MARGIN_WIDE<<16, 37<<16, },    170<<16 };
227
static MenuMenuFormat_t MMF_Macros =               { {                  26<<16, 40<<16, },    160<<16 };
227
static MenuMenuFormat_t MMF_Macros =               { {                  26<<16, 40<<16, },    160<<16 };
228
static MenuMenuFormat_t MMF_SmallOptionsNarrow  =  { { MENU_MARGIN_REGULAR<<16, 38<<16, }, -(190<<16) };
228
static MenuMenuFormat_t MMF_SmallOptionsNarrow  =  { { MENU_MARGIN_REGULAR<<16, 38<<16, }, -(190<<16) };
229
static MenuMenuFormat_t MMF_KeyboardSetupFuncs =   { {                  50<<16, 34<<16, },    151<<16 };
229
static MenuMenuFormat_t MMF_KeyboardSetupFuncs =   { {                  50<<16, 34<<16, },    151<<16 };
230
static MenuMenuFormat_t MMF_MouseJoySetupBtns =    { {                  76<<16, 34<<16, },    143<<16 };
230
static MenuMenuFormat_t MMF_MouseJoySetupBtns =    { {                  76<<16, 34<<16, },    143<<16 };
231
static MenuMenuFormat_t MMF_FuncList =             { {                 100<<16, 51<<16, },    152<<16 };
231
static MenuMenuFormat_t MMF_FuncList =             { {                 100<<16, 51<<16, },    152<<16 };
232
static MenuMenuFormat_t MMF_ColorCorrect =         { { MENU_MARGIN_REGULAR<<16, 86<<16, },    190<<16 };
232
static MenuMenuFormat_t MMF_ColorCorrect =         { { MENU_MARGIN_REGULAR<<16, 86<<16, },    190<<16 };
233
static MenuMenuFormat_t MMF_BigSliders =           { {    MENU_MARGIN_WIDE<<16, 37<<16, },    190<<16 };
233
static MenuMenuFormat_t MMF_BigSliders =           { {    MENU_MARGIN_WIDE<<16, 37<<16, },    190<<16 };
234
static MenuMenuFormat_t MMF_LoadSave =             { {                 200<<16, 49<<16, },    145<<16 };
234
static MenuMenuFormat_t MMF_LoadSave =             { {                 200<<16, 49<<16, },    145<<16 };
235
static MenuMenuFormat_t MMF_NetSetup =             { {                  36<<16, 38<<16, },    190<<16 };
235
static MenuMenuFormat_t MMF_NetSetup =             { {                  36<<16, 38<<16, },    190<<16 };
236
static MenuMenuFormat_t MMF_FileSelectLeft =       { {                  40<<16, 45<<16, },    162<<16 };
236
static MenuMenuFormat_t MMF_FileSelectLeft =       { {                  40<<16, 45<<16, },    162<<16 };
237
static MenuMenuFormat_t MMF_FileSelectRight =      { {                 164<<16, 45<<16, },    162<<16 };
237
static MenuMenuFormat_t MMF_FileSelectRight =      { {                 164<<16, 45<<16, },    162<<16 };
238
238
239
static MenuEntryFormat_t MEF_Null =             {     0,      0,          0 };
239
static MenuEntryFormat_t MEF_Null =             {     0,      0,          0 };
240
static MenuEntryFormat_t MEF_MainMenu =         { 4<<16,      0,          0 };
240
static MenuEntryFormat_t MEF_MainMenu =         { 4<<16,      0,          0 };
241
static MenuEntryFormat_t MEF_OptionsMenu =      { 7<<16,      0,          0 };
241
static MenuEntryFormat_t MEF_OptionsMenu =      { 7<<16,      0,          0 };
242
static MenuEntryFormat_t MEF_LeftMenu =         { 7<<16,      0,    120<<16 };
242
static MenuEntryFormat_t MEF_LeftMenu =         { 7<<16,      0,    120<<16 };
243
static MenuEntryFormat_t MEF_CenterMenu =       { 7<<16,      0,          0 };
243
static MenuEntryFormat_t MEF_CenterMenu =       { 7<<16,      0,          0 };
244
static MenuEntryFormat_t MEF_BigOptions_Apply = { 4<<16, 16<<16, -(260<<16) };
244
static MenuEntryFormat_t MEF_BigOptions_Apply = { 4<<16, 16<<16, -(260<<16) };
245
static MenuEntryFormat_t MEF_BigOptionsRt =     { 4<<16,      0, -(260<<16) };
245
static MenuEntryFormat_t MEF_BigOptionsRt =     { 4<<16,      0, -(260<<16) };
246
static MenuEntryFormat_t MEF_BigOptionsRtSections = { 3<<16,      0, -(260<<16) };
246
static MenuEntryFormat_t MEF_BigOptionsRtSections = { 3<<16,      0, -(260<<16) };
247
#if defined USE_OPENGL || !defined EDUKE32_ANDROID_MENU
247
#if defined USE_OPENGL || !defined EDUKE32_ANDROID_MENU
248
static MenuEntryFormat_t MEF_SmallOptions =     { 1<<16,      0, -(260<<16) };
248
static MenuEntryFormat_t MEF_SmallOptions =     { 1<<16,      0, -(260<<16) };
249
#endif
249
#endif
250
static MenuEntryFormat_t MEF_BigCheats =        { 3<<16,      0, -(260<<16) };
250
static MenuEntryFormat_t MEF_BigCheats =        { 3<<16,      0, -(260<<16) };
251
static MenuEntryFormat_t MEF_Cheats =           { 2<<16,      0, -(260<<16) };
251
static MenuEntryFormat_t MEF_Cheats =           { 2<<16,      0, -(260<<16) };
252
static MenuEntryFormat_t MEF_PlayerNarrow =     { 1<<16,      0,     90<<16 };
252
static MenuEntryFormat_t MEF_PlayerNarrow =     { 1<<16,      0,     90<<16 };
253
static MenuEntryFormat_t MEF_Macros =           { 2<<16,     -1,    268<<16 };
253
static MenuEntryFormat_t MEF_Macros =           { 2<<16,     -1,    268<<16 };
254
static MenuEntryFormat_t MEF_VideoSetup =       { 4<<16,      0,    168<<16 };
254
static MenuEntryFormat_t MEF_VideoSetup =       { 4<<16,      0,    168<<16 };
255
static MenuEntryFormat_t MEF_VideoSetup_Apply = { 4<<16, 16<<16,    168<<16 };
255
static MenuEntryFormat_t MEF_VideoSetup_Apply = { 4<<16, 16<<16,    168<<16 };
256
static MenuEntryFormat_t MEF_KBFuncList =       { 3<<16,      0, -(225<<16) };
256
static MenuEntryFormat_t MEF_KBFuncList =       { 3<<16,      0, -(225<<16) };
257
static MenuEntryFormat_t MEF_FuncList =         { 3<<16,      0, -(170<<16) };
257
static MenuEntryFormat_t MEF_FuncList =         { 3<<16,      0, -(170<<16) };
258
static MenuEntryFormat_t MEF_ColorCorrect =     { 2<<16,      0, -(240<<16) };
258
static MenuEntryFormat_t MEF_ColorCorrect =     { 2<<16,      0, -(240<<16) };
259
static MenuEntryFormat_t MEF_BigSliders =       { 2<<16,      0, -(260<<16) };
259
static MenuEntryFormat_t MEF_BigSliders =       { 2<<16,      0, -(260<<16) };
260
static MenuEntryFormat_t MEF_LoadSave =         { 2<<16,     -1,     78<<16 };
260
static MenuEntryFormat_t MEF_LoadSave =         { 2<<16,     -1,     78<<16 };
261
static MenuEntryFormat_t MEF_NetSetup =         { 4<<16,      0,    112<<16 };
261
static MenuEntryFormat_t MEF_NetSetup =         { 4<<16,      0,    112<<16 };
262
static MenuEntryFormat_t MEF_NetSetup_Confirm = { 4<<16, 16<<16,    112<<16 };
262
static MenuEntryFormat_t MEF_NetSetup_Confirm = { 4<<16, 16<<16,    112<<16 };
263
263
264
// common menu option sets
264
// common menu option sets
265
#define MAKE_MENUOPTIONSET(optionNames, optionValues, features) { optionNames, optionValues, &MMF_FuncList, &MEF_FuncList, &MF_Minifont, ARRAY_SIZE(optionNames), -1, 0, features }
265
#define MAKE_MENUOPTIONSET(optionNames, optionValues, features) { optionNames, optionValues, &MMF_FuncList, &MEF_FuncList, &MF_Minifont, ARRAY_SIZE(optionNames), -1, 0, features }
266
#define MAKE_MENUOPTIONSETDYN(optionNames, optionValues, numOptions, features) { optionNames, optionValues, &MMF_FuncList, &MEF_FuncList, &MF_Minifont, numOptions, -1, 0, features }
266
#define MAKE_MENUOPTIONSETDYN(optionNames, optionValues, numOptions, features) { optionNames, optionValues, &MMF_FuncList, &MEF_FuncList, &MF_Minifont, numOptions, -1, 0, features }
267
#define MAKE_MENUOPTIONSETNULL { NULL, NULL, &MMF_FuncList, &MEF_FuncList, &MF_Minifont, 0, -1, 0, 0 }
267
#define MAKE_MENUOPTIONSETNULL { NULL, NULL, &MMF_FuncList, &MEF_FuncList, &MF_Minifont, 0, -1, 0, 0 }
268
268
269
static char const *MEOSN_OffOn[] = { "Off", "On", };
269
static char const *MEOSN_OffOn[] = { "Off", "On", };
270
static MenuOptionSet_t MEOS_OffOn = MAKE_MENUOPTIONSET( MEOSN_OffOn, NULL, 0x3 );
270
static MenuOptionSet_t MEOS_OffOn = MAKE_MENUOPTIONSET( MEOSN_OffOn, NULL, 0x3 );
271
static char const *MEOSN_OnOff[] = { "On", "Off", };
271
static char const *MEOSN_OnOff[] = { "On", "Off", };
272
static MenuOptionSet_t MEOS_OnOff = MAKE_MENUOPTIONSET( MEOSN_OnOff, NULL, 0x3 );
272
static MenuOptionSet_t MEOS_OnOff = MAKE_MENUOPTIONSET( MEOSN_OnOff, NULL, 0x3 );
273
static char const *MEOSN_NoYes[] = { "No", "Yes", };
273
static char const *MEOSN_NoYes[] = { "No", "Yes", };
274
static MenuOptionSet_t MEOS_NoYes = MAKE_MENUOPTIONSET( MEOSN_NoYes, NULL, 0x3 );
274
static MenuOptionSet_t MEOS_NoYes = MAKE_MENUOPTIONSET( MEOSN_NoYes, NULL, 0x3 );
275
static char const *MEOSN_YesNo[] = { "Yes", "No", };
275
static char const *MEOSN_YesNo[] = { "Yes", "No", };
276
static MenuOptionSet_t MEOS_YesNo = MAKE_MENUOPTIONSET( MEOSN_YesNo, NULL, 0x3 );
276
static MenuOptionSet_t MEOS_YesNo = MAKE_MENUOPTIONSET( MEOSN_YesNo, NULL, 0x3 );
277
277
278
278
279
static char MenuGameFuncs[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN];
279
static char MenuGameFuncs[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN];
280
static char const *MenuGameFuncNone = "  -None-";
280
static char const *MenuGameFuncNone = "  -None-";
281
static char const *MEOSN_Gamefuncs[NUMGAMEFUNCTIONS+1];
281
static char const *MEOSN_Gamefuncs[NUMGAMEFUNCTIONS+1];
282
static int32_t MEOSV_Gamefuncs[NUMGAMEFUNCTIONS+1];
282
static int32_t MEOSV_Gamefuncs[NUMGAMEFUNCTIONS+1];
283
static MenuOptionSet_t MEOS_Gamefuncs = MAKE_MENUOPTIONSET( MEOSN_Gamefuncs, MEOSV_Gamefuncs, 0x1 );
283
static MenuOptionSet_t MEOS_Gamefuncs = MAKE_MENUOPTIONSET( MEOSN_Gamefuncs, MEOSV_Gamefuncs, 0x1 );
284
284
285
285
286
286
287
/*
287
/*
288
MenuEntry_t is passed in arrays of pointers so that the callback function
288
MenuEntry_t is passed in arrays of pointers so that the callback function
289
that is called when an entry is modified or activated can test equality of the current
289
that is called when an entry is modified or activated can test equality of the current
290
entry pointer directly against the known ones, instead of relying on an ID number.
290
entry pointer directly against the known ones, instead of relying on an ID number.
291

291

292
That way, individual menu entries can be ifdef'd out painlessly.
292
That way, individual menu entries can be ifdef'd out painlessly.
293
*/
293
*/
294
294
295
static MenuLink_t MEO_NULL = { MENU_NULL, MA_None, };
295
static MenuLink_t MEO_NULL = { MENU_NULL, MA_None, };
296
static const char* MenuCustom = "Custom";
296
static const char* MenuCustom = "Custom";
297
297
298
#define MAKE_MENUSTRING(...) { NULL, __VA_ARGS__, }
298
#define MAKE_MENUSTRING(...) { NULL, __VA_ARGS__, }
299
#define MAKE_MENUOPTION(...) { __VA_ARGS__, -1, }
299
#define MAKE_MENUOPTION(...) { __VA_ARGS__, -1, }
300
#define MAKE_MENURANGE(...) { __VA_ARGS__, }
300
#define MAKE_MENURANGE(...) { __VA_ARGS__, }
301
#define MAKE_MENUENTRY(...) { __VA_ARGS__, 0, 0, 0, }
301
#define MAKE_MENUENTRY(...) { __VA_ARGS__, 0, 0, 0, }
302
302
303
303
304
#define MAKE_SPACER( EntryName, Height ) \
304
#define MAKE_SPACER( EntryName, Height ) \
305
static MenuSpacer_t MEO_ ## EntryName = { Height };
305
static MenuSpacer_t MEO_ ## EntryName = { Height };
306
306
307
MAKE_SPACER( Space2, 2<<16 ); // bigoptions
307
MAKE_SPACER( Space2, 2<<16 ); // bigoptions
308
MAKE_SPACER( Space4, 4<<16 ); // usermap, smalloptions, anything else non-top
308
MAKE_SPACER( Space4, 4<<16 ); // usermap, smalloptions, anything else non-top
309
MAKE_SPACER( Space6, 6<<16 ); // videosetup
309
MAKE_SPACER( Space6, 6<<16 ); // videosetup
310
MAKE_SPACER( Space8, 8<<16 ); // colcorr, redslide
310
MAKE_SPACER( Space8, 8<<16 ); // colcorr, redslide
311
311
312
static MenuEntry_t ME_Space2_Redfont = MAKE_MENUENTRY( NULL, &MF_Redfont, &MEF_Null, &MEO_Space2, Spacer );
312
static MenuEntry_t ME_Space2_Redfont = MAKE_MENUENTRY( NULL, &MF_Redfont, &MEF_Null, &MEO_Space2, Spacer );
313
static MenuEntry_t ME_Space4_Bluefont = MAKE_MENUENTRY( NULL, &MF_Bluefont, &MEF_Null, &MEO_Space4, Spacer );
313
static MenuEntry_t ME_Space4_Bluefont = MAKE_MENUENTRY( NULL, &MF_Bluefont, &MEF_Null, &MEO_Space4, Spacer );
314
static MenuEntry_t ME_Space4_Redfont = MAKE_MENUENTRY( NULL, &MF_Redfont, &MEF_Null, &MEO_Space4, Spacer );
314
static MenuEntry_t ME_Space4_Redfont = MAKE_MENUENTRY( NULL, &MF_Redfont, &MEF_Null, &MEO_Space4, Spacer );
315
#ifndef EDUKE32_RETAIL_MENU
315
#ifndef EDUKE32_RETAIL_MENU
316
static MenuEntry_t ME_Space8_Bluefont = MAKE_MENUENTRY( NULL, &MF_Bluefont, &MEF_Null, &MEO_Space8, Spacer );
316
static MenuEntry_t ME_Space8_Bluefont = MAKE_MENUENTRY( NULL, &MF_Bluefont, &MEF_Null, &MEO_Space8, Spacer );
317
#endif
317
#endif
318
static MenuEntry_t ME_Space6_Redfont = MAKE_MENUENTRY( NULL, &MF_Redfont, &MEF_Null, &MEO_Space6, Spacer );
318
static MenuEntry_t ME_Space6_Redfont = MAKE_MENUENTRY( NULL, &MF_Redfont, &MEF_Null, &MEO_Space6, Spacer );
319
static MenuEntry_t ME_Space8_Redfont = MAKE_MENUENTRY( NULL, &MF_Redfont, &MEF_Null, &MEO_Space8, Spacer );
319
static MenuEntry_t ME_Space8_Redfont = MAKE_MENUENTRY( NULL, &MF_Redfont, &MEF_Null, &MEO_Space8, Spacer );
320
320
321
#define MAKE_MENU_TOP_ENTRYLINK( Title, Format, EntryName, LinkID ) \
321
#define MAKE_MENU_TOP_ENTRYLINK( Title, Format, EntryName, LinkID ) \
322
static MenuLink_t MEO_ ## EntryName = { LinkID, MA_Advance, };\
322
static MenuLink_t MEO_ ## EntryName = { LinkID, MA_Advance, };\
323
static MenuEntry_t ME_ ## EntryName = MAKE_MENUENTRY( Title, &MF_Redfont, &Format, &MEO_ ## EntryName, Link )
323
static MenuEntry_t ME_ ## EntryName = MAKE_MENUENTRY( Title, &MF_Redfont, &Format, &MEO_ ## EntryName, Link )
324
324
325
static char const s_NewGame[] = "New Game";
325
static char const s_NewGame[] = "New Game";
326
static char const s_SaveGame[] = "Save Game";
326
static char const s_SaveGame[] = "Save Game";
327
static char const s_LoadGame[] = "Load Game";
327
static char const s_LoadGame[] = "Load Game";
328
static char const s_Continue[] = "Continue";
328
static char const s_Continue[] = "Continue";
329
static char const s_Options[] = "Options";
329
static char const s_Options[] = "Options";
330
static char const s_Credits[] = "Credits";
330
static char const s_Credits[] = "Credits";
331
331
332
MAKE_MENU_TOP_ENTRYLINK( s_NewGame, MEF_MainMenu, MAIN_NEWGAME, MENU_EPISODE );
332
MAKE_MENU_TOP_ENTRYLINK( s_NewGame, MEF_MainMenu, MAIN_NEWGAME, MENU_EPISODE );
333
#ifdef EDUKE32_RETAIL_MENU
333
#ifdef EDUKE32_RETAIL_MENU
334
MAKE_MENU_TOP_ENTRYLINK( "Resume Game", MEF_MainMenu, MAIN_RESUMEGAME, MENU_CLOSE );
334
MAKE_MENU_TOP_ENTRYLINK( "Resume Game", MEF_MainMenu, MAIN_RESUMEGAME, MENU_CLOSE );
335
#endif
335
#endif
336
MAKE_MENU_TOP_ENTRYLINK( s_NewGame, MEF_MainMenu, MAIN_NEWGAME_INGAME, MENU_NEWVERIFY );
336
MAKE_MENU_TOP_ENTRYLINK( s_NewGame, MEF_MainMenu, MAIN_NEWGAME_INGAME, MENU_NEWVERIFY );
337
static MenuLink_t MEO_MAIN_NEWGAME_NETWORK = { MENU_NETWORK, MA_Advance, };
337
static MenuLink_t MEO_MAIN_NEWGAME_NETWORK = { MENU_NETWORK, MA_Advance, };
338
MAKE_MENU_TOP_ENTRYLINK( s_SaveGame, MEF_MainMenu, MAIN_SAVEGAME, MENU_SAVE );
338
MAKE_MENU_TOP_ENTRYLINK( s_SaveGame, MEF_MainMenu, MAIN_SAVEGAME, MENU_SAVE );
339
MAKE_MENU_TOP_ENTRYLINK( s_LoadGame, MEF_MainMenu, MAIN_LOADGAME, MENU_LOAD );
339
MAKE_MENU_TOP_ENTRYLINK( s_LoadGame, MEF_MainMenu, MAIN_LOADGAME, MENU_LOAD );
340
MAKE_MENU_TOP_ENTRYLINK( s_Options, MEF_MainMenu, MAIN_OPTIONS, MENU_OPTIONS );
340
MAKE_MENU_TOP_ENTRYLINK( s_Options, MEF_MainMenu, MAIN_OPTIONS, MENU_OPTIONS );
341
#ifdef EDUKE32_STANDALONE
341
#ifdef EDUKE32_STANDALONE
342
MAKE_MENU_TOP_ENTRYLINK( "Read me!", MEF_MainMenu, MAIN_HELP, MENU_STORY );
342
MAKE_MENU_TOP_ENTRYLINK( "Read me!", MEF_MainMenu, MAIN_HELP, MENU_STORY );
343
#else
343
#else
344
MAKE_MENU_TOP_ENTRYLINK("Help", MEF_MainMenu, MAIN_HELP, MENU_STORY);
344
MAKE_MENU_TOP_ENTRYLINK("Help", MEF_MainMenu, MAIN_HELP, MENU_STORY);
345
#endif
345
#endif
346
#ifndef EDUKE32_RETAIL_MENU
346
#ifndef EDUKE32_RETAIL_MENU
347
MAKE_MENU_TOP_ENTRYLINK( s_Credits, MEF_MainMenu, MAIN_CREDITS, MENU_CREDITS );
347
MAKE_MENU_TOP_ENTRYLINK( s_Credits, MEF_MainMenu, MAIN_CREDITS, MENU_CREDITS );
348
#endif
348
#endif
349
MAKE_MENU_TOP_ENTRYLINK( "End Game", MEF_MainMenu, MAIN_QUITTOTITLE, MENU_QUITTOTITLE );
349
MAKE_MENU_TOP_ENTRYLINK( "End Game", MEF_MainMenu, MAIN_QUITTOTITLE, MENU_QUITTOTITLE );
350
MAKE_MENU_TOP_ENTRYLINK( "Quit", MEF_MainMenu, MAIN_QUIT, MENU_QUIT );
350
MAKE_MENU_TOP_ENTRYLINK( "Quit", MEF_MainMenu, MAIN_QUIT, MENU_QUIT );
351
#ifndef EDUKE32_RETAIL_MENU
351
#ifndef EDUKE32_RETAIL_MENU
352
MAKE_MENU_TOP_ENTRYLINK( "Quit Game", MEF_MainMenu, MAIN_QUITGAME, MENU_QUIT );
352
MAKE_MENU_TOP_ENTRYLINK( "Quit Game", MEF_MainMenu, MAIN_QUITGAME, MENU_QUIT );
353
#endif
353
#endif
354
354
355
static MenuEntry_t *MEL_MAIN[] = {
355
static MenuEntry_t *MEL_MAIN[] = {
356
    &ME_MAIN_NEWGAME,
356
    &ME_MAIN_NEWGAME,
357
    &ME_MAIN_LOADGAME,
357
    &ME_MAIN_LOADGAME,
358
    &ME_MAIN_OPTIONS,
358
    &ME_MAIN_OPTIONS,
359
    &ME_MAIN_HELP,
359
    &ME_MAIN_HELP,
360
#ifndef EDUKE32_RETAIL_MENU
360
#ifndef EDUKE32_RETAIL_MENU
361
    &ME_MAIN_CREDITS,
361
    &ME_MAIN_CREDITS,
362
#endif
362
#endif
363
    &ME_MAIN_QUIT,
363
    &ME_MAIN_QUIT,
364
};
364
};
365
365
366
static MenuEntry_t *MEL_MAIN_INGAME[] = {
366
static MenuEntry_t *MEL_MAIN_INGAME[] = {
367
#ifdef EDUKE32_RETAIL_MENU
367
#ifdef EDUKE32_RETAIL_MENU
368
    &ME_MAIN_RESUMEGAME,
368
    &ME_MAIN_RESUMEGAME,
369
#else
369
#else
370
    &ME_MAIN_NEWGAME_INGAME,
370
    &ME_MAIN_NEWGAME_INGAME,
371
#endif
371
#endif
372
    &ME_MAIN_SAVEGAME,
372
    &ME_MAIN_SAVEGAME,
373
    &ME_MAIN_LOADGAME,
373
    &ME_MAIN_LOADGAME,
374
    &ME_MAIN_OPTIONS,
374
    &ME_MAIN_OPTIONS,
375
    &ME_MAIN_HELP,
375
    &ME_MAIN_HELP,
376
    &ME_MAIN_QUITTOTITLE,
376
    &ME_MAIN_QUITTOTITLE,
377
#ifndef EDUKE32_RETAIL_MENU
377
#ifndef EDUKE32_RETAIL_MENU
378
    &ME_MAIN_QUITGAME,
378
    &ME_MAIN_QUITGAME,
379
#endif
379
#endif
380
};
380
};
381
381
382
// Episode and Skill will be dynamically generated after CONs are parsed
382
// Episode and Skill will be dynamically generated after CONs are parsed
383
static MenuLink_t MEO_EPISODE = { MENU_SKILL, MA_Advance, };
383
static MenuLink_t MEO_EPISODE = { MENU_SKILL, MA_Advance, };
384
static MenuLink_t MEO_EPISODE_SHAREWARE = { MENU_BUYDUKE, MA_Advance, };
384
static MenuLink_t MEO_EPISODE_SHAREWARE = { MENU_BUYDUKE, MA_Advance, };
385
static MenuEntry_t ME_EPISODE_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Redfont, &MEF_CenterMenu, &MEO_EPISODE, Link );
385
static MenuEntry_t ME_EPISODE_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Redfont, &MEF_CenterMenu, &MEO_EPISODE, Link );
386
static MenuEntry_t ME_EPISODE[MAXVOLUMES];
386
static MenuEntry_t ME_EPISODE[MAXVOLUMES];
387
static MenuLink_t MEO_EPISODE_USERMAP = { MENU_USERMAP, MA_Advance, };
387
static MenuLink_t MEO_EPISODE_USERMAP = { MENU_USERMAP, MA_Advance, };
388
static MenuEntry_t ME_EPISODE_USERMAP = MAKE_MENUENTRY( "User Map", &MF_Redfont, &MEF_CenterMenu, &MEO_EPISODE_USERMAP, Link );
388
static MenuEntry_t ME_EPISODE_USERMAP = MAKE_MENUENTRY( "User Map", &MF_Redfont, &MEF_CenterMenu, &MEO_EPISODE_USERMAP, Link );
389
static MenuEntry_t *MEL_EPISODE[MAXVOLUMES+2]; // +2 for spacer and User Map
389
static MenuEntry_t *MEL_EPISODE[MAXVOLUMES+2]; // +2 for spacer and User Map
390
390
391
static MenuLink_t MEO_NEWGAMECUSTOM_TEMPLATE = { MENU_NEWGAMECUSTOMSUB, MA_Advance, };
391
static MenuLink_t MEO_NEWGAMECUSTOM_TEMPLATE = { MENU_NEWGAMECUSTOMSUB, MA_Advance, };
392
static MenuLink_t MEO_NEWGAMECUSTOM[MAXMENUGAMEPLAYENTRIES];
392
static MenuLink_t MEO_NEWGAMECUSTOM[MAXMENUGAMEPLAYENTRIES];
393
static MenuLink_t MEO_NEWGAMECUSTOMSUB_TEMPLATE = { MENU_SKILL, MA_Advance, };
393
static MenuLink_t MEO_NEWGAMECUSTOMSUB_TEMPLATE = { MENU_SKILL, MA_Advance, };
394
static MenuLink_t MEO_NEWGAMECUSTOMSUB[MAXMENUGAMEPLAYENTRIES][MAXMENUGAMEPLAYENTRIES];
394
static MenuLink_t MEO_NEWGAMECUSTOMSUB[MAXMENUGAMEPLAYENTRIES][MAXMENUGAMEPLAYENTRIES];
395
MenuEntry_t ME_NEWGAMECUSTOMENTRIES[MAXMENUGAMEPLAYENTRIES];
395
MenuEntry_t ME_NEWGAMECUSTOMENTRIES[MAXMENUGAMEPLAYENTRIES];
396
MenuEntry_t ME_NEWGAMECUSTOMSUBENTRIES[MAXMENUGAMEPLAYENTRIES][MAXMENUGAMEPLAYENTRIES];
396
MenuEntry_t ME_NEWGAMECUSTOMSUBENTRIES[MAXMENUGAMEPLAYENTRIES][MAXMENUGAMEPLAYENTRIES];
397
static MenuEntry_t *MEL_NEWGAMECUSTOM[MAXMENUGAMEPLAYENTRIES];
397
static MenuEntry_t *MEL_NEWGAMECUSTOM[MAXMENUGAMEPLAYENTRIES];
398
static MenuEntry_t *MEL_NEWGAMECUSTOMSUB[MAXMENUGAMEPLAYENTRIES];
398
static MenuEntry_t *MEL_NEWGAMECUSTOMSUB[MAXMENUGAMEPLAYENTRIES];
399
399
400
static MenuEntry_t ME_SKILL_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Redfont, &MEF_CenterMenu, &MEO_NULL, Link );
400
static MenuEntry_t ME_SKILL_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Redfont, &MEF_CenterMenu, &MEO_NULL, Link );
401
static MenuEntry_t ME_SKILL[MAXSKILLS];
401
static MenuEntry_t ME_SKILL[MAXSKILLS];
402
static MenuEntry_t *MEL_SKILL[MAXSKILLS];
402
static MenuEntry_t *MEL_SKILL[MAXSKILLS];
403
403
404
#ifdef EDUKE32_RETAIL_MENU
404
#ifdef EDUKE32_RETAIL_MENU
405
static MenuLink_t MEO_GAMESETUP_SAVESETUP = { MENU_SAVESETUP, MA_Advance, };
405
static MenuLink_t MEO_GAMESETUP_SAVESETUP = { MENU_SAVESETUP, MA_Advance, };
406
static MenuEntry_t ME_GAMESETUP_SAVESETUP = MAKE_MENUENTRY( "Save setup", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_SAVESETUP, Link );
406
static MenuEntry_t ME_GAMESETUP_SAVESETUP = MAKE_MENUENTRY( "Save setup", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_SAVESETUP, Link );
407
#endif
407
#endif
408
408
409
#if defined STARTUP_SETUP_WINDOW && !defined EDUKE32_RETAIL_MENU
409
#if defined STARTUP_SETUP_WINDOW && !defined EDUKE32_RETAIL_MENU
410
static MenuOption_t MEO_GAMESETUP_STARTWIN = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &ud.setup.forcesetup );
410
static MenuOption_t MEO_GAMESETUP_STARTWIN = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &ud.setup.forcesetup );
411
static MenuEntry_t ME_GAMESETUP_STARTWIN = MAKE_MENUENTRY( "Startup window:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_STARTWIN, Option );
411
static MenuEntry_t ME_GAMESETUP_STARTWIN = MAKE_MENUENTRY( "Startup window:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_STARTWIN, Option );
412
#endif
412
#endif
413
413
414
static char const *MEOSN_GAMESETUP_AIM_AUTO[] = { "Never", "Always", "Hitscan only",
414
static char const *MEOSN_GAMESETUP_AIM_AUTO[] = { "Never", "Always", "Hitscan only",
415
#ifdef EDUKE32_ANDROID_MENU
415
#ifdef EDUKE32_ANDROID_MENU
416
"Extra wide"
416
"Extra wide"
417
#endif
417
#endif
418
};
418
};
419
static int32_t MEOSV_GAMESETUP_AIM_AUTO[] = { 0, 1, 2,
419
static int32_t MEOSV_GAMESETUP_AIM_AUTO[] = { 0, 1, 2,
420
#ifdef EDUKE32_ANDROID_MENU
420
#ifdef EDUKE32_ANDROID_MENU
421
3,
421
3,
422
#endif
422
#endif
423
};
423
};
424
424
425
static MenuOptionSet_t MEOS_GAMESETUP_AIM_AUTO = MAKE_MENUOPTIONSET( MEOSN_GAMESETUP_AIM_AUTO, MEOSV_GAMESETUP_AIM_AUTO, 0x2 );
425
static MenuOptionSet_t MEOS_GAMESETUP_AIM_AUTO = MAKE_MENUOPTIONSET( MEOSN_GAMESETUP_AIM_AUTO, MEOSV_GAMESETUP_AIM_AUTO, 0x2 );
426
static MenuOption_t MEO_GAMESETUP_AIM_AUTO = MAKE_MENUOPTION( &MF_Redfont, &MEOS_GAMESETUP_AIM_AUTO, &ud.config.AutoAim );
426
static MenuOption_t MEO_GAMESETUP_AIM_AUTO = MAKE_MENUOPTION( &MF_Redfont, &MEOS_GAMESETUP_AIM_AUTO, &ud.config.AutoAim );
427
static MenuEntry_t ME_GAMESETUP_AIM_AUTO = MAKE_MENUENTRY( "Auto aim:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_AIM_AUTO, Option );
427
static MenuEntry_t ME_GAMESETUP_AIM_AUTO = MAKE_MENUENTRY( "Auto aim:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_AIM_AUTO, Option );
428
428
429
static MenuOption_t MEO_GAMESETUP_ALWAYS_RUN = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &ud.auto_run);
429
static MenuOption_t MEO_GAMESETUP_ALWAYS_RUN = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &ud.auto_run);
430
static MenuEntry_t ME_GAMESETUP_ALWAYS_RUN = MAKE_MENUENTRY( "Always run:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_ALWAYS_RUN, Option );
430
static MenuEntry_t ME_GAMESETUP_ALWAYS_RUN = MAKE_MENUENTRY( "Always run:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_ALWAYS_RUN, Option );
431
431
432
static char const *MEOSN_GAMESETUP_WEAPSWITCH_PICKUP[] = { "Never", "If new", /*"If favored",*/ };
432
static char const *MEOSN_GAMESETUP_WEAPSWITCH_PICKUP[] = { "Never", "If new", /*"If favored",*/ };
433
static MenuOptionSet_t MEOS_GAMESETUP_WEAPSWITCH_PICKUP = MAKE_MENUOPTIONSET( MEOSN_GAMESETUP_WEAPSWITCH_PICKUP, NULL, 0x2 );
433
static MenuOptionSet_t MEOS_GAMESETUP_WEAPSWITCH_PICKUP = MAKE_MENUOPTIONSET( MEOSN_GAMESETUP_WEAPSWITCH_PICKUP, NULL, 0x2 );
434
static MenuOption_t MEO_GAMESETUP_WEAPSWITCH_PICKUP = MAKE_MENUOPTION( &MF_Redfont, &MEOS_GAMESETUP_WEAPSWITCH_PICKUP, NULL );
434
static MenuOption_t MEO_GAMESETUP_WEAPSWITCH_PICKUP = MAKE_MENUOPTION( &MF_Redfont, &MEOS_GAMESETUP_WEAPSWITCH_PICKUP, NULL );
435
static MenuEntry_t ME_GAMESETUP_WEAPSWITCH_PICKUP = MAKE_MENUENTRY( "Equip pickups:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_WEAPSWITCH_PICKUP, Option );
435
static MenuEntry_t ME_GAMESETUP_WEAPSWITCH_PICKUP = MAKE_MENUENTRY( "Equip pickups:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_WEAPSWITCH_PICKUP, Option );
436
436
437
static char const *MEOSN_DemoRec[] = { "Off", "Running", };
437
static char const *MEOSN_DemoRec[] = { "Off", "Running", };
438
static MenuOptionSet_t MEOS_DemoRec = MAKE_MENUOPTIONSET( MEOSN_DemoRec, NULL, 0x3 );
438
static MenuOptionSet_t MEOS_DemoRec = MAKE_MENUOPTIONSET( MEOSN_DemoRec, NULL, 0x3 );
439
static MenuOption_t MEO_GAMESETUP_DEMOREC = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &ud.m_recstat );
439
static MenuOption_t MEO_GAMESETUP_DEMOREC = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &ud.m_recstat );
440
static MenuEntry_t ME_GAMESETUP_DEMOREC = MAKE_MENUENTRY( "Record demo:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_DEMOREC, Option );
440
static MenuEntry_t ME_GAMESETUP_DEMOREC = MAKE_MENUENTRY( "Record demo:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_DEMOREC, Option );
441
441
442
#ifdef _WIN32
442
#ifdef _WIN32
443
static MenuOption_t MEO_GAMESETUP_UPDATES = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &ud.config.CheckForUpdates );
443
static MenuOption_t MEO_GAMESETUP_UPDATES = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &ud.config.CheckForUpdates );
444
static MenuEntry_t ME_GAMESETUP_UPDATES = MAKE_MENUENTRY( "Online updates:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_UPDATES, Option );
444
static MenuEntry_t ME_GAMESETUP_UPDATES = MAKE_MENUENTRY( "Online updates:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_UPDATES, Option );
445
#endif
445
#endif
446
446
447
static MenuOption_t MEO_ADULTMODE = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.lockout);
447
static MenuOption_t MEO_ADULTMODE = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.lockout);
448
static MenuEntry_t ME_ADULTMODE = MAKE_MENUENTRY( "Parental lock:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_ADULTMODE, Option );
448
static MenuEntry_t ME_ADULTMODE = MAKE_MENUENTRY( "Parental lock:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_ADULTMODE, Option );
449
// static MenuLink_t MEO_ADULTMODE_PASSWORD = { MENU_ADULTPASSWORD, MA_None, };
449
// static MenuLink_t MEO_ADULTMODE_PASSWORD = { MENU_ADULTPASSWORD, MA_None, };
450
// static MenuEntry_t ME_ADULTMODE_PASSWORD = MAKE_MENUENTRY( "Enter Password", &MF_Redfont, &, &MEO_ADULTMODE_PASSWORD, Link );
450
// static MenuEntry_t ME_ADULTMODE_PASSWORD = MAKE_MENUENTRY( "Enter Password", &MF_Redfont, &, &MEO_ADULTMODE_PASSWORD, Link );
451
451
452
#ifdef EDUKE32_ANDROID_MENU
452
#ifdef EDUKE32_ANDROID_MENU
453
static MenuOption_t MEO_GAMESETUP_CROUCHLOCK = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &droidinput.toggleCrouch);
453
static MenuOption_t MEO_GAMESETUP_CROUCHLOCK = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &droidinput.toggleCrouch);
454
static MenuEntry_t ME_GAMESETUP_CROUCHLOCK = MAKE_MENUENTRY("Crouch lock:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_CROUCHLOCK, Option);
454
static MenuEntry_t ME_GAMESETUP_CROUCHLOCK = MAKE_MENUENTRY("Crouch lock:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_CROUCHLOCK, Option);
455
455
456
static MenuOption_t MEO_GAMESETUP_QUICKSWITCH = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &droidinput.quickSelectWeapon);
456
static MenuOption_t MEO_GAMESETUP_QUICKSWITCH = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &droidinput.quickSelectWeapon);
457
static MenuEntry_t ME_GAMESETUP_QUICKSWITCH = MAKE_MENUENTRY("Quick weapon switch:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_QUICKSWITCH, Option);
457
static MenuEntry_t ME_GAMESETUP_QUICKSWITCH = MAKE_MENUENTRY("Quick weapon switch:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_QUICKSWITCH, Option);
458
#endif
458
#endif
459
459
460
#if defined(EDUKE32_ANDROID_MENU) || !defined(EDUKE32_RETAIL_MENU)
460
#if defined(EDUKE32_ANDROID_MENU) || !defined(EDUKE32_RETAIL_MENU)
461
static MenuLink_t MEO_GAMESETUP_CHEATS = { MENU_CHEATS, MA_Advance, };
461
static MenuLink_t MEO_GAMESETUP_CHEATS = { MENU_CHEATS, MA_Advance, };
462
static MenuEntry_t ME_GAMESETUP_CHEATS = MAKE_MENUENTRY( "Cheats", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_CHEATS, Link );
462
static MenuEntry_t ME_GAMESETUP_CHEATS = MAKE_MENUENTRY( "Cheats", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_CHEATS, Link );
463
463
464
static MenuEntry_t *MEL_GAMESETUP[] = {
464
static MenuEntry_t *MEL_GAMESETUP[] = {
465
    &ME_ADULTMODE,
465
    &ME_ADULTMODE,
466
#if defined STARTUP_SETUP_WINDOW && !defined EDUKE32_RETAIL_MENU
466
#if defined STARTUP_SETUP_WINDOW && !defined EDUKE32_RETAIL_MENU
467
    &ME_GAMESETUP_STARTWIN,
467
    &ME_GAMESETUP_STARTWIN,
468
#endif
468
#endif
469
#ifndef EDUKE32_ANDROID_MENU
469
#ifndef EDUKE32_ANDROID_MENU
470
    &ME_GAMESETUP_DEMOREC,
470
    &ME_GAMESETUP_DEMOREC,
471
#ifdef _WIN32
471
#ifdef _WIN32
472
    &ME_GAMESETUP_UPDATES,
472
    &ME_GAMESETUP_UPDATES,
473
#endif
473
#endif
474
#endif
474
#endif
475
    &ME_GAMESETUP_CHEATS,
475
    &ME_GAMESETUP_CHEATS,
476
};
476
};
477
#endif
477
#endif
478
478
479
#ifndef EDUKE32_RETAIL_MENU
479
#ifndef EDUKE32_RETAIL_MENU
480
MAKE_MENU_TOP_ENTRYLINK( "Game Setup", MEF_OptionsMenu, OPTIONS_GAMESETUP, MENU_GAMESETUP );
480
MAKE_MENU_TOP_ENTRYLINK( "Game Setup", MEF_OptionsMenu, OPTIONS_GAMESETUP, MENU_GAMESETUP );
481
#endif
481
#endif
482
MAKE_MENU_TOP_ENTRYLINK( "Sound Setup", MEF_OptionsMenu, OPTIONS_SOUNDSETUP, MENU_SOUND );
482
MAKE_MENU_TOP_ENTRYLINK( "Sound Setup", MEF_OptionsMenu, OPTIONS_SOUNDSETUP, MENU_SOUND );
483
MAKE_MENU_TOP_ENTRYLINK( "Display Setup", MEF_OptionsMenu, OPTIONS_DISPLAYSETUP, MENU_DISPLAYSETUP );
483
MAKE_MENU_TOP_ENTRYLINK( "Display Setup", MEF_OptionsMenu, OPTIONS_DISPLAYSETUP, MENU_DISPLAYSETUP );
484
MAKE_MENU_TOP_ENTRYLINK( "Player Setup", MEF_OptionsMenu, OPTIONS_PLAYERSETUP, MENU_PLAYER );
484
MAKE_MENU_TOP_ENTRYLINK( "Player Setup", MEF_OptionsMenu, OPTIONS_PLAYERSETUP, MENU_PLAYER );
485
#ifndef EDUKE32_ANDROID_MENU
485
#ifndef EDUKE32_ANDROID_MENU
486
MAKE_MENU_TOP_ENTRYLINK( "Control Setup", MEF_OptionsMenu, OPTIONS_CONTROLS, MENU_CONTROLS );
486
MAKE_MENU_TOP_ENTRYLINK( "Control Setup", MEF_OptionsMenu, OPTIONS_CONTROLS, MENU_CONTROLS );
487
487
488
MAKE_MENU_TOP_ENTRYLINK( "Keyboard Setup", MEF_BigOptionsRtSections, OPTIONS_KEYBOARDSETUP, MENU_KEYBOARDSETUP );
488
MAKE_MENU_TOP_ENTRYLINK( "Keyboard Setup", MEF_BigOptionsRtSections, OPTIONS_KEYBOARDSETUP, MENU_KEYBOARDSETUP );
489
MAKE_MENU_TOP_ENTRYLINK( "Mouse Setup", MEF_BigOptionsRtSections, OPTIONS_MOUSESETUP, MENU_MOUSESETUP );
489
MAKE_MENU_TOP_ENTRYLINK( "Mouse Setup", MEF_BigOptionsRtSections, OPTIONS_MOUSESETUP, MENU_MOUSESETUP );
490
#endif
490
#endif
491
MAKE_MENU_TOP_ENTRYLINK( "Gamepad Setup", MEF_BigOptionsRtSections, OPTIONS_JOYSTICKSETUP, MENU_JOYSTICKSETUP );
491
MAKE_MENU_TOP_ENTRYLINK( "Gamepad Setup", MEF_BigOptionsRtSections, OPTIONS_JOYSTICKSETUP, MENU_JOYSTICKSETUP );
492
#ifdef EDUKE32_ANDROID_MENU
492
#ifdef EDUKE32_ANDROID_MENU
493
MAKE_MENU_TOP_ENTRYLINK( "Touch Setup", MEF_BigOptionsRtSections, OPTIONS_TOUCHSETUP, MENU_TOUCHSETUP );
493
MAKE_MENU_TOP_ENTRYLINK( "Touch Setup", MEF_BigOptionsRtSections, OPTIONS_TOUCHSETUP, MENU_TOUCHSETUP );
494
#endif
494
#endif
495
#ifdef EDUKE32_RETAIL_MENU
495
#ifdef EDUKE32_RETAIL_MENU
496
MAKE_MENU_TOP_ENTRYLINK("Cheats", MEF_OptionsMenu, OPTIONS_CHEATS, MENU_CHEATS);
496
MAKE_MENU_TOP_ENTRYLINK("Cheats", MEF_OptionsMenu, OPTIONS_CHEATS, MENU_CHEATS);
497
#endif
497
#endif
498
498
499
static int32_t newresolution, newrendermode, newfullscreen, newvsync, newborderless;
499
static int32_t newresolution, newrendermode, newfullscreen, newvsync, newborderless;
500
500
501
enum resflags_t {
501
enum resflags_t {
502
    RES_FS  = 0x1,
502
    RES_FS  = 0x1,
503
    RES_WIN = 0x2,
503
    RES_WIN = 0x2,
504
};
504
};
505
505
506
#define MAXRESOLUTIONSTRINGLENGTH 19
506
#define MAXRESOLUTIONSTRINGLENGTH 19
507
507
508
typedef struct resolution_t {
508
typedef struct resolution_t {
509
    int32_t xdim, ydim;
509
    int32_t xdim, ydim;
510
    int32_t flags;
510
    int32_t flags;
511
    int32_t bppmax;
511
    int32_t bppmax;
512
    char name[MAXRESOLUTIONSTRINGLENGTH];
512
    char name[MAXRESOLUTIONSTRINGLENGTH];
513
} resolution_t;
513
} resolution_t;
514
514
515
resolution_t resolution[MAXVALIDMODES];
515
resolution_t resolution[MAXVALIDMODES];
516
516
517
static char const *MEOSN_VIDEOSETUP_RESOLUTION[MAXVALIDMODES];
517
static char const *MEOSN_VIDEOSETUP_RESOLUTION[MAXVALIDMODES];
518
static MenuOptionSet_t MEOS_VIDEOSETUP_RESOLUTION = MAKE_MENUOPTIONSETDYN( MEOSN_VIDEOSETUP_RESOLUTION, NULL, 0, 0x0 );
518
static MenuOptionSet_t MEOS_VIDEOSETUP_RESOLUTION = MAKE_MENUOPTIONSETDYN( MEOSN_VIDEOSETUP_RESOLUTION, NULL, 0, 0x0 );
519
static MenuOption_t MEO_VIDEOSETUP_RESOLUTION = MAKE_MENUOPTION( &MF_Redfont, &MEOS_VIDEOSETUP_RESOLUTION, &newresolution );
519
static MenuOption_t MEO_VIDEOSETUP_RESOLUTION = MAKE_MENUOPTION( &MF_Redfont, &MEOS_VIDEOSETUP_RESOLUTION, &newresolution );
520
static MenuEntry_t ME_VIDEOSETUP_RESOLUTION = MAKE_MENUENTRY( "Resolution:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_RESOLUTION, Option );
520
static MenuEntry_t ME_VIDEOSETUP_RESOLUTION = MAKE_MENUENTRY( "Resolution:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_RESOLUTION, Option );
521
521
522
#ifdef USE_OPENGL
522
#ifdef USE_OPENGL
523
#ifdef POLYMER
523
#ifdef POLYMER
524
static char const *MEOSN_VIDEOSETUP_RENDERER[] = { "Classic", "Polymost", "Polymer", };
524
static char const *MEOSN_VIDEOSETUP_RENDERER[] = { "Classic", "Polymost", "Polymer", };
525
static int32_t MEOSV_VIDEOSETUP_RENDERER[] = { REND_CLASSIC, REND_POLYMOST, REND_POLYMER, };
525
static int32_t MEOSV_VIDEOSETUP_RENDERER[] = { REND_CLASSIC, REND_POLYMOST, REND_POLYMER, };
526
#else
526
#else
527
static char const *MEOSN_VIDEOSETUP_RENDERER[] = { "Classic", "OpenGL", };
527
static char const *MEOSN_VIDEOSETUP_RENDERER[] = { "Classic", "OpenGL", };
528
static int32_t MEOSV_VIDEOSETUP_RENDERER[] = { REND_CLASSIC, REND_POLYMOST, };
528
static int32_t MEOSV_VIDEOSETUP_RENDERER[] = { REND_CLASSIC, REND_POLYMOST, };
529
#endif
529
#endif
530
530
531
static MenuOptionSet_t MEOS_VIDEOSETUP_RENDERER = MAKE_MENUOPTIONSET( MEOSN_VIDEOSETUP_RENDERER, MEOSV_VIDEOSETUP_RENDERER, 0x2 );
531
static MenuOptionSet_t MEOS_VIDEOSETUP_RENDERER = MAKE_MENUOPTIONSET( MEOSN_VIDEOSETUP_RENDERER, MEOSV_VIDEOSETUP_RENDERER, 0x2 );
532
532
533
static MenuOption_t MEO_VIDEOSETUP_RENDERER = MAKE_MENUOPTION( &MF_Redfont, &MEOS_VIDEOSETUP_RENDERER, &newrendermode );
533
static MenuOption_t MEO_VIDEOSETUP_RENDERER = MAKE_MENUOPTION( &MF_Redfont, &MEOS_VIDEOSETUP_RENDERER, &newrendermode );
534
static MenuEntry_t ME_VIDEOSETUP_RENDERER = MAKE_MENUENTRY( "Renderer:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_RENDERER, Option );
534
static MenuEntry_t ME_VIDEOSETUP_RENDERER = MAKE_MENUENTRY( "Renderer:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_RENDERER, Option );
535
#endif
535
#endif
536
536
537
static MenuOption_t MEO_VIDEOSETUP_FULLSCREEN = MAKE_MENUOPTION( &MF_Redfont, &MEOS_YesNo, &newfullscreen );
537
static MenuOption_t MEO_VIDEOSETUP_FULLSCREEN = MAKE_MENUOPTION( &MF_Redfont, &MEOS_YesNo, &newfullscreen );
538
static MenuEntry_t ME_VIDEOSETUP_FULLSCREEN = MAKE_MENUENTRY( "Windowed:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_FULLSCREEN, Option );
538
static MenuEntry_t ME_VIDEOSETUP_FULLSCREEN = MAKE_MENUENTRY( "Windowed:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_FULLSCREEN, Option );
539
539
540
static char const *MEOSN_VIDEOSETUP_BORDERLESS [] = { "No", "Yes", "Auto", };
540
static char const *MEOSN_VIDEOSETUP_BORDERLESS [] = { "No", "Yes", "Auto", };
541
static int32_t MEOSV_VIDEOSETUP_BORDERLESS [] = { 0, 1, 2, };
541
static int32_t MEOSV_VIDEOSETUP_BORDERLESS [] = { 0, 1, 2, };
542
static MenuOptionSet_t MEOS_VIDEOSETUP_BORDERLESS = MAKE_MENUOPTIONSET(MEOSN_VIDEOSETUP_BORDERLESS, MEOSV_VIDEOSETUP_BORDERLESS, 0x2);
542
static MenuOptionSet_t MEOS_VIDEOSETUP_BORDERLESS = MAKE_MENUOPTIONSET(MEOSN_VIDEOSETUP_BORDERLESS, MEOSV_VIDEOSETUP_BORDERLESS, 0x2);
543
static MenuOption_t MEO_VIDEOSETUP_BORDERLESS = MAKE_MENUOPTION(&MF_Redfont, &MEOS_VIDEOSETUP_BORDERLESS, &newborderless);
543
static MenuOption_t MEO_VIDEOSETUP_BORDERLESS = MAKE_MENUOPTION(&MF_Redfont, &MEOS_VIDEOSETUP_BORDERLESS, &newborderless);
544
static MenuEntry_t ME_VIDEOSETUP_BORDERLESS = MAKE_MENUENTRY("Borderless:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_BORDERLESS, Option);
544
static MenuEntry_t ME_VIDEOSETUP_BORDERLESS = MAKE_MENUENTRY("Borderless:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_BORDERLESS, Option);
545
545
546
static char const *MEOSN_VIDEOSETUP_VSYNC[] = { "Adaptive", "Off", "On",
546
static char const *MEOSN_VIDEOSETUP_VSYNC[] = { "Adaptive", "Off", "On",
547
#if defined _WIN32 && SDL_MAJOR_VERSION == 2
547
#if defined _WIN32 && SDL_MAJOR_VERSION == 2
548
                                                "KMT",
548
                                                "KMT",
549
#endif
549
#endif
550
};
550
};
551
551
552
static int32_t MEOSV_VIDEOSETUP_VSYNC[] = { -1, 0, 1,
552
static int32_t MEOSV_VIDEOSETUP_VSYNC[] = { -1, 0, 1,
553
#if defined _WIN32 && SDL_MAJOR_VERSION == 2
553
#if defined _WIN32 && SDL_MAJOR_VERSION == 2
554
                                             2,
554
                                             2,
555
#endif
555
#endif
556
};
556
};
557
557
558
static MenuOptionSet_t MEOS_VIDEOSETUP_VSYNC = MAKE_MENUOPTIONSET(MEOSN_VIDEOSETUP_VSYNC, MEOSV_VIDEOSETUP_VSYNC, 0x2);
558
static MenuOptionSet_t MEOS_VIDEOSETUP_VSYNC = MAKE_MENUOPTIONSET(MEOSN_VIDEOSETUP_VSYNC, MEOSV_VIDEOSETUP_VSYNC, 0x2);
559
static MenuOption_t MEO_VIDEOSETUP_VSYNC = MAKE_MENUOPTION(&MF_Redfont, &MEOS_VIDEOSETUP_VSYNC, &newvsync);
559
static MenuOption_t MEO_VIDEOSETUP_VSYNC = MAKE_MENUOPTION(&MF_Redfont, &MEOS_VIDEOSETUP_VSYNC, &newvsync);
560
static MenuEntry_t ME_VIDEOSETUP_VSYNC = MAKE_MENUENTRY("VSync:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_VSYNC, Option);
560
static MenuEntry_t ME_VIDEOSETUP_VSYNC = MAKE_MENUENTRY("VSync:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_VSYNC, Option);
561
561
562
562
563
563
564
static char const *MEOSN_VIDEOSETUP_FRAMELIMIT [] = { "Auto", "None", "30 fps", "60 fps", "75 fps", "100 fps", "120 fps", "144 fps", "165 fps", "240 fps" };
564
static char const *MEOSN_VIDEOSETUP_FRAMELIMIT [] = { "Auto", "None", "30 fps", "60 fps", "75 fps", "100 fps", "120 fps", "144 fps", "165 fps", "240 fps" };
565
static int32_t MEOSV_VIDEOSETUP_FRAMELIMIT [] = { -1, 0, 30, 60, 75, 100, 120, 144, 165, 240 };
565
static int32_t MEOSV_VIDEOSETUP_FRAMELIMIT [] = { -1, 0, 30, 60, 75, 100, 120, 144, 165, 240 };
566
static MenuOptionSet_t MEOS_VIDEOSETUP_FRAMELIMIT = MAKE_MENUOPTIONSET(MEOSN_VIDEOSETUP_FRAMELIMIT, MEOSV_VIDEOSETUP_FRAMELIMIT, 0x0);
566
static MenuOptionSet_t MEOS_VIDEOSETUP_FRAMELIMIT = MAKE_MENUOPTIONSET(MEOSN_VIDEOSETUP_FRAMELIMIT, MEOSV_VIDEOSETUP_FRAMELIMIT, 0x0);
567
static MenuOption_t MEO_VIDEOSETUP_FRAMELIMIT= MAKE_MENUOPTION(&MF_Redfont, &MEOS_VIDEOSETUP_FRAMELIMIT, &r_maxfps);
567
static MenuOption_t MEO_VIDEOSETUP_FRAMELIMIT= MAKE_MENUOPTION(&MF_Redfont, &MEOS_VIDEOSETUP_FRAMELIMIT, &r_maxfps);
568
static MenuEntry_t ME_VIDEOSETUP_FRAMELIMIT = MAKE_MENUENTRY("Framerate limit:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_FRAMELIMIT, Option);
568
static MenuEntry_t ME_VIDEOSETUP_FRAMELIMIT = MAKE_MENUENTRY("Framerate limit:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_FRAMELIMIT, Option);
569
569
570
static MenuRangeInt32_t MEO_VIDEOSETUP_FRAMELIMITOFFSET = MAKE_MENURANGE( &r_maxfpsoffset, &MF_Redfont, -10, 10, 0, 21, 1 );
570
static MenuRangeInt32_t MEO_VIDEOSETUP_FRAMELIMITOFFSET = MAKE_MENURANGE( &r_maxfpsoffset, &MF_Redfont, -10, 10, 0, 21, 1 );
571
static MenuEntry_t ME_VIDEOSETUP_FRAMELIMITOFFSET = MAKE_MENUENTRY( "FPS offset:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_FRAMELIMITOFFSET, RangeInt32 );
571
static MenuEntry_t ME_VIDEOSETUP_FRAMELIMITOFFSET = MAKE_MENUENTRY( "FPS offset:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_FRAMELIMITOFFSET, RangeInt32 );
572
572
573
static MenuEntry_t ME_VIDEOSETUP_APPLY = MAKE_MENUENTRY( "Apply Changes", &MF_Redfont, &MEF_BigOptions_Apply, &MEO_NULL, Link );
573
static MenuEntry_t ME_VIDEOSETUP_APPLY = MAKE_MENUENTRY( "Apply Changes", &MF_Redfont, &MEF_BigOptions_Apply, &MEO_NULL, Link );
574
574
575
575
576
static MenuLink_t MEO_DISPLAYSETUP_COLORCORR = { MENU_COLCORR, MA_Advance, };
576
static MenuLink_t MEO_DISPLAYSETUP_COLORCORR = { MENU_COLCORR, MA_Advance, };
577
static MenuEntry_t ME_DISPLAYSETUP_COLORCORR = MAKE_MENUENTRY( "Color Correction", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_COLORCORR, Link );
577
static MenuEntry_t ME_DISPLAYSETUP_COLORCORR = MAKE_MENUENTRY( "Color Correction", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_COLORCORR, Link );
578
578
579
579
580
static char const *MEOSN_DISPLAYSETUP_UPSCALING[] = { "None", "2x" };
580
static char const *MEOSN_DISPLAYSETUP_UPSCALING[] = { "None", "2x" };
581
static int32_t MEOSV_DISPLAYSETUP_UPSCALING[] = { 1, 2 };
581
static int32_t MEOSV_DISPLAYSETUP_UPSCALING[] = { 1, 2 };
582
static MenuOptionSet_t MEOS_DISPLAYSETUP_UPSCALING = MAKE_MENUOPTIONSET( MEOSN_DISPLAYSETUP_UPSCALING, MEOSV_DISPLAYSETUP_UPSCALING, 0x0 );
582
static MenuOptionSet_t MEOS_DISPLAYSETUP_UPSCALING = MAKE_MENUOPTIONSET( MEOSN_DISPLAYSETUP_UPSCALING, MEOSV_DISPLAYSETUP_UPSCALING, 0x0 );
583
static MenuOption_t MEO_DISPLAYSETUP_UPSCALING = MAKE_MENUOPTION( &MF_Redfont, &MEOS_DISPLAYSETUP_UPSCALING, &ud.detail );
583
static MenuOption_t MEO_DISPLAYSETUP_UPSCALING = MAKE_MENUOPTION( &MF_Redfont, &MEOS_DISPLAYSETUP_UPSCALING, &ud.detail );
584
static MenuEntry_t ME_DISPLAYSETUP_UPSCALING = MAKE_MENUENTRY( "Upscaling:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_UPSCALING, Option );
584
static MenuEntry_t ME_DISPLAYSETUP_UPSCALING = MAKE_MENUENTRY( "Upscaling:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_UPSCALING, Option );
585
585
586
586
587
#ifndef EDUKE32_ANDROID_MENU
587
#ifndef EDUKE32_ANDROID_MENU
588
static MenuOption_t MEO_DISPLAYSETUP_ASPECTRATIO = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &r_usenewaspect);
588
static MenuOption_t MEO_DISPLAYSETUP_ASPECTRATIO = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &r_usenewaspect);
589
static MenuEntry_t ME_DISPLAYSETUP_ASPECTRATIO = MAKE_MENUENTRY( "Widescreen:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_ASPECTRATIO, Option );
589
static MenuEntry_t ME_DISPLAYSETUP_ASPECTRATIO = MAKE_MENUENTRY( "Widescreen:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_ASPECTRATIO, Option );
590
#endif
590
#endif
591
591
592
static MenuOption_t MEO_DISPLAYSETUP_VOXELS = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &usevoxels);
592
static MenuOption_t MEO_DISPLAYSETUP_VOXELS = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &usevoxels);
593
static MenuEntry_t ME_DISPLAYSETUP_VOXELS = MAKE_MENUENTRY( "Voxels:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_VOXELS, Option );
593
static MenuEntry_t ME_DISPLAYSETUP_VOXELS = MAKE_MENUENTRY( "Voxels:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_VOXELS, Option );
594
594
595
static MenuRangeInt32_t MEO_DISPLAYSETUP_FOV = MAKE_MENURANGE( &ud.fov, &MF_Redfont, 70, 120, 0, 11, 1 );
595
static MenuRangeInt32_t MEO_DISPLAYSETUP_FOV = MAKE_MENURANGE( &ud.fov, &MF_Redfont, 70, 120, 0, 11, 1 );
596
static MenuEntry_t ME_DISPLAYSETUP_FOV = MAKE_MENUENTRY( "FOV:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_FOV, RangeInt32 );
596
static MenuEntry_t ME_DISPLAYSETUP_FOV = MAKE_MENUENTRY( "FOV:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_FOV, RangeInt32 );
597
597
598
598
599
#ifdef USE_OPENGL
599
#ifdef USE_OPENGL
600
# if !(defined EDUKE32_STANDALONE) || defined POLYMER
600
# if !(defined EDUKE32_STANDALONE) || defined POLYMER
601
//POGOTODO: allow filtering again in standalone once indexed colour textures support filtering
601
//POGOTODO: allow filtering again in standalone once indexed colour textures support filtering
602
#ifdef TEXFILTER_MENU_OPTIONS
602
#ifdef TEXFILTER_MENU_OPTIONS
603
static char const *MEOSN_DISPLAYSETUP_TEXFILTER[] = { "Classic", "Filtered" };
603
static char const *MEOSN_DISPLAYSETUP_TEXFILTER[] = { "Classic", "Filtered" };
604
static int32_t MEOSV_DISPLAYSETUP_TEXFILTER[] = { TEXFILTER_OFF, TEXFILTER_ON };
604
static int32_t MEOSV_DISPLAYSETUP_TEXFILTER[] = { TEXFILTER_OFF, TEXFILTER_ON };
605
static MenuOptionSet_t MEOS_DISPLAYSETUP_TEXFILTER = MAKE_MENUOPTIONSET( MEOSN_DISPLAYSETUP_TEXFILTER, MEOSV_DISPLAYSETUP_TEXFILTER, 0x2 );
605
static MenuOptionSet_t MEOS_DISPLAYSETUP_TEXFILTER = MAKE_MENUOPTIONSET( MEOSN_DISPLAYSETUP_TEXFILTER, MEOSV_DISPLAYSETUP_TEXFILTER, 0x2 );
606
static MenuOption_t MEO_DISPLAYSETUP_TEXFILTER = MAKE_MENUOPTION( &MF_Redfont, &MEOS_DISPLAYSETUP_TEXFILTER, &gltexfiltermode );
606
static MenuOption_t MEO_DISPLAYSETUP_TEXFILTER = MAKE_MENUOPTION( &MF_Redfont, &MEOS_DISPLAYSETUP_TEXFILTER, &gltexfiltermode );
607
static MenuEntry_t ME_DISPLAYSETUP_TEXFILTER = MAKE_MENUENTRY( "Texture Mode:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_TEXFILTER, Option );
607
static MenuEntry_t ME_DISPLAYSETUP_TEXFILTER = MAKE_MENUENTRY( "Texture Mode:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_TEXFILTER, Option );
608
608
609
static char const *MEOSN_DISPLAYSETUP_ANISOTROPY[] = { "Max", "None", "2x", "4x", "8x", "16x", };
609
static char const *MEOSN_DISPLAYSETUP_ANISOTROPY[] = { "Max", "None", "2x", "4x", "8x", "16x", };
610
static int32_t MEOSV_DISPLAYSETUP_ANISOTROPY[] = { 0, 1, 2, 4, 8, 16, };
610
static int32_t MEOSV_DISPLAYSETUP_ANISOTROPY[] = { 0, 1, 2, 4, 8, 16, };
611
static MenuOptionSet_t MEOS_DISPLAYSETUP_ANISOTROPY = MAKE_MENUOPTIONSET( MEOSN_DISPLAYSETUP_ANISOTROPY, MEOSV_DISPLAYSETUP_ANISOTROPY, 0x0 );
611
static MenuOptionSet_t MEOS_DISPLAYSETUP_ANISOTROPY = MAKE_MENUOPTIONSET( MEOSN_DISPLAYSETUP_ANISOTROPY, MEOSV_DISPLAYSETUP_ANISOTROPY, 0x0 );
612
static MenuOption_t MEO_DISPLAYSETUP_ANISOTROPY = MAKE_MENUOPTION(&MF_Redfont, &MEOS_DISPLAYSETUP_ANISOTROPY, &glanisotropy);
612
static MenuOption_t MEO_DISPLAYSETUP_ANISOTROPY = MAKE_MENUOPTION(&MF_Redfont, &MEOS_DISPLAYSETUP_ANISOTROPY, &glanisotropy);
613
static MenuEntry_t ME_DISPLAYSETUP_ANISOTROPY = MAKE_MENUENTRY( "Anisotropy:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_ANISOTROPY, Option );
613
static MenuEntry_t ME_DISPLAYSETUP_ANISOTROPY = MAKE_MENUENTRY( "Anisotropy:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_ANISOTROPY, Option );
614
#endif
614
#endif
615
# endif
615
# endif
616
616
617
# ifdef EDUKE32_ANDROID_MENU
617
# ifdef EDUKE32_ANDROID_MENU
618
static MenuOption_t MEO_DISPLAYSETUP_HIDEDPAD = MAKE_MENUOPTION(&MF_Redfont, &MEOS_NoYes, &droidinput.hideStick);
618
static MenuOption_t MEO_DISPLAYSETUP_HIDEDPAD = MAKE_MENUOPTION(&MF_Redfont, &MEOS_NoYes, &droidinput.hideStick);
619
static MenuEntry_t ME_DISPLAYSETUP_HIDEDPAD = MAKE_MENUENTRY("Hide touch D-pad:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_HIDEDPAD, Option);
619
static MenuEntry_t ME_DISPLAYSETUP_HIDEDPAD = MAKE_MENUENTRY("Hide touch D-pad:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_HIDEDPAD, Option);
620
620
621
static MenuRangeFloat_t MEO_DISPLAYSETUP_TOUCHALPHA = MAKE_MENURANGE(&droidinput.gameControlsAlpha, &MF_Redfont, 0, 1, 0, 16, 2);
621
static MenuRangeFloat_t MEO_DISPLAYSETUP_TOUCHALPHA = MAKE_MENURANGE(&droidinput.gameControlsAlpha, &MF_Redfont, 0, 1, 0, 16, 2);
622
static MenuEntry_t ME_DISPLAYSETUP_TOUCHALPHA = MAKE_MENUENTRY("UI opacity:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_TOUCHALPHA, RangeFloat);
622
static MenuEntry_t ME_DISPLAYSETUP_TOUCHALPHA = MAKE_MENUENTRY("UI opacity:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_TOUCHALPHA, RangeFloat);
623
# endif
623
# endif
624
624
625
#endif
625
#endif
626
626
627
static char const s_Scale[] = "Scale:";
627
static char const s_Scale[] = "Scale:";
628
628
629
static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.crosshair);
629
static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.crosshair);
630
static MenuEntry_t ME_SCREENSETUP_CROSSHAIR = MAKE_MENUENTRY( "Crosshair:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_CROSSHAIR, Option );
630
static MenuEntry_t ME_SCREENSETUP_CROSSHAIR = MAKE_MENUENTRY( "Crosshair:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_CROSSHAIR, Option );
631
static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( &ud.crosshairscale, &MF_Redfont, 25, 100, 0, 16, 2 );
631
static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( &ud.crosshairscale, &MF_Redfont, 25, 100, 0, 16, 2 );
632
static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_CROSSHAIRSIZE, RangeInt32 );
632
static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_CROSSHAIRSIZE, RangeInt32 );
633
633
634
static int32_t vpsize;
634
static int32_t vpsize;
635
static MenuRangeInt32_t MEO_SCREENSETUP_SCREENSIZE = MAKE_MENURANGE( &vpsize, &MF_Redfont, 0, 0, 0, 1, EnforceIntervals );
635
static MenuRangeInt32_t MEO_SCREENSETUP_SCREENSIZE = MAKE_MENURANGE( &vpsize, &MF_Redfont, 0, 0, 0, 1, EnforceIntervals );
636
static MenuOption_t MEO_SCREENSETUP_SCREENSIZE_TWO = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &vpsize );
636
static MenuOption_t MEO_SCREENSETUP_SCREENSIZE_TWO = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &vpsize );
637
static MenuEntry_t ME_SCREENSETUP_SCREENSIZE = MAKE_MENUENTRY( "Status bar:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_SCREENSIZE, RangeInt32 );
637
static MenuEntry_t ME_SCREENSETUP_SCREENSIZE = MAKE_MENUENTRY( "Status bar:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_SCREENSIZE, RangeInt32 );
638
static MenuRangeInt32_t MEO_SCREENSETUP_TEXTSIZE = MAKE_MENURANGE( &ud.textscale, &MF_Redfont, 100, 400, 0, 16, 2 );
638
static MenuRangeInt32_t MEO_SCREENSETUP_TEXTSIZE = MAKE_MENURANGE( &ud.textscale, &MF_Redfont, 100, 400, 0, 16, 2 );
639
static MenuEntry_t ME_SCREENSETUP_TEXTSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_TEXTSIZE, RangeInt32 );
639
static MenuEntry_t ME_SCREENSETUP_TEXTSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_TEXTSIZE, RangeInt32 );
640
static MenuOption_t MEO_SCREENSETUP_LEVELSTATS = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.levelstats);
640
static MenuOption_t MEO_SCREENSETUP_LEVELSTATS = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.levelstats);
641
static MenuEntry_t ME_SCREENSETUP_LEVELSTATS = MAKE_MENUENTRY( "Level stats:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_LEVELSTATS, Option );
641
static MenuEntry_t ME_SCREENSETUP_LEVELSTATS = MAKE_MENUENTRY( "Level stats:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_LEVELSTATS, Option );
642
642
643
643
644
static MenuOption_t MEO_SCREENSETUP_SHOWPICKUPMESSAGES = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.fta_on);
644
static MenuOption_t MEO_SCREENSETUP_SHOWPICKUPMESSAGES = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.fta_on);
645
static MenuEntry_t ME_SCREENSETUP_SHOWPICKUPMESSAGES = MAKE_MENUENTRY( "Game messages:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_SHOWPICKUPMESSAGES, Option );
645
static MenuEntry_t ME_SCREENSETUP_SHOWPICKUPMESSAGES = MAKE_MENUENTRY( "Game messages:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_SHOWPICKUPMESSAGES, Option );
646
646
647
647
648
648
649
#ifdef EDUKE32_ANDROID_MENU
649
#ifdef EDUKE32_ANDROID_MENU
650
static char const *MEOSN_SCREENSETUP_STATUSBARONTOP[] = { "Bottom", "Top" };
650
static char const *MEOSN_SCREENSETUP_STATUSBARONTOP[] = { "Bottom", "Top" };
651
static int32_t MEOSV_SCREENSETUP_STATUSBARONTOP[] = { 0, 1 };
651
static int32_t MEOSV_SCREENSETUP_STATUSBARONTOP[] = { 0, 1 };
652
static MenuOptionSet_t MEOS_SCREENSETUP_STATUSBARONTOP = MAKE_MENUOPTIONSET( MEOSN_SCREENSETUP_STATUSBARONTOP, MEOSV_SCREENSETUP_STATUSBARONTOP, 0x2 );
652
static MenuOptionSet_t MEOS_SCREENSETUP_STATUSBARONTOP = MAKE_MENUOPTIONSET( MEOSN_SCREENSETUP_STATUSBARONTOP, MEOSV_SCREENSETUP_STATUSBARONTOP, 0x2 );
653
static MenuOption_t MEO_SCREENSETUP_STATUSBARONTOP = MAKE_MENUOPTION(&MF_Redfont, &MEOS_SCREENSETUP_STATUSBARONTOP, &ud.hudontop);
653
static MenuOption_t MEO_SCREENSETUP_STATUSBARONTOP = MAKE_MENUOPTION(&MF_Redfont, &MEOS_SCREENSETUP_STATUSBARONTOP, &ud.hudontop);
654
static MenuEntry_t ME_SCREENSETUP_STATUSBARONTOP = MAKE_MENUENTRY( "Status bar:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_STATUSBARONTOP, Option );
654
static MenuEntry_t ME_SCREENSETUP_STATUSBARONTOP = MAKE_MENUENTRY( "Status bar:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_STATUSBARONTOP, Option );
655
#endif
655
#endif
656
656
657
static MenuRangeInt32_t MEO_SCREENSETUP_SBARSIZE = MAKE_MENURANGE( &ud.statusbarscale, &MF_Redfont, 50, 100, 0, 10, 2 );
657
static MenuRangeInt32_t MEO_SCREENSETUP_SBARSIZE = MAKE_MENURANGE( &ud.statusbarscale, &MF_Redfont, 50, 100, 0, 10, 2 );
658
static MenuEntry_t ME_SCREENSETUP_SBARSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_SBARSIZE, RangeInt32 );
658
static MenuEntry_t ME_SCREENSETUP_SBARSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_SBARSIZE, RangeInt32 );
659
659
660
660
661
static MenuLink_t MEO_DISPLAYSETUP_SCREENSETUP = { MENU_SCREENSETUP, MA_Advance, };
661
static MenuLink_t MEO_DISPLAYSETUP_SCREENSETUP = { MENU_SCREENSETUP, MA_Advance, };
662
static MenuEntry_t ME_DISPLAYSETUP_SCREENSETUP = MAKE_MENUENTRY( "HUD setup", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_SCREENSETUP, Link );
662
static MenuEntry_t ME_DISPLAYSETUP_SCREENSETUP = MAKE_MENUENTRY( "HUD setup", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_SCREENSETUP, Link );
663
663
664
664
665
#ifndef EDUKE32_RETAIL_MENU
665
#ifndef EDUKE32_RETAIL_MENU
666
#ifdef USE_OPENGL
666
#ifdef USE_OPENGL
667
static MenuLink_t MEO_DISPLAYSETUP_ADVANCED_GL_POLYMOST = { MENU_POLYMOST, MA_Advance, };
667
static MenuLink_t MEO_DISPLAYSETUP_ADVANCED_GL_POLYMOST = { MENU_POLYMOST, MA_Advance, };
668
static MenuEntry_t ME_DISPLAYSETUP_ADVANCED_GL_POLYMOST = MAKE_MENUENTRY( "Polymost setup", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_ADVANCED_GL_POLYMOST, Link );
668
static MenuEntry_t ME_DISPLAYSETUP_ADVANCED_GL_POLYMOST = MAKE_MENUENTRY( "Polymost setup", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_ADVANCED_GL_POLYMOST, Link );
669
669
670
#ifdef POLYMER
670
#ifdef POLYMER
671
static MenuLink_t MEO_DISPLAYSETUP_ADVANCED_GL_POLYMER = { MENU_POLYMER, MA_Advance, };
671
static MenuLink_t MEO_DISPLAYSETUP_ADVANCED_GL_POLYMER = { MENU_POLYMER, MA_Advance, };
672
static MenuEntry_t ME_DISPLAYSETUP_ADVANCED_GL_POLYMER = MAKE_MENUENTRY("Polymer setup", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_ADVANCED_GL_POLYMER, Link);
672
static MenuEntry_t ME_DISPLAYSETUP_ADVANCED_GL_POLYMER = MAKE_MENUENTRY("Polymer setup", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_ADVANCED_GL_POLYMER, Link);
673
#endif
673
#endif
674
#endif
674
#endif
675
#endif
675
#endif
676
676
677
#ifndef EDUKE32_ANDROID_MENU
677
#ifndef EDUKE32_ANDROID_MENU
678
static MenuLink_t MEO_DISPLAYSETUP_VIDEOSETUP = { MENU_VIDEOSETUP, MA_Advance, };
678
static MenuLink_t MEO_DISPLAYSETUP_VIDEOSETUP = { MENU_VIDEOSETUP, MA_Advance, };
679
static MenuEntry_t ME_DISPLAYSETUP_VIDEOSETUP = MAKE_MENUENTRY( "Video mode", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_VIDEOSETUP, Link );
679
static MenuEntry_t ME_DISPLAYSETUP_VIDEOSETUP = MAKE_MENUENTRY( "Video mode", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_VIDEOSETUP, Link );
680
#endif
680
#endif
681
681
682
682
683
static MenuLink_t MEO_ENTERCHEAT = { MENU_CHEATENTRY, MA_None, };
683
static MenuLink_t MEO_ENTERCHEAT = { MENU_CHEATENTRY, MA_None, };
684
static MenuEntry_t ME_ENTERCHEAT = MAKE_MENUENTRY( "Enter Cheat Code", &MF_Redfont, &MEF_BigCheats, &MEO_ENTERCHEAT, Link );
684
static MenuEntry_t ME_ENTERCHEAT = MAKE_MENUENTRY( "Enter Cheat Code", &MF_Redfont, &MEF_BigCheats, &MEO_ENTERCHEAT, Link );
685
685
686
static MenuLink_t MEO_CHEAT_WARP = { MENU_CHEAT_WARP, MA_None, };
686
static MenuLink_t MEO_CHEAT_WARP = { MENU_CHEAT_WARP, MA_None, };
687
static MenuLink_t MEO_CHEAT_SKILL = { MENU_CHEAT_SKILL, MA_None, };
687
static MenuLink_t MEO_CHEAT_SKILL = { MENU_CHEAT_SKILL, MA_None, };
688
// KEEPINSYNC cheats.h: enum CheatCodeFunctions
688
// KEEPINSYNC cheats.h: enum CheatCodeFunctions
689
// KEEPINSYNC cheats.cpp: uint8_t CheatFunctionIDs[]
689
// KEEPINSYNC cheats.cpp: uint8_t CheatFunctionIDs[]
690
#define MAKE_MENUCHEAT( Name ) MAKE_MENUENTRY( Name, &MF_Bluefont, &MEF_Cheats, &MEO_NULL, Link )
690
#define MAKE_MENUCHEAT( Name ) MAKE_MENUENTRY( Name, &MF_Bluefont, &MEF_Cheats, &MEO_NULL, Link )
691
static MenuEntry_t ME_CheatCodes[] = {
691
static MenuEntry_t ME_CheatCodes[] = {
692
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_CASHMAN] ),
692
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_CASHMAN] ),
693
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_CORNHOLIO] ),
693
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_CORNHOLIO] ),
694
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_STUFF] ),
694
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_STUFF] ),
695
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_WEAPONS] ),
695
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_WEAPONS] ),
696
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_ITEMS] ),
696
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_ITEMS] ),
697
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_INVENTORY] ),
697
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_INVENTORY] ),
698
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_KEYS] ),
698
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_KEYS] ),
699
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_HYPER] ),
699
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_HYPER] ),
700
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_VIEW] ),
700
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_VIEW] ),
701
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_SHOWMAP] ),
701
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_SHOWMAP] ),
702
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_UNLOCK] ),
702
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_UNLOCK] ),
703
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_CLIP] ),
703
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_CLIP] ),
704
    MAKE_MENUENTRY( CheatDescriptions[CHEAT_SCOTTY], &MF_Bluefont, &MEF_Cheats, &MEO_CHEAT_WARP, Link ),
704
    MAKE_MENUENTRY( CheatDescriptions[CHEAT_SCOTTY], &MF_Bluefont, &MEF_Cheats, &MEO_CHEAT_WARP, Link ),
705
    MAKE_MENUENTRY( CheatDescriptions[CHEAT_SKILL], &MF_Bluefont, &MEF_Cheats, &MEO_CHEAT_SKILL, Link ),
705
    MAKE_MENUENTRY( CheatDescriptions[CHEAT_SKILL], &MF_Bluefont, &MEF_Cheats, &MEO_CHEAT_SKILL, Link ),
706
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_MONSTERS] ),
706
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_MONSTERS] ),
707
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_RATE] ),
707
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_RATE] ),
708
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_BETA] ),
708
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_BETA] ),
709
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_TODD] ),
709
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_TODD] ),
710
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_ALLEN] ),
710
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_ALLEN] ),
711
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_COORDS] ),
711
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_COORDS] ),
712
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_DEBUG] ),
712
    MAKE_MENUCHEAT( CheatDescriptions[CHEAT_DEBUG] ),
713
};
713
};
714
714
715
static MenuEntry_t *MEL_OPTIONS[] = {
715
static MenuEntry_t *MEL_OPTIONS[] = {
716
#ifndef EDUKE32_RETAIL_MENU
716
#ifndef EDUKE32_RETAIL_MENU
717
    &ME_OPTIONS_GAMESETUP,
717
    &ME_OPTIONS_GAMESETUP,
718
#endif
718
#endif
719
    &ME_OPTIONS_DISPLAYSETUP,
719
    &ME_OPTIONS_DISPLAYSETUP,
720
    &ME_OPTIONS_SOUNDSETUP,
720
    &ME_OPTIONS_SOUNDSETUP,
721
#ifndef EDUKE32_ANDROID_MENU
721
#ifndef EDUKE32_ANDROID_MENU
722
#ifndef EDUKE32_RETAIL_MENU
722
#ifndef EDUKE32_RETAIL_MENU
723
    &ME_OPTIONS_PLAYERSETUP,
723
    &ME_OPTIONS_PLAYERSETUP,
724
#endif
724
#endif
725
    &ME_OPTIONS_CONTROLS,
725
    &ME_OPTIONS_CONTROLS,
726
#else
726
#else
727
    &ME_OPTIONS_TOUCHSETUP,
727
    &ME_OPTIONS_TOUCHSETUP,
728
#endif
728
#endif
729
#ifdef EDUKE32_RETAIL_MENU
729
#ifdef EDUKE32_RETAIL_MENU
730
    &ME_GAMESETUP_SAVESETUP,
730
    &ME_GAMESETUP_SAVESETUP,
731
    &ME_OPTIONS_CHEATS
731
    &ME_OPTIONS_CHEATS
732
#endif
732
#endif
733
};
733
};
734
734
735
static MenuEntry_t *MEL_CONTROLS[] = {
735
static MenuEntry_t *MEL_CONTROLS[] = {
736
#ifndef EDUKE32_ANDROID_MENU
736
#ifndef EDUKE32_ANDROID_MENU
737
    &ME_OPTIONS_KEYBOARDSETUP,
737
    &ME_OPTIONS_KEYBOARDSETUP,
738
    &ME_OPTIONS_MOUSESETUP,
738
    &ME_OPTIONS_MOUSESETUP,
739
    &ME_OPTIONS_JOYSTICKSETUP,
739
    &ME_OPTIONS_JOYSTICKSETUP,
740
#else
740
#else
741
    &ME_OPTIONS_TOUCHSETUP,
741
    &ME_OPTIONS_TOUCHSETUP,
742
#endif
742
#endif
743
    &ME_Space6_Redfont,
743
    &ME_Space6_Redfont,
744
    &ME_GAMESETUP_AIM_AUTO,
744
    &ME_GAMESETUP_AIM_AUTO,
745
    &ME_GAMESETUP_ALWAYS_RUN,
745
    &ME_GAMESETUP_ALWAYS_RUN,
746
    &ME_GAMESETUP_WEAPSWITCH_PICKUP,
746
    &ME_GAMESETUP_WEAPSWITCH_PICKUP,
747
#ifdef EDUKE32_ANDROID_MENU
747
#ifdef EDUKE32_ANDROID_MENU
748
    &ME_GAMESETUP_QUICKSWITCH,
748
    &ME_GAMESETUP_QUICKSWITCH,
749
    &ME_GAMESETUP_CROUCHLOCK,
749
    &ME_GAMESETUP_CROUCHLOCK,
750
#endif
750
#endif
751
};
751
};
752
752
753
static MenuEntry_t *MEL_CHEATS[ARRAY_SIZE(ME_CheatCodes)+1] = {
753
static MenuEntry_t *MEL_CHEATS[ARRAY_SIZE(ME_CheatCodes)+1] = {
754
    &ME_ENTERCHEAT,
754
    &ME_ENTERCHEAT,
755
};
755
};
756
756
757
static MenuEntry_t *MEL_VIDEOSETUP[] = {
757
static MenuEntry_t *MEL_VIDEOSETUP[] = {
758
    &ME_VIDEOSETUP_RESOLUTION,
758
    &ME_VIDEOSETUP_RESOLUTION,
759
#ifdef USE_OPENGL
759
#ifdef USE_OPENGL
760
    &ME_VIDEOSETUP_RENDERER,
760
    &ME_VIDEOSETUP_RENDERER,
761
#endif
761
#endif
762
    &ME_VIDEOSETUP_FULLSCREEN,
762
    &ME_VIDEOSETUP_FULLSCREEN,
763
    &ME_VIDEOSETUP_BORDERLESS,
763
    &ME_VIDEOSETUP_BORDERLESS,
764
    &ME_VIDEOSETUP_VSYNC,
764
    &ME_VIDEOSETUP_VSYNC,
765
    &ME_VIDEOSETUP_FRAMELIMIT,
765
    &ME_VIDEOSETUP_FRAMELIMIT,
766
    &ME_VIDEOSETUP_FRAMELIMITOFFSET,
766
    &ME_VIDEOSETUP_FRAMELIMITOFFSET,
767
    &ME_Space4_Redfont,
767
    &ME_Space4_Redfont,
768
    &ME_VIDEOSETUP_APPLY,
768
    &ME_VIDEOSETUP_APPLY,
769
};
769
};
770
static MenuEntry_t *MEL_DISPLAYSETUP[] = {
770
static MenuEntry_t *MEL_DISPLAYSETUP[] = {
771
    &ME_DISPLAYSETUP_SCREENSETUP,
771
    &ME_DISPLAYSETUP_SCREENSETUP,
772
    &ME_DISPLAYSETUP_COLORCORR,
772
    &ME_DISPLAYSETUP_COLORCORR,
773
#ifndef EDUKE32_ANDROID_MENU
773
#ifndef EDUKE32_ANDROID_MENU
774
    &ME_DISPLAYSETUP_VIDEOSETUP,
774
    &ME_DISPLAYSETUP_VIDEOSETUP,
775
    &ME_DISPLAYSETUP_ASPECTRATIO,
775
    &ME_DISPLAYSETUP_ASPECTRATIO,
776
    &ME_DISPLAYSETUP_VOXELS,
776
    &ME_DISPLAYSETUP_VOXELS,
777
    &ME_DISPLAYSETUP_FOV,
777
    &ME_DISPLAYSETUP_FOV,
778
#endif
778
#endif
779
    &ME_DISPLAYSETUP_UPSCALING,
779
    &ME_DISPLAYSETUP_UPSCALING,
780
};
780
};
781
781
782
#ifdef USE_OPENGL
782
#ifdef USE_OPENGL
783
static MenuEntry_t *MEL_DISPLAYSETUP_GL[] = {
783
static MenuEntry_t *MEL_DISPLAYSETUP_GL[] = {
784
    &ME_DISPLAYSETUP_SCREENSETUP,
784
    &ME_DISPLAYSETUP_SCREENSETUP,
785
    &ME_DISPLAYSETUP_COLORCORR,
785
    &ME_DISPLAYSETUP_COLORCORR,
786
#ifndef EDUKE32_ANDROID_MENU
786
#ifndef EDUKE32_ANDROID_MENU
787
    &ME_DISPLAYSETUP_VIDEOSETUP,
787
    &ME_DISPLAYSETUP_VIDEOSETUP,
788
    &ME_DISPLAYSETUP_ASPECTRATIO,
788
    &ME_DISPLAYSETUP_ASPECTRATIO,
789
    &ME_DISPLAYSETUP_VOXELS,
789
    &ME_DISPLAYSETUP_VOXELS,
790
    &ME_DISPLAYSETUP_FOV,
790
    &ME_DISPLAYSETUP_FOV,
791
#endif
791
#endif
792
#ifndef EDUKE32_STANDALONE
792
#ifndef EDUKE32_STANDALONE
793
# ifdef TEXFILTER_MENU_OPTIONS
793
# ifdef TEXFILTER_MENU_OPTIONS
794
    &ME_DISPLAYSETUP_TEXFILTER,
794
    &ME_DISPLAYSETUP_TEXFILTER,
795
# endif
795
# endif
796
#endif
796
#endif
797
#ifdef EDUKE32_ANDROID_MENU
797
#ifdef EDUKE32_ANDROID_MENU
798
    &ME_DISPLAYSETUP_HIDEDPAD,
798
    &ME_DISPLAYSETUP_HIDEDPAD,
799
    &ME_DISPLAYSETUP_TOUCHALPHA,
799
    &ME_DISPLAYSETUP_TOUCHALPHA,
800
#else
800
#else
801
# ifndef EDUKE32_STANDALONE
801
# ifndef EDUKE32_STANDALONE
802
#  ifdef TEXFILTER_MENU_OPTIONS
802
#  ifdef TEXFILTER_MENU_OPTIONS
803
    &ME_DISPLAYSETUP_ANISOTROPY,
803
    &ME_DISPLAYSETUP_ANISOTROPY,
804
#  endif
804
#  endif
805
# endif
805
# endif
806
# ifndef EDUKE32_RETAIL_MENU
806
# ifndef EDUKE32_RETAIL_MENU
807
    &ME_DISPLAYSETUP_ADVANCED_GL_POLYMOST,
807
    &ME_DISPLAYSETUP_ADVANCED_GL_POLYMOST,
808
# endif
808
# endif
809
#endif
809
#endif
810
};
810
};
811
811
812
#ifdef POLYMER
812
#ifdef POLYMER
813
static MenuEntry_t *MEL_DISPLAYSETUP_GL_POLYMER[] = {
813
static MenuEntry_t *MEL_DISPLAYSETUP_GL_POLYMER[] = {
814
    &ME_DISPLAYSETUP_SCREENSETUP,
814
    &ME_DISPLAYSETUP_SCREENSETUP,
815
    &ME_DISPLAYSETUP_COLORCORR,
815
    &ME_DISPLAYSETUP_COLORCORR,
816
#ifndef EDUKE32_ANDROID_MENU
816
#ifndef EDUKE32_ANDROID_MENU
817
    &ME_DISPLAYSETUP_VIDEOSETUP,
817
    &ME_DISPLAYSETUP_VIDEOSETUP,
818
    &ME_DISPLAYSETUP_FOV,
818
    &ME_DISPLAYSETUP_FOV,
819
    &ME_DISPLAYSETUP_VOXELS,
819
    &ME_DISPLAYSETUP_VOXELS,
820
#endif
820
#endif
821
#ifdef TEXFILTER_MENU_OPTIONS
821
#ifdef TEXFILTER_MENU_OPTIONS
822
    &ME_DISPLAYSETUP_TEXFILTER,
822
    &ME_DISPLAYSETUP_TEXFILTER,
823
    &ME_DISPLAYSETUP_ANISOTROPY,
823
    &ME_DISPLAYSETUP_ANISOTROPY,
824
#endif
824
#endif
825
#ifndef EDUKE32_RETAIL_MENU
825
#ifndef EDUKE32_RETAIL_MENU
826
    &ME_DISPLAYSETUP_ADVANCED_GL_POLYMER,
826
    &ME_DISPLAYSETUP_ADVANCED_GL_POLYMER,
827
#endif
827
#endif
828
};
828
};
829
829
830
#endif
830
#endif
831
#endif
831
#endif
832
832
833
833
834
834
835
static char const MenuKeyNone[] = "  -";
835
static char const MenuKeyNone[] = "  -";
836
static char const *MEOSN_Keys[NUMKEYS];
836
static char const *MEOSN_Keys[NUMKEYS];
837
837
838
static MenuCustom2Col_t MEO_KEYBOARDSETUPFUNCS_TEMPLATE = { { NULL, NULL, }, MEOSN_Keys, &MF_Minifont, NUMKEYS, 54<<16, 0 };
838
static MenuCustom2Col_t MEO_KEYBOARDSETUPFUNCS_TEMPLATE = { { NULL, NULL, }, MEOSN_Keys, &MF_Minifont, NUMKEYS, 54<<16, 0 };
839
static MenuCustom2Col_t MEO_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
839
static MenuCustom2Col_t MEO_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
840
static MenuEntry_t ME_KEYBOARDSETUPFUNCS_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Minifont, &MEF_KBFuncList, &MEO_KEYBOARDSETUPFUNCS_TEMPLATE, Custom2Col );
840
static MenuEntry_t ME_KEYBOARDSETUPFUNCS_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Minifont, &MEF_KBFuncList, &MEO_KEYBOARDSETUPFUNCS_TEMPLATE, Custom2Col );
841
static MenuEntry_t ME_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
841
static MenuEntry_t ME_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
842
static MenuEntry_t *MEL_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
842
static MenuEntry_t *MEL_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
843
843
844
static MenuLink_t MEO_KEYBOARDSETUP_KEYS = { MENU_KEYBOARDKEYS, MA_Advance, };
844
static MenuLink_t MEO_KEYBOARDSETUP_KEYS = { MENU_KEYBOARDKEYS, MA_Advance, };
845
static MenuEntry_t ME_KEYBOARDSETUP_KEYS = MAKE_MENUENTRY( "Configure Keys", &MF_Redfont, &MEF_CenterMenu, &MEO_KEYBOARDSETUP_KEYS, Link );
845
static MenuEntry_t ME_KEYBOARDSETUP_KEYS = MAKE_MENUENTRY( "Configure Keys", &MF_Redfont, &MEF_CenterMenu, &MEO_KEYBOARDSETUP_KEYS, Link );
846
static MenuLink_t MEO_KEYBOARDSETUP_RESET = { MENU_KEYSRESETVERIFY, MA_None, };
846
static MenuLink_t MEO_KEYBOARDSETUP_RESET = { MENU_KEYSRESETVERIFY, MA_None, };
847
static MenuEntry_t ME_KEYBOARDSETUP_RESET = MAKE_MENUENTRY( "Reset To Defaults", &MF_Redfont, &MEF_CenterMenu, &MEO_KEYBOARDSETUP_RESET, Link );
847
static MenuEntry_t ME_KEYBOARDSETUP_RESET = MAKE_MENUENTRY( "Reset To Defaults", &MF_Redfont, &MEF_CenterMenu, &MEO_KEYBOARDSETUP_RESET, Link );
848
static MenuLink_t MEO_KEYBOARDSETUP_RESETCLASSIC = { MENU_KEYSCLASSICVERIFY, MA_None, };
848
static MenuLink_t MEO_KEYBOARDSETUP_RESETCLASSIC = { MENU_KEYSCLASSICVERIFY, MA_None, };
849
static MenuEntry_t ME_KEYBOARDSETUP_RESETCLASSIC = MAKE_MENUENTRY( "Reset To Classic", &MF_Redfont, &MEF_CenterMenu, &MEO_KEYBOARDSETUP_RESETCLASSIC, Link );
849
static MenuEntry_t ME_KEYBOARDSETUP_RESETCLASSIC = MAKE_MENUENTRY( "Reset To Classic", &MF_Redfont, &MEF_CenterMenu, &MEO_KEYBOARDSETUP_RESETCLASSIC, Link );
850
850
851
static MenuEntry_t *MEL_KEYBOARDSETUP[] = {
851
static MenuEntry_t *MEL_KEYBOARDSETUP[] = {
852
    &ME_KEYBOARDSETUP_KEYS,
852
    &ME_KEYBOARDSETUP_KEYS,
853
    &ME_KEYBOARDSETUP_RESET,
853
    &ME_KEYBOARDSETUP_RESET,
854
    &ME_KEYBOARDSETUP_RESETCLASSIC,
854
    &ME_KEYBOARDSETUP_RESETCLASSIC,
855
};
855
};
856
856
857
857
858
// There is no better way to do this than manually.
858
// There is no better way to do this than manually.
859
859
860
#define MENUMOUSEFUNCTIONS 12
860
#define MENUMOUSEFUNCTIONS 12
861
861
862
static char const *MenuMouseNames[MENUMOUSEFUNCTIONS] = {
862
static char const *MenuMouseNames[MENUMOUSEFUNCTIONS] = {
863
    "Button 1",
863
    "Button 1",
864
    "Double Button 1",
864
    "Double Button 1",
865
    "Button 2",
865
    "Button 2",
866
    "Double Button 2",
866
    "Double Button 2",
867
    "Button 3",
867
    "Button 3",
868
    "Double Button 3",
868
    "Double Button 3",
869
869
870
    "Wheel Up",
870
    "Wheel Up",
871
    "Wheel Down",
871
    "Wheel Down",
872
872
873
    "Button 4",
873
    "Button 4",
874
    "Double Button 4",
874
    "Double Button 4",
875
    "Button 5",
875
    "Button 5",
876
    "Double Button 5",
876
    "Double Button 5",
877
};
877
};
878
static int32_t MenuMouseDataIndex[MENUMOUSEFUNCTIONS][2] = {
878
static int32_t MenuMouseDataIndex[MENUMOUSEFUNCTIONS][2] = {
879
    { 0, 0, },
879
    { 0, 0, },
880
    { 0, 1, },
880
    { 0, 1, },
881
    { 1, 0, },
881
    { 1, 0, },
882
    { 1, 1, },
882
    { 1, 1, },
883
    { 2, 0, },
883
    { 2, 0, },
884
    { 2, 1, },
884
    { 2, 1, },
885
885
886
    // note the mouse wheel
886
    // note the mouse wheel
887
    { 4, 0, },
887
    { 4, 0, },
888
    { 5, 0, },
888
    { 5, 0, },
889
889
890
    { 3, 0, },
890
    { 3, 0, },
891
    { 3, 1, },
891
    { 3, 1, },
892
    { 6, 0, },
892
    { 6, 0, },
893
    { 6, 1, },
893
    { 6, 1, },
894
};
894
};
895
895
896
static MenuOption_t MEO_MOUSEJOYSETUPBTNS_TEMPLATE = MAKE_MENUOPTION( &MF_Minifont, &MEOS_Gamefuncs, NULL );
896
static MenuOption_t MEO_MOUSEJOYSETUPBTNS_TEMPLATE = MAKE_MENUOPTION( &MF_Minifont, &MEOS_Gamefuncs, NULL );
897
static MenuOption_t MEO_MOUSESETUPBTNS[MENUMOUSEFUNCTIONS];
897
static MenuOption_t MEO_MOUSESETUPBTNS[MENUMOUSEFUNCTIONS];
898
static MenuEntry_t ME_MOUSEJOYSETUPBTNS_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Minifont, &MEF_FuncList, NULL, Option );
898
static MenuEntry_t ME_MOUSEJOYSETUPBTNS_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Minifont, &MEF_FuncList, NULL, Option );
899
static MenuEntry_t ME_MOUSESETUPBTNS[MENUMOUSEFUNCTIONS];
899
static MenuEntry_t ME_MOUSESETUPBTNS[MENUMOUSEFUNCTIONS];
900
static MenuEntry_t *MEL_MOUSESETUPBTNS[MENUMOUSEFUNCTIONS];
900
static MenuEntry_t *MEL_MOUSESETUPBTNS[MENUMOUSEFUNCTIONS];
901
901
902
static MenuLink_t MEO_MOUSESETUP_BTNS = { MENU_MOUSEBTNS, MA_Advance, };
902
static MenuLink_t MEO_MOUSESETUP_BTNS = { MENU_MOUSEBTNS, MA_Advance, };
903
static MenuEntry_t ME_MOUSESETUP_BTNS = MAKE_MENUENTRY( "Button assignment", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_BTNS, Link );
903
static MenuEntry_t ME_MOUSESETUP_BTNS = MAKE_MENUENTRY( "Button assignment", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_BTNS, Link );
904
static MenuRangeFloat_t MEO_MOUSESETUP_SENSITIVITY = MAKE_MENURANGE( &CONTROL_MouseSensitivity, &MF_Redfont, .1f, 10.f, 0.f, 100, 1 );
904
static MenuRangeFloat_t MEO_MOUSESETUP_SENSITIVITY = MAKE_MENURANGE( &CONTROL_MouseSensitivity, &MF_Redfont, .1f, 10.f, 0.f, 100, 1 );
905
static MenuEntry_t ME_MOUSESETUP_SENSITIVITY = MAKE_MENUENTRY( "Sensitivity:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_SENSITIVITY, RangeFloat );
905
static MenuEntry_t ME_MOUSESETUP_SENSITIVITY = MAKE_MENUENTRY( "Sensitivity:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_SENSITIVITY, RangeFloat );
906
906
907
#ifndef EDUKE32_RETAIL_MENU
907
#ifndef EDUKE32_RETAIL_MENU
908
static char const *MEOSN_MOUSESETUP_AIM_TYPE [] = { "Toggle", "Hold" };
908
static char const *MEOSN_MOUSESETUP_AIM_TYPE [] = { "Toggle", "Hold" };
909
static MenuOptionSet_t MEOS_MOUSESETUP_AIM_TYPE = MAKE_MENUOPTIONSET(MEOSN_MOUSESETUP_AIM_TYPE, NULL, 0x2);
909
static MenuOptionSet_t MEOS_MOUSESETUP_AIM_TYPE = MAKE_MENUOPTIONSET(MEOSN_MOUSESETUP_AIM_TYPE, NULL, 0x2);
910
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUOPTION(&MF_Redfont, &MEOS_MOUSESETUP_AIM_TYPE, &ud.mouseaiming);
910
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUOPTION(&MF_Redfont, &MEOS_MOUSESETUP_AIM_TYPE, &ud.mouseaiming);
911
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUENTRY("Aiming type:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_MOUSEAIMINGTYPE, Option);
911
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUENTRY("Aiming type:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_MOUSEAIMINGTYPE, Option);
912
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMING = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &g_myAimMode );
912
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMING = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &g_myAimMode );
913
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMING = MAKE_MENUENTRY( "Vertical aiming:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_MOUSEAIMING, Option );
913
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMING = MAKE_MENUENTRY( "Vertical aiming:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_MOUSEAIMING, Option );
914
#endif
914
#endif
915
static MenuOption_t MEO_MOUSESETUP_INVERT = MAKE_MENUOPTION( &MF_Redfont, &MEOS_YesNo, &ud.mouseflip );
915
static MenuOption_t MEO_MOUSESETUP_INVERT = MAKE_MENUOPTION( &MF_Redfont, &MEOS_YesNo, &ud.mouseflip );
916
static MenuEntry_t ME_MOUSESETUP_INVERT = MAKE_MENUENTRY( "Invert aiming:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_INVERT, Option );
916
static MenuEntry_t ME_MOUSESETUP_INVERT = MAKE_MENUENTRY( "Invert aiming:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_INVERT, Option );
917
917
918
#ifndef EDUKE32_RETAIL_MENU
918
#ifndef EDUKE32_RETAIL_MENU
919
static MenuLink_t MEO_MOUSESETUP_ADVANCED = { MENU_MOUSEADVANCED, MA_Advance, };
919
static MenuLink_t MEO_MOUSESETUP_ADVANCED = { MENU_MOUSEADVANCED, MA_Advance, };
920
static MenuEntry_t ME_MOUSESETUP_ADVANCED = MAKE_MENUENTRY( "Advanced setup", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_ADVANCED, Link );
920
static MenuEntry_t ME_MOUSESETUP_ADVANCED = MAKE_MENUENTRY( "Advanced setup", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_ADVANCED, Link );
921
#endif
921
#endif
922
static MenuRangeInt32_t MEO_MOUSEADVANCED_SCALEX = MAKE_MENURANGE(&ud.config.MouseAnalogueScale[0], &MF_Redfont, -262144, 262144, 65536, 161, 3);
922
static MenuRangeInt32_t MEO_MOUSEADVANCED_SCALEX = MAKE_MENURANGE(&ud.config.MouseAnalogueScale[0], &MF_Redfont, -262144, 262144, 65536, 161, 3);
923
static MenuEntry_t ME_MOUSEADVANCED_SCALEX = MAKE_MENUENTRY("X-Scale:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSEADVANCED_SCALEX, RangeInt32);
923
static MenuEntry_t ME_MOUSEADVANCED_SCALEX = MAKE_MENUENTRY("X-Scale:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSEADVANCED_SCALEX, RangeInt32);
924
static MenuRangeInt32_t MEO_MOUSEADVANCED_SCALEY = MAKE_MENURANGE(&ud.config.MouseAnalogueScale[1], &MF_Redfont, -262144, 262144, 65536, 161, 3);
924
static MenuRangeInt32_t MEO_MOUSEADVANCED_SCALEY = MAKE_MENURANGE(&ud.config.MouseAnalogueScale[1], &MF_Redfont, -262144, 262144, 65536, 161, 3);
925
static MenuEntry_t ME_MOUSEADVANCED_SCALEY = MAKE_MENUENTRY("Y-Scale:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSEADVANCED_SCALEY, RangeInt32);
925
static MenuEntry_t ME_MOUSEADVANCED_SCALEY = MAKE_MENUENTRY("Y-Scale:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSEADVANCED_SCALEY, RangeInt32);
926
926
927
static MenuEntry_t *MEL_MOUSESETUP[] = {
927
static MenuEntry_t *MEL_MOUSESETUP[] = {
928
    &ME_MOUSESETUP_BTNS,
928
    &ME_MOUSESETUP_BTNS,
929
    &ME_MOUSESETUP_SENSITIVITY,
929
    &ME_MOUSESETUP_SENSITIVITY,
930
#ifdef EDUKE32_RETAIL_MENU
930
#ifdef EDUKE32_RETAIL_MENU
931
    &ME_MOUSEADVANCED_SCALEX,
931
    &ME_MOUSEADVANCED_SCALEX,
932
    &ME_MOUSEADVANCED_SCALEY,
932
    &ME_MOUSEADVANCED_SCALEY,
933
#endif
933
#endif
934
    &ME_Space2_Redfont,
934
    &ME_Space2_Redfont,
935
    &ME_MOUSESETUP_INVERT,
935
    &ME_MOUSESETUP_INVERT,
936
#ifndef EDUKE32_RETAIL_MENU
936
#ifndef EDUKE32_RETAIL_MENU
937
    &ME_MOUSESETUP_MOUSEAIMINGTYPE,
937
    &ME_MOUSESETUP_MOUSEAIMINGTYPE,
938
    &ME_MOUSESETUP_MOUSEAIMING,
938
    &ME_MOUSESETUP_MOUSEAIMING,
939
    &ME_MOUSESETUP_ADVANCED,
939
    &ME_MOUSESETUP_ADVANCED,
940
#endif
940
#endif
941
};
941
};
942
942
943
#ifdef EDUKE32_ANDROID_MENU
943
#ifdef EDUKE32_ANDROID_MENU
944
static MenuRangeFloat_t MEO_TOUCHSETUP_SENSITIVITY_MOVE = MAKE_MENURANGE(&droidinput.forward_sens, &MF_Redfont, 1.f, 9.f, 0.f, 17, 1 + EnforceIntervals);
944
static MenuRangeFloat_t MEO_TOUCHSETUP_SENSITIVITY_MOVE = MAKE_MENURANGE(&droidinput.forward_sens, &MF_Redfont, 1.f, 9.f, 0.f, 17, 1 + EnforceIntervals);
945
static MenuEntry_t ME_TOUCHSETUP_SENSITIVITY_MOVE = MAKE_MENUENTRY("Running:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_TOUCHSETUP_SENSITIVITY_MOVE, RangeFloat);
945
static MenuEntry_t ME_TOUCHSETUP_SENSITIVITY_MOVE = MAKE_MENUENTRY("Running:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_TOUCHSETUP_SENSITIVITY_MOVE, RangeFloat);
946
946
947
static MenuRangeFloat_t MEO_TOUCHSETUP_SENSITIVITY_STRAFE = MAKE_MENURANGE(&droidinput.strafe_sens, &MF_Redfont, 1.f, 9.f, 0.f, 17, 1 + EnforceIntervals);
947
static MenuRangeFloat_t MEO_TOUCHSETUP_SENSITIVITY_STRAFE = MAKE_MENURANGE(&droidinput.strafe_sens, &MF_Redfont, 1.f, 9.f, 0.f, 17, 1 + EnforceIntervals);
948
static MenuEntry_t ME_TOUCHSETUP_SENSITIVITY_STRAFE = MAKE_MENUENTRY("Strafing:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_TOUCHSETUP_SENSITIVITY_STRAFE, RangeFloat);
948
static MenuEntry_t ME_TOUCHSETUP_SENSITIVITY_STRAFE = MAKE_MENUENTRY("Strafing:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_TOUCHSETUP_SENSITIVITY_STRAFE, RangeFloat);
949
949
950
static MenuRangeFloat_t MEO_TOUCHSETUP_SENSITIVITY_LOOK = MAKE_MENURANGE(&droidinput.pitch_sens, &MF_Redfont, 1.f, 9.f, 0.f, 17, 1 + EnforceIntervals);
950
static MenuRangeFloat_t MEO_TOUCHSETUP_SENSITIVITY_LOOK = MAKE_MENURANGE(&droidinput.pitch_sens, &MF_Redfont, 1.f, 9.f, 0.f, 17, 1 + EnforceIntervals);
951
static MenuEntry_t ME_TOUCHSETUP_SENSITIVITY_LOOK = MAKE_MENUENTRY("Looking:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_TOUCHSETUP_SENSITIVITY_LOOK, RangeFloat);
951
static MenuEntry_t ME_TOUCHSETUP_SENSITIVITY_LOOK = MAKE_MENUENTRY("Looking:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_TOUCHSETUP_SENSITIVITY_LOOK, RangeFloat);
952
952
953
static MenuRangeFloat_t MEO_TOUCHSETUP_SENSITIVITY_TURN = MAKE_MENURANGE(&droidinput.yaw_sens, &MF_Redfont, 1.f, 9.f, 0.f, 17, 1 + EnforceIntervals);
953
static MenuRangeFloat_t MEO_TOUCHSETUP_SENSITIVITY_TURN = MAKE_MENURANGE(&droidinput.yaw_sens, &MF_Redfont, 1.f, 9.f, 0.f, 17, 1 + EnforceIntervals);
954
static MenuEntry_t ME_TOUCHSETUP_SENSITIVITY_TURN = MAKE_MENUENTRY("Turning:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_TOUCHSETUP_SENSITIVITY_TURN, RangeFloat);
954
static MenuEntry_t ME_TOUCHSETUP_SENSITIVITY_TURN = MAKE_MENUENTRY("Turning:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_TOUCHSETUP_SENSITIVITY_TURN, RangeFloat);
955
955
956
static MenuOption_t MEO_TOUCHSETUP_INVERT = MAKE_MENUOPTION(&MF_Redfont, &MEOS_NoYes, &droidinput.invertLook);
956
static MenuOption_t MEO_TOUCHSETUP_INVERT = MAKE_MENUOPTION(&MF_Redfont, &MEOS_NoYes, &droidinput.invertLook);
957
static MenuEntry_t ME_TOUCHSETUP_INVERT = MAKE_MENUENTRY("Invert look:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_TOUCHSETUP_INVERT, Option);
957
static MenuEntry_t ME_TOUCHSETUP_INVERT = MAKE_MENUENTRY("Invert look:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_TOUCHSETUP_INVERT, Option);
958
958
959
MAKE_MENU_TOP_ENTRYLINK("Sensitivity", MEF_CenterMenu, TOUCHSENS, MENU_TOUCHSENS);
959
MAKE_MENU_TOP_ENTRYLINK("Sensitivity", MEF_CenterMenu, TOUCHSENS, MENU_TOUCHSENS);
960
MAKE_MENU_TOP_ENTRYLINK("Button Setup", MEF_CenterMenu, TOUCHBUTTONS, MENU_TOUCHBUTTONS);
960
MAKE_MENU_TOP_ENTRYLINK("Button Setup", MEF_CenterMenu, TOUCHBUTTONS, MENU_TOUCHBUTTONS);
961
961
962
static MenuEntry_t *MEL_TOUCHSETUP [] = {
962
static MenuEntry_t *MEL_TOUCHSETUP [] = {
963
    &ME_TOUCHSENS,
963
    &ME_TOUCHSENS,
964
    &ME_TOUCHBUTTONS,
964
    &ME_TOUCHBUTTONS,
965
};
965
};
966
966
967
static MenuEntry_t *MEL_TOUCHSENS [] = {
967
static MenuEntry_t *MEL_TOUCHSENS [] = {
968
    &ME_TOUCHSETUP_SENSITIVITY_MOVE,
968
    &ME_TOUCHSETUP_SENSITIVITY_MOVE,
969
    &ME_TOUCHSETUP_SENSITIVITY_STRAFE,
969
    &ME_TOUCHSETUP_SENSITIVITY_STRAFE,
970
    &ME_TOUCHSETUP_SENSITIVITY_LOOK,
970
    &ME_TOUCHSETUP_SENSITIVITY_LOOK,
971
    &ME_TOUCHSETUP_SENSITIVITY_TURN,
971
    &ME_TOUCHSETUP_SENSITIVITY_TURN,
972
    &ME_Space2_Redfont,
972
    &ME_Space2_Redfont,
973
    &ME_TOUCHSETUP_INVERT,
973
    &ME_TOUCHSETUP_INVERT,
974
};
974
};
975
#endif
975
#endif
976
976
977
static MenuOption_t MEO_JOYSTICK_ENABLE = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &ud.setup.usejoystick );
977
static MenuOption_t MEO_JOYSTICK_ENABLE = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &ud.setup.usejoystick );
978
static MenuEntry_t ME_JOYSTICK_ENABLE = MAKE_MENUENTRY( "Enable Gamepad:", &MF_Redfont, &MEF_BigOptionsRtSections, &MEO_JOYSTICK_ENABLE, Option );
978
static MenuEntry_t ME_JOYSTICK_ENABLE = MAKE_MENUENTRY( "Enable Gamepad:", &MF_Redfont, &MEF_BigOptionsRtSections, &MEO_JOYSTICK_ENABLE, Option );
979
979
980
MAKE_MENU_TOP_ENTRYLINK( "Edit Buttons", MEF_BigOptionsRtSections, JOYSTICK_EDITBUTTONS, MENU_JOYSTICKBTNS );
980
MAKE_MENU_TOP_ENTRYLINK( "Edit Buttons", MEF_BigOptionsRtSections, JOYSTICK_EDITBUTTONS, MENU_JOYSTICKBTNS );
981
MAKE_MENU_TOP_ENTRYLINK( "Edit Axes", MEF_BigOptionsRtSections, JOYSTICK_EDITAXES, MENU_JOYSTICKAXES );
981
MAKE_MENU_TOP_ENTRYLINK( "Edit Axes", MEF_BigOptionsRtSections, JOYSTICK_EDITAXES, MENU_JOYSTICKAXES );
982
982
983
static MenuLink_t MEO_JOYSTICK_DEFAULTS_STANDARD = { MENU_JOYSTANDARDVERIFY, MA_None, };
983
static MenuLink_t MEO_JOYSTICK_DEFAULTS_STANDARD = { MENU_JOYSTANDARDVERIFY, MA_None, };
984
static MenuEntry_t ME_JOYSTICK_DEFAULTS_STANDARD = MAKE_MENUENTRY( "Use Standard Layout", &MF_Redfont, &MEF_BigOptionsRtSections, &MEO_JOYSTICK_DEFAULTS_STANDARD, Link );
984
static MenuEntry_t ME_JOYSTICK_DEFAULTS_STANDARD = MAKE_MENUENTRY( "Use Standard Layout", &MF_Redfont, &MEF_BigOptionsRtSections, &MEO_JOYSTICK_DEFAULTS_STANDARD, Link );
985
static MenuLink_t MEO_JOYSTICK_DEFAULTS_PRO = { MENU_JOYPROVERIFY, MA_None, };
985
static MenuLink_t MEO_JOYSTICK_DEFAULTS_PRO = { MENU_JOYPROVERIFY, MA_None, };
986
static MenuEntry_t ME_JOYSTICK_DEFAULTS_PRO = MAKE_MENUENTRY( "Use Pro Layout", &MF_Redfont, &MEF_BigOptionsRtSections, &MEO_JOYSTICK_DEFAULTS_PRO, Link );
986
static MenuEntry_t ME_JOYSTICK_DEFAULTS_PRO = MAKE_MENUENTRY( "Use Pro Layout", &MF_Redfont, &MEF_BigOptionsRtSections, &MEO_JOYSTICK_DEFAULTS_PRO, Link );
987
static MenuLink_t MEO_JOYSTICK_DEFAULTS_CLEAR = { MENU_JOYCLEARVERIFY, MA_None, };
987
static MenuLink_t MEO_JOYSTICK_DEFAULTS_CLEAR = { MENU_JOYCLEARVERIFY, MA_None, };
988
static MenuEntry_t ME_JOYSTICK_DEFAULTS_CLEAR = MAKE_MENUENTRY( "Clear All Settings", &MF_Redfont, &MEF_BigOptionsRtSections, &MEO_JOYSTICK_DEFAULTS_CLEAR, Link );
988
static MenuEntry_t ME_JOYSTICK_DEFAULTS_CLEAR = MAKE_MENUENTRY( "Clear All Settings", &MF_Redfont, &MEF_BigOptionsRtSections, &MEO_JOYSTICK_DEFAULTS_CLEAR, Link );
989
989
990
static MenuEntry_t *MEL_JOYSTICKSETUP[] = {
990
static MenuEntry_t *MEL_JOYSTICKSETUP[] = {
991
    &ME_JOYSTICK_ENABLE,
991
    &ME_JOYSTICK_ENABLE,
992
    &ME_Space6_Redfont,
992
    &ME_Space6_Redfont,
993
    &ME_JOYSTICK_EDITBUTTONS,
993
    &ME_JOYSTICK_EDITBUTTONS,
994
    &ME_JOYSTICK_EDITAXES,
994
    &ME_JOYSTICK_EDITAXES,
995
    &ME_Space6_Redfont,
995
    &ME_Space6_Redfont,
996
    &ME_JOYSTICK_DEFAULTS_STANDARD,
996
    &ME_JOYSTICK_DEFAULTS_STANDARD,
997
    &ME_JOYSTICK_DEFAULTS_PRO,
997
    &ME_JOYSTICK_DEFAULTS_PRO,
998
    &ME_JOYSTICK_DEFAULTS_CLEAR,
998
    &ME_JOYSTICK_DEFAULTS_CLEAR,
999
};
999
};
1000
1000
1001
#define MAXJOYBUTTONSTRINGLENGTH 32
1001
#define MAXJOYBUTTONSTRINGLENGTH 32
1002
1002
1003
static char MenuJoystickNames[MAXJOYBUTTONSANDHATS*2][MAXJOYBUTTONSTRINGLENGTH];
1003
static char MenuJoystickNames[MAXJOYBUTTONSANDHATS*2][MAXJOYBUTTONSTRINGLENGTH];
1004
1004
1005
static MenuOption_t MEO_JOYSTICKBTNS[MAXJOYBUTTONSANDHATS*2];
1005
static MenuOption_t MEO_JOYSTICKBTNS[MAXJOYBUTTONSANDHATS*2];
1006
static MenuEntry_t ME_JOYSTICKBTNS[MAXJOYBUTTONSANDHATS*2];
1006
static MenuEntry_t ME_JOYSTICKBTNS[MAXJOYBUTTONSANDHATS*2];
1007
static MenuEntry_t *MEL_JOYSTICKBTNS[MAXJOYBUTTONSANDHATS*2];
1007
static MenuEntry_t *MEL_JOYSTICKBTNS[MAXJOYBUTTONSANDHATS*2];
1008
1008
1009
static MenuLink_t MEO_JOYSTICKAXES = { MENU_JOYSTICKAXIS, MA_Advance, };
1009
static MenuLink_t MEO_JOYSTICKAXES = { MENU_JOYSTICKAXIS, MA_Advance, };
1010
static MenuEntry_t ME_JOYSTICKAXES_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Redfont, &MEF_BigSliders, &MEO_JOYSTICKAXES, Link );
1010
static MenuEntry_t ME_JOYSTICKAXES_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Redfont, &MEF_BigSliders, &MEO_JOYSTICKAXES, Link );
1011
static MenuEntry_t ME_JOYSTICKAXES[MAXJOYAXES];
1011
static MenuEntry_t ME_JOYSTICKAXES[MAXJOYAXES];
1012
static char MenuJoystickAxes[MAXJOYAXES][MAXJOYBUTTONSTRINGLENGTH];
1012
static char MenuJoystickAxes[MAXJOYAXES][MAXJOYBUTTONSTRINGLENGTH];
1013
1013
1014
static MenuEntry_t *MEL_JOYSTICKAXES[MAXJOYAXES];
1014
static MenuEntry_t *MEL_JOYSTICKAXES[MAXJOYAXES];
1015
1015
1016
static MenuEntry_t *MEL_MOUSEADVANCED[] = {
1016
static MenuEntry_t *MEL_MOUSEADVANCED[] = {
1017
    &ME_MOUSEADVANCED_SCALEX,
1017
    &ME_MOUSEADVANCED_SCALEX,
1018
    &ME_MOUSEADVANCED_SCALEY,
1018
    &ME_MOUSEADVANCED_SCALEY,
1019
};
1019
};
1020
1020
1021
static const char *MenuJoystickHatDirections[] = { "Up", "Right", "Down", "Left", };
1021
static const char *MenuJoystickHatDirections[] = { "Up", "Right", "Down", "Left", };
1022
1022
1023
static char const *MEOSN_JOYSTICKAXIS_ANALOG[] = { "  -None-", "Turning", "Strafing", "Looking", "Moving", };
1023
static char const *MEOSN_JOYSTICKAXIS_ANALOG[] = { "  -None-", "Turning", "Strafing", "Looking", "Moving", };
1024
static int32_t MEOSV_JOYSTICKAXIS_ANALOG[] = { -1, analog_turning, analog_strafing, analog_lookingupanddown, analog_moving, };
1024
static int32_t MEOSV_JOYSTICKAXIS_ANALOG[] = { -1, analog_turning, analog_strafing, analog_lookingupanddown, analog_moving, };
1025
static MenuOptionSet_t MEOS_JOYSTICKAXIS_ANALOG = MAKE_MENUOPTIONSET( MEOSN_JOYSTICKAXIS_ANALOG, MEOSV_JOYSTICKAXIS_ANALOG, 0x0 );
1025
static MenuOptionSet_t MEOS_JOYSTICKAXIS_ANALOG = MAKE_MENUOPTIONSET( MEOSN_JOYSTICKAXIS_ANALOG, MEOSV_JOYSTICKAXIS_ANALOG, 0x0 );
1026
static MenuOption_t MEO_JOYSTICKAXIS_ANALOG = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_JOYSTICKAXIS_ANALOG, NULL );
1026
static MenuOption_t MEO_JOYSTICKAXIS_ANALOG = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_JOYSTICKAXIS_ANALOG, NULL );
1027
static MenuEntry_t ME_JOYSTICKAXIS_ANALOG = MAKE_MENUENTRY( "Analog", &MF_Redfont, &MEF_BigSliders, &MEO_JOYSTICKAXIS_ANALOG, Option );
1027
static MenuEntry_t ME_JOYSTICKAXIS_ANALOG = MAKE_MENUENTRY( "Analog", &MF_Redfont, &MEF_BigSliders, &MEO_JOYSTICKAXIS_ANALOG, Option );
1028
static MenuRangeInt32_t MEO_JOYSTICKAXIS_SCALE = MAKE_MENURANGE( NULL, &MF_Bluefont, -262144, 262144, 65536, 161, 3 );
1028
static MenuRangeInt32_t MEO_JOYSTICKAXIS_SCALE = MAKE_MENURANGE( NULL, &MF_Bluefont, -262144, 262144, 65536, 161, 3 );
1029
static MenuEntry_t ME_JOYSTICKAXIS_SCALE = MAKE_MENUENTRY( "Scale", &MF_Redfont, &MEF_BigSliders, &MEO_JOYSTICKAXIS_SCALE, RangeInt32 );
1029
static MenuEntry_t ME_JOYSTICKAXIS_SCALE = MAKE_MENUENTRY( "Scale", &MF_Redfont, &MEF_BigSliders, &MEO_JOYSTICKAXIS_SCALE, RangeInt32 );
1030
static MenuOption_t MEO_JOYSTICKAXIS_INVERT = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, NULL );
1030
static MenuOption_t MEO_JOYSTICKAXIS_INVERT = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, NULL );
1031
static MenuEntry_t ME_JOYSTICKAXIS_INVERT = MAKE_MENUENTRY( "Invert", &MF_Redfont, &MEF_BigSliders, &MEO_JOYSTICKAXIS_INVERT, Option );
1031
static MenuEntry_t ME_JOYSTICKAXIS_INVERT = MAKE_MENUENTRY( "Invert", &MF_Redfont, &MEF_BigSliders, &MEO_JOYSTICKAXIS_INVERT, Option );
1032
static MenuRangeInt32_t MEO_JOYSTICKAXIS_DEAD = MAKE_MENURANGE( NULL, &MF_Bluefont, 0, 10000, 0, 101, 2 );
1032
static MenuRangeInt32_t MEO_JOYSTICKAXIS_DEAD = MAKE_MENURANGE( NULL, &MF_Bluefont, 0, 10000, 0, 101, 2 );
1033
static MenuEntry_t ME_JOYSTICKAXIS_DEAD = MAKE_MENUENTRY( "Dead Zone", &MF_Redfont, &MEF_BigSliders, &MEO_JOYSTICKAXIS_DEAD, RangeInt32 );
1033
static MenuEntry_t ME_JOYSTICKAXIS_DEAD = MAKE_MENUENTRY( "Dead Zone", &MF_Redfont, &MEF_BigSliders, &MEO_JOYSTICKAXIS_DEAD, RangeInt32 );
1034
static MenuRangeInt32_t MEO_JOYSTICKAXIS_SATU = MAKE_MENURANGE( NULL, &MF_Bluefont, 0, 10000, 0, 101, 2 );
1034
static MenuRangeInt32_t MEO_JOYSTICKAXIS_SATU = MAKE_MENURANGE( NULL, &MF_Bluefont, 0, 10000, 0, 101, 2 );
1035
static MenuEntry_t ME_JOYSTICKAXIS_SATU = MAKE_MENUENTRY( "Saturation", &MF_Redfont, &MEF_BigSliders, &MEO_JOYSTICKAXIS_SATU, RangeInt32 );
1035
static MenuEntry_t ME_JOYSTICKAXIS_SATU = MAKE_MENUENTRY( "Saturation", &MF_Redfont, &MEF_BigSliders, &MEO_JOYSTICKAXIS_SATU, RangeInt32 );
1036
1036
1037
static MenuOption_t MEO_JOYSTICKAXIS_DIGITALNEGATIVE = MAKE_MENUOPTION( &MF_Minifont, &MEOS_Gamefuncs, NULL );
1037
static MenuOption_t MEO_JOYSTICKAXIS_DIGITALNEGATIVE = MAKE_MENUOPTION( &MF_Minifont, &MEOS_Gamefuncs, NULL );
1038
static MenuEntry_t ME_JOYSTICKAXIS_DIGITALNEGATIVE = MAKE_MENUENTRY( "Digital -", &MF_Bluefont, &MEF_BigSliders, &MEO_JOYSTICKAXIS_DIGITALNEGATIVE, Option );
1038
static MenuEntry_t ME_JOYSTICKAXIS_DIGITALNEGATIVE = MAKE_MENUENTRY( "Digital -", &MF_Bluefont, &MEF_BigSliders, &MEO_JOYSTICKAXIS_DIGITALNEGATIVE, Option );
1039
static MenuOption_t MEO_JOYSTICKAXIS_DIGITALPOSITIVE = MAKE_MENUOPTION( &MF_Minifont, &MEOS_Gamefuncs, NULL );
1039
static MenuOption_t MEO_JOYSTICKAXIS_DIGITALPOSITIVE = MAKE_MENUOPTION( &MF_Minifont, &MEOS_Gamefuncs, NULL );
1040
static MenuEntry_t ME_JOYSTICKAXIS_DIGITALPOSITIVE = MAKE_MENUENTRY( "Digital +", &MF_Bluefont, &MEF_BigSliders, &MEO_JOYSTICKAXIS_DIGITALPOSITIVE, Option );
1040
static MenuEntry_t ME_JOYSTICKAXIS_DIGITALPOSITIVE = MAKE_MENUENTRY( "Digital +", &MF_Bluefont, &MEF_BigSliders, &MEO_JOYSTICKAXIS_DIGITALPOSITIVE, Option );
1041
1041
1042
static MenuEntry_t *MEL_JOYSTICKAXIS[] = {
1042
static MenuEntry_t *MEL_JOYSTICKAXIS[] = {
1043
    &ME_JOYSTICKAXIS_ANALOG,
1043
    &ME_JOYSTICKAXIS_ANALOG,
1044
    &ME_JOYSTICKAXIS_SCALE,
1044
    &ME_JOYSTICKAXIS_SCALE,
1045
    &ME_JOYSTICKAXIS_INVERT,
1045
    &ME_JOYSTICKAXIS_INVERT,
1046
    &ME_JOYSTICKAXIS_DEAD,
1046
    &ME_JOYSTICKAXIS_DEAD,
1047
    &ME_JOYSTICKAXIS_SATU,
1047
    &ME_JOYSTICKAXIS_SATU,
1048
    &ME_Space8_Redfont,
1048
    &ME_Space8_Redfont,
1049
    &ME_JOYSTICKAXIS_DIGITALNEGATIVE,
1049
    &ME_JOYSTICKAXIS_DIGITALNEGATIVE,
1050
    &ME_JOYSTICKAXIS_DIGITALPOSITIVE,
1050
    &ME_JOYSTICKAXIS_DIGITALPOSITIVE,
1051
};
1051
};
1052
1052
1053
static MenuEntry_t *MEL_INTERNAL_JOYSTICKAXIS_DIGITAL[] = {
1053
static MenuEntry_t *MEL_INTERNAL_JOYSTICKAXIS_DIGITAL[] = {
1054
    &ME_JOYSTICKAXIS_DIGITALNEGATIVE,
1054
    &ME_JOYSTICKAXIS_DIGITALNEGATIVE,
1055
    &ME_JOYSTICKAXIS_DIGITALPOSITIVE,
1055
    &ME_JOYSTICKAXIS_DIGITALPOSITIVE,
1056
};
1056
};
1057
1057
1058
#ifdef USE_OPENGL
1058
#ifdef USE_OPENGL
1059
static MenuOption_t MEO_RENDERERSETUP_HIGHTILE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &usehightile );
1059
static MenuOption_t MEO_RENDERERSETUP_HIGHTILE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &usehightile );
1060
static MenuEntry_t ME_RENDERERSETUP_HIGHTILE = MAKE_MENUENTRY( "True color textures:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_HIGHTILE, Option );
1060
static MenuEntry_t ME_RENDERERSETUP_HIGHTILE = MAKE_MENUENTRY( "True color textures:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_HIGHTILE, Option );
1061
1061
1062
static char const *MEOSN_RENDERERSETUP_TEXQUALITY [] = { "Full", "Half", "Barf", };
1062
static char const *MEOSN_RENDERERSETUP_TEXQUALITY [] = { "Full", "Half", "Barf", };
1063
static MenuOptionSet_t MEOS_RENDERERSETUP_TEXQUALITY = MAKE_MENUOPTIONSET(MEOSN_RENDERERSETUP_TEXQUALITY, NULL, 0x2);
1063
static MenuOptionSet_t MEOS_RENDERERSETUP_TEXQUALITY = MAKE_MENUOPTIONSET(MEOSN_RENDERERSETUP_TEXQUALITY, NULL, 0x2);
1064
static MenuOption_t MEO_RENDERERSETUP_TEXQUALITY = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_RENDERERSETUP_TEXQUALITY, &r_downsize);
1064
static MenuOption_t MEO_RENDERERSETUP_TEXQUALITY = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_RENDERERSETUP_TEXQUALITY, &r_downsize);
1065
static MenuEntry_t ME_RENDERERSETUP_TEXQUALITY = MAKE_MENUENTRY("GL texture quality:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_TEXQUALITY, Option);
1065
static MenuEntry_t ME_RENDERERSETUP_TEXQUALITY = MAKE_MENUENTRY("GL texture quality:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_TEXQUALITY, Option);
1066
1066
1067
1067
1068
static MenuOption_t MEO_RENDERERSETUP_PRECACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &ud.config.useprecache );
1068
static MenuOption_t MEO_RENDERERSETUP_PRECACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &ud.config.useprecache );
1069
static MenuEntry_t ME_RENDERERSETUP_PRECACHE = MAKE_MENUENTRY( "Pre-load map textures:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_PRECACHE, Option );
1069
static MenuEntry_t ME_RENDERERSETUP_PRECACHE = MAKE_MENUENTRY( "Pre-load map textures:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_PRECACHE, Option );
1070
# ifndef EDUKE32_GLES
1070
# ifndef EDUKE32_GLES
1071
static char const *MEOSN_RENDERERSETUP_TEXCACHE[] = { "Off", "On", "Compr.", };
1071
static char const *MEOSN_RENDERERSETUP_TEXCACHE[] = { "Off", "On", "Compr.", };
1072
static MenuOptionSet_t MEOS_RENDERERSETUP_TEXCACHE = MAKE_MENUOPTIONSET( MEOSN_RENDERERSETUP_TEXCACHE, NULL, 0x2 );
1072
static MenuOptionSet_t MEOS_RENDERERSETUP_TEXCACHE = MAKE_MENUOPTIONSET( MEOSN_RENDERERSETUP_TEXCACHE, NULL, 0x2 );
1073
static MenuOption_t MEO_RENDERERSETUP_TEXCACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_RENDERERSETUP_TEXCACHE, &glusetexcache );
1073
static MenuOption_t MEO_RENDERERSETUP_TEXCACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_RENDERERSETUP_TEXCACHE, &glusetexcache );
1074
static MenuEntry_t ME_RENDERERSETUP_TEXCACHE = MAKE_MENUENTRY( "On-disk texture cache:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_TEXCACHE, Option );
1074
static MenuEntry_t ME_RENDERERSETUP_TEXCACHE = MAKE_MENUENTRY( "On-disk texture cache:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_TEXCACHE, Option );
1075
# endif
1075
# endif
1076
# ifdef USE_GLEXT
1076
# ifdef USE_GLEXT
1077
static MenuOption_t MEO_RENDERERSETUP_DETAILTEX = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &r_detailmapping );
1077
static MenuOption_t MEO_RENDERERSETUP_DETAILTEX = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &r_detailmapping );
1078
static MenuEntry_t ME_RENDERERSETUP_DETAILTEX = MAKE_MENUENTRY( "Detail textures:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_DETAILTEX, Option );
1078
static MenuEntry_t ME_RENDERERSETUP_DETAILTEX = MAKE_MENUENTRY( "Detail textures:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_DETAILTEX, Option );
1079
static MenuOption_t MEO_RENDERERSETUP_GLOWTEX = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_NoYes, &r_glowmapping);
1079
static MenuOption_t MEO_RENDERERSETUP_GLOWTEX = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_NoYes, &r_glowmapping);
1080
static MenuEntry_t ME_RENDERERSETUP_GLOWTEX = MAKE_MENUENTRY("Glow textures:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_GLOWTEX, Option);
1080
static MenuEntry_t ME_RENDERERSETUP_GLOWTEX = MAKE_MENUENTRY("Glow textures:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_GLOWTEX, Option);
1081
# endif
1081
# endif
1082
static MenuOption_t MEO_RENDERERSETUP_MODELS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &usemodels );
1082
static MenuOption_t MEO_RENDERERSETUP_MODELS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &usemodels );
1083
static MenuEntry_t ME_RENDERERSETUP_MODELS = MAKE_MENUENTRY( "3D models:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_MODELS, Option );
1083
static MenuEntry_t ME_RENDERERSETUP_MODELS = MAKE_MENUENTRY( "3D models:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_MODELS, Option );
1084
#endif
1084
#endif
1085
1085
1086
#ifdef POLYMER
1086
#ifdef POLYMER
1087
static char const *MEOSN_POLYMER_LIGHTS [] = { "Off", "Full", "Map only", };
1087
static char const *MEOSN_POLYMER_LIGHTS [] = { "Off", "Full", "Map only", };
1088
static MenuOptionSet_t MEOS_POLYMER_LIGHTS = MAKE_MENUOPTIONSET(MEOSN_POLYMER_LIGHTS, NULL, 0x2);
1088
static MenuOptionSet_t MEOS_POLYMER_LIGHTS = MAKE_MENUOPTIONSET(MEOSN_POLYMER_LIGHTS, NULL, 0x2);
1089
static MenuOption_t MEO_POLYMER_LIGHTS = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_POLYMER_LIGHTS, &pr_lighting);
1089
static MenuOption_t MEO_POLYMER_LIGHTS = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_POLYMER_LIGHTS, &pr_lighting);
1090
static MenuEntry_t ME_POLYMER_LIGHTS = MAKE_MENUENTRY("Dynamic lights:", &MF_Bluefont, &MEF_SmallOptions, &MEO_POLYMER_LIGHTS, Option);
1090
static MenuEntry_t ME_POLYMER_LIGHTS = MAKE_MENUENTRY("Dynamic lights:", &MF_Bluefont, &MEF_SmallOptions, &MEO_POLYMER_LIGHTS, Option);
1091
1091
1092
static MenuRangeInt32_t MEO_POLYMER_LIGHTPASSES = MAKE_MENURANGE(&r_pr_maxlightpasses, &MF_Bluefont, 1, 10, 1, 10, 1);
1092
static MenuRangeInt32_t MEO_POLYMER_LIGHTPASSES = MAKE_MENURANGE(&r_pr_maxlightpasses, &MF_Bluefont, 1, 10, 1, 10, 1);
1093
static MenuEntry_t ME_POLYMER_LIGHTPASSES = MAKE_MENUENTRY("Lights per surface:", &MF_Bluefont, &MEF_SmallOptions, &MEO_POLYMER_LIGHTPASSES, RangeInt32);
1093
static MenuEntry_t ME_POLYMER_LIGHTPASSES = MAKE_MENUENTRY("Lights per surface:", &MF_Bluefont, &MEF_SmallOptions, &MEO_POLYMER_LIGHTPASSES, RangeInt32);
1094
1094
1095
static MenuOption_t MEO_POLYMER_SHADOWS = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_OffOn, &pr_shadows);
1095
static MenuOption_t MEO_POLYMER_SHADOWS = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_OffOn, &pr_shadows);
1096
static MenuEntry_t ME_POLYMER_SHADOWS = MAKE_MENUENTRY("Dynamic shadows:", &MF_Bluefont, &MEF_SmallOptions, &MEO_POLYMER_SHADOWS, Option);
1096
static MenuEntry_t ME_POLYMER_SHADOWS = MAKE_MENUENTRY("Dynamic shadows:", &MF_Bluefont, &MEF_SmallOptions, &MEO_POLYMER_SHADOWS, Option);
1097
1097
1098
static MenuRangeInt32_t MEO_POLYMER_SHADOWCOUNT = MAKE_MENURANGE(&pr_shadowcount, &MF_Bluefont, 1, 10, 1, 10, 1);
1098
static MenuRangeInt32_t MEO_POLYMER_SHADOWCOUNT = MAKE_MENURANGE(&pr_shadowcount, &MF_Bluefont, 1, 10, 1, 10, 1);
1099
static MenuEntry_t ME_POLYMER_SHADOWCOUNT = MAKE_MENUENTRY("Shadows per surface:", &MF_Bluefont, &MEF_SmallOptions, &MEO_POLYMER_SHADOWCOUNT, RangeInt32);
1099
static MenuEntry_t ME_POLYMER_SHADOWCOUNT = MAKE_MENUENTRY("Shadows per surface:", &MF_Bluefont, &MEF_SmallOptions, &MEO_POLYMER_SHADOWCOUNT, RangeInt32);
1100
1100
1101
#endif
1101
#endif
1102
1102
1103
#ifdef USE_OPENGL
1103
#ifdef USE_OPENGL
1104
static MenuEntry_t *MEL_RENDERERSETUP_POLYMOST[] = {
1104
static MenuEntry_t *MEL_RENDERERSETUP_POLYMOST[] = {
1105
    &ME_RENDERERSETUP_HIGHTILE,
1105
    &ME_RENDERERSETUP_HIGHTILE,
1106
    &ME_RENDERERSETUP_TEXQUALITY,
1106
    &ME_RENDERERSETUP_TEXQUALITY,
1107
    &ME_RENDERERSETUP_PRECACHE,
1107
    &ME_RENDERERSETUP_PRECACHE,
1108
# ifndef EDUKE32_GLES
1108
# ifndef EDUKE32_GLES
1109
    &ME_RENDERERSETUP_TEXCACHE,
1109
    &ME_RENDERERSETUP_TEXCACHE,
1110
# endif
1110
# endif
1111
# ifdef USE_GLEXT
1111
# ifdef USE_GLEXT
1112
    &ME_RENDERERSETUP_DETAILTEX,
1112
    &ME_RENDERERSETUP_DETAILTEX,
1113
    &ME_RENDERERSETUP_GLOWTEX,
1113
    &ME_RENDERERSETUP_GLOWTEX,
1114
# endif
1114
# endif
1115
    &ME_Space4_Bluefont,
1115
    &ME_Space4_Bluefont,
1116
    &ME_RENDERERSETUP_MODELS,
1116
    &ME_RENDERERSETUP_MODELS,
1117
};
1117
};
1118
1118
1119
#ifdef POLYMER
1119
#ifdef POLYMER
1120
static MenuEntry_t *MEL_RENDERERSETUP_POLYMER [] = {
1120
static MenuEntry_t *MEL_RENDERERSETUP_POLYMER [] = {
1121
    &ME_RENDERERSETUP_HIGHTILE,
1121
    &ME_RENDERERSETUP_HIGHTILE,
1122
    &ME_RENDERERSETUP_TEXQUALITY,
1122
    &ME_RENDERERSETUP_TEXQUALITY,
1123
    &ME_RENDERERSETUP_PRECACHE,
1123
    &ME_RENDERERSETUP_PRECACHE,
1124
# ifndef EDUKE32_GLES
1124
# ifndef EDUKE32_GLES
1125
    &ME_RENDERERSETUP_TEXCACHE,
1125
    &ME_RENDERERSETUP_TEXCACHE,
1126
# endif
1126
# endif
1127
# ifdef USE_GLEXT
1127
# ifdef USE_GLEXT
1128
    &ME_RENDERERSETUP_DETAILTEX,
1128
    &ME_RENDERERSETUP_DETAILTEX,
1129
    &ME_RENDERERSETUP_GLOWTEX,
1129
    &ME_RENDERERSETUP_GLOWTEX,
1130
# endif
1130
# endif
1131
    &ME_Space4_Bluefont,
1131
    &ME_Space4_Bluefont,
1132
    &ME_RENDERERSETUP_MODELS,
1132
    &ME_RENDERERSETUP_MODELS,
1133
    &ME_Space4_Bluefont,
1133
    &ME_Space4_Bluefont,
1134
    &ME_POLYMER_LIGHTS,
1134
    &ME_POLYMER_LIGHTS,
1135
    &ME_POLYMER_LIGHTPASSES,
1135
    &ME_POLYMER_LIGHTPASSES,
1136
    &ME_POLYMER_SHADOWS,
1136
    &ME_POLYMER_SHADOWS,
1137
    &ME_POLYMER_SHADOWCOUNT,
1137
    &ME_POLYMER_SHADOWCOUNT,
1138
};
1138
};
1139
#endif
1139
#endif
1140
#endif
1140
#endif
1141
1141
1142
#ifdef EDUKE32_ANDROID_MENU
1142
#ifdef EDUKE32_ANDROID_MENU
1143
static MenuRangeFloat_t MEO_COLCORR_GAMMA = MAKE_MENURANGE( &g_videoGamma, &MF_Bluefont, 1.f, 2.5f, 0.f, 39, 1 );
1143
static MenuRangeFloat_t MEO_COLCORR_GAMMA = MAKE_MENURANGE( &g_videoGamma, &MF_Bluefont, 1.f, 2.5f, 0.f, 39, 1 );
1144
#else
1144
#else
1145
static MenuRangeFloat_t MEO_COLCORR_GAMMA = MAKE_MENURANGE( &g_videoGamma, &MF_Bluefont, 0.3f, 4.f, 0.f, 75, 1 );
1145
static MenuRangeFloat_t MEO_COLCORR_GAMMA = MAKE_MENURANGE( &g_videoGamma, &MF_Bluefont, 0.3f, 4.f, 0.f, 75, 1 );
1146
#endif
1146
#endif
1147
static MenuEntry_t ME_COLCORR_GAMMA = MAKE_MENUENTRY( "Gamma:", &MF_Redfont, &MEF_ColorCorrect, &MEO_COLCORR_GAMMA, RangeFloat );
1147
static MenuEntry_t ME_COLCORR_GAMMA = MAKE_MENUENTRY( "Gamma:", &MF_Redfont, &MEF_ColorCorrect, &MEO_COLCORR_GAMMA, RangeFloat );
1148
static MenuRangeFloat_t MEO_COLCORR_CONTRAST = MAKE_MENURANGE( &g_videoContrast, &MF_Bluefont, 0.1f, 2.7f, 0.f, 53, 1 );
1148
static MenuRangeFloat_t MEO_COLCORR_CONTRAST = MAKE_MENURANGE( &g_videoContrast, &MF_Bluefont, 0.1f, 2.7f, 0.f, 53, 1 );
1149
static MenuEntry_t ME_COLCORR_CONTRAST = MAKE_MENUENTRY( "Contrast:", &MF_Redfont, &MEF_ColorCorrect, &MEO_COLCORR_CONTRAST, RangeFloat );
1149
static MenuEntry_t ME_COLCORR_CONTRAST = MAKE_MENUENTRY( "Contrast:", &MF_Redfont, &MEF_ColorCorrect, &MEO_COLCORR_CONTRAST, RangeFloat );
1150
static MenuRangeFloat_t MEO_COLCORR_BRIGHTNESS = MAKE_MENURANGE( &g_videoBrightness, &MF_Bluefont, -0.8f, 0.8f, 0.f, 33, 1 );
1150
static MenuRangeFloat_t MEO_COLCORR_BRIGHTNESS = MAKE_MENURANGE( &g_videoBrightness, &MF_Bluefont, -0.8f, 0.8f, 0.f, 33, 1 );
1151
static MenuEntry_t ME_COLCORR_BRIGHTNESS = MAKE_MENUENTRY( "Brightness:", &MF_Redfont, &MEF_ColorCorrect, &MEO_COLCORR_BRIGHTNESS, RangeFloat );
1151
static MenuEntry_t ME_COLCORR_BRIGHTNESS = MAKE_MENUENTRY( "Brightness:", &MF_Redfont, &MEF_ColorCorrect, &MEO_COLCORR_BRIGHTNESS, RangeFloat );
1152
static MenuLink_t MEO_COLCORR_RESET = { MENU_COLCORRRESETVERIFY, MA_None, };
1152
static MenuLink_t MEO_COLCORR_RESET = { MENU_COLCORRRESETVERIFY, MA_None, };
1153
static MenuEntry_t ME_COLCORR_RESET = MAKE_MENUENTRY( "Reset To Defaults", &MF_Redfont, &MEF_ColorCorrect, &MEO_COLCORR_RESET, Link );
1153
static MenuEntry_t ME_COLCORR_RESET = MAKE_MENUENTRY( "Reset To Defaults", &MF_Redfont, &MEF_ColorCorrect, &MEO_COLCORR_RESET, Link );
1154
#ifdef EDUKE32_ANDROID_MENU
1154
#ifdef EDUKE32_ANDROID_MENU
1155
#define MINVIS 1.f
1155
#define MINVIS 1.f
1156
#else
1156
#else
1157
#define MINVIS 0.125f
1157
#define MINVIS 0.125f
1158
#endif
1158
#endif
1159
#ifndef EDUKE32_RETAIL_MENU
1159
#ifndef EDUKE32_RETAIL_MENU
1160
static MenuRangeFloat_t MEO_COLCORR_AMBIENT = MAKE_MENURANGE( &r_ambientlight, &MF_Bluefont, MINVIS, 4.f, 0.f, 32, 1 );
1160
static MenuRangeFloat_t MEO_COLCORR_AMBIENT = MAKE_MENURANGE( &r_ambientlight, &MF_Bluefont, MINVIS, 4.f, 0.f, 32, 1 );
1161
static MenuEntry_t ME_COLCORR_AMBIENT = MAKE_MENUENTRY( "Visibility:", &MF_Redfont, &MEF_ColorCorrect, &MEO_COLCORR_AMBIENT, RangeFloat );
1161
static MenuEntry_t ME_COLCORR_AMBIENT = MAKE_MENUENTRY( "Visibility:", &MF_Redfont, &MEF_ColorCorrect, &MEO_COLCORR_AMBIENT, RangeFloat );
1162
#endif
1162
#endif
1163
static MenuEntry_t *MEL_COLCORR[] = {
1163
static MenuEntry_t *MEL_COLCORR[] = {
1164
    &ME_COLCORR_GAMMA,
1164
    &ME_COLCORR_GAMMA,
1165
#ifndef EDUKE32_ANDROID_MENU
1165
#ifndef EDUKE32_ANDROID_MENU
1166
    &ME_COLCORR_CONTRAST,
1166
    &ME_COLCORR_CONTRAST,
1167
    &ME_COLCORR_BRIGHTNESS,
1167
    &ME_COLCORR_BRIGHTNESS,
1168
#endif
1168
#endif
1169
#ifndef EDUKE32_RETAIL_MENU
1169
#ifndef EDUKE32_RETAIL_MENU
1170
    &ME_COLCORR_AMBIENT,
1170
    &ME_COLCORR_AMBIENT,
1171
#endif
1171
#endif
1172
    &ME_Space8_Redfont,
1172
    &ME_Space8_Redfont,
1173
    &ME_COLCORR_RESET,
1173
    &ME_COLCORR_RESET,
1174
};
1174
};
1175
1175
1176
static MenuEntry_t *MEL_SCREENSETUP[] = {
1176
static MenuEntry_t *MEL_SCREENSETUP[] = {
1177
#ifdef EDUKE32_ANDROID_MENU
1177
#ifdef EDUKE32_ANDROID_MENU
1178
    &ME_SCREENSETUP_STATUSBARONTOP,
1178
    &ME_SCREENSETUP_STATUSBARONTOP,
1179
#endif
1179
#endif
1180
    &ME_SCREENSETUP_SCREENSIZE,
1180
    &ME_SCREENSETUP_SCREENSIZE,
1181
    &ME_SCREENSETUP_SBARSIZE,
1181
    &ME_SCREENSETUP_SBARSIZE,
1182
1182
1183
    &ME_SCREENSETUP_CROSSHAIR,
1183
    &ME_SCREENSETUP_CROSSHAIR,
1184
    &ME_SCREENSETUP_CROSSHAIRSIZE,
1184
    &ME_SCREENSETUP_CROSSHAIRSIZE,
1185
1185
1186
    &ME_SCREENSETUP_LEVELSTATS,
1186
    &ME_SCREENSETUP_LEVELSTATS,
1187
    &ME_SCREENSETUP_TEXTSIZE,
1187
    &ME_SCREENSETUP_TEXTSIZE,
1188
1188
1189
    &ME_SCREENSETUP_SHOWPICKUPMESSAGES,
1189
    &ME_SCREENSETUP_SHOWPICKUPMESSAGES,
1190
};
1190
};
1191
1191
1192
// Save and load will be filled in before every viewing of the save/load screen.
1192
// Save and load will be filled in before every viewing of the save/load screen.
1193
static MenuLink_t MEO_LOAD = { MENU_LOADVERIFY, MA_None, };
1193
static MenuLink_t MEO_LOAD = { MENU_LOADVERIFY, MA_None, };
1194
static MenuEntry_t ME_LOAD_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Minifont, &MEF_LoadSave, &MEO_LOAD, Link );
1194
static MenuEntry_t ME_LOAD_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Minifont, &MEF_LoadSave, &MEO_LOAD, Link );
1195
static MenuEntry_t ME_LOAD_EMPTY = MAKE_MENUENTRY( NULL, &MF_Minifont, &MEF_LoadSave, nullptr, Dummy );
1195
static MenuEntry_t ME_LOAD_EMPTY = MAKE_MENUENTRY( NULL, &MF_Minifont, &MEF_LoadSave, nullptr, Dummy );
1196
static MenuEntry_t *ME_LOAD;
1196
static MenuEntry_t *ME_LOAD;
1197
static MenuEntry_t **MEL_LOAD;
1197
static MenuEntry_t **MEL_LOAD;
1198
1198
1199
static char const s_NewSaveGame[] = "(New Save Game)";
1199
static char const s_NewSaveGame[] = "(New Save Game)";
1200
static MenuString_t MEO_SAVE_TEMPLATE = MAKE_MENUSTRING( NULL, &MF_Minifont, MAXSAVEGAMENAME, 0 );
1200
static MenuString_t MEO_SAVE_TEMPLATE = MAKE_MENUSTRING( NULL, &MF_Minifont, MAXSAVEGAMENAME, 0 );
1201
static MenuString_t MEO_SAVE_NEW = MAKE_MENUSTRING( NULL, &MF_Minifont, MAXSAVEGAMENAME, 0 );
1201
static MenuString_t MEO_SAVE_NEW = MAKE_MENUSTRING( NULL, &MF_Minifont, MAXSAVEGAMENAME, 0 );
1202
static MenuString_t *MEO_SAVE;
1202
static MenuString_t *MEO_SAVE;
1203
static MenuEntry_t ME_SAVE_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Minifont, &MEF_LoadSave, &MEO_SAVE_TEMPLATE, String );
1203
static MenuEntry_t ME_SAVE_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Minifont, &MEF_LoadSave, &MEO_SAVE_TEMPLATE, String );
1204
static MenuEntry_t ME_SAVE_NEW = MAKE_MENUENTRY( s_NewSaveGame, &MF_Minifont, &MEF_LoadSave, &MEO_SAVE_NEW, String );
1204
static MenuEntry_t ME_SAVE_NEW = MAKE_MENUENTRY( s_NewSaveGame, &MF_Minifont, &MEF_LoadSave, &MEO_SAVE_NEW, String );
1205
static MenuEntry_t *ME_SAVE;
1205
static MenuEntry_t *ME_SAVE;
1206
static MenuEntry_t **MEL_SAVE;
1206
static MenuEntry_t **MEL_SAVE;
1207
1207
1208
static int32_t soundrate, soundvoices, musicdevice, opl3stereo;
1208
static int32_t soundrate, soundvoices, musicdevice, opl3stereo;
1209
static char sf2bankfile[BMAX_PATH];
1209
static char sf2bankfile[BMAX_PATH];
1210
static MenuOption_t MEO_SOUND = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &ud.config.SoundToggle );
1210
static MenuOption_t MEO_SOUND = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &ud.config.SoundToggle );
1211
static MenuEntry_t ME_SOUND = MAKE_MENUENTRY( "Sound:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND, Option );
1211
static MenuEntry_t ME_SOUND = MAKE_MENUENTRY( "Sound:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND, Option );
1212
1212
1213
static MenuOption_t MEO_SOUND_MUSIC = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &ud.config.MusicToggle );
1213
static MenuOption_t MEO_SOUND_MUSIC = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &ud.config.MusicToggle );
1214
static MenuEntry_t ME_SOUND_MUSIC = MAKE_MENUENTRY( "Music:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_MUSIC, Option );
1214
static MenuEntry_t ME_SOUND_MUSIC = MAKE_MENUENTRY( "Music:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_MUSIC, Option );
1215
1215
1216
static char const s_Volume[] = "Volume:";
1216
static char const s_Volume[] = "Volume:";
1217
1217
1218
static MenuRangeInt32_t MEO_SOUND_VOLUME_FX = MAKE_MENURANGE( &ud.config.FXVolume, &MF_Redfont, 0, 255, 0, 33, 2 );
1218
static MenuRangeInt32_t MEO_SOUND_VOLUME_FX = MAKE_MENURANGE( &ud.config.FXVolume, &MF_Redfont, 0, 255, 0, 33, 2 );
1219
static MenuEntry_t ME_SOUND_VOLUME_FX = MAKE_MENUENTRY( s_Volume, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SOUND_VOLUME_FX, RangeInt32 );
1219
static MenuEntry_t ME_SOUND_VOLUME_FX = MAKE_MENUENTRY( s_Volume, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SOUND_VOLUME_FX, RangeInt32 );
1220
1220
1221
static MenuRangeInt32_t MEO_SOUND_VOLUME_MUSIC = MAKE_MENURANGE( &ud.config.MusicVolume, &MF_Redfont, 0, 255, 0, 33, 2 );
1221
static MenuRangeInt32_t MEO_SOUND_VOLUME_MUSIC = MAKE_MENURANGE( &ud.config.MusicVolume, &MF_Redfont, 0, 255, 0, 33, 2 );
1222
static MenuEntry_t ME_SOUND_VOLUME_MUSIC = MAKE_MENUENTRY( s_Volume, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SOUND_VOLUME_MUSIC, RangeInt32 );
1222
static MenuEntry_t ME_SOUND_VOLUME_MUSIC = MAKE_MENUENTRY( s_Volume, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SOUND_VOLUME_MUSIC, RangeInt32 );
1223
1223
1224
#ifndef EDUKE32_STANDALONE
1224
#ifndef EDUKE32_STANDALONE
1225
static MenuOption_t MEO_SOUND_DUKETALK = MAKE_MENUOPTION(&MF_Redfont, &MEOS_NoYes, NULL);
1225
static MenuOption_t MEO_SOUND_DUKETALK = MAKE_MENUOPTION(&MF_Redfont, &MEOS_NoYes, NULL);
1226
static MenuEntry_t ME_SOUND_DUKETALK = MAKE_MENUENTRY( "Duke talk:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_DUKETALK, Option );
1226
static MenuEntry_t ME_SOUND_DUKETALK = MAKE_MENUENTRY( "Duke talk:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_DUKETALK, Option );
1227
#else
1227
#else
1228
static MenuOption_t MEO_SOUND_DUKETALK = MAKE_MENUOPTION(&MF_Redfont, &MEOS_YesNo, NULL);
1228
static MenuOption_t MEO_SOUND_DUKETALK = MAKE_MENUOPTION(&MF_Redfont, &MEOS_YesNo, NULL);
1229
static MenuEntry_t ME_SOUND_DUKETALK = MAKE_MENUENTRY("Silent protagonist:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_DUKETALK, Option);
1229
static MenuEntry_t ME_SOUND_DUKETALK = MAKE_MENUENTRY("Silent protagonist:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_DUKETALK, Option);
1230
#endif
1230
#endif
1231
1231
1232
static char const *MEOSN_SOUND_SAMPLINGRATE[] = { "22050Hz", "44100Hz", "48000Hz", };
1232
static char const *MEOSN_SOUND_SAMPLINGRATE[] = { "22050Hz", "44100Hz", "48000Hz", };
1233
static int32_t MEOSV_SOUND_SAMPLINGRATE[] = { 22050, 44100, 48000, };
1233
static int32_t MEOSV_SOUND_SAMPLINGRATE[] = { 22050, 44100, 48000, };
1234
static MenuOptionSet_t MEOS_SOUND_SAMPLINGRATE = MAKE_MENUOPTIONSET( MEOSN_SOUND_SAMPLINGRATE, MEOSV_SOUND_SAMPLINGRATE, 0x3 );
1234
static MenuOptionSet_t MEOS_SOUND_SAMPLINGRATE = MAKE_MENUOPTIONSET( MEOSN_SOUND_SAMPLINGRATE, MEOSV_SOUND_SAMPLINGRATE, 0x3 );
1235
static MenuOption_t MEO_SOUND_SAMPLINGRATE = MAKE_MENUOPTION( &MF_Redfont, &MEOS_SOUND_SAMPLINGRATE, &soundrate );
1235
static MenuOption_t MEO_SOUND_SAMPLINGRATE = MAKE_MENUOPTION( &MF_Redfont, &MEOS_SOUND_SAMPLINGRATE, &soundrate );
1236
static MenuEntry_t ME_SOUND_SAMPLINGRATE = MAKE_MENUENTRY( "Sample rate:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_SAMPLINGRATE, Option );
1236
static MenuEntry_t ME_SOUND_SAMPLINGRATE = MAKE_MENUENTRY( "Sample rate:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_SAMPLINGRATE, Option );
1237
1237
1238
#ifndef EDUKE32_RETAIL_MENU
1238
#ifndef EDUKE32_RETAIL_MENU
1239
static MenuOption_t MEO_SOUND_OPL3STEREO = MAKE_MENUOPTION(&MF_Redfont, &MEOS_NoYes, &opl3stereo);
1239
static MenuOption_t MEO_SOUND_OPL3STEREO = MAKE_MENUOPTION(&MF_Redfont, &MEOS_NoYes, &opl3stereo);
1240
static MenuEntry_t ME_SOUND_OPL3STEREO = MAKE_MENUENTRY( "OPL3 stereo mode:", &MF_Redfont, &MEF_BigOptionsRtSections, &MEO_SOUND_OPL3STEREO, Option );
1240
static MenuEntry_t ME_SOUND_OPL3STEREO = MAKE_MENUENTRY( "OPL3 stereo mode:", &MF_Redfont, &MEF_BigOptionsRtSections, &MEO_SOUND_OPL3STEREO, Option );
1241
1241
1242
static MenuRangeInt32_t MEO_SOUND_NUMVOICES = MAKE_MENURANGE( &soundvoices, &MF_Redfont, 16, 128, 0, 8, 1 );
1242
static MenuRangeInt32_t MEO_SOUND_NUMVOICES = MAKE_MENURANGE( &soundvoices, &MF_Redfont, 16, 128, 0, 8, 1 );
1243
static MenuEntry_t ME_SOUND_NUMVOICES = MAKE_MENUENTRY( "Voices:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_NUMVOICES, RangeInt32 );
1243
static MenuEntry_t ME_SOUND_NUMVOICES = MAKE_MENUENTRY( "Voices:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_NUMVOICES, RangeInt32 );
1244
1244
1245
static char const *MEOSN_SOUND_MIDIDRIVER[] = {
1245
static char const *MEOSN_SOUND_MIDIDRIVER[] = {
1246
    "OPL3 emu.",
1246
    "OPL3 emu.",
1247
#ifdef _WIN32
1247
#ifdef _WIN32
1248
    "Windows MME",
1248
    "Windows MME",
1249
#endif
1249
#endif
1250
    ".sf2 synth",
1250
    ".sf2 synth",
1251
};
1251
};
1252
static int32_t MEOSV_SOUND_MIDIDRIVER[] = {
1252
static int32_t MEOSV_SOUND_MIDIDRIVER[] = {
1253
    ASS_OPL3,
1253
    ASS_OPL3,
1254
#ifdef _WIN32
1254
#ifdef _WIN32
1255
    ASS_WinMM,
1255
    ASS_WinMM,
1256
#endif
1256
#endif
1257
    ASS_SF2,
1257
    ASS_SF2,
1258
};
1258
};
1259
1259
1260
static MenuOptionSet_t MEOS_SOUND_MIDIDRIVER = MAKE_MENUOPTIONSET( MEOSN_SOUND_MIDIDRIVER, MEOSV_SOUND_MIDIDRIVER, 0x2 );
1260
static MenuOptionSet_t MEOS_SOUND_MIDIDRIVER = MAKE_MENUOPTIONSET( MEOSN_SOUND_MIDIDRIVER, MEOSV_SOUND_MIDIDRIVER, 0x2 );
1261
static MenuOption_t MEO_SOUND_MIDIDRIVER = MAKE_MENUOPTION( &MF_Redfont, &MEOS_SOUND_MIDIDRIVER, &musicdevice );
1261
static MenuOption_t MEO_SOUND_MIDIDRIVER = MAKE_MENUOPTION( &MF_Redfont, &MEOS_SOUND_MIDIDRIVER, &musicdevice );
1262
static MenuEntry_t ME_SOUND_MIDIDRIVER = MAKE_MENUENTRY( "MIDI driver:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_MIDIDRIVER, Option );
1262
static MenuEntry_t ME_SOUND_MIDIDRIVER = MAKE_MENUENTRY( "MIDI driver:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_MIDIDRIVER, Option );
1263
1263
1264
static MenuLink_t MEO_SOUND_DEVSETUP = { MENU_SOUND_DEVSETUP, MA_Advance, };
1264
static MenuLink_t MEO_SOUND_DEVSETUP = { MENU_SOUND_DEVSETUP, MA_Advance, };
1265
static MenuEntry_t ME_SOUND_DEVSETUP = MAKE_MENUENTRY( "Device configuration", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_DEVSETUP, Link );
1265
static MenuEntry_t ME_SOUND_DEVSETUP = MAKE_MENUENTRY( "Device configuration", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_DEVSETUP, Link );
1266
1266
1267
static MenuLink_t MEO_SOUND_SF2 = { MENU_SOUND_SF2, MA_Advance, };
1267
static MenuLink_t MEO_SOUND_SF2 = { MENU_SOUND_SF2, MA_Advance, };
1268
static MenuEntry_t ME_SOUND_SF2 = MAKE_MENUENTRY( sf2bankfile, &MF_Redfont, &MEF_BigOptionsRtSections, &MEO_SOUND_SF2, Link );
1268
static MenuEntry_t ME_SOUND_SF2 = MAKE_MENUENTRY( sf2bankfile, &MF_Redfont, &MEF_BigOptionsRtSections, &MEO_SOUND_SF2, Link );
1269
#endif
1269
#endif
1270
1270
1271
static MenuEntry_t ME_SOUND_RESTART = MAKE_MENUENTRY( "Apply Changes", &MF_Redfont, &MEF_BigOptions_Apply, &MEO_NULL, Link );
1271
static MenuEntry_t ME_SOUND_RESTART = MAKE_MENUENTRY( "Apply Changes", &MF_Redfont, &MEF_BigOptions_Apply, &MEO_NULL, Link );
1272
1272
1273
static MenuEntry_t *MEL_SOUND[] = {
1273
static MenuEntry_t *MEL_SOUND[] = {
1274
    &ME_SOUND,
1274
    &ME_SOUND,
1275
    &ME_SOUND_VOLUME_FX,
1275
    &ME_SOUND_VOLUME_FX,
1276
    &ME_SOUND_MUSIC,
1276
    &ME_SOUND_MUSIC,
1277
    &ME_SOUND_VOLUME_MUSIC,
1277
    &ME_SOUND_VOLUME_MUSIC,
1278
    &ME_SOUND_DUKETALK,
1278
    &ME_SOUND_DUKETALK,
1279
#ifndef EDUKE32_RETAIL_MENU
1279
#ifndef EDUKE32_RETAIL_MENU
1280
    &ME_Space4_Redfont,
1280
    &ME_Space4_Redfont,
1281
    &ME_SOUND_DEVSETUP,
1281
    &ME_SOUND_DEVSETUP,
1282
#endif
1282
#endif
1283
};
1283
};
1284
1284
1285
static MenuEntry_t *MEL_SOUND_DEVSETUP[] = {
1285
static MenuEntry_t *MEL_SOUND_DEVSETUP[] = {
1286
    &ME_SOUND_SAMPLINGRATE,
1286
    &ME_SOUND_SAMPLINGRATE,
1287
#ifndef EDUKE32_RETAIL_MENU
1287
#ifndef EDUKE32_RETAIL_MENU
1288
    &ME_SOUND_NUMVOICES,
1288
    &ME_SOUND_NUMVOICES,
1289
    &ME_SOUND_MIDIDRIVER,
1289
    &ME_SOUND_MIDIDRIVER,
1290
    &ME_SOUND_OPL3STEREO,
1290
    &ME_SOUND_OPL3STEREO,
1291
    &ME_SOUND_SF2,
1291
    &ME_SOUND_SF2,
1292
#endif
1292
#endif
1293
    &ME_Space4_Redfont,
1293
    &ME_Space4_Redfont,
1294
    &ME_SOUND_RESTART,
1294
    &ME_SOUND_RESTART,
1295
};
1295
};
1296
1296
1297
1297
1298
static MenuOption_t MEO_SAVESETUP_AUTOSAVE = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &ud.autosave );
1298
static MenuOption_t MEO_SAVESETUP_AUTOSAVE = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &ud.autosave );
1299
static MenuEntry_t ME_SAVESETUP_AUTOSAVE = MAKE_MENUENTRY( "Checkpoints:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SAVESETUP_AUTOSAVE, Option );
1299
static MenuEntry_t ME_SAVESETUP_AUTOSAVE = MAKE_MENUENTRY( "Checkpoints:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SAVESETUP_AUTOSAVE, Option );
1300
1300
1301
static MenuOption_t MEO_SAVESETUP_AUTOSAVEDELETION = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &ud.autosavedeletion );
1301
static MenuOption_t MEO_SAVESETUP_AUTOSAVEDELETION = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &ud.autosavedeletion );
1302
static MenuEntry_t ME_SAVESETUP_AUTOSAVEDELETION = MAKE_MENUENTRY( "Auto-Delete:", &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SAVESETUP_AUTOSAVEDELETION, Option );
1302
static MenuEntry_t ME_SAVESETUP_AUTOSAVEDELETION = MAKE_MENUENTRY( "Auto-Delete:", &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SAVESETUP_AUTOSAVEDELETION, Option );
1303
static MenuRangeInt32_t MEO_SAVESETUP_MAXAUTOSAVES = MAKE_MENURANGE( &ud.maxautosaves, &MF_Redfont, 1, 10, 0, 10, 1 );
1303
static MenuRangeInt32_t MEO_SAVESETUP_MAXAUTOSAVES = MAKE_MENURANGE( &ud.maxautosaves, &MF_Redfont, 1, 10, 0, 10, 1 );
1304
static MenuEntry_t ME_SAVESETUP_MAXAUTOSAVES = MAKE_MENUENTRY( "Limit:", &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SAVESETUP_MAXAUTOSAVES, RangeInt32 );
1304
static MenuEntry_t ME_SAVESETUP_MAXAUTOSAVES = MAKE_MENUENTRY( "Limit:", &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SAVESETUP_MAXAUTOSAVES, RangeInt32 );
1305
1305
1306
static MenuEntry_t ME_SAVESETUP_CLEANUP = MAKE_MENUENTRY( "Clean Up Saves", &MF_Redfont, &MEF_BigOptionsRt, &MEO_NULL, Link );
1306
static MenuEntry_t ME_SAVESETUP_CLEANUP = MAKE_MENUENTRY( "Clean Up Saves", &MF_Redfont, &MEF_BigOptionsRt, &MEO_NULL, Link );
1307
1307
1308
#ifdef EDUKE32_STANDALONE
1308
#ifdef EDUKE32_STANDALONE
1309
static MenuEntry_t ME_SAVESETUP_RESETSTATS = MAKE_MENUENTRY( "Reset Stats/Achievements", &MF_Redfont, &MEF_BigOptionsRt, &MEO_NULL, Link );
1309
static MenuEntry_t ME_SAVESETUP_RESETSTATS = MAKE_MENUENTRY( "Reset Stats/Achievements", &MF_Redfont, &MEF_BigOptionsRt, &MEO_NULL, Link );
1310
#endif
1310
#endif
1311
1311
1312
static MenuEntry_t *MEL_SAVESETUP[] = {
1312
static MenuEntry_t *MEL_SAVESETUP[] = {
1313
    &ME_SAVESETUP_AUTOSAVE,
1313
    &ME_SAVESETUP_AUTOSAVE,
1314
    &ME_SAVESETUP_AUTOSAVEDELETION,
1314
    &ME_SAVESETUP_AUTOSAVEDELETION,
1315
    &ME_SAVESETUP_MAXAUTOSAVES,
1315
    &ME_SAVESETUP_MAXAUTOSAVES,
1316
    &ME_SAVESETUP_CLEANUP,
1316
    &ME_SAVESETUP_CLEANUP,
1317
#ifdef EDUKE32_STANDALONE
1317
#ifdef EDUKE32_STANDALONE
1318
    &ME_SAVESETUP_RESETSTATS,
1318
    &ME_SAVESETUP_RESETSTATS,
1319
#endif
1319
#endif
1320
};
1320
};
1321
1321
1322
1322
1323
MAKE_MENU_TOP_ENTRYLINK( "Player Setup", MEF_CenterMenu, NETWORK_PLAYERSETUP, MENU_PLAYER );
1323
MAKE_MENU_TOP_ENTRYLINK( "Player Setup", MEF_CenterMenu, NETWORK_PLAYERSETUP, MENU_PLAYER );
1324
MAKE_MENU_TOP_ENTRYLINK( "Join Game", MEF_CenterMenu, NETWORK_JOINGAME, MENU_NETJOIN );
1324
MAKE_MENU_TOP_ENTRYLINK( "Join Game", MEF_CenterMenu, NETWORK_JOINGAME, MENU_NETJOIN );
1325
MAKE_MENU_TOP_ENTRYLINK( "Host Game", MEF_CenterMenu, NETWORK_HOSTGAME, MENU_NETHOST );
1325
MAKE_MENU_TOP_ENTRYLINK( "Host Game", MEF_CenterMenu, NETWORK_HOSTGAME, MENU_NETHOST );
1326
1326
1327
static MenuEntry_t *MEL_NETWORK[] = {
1327
static MenuEntry_t *MEL_NETWORK[] = {
1328
    &ME_NETWORK_PLAYERSETUP,
1328
    &ME_NETWORK_PLAYERSETUP,
1329
    &ME_NETWORK_JOINGAME,
1329
    &ME_NETWORK_JOINGAME,
1330
    &ME_NETWORK_HOSTGAME,
1330
    &ME_NETWORK_HOSTGAME,
1331
};
1331
};
1332
1332
1333
static MenuString_t MEO_PLAYER_NAME = MAKE_MENUSTRING( szPlayerName, &MF_Bluefont, MAXPLAYERNAME, 0 );
1333
static MenuString_t MEO_PLAYER_NAME = MAKE_MENUSTRING( szPlayerName, &MF_Bluefont, MAXPLAYERNAME, 0 );
1334
static MenuEntry_t ME_PLAYER_NAME = MAKE_MENUENTRY( "Name", &MF_Bluefont, &MEF_PlayerNarrow, &MEO_PLAYER_NAME, String );
1334
static MenuEntry_t ME_PLAYER_NAME = MAKE_MENUENTRY( "Name", &MF_Bluefont, &MEF_PlayerNarrow, &MEO_PLAYER_NAME, String );
1335
static char const *MEOSN_PLAYER_COLOR[] = { "Auto", "Blue", "Red", "Green", "Gray", "Dark gray", "Dark green", "Brown", "Dark blue", "Bright red", "Yellow", };
1335
static char const *MEOSN_PLAYER_COLOR[] = { "Auto", "Blue", "Red", "Green", "Gray", "Dark gray", "Dark green", "Brown", "Dark blue", "Bright red", "Yellow", };
1336
static int32_t MEOSV_PLAYER_COLOR[] = { 0, 9, 10, 11, 12, 13, 14, 15, 16, 21, 23, };
1336
static int32_t MEOSV_PLAYER_COLOR[] = { 0, 9, 10, 11, 12, 13, 14, 15, 16, 21, 23, };
1337
static MenuOptionSet_t MEOS_PLAYER_COLOR = MAKE_MENUOPTIONSET( MEOSN_PLAYER_COLOR, MEOSV_PLAYER_COLOR, 0x2 );
1337
static MenuOptionSet_t MEOS_PLAYER_COLOR = MAKE_MENUOPTIONSET( MEOSN_PLAYER_COLOR, MEOSV_PLAYER_COLOR, 0x2 );
1338
static MenuOption_t MEO_PLAYER_COLOR = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_PLAYER_COLOR, &ud.color );
1338
static MenuOption_t MEO_PLAYER_COLOR = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_PLAYER_COLOR, &ud.color );
1339
static MenuEntry_t ME_PLAYER_COLOR = MAKE_MENUENTRY( "Color", &MF_Bluefont, &MEF_PlayerNarrow, &MEO_PLAYER_COLOR, Option );
1339
static MenuEntry_t ME_PLAYER_COLOR = MAKE_MENUENTRY( "Color", &MF_Bluefont, &MEF_PlayerNarrow, &MEO_PLAYER_COLOR, Option );
1340
static char const *MEOSN_PLAYER_TEAM[] = { "Blue", "Red", "Green", "Gray", };
1340
static char const *MEOSN_PLAYER_TEAM[] = { "Blue", "Red", "Green", "Gray", };
1341
static MenuOptionSet_t MEOS_PLAYER_TEAM = MAKE_MENUOPTIONSET( MEOSN_PLAYER_TEAM, NULL, 0x2 );
1341
static MenuOptionSet_t MEOS_PLAYER_TEAM = MAKE_MENUOPTIONSET( MEOSN_PLAYER_TEAM, NULL, 0x2 );
1342
static MenuOption_t MEO_PLAYER_TEAM = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_PLAYER_TEAM, &ud.team );
1342
static MenuOption_t MEO_PLAYER_TEAM = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_PLAYER_TEAM, &ud.team );
1343
static MenuEntry_t ME_PLAYER_TEAM = MAKE_MENUENTRY( "Team", &MF_Bluefont, &MEF_PlayerNarrow, &MEO_PLAYER_TEAM, Option );
1343
static MenuEntry_t ME_PLAYER_TEAM = MAKE_MENUENTRY( "Team", &MF_Bluefont, &MEF_PlayerNarrow, &MEO_PLAYER_TEAM, Option );
1344
#ifndef EDUKE32_RETAIL_MENU
1344
#ifndef EDUKE32_RETAIL_MENU
1345
static MenuLink_t MEO_PLAYER_MACROS = { MENU_MACROS, MA_Advance, };
1345
static MenuLink_t MEO_PLAYER_MACROS = { MENU_MACROS, MA_Advance, };
1346
static MenuEntry_t ME_PLAYER_MACROS = MAKE_MENUENTRY( "Multiplayer macros", &MF_Bluefont, &MEF_SmallOptions, &MEO_PLAYER_MACROS, Link );
1346
static MenuEntry_t ME_PLAYER_MACROS = MAKE_MENUENTRY( "Multiplayer macros", &MF_Bluefont, &MEF_SmallOptions, &MEO_PLAYER_MACROS, Link );
1347
#endif
1347
#endif
1348
1348
1349
static MenuEntry_t *MEL_PLAYER[] = {
1349
static MenuEntry_t *MEL_PLAYER[] = {
1350
    &ME_PLAYER_NAME,
1350
    &ME_PLAYER_NAME,
1351
    &ME_Space4_Bluefont,
1351
    &ME_Space4_Bluefont,
1352
    &ME_PLAYER_COLOR,
1352
    &ME_PLAYER_COLOR,
1353
    &ME_Space4_Bluefont,
1353
    &ME_Space4_Bluefont,
1354
    &ME_PLAYER_TEAM,
1354
    &ME_PLAYER_TEAM,
1355
#ifndef EDUKE32_RETAIL_MENU
1355
#ifndef EDUKE32_RETAIL_MENU
1356
    &ME_Space8_Bluefont,
1356
    &ME_Space8_Bluefont,
1357
    &ME_PLAYER_MACROS,
1357
    &ME_PLAYER_MACROS,
1358
#endif
1358
#endif
1359
};
1359
};
1360
1360
1361
static MenuString_t MEO_MACROS_TEMPLATE = MAKE_MENUSTRING( NULL, &MF_Bluefont, MAXRIDECULELENGTH, 0 );
1361
static MenuString_t MEO_MACROS_TEMPLATE = MAKE_MENUSTRING( NULL, &MF_Bluefont, MAXRIDECULELENGTH, 0 );
1362
static MenuString_t MEO_MACROS[10];
1362
static MenuString_t MEO_MACROS[10];
1363
static MenuEntry_t ME_MACROS_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Bluefont, &MEF_Macros, &MEO_MACROS_TEMPLATE, String );
1363
static MenuEntry_t ME_MACROS_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Bluefont, &MEF_Macros, &MEO_MACROS_TEMPLATE, String );
1364
static MenuEntry_t ME_MACROS[MAXRIDECULE];
1364
static MenuEntry_t ME_MACROS[MAXRIDECULE];
1365
static MenuEntry_t *MEL_MACROS[MAXRIDECULE];
1365
static MenuEntry_t *MEL_MACROS[MAXRIDECULE];
1366
1366
1367
static char const *MenuUserMap = "User Map";
1367
static char const *MenuUserMap = "User Map";
1368
static char const *MenuSkillNone = "None";
1368
static char const *MenuSkillNone = "None";
1369
1369
1370
static char const *MEOSN_NetGametypes[MAXGAMETYPES];
1370
static char const *MEOSN_NetGametypes[MAXGAMETYPES];
1371
static char const *MEOSN_NetEpisodes[MAXVOLUMES+1];
1371
static char const *MEOSN_NetEpisodes[MAXVOLUMES+1];
1372
static int32_t MEOSV_NetEpisodes[MAXVOLUMES+1];
1372
static int32_t MEOSV_NetEpisodes[MAXVOLUMES+1];
1373
static char const *MEOSN_NetLevels[MAXVOLUMES][MAXLEVELS];
1373
static char const *MEOSN_NetLevels[MAXVOLUMES][MAXLEVELS];
1374
static char const *MEOSN_NetSkills[MAXSKILLS+1];
1374
static char const *MEOSN_NetSkills[MAXSKILLS+1];
1375
1375
1376
static MenuLink_t MEO_NETHOST_OPTIONS = { MENU_NETOPTIONS, MA_Advance, };
1376
static MenuLink_t MEO_NETHOST_OPTIONS = { MENU_NETOPTIONS, MA_Advance, };
1377
static MenuEntry_t ME_NETHOST_OPTIONS = MAKE_MENUENTRY( "Game Options", &MF_Redfont, &MEF_VideoSetup, &MEO_NETHOST_OPTIONS, Link );
1377
static MenuEntry_t ME_NETHOST_OPTIONS = MAKE_MENUENTRY( "Game Options", &MF_Redfont, &MEF_VideoSetup, &MEO_NETHOST_OPTIONS, Link );
1378
static MenuEntry_t ME_NETHOST_LAUNCH = MAKE_MENUENTRY( "Launch Game", &MF_Redfont, &MEF_VideoSetup, &MEO_NULL, Link );
1378
static MenuEntry_t ME_NETHOST_LAUNCH = MAKE_MENUENTRY( "Launch Game", &MF_Redfont, &MEF_VideoSetup, &MEO_NULL, Link );
1379
1379
1380
static MenuEntry_t *MEL_NETHOST[] = {
1380
static MenuEntry_t *MEL_NETHOST[] = {
1381
    &ME_NETHOST_OPTIONS,
1381
    &ME_NETHOST_OPTIONS,
1382
    &ME_NETHOST_LAUNCH,
1382
    &ME_NETHOST_LAUNCH,
1383
};
1383
};
1384
1384
1385
static MenuOptionSet_t MEOS_NETOPTIONS_GAMETYPE = MAKE_MENUOPTIONSET( MEOSN_NetGametypes, NULL, 0x0 );
1385
static MenuOptionSet_t MEOS_NETOPTIONS_GAMETYPE = MAKE_MENUOPTIONSET( MEOSN_NetGametypes, NULL, 0x0 );
1386
static MenuOption_t MEO_NETOPTIONS_GAMETYPE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NETOPTIONS_GAMETYPE, &ud.m_coop );
1386
static MenuOption_t MEO_NETOPTIONS_GAMETYPE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NETOPTIONS_GAMETYPE, &ud.m_coop );
1387
static MenuEntry_t ME_NETOPTIONS_GAMETYPE = MAKE_MENUENTRY( "Game Type", &MF_Redfont, &MEF_NetSetup, &MEO_NETOPTIONS_GAMETYPE, Option );
1387
static MenuEntry_t ME_NETOPTIONS_GAMETYPE = MAKE_MENUENTRY( "Game Type", &MF_Redfont, &MEF_NetSetup, &MEO_NETOPTIONS_GAMETYPE, Option );
1388
static MenuOptionSet_t MEOS_NETOPTIONS_EPISODE = MAKE_MENUOPTIONSET( MEOSN_NetEpisodes, MEOSV_NetEpisodes, 0x0 );
1388
static MenuOptionSet_t MEOS_NETOPTIONS_EPISODE = MAKE_MENUOPTIONSET( MEOSN_NetEpisodes, MEOSV_NetEpisodes, 0x0 );
1389
static int32_t NetEpisode;
1389
static int32_t NetEpisode;
1390
static MenuOption_t MEO_NETOPTIONS_EPISODE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NETOPTIONS_EPISODE, &NetEpisode );
1390
static MenuOption_t MEO_NETOPTIONS_EPISODE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NETOPTIONS_EPISODE, &NetEpisode );
1391
static MenuEntry_t ME_NETOPTIONS_EPISODE = MAKE_MENUENTRY( "Episode", &MF_Redfont, &MEF_NetSetup, &MEO_NETOPTIONS_EPISODE, Option );
1391
static MenuEntry_t ME_NETOPTIONS_EPISODE = MAKE_MENUENTRY( "Episode", &MF_Redfont, &MEF_NetSetup, &MEO_NETOPTIONS_EPISODE, Option );
1392
static MenuOptionSet_t MEOS_NETOPTIONS_LEVEL_TEMPLATE = MAKE_MENUOPTIONSETNULL;
1392
static MenuOptionSet_t MEOS_NETOPTIONS_LEVEL_TEMPLATE = MAKE_MENUOPTIONSETNULL;
1393
static MenuOptionSet_t MEOS_NETOPTIONS_LEVEL[MAXVOLUMES];
1393
static MenuOptionSet_t MEOS_NETOPTIONS_LEVEL[MAXVOLUMES];
1394
static MenuOption_t MEO_NETOPTIONS_LEVEL = MAKE_MENUOPTION( &MF_Bluefont, NULL, &ud.m_level_number );
1394
static MenuOption_t MEO_NETOPTIONS_LEVEL = MAKE_MENUOPTION( &MF_Bluefont, NULL, &ud.m_level_number );
1395
static MenuEntry_t ME_NETOPTIONS_LEVEL = MAKE_MENUENTRY( "Level", &MF_Redfont, &MEF_NetSetup, &MEO_NETOPTIONS_LEVEL, Option );
1395
static MenuEntry_t ME_NETOPTIONS_LEVEL = MAKE_MENUENTRY( "Level", &MF_Redfont, &MEF_NetSetup, &MEO_NETOPTIONS_LEVEL, Option );
1396
static MenuLink_t MEO_NETOPTIONS_USERMAP = { MENU_NETUSERMAP, MA_Advance, };
1396
static MenuLink_t MEO_NETOPTIONS_USERMAP = { MENU_NETUSERMAP, MA_Advance, };
1397
static MenuEntry_t ME_NETOPTIONS_USERMAP = MAKE_MENUENTRY( "User Map", &MF_Redfont, &MEF_NetSetup, &MEO_NETOPTIONS_USERMAP, Link );
1397
static MenuEntry_t ME_NETOPTIONS_USERMAP = MAKE_MENUENTRY( "User Map", &MF_Redfont, &MEF_NetSetup, &MEO_NETOPTIONS_USERMAP, Link );
1398
static MenuOptionSet_t MEOS_NETOPTIONS_MONSTERS = MAKE_MENUOPTIONSET( MEOSN_NetSkills, NULL, 0x0 );
1398
static MenuOptionSet_t MEOS_NETOPTIONS_MONSTERS = MAKE_MENUOPTIONSET( MEOSN_NetSkills, NULL, 0x0 );
1399
static MenuOption_t MEO_NETOPTIONS_MONSTERS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NETOPTIONS_MONSTERS, NULL );
1399
static MenuOption_t MEO_NETOPTIONS_MONSTERS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NETOPTIONS_MONSTERS, NULL );
1400
static MenuEntry_t ME_NETOPTIONS_MONSTERS = MAKE_MENUENTRY( "Monsters", &MF_Redfont, &MEF_NetSetup, &MEO_NETOPTIONS_MONSTERS, Option );
1400
static MenuEntry_t ME_NETOPTIONS_MONSTERS = MAKE_MENUENTRY( "Monsters", &MF_Redfont, &MEF_NetSetup, &MEO_NETOPTIONS_MONSTERS, Option );
1401
static MenuOption_t MEO_NETOPTIONS_MARKERS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &ud.m_marker );
1401
static MenuOption_t MEO_NETOPTIONS_MARKERS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &ud.m_marker );
1402
static MenuEntry_t ME_NETOPTIONS_MARKERS = MAKE_MENUENTRY( "Markers", &MF_Redfont, &MEF_NetSetup, &MEO_NETOPTIONS_MARKERS, Option );
1402
static MenuEntry_t ME_NETOPTIONS_MARKERS = MAKE_MENUENTRY( "Markers", &MF_Redfont, &MEF_NetSetup, &MEO_NETOPTIONS_MARKERS, Option );
1403
static MenuOption_t MEO_NETOPTIONS_MAPEXITS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OnOff, &ud.m_noexits );
1403
static MenuOption_t MEO_NETOPTIONS_MAPEXITS = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OnOff, &ud.m_noexits );
1404
static MenuEntry_t ME_NETOPTIONS_MAPEXITS = MAKE_MENUENTRY( "Map Exits", &MF_Redfont, &MEF_NetSetup, &MEO_NETOPTIONS_MAPEXITS, Option );
1404
static MenuEntry_t ME_NETOPTIONS_MAPEXITS = MAKE_MENUENTRY( "Map Exits", &MF_Redfont, &MEF_NetSetup, &MEO_NETOPTIONS_MAPEXITS, Option );
1405
static MenuOption_t MEO_NETOPTIONS_FRFIRE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &ud.m_ffire );
1405
static MenuOption_t MEO_NETOPTIONS_FRFIRE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &ud.m_ffire );
1406
static MenuEntry_t ME_NETOPTIONS_FRFIRE = MAKE_MENUENTRY( "Fr. Fire", &MF_Redfont, &MEF_NetSetup, &MEO_NETOPTIONS_FRFIRE, Option );
1406
static MenuEntry_t ME_NETOPTIONS_FRFIRE = MAKE_MENUENTRY( "Fr. Fire", &MF_Redfont, &MEF_NetSetup, &MEO_NETOPTIONS_FRFIRE, Option );
1407
static MenuEntry_t ME_NETOPTIONS_ACCEPT = MAKE_MENUENTRY( "Accept", &MF_Redfont, &MEF_NetSetup_Confirm, &MEO_NETWORK_HOSTGAME, Link );
1407
static MenuEntry_t ME_NETOPTIONS_ACCEPT = MAKE_MENUENTRY( "Accept", &MF_Redfont, &MEF_NetSetup_Confirm, &MEO_NETWORK_HOSTGAME, Link );
1408
1408
1409
static MenuEntry_t *MEL_NETOPTIONS[] = {
1409
static MenuEntry_t *MEL_NETOPTIONS[] = {
1410
    &ME_NETOPTIONS_GAMETYPE,
1410
    &ME_NETOPTIONS_GAMETYPE,
1411
    &ME_NETOPTIONS_EPISODE,
1411
    &ME_NETOPTIONS_EPISODE,
1412
    &ME_NETOPTIONS_LEVEL,
1412
    &ME_NETOPTIONS_LEVEL,
1413
    &ME_NETOPTIONS_MONSTERS,
1413
    &ME_NETOPTIONS_MONSTERS,
1414
    &ME_NETOPTIONS_MARKERS,
1414
    &ME_NETOPTIONS_MARKERS,
1415
    &ME_NETOPTIONS_MAPEXITS,
1415
    &ME_NETOPTIONS_MAPEXITS,
1416
    &ME_NETOPTIONS_ACCEPT,
1416
    &ME_NETOPTIONS_ACCEPT,
1417
};
1417
};
1418
1418
1419
static char MenuServer[BMAX_PATH] = "localhost";
1419
static char MenuServer[BMAX_PATH] = "localhost";
1420
static MenuString_t MEO_NETJOIN_SERVER = MAKE_MENUSTRING( MenuServer, &MF_Bluefont, BMAX_PATH, 0 );
1420
static MenuString_t MEO_NETJOIN_SERVER = MAKE_MENUSTRING( MenuServer, &MF_Bluefont, BMAX_PATH, 0 );
1421
static MenuEntry_t ME_NETJOIN_SERVER = MAKE_MENUENTRY( "Server", &MF_Redfont, &MEF_VideoSetup, &MEO_NETJOIN_SERVER, String );
1421
static MenuEntry_t ME_NETJOIN_SERVER = MAKE_MENUENTRY( "Server", &MF_Redfont, &MEF_VideoSetup, &MEO_NETJOIN_SERVER, String );
1422
#define MAXPORTSTRINGLENGTH 6 // unsigned 16-bit integer
1422
#define MAXPORTSTRINGLENGTH 6 // unsigned 16-bit integer
1423
static char MenuPort[MAXPORTSTRINGLENGTH] = "19014";
1423
static char MenuPort[MAXPORTSTRINGLENGTH] = "19014";
1424
static MenuString_t MEO_NETJOIN_PORT = MAKE_MENUSTRING( MenuPort, &MF_Bluefont, MAXPORTSTRINGLENGTH, INPUT_NUMERIC );
1424
static MenuString_t MEO_NETJOIN_PORT = MAKE_MENUSTRING( MenuPort, &MF_Bluefont, MAXPORTSTRINGLENGTH, INPUT_NUMERIC );
1425
static MenuEntry_t ME_NETJOIN_PORT = MAKE_MENUENTRY( "Port", &MF_Redfont, &MEF_VideoSetup, &MEO_NETJOIN_PORT, String );
1425
static MenuEntry_t ME_NETJOIN_PORT = MAKE_MENUENTRY( "Port", &MF_Redfont, &MEF_VideoSetup, &MEO_NETJOIN_PORT, String );
1426
static MenuEntry_t ME_NETJOIN_CONNECT = MAKE_MENUENTRY( "Connect", &MF_Redfont, &MEF_VideoSetup_Apply, &MEO_NULL, Link );
1426
static MenuEntry_t ME_NETJOIN_CONNECT = MAKE_MENUENTRY( "Connect", &MF_Redfont, &MEF_VideoSetup_Apply, &MEO_NULL, Link );
1427
1427
1428
static MenuEntry_t *MEL_NETJOIN[] = {
1428
static MenuEntry_t *MEL_NETJOIN[] = {
1429
    &ME_NETJOIN_SERVER,
1429
    &ME_NETJOIN_SERVER,
1430
    &ME_NETJOIN_PORT,
1430
    &ME_NETJOIN_PORT,
1431
    &ME_NETJOIN_CONNECT,
1431
    &ME_NETJOIN_CONNECT,
1432
};
1432
};
1433
1433
1434
1434
1435
#define NoTitle NULL
1435
#define NoTitle NULL
1436
1436
1437
#define MAKE_MENUMENU(Title, Format, Entries) { Title, Format, Entries, ARRAY_SIZE(Entries), 0, 0, 0 }
1437
#define MAKE_MENUMENU(Title, Format, Entries) { Title, Format, Entries, ARRAY_SIZE(Entries), 0, 0, 0 }
1438
#define MAKE_MENUMENU_CUSTOMSIZE(Title, Format, Entries) { Title, Format, Entries, 0, 0, 0, 0 }
1438
#define MAKE_MENUMENU_CUSTOMSIZE(Title, Format, Entries) { Title, Format, Entries, 0, 0, 0, 0 }
1439
1439
1440
static MenuMenu_t M_MAIN = MAKE_MENUMENU( NoTitle, &MMF_Top_Main, MEL_MAIN );
1440
static MenuMenu_t M_MAIN = MAKE_MENUMENU( NoTitle, &MMF_Top_Main, MEL_MAIN );
1441
static MenuMenu_t M_MAIN_INGAME = MAKE_MENUMENU( NoTitle, &MMF_Top_Main, MEL_MAIN_INGAME );
1441
static MenuMenu_t M_MAIN_INGAME = MAKE_MENUMENU( NoTitle, &MMF_Top_Main, MEL_MAIN_INGAME );
1442
static MenuMenu_t M_EPISODE = MAKE_MENUMENU( "Select An Episode", &MMF_Top_Episode, MEL_EPISODE );
1442
static MenuMenu_t M_EPISODE = MAKE_MENUMENU( "Select An Episode", &MMF_Top_Episode, MEL_EPISODE );
1443
static MenuMenu_t M_SKILL = MAKE_MENUMENU( "Select Skill", &MMF_Top_Skill, MEL_SKILL );
1443
static MenuMenu_t M_SKILL = MAKE_MENUMENU( "Select Skill", &MMF_Top_Skill, MEL_SKILL );
1444
static MenuMenu_t M_NEWGAMECUSTOM = MAKE_MENUMENU( s_NewGame, &MMF_Top_NewGameCustom, MEL_NEWGAMECUSTOM );
1444
static MenuMenu_t M_NEWGAMECUSTOM = MAKE_MENUMENU( s_NewGame, &MMF_Top_NewGameCustom, MEL_NEWGAMECUSTOM );
1445
static MenuMenu_t M_NEWGAMECUSTOMSUB = MAKE_MENUMENU( s_NewGame, &MMF_Top_NewGameCustomSub, MEL_NEWGAMECUSTOMSUB );
1445
static MenuMenu_t M_NEWGAMECUSTOMSUB = MAKE_MENUMENU( s_NewGame, &MMF_Top_NewGameCustomSub, MEL_NEWGAMECUSTOMSUB );
1446
#ifndef EDUKE32_RETAIL_MENU
1446
#ifndef EDUKE32_RETAIL_MENU
1447
static MenuMenu_t M_GAMESETUP = MAKE_MENUMENU( "Game Setup", &MMF_BigOptions, MEL_GAMESETUP );
1447
static MenuMenu_t M_GAMESETUP = MAKE_MENUMENU( "Game Setup", &MMF_BigOptions, MEL_GAMESETUP );
1448
#endif
1448
#endif
1449
static MenuMenu_t M_OPTIONS = MAKE_MENUMENU( s_Options, &MMF_Top_Options, MEL_OPTIONS );
1449
static MenuMenu_t M_OPTIONS = MAKE_MENUMENU( s_Options, &MMF_Top_Options, MEL_OPTIONS );
1450
static MenuMenu_t M_VIDEOSETUP = MAKE_MENUMENU( "Video Mode", &MMF_BigOptions, MEL_VIDEOSETUP );
1450
static MenuMenu_t M_VIDEOSETUP = MAKE_MENUMENU( "Video Mode", &MMF_BigOptions, MEL_VIDEOSETUP );
1451
static MenuMenu_t M_KEYBOARDSETUP = MAKE_MENUMENU( "Keyboard Setup", &MMF_Top_Options, MEL_KEYBOARDSETUP );
1451
static MenuMenu_t M_KEYBOARDSETUP = MAKE_MENUMENU( "Keyboard Setup", &MMF_Top_Options, MEL_KEYBOARDSETUP );
1452
static MenuMenu_t M_CONTROLS = MAKE_MENUMENU( "Control Setup", &MMF_BigOptions, MEL_CONTROLS );
1452
static MenuMenu_t M_CONTROLS = MAKE_MENUMENU( "Control Setup", &MMF_BigOptions, MEL_CONTROLS );
1453
static MenuMenu_t M_CHEATS = MAKE_MENUMENU( "Cheats", &MMF_SmallOptions, MEL_CHEATS );
1453
static MenuMenu_t M_CHEATS = MAKE_MENUMENU( "Cheats", &MMF_SmallOptions, MEL_CHEATS );
1454
static MenuMenu_t M_MOUSESETUP = MAKE_MENUMENU( "Mouse Setup", &MMF_BigOptions, MEL_MOUSESETUP );
1454
static MenuMenu_t M_MOUSESETUP = MAKE_MENUMENU( "Mouse Setup", &MMF_BigOptions, MEL_MOUSESETUP );
1455
#ifdef EDUKE32_ANDROID_MENU
1455
#ifdef EDUKE32_ANDROID_MENU
1456
static MenuMenu_t M_TOUCHSETUP = MAKE_MENUMENU( "Touch Setup", &MMF_Top_Options, MEL_TOUCHSETUP );
1456
static MenuMenu_t M_TOUCHSETUP = MAKE_MENUMENU( "Touch Setup", &MMF_Top_Options, MEL_TOUCHSETUP );
1457
static MenuMenu_t M_TOUCHSENS = MAKE_MENUMENU( "Sensitivity", &MMF_BigOptions, MEL_TOUCHSENS);
1457
static MenuMenu_t M_TOUCHSENS = MAKE_MENUMENU( "Sensitivity", &MMF_BigOptions, MEL_TOUCHSENS);
1458
static MenuPanel_t M_TOUCHBUTTONS = { "Button Setup", MENU_TOUCHSETUP, MA_Return, MENU_TOUCHSETUP, MA_Advance, };
1458
static MenuPanel_t M_TOUCHBUTTONS = { "Button Setup", MENU_TOUCHSETUP, MA_Return, MENU_TOUCHSETUP, MA_Advance, };
1459
#endif
1459
#endif
1460
static MenuMenu_t M_JOYSTICKSETUP = MAKE_MENUMENU( "Gamepad Setup", &MMF_BigOptions, MEL_JOYSTICKSETUP );
1460
static MenuMenu_t M_JOYSTICKSETUP = MAKE_MENUMENU( "Gamepad Setup", &MMF_BigOptions, MEL_JOYSTICKSETUP );
1461
static MenuMenu_t M_JOYSTICKBTNS = MAKE_MENUMENU( "Gamepad Buttons", &MMF_MouseJoySetupBtns, MEL_JOYSTICKBTNS );
1461
static MenuMenu_t M_JOYSTICKBTNS = MAKE_MENUMENU( "Gamepad Buttons", &MMF_MouseJoySetupBtns, MEL_JOYSTICKBTNS );
1462
static MenuMenu_t M_JOYSTICKAXES = MAKE_MENUMENU( "Gamepad Axes", &MMF_BigSliders, MEL_JOYSTICKAXES );
1462
static MenuMenu_t M_JOYSTICKAXES = MAKE_MENUMENU( "Gamepad Axes", &MMF_BigSliders, MEL_JOYSTICKAXES );
1463
static MenuMenu_t M_KEYBOARDKEYS = MAKE_MENUMENU( "Key Configuration", &MMF_KeyboardSetupFuncs, MEL_KEYBOARDSETUPFUNCS );
1463
static MenuMenu_t M_KEYBOARDKEYS = MAKE_MENUMENU( "Key Configuration", &MMF_KeyboardSetupFuncs, MEL_KEYBOARDSETUPFUNCS );
1464
static MenuMenu_t M_MOUSEBTNS = MAKE_MENUMENU( "Mouse Buttons", &MMF_MouseJoySetupBtns, MEL_MOUSESETUPBTNS );
1464
static MenuMenu_t M_MOUSEBTNS = MAKE_MENUMENU( "Mouse Buttons", &MMF_MouseJoySetupBtns, MEL_MOUSESETUPBTNS );
1465
static MenuMenu_t M_MOUSEADVANCED = MAKE_MENUMENU( "Advanced Mouse", &MMF_BigSliders, MEL_MOUSEADVANCED );
1465
static MenuMenu_t M_MOUSEADVANCED = MAKE_MENUMENU( "Advanced Mouse", &MMF_BigSliders, MEL_MOUSEADVANCED );
1466
static MenuMenu_t M_JOYSTICKAXIS = MAKE_MENUMENU( NULL, &MMF_BigSliders, MEL_JOYSTICKAXIS );
1466
static MenuMenu_t M_JOYSTICKAXIS = MAKE_MENUMENU( NULL, &MMF_BigSliders, MEL_JOYSTICKAXIS );
1467
#ifdef USE_OPENGL
1467
#ifdef USE_OPENGL
1468
static MenuMenu_t M_RENDERERSETUP_POLYMOST = MAKE_MENUMENU( "Polymost Setup", &MMF_SmallOptions, MEL_RENDERERSETUP_POLYMOST );
1468
static MenuMenu_t M_RENDERERSETUP_POLYMOST = MAKE_MENUMENU( "Polymost Setup", &MMF_SmallOptions, MEL_RENDERERSETUP_POLYMOST );
1469
# ifdef POLYMER
1469
# ifdef POLYMER
1470
static MenuMenu_t M_RENDERERSETUP_POLYMER = MAKE_MENUMENU("Polymer Setup", &MMF_SmallOptions, MEL_RENDERERSETUP_POLYMER );
1470
static MenuMenu_t M_RENDERERSETUP_POLYMER = MAKE_MENUMENU("Polymer Setup", &MMF_SmallOptions, MEL_RENDERERSETUP_POLYMER );
1471
# endif
1471
# endif
1472
#endif
1472
#endif
1473
static MenuMenu_t M_COLCORR = MAKE_MENUMENU( "Color Correction", &MMF_ColorCorrect, MEL_COLCORR );
1473
static MenuMenu_t M_COLCORR = MAKE_MENUMENU( "Color Correction", &MMF_ColorCorrect, MEL_COLCORR );
1474
static MenuMenu_t M_SCREENSETUP = MAKE_MENUMENU( "HUD Setup", &MMF_BigOptions, MEL_SCREENSETUP );
1474
static MenuMenu_t M_SCREENSETUP = MAKE_MENUMENU( "HUD Setup", &MMF_BigOptions, MEL_SCREENSETUP );
1475
static MenuMenu_t M_DISPLAYSETUP = MAKE_MENUMENU( "Display Setup", &MMF_BigOptions, MEL_DISPLAYSETUP );
1475
static MenuMenu_t M_DISPLAYSETUP = MAKE_MENUMENU( "Display Setup", &MMF_BigOptions, MEL_DISPLAYSETUP );
1476
static MenuMenu_t M_LOAD = MAKE_MENUMENU_CUSTOMSIZE( s_LoadGame, &MMF_LoadSave, MEL_LOAD );
1476
static MenuMenu_t M_LOAD = MAKE_MENUMENU_CUSTOMSIZE( s_LoadGame, &MMF_LoadSave, MEL_LOAD );
1477
static MenuMenu_t M_SAVE = MAKE_MENUMENU_CUSTOMSIZE( s_SaveGame, &MMF_LoadSave, MEL_SAVE );
1477
static MenuMenu_t M_SAVE = MAKE_MENUMENU_CUSTOMSIZE( s_SaveGame, &MMF_LoadSave, MEL_SAVE );
1478
static MenuMenu_t M_SOUND = MAKE_MENUMENU( "Sound Setup", &MMF_BigOptions, MEL_SOUND );
1478
static MenuMenu_t M_SOUND = MAKE_MENUMENU( "Sound Setup", &MMF_BigOptions, MEL_SOUND );
1479
static MenuMenu_t M_SOUND_DEVSETUP = MAKE_MENUMENU( "Device Configuration", &MMF_BigOptions, MEL_SOUND_DEVSETUP );
1479
static MenuMenu_t M_SOUND_DEVSETUP = MAKE_MENUMENU( "Device Configuration", &MMF_BigOptions, MEL_SOUND_DEVSETUP );
1480
static MenuMenu_t M_SAVESETUP = MAKE_MENUMENU( "Save Setup", &MMF_BigOptions, MEL_SAVESETUP );
1480
static MenuMenu_t M_SAVESETUP = MAKE_MENUMENU( "Save Setup", &MMF_BigOptions, MEL_SAVESETUP );
1481
static MenuMenu_t M_NETWORK = MAKE_MENUMENU( "Network Game", &MMF_Top_Joystick_Network, MEL_NETWORK );
1481
static MenuMenu_t M_NETWORK = MAKE_MENUMENU( "Network Game", &MMF_Top_Joystick_Network, MEL_NETWORK );
1482
static MenuMenu_t M_PLAYER = MAKE_MENUMENU( "Player Setup", &MMF_SmallOptions, MEL_PLAYER );
1482
static MenuMenu_t M_PLAYER = MAKE_MENUMENU( "Player Setup", &MMF_SmallOptions, MEL_PLAYER );
1483
static MenuMenu_t M_MACROS = MAKE_MENUMENU( "Multiplayer Macros", &MMF_Macros, MEL_MACROS );
1483
static MenuMenu_t M_MACROS = MAKE_MENUMENU( "Multiplayer Macros", &MMF_Macros, MEL_MACROS );
1484
static MenuMenu_t M_NETHOST = MAKE_MENUMENU( "Host Network Game", &MMF_SmallOptionsNarrow, MEL_NETHOST );
1484
static MenuMenu_t M_NETHOST = MAKE_MENUMENU( "Host Network Game", &MMF_SmallOptionsNarrow, MEL_NETHOST );
1485
static MenuMenu_t M_NETOPTIONS = MAKE_MENUMENU( "Net Game Options", &MMF_NetSetup, MEL_NETOPTIONS );
1485
static MenuMenu_t M_NETOPTIONS = MAKE_MENUMENU( "Net Game Options", &MMF_NetSetup, MEL_NETOPTIONS );
1486
static MenuMenu_t M_NETJOIN = MAKE_MENUMENU( "Join Network Game", &MMF_SmallOptionsNarrow, MEL_NETJOIN );
1486
static MenuMenu_t M_NETJOIN = MAKE_MENUMENU( "Join Network Game", &MMF_SmallOptionsNarrow, MEL_NETJOIN );
1487
1487
1488
#ifdef EDUKE32_RETAIL_MENU
1488
#ifdef EDUKE32_RETAIL_MENU
1489
static MenuPanel_t M_STORY = { NoTitle, MENU_STORY, MA_Return, MENU_STORY, MA_Advance, };
1489
static MenuPanel_t M_STORY = { NoTitle, MENU_STORY, MA_Return, MENU_STORY, MA_Advance, };
1490
#else
1490
#else
1491
static MenuPanel_t M_STORY = { NoTitle, MENU_F1HELP, MA_Return, MENU_F1HELP, MA_Advance, };
1491
static MenuPanel_t M_STORY = { NoTitle, MENU_F1HELP, MA_Return, MENU_F1HELP, MA_Advance, };
1492
#endif
1492
#endif
1493
1493
1494
static MenuPanel_t M_F1HELP = { NoTitle, MENU_STORY, MA_Return, MENU_STORY, MA_Advance, };
1494
static MenuPanel_t M_F1HELP = { NoTitle, MENU_STORY, MA_Return, MENU_STORY, MA_Advance, };
1495
static MenuPanel_t M_CREDITS = { NoTitle, MENU_CREDITS5, MA_Return, MENU_CREDITS2, MA_Advance, };
1495
static MenuPanel_t M_CREDITS = { NoTitle, MENU_CREDITS5, MA_Return, MENU_CREDITS2, MA_Advance, };
1496
static MenuPanel_t M_CREDITS2 = { NoTitle, MENU_CREDITS, MA_Return, MENU_CREDITS3, MA_Advance, };
1496
static MenuPanel_t M_CREDITS2 = { NoTitle, MENU_CREDITS, MA_Return, MENU_CREDITS3, MA_Advance, };
1497
static MenuPanel_t M_CREDITS3 = { NoTitle, MENU_CREDITS2, MA_Return, MENU_CREDITS4, MA_Advance, };
1497
static MenuPanel_t M_CREDITS3 = { NoTitle, MENU_CREDITS2, MA_Return, MENU_CREDITS4, MA_Advance, };
1498
static MenuPanel_t M_CREDITS4 = { "About " APPNAME, MENU_CREDITS3, MA_Return, MENU_CREDITS5, MA_Advance, };
1498
static MenuPanel_t M_CREDITS4 = { "About " APPNAME, MENU_CREDITS3, MA_Return, MENU_CREDITS5, MA_Advance, };
1499
static MenuPanel_t M_CREDITS5 = { "About " APPNAME, MENU_CREDITS4, MA_Return, MENU_CREDITS, MA_Advance, };
1499
static MenuPanel_t M_CREDITS5 = { "About " APPNAME, MENU_CREDITS4, MA_Return, MENU_CREDITS, MA_Advance, };
1500
1500
1501
#define CURSOR_CENTER_2LINE { MENU_MARGIN_CENTER<<16, 120<<16, }
1501
#define CURSOR_CENTER_2LINE { MENU_MARGIN_CENTER<<16, 120<<16, }
1502
#define CURSOR_CENTER_3LINE { MENU_MARGIN_CENTER<<16, 129<<16, }
1502
#define CURSOR_CENTER_3LINE { MENU_MARGIN_CENTER<<16, 129<<16, }
1503
#define CURSOR_BOTTOMRIGHT { 304<<16, 186<<16, }
1503
#define CURSOR_BOTTOMRIGHT { 304<<16, 186<<16, }
1504
1504
1505
static MenuVerify_t M_SAVECLEANVERIFY = { CURSOR_CENTER_3LINE, MENU_SAVESETUP, MA_None, };
1505
static MenuVerify_t M_SAVECLEANVERIFY = { CURSOR_CENTER_3LINE, MENU_SAVESETUP, MA_None, };
1506
static MenuVerify_t M_RESETSTATSVERIFY = { CURSOR_CENTER_3LINE, MENU_SAVESETUP, MA_None, };
1506
static MenuVerify_t M_RESETSTATSVERIFY = { CURSOR_CENTER_3LINE, MENU_SAVESETUP, MA_None, };
1507
static MenuVerify_t M_QUIT = { CURSOR_CENTER_2LINE, MENU_CLOSE, MA_None, };
1507
static MenuVerify_t M_QUIT = { CURSOR_CENTER_2LINE, MENU_CLOSE, MA_None, };
1508
static MenuVerify_t M_QUITTOTITLE = { CURSOR_CENTER_2LINE, MENU_CLOSE, MA_None, };
1508
static MenuVerify_t M_QUITTOTITLE = { CURSOR_CENTER_2LINE, MENU_CLOSE, MA_None, };
1509
static MenuVerify_t M_LOADVERIFY = { CURSOR_CENTER_3LINE, MENU_CLOSE, MA_None, };
1509
static MenuVerify_t M_LOADVERIFY = { CURSOR_CENTER_3LINE, MENU_CLOSE, MA_None, };
1510
static MenuVerify_t M_LOADDELVERIFY = { CURSOR_CENTER_3LINE, MENU_LOAD, MA_None, };
1510
static MenuVerify_t M_LOADDELVERIFY = { CURSOR_CENTER_3LINE, MENU_LOAD, MA_None, };
1511
static MenuVerify_t M_NEWVERIFY = { CURSOR_CENTER_2LINE, MENU_EPISODE, MA_Advance, };
1511
static MenuVerify_t M_NEWVERIFY = { CURSOR_CENTER_2LINE, MENU_EPISODE, MA_Advance, };
1512
static MenuVerify_t M_SAVEVERIFY = { CURSOR_CENTER_2LINE, MENU_SAVE, MA_None, };
1512
static MenuVerify_t M_SAVEVERIFY = { CURSOR_CENTER_2LINE, MENU_SAVE, MA_None, };
1513
static MenuVerify_t M_SAVEDELVERIFY = { CURSOR_CENTER_3LINE, MENU_SAVE, MA_None, };
1513
static MenuVerify_t M_SAVEDELVERIFY = { CURSOR_CENTER_3LINE, MENU_SAVE, MA_None, };
1514
static MenuVerify_t M_RESETPLAYER = { CURSOR_CENTER_3LINE, MENU_CLOSE, MA_None, };
1514
static MenuVerify_t M_RESETPLAYER = { CURSOR_CENTER_3LINE, MENU_CLOSE, MA_None, };
1515
1515
1516
static MenuVerify_t M_COLCORRRESETVERIFY = { CURSOR_CENTER_2LINE, MENU_COLCORR, MA_None, };
1516
static MenuVerify_t M_COLCORRRESETVERIFY = { CURSOR_CENTER_2LINE, MENU_COLCORR, MA_None, };
1517
static MenuVerify_t M_KEYSRESETVERIFY = { CURSOR_CENTER_2LINE, MENU_KEYBOARDSETUP, MA_None, };
1517
static MenuVerify_t M_KEYSRESETVERIFY = { CURSOR_CENTER_2LINE, MENU_KEYBOARDSETUP, MA_None, };
1518
static MenuVerify_t M_KEYSCLASSICVERIFY = { CURSOR_CENTER_2LINE, MENU_KEYBOARDSETUP, MA_None, };
1518
static MenuVerify_t M_KEYSCLASSICVERIFY = { CURSOR_CENTER_2LINE, MENU_KEYBOARDSETUP, MA_None, };
1519
static MenuVerify_t M_JOYSTANDARDVERIFY = { CURSOR_CENTER_2LINE, MENU_JOYSTICKSETUP, MA_None, };
1519
static MenuVerify_t M_JOYSTANDARDVERIFY = { CURSOR_CENTER_2LINE, MENU_JOYSTICKSETUP, MA_None, };
1520
static MenuVerify_t M_JOYPROVERIFY = { CURSOR_CENTER_2LINE, MENU_JOYSTICKSETUP, MA_None, };
1520
static MenuVerify_t M_JOYPROVERIFY = { CURSOR_CENTER_2LINE, MENU_JOYSTICKSETUP, MA_None, };
1521
static MenuVerify_t M_JOYCLEARVERIFY = { CURSOR_CENTER_2LINE, MENU_JOYSTICKSETUP, MA_None, };
1521
static MenuVerify_t M_JOYCLEARVERIFY = { CURSOR_CENTER_2LINE, MENU_JOYSTICKSETUP, MA_None, };
1522
1522
1523
static MenuMessage_t M_NETWAITMASTER = { CURSOR_BOTTOMRIGHT, MENU_NULL, MA_None, };
1523
static MenuMessage_t M_NETWAITMASTER = { CURSOR_BOTTOMRIGHT, MENU_NULL, MA_None, };
1524
static MenuMessage_t M_NETWAITVOTES = { CURSOR_BOTTOMRIGHT, MENU_NULL, MA_None, };
1524
static MenuMessage_t M_NETWAITVOTES = { CURSOR_BOTTOMRIGHT, MENU_NULL, MA_None, };
1525
static MenuMessage_t M_BUYDUKE = { CURSOR_BOTTOMRIGHT, MENU_EPISODE, MA_Return, };
1525
static MenuMessage_t M_BUYDUKE = { CURSOR_BOTTOMRIGHT, MENU_EPISODE, MA_Return, };
1526
1526
1527
static MenuTextForm_t M_ADULTPASSWORD = { NULL, "Enter Password:", MAXPWLOCKOUT, MTF_Password };
1527
static MenuTextForm_t M_ADULTPASSWORD = { NULL, "Enter Password:", MAXPWLOCKOUT, MTF_Password };
1528
static MenuTextForm_t M_CHEATENTRY = { NULL, "Enter Cheat Code:", MAXCHEATLEN, 0 };
1528
static MenuTextForm_t M_CHEATENTRY = { NULL, "Enter Cheat Code:", MAXCHEATLEN, 0 };
1529
static MenuTextForm_t M_CHEAT_WARP = { NULL, "Enter Warp #:", 3, 0 };
1529
static MenuTextForm_t M_CHEAT_WARP = { NULL, "Enter Warp #:", 3, 0 };
1530
static MenuTextForm_t M_CHEAT_SKILL = { NULL, "Enter Skill #:", 1, 0 };
1530
static MenuTextForm_t M_CHEAT_SKILL = { NULL, "Enter Skill #:", 1, 0 };
1531
1531
1532
#define MAKE_MENUFILESELECT(a, dir, b, c) { a, { &MMF_FileSelectLeft, &MMF_FileSelectRight }, { &MF_Minifont, &MF_Minifont }, dir, b, c, { NULL, NULL }, { 0, 0 }, { 3<<16, 3<<16 }, FNLIST_INITIALIZER, 0 }
1532
#define MAKE_MENUFILESELECT(a, dir, b, c) { a, { &MMF_FileSelectLeft, &MMF_FileSelectRight }, { &MF_Minifont, &MF_Minifont }, dir, b, c, { NULL, NULL }, { 0, 0 }, { 3<<16, 3<<16 }, FNLIST_INITIALIZER, 0 }
1533
1533
1534
static MenuFileSelect_t M_USERMAP = MAKE_MENUFILESELECT( "Select A User Map", "./usermaps/", "*.map", boardfilename );
1534
static MenuFileSelect_t M_USERMAP = MAKE_MENUFILESELECT( "Select A User Map", "./usermaps/", "*.map", boardfilename );
1535
1535
1536
static MenuFileSelect_t M_SOUND_SF2 = MAKE_MENUFILESELECT( "Select Sound Bank", "./", "*.sf2", sf2bankfile);
1536
static MenuFileSelect_t M_SOUND_SF2 = MAKE_MENUFILESELECT( "Select Sound Bank", "./", "*.sf2", sf2bankfile);
1537
1537
1538
// MUST be in ascending order of MenuID enum values due to binary search
1538
// MUST be in ascending order of MenuID enum values due to binary search
1539
static Menu_t Menus[] = {
1539
static Menu_t Menus[] = {
1540
    { &M_MAIN, MENU_MAIN, MENU_CLOSE, MA_None, Menu },
1540
    { &M_MAIN, MENU_MAIN, MENU_CLOSE, MA_None, Menu },
1541
    { &M_MAIN_INGAME, MENU_MAIN_INGAME, MENU_CLOSE, MA_None, Menu },
1541
    { &M_MAIN_INGAME, MENU_MAIN_INGAME, MENU_CLOSE, MA_None, Menu },
1542
    { &M_EPISODE, MENU_EPISODE, MENU_MAIN, MA_Return, Menu },
1542
    { &M_EPISODE, MENU_EPISODE, MENU_MAIN, MA_Return, Menu },
1543
    { &M_USERMAP, MENU_USERMAP, MENU_EPISODE, MA_Return, FileSelect },
1543
    { &M_USERMAP, MENU_USERMAP, MENU_EPISODE, MA_Return, FileSelect },
1544
    { &M_NEWGAMECUSTOM, MENU_NEWGAMECUSTOM, MENU_MAIN, MA_Return, Menu },
1544
    { &M_NEWGAMECUSTOM, MENU_NEWGAMECUSTOM, MENU_MAIN, MA_Return, Menu },
1545
    { &M_NEWGAMECUSTOMSUB, MENU_NEWGAMECUSTOMSUB, MENU_NEWGAMECUSTOM, MA_Return, Menu },
1545
    { &M_NEWGAMECUSTOMSUB, MENU_NEWGAMECUSTOMSUB, MENU_NEWGAMECUSTOM, MA_Return, Menu },
1546
    { &M_SKILL, MENU_SKILL, MENU_PREVIOUS, MA_Return, Menu },
1546
    { &M_SKILL, MENU_SKILL, MENU_PREVIOUS, MA_Return, Menu },
1547
#ifndef EDUKE32_RETAIL_MENU
1547
#ifndef EDUKE32_RETAIL_MENU
1548
    { &M_GAMESETUP, MENU_GAMESETUP, MENU_OPTIONS, MA_Return, Menu },
1548
    { &M_GAMESETUP, MENU_GAMESETUP, MENU_OPTIONS, MA_Return, Menu },
1549
#endif
1549
#endif
1550
    { &M_OPTIONS, MENU_OPTIONS, MENU_MAIN, MA_Return, Menu },
1550
    { &M_OPTIONS, MENU_OPTIONS, MENU_MAIN, MA_Return, Menu },
1551
    { &M_VIDEOSETUP, MENU_VIDEOSETUP, MENU_DISPLAYSETUP, MA_Return, Menu },
1551
    { &M_VIDEOSETUP, MENU_VIDEOSETUP, MENU_DISPLAYSETUP, MA_Return, Menu },
1552
    { &M_KEYBOARDSETUP, MENU_KEYBOARDSETUP, MENU_CONTROLS, MA_Return, Menu },
1552
    { &M_KEYBOARDSETUP, MENU_KEYBOARDSETUP, MENU_CONTROLS, MA_Return, Menu },
1553
    { &M_MOUSESETUP, MENU_MOUSESETUP, MENU_CONTROLS, MA_Return, Menu },
1553
    { &M_MOUSESETUP, MENU_MOUSESETUP, MENU_CONTROLS, MA_Return, Menu },
1554
    { &M_JOYSTICKSETUP, MENU_JOYSTICKSETUP, MENU_CONTROLS, MA_Return, Menu },
1554
    { &M_JOYSTICKSETUP, MENU_JOYSTICKSETUP, MENU_CONTROLS, MA_Return, Menu },
1555
    { &M_JOYSTICKBTNS, MENU_JOYSTICKBTNS, MENU_JOYSTICKSETUP, MA_Return, Menu },
1555
    { &M_JOYSTICKBTNS, MENU_JOYSTICKBTNS, MENU_JOYSTICKSETUP, MA_Return, Menu },
1556
    { &M_JOYSTICKAXES, MENU_JOYSTICKAXES, MENU_JOYSTICKSETUP, MA_Return, Menu },
1556
    { &M_JOYSTICKAXES, MENU_JOYSTICKAXES, MENU_JOYSTICKSETUP, MA_Return, Menu },
1557
    { &M_KEYBOARDKEYS, MENU_KEYBOARDKEYS, MENU_KEYBOARDSETUP, MA_Return, Menu },
1557
    { &M_KEYBOARDKEYS, MENU_KEYBOARDKEYS, MENU_KEYBOARDSETUP, MA_Return, Menu },
1558
    { &M_MOUSEBTNS, MENU_MOUSEBTNS, MENU_MOUSESETUP, MA_Return, Menu },
1558
    { &M_MOUSEBTNS, MENU_MOUSEBTNS, MENU_MOUSESETUP, MA_Return, Menu },
1559
    { &M_MOUSEADVANCED, MENU_MOUSEADVANCED, MENU_MOUSESETUP, MA_Return, Menu },
1559
    { &M_MOUSEADVANCED, MENU_MOUSEADVANCED, MENU_MOUSESETUP, MA_Return, Menu },
1560
    { &M_JOYSTICKAXIS, MENU_JOYSTICKAXIS, MENU_JOYSTICKAXES, MA_Return, Menu },
1560
    { &M_JOYSTICKAXIS, MENU_JOYSTICKAXIS, MENU_JOYSTICKAXES, MA_Return, Menu },
1561
#ifdef EDUKE32_ANDROID_MENU
1561
#ifdef EDUKE32_ANDROID_MENU
1562
    { &M_TOUCHSETUP, MENU_TOUCHSETUP, MENU_OPTIONS, MA_Return, Menu },
1562
    { &M_TOUCHSETUP, MENU_TOUCHSETUP, MENU_OPTIONS, MA_Return, Menu },
1563
    { &M_TOUCHSENS, MENU_TOUCHSENS, MENU_TOUCHSETUP, MA_Return, Menu },
1563
    { &M_TOUCHSENS, MENU_TOUCHSENS, MENU_TOUCHSETUP, MA_Return, Menu },
1564
    { &M_TOUCHBUTTONS, MENU_TOUCHBUTTONS, MENU_TOUCHSETUP, MA_Return, Panel },
1564
    { &M_TOUCHBUTTONS, MENU_TOUCHBUTTONS, MENU_TOUCHSETUP, MA_Return, Panel },
1565
#endif
1565
#endif
1566
    { &M_CONTROLS, MENU_CONTROLS, MENU_OPTIONS, MA_Return, Menu },
1566
    { &M_CONTROLS, MENU_CONTROLS, MENU_OPTIONS, MA_Return, Menu },
1567
#ifdef USE_OPENGL
1567
#ifdef USE_OPENGL
1568
    { &M_RENDERERSETUP_POLYMOST, MENU_POLYMOST, MENU_DISPLAYSETUP, MA_Return, Menu },
1568
    { &M_RENDERERSETUP_POLYMOST, MENU_POLYMOST, MENU_DISPLAYSETUP, MA_Return, Menu },
1569
#endif
1569
#endif
1570
    { &M_COLCORR, MENU_COLCORR, MENU_DISPLAYSETUP, MA_Return, Menu },
1570
    { &M_COLCORR, MENU_COLCORR, MENU_DISPLAYSETUP, MA_Return, Menu },
1571
    { &M_COLCORR, MENU_COLCORR_INGAME, MENU_CLOSE, MA_Return, Menu },
1571
    { &M_COLCORR, MENU_COLCORR_INGAME, MENU_CLOSE, MA_Return, Menu },
1572
    { &M_SCREENSETUP, MENU_SCREENSETUP, MENU_DISPLAYSETUP, MA_Return, Menu },
1572
    { &M_SCREENSETUP, MENU_SCREENSETUP, MENU_DISPLAYSETUP, MA_Return, Menu },
1573
    { &M_DISPLAYSETUP, MENU_DISPLAYSETUP, MENU_OPTIONS, MA_Return, Menu },
1573
    { &M_DISPLAYSETUP, MENU_DISPLAYSETUP, MENU_OPTIONS, MA_Return, Menu },
1574
#ifdef POLYMER
1574
#ifdef POLYMER
1575
    { &M_RENDERERSETUP_POLYMER, MENU_POLYMER, MENU_DISPLAYSETUP, MA_Return, Menu },
1575
    { &M_RENDERERSETUP_POLYMER, MENU_POLYMER, MENU_DISPLAYSETUP, MA_Return, Menu },
1576
#endif
1576
#endif
1577
    { &M_LOAD, MENU_LOAD, MENU_MAIN, MA_Return, Menu },
1577
    { &M_LOAD, MENU_LOAD, MENU_MAIN, MA_Return, Menu },
1578
    { &M_SAVE, MENU_SAVE, MENU_MAIN, MA_Return, Menu },
1578
    { &M_SAVE, MENU_SAVE, MENU_MAIN, MA_Return, Menu },
1579
    { &M_STORY, MENU_STORY, MENU_MAIN, MA_Return, Panel },
1579
    { &M_STORY, MENU_STORY, MENU_MAIN, MA_Return, Panel },
1580
    { &M_F1HELP, MENU_F1HELP, MENU_MAIN, MA_Return, Panel },
1580
    { &M_F1HELP, MENU_F1HELP, MENU_MAIN, MA_Return, Panel },
1581
    { &M_QUIT, MENU_QUIT, MENU_PREVIOUS, MA_Return, Verify },
1581
    { &M_QUIT, MENU_QUIT, MENU_PREVIOUS, MA_Return, Verify },
1582
    { &M_QUITTOTITLE, MENU_QUITTOTITLE, MENU_PREVIOUS, MA_Return, Verify },
1582
    { &M_QUITTOTITLE, MENU_QUITTOTITLE, MENU_PREVIOUS, MA_Return, Verify },
1583
    { &M_QUIT, MENU_QUIT_INGAME, MENU_CLOSE, MA_None, Verify },
1583
    { &M_QUIT, MENU_QUIT_INGAME, MENU_CLOSE, MA_None, Verify },
1584
    { &M_NETHOST, MENU_NETSETUP, MENU_MAIN, MA_Return, Menu },
1584
    { &M_NETHOST, MENU_NETSETUP, MENU_MAIN, MA_Return, Menu },
1585
    { &M_NETWAITMASTER, MENU_NETWAITMASTER, MENU_MAIN, MA_Return, Message },
1585
    { &M_NETWAITMASTER, MENU_NETWAITMASTER, MENU_MAIN, MA_Return, Message },
1586
    { &M_NETWAITVOTES, MENU_NETWAITVOTES, MENU_MAIN, MA_Return, Message },
1586
    { &M_NETWAITVOTES, MENU_NETWAITVOTES, MENU_MAIN, MA_Return, Message },
1587
    { &M_SOUND, MENU_SOUND, MENU_OPTIONS, MA_Return, Menu },
1587
    { &M_SOUND, MENU_SOUND, MENU_OPTIONS, MA_Return, Menu },
1588
    { &M_SOUND, MENU_SOUND_INGAME, MENU_CLOSE, MA_Return, Menu },
1588
    { &M_SOUND, MENU_SOUND_INGAME, MENU_CLOSE, MA_Return, Menu },
1589
    { &M_SOUND_DEVSETUP, MENU_SOUND_DEVSETUP, MENU_SOUND, MA_Return, Menu },
1589
    { &M_SOUND_DEVSETUP, MENU_SOUND_DEVSETUP, MENU_SOUND, MA_Return, Menu },
1590
#ifndef EDUKE32_RETAIL_MENU
1590
#ifndef EDUKE32_RETAIL_MENU
1591
    { &M_SOUND_SF2, MENU_SOUND_SF2, MENU_SOUND_DEVSETUP, MA_Return, FileSelect },
1591
    { &M_SOUND_SF2, MENU_SOUND_SF2, MENU_SOUND_DEVSETUP, MA_Return, FileSelect },
1592
#endif
1592
#endif
1593
    { &M_SAVESETUP, MENU_SAVESETUP, MENU_OPTIONS, MA_Return, Menu },
1593
    { &M_SAVESETUP, MENU_SAVESETUP, MENU_OPTIONS, MA_Return, Menu },
1594
    { &M_SAVECLEANVERIFY, MENU_SAVECLEANVERIFY, MENU_SAVESETUP, MA_None, Verify },
1594
    { &M_SAVECLEANVERIFY, MENU_SAVECLEANVERIFY, MENU_SAVESETUP, MA_None, Verify },
1595
    { &M_RESETSTATSVERIFY, MENU_RESETSTATSVERIFY, MENU_SAVESETUP, MA_None, Verify },
1595
    { &M_RESETSTATSVERIFY, MENU_RESETSTATSVERIFY, MENU_SAVESETUP, MA_None, Verify },
1596
#ifdef EDUKE32_RETAIL_MENU
1596
#ifdef EDUKE32_RETAIL_MENU
1597
    { &M_CHEATS, MENU_CHEATS, MENU_OPTIONS, MA_Return, Menu },
1597
    { &M_CHEATS, MENU_CHEATS, MENU_OPTIONS, MA_Return, Menu },
1598
#else
1598
#else
1599
    { &M_CHEATS, MENU_CHEATS, MENU_GAMESETUP, MA_Return, Menu },
1599
    { &M_CHEATS, MENU_CHEATS, MENU_GAMESETUP, MA_Return, Menu },
1600
#endif
1600
#endif
1601
    { &M_CHEATENTRY, MENU_CHEATENTRY, MENU_CHEATS, MA_None, TextForm },
1601
    { &M_CHEATENTRY, MENU_CHEATENTRY, MENU_CHEATS, MA_None, TextForm },
1602
    { &M_CHEAT_WARP, MENU_CHEAT_WARP, MENU_CHEATS, MA_None, TextForm },
1602
    { &M_CHEAT_WARP, MENU_CHEAT_WARP, MENU_CHEATS, MA_None, TextForm },
1603
    { &M_CHEAT_SKILL, MENU_CHEAT_SKILL, MENU_CHEATS, MA_None, TextForm },
1603
    { &M_CHEAT_SKILL, MENU_CHEAT_SKILL, MENU_CHEATS, MA_None, TextForm },
1604
    { &M_CREDITS, MENU_CREDITS, MENU_MAIN, MA_Return, Panel },
1604
    { &M_CREDITS, MENU_CREDITS, MENU_MAIN, MA_Return, Panel },
1605
    { &M_CREDITS2, MENU_CREDITS2, MENU_MAIN, MA_Return, Panel },
1605
    { &M_CREDITS2, MENU_CREDITS2, MENU_MAIN, MA_Return, Panel },
1606
    { &M_CREDITS3, MENU_CREDITS3, MENU_MAIN, MA_Return, Panel },
1606
    { &M_CREDITS3, MENU_CREDITS3, MENU_MAIN, MA_Return, Panel },
1607
    { &M_CREDITS4, MENU_CREDITS4, MENU_MAIN, MA_Return, Panel },
1607
    { &M_CREDITS4, MENU_CREDITS4, MENU_MAIN, MA_Return, Panel },
1608
    { &M_CREDITS5, MENU_CREDITS5, MENU_MAIN, MA_Return, Panel },
1608
    { &M_CREDITS5, MENU_CREDITS5, MENU_MAIN, MA_Return, Panel },
1609
    { &M_LOADVERIFY, MENU_LOADVERIFY, MENU_LOAD, MA_None, Verify },
1609
    { &M_LOADVERIFY, MENU_LOADVERIFY, MENU_LOAD, MA_None, Verify },
1610
    { &M_LOADDELVERIFY, MENU_LOADDELVERIFY, MENU_LOAD, MA_None, Verify },
1610
    { &M_LOADDELVERIFY, MENU_LOADDELVERIFY, MENU_LOAD, MA_None, Verify },
1611
    { &M_NEWVERIFY, MENU_NEWVERIFY, MENU_PREVIOUS, MA_Return, Verify },
1611
    { &M_NEWVERIFY, MENU_NEWVERIFY, MENU_PREVIOUS, MA_Return, Verify },
1612
    { &M_SAVEVERIFY, MENU_SAVEVERIFY, MENU_SAVE, MA_None, Verify },
1612
    { &M_SAVEVERIFY, MENU_SAVEVERIFY, MENU_SAVE, MA_None, Verify },
1613
    { &M_SAVEDELVERIFY, MENU_SAVEDELVERIFY, MENU_SAVE, MA_None, Verify },
1613
    { &M_SAVEDELVERIFY, MENU_SAVEDELVERIFY, MENU_SAVE, MA_None, Verify },
1614
    { &M_COLCORRRESETVERIFY, MENU_COLCORRRESETVERIFY, MENU_COLCORR, MA_None, Verify },
1614
    { &M_COLCORRRESETVERIFY, MENU_COLCORRRESETVERIFY, MENU_COLCORR, MA_None, Verify },
1615
    { &M_KEYSRESETVERIFY, MENU_KEYSRESETVERIFY, MENU_KEYBOARDSETUP, MA_None, Verify },
1615
    { &M_KEYSRESETVERIFY, MENU_KEYSRESETVERIFY, MENU_KEYBOARDSETUP, MA_None, Verify },
1616
    { &M_KEYSCLASSICVERIFY, MENU_KEYSCLASSICVERIFY, MENU_KEYBOARDSETUP, MA_None, Verify },
1616
    { &M_KEYSCLASSICVERIFY, MENU_KEYSCLASSICVERIFY, MENU_KEYBOARDSETUP, MA_None, Verify },
1617
    { &M_JOYSTANDARDVERIFY, MENU_JOYSTANDARDVERIFY, MENU_JOYSTICKSETUP, MA_None, Verify },
1617
    { &M_JOYSTANDARDVERIFY, MENU_JOYSTANDARDVERIFY, MENU_JOYSTICKSETUP, MA_None, Verify },
1618
    { &M_JOYPROVERIFY, MENU_JOYPROVERIFY, MENU_JOYSTICKSETUP, MA_None, Verify },
1618
    { &M_JOYPROVERIFY, MENU_JOYPROVERIFY, MENU_JOYSTICKSETUP, MA_None, Verify },
1619
    { &M_JOYCLEARVERIFY, MENU_JOYCLEARVERIFY, MENU_JOYSTICKSETUP, MA_None, Verify },
1619
    { &M_JOYCLEARVERIFY, MENU_JOYCLEARVERIFY, MENU_JOYSTICKSETUP, MA_None, Verify }