From 28f266302fbeea2d75d5a62de651d464ab380798 Mon Sep 17 00:00:00 2001 From: Adrian Graber Date: Sun, 4 Jul 2021 18:52:48 +0200 Subject: Add Nintendo Switch initial support --- src/core/config.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/core/config.h') diff --git a/src/core/config.h b/src/core/config.h index 885f98b8..edb5fb5a 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -319,7 +319,7 @@ enum Config { #if !defined(RW_GL3) && defined(_WIN32) #define XINPUT #endif -#if defined XINPUT || (defined RW_GL3 && !defined LIBRW_SDL2 && !defined __SWITCH__) +#if defined XINPUT || (defined RW_GL3 && !defined LIBRW_SDL2 && !defined GTA_SWITCH) #define DETECT_JOYSTICK_MENU // Then we'll expect user to enter Controller->Detect joysticks if his joystick isn't detected at the start. #endif #define DETECT_PAD_INPUT_SWITCH // Adds automatic switch of pad related stuff between controller and kb/m @@ -439,7 +439,7 @@ enum Config { #endif // Streaming -#if !defined(_WIN32) && !defined(__SWITCH__) +#if !defined(_WIN32) && !defined(GTA_SWITCH) //#define ONE_THREAD_PER_CHANNEL // Don't use if you're not on SSD/Flash - also not utilized too much right now(see commented LoadAllRequestedModels in Streaming.cpp) #define FLUSHABLE_STREAMING // Make it possible to interrupt reading when processing file isn't needed anymore. #endif @@ -461,4 +461,9 @@ enum Config { #undef PEDS_REPORT_CRIMES_ON_PHONE #endif +#ifdef GTA_SWITCH + #define IGNORE_MOUSE_KEYBOARD // ignore mouse & keyboard input + #define USE_UNNAMED_SEM // named semaphores are unsupported on the switch +#endif + #endif // VANILLA_DEFINES -- cgit v1.2.3 From 6da20aa7232e92b19af28d1bcd2dacacc3898789 Mon Sep 17 00:00:00 2001 From: Adrian Graber Date: Sun, 4 Jul 2021 19:15:23 +0200 Subject: Enable Gamepad Menu on Switch --- src/core/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/config.h') diff --git a/src/core/config.h b/src/core/config.h index edb5fb5a..462dd713 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -345,7 +345,7 @@ enum Config { //# define PS2_MENU_USEALLPAGEICONS #else -# ifdef XINPUT +# if defined(XINPUT) || defined(GTA_SWITCH) # define GAMEPAD_MENU // Add gamepad menu # endif -- cgit v1.2.3 From ca5d3c881133d1fb3c2d9af16de81b63304bc88f Mon Sep 17 00:00:00 2001 From: Adrian Graber Date: Mon, 5 Jul 2021 20:02:44 +0200 Subject: Replace GTA_SWITCH macro and use GAMEPAD_MENU * Replace GTA_SWITCH macro with __SWITCH__ for platform specific stuff and GTA_HANDHELD for the rest (which could be used by other ports) * Use GAMEPAD_MENU on GTA_HANDHELD, which will replace the usual controller setup (which contains some useless features for handhelds) * Fix some identation inconsistencies * Disable PC_PLAYER_CONTROLS on GTA_HANDHELD builds --- src/core/config.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'src/core/config.h') diff --git a/src/core/config.h b/src/core/config.h index 462dd713..8171f987 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -158,6 +158,11 @@ enum Config { #define GTA_VERSION GTA3_PC_11 +// Enable configuration for handheld console ports +#if defined(__SWITCH__) || defined(PSP2) + #define GTA_HANDHELD +#endif + #if defined GTA_PS2 # define GTA_PS2_STUFF # define RANDOMSPLASH @@ -166,7 +171,9 @@ enum Config { # define ANIM_COMPRESSION # define PS2_MENU #elif defined GTA_PC -# define PC_PLAYER_CONTROLS // mouse player/cam mode +# ifndef GTA_HANDHELD +# define PC_PLAYER_CONTROLS // mouse player/cam mode +# endif # define GTA_REPLAY # define GTA_SCENE_EDIT # define PC_MENU @@ -319,7 +326,7 @@ enum Config { #if !defined(RW_GL3) && defined(_WIN32) #define XINPUT #endif -#if defined XINPUT || (defined RW_GL3 && !defined LIBRW_SDL2 && !defined GTA_SWITCH) +#if defined XINPUT || (defined RW_GL3 && !defined LIBRW_SDL2 && !defined GTA_HANDHELD) #define DETECT_JOYSTICK_MENU // Then we'll expect user to enter Controller->Detect joysticks if his joystick isn't detected at the start. #endif #define DETECT_PAD_INPUT_SWITCH // Adds automatic switch of pad related stuff between controller and kb/m @@ -345,7 +352,7 @@ enum Config { //# define PS2_MENU_USEALLPAGEICONS #else -# if defined(XINPUT) || defined(GTA_SWITCH) +# if defined(XINPUT) || defined(GTA_HANDHELD) # define GAMEPAD_MENU // Add gamepad menu # endif @@ -439,7 +446,7 @@ enum Config { #endif // Streaming -#if !defined(_WIN32) && !defined(GTA_SWITCH) +#if !defined(_WIN32) && !defined(__SWITCH__) //#define ONE_THREAD_PER_CHANNEL // Don't use if you're not on SSD/Flash - also not utilized too much right now(see commented LoadAllRequestedModels in Streaming.cpp) #define FLUSHABLE_STREAMING // Make it possible to interrupt reading when processing file isn't needed anymore. #endif @@ -461,8 +468,11 @@ enum Config { #undef PEDS_REPORT_CRIMES_ON_PHONE #endif -#ifdef GTA_SWITCH +#ifdef GTA_HANDHELD #define IGNORE_MOUSE_KEYBOARD // ignore mouse & keyboard input +#endif + +#ifdef __SWITCH__ #define USE_UNNAMED_SEM // named semaphores are unsupported on the switch #endif -- cgit v1.2.3 From 16ff379ebeca2092e9609eb3163a6bd2ffd68060 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Tue, 17 Aug 2021 13:58:48 +0300 Subject: Add AUDIO_REFLECTIONS define, fix a bunch of types, fix heli chatter intensity --- src/core/config.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core/config.h') diff --git a/src/core/config.h b/src/core/config.h index d26f9546..5ec6f3ee 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -171,6 +171,7 @@ enum Config { # define PS2_MENU #elif defined GTA_PC # define EXTERNAL_3D_SOUND +# define AUDIO_REFLECTIONS # ifndef GTA_HANDHELD # define PC_PLAYER_CONTROLS // mouse player/cam mode # endif @@ -429,6 +430,7 @@ enum Config { // Audio #define EXTERNAL_3D_SOUND // use external engine to simulate 3d audio spatialization. OpenAL would not work without it (because it works in a 3d space // originally and making it work in 2d only requires more resource). Will not work on PS2 +#define AUDIO_REFLECTIONS // Enable audio reflections. Disabled on mobile, didn't exist yet on PS2. #define RADIO_SCROLL_TO_PREV_STATION #define AUDIO_CACHE #define PS2_AUDIO_CHANNELS // increases the maximum number of audio channels to PS2 value of 44 (PC has 28 originally) @@ -490,3 +492,6 @@ enum Config { #if defined(GTA_PS2) && defined(EXTERNAL_3D_SOUND) #error EXTERNAL_3D_SOUND cannot work on PS2 #endif +#if defined(AUDIO_REFLECTIONS) && GTA_VERSION < GTA3_PC_10 +#error AUDIO_REFLECTIONS cannot work with versions below GTA3_PC_10 +#endif \ No newline at end of file -- cgit v1.2.3 From ceb65eafa5374bbde2e39efed27bb2f87fb31901 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Mon, 23 Aug 2021 11:15:03 +0300 Subject: Make ped comments update position and volume --- src/core/config.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/config.h') diff --git a/src/core/config.h b/src/core/config.h index 5ec6f3ee..c04dfdf1 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -438,6 +438,7 @@ enum Config { //#define AUDIO_OAL_USE_SNDFILE // use libsndfile to decode WAVs instead of our internal decoder #define AUDIO_OAL_USE_MPG123 // use mpg123 to support mp3 files #define PAUSE_RADIO_IN_FRONTEND // pause radio when game is paused +#define ATTACH_PED_COMMENTS_TO_ENTITIES // ped comments coordinates would update following ped entity #define MULTITHREADED_AUDIO // for streams. requires C++11 or later #ifdef AUDIO_OPUS -- cgit v1.2.3 From 38f4ea7aa3773e5fa9ff99fa131b7db223117009 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Tue, 24 Aug 2021 13:11:36 +0300 Subject: Audio enhancements: * redo high fps fix * make releasing vehicle sounds attach to entities * fix bug with reusing audio entity that is still being used * use time scale to modify sound speed --- src/core/config.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/config.h') diff --git a/src/core/config.h b/src/core/config.h index c04dfdf1..625075c5 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -438,7 +438,8 @@ enum Config { //#define AUDIO_OAL_USE_SNDFILE // use libsndfile to decode WAVs instead of our internal decoder #define AUDIO_OAL_USE_MPG123 // use mpg123 to support mp3 files #define PAUSE_RADIO_IN_FRONTEND // pause radio when game is paused -#define ATTACH_PED_COMMENTS_TO_ENTITIES // ped comments coordinates would update following ped entity +#define ATTACH_RELEASING_SOUNDS_TO_ENTITIES // sounds would follow ped and vehicles coordinates if not being queued otherwise +#define USE_TIME_SCALE_FOR_AUDIO // slow down/speed up sounds according to the speed of the game #define MULTITHREADED_AUDIO // for streams. requires C++11 or later #ifdef AUDIO_OPUS -- cgit v1.2.3