diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/Frontend.h | 254 |
1 files changed, 109 insertions, 145 deletions
diff --git a/src/core/Frontend.h b/src/core/Frontend.h index e40efeea..20ada82b 100644 --- a/src/core/Frontend.h +++ b/src/core/Frontend.h @@ -9,28 +9,41 @@ #else #define MENUHEADER_POS_X 10.0f #define MENUHEADER_POS_Y 10.0f -#define MENUHEADER_HEIGHT 1.6f +#define MENUHEADER_HEIGHT 2.0f #endif -#define MENUHEADER_WIDTH 0.84f +#define MENUHEADER_WIDTH 1.0f + +#define MENU_UNK_X_MARGIN 10.0f +#define MENU_UNK_WIDTH 10.0f -#define MENU_X_MARGIN 40.0f -#define MENUACTION_POS_Y 60.0f -#define MENUACTION_WIDTH 38.0f #define MENUACTION_SCALE_MULT 0.9f -#define MENURADIO_ICON_SCALE 60.0f +#define MENULABEL_X_MARGIN 80.0f +#define MENULABEL_WIDTH 80.0f +#define MENULABEL_POS_X 100.0f +#define MENULABEL_POS_Y 97.0f -#define MENUSLIDER_X 128.0f -#define MENUSLIDER_UNK 256.0f +#define MENU_DEFAULT_CONTENT_X 320 +#define MENU_DEFAULT_CONTENT_Y 100 +#define MENU_DEFAULT_LINE_HEIGHT 29 -#define BIGTEXT_X_SCALE 0.75f -#define BIGTEXT_Y_SCALE 0.9f -#define MEDIUMTEXT_X_SCALE 0.55f -#define MEDIUMTEXT_Y_SCALE 0.8f -#define SMALLTEXT_X_SCALE 0.45f -#define SMALLTEXT_Y_SCALE 0.7f -#define SMALLESTTEXT_X_SCALE 0.4f -#define SMALLESTTEXT_Y_SCALE 0.6f +#define MENURADIO_ICON_SCALE 60.0f + +#define MENUSLIDER_X 500.0f +#define MENUSLIDER_UNK 100.0f +#define MENUSLIDER_SMALLEST_BAR 8.0f +#define MENUSLIDER_BIGGEST_BAR 25.0f + +#define BIGTEXT2_X_SCALE 0.6f +#define BIGTEXT2_Y_SCALE 1.2f +#define BIGTEXT_X_SCALE 0.6f +#define BIGTEXT_Y_SCALE 1.0f +#define MEDIUMTEXT_X_SCALE 0.48f +#define MEDIUMTEXT_Y_SCALE 1.0f +#define SMALLTEXT_X_SCALE 0.42f +#define SMALLTEXT_Y_SCALE 0.9f +#define SMALLESTTEXT_X_SCALE 0.3f +#define SMALLESTTEXT_Y_SCALE 0.7f #define PLAYERSETUP_LIST_TOP 28.0f #define PLAYERSETUP_LIST_BOTTOM 125.0f @@ -95,6 +108,13 @@ enum eLanguages #endif }; +enum +{ + MENUALIGN_LEFT = 1, + MENUALIGN_RIGHT, + MENUALIGN_CENTER, +}; + enum eMenuSprites { MENUSPRITE_BACKGROUND, @@ -144,67 +164,49 @@ enum eSaveSlot 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_STATS = 0, + MENUPAGE_NEW_GAME = 1, + MENUPAGE_BRIEFS = 2, + MENUPAGE_SOUND_SETTINGS = 3, + MENUPAGE_GRAPHICS_SETTINGS = 4, + MENUPAGE_LANGUAGE_SETTINGS = 5, + MENUPAGE_MAP = 6, + MENUPAGE_NEW_GAME_RELOAD = 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_NO_MEMORY_CARD = 13, // hud adjustment page in mobile - MENUPAGE_LOADING_IN_PROGRESS = 14, - MENUPAGE_DELETING_IN_PROGRESS = 15, - MENUPAGE_PS2_LOAD_FAILED = 16, - MENUPAGE_DELETE_FAILED = 17, - MENUPAGE_DEBUG_MENU = 18, - MENUPAGE_MEMORY_CARD_DEBUG = 19, - MENUPAGE_MEMORY_CARD_TEST = 20, - MENUPAGE_MULTIPLAYER_MAIN = 21, - MENUPAGE_PS2_SAVE_FAILED = 22, - MENUPAGE_PS2_SAVE_FAILED_2 = 23, - MENUPAGE_SAVE = 24, - MENUPAGE_NO_MEMORY_CARD_2 = 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, // mission failed, wanna restart page in mobile - MENUPAGE_58 = 58, -#ifdef MENU_MAP - MENUPAGE_MAP = 59, + MENUPAGE_LOAD_SLOT_CONFIRM = 10, + MENUPAGE_DELETE_SLOT_CONFIRM = 11, + MENUPAGE_LOADING_IN_PROGRESS = 12, + MENUPAGE_DELETING_IN_PROGRESS = 13, + MENUPAGE_DELETE_SUCCESSFUL = 14, + MENUPAGE_CHOOSE_SAVE_SLOT = 15, + MENUPAGE_SAVE_OVERWRITE_CONFIRM = 16, + MENUPAGE_SAVING_IN_PROGRESS = 17, + MENUPAGE_SAVE_SUCCESSFUL = 18, + MENUPAGE_SAVE_CUSTOM_WARNING = 19, + MENUPAGE_SAVE_CHEAT_WARNING = 20, + MENUPAGE_SKIN_SELECT = 21, + MENUPAGE_SAVE_UNUSED = 22, + MENUPAGE_SAVE_FAILED = 23, + MENUPAGE_SAVE_FAILED_2 = 24, + MENUPAGE_LOAD_FAILED = 25, + MENUPAGE_CONTROLLER_PC = 26, + MENUPAGE_OPTIONS = 27, + MENUPAGE_EXIT = 28, + MENUPAGE_START_MENU = 29, + MENUPAGE_KEYBOARD_CONTROLS = 30, + MENUPAGE_MOUSE_CONTROLS = 31, + MENUPAGE_PAUSE_MENU = 32, + MENUPAGE_NONE = 33, // Then chooses main menu or pause menu + MENUPAGE_OUTRO = 34, +#ifdef LEGACY_MENU_OPTIONS + MENUPAGE_CONTROLLER_SETTINGS, + MENUPAGE_DEBUG_MENU, + MENUPAGE_CONTROLLER_PC_OLD1, + MENUPAGE_CONTROLLER_PC_OLD2, + MENUPAGE_CONTROLLER_PC_OLD3, + MENUPAGE_CONTROLLER_PC_OLD4, + MENUPAGE_CONTROLLER_DEBUG, #endif MENUPAGES }; @@ -213,20 +215,19 @@ enum eMenuAction { MENUACTION_NOTHING, MENUACTION_LABEL, + MENUACTION_YES, + MENUACTION_NO, 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, @@ -235,74 +236,33 @@ enum eMenuAction MENUACTION_LANG_SPA, MENUACTION_POPULATESLOTS_CHANGEMENU, MENUACTION_CHECKSAVE, - MENUACTION_UNK24, MENUACTION_NEWGAME, + MENUACTION_RESUME_FROM_SAVEZONE, MENUACTION_RELOADIDE, - MENUACTION_RELOADIPL, MENUACTION_SETDBGFLAG, + MENUACTION_LOADRADIO, + MENUACTION_SAVEGAME, + + // Below this is TODO(Miami) + MENUACTION_DRAWDIST, 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_LEGENDS, + MENUACTION_RADARMODE, + MENUACTION_HUD, + MENUACTION_GOBACK, + MENUACTION_KEYBOARDCTRLS, MENUACTION_PARSEHEAP, - MENUACTION_SHOWCULL, - MENUACTION_MEMCARDSAVECONFIRM, - MENUACTION_RESUME_FROM_SAVEZONE, - MENUACTION_UNK50, + // MENUACTION_MEMCARDSAVECONFIRM is that on VC enum?? 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_CANCELGAME, - 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_MP3VOLUMEBOOST, MENUACTION_RESUME, MENUACTION_DONTCANCEL, MENUACTION_SCREENRES, @@ -312,7 +272,6 @@ enum eMenuAction MENUACTION_RESTOREDEF, MENUACTION_CTRLMETHOD, MENUACTION_DYNAMICACOUSTIC, - MENUACTION_LOADRADIO, MENUACTION_MOUSESTEER, MENUACTION_UNK103, MENUACTION_UNK104, @@ -384,7 +343,11 @@ enum eCheckHover enum { - NUM_MENUROWS = 18, +#ifdef LEGACY_MENU_OPTIONS + NUM_MENUROWS = 13, +#else + NUM_MENUROWS = 12, +#endif }; enum eControlMethod @@ -418,9 +381,8 @@ struct BottomBarOption struct CMenuScreen { char m_ScreenName[8]; - int32 unk; // 2 on MENUPAGE_MULTIPLAYER_START, 1 on everywhere else - int32 m_PreviousPage[2]; // eMenuScreen - int32 m_ParentEntry[2]; // row + int32 m_PreviousPage; // eMenuScreen + int32 m_ParentEntry; // row struct CMenuEntry { @@ -428,6 +390,9 @@ struct CMenuScreen char m_EntryName[8]; int32 m_SaveSlot; // eSaveSlot int32 m_TargetMenu; // eMenuScreen + uint16 m_X; + uint16 m_Y; + uint8 m_Align; } m_aEntries[NUM_MENUROWS]; }; @@ -570,9 +535,9 @@ public: int32 m_nCurrScreen; int32 m_nPrevScreen; int32 m_nCurrSaveSlot; - int32 m_LastScreenSwitch; + uint32 m_LastScreenSwitch; int32 m_nMenuFadeAlpha; - int32 bOptionHighlightTransitionBlend; + int32 m_nOptionHighlightTransitionBlend; bool bMenuChangeOngoing; int32 MouseButtonJustClicked; int32 JoyButtonJustClicked; @@ -651,12 +616,13 @@ public: bool CheckHover(int x1, int x2, int y1, int y2); void CheckSliderMovement(int); void DisplayHelperText(); - int DisplaySlider(float, float, float, float, float, float); + int DisplaySlider(float, float, float, float, float, float, float); void DoSettingsBeforeStartingAGame(); - void DrawStandardMenus(); + void DrawStandardMenus(bool); void DrawControllerBound(int32, int32, int32, int8); void DrawControllerScreenExtraText(int, int, int); void DrawControllerSetupScreen(); + void DrawQuitGameScreen(); void DrawFrontEnd(); void DrawBackground(bool transitionCall); void DrawPlayerSetupScreen(); @@ -666,9 +632,8 @@ public: void InitialiseChangedLanguageSettings(); void LoadAllTextures(); void LoadSettings(); - void MessageScreen(const char *); - // TODO(MIAMI): implement the second argument - void MessageScreen(const char *str, bool) { MessageScreen(str); } + void MessageScreen(const char *str, bool); + void SmallMessageScreen(const char *str); void PrintBriefs(); static void PrintErrorMessage(); void PrintStats(); @@ -679,7 +644,6 @@ public: void RequestFrontEndShutDown(); void RequestFrontEndStartUp(); void ResetHelperText(); - void SaveLoadFileError_SetUpErrorScreen(); void SaveSettings(); void SetHelperText(int text); float StretchX(float); |