2020-04-19 18:34:08 +02:00
|
|
|
#pragma once
|
2019-05-30 21:24:47 +02:00
|
|
|
|
|
|
|
#include "Sprite2d.h"
|
|
|
|
|
2020-04-15 18:19:45 +02:00
|
|
|
#ifdef PS2_LIKE_MENU
|
|
|
|
#define MENUHEADER_POS_X 50.0f
|
|
|
|
#define MENUHEADER_POS_Y 75.0f
|
|
|
|
#define MENUHEADER_HEIGHT 1.3f
|
|
|
|
#else
|
2019-06-25 14:25:39 +02:00
|
|
|
#define MENUHEADER_POS_X 35.0f
|
|
|
|
#define MENUHEADER_POS_Y 93.0f
|
|
|
|
#define MENUHEADER_HEIGHT 1.6f
|
2020-04-15 18:19:45 +02:00
|
|
|
#endif
|
|
|
|
#define MENUHEADER_WIDTH 0.84f
|
2019-06-25 02:34:29 +02:00
|
|
|
|
2020-04-10 17:06:49 +02:00
|
|
|
#define MENU_X_MARGIN 40.0f
|
2020-01-07 15:23:09 +01:00
|
|
|
#define MENUACTION_POS_Y 60.0f
|
2020-04-10 17:06:49 +02:00
|
|
|
#define MENUACTION_WIDTH 38.0f
|
2020-04-04 13:39:58 +02:00
|
|
|
#define MENUACTION_SCALE_MULT 0.9f
|
2019-06-25 02:34:29 +02:00
|
|
|
|
2020-04-17 20:22:33 +02:00
|
|
|
#define MENURADIO_ICON_SCALE 60.0f
|
2019-06-25 02:34:29 +02:00
|
|
|
|
2020-01-07 15:23:09 +01:00
|
|
|
#define MENUSLIDER_X 256.0f
|
|
|
|
#define MENUSLIDER_UNK 256.0f
|
2019-06-25 02:34:29 +02:00
|
|
|
|
2020-04-10 17:06:49 +02:00
|
|
|
#define BIGTEXT_X_SCALE 0.75f
|
|
|
|
#define BIGTEXT_Y_SCALE 0.9f
|
|
|
|
#define MEDIUMTEXT_X_SCALE 0.55f
|
|
|
|
#define MEDIUMTEXT_Y_SCALE 0.8f
|
2020-04-04 13:39:58 +02:00
|
|
|
#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 PLAYERSETUP_LIST_TOP 28.0f
|
|
|
|
#define PLAYERSETUP_LIST_BOTTOM 125.0f
|
|
|
|
#define PLAYERSETUP_LIST_LEFT 200.0f
|
|
|
|
#define PLAYERSETUP_LIST_RIGHT 36.0f
|
|
|
|
#ifdef FIX_BUGS // See the scrollbar button drawing code
|
|
|
|
#define PLAYERSETUP_SCROLLBAR_WIDTH 19.0f
|
|
|
|
#else
|
|
|
|
#define PLAYERSETUP_SCROLLBAR_WIDTH 16.0f
|
|
|
|
#endif
|
|
|
|
#define PLAYERSETUP_SCROLLBUTTON_HEIGHT 17.0f
|
|
|
|
#define PLAYERSETUP_SCROLLBUTTON_TXD_DIMENSION 64
|
|
|
|
#define PLAYERSETUP_ROW_TEXT_X_SCALE 0.4f
|
|
|
|
#define PLAYERSETUP_ROW_TEXT_Y_SCALE 0.6f
|
|
|
|
#define PLAYERSETUP_SKIN_COLUMN_LEFT 220.0f
|
|
|
|
#define PLAYERSETUP_DATE_COLUMN_RIGHT 56.0f
|
|
|
|
#define PLAYERSETUP_LIST_BODY_TOP 47
|
|
|
|
#define PLAYERSETUP_ROW_HEIGHT 9
|
|
|
|
|
2020-04-10 17:06:49 +02:00
|
|
|
#define STATS_SLIDE_Y_PER_SECOND 30.0f
|
|
|
|
#define STATS_ROW_HEIGHT 20.0f
|
|
|
|
#define STATS_ROW_X_MARGIN 50.0f
|
|
|
|
#define STATS_BOTTOM_MARGIN 135.0f
|
|
|
|
#define STATS_TOP_MARGIN 40.0f
|
|
|
|
#define STATS_TOP_DIMMING_AREA_LENGTH (93.0f - STATS_TOP_MARGIN)
|
|
|
|
#define STATS_BOTTOM_DIMMING_AREA_LENGTH 55.0f
|
|
|
|
#define STATS_PUT_BACK_TO_BOTTOM_Y 50.0f
|
|
|
|
#define STATS_RATING_X 24.0f
|
|
|
|
#define STATS_RATING_Y 20.0f
|
|
|
|
|
2020-04-17 20:22:33 +02:00
|
|
|
#define BRIEFS_TOP_MARGIN 40.0f
|
|
|
|
#define BRIEFS_LINE_X 50.0f
|
|
|
|
#define BRIEFS_LINE_HEIGHT 60.0f
|
|
|
|
|
2020-04-10 17:06:49 +02:00
|
|
|
#define CONTSETUP_STANDARD_ROW_HEIGHT 10.7f
|
|
|
|
#define CONTSETUP_CLASSIC_ROW_HEIGHT 9.0f
|
|
|
|
#define CONTSETUP_BOUND_HIGHLIGHT_HEIGHT 10
|
|
|
|
#define CONTSETUP_BOUND_COLUMN_WIDTH 190.0f
|
|
|
|
#define CONTSETUP_LIST_HEADER_HEIGHT 20.0f
|
|
|
|
#define CONTSETUP_LIST_TOP 28.0f
|
|
|
|
#define CONTSETUP_LIST_RIGHT 18.0f
|
|
|
|
#define CONTSETUP_LIST_BOTTOM 120.0f
|
|
|
|
#define CONTSETUP_LIST_LEFT 18.0f
|
|
|
|
#define CONTSETUP_COLUMN_1_X 40.0f
|
|
|
|
#define CONTSETUP_COLUMN_2_X 210.0f
|
|
|
|
#define CONTSETUP_COLUMN_3_X (CONTSETUP_COLUMN_2_X + CONTSETUP_BOUND_COLUMN_WIDTH + 10.0f)
|
|
|
|
#define CONTSETUP_BACK_RIGHT 35.0f
|
|
|
|
#define CONTSETUP_BACK_BOTTOM 122.0f
|
|
|
|
#define CONTSETUP_BACK_HEIGHT 25.0f
|
|
|
|
|
2019-06-25 14:25:39 +02:00
|
|
|
enum eLanguages
|
|
|
|
{
|
2019-05-30 23:00:00 +02:00
|
|
|
LANGUAGE_AMERICAN,
|
|
|
|
LANGUAGE_FRENCH,
|
|
|
|
LANGUAGE_GERMAN,
|
|
|
|
LANGUAGE_ITALIAN,
|
|
|
|
LANGUAGE_SPANISH,
|
2020-03-29 08:35:13 +02:00
|
|
|
#ifdef MORE_LANGUAGES
|
2020-04-19 21:32:59 +02:00
|
|
|
LANGUAGE_POLISH,
|
2020-03-29 08:35:13 +02:00
|
|
|
LANGUAGE_RUSSIAN,
|
2020-03-31 07:38:22 +02:00
|
|
|
LANGUAGE_JAPANESE,
|
2020-03-29 08:35:13 +02:00
|
|
|
#endif
|
2019-05-30 23:00:00 +02:00
|
|
|
};
|
|
|
|
|
2019-06-25 14:25:39 +02:00
|
|
|
enum eFrontendSprites
|
|
|
|
{
|
2019-06-25 02:34:29 +02:00
|
|
|
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,
|
2020-04-07 01:15:55 +02:00
|
|
|
|
|
|
|
NUM_FE_SPRITES
|
2019-06-25 02:34:29 +02:00
|
|
|
};
|
|
|
|
|
2019-06-25 14:25:39 +02:00
|
|
|
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,
|
2020-04-07 01:15:55 +02:00
|
|
|
MENUSPRITE_UNUSED,
|
|
|
|
NUM_MENU_SPRITES
|
2019-06-25 02:34:29 +02:00
|
|
|
};
|
|
|
|
|
2019-06-25 14:25:39 +02:00
|
|
|
enum eSaveSlot
|
|
|
|
{
|
|
|
|
SAVESLOT_NONE,
|
2019-06-25 20:48:05 +02:00
|
|
|
SAVESLOT_0,
|
2019-06-25 14:25:39 +02:00
|
|
|
SAVESLOT_1,
|
|
|
|
SAVESLOT_2,
|
|
|
|
SAVESLOT_3,
|
|
|
|
SAVESLOT_4,
|
|
|
|
SAVESLOT_5,
|
|
|
|
SAVESLOT_6,
|
|
|
|
SAVESLOT_7,
|
|
|
|
SAVESLOT_8,
|
|
|
|
SAVESLOT_LABEL = 36
|
2019-06-25 02:34:29 +02:00
|
|
|
};
|
|
|
|
|
2020-04-07 01:15:55 +02:00
|
|
|
#ifdef MENU_MAP
|
|
|
|
enum MapSprites
|
|
|
|
{
|
|
|
|
MAPMID1,
|
|
|
|
MAPMID2,
|
|
|
|
MAPMID3,
|
|
|
|
MAPBOT1,
|
|
|
|
MAPBOT2,
|
|
|
|
MAPBOT3,
|
|
|
|
MAPTOP1,
|
|
|
|
MAPTOP2,
|
|
|
|
MAPTOP3,
|
|
|
|
NUM_MAP_SPRITES
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2019-06-25 14:25:39 +02:00
|
|
|
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,
|
2020-04-12 19:22:28 +02:00
|
|
|
MENUPAGE_NO_MEMORY_CARD = 13, // hud adjustment page in mobile
|
2019-06-25 14:25:39 +02:00
|
|
|
MENUPAGE_LOADING_IN_PROGRESS = 14,
|
|
|
|
MENUPAGE_DELETING_IN_PROGRESS = 15,
|
2020-04-10 17:06:49 +02:00
|
|
|
MENUPAGE_PS2_LOAD_FAILED = 16,
|
2019-06-25 14:25:39 +02:00
|
|
|
MENUPAGE_DELETE_FAILED = 17,
|
|
|
|
MENUPAGE_DEBUG_MENU = 18,
|
2020-04-10 17:06:49 +02:00
|
|
|
MENUPAGE_MEMORY_CARD_DEBUG = 19,
|
|
|
|
MENUPAGE_MEMORY_CARD_TEST = 20,
|
2019-06-25 14:25:39 +02:00
|
|
|
MENUPAGE_MULTIPLAYER_MAIN = 21,
|
2020-04-10 17:06:49 +02:00
|
|
|
MENUPAGE_PS2_SAVE_FAILED = 22,
|
|
|
|
MENUPAGE_PS2_SAVE_FAILED_2 = 23,
|
2019-06-25 14:25:39 +02:00
|
|
|
MENUPAGE_SAVE = 24,
|
2020-04-10 17:06:49 +02:00
|
|
|
MENUPAGE_NO_MEMORY_CARD_2 = 25,
|
2019-06-25 14:25:39 +02:00
|
|
|
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,
|
2020-05-26 23:25:12 +02:00
|
|
|
MENUPAGE_MISSION_RETRY = 57,
|
2019-06-25 14:25:39 +02:00
|
|
|
MENUPAGE_58 = 58,
|
2020-04-07 01:15:55 +02:00
|
|
|
#ifdef MENU_MAP
|
|
|
|
MENUPAGE_MAP = 59,
|
|
|
|
#endif
|
2019-06-25 14:25:39 +02:00
|
|
|
MENUPAGES
|
2019-06-15 01:34:19 +02:00
|
|
|
};
|
|
|
|
|
2019-06-25 14:25:39 +02:00
|
|
|
enum eMenuAction
|
|
|
|
{
|
2019-06-25 08:19:47 +02:00
|
|
|
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,
|
2019-06-25 14:25:39 +02:00
|
|
|
MENUACTION_LANG_ITA,
|
2019-06-25 08:19:47 +02:00
|
|
|
MENUACTION_LANG_SPA,
|
2020-03-17 19:03:13 +01:00
|
|
|
MENUACTION_POPULATESLOTS_CHANGEMENU,
|
2019-06-25 08:19:47 +02:00
|
|
|
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,
|
2020-03-17 19:03:13 +01:00
|
|
|
MENUACTION_RESUME_FROM_SAVEZONE,
|
2019-06-25 08:19:47 +02:00
|
|
|
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,
|
2020-03-17 19:03:13 +01:00
|
|
|
MENUACTION_CANCELGAME,
|
2019-06-25 08:19:47 +02:00
|
|
|
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,
|
2020-03-17 19:03:13 +01:00
|
|
|
MENUACTION_DONTCANCEL,
|
2019-06-25 08:19:47 +02:00
|
|
|
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,
|
2020-05-26 23:25:12 +02:00
|
|
|
MENUACTION_UNK111,
|
|
|
|
MENUACTION_UNK112,
|
|
|
|
MENUACTION_REJECT_RETRY,
|
|
|
|
MENUACTION_UNK114,
|
2020-05-28 02:07:26 +02:00
|
|
|
#ifdef CUSTOM_FRONTEND_OPTIONS
|
|
|
|
MENUACTION_TRIGGERFUNC
|
2020-05-01 20:08:39 +02:00
|
|
|
#endif
|
2019-06-25 08:19:47 +02:00
|
|
|
};
|
|
|
|
|
2019-06-25 14:25:39 +02:00
|
|
|
enum eCheckHover
|
|
|
|
{
|
2019-07-10 09:57:08 +02:00
|
|
|
HOVEROPTION_0,
|
|
|
|
HOVEROPTION_1,
|
2020-03-17 19:03:13 +01:00
|
|
|
HOVEROPTION_RANDOM_ITEM,
|
2019-07-10 09:57:08 +02:00
|
|
|
HOVEROPTION_3,
|
|
|
|
HOVEROPTION_4,
|
|
|
|
HOVEROPTION_5,
|
|
|
|
HOVEROPTION_6,
|
|
|
|
HOVEROPTION_7,
|
|
|
|
HOVEROPTION_8,
|
2020-04-04 13:39:58 +02:00
|
|
|
HOVEROPTION_BACK, // also layer in controller setup and skin menu
|
2019-07-10 09:57:08 +02:00
|
|
|
HOVEROPTION_10,
|
|
|
|
HOVEROPTION_11,
|
2020-03-17 19:03:13 +01:00
|
|
|
HOVEROPTION_OVER_SCROLL_UP,
|
|
|
|
HOVEROPTION_OVER_SCROLL_DOWN,
|
|
|
|
HOVEROPTION_CLICKED_SCROLL_UP,
|
|
|
|
HOVEROPTION_CLICKED_SCROLL_DOWN,
|
|
|
|
HOVEROPTION_HOLDING_SCROLLBAR,
|
|
|
|
HOVEROPTION_PAGEUP,
|
|
|
|
HOVEROPTION_PAGEDOWN,
|
2020-04-04 13:39:58 +02:00
|
|
|
HOVEROPTION_LIST, // also layer in controller setup and skin menu
|
|
|
|
HOVEROPTION_SKIN,
|
|
|
|
HOVEROPTION_USESKIN, // also layer in controller setup and skin menu
|
2020-03-17 19:03:13 +01:00
|
|
|
HOVEROPTION_RADIO_0,
|
|
|
|
HOVEROPTION_RADIO_1,
|
|
|
|
HOVEROPTION_RADIO_2,
|
|
|
|
HOVEROPTION_RADIO_3,
|
|
|
|
HOVEROPTION_RADIO_4,
|
|
|
|
HOVEROPTION_RADIO_5,
|
|
|
|
HOVEROPTION_RADIO_6,
|
|
|
|
HOVEROPTION_RADIO_7,
|
|
|
|
HOVEROPTION_RADIO_8,
|
|
|
|
HOVEROPTION_RADIO_9,
|
|
|
|
HOVEROPTION_INCREASE_BRIGHTNESS,
|
2020-01-07 15:23:09 +01:00
|
|
|
HOVEROPTION_DECREASE_BRIGHTNESS,
|
|
|
|
HOVEROPTION_INCREASE_DRAWDIST,
|
|
|
|
HOVEROPTION_DECREASE_DRAWDIST,
|
|
|
|
HOVEROPTION_INCREASE_MUSICVOLUME,
|
|
|
|
HOVEROPTION_DECREASE_MUSICVOLUME,
|
|
|
|
HOVEROPTION_INCREASE_SFXVOLUME,
|
|
|
|
HOVEROPTION_DECREASE_SFXVOLUME,
|
|
|
|
HOVEROPTION_INCREASE_MOUSESENS,
|
|
|
|
HOVEROPTION_DECREASE_MOUSESENS,
|
2020-03-17 19:03:13 +01:00
|
|
|
HOVEROPTION_NOT_HOVERING,
|
2019-06-25 02:34:29 +02:00
|
|
|
};
|
|
|
|
|
2019-07-14 12:46:36 +02:00
|
|
|
enum
|
2019-06-25 14:25:39 +02:00
|
|
|
{
|
2019-07-14 12:46:36 +02:00
|
|
|
NUM_MENUROWS = 18,
|
2019-06-25 14:25:39 +02:00
|
|
|
};
|
|
|
|
|
2019-10-27 04:17:30 +01:00
|
|
|
enum eControlMethod
|
|
|
|
{
|
2020-04-02 12:48:01 +02:00
|
|
|
CONTROL_STANDARD = 0,
|
2019-10-27 04:17:30 +01:00
|
|
|
CONTROL_CLASSIC,
|
|
|
|
};
|
|
|
|
|
2020-04-04 13:39:58 +02:00
|
|
|
// Why??
|
|
|
|
enum ControllerSetupColumn
|
|
|
|
{
|
|
|
|
CONTSETUP_PED_COLUMN = 0,
|
|
|
|
CONTSETUP_VEHICLE_COLUMN = 14,
|
|
|
|
};
|
|
|
|
|
2019-05-30 21:24:47 +02:00
|
|
|
struct tSkinInfo
|
|
|
|
{
|
2020-04-04 13:39:58 +02:00
|
|
|
int32 skinId;
|
|
|
|
char skinNameDisplayed[256];
|
|
|
|
char skinNameOriginal[256];
|
2019-05-30 21:24:47 +02:00
|
|
|
char date[256];
|
2020-04-04 13:39:58 +02:00
|
|
|
tSkinInfo *nextSkin;
|
2019-05-30 21:24:47 +02:00
|
|
|
};
|
|
|
|
|
2020-03-17 19:03:13 +01:00
|
|
|
struct BottomBarOption
|
|
|
|
{
|
|
|
|
char name[8];
|
|
|
|
int32 screenId;
|
|
|
|
};
|
|
|
|
|
2019-06-25 14:25:39 +02:00
|
|
|
struct CMenuScreen
|
|
|
|
{
|
2019-06-25 02:34:29 +02:00
|
|
|
char m_ScreenName[8];
|
2020-04-10 17:06:49 +02:00
|
|
|
int32 unk; // 2 on MENUPAGE_MULTIPLAYER_START, 1 on everywhere else
|
2019-07-03 17:26:15 +02:00
|
|
|
int32 m_PreviousPage[2]; // eMenuScreen
|
2019-07-14 12:46:36 +02:00
|
|
|
int32 m_ParentEntry[2]; // row
|
2019-06-25 02:34:29 +02:00
|
|
|
|
|
|
|
struct CMenuEntry
|
|
|
|
{
|
2019-06-25 14:25:39 +02:00
|
|
|
int32 m_Action; // eMenuAction
|
2019-06-25 02:34:29 +02:00
|
|
|
char m_EntryName[8];
|
2019-06-25 14:25:39 +02:00
|
|
|
int32 m_SaveSlot; // eSaveSlot
|
2020-05-28 02:07:26 +02:00
|
|
|
int32 m_TargetMenu; // eMenuScreen // FrontendOption ID if it's a custom option
|
2019-07-14 12:46:36 +02:00
|
|
|
} m_aEntries[NUM_MENUROWS];
|
2019-06-25 02:34:29 +02:00
|
|
|
};
|
|
|
|
|
2019-05-30 21:24:47 +02:00
|
|
|
class CMenuManager
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
int32 m_nPrefsVideoMode;
|
|
|
|
int32 m_nDisplayVideoMode;
|
|
|
|
int8 m_nPrefsAudio3DProviderIndex;
|
|
|
|
bool m_bKeyChangeNotProcessed;
|
|
|
|
char m_aSkinName[256];
|
|
|
|
int32 m_nHelperTextMsgId;
|
|
|
|
bool m_bLanguageLoaded;
|
|
|
|
bool m_bMenuActive;
|
2020-03-25 15:13:06 +01:00
|
|
|
bool m_bMenuStateChanged;
|
2020-03-17 19:03:13 +01:00
|
|
|
bool m_bWaitingForNewKeyBind;
|
2020-04-09 01:52:38 +02:00
|
|
|
bool m_bWantToRestart;
|
2019-05-30 21:24:47 +02:00
|
|
|
bool m_bFirstTime;
|
|
|
|
bool m_bGameNotLoaded;
|
|
|
|
int32 m_nMousePosX;
|
|
|
|
int32 m_nMousePosY;
|
|
|
|
int32 m_nMouseTempPosX;
|
|
|
|
int32 m_nMouseTempPosY;
|
|
|
|
bool m_bShowMouse;
|
2020-04-04 13:39:58 +02:00
|
|
|
tSkinInfo m_pSkinListHead;
|
2019-05-30 21:24:47 +02:00
|
|
|
tSkinInfo *m_pSelectedSkin;
|
2020-03-17 19:03:13 +01:00
|
|
|
int32 m_nFirstVisibleRowOnList;
|
2020-04-04 13:39:58 +02:00
|
|
|
float m_nScrollbarTopMargin;
|
2020-03-17 19:03:13 +01:00
|
|
|
int32 m_nTotalListRow;
|
|
|
|
int32 m_nSkinsTotal;
|
2019-05-30 21:24:47 +02:00
|
|
|
char _unk0[4];
|
2020-03-17 19:03:13 +01:00
|
|
|
int32 m_nSelectedListRow;
|
2020-04-04 13:39:58 +02:00
|
|
|
bool m_bSkinsEnumerated;
|
2019-05-30 21:24:47 +02:00
|
|
|
bool m_bQuitGameNoCD;
|
2020-01-07 15:23:09 +01:00
|
|
|
bool m_bRenderGameInMenu;
|
2019-05-30 21:24:47 +02:00
|
|
|
bool m_bSaveMenuActive;
|
2020-04-09 01:52:38 +02:00
|
|
|
bool m_bWantToLoad;
|
2019-05-30 21:24:47 +02:00
|
|
|
char field_455;
|
2020-03-17 19:03:13 +01:00
|
|
|
bool m_bStartWaitingForKeyBind;
|
2019-05-30 21:24:47 +02:00
|
|
|
bool m_bSpritesLoaded;
|
2020-04-07 01:15:55 +02:00
|
|
|
CSprite2d m_aFrontEndSprites[NUM_FE_SPRITES];
|
|
|
|
CSprite2d m_aMenuSprites[NUM_MENU_SPRITES];
|
2020-03-17 19:03:13 +01:00
|
|
|
int32 field_518;
|
|
|
|
int32 m_nMenuFadeAlpha;
|
|
|
|
bool m_bPressedPgUpOnList;
|
|
|
|
bool m_bPressedPgDnOnList;
|
|
|
|
bool m_bPressedUpOnList;
|
|
|
|
bool m_bPressedDownOnList;
|
|
|
|
bool m_bPressedScrollButton;
|
|
|
|
int32 m_CurrCntrlAction;
|
2019-05-30 21:24:47 +02:00
|
|
|
char _unk1[4];
|
2020-04-04 13:39:58 +02:00
|
|
|
int32 m_nSelectedContSetupColumn;
|
2020-03-17 19:03:13 +01:00
|
|
|
bool m_bKeyIsOK;
|
|
|
|
bool field_535;
|
2020-04-04 13:39:58 +02:00
|
|
|
int8 m_nCurrExLayer;
|
2020-03-17 19:03:13 +01:00
|
|
|
int32 m_nHelperTextAlpha;
|
|
|
|
int32 m_nMouseOldPosX;
|
|
|
|
int32 m_nMouseOldPosY;
|
|
|
|
int32 m_nHoverOption;
|
|
|
|
int32 m_nCurrScreen;
|
|
|
|
int32 m_nCurrOption;
|
|
|
|
int32 m_nPrevOption;
|
|
|
|
int32 m_nPrevScreen;
|
2019-07-10 13:42:48 +02:00
|
|
|
uint32 field_558;
|
2020-03-17 19:03:13 +01:00
|
|
|
int32 m_nCurrSaveSlot;
|
|
|
|
int32 m_nScreenChangeDelayTimer;
|
2019-05-30 21:24:47 +02:00
|
|
|
|
2020-04-29 18:08:54 +02:00
|
|
|
#ifdef IMPROVED_VIDEOMODE
|
|
|
|
int32 m_nPrefsWidth;
|
|
|
|
int32 m_nPrefsHeight;
|
|
|
|
int32 m_nPrefsDepth;
|
|
|
|
int32 m_nPrefsWindowed;
|
|
|
|
int32 m_nPrefsSubsystem;
|
2020-05-01 20:08:39 +02:00
|
|
|
int32 m_nSelectedScreenMode;
|
2020-04-29 18:08:54 +02:00
|
|
|
#endif
|
|
|
|
|
2019-10-27 04:17:30 +01:00
|
|
|
public:
|
|
|
|
bool GetIsMenuActive() {return !!m_bMenuActive;}
|
|
|
|
|
2019-07-11 23:29:59 +02:00
|
|
|
public:
|
2020-04-14 02:21:16 +02:00
|
|
|
static int32 OS_Language;
|
|
|
|
static int8 m_PrefsUseVibration;
|
|
|
|
static int8 m_DisplayControllerOnFoot;
|
|
|
|
static int8 m_PrefsUseWideScreen;
|
|
|
|
static int8 m_PrefsRadioStation;
|
|
|
|
static int8 m_PrefsVsync;
|
|
|
|
static int8 m_PrefsVsyncDisp;
|
|
|
|
static int8 m_PrefsFrameLimiter;
|
|
|
|
static int8 m_PrefsShowSubtitles;
|
|
|
|
static int8 m_PrefsSpeakers;
|
|
|
|
static int32 m_ControlMethod;
|
|
|
|
static int8 m_PrefsDMA;
|
|
|
|
static int32 m_PrefsLanguage;
|
|
|
|
static int32 m_PrefsBrightness;
|
|
|
|
static float m_PrefsLOD;
|
|
|
|
static int8 m_bFrontEnd_ReloadObrTxtGxt;
|
|
|
|
static int32 m_PrefsMusicVolume;
|
|
|
|
static int32 m_PrefsSfxVolume;
|
|
|
|
static char m_PrefsSkinFile[256];
|
|
|
|
static int32 m_KeyPressedCode;
|
2019-07-03 17:26:15 +02:00
|
|
|
|
2020-04-14 02:21:16 +02:00
|
|
|
static bool m_bStartUpFrontEndRequested;
|
|
|
|
static bool m_bShutDownFrontEndRequested;
|
|
|
|
static bool m_PrefsAllowNastyGame;
|
2019-11-09 16:17:54 +01:00
|
|
|
|
2020-04-10 17:06:49 +02:00
|
|
|
static uint8 m_PrefsStereoMono;
|
|
|
|
static int32 m_SelectedMap;
|
|
|
|
static int32 m_SelectedGameType;
|
|
|
|
static uint8 m_PrefsPlayerRed;
|
|
|
|
static uint8 m_PrefsPlayerGreen;
|
|
|
|
static uint8 m_PrefsPlayerBlue;
|
2019-05-30 21:24:47 +02:00
|
|
|
|
2020-04-09 20:50:24 +02:00
|
|
|
#ifndef MASTER
|
|
|
|
static bool m_PrefsMarketing;
|
|
|
|
static bool m_PrefsDisableTutorials;
|
|
|
|
#endif // !MASTER
|
2020-03-31 12:30:13 +02:00
|
|
|
|
2020-04-07 01:15:55 +02:00
|
|
|
#ifdef MENU_MAP
|
|
|
|
static bool bMenuMapActive;
|
2020-04-10 17:06:49 +02:00
|
|
|
static bool bMapMouseShownOnce;
|
2020-04-12 19:22:28 +02:00
|
|
|
static bool bMapLoaded;
|
2020-04-07 01:15:55 +02:00
|
|
|
static float fMapSize;
|
|
|
|
static float fMapCenterY;
|
|
|
|
static float fMapCenterX;
|
|
|
|
static CSprite2d m_aMapSprites[NUM_MAP_SPRITES];
|
|
|
|
void PrintMap();
|
|
|
|
#endif
|
2020-03-31 12:30:13 +02:00
|
|
|
|
2019-06-25 02:34:29 +02:00
|
|
|
public:
|
2020-05-12 01:24:57 +02:00
|
|
|
static void BuildStatLine(Const char *text, void *stat, bool itsFloat, void *stat2);
|
2019-06-25 02:34:29 +02:00
|
|
|
static void CentreMousePointer();
|
2020-04-10 17:06:49 +02:00
|
|
|
void CheckCodesForControls(int);
|
2019-06-25 02:34:29 +02:00
|
|
|
bool CheckHover(int x1, int x2, int y1, int y2);
|
2019-07-03 17:26:15 +02:00
|
|
|
void CheckSliderMovement(int);
|
2019-06-25 02:34:29 +02:00
|
|
|
int CostructStatLine(int);
|
|
|
|
void DisplayHelperText();
|
2020-01-07 15:23:09 +01:00
|
|
|
int DisplaySlider(float, float, float, float, float, float);
|
2019-06-25 02:34:29 +02:00
|
|
|
void DoSettingsBeforeStartingAGame();
|
|
|
|
void Draw();
|
2020-04-04 13:39:58 +02:00
|
|
|
void DrawControllerBound(int32, int32, int32, int8);
|
2019-06-25 02:34:29 +02:00
|
|
|
void DrawControllerScreenExtraText(int, int, int);
|
|
|
|
void DrawControllerSetupScreen();
|
|
|
|
void DrawFrontEnd();
|
|
|
|
void DrawFrontEndNormal();
|
2020-01-07 15:23:09 +01:00
|
|
|
#ifdef PS2_SAVE_DIALOG
|
|
|
|
void DrawFrontEndSaveZone();
|
|
|
|
#endif
|
2019-06-25 02:34:29 +02:00
|
|
|
void DrawPlayerSetupScreen();
|
2019-06-15 01:34:19 +02:00
|
|
|
int FadeIn(int alpha);
|
2020-04-10 17:06:49 +02:00
|
|
|
void FilterOutColorMarkersFromString(wchar*, CRGBA &);
|
2019-06-25 02:34:29 +02:00
|
|
|
int GetStartOptionsCntrlConfigScreens();
|
|
|
|
static void InitialiseChangedLanguageSettings();
|
|
|
|
void LoadAllTextures();
|
|
|
|
void LoadSettings();
|
2020-04-10 17:06:49 +02:00
|
|
|
void MessageScreen(const char *);
|
|
|
|
void PickNewPlayerColour();
|
2019-06-25 02:34:29 +02:00
|
|
|
void PrintBriefs();
|
|
|
|
static void PrintErrorMessage();
|
|
|
|
void PrintStats();
|
|
|
|
void Process();
|
|
|
|
void ProcessButtonPresses();
|
|
|
|
void ProcessOnOffMenuOptions();
|
2020-03-17 19:03:13 +01:00
|
|
|
static void RequestFrontEndShutDown();
|
2019-06-25 02:34:29 +02:00
|
|
|
static void RequestFrontEndStartUp();
|
|
|
|
void ResetHelperText();
|
|
|
|
void SaveLoadFileError_SetUpErrorScreen();
|
|
|
|
void SaveSettings();
|
|
|
|
void SetHelperText(int text);
|
|
|
|
void ShutdownJustMenu();
|
2019-07-11 23:29:59 +02:00
|
|
|
float StretchX(float);
|
|
|
|
float StretchY(float);
|
2019-06-25 02:34:29 +02:00
|
|
|
void SwitchMenuOnAndOff();
|
|
|
|
void UnloadTextures();
|
|
|
|
void WaitForUserCD();
|
2020-01-10 23:48:05 +01:00
|
|
|
void PrintController();
|
2020-04-04 13:39:58 +02:00
|
|
|
int GetNumOptionsCntrlConfigScreens();
|
2020-04-10 17:06:49 +02:00
|
|
|
int ConstructStatLine(int);
|
2019-07-03 17:26:15 +02:00
|
|
|
|
2020-05-28 02:07:26 +02:00
|
|
|
// New (inlined ones and the ones we can't believe it's not inlined)
|
|
|
|
void ThingsToDoBeforeGoingBack();
|
2020-03-25 15:13:06 +01:00
|
|
|
void ScrollUpListByOne();
|
|
|
|
void ScrollDownListByOne();
|
|
|
|
void PageUpList(bool);
|
|
|
|
void PageDownList(bool);
|
2020-05-28 02:07:26 +02:00
|
|
|
int8 GetPreviousPageOption();
|
2020-03-25 15:13:06 +01:00
|
|
|
|
|
|
|
// uint8 GetNumberOfMenuOptions();
|
2019-05-30 21:24:47 +02:00
|
|
|
};
|
2019-06-15 01:34:19 +02:00
|
|
|
|
2020-04-29 18:08:54 +02:00
|
|
|
#ifndef IMPROVED_VIDEOMODE
|
2020-05-10 17:49:33 +02:00
|
|
|
VALIDATE_SIZE(CMenuManager, 0x564);
|
2020-04-29 18:08:54 +02:00
|
|
|
#endif
|
2019-05-30 21:24:47 +02:00
|
|
|
|
2020-04-13 04:32:11 +02:00
|
|
|
extern CMenuManager FrontEndMenuManager;
|
2020-05-28 02:07:26 +02:00
|
|
|
extern CMenuScreen aScreens[];
|