2016-03-31 02:38:57 +02:00
|
|
|
/* Copyright (c) 2002-2012 Croteam Ltd.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of version 2 of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation
|
|
|
|
|
2016-04-01 00:12:10 +02:00
|
|
|
|
2016-03-31 02:38:57 +02:00
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License along
|
|
|
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
|
2016-03-30 21:25:24 +02:00
|
|
|
|
|
|
|
/* This file contains starter fuctions for all menus. */
|
|
|
|
|
|
|
|
#include "StdH.h"
|
|
|
|
#include <Engine/Build.h>
|
|
|
|
|
|
|
|
#include "MenuManager.h"
|
|
|
|
#include "MenuStarters.h"
|
|
|
|
#include "MenuStartersAF.h"
|
|
|
|
#include "MenuStuff.h"
|
|
|
|
#include "LevelInfo.h"
|
|
|
|
|
|
|
|
extern void(*_pAfterLevelChosen)(void);
|
|
|
|
extern BOOL _bPlayerMenuFromSinglePlayer;
|
|
|
|
|
|
|
|
extern CTString _strLastPlayerAppearance;
|
|
|
|
extern CTString sam_strNetworkSettings;
|
|
|
|
|
|
|
|
extern CTFileName _fnmModSelected;
|
|
|
|
extern CTString _strModURLSelected;
|
|
|
|
extern CTString _strModServerSelected;
|
|
|
|
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-30 21:25:24 +02:00
|
|
|
void StartVideoOptionsMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
ChangeToMenu(&_pGUIM->gmVideoOptionsMenu);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartAudioOptionsMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
ChangeToMenu(&_pGUIM->gmAudioOptionsMenu);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartSinglePlayerMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
ChangeToMenu(&_pGUIM->gmSinglePlayerMenu);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartNetworkMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
ChangeToMenu(&_pGUIM->gmNetworkMenu);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartNetworkJoinMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
ChangeToMenu(&_pGUIM->gmNetworkJoinMenu);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartNetworkStartMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
ChangeToMenu(&_pGUIM->gmNetworkStartMenu);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartNetworkOpenMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
ChangeToMenu(&_pGUIM->gmNetworkOpenMenu);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartSplitScreenMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
ChangeToMenu(&_pGUIM->gmSplitScreenMenu);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartSplitStartMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
ChangeToMenu(&_pGUIM->gmSplitStartMenu);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartSinglePlayerNewMenuCustom(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
_pGUIM->gmSinglePlayerNewMenu.gm_pgmParentMenu = &_pGUIM->gmLevelsMenu;
|
|
|
|
ChangeToMenu(&_pGUIM->gmSinglePlayerNewMenu);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void SetQuickLoadNotes(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
if (_pShell->GetINDEX("gam_iQuickSaveSlots") <= 8) {
|
|
|
|
gmCurrent.gm_mgNotes.mg_strText = TRANS(
|
|
|
|
"In-game QuickSave shortcuts:\n"
|
|
|
|
"F6 - save a new QuickSave\n"
|
|
|
|
"F9 - load the last QuickSave\n");
|
|
|
|
} else {
|
|
|
|
gmCurrent.gm_mgNotes.mg_strText = "";
|
|
|
|
}
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
2016-03-31 19:58:27 +02:00
|
|
|
extern CTString sam_strFirstLevel;
|
|
|
|
|
2016-03-30 21:25:24 +02:00
|
|
|
void StartSinglePlayerNewMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CVarMenu &gmCurrent = _pGUIM->gmVarMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
_pGame->gam_strCustomLevel = sam_strFirstLevel;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmSinglePlayerMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// game options var settings
|
|
|
|
void StartVarGameOptions(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CVarMenu &gmCurrent = _pGUIM->gmVarMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("GAME OPTIONS");
|
|
|
|
gmCurrent.gm_fnmMenuCFG = CTFILENAME("Scripts\\Menu\\GameOptions.cfg");
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartSinglePlayerGameOptions(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CVarMenu &gmCurrent = _pGUIM->gmVarMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("GAME OPTIONS");
|
|
|
|
gmCurrent.gm_fnmMenuCFG = CTFILENAME("Scripts\\Menu\\SPOptions.cfg");
|
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmSinglePlayerMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartGameOptionsFromNetwork(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
StartVarGameOptions();
|
|
|
|
_pGUIM->gmVarMenu.gm_pgmParentMenu = &_pGUIM->gmNetworkStartMenu;
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartGameOptionsFromSplitScreen(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
StartVarGameOptions();
|
|
|
|
_pGUIM->gmVarMenu.gm_pgmParentMenu = &_pGUIM->gmSplitStartMenu;
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// rendering options var settings
|
|
|
|
void StartRenderingOptionsMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CVarMenu &gmCurrent = _pGUIM->gmVarMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("RENDERING OPTIONS");
|
|
|
|
gmCurrent.gm_fnmMenuCFG = CTFILENAME("Scripts\\Menu\\RenderingOptions.cfg");
|
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmVideoOptionsMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartCustomizeKeyboardMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
ChangeToMenu(&_pGUIM->gmCustomizeKeyboardMenu);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartCustomizeAxisMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
ChangeToMenu(&_pGUIM->gmCustomizeAxisMenu);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartOptionsMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
_pGUIM->gmOptionsMenu.gm_pgmParentMenu = pgmCurrentMenu;
|
|
|
|
ChangeToMenu(&_pGUIM->gmOptionsMenu);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartCurrentLoadMenu()
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
if (_gmRunningGameMode == GM_NETWORK) {
|
|
|
|
void StartNetworkLoadMenu(void);
|
|
|
|
StartNetworkLoadMenu();
|
|
|
|
} else if (_gmRunningGameMode == GM_SPLIT_SCREEN) {
|
|
|
|
void StartSplitScreenLoadMenu(void);
|
|
|
|
StartSplitScreenLoadMenu();
|
|
|
|
} else {
|
|
|
|
void StartSinglePlayerLoadMenu(void);
|
|
|
|
StartSinglePlayerLoadMenu();
|
|
|
|
}
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartCurrentSaveMenu()
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
if (_gmRunningGameMode == GM_NETWORK) {
|
|
|
|
void StartNetworkSaveMenu(void);
|
|
|
|
StartNetworkSaveMenu();
|
|
|
|
} else if (_gmRunningGameMode == GM_SPLIT_SCREEN) {
|
|
|
|
void StartSplitScreenSaveMenu(void);
|
|
|
|
StartSplitScreenSaveMenu();
|
|
|
|
} else {
|
|
|
|
void StartSinglePlayerSaveMenu(void);
|
|
|
|
StartSinglePlayerSaveMenu();
|
|
|
|
}
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartCurrentQuickLoadMenu()
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
if (_gmRunningGameMode == GM_NETWORK) {
|
|
|
|
void StartNetworkQuickLoadMenu(void);
|
|
|
|
StartNetworkQuickLoadMenu();
|
|
|
|
} else if (_gmRunningGameMode == GM_SPLIT_SCREEN) {
|
|
|
|
void StartSplitScreenQuickLoadMenu(void);
|
|
|
|
StartSplitScreenQuickLoadMenu();
|
|
|
|
} else {
|
|
|
|
void StartSinglePlayerQuickLoadMenu(void);
|
|
|
|
StartSinglePlayerQuickLoadMenu();
|
|
|
|
}
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartChangePlayerMenuFromOptions(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
_bPlayerMenuFromSinglePlayer = FALSE;
|
|
|
|
_pGUIM->gmPlayerProfile.gm_piCurrentPlayer = &_pGame->gm_iSinglePlayer;
|
|
|
|
_pGUIM->gmPlayerProfile.gm_pgmParentMenu = &_pGUIM->gmOptionsMenu;
|
|
|
|
ChangeToMenu(&_pGUIM->gmPlayerProfile);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartChangePlayerMenuFromSinglePlayer(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
_iLocalPlayer = -1;
|
|
|
|
_bPlayerMenuFromSinglePlayer = TRUE;
|
|
|
|
_pGUIM->gmPlayerProfile.gm_piCurrentPlayer = &_pGame->gm_iSinglePlayer;
|
|
|
|
_pGUIM->gmPlayerProfile.gm_pgmParentMenu = &_pGUIM->gmSinglePlayerMenu;
|
|
|
|
ChangeToMenu(&_pGUIM->gmPlayerProfile);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartControlsMenuFromPlayer(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
_pGUIM->gmControls.gm_pgmParentMenu = &_pGUIM->gmPlayerProfile;
|
|
|
|
ChangeToMenu(&_pGUIM->gmControls);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartControlsMenuFromOptions(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
_pGUIM->gmControls.gm_pgmParentMenu = &_pGUIM->gmOptionsMenu;
|
|
|
|
ChangeToMenu(&_pGUIM->gmControls);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartHighScoreMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
_pGUIM->gmHighScoreMenu.gm_pgmParentMenu = pgmCurrentMenu;
|
|
|
|
ChangeToMenu(&_pGUIM->gmHighScoreMenu);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartSplitScreenGame(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
// _pGame->gm_MenuSplitScreenCfg = (enum CGame::SplitScreenCfg) mgSplitScreenCfg.mg_iSelected;
|
|
|
|
_pGame->gm_StartSplitScreenCfg = _pGame->gm_MenuSplitScreenCfg;
|
2016-03-30 21:25:24 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
_pGame->gm_aiStartLocalPlayers[0] = _pGame->gm_aiMenuLocalPlayers[0];
|
|
|
|
_pGame->gm_aiStartLocalPlayers[1] = _pGame->gm_aiMenuLocalPlayers[1];
|
|
|
|
_pGame->gm_aiStartLocalPlayers[2] = _pGame->gm_aiMenuLocalPlayers[2];
|
|
|
|
_pGame->gm_aiStartLocalPlayers[3] = _pGame->gm_aiMenuLocalPlayers[3];
|
2016-03-30 21:25:24 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
CTFileName fnWorld = _pGame->gam_strCustomLevel;
|
2016-03-30 21:25:24 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
_pGame->gm_strNetworkProvider = "Local";
|
|
|
|
CUniversalSessionProperties sp;
|
|
|
|
_pGame->SetMultiPlayerSession(sp);
|
|
|
|
if (_pGame->NewGame(fnWorld.FileName(), fnWorld, sp))
|
|
|
|
{
|
|
|
|
StopMenus();
|
|
|
|
_gmRunningGameMode = GM_SPLIT_SCREEN;
|
|
|
|
} else {
|
|
|
|
_gmRunningGameMode = GM_NONE;
|
|
|
|
}
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartNetworkGame(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
// _pGame->gm_MenuSplitScreenCfg = (enum CGame::SplitScreenCfg) mgSplitScreenCfg.mg_iSelected;
|
|
|
|
_pGame->gm_StartSplitScreenCfg = _pGame->gm_MenuSplitScreenCfg;
|
|
|
|
|
|
|
|
_pGame->gm_aiStartLocalPlayers[0] = _pGame->gm_aiMenuLocalPlayers[0];
|
|
|
|
_pGame->gm_aiStartLocalPlayers[1] = _pGame->gm_aiMenuLocalPlayers[1];
|
|
|
|
_pGame->gm_aiStartLocalPlayers[2] = _pGame->gm_aiMenuLocalPlayers[2];
|
|
|
|
_pGame->gm_aiStartLocalPlayers[3] = _pGame->gm_aiMenuLocalPlayers[3];
|
|
|
|
|
|
|
|
CTFileName fnWorld = _pGame->gam_strCustomLevel;
|
|
|
|
|
|
|
|
_pGame->gm_strNetworkProvider = "TCP/IP Server";
|
|
|
|
CUniversalSessionProperties sp;
|
|
|
|
_pGame->SetMultiPlayerSession(sp);
|
|
|
|
if (_pGame->NewGame(_pGame->gam_strSessionName, fnWorld, sp))
|
|
|
|
{
|
|
|
|
StopMenus();
|
|
|
|
_gmRunningGameMode = GM_NETWORK;
|
|
|
|
// if starting a dedicated server
|
|
|
|
if (_pGame->gm_MenuSplitScreenCfg == CGame::SSC_DEDICATED) {
|
|
|
|
// pull down the console
|
|
|
|
extern INDEX sam_bToggleConsole;
|
|
|
|
sam_bToggleConsole = TRUE;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
_gmRunningGameMode = GM_NONE;
|
|
|
|
}
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
2016-03-31 18:21:46 +02:00
|
|
|
void JoinNetworkGame(void)
|
2016-03-30 21:25:24 +02:00
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
// _pGame->gm_MenuSplitScreenCfg = (enum CGame::SplitScreenCfg) mgSplitScreenCfg.mg_iSelected;
|
|
|
|
_pGame->gm_StartSplitScreenCfg = _pGame->gm_MenuSplitScreenCfg;
|
|
|
|
|
|
|
|
_pGame->gm_aiStartLocalPlayers[0] = _pGame->gm_aiMenuLocalPlayers[0];
|
|
|
|
_pGame->gm_aiStartLocalPlayers[1] = _pGame->gm_aiMenuLocalPlayers[1];
|
|
|
|
_pGame->gm_aiStartLocalPlayers[2] = _pGame->gm_aiMenuLocalPlayers[2];
|
|
|
|
_pGame->gm_aiStartLocalPlayers[3] = _pGame->gm_aiMenuLocalPlayers[3];
|
|
|
|
|
|
|
|
_pGame->gm_strNetworkProvider = "TCP/IP Client";
|
|
|
|
if (_pGame->JoinGame(CNetworkSession(_pGame->gam_strJoinAddress)))
|
|
|
|
{
|
|
|
|
StopMenus();
|
|
|
|
_gmRunningGameMode = GM_NETWORK;
|
|
|
|
} else {
|
|
|
|
if (_pNetwork->ga_strRequiredMod != "") {
|
|
|
|
extern CTFileName _fnmModToLoad;
|
|
|
|
extern CTString _strModServerJoin;
|
|
|
|
char strModName[256] = { 0 };
|
|
|
|
char strModURL[256] = { 0 };
|
|
|
|
_pNetwork->ga_strRequiredMod.ScanF("%250[^\\]\\%s", &strModName, &strModURL);
|
|
|
|
_fnmModSelected = CTString(strModName);
|
|
|
|
_strModURLSelected = strModURL;
|
|
|
|
if (_strModURLSelected = "") {
|
|
|
|
_strModURLSelected = "http://www.croteam.com/mods/Old";
|
|
|
|
}
|
|
|
|
_strModServerSelected.PrintF("%s:%s", _pGame->gam_strJoinAddress, _pShell->GetValue("net_iPort"));
|
|
|
|
extern void ModConnectConfirm(void);
|
|
|
|
ModConnectConfirm();
|
|
|
|
}
|
|
|
|
_gmRunningGameMode = GM_NONE;
|
|
|
|
}
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
2016-03-31 18:21:46 +02:00
|
|
|
// -------- Servers Menu Functions
|
|
|
|
void StartSelectServerLAN(void)
|
2016-03-30 21:25:24 +02:00
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CServersMenu &gmCurrent = _pGUIM->gmServersMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.m_bInternet = FALSE;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmNetworkJoinMenu;
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
2016-03-31 18:21:46 +02:00
|
|
|
|
|
|
|
void StartSelectServerNET(void)
|
2016-03-30 21:25:24 +02:00
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CServersMenu &gmCurrent = _pGUIM->gmServersMenu;
|
2016-03-30 21:25:24 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.m_bInternet = TRUE;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmNetworkJoinMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
}
|
2016-03-30 22:09:51 +02:00
|
|
|
|
2016-03-31 18:21:46 +02:00
|
|
|
// -------- Levels Menu Functions
|
|
|
|
void StartSelectLevelFromSingle(void)
|
2016-03-30 21:25:24 +02:00
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLevelsMenu &gmCurrent = _pGUIM->gmLevelsMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
FilterLevels(GetSpawnFlagsForGameType(-1));
|
|
|
|
_pAfterLevelChosen = StartSinglePlayerNewMenuCustom;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmSinglePlayerMenu;
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartSelectLevelFromSplit(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLevelsMenu &gmCurrent = _pGUIM->gmLevelsMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
FilterLevels(GetSpawnFlagsForGameType(_pGUIM->gmSplitStartMenu.gm_mgGameType.mg_iSelected));
|
|
|
|
void StartSplitStartMenu(void);
|
|
|
|
_pAfterLevelChosen = StartSplitStartMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmSplitStartMenu;
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartSelectLevelFromNetwork(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLevelsMenu &gmCurrent = _pGUIM->gmLevelsMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
FilterLevels(GetSpawnFlagsForGameType(_pGUIM->gmNetworkStartMenu.gm_mgGameType.mg_iSelected));
|
|
|
|
void StartNetworkStartMenu(void);
|
|
|
|
_pAfterLevelChosen = StartNetworkStartMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmNetworkStartMenu;
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
2016-03-31 18:21:46 +02:00
|
|
|
// -------- Players Selection Menu Functions
|
|
|
|
void StartSelectPlayersMenuFromSplit(void)
|
2016-03-30 21:25:24 +02:00
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CSelectPlayersMenu &gmCurrent = _pGUIM->gmSelectPlayersMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_bAllowDedicated = FALSE;
|
|
|
|
gmCurrent.gm_bAllowObserving = FALSE;
|
|
|
|
gmCurrent.gm_mgStart.mg_pActivatedFunction = &StartSplitScreenGame;
|
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmSplitStartMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-31 18:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartSelectPlayersMenuFromNetwork(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CSelectPlayersMenu &gmCurrent = _pGUIM->gmSelectPlayersMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_bAllowDedicated = TRUE;
|
|
|
|
gmCurrent.gm_bAllowObserving = TRUE;
|
|
|
|
gmCurrent.gm_mgStart.mg_pActivatedFunction = &StartNetworkGame;
|
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmNetworkStartMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartSelectPlayersMenuFromNetworkLoad(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CSelectPlayersMenu &gmCurrent = _pGUIM->gmSelectPlayersMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_bAllowDedicated = FALSE;
|
|
|
|
gmCurrent.gm_bAllowObserving = TRUE;
|
|
|
|
gmCurrent.gm_mgStart.mg_pActivatedFunction = &StartNetworkLoadGame;
|
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmLoadSaveMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartSelectPlayersMenuFromSplitScreenLoad(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CSelectPlayersMenu &gmCurrent = _pGUIM->gmSelectPlayersMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_bAllowDedicated = FALSE;
|
|
|
|
gmCurrent.gm_bAllowObserving = FALSE;
|
|
|
|
gmCurrent.gm_mgStart.mg_pActivatedFunction = &StartSplitScreenGameLoad;
|
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmLoadSaveMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
2016-03-31 18:21:46 +02:00
|
|
|
void StartSelectPlayersMenuFromOpen(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CSelectPlayersMenu &gmCurrent = _pGUIM->gmSelectPlayersMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_bAllowDedicated = FALSE;
|
|
|
|
gmCurrent.gm_bAllowObserving = TRUE;
|
|
|
|
gmCurrent.gm_mgStart.mg_pActivatedFunction = &JoinNetworkGame;
|
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmNetworkOpenMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
/*if (sam_strNetworkSettings=="")*/ {
|
|
|
|
void StartNetworkSettingsMenu(void);
|
|
|
|
StartNetworkSettingsMenu();
|
|
|
|
_pGUIM->gmLoadSaveMenu.gm_bNoEscape = TRUE;
|
|
|
|
_pGUIM->gmLoadSaveMenu.gm_pgmParentMenu = &_pGUIM->gmNetworkOpenMenu;
|
|
|
|
_pGUIM->gmLoadSaveMenu.gm_pgmNextMenu = &gmCurrent;
|
|
|
|
}
|
2016-03-31 18:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartSelectPlayersMenuFromServers(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CSelectPlayersMenu &gmCurrent = _pGUIM->gmSelectPlayersMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_bAllowDedicated = FALSE;
|
|
|
|
gmCurrent.gm_bAllowObserving = TRUE;
|
|
|
|
gmCurrent.gm_mgStart.mg_pActivatedFunction = &JoinNetworkGame;
|
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmServersMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
/*if (sam_strNetworkSettings=="")*/ {
|
|
|
|
void StartNetworkSettingsMenu(void);
|
|
|
|
StartNetworkSettingsMenu();
|
|
|
|
_pGUIM->gmLoadSaveMenu.gm_bNoEscape = TRUE;
|
|
|
|
_pGUIM->gmLoadSaveMenu.gm_pgmParentMenu = &_pGUIM->gmServersMenu;
|
|
|
|
_pGUIM->gmLoadSaveMenu.gm_pgmNextMenu = &gmCurrent;
|
|
|
|
}
|
2016-03-31 18:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// -------- Save/Load Menu Calling Functions
|
2016-03-30 21:25:24 +02:00
|
|
|
void StartPlayerModelLoadMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("CHOOSE MODEL");
|
|
|
|
gmCurrent.gm_bAllowThumbnails = TRUE;
|
|
|
|
gmCurrent.gm_iSortType = LSSORT_FILEUP;
|
|
|
|
gmCurrent.gm_bSave = FALSE;
|
|
|
|
gmCurrent.gm_bManage = FALSE;
|
|
|
|
gmCurrent.gm_fnmDirectory = CTString("Models\\Player\\");
|
|
|
|
gmCurrent.gm_fnmSelected = _strLastPlayerAppearance;
|
|
|
|
gmCurrent.gm_fnmExt = CTString(".amc");
|
|
|
|
gmCurrent.gm_pAfterFileChosen = &LSLoadPlayerModel;
|
|
|
|
gmCurrent.gm_mgNotes.mg_strText = "";
|
2016-03-30 21:25:24 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmPlayerProfile;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartControlsLoadMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;
|
2016-03-30 21:25:24 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("LOAD CONTROLS");
|
|
|
|
gmCurrent.gm_bAllowThumbnails = FALSE;
|
|
|
|
gmCurrent.gm_iSortType = LSSORT_FILEUP;
|
|
|
|
gmCurrent.gm_bSave = FALSE;
|
|
|
|
gmCurrent.gm_bManage = FALSE;
|
|
|
|
gmCurrent.gm_fnmDirectory = CTString("Controls\\");
|
|
|
|
gmCurrent.gm_fnmSelected = CTString("");
|
|
|
|
gmCurrent.gm_fnmExt = CTString(".ctl");
|
|
|
|
gmCurrent.gm_pAfterFileChosen = &LSLoadControls;
|
|
|
|
gmCurrent.gm_mgNotes.mg_strText = "";
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmControls;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartCustomLoadMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("ADVANCED OPTIONS");
|
|
|
|
gmCurrent.gm_bAllowThumbnails = FALSE;
|
|
|
|
gmCurrent.gm_iSortType = LSSORT_NAMEUP;
|
|
|
|
gmCurrent.gm_bSave = FALSE;
|
|
|
|
gmCurrent.gm_bManage = FALSE;
|
|
|
|
gmCurrent.gm_fnmDirectory = CTString("Scripts\\CustomOptions\\");
|
|
|
|
gmCurrent.gm_fnmSelected = CTString("");
|
|
|
|
gmCurrent.gm_fnmExt = CTString(".cfg");
|
|
|
|
gmCurrent.gm_pAfterFileChosen = &LSLoadCustom;
|
|
|
|
gmCurrent.gm_mgNotes.mg_strText = "";
|
2016-03-30 21:25:24 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmOptionsMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartAddonsLoadMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;
|
2016-03-30 21:25:24 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("EXECUTE ADDON");
|
|
|
|
gmCurrent.gm_bAllowThumbnails = FALSE;
|
|
|
|
gmCurrent.gm_iSortType = LSSORT_NAMEUP;
|
|
|
|
gmCurrent.gm_bSave = FALSE;
|
|
|
|
gmCurrent.gm_bManage = FALSE;
|
|
|
|
gmCurrent.gm_fnmDirectory = CTString("Scripts\\Addons\\");
|
|
|
|
gmCurrent.gm_fnmSelected = CTString("");
|
|
|
|
gmCurrent.gm_fnmExt = CTString(".ini");
|
|
|
|
gmCurrent.gm_pAfterFileChosen = &LSLoadAddon;
|
|
|
|
gmCurrent.gm_mgNotes.mg_strText = "";
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmOptionsMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartModsLoadMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("CHOOSE MOD");
|
|
|
|
gmCurrent.gm_bAllowThumbnails = TRUE;
|
|
|
|
gmCurrent.gm_iSortType = LSSORT_NAMEUP;
|
|
|
|
gmCurrent.gm_bSave = FALSE;
|
|
|
|
gmCurrent.gm_bManage = FALSE;
|
|
|
|
gmCurrent.gm_fnmDirectory = CTString("Mods\\");
|
|
|
|
gmCurrent.gm_fnmSelected = CTString("");
|
|
|
|
gmCurrent.gm_fnmExt = CTString(".des");
|
|
|
|
gmCurrent.gm_pAfterFileChosen = &LSLoadMod;
|
2016-03-30 21:25:24 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmMainMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartNetworkSettingsMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("CONNECTION SETTINGS");
|
|
|
|
gmCurrent.gm_bAllowThumbnails = FALSE;
|
|
|
|
gmCurrent.gm_iSortType = LSSORT_FILEUP;
|
|
|
|
gmCurrent.gm_bSave = FALSE;
|
|
|
|
gmCurrent.gm_bManage = FALSE;
|
|
|
|
gmCurrent.gm_fnmDirectory = CTString("Scripts\\NetSettings\\");
|
|
|
|
gmCurrent.gm_fnmSelected = sam_strNetworkSettings;
|
|
|
|
gmCurrent.gm_fnmExt = CTString(".ini");
|
|
|
|
gmCurrent.gm_pAfterFileChosen = &LSLoadNetSettings;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
if (sam_strNetworkSettings == "") {
|
|
|
|
gmCurrent.gm_mgNotes.mg_strText = TRANS(
|
|
|
|
"Before joining a network game,\n"
|
|
|
|
"you have to adjust your connection parameters.\n"
|
|
|
|
"Choose one option from the list.\n"
|
|
|
|
"If you have problems with connection, you can adjust\n"
|
|
|
|
"these parameters again from the Options menu.\n"
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
gmCurrent.gm_mgNotes.mg_strText = "";
|
|
|
|
}
|
2016-03-30 21:25:24 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = &_pGUIM->gmOptionsMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-30 21:25:24 +02:00
|
|
|
}
|
|
|
|
|
2016-03-31 18:21:46 +02:00
|
|
|
|
|
|
|
void StartSinglePlayerQuickLoadMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
_gmMenuGameMode = GM_SINGLE_PLAYER;
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("QUICK LOAD");
|
|
|
|
gmCurrent.gm_bAllowThumbnails = TRUE;
|
|
|
|
gmCurrent.gm_iSortType = LSSORT_FILEDN;
|
|
|
|
gmCurrent.gm_bSave = FALSE;
|
|
|
|
gmCurrent.gm_bManage = TRUE;
|
|
|
|
gmCurrent.gm_fnmDirectory.PrintF("SaveGame\\Player%d\\Quick\\", _pGame->gm_iSinglePlayer);
|
|
|
|
gmCurrent.gm_fnmSelected = CTString("");
|
|
|
|
gmCurrent.gm_fnmExt = CTString(".sav");
|
|
|
|
gmCurrent.gm_pAfterFileChosen = &LSLoadSinglePlayer;
|
|
|
|
SetQuickLoadNotes();
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = pgmCurrentMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-31 18:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartSinglePlayerLoadMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
_gmMenuGameMode = GM_SINGLE_PLAYER;
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("LOAD");
|
|
|
|
gmCurrent.gm_bAllowThumbnails = TRUE;
|
|
|
|
gmCurrent.gm_iSortType = LSSORT_FILEDN;
|
|
|
|
gmCurrent.gm_bSave = FALSE;
|
|
|
|
gmCurrent.gm_bManage = TRUE;
|
|
|
|
gmCurrent.gm_fnmDirectory.PrintF("SaveGame\\Player%d\\", _pGame->gm_iSinglePlayer);
|
|
|
|
gmCurrent.gm_fnmSelected = CTString("");
|
|
|
|
gmCurrent.gm_fnmExt = CTString(".sav");
|
|
|
|
gmCurrent.gm_pAfterFileChosen = &LSLoadSinglePlayer;
|
|
|
|
gmCurrent.gm_mgNotes.mg_strText = "";
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = pgmCurrentMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-31 18:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartSinglePlayerSaveMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
if (_gmRunningGameMode != GM_SINGLE_PLAYER) return;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
// if no live players
|
|
|
|
if (_pGame->GetPlayersCount()>0 && _pGame->GetLivePlayersCount() <= 0) {
|
|
|
|
// do nothing
|
|
|
|
return;
|
|
|
|
}
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
_gmMenuGameMode = GM_SINGLE_PLAYER;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("SAVE");
|
|
|
|
gmCurrent.gm_bAllowThumbnails = TRUE;
|
|
|
|
gmCurrent.gm_iSortType = LSSORT_FILEDN;
|
|
|
|
gmCurrent.gm_bSave = TRUE;
|
|
|
|
gmCurrent.gm_bManage = TRUE;
|
|
|
|
gmCurrent.gm_fnmDirectory.PrintF("SaveGame\\Player%d\\", _pGame->gm_iSinglePlayer);
|
|
|
|
gmCurrent.gm_fnmSelected = CTString("");
|
|
|
|
gmCurrent.gm_fnmBaseName = CTString("SaveGame");
|
|
|
|
gmCurrent.gm_fnmExt = CTString(".sav");
|
|
|
|
gmCurrent.gm_pAfterFileChosen = &LSSaveAnyGame;
|
|
|
|
gmCurrent.gm_mgNotes.mg_strText = "";
|
|
|
|
gmCurrent.gm_strSaveDes = _pGame->GetDefaultGameDescription(TRUE);
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = pgmCurrentMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-31 18:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartDemoLoadMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
_gmMenuGameMode = GM_DEMO;
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("PLAY DEMO");
|
|
|
|
gmCurrent.gm_bAllowThumbnails = TRUE;
|
|
|
|
gmCurrent.gm_iSortType = LSSORT_FILEDN;
|
|
|
|
gmCurrent.gm_bSave = FALSE;
|
|
|
|
gmCurrent.gm_bManage = TRUE;
|
|
|
|
gmCurrent.gm_fnmDirectory = CTString("Demos\\");
|
|
|
|
gmCurrent.gm_fnmSelected = CTString("");
|
|
|
|
gmCurrent.gm_fnmExt = CTString(".dem");
|
|
|
|
gmCurrent.gm_pAfterFileChosen = &LSLoadDemo;
|
|
|
|
gmCurrent.gm_mgNotes.mg_strText = "";
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = pgmCurrentMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-31 18:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartDemoSaveMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
if (_gmRunningGameMode == GM_NONE) return;
|
|
|
|
_gmMenuGameMode = GM_DEMO;
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("RECORD DEMO");
|
|
|
|
gmCurrent.gm_bAllowThumbnails = TRUE;
|
|
|
|
gmCurrent.gm_iSortType = LSSORT_FILEUP;
|
|
|
|
gmCurrent.gm_bSave = TRUE;
|
|
|
|
gmCurrent.gm_bManage = TRUE;
|
|
|
|
gmCurrent.gm_fnmDirectory = CTString("Demos\\");
|
|
|
|
gmCurrent.gm_fnmSelected = CTString("");
|
|
|
|
gmCurrent.gm_fnmBaseName = CTString("Demo");
|
|
|
|
gmCurrent.gm_fnmExt = CTString(".dem");
|
|
|
|
gmCurrent.gm_pAfterFileChosen = &LSSaveDemo;
|
|
|
|
gmCurrent.gm_mgNotes.mg_strText = "";
|
|
|
|
gmCurrent.gm_strSaveDes = _pGame->GetDefaultGameDescription(FALSE);
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = pgmCurrentMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-31 18:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartNetworkQuickLoadMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
_gmMenuGameMode = GM_NETWORK;
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("QUICK LOAD");
|
|
|
|
gmCurrent.gm_bAllowThumbnails = TRUE;
|
|
|
|
gmCurrent.gm_iSortType = LSSORT_FILEDN;
|
|
|
|
gmCurrent.gm_bSave = FALSE;
|
|
|
|
gmCurrent.gm_bManage = TRUE;
|
|
|
|
gmCurrent.gm_fnmDirectory = CTString("SaveGame\\Network\\Quick\\");
|
|
|
|
gmCurrent.gm_fnmSelected = CTString("");
|
|
|
|
gmCurrent.gm_fnmExt = CTString(".sav");
|
|
|
|
gmCurrent.gm_pAfterFileChosen = &LSLoadNetwork;
|
|
|
|
SetQuickLoadNotes();
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = pgmCurrentMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-31 18:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartNetworkLoadMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
_gmMenuGameMode = GM_NETWORK;
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("LOAD");
|
|
|
|
gmCurrent.gm_bAllowThumbnails = TRUE;
|
|
|
|
gmCurrent.gm_iSortType = LSSORT_FILEDN;
|
|
|
|
gmCurrent.gm_bSave = FALSE;
|
|
|
|
gmCurrent.gm_bManage = TRUE;
|
|
|
|
gmCurrent.gm_fnmDirectory = CTString("SaveGame\\Network\\");
|
|
|
|
gmCurrent.gm_fnmSelected = CTString("");
|
|
|
|
gmCurrent.gm_fnmExt = CTString(".sav");
|
|
|
|
gmCurrent.gm_pAfterFileChosen = &LSLoadNetwork;
|
|
|
|
gmCurrent.gm_mgNotes.mg_strText = "";
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = pgmCurrentMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-31 18:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartNetworkSaveMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
if (_gmRunningGameMode != GM_NETWORK) return;
|
|
|
|
_gmMenuGameMode = GM_NETWORK;
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("SAVE");
|
|
|
|
gmCurrent.gm_bAllowThumbnails = TRUE;
|
|
|
|
gmCurrent.gm_iSortType = LSSORT_FILEDN;
|
|
|
|
gmCurrent.gm_bSave = TRUE;
|
|
|
|
gmCurrent.gm_bManage = TRUE;
|
|
|
|
gmCurrent.gm_fnmDirectory = CTString("SaveGame\\Network\\");
|
|
|
|
gmCurrent.gm_fnmSelected = CTString("");
|
|
|
|
gmCurrent.gm_fnmBaseName = CTString("SaveGame");
|
|
|
|
gmCurrent.gm_fnmExt = CTString(".sav");
|
|
|
|
gmCurrent.gm_pAfterFileChosen = &LSSaveAnyGame;
|
|
|
|
gmCurrent.gm_mgNotes.mg_strText = "";
|
|
|
|
gmCurrent.gm_strSaveDes = _pGame->GetDefaultGameDescription(TRUE);
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = pgmCurrentMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-31 18:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartSplitScreenQuickLoadMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
_gmMenuGameMode = GM_SPLIT_SCREEN;
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("QUICK LOAD");
|
|
|
|
gmCurrent.gm_bAllowThumbnails = TRUE;
|
|
|
|
gmCurrent.gm_iSortType = LSSORT_FILEDN;
|
|
|
|
gmCurrent.gm_bSave = FALSE;
|
|
|
|
gmCurrent.gm_bManage = TRUE;
|
|
|
|
gmCurrent.gm_fnmDirectory = CTString("SaveGame\\SplitScreen\\Quick\\");
|
|
|
|
gmCurrent.gm_fnmSelected = CTString("");
|
|
|
|
gmCurrent.gm_fnmExt = CTString(".sav");
|
|
|
|
gmCurrent.gm_pAfterFileChosen = &LSLoadSplitScreen;
|
|
|
|
SetQuickLoadNotes();
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = pgmCurrentMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-31 18:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartSplitScreenLoadMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
_gmMenuGameMode = GM_SPLIT_SCREEN;
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("LOAD");
|
|
|
|
gmCurrent.gm_bAllowThumbnails = TRUE;
|
|
|
|
gmCurrent.gm_iSortType = LSSORT_FILEDN;
|
|
|
|
gmCurrent.gm_bSave = FALSE;
|
|
|
|
gmCurrent.gm_bManage = TRUE;
|
|
|
|
gmCurrent.gm_fnmDirectory = CTString("SaveGame\\SplitScreen\\");
|
|
|
|
gmCurrent.gm_fnmSelected = CTString("");
|
|
|
|
gmCurrent.gm_fnmExt = CTString(".sav");
|
|
|
|
gmCurrent.gm_pAfterFileChosen = &LSLoadSplitScreen;
|
|
|
|
gmCurrent.gm_mgNotes.mg_strText = "";
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = pgmCurrentMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-31 18:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void StartSplitScreenSaveMenu(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
if (_gmRunningGameMode != GM_SPLIT_SCREEN) return;
|
|
|
|
_gmMenuGameMode = GM_SPLIT_SCREEN;
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("SAVE");
|
|
|
|
gmCurrent.gm_bAllowThumbnails = TRUE;
|
|
|
|
gmCurrent.gm_iSortType = LSSORT_FILEDN;
|
|
|
|
gmCurrent.gm_bSave = TRUE;
|
|
|
|
gmCurrent.gm_bManage = TRUE;
|
|
|
|
gmCurrent.gm_fnmDirectory = CTString("SaveGame\\SplitScreen\\");
|
|
|
|
gmCurrent.gm_fnmSelected = CTString("");
|
|
|
|
gmCurrent.gm_fnmBaseName = CTString("SaveGame");
|
|
|
|
gmCurrent.gm_fnmExt = CTString(".sav");
|
|
|
|
gmCurrent.gm_pAfterFileChosen = &LSSaveAnyGame;
|
|
|
|
gmCurrent.gm_mgNotes.mg_strText = "";
|
|
|
|
gmCurrent.gm_strSaveDes = _pGame->GetDefaultGameDescription(TRUE);
|
2016-03-31 18:21:46 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = pgmCurrentMenu;
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-31 18:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// -------- Disabled Menu Calling Function
|
2016-03-30 22:09:51 +02:00
|
|
|
void DisabledFunction(void)
|
|
|
|
{
|
2016-03-31 22:27:11 +02:00
|
|
|
CDisabledMenu &gmCurrent = _pGUIM->gmDisabledFunction;
|
2016-03-31 19:58:27 +02:00
|
|
|
|
2016-03-31 22:27:11 +02:00
|
|
|
gmCurrent.gm_pgmParentMenu = pgmCurrentMenu;
|
|
|
|
gmCurrent.gm_mgButton.mg_strText = TRANS("The feature is not available in this version!");
|
|
|
|
gmCurrent.gm_mgTitle.mg_strText = TRANS("DISABLED");
|
|
|
|
ChangeToMenu(&gmCurrent);
|
2016-03-30 22:09:51 +02:00
|
|
|
}
|