summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/CdStream.cpp9
-rw-r--r--src/core/CdStreamPosix.cpp2
-rw-r--r--src/core/ControllerConfig.cpp576
-rw-r--r--src/core/Frontend.cpp410
-rw-r--r--src/core/Frontend.h119
-rw-r--r--src/core/Frontend_PS2.cpp18
-rw-r--r--src/core/Frontend_PS2.h22
-rw-r--r--src/core/Game.cpp11
-rw-r--r--src/core/MenuScreens.cpp14
-rw-r--r--src/core/MenuScreensCustom.cpp870
-rw-r--r--src/core/config.h28
-rw-r--r--src/core/main.cpp8
-rw-r--r--src/core/re3.cpp460
13 files changed, 1412 insertions, 1135 deletions
diff --git a/src/core/CdStream.cpp b/src/core/CdStream.cpp
index c11fb72a..1d39aa52 100644
--- a/src/core/CdStream.cpp
+++ b/src/core/CdStream.cpp
@@ -242,8 +242,15 @@ CdStreamRead(int32 channel, void *buffer, uint32 offset, uint32 size)
else
return STREAM_SUCCESS;
}
-
+
+#ifdef BIG_IMG
+ LARGE_INTEGER liDistanceToMove;
+ liDistanceToMove.QuadPart = _GET_OFFSET(offset);
+ liDistanceToMove.QuadPart *= CDSTREAM_SECTOR_SIZE;
+ SetFilePointerEx(hImage, liDistanceToMove, nil, FILE_BEGIN);
+#else
SetFilePointer(hImage, _GET_OFFSET(offset) * CDSTREAM_SECTOR_SIZE, nil, FILE_BEGIN);
+#endif
DWORD NumberOfBytesRead;
diff --git a/src/core/CdStreamPosix.cpp b/src/core/CdStreamPosix.cpp
index 5c8d1b16..35a90a74 100644
--- a/src/core/CdStreamPosix.cpp
+++ b/src/core/CdStreamPosix.cpp
@@ -429,7 +429,7 @@ void *CdStreamThread(void *param)
ASSERT(pChannel->hFile >= 0);
ASSERT(pChannel->pBuffer != nil );
- lseek(pChannel->hFile, pChannel->nSectorOffset * CDSTREAM_SECTOR_SIZE, SEEK_SET);
+ lseek(pChannel->hFile, (size_t)pChannel->nSectorOffset * (size_t)CDSTREAM_SECTOR_SIZE, SEEK_SET);
if (read(pChannel->hFile, pChannel->pBuffer, pChannel->nSectorsToRead * CDSTREAM_SECTOR_SIZE) == -1) {
// pChannel->nSectorsToRead == 0 at this point means we wanted to flush channel
// STREAM_WAITING is a little hack to make CStreaming not process this data
diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp
index dcc294c8..cadba7f2 100644
--- a/src/core/ControllerConfig.cpp
+++ b/src/core/ControllerConfig.cpp
@@ -2316,199 +2316,208 @@ int32 CControllerConfigManager::GetNumOfSettingsForAction(e_ControllerAction act
return num;
}
-const char *XboxButtons[][MAX_CONTROLLERACTIONS] =
-{
- {
- "B", // PED_FIREWEAPON
- "RT", // PED_CYCLE_WEAPON_RIGHT
- "LT", // PED_CYCLE_WEAPON_LEFT
- nil, // GO_FORWARD
- nil, // GO_BACK
- nil, // GO_LEFT
- nil, // GO_RIGHT
- "X", // PED_SNIPER_ZOOM_IN
- "A", // PED_SNIPER_ZOOM_OUT
- "Y", // VEHICLE_ENTER_EXIT
- "BACK", // CAMERA_CHANGE_VIEW_ALL_SITUATIONS
- "X", // PED_JUMPING
- "A", // PED_SPRINT
- "RS", // PED_LOOKBEHIND
-#ifdef BIND_VEHICLE_FIREWEAPON
- "B", // VEHICLE_FIREWEAPON
-#endif
- "A", // VEHICLE_ACCELERATE
- "X", // VEHICLE_BRAKE
- "LB", // VEHICLE_CHANGE_RADIO_STATION
- "LS", // VEHICLE_HORN
- "RS", // TOGGLE_SUBMISSIONS
- "RB", // VEHICLE_HANDBRAKE
- nil, // PED_1RST_PERSON_LOOK_LEFT
- nil, // PED_1RST_PERSON_LOOK_RIGHT
- "LT", // VEHICLE_LOOKLEFT
- "RT", // VEHICLE_LOOKRIGHT
- nil, // VEHICLE_LOOKBEHIND
- nil, // VEHICLE_TURRETLEFT
- nil, // VEHICLE_TURRETRIGHT
- nil, // VEHICLE_TURRETUP
- nil, // VEHICLE_TURRETDOWN
- "LT", // PED_CYCLE_TARGET_LEFT
- "RT", // PED_CYCLE_TARGET_RIGHT
- "LB", // PED_CENTER_CAMERA_BEHIND_PLAYER
- "RB", // PED_LOCK_TARGET
- nil, // NETWORK_TALK
- nil, // PED_1RST_PERSON_LOOK_UP
- nil, // PED_1RST_PERSON_LOOK_DOWN
- nil, // _CONTROLLERACTION_36
- nil, // TOGGLE_DPAD
- nil, // SWITCH_DEBUG_CAM_ON
- nil, // TAKE_SCREEN_SHOT
- nil, // SHOW_MOUSE_POINTER_TOGGLE
- },
- {
- "B", // PED_FIREWEAPON
- "RT", // PED_CYCLE_WEAPON_RIGHT
- "LT", // PED_CYCLE_WEAPON_LEFT
- nil, // GO_FORWARD
- nil, // GO_BACK
- nil, // GO_LEFT
- nil, // GO_RIGHT
- "X", // PED_SNIPER_ZOOM_IN
- "A", // PED_SNIPER_ZOOM_OUT
- "Y", // VEHICLE_ENTER_EXIT
- "BACK", // CAMERA_CHANGE_VIEW_ALL_SITUATIONS
- "X", // PED_JUMPING
- "A", // PED_SPRINT
- "RS", // PED_LOOKBEHIND
-#ifdef BIND_VEHICLE_FIREWEAPON
- "B", // VEHICLE_FIREWEAPON
-#endif
- "A", // VEHICLE_ACCELERATE
- "X", // VEHICLE_BRAKE
- "BACK", // VEHICLE_CHANGE_RADIO_STATION
- "LB", // VEHICLE_HORN
- "RS", // TOGGLE_SUBMISSIONS
- "RB", // VEHICLE_HANDBRAKE
- nil, // PED_1RST_PERSON_LOOK_LEFT
- nil, // PED_1RST_PERSON_LOOK_RIGHT
- "LT", // VEHICLE_LOOKLEFT
- "RT", // VEHICLE_LOOKRIGHT
- nil, // VEHICLE_LOOKBEHIND
- nil, // VEHICLE_TURRETLEFT
- nil, // VEHICLE_TURRETRIGHT
- nil, // VEHICLE_TURRETUP
- nil, // VEHICLE_TURRETDOWN
- "LT", // PED_CYCLE_TARGET_LEFT
- "RT", // PED_CYCLE_TARGET_RIGHT
- "LB", // PED_CENTER_CAMERA_BEHIND_PLAYER
- "RB", // PED_LOCK_TARGET
- nil, // NETWORK_TALK
- nil, // PED_1RST_PERSON_LOOK_UP
- nil, // PED_1RST_PERSON_LOOK_DOWN
- nil, // _CONTROLLERACTION_36
- nil, // TOGGLE_DPAD
- nil, // SWITCH_DEBUG_CAM_ON
- nil, // TAKE_SCREEN_SHOT
- nil, // SHOW_MOUSE_POINTER_TOGGLE
- },
- {
- "A", // PED_FIREWEAPON
- "RT", // PED_CYCLE_WEAPON_RIGHT
- "LT", // PED_CYCLE_WEAPON_LEFT
- nil, // GO_FORWARD
- nil, // GO_BACK
- nil, // GO_LEFT
- nil, // GO_RIGHT
- "Y", // PED_SNIPER_ZOOM_IN
- "X", // PED_SNIPER_ZOOM_OUT
- "LB", // VEHICLE_ENTER_EXIT
- "BACK", // CAMERA_CHANGE_VIEW_ALL_SITUATIONS
- "X", // PED_JUMPING
- "B", // PED_SPRINT
- "RS", // PED_LOOKBEHIND
#ifdef BIND_VEHICLE_FIREWEAPON
- "B", // VEHICLE_FIREWEAPON
+#define VFB(b) b,
+#else
+#define VFB(b)
#endif
- "A", // VEHICLE_ACCELERATE
- "X", // VEHICLE_BRAKE
- "LS", // VEHICLE_CHANGE_RADIO_STATION
- "RB", // VEHICLE_HORN
- "RS", // TOGGLE_SUBMISSIONS
- "Y", // VEHICLE_HANDBRAKE
- nil, // PED_1RST_PERSON_LOOK_LEFT
- nil, // PED_1RST_PERSON_LOOK_RIGHT
- "LT", // VEHICLE_LOOKLEFT
- "RT", // VEHICLE_LOOKRIGHT
- nil, // VEHICLE_LOOKBEHIND
- nil, // VEHICLE_TURRETLEFT
- nil, // VEHICLE_TURRETRIGHT
- nil, // VEHICLE_TURRETUP
- nil, // VEHICLE_TURRETDOWN
- "LT", // PED_CYCLE_TARGET_LEFT
- "RT", // PED_CYCLE_TARGET_RIGHT
- "Y", // PED_CENTER_CAMERA_BEHIND_PLAYER
- "RB", // PED_LOCK_TARGET
- nil, // NETWORK_TALK
- nil, // PED_1RST_PERSON_LOOK_UP
- nil, // PED_1RST_PERSON_LOOK_DOWN
- nil, // _CONTROLLERACTION_36
- nil, // TOGGLE_DPAD
- nil, // SWITCH_DEBUG_CAM_ON
- nil, // TAKE_SCREEN_SHOT
- nil, // SHOW_MOUSE_POINTER_TOGGLE
- },
- {
- "RB", // PED_FIREWEAPON
- "RT", // PED_CYCLE_WEAPON_RIGHT
- "LT", // PED_CYCLE_WEAPON_LEFT
- nil, // GO_FORWARD
- nil, // GO_BACK
- nil, // GO_LEFT
- nil, // GO_RIGHT
- "X", // PED_SNIPER_ZOOM_IN
- "A", // PED_SNIPER_ZOOM_OUT
- "Y", // VEHICLE_ENTER_EXIT
- "BACK", // CAMERA_CHANGE_VIEW_ALL_SITUATIONS
- "X", // PED_JUMPING
- "A", // PED_SPRINT
- "RS", // PED_LOOKBEHIND
-#ifdef BIND_VEHICLE_FIREWEAPON
- "RB", // VEHICLE_FIREWEAPON
+
+#define CONTROLLER_BUTTONS(T, O, X, Q, L1, L2, L3, R1, R2, R3, SELECT) \
+ {{ \
+ O, /* PED_FIREWEAPON */ \
+ R2, /* PED_CYCLE_WEAPON_RIGHT */ \
+ L2, /* PED_CYCLE_WEAPON_LEFT */ \
+ nil, /* GO_FORWARD */ \
+ nil, /* GO_BACK */ \
+ nil, /* GO_LEFT */ \
+ nil, /* GO_RIGHT */ \
+ Q, /* PED_SNIPER_ZOOM_IN */ \
+ X, /* PED_SNIPER_ZOOM_OUT */ \
+ T, /* VEHICLE_ENTER_EXIT */ \
+ SELECT, /* CAMERA_CHANGE_VIEW_ALL_SITUATIONS */ \
+ Q, /* PED_JUMPING */ \
+ X, /* PED_SPRINT */ \
+ R3, /* PED_LOOKBEHIND */ \
+ VFB(O) /* VEHICLE_FIREWEAPON */ \
+ X, /* VEHICLE_ACCELERATE */ \
+ Q, /* VEHICLE_BRAKE */ \
+ L1, /* VEHICLE_CHANGE_RADIO_STATION */ \
+ L3, /* VEHICLE_HORN */ \
+ R3, /* TOGGLE_SUBMISSIONS */ \
+ R1, /* VEHICLE_HANDBRAKE */ \
+ nil, /* PED_1RST_PERSON_LOOK_LEFT */ \
+ nil, /* PED_1RST_PERSON_LOOK_RIGHT */ \
+ L2, /* VEHICLE_LOOKLEFT */ \
+ R2, /* VEHICLE_LOOKRIGHT */ \
+ nil, /* VEHICLE_LOOKBEHIND */ \
+ nil, /* VEHICLE_TURRETLEFT */ \
+ nil, /* VEHICLE_TURRETRIGHT */ \
+ nil, /* VEHICLE_TURRETUP */ \
+ nil, /* VEHICLE_TURRETDOWN */ \
+ L2, /* PED_CYCLE_TARGET_LEFT */ \
+ R2, /* PED_CYCLE_TARGET_RIGHT */ \
+ L1, /* PED_CENTER_CAMERA_BEHIND_PLAYER */ \
+ R1, /* PED_LOCK_TARGET */ \
+ nil, /* NETWORK_TALK */ \
+ nil, /* PED_1RST_PERSON_LOOK_UP */ \
+ nil, /* PED_1RST_PERSON_LOOK_DOWN */ \
+ nil, /* _CONTROLLERACTION_36 */ \
+ nil, /* TOGGLE_DPAD */ \
+ nil, /* SWITCH_DEBUG_CAM_ON */ \
+ nil, /* TAKE_SCREEN_SHOT */ \
+ nil, /* SHOW_MOUSE_POINTER_TOGGLE */ \
+ }, \
+ { \
+ O, /* PED_FIREWEAPON */ \
+ R2, /* PED_CYCLE_WEAPON_RIGHT */ \
+ L2, /* PED_CYCLE_WEAPON_LEFT */ \
+ nil, /* GO_FORWARD */ \
+ nil, /* GO_BACK */ \
+ nil, /* GO_LEFT */ \
+ nil, /* GO_RIGHT */ \
+ Q, /* PED_SNIPER_ZOOM_IN */ \
+ X, /* PED_SNIPER_ZOOM_OUT */ \
+ T, /* VEHICLE_ENTER_EXIT */ \
+ SELECT, /* CAMERA_CHANGE_VIEW_ALL_SITUATIONS */ \
+ Q, /* PED_JUMPING */ \
+ X, /* PED_SPRINT */ \
+ R3, /* PED_LOOKBEHIND */ \
+ VFB(O) /* VEHICLE_FIREWEAPON */ \
+ X, /* VEHICLE_ACCELERATE */ \
+ Q, /* VEHICLE_BRAKE */ \
+ SELECT, /* VEHICLE_CHANGE_RADIO_STATION */ \
+ L1, /* VEHICLE_HORN */ \
+ R3, /* TOGGLE_SUBMISSIONS */ \
+ R1, /* VEHICLE_HANDBRAKE */ \
+ nil, /* PED_1RST_PERSON_LOOK_LEFT */ \
+ nil, /* PED_1RST_PERSON_LOOK_RIGHT */ \
+ L2, /* VEHICLE_LOOKLEFT */ \
+ R2, /* VEHICLE_LOOKRIGHT */ \
+ nil, /* VEHICLE_LOOKBEHIND */ \
+ nil, /* VEHICLE_TURRETLEFT */ \
+ nil, /* VEHICLE_TURRETRIGHT */ \
+ nil, /* VEHICLE_TURRETUP */ \
+ nil, /* VEHICLE_TURRETDOWN */ \
+ L2, /* PED_CYCLE_TARGET_LEFT */ \
+ R2, /* PED_CYCLE_TARGET_RIGHT */ \
+ L1, /* PED_CENTER_CAMERA_BEHIND_PLAYER */ \
+ R1, /* PED_LOCK_TARGET */ \
+ nil, /* NETWORK_TALK */ \
+ nil, /* PED_1RST_PERSON_LOOK_UP */ \
+ nil, /* PED_1RST_PERSON_LOOK_DOWN */ \
+ nil, /* _CONTROLLERACTION_36 */ \
+ nil, /* TOGGLE_DPAD */ \
+ nil, /* SWITCH_DEBUG_CAM_ON */ \
+ nil, /* TAKE_SCREEN_SHOT */ \
+ nil, /* SHOW_MOUSE_POINTER_TOGGLE */ \
+ }, \
+ { \
+ X, /* PED_FIREWEAPON */ \
+ R2, /* PED_CYCLE_WEAPON_RIGHT */ \
+ L2, /* PED_CYCLE_WEAPON_LEFT */ \
+ nil, /* GO_FORWARD */ \
+ nil, /* GO_BACK */ \
+ nil, /* GO_LEFT */ \
+ nil, /* GO_RIGHT */ \
+ T, /* PED_SNIPER_ZOOM_IN */ \
+ Q, /* PED_SNIPER_ZOOM_OUT */ \
+ L1, /* VEHICLE_ENTER_EXIT */ \
+ SELECT, /* CAMERA_CHANGE_VIEW_ALL_SITUATIONS */ \
+ Q, /* PED_JUMPING */ \
+ O, /* PED_SPRINT */ \
+ R3, /* PED_LOOKBEHIND */ \
+ VFB(O) /* VEHICLE_FIREWEAPON */ \
+ X, /* VEHICLE_ACCELERATE */ \
+ Q, /* VEHICLE_BRAKE */ \
+ L3, /* VEHICLE_CHANGE_RADIO_STATION */ \
+ R1, /* VEHICLE_HORN */ \
+ R3, /* TOGGLE_SUBMISSIONS */ \
+ T, /* VEHICLE_HANDBRAKE */ \
+ nil, /* PED_1RST_PERSON_LOOK_LEFT */ \
+ nil, /* PED_1RST_PERSON_LOOK_RIGHT */ \
+ L2, /* VEHICLE_LOOKLEFT */ \
+ R2, /* VEHICLE_LOOKRIGHT */ \
+ nil, /* VEHICLE_LOOKBEHIND */ \
+ nil, /* VEHICLE_TURRETLEFT */ \
+ nil, /* VEHICLE_TURRETRIGHT */ \
+ nil, /* VEHICLE_TURRETUP */ \
+ nil, /* VEHICLE_TURRETDOWN */ \
+ L2, /* PED_CYCLE_TARGET_LEFT */ \
+ R2, /* PED_CYCLE_TARGET_RIGHT */ \
+ T, /* PED_CENTER_CAMERA_BEHIND_PLAYER */ \
+ R1, /* PED_LOCK_TARGET */ \
+ nil, /* NETWORK_TALK */ \
+ nil, /* PED_1RST_PERSON_LOOK_UP */ \
+ nil, /* PED_1RST_PERSON_LOOK_DOWN */ \
+ nil, /* _CONTROLLERACTION_36 */ \
+ nil, /* TOGGLE_DPAD */ \
+ nil, /* SWITCH_DEBUG_CAM_ON */ \
+ nil, /* TAKE_SCREEN_SHOT */ \
+ nil, /* SHOW_MOUSE_POINTER_TOGGLE */ \
+ }, \
+ { \
+ R1, /* PED_FIREWEAPON */ \
+ R2, /* PED_CYCLE_WEAPON_RIGHT */ \
+ L2, /* PED_CYCLE_WEAPON_LEFT */ \
+ nil, /* GO_FORWARD */ \
+ nil, /* GO_BACK */ \
+ nil, /* GO_LEFT */ \
+ nil, /* GO_RIGHT */ \
+ Q, /* PED_SNIPER_ZOOM_IN */ \
+ X, /* PED_SNIPER_ZOOM_OUT */ \
+ T, /* VEHICLE_ENTER_EXIT */ \
+ SELECT, /* CAMERA_CHANGE_VIEW_ALL_SITUATIONS */ \
+ Q, /* PED_JUMPING */ \
+ X, /* PED_SPRINT */ \
+ R3, /* PED_LOOKBEHIND */ \
+ VFB(R1) /* VEHICLE_FIREWEAPON */ \
+ nil, /* VEHICLE_ACCELERATE */ \
+ nil, /* VEHICLE_BRAKE */ \
+ O, /* VEHICLE_CHANGE_RADIO_STATION */ \
+ L3, /* VEHICLE_HORN */ \
+ Q, /* TOGGLE_SUBMISSIONS */ \
+ L1, /* VEHICLE_HANDBRAKE */ \
+ nil, /* PED_1RST_PERSON_LOOK_LEFT */ \
+ nil, /* PED_1RST_PERSON_LOOK_RIGHT */ \
+ L2, /* VEHICLE_LOOKLEFT */ \
+ R2, /* VEHICLE_LOOKRIGHT */ \
+ nil, /* VEHICLE_LOOKBEHIND */ \
+ nil, /* VEHICLE_TURRETLEFT */ \
+ nil, /* VEHICLE_TURRETRIGHT */ \
+ nil, /* VEHICLE_TURRETUP */ \
+ nil, /* VEHICLE_TURRETDOWN */ \
+ L2, /* PED_CYCLE_TARGET_LEFT */ \
+ R2, /* PED_CYCLE_TARGET_RIGHT */ \
+ O, /* PED_CENTER_CAMERA_BEHIND_PLAYER */ \
+ L1, /* PED_LOCK_TARGET */ \
+ nil, /* NETWORK_TALK */ \
+ nil, /* PED_1RST_PERSON_LOOK_UP */ \
+ nil, /* PED_1RST_PERSON_LOOK_DOWN */ \
+ nil, /* _CONTROLLERACTION_36 */ \
+ nil, /* TOGGLE_DPAD */ \
+ nil, /* SWITCH_DEBUG_CAM_ON */ \
+ nil, /* TAKE_SCREEN_SHOT */ \
+ nil, /* SHOW_MOUSE_POINTER_TOGGLE */ \
+ }}
+
+
+const char *XboxButtons_noIcons[][MAX_CONTROLLERACTIONS] = CONTROLLER_BUTTONS("Y", "B", "A", "X", "LB", "LT", "LS", "RB", "RT", "RS", "BACK");
+
+#ifdef BUTTON_ICONS
+const char *XboxButtons[][MAX_CONTROLLERACTIONS] = CONTROLLER_BUTTONS("~T~", "~O~", "~X~", "~Q~", "~K~", "~M~", "~A~", "~J~", "~V~", "~C~", "BACK");
#endif
- nil, // VEHICLE_ACCELERATE
- nil, // VEHICLE_BRAKE
- "B", // VEHICLE_CHANGE_RADIO_STATION
- "LS", // VEHICLE_HORN
- "X", // TOGGLE_SUBMISSIONS
- "LB", // VEHICLE_HANDBRAKE
- nil, // PED_1RST_PERSON_LOOK_LEFT
- nil, // PED_1RST_PERSON_LOOK_RIGHT
- "LT", // VEHICLE_LOOKLEFT
- "RT", // VEHICLE_LOOKRIGHT
- nil, // VEHICLE_LOOKBEHIND
- nil, // VEHICLE_TURRETLEFT
- nil, // VEHICLE_TURRETRIGHT
- nil, // VEHICLE_TURRETUP
- nil, // VEHICLE_TURRETDOWN
- "LT", // PED_CYCLE_TARGET_LEFT
- "RT", // PED_CYCLE_TARGET_RIGHT
- "B", // PED_CENTER_CAMERA_BEHIND_PLAYER
- "LB", // PED_LOCK_TARGET
- nil, // NETWORK_TALK
- nil, // PED_1RST_PERSON_LOOK_UP
- nil, // PED_1RST_PERSON_LOOK_DOWN
- nil, // _CONTROLLERACTION_36
- nil, // TOGGLE_DPAD
- nil, // SWITCH_DEBUG_CAM_ON
- nil, // TAKE_SCREEN_SHOT
- nil, // SHOW_MOUSE_POINTER_TOGGLE
- }
-};
+
#if 0 // set 1 for ps2 fonts
#define PS2_TRIANGLE "\""
#define PS2_CIRCLE "|"
#define PS2_CROSS "/"
#define PS2_SQUARE "^"
+#elif defined(BUTTON_ICONS)
+#define PS2_TRIANGLE "~T~"
+#define PS2_CIRCLE "~O~"
+#define PS2_CROSS "~X~"
+#define PS2_SQUARE "~Q~"
#else
#define PS2_TRIANGLE "TRIANGLE"
#define PS2_CIRCLE "CIRCLE"
@@ -2516,199 +2525,22 @@ const char *XboxButtons[][MAX_CONTROLLERACTIONS] =
#define PS2_SQUARE "SQUARE"
#endif
+const char *PlayStationButtons_noIcons[][MAX_CONTROLLERACTIONS] =
+ CONTROLLER_BUTTONS(PS2_TRIANGLE, PS2_CIRCLE, PS2_CROSS, PS2_SQUARE, "L1", "L2", "L3", "R1", "R2", "R3", "SELECT");
+
+#ifdef BUTTON_ICONS
const char *PlayStationButtons[][MAX_CONTROLLERACTIONS] =
-{
- {
- PS2_CIRCLE, // PED_FIREWEAPON
- "R2", // PED_CYCLE_WEAPON_RIGHT
- "L2", // PED_CYCLE_WEAPON_LEFT
- nil, // GO_FORWARD
- nil, // GO_BACK
- nil, // GO_LEFT
- nil, // GO_RIGHT
- PS2_SQUARE, // PED_SNIPER_ZOOM_IN
- PS2_CROSS, // PED_SNIPER_ZOOM_OUT
- PS2_TRIANGLE, // VEHICLE_ENTER_EXIT
- "SELECT", // CAMERA_CHANGE_VIEW_ALL_SITUATIONS
- PS2_SQUARE, // PED_JUMPING
- PS2_CROSS, // PED_SPRINT
- "R3", // PED_LOOKBEHIND
-#ifdef BIND_VEHICLE_FIREWEAPON
- PS2_CIRCLE, // VEHICLE_FIREWEAPON
-#endif
- PS2_CROSS, // VEHICLE_ACCELERATE
- PS2_SQUARE, // VEHICLE_BRAKE
- "L1", // VEHICLE_CHANGE_RADIO_STATION
- "L3", // VEHICLE_HORN
- "R3", // TOGGLE_SUBMISSIONS
- "R1", // VEHICLE_HANDBRAKE
- nil, // PED_1RST_PERSON_LOOK_LEFT
- nil, // PED_1RST_PERSON_LOOK_RIGHT
- "L2", // VEHICLE_LOOKLEFT
- "R2", // VEHICLE_LOOKRIGHT
- nil, // VEHICLE_LOOKBEHIND
- nil, // VEHICLE_TURRETLEFT
- nil, // VEHICLE_TURRETRIGHT
- nil, // VEHICLE_TURRETUP
- nil, // VEHICLE_TURRETDOWN
- "L2", // PED_CYCLE_TARGET_LEFT
- "R2", // PED_CYCLE_TARGET_RIGHT
- "L1", // PED_CENTER_CAMERA_BEHIND_PLAYER
- "R1", // PED_LOCK_TARGET
- nil, // NETWORK_TALK
- nil, // PED_1RST_PERSON_LOOK_UP
- nil, // PED_1RST_PERSON_LOOK_DOWN
- nil, // _CONTROLLERACTION_36
- nil, // TOGGLE_DPAD
- nil, // SWITCH_DEBUG_CAM_ON
- nil, // TAKE_SCREEN_SHOT
- nil, // SHOW_MOUSE_POINTER_TOGGLE
- },
- {
- PS2_CIRCLE, // PED_FIREWEAPON
- "R2", // PED_CYCLE_WEAPON_RIGHT
- "L2", // PED_CYCLE_WEAPON_LEFT
- nil, // GO_FORWARD
- nil, // GO_BACK
- nil, // GO_LEFT
- nil, // GO_RIGHT
- PS2_SQUARE, // PED_SNIPER_ZOOM_IN
- PS2_CROSS, // PED_SNIPER_ZOOM_OUT
- PS2_TRIANGLE, // VEHICLE_ENTER_EXIT
- "SELECT", // CAMERA_CHANGE_VIEW_ALL_SITUATIONS
- PS2_SQUARE, // PED_JUMPING
- PS2_CROSS, // PED_SPRINT
- "R3", // PED_LOOKBEHIND
-#ifdef BIND_VEHICLE_FIREWEAPON
- PS2_CIRCLE, // VEHICLE_FIREWEAPON
-#endif
- PS2_CROSS, // VEHICLE_ACCELERATE
- PS2_SQUARE, // VEHICLE_BRAKE
- "BACK", // VEHICLE_CHANGE_RADIO_STATION
- "L1", // VEHICLE_HORN
- "R3", // TOGGLE_SUBMISSIONS
- "R1", // VEHICLE_HANDBRAKE
- nil, // PED_1RST_PERSON_LOOK_LEFT
- nil, // PED_1RST_PERSON_LOOK_RIGHT
- "L2", // VEHICLE_LOOKLEFT
- "R2", // VEHICLE_LOOKRIGHT
- nil, // VEHICLE_LOOKBEHIND
- nil, // VEHICLE_TURRETLEFT
- nil, // VEHICLE_TURRETRIGHT
- nil, // VEHICLE_TURRETUP
- nil, // VEHICLE_TURRETDOWN
- "L2", // PED_CYCLE_TARGET_LEFT
- "R2", // PED_CYCLE_TARGET_RIGHT
- "L1", // PED_CENTER_CAMERA_BEHIND_PLAYER
- "R1", // PED_LOCK_TARGET
- nil, // NETWORK_TALK
- nil, // PED_1RST_PERSON_LOOK_UP
- nil, // PED_1RST_PERSON_LOOK_DOWN
- nil, // _CONTROLLERACTION_36
- nil, // TOGGLE_DPAD
- nil, // SWITCH_DEBUG_CAM_ON
- nil, // TAKE_SCREEN_SHOT
- nil, // SHOW_MOUSE_POINTER_TOGGLE
- },
- {
- PS2_CROSS, // PED_FIREWEAPON
- "R2", // PED_CYCLE_WEAPON_RIGHT
- "L2", // PED_CYCLE_WEAPON_LEFT
- nil, // GO_FORWARD
- nil, // GO_BACK
- nil, // GO_LEFT
- nil, // GO_RIGHT
- PS2_TRIANGLE, // PED_SNIPER_ZOOM_IN
- PS2_SQUARE, // PED_SNIPER_ZOOM_OUT
- "L1", // VEHICLE_ENTER_EXIT
- "BACK", // CAMERA_CHANGE_VIEW_ALL_SITUATIONS
- PS2_SQUARE, // PED_JUMPING
- PS2_CIRCLE, // PED_SPRINT
- "R3", // PED_LOOKBEHIND
-#ifdef BIND_VEHICLE_FIREWEAPON
- PS2_CIRCLE, // VEHICLE_FIREWEAPON
-#endif
- PS2_CROSS, // VEHICLE_ACCELERATE
- PS2_SQUARE, // VEHICLE_BRAKE
- "L3", // VEHICLE_CHANGE_RADIO_STATION
- "R1", // VEHICLE_HORN
- "R3", // TOGGLE_SUBMISSIONS
- PS2_TRIANGLE, // VEHICLE_HANDBRAKE
- nil, // PED_1RST_PERSON_LOOK_LEFT
- nil, // PED_1RST_PERSON_LOOK_RIGHT
- "L2", // VEHICLE_LOOKLEFT
- "R2", // VEHICLE_LOOKRIGHT
- nil, // VEHICLE_LOOKBEHIND
- nil, // VEHICLE_TURRETLEFT
- nil, // VEHICLE_TURRETRIGHT
- nil, // VEHICLE_TURRETUP
- nil, // VEHICLE_TURRETDOWN
- "L2", // PED_CYCLE_TARGET_LEFT
- "R2", // PED_CYCLE_TARGET_RIGHT
- PS2_TRIANGLE, // PED_CENTER_CAMERA_BEHIND_PLAYER
- "R1", // PED_LOCK_TARGET
- nil, // NETWORK_TALK
- nil, // PED_1RST_PERSON_LOOK_UP
- nil, // PED_1RST_PERSON_LOOK_DOWN
- nil, // _CONTROLLERACTION_36
- nil, // TOGGLE_DPAD
- nil, // SWITCH_DEBUG_CAM_ON
- nil, // TAKE_SCREEN_SHOT
- nil, // SHOW_MOUSE_POINTER_TOGGLE
- },
- {
- "R1", // PED_FIREWEAPON
- "R2", // PED_CYCLE_WEAPON_RIGHT
- "L2", // PED_CYCLE_WEAPON_LEFT
- nil, // GO_FORWARD
- nil, // GO_BACK
- nil, // GO_LEFT
- nil, // GO_RIGHT
- PS2_SQUARE, // PED_SNIPER_ZOOM_IN
- PS2_CROSS, // PED_SNIPER_ZOOM_OUT
- PS2_TRIANGLE, // VEHICLE_ENTER_EXIT
- "SELECT", // CAMERA_CHANGE_VIEW_ALL_SITUATIONS
- PS2_SQUARE, // PED_JUMPING
- PS2_CROSS, // PED_SPRINT
- "R3", // PED_LOOKBEHIND
-#ifdef BIND_VEHICLE_FIREWEAPON
- "R1", // VEHICLE_FIREWEAPON
+ CONTROLLER_BUTTONS(PS2_TRIANGLE, PS2_CIRCLE, PS2_CROSS, PS2_SQUARE, "~K~", "~M~", "~A~", "~J~", "~V~", "~C~", "SELECT");
#endif
- nil, // VEHICLE_ACCELERATE
- nil, // VEHICLE_BRAKE
- PS2_CIRCLE, // VEHICLE_CHANGE_RADIO_STATION
- "L3", // VEHICLE_HORN
- PS2_SQUARE, // TOGGLE_SUBMISSIONS
- "L1", // VEHICLE_HANDBRAKE
- nil, // PED_1RST_PERSON_LOOK_LEFT
- nil, // PED_1RST_PERSON_LOOK_RIGHT
- "L2", // VEHICLE_LOOKLEFT
- "R2", // VEHICLE_LOOKRIGHT
- nil, // VEHICLE_LOOKBEHIND
- nil, // VEHICLE_TURRETLEFT
- nil, // VEHICLE_TURRETRIGHT
- nil, // VEHICLE_TURRETUP
- nil, // VEHICLE_TURRETDOWN
- "L2", // PED_CYCLE_TARGET_LEFT
- "R2", // PED_CYCLE_TARGET_RIGHT
- PS2_CIRCLE, // PED_CENTER_CAMERA_BEHIND_PLAYER
- "L1", // PED_LOCK_TARGET
- nil, // NETWORK_TALK
- nil, // PED_1RST_PERSON_LOOK_UP
- nil, // PED_1RST_PERSON_LOOK_DOWN
- nil, // _CONTROLLERACTION_36
- nil, // TOGGLE_DPAD
- nil, // SWITCH_DEBUG_CAM_ON
- nil, // TAKE_SCREEN_SHOT
- nil, // SHOW_MOUSE_POINTER_TOGGLE
- }
-};
#undef PS2_TRIANGLE
#undef PS2_CIRCLE
#undef PS2_CROSS
#undef PS2_SQUARE
+#undef CONTROLLER_BUTTONS
+#undef VFB
+
void CControllerConfigManager::GetWideStringOfCommandKeys(uint16 action, wchar *text, uint16 leight)
{
#ifdef DETECT_PAD_INPUT_SWITCH
@@ -2716,7 +2548,11 @@ void CControllerConfigManager::GetWideStringOfCommandKeys(uint16 action, wchar *
wchar wstr[16];
// TODO: INI and/or menu setting for Xbox/PS switch
- const char *(*Buttons)[MAX_CONTROLLERACTIONS] = XboxButtons;
+#ifdef BUTTON_ICONS
+ const char *(*Buttons)[MAX_CONTROLLERACTIONS] = CFont::ButtonsSlot != -1 ? XboxButtons : XboxButtons_noIcons;
+#else
+ const char *(*Buttons)[MAX_CONTROLLERACTIONS] = XboxButtons_noIcons;
+#endif
assert(Buttons[CPad::GetPad(0)->Mode][action] != nil); // we cannot use these
AsciiToUnicode(Buttons[CPad::GetPad(0)->Mode][action], wstr);
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index dca9685e..8221ad4f 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -122,7 +122,6 @@ int8 CMenuManager::m_nDisplayMSAALevel = 0;
#endif
#ifdef NO_ISLAND_LOADING
-int8 CMenuManager::m_DisplayIslandLoading = ISLAND_LOADING_LOW;
int8 CMenuManager::m_PrefsIslandLoading = ISLAND_LOADING_LOW;
#endif
@@ -435,29 +434,17 @@ CMenuManager::ThingsToDoBeforeGoingBack()
}
#ifdef CUSTOM_FRONTEND_OPTIONS
- for (int i = 0; i < numCustomFrontendOptions; i++) {
- FrontendOption &option = customFrontendOptions[i];
- if (option.type != FEOPTION_REDIRECT && option.type != FEOPTION_GOBACK && m_nCurrScreen == option.screen) {
- if (option.returnPrevPageFunc)
- option.returnPrevPageFunc();
-
- if (m_nCurrOption == option.screenOptionOrder && (option.type == FEOPTION_DYNAMIC || option.type == FEOPTION_BUILTIN_ACTION))
- if(option.buttonPressFunc)
- option.buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS);
-
- if (option.type == FEOPTION_SELECT && option.onlyApplyOnEnter && option.lastSavedValue != option.displayedValue)
- option.displayedValue = *option.value = option.lastSavedValue;
- }
- }
+ CMenuScreenCustom::CMenuEntry &option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption];
- if (m_nCurrScreen > lastOgScreen) {
- for (int i = 0; i < numCustomFrontendScreens; i++) {
- FrontendScreen& screen = customFrontendScreens[i];
- if (m_nCurrScreen == screen.id && screen.returnPrevPageFunc) {
- screen.returnPrevPageFunc();
- break;
- }
- }
+ if (option.m_Action == MENUACTION_CFO_DYNAMIC)
+ if(option.m_CFODynamic->buttonPressFunc)
+ option.m_CFODynamic->buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS);
+
+ if (option.m_Action == MENUACTION_CFO_SELECT && option.m_CFOSelect->onlyApplyOnEnter && option.m_CFOSelect->lastSavedValue != option.m_CFOSelect->displayedValue)
+ option.m_CFOSelect->displayedValue = *option.m_CFO->value = option.m_CFOSelect->lastSavedValue;
+
+ if (aScreens[m_nCurrScreen].returnPrevPageFunc) {
+ aScreens[m_nCurrScreen].returnPrevPageFunc();
}
#endif
}
@@ -476,18 +463,15 @@ CMenuManager::GetPreviousPageOption()
prevPage = prevPage == MENUPAGE_NONE ? (!m_bGameNotLoaded ? MENUPAGE_PAUSE_MENU : MENUPAGE_START_MENU) : prevPage;
for (int i = 0; i < NUM_MENUROWS; i++) {
- if (aScreens[prevPage].m_aEntries[i].m_SaveSlot == SAVESLOT_CFO) {
- FrontendOption &option = customFrontendOptions[aScreens[prevPage].m_aEntries[i].m_TargetMenu];
- if(option.type == FEOPTION_REDIRECT && option.to == m_nCurrScreen) {
+ if (aScreens[prevPage].m_aEntries[i].m_Action >= MENUACTION_NOTHING) { // CFO check
+ if (aScreens[prevPage].m_aEntries[i].m_TargetMenu == m_nCurrScreen) {
return i;
}
- } else if (aScreens[prevPage].m_aEntries[i].m_TargetMenu == m_nCurrScreen) {
- return i;
}
}
-
- // Couldn't find current screen option on previous page, use default behaviour (maybe save-related screen?)
- return !m_bGameNotLoaded ? aScreens[m_nCurrScreen].m_ParentEntry[1] : aScreens[m_nCurrScreen].m_ParentEntry[0];
+
+ // This shouldn't happen
+ return 0;
#endif
}
@@ -856,13 +840,6 @@ CMenuManager::Draw()
str = TheText.Get(aScreens[m_nCurrScreen].m_aEntries[0].m_EntryName);
break;
default:
-#ifdef CUSTOM_FRONTEND_OPTIONS
- if (aScreens[m_nCurrScreen].m_aEntries[0].m_SaveSlot == SAVESLOT_CFO) {
- FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[0].m_TargetMenu];
- str = (wchar*)option.leftText;
- }
- else
-#endif
str = TheText.Get(aScreens[m_nCurrScreen].m_aEntries[0].m_EntryName);
break;
}
@@ -961,30 +938,22 @@ CMenuManager::Draw()
#endif
default:
#ifdef CUSTOM_FRONTEND_OPTIONS
- bool custom = m_nCurrScreen > lastOgScreen;
+ CCustomScreenLayout *custom = aScreens[m_nCurrScreen].layout;
if (custom) {
- for (int i = 0; i < numCustomFrontendScreens; i++) {
- FrontendScreen& screen = customFrontendScreens[i];
- if (m_nCurrScreen == screen.id) {
- columnWidth = screen.columnWidth;
- headerHeight = screen.headerHeight;
- lineHeight = screen.lineHeight;
- CFont::SetFontStyle(FONT_LOCALE(screen.font));
- CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X = screen.fontScaleX), MENU_Y(MENU_TEXT_SIZE_Y = screen.fontScaleY));
- if (screen.alignment == FESCREEN_LEFT_ALIGN) {
- CFont::SetCentreOff();
- CFont::SetRightJustifyOff();
- } else if (screen.alignment == FESCREEN_RIGHT_ALIGN) {
- CFont::SetCentreOff();
- CFont::SetRightJustifyOn();
- } else {
- CFont::SetRightJustifyOff();
- CFont::SetCentreOn();
- }
- break;
- }
- if (i == numCustomFrontendScreens - 1)
- custom = false;
+ columnWidth = custom->columnWidth;
+ headerHeight = custom->headerHeight;
+ lineHeight = custom->lineHeight;
+ CFont::SetFontStyle(FONT_LOCALE(custom->font));
+ CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X = custom->fontScaleX), MENU_Y(MENU_TEXT_SIZE_Y = custom->fontScaleY));
+ if (custom->alignment == FESCREEN_LEFT_ALIGN) {
+ CFont::SetCentreOff();
+ CFont::SetRightJustifyOff();
+ } else if (custom->alignment == FESCREEN_RIGHT_ALIGN) {
+ CFont::SetCentreOff();
+ CFont::SetRightJustifyOn();
+ } else {
+ CFont::SetRightJustifyOff();
+ CFont::SetCentreOn();
}
}
if (!custom)
@@ -1068,28 +1037,22 @@ CMenuManager::Draw()
leftText = TheText.Get(gString);
}
} else {
-#ifdef CUSTOM_FRONTEND_OPTIONS
- if (aScreens[m_nCurrScreen].m_aEntries[i].m_SaveSlot == SAVESLOT_CFO){
- FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu];
- leftText = (wchar*)option.leftText;
- } else
-#endif
leftText = TheText.Get(aScreens[m_nCurrScreen].m_aEntries[i].m_EntryName);
}
#ifdef CUSTOM_FRONTEND_OPTIONS
- if (aScreens[m_nCurrScreen].m_aEntries[i].m_SaveSlot == SAVESLOT_CFO) {
- FrontendOption &option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu];
- if (option.type == FEOPTION_SELECT) {
- if (option.onlyApplyOnEnter){
+ if (aScreens[m_nCurrScreen].m_aEntries[i].m_Action < MENUACTION_NOTHING) { // CFO check
+ CMenuScreenCustom::CMenuEntry &option = aScreens[m_nCurrScreen].m_aEntries[i];
+ if (option.m_Action == MENUACTION_CFO_SELECT) {
+ if (option.m_CFOSelect->onlyApplyOnEnter){
if (m_nCurrOption != i) {
- if (option.displayedValue != option.lastSavedValue)
+ if (option.m_CFOSelect->displayedValue != option.m_CFOSelect->lastSavedValue)
SetHelperText(3); // Restored original value
-// option.displayedValue = option.lastSavedValue = *option.value;
+// option.displayedValue = option.lastSavedValue = *option.m_CFO->value;
} else {
- if (option.displayedValue != *option.value)
+ if (option.m_CFOSelect->displayedValue != *option.m_CFO->value)
SetHelperText(1); // Enter to apply
else if (m_nHelperTextMsgId == 1)
ResetHelperText(); // Applied
@@ -1098,13 +1061,13 @@ CMenuManager::Draw()
}
if (m_nCurrOption != lastOption && lastOption == i) {
- FrontendOption &oldOption = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[lastOption].m_TargetMenu];
- if (oldOption.type == FEOPTION_DYNAMIC || oldOption.type == FEOPTION_BUILTIN_ACTION)
- if(oldOption.buttonPressFunc)
- oldOption.buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS);
+ CMenuScreenCustom::CMenuEntry &oldOption = aScreens[m_nCurrScreen].m_aEntries[lastOption];
+ if (oldOption.m_Action == MENUACTION_CFO_DYNAMIC)
+ if(oldOption.m_CFODynamic->buttonPressFunc)
+ oldOption.m_CFODynamic->buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS);
- if (oldOption.onlyApplyOnEnter && oldOption.type == FEOPTION_SELECT)
- oldOption.displayedValue = oldOption.lastSavedValue = *oldOption.value;
+ if (oldOption.m_Action == MENUACTION_CFO_SELECT && oldOption.m_CFOSelect->onlyApplyOnEnter)
+ oldOption.m_CFOSelect->displayedValue = oldOption.m_CFOSelect->lastSavedValue = *oldOption.m_CFO->value;
}
}
#endif
@@ -1272,21 +1235,6 @@ CMenuManager::Draw()
AsciiToUnicode(_psGetVideoModeList()[m_nDisplayVideoMode], unicodeTemp);
rightText = unicodeTemp;
break;
-//#ifdef NO_ISLAND_LOADING
-// case MENUACTION_ISLANDLOADING:
-// switch (m_DisplayIslandLoading) {
-// case ISLAND_LOADING_LOW:
-// rightText = TheText.Get("FEM_LOW");
-// break;
-// case ISLAND_LOADING_MEDIUM:
-// rightText = TheText.Get("FEM_MED");
-// break;
-// case ISLAND_LOADING_HIGH:
-// rightText = TheText.Get("FEM_HIG");
-// break;
-// }
-// break;
-//#endif
case MENUACTION_AUDIOHW:
if (m_nPrefsAudio3DProviderIndex == -1)
rightText = TheText.Get("FEA_NAH");
@@ -1338,29 +1286,24 @@ CMenuManager::Draw()
rightText = TheText.Get(CVehicle::m_bDisableMouseSteering ? "FEM_OFF" : "FEM_ON");
break;
#ifdef CUSTOM_FRONTEND_OPTIONS
- case MENUACTION_TRIGGERFUNC:
- FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu];
- if (m_nCurrScreen == option.screen && i == option.screenOptionOrder) {
- if (option.type == FEOPTION_SELECT) {
- // To whom manipulate option.value of static options externally (like RestoreDef functions)
- if (*option.value != option.lastSavedValue)
- option.displayedValue = option.lastSavedValue = *option.value;
-
- if (option.displayedValue >= option.numRightTexts || option.displayedValue < 0)
- option.displayedValue = 0;
-
- rightText = (wchar*)option.rightTexts[option.displayedValue];
-
- } else if (option.type == FEOPTION_DYNAMIC) {
- if (option.drawFunc) {
- rightText = option.drawFunc(&isOptionDisabled, m_nCurrOption == i);
- }
+ case MENUACTION_CFO_DYNAMIC:
+ case MENUACTION_CFO_SELECT:
+ CMenuScreenCustom::CMenuEntry &option = aScreens[m_nCurrScreen].m_aEntries[i];
+ if (option.m_Action == MENUACTION_CFO_SELECT) {
+ // To whom manipulate option.m_CFO->value of static options externally (like RestoreDef functions)
+ if (*option.m_CFO->value != option.m_CFOSelect->lastSavedValue)
+ option.m_CFOSelect->displayedValue = option.m_CFOSelect->lastSavedValue = *option.m_CFO->value;
+
+ if (option.m_CFOSelect->displayedValue >= option.m_CFOSelect->numRightTexts || option.m_CFOSelect->displayedValue < 0)
+ option.m_CFOSelect->displayedValue = 0;
+
+ rightText = TheText.Get(option.m_CFOSelect->rightTexts[option.m_CFOSelect->displayedValue]);
+
+ } else if (option.m_Action == MENUACTION_CFO_DYNAMIC) {
+ if (option.m_CFODynamic->drawFunc) {
+ rightText = option.m_CFODynamic->drawFunc(&isOptionDisabled, m_nCurrOption == i);
}
- } else {
- debug("A- screen:%d option:%d - totalCo: %d, coId: %d, coScreen:%d, coOption:%d\n", m_nCurrScreen, i, numCustomFrontendOptions, aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu, option.screen, option.screenOptionOrder);
- assert(0 && "Custom frontend options is borked");
}
-
break;
#endif
}
@@ -1471,12 +1414,6 @@ CMenuManager::Draw()
if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FED_RES") && m_nHelperTextMsgId == 1)
ResetHelperText();
}
-//#ifdef NO_ISLAND_LOADING
-// if (m_DisplayIslandLoading == m_PrefsIslandLoading) {
-// if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEM_ISL") && m_nHelperTextMsgId == 1)
-// ResetHelperText();
-// }
-//#endif
if (m_nPrefsAudio3DProviderIndex != DMAudio.GetCurrent3DProviderIndex()) {
if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEA_3DH"))
SetHelperText(1);
@@ -1485,12 +1422,6 @@ CMenuManager::Draw()
if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FED_RES"))
SetHelperText(1);
}
-//#ifdef NO_ISLAND_LOADING
-// if (m_DisplayIslandLoading != m_PrefsIslandLoading) {
-// if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEM_ISL"))
-// SetHelperText(1);
-// }
-//#endif
if (m_nPrefsAudio3DProviderIndex != DMAudio.GetCurrent3DProviderIndex()) {
if (strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEA_3DH") != 0
// To make assigning built-in actions to new custom options possible.
@@ -1575,13 +1506,9 @@ CMenuManager::Draw()
break;
#ifdef CUSTOM_FRONTEND_OPTIONS
default:
- if (m_nCurrScreen > lastOgScreen) {
- for (int i = 0; i < numCustomFrontendScreens; i++) {
- FrontendScreen& screen = customFrontendScreens[i];
- if (m_nCurrScreen == screen.id && screen.showLeftRightHelper) {
- DisplayHelperText();
- break;
- }
+ if (aScreens[m_nCurrScreen].layout) {
+ if (aScreens[m_nCurrScreen].layout->showLeftRightHelper) {
+ DisplayHelperText();
}
}
break;
@@ -2614,17 +2541,10 @@ CMenuManager::DrawFrontEndNormal()
break;
default:
#ifdef CUSTOM_FRONTEND_OPTIONS
- bool custom = m_nPrevScreen > lastOgScreen;
+ CCustomScreenLayout *custom = aScreens[m_nPrevScreen].layout;
if (custom) {
- for (int i = 0; i < numCustomFrontendScreens; i++) {
- FrontendScreen& screen = customFrontendScreens[i];
- if (m_nPrevScreen == screen.id) {
- previousSprite = screen.sprite;
- break;
- }
- if (i == numCustomFrontendScreens - 1)
- custom = false;
- }
+ previousSprite = custom->sprite;
+ break;
}
if (!custom)
#endif
@@ -2680,15 +2600,9 @@ CMenuManager::DrawFrontEndNormal()
break;
#ifdef CUSTOM_FRONTEND_OPTIONS
default:
- bool custom = m_nCurrScreen > lastOgScreen;
+ CCustomScreenLayout *custom = aScreens[m_nCurrScreen].layout;
if (custom) {
- for (int i = 0; i < numCustomFrontendScreens; i++) {
- FrontendScreen& screen = customFrontendScreens[i];
- if (m_nCurrScreen == screen.id) {
- currentSprite = screen.sprite;
- break;
- }
- }
+ previousSprite = custom->sprite;
}
break;
#endif
@@ -3303,10 +3217,6 @@ CMenuManager::InitialiseChangedLanguageSettings()
default:
break;
}
-
-#ifdef CUSTOM_FRONTEND_OPTIONS
- CustomFrontendOptionsPopulate();
-#endif
}
}
@@ -3496,6 +3406,9 @@ CMenuManager::LoadSettings()
strcpy(m_PrefsSkinFile, DEFAULT_SKIN_NAME);
strcpy(m_aSkinName, DEFAULT_SKIN_NAME);
}
+#ifdef LOAD_INI_SETTINGS
+ LoadINISettings(); // needs frontend options to be loaded
+#endif
}
void
@@ -4881,45 +4794,6 @@ CMenuManager::ProcessButtonPresses(void)
SaveSettings();
}
break;
-//#ifdef NO_ISLAND_LOADING
-// case MENUACTION_ISLANDLOADING:
-// if (m_DisplayIslandLoading != m_PrefsIslandLoading) {
-// if (!m_bGameNotLoaded) {
-// if (m_DisplayIslandLoading > ISLAND_LOADING_LOW) {
-// if (m_DisplayIslandLoading == ISLAND_LOADING_HIGH)
-// CStreaming::RemoveIslandsNotUsed(LEVEL_GENERIC);
-// if (m_PrefsIslandLoading == 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;
-// m_PrefsIslandLoading = m_DisplayIslandLoading;
-// CStreaming::RequestBigBuildings(CGame::currLevel);
-// } else if (m_PrefsIslandLoading == ISLAND_LOADING_HIGH) {
-// m_PrefsIslandLoading = m_DisplayIslandLoading;
-// CStreaming::RequestIslands(CGame::currLevel);
-// } else
-// m_PrefsIslandLoading = m_DisplayIslandLoading;
-// } else { // low
-// m_PrefsIslandLoading = m_DisplayIslandLoading;
-// CCollision::bAlreadyLoaded = false;
-// CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
-// CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
-// CStreaming::RemoveUnusedBuildings(CGame::currLevel);
-// CStreaming::RequestIslands(CGame::currLevel);
-// }
-//
-// CStreaming::LoadAllRequestedModels(true);
-// } else
-// m_PrefsIslandLoading = m_DisplayIslandLoading;
-// SetHelperText(0);
-// SaveSettings();
-// }
-// break;
-//#endif
case MENUACTION_AUDIOHW:
{
int selectedProvider = m_nPrefsAudio3DProviderIndex;
@@ -4994,40 +4868,6 @@ CMenuManager::ProcessButtonPresses(void)
RestoreDefGraphics(FEOPTION_ACTION_SELECT);
RestoreDefDisplay(FEOPTION_ACTION_SELECT);
#endif
-//#ifdef NO_ISLAND_LOADING
-// m_DisplayIslandLoading = ISLAND_LOADING_LOW;
-// if (!m_bGameNotLoaded) {
-// if (m_DisplayIslandLoading > ISLAND_LOADING_LOW) {
-// if (m_DisplayIslandLoading == ISLAND_LOADING_HIGH)
-// CStreaming::RemoveIslandsNotUsed(LEVEL_GENERIC);
-// if (m_PrefsIslandLoading == 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;
-// m_PrefsIslandLoading = m_DisplayIslandLoading;
-// CStreaming::RequestBigBuildings(CGame::currLevel);
-// } else if (m_PrefsIslandLoading == ISLAND_LOADING_HIGH) {
-// m_PrefsIslandLoading = m_DisplayIslandLoading;
-// CStreaming::RequestIslands(CGame::currLevel);
-// } else
-// m_PrefsIslandLoading = m_DisplayIslandLoading;
-// } else { // low
-// m_PrefsIslandLoading = m_DisplayIslandLoading;
-// CCollision::bAlreadyLoaded = false;
-// CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
-// CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
-// CStreaming::RemoveUnusedBuildings(CGame::currLevel);
-// CStreaming::RequestIslands(CGame::currLevel);
-// }
-//
-// CStreaming::LoadAllRequestedModels(true);
-// } else
-// m_PrefsIslandLoading = m_DisplayIslandLoading;
-//#endif // NO_ISLAND_LOADING
SaveSettings();
} else if ((m_nCurrScreen != MENUPAGE_SKIN_SELECT_OLD) && (m_nCurrScreen == MENUPAGE_CONTROLLER_PC)) {
ControlsManager.MakeControllerActionsBlank();
@@ -5088,29 +4928,28 @@ CMenuManager::ProcessButtonPresses(void)
return;
#endif
#ifdef CUSTOM_FRONTEND_OPTIONS
- case MENUACTION_TRIGGERFUNC:
- FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu];
- if (m_nCurrScreen == option.screen && m_nCurrOption == option.screenOptionOrder) {
- if (option.type == FEOPTION_SELECT) {
- if (!option.onlyApplyOnEnter) {
- option.displayedValue++;
- if (option.displayedValue >= option.numRightTexts || option.displayedValue < 0)
- option.displayedValue = 0;
- }
- option.changeFunc(option.displayedValue);
- *option.value = option.lastSavedValue = option.displayedValue;
-
- } else if (option.type == FEOPTION_DYNAMIC) {
- if (option.buttonPressFunc)
- option.buttonPressFunc(FEOPTION_ACTION_SELECT);
- } else if (option.type == FEOPTION_REDIRECT) {
- ChangeScreen(option.to, option.option, true, option.fadeIn);
- } else if (option.type == FEOPTION_GOBACK) {
- goBack = true;
+ case MENUACTION_CFO_SELECT:
+ case MENUACTION_CFO_DYNAMIC:
+ CMenuScreenCustom::CMenuEntry &option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption];
+ if (option.m_Action == MENUACTION_CFO_SELECT) {
+ if (!option.m_CFOSelect->onlyApplyOnEnter) {
+ option.m_CFOSelect->displayedValue++;
+ if (option.m_CFOSelect->displayedValue >= option.m_CFOSelect->numRightTexts || option.m_CFOSelect->displayedValue < 0)
+ option.m_CFOSelect->displayedValue = 0;
}
- } else {
- debug("B- screen:%d option:%d - totalCo: %d, coId: %d, coScreen:%d, coOption:%d\n", m_nCurrScreen, m_nCurrOption, numCustomFrontendOptions, aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu, option.screen, option.screenOptionOrder);
- assert(0 && "Custom frontend options are borked");
+ int8 oldValue = *option.m_CFO->value;
+
+ *option.m_CFO->value = option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue;
+
+ if (option.m_CFOSelect->save)
+ SaveSettings();
+
+ if (option.m_CFOSelect->displayedValue != oldValue && option.m_CFOSelect->changeFunc)
+ option.m_CFOSelect->changeFunc(oldValue, option.m_CFOSelect->displayedValue);
+
+ } else if (option.m_Action == MENUACTION_CFO_DYNAMIC) {
+ if (option.m_CFODynamic->buttonPressFunc)
+ option.m_CFODynamic->buttonPressFunc(FEOPTION_ACTION_SELECT);
}
break;
@@ -5118,14 +4957,6 @@ CMenuManager::ProcessButtonPresses(void)
}
}
ProcessOnOffMenuOptions();
-#ifdef CUSTOM_FRONTEND_OPTIONS
- if (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_SaveSlot == SAVESLOT_CFO) {
- FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu];
- if (option.type == FEOPTION_BUILTIN_ACTION && option.buttonPressFunc) {
- option.buttonPressFunc(FEOPTION_ACTION_SELECT);
- }
- }
-#endif
}
if (goBack) {
@@ -5296,15 +5127,6 @@ CMenuManager::ProcessButtonPresses(void)
}
}
break;
-//#ifdef NO_ISLAND_LOADING
-// case MENUACTION_ISLANDLOADING:
-// m_DisplayIslandLoading += changeValueBy;
-// if (m_DisplayIslandLoading > ISLAND_LOADING_HIGH)
-// m_DisplayIslandLoading = ISLAND_LOADING_LOW;
-// else if (m_DisplayIslandLoading < ISLAND_LOADING_LOW)
-// m_DisplayIslandLoading = ISLAND_LOADING_HIGH;
-// break;
-//#endif
case MENUACTION_AUDIOHW:
if (m_nPrefsAudio3DProviderIndex != -1) {
m_nPrefsAudio3DProviderIndex += changeValueBy;
@@ -5328,32 +5150,34 @@ CMenuManager::ProcessButtonPresses(void)
SaveSettings();
break;
#ifdef CUSTOM_FRONTEND_OPTIONS
- case MENUACTION_TRIGGERFUNC:
- FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu];
- if (m_nCurrScreen == option.screen && m_nCurrOption == option.screenOptionOrder) {
- if (option.type == FEOPTION_SELECT) {
- if (changeValueBy > 0) {
- option.displayedValue++;
- if (option.displayedValue >= option.numRightTexts)
- option.displayedValue = 0;
- } else {
- option.displayedValue--;
- if (option.displayedValue < 0)
- option.displayedValue = option.numRightTexts - 1;
- }
- if (!option.onlyApplyOnEnter) {
- option.changeFunc(option.displayedValue);
- *option.value = option.lastSavedValue = option.displayedValue;
- }
- } else if (option.type == FEOPTION_DYNAMIC && option.buttonPressFunc) {
- option.buttonPressFunc(changeValueBy > 0 ? FEOPTION_ACTION_RIGHT : FEOPTION_ACTION_LEFT);
+ case MENUACTION_CFO_SELECT:
+ case MENUACTION_CFO_DYNAMIC:
+ CMenuScreenCustom::CMenuEntry &option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption];
+ if (option.m_Action == MENUACTION_CFO_SELECT) {
+ if (changeValueBy > 0) {
+ option.m_CFOSelect->displayedValue++;
+ if (option.m_CFOSelect->displayedValue >= option.m_CFOSelect->numRightTexts)
+ option.m_CFOSelect->displayedValue = 0;
+ } else {
+ option.m_CFOSelect->displayedValue--;
+ if (option.m_CFOSelect->displayedValue < 0)
+ option.m_CFOSelect->displayedValue = option.m_CFOSelect->numRightTexts - 1;
}
- DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
- }
- else {
- debug("C- screen:%d option:%d - totalCo: %d, coId: %d, coScreen:%d, coOption:%d\n", m_nCurrScreen, m_nCurrOption, numCustomFrontendOptions, aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu, option.screen, option.screenOptionOrder);
- assert(0 && "Custom frontend options are borked");
+ if (!option.m_CFOSelect->onlyApplyOnEnter) {
+ int8 oldValue = *option.m_CFO->value;
+
+ *option.m_CFO->value = option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue;
+
+ if (option.m_CFOSelect->save)
+ SaveSettings();
+
+ if (option.m_CFOSelect->displayedValue != oldValue && option.m_CFOSelect->changeFunc)
+ option.m_CFOSelect->changeFunc(oldValue, option.m_CFOSelect->displayedValue);
+ }
+ } else if (option.m_Action == MENUACTION_CFO_DYNAMIC && option.m_CFODynamic->buttonPressFunc) {
+ option.m_CFODynamic->buttonPressFunc(changeValueBy > 0 ? FEOPTION_ACTION_RIGHT : FEOPTION_ACTION_LEFT);
}
+ DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
break;
#endif
diff --git a/src/core/Frontend.h b/src/core/Frontend.h
index 848148e7..fba98690 100644
--- a/src/core/Frontend.h
+++ b/src/core/Frontend.h
@@ -156,9 +156,6 @@ enum eSaveSlot
SAVESLOT_7,
SAVESLOT_8,
SAVESLOT_LABEL = 36,
-#ifdef CUSTOM_FRONTEND_OPTIONS
- SAVESLOT_CFO
-#endif
};
#ifdef MENU_MAP
@@ -239,18 +236,31 @@ enum eMenuScreen
MENUPAGE_MOUSE_CONTROLS = 56,
MENUPAGE_MISSION_RETRY = 57,
#ifdef MENU_MAP
- MENUPAGE_MAP,
+ MENUPAGE_MAP = 58,
#endif
- MENUPAGE_UNK, // 58 in game. Map page is added above, because last screen in CMenuScreens should always be empty to make CFO work
#ifdef CUSTOM_FRONTEND_OPTIONS
- MENUPAGES = 65 // for some room to add more screen
+
+#ifdef GRAPHICS_MENU_OPTIONS
+ MENUPAGE_GRAPHICS_SETTINGS,
#else
- MENUPAGES
+ MENUPAGE_ADVANCED_DISPLAY_SETTINGS,
+#endif
+#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
+ MENUPAGE_DETECT_JOYSTICK,
#endif
+
+#endif
+ MENUPAGE_UNK, // originally 58. Custom screens are inserted above, because last screen in CMenuScreens should always be empty to make CFO work
+ MENUPAGES
+
};
enum eMenuAction
{
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ MENUACTION_CFO_SELECT = -2,
+ MENUACTION_CFO_DYNAMIC = -1,
+#endif
MENUACTION_NOTHING,
MENUACTION_LABEL,
MENUACTION_CHANGEMENU,
@@ -370,12 +380,6 @@ enum eMenuAction
// MENUACTION_MIPMAPS,
// MENUACTION_TEXTURE_FILTERING,
//#endif
-//#ifdef NO_ISLAND_LOADING
-// MENUACTION_ISLANDLOADING,
-//#endif
-#ifdef CUSTOM_FRONTEND_OPTIONS
- MENUACTION_TRIGGERFUNC
-#endif
};
enum eCheckHover
@@ -458,6 +462,7 @@ struct BottomBarOption
int32 screenId;
};
+#ifndef CUSTOM_FRONTEND_OPTIONS
struct CMenuScreen
{
char m_ScreenName[8];
@@ -470,9 +475,91 @@ struct CMenuScreen
int32 m_Action; // eMenuAction
char m_EntryName[8];
int32 m_SaveSlot; // eSaveSlot
- int32 m_TargetMenu; // eMenuScreen // FrontendOption ID if it's a custom option
+ int32 m_TargetMenu; // eMenuScreen
} m_aEntries[NUM_MENUROWS];
};
+extern CMenuScreen aScreens[MENUPAGES];
+#else
+#include "frontendoption.h"
+struct CCustomScreenLayout {
+ eMenuSprites sprite;
+ int columnWidth;
+ int headerHeight;
+ int lineHeight;
+ int8 font;
+ int8 alignment;
+ bool showLeftRightHelper;
+ float fontScaleX;
+ float fontScaleY;
+};
+
+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[2]; // 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
+ };
+ } m_aEntries[NUM_MENUROWS];
+};
+extern CMenuScreenCustom aScreens[MENUPAGES];
+#endif
class CMenuManager
{
@@ -628,7 +715,6 @@ public:
ISLAND_LOADING_HIGH
};
- static int8 m_DisplayIslandLoading;
static int8 m_PrefsIslandLoading;
#define ISLAND_LOADING_IS(p) if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_##p)
@@ -703,6 +789,5 @@ VALIDATE_SIZE(CMenuManager, 0x564);
#endif
extern CMenuManager FrontEndMenuManager;
-extern CMenuScreen aScreens[MENUPAGES];
-#endif \ No newline at end of file
+#endif
diff --git a/src/core/Frontend_PS2.cpp b/src/core/Frontend_PS2.cpp
index d474ee65..824f342b 100644
--- a/src/core/Frontend_PS2.cpp
+++ b/src/core/Frontend_PS2.cpp
@@ -22,7 +22,7 @@
#include "Game.h"
#include "World.h"
#include "PlayerInfo.h"
-#include "FrontendControls.h"
+#include "FrontEndControls.h"
#include "MemoryCard.h"
#define CRect_SZ(x, y, w, h) CRect(x, y, x+w, y+h)
@@ -203,20 +203,6 @@ static const char* FrontendFilenames[][2] =
{"fe_radio9", "" },
};
-#ifdef CUTSCENE_BORDERS_SWITCH
-bool CMenuManager::m_PrefsCutsceneBorders = true;
-#endif
-
-#ifdef MULTISAMPLING
-int8 CMenuManager::m_nPrefsMSAALevel = 0;
-int8 CMenuManager::m_nDisplayMSAALevel = 0;
-#endif
-
-#ifdef NO_ISLAND_LOADING
-int8 CMenuManager::m_DisplayIslandLoading = ISLAND_LOADING_LOW;
-int8 CMenuManager::m_PrefsIslandLoading = ISLAND_LOADING_LOW;
-#endif
-
int32 CMenuManager::m_PrefsSfxVolume = 102;
int32 CMenuManager::m_PrefsMusicVolume = 102;
int32 CMenuManager::m_PrefsBrightness = 256;
@@ -3044,4 +3030,4 @@ CMenuManager::FilterOutColorMarkersFromString(wchar *string, CRGBA &color)
*dst = '\0';
}
-#endif \ No newline at end of file
+#endif
diff --git a/src/core/Frontend_PS2.h b/src/core/Frontend_PS2.h
index c1e42291..4bab7df9 100644
--- a/src/core/Frontend_PS2.h
+++ b/src/core/Frontend_PS2.h
@@ -160,31 +160,9 @@ public:
static int32 m_PrefsLanguage;
static CONTRCONFIG m_PrefsControllerConfig;
static bool m_PrefsUseVibration;
-#ifdef NO_ISLAND_LOADING
- enum
- {
- ISLAND_LOADING_LOW = 0,
- ISLAND_LOADING_MEDIUM,
- ISLAND_LOADING_HIGH
- };
-
- static int8 m_DisplayIslandLoading;
- static int8 m_PrefsIslandLoading;
-#define ISLAND_LOADING_IS(p) if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_##p)
-#define ISLAND_LOADING_ISNT(p) if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_##p)
-#else
#define ISLAND_LOADING_IS(p)
#define ISLAND_LOADING_ISNT(p)
-#endif
-#ifdef CUTSCENE_BORDERS_SWITCH
- static bool m_PrefsCutsceneBorders;
-#endif
-#ifdef MULTISAMPLING
- static int8 m_nPrefsMSAALevel;
- static int8 m_nDisplayMSAALevel;
-#endif
-
#ifdef GTA_PC
bool m_bQuitGameNoCD;
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index ef4800c5..83c75d91 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -86,7 +86,6 @@
#include "ZoneCull.h"
#include "Zones.h"
#include "debugmenu.h"
-#include "frontendoption.h"
#include "postfx.h"
#include "custompipes.h"
#include "crossplatform.h"
@@ -314,16 +313,6 @@ bool CGame::InitialiseOnceAfterRW(void)
DMAudio.SetMusicFadeVol(127);
CWorld::Players[0].SetPlayerSkin(CMenuManager::m_PrefsSkinFile);
-#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
-#ifdef LOAD_INI_SETTINGS
- LoadINISettings(); // needs frontend options to be loaded
-#endif
return true;
}
diff --git a/src/core/MenuScreens.cpp b/src/core/MenuScreens.cpp
index 533fc755..9eff09e6 100644
--- a/src/core/MenuScreens.cpp
+++ b/src/core/MenuScreens.cpp
@@ -2,8 +2,10 @@
#include "Frontend.h"
#ifdef PC_MENU
-// If you want to add new options, please don't do that here and see CustomFrontendOptionsPopulate in re3.cpp.
+// Please don't touch this file, except for bug fixing or ports.
+// Check MenuScreensCustom.cpp
+#ifndef CUSTOM_FRONTEND_OPTIONS
CMenuScreen aScreens[MENUPAGES] = {
// MENUPAGE_NONE = 0
{ "", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, },
@@ -390,6 +392,9 @@ CMenuScreen aScreens[MENUPAGES] = {
{ "FET_PAU", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_RESUME, "FEM_RES", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CHANGEMENU, "FEN_STA", SAVESLOT_NONE, MENUPAGE_NEW_GAME,
+#ifdef MENU_MAP
+ MENUACTION_CHANGEMENU, "FEG_MAP", SAVESLOT_NONE, MENUPAGE_MAP,
+#endif
MENUACTION_CHANGEMENU, "FEP_STA", SAVESLOT_NONE, MENUPAGE_STATS,
MENUACTION_CHANGEMENU, "FEP_BRI", SAVESLOT_NONE, MENUPAGE_BRIEFS,
MENUACTION_CHANGEMENU, "FET_OPT", SAVESLOT_NONE, MENUPAGE_OPTIONS,
@@ -436,10 +441,10 @@ CMenuScreen aScreens[MENUPAGES] = {
#ifdef MENU_MAP
// MENUPAGE_MAP
- { "FEG_MAP", 1, MENUPAGE_NONE, MENUPAGE_NONE, 5, 2,
+ { "FEG_MAP", 1, MENUPAGE_NONE, MENUPAGE_NONE, 2, 2,
MENUACTION_UNK110, "", SAVESLOT_NONE, MENUPAGE_NONE, // to prevent cross/enter to go back
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
- },
+ },
#endif
// MENUPAGE_UNK
@@ -449,4 +454,5 @@ CMenuScreen aScreens[MENUPAGES] = {
};
-#endif \ No newline at end of file
+#endif
+#endif
diff --git a/src/core/MenuScreensCustom.cpp b/src/core/MenuScreensCustom.cpp
new file mode 100644
index 00000000..b92d5325
--- /dev/null
+++ b/src/core/MenuScreensCustom.cpp
@@ -0,0 +1,870 @@
+#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"
+
+// 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) },
+#else
+ #define VIDEOMODE_SELECTOR
+#endif
+
+#ifdef MULTISAMPLING
+ #define MULTISAMPLING_SELECTOR MENUACTION_CFO_DYNAMIC, "FED_AAS", { new CCFODynamic((int8*)&FrontEndMenuManager.m_nPrefsMSAALevel, "MultiSampling", MultiSamplingDraw, MultiSamplingButtonPress) },
+#else
+ #define MULTISAMPLING_SELECTOR
+#endif
+
+#ifdef CUTSCENE_BORDERS_SWITCH
+ #define CUTSCENE_BORDERS_TOGGLE MENUACTION_CFO_SELECT, "FEM_CSB", { new CCFOSelect((int8 *)&CMenuManager::m_PrefsCutsceneBorders, "CutsceneBorders", off_on, 2, false, nil) },
+#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) },
+#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) },
+#else
+ #define DUALPASS_SELECTOR
+#endif
+
+#ifdef NO_ISLAND_LOADING
+ #define ISLAND_LOADING_SELECTOR MENUACTION_CFO_SELECT, "FEM_ISL", { new CCFOSelect((int8*)&CMenuManager::m_PrefsIslandLoading, "IslandLoading", islandLoadingOpts, ARRAY_SIZE(islandLoadingOpts), true, IslandLoadingAfterChange) },
+#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) }, \
+ MENUACTION_CFO_SELECT, "FED_MBL", { new CCFOSelect((int8*)&CPostFX::MotionBlurOn, "MotionBlur", off_on, 2, false, nil) },
+#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) }, \
+ MENUACTION_CFO_SELECT, "FED_PRM", { new CCFOSelect((int8*)&CustomPipes::RimlightEnable, "NeoRimLight", off_on, 2, false, nil) }, \
+ MENUACTION_CFO_SELECT, "FED_WLM", { new CCFOSelect((int8*)&CustomPipes::LightmapEnable, "NeoLightMaps", off_on, 2, false, nil) }, \
+ MENUACTION_CFO_SELECT, "FED_RGL", { new CCFOSelect((int8*)&CustomPipes::GlossEnable, "NeoRoadGloss", off_on, 2, false, nil) },
+#else
+ #define PIPELINES_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
+ CMenuManager::m_PrefsFrameLimiter = true;
+ CMenuManager::m_PrefsVsyncDisp = true;
+ CMenuManager::m_PrefsVsync = true;
+ CMenuManager::m_PrefsUseWideScreen = false;
+ FrontEndMenuManager.m_nDisplayVideoMode = FrontEndMenuManager.m_nPrefsVideoMode;
+ #ifdef GTA3_1_1_PATCH
+ if (_dwOperatingSystemVersion == OS_WIN98) {
+ CMBlur::BlurOn = false;
+ CMBlur::MotionBlurClose();
+ } else {
+ CMBlur::BlurOn = true;
+ CMBlur::MotionBlurOpen(Scene.camera);
+ }
+ #else
+ CMBlur::BlurOn = true;
+ #endif
+ FrontEndMenuManager.SaveSettings();
+ #endif
+}
+
+void RestoreDefDisplay(int8 action) {
+ if (action != FEOPTION_ACTION_SELECT)
+ return;
+
+ #ifdef CUTSCENE_BORDERS_SWITCH
+ CMenuManager::m_PrefsCutsceneBorders = true;
+ #endif
+ #ifdef FREE_CAM
+ TheCamera.bFreeCam = false;
+ #endif
+ #ifdef GRAPHICS_MENU_OPTIONS // otherwise Frontend will handle those
+ CMenuManager::m_PrefsBrightness = 256;
+ CMenuManager::m_PrefsLOD = 1.2f;
+ CRenderer::ms_lodDistScale = 1.2f;
+ CMenuManager::m_PrefsShowSubtitles = 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[MENUPAGES] = {
+ // MENUPAGE_NONE = 0
+ { "", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil, },
+
+ // MENUPAGE_STATS = 1
+ { "FET_STA", MENUPAGE_NONE, MENUPAGE_NONE, nil, nil,
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_NEW_GAME = 2
+ { "FET_SGA", MENUPAGE_NONE, MENUPAGE_NONE, nil, nil,
+ MENUACTION_CHANGEMENU, "FES_SNG", { nil, SAVESLOT_NONE, MENUPAGE_NEW_GAME_RELOAD },
+ MENUACTION_POPULATESLOTS_CHANGEMENU, "GMLOAD", { nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_LOAD_SLOT },
+ MENUACTION_POPULATESLOTS_CHANGEMENU, "FES_DGA", { nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT },
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_BRIEFS = 3
+ { "FET_BRE", MENUPAGE_NONE, MENUPAGE_NONE, nil, nil,
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_CONTROLLER_SETTINGS = 4
+ { "FET_CON", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, nil, nil,
+ MENUACTION_CTRLCONFIG, "FEC_CCF", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS },
+ MENUACTION_CTRLDISPLAY, "FEC_CDP", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS },
+ MENUACTION_CTRLVIBRATION, "FEC_VIB", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS },
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_SOUND_SETTINGS = 5
+ { "FET_AUD", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, nil, nil,
+ MENUACTION_MUSICVOLUME, "FEA_MUS", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
+ MENUACTION_SFXVOLUME, "FEA_SFX", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
+ MENUACTION_AUDIOHW, "FEA_3DH", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
+ MENUACTION_SPEAKERCONF, "FEA_SPK", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
+ MENUACTION_DYNAMICACOUSTIC, "FET_DAM", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
+ MENUACTION_RADIO, "FEA_RSS", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
+ MENUACTION_RESTOREDEF, "FET_DEF", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+#ifndef GRAPHICS_MENU_OPTIONS
+ // MENUPAGE_DISPLAY_SETTINGS = 6
+ { "FET_DIS", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, nil, nil,
+ MENUACTION_BRIGHTNESS, "FED_BRI", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
+ MENUACTION_DRAWDIST, "FEM_LOD", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
+ MENUACTION_FRAMESYNC, "FEM_VSC", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
+ MENUACTION_FRAMELIMIT, "FEM_FRM", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
+#ifndef EXTENDED_COLOURFILTER
+ MENUACTION_TRAILS, "FED_TRA", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
+#endif
+ MENUACTION_SUBTITLES, "FED_SUB", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
+ MENUACTION_WIDESCREEN, "FED_WIS", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
+ MENUACTION_SCREENRES, "FED_RES", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
+ VIDEOMODE_SELECTOR
+ MULTISAMPLING_SELECTOR
+ MENUACTION_CHANGEMENU, "FET_ADV", { nil, SAVESLOT_NONE, MENUPAGE_ADVANCED_DISPLAY_SETTINGS },
+ MENUACTION_RESTOREDEF, "FET_DEF", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+#else
+ // MENUPAGE_DISPLAY_SETTINGS = 6
+ { "FET_DIS", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, nil, nil,
+ MENUACTION_BRIGHTNESS, "FED_BRI", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
+ MENUACTION_DRAWDIST, "FEM_LOD", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
+ CUTSCENE_BORDERS_TOGGLE
+ FREE_CAM_TOGGLE
+ MENUACTION_SUBTITLES, "FED_SUB", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
+ MENUACTION_CFO_DYNAMIC, "FET_DEF", { new CCFODynamic(nil, nil, nil, RestoreDefDisplay) },
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+#endif
+
+ // MENUPAGE_LANGUAGE_SETTINGS = 7
+ { "FET_LAN", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, nil, nil,
+ MENUACTION_LANG_ENG, "FEL_ENG", { nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS },
+ MENUACTION_LANG_FRE, "FEL_FRE", { nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS },
+ MENUACTION_LANG_GER, "FEL_GER", { nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS },
+ MENUACTION_LANG_ITA, "FEL_ITA", { nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS },
+ MENUACTION_LANG_SPA, "FEL_SPA", { nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS },
+#ifdef MORE_LANGUAGES
+ MENUACTION_CFO_DYNAMIC, "FEL_POL", { new CCFODynamic(nil, nil, nil, LangPolSelect) },
+ MENUACTION_CFO_DYNAMIC, "FEL_RUS", { new CCFODynamic(nil, nil, nil, LangRusSelect) },
+ MENUACTION_CFO_DYNAMIC, "FEL_JAP", { new CCFODynamic(nil, nil, nil, LangJapSelect) },
+#endif
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_CHOOSE_LOAD_SLOT = 8
+ { "FET_LG", MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, nil, nil,
+ MENUACTION_CHANGEMENU, "FESZ_CA", { nil, SAVESLOT_NONE, MENUPAGE_NEW_GAME },
+ MENUACTION_CHECKSAVE, "FEM_SL0", { nil, SAVESLOT_1, MENUPAGE_LOAD_SLOT_CONFIRM },
+ MENUACTION_CHECKSAVE, "FEM_SL1", { nil, SAVESLOT_2, MENUPAGE_LOAD_SLOT_CONFIRM },
+ MENUACTION_CHECKSAVE, "FEM_SL2", { nil, SAVESLOT_3, MENUPAGE_LOAD_SLOT_CONFIRM },
+ MENUACTION_CHECKSAVE, "FEM_SL3", { nil, SAVESLOT_4, MENUPAGE_LOAD_SLOT_CONFIRM },
+ MENUACTION_CHECKSAVE, "FEM_SL4", { nil, SAVESLOT_5, MENUPAGE_LOAD_SLOT_CONFIRM },
+ MENUACTION_CHECKSAVE, "FEM_SL5", { nil, SAVESLOT_6, MENUPAGE_LOAD_SLOT_CONFIRM },
+ MENUACTION_CHECKSAVE, "FEM_SL6", { nil, SAVESLOT_7, MENUPAGE_LOAD_SLOT_CONFIRM },
+ MENUACTION_CHECKSAVE, "FEM_SL7", { nil, SAVESLOT_8, MENUPAGE_LOAD_SLOT_CONFIRM },
+ },
+
+ // MENUPAGE_CHOOSE_DELETE_SLOT = 9
+ { "FET_DG", MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, nil, nil,
+ MENUACTION_CHANGEMENU, "FESZ_CA", { nil, SAVESLOT_NONE, MENUPAGE_NEW_GAME },
+ MENUACTION_CHANGEMENU, "FEM_SL0", { nil, SAVESLOT_1, MENUPAGE_DELETE_SLOT_CONFIRM },
+ MENUACTION_CHANGEMENU, "FEM_SL1", { nil, SAVESLOT_2, MENUPAGE_DELETE_SLOT_CONFIRM },
+ MENUACTION_CHANGEMENU, "FEM_SL2", { nil, SAVESLOT_3, MENUPAGE_DELETE_SLOT_CONFIRM },
+ MENUACTION_CHANGEMENU, "FEM_SL3", { nil, SAVESLOT_4, MENUPAGE_DELETE_SLOT_CONFIRM },
+ MENUACTION_CHANGEMENU, "FEM_SL4", { nil, SAVESLOT_5, MENUPAGE_DELETE_SLOT_CONFIRM },
+ MENUACTION_CHANGEMENU, "FEM_SL5", { nil, SAVESLOT_6, MENUPAGE_DELETE_SLOT_CONFIRM },
+ MENUACTION_CHANGEMENU, "FEM_SL6", { nil, SAVESLOT_7, MENUPAGE_DELETE_SLOT_CONFIRM },
+ MENUACTION_CHANGEMENU, "FEM_SL7", { nil, SAVESLOT_8, MENUPAGE_DELETE_SLOT_CONFIRM },
+ },
+
+ // MENUPAGE_NEW_GAME_RELOAD = 10
+ { "FET_NG", MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, nil, nil,
+ MENUACTION_LABEL, "FESZ_QR", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_CHANGEMENU, "FEM_NO", { nil, SAVESLOT_NONE, MENUPAGE_NEW_GAME },
+ MENUACTION_NEWGAME, "FEM_YES", { nil, SAVESLOT_NONE, MENUPAGE_NEW_GAME_RELOAD },
+ },
+
+ // MENUPAGE_LOAD_SLOT_CONFIRM = 11
+ { "FET_LG", MENUPAGE_CHOOSE_LOAD_SLOT, MENUPAGE_CHOOSE_LOAD_SLOT, nil, nil,
+ MENUACTION_LABEL, "FESZ_QL", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_CHANGEMENU, "FEM_NO", { nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_LOAD_SLOT },
+ MENUACTION_CHANGEMENU, "FEM_YES", { nil, SAVESLOT_NONE, MENUPAGE_LOADING_IN_PROGRESS },
+ },
+
+ // MENUPAGE_DELETE_SLOT_CONFIRM = 12
+ { "FET_DG", MENUPAGE_CHOOSE_DELETE_SLOT, MENUPAGE_CHOOSE_DELETE_SLOT, nil, nil,
+ MENUACTION_LABEL, "FESZ_QD", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_CHANGEMENU, "FEM_NO", { nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT },
+ MENUACTION_CHANGEMENU, "FEM_YES", { nil, SAVESLOT_NONE, MENUPAGE_DELETING },
+ },
+
+ // MENUPAGE_NO_MEMORY_CARD = 13
+ { "FES_NOC", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+ // hud adjustment page in mobile
+ },
+
+ // MENUPAGE_LOADING_IN_PROGRESS = 14
+ { "FET_LG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+ MENUACTION_LABEL, "FED_LDW", { nil, SAVESLOT_NONE, MENUPAGE_LOAD_SLOT_CONFIRM },
+ },
+
+ // MENUPAGE_DELETING_IN_PROGRESS = 15
+ { "FET_DG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+ MENUACTION_LABEL, "FEDL_WR", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_PS2_LOAD_FAILED = 16
+ { "FET_LG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+ MENUACTION_LABEL, "FES_LOE", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_DELETE_FAILED = 17
+ { "FET_DG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+ MENUACTION_LABEL, "FES_DEE", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_CHANGEMENU, "FEC_OKK", { nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT },
+ },
+
+ // MENUPAGE_DEBUG_MENU = 18
+ { "FED_DBG", MENUPAGE_NONE, MENUPAGE_NONE, nil, nil,
+ MENUACTION_RELOADIDE, "FED_RID", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_RELOADIPL, "FED_RIP", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_SETDBGFLAG, "FED_DFL", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_SWITCHBIGWHITEDEBUGLIGHT, "FED_DLS", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_PEDROADGROUPS, "FED_SPR", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_CARROADGROUPS, "FED_SCR", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_COLLISIONPOLYS, "FED_SCP", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_PARSEHEAP, "FED_PAH", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_SHOWCULL, "FED_SCZ", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_DEBUGSTREAM, "FED_DSR", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_MEMORY_CARD_DEBUG = 19
+ { "FEM_MCM", MENUPAGE_NONE, MENUPAGE_NONE, nil, nil,
+ MENUACTION_REGMEMCARD1, "FEM_RMC", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_TESTFORMATMEMCARD1, "FEM_TFM", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_TESTUNFORMATMEMCARD1, "FEM_TUM", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_CREATEROOTDIR, "FEM_CRD", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_CREATELOADICONS, "FEM_CLI", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_FILLWITHGUFF, "FEM_FFF", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_SAVEONLYTHEGAME, "FEM_SOG", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_SAVEGAME, "FEM_STG", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_SAVEGAMEUNDERGTA, "FEM_STS", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_CREATECOPYPROTECTED, "FEM_CPD", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_MEMORY_CARD_TEST = 20
+ { "FEM_MC2", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+
+ },
+
+ // MENUPAGE_MULTIPLAYER_MAIN = 21
+ { "FET_MP", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+
+ },
+
+ // MENUPAGE_PS2_SAVE_FAILED = 22
+ { "MCDNSP", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+ MENUACTION_MEMCARDSAVECONFIRM, "JAILB_U", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_PS2_SAVE_FAILED_2 = 23
+ { "MCGNSP", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+ MENUACTION_MEMCARDSAVECONFIRM, "JAILB_U", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // Unused in PC but anyway
+ // MENUPAGE_SAVE = 24
+#ifdef PS2_SAVE_DIALOG
+ { "FET_SG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+ MENUACTION_CHANGEMENU, "FESZ_SA", { nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT },
+ MENUACTION_RESUME_FROM_SAVEZONE, "FESZ_CA", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+#else
+ { "FET_SG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+ MENUACTION_LABEL, "FES_SCG", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_POPULATESLOTS_CHANGEMENU, "GMSAVE", { nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT },
+ MENUACTION_RESUME_FROM_SAVEZONE, "FESZ_CA", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+#endif
+
+ // MENUPAGE_NO_MEMORY_CARD_2 = 25
+ { "FES_NOC", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+ MENUACTION_CHANGEMENU, "FESZ_CA", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_CHOOSE_SAVE_SLOT = 26
+ { "FET_SG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+ MENUACTION_RESUME_FROM_SAVEZONE, "FESZ_CA", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_CHANGEMENU, "FEM_SL1", { nil, SAVESLOT_1, MENUPAGE_SAVE_OVERWRITE_CONFIRM },
+ MENUACTION_CHANGEMENU, "FEM_SL2", { nil, SAVESLOT_2, MENUPAGE_SAVE_OVERWRITE_CONFIRM },
+ MENUACTION_CHANGEMENU, "FEM_SL3", { nil, SAVESLOT_3, MENUPAGE_SAVE_OVERWRITE_CONFIRM },
+ MENUACTION_CHANGEMENU, "FEM_SL4", { nil, SAVESLOT_4, MENUPAGE_SAVE_OVERWRITE_CONFIRM },
+ MENUACTION_CHANGEMENU, "FEM_SL5", { nil, SAVESLOT_5, MENUPAGE_SAVE_OVERWRITE_CONFIRM },
+ MENUACTION_CHANGEMENU, "FEM_SL6", { nil, SAVESLOT_6, MENUPAGE_SAVE_OVERWRITE_CONFIRM },
+ MENUACTION_CHANGEMENU, "FEM_SL7", { nil, SAVESLOT_7, MENUPAGE_SAVE_OVERWRITE_CONFIRM },
+ MENUACTION_CHANGEMENU, "FEM_SL8", { nil, SAVESLOT_8, MENUPAGE_SAVE_OVERWRITE_CONFIRM },
+ },
+
+ // MENUPAGE_SAVE_OVERWRITE_CONFIRM = 27
+ { "FET_SG", MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, nil, nil,
+ MENUACTION_LABEL, "FESZ_QO", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_CHANGEMENU, "FEM_YES", { nil, SAVESLOT_NONE, MENUPAGE_SAVING_IN_PROGRESS },
+ MENUACTION_CHANGEMENU, "FEM_NO", { nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT },
+ },
+
+ // MENUPAGE_MULTIPLAYER_MAP = 28
+ { "FET_MAP", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+
+ },
+
+ // MENUPAGE_MULTIPLAYER_CONNECTION = 29
+ { "FET_CON", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+
+ },
+
+ // MENUPAGE_MULTIPLAYER_FIND_GAME = 30
+ { "FET_FG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+
+ },
+
+ // MENUPAGE_MULTIPLAYER_MODE = 31
+ { "FET_GT", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+
+ },
+
+ // MENUPAGE_MULTIPLAYER_CREATE = 32
+ { "FET_HG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+
+ },
+
+ // MENUPAGE_MULTIPLAYER_START = 33
+ { "FEN_STA", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+
+ },
+
+ // MENUPAGE_SKIN_SELECT_OLD = 34
+ { "FET_PS", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+
+ },
+
+ // MENUPAGE_CONTROLLER_PC = 35
+ { "FET_CTL", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, nil, nil,
+ MENUACTION_CTRLMETHOD, "FET_CME", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC },
+ MENUACTION_KEYBOARDCTRLS,"FET_RDK", { nil, SAVESLOT_NONE, MENUPAGE_KEYBOARD_CONTROLS },
+#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
+ MENUACTION_CHANGEMENU, "FEC_JOD", { nil, SAVESLOT_NONE, MENUPAGE_DETECT_JOYSTICK },
+#endif
+ MENUACTION_CHANGEMENU, "FET_AMS", { nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS },
+ MENUACTION_RESTOREDEF, "FET_DEF", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC },
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_CONTROLLER_PC_OLD1 = 36
+ { "FET_CTL", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, nil, nil,
+ MENUACTION_GETKEY, "FEC_PLB", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1 },
+ MENUACTION_GETKEY, "FEC_CWL", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1 },
+ MENUACTION_GETKEY, "FEC_CWR", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1 },
+ MENUACTION_GETKEY, "FEC_LKT", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1 },
+ MENUACTION_GETKEY, "FEC_PJP", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1 },
+ MENUACTION_GETKEY, "FEC_PSP", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1 },
+ MENUACTION_GETKEY, "FEC_TLF", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1 },
+ MENUACTION_GETKEY, "FEC_TRG", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1 },
+ MENUACTION_GETKEY, "FEC_CCM", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1 },
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_CONTROLLER_PC_OLD2 = 37
+ { "FET_CTL", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, nil, nil,
+
+ },
+
+ // MENUPAGE_CONTROLLER_PC_OLD3 = 38
+ { "FET_CTL", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, nil, nil,
+ MENUACTION_GETKEY, "FEC_LUP", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD3 },
+ MENUACTION_GETKEY, "FEC_LDN", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD3 },
+ MENUACTION_GETKEY, "FEC_SMS", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD3 },
+ MENUACTION_SHOWHEADBOB, "FEC_GSL", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD3 },
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_CONTROLLER_PC_OLD4 = 39
+ { "FET_CTL", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, nil, nil,
+
+ },
+
+ // MENUPAGE_CONTROLLER_DEBUG = 40
+ { "FEC_DBG", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, nil, nil,
+ MENUACTION_GETKEY, "FEC_TGD", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_DEBUG },
+ MENUACTION_GETKEY, "FEC_TDO", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_DEBUG },
+ MENUACTION_GETKEY, "FEC_TSS", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_DEBUG },
+ MENUACTION_GETKEY, "FEC_SMS", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_DEBUG },
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_OPTIONS = 41
+ { "FET_OPT", MENUPAGE_NONE, MENUPAGE_NONE, nil, nil,
+ MENUACTION_CHANGEMENU, "FET_CTL", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC },
+ MENUACTION_LOADRADIO, "FET_AUD", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
+ MENUACTION_CHANGEMENU, "FET_DIS", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
+#ifdef GRAPHICS_MENU_OPTIONS
+ MENUACTION_CHANGEMENU, "FET_GRA", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS },
+#endif
+ MENUACTION_CHANGEMENU, "FET_LAN", { nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS },
+ MENUACTION_PLAYERSETUP, "FET_PSU", { nil, SAVESLOT_NONE, MENUPAGE_SKIN_SELECT },
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_EXIT = 42
+ { "FET_QG", MENUPAGE_NONE, MENUPAGE_NONE, nil, nil,
+ MENUACTION_LABEL, "FEQ_SRE", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_DONTCANCEL, "FEM_NO", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_CANCELGAME, "FEM_YES", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_SAVING_IN_PROGRESS = 43
+ { "", MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, nil, nil,
+ MENUACTION_LABEL, "FES_WAR", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_SAVE_SUCCESSFUL = 44
+ { "FET_SG", MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, nil, nil,
+ MENUACTION_LABEL, "FES_SSC", { nil, SAVESLOT_LABEL, MENUPAGE_NONE },
+ MENUACTION_RESUME_FROM_SAVEZONE, "FEC_OKK", { nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT },
+ },
+
+ // MENUPAGE_DELETING = 45
+ { "FET_DG", MENUPAGE_CHOOSE_DELETE_SLOT, MENUPAGE_CHOOSE_DELETE_SLOT, nil, nil,
+ MENUACTION_LABEL, "FED_DLW", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_DELETE_SUCCESS = 46
+ { "FET_DG", MENUPAGE_CHOOSE_DELETE_SLOT, MENUPAGE_CHOOSE_DELETE_SLOT, nil, nil,
+ MENUACTION_LABEL, "DEL_FNM", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_CHANGEMENU, "FEC_OKK", { nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT },
+ },
+
+ // MENUPAGE_SAVE_FAILED = 47
+ { "FET_SG", MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, nil, nil,
+ MENUACTION_LABEL, "FEC_SVU", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_CHANGEMENU, "FEC_OKK", { nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT },
+ },
+
+ // MENUPAGE_LOAD_FAILED = 48
+ { "FET_SG", MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, nil, nil,
+ MENUACTION_LABEL, "FEC_SVU", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_LOAD_FAILED_2 = 49
+ { "FET_LG", MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, nil, nil,
+ MENUACTION_LABEL, "FEC_LUN", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_CHOOSE_LOAD_SLOT },
+ },
+
+ // MENUPAGE_FILTER_GAME = 50
+ { "FIL_FLT", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+
+ },
+
+ // MENUPAGE_START_MENU = 51
+ { "FEM_MM", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+ MENUACTION_CHANGEMENU, "FEN_STA", { nil, SAVESLOT_NONE, MENUPAGE_NEW_GAME },
+ MENUACTION_CHANGEMENU, "FET_OPT", { nil, SAVESLOT_NONE, MENUPAGE_OPTIONS },
+ MENUACTION_CHANGEMENU, "FEM_QT", { nil, SAVESLOT_NONE, MENUPAGE_EXIT },
+ },
+
+ // MENUPAGE_PAUSE_MENU = 52
+ { "FET_PAU", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+ MENUACTION_RESUME, "FEM_RES", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_CHANGEMENU, "FEN_STA", { nil, SAVESLOT_NONE, MENUPAGE_NEW_GAME },
+#ifdef MENU_MAP
+ MENUACTION_CHANGEMENU, "FEG_MAP", { nil, SAVESLOT_NONE, MENUPAGE_MAP },
+#endif
+ MENUACTION_CHANGEMENU, "FEP_STA", { nil, SAVESLOT_NONE, MENUPAGE_STATS },
+ MENUACTION_CHANGEMENU, "FEP_BRI", { nil, SAVESLOT_NONE, MENUPAGE_BRIEFS },
+ MENUACTION_CHANGEMENU, "FET_OPT", { nil, SAVESLOT_NONE, MENUPAGE_OPTIONS },
+ MENUACTION_CHANGEMENU, "FEM_QT", { nil, SAVESLOT_NONE, MENUPAGE_EXIT },
+ },
+
+ // MENUPAGE_CHOOSE_MODE = 53
+ { "FEN_STA", MENUPAGE_NONE, MENUPAGE_NONE, nil, nil,
+ MENUACTION_CHANGEMENU, "FET_SP", { nil, SAVESLOT_NONE, MENUPAGE_NEW_GAME },
+ MENUACTION_INITMP, "FET_MP", { nil, SAVESLOT_NONE, MENUPAGE_MULTIPLAYER_MAIN },
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+
+ // MENUPAGE_SKIN_SELECT = 54
+ { "FET_PSU", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, nil, nil,
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_MULTIPLAYER_MAIN },
+ },
+
+ // MENUPAGE_KEYBOARD_CONTROLS = 55
+ { "FET_STI", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, nil, nil,
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC },
+ },
+
+ // MENUPAGE_MOUSE_CONTROLS = 56
+ { "FET_MTI", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, nil, nil,
+ MENUACTION_MOUSESENS, "FEC_MSH", { nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS },
+ MENUACTION_INVVERT, "FEC_IVV", { nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS },
+ MENUACTION_MOUSESTEER, "FET_MST", { nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS },
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+ // MENUPAGE_MISSION_RETRY = 57
+#ifdef MISSION_REPLAY
+
+ { "M_FAIL", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
+ MENUACTION_LABEL, "FESZ_RM", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_CHANGEMENU, "FEM_YES", { nil, SAVESLOT_NONE, MENUPAGE_LOADING_IN_PROGRESS },
+ MENUACTION_REJECT_RETRY, "FEM_NO", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+#else
+ { "", MENUPAGE_NONE, MENUPAGE_NONE, nil, nil,
+ // mission failed, wanna restart page in mobile
+ },
+#endif
+
+#ifdef MENU_MAP
+ // MENUPAGE_MAP
+ { "FEG_MAP", MENUPAGE_NONE, MENUPAGE_NONE, nil, nil,
+ MENUACTION_UNK110, "", { nil, SAVESLOT_NONE, MENUPAGE_NONE }, // to prevent cross/enter to go back
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+#endif
+
+#ifdef GRAPHICS_MENU_OPTIONS
+ // MENUPAGE_GRAPHICS_SETTINGS
+ { "FET_GRA", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS,
+ new CCustomScreenLayout({MENUSPRITE_MAINMENU, 50, 0, 20, FONT_HEADING, FESCREEN_LEFT_ALIGN, true, MEDIUMTEXT_X_SCALE, MEDIUMTEXT_Y_SCALE}), GraphicsGoBack,
+
+ MENUACTION_SCREENRES, "FED_RES", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS },
+ MENUACTION_WIDESCREEN, "FED_WIS", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS },
+ VIDEOMODE_SELECTOR
+ MENUACTION_FRAMESYNC, "FEM_VSC", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
+ MENUACTION_FRAMELIMIT, "FEM_FRM", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
+ MULTISAMPLING_SELECTOR
+#ifdef EXTENDED_COLOURFILTER
+ POSTFX_SELECTORS
+#else
+ MENUACTION_TRAILS, "FED_TRA", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
+#endif
+#ifdef EXTENDED_PIPELINES
+ PIPELINES_SELECTOR
+#endif
+ ISLAND_LOADING_SELECTOR
+ DUALPASS_SELECTOR
+ MENUACTION_CFO_DYNAMIC, "FET_DEF", { new CCFODynamic(nil, nil, nil, RestoreDefGraphics) },
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+#else
+ // MENUPAGE_ADVANCED_DISPLAY_SETTINGS
+ { "FET_ADV", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS,
+ new CCustomScreenLayout({MENUSPRITE_MAINMENU, 50, 0, 20, FONT_HEADING, FESCREEN_LEFT_ALIGN, true, MEDIUMTEXT_X_SCALE, MEDIUMTEXT_Y_SCALE}), nil,
+
+ ISLAND_LOADING_SELECTOR
+ DUALPASS_SELECTOR
+ CUTSCENE_BORDERS_TOGGLE
+ FREE_CAM_TOGGLE
+#ifdef EXTENDED_COLOURFILTER
+ POSTFX_SELECTORS
+#endif
+#ifdef EXTENDED_PIPELINES
+ PIPELINES_SELECTOR
+#endif
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+#endif
+
+#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
+ // MENUPAGE_DETECT_JOYSTICK
+ { "FEC_JOD", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC,
+ new CCustomScreenLayout({MENUSPRITE_MAINMENU, 40, 60, 20, FONT_BANK, FESCREEN_LEFT_ALIGN, false, MEDIUMTEXT_X_SCALE, MEDIUMTEXT_Y_SCALE}), nil,
+
+ MENUACTION_LABEL, "FEC_JPR", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ MENUACTION_CFO_DYNAMIC, "FEC_JDE", { new CCFODynamic(nil, nil, DetectJoystickDraw, nil) },
+ MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
+ },
+#endif
+
+ // MENUPAGE_UNK
+ { "", MENUPAGE_NONE, MENUPAGE_NONE, nil, nil,
+
+ },
+
+};
+
+#endif
+#endif
diff --git a/src/core/config.h b/src/core/config.h
index ea4330a4..a55b018e 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -212,10 +212,10 @@ enum Config {
# define TIMEBARS // print debug timers
#endif
-#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
#define MORE_LANGUAGES // Add more translations to the game
#define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible
-#define LOAD_INI_SETTINGS
+#define LOAD_INI_SETTINGS // as the name suggests. fundamental for CUSTOM_FRONTEND_OPTIONS
// Rendering/display
//#define EXTRA_MODEL_FLAGS // from mobile to optimize rendering
@@ -227,16 +227,10 @@ enum Config {
#define PS2_ALPHA_TEST // emulate ps2 alpha test
#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 NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU
//#define USE_TEXTURE_POOL
-#define CUTSCENE_BORDERS_SWITCH
+#ifdef LIBRW
//#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur)
//#define EXTENDED_PIPELINES // custom render pipelines (includes Neo)
-#define MULTISAMPLING // adds MSAA option
-
-#ifdef LIBRW
-// these are not supported with librw yet
-# undef MULTISAMPLING
#endif
// Particle
@@ -256,6 +250,7 @@ enum Config {
#define ALT_DODO_CHEAT
#define REGISTER_START_BUTTON
//#define BIND_VEHICLE_FIREWEAPON // Adds ability to rebind fire key for 'in vehicle' controls
+#define BUTTON_ICONS // use textures to show controller buttons
// Hud, frontend and radar
#define HUD_ENHANCEMENTS // Adjusts some aspects to make the HUD look/behave a little bit better.
@@ -274,7 +269,13 @@ enum Config {
//# define PS2_LIKE_MENU // An effort to recreate PS2 menu, cycling through tabs, different bg etc.
//# define PS2_SAVE_DIALOG // PS2 style save dialog with transparent black box
# define CUSTOM_FRONTEND_OPTIONS
-# define GRAPHICS_MENU_OPTIONS // otherwise Advanced Options menu will appear if Display is full
+
+# ifdef CUSTOM_FRONTEND_OPTIONS
+# define GRAPHICS_MENU_OPTIONS // otherwise Advanced Options menu will appear if Display is full
+# 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
+# endif
#endif
// Script
@@ -323,6 +324,8 @@ enum Config {
#endif
//#define PS2_AUDIO // changes audio paths for cutscenes and radio to PS2 paths, needs vbdec to support VB with MSS
+// IMG
+#define BIG_IMG // allows to read larger img files
//#define SQUEEZE_PERFORMANCE
#ifdef SQUEEZE_PERFORMANCE
@@ -331,3 +334,8 @@ enum Config {
#define PC_PARTICLE
#define VC_PED_PORTS // To not process collisions always. But should be tested if that's really beneficial
#endif
+
+#ifdef LIBRW
+// these are not supported with librw yet
+# undef MULTISAMPLING
+#endif
diff --git a/src/core/main.cpp b/src/core/main.cpp
index 1aa0a953..36c94043 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -64,6 +64,7 @@
#include "debugmenu.h"
#include "Clock.h"
#include "custompipes.h"
+#include "frontendoption.h"
GlobalScene Scene;
@@ -404,6 +405,13 @@ Initialise3D(void *param)
DebugMenuInit();
DebugMenuPopulate();
#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();
#ifdef EXTENDED_PIPELINES
CustomPipes::CustomPipeInit(); // need Scene.world for this
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index a06762f5..6bf5573e 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -1,7 +1,6 @@
#include <csignal>
#define WITHWINDOWS
#include "common.h"
-#include "platform.h"
#include "crossplatform.h"
#include "Renderer.h"
#include "Credits.h"
@@ -16,7 +15,6 @@
#include "Boat.h"
#include "Heli.h"
#include "Automobile.h"
-#include "Ped.h"
#include "Console.h"
#include "Debug.h"
#include "Hud.h"
@@ -26,10 +24,8 @@
#include "Radar.h"
#include "debugmenu.h"
#include "Frontend.h"
-#include "Text.h"
#include "WaterLevel.h"
#include "main.h"
-#include "MBlur.h"
#include "postfx.h"
#include "custompipes.h"
@@ -76,388 +72,59 @@ mysrand(unsigned int seed)
#ifdef CUSTOM_FRONTEND_OPTIONS
#include "frontendoption.h"
-#include "Font.h"
-void ReloadFrontendOptions(void)
+void
+CustomFrontendOptionsPopulate(void)
{
- CustomFrontendOptionsPopulate();
+ // Moved to an array in MenuScreensCustom.cpp, but APIs are still available. see frontendoption.h
}
-
-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 GRAPHICS_MENU_OPTIONS // otherwise Frontend will handle those
- CMenuManager::m_PrefsFrameLimiter = true;
- CMenuManager::m_PrefsVsyncDisp = true;
- CMenuManager::m_PrefsVsync = true;
- CMenuManager::m_PrefsUseWideScreen = false;
- FrontEndMenuManager.m_nDisplayVideoMode = FrontEndMenuManager.m_nPrefsVideoMode;
- #ifdef GTA3_1_1_PATCH
- if (_dwOperatingSystemVersion == OS_WIN98) {
- CMBlur::BlurOn = false;
- CMBlur::MotionBlurClose();
- } else {
- CMBlur::BlurOn = true;
- CMBlur::MotionBlurOpen(Scene.camera);
- }
- #else
- CMBlur::BlurOn = true;
- #endif
- FrontEndMenuManager.SaveSettings();
- #endif
-}
-
-void RestoreDefDisplay(int8 action) {
- if (action != FEOPTION_ACTION_SELECT)
- return;
-
- #ifdef CUTSCENE_BORDERS_SWITCH
- CMenuManager::m_PrefsCutsceneBorders = true;
- #endif
- #ifdef FREE_CAM
- TheCamera.bFreeCam = false;
- #endif
- #ifdef GRAPHICS_MENU_OPTIONS // otherwise Frontend will handle those
- CMenuManager::m_PrefsBrightness = 256;
- CMenuManager::m_PrefsLOD = 1.2f;
- CRenderer::ms_lodDistScale = 1.2f;
- CMenuManager::m_PrefsShowSubtitles = true;
- FrontEndMenuManager.SaveSettings();
- #endif
-}
-
-#ifdef MULTISAMPLING
-void MultiSamplingGoBack() {
- 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;
- }
-}
-const char* multisamplingKey = "MultiSampling";
#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();
- }
-}
+#ifdef LOAD_INI_SETTINGS
+#include "ini_parser.hpp"
-void LangJapSelect(int8 action)
+linb::ini cfg;
+int CheckAndReadIniInt(const char *cat, const char *key, int original)
{
- if (action == FEOPTION_ACTION_SELECT) {
- FrontEndMenuManager.m_PrefsLanguage = CMenuManager::LANGUAGE_JAPANESE;
- FrontEndMenuManager.m_bFrontEnd_ReloadObrTxtGxt = true;
- FrontEndMenuManager.InitialiseChangedLanguageSettings();
- FrontEndMenuManager.SaveSettings();
- }
-}
-#endif
+ const char *value = (cfg.get(cat, key, "").c_str());
+ if (value && value[0] != '\0')
+ return atoi(value);
-#ifdef IMPROVED_VIDEOMODE
-void ScreenModeChange(int8 displayedValue)
-{
- if (displayedValue != FrontEndMenuManager.m_nPrefsWindowed) {
- FrontEndMenuManager.m_nPrefsWindowed = displayedValue;
- _psSelectScreenVM(FrontEndMenuManager.m_nPrefsVideoMode); // apply same resolution
- FrontEndMenuManager.SetHelperText(0);
- FrontEndMenuManager.SaveSettings();
- }
+ return original;
}
-#endif
-#ifdef FREE_CAM
-void FreeCamChange(int8 displayedValue)
+float CheckAndReadIniFloat(const char *cat, const char *key, float original)
{
- TheCamera.bFreeCam = !!displayedValue;
- FrontEndMenuManager.SaveSettings();
-}
-const char* freeCamKey = "FreeCam";
-#endif
+ const char *value = (cfg.get(cat, key, "").c_str());
+ if (value && value[0] != '\0')
+ return atof(value);
-#ifdef CUTSCENE_BORDERS_SWITCH
-void BorderModeChange(int8 displayedValue)
-{
- CMenuManager::m_PrefsCutsceneBorders = !!displayedValue;
- FrontEndMenuManager.SaveSettings();
+ return original;
}
-const char* cutsceneBordersKey = "CutsceneBorders";
-#endif
-#ifdef PS2_ALPHA_TEST
-void PS2AlphaTestChange(int8 displayedValue)
+void CheckAndSaveIniInt(const char *cat, const char *key, int val, bool &changed)
{
- gPS2alphaTest = !!displayedValue;
- FrontEndMenuManager.SaveSettings();
-}
-const char* ps2alphaKey = "PS2AlphaTest";
-#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;
- }
+ 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);
}
- if (PSGLOBAL(joy1id) == -1)
- AsciiToUnicode("Not found", selectedJoystickUnicode);
- else
- AsciiToUnicode(gSelectedJoystickName, selectedJoystickUnicode);
-
- return selectedJoystickUnicode;
}
-#endif
-// Important: Make sure to read the warnings/informations in frontendoption.h!!
-// If you will hardcode any text, please use AllocUnicode! wchar_t size differs between platforms
-void
-CustomFrontendOptionsPopulate(void)
+void CheckAndSaveIniFloat(const char *cat, const char *key, float val, bool &changed)
{
- RemoveCustomFrontendOptions(); // if exist
-
- // -- Graphics/display seperation preperation starts - don't add options in here!
-#ifdef GRAPHICS_MENU_OPTIONS
- int graphicsMenu = FrontendScreenAdd("FET_GRA", MENUSPRITE_MAINMENU, MENUPAGE_OPTIONS, 50, 0, 20,
- FONT_HEADING, MEDIUMTEXT_X_SCALE, MEDIUMTEXT_Y_SCALE, FESCREEN_LEFT_ALIGN, true);
-
- int newDisplayMenu = FrontendScreenAdd("FET_DIS", MENUSPRITE_MAINMENU, MENUPAGE_OPTIONS, 50, 0, 20,
- FONT_HEADING, MEDIUMTEXT_X_SCALE, MEDIUMTEXT_Y_SCALE, FESCREEN_LEFT_ALIGN, true);
-
- FrontendOptionSetCursor(MENUPAGE_OPTIONS, 2, true);
- FrontendOptionAddRedirect(TheText.Get("FET_DIS"), newDisplayMenu, 0);
- FrontendOptionSetCursor(MENUPAGE_OPTIONS, 3);
- FrontendOptionAddRedirect(TheText.Get("FET_GRA"), graphicsMenu, 0);
-
-#define SWITCH_TO_GRAPHICS_MENU FrontendOptionSetCursor(graphicsMenu, -1);
-#define SWITCH_TO_DISPLAY_MENU FrontendOptionSetCursor(newDisplayMenu, -1);
-#define CLONE_OPTION(a, b, c, d) FrontendOptionAddBuiltinAction(a, b, c, d);
-#define ADD_BACK FrontendOptionAddBackButton(TheText.Get("FEDS_TB"));
-#define ADD_RESTORE_DEFAULTS(a) FrontendOptionAddDynamic(TheText.Get("FET_DEF"), nil, nil, a, nil);
-#else
- int advancedDisplayMenu = FrontendScreenAdd("FET_ADV", MENUSPRITE_MAINMENU, MENUPAGE_DISPLAY_SETTINGS, 50, 0, 20,
- FONT_HEADING, MEDIUMTEXT_X_SCALE, MEDIUMTEXT_Y_SCALE, FESCREEN_LEFT_ALIGN, true);
- bool movedToAdvMenu = false;
-
-#define SWITCH_TO_GRAPHICS_MENU \
- if (GetNumberOfMenuOptions(MENUPAGE_DISPLAY_SETTINGS) >= 12) { \
- FrontendOptionSetCursor(advancedDisplayMenu, -1); \
- movedToAdvMenu = true; \
- } else { \
- FrontendOptionSetCursor(MENUPAGE_DISPLAY_SETTINGS, -3); \
- }
-
-#define SWITCH_TO_DISPLAY_MENU SWITCH_TO_GRAPHICS_MENU
-#define CLONE_OPTION(a, b, c, d)
-#define ADD_BACK
-#define ADD_RESTORE_DEFAULTS(a)
-#endif
- // -- Graphics/display seperation preperation end
-
- const wchar* off_on[] = { TheText.Get("FEM_OFF"), TheText.Get("FEM_ON") };
-
-#ifdef MORE_LANGUAGES
- FrontendOptionSetCursor(MENUPAGE_LANGUAGE_SETTINGS, -2);
- FrontendOptionAddDynamic(TheText.Get("FEL_POL"), nil, nil, LangPolSelect, nil);
- FrontendOptionAddDynamic(TheText.Get("FEL_RUS"), nil, nil, LangRusSelect, nil);
- FrontendOptionAddDynamic(TheText.Get("FEL_JAP"), nil, nil, LangJapSelect, nil);
-#endif
-
-#ifdef MENU_MAP
- FrontendOptionSetCursor(MENUPAGE_PAUSE_MENU, 2);
- FrontendOptionAddRedirect(TheText.Get("FEG_MAP"), MENUPAGE_MAP);
-#endif
-
- // -- Start of graphics menu - add options in display order!
-
- SWITCH_TO_GRAPHICS_MENU
- CLONE_OPTION(TheText.Get("FED_RES"), MENUACTION_SCREENRES, nil, nil);
- CLONE_OPTION(TheText.Get("FED_WIS"), MENUACTION_WIDESCREEN, nil, nil)
-
-#ifdef IMPROVED_VIDEOMODE
- const wchar* screenModes[] = { TheText.Get("FED_FLS"), TheText.Get("FED_WND") };
- // Storing isn't enabled because it's handled in Frontend
- FrontendOptionAddSelect(TheText.Get("FEM_SCF"), screenModes, 2, (int8*)&FrontEndMenuManager.m_nPrefsWindowed, true, ScreenModeChange, nil);
-#endif
-
- CLONE_OPTION(TheText.Get("FEM_VSC"), MENUACTION_FRAMESYNC, nil, nil);
- CLONE_OPTION(TheText.Get("FEM_FRM"), MENUACTION_FRAMELIMIT, nil, nil);
-
-#ifdef MULTISAMPLING
- SWITCH_TO_GRAPHICS_MENU
- FrontendOptionAddDynamic(TheText.Get("FED_AAS"), MultiSamplingDraw, (int8*)&FrontEndMenuManager.m_nPrefsMSAALevel, MultiSamplingButtonPress, MultiSamplingGoBack, multisamplingKey);
-#endif
-
- CLONE_OPTION(TheText.Get("FED_TRA"), MENUACTION_TRAILS, nil, nil);
-
-#ifdef PS2_ALPHA_TEST
- SWITCH_TO_GRAPHICS_MENU
- FrontendOptionAddSelect(TheText.Get("FEM_2PR"), off_on, 2, (int8*)&gPS2alphaTest, false, PS2AlphaTestChange, nil, ps2alphaKey);
-#endif
-
- ADD_RESTORE_DEFAULTS(RestoreDefGraphics)
- ADD_BACK
-
- // ---- End of Graphics Menu ----
-
- // -- Start of Display menu - add options in display order!
-
- SWITCH_TO_DISPLAY_MENU
- CLONE_OPTION(TheText.Get("FED_BRI"), MENUACTION_BRIGHTNESS, nil, nil);
- CLONE_OPTION(TheText.Get("FEM_LOD"), MENUACTION_DRAWDIST, nil, nil);
-
-#ifdef CUTSCENE_BORDERS_SWITCH
- SWITCH_TO_DISPLAY_MENU
- FrontendOptionAddSelect(TheText.Get("FEM_CSB"), off_on, 2, (int8 *)&CMenuManager::m_PrefsCutsceneBorders, false, BorderModeChange, nil, cutsceneBordersKey);
-#endif
-
-#ifdef FREE_CAM
- SWITCH_TO_DISPLAY_MENU
- FrontendOptionAddSelect(TheText.Get("FEC_FRC"), off_on, 2, (int8*)&TheCamera.bFreeCam, false, FreeCamChange, nil, freeCamKey);
-#endif
-
- CLONE_OPTION(TheText.Get("FED_SUB"), MENUACTION_SUBTITLES, nil, nil);
-
- // Add link to advanced graphics menu if it's filled.
-#ifndef GRAPHICS_MENU_OPTIONS
- if (movedToAdvMenu) {
- FrontendOptionSetCursor(MENUPAGE_DISPLAY_SETTINGS, -3);
- FrontendOptionAddRedirect(TheText.Get("FET_ADV"), advancedDisplayMenu, 0);
-
- FrontendOptionSetCursor(advancedDisplayMenu, -1);
- FrontendOptionAddBackButton(TheText.Get("FEDS_TB"));
+ 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);
}
-#endif
-
- ADD_RESTORE_DEFAULTS(RestoreDefDisplay)
- ADD_BACK
-
-#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
- int detectJoystickMenu = FrontendScreenAdd("FEC_JOD", MENUSPRITE_MAINMENU, MENUPAGE_CONTROLLER_PC, 40, 60, 20,
- FONT_BANK, MEDIUMTEXT_X_SCALE, MEDIUMTEXT_Y_SCALE, FESCREEN_LEFT_ALIGN, false);
-
- FrontendOptionSetCursor(detectJoystickMenu, 0);
-
- FrontendOptionAddBuiltinAction(TheText.Get("FEC_JPR"), MENUACTION_LABEL, nil, nil);
- FrontendOptionAddDynamic(TheText.Get("FEC_JDE"), DetectJoystickDraw, nil, nil, nil);
- FrontendOptionAddBackButton(TheText.Get("FEDS_TB"));
-
- FrontendOptionSetCursor(MENUPAGE_CONTROLLER_PC, 2);
- FrontendOptionAddRedirect(TheText.Get("FEC_JOD"), detectJoystickMenu, 1);
-#endif
}
-#endif
-#ifdef LOAD_INI_SETTINGS
-#include "ini_parser.hpp"
void LoadINISettings()
{
- linb::ini cfg;
cfg.load_file("re3.ini");
- char defaultStr[4];
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
// Written by assuming the codes below will run after _InputInitialiseJoys().
@@ -491,28 +158,38 @@ void LoadINISettings()
#endif
#ifdef CUSTOM_FRONTEND_OPTIONS
- for (int i = 0; i < numCustomFrontendOptions; i++) {
- FrontendOption& option = customFrontendOptions[i];
- if (option.save) {
- // CFO only supports saving uint8 right now
- sprintf(defaultStr, "%u", *option.value);
- option.lastSavedValue = option.displayedValue = *option.value = atoi(cfg.get("FrontendOptions", option.save, defaultStr).c_str());
+ 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 NO_ISLAND_LOADING
- sprintf(defaultStr, "%u", CMenuManager::m_PrefsIslandLoading);
- CMenuManager::m_PrefsIslandLoading = atoi(cfg.get("FrontendOptions", "NoIslandLoading", defaultStr).c_str());
- CMenuManager::m_DisplayIslandLoading = CMenuManager::m_PrefsIslandLoading;
+#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()
{
- linb::ini cfg;
- cfg.load_file("re3.ini");
bool changed = false;
char temp[4];
@@ -523,23 +200,29 @@ void SaveINISettings()
}
#endif
#ifdef CUSTOM_FRONTEND_OPTIONS
- for (int i = 0; i < numCustomFrontendOptions; i++) {
- FrontendOption &option = customFrontendOptions[i];
- if (option.save) {
- if (atoi(cfg.get("FrontendOptions", option.save, "xxx").c_str()) != *option.value) { // if .ini doesn't have that key compare with xxx, so we can add it
- changed = true;
- sprintf(temp, "%u", *option.value);
- cfg.set("FrontendOptions", option.save, temp);
+ 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 NO_ISLAND_LOADING
- if (atoi(cfg.get("FrontendOptions", "NoIslandLoading", "xxx").c_str()) != CMenuManager::m_PrefsIslandLoading) {
- changed = true;
- sprintf(temp, "%u", CMenuManager::m_PrefsIslandLoading);
- cfg.set("FrontendOptions", "NoIslandLoading", temp);
- }
+
+#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)
@@ -888,9 +571,6 @@ DebugMenuPopulate(void)
DebugMenuAddCmd("Debug", "Catalina Fly Away", CHeli::MakeCatalinaHeliFlyAway);
DebugMenuAddVarBool8("Debug", "Script Heli On", &CHeli::ScriptHeliOn, nil);
-#ifdef CUSTOM_FRONTEND_OPTIONS
- DebugMenuAddCmd("Debug", "Reload custom frontend options", ReloadFrontendOptions);
-#endif
DebugMenuAddVarBool8("Debug", "Toggle popping heads on headshot", &CPed::bPopHeadsOnHeadshot, nil);
DebugMenuAddCmd("Debug", "Start Credits", CCredits::Start);
DebugMenuAddCmd("Debug", "Stop Credits", CCredits::Stop);