Subversion Repositories eduke32

Rev

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

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

188

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

191

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

288

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