From e765dfe90a5519dc221580acf6d78fdd9c74ceab Mon Sep 17 00:00:00 2001 From: _AG Date: Tue, 25 Jun 2019 02:34:29 +0200 Subject: Initial commit for Frontend. Bug fixes: fix #40, fix #39, fix #38, fix #37, fix #21. Code organization and cleanup... --- src/Frontend.h | 177 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 168 insertions(+), 9 deletions(-) (limited to 'src/Frontend.h') diff --git a/src/Frontend.h b/src/Frontend.h index 2e95d582..2f68fdcd 100644 --- a/src/Frontend.h +++ b/src/Frontend.h @@ -2,6 +2,43 @@ #include "Sprite2d.h" +#define HEADER_POS_X 35.0f +#define HEADER_POS_Y 93.0f +#define HEADER_WIDTH 0.84f +#define HEADER_HEIGHT 1.6f + +#define ACTION_POS_X 20.0f +#define ACTION_POS_Y 37.5f +#define ACTION_WIDTH 0.675f +#define ACTION_HEIGHT 0.81f + +#define COLUMN_POS_X HEADER_POS_X + 16.0f +#define COLUMN_MAX_Y 149.0f +#define COLUMN_MID_Y 100.0f +#define COLUMN_MIN_Y 110.0f +#define COLUMN_PAUSE_Y 25.0f +#define COLUMN_START_Y 9.0f +#define COLUMN_FEDS 139.0f + +#define COLUMN_SAVE_X 121.0f +#define COLUMN_SAVE_Y 111.0f + +#define COLUMN_SPACING_MAX 24.0f +#define COLUMN_SPACING_MIN 20.0f + +#define SELECT_BOX_MAX 20.5f +#define SELECT_BOX_MIN 17.0f + +#define FE_RADIO_ICON_X 31.5f +#define FE_RADIO_ICON_Y 29.5f +#define FE_RADIO_ICON_W 60.0f +#define FE_RADIO_ICON_H 60.0f + +#define DROP_COLOR_A 150 +#define DROP_COLOR_SIZE -1 + +#define SLIDER_X 306.0f + enum { LANGUAGE_AMERICAN, LANGUAGE_FRENCH, @@ -10,6 +47,70 @@ enum { LANGUAGE_SPANISH, }; +enum eFrontendSprites { + FE2_MAINPANEL_UL, + FE2_MAINPANEL_UR, + FE2_MAINPANEL_DL, + FE2_MAINPANEL_DR, + FE2_MAINPANEL_DR2, + FE2_TABACTIVE, + FE_ICONBRIEF, + FE_ICONSTATS, + FE_ICONCONTROLS, + FE_ICONSAVE, + FE_ICONAUDIO, + FE_ICONDISPLAY, + FE_ICONLANGUAGE, + FE_CONTROLLER, + FE_CONTROLLERSH, + FE_ARROWS1, + FE_ARROWS2, + FE_ARROWS3, + FE_ARROWS4, + FE_RADIO1, + FE_RADIO2, + FE_RADIO3, + FE_RADIO4, + FE_RADIO5, + FE_RADIO6, + FE_RADIO7, + FE_RADIO8, + FE_RADIO9, +}; + +enum eMenuSprites { + MENU_CONNECTION, + MENU_FINDGAME, + MENU_HOSTGAME, + MENU_MAINMENU, + MENU_PLAYERSET, + MENU_SINGLEPLAYER, + MENU_MULTIPLAYER, + MENU_DMALOGO, + MENU_GTALOGO, + MENU_RSTARLOGO, + MENU_GAMESPY, + MENU_MOUSE, + MENU_MOUSET, + MENU_MP3LOGO, + MENU_DOWNOFF, + MENU_UPOFF, + MENU_DOWNON, + MENU_UPON, + MENU_GTA3LOGO, +}; + +enum eMenuActions { + MENU_ACTION_SAVE_1 = 1, + MENU_ACTION_SAVE_2, + MENU_ACTION_SAVE_3, + MENU_ACTION_SAVE_4, + MENU_ACTION_SAVE_5, + MENU_ACTION_SAVE_6, + MENU_ACTION_SAVE_7, + MENU_ACTION_SAVE_8, +}; + enum eMenuScreen { MENU_NONE = 0, MENU_STATS = 1, @@ -72,6 +173,11 @@ enum eMenuScreen { MENU_58 = 58, }; +enum eCheckHover { + ACTIVATE_OPTION = 2, + IGNORE_OPTION = 42, +}; + struct tSkinInfo { int field_0; @@ -81,6 +187,20 @@ struct tSkinInfo int field_304; }; +struct CMenuScreen { + char m_ScreenName[8]; + int32 m_PreviousPage[3]; // + int32 m_ParentEntry[2]; + + struct CMenuEntry + { + int32 m_Action; + char m_EntryName[8]; + int32 m_ActionSlot; + int32 m_TargetMenu; + } m_aEntries[18]; +}; + class CMenuManager { public: @@ -136,10 +256,10 @@ public: int m_nHelperTextAlpha; int m_nMouseOldPosX; int m_nMouseOldPosY; - int field_544; + int m_nHoverOption; int m_nCurrScreen; int m_nCurrOption; - int field_550; + int m_nCurrentInput; int m_nPrevScreen; int field_558; int m_nCurrSaveSlot; @@ -165,17 +285,56 @@ public: static int8 &m_bFrontEnd_ReloadObrTxtGxt; static int32 &m_PrefsMusicVolume; static int32 &m_PrefsSfxVolume; + static bool &m_bStartUpFrontEndRequested; + static bool &m_bShutDownFrontEndRequested; static bool &m_PrefsAllowNastyGame; - static bool &m_bStartUpFrontEndRequested; - void Process(void); - void DrawFrontEnd(void); - void UnloadTextures(void); - void LoadAllTextures(void); - void LoadSettings(void); - void WaitForUserCD(void); +private: + enum eColumns { L, R, COLUMNS, }; + +public: + void BuildStatLine(char *, void *, uint16, void *); + static void CentreMousePointer(); + void CheckCodesForControls(int, int); + bool CheckHover(int x1, int x2, int y1, int y2); + int CostructStatLine(int); + void DisplayHelperText(); + float DisplaySlider(float, float, float, float, float, float); + void DoSettingsBeforeStartingAGame(); + void Draw(); + void DrawControllerBound(int, int, int, uint8); + void DrawControllerScreenExtraText(int, int, int); + void DrawControllerSetupScreen(); + void DrawFrontEnd(); + void DrawFrontEndNormal(); + void DrawPlayerSetupScreen(); int FadeIn(int alpha); + void FilterOutColorMarkersFromString(uint16, CRGBA &); + int GetStartOptionsCntrlConfigScreens(); + static void InitialiseChangedLanguageSettings(); + void LoadAllTextures(); + void LoadSettings(); + static void MessageScreen(char *); + static void PickNewPlayerColour(); + void PrintBriefs(); + static void PrintErrorMessage(); + void PrintStats(); + void Process(); + void ProcessButtonPresses(); + void ProcessOnOffMenuOptions(); + static void RequestFrontEndShutdown(); + static void RequestFrontEndStartUp(); + void ResetHelperText(); + void SaveLoadFileError_SetUpErrorScreen(); + void SaveSettings(); + void SetHelperText(int text); + void ShutdownJustMenu(); + static float StretchX(float); + static float StretchY(float ); + void SwitchMenuOnAndOff(); + void UnloadTextures(); + void WaitForUserCD(); }; static_assert(sizeof(CMenuManager) == 0x564, "CMenuManager: error"); -- cgit v1.2.3 From 628b9a8b54766dac8b6d75c71159d68820978b92 Mon Sep 17 00:00:00 2001 From: aap Date: Tue, 25 Jun 2019 08:19:47 +0200 Subject: Frontend clean up --- src/Frontend.h | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 115 insertions(+), 1 deletion(-) (limited to 'src/Frontend.h') diff --git a/src/Frontend.h b/src/Frontend.h index 2f68fdcd..7245477f 100644 --- a/src/Frontend.h +++ b/src/Frontend.h @@ -94,8 +94,8 @@ enum eMenuSprites { MENU_MOUSET, MENU_MP3LOGO, MENU_DOWNOFF, - MENU_UPOFF, MENU_DOWNON, + MENU_UPOFF, MENU_UPON, MENU_GTA3LOGO, }; @@ -173,6 +173,120 @@ enum eMenuScreen { MENU_58 = 58, }; +enum eMenuAction { + MENUACTION_NOTHING, + MENUACTION_LABEL, + MENUACTION_CHANGEMENU, + MENUACTION_CTRLVIBRATION, + MENUACTION_CTRLCONFIG, + MENUACTION_CTRLDISPLAY, + MENUACTION_FRAMESYNC, + MENUACTION_FRAMELIMIT, + MENUACTION_TRAILS, + MENUACTION_SUBTITLES, + MENUACTION_WIDESCREEN, + MENUACTION_BRIGHTNESS, + MENUACTION_DRAWDIST, + MENUACTION_MUSICVOLUME, + MENUACTION_SFXVOLUME, + MENUACTION_UNK15, + MENUACTION_RADIO, + MENUACTION_LANG_ENG, + MENUACTION_LANG_FRE, + MENUACTION_LANG_GER, + MENUACTION_LANG_IT, + MENUACTION_LANG_SPA, + MENUACTION_UPDATESAVE, + MENUACTION_CHECKSAVE, + MENUACTION_UNK24, + MENUACTION_NEWGAME, + MENUACTION_RELOADIDE, + MENUACTION_RELOADIPL, + MENUACTION_SETDBGFLAG, + MENUACTION_SWITCHBIGWHITEDEBUGLIGHT, + MENUACTION_PEDROADGROUPS, + MENUACTION_CARROADGROUPS, + MENUACTION_COLLISIONPOLYS, + MENUACTION_REGMEMCARD1, + MENUACTION_TESTFORMATMEMCARD1, + MENUACTION_TESTUNFORMATMEMCARD1, + MENUACTION_CREATEROOTDIR, + MENUACTION_CREATELOADICONS, + MENUACTION_FILLWITHGUFF, + MENUACTION_SAVEONLYTHEGAME, + MENUACTION_SAVEGAME, + MENUACTION_SAVEGAMEUNDERGTA, + MENUACTION_CREATECOPYPROTECTED, + MENUACTION_TESTSAVE, + MENUACTION_TESTLOAD, + MENUACTION_TESTDELETE, + MENUACTION_PARSEHEAP, + MENUACTION_SHOWCULL, + MENUACTION_MEMCARDSAVECONFIRM, + MENUACTION_UPDATEMEMCARDSAVE, + MENUACTION_UNK50, + MENUACTION_DEBUGSTREAM, + MENUACTION_MPMAP_LIBERTY, + MENUACTION_MPMAP_REDLIGHT, + MENUACTION_MPMAP_CHINATOWN, + MENUACTION_MPMAP_TOWER, + MENUACTION_MPMAP_SEWER, + MENUACTION_MPMAP_INDUSTPARK, + MENUACTION_MPMAP_DOCKS, + MENUACTION_MPMAP_STAUNTON, + MENUACTION_MPMAP_DEATHMATCH1, + MENUACTION_MPMAP_DEATHMATCH2, + MENUACTION_MPMAP_TEAMDEATH1, + MENUACTION_MPMAP_TEAMDEATH2, + MENUACTION_MPMAP_STASH, + MENUACTION_MPMAP_CAPTURE, + MENUACTION_MPMAP_RATRACE, + MENUACTION_MPMAP_DOMINATION, + MENUACTION_STARTMP, + MENUACTION_UNK69, + MENUACTION_UNK70, + MENUACTION_FINDMP, + MENUACTION_REDEFCTRL, + MENUACTION_UNK73, + MENUACTION_INITMP, + MENUACTION_MP_PLAYERCOLOR, + MENUACTION_MP_PLAYERNAME, + MENUACTION_MP_GAMENAME, + MENUACTION_GETKEY, + MENUACTION_SHOWHEADBOB, + MENUACTION_UNK80, + MENUACTION_INVVERT, + MENUACTION_CANCLEGAME, + MENUACTION_MP_PLAYERNUMBER, + MENUACTION_MOUSESENS, + MENUACTION_CHECKMPGAMES, + MENUACTION_CHECKMPPING, + MENUACTION_MP_SERVER, + MENUACTION_MP_MAP, + MENUACTION_MP_GAMETYPE, + MENUACTION_MP_LAN, + MENUACTION_MP_INTERNET, + MENUACTION_RESUME, + MENUACTION_DONTCANCLE, + MENUACTION_SCREENRES, + MENUACTION_AUDIOHW, + MENUACTION_SPEAKERCONF, + MENUACTION_PLAYERSETUP, + MENUACTION_RESTOREDEF, + MENUACTION_CTRLMETHOD, + MENUACTION_DYNAMICACOUSTIC, + MENUACTION_LOADRADIO, + MENUACTION_MOUSESTEER, + MENUACTION_UNK103, + MENUACTION_UNK104, + MENUACTION_UNK105, + MENUACTION_UNK106, + MENUACTION_UNK107, + MENUACTION_UNK108, + MENUACTION_UNK109, + MENUACTION_UNK110, +}; + enum eCheckHover { ACTIVATE_OPTION = 2, IGNORE_OPTION = 42, -- cgit v1.2.3 From 28509e216f64a75e77ccb5d040d79001802ec594 Mon Sep 17 00:00:00 2001 From: _AG Date: Tue, 25 Jun 2019 14:25:39 +0200 Subject: Better organization for Frontend.cpp --- src/Frontend.h | 305 ++++++++++++++++++++++++++++++++------------------------- 1 file changed, 172 insertions(+), 133 deletions(-) (limited to 'src/Frontend.h') diff --git a/src/Frontend.h b/src/Frontend.h index 7245477f..c515be8c 100644 --- a/src/Frontend.h +++ b/src/Frontend.h @@ -2,44 +2,45 @@ #include "Sprite2d.h" -#define HEADER_POS_X 35.0f -#define HEADER_POS_Y 93.0f -#define HEADER_WIDTH 0.84f -#define HEADER_HEIGHT 1.6f +#define MENUHEADER_POS_X 35.0f +#define MENUHEADER_POS_Y 93.0f +#define MENUHEADER_WIDTH 0.84f +#define MENUHEADER_HEIGHT 1.6f -#define ACTION_POS_X 20.0f -#define ACTION_POS_Y 37.5f -#define ACTION_WIDTH 0.675f -#define ACTION_HEIGHT 0.81f +#define MENUACTION_POS_X 20.0f +#define MENUACTION_POS_Y 37.5f +#define MENUACTION_WIDTH 0.675f +#define MENUACTION_HEIGHT 0.81f -#define COLUMN_POS_X HEADER_POS_X + 16.0f -#define COLUMN_MAX_Y 149.0f -#define COLUMN_MID_Y 100.0f -#define COLUMN_MIN_Y 110.0f -#define COLUMN_PAUSE_Y 25.0f -#define COLUMN_START_Y 9.0f -#define COLUMN_FEDS 139.0f +#define MENUCOLUMN_POS_X MENUHEADER_POS_X + 16.0f +#define MENUCOLUMN_MAX_Y 149.0f +#define MENUCOLUMN_MID_Y 100.0f +#define MENUCOLUMN_MIN_Y 110.0f +#define MENUCOLUMN_PAUSE_Y 25.0f +#define MENUCOLUMN_START_Y 9.0f +#define MENUCOLUMN_FEDS 139.0f -#define COLUMN_SAVE_X 121.0f -#define COLUMN_SAVE_Y 111.0f +#define MENUCOLUMN_SAVE_X 121.0f +#define MENUCOLUMN_SAVE_Y 111.0f -#define COLUMN_SPACING_MAX 24.0f -#define COLUMN_SPACING_MIN 20.0f +#define MENUCOLUMN_SPACING_MAX 24.0f +#define MENUCOLUMN_SPACING_MIN 20.0f -#define SELECT_BOX_MAX 20.5f -#define SELECT_BOX_MIN 17.0f +#define MENUSELECT_BOX_MAX 20.5f +#define MENUSELECT_BOX_MIN 17.0f -#define FE_RADIO_ICON_X 31.5f -#define FE_RADIO_ICON_Y 29.5f -#define FE_RADIO_ICON_W 60.0f -#define FE_RADIO_ICON_H 60.0f +#define MENURADIO_ICON_X 31.5f +#define MENURADIO_ICON_Y 29.5f +#define MENURADIO_ICON_W 60.0f +#define MENURADIO_ICON_H 60.0f -#define DROP_COLOR_A 150 -#define DROP_COLOR_SIZE -1 +#define MENUDROP_COLOR_A 150 +#define MENUDROP_COLOR_SIZE -1 -#define SLIDER_X 306.0f +#define MENUSLIDER_X 306.0f -enum { +enum eLanguages +{ LANGUAGE_AMERICAN, LANGUAGE_FRENCH, LANGUAGE_GERMAN, @@ -47,7 +48,8 @@ enum { LANGUAGE_SPANISH, }; -enum eFrontendSprites { +enum eFrontendSprites +{ FE2_MAINPANEL_UL, FE2_MAINPANEL_UR, FE2_MAINPANEL_DL, @@ -78,102 +80,110 @@ enum eFrontendSprites { FE_RADIO9, }; -enum eMenuSprites { - MENU_CONNECTION, - MENU_FINDGAME, - MENU_HOSTGAME, - MENU_MAINMENU, - MENU_PLAYERSET, - MENU_SINGLEPLAYER, - MENU_MULTIPLAYER, - MENU_DMALOGO, - MENU_GTALOGO, - MENU_RSTARLOGO, - MENU_GAMESPY, - MENU_MOUSE, - MENU_MOUSET, - MENU_MP3LOGO, - MENU_DOWNOFF, - MENU_DOWNON, - MENU_UPOFF, - MENU_UPON, - MENU_GTA3LOGO, +enum eMenuSprites +{ + MENUSPRITE_CONNECTION, + MENUSPRITE_FINDGAME, + MENUSPRITE_HOSTGAME, + MENUSPRITE_MAINMENU, + MENUSPRITE_PLAYERSET, + MENUSPRITE_SINGLEPLAYER, + MENUSPRITE_MULTIPLAYER, + MENUSPRITE_DMALOGO, + MENUSPRITE_GTALOGO, + MENUSPRITE_RSTARLOGO, + MENUSPRITE_GAMESPY, + MENUSPRITE_MOUSE, + MENUSPRITE_MOUSET, + MENUSPRITE_MP3LOGO, + MENUSPRITE_DOWNOFF, + MENUSPRITE_DOWNON, + MENUSPRITE_UPOFF, + MENUSPRITE_UPON, + MENUSPRITE_GTA3LOGO, }; -enum eMenuActions { - MENU_ACTION_SAVE_1 = 1, - MENU_ACTION_SAVE_2, - MENU_ACTION_SAVE_3, - MENU_ACTION_SAVE_4, - MENU_ACTION_SAVE_5, - MENU_ACTION_SAVE_6, - MENU_ACTION_SAVE_7, - MENU_ACTION_SAVE_8, +enum eSaveSlot +{ + SAVESLOT_NONE, + SAVESLOT_1, + SAVESLOT_2, + SAVESLOT_3, + SAVESLOT_4, + SAVESLOT_5, + SAVESLOT_6, + SAVESLOT_7, + SAVESLOT_8, + SAVESLOT_LABEL = 36 }; -enum eMenuScreen { - MENU_NONE = 0, - MENU_STATS = 1, - MENU_NEW_GAME = 2, - MENU_BRIEFS = 3, - MENU_CONTROLLER_SETTINGS = 4, - MENU_SOUND_SETTINGS = 5, - MENU_GRAPHICS_SETTINGS = 6, - MENU_LANGUAGE_SETTINGS = 7, - MENU_CHOOSE_LOAD_SLOT = 8, - MENU_CHOOSE_DELETE_SLOT = 9, - MENU_NEW_GAME_RELOAD = 10, - MENU_LOAD_SLOT_CONFIRM = 11, - MENU_DELETE_SLOT_CONFIRM = 12, - MENU_13 = 13, - MENU_LOADING_IN_PROGRESS = 14, - MENU_DELETING_IN_PROGRESS = 15, - MENU_16 = 16, - MENU_DELETE_FAILED = 17, - MENU_DEBUG_MENU = 18, - MENU_MEMORY_CARD_1 = 19, - MENU_MEMORY_CARD_2 = 20, - MENU_MULTIPLAYER_MAIN = 21, - MENU_SAVE_FAILED_1 = 22, - MENU_SAVE_FAILED_2 = 23, - MENU_SAVE = 24, - MENU_NO_MEMORY_CARD = 25, - MENU_CHOOSE_SAVE_SLOT = 26, - MENU_SAVE_OVERWRITE_CONFIRM = 27, - MENU_MULTIPLAYER_MAP = 28, - MENU_MULTIPLAYER_CONNECTION = 29, - MENU_MULTIPLAYER_FIND_GAME = 30, - MENU_MULTIPLAYER_MODE = 31, - MENU_MULTIPLAYER_CREATE = 32, - MENU_MULTIPLAYER_START = 33, - MENU_SKIN_SELECT_OLD = 34, - MENU_CONTROLLER_PC = 35, - MENU_CONTROLLER_PC_OLD1 = 36, - MENU_CONTROLLER_PC_OLD2 = 37, - MENU_CONTROLLER_PC_OLD3 = 38, - MENU_CONTROLLER_PC_OLD4 = 39, - MENU_CONTROLLER_DEBUG = 40, - MENU_OPTIONS = 41, - MENU_EXIT = 42, - MENU_SAVING_IN_PROGRESS = 43, - MENU_SAVE_SUCCESSFUL = 44, - MENU_DELETING = 45, - MENU_DELETE_SUCCESS = 46, - MENU_SAVE_FAILED = 47, - MENU_LOAD_FAILED = 48, - MENU_LOAD_FAILED_2 = 49, - MENU_FILTER_GAME = 50, - MENU_START_MENU = 51, - MENU_PAUSE_MENU = 52, - MENU_CHOOSE_MODE = 53, - MENU_SKIN_SELECT = 54, - MENU_KEYBOARD_CONTROLS = 55, - MENU_MOUSE_CONTROLS = 56, - MENU_57 = 57, - MENU_58 = 58, +enum eMenuScreen +{ + MENUPAGE_DISABLED = -1, + MENUPAGE_NONE = 0, + MENUPAGE_STATS = 1, + MENUPAGE_NEW_GAME = 2, + MENUPAGE_BRIEFS = 3, + MENUPAGE_CONTROLLER_SETTINGS = 4, + MENUPAGE_SOUND_SETTINGS = 5, + MENUPAGE_GRAPHICS_SETTINGS = 6, + MENUPAGE_LANGUAGE_SETTINGS = 7, + MENUPAGE_CHOOSE_LOAD_SLOT = 8, + MENUPAGE_CHOOSE_DELETE_SLOT = 9, + MENUPAGE_NEW_GAME_RELOAD = 10, + MENUPAGE_LOAD_SLOT_CONFIRM = 11, + MENUPAGE_DELETE_SLOT_CONFIRM = 12, + MENUPAGE_13 = 13, + MENUPAGE_LOADING_IN_PROGRESS = 14, + MENUPAGE_DELETING_IN_PROGRESS = 15, + MENUPAGE_16 = 16, + MENUPAGE_DELETE_FAILED = 17, + MENUPAGE_DEBUG_MENU = 18, + MENUPAGE_MEMORY_CARD_1 = 19, + MENUPAGE_MEMORY_CARD_2 = 20, + MENUPAGE_MULTIPLAYER_MAIN = 21, + MENUPAGE_SAVE_FAILED_1 = 22, + MENUPAGE_SAVE_FAILED_2 = 23, + MENUPAGE_SAVE = 24, + MENUPAGE_NO_MEMORY_CARD = 25, + MENUPAGE_CHOOSE_SAVE_SLOT = 26, + MENUPAGE_SAVE_OVERWRITE_CONFIRM = 27, + MENUPAGE_MULTIPLAYER_MAP = 28, + MENUPAGE_MULTIPLAYER_CONNECTION = 29, + MENUPAGE_MULTIPLAYER_FIND_GAME = 30, + MENUPAGE_MULTIPLAYER_MODE = 31, + MENUPAGE_MULTIPLAYER_CREATE = 32, + MENUPAGE_MULTIPLAYER_START = 33, + MENUPAGE_SKIN_SELECT_OLD = 34, + MENUPAGE_CONTROLLER_PC = 35, + MENUPAGE_CONTROLLER_PC_OLD1 = 36, + MENUPAGE_CONTROLLER_PC_OLD2 = 37, + MENUPAGE_CONTROLLER_PC_OLD3 = 38, + MENUPAGE_CONTROLLER_PC_OLD4 = 39, + MENUPAGE_CONTROLLER_DEBUG = 40, + MENUPAGE_OPTIONS = 41, + MENUPAGE_EXIT = 42, + MENUPAGE_SAVING_IN_PROGRESS = 43, + MENUPAGE_SAVE_SUCCESSFUL = 44, + MENUPAGE_DELETING = 45, + MENUPAGE_DELETE_SUCCESS = 46, + MENUPAGE_SAVE_FAILED = 47, + MENUPAGE_LOAD_FAILED = 48, + MENUPAGE_LOAD_FAILED_2 = 49, + MENUPAGE_FILTER_GAME = 50, + MENUPAGE_START_MENU = 51, + MENUPAGE_PAUSE_MENU = 52, + MENUPAGE_CHOOSE_MODE = 53, + MENUPAGE_SKIN_SELECT = 54, + MENUPAGE_KEYBOARD_CONTROLS = 55, + MENUPAGE_MOUSE_CONTROLS = 56, + MENUPAGE_57 = 57, + MENUPAGE_58 = 58, + MENUPAGES }; -enum eMenuAction { +enum eMenuAction +{ MENUACTION_NOTHING, MENUACTION_LABEL, MENUACTION_CHANGEMENU, @@ -194,7 +204,7 @@ enum eMenuAction { MENUACTION_LANG_ENG, MENUACTION_LANG_FRE, MENUACTION_LANG_GER, - MENUACTION_LANG_IT, + MENUACTION_LANG_ITA, MENUACTION_LANG_SPA, MENUACTION_UPDATESAVE, MENUACTION_CHECKSAVE, @@ -287,11 +297,43 @@ enum eMenuAction { MENUACTION_UNK110, }; -enum eCheckHover { +enum eCheckHover +{ ACTIVATE_OPTION = 2, IGNORE_OPTION = 42, }; +enum eMenuColumns +{ + MENUCOLUMN_LEFT, + MENUCOLUMN_CENTER, + MENUCOLUMN_RIGHT, + MENUCOLUMNS, +}; + +enum eMenuRow +{ + MENUROW_0, + MENUROW_1, + MENUROW_2, + MENUROW_3, + MENUROW_4, + MENUROW_5, + MENUROW_6, + MENUROW_7, + MENUROW_8, + MENUROW_9, + MENUROW_10, + MENUROW_11, + MENUROW_12, + MENUROW_13, + MENUROW_14, + MENUROW_15, + MENUROW_16, + MENUROW_17, + MENUROWS, +}; + struct tSkinInfo { int field_0; @@ -301,18 +343,19 @@ struct tSkinInfo int field_304; }; -struct CMenuScreen { +struct CMenuScreen +{ char m_ScreenName[8]; - int32 m_PreviousPage[3]; // - int32 m_ParentEntry[2]; + int32 m_PreviousPage[3]; // eMenuScreen + int32 m_ParentEntry[2]; // eMenuRow struct CMenuEntry { - int32 m_Action; + int32 m_Action; // eMenuAction char m_EntryName[8]; - int32 m_ActionSlot; - int32 m_TargetMenu; - } m_aEntries[18]; + int32 m_SaveSlot; // eSaveSlot + int32 m_TargetMenu; // eMenuScreen + } m_aEntries[MENUROWS]; }; class CMenuManager @@ -401,12 +444,8 @@ public: static int32 &m_PrefsSfxVolume; static bool &m_bStartUpFrontEndRequested; static bool &m_bShutDownFrontEndRequested; - static bool &m_PrefsAllowNastyGame; -private: - enum eColumns { L, R, COLUMNS, }; - public: void BuildStatLine(char *, void *, uint16, void *); static void CentreMousePointer(); -- cgit v1.2.3 From dd1b56372047c1ffc9f356f0435f6a6cb16e3010 Mon Sep 17 00:00:00 2001 From: _AG Date: Tue, 25 Jun 2019 20:48:05 +0200 Subject: Little fix #52. --- src/Frontend.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Frontend.h') diff --git a/src/Frontend.h b/src/Frontend.h index c515be8c..dd6464b8 100644 --- a/src/Frontend.h +++ b/src/Frontend.h @@ -106,6 +106,7 @@ enum eMenuSprites enum eSaveSlot { SAVESLOT_NONE, + SAVESLOT_0, SAVESLOT_1, SAVESLOT_2, SAVESLOT_3, -- cgit v1.2.3