From 216246cf15eec4fc2b62cd131513f1aeef514487 Mon Sep 17 00:00:00 2001 From: zcaliptium Date: Sat, 12 Mar 2016 18:25:48 +0300 Subject: [PATCH] GameExecutable: Separate Menu.h into multiple files. Too many classes definitions in one file. Preparing for separation Menu.cpp --- Sources/SeriousSam/ArrowDir.h | 2 +- Sources/SeriousSam/FileInfo.h | 18 ++ Sources/SeriousSam/GameMenu.h | 39 +++ Sources/SeriousSam/MAudioOptions.h | 18 ++ Sources/SeriousSam/MConfirm.h | 22 ++ Sources/SeriousSam/MControls.h | 21 ++ Sources/SeriousSam/MCredits.h | 17 ++ Sources/SeriousSam/MCustomizeAxis.h | 22 ++ Sources/SeriousSam/MCustomizeKeyboard.h | 20 ++ Sources/SeriousSam/MDisabled.h | 17 ++ Sources/SeriousSam/MHighScore.h | 18 ++ Sources/SeriousSam/MInGame.h | 18 ++ Sources/SeriousSam/MLevels.h | 19 ++ Sources/SeriousSam/MLoadSave.h | 50 ++++ Sources/SeriousSam/MMain.h | 18 ++ Sources/SeriousSam/MNetwork.h | 18 ++ Sources/SeriousSam/MNetworkJoin.h | 17 ++ Sources/SeriousSam/MNetworkOpen.h | 19 ++ Sources/SeriousSam/MNetworkStart.h | 19 ++ Sources/SeriousSam/MOptions.h | 17 ++ Sources/SeriousSam/MPlayerProfile.h | 24 ++ Sources/SeriousSam/MRenderingOptions.h | 18 ++ Sources/SeriousSam/MSelectPlayers.h | 21 ++ Sources/SeriousSam/MServers.h | 22 ++ Sources/SeriousSam/MSinglePlayer.h | 18 ++ Sources/SeriousSam/MSinglePlayerNew.h | 18 ++ Sources/SeriousSam/MSplitScreen.h | 18 ++ Sources/SeriousSam/MSplitStart.h | 19 ++ Sources/SeriousSam/MVar.h | 22 ++ Sources/SeriousSam/MVideoOptions.h | 18 ++ Sources/SeriousSam/Menu.cpp | 26 ++ Sources/SeriousSam/Menu.h | 271 +----------------- Sources/SeriousSam/SeriousSam.vcxproj | 29 ++ Sources/SeriousSam/SeriousSam.vcxproj.filters | 219 ++++++++++---- 34 files changed, 833 insertions(+), 319 deletions(-) create mode 100644 Sources/SeriousSam/FileInfo.h create mode 100644 Sources/SeriousSam/GameMenu.h create mode 100644 Sources/SeriousSam/MAudioOptions.h create mode 100644 Sources/SeriousSam/MConfirm.h create mode 100644 Sources/SeriousSam/MControls.h create mode 100644 Sources/SeriousSam/MCredits.h create mode 100644 Sources/SeriousSam/MCustomizeAxis.h create mode 100644 Sources/SeriousSam/MCustomizeKeyboard.h create mode 100644 Sources/SeriousSam/MDisabled.h create mode 100644 Sources/SeriousSam/MHighScore.h create mode 100644 Sources/SeriousSam/MInGame.h create mode 100644 Sources/SeriousSam/MLevels.h create mode 100644 Sources/SeriousSam/MLoadSave.h create mode 100644 Sources/SeriousSam/MMain.h create mode 100644 Sources/SeriousSam/MNetwork.h create mode 100644 Sources/SeriousSam/MNetworkJoin.h create mode 100644 Sources/SeriousSam/MNetworkOpen.h create mode 100644 Sources/SeriousSam/MNetworkStart.h create mode 100644 Sources/SeriousSam/MOptions.h create mode 100644 Sources/SeriousSam/MPlayerProfile.h create mode 100644 Sources/SeriousSam/MRenderingOptions.h create mode 100644 Sources/SeriousSam/MSelectPlayers.h create mode 100644 Sources/SeriousSam/MServers.h create mode 100644 Sources/SeriousSam/MSinglePlayer.h create mode 100644 Sources/SeriousSam/MSinglePlayerNew.h create mode 100644 Sources/SeriousSam/MSplitScreen.h create mode 100644 Sources/SeriousSam/MSplitStart.h create mode 100644 Sources/SeriousSam/MVar.h create mode 100644 Sources/SeriousSam/MVideoOptions.h diff --git a/Sources/SeriousSam/ArrowDir.h b/Sources/SeriousSam/ArrowDir.h index 30a11aa..6d7f41e 100644 --- a/Sources/SeriousSam/ArrowDir.h +++ b/Sources/SeriousSam/ArrowDir.h @@ -6,6 +6,7 @@ #pragma once #endif + enum ArrowDir { AD_NONE, AD_UP, @@ -14,5 +15,4 @@ enum ArrowDir { AD_RIGHT, }; - #endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/FileInfo.h b/Sources/SeriousSam/FileInfo.h new file mode 100644 index 0000000..cd24acd --- /dev/null +++ b/Sources/SeriousSam/FileInfo.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_FILEINFO_H +#define SE_INCL_FILEINFO_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + + +class CFileInfo { +public: + CListNode fi_lnNode; + CTFileName fi_fnFile; + CTString fi_strName; +}; + + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/GameMenu.h b/Sources/SeriousSam/GameMenu.h new file mode 100644 index 0000000..c1c852a --- /dev/null +++ b/Sources/SeriousSam/GameMenu.h @@ -0,0 +1,39 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_H +#define SE_INCL_GAME_MENU_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + + +class CGameMenu { +public: + CListHead gm_lhGadgets; + CGameMenu *gm_pgmParentMenu; + BOOL gm_bPopup; + const char *gm_strName; // menu name (for mod interface only) + class CMenuGadget *gm_pmgSelectedByDefault; + class CMenuGadget *gm_pmgArrowUp; + class CMenuGadget *gm_pmgArrowDn; + class CMenuGadget *gm_pmgListTop; + class CMenuGadget *gm_pmgListBottom; + INDEX gm_iListOffset; + INDEX gm_iListWantedItem; // item you want to focus initially + INDEX gm_ctListVisible; + INDEX gm_ctListTotal; + CGameMenu(void); + void ScrollList(INDEX iDir); + void KillAllFocuses(void); + virtual void Initialize_t(void); + virtual void Destroy(void); + virtual void StartMenu(void); + virtual void FillListItems(void); + virtual void EndMenu(void); + // return TRUE if handled + virtual BOOL OnKeyDown(int iVKey); + virtual BOOL OnChar(MSG msg); + virtual void Think(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MAudioOptions.h b/Sources/SeriousSam/MAudioOptions.h new file mode 100644 index 0000000..cf4a94b --- /dev/null +++ b/Sources/SeriousSam/MAudioOptions.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_AUDIOOPTIONS_H +#define SE_INCL_GAME_MENU_AUDIOOPTIONS_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CAudioOptionsMenu : public CGameMenu { +public: + void StartMenu(void); + void Initialize_t(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MConfirm.h b/Sources/SeriousSam/MConfirm.h new file mode 100644 index 0000000..ee40979 --- /dev/null +++ b/Sources/SeriousSam/MConfirm.h @@ -0,0 +1,22 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_CONFIRM_H +#define SE_INCL_GAME_MENU_CONFIRM_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CConfirmMenu : public CGameMenu { +public: + void Initialize_t(void); + // return TRUE if handled + BOOL OnKeyDown(int iVKey); + + void BeLarge(void); + void BeSmall(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MControls.h b/Sources/SeriousSam/MControls.h new file mode 100644 index 0000000..949e17e --- /dev/null +++ b/Sources/SeriousSam/MControls.h @@ -0,0 +1,21 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_CONTROLS_H +#define SE_INCL_GAME_MENU_CONTROLS_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CControlsMenu : public CGameMenu { +public: + void Initialize_t(void); + void StartMenu(void); + void EndMenu(void); + void ObtainActionSettings(void); + void ApplyActionSettings(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MCredits.h b/Sources/SeriousSam/MCredits.h new file mode 100644 index 0000000..10f602b --- /dev/null +++ b/Sources/SeriousSam/MCredits.h @@ -0,0 +1,17 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_CREDITS_H +#define SE_INCL_GAME_MENU_CREDITS_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CCreditsMenu : public CGameMenu { +public: + void Initialize_t(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MCustomizeAxis.h b/Sources/SeriousSam/MCustomizeAxis.h new file mode 100644 index 0000000..0bba4d8 --- /dev/null +++ b/Sources/SeriousSam/MCustomizeAxis.h @@ -0,0 +1,22 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_CUSTOMIZEAXIS_H +#define SE_INCL_GAME_MENU_CUSTOMIZEAXIS_H +#ifdef PRAGMA_ONCE +#pragma once +#endif + +#include "GameMenu.h" + + +class CCustomizeAxisMenu : public CGameMenu { +public: + ~CCustomizeAxisMenu(void); + void Initialize_t(void); + void StartMenu(void); + void EndMenu(void); + void ObtainActionSettings(void); + void ApplyActionSettings(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MCustomizeKeyboard.h b/Sources/SeriousSam/MCustomizeKeyboard.h new file mode 100644 index 0000000..c95a6c8 --- /dev/null +++ b/Sources/SeriousSam/MCustomizeKeyboard.h @@ -0,0 +1,20 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_CUSTOMIZEKEYBOARD_H +#define SE_INCL_GAME_MENU_CUSTOMIZEKEYBOARD_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CCustomizeKeyboardMenu : public CGameMenu { +public: + void Initialize_t(void); + void StartMenu(void); + void EndMenu(void); + void FillListItems(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MDisabled.h b/Sources/SeriousSam/MDisabled.h new file mode 100644 index 0000000..7d372f5 --- /dev/null +++ b/Sources/SeriousSam/MDisabled.h @@ -0,0 +1,17 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_DISABLED_H +#define SE_INCL_GAME_MENU_DISABLED_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CDisabledMenu : public CGameMenu { +public: + void Initialize_t(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MHighScore.h b/Sources/SeriousSam/MHighScore.h new file mode 100644 index 0000000..622e82e --- /dev/null +++ b/Sources/SeriousSam/MHighScore.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_HIGHSCORE_H +#define SE_INCL_GAME_MENU_HIGHSCORE_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CHighScoreMenu : public CGameMenu { +public: + void Initialize_t(void); + void StartMenu(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MInGame.h b/Sources/SeriousSam/MInGame.h new file mode 100644 index 0000000..53e7e03 --- /dev/null +++ b/Sources/SeriousSam/MInGame.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_INGAME_H +#define SE_INCL_GAME_MENU_INGAME_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CInGameMenu : public CGameMenu { +public: + void Initialize_t(void); + void StartMenu(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MLevels.h b/Sources/SeriousSam/MLevels.h new file mode 100644 index 0000000..174a86a --- /dev/null +++ b/Sources/SeriousSam/MLevels.h @@ -0,0 +1,19 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_LEVELS_H +#define SE_INCL_GAME_MENU_LEVELS_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CLevelsMenu : public CGameMenu { +public: + void Initialize_t(void); + void FillListItems(void); + void StartMenu(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MLoadSave.h b/Sources/SeriousSam/MLoadSave.h new file mode 100644 index 0000000..b51b971 --- /dev/null +++ b/Sources/SeriousSam/MLoadSave.h @@ -0,0 +1,50 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_LOADSAVE_H +#define SE_INCL_GAME_MENU_LOADSAVE_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CLoadSaveMenu : public CGameMenu { +public: + // settings adjusted before starting the menu + CGameMenu *gm_pgmNextMenu; // menu to go to after selecting a file (if null, use parent menu) + CTFileName gm_fnmSelected; // file that is selected initially + CTFileName gm_fnmDirectory; // directory that should be read + CTFileName gm_fnmBaseName; // base file name for saving (numbers are auto-added) + CTFileName gm_fnmExt; // accepted file extension + BOOL gm_bSave; // set when chosing file for saving + BOOL gm_bManage; // set if managing (rename/delet is enabled) + CTString gm_strSaveDes; // default description (if saving) + BOOL gm_bAllowThumbnails; // set when chosing file for saving + BOOL gm_bNoEscape; // forbid exiting with escape/rmb +#define LSSORT_NONE 0 +#define LSSORT_NAMEUP 1 +#define LSSORT_NAMEDN 2 +#define LSSORT_FILEUP 3 +#define LSSORT_FILEDN 4 + INDEX gm_iSortType; // sort type + + // function to activate when file is chosen + // return true if saving succeeded - description is saved automatically + // always return true for loading + BOOL(*gm_pAfterFileChosen)(const CTFileName &fnm); + + // internal properties + CListHead gm_lhFileInfos; // all file infos to list + INDEX gm_iLastFile; // index of last saved file in numbered format + + // called to get info of a file from directory, or to skip it + BOOL ParseFile(const CTFileName &fnm, CTString &strName); + + void Initialize_t(void); + void StartMenu(void); + void EndMenu(void); + void FillListItems(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MMain.h b/Sources/SeriousSam/MMain.h new file mode 100644 index 0000000..30a9d91 --- /dev/null +++ b/Sources/SeriousSam/MMain.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_MAIN_H +#define SE_INCL_GAME_MENU_MAIN_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CMainMenu : public CGameMenu { +public: + void Initialize_t(void); + void StartMenu(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MNetwork.h b/Sources/SeriousSam/MNetwork.h new file mode 100644 index 0000000..6b0364a --- /dev/null +++ b/Sources/SeriousSam/MNetwork.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_NETWORK_H +#define SE_INCL_GAME_MENU_NETWORK_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CNetworkMenu : public CGameMenu { +public: + void Initialize_t(void); + void StartMenu(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MNetworkJoin.h b/Sources/SeriousSam/MNetworkJoin.h new file mode 100644 index 0000000..d38984e --- /dev/null +++ b/Sources/SeriousSam/MNetworkJoin.h @@ -0,0 +1,17 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_NETWORKJOIN_H +#define SE_INCL_GAME_MENU_NETWORKJOIN_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CNetworkJoinMenu : public CGameMenu { +public: + void Initialize_t(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MNetworkOpen.h b/Sources/SeriousSam/MNetworkOpen.h new file mode 100644 index 0000000..c526b4e --- /dev/null +++ b/Sources/SeriousSam/MNetworkOpen.h @@ -0,0 +1,19 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_NETWORKOPEN_H +#define SE_INCL_GAME_MENU_NETWORKOPEN_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CNetworkOpenMenu : public CGameMenu { +public: + void Initialize_t(void); + void StartMenu(void); + void EndMenu(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MNetworkStart.h b/Sources/SeriousSam/MNetworkStart.h new file mode 100644 index 0000000..2072e6e --- /dev/null +++ b/Sources/SeriousSam/MNetworkStart.h @@ -0,0 +1,19 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_NETWORKSTART_H +#define SE_INCL_GAME_MENU_NETWORKSTART_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CNetworkStartMenu : public CGameMenu { +public: + void Initialize_t(void); + void StartMenu(void); + void EndMenu(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MOptions.h b/Sources/SeriousSam/MOptions.h new file mode 100644 index 0000000..f42cdac --- /dev/null +++ b/Sources/SeriousSam/MOptions.h @@ -0,0 +1,17 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_OPTIONS_H +#define SE_INCL_GAME_MENU_OPTIONS_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class COptionsMenu : public CGameMenu { +public: + void Initialize_t(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MPlayerProfile.h b/Sources/SeriousSam/MPlayerProfile.h new file mode 100644 index 0000000..0541e5b --- /dev/null +++ b/Sources/SeriousSam/MPlayerProfile.h @@ -0,0 +1,24 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_PLAYERPROFILE_H +#define SE_INCL_GAME_MENU_PLAYERPROFILE_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CPlayerProfileMenu : public CGameMenu { +public: + INDEX *gm_piCurrentPlayer; + void Initialize_t(void); + INDEX ComboFromPlayer(INDEX iPlayer); + INDEX PlayerFromCombo(INDEX iCombo); + void SelectPlayer(INDEX iPlayer); + void ApplyComboPlayer(INDEX iPlayer); + void StartMenu(void); + void EndMenu(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MRenderingOptions.h b/Sources/SeriousSam/MRenderingOptions.h new file mode 100644 index 0000000..c41a546 --- /dev/null +++ b/Sources/SeriousSam/MRenderingOptions.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_RENDERINGOPTIONS_H +#define SE_INCL_GAME_MENU_RENDERINGOPTIONS_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CRenderingOptionsMenu : public CGameMenu { +public: + void StartMenu(void); + void EndMenu(void); + void Initialize_t(void); +}; +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MSelectPlayers.h b/Sources/SeriousSam/MSelectPlayers.h new file mode 100644 index 0000000..5d5f4da --- /dev/null +++ b/Sources/SeriousSam/MSelectPlayers.h @@ -0,0 +1,21 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_SELECTPLAYERS_H +#define SE_INCL_GAME_MENU_SELECTPLAYERS_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CSelectPlayersMenu : public CGameMenu { +public: + BOOL gm_bAllowDedicated; + BOOL gm_bAllowObserving; + void Initialize_t(void); + void StartMenu(void); + void EndMenu(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MServers.h b/Sources/SeriousSam/MServers.h new file mode 100644 index 0000000..c8e7304 --- /dev/null +++ b/Sources/SeriousSam/MServers.h @@ -0,0 +1,22 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_SERVERS_H +#define SE_INCL_GAME_MENU_SERVERS_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CServersMenu : public CGameMenu { +public: + BOOL m_bInternet; + void Initialize_t(void); + void StartMenu(void); + void Think(void); + + BOOL OnKeyDown(int iVKey); // __Evolution +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MSinglePlayer.h b/Sources/SeriousSam/MSinglePlayer.h new file mode 100644 index 0000000..5443f6e --- /dev/null +++ b/Sources/SeriousSam/MSinglePlayer.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_SINGLEPLAYER_H +#define SE_INCL_GAME_MENU_SINGLEPLAYER_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CSinglePlayerMenu : public CGameMenu { +public: + void Initialize_t(void); + void StartMenu(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MSinglePlayerNew.h b/Sources/SeriousSam/MSinglePlayerNew.h new file mode 100644 index 0000000..090a439 --- /dev/null +++ b/Sources/SeriousSam/MSinglePlayerNew.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_SINGLEPLAYERNEW_H +#define SE_INCL_GAME_MENU_SINGLEPLAYERNEW_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CSinglePlayerNewMenu : public CGameMenu { +public: + void Initialize_t(void); + void StartMenu(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MSplitScreen.h b/Sources/SeriousSam/MSplitScreen.h new file mode 100644 index 0000000..72592fd --- /dev/null +++ b/Sources/SeriousSam/MSplitScreen.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_SPLITSCREEN_H +#define SE_INCL_GAME_MENU_SPLITSCREEN_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CSplitScreenMenu : public CGameMenu { +public: + void Initialize_t(void); + void StartMenu(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MSplitStart.h b/Sources/SeriousSam/MSplitStart.h new file mode 100644 index 0000000..832a52c --- /dev/null +++ b/Sources/SeriousSam/MSplitStart.h @@ -0,0 +1,19 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_SPLITSTART_H +#define SE_INCL_GAME_MENU_SPLITSTART_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CSplitStartMenu : public CGameMenu { +public: + void Initialize_t(void); + void StartMenu(void); + void EndMenu(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MVar.h b/Sources/SeriousSam/MVar.h new file mode 100644 index 0000000..b688011 --- /dev/null +++ b/Sources/SeriousSam/MVar.h @@ -0,0 +1,22 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_VAR_H +#define SE_INCL_GAME_MENU_VAR_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CVarMenu : public CGameMenu { +public: + CTFileName gm_fnmMenuCFG; + void Initialize_t(void); + void FillListItems(void); + void StartMenu(void); + void EndMenu(void); + void Think(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/MVideoOptions.h b/Sources/SeriousSam/MVideoOptions.h new file mode 100644 index 0000000..14572d3 --- /dev/null +++ b/Sources/SeriousSam/MVideoOptions.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ + +#ifndef SE_INCL_GAME_MENU_VIDEOOPTIONS_H +#define SE_INCL_GAME_MENU_VIDEOOPTIONS_H +#ifdef PRAGMA_ONCE + #pragma once +#endif + +#include "GameMenu.h" + + +class CVideoOptionsMenu : public CGameMenu { +public: + void StartMenu(void); + void Initialize_t(void); +}; + +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/Menu.cpp b/Sources/SeriousSam/Menu.cpp index f71c2a5..73f1f7c 100644 --- a/Sources/SeriousSam/Menu.cpp +++ b/Sources/SeriousSam/Menu.cpp @@ -12,6 +12,7 @@ #include "MenuPrinting.h" #include "LevelInfo.h" #include "VarList.h" +#include "FileInfo.h" #include "MGArrow.h" #include "MGButton.h" @@ -28,6 +29,31 @@ #include "MGTrigger.h" #include "MGVarButton.h" +#include "MAudioOptions.h" +#include "MConfirm.h" +#include "MControls.h" +#include "MCustomizeAxis.h" +#include "MCustomizeKeyboard.h" +#include "MCredits.h" +#include "MDisabled.h" +#include "MHighScore.h" +#include "MInGame.h" +#include "MLevels.h" +#include "MMain.h" +#include "MNetwork.h" +#include "MNetworkJoin.h" +#include "MNetworkOpen.h" +#include "MNetworkStart.h" +#include "MOptions.h" +#include "MRenderingOptions.h" +#include "MServers.h" +#include "MSinglePlayer.h" +#include "MSinglePlayerNew.h" +#include "MSplitScreen.h" +#include "MSplitStart.h" +#include "MVar.h" +#include "MVideoOptions.h" + // macros for translating radio button text arrays #define RADIOTRANS(str) ("ETRS" str) #define TRANSLATERADIOARRAY(array) TranslateRadioTexts(array, ARRAYCOUNT(array)) diff --git a/Sources/SeriousSam/Menu.h b/Sources/SeriousSam/Menu.h index b39d62b..42091d4 100644 --- a/Sources/SeriousSam/Menu.h +++ b/Sources/SeriousSam/Menu.h @@ -1,5 +1,13 @@ /* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ +#ifndef SE_INCL_MENU_H +#define SE_INCL_MENU_H +#ifdef PRAGMA_ONCE +#pragma once +#endif + + + // set new thumbnail void SetThumbnail(CTFileName fn); // remove thumbnail @@ -43,266 +51,13 @@ extern GameMode _gmRunningGameMode; extern CGameMenu *pgmCurrentMenu; -class CGameMenu { -public: - CListHead gm_lhGadgets; - CGameMenu *gm_pgmParentMenu; - BOOL gm_bPopup; - const char *gm_strName; // menu name (for mod interface only) - class CMenuGadget *gm_pmgSelectedByDefault; - class CMenuGadget *gm_pmgArrowUp; - class CMenuGadget *gm_pmgArrowDn; - class CMenuGadget *gm_pmgListTop; - class CMenuGadget *gm_pmgListBottom; - INDEX gm_iListOffset; - INDEX gm_iListWantedItem; // item you want to focus initially - INDEX gm_ctListVisible; - INDEX gm_ctListTotal; - CGameMenu(void); - void ScrollList(INDEX iDir); - void KillAllFocuses(void); - virtual void Initialize_t(void); - virtual void Destroy(void); - virtual void StartMenu(void); - virtual void FillListItems(void); - virtual void EndMenu(void); - // return TRUE if handled - virtual BOOL OnKeyDown( int iVKey); - virtual BOOL OnChar(MSG msg); - virtual void Think(void); -}; +#include "GameMenu.h" -class CConfirmMenu : public CGameMenu { -public: - void Initialize_t(void); - // return TRUE if handled - BOOL OnKeyDown( int iVKey); - - void BeLarge(void); - void BeSmall(void); -}; - -class CMainMenu : public CGameMenu { -public: - void Initialize_t(void); - void StartMenu(void); -}; - -class CInGameMenu : public CGameMenu { -public: - void Initialize_t(void); - void StartMenu(void); -}; - -class CSinglePlayerMenu : public CGameMenu { -public: - void Initialize_t(void); - void StartMenu(void); -}; - -class CCreditsMenu : public CGameMenu { -public: - void Initialize_t(void); -}; - -class CDisabledMenu : public CGameMenu { -public: - void Initialize_t(void); -}; - -class CSinglePlayerNewMenu : public CGameMenu { -public: - void Initialize_t(void); - void StartMenu(void); -}; - -class CLevelsMenu : public CGameMenu { -public: - void Initialize_t(void); - void FillListItems(void); - void StartMenu(void); -}; - -class CVarMenu : public CGameMenu { -public: - CTFileName gm_fnmMenuCFG; - void Initialize_t(void); - void FillListItems(void); - void StartMenu(void); - void EndMenu(void); - void Think(void); -}; - -class CServersMenu : public CGameMenu { -public: - BOOL m_bInternet; - void Initialize_t(void); - void StartMenu(void); - void Think(void); - - BOOL OnKeyDown(int iVKey); // __Evolution -}; - -class CPlayerProfileMenu : public CGameMenu { -public: - INDEX *gm_piCurrentPlayer; - void Initialize_t(void); - INDEX ComboFromPlayer(INDEX iPlayer); - INDEX PlayerFromCombo(INDEX iCombo); - void SelectPlayer(INDEX iPlayer); - void ApplyComboPlayer(INDEX iPlayer); - void StartMenu(void); - void EndMenu(void); -}; - -class CControlsMenu : public CGameMenu { -public: - void Initialize_t(void); - void StartMenu(void); - void EndMenu(void); - void ObtainActionSettings(void); - void ApplyActionSettings(void); -}; - -class CFileInfo { -public: - CListNode fi_lnNode; - CTFileName fi_fnFile; - CTString fi_strName; -}; - -class CLoadSaveMenu : public CGameMenu { -public: - // settings adjusted before starting the menu - CGameMenu *gm_pgmNextMenu; // menu to go to after selecting a file (if null, use parent menu) - CTFileName gm_fnmSelected; // file that is selected initially - CTFileName gm_fnmDirectory; // directory that should be read - CTFileName gm_fnmBaseName; // base file name for saving (numbers are auto-added) - CTFileName gm_fnmExt; // accepted file extension - BOOL gm_bSave; // set when chosing file for saving - BOOL gm_bManage; // set if managing (rename/delet is enabled) - CTString gm_strSaveDes; // default description (if saving) - BOOL gm_bAllowThumbnails; // set when chosing file for saving - BOOL gm_bNoEscape; // forbid exiting with escape/rmb -#define LSSORT_NONE 0 -#define LSSORT_NAMEUP 1 -#define LSSORT_NAMEDN 2 -#define LSSORT_FILEUP 3 -#define LSSORT_FILEDN 4 - INDEX gm_iSortType; // sort type - - // function to activate when file is chosen - // return true if saving succeeded - description is saved automatically - // always return true for loading - BOOL (*gm_pAfterFileChosen)(const CTFileName &fnm); - - // internal properties - CListHead gm_lhFileInfos; // all file infos to list - INDEX gm_iLastFile; // index of last saved file in numbered format - - // called to get info of a file from directory, or to skip it - BOOL ParseFile(const CTFileName &fnm, CTString &strName); - - void Initialize_t(void); - void StartMenu(void); - void EndMenu(void); - void FillListItems(void); -}; +#include "MLoadSave.h" +#include "MPlayerProfile.h" +#include "MSelectPlayers.h" extern CLoadSaveMenu gmLoadSaveMenu; -class CHighScoreMenu : public CGameMenu { -public: - void Initialize_t(void); - void StartMenu(void); -}; - -class CNetworkMenu : public CGameMenu { -public: - void Initialize_t(void); - void StartMenu(void); -}; - -class CNetworkStartMenu : public CGameMenu { -public: - void Initialize_t(void); - void StartMenu(void); - void EndMenu(void); -}; - -class CNetworkOpenMenu : public CGameMenu { -public: - void Initialize_t(void); - void StartMenu(void); - void EndMenu(void); -}; - -class CNetworkJoinMenu : public CGameMenu { -public: - void Initialize_t(void); -}; - -class CSplitScreenMenu: public CGameMenu { -public: - void Initialize_t(void); - void StartMenu(void); -}; - -class CSplitStartMenu: public CGameMenu { -public: - void Initialize_t(void); - void StartMenu(void); - void EndMenu(void); -}; - -class CSelectPlayersMenu: public CGameMenu { -public: - BOOL gm_bAllowDedicated; - BOOL gm_bAllowObserving; - void Initialize_t(void); - void StartMenu(void); - void EndMenu(void); -}; - -class COptionsMenu : public CGameMenu { -public: - void Initialize_t(void); -}; - -class CVideoOptionsMenu : public CGameMenu { -public: - void StartMenu(void); - void Initialize_t(void); -}; - -class CRenderingOptionsMenu : public CGameMenu { -public: - void StartMenu(void); - void EndMenu(void); - void Initialize_t(void); -}; - -class CAudioOptionsMenu : public CGameMenu { -public: - void StartMenu(void); - void Initialize_t(void); -}; - -class CCustomizeKeyboardMenu : public CGameMenu { -public: - void Initialize_t(void); - void StartMenu(void); - void EndMenu(void); - void FillListItems(void); -}; - -class CCustomizeAxisMenu : public CGameMenu { -public: - ~CCustomizeAxisMenu(void); - void Initialize_t(void); - void StartMenu(void); - void EndMenu(void); - void ObtainActionSettings(void); - void ApplyActionSettings(void); -}; +#endif /* include-once check. */ \ No newline at end of file diff --git a/Sources/SeriousSam/SeriousSam.vcxproj b/Sources/SeriousSam/SeriousSam.vcxproj index b221d0e..65e77f4 100644 --- a/Sources/SeriousSam/SeriousSam.vcxproj +++ b/Sources/SeriousSam/SeriousSam.vcxproj @@ -224,10 +224,19 @@ copy Release\$(TargetName).map $(SolutionDir)..\Bin\ >nul + + + + + + + + + @@ -245,6 +254,26 @@ copy Release\$(TargetName).map $(SolutionDir)..\Bin\ >nul + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/SeriousSam/SeriousSam.vcxproj.filters b/Sources/SeriousSam/SeriousSam.vcxproj.filters index 8f48799..17a7967 100644 --- a/Sources/SeriousSam/SeriousSam.vcxproj.filters +++ b/Sources/SeriousSam/SeriousSam.vcxproj.filters @@ -19,6 +19,18 @@ {332d9393-d918-4caf-86b2-2e63c2cca9bd} + + {47ffb7e3-433b-480c-a22a-849524a5bd1e} + + + {3bc65fe2-8c15-4ecd-bf59-de962bb42275} + + + {df54d6d1-39c3-4f26-93f8-116311f5a0eb} + + + {9a04e8a8-ecfc-42c3-bf28-fe3d8b49e626} + @@ -39,9 +51,6 @@ Source Files - - Source Files - Source Files @@ -57,50 +66,53 @@ Source Files + + Source Files\Gadgets + - Source Files + Source Files\Gadgets - Source Files + Source Files\Gadgets - Source Files + Source Files\Gadgets - Source Files + Source Files\Gadgets - Source Files + Source Files\Gadgets - Source Files + Source Files\Gadgets - Source Files + Source Files\Gadgets - Source Files + Source Files\Gadgets - Source Files + Source Files\Gadgets - Source Files + Source Files\Gadgets - Source Files + Source Files\Gadgets - Source Files + Source Files\Gadgets - Source Files + Source Files\Gadgets - Source Files + Source Files\Gadgets - - Source Files + + Source Files\Menus @@ -125,9 +137,6 @@ Header Files - - Header Files - Header Files @@ -149,51 +158,141 @@ Header Files - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - + Header Files + Header Files\Gadgets headers + + + Header Files\Gadgets headers + + + Header Files\Gadgets headers + + + Header Files\Gadgets headers + + + Header Files\Gadgets headers + + + Header Files\Gadgets headers + + + Header Files\Gadgets headers + + + Header Files\Gadgets headers + + + Header Files\Gadgets headers + + + Header Files\Gadgets headers + + + Header Files\Gadgets headers + + + Header Files\Gadgets headers + + + Header Files\Gadgets headers + + + Header Files\Gadgets headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + Header Files - + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + Header Files + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers + + + Header Files\Menus headers +