4b825dc642cb6eb9a060e54bf8d69288fbee490494a6641b73026d662261604d7d192beae70b11dc
 
 
1
#include "system.h"
 
 
2
#include "prototyp.h"
 
 
3
#include "stratdef.h"
 
 
4
#include "userprofile.h"
 
 
5
#include "net.h"
 
 
6
#include "menus.h"
 
 
7
 
 
 
8
#define MUSIC_VOLUME_MAX               (127)
 
 
9
#define MAX_MULTIPLAYER_NAME_LENGTH     10
 
 
10
#define MAX_IPADDRESS_LENGTH         15
 
 
11
 
 
 
12
char MP_SessionName[MAX_MULTIPLAYER_NAME_LENGTH+23] = "TEST SESH";
 
 
13
char IPAddressString[MAX_IPADDRESS_LENGTH+1]= "127.0.0.1"; 
 
 
14
 
 
 
15
int MP_Species = 0;
 
 
16
int MP_GameStyle = 0;
 
 
17
int MP_LevelNumber = 0;
 
 
18
 
 
 
19
extern const char * cheat_modes[];
 
 
20
 
 
 
21
const char* game_type[] = 
 
 
22
{
 
 
23
"Deathmatch",
 
 
24
"Species Deathmatch",
 
 
25
"Last Man Standing",
 
 
26
"Predator Tag",
 
 
27
"Cooperative",
 
 
28
"Alien Tag"
 
 
29
};
 
 
30
 
 
 
31
const char * game_speed[] = { "70 %", "80 %", "90 %", "100 %" };
 
 
32
const char * no_yes[] = {"No", "Yes"};
 
 
33
const char * mouse_move_opt [] = {"Looking", "Movement"};
 
 
34
const char * mouse_move_opt2 [] = {"Sidestepping", "Turning" };
 
 
35
const char * details_level[] = { "Very Low", "Low", "Medium", "High" };
 
 
36
 
 
 
37
#define NUMBER_OF_SCREEN_SIZES 
 
 
38
const char * screen_size[NUMBER_OF_SCREEN_SIZES] = { "640x480", "800x600", "1024x768", "1152x864", "1280x960",
"1280x1024", "1600x1200" };
 
 
39
 
 
 
40
const char * player_species[] =
 
 
41
{
 
 
42
"Marine",
 
 
43
"Predator",
 
 
44
"Alien",
 
 
45
"Marine - Pulse Rifle",
 
 
46
"Marine - Smartgun",
 
 
47
"Marine - Flamethrower",
 
 
48
"Marine - Sadar",
 
 
49
"Marine - Grenade",
 
 
50
"Marine - Minigun",
 
 
51
"Marine - Skeeter",
 
 
52
"Marine - Pistols"
 
 
53
};
 
 
54
 
 
 
55
extern CONTROL_METHODS PlayerControlMethods;
 
 
56
int episode_to_play = 0;
 
 
57
 
 
 
58
static MENU_ELEMENT Menu_MainMenu[] =
 
 
59
{
 
 
60
{MENU_ELEMENT_GOTOMENU, "Single Player",    {MENU_SINGLEPLAYER},        {NULL}, {NULL}, NULL, 0},
 
 
61
{MENU_ELEMENT_GOTOMENU, "Load Game",        {MENU_LOADGAME},        {NULL}, {NULL}, NULL, 0},
 
 
62
{MENU_ELEMENT_GOTOMENU, "Options",        {MENU_OPTIONS},            {NULL}, {NULL}, NULL, 0},
 
 
63
{MENU_ELEMENT_GOTOMENU, "Multiplayer",        {MENU_MULTIPLAYER_MAINSTART},    {NULL}, {NULL}, NULL, 0},
 
 
64
{MENU_ELEMENT_QUITGAME, "Quit",            {0},                {NULL}, {NULL}, NULL, 0},
 
 
65
{MENU_ELEMENT_ENDOFMENU, NULL,            {0},                {NULL}, {NULL}, NULL, 0}
 
 
66
};
 
 
67
 
 
 
68
static MENU_ELEMENT Menu_InGame[] =
 
 
69
{
 
 
70
{MENU_ELEMENT_RESUMEGAME,    "Resume Play",        {0},                {NULL}, {NULL}, NULL, 0},
 
 
71
{MENU_ELEMENT_GOTOMENU,        "Options",        {MENU_OPTIONS},            {NULL}, {NULL}, NULL, 0},
 
 
72
{MENU_ELEMENT_QUITGAME,        "Abort Play",        {0},                {NULL}, {NULL}, NULL, 0},
 
 
73
{MENU_ELEMENT_GOTOMENU,        "Save Game",        {MENU_SAVEGAME},        {NULL}, {NULL}, NULL, 0},
 
 
74
{MENU_ELEMENT_GOTOMENU,        "Load Game",        {MENU_LOADGAME},        {NULL}, {NULL}, NULL, 0},
 
 
75
{MENU_ELEMENT_RESTARTGAME,    "Restart",        {0},                {NULL}, {NULL}, NULL, 0},
 
 
76
{MENU_ELEMENT_ENDOFMENU,    NULL,            {0},                {NULL}, {NULL}, NULL, 0}
 
 
77
};
 
 
78
 
 
 
79
static MENU_ELEMENT Menu_SinglePlayer[] =
 
 
80
{
 
 
81
{MENU_ELEMENT_SELECT_SPECIES,    "Alien",    {MENU_SELECT_EPISODE},    {NULL}, {NULL}, NULL, 0},
 
 
82
{MENU_ELEMENT_SELECT_SPECIES,    "Marine",    {MENU_SELECT_EPISODE},    {NULL}, {NULL}, NULL, 0},
 
 
83
{MENU_ELEMENT_SELECT_SPECIES,    "Predator",    {MENU_SELECT_EPISODE},    {NULL}, {NULL}, NULL, 0},
 
 
84
{MENU_ELEMENT_GOTOMENU,        "Skirmish",    {MENU_SKIRMISH},    {NULL}, {NULL}, NULL, 0},
 
 
85
{MENU_ELEMENT_ENDOFMENU,    "Bonus Options",{MENU_BONUSOPTIONS},    {NULL},    {NULL}, NULL, 0}, // enable MENU_ELEMENT_GOTOMENU
 
 
86
{MENU_ELEMENT_ENDOFMENU,    NULL,        {0},            {NULL},    {NULL}, NULL, 0}
 
 
87
};
 
 
88
 
 
 
89
static MENU_ELEMENT Menu_SelectEpisode[] =
 
 
90
{
 
 
91
{MENU_ELEMENT_SELECTEPISODE,    NULL,    {0}, {&episode_to_play},    {NULL}, NULL, 0},
 
 
92
{MENU_ELEMENT_ENDOFMENU,    NULL,    {0}, {NULL},            {NULL}, NULL, 0}
 
 
93
};
 
 
94
 
 
 
95
static MENU_ELEMENT Menu_MouseOptions[] =
 
 
96
{
 
 
97
{MENU_ELEMENT_TOGGLE_MOUSE_GRAB,"Grab Mouse",            {1},    {&UserProfile.grabmouse},    {NULL},    NULL, 0},
 
 
98
{MENU_ELEMENT_TEXTSLIDER,    "Vertical Axis",        {1},    {&PlayerControlMethods.VAxisIsMovement},        {mouse_move_opt}, NULL, 0 },
 
 
99
{MENU_ELEMENT_SLIDER,        "Vertical Sensitivity",        {DEFAULT_MOUSEY_SENSITIVITY*3},    {(int*)&PlayerControlMethods.MouseYSensitivity},
{NULL}, NULL, 0},
 
 
100
{MENU_ELEMENT_TEXTSLIDER,    "Horizontal Axis",        {1},    {&PlayerControlMethods.HAxisIsTurning},        {mouse_move_opt2}, NULL, 0},
 
 
101
{MENU_ELEMENT_SLIDER,        "Horizontal Sensitivity",    {DEFAULT_MOUSEX_SENSITIVITY*3},    {(int*)&PlayerControlMethods.MouseXSensitivity},
{NULL}, NULL, 0},
 
 
102
{MENU_ELEMENT_TEXTSLIDER,    "Invert Vertical Axis",        {1},    {&PlayerControlMethods.FlipVerticalAxis},        {no_yes}, NULL, 0},
 
 
103
{MENU_ELEMENT_TEXTSLIDER,    "Auto-centre",            {1},    {&PlayerControlMethods.AutoCentreOnMovement},    {no_yes}, NULL, 0},
 
 
104
{MENU_ELEMENT_KEYCONFIGOK,    "Use These Settings",        {MENU_INGAME},    {NULL},    {NULL}, NULL, 0},
 
 
105
{MENU_ELEMENT_RESETKEYCONFIG,    "Reset To Defaults",        {0},            {NULL},    {NULL}, NULL, 0},
 
 
106
{MENU_ELEMENT_ENDOFMENU,    NULL,                {0},            {NULL},    {NULL}, NULL, 0}
 
 
107
};
 
 
108
 
 
 
109
static MENU_ELEMENT Menu_Options[] = 
 
 
110
{
 
 
111
{MENU_ELEMENT_GOTOMENU, "Controls",    {MENU_CONTROLSOPTIONS},        {NULL}, {NULL}, NULL, 0},
 
 
112
{MENU_ELEMENT_GOTOMENU, "Audio/Video",    {MENU_AUDIOVIDEOOPTIONS},    {NULL}, {NULL}, NULL, 0},
 
 
113
{MENU_ELEMENT_GOTOMENU, "Game Options",    {MENU_GAMEOPTIONS},        {NULL}, {NULL}, NULL, 0},
 
 
114
{MENU_ELEMENT_ENDOFMENU,NULL,        {0},                {NULL},    {NULL}, NULL, 0}
 
 
115
};
 
 
116
 
 
 
117
static MENU_ELEMENT Menu_AudioVideoOptions[] = 
 
 
118
{
 
 
119
{MENU_ELEMENT_SELECT_WINDOWSIZE,"Window Size",        {0},            {NULL},        {NULL}, NULL, 0},
 
 
120
{MENU_ELEMENT_TOGGLE_FULLSCREEN,"Fullscreen ",        {1},            {&UserProfile.fullscreen},        {NULL},    NULL, 0},
 
 
121
{MENU_ELEMENT_LOADSOUNDS,    "Load sounds",        {1},            {&UserProfile.loadsounds},    {NULL}, NULL, 0},
 
 
122
{MENU_ELEMENT_SLIDER,        "Master Volume",    {VOLUME_MAX},        {&UserProfile.EffectsSoundVolume}, {NULL}, NULL, 0},
 
 
123
{MENU_ELEMENT_SLIDER,        "Music Volume",        {MUSIC_VOLUME_MAX},    {&UserProfile.music_volume}, {NULL}, NULL, 0},
 
 
124
{MENU_ELEMENT_SLIDER,         "Gamma Setting",    {255},            {&UserProfile.GammaSetting}, {NULL}, NULL, 0},
 
 
125
{MENU_ELEMENT_ENDOFMENU,    NULL,            {0}, {NULL},        {NULL}, NULL, 0}
 
 
126
};
 
 
127
 
 
 
128
static MENU_ELEMENT Menu_Multiplayer[] =
 
 
129
{
 
 
130
{MENU_ELEMENT_TEXTFIELD, "Player Name",    {NET_PLAYERNAMELENGTH-1},        {(int*)UserProfile.PlayerName}, {NULL}, NULL, 0},
 
 
131
{MENU_ELEMENT_GOTOMENU,    "Host Game",    {MENU_MULTIPLAYER_MULTIPLAYER_OR_COOP},    {NULL}, {NULL}, NULL, 0},
 
 
132
{MENU_ELEMENT_GOTOMENU, "Join Game",    {MENU_MULTIPLAYER_MAINSTART},        {NULL}, {NULL}, NULL, 0},
 
 
133
{MENU_ELEMENT_ENDOFMENU, NULL,        {0},                    {NULL},    {NULL}, NULL, 0}
 
 
134
};
 
 
135
 
 
 
136
static MENU_ELEMENT Menu_Setup_Multiplayer_Or_Coop[] =
 
 
137
{
 
 
138
{MENU_ELEMENT_TEXTSLIDER,    "Game Style",    {5},                {(int*)&netGameData.gameType},    {game_type}, NULL, 0},
 
 
139
{MENU_ELEMENT_GOTOMENU,        "Continue",    {MENU_MULTIPLAYER_HOSTSETUP},    {NULL}, {NULL}, NULL, 0},
 
 
140
{MENU_ELEMENT_ENDOFMENU,     NULL,    {0},    {NULL},                {NULL}, NULL, 0}
 
 
141
};
 
 
142
 
 
 
143
MENU_ELEMENT Menu_Multiplayer_HostSetup[] =
 
 
144
{
 
 
145
{MENU_ELEMENT_STARTMPGAME,        "Start",            {0},    {NULL},        {NULL},        NULL, 0},
 
 
146
{MENU_ELEMENT_SPECIES_TEXTSLIDER,    "Player Species",        {10},    {&MP_Species},    {player_species}, NULL, 0},
 
 
147
{MENU_ELEMENT_LEVELNAME,        "Environment",            {0},    {&netGameData.levelNumber},        {NULL}, NULL, 0},
 
 
148
{MENU_ELEMENT_RESETMPCONFIG,        "Reset To Defaults",        {0},                        {NULL}, {NULL}, NULL, 0},
 
 
149
//{MENU_ELEMENT_GOTOMENU,            "Load Configuration",        {MENU_MULTIPLAYER_LOADCONFIG},            {NULL}, {NULL}, NULL, 0},
 
 
150
//{MENU_ELEMENT_GOTOMENU,            "Save Configuration",        {MENU_MULTIPLAYER_SAVECONFIG},            {NULL}, {NULL}, NULL, 0},
 
 
151
{MENU_ELEMENT_TEXTFIELD,        "Session Name",            {MAX_MULTIPLAYER_NAME_LENGTH},            {(int*)MP_SessionName}, {NULL}, NULL, 0},
 
 
152
{MENU_ELEMENT_TEXTSLIDER,        "Game Speed",            {3},    {(int*)&netGameData.gameSpeed},        {game_speed}, NULL, 0},
 
 
153
{MENU_ELEMENT_NUMBERFIELD,        "Score Limit",            {1000000},{&netGameData.scoreLimit},        {"Points"}, "No Score
Limit", 0},
 
 
154
{MENU_ELEMENT_NUMBERFIELD,        "Time Limit",            {255},    {&netGameData.timeLimit},        {"Minutes"},"No Time
Limit", 0},
 
 
155
{MENU_ELEMENT_NUMBERFIELD,        "Invulnerability Time",        {255},    {&netGameData.invulnerableTime},    {"Seconds"}, NULL, 0}, 
 
 
156
{MENU_ELEMENT_NUMBERFIELD,        "Max Predators",        {8},    {&netGameData.maxPredator},        {NULL}, NULL, 0},
 
 
157
{MENU_ELEMENT_NUMBERFIELD,        "Max Aliens",            {8},    {&netGameData.maxAlien},        {NULL}, NULL, 0},
 
 
158
{MENU_ELEMENT_NUMBERFIELD,        "Max Marines",            {8},    {&netGameData.maxMarine},        {NULL}, NULL, 0},
 
 
159
{MENU_ELEMENT_NUMBERFIELD,        "Max Standard Marines",        {8},    {&netGameData.maxMarineGeneral},    {NULL}, NULL, 0},
 
 
160
{MENU_ELEMENT_NUMBERFIELD,        "Max Pulse Rifle Marines",    {8},    {&netGameData.maxMarinePulseRifle},    {NULL}, NULL, 0},
 
 
161
{MENU_ELEMENT_NUMBERFIELD,        "Max Smartgun Marines",        {8},    {&netGameData.maxMarineSmartgun},    {NULL}, NULL, 0},
 
 
162
{MENU_ELEMENT_NUMBERFIELD,        "Max Flamer Marines",        {8},    {&netGameData.maxMarineFlamer},        {NULL}, NULL, 0},
 
 
163
{MENU_ELEMENT_NUMBERFIELD,        "Max Sadar Marines",        {8},    {&netGameData.maxMarineSadar},        {NULL}, NULL, 0},
 
 
164
{MENU_ELEMENT_NUMBERFIELD,        "Max Grenade Marines",        {8},    {&netGameData.maxMarineGrenade},    {NULL}, NULL, 0},
 
 
165
{MENU_ELEMENT_NUMBERFIELD,        "Max Minigun Marines",        {8},    {&netGameData.maxMarineMinigun},    {NULL}, NULL, 0},
 
 
166
{MENU_ELEMENT_NUMBERFIELD,        "Max Skeeter Marines",        {8},    {&netGameData.maxMarineSmartDisc},    {NULL}, NULL, 0},
 
 
167
{MENU_ELEMENT_NUMBERFIELD,        "Max Twin Pistol Marines",    {8},    {&netGameData.maxMarinePistols},    {NULL}, NULL, 0},
 
 
168
{MENU_ELEMENT_TEXTSLIDER,        "Allow Smartgun",        {1},    {&netGameData.allowSmartgun},        {no_yes}, NULL, 0},
 
 
169
{MENU_ELEMENT_TEXTSLIDER,        "Allow Flamethrower",        {1},    {&netGameData.allowFlamer},        {no_yes}, NULL, 0},
 
 
170
{MENU_ELEMENT_TEXTSLIDER,        "Allow Sadar",            {1},    {&netGameData.allowSadar},        {no_yes}, NULL, 0},
 
 
171
{MENU_ELEMENT_TEXTSLIDER,        "Allow Grenade Launcher",    {1},    {&netGameData.allowGrenadeLauncher},    {no_yes}, NULL, 0},
 
 
172
{MENU_ELEMENT_TEXTSLIDER,        "Allow Minigun",        {1},    {&netGameData.allowMinigun},        {no_yes}, NULL, 0},
 
 
173
{MENU_ELEMENT_TEXTSLIDER,        "Allow Skeeter",        {1},    {&netGameData.allowSmartDisc},        {no_yes}, NULL, 0},
 
 
174
{MENU_ELEMENT_TEXTSLIDER,        "Allow Marine Pistols",        {1},    {&netGameData.allowPistols},        {no_yes}, NULL, 0},
 
 
175
{MENU_ELEMENT_TEXTSLIDER,        "Allow Disc",            {1},    {&netGameData.allowDisc},        {no_yes}, NULL, 0},
 
 
176
{MENU_ELEMENT_TEXTSLIDER,        "Allow Predator Pistol",    {1},    {&netGameData.allowPistol},        {no_yes}, NULL, 0},
 
 
177
{MENU_ELEMENT_TEXTSLIDER,        "Allow Shoulder Cannon",    {1},    {&netGameData.allowPlasmaCaster},    {no_yes}, NULL, 0},
 
 
178
{MENU_ELEMENT_TEXTSLIDER,        "Allow Speargun",        {1},    {&netGameData.allowSpeargun},        {no_yes}, NULL, 0},
 
 
179
{MENU_ELEMENT_TEXTSLIDER,        "Allow Medicomp",        {1},    {&netGameData.allowMedicomp},        {no_yes}, NULL, 0},
 
 
180
{MENU_ELEMENT_TEXTSLIDER,        "Use Dynamic Scoring",        {1},    {&netGameData.useDynamicScoring},    {no_yes}, NULL, 0},
 
 
181
{MENU_ELEMENT_TEXTSLIDER,        "Use Species Scoring",        {1},    {&netGameData.useCharacterKillValues},    {no_yes}, NULL, 0},
 
 
182
{MENU_ELEMENT_NUMBERFIELD,        "Base Kill Value",        {255},    {&netGameData.baseKillValue},                {"Points"}, NULL, 0},
 
 
183
{MENU_ELEMENT_NUMBERFIELD,        "Alien Value",            {255},    {&netGameData.characterKillValues[NGCT_Alien]},        {NULL}, NULL, 0},
 
 
184
{MENU_ELEMENT_NUMBERFIELD,        "Marine Value",            {255},    {&netGameData.characterKillValues[NGCT_Marine]},    {NULL}, NULL, 0},
 
 
185
{MENU_ELEMENT_NUMBERFIELD,        "Predator Value",        {255},    {&netGameData.characterKillValues[NGCT_Predator]},    {NULL}, NULL, 0},
 
 
186
{MENU_ELEMENT_NUMBERFIELD,        "AI Alien Value",        {255},    {&netGameData.aiKillValues[0]},        {"Points"}, NULL, 0},
 
 
187
{MENU_ELEMENT_NUMBERFIELD,        "AI Predalien Value",        {255},    {&netGameData.aiKillValues[1]},        {"Points"}, NULL, 0},
 
 
188
{MENU_ELEMENT_NUMBERFIELD,        "AI Praetorian Value",        {255},    {&netGameData.aiKillValues[2]},        {"Points"}, NULL, 0},
 
 
189
{MENU_ELEMENT_NUMBERFIELD,        "Lives",            {255},    {&netGameData.maxLives},        {NULL},    "Infinite", 0},
 
 
190
{MENU_ELEMENT_TEXTSLIDER,        "Use Shared Lives",        {1},    {&netGameData.useSharedLives},        {no_yes}, NULL, 0},
 
 
191
{MENU_ELEMENT_NUMBERFIELD,        "Object Respawn Score",{1000000},{&netGameData.pointsForRespawn},    {"Points"},"No Score Based
Respawn", 0},
 
 
192
{MENU_ELEMENT_NUMBERFIELD,        "Object Respawn Time",    {255},    {&netGameData.timeForRespawn},    {"Seconds"},"No Time Based
Respawn", 0},
 
 
193
{MENU_ELEMENT_TEXTSLIDER,        "Pre-Destroy Lights",        {1},    {&netGameData.preDestroyLights},    {no_yes}, NULL, 0},
 
 
194
{MENU_ELEMENT_TEXTSLIDER,        "Disable Friendly Fire",    {1},    {&netGameData.disableFriendlyFire},    {no_yes}, NULL, 0},
 
 
195
{MENU_ELEMENT_TEXTSLIDER,        "Falling Damage",        {1},    {&netGameData.fallingDamage},        {no_yes}, NULL, 0},
 
 
196
{MENU_ELEMENT_TEXTSLIDER,        "Pistols Have Infinite Ammo",    {1},    {&netGameData.pistolInfiniteAmmo},    {no_yes}, NULL, 0},
 
 
197
{MENU_ELEMENT_TEXTSLIDER,        "Specialists Have Pistols",    {1},    {&netGameData.specialistPistols},    {no_yes}, NULL, 0},
 
 
198
{MENU_ELEMENT_ENDOFMENU,        NULL,                {0},    {NULL},                    {NULL},        NULL, 0}
 
 
199
};
 
 
200
 
 
 
201
MENU_ELEMENT Menu_Skirmish[] =
 
 
202
{
 
 
203
{MENU_ELEMENT_STARTSKIRMISH,        "Start",            {0},    {NULL},                    {NULL},        NULL, 0},
 
 
204
{MENU_ELEMENT_SPECIES_TEXTSLIDER,    "Player Species",        {10},    {&MP_Species},                {player_species}, NULL, 0},
 
 
205
{MENU_ELEMENT_LEVELNAME,        "Environment",            {0},    {&netGameData.levelNumber},        {NULL},         NULL, 0},
 
 
206
{MENU_ELEMENT_TEXTFIELD,        "Player Name",            {NET_PLAYERNAMELENGTH-1},            {(int*)UserProfile.PlayerName},    {NULL}, NULL, 0},
 
 
207
{MENU_ELEMENT_TEXTSLIDER,        "Game Speed",            {3},    {(int*)&netGameData.gameSpeed},        {game_speed},    NULL, 0},
 
 
208
{MENU_ELEMENT_NUMBERFIELD,        "Score Limit",            {1000000},{&netGameData.scoreLimit},        {"Points"},    "No Score
Limit", 0},
 
 
209
{MENU_ELEMENT_NUMBERFIELD,        "Time Limit",            {255},    {&netGameData.timeLimit},        {"Minutes"},    "No Time
Limit", 0},
 
 
210
{MENU_ELEMENT_NUMBERFIELD,        "Invulnerability Time",        {255},    {&netGameData.invulnerableTime},    {"Seconds"},    NULL, 0},
 
 
211
{MENU_ELEMENT_TEXTSLIDER,        "Allow Smartgun",        {1},    {&netGameData.allowSmartgun},        {no_yes},    NULL, 0},
 
 
212
{MENU_ELEMENT_TEXTSLIDER,        "Allow Flamethrower",        {1},    {&netGameData.allowFlamer},        {no_yes},    NULL, 0},
 
 
213
{MENU_ELEMENT_TEXTSLIDER,        "Allow Sadar",            {1},    {&netGameData.allowSadar},        {no_yes},    NULL, 0},
 
 
214
{MENU_ELEMENT_TEXTSLIDER,        "Allow Grenade Launcher",    {1},    {&netGameData.allowGrenadeLauncher},    {no_yes},    NULL, 0},
 
 
215
{MENU_ELEMENT_TEXTSLIDER,        "Allow Minigun",        {1},    {&netGameData.allowMinigun},        {no_yes},    NULL, 0},
 
 
216
{MENU_ELEMENT_TEXTSLIDER,        "Allow Skeeter",        {1},    {&netGameData.allowSmartDisc},        {no_yes},    NULL, 0},
 
 
217
{MENU_ELEMENT_TEXTSLIDER,        "Allow Marine Pistols",        {1},    {&netGameData.allowPistols},        {no_yes},    NULL, 0},
 
 
218
{MENU_ELEMENT_TEXTSLIDER,        "Allow Disc",            {1},    {&netGameData.allowDisc},        {no_yes},    NULL, 0},
 
 
219
{MENU_ELEMENT_TEXTSLIDER,        "Allow Predator Pistol",    {1},    {&netGameData.allowPistol},        {no_yes},    NULL, 0},
 
 
220
{MENU_ELEMENT_TEXTSLIDER,        "Allow Shoulder Cannon",    {1},    {&netGameData.allowPlasmaCaster},    {no_yes},    NULL, 0},
 
 
221
{MENU_ELEMENT_TEXTSLIDER,        "Allow Speargun",        {1},    {&netGameData.allowSpeargun},        {no_yes},    NULL, 0},
 
 
222
{MENU_ELEMENT_TEXTSLIDER,        "Allow Medicomp",        {1},    {&netGameData.allowMedicomp},        {no_yes},    NULL, 0},
 
 
223
{MENU_ELEMENT_NUMBERFIELD,        "Base Kill Value",        {255},    {&netGameData.baseKillValue},        {"Points"},    NULL, 0},
 
 
224
{MENU_ELEMENT_NUMBERFIELD,        "AI Alien Value",        {255},    {&netGameData.aiKillValues[0]},        {"Points"},    NULL, 0},
 
 
225
{MENU_ELEMENT_NUMBERFIELD,        "AI Predalien Value",        {255},    {&netGameData.aiKillValues[1]},        {"Points"},    NULL, 0},
 
 
226
{MENU_ELEMENT_NUMBERFIELD,        "AI Praetorian Value",        {255},    {&netGameData.aiKillValues[2]},        {"Points"},    NULL,
0},
 
 
227
{MENU_ELEMENT_NUMBERFIELD,        "Lives",            {255},    {&netGameData.maxLives},        {0},        "Infinite", 0},
 
 
228
{MENU_ELEMENT_NUMBERFIELD,        "Object Respawn Score",        {1000000},    {&netGameData.pointsForRespawn},{"Points"},    "No
Score Based Respawn", 0},
 
 
229
{MENU_ELEMENT_NUMBERFIELD,        "Object Respawn Time",        {255},    {&netGameData.timeForRespawn},        {"Seconds"},    "No
Time Based Respawn", 0},
 
 
230
{MENU_ELEMENT_TEXTSLIDER,        "Pre-Destroy Lights",        {1},    {&netGameData.preDestroyLights},    {no_yes},    NULL, 0},
 
 
231
{MENU_ELEMENT_TEXTSLIDER,        "Falling Damage",        {1},    {&netGameData.fallingDamage},        {no_yes},    NULL, 0},
 
 
232
{MENU_ELEMENT_TEXTSLIDER,        "Pistols Have Infinite Ammo",    {1},    {&netGameData.pistolInfiniteAmmo},    {no_yes},    NULL, 0},
 
 
233
{MENU_ELEMENT_TEXTSLIDER,        "Specialists Have Pistols",    {1},    {&netGameData.specialistPistols},    {no_yes},    NULL, 0},
 
 
234
{MENU_ELEMENT_RESETMPCONFIG,        "Reset To Defaults",        {0},    {NULL},                    {NULL},     NULL, 0},
 
 
235
{MENU_ELEMENT_ENDOFMENU,        NULL,                {0},    {NULL},                    {NULL},        NULL, 0}
 
 
236
};
 
 
237
 
 
 
238
char MP_Config_Name[22];
 
 
239
char MP_Config_Description[202]="";
 
 
240
 
 
 
241
static MENU_ELEMENT Menu_Multiplayer_SaveConfig[] =
 
 
242
{
 
 
243
{MENU_ELEMENT_TEXTFIELD,         "Filename",    {20},                {(int*)MP_Config_Name},        {NULL}, NULL, 0},
 
 
244
{MENU_ELEMENT_TEXTFIELD_SMALLWRAPPED,     "Description",    {200},                    {(int*)MP_Config_Description},    {NULL}, NULL, 0},
 
 
245
//{MENU_ELEMENT_SAVEMPCONFIG,        "Save",        {MENU_MULTIPLAYER_CONFIG},        {NULL},                {NULL}, NULL, 0},
 
 
246
{MENU_ELEMENT_ENDOFMENU,        NULL,        {0},                    {NULL},                {NULL},    NULL, 0}
 
 
247
};
 
 
248
 
 
 
249
static MENU_ELEMENT Menu_KeyConfig[NUMBER_OF_PREDATOR_INPUTS + 2];
 
 
250
 
 
 
251
static MENU_ELEMENT Menu_Controls[] =
 
 
252
{
 
 
253
{MENU_ELEMENT_GOTOMENU,    "Mouse Configuration",        {MENU_MOUSEOPTIONS},        {NULL}, {NULL}, NULL, 0 },
 
 
254
{MENU_ELEMENT_GOTOMENU,    "Alien Key Configuration",    {MENU_ALIENKEYCONFIG},        {NULL}, {NULL}, NULL, 0 },
 
 
255
{MENU_ELEMENT_GOTOMENU,    "Marine Key Configuration",    {MENU_MARINEKEYCONFIG},        {NULL}, {NULL}, NULL, 0 },
 
 
256
{MENU_ELEMENT_GOTOMENU,    "Predator Key Configuration",    {MENU_PREDATORKEYCONFIG},    {NULL}, {NULL}, NULL, 0 },
 
 
257
{MENU_ELEMENT_ENDOFMENU,NULL,                {0},                {NULL}, {NULL}, NULL, 0 }
 
 
258
};
 
 
259
 
 
 
260
static MENU_ELEMENT Menu_DifficultyLevelSelect[] =
 
 
261
{
 
 
262
{MENU_ELEMENT_DIFFICULTYLEVEL,    "Easy",        {0}, {NULL}, {NULL}, NULL, 0 },
 
 
263
{MENU_ELEMENT_DIFFICULTYLEVEL,    "Medium",    {0}, {NULL}, {NULL}, NULL, 0 },
 
 
264
{MENU_ELEMENT_DIFFICULTYLEVEL,    "Hard",        {0}, {NULL}, {NULL}, NULL, 0 },
 
 
265
{MENU_ELEMENT_ENDOFMENU,    NULL,        {0}, {NULL}, {NULL}, NULL, 0 }
 
 
266
};
 
 
267
 
 
 
268
static MENU_ELEMENT Menu_BriefingBonus[] =
 
 
269
{
 
 
270
{MENU_ELEMENT_DIFFICULTYLEVEL,    "Start",    {0}, {NULL}, {NULL}, NULL, 0 },
 
 
271
{MENU_ELEMENT_ENDOFMENU,    NULL,        {0}, {NULL}, {NULL}, NULL, 0 }
 
 
272
};
 
 
273
 
 
 
274
static MENU_ELEMENT Menu_CheatOptions[] =
 
 
275
{
 
 
276
{MENU_ELEMENT_CHEATMODE_TEXTSLIDER,            "Cheat Mode",        {MAX_NUMBER_OF_CHEATMODES-1},        {&UserProfile.active_bonus},       
{cheat_modes}, NULL, 0},
 
 
277
{MENU_ELEMENT_CHEATMODE_SPECIES_TEXTSLIDER,        "Player Species",    {2},                    {&CheatMode_Species},        {player_species},
NULL, 0},
 
 
278
{MENU_ELEMENT_CHEATMODE_ENVIRONMENT_TEXTSLIDER,        "Environment",       
{(MAX_NO_OF_MARINE_EPISODES+MAX_NO_OF_PREDATOR_EPISODES+MAX_NO_OF_ALIEN_EPISODES-1)},    {&CheatMode_Environment}, {NULL}, NULL, 0},
 
 
279
{MENU_ELEMENT_STARTLEVELWITHCHEAT,            "Start",        {0}, {NULL}, {NULL}, NULL, 0 },
 
 
280
{MENU_ELEMENT_ENDOFMENU,                NULL,            {0}, {NULL}, {NULL}, NULL, 0 }
 
 
281
};
 
 
282
 
 
 
283
static MENU_ELEMENT Menu_GameOptions[] =
 
 
284
{
 
 
285
{MENU_ELEMENT_TEXTSLIDER,    "Map Prelighting",        {1},    {&UserProfile.GameOptions.MapPrelighting},        {no_yes}, NULL, 0},
 
 
286
{MENU_ELEMENT_TEXTSLIDER,    "All Lights Destructable",    {1},    {&UserProfile.GameOptions.AllLightsDestructable},    {no_yes}, NULL, 0},
 
 
287
{MENU_ELEMENT_TEXTSLIDER,    "Decals On Characters",        {1},    {&UserProfile.GameOptions.DecalsOnCharacters},        {no_yes}, NULL, 0},
 
 
288
{MENU_ELEMENT_TEXTSLIDER,    "Blood Collides With Environment",{1},    {&UserProfile.GameOptions.BloodCollidesWithEnvironment},{no_yes}, NULL, 0},
 
 
289
{MENU_ELEMENT_TEXTSLIDER,    "Light Coronas",        {1},    {&UserProfile.GameOptions.LightCoronas},        {no_yes}, NULL, 0},
 
 
290
{MENU_ELEMENT_TEXTSLIDER,    "Complex Particle Effects",    {1},    {&UserProfile.GameOptions.ParticleComplexity},        {no_yes}, NULL, 0},
 
 
291
{MENU_ELEMENT_TEXTSLIDER,    "Character Complexity",        {3},    {&UserProfile.GameOptions.CharacterComplexity},        {details_level}, NULL,
0},
 
 
292
{MENU_ELEMENT_NUMBERFIELD,    "Number of Decals",        {MAX_NO_OF_DECALS},    {&UserProfile.GameOptions.NumberOfDecals},    {NULL},    NULL, 0},
 
 
293
{MENU_ELEMENT_NUMBERFIELD,    "None Blood Particles",        {MAX_NO_OF_PARTICLES},    {&UserProfile.GameOptions.NoneBloodParticles},    {NULL},  
NULL, 0},
 
 
294
{MENU_ELEMENT_NUMBERFIELD,    "Blood Particles",        {MAX_NO_OF_BLOOD_PARTICLES},    {&UserProfile.GameOptions.BloodParticles},    {NULL},   
NULL, 0},
 
 
295
{MENU_ELEMENT_ENDOFMENU,    NULL,                {0},    {NULL},                        {NULL},            NULL, 0 }
 
 
296
};
 
 
297
 
 
 
298
static MENU_ELEMENT Menu_LoadGame[] =
 
 
299
{
 
 
300
    {MENU_ELEMENT_LOADGAME, NULL, {0}, {NULL}, {NULL}, NULL, 0 },
 
 
301
    {MENU_ELEMENT_LOADGAME, NULL, {0}, {NULL}, {NULL}, NULL, 0 },
 
 
302
    {MENU_ELEMENT_LOADGAME, NULL, {0}, {NULL}, {NULL}, NULL, 0 },
 
 
303
    {MENU_ELEMENT_LOADGAME, NULL, {0}, {NULL}, {NULL}, NULL, 0 },
 
 
304
    {MENU_ELEMENT_LOADGAME, NULL, {0}, {NULL}, {NULL}, NULL, 0 },
 
 
305
    {MENU_ELEMENT_LOADGAME, NULL, {0}, {NULL}, {NULL}, NULL, 0 },
 
 
306
    {MENU_ELEMENT_LOADGAME, NULL, {0}, {NULL}, {NULL}, NULL, 0 },
 
 
307
    {MENU_ELEMENT_LOADGAME, NULL, {0}, {NULL}, {NULL}, NULL, 0 },
 
 
308
    {MENU_ELEMENT_ENDOFMENU, NULL, {0}, {NULL}, {NULL}, NULL, 0 }
 
 
309
};
 
 
310
 
 
 
311
static MENU_ELEMENT Menu_SaveGame[] =
 
 
312
{
 
 
313
    {MENU_ELEMENT_SAVEGAME, NULL, {0}, {NULL}, {NULL}, NULL, 0 },
 
 
314
    {MENU_ELEMENT_SAVEGAME, NULL, {0}, {NULL}, {NULL}, NULL, 0 },
 
 
315
    {MENU_ELEMENT_SAVEGAME, NULL, {0}, {NULL}, {NULL}, NULL, 0 },
 
 
316
    {MENU_ELEMENT_SAVEGAME, NULL, {0}, {NULL}, {NULL}, NULL, 0 },
 
 
317
    {MENU_ELEMENT_SAVEGAME, NULL, {0}, {NULL}, {NULL}, NULL, 0 },
 
 
318
    {MENU_ELEMENT_SAVEGAME, NULL, {0}, {NULL}, {NULL}, NULL, 0 },
 
 
319
    {MENU_ELEMENT_SAVEGAME, NULL, {0}, {NULL}, {NULL}, NULL, 0 },
 
 
320
    {MENU_ELEMENT_SAVEGAME, NULL, {0}, {NULL}, {NULL}, NULL, 0 },
 
 
321
    {MENU_ELEMENT_ENDOFMENU, NULL, {0}, {NULL}, {NULL}, NULL, 0 }
 
 
322
};
 
 
323
 
 
 
324
MENU MenusData[] = 
 
 
325
{
 
 
326
{MENU_FONT_BIG,        Menu_MainMenu,            MENU_MAIN},
 
 
327
    {MENU_FONT_BIG,            Menu_SinglePlayer,        MENU_MAIN},
 
 
328
        {MENU_FONT_BIG,        Menu_SelectEpisode,        MENU_SINGLEPLAYER},
 
 
329
            {MENU_FONT_BIG,    Menu_DifficultyLevelSelect,    MENU_SELECT_EPISODE},
 
 
330
            {MENU_FONT_BIG,    Menu_BriefingBonus,         MENU_SELECT_EPISODE},
 
 
331
        {MENU_FONT_SMALL,    Menu_Skirmish,            MENU_SINGLEPLAYER},
 
 
332
        {MENU_FONT_BIG,        Menu_CheatOptions,        MENU_SINGLEPLAYER},
 
 
333
    {MENU_FONT_SMALL,        Menu_LoadGame,            MENU_MAIN},
 
 
334
    {MENU_FONT_SMALL,        Menu_Options,            MENU_MAIN},
 
 
335
        {MENU_FONT_SMALL,    Menu_AudioVideoOptions,         MENU_OPTIONS},
 
 
336
        {MENU_FONT_SMALL,    Menu_GameOptions,        MENU_OPTIONS},
 
 
337
        {MENU_FONT_BIG,        Menu_Controls,            MENU_OPTIONS},
 
 
338
            {MENU_FONT_SMALL,    Menu_MouseOptions,        MENU_CONTROLSOPTIONS},
 
 
339
            {MENU_FONT_SMALL,    Menu_KeyConfig,            MENU_CONTROLSOPTIONS},
 
 
340
            {MENU_FONT_SMALL,    Menu_KeyConfig,            MENU_CONTROLSOPTIONS},
 
 
341
            {MENU_FONT_SMALL,    Menu_KeyConfig,            MENU_CONTROLSOPTIONS},
 
 
342
    {MENU_FONT_BIG,                Menu_Multiplayer,        MENU_MAIN},
 
 
343
        {MENU_FONT_BIG,        Menu_Setup_Multiplayer_Or_Coop,    MENU_MULTIPLAYER_MAINSTART},
 
 
344
            {MENU_FONT_BIG,        Menu_Multiplayer_HostSetup,    MENU_MULTIPLAYER_MULTIPLAYER_OR_COOP},
 
 
345
 
 
 
346
{MENU_FONT_SMALL,            Menu_InGame,            MENU_INGAME},
 
 
347
    {MENU_FONT_SMALL,        Menu_SaveGame,            MENU_INGAME}
 
 
348
};
 
 
349
 
 
 
350
void MakeOptionsMenu(int ingame)
 
 
351
{
 
 
352
    /* KJL 14:51:28 06/11/98 - set the only available key config to be that of the player's current character */
 
 
353
    /*Adjust both variants of the menu -Richard*/
 
 
354
 
 
 
355
    //in a multiplayer game set up a menu without the restart/load/save option
 
 
356
    Menu_InGame[3].ElementID = (SinglePlayer == AvP.PlayMode) ? MENU_ELEMENT_GOTOMENU : MENU_ELEMENT_ENDOFMENU;
 
 
357
 
 
 
358
    if(ingame)
 
 
359
    {
 
 
360
        MenusData[MENU_LOADGAME].ParentMenu = MENU_INGAME;
 
 
361
        MenusData[MENU_OPTIONS].ParentMenu = MENU_INGAME;
 
 
362
        Menu_Controls[2].ElementID = MENU_ELEMENT_ENDOFMENU;
 
 
363
 
 
 
364
        switch (AvP.PlayerType)
 
 
365
        {
 
 
366
            case I_Marine:
 
 
367
            {
 
 
368
                Menu_Controls[1].menu_name = "Marine Key Configuration";
 
 
369
                Menu_Controls[1].b.MenuToGoTo = MENU_MARINEKEYCONFIG;
 
 
370
            }
 
 
371
            break;
 
 
372
            case I_Predator:
 
 
373
            {
 
 
374
                Menu_Controls[1].menu_name = "Predator Key Configuration";
 
 
375
                Menu_Controls[1].b.MenuToGoTo = MENU_PREDATORKEYCONFIG;
 
 
376
            }
 
 
377
            break;
 
 
378
            case I_Alien:
 
 
379
            {
 
 
380
                Menu_Controls[1].menu_name = "Alien Key Configuration";
 
 
381
                Menu_Controls[1].b.MenuToGoTo = MENU_ALIENKEYCONFIG;
 
 
382
            }
 
 
383
        }
 
 
384
    }
 
 
385
    else
 
 
386
    {
 
 
387
        MenusData[MENU_OPTIONS].ParentMenu = MENU_MAIN;
 
 
388
        MenusData[MENU_LOADGAME].ParentMenu = MENU_MAIN;
 
 
389
        Menu_Controls[1].menu_name = "Alien Key Configuration";
 
 
390
        Menu_Controls[1].b.MenuToGoTo = MENU_ALIENKEYCONFIG;
 
 
391
        Menu_Controls[2].ElementID = MENU_ELEMENT_GOTOMENU;
 
 
392
    }
 
 
393
}
 
 
394
 
 
 
395
extern const char * alien_key_description[];
 
 
396
extern const char * marine_key_description[];
 
 
397
extern const char * predator_key_description[];
 
 
398
 
 
 
399
void MakeAlienKeyConfigMenu()
 
 
400
{
 
 
401
    int j;
 
 
402
 
 
 
403
    Menu_KeyConfig[0].ElementID = MENU_ELEMENT_KEYCONFIGOK;
 
 
404
    Menu_KeyConfig[0].menu_name = "Use These Settings";
 
 
405
    Menu_KeyConfig[1].ElementID = MENU_ELEMENT_RESETKEYCONFIG;
 
 
406
    Menu_KeyConfig[1].menu_name = "Reset To Defaults";
 
 
407
 
 
 
408
    for(j=0; j < NUMBER_OF_ALIEN_INPUTS; j++)
 
 
409
    {
 
 
410
        Menu_KeyConfig[2+j].ElementID = MENU_ELEMENT_KEYCONFIG;
 
 
411
        Menu_KeyConfig[2+j].c.TextPtr = alien_key_description[j];
 
 
412
        Menu_KeyConfig[2+j].b.MenuToGoTo = MENU_MAIN;
 
 
413
    }
 
 
414
 
 
 
415
    Menu_KeyConfig[2+j].ElementID = MENU_ELEMENT_ENDOFMENU;
 
 
416
}
 
 
417
 
 
 
418
void MakeMarineKeyConfigMenu()
 
 
419
{
 
 
420
    int j;
 
 
421
 
 
 
422
    Menu_KeyConfig[0].ElementID = MENU_ELEMENT_KEYCONFIGOK;
 
 
423
    Menu_KeyConfig[0].menu_name = "Use These Settings";
 
 
424
    Menu_KeyConfig[1].ElementID = MENU_ELEMENT_RESETKEYCONFIG;
 
 
425
    Menu_KeyConfig[1].menu_name = "Reset To Defaults";
 
 
426
 
 
 
427
    for(j=0; j < NUMBER_OF_MARINE_INPUTS; j++)
 
 
428
    {
 
 
429
        Menu_KeyConfig[2+j].ElementID = MENU_ELEMENT_KEYCONFIG;
 
 
430
        Menu_KeyConfig[2+j].b.MenuToGoTo = MENU_MAIN;
 
 
431
        Menu_KeyConfig[2+j].c.TextPtr = marine_key_description[j];
 
 
432
    }
 
 
433
 
 
 
434
    //add autoweapon change option , for lack of anywhere better to put it
 
 
435
    Menu_KeyConfig[2+j].ElementID = MENU_ELEMENT_TEXTSLIDER;
 
 
436
    Menu_KeyConfig[2+j].menu_name = "Auto Weapon Change";
 
 
437
    Menu_KeyConfig[2+j].b.MaxSliderValue = 1;    
 
 
438
    Menu_KeyConfig[2+j].c.SliderValuePtr = &UserProfile.AutoWeaponChangeOn;
 
 
439
    Menu_KeyConfig[2+j].d.TextSliderStringPointer = no_yes;    
 
 
440
 
 
 
441
    Menu_KeyConfig[2+j+1].ElementID = MENU_ELEMENT_ENDOFMENU;
 
 
442
}
 
 
443
 
 
 
444
void MakePredatorKeyConfigMenu()
 
 
445
{
 
 
446
    int j;
 
 
447
 
 
 
448
    Menu_KeyConfig[0].ElementID = MENU_ELEMENT_KEYCONFIGOK;
 
 
449
    Menu_KeyConfig[0].menu_name = "Use These Settings";
 
 
450
    Menu_KeyConfig[1].ElementID = MENU_ELEMENT_RESETKEYCONFIG;
 
 
451
    Menu_KeyConfig[1].menu_name = "Reset To Defaults";
 
 
452
 
 
 
453
    for(j=0; j < NUMBER_OF_PREDATOR_INPUTS; j++)
 
 
454
    {
 
 
455
        Menu_KeyConfig[2+j].ElementID = MENU_ELEMENT_KEYCONFIG;
 
 
456
        Menu_KeyConfig[2+j].b.MenuToGoTo = MENU_MAIN;
 
 
457
        Menu_KeyConfig[2+j].c.TextPtr = predator_key_description[j];
 
 
458
    }
 
 
459
 
 
 
460
    Menu_KeyConfig[2+j].ElementID = MENU_ELEMENT_ENDOFMENU;
 
 
461
}