diff options
Diffstat (limited to '')
-rw-r--r-- | src/Frontend.cpp | 740 | ||||
-rw-r--r-- | src/Frontend.h | 305 | ||||
-rw-r--r-- | src/MenuScreens.h | 380 | ||||
-rw-r--r-- | src/Timer.h | 3 | ||||
-rw-r--r-- | src/audio/AudioManager.cpp | 2 | ||||
-rw-r--r-- | src/audio/AudioManager.h | 1 | ||||
-rw-r--r-- | src/audio/DMAudio.cpp | 6 | ||||
-rw-r--r-- | src/audio/DMAudio.h | 3 |
8 files changed, 772 insertions, 668 deletions
diff --git a/src/Frontend.cpp b/src/Frontend.cpp index 01acb740..1cac3d2b 100644 --- a/src/Frontend.cpp +++ b/src/Frontend.cpp @@ -19,6 +19,7 @@ #include "PCSave.h" #include "Script.h" #include "Camera.h" +#include "MenuScreens.h" int32 &CMenuManager::OS_Language = *(int32*)0x5F2F78; int8 &CMenuManager::m_PrefsUseVibration = *(int8*)0x95CD92; @@ -48,386 +49,6 @@ int32 &CMenuManager::m_PrefsSfxVolume = *(int32*)0x5F2E48; CMenuManager &FrontEndMenuManager = *(CMenuManager*)0x8F59D8; -// TODO: replace magic numbers with enums -const CMenuScreen aScreens[] = { - // MENU_PAGE_NONE = 0 - { "", -1, -1, 1, 0, 0, }, - - // MENU_PAGE_STATS = 1 - { "FET_STA", 0, 0, 0, 5, 2, - 2, "FEDS_TB", 0, 0, - }, - - // MENU_PAGE_NEW_GAME = 2 - { "FET_SGA", 0, 0, 0, 0, 1, - 2, "FES_SNG", 0, 10, - 22, "GMLOAD", 0, 8, - 2, "FES_DGA", 0, 9, - 2, "FEDS_TB", 0, 0, - }, - - // MENU_PAGE_BRIEFS = 3 - { "FET_BRE", 0, 0, 0, 6, 3, - 2, "FEDS_TB", 0, 0, - }, - - // MENU_CONTROLLER_SETTINGS = 4 - { "FET_CON", 41, 41, 41, 0, 0, - - }, - - // MENU_PAGE_SOUND_SETTINGS = 5 - { "FET_AUD", 41, 41, 41, 1, 1, - 13, "FEA_MUS", 0, 5, - 14, "FEA_SFX", 0, 5, - 95, "FEA_3DH", 0, 5, - 96, "FEA_SPK", 0, 5, - 100, "FET_DAM", 0, 5, - 16, "FEA_RSS", 0, 5, - 98, "FET_DEF", 0, 5, - 2, "FEDS_TB", 0, 0, - }, - - // MENU_PAGE_GRAPHICS_SETTINGS = 6 - { "FET_DIS", 41, 41, 41, 2, 2, - 11, "FED_BRI", 0, 6, - 12, "FEM_LOD", 0, 6, - 6, "FEM_VSC", 0, 6, - 7, "FEM_FRM", 0, 6, - 8, "FED_TRA", 0, 6, - 9, "FED_SUB", 0, 6, - 10, "FED_WIS", 0, 6, - 94, "FED_RES", 0, 6, - 98, "FET_DEF", 0, 6, - 2, "FEDS_TB", 0, 0, - }, - - // MENU_PAGE_LANGUAGE_SETTINGS = 7 - { "FET_LAN", 41, 41, 41, 3, 3, - 17, "FEL_ENG", 0, 7, - 18, "FEL_FRE", 0, 7, - 19, "FEL_GER", 0, 7, - 20, "FEL_ITA", 0, 7, - 21, "FEL_SPA", 0, 7, - 2, "FEDS_TB", 0, 0, - }, - - // MENU_PAGE_CHOOSE_LOAD_SLOT = 8 - { "FET_LG", 2, 2, 2, 1, 1, - 2, "FESZ_CA", 0, 2, - 23, "FEM_SL1", 2, 11, - 23, "FEM_SL2", 3, 11, - 23, "FEM_SL3", 4, 11, - 23, "FEM_SL4", 5, 11, - 23, "FEM_SL5", 6, 11, - 23, "FEM_SL6", 7, 11, - 23, "FEM_SL7", 8, 11, - 23, "FEM_SL8", 9, 11, - }, - - // MENU_PAGE_CHOOSE_DELETE_SLOT = 9 - { "FET_DG", 2, 2, 2, 2, 2, - 2, "FESZ_CA", 0, 2, - 2, "FEM_SL1", 2, 12, - 2, "FEM_SL2", 3, 12, - 2, "FEM_SL3", 4, 12, - 2, "FEM_SL4", 5, 12, - 2, "FEM_SL5", 6, 12, - 2, "FEM_SL6", 7, 12, - 2, "FEM_SL7", 8, 12, - 2, "FEM_SL8", 9, 12, - }, - - // MENU_PAGE_NEW_GAME_RELOAD = 10 - { "FET_NG", 2, 2, 2, 0, 0, - 1, "FESZ_QR", 0, 0, - 2, "FEM_NO", 0, 2, - 25, "FEM_YES", 0, 10, - }, - - // MENU_PAGE_LOAD_SLOT_CONFIRM = 11 - { "FET_LG", 8, 8, 8, 0, 0, - 1, "FESZ_QL", 0, 0, - 2, "FEM_NO", 0, 8, - 2, "FEM_YES", 0, 14, - }, - - // MENU_PAGE_DELETE_SLOT_CONFIRM = 12 - { "FET_DG", 9, 9, 9, 0, 0, - 1, "FESZ_QD", 0, 0, - 2, "FEM_NO", 0, 9, - 2, "FEM_YES", 0, 45, - }, - - // MENU_PAGE_13 = 13 - { "FES_NOC", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_LOADING_IN_PROGRESS = 14 - { "FET_LG", -1, -1, -1, 0, 0, - 1, "FED_LDW", 0, 11, - }, - - // MENU_PAGE_DELETING_IN_PROGRESS = 15 - { "FET_DG", -1, -1, -1, 0, 0, - 1, "FEDL_WR", 0, 0, - }, - - // MENU_PAGE_16 = 16 - { "FET_LG", -1, -1, -1, 0, 0, - 1, "FES_LOE", 0, 0, - }, - - // MENU_PAGE_DELETE_FAILED = 17 - { "FET_DG", -1, -1, -1, 0, 0, - 1, "FES_DEE", 0, 0, - 2, "FEC_OKK", 0, 9, - }, - - // MENU_PAGE_DEBUG_MENU = 18 - { "FED_DBG", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_MEMORY_CARD_1 = 19 - { "FEM_MCM", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_MEMORY_CARD_2 = 20 - { "FEM_MC2", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_MULTIPLAYER_MAIN = 21 - { "FET_MP", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_SAVE_FAILED_1 = 22 - { "MCDNSP", -1, -1, -1, 0, 0, - 48, "JAILB_U", 0, 0, - }, - - // MENU_PAGE_SAVE_FAILED_2 = 23 - { "MCGNSP", -1, -1, -1, 0, 0, - 48, "JAILB_U", 0, 0, - }, - - // MENU_PAGE_SAVE = 24 - { "FET_SG", -1, -1, -1, 0, 0, - 1, "FES_SCG", 0, 0, - 22, "GMSAVE", 0, 26, - 49, "FESZ_CA", 0, 0, - }, - - // MENU_PAGE_NO_MEMORY_CARD = 25 - { "FES_NOC", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_CHOOSE_SAVE_SLOT = 26 - { "FET_SG", -1, -1, -1, 0, 0, - 49, "FESZ_CA", 0, 0, - 2, "FEM_SL1", 2, 27, - 2, "FEM_SL2", 3, 27, - 2, "FEM_SL3", 4, 27, - 2, "FEM_SL4", 5, 27, - 2, "FEM_SL5", 6, 27, - 2, "FEM_SL6", 7, 27, - 2, "FEM_SL7", 8, 27, - 2, "FEM_SL8", 9, 27, - }, - - // MENU_PAGE_SAVE_OVERWRITE_CONFIRM = 27 - { "FET_SG", 26, 26, 26, 0, 0, - 1, "FESZ_QO", 0, 0, - 2, "FEM_YES", 0, 43, - 2, "FEM_NO", 0, 26, - }, - - // MENU_PAGE_MULTIPLAYER_MAP = 28 - { "FET_MAP", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_MULTIPLAYER_CONNECTION = 29 - { "FET_CON", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_MULTIPLAYER_FIND_GAME = 30 - { "FET_FG", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_MULTIPLAYER_MODE = 31 - { "FET_GT", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_MULTIPLAYER_CREATE = 32 - { "FET_HG", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_MULTIPLAYER_START = 33 - { "FEN_STA", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_SKIN_SELECT_OLD = 34 - { "FET_PS", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_CONTROLLER_PC = 35 - { "FET_CTL", 41, 41, 41, 0, 0, - 99, "FET_CME", 0, 35, - 72, "FET_RDK", 0, 55, - 2, "FET_AMS", 0, 56, - 98, "FET_DEF", 0, 35, - 2, "FEDS_TB", 0, 0, - }, - - // MENU_PAGE_CONTROLLER_PC_OLD1 = 36 - { "FET_CTL", 35, 35, 35, 0, 0, - - }, - - // MENU_PAGE_CONTROLLER_PC_OLD2 = 37 - { "FET_CTL", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_CONTROLLER_PC_OLD3 = 38 - { "FET_CTL", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_CONTROLLER_PC_OLD4 = 39 - { "FET_CTL", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_CONTROLLER_DEBUG = 40 - { "FEC_DBG", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_OPTIONS = 41 - { "FET_OPT", 0, 0, 0, 1, 4, - 2, "FET_CTL", 0, 35, - 101, "FET_AUD", 0, 5, - 2, "FET_DIS", 0, 6, - 2, "FET_LAN", 0, 7, - 97, "FET_PSU", 0, 54, - 2, "FEDS_TB", 0, 0, - }, - - // MENU_PAGE_EXIT = 42 - { "FET_QG", 0, 0, 0, 2, 5, - 1, "FEQ_SRE", 0, 0, - 93, "FEM_NO", 0, 0, - 82, "FEM_YES", 0, 0, - }, - - // MENU_PAGE_SAVING_IN_PROGRESS = 43 - { "", 26, 26, 26, 0, 0, - 1, "FES_WAR", 0, 0, - }, - - // MENU_PAGE_SAVE_SUCCESSFUL = 44 - { "FET_SG", 26, 26, 26, 0, 0, - 1, "FES_SSC", 36, 0, - 49, "FEC_OKK", 0, 26, - }, - - // MENU_PAGE_DELETING = 45 - { "FET_DG", 9, 9, 9, 0, 0, - 1, "FED_DLW", 0, 0, - }, - - // MENU_PAGE_DELETE_SUCCESS = 46 - { "FET_DG", 9, 9, 9, 0, 0, - 1, "DEL_FNM", 0, 0, - 2, "FEC_OKK", 0, 9, - }, - - // MENU_PAGE_SAVE_FAILED = 47 - { "FET_SG", 26, 26, 26, 0, 0, - 1, "FEC_SVU", 0, 0, - 2, "FEC_OKK", 0, 26, - }, - - // MENU_PAGE_LOAD_FAILED = 48 - { "FET_SG", 26, 26, 26, 0, 0, - 1, "FEC_SVU", 0, 0, - }, - - // MENU_PAGE_LOAD_FAILED_2 = 49 - { "FET_LG", 26, 26, 26, 0, 0, - 1, "FEC_LUN", 0, 0, - 2, "FEDS_TB", 0, 8, - }, - - // MENU_PAGE_FILTER_GAME = 50 - { "FIL_FLT", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_START_MENU = 51 - { "FEM_MM", -1, -1, -1, 0, 0, - 2, "FEN_STA", 0, 2, - 2, "FET_OPT", 0, 41, - 2, "FEM_QT", 0, 42 - }, - - // MENU_PAGE_PAUSE_MENU = 52 - { "FET_PAU", -1, -1, -1, 0, 0, - 92, "FEM_RES", 0, 0, - 2, "FEN_STA", 0, 2, - 2, "FEP_STA", 0, 1, - 2, "FEP_BRI", 0, 3, - 2, "FET_OPT", 0, 41, - 2, "FEM_QT", 0, 42, - }, - - // MENU_PAGE_CHOOSE_MODE = 53 - { "FEN_STA", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_SKIN_SELECT = 54 - { "FET_PSU", 41, 41, 41, 4, 4, - 35, "FEDS_TB", 0, 21, - }, - - // MENU_PAGE_KEYBOARD_CONTROLS = 55 - { "FET_STI", 35, 35, 35, 1, 1, - 35, "FEDS_TB", 0, 35, - }, - - // MENU_PAGE_MOUSE_CONTROLS = 56 - { "FET_MTI", 35, 35, 35, 2, 2, - 84, "FEC_MSH", 0, 35, - 81, "FEC_IVV", 0, 35, - 102, "FET_MST", 0, 35, - 2 , "FEDS_TB", 0, 0, - }, - - // MENU_PAGE_57 = 57 - { "", -1, -1, -1, 0, 0, - - }, - - // MENU_PAGE_58 = 58 - { "", -1, -1, -1, 0, 0, - - }, -}; - char *FrontendFilenames[] = { "fe2_mainpanel_ul", "fe2_mainpanel_ur", @@ -567,8 +188,8 @@ void CMenuManager::DisplayHelperText() CFont::SetAlignment(ALIGN_CENTER); CFont::SetScale(SCREEN_SCALE_X(0.4f), SCREEN_SCALE_Y(0.6f)); CFont::SetFontStyle(FONT_HEADING); - CFont::SetDropColor(CRGBA(0, 0, 0, DROP_COLOR_A)); - CFont::SetDropShadowPosition(DROP_COLOR_SIZE); + CFont::SetDropColor(CRGBA(0, 0, 0, MENUDROP_COLOR_A)); + CFont::SetDropShadowPosition(MENUDROP_COLOR_SIZE); CFont::SetColor(CRGBA(255, 255, 255, 255)); CFont::PrintString(SCREEN_WIDTH / 2, SCREEN_SCALE_FROM_BOTTOM(120.0f), str); @@ -627,16 +248,16 @@ void CMenuManager::Draw() CFont::SetBackGroundOnlyTextOn(); CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(40.0f)); CFont::SetRightJustifyWrap(0.0f); - CFont::SetDropColor(CRGBA(0, 0, 0, FadeIn(DROP_COLOR_A))); + CFont::SetDropColor(CRGBA(0, 0, 0, FadeIn(MENUDROP_COLOR_A))); switch (m_nCurrScreen) { - case MENU_STATS: + case MENUPAGE_STATS: PrintStats(); break; - case MENU_BRIEFS: + case MENUPAGE_BRIEFS: PrintBriefs(); break; - case MENU_CONTROLLER_DEBUG: + case MENUPAGE_CONTROLLER_DEBUG: DrawControllerScreenExtraText(0, 350, 20); break; } @@ -647,27 +268,27 @@ void CMenuManager::Draw() CFont::SetColor(CRGBA(0, 0, 0, FadeIn(255))); CFont::SetRightJustifyOn(); CFont::SetFontStyle(FONT_HEADING); - CFont::SetScale(SCREEN_SCALE_X(HEADER_WIDTH), SCREEN_SCALE_Y(HEADER_HEIGHT)); - CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(HEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(HEADER_POS_Y), TheText.Get(aScreens[m_nCurrScreen].m_ScreenName)); + CFont::SetScale(SCREEN_SCALE_X(MENUHEADER_WIDTH), SCREEN_SCALE_Y(MENUHEADER_HEIGHT)); + CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), TheText.Get(aScreens[m_nCurrScreen].m_ScreenName)); } // Action text. wchar *str; - if (aScreens[m_nCurrScreen].m_aEntries[0].m_Action == 1) { + if (aScreens[m_nCurrScreen].m_aEntries[0].m_Action == MENUACTION_LABEL) { switch (m_nCurrScreen) { - case MENU_LOAD_SLOT_CONFIRM: + case MENUPAGE_LOAD_SLOT_CONFIRM: if (m_bGameNotLoaded) str = TheText.Get("FES_LCG"); else str = TheText.Get(aScreens[m_nCurrScreen].m_aEntries[0].m_EntryName); break; - case MENU_SAVE_OVERWRITE_CONFIRM: + case MENUPAGE_SAVE_OVERWRITE_CONFIRM: if (Slots[m_nCurrSaveSlot] == 1) str = TheText.Get("FESZ_QZ"); else str = TheText.Get(aScreens[m_nCurrScreen].m_aEntries[0].m_EntryName); break; - case MENU_EXIT: + case MENUPAGE_EXIT: if (m_bGameNotLoaded) str = TheText.Get("FEQ_SRW"); else @@ -678,30 +299,30 @@ void CMenuManager::Draw() break; }; - CFont::SetDropShadowPosition(DROP_COLOR_SIZE); - CFont::SetDropColor(CRGBA(0, 0, 0, FadeIn(DROP_COLOR_A))); + CFont::SetDropShadowPosition(MENUDROP_COLOR_SIZE); + CFont::SetDropColor(CRGBA(0, 0, 0, FadeIn(MENUDROP_COLOR_A))); CFont::SetFontStyle(FONT_BANK); - CFont::SetScale(SCREEN_SCALE_X(ACTION_WIDTH), SCREEN_SCALE_Y(ACTION_HEIGHT)); + CFont::SetScale(SCREEN_SCALE_X(MENUACTION_WIDTH), SCREEN_SCALE_Y(MENUACTION_HEIGHT)); CFont::SetAlignment(ALIGN_LEFT); CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255))); - CFont::PrintString(SCREEN_SCALE_X(ACTION_POS_X), SCREEN_SCALE_Y(ACTION_POS_Y), str); + CFont::PrintString(SCREEN_SCALE_X(MENUACTION_POS_X), SCREEN_SCALE_Y(MENUACTION_POS_Y), str); } - for (int i = 0; i < 18; ++i) { + for (int i = 0; i < MENUROWS; ++i) { if (aScreens[m_nCurrScreen].m_aEntries[i].m_Action != MENUACTION_LABEL && aScreens[m_nCurrScreen].m_aEntries[i].m_EntryName[0]) { - wchar *columnToPrint[COLUMNS] = { nil, nil }; + wchar *textToPrint[MENUCOLUMNS] = { nil, nil }; - if (aScreens[m_nCurrScreen].m_aEntries[i].m_ActionSlot >= MENU_ACTION_SAVE_1 && aScreens[m_nCurrScreen].m_aEntries[i].m_ActionSlot <= MENU_ACTION_SAVE_8) { - columnToPrint[L] = GetNameOfSavedGame(i - 1); - columnToPrint[R] = GetSavedGameDateAndTime(i - 1); + if (aScreens[m_nCurrScreen].m_aEntries[i].m_SaveSlot >= SAVESLOT_1 && aScreens[m_nCurrScreen].m_aEntries[i].m_SaveSlot <= SAVESLOT_8) { + textToPrint[MENUCOLUMN_LEFT] = GetNameOfSavedGame(i - 1); + textToPrint[MENUCOLUMN_RIGHT] = GetSavedGameDateAndTime(i - 1); - if (!columnToPrint[L][0]) { + if (!textToPrint[MENUCOLUMN_LEFT][0]) { sprintf(gString, "FEM_SL%d", i); - columnToPrint[L] = TheText.Get(gString); + textToPrint[MENUCOLUMN_LEFT] = TheText.Get(gString); } } else { - columnToPrint[L] = TheText.Get(aScreens[m_nCurrScreen].m_aEntries[i].m_EntryName); + textToPrint[MENUCOLUMN_LEFT] = TheText.Get(aScreens[m_nCurrScreen].m_aEntries[i].m_EntryName); } switch (aScreens[m_nCurrScreen].m_aEntries[i].m_Action) { @@ -710,48 +331,48 @@ void CMenuManager::Draw() case MENUACTION_CTRLCONFIG: switch (CPad::GetPad(0)->Mode) { case 0: - columnToPrint[R] = TheText.Get("FEC_CF1"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get("FEC_CF1"); break; case 1: - columnToPrint[R] = TheText.Get("FEC_CF2"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get("FEC_CF2"); break; case 2: - columnToPrint[R] = TheText.Get("FEC_CF3"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get("FEC_CF3"); break; case 3: - columnToPrint[R] = TheText.Get("FEC_CF4"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get("FEC_CF4"); break; }; break; case MENUACTION_CTRLDISPLAY: break; case MENUACTION_FRAMESYNC: - columnToPrint[R] = TheText.Get(m_PrefsVsyncDisp ? "FEM_ON" : "FEM_OFF"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get(m_PrefsVsyncDisp ? "FEM_ON" : "FEM_OFF"); break; case MENUACTION_FRAMELIMIT: - columnToPrint[R] = TheText.Get(m_PrefsFrameLimiter ? "FEM_ON" : "FEM_OFF"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get(m_PrefsFrameLimiter ? "FEM_ON" : "FEM_OFF"); break; case MENUACTION_TRAILS: - columnToPrint[R] = TheText.Get(BlurOn ? "FEM_ON" : "FEM_OFF"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get(BlurOn ? "FEM_ON" : "FEM_OFF"); break; case MENUACTION_SUBTITLES: - columnToPrint[R] = TheText.Get(m_PrefsShowSubtitles ? "FEM_ON" : "FEM_OFF"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get(m_PrefsShowSubtitles ? "FEM_ON" : "FEM_OFF"); break; case MENUACTION_WIDESCREEN: - columnToPrint[R] = TheText.Get(m_PrefsUseWideScreen ? "FEM_ON" : "FEM_OFF"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get(m_PrefsUseWideScreen ? "FEM_ON" : "FEM_OFF"); break; case MENUACTION_RADIO: sprintf(gString, "FEA_FM%d", m_PrefsRadioStation); - columnToPrint[R] = TheText.Get(gString); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get(gString); break; case MENUACTION_SETDBGFLAG: - columnToPrint[R] = TheText.Get(CTheScripts::DbgFlag ? "FEM_ON" : "FEM_OFF"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get(CTheScripts::DbgFlag ? "FEM_ON" : "FEM_OFF"); break; case MENUACTION_SWITCHBIGWHITEDEBUGLIGHT: - columnToPrint[R] = TheText.Get(CTheScripts::DbgFlag ? "FEM_ON" : "FEM_OFF"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get(CTheScripts::DbgFlag ? "FEM_ON" : "FEM_OFF"); break; case MENUACTION_INVVERT: - columnToPrint[R] = TheText.Get(MousePointerStateHelper.bInvertVertically ? "FEM_ON" : "FEM_OFF"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get(MousePointerStateHelper.bInvertVertically ? "FEM_ON" : "FEM_OFF"); break; case MENUACTION_SCREENRES: { @@ -761,31 +382,31 @@ void CMenuManager::Draw() res = ""; AsciiToUnicode(res, gUString); - columnToPrint[R] = gUString; + textToPrint[MENUCOLUMN_RIGHT] = gUString; } break; case MENUACTION_AUDIOHW: if (FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -1) - columnToPrint[R] = TheText.Get("FEA_NAH"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get("FEA_NAH"); else { char *provider = MusicManager.Get3DProviderName(FrontEndMenuManager.m_nPrefsAudio3DProviderIndex); AsciiToUnicode(provider, gUString); - columnToPrint[R] = gUString; + textToPrint[MENUCOLUMN_RIGHT] = gUString; } break; case MENUACTION_SPEAKERCONF: if (FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -1) - columnToPrint[R] = TheText.Get("FEA_NAH"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get("FEA_NAH"); else { switch (m_PrefsSpeakers) { case 0: - columnToPrint[R] = TheText.Get("FEA_2SP"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get("FEA_2SP"); break; case 1: - columnToPrint[R] = TheText.Get("FEA_EAR"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get("FEA_EAR"); break; case 2: - columnToPrint[R] = TheText.Get("FEA_4SP"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get("FEA_4SP"); break; }; } @@ -793,23 +414,23 @@ void CMenuManager::Draw() case MENUACTION_CTRLMETHOD: switch (m_ControlMethod) { case 0: - columnToPrint[L] = TheText.Get("FET_SCN"); + textToPrint[MENUCOLUMN_LEFT] = TheText.Get("FET_SCN"); break; case 1: - columnToPrint[L] = TheText.Get("FET_CCN"); + textToPrint[MENUCOLUMN_LEFT] = TheText.Get("FET_CCN"); break; }; break; case MENUACTION_DYNAMICACOUSTIC: - columnToPrint[R] = TheText.Get(m_PrefsDMA ? "FEM_ON" : "FEM_OFF"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get(m_PrefsDMA ? "FEM_ON" : "FEM_OFF"); break; case MENUACTION_MOUSESTEER: - columnToPrint[R] = TheText.Get(m_bDisableMouseSteering ? "FEM_ON" : "FEM_OFF"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get(m_bDisableMouseSteering ? "FEM_ON" : "FEM_OFF"); break; }; - CFont::SetDropShadowPosition(DROP_COLOR_SIZE); - CFont::SetDropColor(CRGBA(0, 0, 0, FadeIn(DROP_COLOR_A))); + CFont::SetDropShadowPosition(MENUDROP_COLOR_SIZE); + CFont::SetDropColor(CRGBA(0, 0, 0, FadeIn(MENUDROP_COLOR_A))); CFont::SetCentreSize(SCREEN_WIDTH); CFont::SetWrapx(SCREEN_WIDTH); CFont::SetRightJustifyWrap(-SCREEN_WIDTH); @@ -820,78 +441,78 @@ void CMenuManager::Draw() float fBarSize; int SavePageSlot = - m_nCurrScreen == MENU_CHOOSE_LOAD_SLOT || - m_nCurrScreen == MENU_CHOOSE_DELETE_SLOT || - m_nCurrScreen == MENU_CHOOSE_SAVE_SLOT; + m_nCurrScreen == MENUPAGE_CHOOSE_LOAD_SLOT || + m_nCurrScreen == MENUPAGE_CHOOSE_DELETE_SLOT || + m_nCurrScreen == MENUPAGE_CHOOSE_SAVE_SLOT; if (SavePageSlot) { CFont::SetFontStyle(FONT_BANK); CFont::SetAlignment(ALIGN_LEFT); CFont::SetScale(SCREEN_SCALE_X(0.45f), SCREEN_SCALE_Y(0.7f)); - fVerticalSpacing = COLUMN_SPACING_MIN; - fBarSize = SELECT_BOX_MIN; + fVerticalSpacing = MENUCOLUMN_SPACING_MIN; + fBarSize = MENUSELECT_BOX_MIN; - vecPositions.x = SCREEN_SCALE_X(COLUMN_SAVE_X); - vecPositions.y = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(COLUMN_SAVE_Y); + vecPositions.x = SCREEN_SCALE_X(MENUCOLUMN_SAVE_X); + vecPositions.y = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(MENUCOLUMN_SAVE_Y); } else { CFont::SetFontStyle(FONT_HEADING); - int LeftColumn = - m_nCurrScreen == MENU_SOUND_SETTINGS || - m_nCurrScreen == MENU_GRAPHICS_SETTINGS || - m_nCurrScreen == MENU_MOUSE_CONTROLS; + int LeftMENUCOLUMN = + m_nCurrScreen == MENUPAGE_SOUND_SETTINGS || + m_nCurrScreen == MENUPAGE_GRAPHICS_SETTINGS || + m_nCurrScreen == MENUPAGE_MOUSE_CONTROLS; - if (LeftColumn) { + if (LeftMENUCOLUMN) { CFont::SetAlignment(ALIGN_LEFT); CFont::SetScale(SCREEN_SCALE_X(0.55f), SCREEN_SCALE_Y(0.8f)); - fVerticalSpacing = COLUMN_SPACING_MIN; - fBarSize = SELECT_BOX_MIN; + fVerticalSpacing = MENUCOLUMN_SPACING_MIN; + fBarSize = MENUSELECT_BOX_MIN; } else { CFont::SetAlignment(ALIGN_CENTER); CFont::SetScale(SCREEN_SCALE_X(0.75f), SCREEN_SCALE_Y(0.9f)); - fVerticalSpacing = COLUMN_SPACING_MAX; - fBarSize = SELECT_BOX_MAX; + fVerticalSpacing = MENUCOLUMN_SPACING_MAX; + fBarSize = MENUSELECT_BOX_MAX; } // Set positions. if (CFont::GetDetails().centre) vecPositions.x = SCREEN_WIDTH / 2; else - vecPositions.x = SCREEN_SCALE_X(COLUMN_POS_X); + vecPositions.x = SCREEN_SCALE_X(MENUCOLUMN_POS_X); switch (m_nCurrScreen) { - case MENU_BRIEFS: - case MENU_STATS: - vecPositions.y = SCREEN_SCALE_FROM_BOTTOM(COLUMN_FEDS); + case MENUPAGE_BRIEFS: + case MENUPAGE_STATS: + vecPositions.y = SCREEN_SCALE_FROM_BOTTOM(MENUCOLUMN_FEDS); break; - case MENU_SOUND_SETTINGS: - vecPositions.y = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(COLUMN_MAX_Y); + case MENUPAGE_SOUND_SETTINGS: + vecPositions.y = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(MENUCOLUMN_MAX_Y); if (i > 5) - vecPositions.y += SCREEN_SCALE_Y(FE_RADIO_ICON_H * 1.16f); + vecPositions.y += SCREEN_SCALE_Y(MENURADIO_ICON_H * 1.16f); break; - case MENU_LANGUAGE_SETTINGS: - vecPositions.y = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(COLUMN_MIN_Y); + case MENUPAGE_LANGUAGE_SETTINGS: + vecPositions.y = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(MENUCOLUMN_MIN_Y); break; - case MENU_GRAPHICS_SETTINGS: - vecPositions.y = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(COLUMN_MAX_Y); + case MENUPAGE_GRAPHICS_SETTINGS: + vecPositions.y = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(MENUCOLUMN_MAX_Y); break; - case MENU_OPTIONS: - vecPositions.y = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(COLUMN_MID_Y); + case MENUPAGE_OPTIONS: + vecPositions.y = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(MENUCOLUMN_MID_Y); break; - case MENU_PAUSE_MENU: - vecPositions.y = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(COLUMN_PAUSE_Y); + case MENUPAGE_PAUSE_MENU: + vecPositions.y = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(MENUCOLUMN_PAUSE_Y); break; - case MENU_NEW_GAME: - vecPositions.y = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(COLUMN_MID_Y); + case MENUPAGE_NEW_GAME: + vecPositions.y = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(MENUCOLUMN_MID_Y); break; - case MENU_START_MENU: - vecPositions.y = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(COLUMN_START_Y); + case MENUPAGE_START_MENU: + vecPositions.y = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(MENUCOLUMN_START_Y); break; default: - vecPositions.y = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(COLUMN_MID_Y); + vecPositions.y = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(MENUCOLUMN_MID_Y); break; }; } @@ -908,12 +529,12 @@ void CMenuManager::Draw() CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255))); // Draw - if (columnToPrint[L]) - CFont::PrintString(vecPositions.x, vecPositions.y, columnToPrint[L]); + if (textToPrint[MENUCOLUMN_LEFT]) + CFont::PrintString(vecPositions.x, vecPositions.y, textToPrint[MENUCOLUMN_LEFT]); - if (columnToPrint[R]) { + if (textToPrint[MENUCOLUMN_RIGHT]) { CFont::SetAlignment(ALIGN_RIGHT); - CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(SavePageSlot ? COLUMN_SAVE_X : COLUMN_POS_X), vecPositions.y, columnToPrint[R]); + CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(SavePageSlot ? MENUCOLUMN_SAVE_X : MENUCOLUMN_POS_X), vecPositions.y, textToPrint[MENUCOLUMN_RIGHT]); } // Mouse support. @@ -945,34 +566,34 @@ void CMenuManager::Draw() // TODO: CheckHover switch (aScreens[m_nCurrScreen].m_aEntries[i].m_Action) { case MENUACTION_BRIGHTNESS: - DisplaySlider(SCREEN_SCALE_FROM_RIGHT(SLIDER_X), vecPositions.y - SCREEN_SCALE_Y(3.0f), SCREEN_SCALE_Y(2.0f), SCREEN_SCALE_Y(18.0f), SCREEN_SCALE_X(256.0f), m_PrefsBrightness/512.0f); + DisplaySlider(SCREEN_SCALE_FROM_RIGHT(MENUSLIDER_X), vecPositions.y - SCREEN_SCALE_Y(3.0f), SCREEN_SCALE_Y(2.0f), SCREEN_SCALE_Y(18.0f), SCREEN_SCALE_X(256.0f), m_PrefsBrightness/512.0f); break; case MENUACTION_DRAWDIST: - DisplaySlider(SCREEN_SCALE_FROM_RIGHT(SLIDER_X), vecPositions.y - SCREEN_SCALE_Y(3.0f), SCREEN_SCALE_Y(2.0f), SCREEN_SCALE_Y(18.0f), SCREEN_SCALE_X(256.0f), (m_PrefsLOD - 0.8f) * 1.0f); + DisplaySlider(SCREEN_SCALE_FROM_RIGHT(MENUSLIDER_X), vecPositions.y - SCREEN_SCALE_Y(3.0f), SCREEN_SCALE_Y(2.0f), SCREEN_SCALE_Y(18.0f), SCREEN_SCALE_X(256.0f), (m_PrefsLOD - 0.8f) * 1.0f); break; case MENUACTION_MUSICVOLUME: - DisplaySlider(SCREEN_SCALE_FROM_RIGHT(SLIDER_X), vecPositions.y - SCREEN_SCALE_Y(3.0f), SCREEN_SCALE_Y(2.0f), SCREEN_SCALE_Y(18.0f), SCREEN_SCALE_X(256.0f), m_PrefsMusicVolume/128.0f); + DisplaySlider(SCREEN_SCALE_FROM_RIGHT(MENUSLIDER_X), vecPositions.y - SCREEN_SCALE_Y(3.0f), SCREEN_SCALE_Y(2.0f), SCREEN_SCALE_Y(18.0f), SCREEN_SCALE_X(256.0f), m_PrefsMusicVolume/128.0f); break; case MENUACTION_SFXVOLUME: - DisplaySlider(SCREEN_SCALE_FROM_RIGHT(SLIDER_X), vecPositions.y - SCREEN_SCALE_Y(3.0f), SCREEN_SCALE_Y(2.0f), SCREEN_SCALE_Y(18.0f), SCREEN_SCALE_X(256.0f), m_PrefsSfxVolume/128.0f); + DisplaySlider(SCREEN_SCALE_FROM_RIGHT(MENUSLIDER_X), vecPositions.y - SCREEN_SCALE_Y(3.0f), SCREEN_SCALE_Y(2.0f), SCREEN_SCALE_Y(18.0f), SCREEN_SCALE_X(256.0f), m_PrefsSfxVolume/128.0f); break; case MENUACTION_MOUSESENS: - DisplaySlider(SCREEN_SCALE_FROM_RIGHT(SLIDER_X), vecPositions.y - SCREEN_SCALE_Y(3.0f), SCREEN_SCALE_Y(2.0f), SCREEN_SCALE_Y(18.0f), SCREEN_SCALE_X(256.0f), TheCamera.m_fMouseAccelHorzntl * 200.0f); + DisplaySlider(SCREEN_SCALE_FROM_RIGHT(MENUSLIDER_X), vecPositions.y - SCREEN_SCALE_Y(3.0f), SCREEN_SCALE_Y(2.0f), SCREEN_SCALE_Y(18.0f), SCREEN_SCALE_X(256.0f), TheCamera.m_fMouseAccelHorzntl * 200.0f); break; }; // Radio icons. float fIconSpacing = 59.52f; - if (m_nCurrScreen == MENU_SOUND_SETTINGS) { + if (m_nCurrScreen == MENUPAGE_SOUND_SETTINGS) { for (int i = 0; i < POLICE_RADIO; i++) { if (i == MSX_FM) fIconSpacing -= 1.5f; if (i < USERTRACK) - m_aFrontEndSprites[i + FE_RADIO1].Draw(SCREEN_STRETCH_X(FE_RADIO_ICON_X + fIconSpacing * i), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(FE_RADIO_ICON_Y), SCREEN_SCALE_X(FE_RADIO_ICON_W), SCREEN_SCALE_Y(FE_RADIO_ICON_H), i == m_PrefsRadioStation ? CRGBA(255, 255, 255, 255) : CRGBA(225, 0, 0, 170)); + m_aFrontEndSprites[i + FE_RADIO1].Draw(SCREEN_STRETCH_X(MENURADIO_ICON_X + fIconSpacing * i), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(MENURADIO_ICON_Y), SCREEN_SCALE_X(MENURADIO_ICON_W), SCREEN_SCALE_Y(MENURADIO_ICON_H), i == m_PrefsRadioStation ? CRGBA(255, 255, 255, 255) : CRGBA(225, 0, 0, 170)); if (i > CHATTERBOX) - m_aMenuSprites[MENU_MP3LOGO].Draw(SCREEN_STRETCH_X(FE_RADIO_ICON_X + fIconSpacing * i), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(FE_RADIO_ICON_Y), SCREEN_SCALE_X(FE_RADIO_ICON_W), SCREEN_SCALE_Y(FE_RADIO_ICON_H), i == m_PrefsRadioStation ? CRGBA(255, 255, 255, 255) : CRGBA(225, 0, 0, DMAudio.IsMP3RadioChannelAvailable() ? 170 : 25)); + m_aMenuSprites[MENUSPRITE_MP3LOGO].Draw(SCREEN_STRETCH_X(MENURADIO_ICON_X + fIconSpacing * i), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(MENURADIO_ICON_Y), SCREEN_SCALE_X(MENURADIO_ICON_W), SCREEN_SCALE_Y(MENURADIO_ICON_H), i == m_PrefsRadioStation ? CRGBA(255, 255, 255, 255) : CRGBA(225, 0, 0, DMAudio.IsMP3RadioChannelAvailable() ? 170 : 25)); } } @@ -993,12 +614,12 @@ void CMenuManager::Draw() } switch (m_nCurrScreen) { - case MENU_CONTROLLER_SETTINGS: - case MENU_SOUND_SETTINGS: - case MENU_GRAPHICS_SETTINGS: - case MENU_SKIN_SELECT: - case MENU_CONTROLLER_PC: - case MENU_MOUSE_CONTROLS: + case MENUPAGE_CONTROLLER_SETTINGS: + case MENUPAGE_SOUND_SETTINGS: + case MENUPAGE_GRAPHICS_SETTINGS: + case MENUPAGE_SKIN_SELECT: + case MENUPAGE_CONTROLLER_PC: + case MENUPAGE_MOUSE_CONTROLS: DisplayHelperText(); break; }; @@ -1041,15 +662,17 @@ void CMenuManager::DrawFrontEnd() { CFont::SetAlphaFade(255.0f); - if (m_nCurrScreen == MENU_NONE) { + if (m_nCurrScreen == MENUPAGE_NONE) { + m_nMenuFadeAlpha = 0; + if (m_bGameNotLoaded) - m_nCurrScreen = MENU_START_MENU; + m_nCurrScreen = MENUPAGE_START_MENU; else - m_nCurrScreen = MENU_PAUSE_MENU; + m_nCurrScreen = MENUPAGE_PAUSE_MENU; } if (!m_nCurrOption && aScreens[m_nCurrScreen].m_aEntries[0].m_Action == MENUACTION_LABEL) - m_nCurrOption = 1; + m_nCurrOption = MENUROW_1; CMenuManager::DrawFrontEndNormal(); CMenuManager::PrintErrorMessage(); @@ -1072,77 +695,128 @@ void CMenuManager::DrawFrontEndNormal() CSprite2d::InitPerFrame(); CFont::InitPerFrame(); - eMenuSprites currentSprite = MENU_MAINMENU; - switch (m_nPrevScreen) { - case MENU_STATS: - case MENU_START_MENU: - case MENU_PAUSE_MENU: - currentSprite = MENU_MAINMENU; + eMenuSprites previousSprite = MENUSPRITE_MAINMENU; + if (m_nMenuFadeAlpha < 255) { + switch (m_nPrevScreen) { + case MENUPAGE_STATS: + case MENUPAGE_START_MENU: + case MENUPAGE_PAUSE_MENU: + previousSprite = MENUSPRITE_MAINMENU; + break; + case MENUPAGE_NEW_GAME: + case MENUPAGE_CHOOSE_LOAD_SLOT: + case MENUPAGE_CHOOSE_DELETE_SLOT: + case MENUPAGE_NEW_GAME_RELOAD: + case MENUPAGE_LOAD_SLOT_CONFIRM: + case MENUPAGE_DELETE_SLOT_CONFIRM: + case MENUPAGE_EXIT: + previousSprite = MENUSPRITE_SINGLEPLAYER; + break; + case MENUPAGE_MULTIPLAYER_MAIN: + previousSprite = MENUSPRITE_MULTIPLAYER; + break; + case MENUPAGE_MULTIPLAYER_MAP: + case MENUPAGE_MULTIPLAYER_FIND_GAME: + case MENUPAGE_SKIN_SELECT: + case MENUPAGE_KEYBOARD_CONTROLS: + case MENUPAGE_MOUSE_CONTROLS: + previousSprite = MENUSPRITE_FINDGAME; + break; + case MENUPAGE_MULTIPLAYER_CONNECTION: + case MENUPAGE_MULTIPLAYER_MODE: + previousSprite = MENUSPRITE_CONNECTION; + break; + case MENUPAGE_MULTIPLAYER_CREATE: + previousSprite = MENUSPRITE_HOSTGAME; + break; + case MENUPAGE_SKIN_SELECT_OLD: + case MENUPAGE_OPTIONS: + previousSprite = MENUSPRITE_PLAYERSET; + break; + }; + + if (m_nPrevScreen == MENUPAGE_NONE) + CSprite2d::DrawRect(CRect(0.0f, 0.0f, SCREENW, SCREENH), CRGBA(0, 0, 0, 255)); + else + m_aMenuSprites[previousSprite].Draw(CRect(0.0f, 0.0f, SCREENW, SCREENH), CRGBA(255, 255, 255, 255)); + } + + eMenuSprites currentSprite = MENUSPRITE_MAINMENU; + switch (m_nCurrScreen) { + case MENUPAGE_STATS: + case MENUPAGE_START_MENU: + case MENUPAGE_PAUSE_MENU: + currentSprite = MENUSPRITE_MAINMENU; break; - case MENU_NEW_GAME: - case MENU_CHOOSE_LOAD_SLOT: - case MENU_CHOOSE_DELETE_SLOT: - case MENU_NEW_GAME_RELOAD: - case MENU_LOAD_SLOT_CONFIRM: - case MENU_DELETE_SLOT_CONFIRM: - case MENU_EXIT: - currentSprite = MENU_SINGLEPLAYER; + case MENUPAGE_NEW_GAME: + case MENUPAGE_CHOOSE_LOAD_SLOT: + case MENUPAGE_CHOOSE_DELETE_SLOT: + case MENUPAGE_NEW_GAME_RELOAD: + case MENUPAGE_LOAD_SLOT_CONFIRM: + case MENUPAGE_DELETE_SLOT_CONFIRM: + case MENUPAGE_EXIT: + currentSprite = MENUSPRITE_SINGLEPLAYER; break; - case MENU_MULTIPLAYER_MAIN: - currentSprite = MENU_MULTIPLAYER; + case MENUPAGE_MULTIPLAYER_MAIN: + currentSprite = MENUSPRITE_MULTIPLAYER; break; - case MENU_MULTIPLAYER_MAP: - case MENU_MULTIPLAYER_FIND_GAME: - case MENU_SKIN_SELECT: - case MENU_KEYBOARD_CONTROLS: - case MENU_MOUSE_CONTROLS: - currentSprite = MENU_FINDGAME; + case MENUPAGE_MULTIPLAYER_MAP: + case MENUPAGE_MULTIPLAYER_FIND_GAME: + case MENUPAGE_SKIN_SELECT: + case MENUPAGE_KEYBOARD_CONTROLS: + case MENUPAGE_MOUSE_CONTROLS: + currentSprite = MENUSPRITE_FINDGAME; break; - case MENU_MULTIPLAYER_CONNECTION: - case MENU_MULTIPLAYER_MODE: - currentSprite = MENU_CONNECTION; + case MENUPAGE_MULTIPLAYER_CONNECTION: + case MENUPAGE_MULTIPLAYER_MODE: + currentSprite = MENUSPRITE_CONNECTION; break; - case MENU_MULTIPLAYER_CREATE: - currentSprite = MENU_HOSTGAME; + case MENUPAGE_MULTIPLAYER_CREATE: + currentSprite = MENUSPRITE_HOSTGAME; break; - case MENU_SKIN_SELECT_OLD: - case MENU_OPTIONS: - currentSprite = MENU_PLAYERSET; + case MENUPAGE_SKIN_SELECT_OLD: + case MENUPAGE_OPTIONS: + currentSprite = MENUSPRITE_PLAYERSET; break; }; - //CSprite2d::DrawRect(CRect(0.0f, 0.0f, SCREENW, SCREENH), CRGBA(0, 0, 0, 255)); - uint32 savedShade; uint32 savedAlpha; RwRenderStateGet(rwRENDERSTATESHADEMODE, &savedShade); RwRenderStateSet(rwRENDERSTATESHADEMODE, reinterpret_cast<void *>(rwSHADEMODEGOURAUD)); RwRenderStateGet(rwRENDERSTATEVERTEXALPHAENABLE, &savedAlpha); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, reinterpret_cast<void *>(TRUE)); - if (m_nMenuFadeAlpha >= 255) + if (m_nMenuFadeAlpha >= 255) { m_aMenuSprites[currentSprite].Draw(CRect(0.0f, 0.0f, SCREENW, SCREENH), CRGBA(255, 255, 255, 255)); + } else { - if (m_nMenuFadeAlpha != 255) + if (m_nMenuFadeAlpha < 255) { m_nMenuFadeAlpha += 0.1f * 255.0f; - m_aMenuSprites[currentSprite].Draw(CRect(0.0f, 0.0f, SCREENW, SCREENH), CRGBA(255, 255, 255, m_nMenuFadeAlpha)); + if (m_nMenuFadeAlpha >= 255) + m_nMenuFadeAlpha = 255; + + m_aMenuSprites[currentSprite].Draw(CRect(0.0f, 0.0f, SCREENW, SCREENH), CRGBA(255, 255, 255, m_nMenuFadeAlpha)); + } + else + m_aMenuSprites[currentSprite].Draw(CRect(0.0f, 0.0f, SCREENW, SCREENH), CRGBA(255, 255, 255, 255)); } // GTA LOGO - if (m_nCurrScreen == MENU_START_MENU || m_nCurrScreen == MENU_PAUSE_MENU) { + if (m_nCurrScreen == MENUPAGE_START_MENU || m_nCurrScreen == MENUPAGE_PAUSE_MENU) { if (CGame::frenchGame || CGame::germanGame || !CGame::nastyGame) - m_aMenuSprites[MENU_GTA3LOGO].Draw(CRect((SCREEN_WIDTH / 2) - SCREEN_SCALE_X(115.0f), SCREEN_SCALE_Y(70.0f), (SCREEN_WIDTH / 2) + SCREEN_SCALE_X(115.0f), SCREEN_SCALE_Y(180.0f)), CRGBA(255, 255, 255, FadeIn(255))); + m_aMenuSprites[MENUSPRITE_GTA3LOGO].Draw(CRect((SCREEN_WIDTH / 2) - SCREEN_SCALE_X(115.0f), SCREEN_SCALE_Y(70.0f), (SCREEN_WIDTH / 2) + SCREEN_SCALE_X(115.0f), SCREEN_SCALE_Y(180.0f)), CRGBA(255, 255, 255, FadeIn(255))); else - m_aMenuSprites[MENU_GTALOGO].Draw(CRect((SCREEN_WIDTH / 2) - SCREEN_SCALE_X(95.0f), SCREEN_SCALE_Y(40.0f), (SCREEN_WIDTH / 2) + SCREEN_SCALE_X(95.0f), SCREEN_SCALE_Y(210.0f)), CRGBA(255, 255, 255, FadeIn(255))); + m_aMenuSprites[MENUSPRITE_GTALOGO].Draw(CRect((SCREEN_WIDTH / 2) - SCREEN_SCALE_X(95.0f), SCREEN_SCALE_Y(40.0f), (SCREEN_WIDTH / 2) + SCREEN_SCALE_X(95.0f), SCREEN_SCALE_Y(210.0f)), CRGBA(255, 255, 255, FadeIn(255))); } RwRenderStateSet(rwRENDERSTATESHADEMODE, reinterpret_cast<void *>(savedShade)); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, reinterpret_cast<void *>(savedAlpha)); switch (m_nCurrScreen) { - case MENU_SKIN_SELECT: + case MENUPAGE_SKIN_SELECT: CMenuManager::DrawPlayerSetupScreen(); break; - case MENU_KEYBOARD_CONTROLS: + case MENUPAGE_KEYBOARD_CONTROLS: CMenuManager::DrawControllerSetupScreen(); break; default: @@ -1154,7 +828,7 @@ void CMenuManager::DrawFrontEndNormal() // Draw mouse if (m_bShowMouse) - m_aMenuSprites[MENU_MOUSE].Draw(m_nMousePosX, m_nMousePosY, SCREEN_SCALE_X(60.0f), SCREEN_SCALE_Y(60.0f), CRGBA(255, 255, 255, 255)); + m_aMenuSprites[MENUSPRITE_MOUSE].Draw(m_nMousePosX, m_nMousePosY, SCREEN_SCALE_X(60.0f), SCREEN_SCALE_Y(60.0f), CRGBA(255, 255, 255, 255)); } #endif @@ -1172,9 +846,9 @@ WRAPPER int CMenuManager::FadeIn(int alpha) { EAXJMP(0x48AC60); } #else int CMenuManager::FadeIn(int alpha) { - if (m_nCurrScreen == MENU_LOADING_IN_PROGRESS || - m_nCurrScreen == MENU_SAVING_IN_PROGRESS || - m_nCurrScreen == MENU_DELETING) + if (m_nCurrScreen == MENUPAGE_LOADING_IN_PROGRESS || + m_nCurrScreen == MENUPAGE_SAVING_IN_PROGRESS || + m_nCurrScreen == MENUPAGE_DELETING) return alpha; if (m_nMenuFadeAlpha >= alpha) @@ -1220,7 +894,7 @@ void CMenuManager::LoadAllTextures() CMenuManager::CentreMousePointer(); DMAudio.ChangeMusicMode(0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_STARTING, 0); - m_nCurrOption = 0; + m_nCurrOption = MENUROW_0; m_PrefsRadioStation = DMAudio.GetRadioInCar(); if (DMAudio.IsMP3RadioChannelAvailable()) { 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(); diff --git a/src/MenuScreens.h b/src/MenuScreens.h new file mode 100644 index 00000000..b9d6906e --- /dev/null +++ b/src/MenuScreens.h @@ -0,0 +1,380 @@ +#pragma once + +const CMenuScreen aScreens[] = { + // MENUPAGE_NONE = 0 + { "", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, }, + + // MENUPAGE_STATS = 1 + { "FET_STA", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, MENUROW_5, MENUROW_2, + MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, + }, + + // MENUPAGE_NEW_GAME = 2 + { "FET_SGA", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, MENUROW_0, MENUROW_1, + MENUACTION_CHANGEMENU, "FES_SNG", SAVESLOT_NONE, MENUPAGE_NEW_GAME_RELOAD, + MENUACTION_UPDATESAVE, "GMLOAD", SAVESLOT_NONE, MENUPAGE_CHOOSE_LOAD_SLOT, + MENUACTION_CHANGEMENU, "FES_DGA", SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT, + MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, + }, + + // MENUPAGE_BRIEFS = 3 + { "FET_BRE", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, MENUROW_6, MENUROW_3, + MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, + }, + + // MENU_CONTROLLER_SETTINGS = 4 + { "FET_CON", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_SOUND_SETTINGS = 5 + { "FET_AUD", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUROW_1, MENUROW_1, + MENUACTION_MUSICVOLUME, "FEA_MUS", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS, + MENUACTION_SFXVOLUME, "FEA_SFX", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS, + MENUACTION_AUDIOHW, "FEA_3DH", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS, + MENUACTION_SPEAKERCONF, "FEA_SPK", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS, + MENUACTION_DYNAMICACOUSTIC, "FET_DAM", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS, + MENUACTION_RADIO, "FEA_RSS", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS, + MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS, + MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS, + }, + + // MENUPAGE_GRAPHICS_SETTINGS = 6 + { "FET_DIS", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUROW_2, MENUROW_2, + MENUACTION_BRIGHTNESS, "FED_BRI", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, + MENUACTION_DRAWDIST, "FEM_LOD", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, + MENUACTION_FRAMESYNC, "FEM_VSC", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, + MENUACTION_FRAMELIMIT, "FEM_FRM", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, + MENUACTION_TRAILS, "FED_TRA", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, + MENUACTION_SUBTITLES, "FED_SUB", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, + MENUACTION_WIDESCREEN, "FED_WIS", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, + MENUACTION_SCREENRES, "FED_RES", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, + MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, + MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, + }, + + // MENUPAGE_LANGUAGE_SETTINGS = 7 + { "FET_LAN", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUROW_3, MENUROW_3, + MENUACTION_LANG_ENG, "FEL_ENG", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS, + MENUACTION_LANG_FRE, "FEL_FRE", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS, + MENUACTION_LANG_GER, "FEL_GER", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS, + MENUACTION_LANG_ITA, "FEL_ITA", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS, + MENUACTION_LANG_SPA, "FEL_SPA", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS, + MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, + }, + + // MENUPAGE_CHOOSE_LOAD_SLOT = 8 + { "FET_LG", MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, MENUROW_1, MENUROW_1, + MENUACTION_CHANGEMENU, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NEW_GAME, + MENUACTION_CHECKSAVE, "FEM_SL1", SAVESLOT_1 + 1, MENUPAGE_LOAD_SLOT_CONFIRM, + MENUACTION_CHECKSAVE, "FEM_SL2", SAVESLOT_2 + 1, MENUPAGE_LOAD_SLOT_CONFIRM, + MENUACTION_CHECKSAVE, "FEM_SL3", SAVESLOT_3 + 1, MENUPAGE_LOAD_SLOT_CONFIRM, + MENUACTION_CHECKSAVE, "FEM_SL4", SAVESLOT_4 + 1, MENUPAGE_LOAD_SLOT_CONFIRM, + MENUACTION_CHECKSAVE, "FEM_SL5", SAVESLOT_5 + 1, MENUPAGE_LOAD_SLOT_CONFIRM, + MENUACTION_CHECKSAVE, "FEM_SL6", SAVESLOT_6 + 1, MENUPAGE_LOAD_SLOT_CONFIRM, + MENUACTION_CHECKSAVE, "FEM_SL7", SAVESLOT_7 + 1, MENUPAGE_LOAD_SLOT_CONFIRM, + MENUACTION_CHECKSAVE, "FEM_SL8", SAVESLOT_8 + 1, MENUPAGE_LOAD_SLOT_CONFIRM, + }, + + // MENUPAGE_CHOOSE_DELETE_SLOT = 9 + { "FET_DG", MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, MENUROW_2, MENUROW_2, + MENUACTION_CHANGEMENU, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NEW_GAME, + MENUACTION_CHANGEMENU, "FEM_SL1", SAVESLOT_1 + 1, MENUPAGE_DELETE_SLOT_CONFIRM, + MENUACTION_CHANGEMENU, "FEM_SL2", SAVESLOT_2 + 1, MENUPAGE_DELETE_SLOT_CONFIRM, + MENUACTION_CHANGEMENU, "FEM_SL3", SAVESLOT_3 + 1, MENUPAGE_DELETE_SLOT_CONFIRM, + MENUACTION_CHANGEMENU, "FEM_SL4", SAVESLOT_4 + 1, MENUPAGE_DELETE_SLOT_CONFIRM, + MENUACTION_CHANGEMENU, "FEM_SL5", SAVESLOT_5 + 1, MENUPAGE_DELETE_SLOT_CONFIRM, + MENUACTION_CHANGEMENU, "FEM_SL6", SAVESLOT_6 + 1, MENUPAGE_DELETE_SLOT_CONFIRM, + MENUACTION_CHANGEMENU, "FEM_SL7", SAVESLOT_7 + 1, MENUPAGE_DELETE_SLOT_CONFIRM, + MENUACTION_CHANGEMENU, "FEM_SL8", SAVESLOT_8 + 1, MENUPAGE_DELETE_SLOT_CONFIRM, + }, + + // MENUPAGE_NEW_GAME_RELOAD = 10 + { "FET_NG", MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, MENUROW_0, MENUROW_0, + MENUACTION_LABEL, "FESZ_QR", SAVESLOT_NONE, MENUPAGE_NONE, + MENUACTION_CHANGEMENU, "FEM_NO", SAVESLOT_NONE, MENUPAGE_NEW_GAME, + MENUACTION_NEWGAME, "FEM_YES", SAVESLOT_NONE, MENUPAGE_NEW_GAME_RELOAD, + }, + + // MENUPAGE_LOAD_SLOT_CONFIRM = 11 + { "FET_LG", MENUPAGE_CHOOSE_LOAD_SLOT, MENUPAGE_CHOOSE_LOAD_SLOT, MENUPAGE_CHOOSE_LOAD_SLOT, MENUROW_0, MENUROW_0, + MENUACTION_LABEL, "FESZ_QL", SAVESLOT_NONE, MENUPAGE_NONE, + MENUACTION_CHANGEMENU, "FEM_NO", SAVESLOT_NONE, MENUPAGE_CHOOSE_LOAD_SLOT, + MENUACTION_CHANGEMENU, "FEM_YES", SAVESLOT_NONE, MENUPAGE_LOADING_IN_PROGRESS, + }, + + // MENUPAGE_DELETE_SLOT_CONFIRM = 12 + { "FET_DG", MENUPAGE_CHOOSE_DELETE_SLOT, MENUPAGE_CHOOSE_DELETE_SLOT, MENUPAGE_CHOOSE_DELETE_SLOT, MENUROW_0, MENUROW_0, + MENUACTION_LABEL, "FESZ_QD", SAVESLOT_NONE, MENUPAGE_NONE, + MENUACTION_CHANGEMENU, "FEM_NO", SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT, + MENUACTION_CHANGEMENU, "FEM_YES", SAVESLOT_NONE, MENUPAGE_DELETING, + }, + + // MENUPAGE_13 = 13 + { "FES_NOC", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_LOADING_IN_PROGRESS = 14 + { "FET_LG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + MENUACTION_LABEL, "FED_LDW", SAVESLOT_NONE, MENUPAGE_LOAD_SLOT_CONFIRM, + }, + + // MENUPAGE_DELETING_IN_PROGRESS = 15 + { "FET_DG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + MENUACTION_LABEL, "FEDL_WR", SAVESLOT_NONE, MENUPAGE_NONE, + }, + + // MENUPAGE_16 = 16 + { "FET_LG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + MENUACTION_LABEL, "FES_LOE", SAVESLOT_NONE, MENUPAGE_NONE, + }, + + // MENUPAGE_DELETE_FAILED = 17 + { "FET_DG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + MENUACTION_LABEL, "FES_DEE", SAVESLOT_NONE, MENUPAGE_NONE, + MENUACTION_CHANGEMENU, "FEC_OKK", SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT, + }, + + // MENUPAGE_DEBUG_MENU = 18 + { "FED_DBG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_MEMORY_CARD_1 = 19 + { "FEM_MCM", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_MEMORY_CARD_2 = 20 + { "FEM_MC2", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_MULTIPLAYER_MAIN = 21 + { "FET_MP", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_SAVE_FAILED_1 = 22 + { "MCDNSP", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + MENUACTION_MEMCARDSAVECONFIRM, "JAILB_U", SAVESLOT_NONE, MENUPAGE_NONE, + }, + + // MENUPAGE_SAVE_FAILED_2 = 23 + { "MCGNSP", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + MENUACTION_MEMCARDSAVECONFIRM, "JAILB_U", SAVESLOT_NONE, MENUPAGE_NONE, + }, + + // MENUPAGE_SAVE = 24 + { "FET_SG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + MENUACTION_LABEL, "FES_SCG", SAVESLOT_NONE, MENUPAGE_NONE, + MENUACTION_UPDATESAVE, "GMSAVE", SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT, + MENUACTION_UPDATEMEMCARDSAVE, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NONE, + }, + + // MENUPAGE_NO_MEMORY_CARD = 25 + { "FES_NOC", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_CHOOSE_SAVE_SLOT = 26 + { "FET_SG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + MENUACTION_UPDATEMEMCARDSAVE, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NONE, + MENUACTION_CHANGEMENU, "FEM_SL1", SAVESLOT_1 + 1, MENUPAGE_SAVE_OVERWRITE_CONFIRM, + MENUACTION_CHANGEMENU, "FEM_SL2", SAVESLOT_2 + 1, MENUPAGE_SAVE_OVERWRITE_CONFIRM, + MENUACTION_CHANGEMENU, "FEM_SL3", SAVESLOT_3 + 1, MENUPAGE_SAVE_OVERWRITE_CONFIRM, + MENUACTION_CHANGEMENU, "FEM_SL4", SAVESLOT_4 + 1, MENUPAGE_SAVE_OVERWRITE_CONFIRM, + MENUACTION_CHANGEMENU, "FEM_SL5", SAVESLOT_5 + 1, MENUPAGE_SAVE_OVERWRITE_CONFIRM, + MENUACTION_CHANGEMENU, "FEM_SL6", SAVESLOT_6 + 1, MENUPAGE_SAVE_OVERWRITE_CONFIRM, + MENUACTION_CHANGEMENU, "FEM_SL7", SAVESLOT_7 + 1, MENUPAGE_SAVE_OVERWRITE_CONFIRM, + MENUACTION_CHANGEMENU, "FEM_SL8", SAVESLOT_8 + 1, MENUPAGE_SAVE_OVERWRITE_CONFIRM, + }, + + // MENUPAGE_SAVE_OVERWRITE_CONFIRM = 27 + { "FET_SG", MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, MENUROW_0, MENUROW_0, + MENUACTION_LABEL, "FESZ_QO", SAVESLOT_NONE, MENUPAGE_NONE, + MENUACTION_CHANGEMENU, "FEM_YES", SAVESLOT_NONE, MENUPAGE_SAVING_IN_PROGRESS, + MENUACTION_CHANGEMENU, "FEM_NO", SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT, + }, + + // MENUPAGE_MULTIPLAYER_MAP = 28 + { "FET_MAP", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_MULTIPLAYER_CONNECTION = 29 + { "FET_CON", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_MULTIPLAYER_FIND_GAME = 30 + { "FET_FG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_MULTIPLAYER_MODE = 31 + { "FET_GT", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_MULTIPLAYER_CREATE = 32 + { "FET_HG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_MULTIPLAYER_START = 33 + { "FEN_STA", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_SKIN_SELECT_OLD = 34 + { "FET_PS", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_CONTROLLER_PC = 35 + { "FET_CTL", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUROW_0, MENUROW_0, + MENUACTION_CTRLMETHOD, "FET_CME", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, + MENUACTION_REDEFCTRL, "FET_RDK", SAVESLOT_NONE, MENUPAGE_KEYBOARD_CONTROLS, + MENUACTION_CHANGEMENU, "FET_AMS", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS, + MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, + MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, + }, + + // MENUPAGE_CONTROLLER_PC_OLD1 = 36 + { "FET_CTL", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_CONTROLLER_PC_OLD2 = 37 + { "FET_CTL", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_CONTROLLER_PC_OLD3 = 38 + { "FET_CTL", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_CONTROLLER_PC_OLD4 = 39 + { "FET_CTL", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_CONTROLLER_DEBUG = 40 + { "FEC_DBG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_OPTIONS = 41 + { "FET_OPT", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, MENUROW_1, MENUROW_4, + MENUACTION_CHANGEMENU, "FET_CTL", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, + MENUACTION_LOADRADIO, "FET_AUD", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS, + MENUACTION_CHANGEMENU, "FET_DIS", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, + MENUACTION_CHANGEMENU, "FET_LAN", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS, + MENUACTION_PLAYERSETUP, "FET_PSU", SAVESLOT_NONE, MENUPAGE_SKIN_SELECT, + MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, + }, + + // MENUPAGE_EXIT = 42 + { "FET_QG", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, MENUROW_2, MENUROW_5, + MENUACTION_LABEL, "FEQ_SRE", SAVESLOT_NONE, MENUPAGE_NONE, + MENUACTION_DONTCANCLE, "FEM_NO", SAVESLOT_NONE, MENUPAGE_NONE, + MENUACTION_CANCLEGAME, "FEM_YES", SAVESLOT_NONE, MENUPAGE_NONE, + }, + + // MENUPAGE_SAVING_IN_PROGRESS = 43 + { "", MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, MENUROW_0, MENUROW_0, + MENUACTION_LABEL, "FES_WAR", SAVESLOT_NONE, MENUPAGE_NONE, + }, + + // MENUPAGE_SAVE_SUCCESSFUL = 44 + { "FET_SG", MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, MENUROW_0, MENUROW_0, + MENUACTION_LABEL, "FES_SSC", SAVESLOT_LABEL, MENUPAGE_NONE, + MENUACTION_UPDATEMEMCARDSAVE, "FEC_OKK", SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT, + }, + + // MENUPAGE_DELETING = 45 + { "FET_DG", MENUPAGE_CHOOSE_DELETE_SLOT, MENUPAGE_CHOOSE_DELETE_SLOT, MENUPAGE_CHOOSE_DELETE_SLOT, MENUROW_0, MENUROW_0, + MENUACTION_LABEL, "FED_DLW", SAVESLOT_NONE, MENUPAGE_NONE, + }, + + // MENUPAGE_DELETE_SUCCESS = 46 + { "FET_DG", MENUPAGE_CHOOSE_DELETE_SLOT, MENUPAGE_CHOOSE_DELETE_SLOT, MENUPAGE_CHOOSE_DELETE_SLOT, MENUROW_0, MENUROW_0, + MENUACTION_LABEL, "DEL_FNM", SAVESLOT_NONE, MENUPAGE_NONE, + MENUACTION_CHANGEMENU, "FEC_OKK", SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT, + }, + + // MENUPAGE_SAVE_FAILED = 47 + { "FET_SG", MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, MENUROW_0, MENUROW_0, + MENUACTION_LABEL, "FEC_SVU", SAVESLOT_NONE, MENUPAGE_NONE, + MENUACTION_CHANGEMENU, "FEC_OKK", SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT, + }, + + // MENUPAGE_LOAD_FAILED = 48 + { "FET_SG", MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, MENUROW_0, MENUROW_0, + MENUACTION_LABEL, "FEC_SVU", SAVESLOT_NONE, MENUPAGE_NONE, + }, + + // MENUPAGE_LOAD_FAILED_2 = 49 + { "FET_LG", MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, MENUROW_0, MENUROW_0, + MENUACTION_LABEL, "FEC_LUN", SAVESLOT_NONE, MENUPAGE_NONE, + MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_CHOOSE_LOAD_SLOT, + }, + + // MENUPAGE_FILTER_GAME = 50 + { "FIL_FLT", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_START_MENU = 51 + { "FEM_MM", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + MENUACTION_CHANGEMENU, "FEN_STA", SAVESLOT_NONE, MENUPAGE_NEW_GAME, + MENUACTION_CHANGEMENU, "FET_OPT", SAVESLOT_NONE, MENUPAGE_OPTIONS, + MENUACTION_CHANGEMENU, "FEM_QT", SAVESLOT_NONE, MENUPAGE_EXIT, + }, + + // MENUPAGE_PAUSE_MENU = 52 + { "FET_PAU", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + MENUACTION_RESUME, "FEM_RES", SAVESLOT_NONE, MENUPAGE_NONE, + MENUACTION_CHANGEMENU, "FEN_STA", SAVESLOT_NONE, MENUPAGE_NEW_GAME, + MENUACTION_CHANGEMENU, "FEP_STA", SAVESLOT_NONE, MENUPAGE_STATS, + MENUACTION_CHANGEMENU, "FEP_BRI", SAVESLOT_NONE, MENUPAGE_BRIEFS, + MENUACTION_CHANGEMENU, "FET_OPT", SAVESLOT_NONE, MENUPAGE_OPTIONS, + MENUACTION_CHANGEMENU, "FEM_QT", SAVESLOT_NONE, MENUPAGE_EXIT, + }, + + // MENUPAGE_CHOOSE_MODE = 53 + { "FEN_STA", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_SKIN_SELECT = 54 + { "FET_PSU", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUROW_4, MENUROW_4, + MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_MULTIPLAYER_MAIN, + }, + + // MENUPAGE_KEYBOARD_CONTROLS = 55 + { "FET_STI", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, MENUROW_1, MENUROW_1, + MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, + }, + + // MENUPAGE_MOUSE_CONTROLS = 56 + { "FET_MTI", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, MENUROW_2, MENUROW_2, + MENUACTION_MOUSESENS, "FEC_MSH", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, + MENUACTION_INVVERT, "FEC_IVV", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, + MENUACTION_MOUSESTEER, "FET_MST", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, + MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, + }, + + // MENUPAGE_57 = 57 + { "", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, + + // MENUPAGE_58 = 58 + { "", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0, + + }, +}; diff --git a/src/Timer.h b/src/Timer.h index 10bb5d84..c3269d60 100644 --- a/src/Timer.h +++ b/src/Timer.h @@ -18,7 +18,8 @@ public: static void SetTimeStep(float ts) { ms_fTimeStep = ts; } static uint32 GetFrameCounter(void) { return m_FrameCounter; } static uint32 GetTimeInMilliseconds(void) { return m_snTimeInMilliseconds; } - + static uint32 GetTimeInMillisecondsPauseMode(void) { return m_snTimeInMillisecondsPauseMode; } + static inline bool GetIsPaused() { return m_UserPause || m_CodePause; } static inline bool GetIsUserPaused() { return m_UserPause; } static inline void SetTimeScale(float ts) { ms_fTimeScale = ts; } diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index 5da1d489..757ffa79 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -10,6 +10,8 @@ cAudioManager::PlayerJustLeftCar(void) // UNUSED: This is a perfectly empty function. } +WRAPPER void cAudioManager::Service() { EAXJMP(0x57A2A0); } + STARTPATCHES InjectHook(0x56AD20, &cAudioManager::PlayerJustLeftCar, PATCH_JUMP); ENDPATCHES
\ No newline at end of file diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h index 37dd3218..9e25b0a3 100644 --- a/src/audio/AudioManager.h +++ b/src/audio/AudioManager.h @@ -3,6 +3,7 @@ class cAudioManager { public: void PlayerJustLeftCar(void); + void Service(); }; extern cAudioManager &AudioManager;
\ No newline at end of file diff --git a/src/audio/DMAudio.cpp b/src/audio/DMAudio.cpp index b96bee01..bfa24ab0 100644 --- a/src/audio/DMAudio.cpp +++ b/src/audio/DMAudio.cpp @@ -19,4 +19,8 @@ WRAPPER void cDMAudio::ChangeMusicMode(uint8 mode) { EAXJMP(0x57CCF0); } WRAPPER void cDMAudio::PlayFrontEndSound(uint32, uint32) { EAXJMP(0x57CC20); } WRAPPER void cDMAudio::PlayOneShot(int, uint16, float) { EAXJMP(0x57C840); } WRAPPER int cDMAudio::GetRadioInCar() { EAXJMP(0x57CE40); } -WRAPPER uint8 cDMAudio::IsMP3RadioChannelAvailable() { EAXJMP(0x57C9F0); }
\ No newline at end of file +WRAPPER uint8 cDMAudio::IsMP3RadioChannelAvailable() { EAXJMP(0x57C9F0); } + +WRAPPER void cDMAudio::SetEffectsFadeVol(int16) { EAXJMP(0x57C8F0); } +WRAPPER void cDMAudio::SetMusicFadeVol(int16) { EAXJMP(0x57C920); } + diff --git a/src/audio/DMAudio.h b/src/audio/DMAudio.h index ad67cf13..bf9b65b9 100644 --- a/src/audio/DMAudio.h +++ b/src/audio/DMAudio.h @@ -191,5 +191,8 @@ public: void PlayOneShot(int, uint16, float); int GetRadioInCar(); uint8 IsMP3RadioChannelAvailable(); + void SetEffectsFadeVol(int16); + void SetMusicFadeVol(int16); + }; extern cDMAudio &DMAudio; |