1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-24 01:00:08 +00:00

Merge pull request #868 from erorcun/miami

Frontend cleanup, .INI, CFO, scrollable pages
This commit is contained in:
aap 2020-12-12 10:43:06 +01:00 committed by GitHub
commit 4f3be49728
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 1780 additions and 317 deletions

File diff suppressed because it is too large Load diff

View file

@ -11,7 +11,7 @@
#define MENUHEADER_HEIGHT 2.0f #define MENUHEADER_HEIGHT 2.0f
#define MENUHEADER_WIDTH 1.0f #define MENUHEADER_WIDTH 1.0f
#define MENU_UNK_X_MARGIN 10.0f #define MENU_X_MARGIN 10.0f
#define MENUACTION_SCALE_MULT 0.9f #define MENUACTION_SCALE_MULT 0.9f
@ -23,6 +23,8 @@
#define MENU_DEFAULT_CONTENT_Y 100 #define MENU_DEFAULT_CONTENT_Y 100
#define MENU_DEFAULT_LINE_HEIGHT 29 #define MENU_DEFAULT_LINE_HEIGHT 29
#define RIGHT_ALIGNED_TEXT_RIGHT_MARGIN(xMargin) (xMargin + 30.0f)
#define MENURADIO_ICON_FIRST_X 238.f #define MENURADIO_ICON_FIRST_X 238.f
#define MENURADIO_ICON_Y 288.0f #define MENURADIO_ICON_Y 288.0f
#define MENURADIO_ICON_SIZE 60.0f #define MENURADIO_ICON_SIZE 60.0f
@ -34,17 +36,23 @@
#define MENUSLIDER_SMALLEST_BAR 8.0f #define MENUSLIDER_SMALLEST_BAR 8.0f
#define MENUSLIDER_BIGGEST_BAR 25.0f #define MENUSLIDER_BIGGEST_BAR 25.0f
#define BIGTEXT2_X_SCALE 0.6f #define BIGTEXT2_X_SCALE 0.6f // For FONT_STANDARD
#define BIGTEXT2_Y_SCALE 1.2f #define BIGTEXT2_Y_SCALE 1.2f
#define BIGTEXT_X_SCALE 0.6f #define BIGTEXT_X_SCALE 0.6f // For FONT_HEADING
#define BIGTEXT_Y_SCALE 1.0f #define BIGTEXT_Y_SCALE 1.0f
#define MEDIUMTEXT_X_SCALE 0.48f #define MEDIUMTEXT_X_SCALE 0.48f // For FONT_STANDARD
#define MEDIUMTEXT_Y_SCALE 1.0f #define MEDIUMTEXT_Y_SCALE 1.0f
#define SMALLTEXT_X_SCALE 0.42f #define SMALLTEXT_X_SCALE 0.42f // For FONT_STANDARD
#define SMALLTEXT_Y_SCALE 0.9f #define SMALLTEXT_Y_SCALE 0.9f
#define SMALLESTTEXT_X_SCALE 0.3f #define SMALLESTTEXT_X_SCALE 0.3f // For FONT_STANDARD
#define SMALLESTTEXT_Y_SCALE 0.7f #define SMALLESTTEXT_Y_SCALE 0.7f
#define LISTITEM_X_SCALE 0.4f // Only unproportional and commonly used scale for FONT_STANDARD
#define LISTITEM_Y_SCALE 0.6f
#define HELPER_TEXT_RIGHT_MARGIN MENU_X_MARGIN
#define HELPER_TEXT_BOTTOM_MARGIN 18.f
#define PLAYERSETUP_LIST_TOP 58.0f #define PLAYERSETUP_LIST_TOP 58.0f
#define PLAYERSETUP_LIST_BOTTOM 95.0f #define PLAYERSETUP_LIST_BOTTOM 95.0f
#define PLAYERSETUP_LIST_LEFT 200.0f #define PLAYERSETUP_LIST_LEFT 200.0f
@ -56,8 +64,6 @@
#endif #endif
#define PLAYERSETUP_SCROLLBUTTON_HEIGHT 17.0f #define PLAYERSETUP_SCROLLBUTTON_HEIGHT 17.0f
#define PLAYERSETUP_SCROLLBUTTON_TXD_DIMENSION 64 #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_SKIN_COLUMN_LEFT 220.0f
#define PLAYERSETUP_DATE_COLUMN_RIGHT 56.0f #define PLAYERSETUP_DATE_COLUMN_RIGHT 56.0f
#define PLAYERSETUP_LIST_BODY_TOP 77 #define PLAYERSETUP_LIST_BODY_TOP 77
@ -186,7 +192,6 @@ enum eMenuScreen
MENUPAGE_MOUSE_CONTROLS = 31, MENUPAGE_MOUSE_CONTROLS = 31,
MENUPAGE_PAUSE_MENU = 32, MENUPAGE_PAUSE_MENU = 32,
MENUPAGE_NONE = 33, // Then chooses main menu or pause menu MENUPAGE_NONE = 33, // Then chooses main menu or pause menu
MENUPAGE_OUTRO = 34,
#ifdef LEGACY_MENU_OPTIONS #ifdef LEGACY_MENU_OPTIONS
MENUPAGE_CONTROLLER_SETTINGS, MENUPAGE_CONTROLLER_SETTINGS,
MENUPAGE_DEBUG_MENU, MENUPAGE_DEBUG_MENU,
@ -196,14 +201,26 @@ enum eMenuScreen
MENUPAGE_CONTROLLER_PC_OLD4, MENUPAGE_CONTROLLER_PC_OLD4,
MENUPAGE_CONTROLLER_DEBUG, MENUPAGE_CONTROLLER_DEBUG,
#endif #endif
#ifdef CUSTOM_FRONTEND_OPTIONS
#ifdef GRAPHICS_MENU_OPTIONS #ifdef GRAPHICS_MENU_OPTIONS
MENUPAGE_GRAPHICS_SETTINGS, MENUPAGE_GRAPHICS_SETTINGS,
#endif #endif
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
MENUPAGE_DETECT_JOYSTICK,
#endif
#endif
MENUPAGE_OUTRO, // Originally 34, but CFO needs last screen to be empty to count number of menu pages
MENUPAGES MENUPAGES
}; };
enum eMenuAction enum eMenuAction
{ {
#ifdef CUSTOM_FRONTEND_OPTIONS
MENUACTION_CFO_SELECT = -2,
MENUACTION_CFO_DYNAMIC = -1,
#endif
MENUACTION_NOTHING, MENUACTION_NOTHING,
MENUACTION_LABEL, MENUACTION_LABEL,
MENUACTION_YES, MENUACTION_YES,
@ -258,29 +275,10 @@ enum eMenuAction
MENUACTION_DRAWDIST, MENUACTION_DRAWDIST,
MENUACTION_MOUSESENS, MENUACTION_MOUSESENS,
MENUACTION_MP3VOLUMEBOOST, MENUACTION_MP3VOLUMEBOOST,
#ifdef IMPROVED_VIDEOMODE
MENUACTION_SCREENFORMAT,
#endif
#ifdef LEGACY_MENU_OPTIONS #ifdef LEGACY_MENU_OPTIONS
MENUACTION_CTRLVIBRATION, MENUACTION_CTRLVIBRATION,
MENUACTION_CTRLCONFIG, MENUACTION_CTRLCONFIG,
#endif #endif
#ifdef ANISOTROPIC_FILTERING
MENUACTION_MIPMAPS,
MENUACTION_TEXTURE_FILTERING,
#endif
#ifdef MULTISAMPLING
MENUACTION_MULTISAMPLING,
#endif
#ifdef NO_ISLAND_LOADING
MENUACTION_ISLANDLOADING,
#endif
#ifdef PS2_ALPHA_TEST
MENUACTION_PS2_ALPHA_TEST,
#endif
#ifdef CUTSCENE_BORDERS_SWITCH
MENUACTION_CUTSCENEBORDERS,
#endif
}; };
enum eCheckHover enum eCheckHover
@ -326,8 +324,8 @@ enum eCheckHover
enum enum
{ {
#ifdef LEGACY_MENU_OPTIONS #if defined LEGACY_MENU_OPTIONS || defined CUSTOM_FRONTEND_OPTIONS
NUM_MENUROWS = 14, NUM_MENUROWS = 18,
#else #else
NUM_MENUROWS = 12, NUM_MENUROWS = 12,
#endif #endif
@ -361,6 +359,7 @@ struct BottomBarOption
int32 screenId; int32 screenId;
}; };
#ifndef CUSTOM_FRONTEND_OPTIONS
struct CMenuScreen struct CMenuScreen
{ {
char m_ScreenName[8]; char m_ScreenName[8];
@ -378,6 +377,88 @@ struct CMenuScreen
uint8 m_Align; uint8 m_Align;
} m_aEntries[NUM_MENUROWS]; } m_aEntries[NUM_MENUROWS];
}; };
extern CMenuScreen aScreens[MENUPAGES];
#else
#include "frontendoption.h"
struct CCustomScreenLayout {
int startX; // not used at all if first entry has X and Y values
int startY; // not used at all if first entry has X and Y values
int lineHeight; // used to determine next entry's Y coordinate, if it has 0-0 as coordinates
bool showLeftRightHelper;
bool noInvasiveBorders; // not needed on pages already handled by game
int xMargin; // useful for two part texts - 0/empty = MENU_X_MARGIN
};
struct CCFO
{
int8 *value;
const char *save;
};
struct CCFOSelect : CCFO
{
char** rightTexts;
int8 numRightTexts;
bool onlyApplyOnEnter;
int8 displayedValue; // only if onlyApplyOnEnter enabled for now
int8 lastSavedValue; // only if onlyApplyOnEnter enabled
ChangeFunc changeFunc;
CCFOSelect() {};
CCFOSelect(int8* value, const char* save, const char** rightTexts, int8 numRightTexts, bool onlyApplyOnEnter, ChangeFunc changeFunc){
this->value = value;
if (value)
this->lastSavedValue = this->displayedValue = *value;
this->save = save;
this->rightTexts = (char**)rightTexts;
this->numRightTexts = numRightTexts;
this->onlyApplyOnEnter = onlyApplyOnEnter;
this->changeFunc = changeFunc;
}
};
struct CCFODynamic : CCFO
{
DrawFunc drawFunc;
ButtonPressFunc buttonPressFunc;
CCFODynamic() {};
CCFODynamic(int8* value, const char* save, DrawFunc drawFunc, ButtonPressFunc buttonPressFunc){
this->value = value;
this->save = save;
this->drawFunc = drawFunc;
this->buttonPressFunc = buttonPressFunc;
}
};
struct CMenuScreenCustom
{
char m_ScreenName[8];
int32 m_PreviousPage; // eMenuScreen
CCustomScreenLayout *layout;
ReturnPrevPageFunc returnPrevPageFunc;
struct CMenuEntry
{
int32 m_Action; // eMenuAction - below zero is CFO
char m_EntryName[8];
struct {
union {
CCFO *m_CFO; // for initializing
CCFOSelect *m_CFOSelect;
CCFODynamic *m_CFODynamic;
};
int32 m_SaveSlot; // eSaveSlot
int32 m_TargetMenu; // eMenuScreen
};
uint16 m_X;
uint16 m_Y;
uint8 m_Align;
} m_aEntries[NUM_MENUROWS];
};
extern CMenuScreenCustom aScreens[MENUPAGES];
#endif
struct MenuTrapezoid struct MenuTrapezoid
{ {
@ -617,7 +698,6 @@ public:
ISLAND_LOADING_HIGH ISLAND_LOADING_HIGH
}; };
static int8 m_DisplayIslandLoading;
static int8 m_PrefsIslandLoading; static int8 m_PrefsIslandLoading;
#define ISLAND_LOADING_IS(p) if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_##p) #define ISLAND_LOADING_IS(p) if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_##p)
@ -710,6 +790,5 @@ VALIDATE_SIZE(CMenuManager, 0x688);
#endif #endif
extern CMenuManager FrontEndMenuManager; extern CMenuManager FrontEndMenuManager;
extern CMenuScreen aScreens[];
#endif #endif

View file

@ -2,44 +2,10 @@
#include "Frontend.h" #include "Frontend.h"
#ifdef PC_MENU #ifdef PC_MENU
#ifdef CUTSCENE_BORDERS_SWITCH // Please don't touch this file, except for bug fixing or ports.
#define MENU_CUTSCENE_BORDERS_SWITCH(screen) MENUACTION_CUTSCENEBORDERS, "FEM_CSB", SAVESLOT_NONE, screen, // Check MenuScreensCustom.cpp
#else
#define MENU_CUTSCENE_BORDERS_SWITCH(screen)
#endif
#ifdef IMPROVED_VIDEOMODE
#define MENU_IMPROVED_VIDEOMODE(screen) MENUACTION_SCREENFORMAT, "FEM_SCF", SAVESLOT_NONE, screen,
#else
#define MENU_IMPROVED_VIDEOMODE(screen)
#endif
#ifdef ANISOTROPIC_FILTERING
#define MENU_MIPMAPS(screen) MENUACTION_MIPMAPS, "FED_MIP", SAVESLOT_NONE, screen,
#define MENU_TEXTURE_FILTERING(screen) MENUACTION_TEXTURE_FILTERING, "FED_FIL", SAVESLOT_NONE, screen,
#else
#define MENU_MIPMAPS(screen)
#define MENU_TEXTURE_FILTERING(screen)
#endif
#ifdef MULTISAMPLING
#define MENU_MULTISAMPLING(screen) MENUACTION_MULTISAMPLING, "FED_AAS", SAVESLOT_NONE, screen,
#else
#define MENU_MULTISAMPLING(screen)
#endif
#ifdef NO_ISLAND_LOADING
#define MENU_ISLAND_LOADING(screen) MENUACTION_ISLANDLOADING, "FEM_ISL", SAVESLOT_NONE, screen,
#else
#define MENU_ISLAND_LOADING(screen)
#endif
#ifdef PS2_ALPHA_TEST
#define MENU_PS2_ALPHA_TEST(screen) MENUACTION_PS2_ALPHA_TEST, "FEM_2PR", SAVESLOT_NONE, screen,
#else
#define MENU_PS2_ALPHA_TEST(screen)
#endif
#ifndef CUSTOM_FRONTEND_OPTIONS
CMenuScreen aScreens[] = { CMenuScreen aScreens[] = {
// MENUPAGE_STATS = 0 // MENUPAGE_STATS = 0
{ "FEH_STA", MENUPAGE_NONE, 3, { "FEH_STA", MENUPAGE_NONE, 3,
@ -72,7 +38,7 @@ CMenuScreen aScreens[] = {
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, MENUALIGN_CENTER, MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, MENUALIGN_CENTER,
}, },
// MENUPAGE_GRAPHICS_SETTINGS = 4 // MENUPAGE_DISPLAY_SETTINGS = 4
#ifdef LEGACY_MENU_OPTIONS #ifdef LEGACY_MENU_OPTIONS
#define Y_OFFSET 50 #define Y_OFFSET 50
#else #else
@ -95,14 +61,8 @@ CMenuScreen aScreens[] = {
MENUACTION_RADARMODE, "FED_RDR", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 228 + Y_OFFSET, MENUALIGN_LEFT, MENUACTION_RADARMODE, "FED_RDR", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 228 + Y_OFFSET, MENUALIGN_LEFT,
MENUACTION_HUD, "FED_HUD", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 253 + Y_OFFSET, MENUALIGN_LEFT, MENUACTION_HUD, "FED_HUD", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 253 + Y_OFFSET, MENUALIGN_LEFT,
MENUACTION_SCREENRES, "FED_RES", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 278 + Y_OFFSET, MENUALIGN_LEFT, MENUACTION_SCREENRES, "FED_RES", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 278 + Y_OFFSET, MENUALIGN_LEFT,
#ifdef IMPROVED_VIDEOMODE MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 320, 303 + Y_OFFSET, MENUALIGN_CENTER,
MENUACTION_SCREENFORMAT,"FED_POS", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 303 + Y_OFFSET, MENUALIGN_LEFT,
MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 320, 328 + Y_OFFSET, MENUALIGN_CENTER,
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 320, 353 + Y_OFFSET, MENUALIGN_CENTER,
#else
MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, 320, 303 + Y_OFFSET, MENUALIGN_CENTER,
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 320, 328 + Y_OFFSET, MENUALIGN_CENTER, MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 320, 328 + Y_OFFSET, MENUALIGN_CENTER,
#endif
}, },
#undef Y_OFFSET #undef Y_OFFSET
@ -286,10 +246,8 @@ CMenuScreen aScreens[] = {
MENUACTION_CHANGEMENU, "FEP_QUI", SAVESLOT_NONE, MENUPAGE_EXIT, 0, 0, MENUALIGN_CENTER, MENUACTION_CHANGEMENU, "FEP_QUI", SAVESLOT_NONE, MENUPAGE_EXIT, 0, 0, MENUALIGN_CENTER,
}, },
// TODO(Miami)
// MENUPAGE_KEYBOARD_CONTROLS = 30 // MENUPAGE_KEYBOARD_CONTROLS = 30
{ "FET_STI", MENUPAGE_CONTROLLER_PC, 1, { "FET_STI", MENUPAGE_CONTROLLER_PC, 1,
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, 0, 0, 0,
}, },
// MENUPAGE_MOUSE_CONTROLS = 31 // MENUPAGE_MOUSE_CONTROLS = 31
@ -314,18 +272,15 @@ CMenuScreen aScreens[] = {
// MENUPAGE_NONE = 33 // MENUPAGE_NONE = 33
{ "", 0, 0, }, { "", 0, 0, },
// MENUPAGE_OUTRO = 34
{ "", 0, 0, },
#ifdef LEGACY_MENU_OPTIONS #ifdef LEGACY_MENU_OPTIONS
// MENUPAGE_CONTROLLER_SETTINGS = 4 // MENUPAGE_CONTROLLER_SETTINGS
{ "FET_CON", MENUPAGE_OPTIONS, 0, { "FET_CON", MENUPAGE_OPTIONS, 0,
MENUACTION_CTRLCONFIG, "FEC_CCF", SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS, 0, 0, 0, MENUACTION_CTRLCONFIG, "FEC_CCF", SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS, 0, 0, 0,
MENUACTION_CTRLVIBRATION, "FEC_VIB", SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS, 0, 0, 0, MENUACTION_CTRLVIBRATION, "FEC_VIB", SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS, 0, 0, 0,
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0, MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0,
}, },
// MENUPAGE_DEBUG_MENU = 18 // MENUPAGE_DEBUG_MENU
{ "FED_DBG", MENUPAGE_NONE, 0, { "FED_DBG", MENUPAGE_NONE, 0,
MENUACTION_RELOADIDE, "FED_RID", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0, MENUACTION_RELOADIDE, "FED_RID", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0,
MENUACTION_SETDBGFLAG, "FED_DFL", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0, MENUACTION_SETDBGFLAG, "FED_DFL", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0,
@ -334,7 +289,7 @@ CMenuScreen aScreens[] = {
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0, MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0,
}, },
// MENUPAGE_CONTROLLER_PC_OLD1 = 36 // MENUPAGE_CONTROLLER_PC_OLD1
{ "FET_CTL", MENUPAGE_CONTROLLER_PC, 0, { "FET_CTL", MENUPAGE_CONTROLLER_PC, 0,
MENUACTION_GETKEY, "FEC_PLB", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1, 0, 0, 0, MENUACTION_GETKEY, "FEC_PLB", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1, 0, 0, 0,
MENUACTION_GETKEY, "FEC_CWL", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1, 0, 0, 0, MENUACTION_GETKEY, "FEC_CWL", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1, 0, 0, 0,
@ -348,12 +303,12 @@ CMenuScreen aScreens[] = {
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0, MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0,
}, },
// MENUPAGE_CONTROLLER_PC_OLD2 = 37 // MENUPAGE_CONTROLLER_PC_OLD2
{ "FET_CTL", MENUPAGE_CONTROLLER_PC, 1, { "FET_CTL", MENUPAGE_CONTROLLER_PC, 1,
}, },
// MENUPAGE_CONTROLLER_PC_OLD3 = 38 // MENUPAGE_CONTROLLER_PC_OLD3
{ "FET_CTL", MENUPAGE_CONTROLLER_PC, 2, { "FET_CTL", MENUPAGE_CONTROLLER_PC, 2,
MENUACTION_GETKEY, "FEC_LUP", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD3, 0, 0, 0, MENUACTION_GETKEY, "FEC_LUP", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD3, 0, 0, 0,
MENUACTION_GETKEY, "FEC_LDN", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD3, 0, 0, 0, MENUACTION_GETKEY, "FEC_LDN", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD3, 0, 0, 0,
@ -362,12 +317,12 @@ CMenuScreen aScreens[] = {
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0, MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0,
}, },
// MENUPAGE_CONTROLLER_PC_OLD4 = 39 // MENUPAGE_CONTROLLER_PC_OLD4
{ "FET_CTL", MENUPAGE_CONTROLLER_PC, 3, { "FET_CTL", MENUPAGE_CONTROLLER_PC, 3,
}, },
// MENUPAGE_CONTROLLER_DEBUG = 40 // MENUPAGE_CONTROLLER_DEBUG
{ "FEC_DBG", MENUPAGE_CONTROLLER_PC, 3, { "FEC_DBG", MENUPAGE_CONTROLLER_PC, 3,
MENUACTION_GETKEY, "FEC_TGD", SAVESLOT_NONE, MENUPAGE_CONTROLLER_DEBUG, 0, 0, 0, MENUACTION_GETKEY, "FEC_TGD", SAVESLOT_NONE, MENUPAGE_CONTROLLER_DEBUG, 0, 0, 0,
MENUACTION_GETKEY, "FEC_TDO", SAVESLOT_NONE, MENUPAGE_CONTROLLER_DEBUG, 0, 0, 0, MENUACTION_GETKEY, "FEC_TDO", SAVESLOT_NONE, MENUPAGE_CONTROLLER_DEBUG, 0, 0, 0,
@ -376,6 +331,10 @@ CMenuScreen aScreens[] = {
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0, MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0,
}, },
#endif #endif
// MENUPAGE_OUTRO - Originally 34
{ "", 0, 0, },
}; };
#endif #endif
#endif

View file

@ -0,0 +1,734 @@
#include "common.h"
#include "platform.h"
#include "crossplatform.h"
#include "Renderer.h"
#include "Frontend.h"
#include "Font.h"
#include "Camera.h"
#include "main.h"
#include "MBlur.h"
#include "postfx.h"
#include "custompipes.h"
#include "RwHelper.h"
#include "Text.h"
#include "Streaming.h"
#include "FileLoader.h"
#include "Collision.h"
#include "ModelInfo.h"
#include "Pad.h"
// Menu screens array is at the bottom of the file.
#ifdef PC_MENU
#ifdef CUSTOM_FRONTEND_OPTIONS
#ifdef IMPROVED_VIDEOMODE
#define VIDEOMODE_SELECTOR MENUACTION_CFO_SELECT, "FEM_SCF", { new CCFOSelect((int8*)&FrontEndMenuManager.m_nPrefsWindowed, nil, screenModes, 2, true, ScreenModeAfterChange) }, 0, 0, MENUALIGN_LEFT,
#else
#define VIDEOMODE_SELECTOR
#endif
#ifdef MULTISAMPLING
#define MULTISAMPLING_SELECTOR MENUACTION_CFO_DYNAMIC, "FED_AAS", { new CCFODynamic((int8*)&FrontEndMenuManager.m_nPrefsMSAALevel, "MultiSampling", MultiSamplingDraw, MultiSamplingButtonPress) }, 0, 0, MENUALIGN_LEFT,
#else
#define MULTISAMPLING_SELECTOR
#endif
#ifdef CUTSCENE_BORDERS_SWITCH
#define CUTSCENE_BORDERS_TOGGLE MENUACTION_CFO_SELECT, "FEM_CSB", { new CCFOSelect((int8 *)&FrontEndMenuManager.m_PrefsCutsceneBorders, "CutsceneBorders", off_on, 2, false, nil) }, 0, 0, MENUALIGN_LEFT,
#else
#define CUTSCENE_BORDERS_TOGGLE
#endif
#ifdef FREE_CAM
#define FREE_CAM_TOGGLE MENUACTION_CFO_SELECT, "FEC_FRC", { new CCFOSelect((int8*)&TheCamera.bFreeCam, "FreeCam", off_on, 2, false, nil) }, 0, 0, MENUALIGN_LEFT,
#else
#define FREE_CAM_TOGGLE
#endif
#ifdef PS2_ALPHA_TEST
#define DUALPASS_SELECTOR MENUACTION_CFO_SELECT, "FEM_2PR", { new CCFOSelect((int8*)&gPS2alphaTest, "PS2AlphaTest", off_on, 2, false, nil) }, 0, 0, MENUALIGN_LEFT,
#else
#define DUALPASS_SELECTOR
#endif
#ifdef NO_ISLAND_LOADING
#define ISLAND_LOADING_SELECTOR MENUACTION_CFO_SELECT, "FEM_ISL", { new CCFOSelect((int8*)&FrontEndMenuManager.m_PrefsIslandLoading, "IslandLoading", islandLoadingOpts, ARRAY_SIZE(islandLoadingOpts), true, IslandLoadingAfterChange) }, 0, 0, MENUALIGN_LEFT,
#else
#define ISLAND_LOADING_SELECTOR
#endif
#ifdef EXTENDED_COLOURFILTER
#define POSTFX_SELECTORS \
MENUACTION_CFO_SELECT, "FED_CLF", { new CCFOSelect((int8*)&CPostFX::EffectSwitch, "ColourFilter", filterNames, ARRAY_SIZE(filterNames), false, nil) }, 0, 0, MENUALIGN_LEFT, \
MENUACTION_CFO_SELECT, "FED_MBL", { new CCFOSelect((int8*)&CPostFX::MotionBlurOn, "MotionBlur", off_on, 2, false, nil) }, 0, 0, MENUALIGN_LEFT,
#else
#define POSTFX_SELECTORS
#endif
#ifdef EXTENDED_PIPELINES
#define PIPELINES_SELECTOR \
MENUACTION_CFO_SELECT, "FED_VPL", { new CCFOSelect((int8*)&CustomPipes::VehiclePipeSwitch, "VehiclePipeline", vehPipelineNames, ARRAY_SIZE(vehPipelineNames), false, nil) }, 0, 0, MENUALIGN_LEFT, \
MENUACTION_CFO_SELECT, "FED_PRM", { new CCFOSelect((int8*)&CustomPipes::RimlightEnable, "NeoRimLight", off_on, 2, false, nil) }, 0, 0, MENUALIGN_LEFT, \
MENUACTION_CFO_SELECT, "FED_WLM", { new CCFOSelect((int8*)&CustomPipes::LightmapEnable, "NeoLightMaps", off_on, 2, false, nil) }, 0, 0, MENUALIGN_LEFT, \
MENUACTION_CFO_SELECT, "FED_RGL", { new CCFOSelect((int8*)&CustomPipes::GlossEnable, "NeoRoadGloss", off_on, 2, false, nil) }, 0, 0, MENUALIGN_LEFT,
#else
#define PIPELINES_SELECTOR
#endif
#ifdef INVERT_LOOK_FOR_PAD
#define INVERT_PAD_SELECTOR MENUACTION_CFO_SELECT, "FEC_ILU", { new CCFOSelect((int8*)&CPad::bInvertLook4Pad, nil, off_on, 2, false, nil) }, 150, 0, MENUALIGN_LEFT,
#else
#define INVERT_PAD_SELECTOR
#endif
const char *filterNames[] = { "FEM_NON", "FEM_SIM", "FEM_NRM", "FEM_MOB" };
const char *vehPipelineNames[] = { "FED_MFX", "FED_NEO" };
const char *off_on[] = { "FEM_OFF", "FEM_ON" };
void RestoreDefGraphics(int8 action) {
if (action != FEOPTION_ACTION_SELECT)
return;
#ifdef PS2_ALPHA_TEST
gPS2alphaTest = false;
#endif
#ifdef MULTISAMPLING
FrontEndMenuManager.m_nPrefsMSAALevel = FrontEndMenuManager.m_nDisplayMSAALevel = 0;
#endif
#ifdef NO_ISLAND_LOADING
if (!FrontEndMenuManager.m_bGameNotLoaded) {
FrontEndMenuManager.m_PrefsIslandLoading = FrontEndMenuManager.ISLAND_LOADING_LOW;
CCollision::bAlreadyLoaded = false;
CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
CStreaming::RequestIslands(CGame::currLevel);
CStreaming::LoadAllRequestedModels(true);
} else
FrontEndMenuManager.m_PrefsIslandLoading = FrontEndMenuManager.ISLAND_LOADING_LOW;
#endif
#ifdef GRAPHICS_MENU_OPTIONS // otherwise Frontend will handle those
FrontEndMenuManager.m_PrefsFrameLimiter = true;
FrontEndMenuManager.m_PrefsVsyncDisp = true;
#ifdef LEGACY_MENU_OPTIONS
FrontEndMenuManager.m_PrefsVsync = true;
#endif
FrontEndMenuManager.m_PrefsUseWideScreen = false;
FrontEndMenuManager.m_nDisplayVideoMode = FrontEndMenuManager.m_nPrefsVideoMode;
CMBlur::BlurOn = false;
FrontEndMenuManager.SaveSettings();
#endif
}
void RestoreDefDisplay(int8 action) {
if (action != FEOPTION_ACTION_SELECT)
return;
#ifdef CUTSCENE_BORDERS_SWITCH
FrontEndMenuManager.m_PrefsCutsceneBorders = true;
#endif
#ifdef FREE_CAM
TheCamera.bFreeCam = false;
#endif
#ifdef GRAPHICS_MENU_OPTIONS // otherwise Frontend will handle those
FrontEndMenuManager.m_PrefsBrightness = 256;
FrontEndMenuManager.m_PrefsLOD = 1.2f;
CRenderer::ms_lodDistScale = 1.2f;
FrontEndMenuManager.m_PrefsShowSubtitles = false;
FrontEndMenuManager.m_PrefsShowLegends = true;
FrontEndMenuManager.m_PrefsRadarMode = 0;
FrontEndMenuManager.m_PrefsShowHud = true;
FrontEndMenuManager.SaveSettings();
#endif
}
#ifdef NO_ISLAND_LOADING
const char *islandLoadingOpts[] = { "FEM_LOW", "FEM_MED", "FEM_HIG" };
void IslandLoadingAfterChange(int8 before, int8 after) {
if (!FrontEndMenuManager.m_bGameNotLoaded) {
if (after > FrontEndMenuManager.ISLAND_LOADING_LOW) {
FrontEndMenuManager.m_PrefsIslandLoading = before; // calls below needs previous mode :shrug:
if (after == FrontEndMenuManager.ISLAND_LOADING_HIGH)
CStreaming::RemoveIslandsNotUsed(LEVEL_GENERIC);
if (before == FrontEndMenuManager.ISLAND_LOADING_LOW) {
if (CGame::currLevel != LEVEL_INDUSTRIAL)
CFileLoader::LoadCollisionFromDatFile(LEVEL_INDUSTRIAL);
if (CGame::currLevel != LEVEL_COMMERCIAL)
CFileLoader::LoadCollisionFromDatFile(LEVEL_COMMERCIAL);
if (CGame::currLevel != LEVEL_SUBURBAN)
CFileLoader::LoadCollisionFromDatFile(LEVEL_SUBURBAN);
CCollision::bAlreadyLoaded = true;
FrontEndMenuManager.m_PrefsIslandLoading = after;
CStreaming::RequestBigBuildings(CGame::currLevel);
} else if (before == FrontEndMenuManager.ISLAND_LOADING_HIGH) {
FrontEndMenuManager.m_PrefsIslandLoading = after;
CStreaming::RequestIslands(CGame::currLevel);
} else
FrontEndMenuManager.m_PrefsIslandLoading = after;
} else { // low
CCollision::bAlreadyLoaded = false;
CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
CStreaming::RequestIslands(CGame::currLevel);
}
CStreaming::LoadAllRequestedModels(true);
}
FrontEndMenuManager.SetHelperText(0);
}
#endif
#ifdef MORE_LANGUAGES
void LangPolSelect(int8 action)
{
if (action == FEOPTION_ACTION_SELECT) {
FrontEndMenuManager.m_PrefsLanguage = CMenuManager::LANGUAGE_POLISH;
FrontEndMenuManager.m_bFrontEnd_ReloadObrTxtGxt = true;
FrontEndMenuManager.InitialiseChangedLanguageSettings();
FrontEndMenuManager.SaveSettings();
}
}
void LangRusSelect(int8 action)
{
if (action == FEOPTION_ACTION_SELECT) {
FrontEndMenuManager.m_PrefsLanguage = CMenuManager::LANGUAGE_RUSSIAN;
FrontEndMenuManager.m_bFrontEnd_ReloadObrTxtGxt = true;
FrontEndMenuManager.InitialiseChangedLanguageSettings();
FrontEndMenuManager.SaveSettings();
}
}
void LangJapSelect(int8 action)
{
if (action == FEOPTION_ACTION_SELECT) {
FrontEndMenuManager.m_PrefsLanguage = CMenuManager::LANGUAGE_JAPANESE;
FrontEndMenuManager.m_bFrontEnd_ReloadObrTxtGxt = true;
FrontEndMenuManager.InitialiseChangedLanguageSettings();
FrontEndMenuManager.SaveSettings();
}
}
#endif
#ifndef MULTISAMPLING
void GraphicsGoBack() {
}
#else
void GraphicsGoBack() {
FrontEndMenuManager.m_nDisplayMSAALevel = FrontEndMenuManager.m_nPrefsMSAALevel;
}
void MultiSamplingButtonPress(int8 action) {
if (action == FEOPTION_ACTION_SELECT) {
if (FrontEndMenuManager.m_nDisplayMSAALevel != FrontEndMenuManager.m_nPrefsMSAALevel) {
FrontEndMenuManager.m_nPrefsMSAALevel = FrontEndMenuManager.m_nDisplayMSAALevel;
_psSelectScreenVM(FrontEndMenuManager.m_nPrefsVideoMode);
FrontEndMenuManager.SetHelperText(0);
FrontEndMenuManager.SaveSettings();
}
} else if (action == FEOPTION_ACTION_LEFT || action == FEOPTION_ACTION_RIGHT) {
if (FrontEndMenuManager.m_bGameNotLoaded) {
FrontEndMenuManager.m_nDisplayMSAALevel += (action == FEOPTION_ACTION_RIGHT ? 1 : -1);
int i = 0;
int maxAA = RwD3D8EngineGetMaxMultiSamplingLevels();
while (maxAA != 1) {
i++;
maxAA >>= 1;
}
if (FrontEndMenuManager.m_nDisplayMSAALevel < 0)
FrontEndMenuManager.m_nDisplayMSAALevel = i;
else if (FrontEndMenuManager.m_nDisplayMSAALevel > i)
FrontEndMenuManager.m_nDisplayMSAALevel = 0;
}
} else if (action == FEOPTION_ACTION_FOCUSLOSS) {
if (FrontEndMenuManager.m_nDisplayMSAALevel != FrontEndMenuManager.m_nPrefsMSAALevel) {
FrontEndMenuManager.m_nDisplayMSAALevel = FrontEndMenuManager.m_nPrefsMSAALevel;
FrontEndMenuManager.SetHelperText(3);
}
}
}
wchar* MultiSamplingDraw(bool *disabled, bool userHovering) {
static wchar unicodeTemp[64];
if (userHovering) {
if (FrontEndMenuManager.m_nDisplayMSAALevel == FrontEndMenuManager.m_nPrefsMSAALevel) {
if (FrontEndMenuManager.m_nHelperTextMsgId == 1) // Press enter to apply
FrontEndMenuManager.ResetHelperText();
} else {
FrontEndMenuManager.SetHelperText(1);
}
} else {
if (FrontEndMenuManager.m_nDisplayMSAALevel != FrontEndMenuManager.m_nPrefsMSAALevel) {
FrontEndMenuManager.m_nDisplayMSAALevel = FrontEndMenuManager.m_nPrefsMSAALevel;
}
}
if (!FrontEndMenuManager.m_bGameNotLoaded)
*disabled = true;
switch (FrontEndMenuManager.m_nDisplayMSAALevel) {
case 0:
return TheText.Get("FEM_OFF");
default:
sprintf(gString, "%iX", 1 << (FrontEndMenuManager.m_nDisplayMSAALevel));
AsciiToUnicode(gString, unicodeTemp);
return unicodeTemp;
}
}
#endif
#ifdef IMPROVED_VIDEOMODE
const char* screenModes[] = { "FED_FLS", "FED_WND" };
void ScreenModeAfterChange(int8 before, int8 after)
{
_psSelectScreenVM(FrontEndMenuManager.m_nPrefsVideoMode); // apply same resolution
FrontEndMenuManager.SetHelperText(0);
}
#endif
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
wchar selectedJoystickUnicode[128];
wchar* DetectJoystickDraw(bool* disabled, bool userHovering) {
int numButtons;
int found = -1;
const char *joyname;
if (userHovering) {
for (int i = 0; i <= GLFW_JOYSTICK_LAST; i++) {
if ((joyname = glfwGetJoystickName(i))) {
const uint8* buttons = glfwGetJoystickButtons(i, &numButtons);
for (int j = 0; j < numButtons; j++) {
if (buttons[j]) {
found = i;
break;
}
}
if (found != -1)
break;
}
}
if (found != -1 && PSGLOBAL(joy1id) != found) {
if (PSGLOBAL(joy1id) != -1 && PSGLOBAL(joy1id) != found)
PSGLOBAL(joy2id) = PSGLOBAL(joy1id);
else
PSGLOBAL(joy2id) = -1;
strcpy(gSelectedJoystickName, joyname);
PSGLOBAL(joy1id) = found;
}
}
if (PSGLOBAL(joy1id) == -1)
AsciiToUnicode("Not found", selectedJoystickUnicode);
else
AsciiToUnicode(gSelectedJoystickName, selectedJoystickUnicode);
return selectedJoystickUnicode;
}
#endif
CMenuScreenCustom aScreens[] = {
// MENUPAGE_STATS = 0
{ "FEH_STA", MENUPAGE_NONE, nil, nil,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 190, 320, MENUALIGN_RIGHT,
},
// MENUPAGE_NEW_GAME = 1
{ "FEP_STG", MENUPAGE_NONE, nil, nil,
MENUACTION_CHANGEMENU, "FES_NGA", {nil, SAVESLOT_NONE, MENUPAGE_NEW_GAME_RELOAD}, 320, 155, MENUALIGN_CENTER,
MENUACTION_CHANGEMENU, "FES_LOA", {nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_LOAD_SLOT}, 0, 0, MENUALIGN_CENTER,
MENUACTION_CHANGEMENU, "FES_DEL", {nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT}, 0, 0, MENUALIGN_CENTER,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, 0}, 0, 0, MENUALIGN_CENTER,
},
// MENUPAGE_BRIEFS = 2
{ "FEH_BRI", MENUPAGE_NONE, nil, nil,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 190, 320, MENUALIGN_RIGHT,
},
// MENUPAGE_SOUND_SETTINGS = 3
{ "FEH_AUD", MENUPAGE_OPTIONS, nil, nil,
MENUACTION_MUSICVOLUME, "FEA_MUS", {nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS}, 40, 76, MENUALIGN_LEFT,
MENUACTION_SFXVOLUME, "FEA_SFX", {nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS}, 0, 0, MENUALIGN_LEFT,
MENUACTION_MP3VOLUMEBOOST, "FEA_MPB", {nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS}, 0, 0, MENUALIGN_LEFT,
MENUACTION_AUDIOHW, "FEA_3DH", {nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS}, 0, 0, MENUALIGN_LEFT,
MENUACTION_SPEAKERCONF, "FEA_SPK", {nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS}, 0, 0, MENUALIGN_LEFT,
MENUACTION_DYNAMICACOUSTIC, "FET_DAM", {nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS}, 0, 0, MENUALIGN_LEFT,
MENUACTION_RADIO, "FEA_RSS", {nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS}, 0, 0, MENUALIGN_LEFT,
MENUACTION_RESTOREDEF, "FET_DEF", {nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS}, 320, 367, MENUALIGN_CENTER,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, MENUALIGN_CENTER,
},
// MENUPAGE_DISPLAY_SETTINGS = 4
#ifndef GRAPHICS_MENU_OPTIONS
{ "FEH_DIS", MENUPAGE_OPTIONS, new CCustomScreenLayout({40, 78, 25, true}), nil,
MENUACTION_BRIGHTNESS, "FED_BRI", {nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS}, 0, 0, MENUALIGN_LEFT,
MENUACTION_DRAWDIST, "FEM_LOD", {nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS}, 0, 0, MENUALIGN_LEFT,
#ifdef LEGACY_MENU_OPTIONS
MENUACTION_FRAMESYNC, "FEM_VSC", {nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS}, 0, 0, MENUALIGN_LEFT,
#endif
MENUACTION_FRAMELIMIT, "FEM_FRM", {nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS}, 0, 0, MENUALIGN_LEFT,
#if defined LEGACY_MENU_OPTIONS && !defined EXTENDED_COLOURFILTER
MENUACTION_TRAILS, "FED_TRA", {nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS}, 0, 0, MENUALIGN_LEFT,
#endif
MENUACTION_SUBTITLES, "FED_SUB", {nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS}, 0, 0, MENUALIGN_LEFT,
MENUACTION_WIDESCREEN, "FED_WIS", {nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS}, 0, 0, MENUALIGN_LEFT,
MENUACTION_LEGENDS, "MAP_LEG", {nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS}, 0, 0, MENUALIGN_LEFT,
MENUACTION_RADARMODE, "FED_RDR", {nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS}, 0, 0, MENUALIGN_LEFT,
MENUACTION_HUD, "FED_HUD", {nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS}, 0, 0, MENUALIGN_LEFT,
MENUACTION_SCREENRES, "FED_RES", {nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS}, 0, 0, MENUALIGN_LEFT,
VIDEOMODE_SELECTOR
MULTISAMPLING_SELECTOR
ISLAND_LOADING_SELECTOR
DUALPASS_SELECTOR
CUTSCENE_BORDERS_TOGGLE
FREE_CAM_TOGGLE
POSTFX_SELECTORS
PIPELINES_SELECTOR
MENUACTION_RESTOREDEF, "FET_DEF", {nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS}, 320, 0, MENUALIGN_CENTER,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 320, 0, MENUALIGN_CENTER,
},
#else
{ "FEH_DIS", MENUPAGE_OPTIONS, new CCustomScreenLayout({40, 78, 25, true}), nil,
MENUACTION_BRIGHTNESS, "FED_BRI", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, 0, 0, MENUALIGN_LEFT,
MENUACTION_DRAWDIST, "FEM_LOD", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, 0, 0, MENUALIGN_LEFT,
CUTSCENE_BORDERS_TOGGLE
FREE_CAM_TOGGLE
MENUACTION_LEGENDS, "MAP_LEG", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, 0, 0, MENUALIGN_LEFT,
MENUACTION_RADARMODE, "FED_RDR", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, 0, 0, MENUALIGN_LEFT,
MENUACTION_HUD, "FED_HUD", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, 0, 0, MENUALIGN_LEFT,
MENUACTION_SUBTITLES, "FED_SUB", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, 0, 0, MENUALIGN_LEFT,
MENUACTION_CFO_DYNAMIC, "FET_DEF", { new CCFODynamic(nil, nil, nil, RestoreDefDisplay) }, 320, 0, MENUALIGN_CENTER,
MENUACTION_GOBACK, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE}, 320, 0, MENUALIGN_CENTER,
},
#endif
// MENUPAGE_LANGUAGE_SETTINGS = 5
{ "FEH_LAN", MENUPAGE_OPTIONS, nil, nil,
MENUACTION_LANG_ENG, "FEL_ENG", {nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS}, 320, 132, MENUALIGN_CENTER,
MENUACTION_LANG_FRE, "FEL_FRE", {nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS}, 0, 0, MENUALIGN_CENTER,
MENUACTION_LANG_GER, "FEL_GER", {nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS}, 0, 0, MENUALIGN_CENTER,
MENUACTION_LANG_ITA, "FEL_ITA", {nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS}, 0, 0, MENUALIGN_CENTER,
MENUACTION_LANG_SPA, "FEL_SPA", {nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS}, 0, 0, MENUALIGN_CENTER,
#ifdef MORE_LANGUAGES
MENUACTION_CFO_DYNAMIC, "FEL_POL", { new CCFODynamic(nil, nil, nil, LangPolSelect) }, 0, 0, MENUALIGN_CENTER,
MENUACTION_CFO_DYNAMIC, "FEL_RUS", { new CCFODynamic(nil, nil, nil, LangRusSelect) }, 0, 0, MENUALIGN_CENTER
MENUACTION_CFO_DYNAMIC, "FEL_JAP", { new CCFODynamic(nil, nil, nil, LangJapSelect) }, 0, 0, MENUALIGN_CENTER,
#endif
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, MENUALIGN_CENTER,
},
// MENUPAGE_MAP = 6
{ "FEH_MAP", MENUPAGE_NONE, nil, nil,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 70, 380, MENUALIGN_CENTER,
},
// MENUPAGE_NEW_GAME_RELOAD = 7
{ "FES_NGA", MENUPAGE_NEW_GAME, nil, nil,
MENUACTION_LABEL, "FESZ_QR", {nil, SAVESLOT_NONE, 0}, 0, 0, 0,
MENUACTION_NO, "FEM_NO", {nil, SAVESLOT_NONE, MENUPAGE_NEW_GAME}, 320, 200, MENUALIGN_CENTER,
MENUACTION_NEWGAME, "FEM_YES", {nil, SAVESLOT_NONE, MENUPAGE_NEW_GAME_RELOAD}, 320, 225, MENUALIGN_CENTER,
},
// MENUPAGE_CHOOSE_LOAD_SLOT = 8
{ "FET_LG", MENUPAGE_NEW_GAME, nil, nil,
MENUACTION_CHECKSAVE, "FEM_SL1", {nil, SAVESLOT_1, 0}, 40, 90, MENUALIGN_LEFT,
MENUACTION_CHECKSAVE, "FEM_SL2", {nil, SAVESLOT_2, 0}, 0, 0, MENUALIGN_LEFT,
MENUACTION_CHECKSAVE, "FEM_SL3", {nil, SAVESLOT_3, 0}, 0, 0, MENUALIGN_LEFT,
MENUACTION_CHECKSAVE, "FEM_SL4", {nil, SAVESLOT_4, 0}, 0, 0, MENUALIGN_LEFT,
MENUACTION_CHECKSAVE, "FEM_SL5", {nil, SAVESLOT_5, 0}, 0, 0, MENUALIGN_LEFT,
MENUACTION_CHECKSAVE, "FEM_SL6", {nil, SAVESLOT_6, 0}, 0, 0, MENUALIGN_LEFT,
MENUACTION_CHECKSAVE, "FEM_SL7", {nil, SAVESLOT_7, 0}, 0, 0, MENUALIGN_LEFT,
MENUACTION_CHECKSAVE, "FEM_SL8", {nil, SAVESLOT_8, 0}, 0, 0, MENUALIGN_LEFT,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, 0}, 320, 345, MENUALIGN_CENTER,
},
// MENUPAGE_CHOOSE_DELETE_SLOT = 9
{ "FES_DEL", MENUPAGE_NEW_GAME, nil, nil,
MENUACTION_CHECKSAVE, "FEM_SL1", {nil, SAVESLOT_1, 0}, 40, 90, MENUALIGN_LEFT,
MENUACTION_CHECKSAVE, "FEM_SL2", {nil, SAVESLOT_2, 0}, 0, 0, MENUALIGN_LEFT,
MENUACTION_CHECKSAVE, "FEM_SL3", {nil, SAVESLOT_3, 0}, 0, 0, MENUALIGN_LEFT,
MENUACTION_CHECKSAVE, "FEM_SL4", {nil, SAVESLOT_4, 0}, 0, 0, MENUALIGN_LEFT,
MENUACTION_CHECKSAVE, "FEM_SL5", {nil, SAVESLOT_5, 0}, 0, 0, MENUALIGN_LEFT,
MENUACTION_CHECKSAVE, "FEM_SL6", {nil, SAVESLOT_6, 0}, 0, 0, MENUALIGN_LEFT,
MENUACTION_CHECKSAVE, "FEM_SL7", {nil, SAVESLOT_7, 0}, 0, 0, MENUALIGN_LEFT,
MENUACTION_CHECKSAVE, "FEM_SL8", {nil, SAVESLOT_8, 0}, 0, 0, MENUALIGN_LEFT,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, 0}, 320, 345, MENUALIGN_CENTER,
},
// MENUPAGE_LOAD_SLOT_CONFIRM = 10
{ "FET_LG", MENUPAGE_CHOOSE_LOAD_SLOT, nil, nil,
MENUACTION_LABEL, "FESZ_QL", {nil, SAVESLOT_NONE, 0}, 0, 0, 0,
MENUACTION_NO, "FEM_NO", {nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_LOAD_SLOT}, 320, 200, MENUALIGN_CENTER,
MENUACTION_YES, "FEM_YES", {nil, SAVESLOT_NONE, MENUPAGE_LOADING_IN_PROGRESS}, 320, 225, MENUALIGN_CENTER,
},
// MENUPAGE_DELETE_SLOT_CONFIRM = 11
{ "FES_DEL", MENUPAGE_CHOOSE_DELETE_SLOT, nil, nil,
MENUACTION_LABEL, "FESZ_QD", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, 0,
MENUACTION_NO, "FEM_NO", {nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT}, 320, 200, MENUALIGN_CENTER,
MENUACTION_YES, "FEM_YES", {nil, SAVESLOT_NONE, MENUPAGE_DELETING_IN_PROGRESS}, 320, 225, MENUALIGN_CENTER,
},
// MENUPAGE_LOADING_IN_PROGRESS = 12
{ "FET_LG", MENUPAGE_CHOOSE_LOAD_SLOT, nil, nil,
},
// MENUPAGE_DELETING_IN_PROGRESS = 13
{ "FES_DEL", MENUPAGE_CHOOSE_DELETE_SLOT, nil, nil,
},
// MENUPAGE_DELETE_SUCCESSFUL = 14
{ "FES_DEL", MENUPAGE_NEW_GAME, nil, nil,
MENUACTION_LABEL, "FES_DSC", {nil, SAVESLOT_NONE, 0}, 0, 0, 0,
MENUACTION_CHANGEMENU, "FEM_OK", {nil, SAVESLOT_NONE, MENUPAGE_NEW_GAME}, 320, 225, MENUALIGN_CENTER,
},
// MENUPAGE_CHOOSE_SAVE_SLOT = 15
{ "FET_SG", MENUPAGE_DISABLED, nil, nil,
MENUACTION_SAVEGAME, "FEM_SL1", {nil, SAVESLOT_1, MENUPAGE_SAVE_OVERWRITE_CONFIRM}, 40, 90, MENUALIGN_LEFT,
MENUACTION_SAVEGAME, "FEM_SL2", {nil, SAVESLOT_2, MENUPAGE_SAVE_OVERWRITE_CONFIRM}, 0, 0, MENUALIGN_LEFT,
MENUACTION_SAVEGAME, "FEM_SL3", {nil, SAVESLOT_3, MENUPAGE_SAVE_OVERWRITE_CONFIRM}, 0, 0, MENUALIGN_LEFT,
MENUACTION_SAVEGAME, "FEM_SL4", {nil, SAVESLOT_4, MENUPAGE_SAVE_OVERWRITE_CONFIRM}, 0, 0, MENUALIGN_LEFT,
MENUACTION_SAVEGAME, "FEM_SL5", {nil, SAVESLOT_5, MENUPAGE_SAVE_OVERWRITE_CONFIRM}, 0, 0, MENUALIGN_LEFT,
MENUACTION_SAVEGAME, "FEM_SL6", {nil, SAVESLOT_6, MENUPAGE_SAVE_OVERWRITE_CONFIRM}, 0, 0, MENUALIGN_LEFT,
MENUACTION_SAVEGAME, "FEM_SL7", {nil, SAVESLOT_7, MENUPAGE_SAVE_OVERWRITE_CONFIRM}, 0, 0, MENUALIGN_LEFT,
MENUACTION_SAVEGAME, "FEM_SL8", {nil, SAVESLOT_8, MENUPAGE_SAVE_OVERWRITE_CONFIRM}, 0, 0, MENUALIGN_LEFT,
MENUACTION_RESUME_FROM_SAVEZONE,"FESZ_CA", {nil, SAVESLOT_NONE, 0}, 320, 345, MENUALIGN_CENTER,
},
// MENUPAGE_SAVE_OVERWRITE_CONFIRM = 16
{ "FET_SG", MENUPAGE_CHOOSE_SAVE_SLOT, nil, nil,
MENUACTION_LABEL, "FESZ_QZ", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, 0,
MENUACTION_NO, "FEM_NO", {nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT}, 320, 200, MENUALIGN_CENTER,
MENUACTION_YES, "FEM_YES", {nil, SAVESLOT_NONE, MENUPAGE_SAVING_IN_PROGRESS}, 320, 225, MENUALIGN_CENTER,
},
// MENUPAGE_SAVING_IN_PROGRESS = 17
{ "FET_SG", MENUPAGE_CHOOSE_SAVE_SLOT, nil, nil,
},
// MENUPAGE_SAVE_SUCCESSFUL = 18
{ "FET_SG", MENUPAGE_CHOOSE_SAVE_SLOT, nil, nil,
MENUACTION_LABEL, "FES_SSC", {nil, SAVESLOT_LABEL, MENUPAGE_NONE}, 0, 0, 0,
MENUACTION_RESUME_FROM_SAVEZONE, "FEM_OK", {nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT}, 320, 225, MENUALIGN_CENTER,
},
// MENUPAGE_SAVE_CUSTOM_WARNING = 19
{ "FET_SG", MENUPAGE_NONE, nil, nil,
MENUACTION_LABEL, "", {nil, SAVESLOT_NONE, 0}, 0, 0, 0,
MENUACTION_CHANGEMENU, "FEM_OK", {nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT}, 320, 225, MENUALIGN_CENTER,
},
// MENUPAGE_SAVE_CHEAT_WARNING = 20
{ "FET_SG", MENUPAGE_NEW_GAME, nil, nil,
MENUACTION_LABEL, "FES_CHE", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, 0,
MENUACTION_CHANGEMENU, "FEM_OK", {nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT}, 320, 225, MENUALIGN_CENTER,
},
// MENUPAGE_SKIN_SELECT = 21
{ "FET_PS", MENUPAGE_OPTIONS, nil, nil,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_OPTIONS}, 0, 0, 0,
},
// MENUPAGE_SAVE_UNUSED = 22
{ "FET_SG", MENUPAGE_NEW_GAME, nil, nil,
MENUACTION_LABEL, "FED_LWR", {nil, SAVESLOT_NONE, 0}, 0, 0, 0,
MENUACTION_CHANGEMENU, "FEC_OKK", {nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT}, 0, 0, 0,
},
// MENUPAGE_SAVE_FAILED = 23
{ "FET_SG", MENUPAGE_CHOOSE_SAVE_SLOT, nil, nil,
MENUACTION_LABEL, "FEC_SVU", {nil, SAVESLOT_NONE, 0}, 0, 0, 0,
MENUACTION_CHANGEMENU, "FEC_OKK", {nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT}, 0, 0, 0,
},
// MENUPAGE_SAVE_FAILED_2 = 24
{ "FET_LG", MENUPAGE_CHOOSE_SAVE_SLOT, nil, nil,
MENUACTION_LABEL, "FEC_SVU", {nil, SAVESLOT_NONE, 0}, 0, 0, 0,
},
// MENUPAGE_LOAD_FAILED = 25
{ "FET_LG", MENUPAGE_NEW_GAME, nil, nil,
MENUACTION_LABEL, "FEC_LUN", {nil, SAVESLOT_NONE, 0}, 0, 0, 0,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_NEW_GAME}, 0, 0, 0,
},
// MENUPAGE_CONTROLLER_PC = 26
{ "FET_CTL", MENUPAGE_OPTIONS, new CCustomScreenLayout({0, 0, MENU_DEFAULT_LINE_HEIGHT, false, false, 150}), nil,
MENUACTION_CTRLMETHOD, "FET_STI", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC}, 320, 150, MENUALIGN_CENTER,
MENUACTION_KEYBOARDCTRLS,"FEC_RED", {nil, SAVESLOT_NONE, MENUPAGE_KEYBOARD_CONTROLS}, 0, 0, MENUALIGN_CENTER,
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
MENUACTION_CHANGEMENU, "FEC_JOD", {nil, SAVESLOT_NONE, MENUPAGE_DETECT_JOYSTICK}, 0, 0, MENUALIGN_CENTER,
#endif
MENUACTION_CHANGEMENU, "FEC_MOU", {nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS}, 0, 0, MENUALIGN_CENTER,
INVERT_PAD_SELECTOR
MENUACTION_RESTOREDEF, "FET_DEF", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC}, 320, 0, MENUALIGN_CENTER,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, 0}, 320, 0, MENUALIGN_CENTER,
},
// MENUPAGE_OPTIONS = 27
{ "FET_OPT", MENUPAGE_NONE, nil, nil,
MENUACTION_CHANGEMENU, "FEO_CON", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC}, 320, 132, MENUALIGN_CENTER,
MENUACTION_LOADRADIO, "FEO_AUD", {nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS}, 0, 0, MENUALIGN_CENTER,
MENUACTION_CHANGEMENU, "FEO_DIS", {nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS}, 0, 0, MENUALIGN_CENTER,
#ifdef GRAPHICS_MENU_OPTIONS
MENUACTION_CHANGEMENU, "FET_GRA", {nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS}, 0, 0, MENUALIGN_CENTER,
#endif
MENUACTION_CHANGEMENU, "FEO_LAN", {nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS}, 0, 0, MENUALIGN_CENTER,
MENUACTION_PLAYERSETUP, "FET_PS", {nil, SAVESLOT_NONE, MENUPAGE_SKIN_SELECT}, 0, 0, MENUALIGN_CENTER,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, 0}, 0, 0, MENUALIGN_CENTER,
},
// MENUPAGE_EXIT = 28
{ "FET_QG", MENUPAGE_NONE, nil, nil,
MENUACTION_LABEL, "FEQ_SRE", {nil, SAVESLOT_NONE, 0}, 0, 0, 0,
MENUACTION_DONTCANCEL, "FEM_NO", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 320, 200, MENUALIGN_CENTER,
MENUACTION_CANCELGAME, "FEM_YES", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 320, 225, MENUALIGN_CENTER,
},
// MENUPAGE_START_MENU = 29
{ "FEM_MM", MENUPAGE_DISABLED, nil, nil,
MENUACTION_CHANGEMENU, "FEP_STG", {nil, SAVESLOT_NONE, MENUPAGE_NEW_GAME}, 320, 170, MENUALIGN_CENTER,
MENUACTION_CHANGEMENU, "FEP_OPT", {nil, SAVESLOT_NONE, MENUPAGE_OPTIONS}, 0, 0, MENUALIGN_CENTER,
MENUACTION_CHANGEMENU, "FEP_QUI", {nil, SAVESLOT_NONE, MENUPAGE_EXIT}, 0, 0, MENUALIGN_CENTER,
},
// MENUPAGE_KEYBOARD_CONTROLS = 30
{ "FET_STI", MENUPAGE_CONTROLLER_PC, nil, nil,
},
// MENUPAGE_MOUSE_CONTROLS = 31
{ "FEC_MOU", MENUPAGE_CONTROLLER_PC, nil, nil,
MENUACTION_MOUSESENS, "FEC_MSH", {nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS}, 40, 170, MENUALIGN_LEFT,
MENUACTION_INVVERT, "FEC_IVV", {nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS}, 0, 0, MENUALIGN_LEFT,
MENUACTION_MOUSESTEER, "FET_MST", {nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS}, 0, 0, MENUALIGN_LEFT,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, 0}, 320, 260, MENUALIGN_CENTER,
},
// MENUPAGE_PAUSE_MENU = 32
{ "FET_PAU", MENUPAGE_DISABLED, nil, nil,
MENUACTION_RESUME, "FEP_RES", {nil, SAVESLOT_NONE, 0}, 320, 120, MENUALIGN_CENTER,
MENUACTION_CHANGEMENU, "FEH_SGA", {nil, SAVESLOT_NONE, MENUPAGE_NEW_GAME}, 0, 0, MENUALIGN_CENTER,
MENUACTION_CHANGEMENU, "FEH_MAP", {nil, SAVESLOT_NONE, MENUPAGE_MAP}, 0, 0, MENUALIGN_CENTER,
MENUACTION_CHANGEMENU, "FEP_STA", {nil, SAVESLOT_NONE, MENUPAGE_STATS}, 0, 0, MENUALIGN_CENTER,
MENUACTION_CHANGEMENU, "FEH_BRI", {nil, SAVESLOT_NONE, MENUPAGE_BRIEFS}, 0, 0, MENUALIGN_CENTER,
MENUACTION_CHANGEMENU, "FET_OPT", {nil, SAVESLOT_NONE, MENUPAGE_OPTIONS}, 0, 0, MENUALIGN_CENTER,
MENUACTION_CHANGEMENU, "FEP_QUI", {nil, SAVESLOT_NONE, MENUPAGE_EXIT}, 0, 0, MENUALIGN_CENTER,
},
// MENUPAGE_NONE = 33
{ "", 0, nil, nil, },
#ifdef LEGACY_MENU_OPTIONS
// MENUPAGE_CONTROLLER_SETTINGS = 4
{ "FET_CON", MENUPAGE_OPTIONS, nil, nil,
MENUACTION_CTRLCONFIG, "FEC_CCF", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS}, 0, 0, 0,
MENUACTION_CTRLVIBRATION, "FEC_VIB", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS}, 0, 0, 0,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, 0,
},
// MENUPAGE_DEBUG_MENU = 18
{ "FED_DBG", MENUPAGE_NONE, nil, nil,
MENUACTION_RELOADIDE, "FED_RID", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, 0,
MENUACTION_SETDBGFLAG, "FED_DFL", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, 0,
MENUACTION_SWITCHBIGWHITEDEBUGLIGHT, "FED_DLS", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, 0,
MENUACTION_COLLISIONPOLYS, "FED_SCP", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, 0,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, 0,
},
// MENUPAGE_CONTROLLER_PC_OLD1 = 36
{ "FET_CTL", MENUPAGE_CONTROLLER_PC, nil, nil,
MENUACTION_GETKEY, "FEC_PLB", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1}, 0, 0, 0,
MENUACTION_GETKEY, "FEC_CWL", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1}, 0, 0, 0,
MENUACTION_GETKEY, "FEC_CWR", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1}, 0, 0, 0,
MENUACTION_GETKEY, "FEC_LKT", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1}, 0, 0, 0,
MENUACTION_GETKEY, "FEC_PJP", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1}, 0, 0, 0,
MENUACTION_GETKEY, "FEC_PSP", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1}, 0, 0, 0,
MENUACTION_GETKEY, "FEC_TLF", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1}, 0, 0, 0,
MENUACTION_GETKEY, "FEC_TRG", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1}, 0, 0, 0,
MENUACTION_GETKEY, "FEC_CCM", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1}, 0, 0, 0,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, 0,
},
// MENUPAGE_CONTROLLER_PC_OLD2 = 37
{ "FET_CTL", MENUPAGE_CONTROLLER_PC, nil, nil,
},
// MENUPAGE_CONTROLLER_PC_OLD3 = 38
{ "FET_CTL", MENUPAGE_CONTROLLER_PC, nil, nil,
MENUACTION_GETKEY, "FEC_LUP", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD3}, 0, 0, 0,
MENUACTION_GETKEY, "FEC_LDN", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD3}, 0, 0, 0,
MENUACTION_GETKEY, "FEC_SMS", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD3}, 0, 0, 0,
MENUACTION_SHOWHEADBOB, "FEC_GSL", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD3}, 0, 0, 0,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, 0,
},
// MENUPAGE_CONTROLLER_PC_OLD4 = 39
{ "FET_CTL", MENUPAGE_CONTROLLER_PC, nil, nil,
},
// MENUPAGE_CONTROLLER_DEBUG = 40
{ "FEC_DBG", MENUPAGE_CONTROLLER_PC, nil, nil,
MENUACTION_GETKEY, "FEC_TGD", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_DEBUG}, 0, 0, 0,
MENUACTION_GETKEY, "FEC_TDO", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_DEBUG}, 0, 0, 0,
MENUACTION_GETKEY, "FEC_TSS", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_DEBUG}, 0, 0, 0,
MENUACTION_GETKEY, "FEC_SMS", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_DEBUG}, 0, 0, 0,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, 0,
},
#endif
#ifdef GRAPHICS_MENU_OPTIONS
// MENUPAGE_GRAPHICS_SETTINGS
{ "FET_GRA", MENUPAGE_OPTIONS, new CCustomScreenLayout({40, 78, 25, true, true}), GraphicsGoBack,
MENUACTION_SCREENRES, "FED_RES", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS }, 0, 0, MENUALIGN_LEFT,
MENUACTION_WIDESCREEN, "FED_WIS", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS }, 0, 0, MENUALIGN_LEFT,
VIDEOMODE_SELECTOR
#ifdef LEGACY_MENU_OPTIONS
MENUACTION_FRAMESYNC, "FEM_VSC", {nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS}, 0, 0, MENUALIGN_LEFT,
#endif
MENUACTION_FRAMELIMIT, "FEM_FRM", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS }, 0, 0, MENUALIGN_LEFT,
MULTISAMPLING_SELECTOR
#ifdef EXTENDED_COLOURFILTER
POSTFX_SELECTORS
#elif defined LEGACY_MENU_OPTIONS
MENUACTION_TRAILS, "FED_TRA", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS }, 0, 0, MENUALIGN_LEFT,
#endif
PIPELINES_SELECTOR
ISLAND_LOADING_SELECTOR
DUALPASS_SELECTOR
MENUACTION_CFO_DYNAMIC, "FET_DEF", { new CCFODynamic(nil, nil, nil, RestoreDefGraphics) }, 320, 0, MENUALIGN_CENTER,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 320, 0, MENUALIGN_CENTER,
},
#endif
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
// MENUPAGE_DETECT_JOYSTICK
{ "FEC_JOD", MENUPAGE_CONTROLLER_PC, nil, nil,
MENUACTION_LABEL, "FEC_JPR", { nil, SAVESLOT_NONE, MENUPAGE_NONE }, 0, 0, 0,
MENUACTION_CFO_DYNAMIC, "FEC_JDE", { new CCFODynamic(nil, nil, DetectJoystickDraw, nil) }, 40, 200, MENUALIGN_LEFT,
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 320, 225, MENUALIGN_CENTER,
},
#endif
// MENUPAGE_OUTRO = 34
{ "", 0, nil, nil, },
};
#endif
#endif

View file

@ -226,6 +226,7 @@ enum Config {
#define FIX_BUGS // fixes bugs that we've came across during reversing, TODO: use this more #define FIX_BUGS // fixes bugs that we've came across during reversing, TODO: use this more
//#define MORE_LANGUAGES // Add more translations to the game //#define MORE_LANGUAGES // Add more translations to the game
#define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible #define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible
#define LOAD_INI_SETTINGS // as the name suggests. fundamental for CUSTOM_FRONTEND_OPTIONS
#define FIX_HIGH_FPS_BUGS_ON_FRONTEND #define FIX_HIGH_FPS_BUGS_ON_FRONTEND
// Just debug menu entries // Just debug menu entries
@ -242,16 +243,13 @@ enum Config {
#define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number #define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number
#define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time #define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time
#define DISABLE_VSYNC_ON_TEXTURE_CONVERSION // make texture conversion work faster by disabling vsync #define DISABLE_VSYNC_ON_TEXTURE_CONVERSION // make texture conversion work faster by disabling vsync
//#define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU
//#define USE_TEXTURE_POOL //#define USE_TEXTURE_POOL
//#define CUTSCENE_BORDERS_SWITCH
#ifdef LIBRW #ifdef LIBRW
//#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur) //#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur)
//#define EXTENDED_PIPELINES // custom render pipelines (includes Neo) //#define EXTENDED_PIPELINES // custom render pipelines (includes Neo)
//#define SCREEN_DROPLETS // neo water droplets //#define SCREEN_DROPLETS // neo water droplets
//#define NEW_RENDERER // leeds-like world rendering, needs librw //#define NEW_RENDERER // leeds-like world rendering, needs librw
#endif #endif
//#define MULTISAMPLING // adds MSAA option TODO
#ifndef EXTENDED_COLOURFILTER #ifndef EXTENDED_COLOURFILTER
#undef SCREEN_DROPLETS // we need the front- (or back-)buffer for this effect #undef SCREEN_DROPLETS // we need the front- (or back-)buffer for this effect
@ -260,11 +258,6 @@ enum Config {
#undef SCREEN_DROPLETS // we need neo.txd #undef SCREEN_DROPLETS // we need neo.txd
#endif #endif
#ifdef LIBRW
// these are not supported with librw yet
# undef MULTISAMPLING
#endif
// Water & Particle // Water & Particle
#define PC_PARTICLE #define PC_PARTICLE
//#define PS2_ALTERNATIVE_CARSPLASH // unused on PS2 //#define PS2_ALTERNATIVE_CARSPLASH // unused on PS2
@ -279,7 +272,7 @@ enum Config {
#define XINPUT #define XINPUT
#endif #endif
#if !defined(_WIN32) && !defined(__SWITCH__) #if !defined(_WIN32) && !defined(__SWITCH__)
#define DONT_TRUST_RECOGNIZED_JOYSTICKS // Then we'll only rely on GLFW gamepad DB, and expect user to enter Controller->Detect joysticks if his joystick isn't on that list. //#define DONT_TRUST_RECOGNIZED_JOYSTICKS // Then we'll only rely on GLFW gamepad DB, and expect user to enter Controller->Detect joysticks if his joystick isn't on that list.
#endif #endif
#define DETECT_PAD_INPUT_SWITCH // Adds automatic switch of pad related stuff between controller and kb/m #define DETECT_PAD_INPUT_SWITCH // Adds automatic switch of pad related stuff between controller and kb/m
#define KANGAROO_CHEAT #define KANGAROO_CHEAT
@ -300,11 +293,19 @@ enum Config {
# define MAP_ENHANCEMENTS // Adding waypoint and better mouse support # define MAP_ENHANCEMENTS // Adding waypoint and better mouse support
# define TRIANGLE_BACK_BUTTON # define TRIANGLE_BACK_BUTTON
//# define CIRCLE_BACK_BUTTON //# define CIRCLE_BACK_BUTTON
//#define CUSTOM_FRONTEND_OPTIONS #define LEGACY_MENU_OPTIONS // i.e. frame sync(vsync)
# define GRAPHICS_MENU_OPTIONS
#define LEGACY_MENU_OPTIONS
#define MUCH_SHORTER_OUTRO_SCREEN #define MUCH_SHORTER_OUTRO_SCREEN
// #define XBOX_MESSAGE_SCREEN // Blue background, no "saved successfully press OK" screen etc. // #define XBOX_MESSAGE_SCREEN // Blue background, no "saved successfully press OK" screen etc.
# define CUSTOM_FRONTEND_OPTIONS
# ifdef CUSTOM_FRONTEND_OPTIONS
# define GRAPHICS_MENU_OPTIONS // otherwise Display settings will be scrollable
//# define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU
# define CUTSCENE_BORDERS_SWITCH
//# define MULTISAMPLING // adds MSAA option
# define INVERT_LOOK_FOR_PAD // enable the hidden option
# endif
#endif
// Script // Script
#define USE_DEBUG_SCRIPT_LOADER // Loads main.scm by default. Hold R for main_freeroam.scm and D for main_d.scm #define USE_DEBUG_SCRIPT_LOADER // Loads main.scm by default. Hold R for main_freeroam.scm and D for main_d.scm
@ -316,6 +317,7 @@ enum Config {
#if (defined SUPPORT_XBOX_SCRIPT && defined SUPPORT_MOBILE_SCRIPT) #if (defined SUPPORT_XBOX_SCRIPT && defined SUPPORT_MOBILE_SCRIPT)
static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually exclusive"); static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually exclusive");
#endif #endif
#ifdef PC_MENU
//#define MISSION_REPLAY // mobile feature //#define MISSION_REPLAY // mobile feature
#endif #endif
//#define SIMPLIER_MISSIONS // apply simplifications from mobile //#define SIMPLIER_MISSIONS // apply simplifications from mobile
@ -340,8 +342,6 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually
// Peds // Peds
#define PED_SKIN // support for skinned geometry on peds #define PED_SKIN // support for skinned geometry on peds
#define ANIMATE_PED_COL_MODEL
#define VC_PED_PORTS // various ports from VC's CPed, mostly subtle
#define CANCELLABLE_CAR_ENTER #define CANCELLABLE_CAR_ENTER
// Camera // Camera
@ -353,10 +353,14 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually
//#define PS2_AUDIO // changes audio paths for cutscenes and radio to PS2 paths, needs vbdec to support VB with MSS //#define PS2_AUDIO // changes audio paths for cutscenes and radio to PS2 paths, needs vbdec to support VB with MSS
#ifdef LIBRW
// these are not supported with librw yet
# undef MULTISAMPLING
#endif
//#define SQUEEZE_PERFORMANCE //#define SQUEEZE_PERFORMANCE
#ifdef SQUEEZE_PERFORMANCE #ifdef SQUEEZE_PERFORMANCE
#undef PS2_ALPHA_TEST #undef PS2_ALPHA_TEST
#undef NO_ISLAND_LOADING #undef NO_ISLAND_LOADING
#define PC_PARTICLE #define PC_PARTICLE
#define VC_PED_PORTS // To not process collisions always. But should be tested if that's really beneficial
#endif #endif

View file

@ -70,6 +70,7 @@
#include "Ropes.h" #include "Ropes.h"
#include "postfx.h" #include "postfx.h"
#include "custompipes.h" #include "custompipes.h"
#include "frontendoption.h"
#include "screendroplets.h" #include "screendroplets.h"
GlobalScene Scene; GlobalScene Scene;
@ -400,6 +401,13 @@ Initialise3D(void *param)
DebugMenuInit(); DebugMenuInit();
DebugMenuPopulate(); DebugMenuPopulate();
#endif // !DEBUGMENU #endif // !DEBUGMENU
#ifdef CUSTOM_FRONTEND_OPTIONS
// Apparently this func. can be run multiple times at the start.
if (numCustomFrontendOptions == 0 && numCustomFrontendScreens == 0) {
// needs stored language and TheText to be loaded, and last TheText reload is at the start of here
CustomFrontendOptionsPopulate();
}
#endif
bool ret = CGame::InitialiseRenderWare(); bool ret = CGame::InitialiseRenderWare();
#ifdef EXTENDED_PIPELINES #ifdef EXTENDED_PIPELINES
CustomPipes::CustomPipeInit(); // need Scene.world for this CustomPipes::CustomPipeInit(); // need Scene.world for this

View file

@ -39,6 +39,11 @@ void ResetLoadingScreenBar(void);
void TheModelViewer(void); void TheModelViewer(void);
#endif #endif
#ifdef LOAD_INI_SETTINGS
void LoadINISettings();
void SaveINISettings();
#endif
#ifdef NEW_RENDERER #ifdef NEW_RENDERER
extern bool gbNewRenderer; extern bool gbNewRenderer;
bool FredIsInFirstPersonCam(void); bool FredIsInFirstPersonCam(void);

View file

@ -13,13 +13,10 @@
#include "Vehicle.h" #include "Vehicle.h"
#include "ModelIndices.h" #include "ModelIndices.h"
#include "Streaming.h" #include "Streaming.h"
#include "PathFind.h"
#include "Boat.h" #include "Boat.h"
#include "Heli.h" #include "Heli.h"
#include "Automobile.h" #include "Automobile.h"
#include "Bike.h" #include "Bike.h"
#include "Ped.h"
#include "Particle.h"
#include "Console.h" #include "Console.h"
#include "Debug.h" #include "Debug.h"
#include "Hud.h" #include "Hud.h"
@ -29,7 +26,6 @@
#include "Radar.h" #include "Radar.h"
#include "debugmenu.h" #include "debugmenu.h"
#include "Frontend.h" #include "Frontend.h"
#include "Text.h"
#include "WaterLevel.h" #include "WaterLevel.h"
#include "main.h" #include "main.h"
#include "Script.h" #include "Script.h"
@ -37,6 +33,11 @@
#include "postfx.h" #include "postfx.h"
#include "custompipes.h" #include "custompipes.h"
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
#include "FileMgr.h"
#include "ControllerConfig.h"
#endif
#ifndef _WIN32 #ifndef _WIN32
#include "assert.h" #include "assert.h"
#include <stdarg.h> #include <stdarg.h>
@ -75,6 +76,169 @@ mysrand(unsigned int seed)
myrand_seed = seed; myrand_seed = seed;
} }
#ifdef CUSTOM_FRONTEND_OPTIONS
#include "frontendoption.h"
void
CustomFrontendOptionsPopulate(void)
{
// Moved to an array in MenuScreensCustom.cpp, but APIs are still available. see frontendoption.h
}
#endif
#ifdef LOAD_INI_SETTINGS
#include "ini_parser.hpp"
linb::ini cfg;
int CheckAndReadIniInt(const char *cat, const char *key, int original)
{
std::string strval = cfg.get(cat, key, "");
const char *value = strval.c_str();
if (value && value[0] != '\0')
return atoi(value);
return original;
}
float CheckAndReadIniFloat(const char *cat, const char *key, float original)
{
std::string strval = cfg.get(cat, key, "");
const char *value = strval.c_str();
if (value && value[0] != '\0')
return atof(value);
return original;
}
void CheckAndSaveIniInt(const char *cat, const char *key, int val, bool &changed)
{
char temp[10];
if (atoi(cfg.get(cat, key, "xxx").c_str()) != val) { // if .ini doesn't have our key, compare with xxx and forcefully add it
changed = true;
sprintf(temp, "%u", val);
cfg.set(cat, key, temp);
}
}
void CheckAndSaveIniFloat(const char *cat, const char *key, float val, bool &changed)
{
char temp[10];
if (atof(cfg.get(cat, key, "xxx").c_str()) != val) { // if .ini doesn't have our key, compare with xxx and forcefully add it
changed = true;
sprintf(temp, "%f", val);
cfg.set(cat, key, temp);
}
}
void LoadINISettings()
{
cfg.load_file("reVC.ini");
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
// Written by assuming the codes below will run after _InputInitialiseJoys().
strcpy(gSelectedJoystickName, cfg.get("DetectJoystick", "JoystickName", "").c_str());
if(gSelectedJoystickName[0] != '\0') {
for (int i = 0; i <= GLFW_JOYSTICK_LAST; i++) {
if (glfwJoystickPresent(i) && strncmp(gSelectedJoystickName, glfwGetJoystickName(i), strlen(gSelectedJoystickName)) == 0) {
if (PSGLOBAL(joy1id) != -1) {
PSGLOBAL(joy2id) = PSGLOBAL(joy1id);
}
PSGLOBAL(joy1id) = i;
int count;
glfwGetJoystickButtons(PSGLOBAL(joy1id), &count);
// We need to init and reload bindings, because;
// 1-joypad button number may differ with saved/prvly connected one
// 2-bindings are not init'ed if there is no joypad at the start
ControlsManager.InitDefaultControlConfigJoyPad(count);
CFileMgr::SetDirMyDocuments();
int32 gta3set = CFileMgr::OpenFile("gta3.set", "r");
if (gta3set) {
ControlsManager.LoadSettings(gta3set);
CFileMgr::CloseFile(gta3set);
}
CFileMgr::SetDir("");
break;
}
}
}
#endif
#ifdef CUSTOM_FRONTEND_OPTIONS
for (int i = 0; i < MENUPAGES; i++) {
for (int j = 0; j < NUM_MENUROWS; j++) {
CMenuScreenCustom::CMenuEntry &option = aScreens[i].m_aEntries[j];
if (option.m_Action == MENUACTION_NOTHING)
break;
// CFO check
if (option.m_Action < MENUACTION_NOTHING && option.m_CFO->save) {
// CFO only supports saving uint8 right now
*option.m_CFO->value = CheckAndReadIniInt("FrontendOptions", option.m_CFO->save, *option.m_CFO->value);
if (option.m_Action == MENUACTION_CFO_SELECT) {
option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue = *option.m_CFO->value;
}
}
}
}
#endif
#ifdef EXTENDED_COLOURFILTER
CPostFX::Intensity = CheckAndReadIniFloat("CustomPipesValues", "PostFXIntensity", CPostFX::Intensity);
#endif
#ifdef EXTENDED_PIPELINES
CustomPipes::VehicleShininess = CheckAndReadIniFloat("CustomPipesValues", "NeoVehicleShininess", CustomPipes::VehicleShininess);
CustomPipes::VehicleSpecularity = CheckAndReadIniFloat("CustomPipesValues", "NeoVehicleSpecularity", CustomPipes::VehicleSpecularity);
CustomPipes::RimlightMult = CheckAndReadIniFloat("CustomPipesValues", "RimlightMult", CustomPipes::RimlightMult);
CustomPipes::LightmapMult = CheckAndReadIniFloat("CustomPipesValues", "LightmapMult", CustomPipes::LightmapMult);
CustomPipes::GlossMult = CheckAndReadIniFloat("CustomPipesValues", "GlossMult", CustomPipes::GlossMult);
#endif
}
void SaveINISettings()
{
bool changed = false;
char temp[4];
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
if (strncmp(cfg.get("DetectJoystick", "JoystickName", "").c_str(), gSelectedJoystickName, strlen(gSelectedJoystickName)) != 0) {
changed = true;
cfg.set("DetectJoystick", "JoystickName", gSelectedJoystickName);
}
#endif
#ifdef CUSTOM_FRONTEND_OPTIONS
for (int i = 0; i < MENUPAGES; i++) {
for (int j = 0; j < NUM_MENUROWS; j++) {
CMenuScreenCustom::CMenuEntry &option = aScreens[i].m_aEntries[j];
if (option.m_Action == MENUACTION_NOTHING)
break;
if (option.m_Action < MENUACTION_NOTHING && option.m_CFO->save) {
// Beware: CFO only supports saving uint8 right now
CheckAndSaveIniInt("FrontendOptions", option.m_CFO->save, *option.m_CFO->value, changed);
}
}
}
#endif
#ifdef EXTENDED_COLOURFILTER
CheckAndSaveIniFloat("CustomPipesValues", "PostFXIntensity", CPostFX::Intensity, changed);
#endif
#ifdef EXTENDED_PIPELINES
CheckAndSaveIniFloat("CustomPipesValues", "NeoVehicleShininess", CustomPipes::VehicleShininess, changed);
CheckAndSaveIniFloat("CustomPipesValues", "NeoVehicleSpecularity", CustomPipes::VehicleSpecularity, changed);
CheckAndSaveIniFloat("CustomPipesValues", "RimlightMult", CustomPipes::RimlightMult, changed);
CheckAndSaveIniFloat("CustomPipesValues", "LightmapMult", CustomPipes::LightmapMult, changed);
CheckAndSaveIniFloat("CustomPipesValues", "GlossMult", CustomPipes::GlossMult, changed);
#endif
if (changed)
cfg.write_file("reVC.ini");
}
#endif
#ifdef DEBUGMENU #ifdef DEBUGMENU
void WeaponCheat1(); void WeaponCheat1();
void WeaponCheat2(); void WeaponCheat2();

View file

@ -0,0 +1,167 @@
#include "common.h"
#ifdef CUSTOM_FRONTEND_OPTIONS
#include "Frontend.h"
#include "Text.h"
int lastOgScreen = MENUPAGES; // means no new pages
int numCustomFrontendOptions = 0;
int numCustomFrontendScreens = 0;
int optionCursor = -2;
int currentMenu;
bool optionOverwrite = false;
void GoBack()
{
FrontEndMenuManager.SwitchToNewScreen(-1);
}
uint8
GetNumberOfMenuOptions(int screen)
{
uint8 Rows = 0;
for (int i = 0; i < NUM_MENUROWS; i++) {
if (aScreens[screen].m_aEntries[i].m_Action == MENUACTION_NOTHING)
break;
++Rows;
}
return Rows;
}
uint8
GetLastMenuScreen()
{
int8 page = -1;
for (int i = 0; i < MENUPAGES; i++) {
if (strcmp(aScreens[i].m_ScreenName, "") == 0 && aScreens[i].m_PreviousPage == MENUPAGE_NONE)
break;
++page;
}
return page;
}
int8 RegisterNewScreen(const char *name, int prevPage, ReturnPrevPageFunc returnPrevPageFunc)
{
if (lastOgScreen == MENUPAGES)
lastOgScreen = GetLastMenuScreen();
numCustomFrontendScreens++;
int id = lastOgScreen + numCustomFrontendScreens;
assert(id < MENUPAGES && "No room for new custom frontend screens! Increase MENUPAGES");
strncpy(aScreens[id].m_ScreenName, name, 8);
aScreens[id].m_PreviousPage = prevPage;
aScreens[id].returnPrevPageFunc = returnPrevPageFunc;
return id;
}
int8 RegisterNewOption()
{
numCustomFrontendOptions++;
uint8 numOptions = GetNumberOfMenuOptions(currentMenu);
uint8 curIdx;
if (optionCursor < 0) {
optionCursor = curIdx = numOptions + optionCursor + 1;
} else
curIdx = optionCursor;
if (!optionOverwrite) {
if (aScreens[currentMenu].m_aEntries[curIdx].m_Action != MENUACTION_NOTHING) {
for (int i = numOptions - 1; i >= curIdx; i--) {
memcpy(&aScreens[currentMenu].m_aEntries[i + 1], &aScreens[currentMenu].m_aEntries[i], sizeof(CMenuScreenCustom::CMenuEntry));
}
}
}
optionCursor++;
return curIdx;
}
void FrontendOptionSetCursor(int screen, int8 option, bool overwrite)
{
currentMenu = screen;
optionCursor = option;
optionOverwrite = overwrite;
}
void FrontendOptionAddBuiltinAction(const char* gxtKey, uint16 x, uint16 y, uint8 align, int action, int targetMenu, int saveSlot) {
int8 screenOptionOrder = RegisterNewOption();
CMenuScreenCustom::CMenuEntry &option = aScreens[currentMenu].m_aEntries[screenOptionOrder];
// We can't use custom text on those :shrug:
switch (action) {
case MENUACTION_SCREENRES:
strcpy(option.m_EntryName, "FED_RES");
break;
case MENUACTION_AUDIOHW:
strcpy(option.m_EntryName, "FEA_3DH");
break;
default:
strncpy(option.m_EntryName, gxtKey, 8);
break;
}
option.m_X = x;
option.m_Y = y;
option.m_Align = align;
option.m_Action = action;
option.m_SaveSlot = saveSlot;
option.m_TargetMenu = targetMenu;
}
void FrontendOptionAddSelect(const char* gxtKey, uint16 x, uint16 y, uint8 align, const char** rightTexts, int8 numRightTexts, int8 *var, bool onlyApplyOnEnter, ChangeFunc changeFunc, const char* saveName)
{
int8 screenOptionOrder = RegisterNewOption();
CMenuScreenCustom::CMenuEntry &option = aScreens[currentMenu].m_aEntries[screenOptionOrder];
option.m_Action = MENUACTION_CFO_SELECT;
option.m_X = x;
option.m_Y = y;
option.m_Align = align;
strncpy(option.m_EntryName, gxtKey, 8);
option.m_CFOSelect = new CCFOSelect();
option.m_CFOSelect->rightTexts = (char**)malloc(numRightTexts * sizeof(char*));
memcpy(option.m_CFOSelect->rightTexts, rightTexts, numRightTexts * sizeof(char*));
option.m_CFOSelect->numRightTexts = numRightTexts;
option.m_CFOSelect->value = var;
if (var) {
option.m_CFOSelect->displayedValue = *var;
option.m_CFOSelect->lastSavedValue = *var;
}
option.m_CFOSelect->save = saveName;
option.m_CFOSelect->onlyApplyOnEnter = onlyApplyOnEnter;
option.m_CFOSelect->changeFunc = changeFunc;
}
void FrontendOptionAddDynamic(const char* gxtKey, uint16 x, uint16 y, uint8 align, DrawFunc drawFunc, int8 *var, ButtonPressFunc buttonPressFunc, const char* saveName)
{
int8 screenOptionOrder = RegisterNewOption();
CMenuScreenCustom::CMenuEntry &option = aScreens[currentMenu].m_aEntries[screenOptionOrder];
option.m_Action = MENUACTION_CFO_DYNAMIC;
option.m_X = x;
option.m_Y = y;
option.m_Align = align;
strncpy(option.m_EntryName, gxtKey, 8);
option.m_CFODynamic = new CCFODynamic();
option.m_CFODynamic->drawFunc = drawFunc;
option.m_CFODynamic->buttonPressFunc = buttonPressFunc;
option.m_CFODynamic->value = var;
option.m_CFODynamic->save = saveName;
}
// lineHeight = 0 means game will use MENU_DEFAULT_LINE_HEIGHT
uint8 FrontendScreenAdd(const char* gxtKey, int prevPage, int lineHeight, bool showLeftRightHelper, ReturnPrevPageFunc returnPrevPageFunc) {
uint8 screenOrder = RegisterNewScreen(gxtKey, prevPage, returnPrevPageFunc);
CCustomScreenLayout *screen = new CCustomScreenLayout();
aScreens[screenOrder].layout = screen;
screen->lineHeight = lineHeight;
screen->showLeftRightHelper = showLeftRightHelper;
return screenOrder;
}
#endif

View file

@ -0,0 +1,86 @@
#pragma once
#include "common.h"
#ifdef CUSTOM_FRONTEND_OPTIONS
// ! There are 2 ways to use CFO,
// 1st; by adding a new option to the array in MenuScreensCustom.cpp and passing attributes/CBs to it
// 2nd; by calling the functions listed at the bottom of this file.
// -- Option types
//
// Static/select: You allocate the variable, pass it to function and game sets it from user input among the strings given to function,
// optionally you can add post-change event via ChangeFunc(only called on enter if onlyApplyOnEnter set, or set immediately)
// You can store the option in an INI file if you pass the key(as a char array) to corresponding parameter.
//
// Dynamic: Passing variable to function is only needed if you want to store it, otherwise you should do
// all the operations with ButtonPressFunc, this includes allocating the variable.
// Left-side text is passed while creating and static, but ofc right-side text is dynamic -
// you should return it in DrawFunc, which is called on every draw.
//
// Built-in action: As the name suggests, any action that game has built-in. But as an extra you can set the option text,
// -- Returned via ButtonPressFunc() action param.
#define FEOPTION_ACTION_LEFT 0
#define FEOPTION_ACTION_RIGHT 1
#define FEOPTION_ACTION_SELECT 2
#define FEOPTION_ACTION_FOCUSLOSS 3
// -- Callbacks
// pretty much in everything I guess, and optional in all of them
typedef void (*ReturnPrevPageFunc)();
// for static options
typedef void (*ChangeFunc)(int8 before, int8 after); // called after updating the value.
// only called on enter if onlyApplyOnEnter set, otherwise called on every value change
// for dynamic options
typedef wchar* (*DrawFunc)(bool* disabled, bool userHovering); // you must return a pointer for right text.
// you can also set *disabled if you want to gray it out.
typedef void (*ButtonPressFunc)(int8 action); // see FEOPTION_ACTIONs above
// -- Internal things
void CustomFrontendOptionsPopulate();
extern int lastOgScreen; // for reloading
extern int numCustomFrontendOptions;
extern int numCustomFrontendScreens;
// -- To be used in ButtonPressFunc / ChangeFunc(this one would be weird):
void GoBack(void);
uint8 GetNumberOfMenuOptions(int screen);
// !!! We're now moved to MenuScreensCustom.cpp, which houses an array that keeps all original+custom options.
// But you can still use the APIs below, and manipulate aScreens while in game.
// Limits:
// The code relies on that you won't use more then NUM_MENUROWS(18) options on one page, and won't exceed the MENUPAGES of pages.
// Also congrats if you can make 18 options visible at once.
// Texts:
// All text parameters accept char[8] GXT key.
// Execute direction:
// All of the calls below eventually manipulate the aScreens array, so keep in mind to add/replace options in order,
// i.e. don't set cursor to 8 first and then 3.
// -- Placing the cursor to append/overwrite option
//
// Done via FrontendOptionSetCursor(screen, position, overwrite = false), parameters explained below:
// Screen: as the name suggests. Also accepts the screen IDs returned from FrontendScreenAdd.
// Option: if positive, next AddOption call will put the option to there and progress the cursor.
// if negative, cursor will be placed on bottom-(pos+1), so -1 means the very bottom, -2 means before the back button etc.
// Overwrite: Use to overwrite the options, not appending a new one. AddOption calls will still progress the cursor.
void FrontendOptionSetCursor(int screen, int8 option, bool overwrite = false);
// var is optional in AddDynamic, enables you to save them in an INI file(also needs passing char array to saveName param. obv), otherwise pass nil/0
void FrontendOptionAddBuiltinAction(const char* gxtKey, uint16 x, uint16 y, uint8 align, int action, int targetMenu = MENUPAGE_NONE, int saveSlot = SAVESLOT_NONE);
void FrontendOptionAddSelect(const char* gxtKey, uint16 x, uint16 y, uint8 align, const char** rightTexts, int8 numRightTexts, int8 *var, bool onlyApplyOnEnter, ChangeFunc changeFunc, const char* saveName = nil);
void FrontendOptionAddDynamic(const char* gxtKey, uint16 x, uint16 y, uint8 align, DrawFunc rightTextDrawFunc, int8 *var, ButtonPressFunc buttonPressFunc, const char* saveName = nil);
// lineHeight = 0 means game will use MENU_DEFAULT_LINE_HEIGHT
uint8 FrontendScreenAdd(const char* gxtKey, int prevPage, int lineHeight, bool showLeftRightHelper, ReturnPrevPageFunc returnPrevPageFunc = nil);
#endif

View file

@ -1771,11 +1771,7 @@ CPed::ProcessControl(void)
if (m_nPedState != PED_ARRESTED) { if (m_nPedState != PED_ARRESTED) {
if (m_nPedState == PED_DEAD) { if (m_nPedState == PED_DEAD) {
DeadPedMakesTyresBloody(); DeadPedMakesTyresBloody();
#ifndef VC_PED_PORTS
if (CGame::nastyGame) {
#else
if (CGame::nastyGame && !bIsInWater) { if (CGame::nastyGame && !bIsInWater) {
#endif
uint32 remainingBloodyFpTime = CTimer::GetTimeInMilliseconds() - m_bloodyFootprintCountOrDeathTime; uint32 remainingBloodyFpTime = CTimer::GetTimeInMilliseconds() - m_bloodyFootprintCountOrDeathTime;
float timeDependentDist; float timeDependentDist;
if (remainingBloodyFpTime >= 2000) { if (remainingBloodyFpTime >= 2000) {
@ -2332,11 +2328,7 @@ CPed::ProcessControl(void)
ApplyMoveForce(forceDir); ApplyMoveForce(forceDir);
} }
if ((bIsInTheAir && !DyingOrDead()) if ((bIsInTheAir && !DyingOrDead()) || (!bIsStanding && !bWasStanding && m_nPedState == PED_FALL)) {
#ifdef VC_PED_PORTS
|| (!bIsStanding && !bWasStanding && m_nPedState == PED_FALL)
#endif
) {
if (m_nPedStateTimer > 0 && m_nPedStateTimer <= 1000) { if (m_nPedStateTimer > 0 && m_nPedStateTimer <= 1000) {
forceDir = GetPosition() - m_vecHitLastPos; forceDir = GetPosition() - m_vecHitLastPos;
} else { } else {
@ -2357,11 +2349,7 @@ CPed::ProcessControl(void)
if (m_nCollisionRecords == 1 && m_aCollisionRecords[0] != nil && m_aCollisionRecords[0]->IsBuilding() if (m_nCollisionRecords == 1 && m_aCollisionRecords[0] != nil && m_aCollisionRecords[0]->IsBuilding()
&& m_nPedStateTimer > 50.0f / (2.0f * adjustedTs) && m_nPedStateTimer * 1.0f / 250.0f > Abs(forceDir.z)) { && m_nPedStateTimer > 50.0f / (2.0f * adjustedTs) && m_nPedStateTimer * 1.0f / 250.0f > Abs(forceDir.z)) {
offsetToCheck.x = -forceDir.y; offsetToCheck.x = -forceDir.y;
#ifdef VC_PED_PORTS
offsetToCheck.z = 1.0f; offsetToCheck.z = 1.0f;
#else
offsetToCheck.z = 0.0f;
#endif
offsetToCheck.y = forceDir.x; offsetToCheck.y = forceDir.x;
offsetToCheck.Normalise(); offsetToCheck.Normalise();
@ -2386,7 +2374,6 @@ CPed::ProcessControl(void)
} else { } else {
obstacleForFlyingOtherDirZ = 501.0f; obstacleForFlyingOtherDirZ = 501.0f;
} }
#ifdef VC_PED_PORTS
uint8 flyDir = 0; uint8 flyDir = 0;
float feetZ = GetPosition().z - FEET_OFFSET; float feetZ = GetPosition().z - FEET_OFFSET;
if ((obstacleForFlyingZ <= feetZ || obstacleForFlyingOtherDirZ >= 500.0f) && (obstacleForFlyingZ <= feetZ || obstacleForFlyingOtherDirZ <= feetZ)) { if ((obstacleForFlyingZ <= feetZ || obstacleForFlyingOtherDirZ >= 500.0f) && (obstacleForFlyingZ <= feetZ || obstacleForFlyingOtherDirZ <= feetZ)) {
@ -2403,7 +2390,6 @@ CPed::ProcessControl(void)
SetLanding(); SetLanding();
bIsStanding = true; bIsStanding = true;
} }
#endif
if (obstacleForFlyingZ < obstacleForFlyingOtherDirZ) { if (obstacleForFlyingZ < obstacleForFlyingOtherDirZ) {
offsetToCheck *= -1.0f; offsetToCheck *= -1.0f;
} }
@ -2424,12 +2410,6 @@ CPed::ProcessControl(void)
} }
bIsInTheAir = false; bIsInTheAir = false;
} else if (m_vecDamageNormal.z > 0.4f) { } else if (m_vecDamageNormal.z > 0.4f) {
#ifndef VC_PED_PORTS
forceDir = m_vecDamageNormal;
forceDir.z = 0.0f;
forceDir.Normalise();
ApplyMoveForce(2.0f * forceDir);
#else
if (m_nPedState == PED_JUMP) { if (m_nPedState == PED_JUMP) {
if (m_nWaitTimer <= 2000) { if (m_nWaitTimer <= 2000) {
if (m_nWaitTimer < 1000) if (m_nWaitTimer < 1000)
@ -2446,7 +2426,6 @@ CPed::ProcessControl(void)
} else { } else {
ApplyMoveForce(-4.0f * forceDir); ApplyMoveForce(-4.0f * forceDir);
} }
#endif
} }
} else if ((CTimer::GetFrameCounter() + m_randomSeed % 256 + 3) & 7) { } else if ((CTimer::GetFrameCounter() + m_randomSeed % 256 + 3) & 7) {
if (IsPlayer() && m_nPedState != PED_JUMP && pad0->JumpJustDown()) { if (IsPlayer() && m_nPedState != PED_JUMP && pad0->JumpJustDown()) {
@ -2502,17 +2481,12 @@ CPed::ProcessControl(void)
offsetToCheck.z += 0.5f; offsetToCheck.z += 0.5f;
if (CWorld::ProcessVerticalLine(offsetToCheck, GetPosition().z - FEET_OFFSET, foundCol, foundEnt, true, true, false, true, false, false, nil)) { if (CWorld::ProcessVerticalLine(offsetToCheck, GetPosition().z - FEET_OFFSET, foundCol, foundEnt, true, true, false, true, false, false, nil)) {
#ifdef VC_PED_PORTS
if (!bHeadStuckInCollision || FEET_OFFSET + foundCol.point.z < GetPosition().z) { if (!bHeadStuckInCollision || FEET_OFFSET + foundCol.point.z < GetPosition().z) {
GetMatrix().GetPosition().z = FEET_OFFSET + foundCol.point.z; GetMatrix().GetPosition().z = FEET_OFFSET + foundCol.point.z;
GetMatrix().UpdateRW(); GetMatrix().UpdateRW();
if (bHeadStuckInCollision) if (bHeadStuckInCollision)
bHeadStuckInCollision = false; bHeadStuckInCollision = false;
} }
#else
GetMatrix().GetPosition().z = FEET_OFFSET + foundCol.point.z;
GetMatrix().UpdateRW();
#endif
SetLanding(); SetLanding();
bIsStanding = true; bIsStanding = true;
} }
@ -4131,12 +4105,9 @@ CPed::PedSetOutCarCB(CAnimBlendAssociation *animAssoc, void *arg)
} else if (ped->m_objective == OBJECTIVE_NONE && ped->CharCreatedBy != MISSION_CHAR && ped->m_nPedState == PED_IDLE && !ped->IsPlayer()) { } else if (ped->m_objective == OBJECTIVE_NONE && ped->CharCreatedBy != MISSION_CHAR && ped->m_nPedState == PED_IDLE && !ped->IsPlayer()) {
ped->SetWanderPath(CGeneral::GetRandomNumberInRange(0.0f, 8.0f)); ped->SetWanderPath(CGeneral::GetRandomNumberInRange(0.0f, 8.0f));
} }
} } else if (ped->m_nPedState == PED_DRIVING) {
#ifdef VC_PED_PORTS
else if (ped->m_nPedState == PED_DRIVING) {
ped->m_nPedState = PED_IDLE; ped->m_nPedState = PED_IDLE;
} }
#endif
if (animAssoc) if (animAssoc)
animAssoc->blendDelta = -1000.0f; animAssoc->blendDelta = -1000.0f;

View file

@ -1597,7 +1597,7 @@ CPed::ProcessObjective(void)
Say(SOUND_PED_MUGGING); Say(SOUND_PED_MUGGING);
bRichFromMugging = true; bRichFromMugging = true;
// VC FIX: ClearObjective() clears m_pedInObjective in VC (also same with VC_PED_PORTS), so get it before call // FIX: ClearObjective() clears m_pedInObjective, so get it before call
CPed *victim = m_pedInObjective; CPed *victim = m_pedInObjective;
ClearObjective(); ClearObjective();
if (victim->m_objective != OBJECTIVE_KILL_CHAR_ON_FOOT if (victim->m_objective != OBJECTIVE_KILL_CHAR_ON_FOOT