diff --git a/.efrocachemap b/.efrocachemap index 800cb9af..54c96d18 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -1524,9 +1524,9 @@ "build/assets/ba_data/textures/fontBig.ktx": "94b56c2488d6c9ebabfbbb740eca07dd", "build/assets/ba_data/textures/fontBig.pvr": "dff3f6c04a8c7b0bb937001640b42c8d", "build/assets/ba_data/textures/fontBig_preview.png": "f8b15cb04f0deca7774def335a72f053", - "build/assets/ba_data/textures/fontExtras.dds": "7ab11df1b3a3daa651dfad34219b89f5", - "build/assets/ba_data/textures/fontExtras.ktx": "30c3c8ca2cdf1209ff177017bb10f0a8", - "build/assets/ba_data/textures/fontExtras.pvr": "fd3b0bd902c30e4b7aa5fe00e1eec4be", + "build/assets/ba_data/textures/fontExtras.dds": "0a5a39028853c443cd88bc2492cb6ad9", + "build/assets/ba_data/textures/fontExtras.ktx": "5b14075ce3d1d29c6d5635602e2176d8", + "build/assets/ba_data/textures/fontExtras.pvr": "8cc68ca85ba327c20c45bad73b000d8c", "build/assets/ba_data/textures/fontExtras2.dds": "18063a12912dadc9528afd90d1cf2369", "build/assets/ba_data/textures/fontExtras2.ktx": "36da7f6cfbfb8d32fb14371de0a8f660", "build/assets/ba_data/textures/fontExtras2.pvr": "7a4e8e64ac05313b1782fb5b958150d0", @@ -1539,7 +1539,7 @@ "build/assets/ba_data/textures/fontExtras4.ktx": "6d872ac15e2e874c1252f63b4584722b", "build/assets/ba_data/textures/fontExtras4.pvr": "6a0a0a1a8bbbc3ee9d6b8b914e7aa697", "build/assets/ba_data/textures/fontExtras4_preview.png": "363e2647621917b3821c9068267d2516", - "build/assets/ba_data/textures/fontExtras_preview.png": "9c9c58aff612e7b6386f3522c0b4f1f6", + "build/assets/ba_data/textures/fontExtras_preview.png": "b6503267cc15e9e2524f41fabd94e773", "build/assets/ba_data/textures/fontSmall0.dds": "b30bfe5f9e436be7be8b5eae6e8490c3", "build/assets/ba_data/textures/fontSmall0.ktx": "7e6058f37e6c5a4ea628f35b5f92c227", "build/assets/ba_data/textures/fontSmall0.pvr": "c66e3d6aa1f7def83aaacd8a6c9185e5", @@ -4056,26 +4056,26 @@ "build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1", "build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "437a7184a3f56da917ec92e0f1d08392", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "c990f7765be45e603eaa1040a11d20f2", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "b891b240768e0c1961d82a05357f36fb", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "7778d9df2d0c4e07d2ea46b3c6b8ca1f", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "eac8b98c72cd8edbf1ed97237052ac05", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "6ee06879d656a68802dc42c483ea5a2b", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "58b8437cc04dbc63587e8c379bcdb316", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "40422d250bc84faf876642f8c6181132", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "0c5d44d847c3df3178e5b890c234bccd", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "8e58ab0f0faa58b6bdc8130062171a1d", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "18e33eab40af6efc10454206249b5b91", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "0465c41b9364c56494768ac41766529b", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "2bb0a2f4402ee90e1c2e03f75dd6e090", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "328d7b3a7ce3564dc7d1b4f315842291", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "079097fc77e50024f6231de94c9e1fbc", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "9bb781a88ecddf84ca84cbdc14ee0a78", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "17ca9956767731b2cce7c12ec15e37f4", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "c0c9a0e54434f54bad8cd057bacab4e2", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "ab77f95bd46cae158aaccd53091c3bfb", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "bd05a3124893ff649a48afc6ff9fdf20", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "c1b15ac7e2c82bd82b97cb109e2eda55", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "890bf4dcce18e5c9bcaea42a69e3c4e4", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "84cb3bc48affe53ac615b8ad94d7ee80", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "ebfc636ad2b39dd441f80937996dd83d", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "e43e64e55f5456a606f0be8aa025f579", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "480e90cb5c8c676283ffd3a4f8e50dcf", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "e24d2cd8656f5f5c5dc02db28fe3c1dd", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "b10596b46ada2101a8c0769cc722f426", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "5dd458a30196c39bc9e334f1a9d5b3a4", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "43ab8ae4b7c5ededde417f0f01aa00f5", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "24fb0ffabb00de09ec9b63103534639b", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "2788e7b24f36c51ec4ec603a30ac5ae2", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "9f5fbf290252d070e98aab13f305c7dc", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "3be3c2402c33445e7fe5aa1cadc5fb19", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "ff8ebebe327730c091a2f1d55865be5d", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "ca29146d034f7ea18c0948b0a42f99d0", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "2ecabf751c7d10a3b5b80b134b3d5162", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "05c9d29f361c523ce785d8d5d8311278", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "c72df8dd7b8830cf54c186b77fbe1c4c", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "2bf6f80b765ef15a4394ad370370b6af", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "d9f919fe87d497529cd8aed24a961ea3", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "56972014971024060e6014c2027debd2", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "d9f919fe87d497529cd8aed24a961ea3", @@ -4092,14 +4092,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "39a0f3efabd9d2f62202ef9790e5cecd", "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "2609429078b69b48c3cda49abac7065c", "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "39a0f3efabd9d2f62202ef9790e5cecd", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "7f3de02f9481408b02ebfd1253452b30", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "a56a0aecab25961be71f364bd29eecaf", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "cbc394d29f300aac67374c586f07e3dd", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "ceba6e421ed2ccd51114bfdd239881d9", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "eaa568b2aee0f4cd4e186cee7ac98a9a", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "e13fdefc582d9c86a3b5f9cb4e5781f5", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "1f1065b864ddd2e6b376835c09bf809b", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "9eab26a8053f011ab0247e67bf59ecf3", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "350146c7495a8bb828bec1a6782e3619", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "2be7ecb0dfd69fb74b60b7b60cd5c1e6", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "dff90dc36b0c809b08941684093db4a6", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "291720ae84da8daa1b3ae12dfde5713e", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "9c598f1db7b3ec0d80106c63e55a0062", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "620fe910d6f506645d4d4882b6b0c31d", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "27212e46c4b7e57d32a523b13de8fafd", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "36e695121b06f4b04e0e6d9d588189b4", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "28323912b56ec07701eda3d41a6a4101", "src/ballistica/base/mgen/pyembed/binding_base.inc": "6df0f34207346d89a72924249ddd4706", diff --git a/CHANGELOG.md b/CHANGELOG.md index 827e1817..d5542dd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.28 (build 21551, api 8, 2023-10-31) +### 1.7.28 (build 21554, api 8, 2023-11-01) - Massively cleaned up code related to rendering and window systems (OpenGL, SDL, etc). This code had been growing into a nasty tangle for 15 years diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index 963ee465..4ce5be99 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -52,7 +52,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21551 +TARGET_BALLISTICA_BUILD = 21554 TARGET_BALLISTICA_VERSION = '1.7.28' diff --git a/src/assets/ba_data/python/bascenev1lib/actor/controlsguide.py b/src/assets/ba_data/python/bascenev1lib/actor/controlsguide.py index e29245b6..23c4a977 100644 --- a/src/assets/ba_data/python/bascenev1lib/actor/controlsguide.py +++ b/src/assets/ba_data/python/bascenev1lib/actor/controlsguide.py @@ -35,7 +35,7 @@ class ControlsGuide(bs.Actor): delay: is the time in seconds before the overlay fades in. lifespan: if not None, the overlay will fade back out and die after - that long (in milliseconds). + that long (in seconds). bright: if True, brighter colors will be used; handy when showing over gameplay but may be too bright for join-screens, etc. @@ -50,6 +50,7 @@ class ControlsGuide(bs.Actor): offs5 = 43.0 * scale ouya = False maxw = 50 + xtweak = -2.8 * scale self._lifespan = lifespan self._dead = False self._bright = bright @@ -117,7 +118,7 @@ class ControlsGuide(bs.Actor): 'host_only': True, 'shadow': 1.0, 'maxwidth': maxw, - 'position': (pos[0], pos[1] - offs5), + 'position': (pos[0] + xtweak, pos[1] - offs5), 'color': clr, }, ) @@ -145,7 +146,7 @@ class ControlsGuide(bs.Actor): 'host_only': True, 'shadow': 1.0, 'maxwidth': maxw, - 'position': (pos[0], pos[1] - offs5), + 'position': (pos[0] + xtweak, pos[1] - offs5), 'color': clr, }, ) @@ -173,7 +174,7 @@ class ControlsGuide(bs.Actor): 'host_only': True, 'shadow': 1.0, 'maxwidth': maxw, - 'position': (pos[0], pos[1] - offs5), + 'position': (pos[0] + xtweak, pos[1] - offs5), 'color': clr, }, ) @@ -201,7 +202,7 @@ class ControlsGuide(bs.Actor): 'host_only': True, 'shadow': 1.0, 'maxwidth': maxw, - 'position': (pos[0], pos[1] - offs5), + 'position': (pos[0] + xtweak, pos[1] - offs5), 'color': clr, }, ) diff --git a/src/assets/ba_data/python/bauiv1lib/settings/gamepad.py b/src/assets/ba_data/python/bauiv1lib/settings/gamepad.py index eeb12dad..3c67b23f 100644 --- a/src/assets/ba_data/python/bauiv1lib/settings/gamepad.py +++ b/src/assets/ba_data/python/bauiv1lib/settings/gamepad.py @@ -554,7 +554,6 @@ class GamepadSettingsWindow(bui.Window): if self._is_secondary else None ) - print('got', sval1, sval2) assert isinstance(sval1, (int, type(None))) assert isinstance(sval2, (int, type(None))) if sval1 is not None and sval2 is not None: diff --git a/src/ballistica/base/input/device/joystick_input.cc b/src/ballistica/base/input/device/joystick_input.cc index 910f9459..be7e4ab4 100644 --- a/src/ballistica/base/input/device/joystick_input.cc +++ b/src/ballistica/base/input/device/joystick_input.cc @@ -148,7 +148,17 @@ auto JoystickInput::HasMeaningfulButtonNames() -> bool { return g_buildconfig.ostype_android(); } +void JoystickInput::SetButtonName(int button, const std::string& name) { + button_names_[button] = name; +} + auto JoystickInput::GetButtonName(int index) -> std::string { + // First check any explicit ones we were passed. + auto i = button_names_.find(index); + if (i != button_names_.end()) { + return i->second; + } + // FIXME: Should get fancier here now that PS4 and XBone // controllers are supported through this. if (is_mfi_controller_) { diff --git a/src/ballistica/base/input/device/joystick_input.h b/src/ballistica/base/input/device/joystick_input.h index 0444bb19..985fc78c 100644 --- a/src/ballistica/base/input/device/joystick_input.h +++ b/src/ballistica/base/input/device/joystick_input.h @@ -3,6 +3,7 @@ #ifndef BALLISTICA_BASE_INPUT_DEVICE_JOYSTICK_INPUT_H_ #define BALLISTICA_BASE_INPUT_DEVICE_JOYSTICK_INPUT_H_ +#include #include #include @@ -49,7 +50,6 @@ class JoystickInput : public InputDevice { auto GetPartyButtonName() const -> std::string override; - auto GetButtonName(int index) -> std::string override; auto GetAxisName(int index) -> std::string override; auto IsController() -> bool override { return true; } @@ -73,6 +73,11 @@ class JoystickInput : public InputDevice { auto HasMeaningfulButtonNames() -> bool override; + auto GetButtonName(int index) -> std::string override; + + /// Custom controller types can pass in controller-specific button names. + void SetButtonName(int button, const std::string& name); + protected: auto GetRawDeviceName() -> std::string override; auto GetDeviceExtraDescription() -> std::string override; @@ -185,6 +190,7 @@ class JoystickInput : public InputDevice { std::string custom_device_name_; std::string raw_sdl_joystick_name_; std::string raw_sdl_joystick_identifier_; + std::map button_names_; Object::Ref ui_repeater_; BA_DISALLOW_CLASS_COPIES(JoystickInput); diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index eb9b8922..755f62c9 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21551; +const int kEngineBuildNumber = 21554; const char* kEngineVersion = "1.7.28"; const int kEngineApiVersion = 8;