From 7968897f1e91324447ecbf993dad468328dca4ed Mon Sep 17 00:00:00 2001 From: Ritiek Malhotra Date: Thu, 8 Sep 2022 21:29:36 +0530 Subject: [PATCH 01/40] Remove redundant code --- src/ballistica/scene/node/spaz_node.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/ballistica/scene/node/spaz_node.cc b/src/ballistica/scene/node/spaz_node.cc index 1e2386a5..40b407f6 100644 --- a/src/ballistica/scene/node/spaz_node.cc +++ b/src/ballistica/scene/node/spaz_node.cc @@ -6430,9 +6430,6 @@ void SpazNode::SetStyle(const std::string& val) { eye_lid_color_green_ = 0.35f; eye_lid_color_blue_ = 0.31f; default_eye_lid_angle_ = 15.0f; // sorta angry eyes - eye_color_red_ = 1.1f; - eye_color_green_ = 0.6f; - eye_color_blue_ = 1.4f; eye_ball_color_red_ = 0.54f; eye_ball_color_green_ = 0.51f; eye_ball_color_blue_ = 0.55f; From 589841eee70c367bce6c692aeb52f5bbe1eb4763 Mon Sep 17 00:00:00 2001 From: Eric Date: Sat, 10 Sep 2022 09:14:19 -0700 Subject: [PATCH 02/40] renamed Account to V1Account in the C++ layer --- .efrocachemap | 88 +++++++++---------- CHANGELOG.md | 2 +- .../ba_data/python/._bainternal_sources_hash | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- ballisticacore-cmake/CMakeLists.txt | 4 +- .../Generic/BallisticaCoreGeneric.vcxproj | 4 +- .../BallisticaCoreGeneric.vcxproj.filters | 12 +-- .../Headless/BallisticaCoreHeadless.vcxproj | 4 +- .../BallisticaCoreHeadless.vcxproj.filters | 12 +-- src/ballistica/ballistica.cc | 8 +- src/ballistica/ballistica.h | 2 +- src/ballistica/core/types.h | 2 +- src/ballistica/game/game.cc | 11 +-- src/ballistica/game/player_spec.cc | 15 ++-- .../game/{account.cc => v1_account.cc} | 40 ++++----- .../game/{account.h => v1_account.h} | 10 +-- .../python/methods/python_methods_ui.cc | 2 +- src/ballistica/python/python.cc | 2 +- 18 files changed, 112 insertions(+), 110 deletions(-) rename src/ballistica/game/{account.cc => v1_account.cc} (80%) rename src/ballistica/game/{account.h => v1_account.h} (92%) diff --git a/.efrocachemap b/.efrocachemap index 15bf8e53..757e08de 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,50 +3995,50 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ad/15/3b9d4eb830dd3f65266b90544461", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3f/94/ce703438b67755c530ca90d7147e", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/57/49/aef9dbd58c9638d2f57c61fa9dee", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/53/73/7aee5551f9aa8c60bfa36ce86889", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/8d/cd/61b3022a6a3620bb9a0d288a3a07", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/67/d3/7e7b3147c119bcf9edc62f271755", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/41/81/b4225f4df31a6bb482eee912d1e7", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/8a/3e/9a284ee8d8cb75fef73f31c95a8f", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a5/a2/69829de7375f981ac01464d1271c", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/8f/de/c40022e95c0d51e3ea7d68713ac8", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2a/e3/74cdea89e9606f525ae01f5fb860", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c2/b3/8f5c7076b293ce6a961b23321ebe", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/45/4b/43950780d121290a40cb444e86c4", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/74/6c/5c8a7cab586c813a07d5180e25c2", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ca/36/94c0d402ec38ffdd74cd165f51c3", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b7/a9/14ea5150ad61a43b5780975551ac", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/23/72/2bdc1106cdf2aa163a591e7c47b8", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/1e/d9/5a7fd190b86683bef223c1cdb0b6", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/2e/f1/27b90831c9a25d2b9d06a266e931", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/17/ce/d3e33370c016fc8110e6dddd120f", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/32/b0/df61f7b69d796fbdf2aa0d11974b", - "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/42/31/a45e87e70e5d5232956586620f35", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/94/5e/6ac9534c08e600201b04d28a6069", - "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5f/5d/52e74182f459f5b7b55ae07b36c6", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7b/9d/367338622b31482a8ef87621f5aa", - "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a8/18/4dff9ab6b2529d258a2ee5607d0c", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/79/b9/e5e9d0f92f82f6cf35abf0c049cf", - "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4c/b4/2c65b84265e0b2d576317ca86e77", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d1/86/635b942e0837be18e6d9d859f2c4", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b0/f5/3da5acc926ca5e6c02307b8a16a6", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a3/51/d624ac150603304183ba23d369a2", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e2/51/5eb2216e4cdc531c500244316f1d", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b1/2b/c72179ed1d11ae7e11f429b90ae9", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/52/78/cca5ff0fcc837467cd23239537c7", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e7/6e/eb7102dd939e85172d729ba471b8", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e7/92/b7c90b5dbf614aa056cf467f73e0", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/cf/d9/52c1c145efa1a24ebf54dd71f691", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/31/15/ef849aeaf5a9cc2169e6ec4998c8", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/86/a7/def29184cd6e947469726ae382e1", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/5f/30/42705d0b580994d1345c34651170", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/2f/b1/6a6e8cf45fc5afa4085bf90a526f", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/7e/fb/e7eaee33c6196f9204a2997fc65c", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/5a/39/e00cddb91e8eca83b117235c1332", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/07/dd/6e331996e6e6907f05a21abc20a6", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/15/a9/a9a878db308e8fb8e267d606a9f7", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ea/05/dc05633b650cf96c75ac3ed1a61d", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4d/f6/d118bb50716ae27418bf756702c3", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/30/a1/637841e59a1c277912aa6941a66f", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/9e/f4/cc859bd7ef55b939e2090128f307", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/12/c9/3301f4529de01e4a6fad66177b32", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/79/37/7d7547882a64e6b2ce2881d5f2ad", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/7b/8c/4606553615502fcd4a116c0d7fe2", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/1f/dc/501dfee10c4d4b04e8e7bbf60422", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3a/33/69ab076cfff5b561dae8194b5360", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5a/12/81b9b1d949f44111680758020956", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ae/a0/1514d1520f12dc4e9c34316310c1", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/49/6b/f44e345c4133418d816a94690d3b", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/07/92/e54b6c94216fc811d2c5e3c385a3", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/55/e1/2a35d261d1f7d29603220f456163", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e1/ef/ff3bfa49d2ba1c148dde704a4d87", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/06/b9/54708a2d4619f1cd3706fc79fd01", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/01/24/143285e78761359b9dfa2a425a34", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ca/80/386a30050daa0eb1cec9b6fad36b", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/0b/6d/32eab56b5d6179fb2b3e9308e3d8", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/bd/e9/558b331aa2cdde5b8814eeb5323d", + "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/86/d2/d18cbc017a7d64001f96718cc5ed", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/49/c2/a8970c6be16183a808c991510aaa", + "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/06/70/9e5becbdf873ea42fae9541dd123", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5d/7e/0dc09d6e811dc566ae3530794132", + "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a3/47/f46d4455e6ee1ebb397508495d90", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c9/56/f14a3725ad5410f373e3d7bad340", + "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4c/32/de6296fdbd72d6a82d47a2403efd", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d2/1d/c111bdf386178fd46eff2c5a8cff", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3b/a5/e0aa43ca227c6bfa2ae8f44add14", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b5/6d/7506bdad0891a0e7cb6d04c6b018", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/95/bc/affcb077742c90c9d51fd2dc4274", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/cd/c2/72b9276880eddb6121542c052b1d", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c8/d2/5df66f66e26c1beb8a1e2b1f0613", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7e/57/593e8ceeee37a65972f1fb30d2cd", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2f/fc/a2ac394899e6527f8def0cad4d8a", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/06/03/28c2d1732805a77f322e2d90b6d7", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/83/93/f88d485633c4307f4d64ba27c615", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/2e/4a/dd9a19a2e3f475d39c1c2fd63c3a", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/13/7f/35479d1cdce4dc3a705e040be0d8", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/3d/ca/1f49d1c9ac5a158505de356cb650", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/f2/87/eefb0be2571dd410a1f438baea45", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/3a/a2/fa5c7a6b624a96147b3f9f79ffce", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/9c/96/ca2599d31f947eed5cdc26d64582", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 70701bdf..e8767974 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20798, api 7, 2022-09-09) +### 1.7.7 (build 20799, api 7, 2022-09-10) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. diff --git a/assets/src/ba_data/python/._bainternal_sources_hash b/assets/src/ba_data/python/._bainternal_sources_hash index 4f6f8751..595ac638 100644 --- a/assets/src/ba_data/python/._bainternal_sources_hash +++ b/assets/src/ba_data/python/._bainternal_sources_hash @@ -1 +1 @@ -64954916459680243860176377055051806996 \ No newline at end of file +250920245305497630480226719424525454078 \ No newline at end of file diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 490f64f5..79ed2ff8 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -38,7 +38,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20798 + expected_build = 20799 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/ballisticacore-cmake/CMakeLists.txt b/ballisticacore-cmake/CMakeLists.txt index 0f58aa0a..c206b385 100644 --- a/ballisticacore-cmake/CMakeLists.txt +++ b/ballisticacore-cmake/CMakeLists.txt @@ -298,8 +298,6 @@ add_executable(ballisticacore ${BA_SRC_ROOT}/ballistica/dynamics/part.h ${BA_SRC_ROOT}/ballistica/dynamics/rigid_body.cc ${BA_SRC_ROOT}/ballistica/dynamics/rigid_body.h - ${BA_SRC_ROOT}/ballistica/game/account.cc - ${BA_SRC_ROOT}/ballistica/game/account.h ${BA_SRC_ROOT}/ballistica/game/client_controller_interface.h ${BA_SRC_ROOT}/ballistica/game/connection/connection.cc ${BA_SRC_ROOT}/ballistica/game/connection/connection.h @@ -335,6 +333,8 @@ add_executable(ballisticacore ${BA_SRC_ROOT}/ballistica/game/session/replay_client_session.h ${BA_SRC_ROOT}/ballistica/game/session/session.cc ${BA_SRC_ROOT}/ballistica/game/session/session.h + ${BA_SRC_ROOT}/ballistica/game/v1_account.cc + ${BA_SRC_ROOT}/ballistica/game/v1_account.h ${BA_SRC_ROOT}/ballistica/generic/base64.cc ${BA_SRC_ROOT}/ballistica/generic/base64.h ${BA_SRC_ROOT}/ballistica/generic/buffer.h diff --git a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj index 06cae3fd..266f06d5 100644 --- a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj +++ b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj @@ -289,8 +289,6 @@ - - @@ -326,6 +324,8 @@ + + diff --git a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters index 0db00d48..521f7a2f 100644 --- a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters +++ b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters @@ -301,12 +301,6 @@ ballistica\dynamics - - ballistica\game - - - ballistica\game - ballistica\game @@ -412,6 +406,12 @@ ballistica\game\session + + ballistica\game + + + ballistica\game + ballistica\generic diff --git a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj index ccbacee1..fafb946a 100644 --- a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj +++ b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj @@ -284,8 +284,6 @@ - - @@ -321,6 +319,8 @@ + + diff --git a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters index 0db00d48..521f7a2f 100644 --- a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters +++ b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters @@ -301,12 +301,6 @@ ballistica\dynamics - - ballistica\game - - - ballistica\game - ballistica\game @@ -412,6 +406,12 @@ ballistica\game\session + + ballistica\game + + + ballistica\game + ballistica\generic diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 9e8a4227..8822fbb2 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -10,7 +10,7 @@ #include "ballistica/core/logging.h" #include "ballistica/core/thread.h" #include "ballistica/dynamics/bg/bg_dynamics_server.h" -#include "ballistica/game/account.h" +#include "ballistica/game/v1_account.h" #include "ballistica/graphics/graphics_server.h" #include "ballistica/internal/app_internal.h" #include "ballistica/media/media_server.h" @@ -22,7 +22,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20798; +const int kAppBuildNumber = 20799; const char* kAppVersion = "1.7.7"; // Our standalone globals. @@ -30,7 +30,7 @@ const char* kAppVersion = "1.7.7"; // Everything else should go into App (or more ideally into a class). int g_early_log_writes{10}; -Account* g_account{}; +V1Account* g_v1_account{}; AppConfig* g_app_config{}; App* g_app{}; AppInternal* g_app_internal{}; @@ -103,7 +103,7 @@ auto BallisticaMain(int argc, char** argv) -> int { g_app_flavor = g_platform->CreateAppFlavor(); g_app_flavor->PostInit(); - g_account = new Account(); + g_v1_account = new V1Account(); g_utils = new Utils(); Scene::Init(); diff --git a/src/ballistica/ballistica.h b/src/ballistica/ballistica.h index 325b02a0..d8f15f8d 100644 --- a/src/ballistica/ballistica.h +++ b/src/ballistica/ballistica.h @@ -117,7 +117,7 @@ const float kGameStepSeconds = // Globals. extern int g_early_log_writes; -extern Account* g_account; +extern V1Account* g_v1_account; extern AppFlavor* g_app_flavor; extern AppConfig* g_app_config; extern App* g_app; diff --git a/src/ballistica/core/types.h b/src/ballistica/core/types.h index ffb27cf6..1143e129 100644 --- a/src/ballistica/core/types.h +++ b/src/ballistica/core/types.h @@ -34,7 +34,6 @@ typedef int64_t millisecs_t; // avoid pulling in their full headers as much as possible // to keep compile times down. -class Account; class AppFlavor; class AppConfig; class App; @@ -197,6 +196,7 @@ class Vector2f; class Vector3f; class Vector4f; class AppFlavorVR; +class V1Account; class VRGraphics; class Widget; diff --git a/src/ballistica/game/game.cc b/src/ballistica/game/game.cc index 31399a63..81bf71d8 100644 --- a/src/ballistica/game/game.cc +++ b/src/ballistica/game/game.cc @@ -7,7 +7,6 @@ #include "ballistica/audio/audio.h" #include "ballistica/core/thread.h" #include "ballistica/dynamics/bg/bg_dynamics.h" -#include "ballistica/game/account.h" #include "ballistica/game/connection/connection_set.h" #include "ballistica/game/connection/connection_to_client_udp.h" #include "ballistica/game/connection/connection_to_host_udp.h" @@ -19,6 +18,7 @@ #include "ballistica/game/session/host_session.h" #include "ballistica/game/session/net_client_session.h" #include "ballistica/game/session/replay_client_session.h" +#include "ballistica/game/v1_account.h" #include "ballistica/generic/json.h" #include "ballistica/generic/timer.h" #include "ballistica/graphics/graphics.h" @@ -271,10 +271,11 @@ void Game::PushSetV1LoginCall(V1AccountType account_type, V1LoginState account_state, const std::string& account_name, const std::string& account_id) { - thread()->PushCall([this, account_type, account_state, account_name, - account_id] { - g_account->SetLogin(account_type, account_state, account_name, account_id); - }); + thread()->PushCall( + [this, account_type, account_state, account_name, account_id] { + g_v1_account->SetLogin(account_type, account_state, account_name, + account_id); + }); } void Game::PushInitialScreenCreatedCall() { diff --git a/src/ballistica/game/player_spec.cc b/src/ballistica/game/player_spec.cc index c41c6f29..fc5b4502 100644 --- a/src/ballistica/game/player_spec.cc +++ b/src/ballistica/game/player_spec.cc @@ -3,8 +3,8 @@ #include "ballistica/game/player_spec.h" #include "ballistica/app/app.h" -#include "ballistica/game/account.h" #include "ballistica/game/game.h" +#include "ballistica/game/v1_account.h" #include "ballistica/generic/json.h" #include "ballistica/generic/utils.h" #include "ballistica/platform/platform.h" @@ -26,7 +26,8 @@ PlayerSpec::PlayerSpec(const std::string& s) { // Account type may technically be something we don't recognize, // but that's ok.. it'll just be 'invalid' to us in that case - account_type_ = Account::AccountTypeFromString(account_obj->valuestring); + account_type_ = + V1Account::AccountTypeFromString(account_obj->valuestring); success = true; } cJSON_Delete(root_obj); @@ -40,7 +41,7 @@ PlayerSpec::PlayerSpec(const std::string& s) { } auto PlayerSpec::GetDisplayString() const -> std::string { - return Account::AccountTypeToIconString(account_type_) + name_; + return V1Account::AccountTypeToIconString(account_type_) + name_; } auto PlayerSpec::GetShortName() const -> std::string { @@ -60,8 +61,8 @@ auto PlayerSpec::GetSpecString() const -> std::string { cJSON* root; root = cJSON_CreateObject(); cJSON_AddStringToObject(root, "n", name_.c_str()); - cJSON_AddStringToObject(root, "a", - Account::AccountTypeToString(account_type_).c_str()); + cJSON_AddStringToObject( + root, "a", V1Account::AccountTypeToString(account_type_).c_str()); cJSON_AddStringToObject(root, "sn", short_name_.c_str()); char* out = cJSON_PrintUnformatted(root); std::string out_s = out; @@ -76,10 +77,10 @@ auto PlayerSpec::GetSpecString() const -> std::string { auto PlayerSpec::GetAccountPlayerSpec() -> PlayerSpec { PlayerSpec spec; - if (g_account->GetLoginState() == V1LoginState::kSignedIn) { + if (g_v1_account->GetLoginState() == V1LoginState::kSignedIn) { spec.account_type_ = g_app->account_type; spec.name_ = - Utils::GetValidUTF8(g_account->GetLoginName().c_str(), "bsgaps"); + Utils::GetValidUTF8(g_v1_account->GetLoginName().c_str(), "bsgaps"); } else { // Headless builds fall back to V1 public-party name if that's available. if (g_buildconfig.headless_build() diff --git a/src/ballistica/game/account.cc b/src/ballistica/game/v1_account.cc similarity index 80% rename from src/ballistica/game/account.cc rename to src/ballistica/game/v1_account.cc index da5670c4..3b16bd91 100644 --- a/src/ballistica/game/account.cc +++ b/src/ballistica/game/v1_account.cc @@ -1,6 +1,6 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/game/account.h" +#include "ballistica/game/v1_account.h" #include "ballistica/app/app.h" #include "ballistica/game/game.h" @@ -10,7 +10,7 @@ namespace ballistica { -auto Account::AccountTypeFromString(const std::string& val) -> V1AccountType { +auto V1Account::AccountTypeFromString(const std::string& val) -> V1AccountType { if (val == "Game Center") { return V1AccountType::kGameCenter; } else if (val == "Game Circle") { @@ -36,7 +36,7 @@ auto Account::AccountTypeFromString(const std::string& val) -> V1AccountType { } } -auto Account::AccountTypeToString(V1AccountType type) -> std::string { +auto V1Account::AccountTypeToString(V1AccountType type) -> std::string { switch (type) { case V1AccountType::kGameCenter: return "Game Center"; @@ -63,7 +63,7 @@ auto Account::AccountTypeToString(V1AccountType type) -> std::string { } } -auto Account::AccountTypeToIconString(V1AccountType type) -> std::string { +auto V1Account::AccountTypeToIconString(V1AccountType type) -> std::string { switch (type) { case V1AccountType::kTest: return g_game->CharStr(SpecialChar::kTestAccount); @@ -89,34 +89,34 @@ auto Account::AccountTypeToIconString(V1AccountType type) -> std::string { } } -Account::Account() = default; +V1Account::V1Account() = default; -auto Account::GetLoginName() -> std::string { +auto V1Account::GetLoginName() -> std::string { std::scoped_lock lock(mutex_); return login_name_; } -auto Account::GetLoginID() -> std::string { +auto V1Account::GetLoginID() -> std::string { std::scoped_lock lock(mutex_); return login_id_; } -auto Account::GetToken() -> std::string { +auto V1Account::GetToken() -> std::string { std::scoped_lock lock(mutex_); return token_; } -auto Account::GetExtra() -> std::string { +auto V1Account::GetExtra() -> std::string { std::scoped_lock lock(mutex_); return extra_; } -auto Account::GetExtra2() -> std::string { +auto V1Account::GetExtra2() -> std::string { std::scoped_lock lock(mutex_); return extra_2_; } -auto Account::GetLoginState(int* state_num) -> V1LoginState { +auto V1Account::GetLoginState(int* state_num) -> V1LoginState { std::scoped_lock lock(mutex_); if (state_num) { *state_num = login_state_num_; @@ -124,18 +124,18 @@ auto Account::GetLoginState(int* state_num) -> V1LoginState { return login_state_; } -void Account::SetExtra(const std::string& extra) { +void V1Account::SetExtra(const std::string& extra) { std::scoped_lock lock(mutex_); extra_ = extra; } -void Account::SetExtra2(const std::string& extra) { +void V1Account::SetExtra2(const std::string& extra) { std::scoped_lock lock(mutex_); extra_2_ = extra; } -void Account::SetToken(const std::string& account_id, - const std::string& token) { +void V1Account::SetToken(const std::string& account_id, + const std::string& token) { std::scoped_lock lock(mutex_); // Hmm, does this compare logic belong in here? if (login_id_ == account_id) { @@ -143,9 +143,9 @@ void Account::SetToken(const std::string& account_id, } } -void Account::SetLogin(V1AccountType account_type, V1LoginState login_state, - const std::string& login_name, - const std::string& login_id) { +void V1Account::SetLogin(V1AccountType account_type, V1LoginState login_state, + const std::string& login_name, + const std::string& login_id) { bool call_login_did_change = false; { std::scoped_lock lock(mutex_); @@ -181,7 +181,7 @@ void Account::SetLogin(V1AccountType account_type, V1LoginState login_state, } } -void Account::SetProductsPurchased(const std::vector& products) { +void V1Account::SetProductsPurchased(const std::vector& products) { std::scoped_lock lock(mutex_); std::unordered_map purchases_old = product_purchases_; product_purchases_.clear(); @@ -193,7 +193,7 @@ void Account::SetProductsPurchased(const std::vector& products) { } } -auto Account::GetProductPurchased(const std::string& product) -> bool { +auto V1Account::GetProductPurchased(const std::string& product) -> bool { std::scoped_lock lock(mutex_); auto i = product_purchases_.find(product); if (i == product_purchases_.end()) { diff --git a/src/ballistica/game/account.h b/src/ballistica/game/v1_account.h similarity index 92% rename from src/ballistica/game/account.h rename to src/ballistica/game/v1_account.h index 099e2ca2..d7c03345 100644 --- a/src/ballistica/game/account.h +++ b/src/ballistica/game/v1_account.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_ACCOUNT_H_ -#define BALLISTICA_GAME_ACCOUNT_H_ +#ifndef BALLISTICA_GAME_V1_ACCOUNT_H_ +#define BALLISTICA_GAME_V1_ACCOUNT_H_ #include #include @@ -13,9 +13,9 @@ namespace ballistica { /// Global account functionality. -class Account { +class V1Account { public: - Account(); + V1Account(); static auto AccountTypeFromString(const std::string& val) -> V1AccountType; static auto AccountTypeToString(V1AccountType type) -> std::string; static auto AccountTypeToIconString(V1AccountType type) -> std::string; @@ -63,4 +63,4 @@ class Account { } // namespace ballistica -#endif // BALLISTICA_GAME_ACCOUNT_H_ +#endif // BALLISTICA_GAME_V1_ACCOUNT_H_ diff --git a/src/ballistica/python/methods/python_methods_ui.cc b/src/ballistica/python/methods/python_methods_ui.cc index 71b2dedc..d249b519 100644 --- a/src/ballistica/python/methods/python_methods_ui.cc +++ b/src/ballistica/python/methods/python_methods_ui.cc @@ -4,9 +4,9 @@ #include "ballistica/app/app.h" #include "ballistica/app/app_flavor.h" -#include "ballistica/game/account.h" #include "ballistica/game/connection/connection_set.h" #include "ballistica/game/game.h" +#include "ballistica/game/v1_account.h" #include "ballistica/input/input.h" #include "ballistica/internal/app_internal.h" #include "ballistica/python/python.h" diff --git a/src/ballistica/python/python.cc b/src/ballistica/python/python.cc index a2b0f7ba..e7540d64 100644 --- a/src/ballistica/python/python.cc +++ b/src/ballistica/python/python.cc @@ -6,12 +6,12 @@ #include "ballistica/audio/audio.h" #include "ballistica/core/thread.h" #include "ballistica/dynamics/material/material.h" -#include "ballistica/game/account.h" #include "ballistica/game/friend_score_set.h" #include "ballistica/game/game_stream.h" #include "ballistica/game/host_activity.h" #include "ballistica/game/player.h" #include "ballistica/game/score_to_beat.h" +#include "ballistica/game/v1_account.h" #include "ballistica/graphics/graphics.h" #include "ballistica/input/device/joystick.h" #include "ballistica/input/device/keyboard_input.h" From 8c4a23f90c88234949aea75819fb0eed7190cd41 Mon Sep 17 00:00:00 2001 From: Eric Date: Sat, 10 Sep 2022 10:21:38 -0700 Subject: [PATCH 03/40] tidying --- .efrocachemap | 64 +++++++++---------- CHANGELOG.md | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/ballistica.cc | 2 +- src/ballistica/ballistica.h | 18 +----- src/ballistica/core/thread.cc | 1 - src/ballistica/generic/json.cc | 1 + src/ballistica/scene/node/anim_curve_node.cc | 2 + src/ballistica/scene/node/math_node.cc | 2 + .../scene/node/time_display_node.cc | 2 + 10 files changed, 44 insertions(+), 52 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 757e08de..12a3d25e 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,33 +3995,33 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/15/a9/a9a878db308e8fb8e267d606a9f7", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ea/05/dc05633b650cf96c75ac3ed1a61d", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4d/f6/d118bb50716ae27418bf756702c3", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/30/a1/637841e59a1c277912aa6941a66f", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/9e/f4/cc859bd7ef55b939e2090128f307", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/12/c9/3301f4529de01e4a6fad66177b32", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/79/37/7d7547882a64e6b2ce2881d5f2ad", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/7b/8c/4606553615502fcd4a116c0d7fe2", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/1f/dc/501dfee10c4d4b04e8e7bbf60422", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3a/33/69ab076cfff5b561dae8194b5360", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5a/12/81b9b1d949f44111680758020956", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ae/a0/1514d1520f12dc4e9c34316310c1", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/49/6b/f44e345c4133418d816a94690d3b", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/07/92/e54b6c94216fc811d2c5e3c385a3", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/55/e1/2a35d261d1f7d29603220f456163", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e1/ef/ff3bfa49d2ba1c148dde704a4d87", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/06/b9/54708a2d4619f1cd3706fc79fd01", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/01/24/143285e78761359b9dfa2a425a34", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ca/80/386a30050daa0eb1cec9b6fad36b", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/0b/6d/32eab56b5d6179fb2b3e9308e3d8", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/bd/e9/558b331aa2cdde5b8814eeb5323d", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/0f/0d/94aa62be2e76dcb835736c843b47", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/9f/00/962eaa0e2f394c4b25e230da0a26", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f6/ad/8d342629f0c302ecc232b53f2357", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/eb/d9/2defa7dc3c271a3bd83effc7a133", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/19/2d/29e867f238863c66ce9b2de56223", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/6f/59/0a568faf3726bb40200d9d580762", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/98/5e/d4792f38ddfd1939148b12dac3e6", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2d/be/381047cad3bf61c09920f6e7e39e", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/23/98/31f1209b0dab20d649a91efe6b33", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/17/f9/9a50487bd39dbebe8236644446db", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ce/15/1e812f031786c676b482cb83f3a4", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/41/2b/647bcbdc19cb3d673ad1a05ab7e5", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a5/96/1ee470994dd104269bcc422f3163", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/f4/de/d89484b8903b14ebb56355e6021f", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/78/f4/3c95ba3ea5922813e2cef8af9019", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a7/1c/6003d3470a403c5107abffcbcf36", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/d1/0a/6621e3505c513ba0b976ebc9d896", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/ef/de/110b3f2961f088524a9913975f5a", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ed/a5/e01a9d56f095b855f29cf7bf5ed3", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/55/80/b022e845d983777a9244c0595a58", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e0/b3/7ccccfd8721033582cabdfe11f73", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/86/d2/d18cbc017a7d64001f96718cc5ed", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/49/c2/a8970c6be16183a808c991510aaa", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/64/9b/78cdb9eda7b30611774769859caa", "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/06/70/9e5becbdf873ea42fae9541dd123", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5d/7e/0dc09d6e811dc566ae3530794132", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8e/1b/8a766948a66967084da94255ad51", "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a3/47/f46d4455e6ee1ebb397508495d90", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c9/56/f14a3725ad5410f373e3d7bad340", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/54/ea/a250bddec2d7285ea5f4e9a29864", "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4c/32/de6296fdbd72d6a82d47a2403efd", "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d2/1d/c111bdf386178fd46eff2c5a8cff", "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3b/a5/e0aa43ca227c6bfa2ae8f44add14", @@ -4031,14 +4031,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c8/d2/5df66f66e26c1beb8a1e2b1f0613", "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7e/57/593e8ceeee37a65972f1fb30d2cd", "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2f/fc/a2ac394899e6527f8def0cad4d8a", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/06/03/28c2d1732805a77f322e2d90b6d7", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/83/93/f88d485633c4307f4d64ba27c615", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/2e/4a/dd9a19a2e3f475d39c1c2fd63c3a", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/13/7f/35479d1cdce4dc3a705e040be0d8", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/3d/ca/1f49d1c9ac5a158505de356cb650", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/f2/87/eefb0be2571dd410a1f438baea45", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/3a/a2/fa5c7a6b624a96147b3f9f79ffce", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/9c/96/ca2599d31f947eed5cdc26d64582", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/0e/b9/eb1339fc3c692095400631c081e3", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/07/30/90e690ff7358463d6a251e242138", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/0e/c5/d5607da49974e3aeb55a000e3ea5", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/f4/8b/99e574ea4ea13187fb401d7ae46f", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/c1/53/683aef250370cb33bc8779ba1f83", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/f4/33/0338c8271f7c9d75f947528023b7", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/ad/7a/9adff320f5a0f68be025aabf36a0", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/19/bd/bb787a4eb97ae97e7555de01ef49", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e8767974..e12d8313 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20799, api 7, 2022-09-10) +### 1.7.7 (build 20800, api 7, 2022-09-10) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 79ed2ff8..af43eb69 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -38,7 +38,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20799 + expected_build = 20800 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 8822fbb2..3d37710f 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -22,7 +22,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20799; +const int kAppBuildNumber = 20800; const char* kAppVersion = "1.7.7"; // Our standalone globals. diff --git a/src/ballistica/ballistica.h b/src/ballistica/ballistica.h index d8f15f8d..e9904c2d 100644 --- a/src/ballistica/ballistica.h +++ b/src/ballistica/ballistica.h @@ -5,28 +5,14 @@ // Try to ensure they're providing proper config stuff. #ifndef BA_HAVE_CONFIG -#error platform config has not been defined! +#error ballistica platform config has not been defined! #endif -// FIXME: We need to update to C++17 to get unified std::abs(). -// Until we do that, int types are defined in -// and float/double in , meaning its possible to call the wrong -// version if we aren't careful and only include one header. -// For now just including both here at the top level to hopefully -// minimize problems. -// UPDATE: We should now be building with C++17 everywhere; should add a -// check to ensure that is the case and can simplify this. #ifdef __cplusplus -#include -#include -#include -#include -#include #include -#include -#include #endif +// Minimum functionality we want available everywhere we are included. #include "ballistica/core/exception.h" #include "ballistica/core/inline.h" #include "ballistica/core/macros.h" diff --git a/src/ballistica/core/thread.cc b/src/ballistica/core/thread.cc index 4929338e..a5490b52 100644 --- a/src/ballistica/core/thread.cc +++ b/src/ballistica/core/thread.cc @@ -11,7 +11,6 @@ namespace ballistica { void Thread::SetInternalThreadName(const std::string& name) { std::scoped_lock lock(g_app->thread_name_map_mutex); - std::thread::id thread_id = std::this_thread::get_id(); g_app->thread_name_map[std::this_thread::get_id()] = name; } diff --git a/src/ballistica/generic/json.cc b/src/ballistica/generic/json.cc index 21429698..d90fecfb 100644 --- a/src/ballistica/generic/json.cc +++ b/src/ballistica/generic/json.cc @@ -29,6 +29,7 @@ #include "ballistica/generic/json.h" #include +#include #if BA_OSTYPE_LINUX #include diff --git a/src/ballistica/scene/node/anim_curve_node.cc b/src/ballistica/scene/node/anim_curve_node.cc index ab60be8a..94c796e8 100644 --- a/src/ballistica/scene/node/anim_curve_node.cc +++ b/src/ballistica/scene/node/anim_curve_node.cc @@ -2,6 +2,8 @@ #include "ballistica/scene/node/anim_curve_node.h" +#include + #include "ballistica/scene/node/node_attribute.h" #include "ballistica/scene/node/node_type.h" diff --git a/src/ballistica/scene/node/math_node.cc b/src/ballistica/scene/node/math_node.cc index 3fa0662f..2108b0b6 100644 --- a/src/ballistica/scene/node/math_node.cc +++ b/src/ballistica/scene/node/math_node.cc @@ -2,6 +2,8 @@ #include "ballistica/scene/node/math_node.h" +#include + #include "ballistica/scene/node/node_attribute.h" #include "ballistica/scene/node/node_type.h" diff --git a/src/ballistica/scene/node/time_display_node.cc b/src/ballistica/scene/node/time_display_node.cc index 456f60f5..ff23f07e 100644 --- a/src/ballistica/scene/node/time_display_node.cc +++ b/src/ballistica/scene/node/time_display_node.cc @@ -2,6 +2,8 @@ #include "ballistica/scene/node/time_display_node.h" +#include + #include "ballistica/game/game.h" #include "ballistica/generic/utils.h" #include "ballistica/scene/node/node_attribute.h" From 1cac234fc5d2fb954623993478e37bf2b33cd6fb Mon Sep 17 00:00:00 2001 From: Eric Date: Sat, 10 Sep 2022 12:33:36 -0700 Subject: [PATCH 04/40] mooooore tidying --- .efrocachemap | 56 +++++++++---------- CHANGELOG.md | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- ballisticacore-cmake/CMakeLists.txt | 4 +- .../Generic/BallisticaCoreGeneric.vcxproj | 4 +- .../BallisticaCoreGeneric.vcxproj.filters | 4 +- .../Headless/BallisticaCoreHeadless.vcxproj | 4 +- .../BallisticaCoreHeadless.vcxproj.filters | 4 +- src/ballistica/ballistica.cc | 16 +++--- src/ballistica/ballistica.h | 2 +- .../game/connection/connection_set.cc | 20 +++---- .../connection/connection_to_client_udp.cc | 8 +-- .../game/connection/connection_to_host_udp.cc | 10 ++-- src/ballistica/game/game.cc | 3 +- src/ballistica/media/media.cc | 38 +++++-------- src/ballistica/media/media.h | 41 ++++++-------- src/ballistica/networking/network_reader.cc | 6 +- src/ballistica/networking/network_reader.h | 5 +- ...work_write_module.cc => network_writer.cc} | 6 +- ...etwork_write_module.h => network_writer.h} | 8 +-- 20 files changed, 111 insertions(+), 132 deletions(-) rename src/ballistica/networking/{network_write_module.cc => network_writer.cc} (86%) rename src/ballistica/networking/{network_write_module.h => network_writer.h} (66%) diff --git a/.efrocachemap b/.efrocachemap index 12a3d25e..c59702fc 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/0f/0d/94aa62be2e76dcb835736c843b47", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/9f/00/962eaa0e2f394c4b25e230da0a26", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f6/ad/8d342629f0c302ecc232b53f2357", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/eb/d9/2defa7dc3c271a3bd83effc7a133", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/19/2d/29e867f238863c66ce9b2de56223", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/6f/59/0a568faf3726bb40200d9d580762", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/98/5e/d4792f38ddfd1939148b12dac3e6", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2d/be/381047cad3bf61c09920f6e7e39e", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/23/98/31f1209b0dab20d649a91efe6b33", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/17/f9/9a50487bd39dbebe8236644446db", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ce/15/1e812f031786c676b482cb83f3a4", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/41/2b/647bcbdc19cb3d673ad1a05ab7e5", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a5/96/1ee470994dd104269bcc422f3163", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/f4/de/d89484b8903b14ebb56355e6021f", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/78/f4/3c95ba3ea5922813e2cef8af9019", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a7/1c/6003d3470a403c5107abffcbcf36", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/d1/0a/6621e3505c513ba0b976ebc9d896", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/ef/de/110b3f2961f088524a9913975f5a", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ed/a5/e01a9d56f095b855f29cf7bf5ed3", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/55/80/b022e845d983777a9244c0595a58", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/91/e4/e85f3feee6640ce65027660e5590", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/dd/50/db8d4e087b3fe272e9575b95996b", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e8/2f/1c8653ee8f0bad9cded74ebf5100", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2e/86/b9fb1d80caf79d23b785327a0cc7", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/0f/4e/67f2eea7fa848b12994d487893dc", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/b2/c4/d9555b8a060d11e6b1346cd82d12", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/59/41/3aafb5bd7c6dddad37c89f304fb9", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cc/c1/a7cbdc71810ee752746eda33dd31", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/36/67/6a8b809011b4023533712d2df7b6", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/11/8c/172381e8a477cc11ee0e24460901", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/79/ab/05c53d0807929316235d6e7382cd", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/18/c2/415efdababdd14553c3adbeaaf7b", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/3a/2d/863cc304f4856e34c81093b59db1", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/33/fd/00a992c1d496ff85a99d381c6498", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e4/58/ac07183ee59eedbb78dcf2f0e91f", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cf/cb/91d2181102f6045e4d19cc73a18d", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/ce/f8/3e7a2452dae94b5cd857424e31fa", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/04/f8/46d2bcc4f5d5b7c7d9bcc7b91418", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/3b/10/9c15dbfbca54c1260b146de3029b", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/26/90/d2f4b8212b12508ed222609c7a7d", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e0/b3/7ccccfd8721033582cabdfe11f73", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/86/d2/d18cbc017a7d64001f96718cc5ed", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/64/9b/78cdb9eda7b30611774769859caa", @@ -4031,14 +4031,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c8/d2/5df66f66e26c1beb8a1e2b1f0613", "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7e/57/593e8ceeee37a65972f1fb30d2cd", "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2f/fc/a2ac394899e6527f8def0cad4d8a", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/0e/b9/eb1339fc3c692095400631c081e3", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/07/30/90e690ff7358463d6a251e242138", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/0e/c5/d5607da49974e3aeb55a000e3ea5", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/f4/8b/99e574ea4ea13187fb401d7ae46f", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/c1/53/683aef250370cb33bc8779ba1f83", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/f4/33/0338c8271f7c9d75f947528023b7", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/ad/7a/9adff320f5a0f68be025aabf36a0", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/19/bd/bb787a4eb97ae97e7555de01ef49", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/20/4e/9afc0e73bb26d63032c3525d9373", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/f2/ab/eac71319d5184a3dd6b2ad74cf92", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/ad/20/97feffa58fcbc8ac2ed2d9892326", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/0a/d8/6e58979b57cf74c0d675508b207f", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/79/c7/cb4590d0e233fa0455f9bd3158b0", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/2a/14/99b6932f7e20e988d67faa4327d9", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/b0/77/b85ef1b5a280aa2426a613e76ec5", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/b9/22/020a23ba4dba0b5871f78622bd67", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e12d8313..f472ce3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20800, api 7, 2022-09-10) +### 1.7.7 (build 20803, api 7, 2022-09-10) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index af43eb69..6c34fe48 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -38,7 +38,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20800 + expected_build = 20803 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/ballisticacore-cmake/CMakeLists.txt b/ballisticacore-cmake/CMakeLists.txt index c206b385..a807d3e3 100644 --- a/ballisticacore-cmake/CMakeLists.txt +++ b/ballisticacore-cmake/CMakeLists.txt @@ -502,8 +502,8 @@ add_executable(ballisticacore ${BA_SRC_ROOT}/ballistica/media/media_server.h ${BA_SRC_ROOT}/ballistica/networking/network_reader.cc ${BA_SRC_ROOT}/ballistica/networking/network_reader.h - ${BA_SRC_ROOT}/ballistica/networking/network_write_module.cc - ${BA_SRC_ROOT}/ballistica/networking/network_write_module.h + ${BA_SRC_ROOT}/ballistica/networking/network_writer.cc + ${BA_SRC_ROOT}/ballistica/networking/network_writer.h ${BA_SRC_ROOT}/ballistica/networking/networking.cc ${BA_SRC_ROOT}/ballistica/networking/networking.h ${BA_SRC_ROOT}/ballistica/networking/networking_sys.h diff --git a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj index 266f06d5..4c34c25e 100644 --- a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj +++ b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj @@ -493,8 +493,8 @@ - - + + diff --git a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters index 521f7a2f..8f86a56f 100644 --- a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters +++ b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters @@ -913,10 +913,10 @@ ballistica\networking - + ballistica\networking - + ballistica\networking diff --git a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj index fafb946a..c8692ebb 100644 --- a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj +++ b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj @@ -488,8 +488,8 @@ - - + + diff --git a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters index 521f7a2f..8f86a56f 100644 --- a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters +++ b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters @@ -913,10 +913,10 @@ ballistica\networking - + ballistica\networking - + ballistica\networking diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 3d37710f..171ece0f 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -13,8 +13,9 @@ #include "ballistica/game/v1_account.h" #include "ballistica/graphics/graphics_server.h" #include "ballistica/internal/app_internal.h" +#include "ballistica/media/media.h" #include "ballistica/media/media_server.h" -#include "ballistica/networking/network_write_module.h" +#include "ballistica/networking/network_writer.h" #include "ballistica/platform/platform.h" #include "ballistica/python/python.h" #include "ballistica/scene/scene.h" @@ -22,7 +23,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20800; +const int kAppBuildNumber = 20803; const char* kAppVersion = "1.7.7"; // Our standalone globals. @@ -48,7 +49,7 @@ Media* g_media{}; MediaServer* g_media_server{}; NetworkReader* g_network_reader{}; Networking* g_networking{}; -NetworkWriteModule* g_network_write_module{}; +NetworkWriteModule* g_network_writer{}; Platform* g_platform{}; Python* g_python{}; StdInputModule* g_std_input_module{}; @@ -90,8 +91,8 @@ auto BallisticaMain(int argc, char** argv) -> int { g_app = new App(argc, argv); g_platform = Platform::Create(); - // If we're not running under a Python executable, we need to set up - // our own Python environment. + // Bootstrap our Python environment as early as we can (depends on + // g_platform for locating OS-specific paths). assert(g_python == nullptr); g_python = new Python(); @@ -103,8 +104,10 @@ auto BallisticaMain(int argc, char** argv) -> int { g_app_flavor = g_platform->CreateAppFlavor(); g_app_flavor->PostInit(); + // Various other subsystems. g_v1_account = new V1Account(); g_utils = new Utils(); + g_media = new Media(); Scene::Init(); // Spin up our other standard threads. @@ -279,8 +282,7 @@ auto InMediaThread() -> bool { } auto InNetworkWriteThread() -> bool { - return (g_network_write_module - && g_network_write_module->thread()->IsCurrent()); + return (g_network_writer && g_network_writer->thread()->IsCurrent()); } auto Log(const std::string& msg, bool to_stdout, bool to_server) -> void { diff --git a/src/ballistica/ballistica.h b/src/ballistica/ballistica.h index e9904c2d..6b290d95 100644 --- a/src/ballistica/ballistica.h +++ b/src/ballistica/ballistica.h @@ -122,7 +122,7 @@ extern Media* g_media; extern MediaServer* g_media_server; extern Networking* g_networking; extern NetworkReader* g_network_reader; -extern NetworkWriteModule* g_network_write_module; +extern NetworkWriteModule* g_network_writer; extern Platform* g_platform; extern Python* g_python; extern StdInputModule* g_std_input_module; diff --git a/src/ballistica/game/connection/connection_set.cc b/src/ballistica/game/connection/connection_set.cc index e9e164b7..25f9f027 100644 --- a/src/ballistica/game/connection/connection_set.cc +++ b/src/ballistica/game/connection/connection_set.cc @@ -9,7 +9,7 @@ #include "ballistica/game/player.h" #include "ballistica/game/session/host_session.h" #include "ballistica/input/device/input_device.h" -#include "ballistica/networking/network_write_module.h" +#include "ballistica/networking/network_writer.h" #include "ballistica/networking/sockaddr.h" #include "ballistica/python/python.h" #include "ballistica/python/python_sys.h" @@ -463,7 +463,7 @@ auto ConnectionSet::UDPConnectionPacket(const std::vector& data_in, PushClientDisconnectedCall(client_id); // Now send an ack so they know it's been taken care of. - g_network_write_module->PushSendToCall( + g_network_writer->PushSendToCall( {BA_PACKET_DISCONNECT_FROM_CLIENT_ACK, client_id}, addr); } break; @@ -490,7 +490,7 @@ auto ConnectionSet::UDPConnectionPacket(const std::vector& data_in, } // Now send an ack so they know it's been taken care of. - g_network_write_module->PushSendToCall( + g_network_writer->PushSendToCall( {BA_PACKET_DISCONNECT_FROM_HOST_ACK, client_id}, addr); } break; @@ -516,7 +516,7 @@ auto ConnectionSet::UDPConnectionPacket(const std::vector& data_in, return; } else { // Send a disconnect request aimed at them. - g_network_write_module->PushSendToCall( + g_network_writer->PushSendToCall( {BA_PACKET_DISCONNECT_FROM_HOST_REQUEST, client_id}, addr); } } @@ -621,15 +621,15 @@ auto ConnectionSet::UDPConnectionPacket(const std::vector& data_in, // Newer version have a specific party-full message; send that first // but also follow up with a generic deny message for older clients. - g_network_write_module->PushSendToCall( + g_network_writer->PushSendToCall( {BA_PACKET_CLIENT_DENY_PARTY_FULL, request_id}, addr); - g_network_write_module->PushSendToCall( - {BA_PACKET_CLIENT_DENY, request_id}, addr); + g_network_writer->PushSendToCall({BA_PACKET_CLIENT_DENY, request_id}, + addr); } else if (connection_to_host_.exists()) { // If we're connected to someone else, we can't have clients. - g_network_write_module->PushSendToCall( + g_network_writer->PushSendToCall( {BA_PACKET_CLIENT_DENY_ALREADY_IN_PARTY, request_id}, addr); } else { // Otherwise go ahead and make them a new client connection. @@ -666,7 +666,7 @@ auto ConnectionSet::UDPConnectionPacket(const std::vector& data_in, std::vector msg_out(2); msg_out[0] = BA_PACKET_CLIENT_DENY; msg_out[1] = request_id; - g_network_write_module->PushSendToCall(msg_out, addr); + g_network_writer->PushSendToCall(msg_out, addr); Log("All client slots full; really?.."); break; } @@ -684,7 +684,7 @@ auto ConnectionSet::UDPConnectionPacket(const std::vector& data_in, msg_out[1] = static_cast_check_fit(connection_to_client->id()); msg_out[2] = request_id; - g_network_write_module->PushSendToCall(msg_out, addr); + g_network_writer->PushSendToCall(msg_out, addr); } } break; diff --git a/src/ballistica/game/connection/connection_to_client_udp.cc b/src/ballistica/game/connection/connection_to_client_udp.cc index b75ad69a..b330ba8e 100644 --- a/src/ballistica/game/connection/connection_to_client_udp.cc +++ b/src/ballistica/game/connection/connection_to_client_udp.cc @@ -4,7 +4,7 @@ #include "ballistica/game/connection/connection_set.h" #include "ballistica/game/game.h" -#include "ballistica/networking/network_write_module.h" +#include "ballistica/networking/network_writer.h" #include "ballistica/networking/sockaddr.h" namespace ballistica { @@ -39,8 +39,8 @@ void ConnectionToClientUDP::SendGamePacketCompressed( // Ship this off to the net-out thread to send; at this point we don't know // or case what happens to it. - assert(g_network_write_module); - g_network_write_module->PushSendToCall(data_full, *addr_); + assert(g_network_writer); + g_network_writer->PushSendToCall(data_full, *addr_); } void ConnectionToClientUDP::Update() { @@ -89,7 +89,7 @@ void ConnectionToClientUDP::SendDisconnectRequest() { std::vector data(2); data[0] = BA_PACKET_DISCONNECT_FROM_HOST_REQUEST; data[1] = static_cast(id()); - g_network_write_module->PushSendToCall(data, *addr_); + g_network_writer->PushSendToCall(data, *addr_); } } // namespace ballistica diff --git a/src/ballistica/game/connection/connection_to_host_udp.cc b/src/ballistica/game/connection/connection_to_host_udp.cc index 79d3f906..f7dca8e8 100644 --- a/src/ballistica/game/connection/connection_to_host_udp.cc +++ b/src/ballistica/game/connection/connection_to_host_udp.cc @@ -5,7 +5,7 @@ #include "ballistica/game/connection/connection_set.h" #include "ballistica/game/game.h" #include "ballistica/math/vector3f.h" -#include "ballistica/networking/network_write_module.h" +#include "ballistica/networking/network_writer.h" #include "ballistica/networking/sockaddr.h" namespace ballistica { @@ -71,7 +71,7 @@ void ConnectionToHostUDP::Update() { memcpy(&(msg[1]), &p_version, 2); msg[3] = request_id_; memcpy(&(msg[4]), uuid.c_str(), uuid.size()); - g_network_write_module->PushSendToCall(msg, *addr_); + g_network_writer->PushSendToCall(msg, *addr_); } } @@ -128,7 +128,7 @@ void ConnectionToHostUDP::SendDisconnectRequest() { std::vector data(2); data[0] = BA_PACKET_DISCONNECT_FROM_CLIENT_REQUEST; data[1] = static_cast_check_fit(client_id_); - g_network_write_module->PushSendToCall(data, *addr_); + g_network_writer->PushSendToCall(data, *addr_); } } @@ -152,8 +152,8 @@ void ConnectionToHostUDP::SendGamePacketCompressed( // Ship this off to the net-out thread to send; at this point we don't know // or care what happens to it. - assert(g_network_write_module); - g_network_write_module->PushSendToCall(data_full, *addr_); + assert(g_network_writer); + g_network_writer->PushSendToCall(data_full, *addr_); } void ConnectionToHostUDP::Error(const std::string& msg) { diff --git a/src/ballistica/game/game.cc b/src/ballistica/game/game.cc index 81bf71d8..a5455895 100644 --- a/src/ballistica/game/game.cc +++ b/src/ballistica/game/game.cc @@ -28,7 +28,7 @@ #include "ballistica/input/device/keyboard_input.h" #include "ballistica/input/device/touch_input.h" #include "ballistica/internal/app_internal.h" -#include "ballistica/networking/network_write_module.h" +#include "ballistica/networking/network_writer.h" #include "ballistica/networking/sockaddr.h" #include "ballistica/networking/telnet_server.h" #include "ballistica/python/python.h" @@ -79,7 +79,6 @@ Game::Game(Thread* thread) assert(g_graphics == nullptr); g_graphics = g_platform->CreateGraphics(); TextGraphics::Init(); - Media::Init(); Audio::Init(); if (!HeadlessMode()) { BGDynamics::Init(); diff --git a/src/ballistica/media/media.cc b/src/ballistica/media/media.cc index b0e280d5..eb1ec6f2 100644 --- a/src/ballistica/media/media.cc +++ b/src/ballistica/media/media.cc @@ -22,7 +22,7 @@ namespace ballistica { -// Debug printing. +// Debug printing: #define BA_SHOW_LOADS_UNLOADS 0 #define SHOW_PRUNING_INFO 0 @@ -38,12 +38,6 @@ namespace ballistica { // How long we should spend loading media in each runPendingLoads() call. #define PENDING_LOAD_PROCESS_TIME 5 -void Media::Init() { - // Just create our singleton. - assert(g_media == nullptr); - g_media = new Media(); -} - Media::Media() { media_paths_.emplace_back("ba_data"); for (bool& have_pending_load : have_pending_loads_) { @@ -289,8 +283,6 @@ void Media::LoadSystemMedia() { system_media_loaded_ = true; } -Media::~Media() = default; - void Media::PrintLoadInfo() { std::string s; char buffer[256]; @@ -615,8 +607,19 @@ void Media::MarkComponentForLoad(MediaComponentData* c) { // ClearPendingLoadsDoneList) auto media_ptr = new Object::Ref(c); - g_media_server->thread()->PushRunnable( - Object::NewDeferred(media_ptr)); + + g_media_server->thread()->PushCall([media_ptr] { + assert(InMediaThread()); + + // add our pointer to one of the preload lists and shake our preload thread + // to wake it up + if ((**media_ptr).GetMediaType() == MediaType::kSound) { + g_media_server->pending_preloads_audio_.push_back(media_ptr); + } else { + g_media_server->pending_preloads_.push_back(media_ptr); + } + g_media_server->process_timer_->SetLength(0); + }); } #pragma clang diagnostic push @@ -1216,19 +1219,6 @@ void Media::ClearPendingLoadsDoneList() { pending_loads_done_.clear(); } -void Media::PreloadRunnable::Run() { - assert(InMediaThread()); - - // add our pointer to one of the preload lists and shake our preload thread to - // wake it up - if ((**c).GetMediaType() == MediaType::kSound) { - g_media_server->pending_preloads_audio_.push_back(c); - } else { - g_media_server->pending_preloads_.push_back(c); - } - g_media_server->process_timer_->SetLength(0); -} - void Media::AddPackage(const std::string& name, const std::string& path) { // we don't protect package-path access so make sure its always from here.. assert(InLogicThread()); diff --git a/src/ballistica/media/media.h b/src/ballistica/media/media.h index bdb3cd8a..f9f1e7df 100644 --- a/src/ballistica/media/media.h +++ b/src/ballistica/media/media.h @@ -8,17 +8,14 @@ #include #include -#include "ballistica/core/context.h" #include "ballistica/core/object.h" -#include "ballistica/generic/runnable.h" namespace ballistica { /// Global media wrangling class. class Media { public: - static void Init(); - ~Media(); + Media(); /// Handy function to try to return a bit of media from a std::unordered_map /// of weak-refs, loading/adding it if need be. @@ -43,8 +40,8 @@ class Media { } } - void AddPackage(const std::string& name, const std::string& path); - void Prune(int level = 0); + auto AddPackage(const std::string& name, const std::string& path) -> void; + auto Prune(int level = 0) -> void; /// Finish loading any media that has been preloaded but still needs to be /// loaded by the proper thread. @@ -55,26 +52,25 @@ class Media { /// Return true if graphics loads remain to be done. auto RunPendingGraphicsLoads() -> bool; - void ClearPendingLoadsDoneList(); + auto ClearPendingLoadsDoneList() -> void; template auto RunPendingLoadList(std::vector*>* cList) -> bool; /// This function takes a newly allocated pointer which /// is deleted once the load is completed. - void AddPendingLoad(Object::Ref* c); - struct PreloadRunnable; + auto AddPendingLoad(Object::Ref* c) -> void; enum class FileType { kModel, kCollisionModel, kTexture, kSound, kData }; auto FindMediaFile(FileType fileType, const std::string& file_in) -> std::string; /// Unload renderer-specific bits only (gl display lists, etc) - used when /// recreating/adjusting the renderer. - void UnloadRendererBits(bool textures, bool models); + auto UnloadRendererBits(bool textures, bool models) -> void; /// Should be called from the game thread after UnloadRendererBits(); /// kicks off bg loads for all existing unloaded media. - void MarkAllMediaForLoad(); - void PrintLoadInfo(); + auto MarkAllMediaForLoad() -> void; + auto PrintLoadInfo() -> void; auto GetModelPendingLoadCount() -> int; auto GetTexturePendingLoadCount() -> int; @@ -135,7 +131,7 @@ class Media { } /// Load up hard-coded media for interface, etc. - void LoadSystemMedia(); + auto LoadSystemMedia() -> void; auto total_model_count() const -> uint32_t { return static_cast(models_.size()); @@ -150,20 +146,15 @@ class Media { auto total_collide_model_count() const -> uint32_t { return static_cast(collide_models_.size()); } - struct PreloadRunnable : public Runnable { - explicit PreloadRunnable(Object::Ref* c_in) : c(c_in) {} - void Run() override; - Object::Ref* c; - }; private: - Media(); - static void MarkComponentForLoad(MediaComponentData* c); - void LoadSystemTexture(SystemTextureID id, const char* name); - void LoadSystemCubeMapTexture(SystemCubeMapTextureID id, const char* name); - void LoadSystemSound(SystemSoundID id, const char* name); - void LoadSystemData(SystemDataID id, const char* name); - void LoadSystemModel(SystemModelID id, const char* name); + static auto MarkComponentForLoad(MediaComponentData* c) -> void; + auto LoadSystemTexture(SystemTextureID id, const char* name) -> void; + auto LoadSystemCubeMapTexture(SystemCubeMapTextureID id, const char* name) + -> void; + auto LoadSystemSound(SystemSoundID id, const char* name) -> void; + auto LoadSystemData(SystemDataID id, const char* name) -> void; + auto LoadSystemModel(SystemModelID id, const char* name) -> void; template auto GetComponentPendingLoadCount( diff --git a/src/ballistica/networking/network_reader.cc b/src/ballistica/networking/network_reader.cc index 8ca323ff..653a28c6 100644 --- a/src/ballistica/networking/network_reader.cc +++ b/src/ballistica/networking/network_reader.cc @@ -8,7 +8,7 @@ #include "ballistica/generic/json.h" #include "ballistica/input/remote_app.h" #include "ballistica/math/vector3f.h" -#include "ballistica/networking/network_write_module.h" +#include "ballistica/networking/network_writer.h" #include "ballistica/networking/sockaddr.h" #include "ballistica/platform/platform.h" #include "ballistica/python/python.h" @@ -158,7 +158,7 @@ static auto HandleGameQuery(const char* buffer, size_t size, std::vector msg_buffer(msg_len); memcpy(msg_buffer.data(), msg, msg_len); - g_network_write_module->PushSendToCall(msg_buffer, SockAddr(*from)); + g_network_writer->PushSendToCall(msg_buffer, SockAddr(*from)); } else { Log("Error: Got invalid game-query packet of len " + std::to_string(size) @@ -505,6 +505,4 @@ auto NetworkReader::OpenSockets() -> void { } } -NetworkReader::~NetworkReader() = default; - } // namespace ballistica diff --git a/src/ballistica/networking/network_reader.h b/src/ballistica/networking/network_reader.h index a21b1ab6..0e70cd2f 100644 --- a/src/ballistica/networking/network_reader.h +++ b/src/ballistica/networking/network_reader.h @@ -13,8 +13,8 @@ namespace ballistica { -// This is a special thread that manages the game's main network sockets; -// it handles creating/destroying them as well as listening for incoming +// A subsystem that manages the game's main network sockets. +// It handles creating/destroying them as well as listening for incoming // packets. it is not a normal BA thread so doesn't have the ability to receive // messages (it generally sits blocked in a select() call). Writing to these // sockets takes place in other threads; just make sure to lock the mutex and @@ -22,7 +22,6 @@ namespace ballistica { class NetworkReader { public: explicit NetworkReader(int port); - ~NetworkReader(); auto Pause() -> void; auto Resume() -> void; auto port4() const { return port4_; } diff --git a/src/ballistica/networking/network_write_module.cc b/src/ballistica/networking/network_writer.cc similarity index 86% rename from src/ballistica/networking/network_write_module.cc rename to src/ballistica/networking/network_writer.cc index 93dbde63..c6a1a269 100644 --- a/src/ballistica/networking/network_write_module.cc +++ b/src/ballistica/networking/network_writer.cc @@ -1,6 +1,6 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/networking/network_write_module.h" +#include "ballistica/networking/network_writer.h" #include "ballistica/core/thread.h" #include "ballistica/networking/networking.h" @@ -10,8 +10,8 @@ namespace ballistica { NetworkWriteModule::NetworkWriteModule(Thread* thread) : thread_(thread) { // we're a singleton - assert(g_network_write_module == nullptr); - g_network_write_module = this; + assert(g_network_writer == nullptr); + g_network_writer = this; } void NetworkWriteModule::PushSendToCall(const std::vector& msg, diff --git a/src/ballistica/networking/network_write_module.h b/src/ballistica/networking/network_writer.h similarity index 66% rename from src/ballistica/networking/network_write_module.h rename to src/ballistica/networking/network_writer.h index 20a01131..1c8235c6 100644 --- a/src/ballistica/networking/network_write_module.h +++ b/src/ballistica/networking/network_writer.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_NETWORKING_NETWORK_WRITE_MODULE_H_ -#define BALLISTICA_NETWORKING_NETWORK_WRITE_MODULE_H_ +#ifndef BALLISTICA_NETWORKING_NETWORK_WRITER_H_ +#define BALLISTICA_NETWORKING_NETWORK_WRITER_H_ #include @@ -9,7 +9,7 @@ namespace ballistica { -// this thread handles network output and whatnot +// A subsystem handling outbound network traffic. class NetworkWriteModule { public: void PushSendToCall(const std::vector& msg, const SockAddr& addr); @@ -22,4 +22,4 @@ class NetworkWriteModule { } // namespace ballistica -#endif // BALLISTICA_NETWORKING_NETWORK_WRITE_MODULE_H_ +#endif // BALLISTICA_NETWORKING_NETWORK_WRITER_H_ From 7231ff2cfb89058ff2ea47464c0238475a2aa9b4 Mon Sep 17 00:00:00 2001 From: Eric Date: Sat, 10 Sep 2022 14:07:36 -0700 Subject: [PATCH 05/40] renamed media to assets in c++ layer --- .efrocachemap | 56 +-- CHANGELOG.md | 4 +- .../ba_data/python/._bainternal_sources_hash | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- ballisticacore-cmake/CMakeLists.txt | 72 ++-- .../Generic/BallisticaCoreGeneric.vcxproj | 72 ++-- .../BallisticaCoreGeneric.vcxproj.filters | 222 ++++++------ .../Headless/BallisticaCoreHeadless.vcxproj | 72 ++-- .../BallisticaCoreHeadless.vcxproj.filters | 222 ++++++------ src/ballistica/app/stress_test.cc | 10 +- .../{media/media.cc => assets/assets.cc} | 341 +++++++++--------- .../{media/media.h => assets/assets.h} | 80 ++-- .../assets_server.cc} | 37 +- .../media_server.h => assets/assets_server.h} | 18 +- .../component/asset_component.cc} | 12 +- .../component/asset_component.h} | 12 +- .../component/collide_model.cc | 8 +- .../component/collide_model.h | 16 +- .../component/cube_map_texture.cc | 10 +- .../component/cube_map_texture.h | 14 +- .../{media => assets}/component/data.cc | 8 +- .../{media => assets}/component/data.h | 18 +- .../{media => assets}/component/model.cc | 8 +- .../{media => assets}/component/model.h | 20 +- .../{media => assets}/component/sound.cc | 12 +- .../{media => assets}/component/sound.h | 12 +- .../{media => assets}/component/texture.cc | 14 +- .../{media => assets}/component/texture.h | 14 +- .../data/asset_component_data.cc} | 20 +- .../data/asset_component_data.h} | 22 +- .../data/collide_model_data.cc | 6 +- .../data/collide_model_data.h | 14 +- .../{media => assets}/data/data_data.cc | 6 +- .../{media => assets}/data/data_data.h | 12 +- .../{media => assets}/data/model_data.cc | 4 +- .../{media => assets}/data/model_data.h | 14 +- .../data/model_renderer_data.h | 6 +- .../{media => assets}/data/sound_data.cc | 6 +- .../{media => assets}/data/sound_data.h | 12 +- .../{media => assets}/data/texture_data.cc | 9 +- .../{media => assets}/data/texture_data.h | 14 +- .../data/texture_preload_data.cc | 4 +- .../data/texture_preload_data.h | 6 +- .../data/texture_renderer_data.h | 6 +- src/ballistica/audio/audio.cc | 2 +- src/ballistica/audio/audio_server.cc | 14 +- src/ballistica/audio/audio_server.h | 4 +- src/ballistica/audio/audio_source.cc | 2 +- src/ballistica/ballistica.cc | 28 +- src/ballistica/ballistica.h | 6 +- src/ballistica/core/object.cc | 10 +- src/ballistica/core/thread.cc | 12 +- src/ballistica/core/thread.h | 2 +- src/ballistica/core/types.h | 10 +- src/ballistica/dynamics/bg/bg_dynamics.cc | 34 +- .../dynamics/bg/bg_dynamics_server.cc | 2 +- src/ballistica/dynamics/collision_cache.cc | 12 +- src/ballistica/dynamics/dynamics.cc | 4 +- .../material/impact_sound_material_action.h | 2 +- .../dynamics/material/material_context.cc | 2 +- .../material/roll_sound_material_action.cc | 2 +- .../material/roll_sound_material_action.h | 2 +- .../material/skid_sound_material_action.h | 2 +- .../dynamics/material/sound_material_action.h | 2 +- src/ballistica/dynamics/rigid_body.cc | 2 +- .../game/connection/connection_to_client.cc | 6 +- .../game/connection/connection_to_host.cc | 10 +- src/ballistica/game/game.cc | 21 +- src/ballistica/game/game.h | 4 +- src/ballistica/game/game_stream.cc | 28 +- src/ballistica/game/host_activity.cc | 20 +- src/ballistica/game/session/client_session.cc | 8 +- src/ballistica/game/session/host_session.cc | 16 +- .../game/session/net_client_session.cc | 14 +- .../graphics/component/object_component.cc | 22 +- .../graphics/component/simple_component.cc | 5 +- .../graphics/component/smoke_component.cc | 4 +- .../graphics/component/sprite_component.cc | 2 +- src/ballistica/graphics/frame_def.h | 8 +- src/ballistica/graphics/gl/renderer_gl.cc | 4 +- src/ballistica/graphics/graphics.cc | 44 +-- src/ballistica/graphics/graphics_server.cc | 20 +- src/ballistica/graphics/graphics_server.h | 2 +- .../graphics/render_command_buffer.h | 10 +- src/ballistica/graphics/renderer.cc | 2 +- src/ballistica/graphics/renderer.h | 6 +- src/ballistica/graphics/text/text_group.cc | 30 +- src/ballistica/graphics/text/text_group.h | 12 +- src/ballistica/graphics/vr_graphics.cc | 16 +- src/ballistica/input/device/touch_input.cc | 32 +- src/ballistica/input/input.cc | 4 +- src/ballistica/input/remote_app.cc | 2 +- .../class/python_class_collide_model.cc | 2 +- .../python/class/python_class_data.cc | 2 +- .../python/class/python_class_model.cc | 2 +- .../python/class/python_class_sound.cc | 2 +- .../python/class/python_class_texture.cc | 2 +- .../python/methods/python_methods_app.cc | 2 +- ...hods_media.cc => python_methods_assets.cc} | 12 +- ...ethods_media.h => python_methods_assets.h} | 6 +- .../python/methods/python_methods_gameplay.cc | 2 +- .../python/methods/python_methods_system.cc | 6 +- src/ballistica/python/python.cc | 12 +- src/ballistica/scene/node/bomb_node.cc | 2 +- src/ballistica/scene/node/explosion_node.cc | 10 +- src/ballistica/scene/node/flag_node.cc | 6 +- src/ballistica/scene/node/flash_node.cc | 2 +- src/ballistica/scene/node/image_node.cc | 6 +- src/ballistica/scene/node/image_node.h | 4 +- src/ballistica/scene/node/locator_node.cc | 10 +- src/ballistica/scene/node/prop_node.h | 4 +- src/ballistica/scene/node/scorch_node.cc | 6 +- src/ballistica/scene/node/shield_node.cc | 16 +- src/ballistica/scene/node/sound_node.cc | 2 +- src/ballistica/scene/node/spaz_node.cc | 68 ++-- src/ballistica/scene/node/terrain_node.cc | 2 +- .../scene/node/texture_sequence_node.cc | 2 +- src/ballistica/scene/scene.cc | 2 +- src/ballistica/ui/console.cc | 4 +- src/ballistica/ui/root_ui.cc | 8 +- src/ballistica/ui/ui.cc | 14 +- src/ballistica/ui/widget/button_widget.cc | 24 +- src/ballistica/ui/widget/check_box_widget.cc | 22 +- src/ballistica/ui/widget/container_widget.cc | 26 +- src/ballistica/ui/widget/h_scroll_widget.cc | 27 +- src/ballistica/ui/widget/image_widget.cc | 4 +- src/ballistica/ui/widget/image_widget.h | 4 +- src/ballistica/ui/widget/scroll_widget.cc | 18 +- src/ballistica/ui/widget/text_widget.cc | 22 +- 129 files changed, 1215 insertions(+), 1207 deletions(-) rename src/ballistica/{media/media.cc => assets/assets.cc} (81%) rename src/ballistica/{media/media.h => assets/assets.h} (75%) rename src/ballistica/{media/media_server.cc => assets/assets_server.cc} (88%) rename src/ballistica/{media/media_server.h => assets/assets_server.h} (67%) rename src/ballistica/{media/component/media_component.cc => assets/component/asset_component.cc} (60%) rename src/ballistica/{media/component/media_component.h => assets/component/asset_component.h} (82%) rename src/ballistica/{media => assets}/component/collide_model.cc (81%) rename src/ballistica/{media => assets}/component/collide_model.h (63%) rename src/ballistica/{media => assets}/component/cube_map_texture.cc (59%) rename src/ballistica/{media => assets}/component/cube_map_texture.h (59%) rename src/ballistica/{media => assets}/component/data.cc (81%) rename src/ballistica/{media => assets}/component/data.h (62%) rename src/ballistica/{media => assets}/component/model.cc (81%) rename src/ballistica/{media => assets}/component/model.h (59%) rename src/ballistica/{media => assets}/component/sound.cc (75%) rename src/ballistica/{media => assets}/component/sound.h (68%) rename src/ballistica/{media => assets}/component/texture.cc (74%) rename src/ballistica/{media => assets}/component/texture.h (67%) rename src/ballistica/{media/data/media_component_data.cc => assets/data/asset_component_data.cc} (84%) rename src/ballistica/{media/data/media_component_data.h => assets/data/asset_component_data.h} (88%) rename src/ballistica/{media => assets}/data/collide_model_data.cc (95%) rename src/ballistica/{media => assets}/data/collide_model_data.h (71%) rename src/ballistica/{media => assets}/data/data_data.cc (90%) rename src/ballistica/{media => assets}/data/data_data.h (75%) rename src/ballistica/{media => assets}/data/model_data.cc (96%) rename src/ballistica/{media => assets}/data/model_data.h (81%) rename src/ballistica/{media => assets}/data/model_renderer_data.h (70%) rename src/ballistica/{media => assets}/data/sound_data.cc (98%) rename src/ballistica/{media => assets}/data/sound_data.h (82%) rename src/ballistica/{media => assets}/data/texture_data.cc (98%) rename src/ballistica/{media => assets}/data/texture_data.h (84%) rename src/ballistica/{media => assets}/data/texture_preload_data.cc (99%) rename src/ballistica/{media => assets}/data/texture_preload_data.h (86%) rename src/ballistica/{media => assets}/data/texture_renderer_data.h (78%) rename src/ballistica/python/methods/{python_methods_media.cc => python_methods_assets.cc} (98%) rename src/ballistica/python/methods/{python_methods_media.h => python_methods_assets.h} (64%) diff --git a/.efrocachemap b/.efrocachemap index c59702fc..29edee20 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/91/e4/e85f3feee6640ce65027660e5590", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/dd/50/db8d4e087b3fe272e9575b95996b", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e8/2f/1c8653ee8f0bad9cded74ebf5100", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2e/86/b9fb1d80caf79d23b785327a0cc7", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/0f/4e/67f2eea7fa848b12994d487893dc", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/b2/c4/d9555b8a060d11e6b1346cd82d12", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/59/41/3aafb5bd7c6dddad37c89f304fb9", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cc/c1/a7cbdc71810ee752746eda33dd31", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/36/67/6a8b809011b4023533712d2df7b6", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/11/8c/172381e8a477cc11ee0e24460901", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/79/ab/05c53d0807929316235d6e7382cd", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/18/c2/415efdababdd14553c3adbeaaf7b", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/3a/2d/863cc304f4856e34c81093b59db1", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/33/fd/00a992c1d496ff85a99d381c6498", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e4/58/ac07183ee59eedbb78dcf2f0e91f", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cf/cb/91d2181102f6045e4d19cc73a18d", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/ce/f8/3e7a2452dae94b5cd857424e31fa", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/04/f8/46d2bcc4f5d5b7c7d9bcc7b91418", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/3b/10/9c15dbfbca54c1260b146de3029b", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/26/90/d2f4b8212b12508ed222609c7a7d", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/33/fa/2b4dc04a7e94af821486c0baaadd", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/39/c0/0a8c20d90b3bb0b605f56cf57cd6", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9d/9e/36bc9196a661b7ac730309363b25", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/78/61/3ee51d8c85ac897cb48326059f4f", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/41/24/ea579f7f46ee8764b99aa1f740e6", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d7/79/db7ba776fe53a432f501cc524f29", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/67/8c/fd54c4640fe9574c819eb93235de", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d0/23/0ed4f59b045bd996e9e8c3adac25", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/7b/7a/65e4a1a866aa716f339934316888", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/4c/96/40086b7256c6b69500231234816f", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/25/4e/65658e3b1137e29c26e5a250cb7f", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a4/d3/9e94f9f4a3f326ab3fb4563605e8", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/70/82/54ac546d3d6404259c025e4697a6", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/8c/71/35e658ed48d1732ac1ace9a651d0", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cb/c1/66f115696b5694b203d2a3e3f3b6", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/76/7e/ef8ca6f4baae2d3540658a43238e", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/e5/01/48f01b3bfb0e11dfa298809751d6", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/4e/35/3e14be7308b3b8a4d7ee00223d02", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/2f/8d/5bf66b9999ac4a0b109ce6a93ee9", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/6f/ba/6814ccb61a86032c381b59092b92", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e0/b3/7ccccfd8721033582cabdfe11f73", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/86/d2/d18cbc017a7d64001f96718cc5ed", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/64/9b/78cdb9eda7b30611774769859caa", @@ -4031,14 +4031,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c8/d2/5df66f66e26c1beb8a1e2b1f0613", "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7e/57/593e8ceeee37a65972f1fb30d2cd", "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2f/fc/a2ac394899e6527f8def0cad4d8a", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/20/4e/9afc0e73bb26d63032c3525d9373", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/f2/ab/eac71319d5184a3dd6b2ad74cf92", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/ad/20/97feffa58fcbc8ac2ed2d9892326", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/0a/d8/6e58979b57cf74c0d675508b207f", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/79/c7/cb4590d0e233fa0455f9bd3158b0", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/2a/14/99b6932f7e20e988d67faa4327d9", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/b0/77/b85ef1b5a280aa2426a613e76ec5", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/b9/22/020a23ba4dba0b5871f78622bd67", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/b9/00/54be93a362cac005b111902cf725", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/cf/33/0aba47dbe0848b9a0fe65e3fe5ac", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/7f/a5/705f0b9b047d439d7b8805e684a1", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/e1/11/91da47c90faced11f80ce365e6ca", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/f0/47/fec8d08adc467bc46516ce39423a", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/c0/cb/36553e332fb3297e8f632387fdbb", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/a7/96/f19a4cc19386511d732533ead3d3", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/0c/23/5d5da73cd643d4fb344849768bf3", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index f472ce3f..ccf592e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20803, api 7, 2022-09-10) +### 1.7.7 (build 20806, api 7, 2022-09-10) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. @@ -20,6 +20,8 @@ - There is now a `_bainternal.py` dummy-module alongside the existing `_ba.py` one. Be sure to exclude it from any script collections used by the game (the same as `_ba.py`). - Added checks to make sure _ba or _bainternal arent used outside of ba. Any 'internal' functionality needed outside of ba should be exposed through ba.internal. _ba and _bainternal are internal implementation details. - Removed C++ Module class and simplified Thread class. The Module class was an old relic of long ago before C++ had lambdas and its existence was pretty pointless and confusing these days. +- Renamed C++ App to AppFlavor and AppGlobals to App +- Renamed C++ Media to Assets ### 1.7.6 (build 20687, api 7, 2022-08-11) - Cleaned up da MetaSubsystem code. diff --git a/assets/src/ba_data/python/._bainternal_sources_hash b/assets/src/ba_data/python/._bainternal_sources_hash index 595ac638..4f751038 100644 --- a/assets/src/ba_data/python/._bainternal_sources_hash +++ b/assets/src/ba_data/python/._bainternal_sources_hash @@ -1 +1 @@ -250920245305497630480226719424525454078 \ No newline at end of file +319717366410279141138094934973337011486 \ No newline at end of file diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 6c34fe48..bb1b9804 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -38,7 +38,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20803 + expected_build = 20806 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/ballisticacore-cmake/CMakeLists.txt b/ballisticacore-cmake/CMakeLists.txt index a807d3e3..68b79db8 100644 --- a/ballisticacore-cmake/CMakeLists.txt +++ b/ballisticacore-cmake/CMakeLists.txt @@ -210,6 +210,40 @@ add_executable(ballisticacore ${BA_SRC_ROOT}/ballistica/app/app_flavor_vr.h ${BA_SRC_ROOT}/ballistica/app/stress_test.cc ${BA_SRC_ROOT}/ballistica/app/stress_test.h + ${BA_SRC_ROOT}/ballistica/assets/assets.cc + ${BA_SRC_ROOT}/ballistica/assets/assets.h + ${BA_SRC_ROOT}/ballistica/assets/assets_server.cc + ${BA_SRC_ROOT}/ballistica/assets/assets_server.h + ${BA_SRC_ROOT}/ballistica/assets/component/asset_component.cc + ${BA_SRC_ROOT}/ballistica/assets/component/asset_component.h + ${BA_SRC_ROOT}/ballistica/assets/component/collide_model.cc + ${BA_SRC_ROOT}/ballistica/assets/component/collide_model.h + ${BA_SRC_ROOT}/ballistica/assets/component/cube_map_texture.cc + ${BA_SRC_ROOT}/ballistica/assets/component/cube_map_texture.h + ${BA_SRC_ROOT}/ballistica/assets/component/data.cc + ${BA_SRC_ROOT}/ballistica/assets/component/data.h + ${BA_SRC_ROOT}/ballistica/assets/component/model.cc + ${BA_SRC_ROOT}/ballistica/assets/component/model.h + ${BA_SRC_ROOT}/ballistica/assets/component/sound.cc + ${BA_SRC_ROOT}/ballistica/assets/component/sound.h + ${BA_SRC_ROOT}/ballistica/assets/component/texture.cc + ${BA_SRC_ROOT}/ballistica/assets/component/texture.h + ${BA_SRC_ROOT}/ballistica/assets/data/asset_component_data.cc + ${BA_SRC_ROOT}/ballistica/assets/data/asset_component_data.h + ${BA_SRC_ROOT}/ballistica/assets/data/collide_model_data.cc + ${BA_SRC_ROOT}/ballistica/assets/data/collide_model_data.h + ${BA_SRC_ROOT}/ballistica/assets/data/data_data.cc + ${BA_SRC_ROOT}/ballistica/assets/data/data_data.h + ${BA_SRC_ROOT}/ballistica/assets/data/model_data.cc + ${BA_SRC_ROOT}/ballistica/assets/data/model_data.h + ${BA_SRC_ROOT}/ballistica/assets/data/model_renderer_data.h + ${BA_SRC_ROOT}/ballistica/assets/data/sound_data.cc + ${BA_SRC_ROOT}/ballistica/assets/data/sound_data.h + ${BA_SRC_ROOT}/ballistica/assets/data/texture_data.cc + ${BA_SRC_ROOT}/ballistica/assets/data/texture_data.h + ${BA_SRC_ROOT}/ballistica/assets/data/texture_preload_data.cc + ${BA_SRC_ROOT}/ballistica/assets/data/texture_preload_data.h + ${BA_SRC_ROOT}/ballistica/assets/data/texture_renderer_data.h ${BA_SRC_ROOT}/ballistica/audio/al_sys.cc ${BA_SRC_ROOT}/ballistica/audio/al_sys.h ${BA_SRC_ROOT}/ballistica/audio/audio.cc @@ -466,40 +500,6 @@ add_executable(ballisticacore ${BA_SRC_ROOT}/ballistica/math/vector3f.cc ${BA_SRC_ROOT}/ballistica/math/vector3f.h ${BA_SRC_ROOT}/ballistica/math/vector4f.h - ${BA_SRC_ROOT}/ballistica/media/component/collide_model.cc - ${BA_SRC_ROOT}/ballistica/media/component/collide_model.h - ${BA_SRC_ROOT}/ballistica/media/component/cube_map_texture.cc - ${BA_SRC_ROOT}/ballistica/media/component/cube_map_texture.h - ${BA_SRC_ROOT}/ballistica/media/component/data.cc - ${BA_SRC_ROOT}/ballistica/media/component/data.h - ${BA_SRC_ROOT}/ballistica/media/component/media_component.cc - ${BA_SRC_ROOT}/ballistica/media/component/media_component.h - ${BA_SRC_ROOT}/ballistica/media/component/model.cc - ${BA_SRC_ROOT}/ballistica/media/component/model.h - ${BA_SRC_ROOT}/ballistica/media/component/sound.cc - ${BA_SRC_ROOT}/ballistica/media/component/sound.h - ${BA_SRC_ROOT}/ballistica/media/component/texture.cc - ${BA_SRC_ROOT}/ballistica/media/component/texture.h - ${BA_SRC_ROOT}/ballistica/media/data/collide_model_data.cc - ${BA_SRC_ROOT}/ballistica/media/data/collide_model_data.h - ${BA_SRC_ROOT}/ballistica/media/data/data_data.cc - ${BA_SRC_ROOT}/ballistica/media/data/data_data.h - ${BA_SRC_ROOT}/ballistica/media/data/media_component_data.cc - ${BA_SRC_ROOT}/ballistica/media/data/media_component_data.h - ${BA_SRC_ROOT}/ballistica/media/data/model_data.cc - ${BA_SRC_ROOT}/ballistica/media/data/model_data.h - ${BA_SRC_ROOT}/ballistica/media/data/model_renderer_data.h - ${BA_SRC_ROOT}/ballistica/media/data/sound_data.cc - ${BA_SRC_ROOT}/ballistica/media/data/sound_data.h - ${BA_SRC_ROOT}/ballistica/media/data/texture_data.cc - ${BA_SRC_ROOT}/ballistica/media/data/texture_data.h - ${BA_SRC_ROOT}/ballistica/media/data/texture_preload_data.cc - ${BA_SRC_ROOT}/ballistica/media/data/texture_preload_data.h - ${BA_SRC_ROOT}/ballistica/media/data/texture_renderer_data.h - ${BA_SRC_ROOT}/ballistica/media/media.cc - ${BA_SRC_ROOT}/ballistica/media/media.h - ${BA_SRC_ROOT}/ballistica/media/media_server.cc - ${BA_SRC_ROOT}/ballistica/media/media_server.h ${BA_SRC_ROOT}/ballistica/networking/network_reader.cc ${BA_SRC_ROOT}/ballistica/networking/network_reader.h ${BA_SRC_ROOT}/ballistica/networking/network_writer.cc @@ -557,14 +557,14 @@ add_executable(ballisticacore ${BA_SRC_ROOT}/ballistica/python/class/python_class_widget.h ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_app.cc ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_app.h + ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_assets.cc + ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_assets.h ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_gameplay.cc ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_gameplay.h ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_graphics.cc ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_graphics.h ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_input.cc ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_input.h - ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_media.cc - ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_media.h ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_networking.cc ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_networking.h ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_system.cc diff --git a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj index 4c34c25e..82c02cee 100644 --- a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj +++ b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj @@ -201,6 +201,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -457,40 +491,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -548,14 +548,14 @@ + + - - diff --git a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters index 8f86a56f..3644f340 100644 --- a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters +++ b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters @@ -37,6 +37,108 @@ ballistica\app + + ballistica\assets + + + ballistica\assets + + + ballistica\assets + + + ballistica\assets + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + ballistica\audio @@ -805,108 +907,6 @@ ballistica\math - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media - - - ballistica\media - - - ballistica\media - - - ballistica\media - ballistica\networking @@ -1078,6 +1078,12 @@ ballistica\python\methods + + ballistica\python\methods + + + ballistica\python\methods + ballistica\python\methods @@ -1096,12 +1102,6 @@ ballistica\python\methods - - ballistica\python\methods - - - ballistica\python\methods - ballistica\python\methods @@ -1646,6 +1646,9 @@ + + + @@ -1666,9 +1669,6 @@ - - - diff --git a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj index c8692ebb..cca83bf4 100644 --- a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj +++ b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj @@ -196,6 +196,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -452,40 +486,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -543,14 +543,14 @@ + + - - diff --git a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters index 8f86a56f..3644f340 100644 --- a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters +++ b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters @@ -37,6 +37,108 @@ ballistica\app + + ballistica\assets + + + ballistica\assets + + + ballistica\assets + + + ballistica\assets + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\component + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + + + ballistica\assets\data + ballistica\audio @@ -805,108 +907,6 @@ ballistica\math - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\component - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media\data - - - ballistica\media - - - ballistica\media - - - ballistica\media - - - ballistica\media - ballistica\networking @@ -1078,6 +1078,12 @@ ballistica\python\methods + + ballistica\python\methods + + + ballistica\python\methods + ballistica\python\methods @@ -1096,12 +1102,6 @@ ballistica\python\methods - - ballistica\python\methods - - - ballistica\python\methods - ballistica\python\methods @@ -1646,6 +1646,9 @@ + + + @@ -1666,9 +1669,6 @@ - - - diff --git a/src/ballistica/app/stress_test.cc b/src/ballistica/app/stress_test.cc index 0dbea11a..d7f22d39 100644 --- a/src/ballistica/app/stress_test.cc +++ b/src/ballistica/app/stress_test.cc @@ -76,11 +76,11 @@ void StressTest::Update() { uint32_t texture_count = 0; uint32_t sound_count = 0; uint32_t node_count = 0; - if (g_media) { - model_count = g_media->total_model_count(); - collide_model_count = g_media->total_collide_model_count(); - texture_count = g_media->total_texture_count(); - sound_count = g_media->total_sound_count(); + if (g_assets) { + model_count = g_assets->total_model_count(); + collide_model_count = g_assets->total_collide_model_count(); + texture_count = g_assets->total_texture_count(); + sound_count = g_assets->total_sound_count(); } assert(g_game); std::string mem_usage = g_platform->GetMemUsageInfo(); diff --git a/src/ballistica/media/media.cc b/src/ballistica/assets/assets.cc similarity index 81% rename from src/ballistica/media/media.cc rename to src/ballistica/assets/assets.cc index eb1ec6f2..190be948 100644 --- a/src/ballistica/media/media.cc +++ b/src/ballistica/assets/assets.cc @@ -1,23 +1,23 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/media/media.h" +#include "ballistica/assets/assets.h" #if !BA_OSTYPE_WINDOWS #include #endif +#include "ballistica/assets/assets_server.h" +#include "ballistica/assets/component/collide_model.h" +#include "ballistica/assets/component/data.h" +#include "ballistica/assets/component/model.h" +#include "ballistica/assets/component/texture.h" +#include "ballistica/assets/data/sound_data.h" #include "ballistica/audio/audio_server.h" #include "ballistica/core/thread.h" #include "ballistica/game/game.h" #include "ballistica/generic/timer.h" #include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/text/text_packer.h" -#include "ballistica/media/component/collide_model.h" -#include "ballistica/media/component/data.h" -#include "ballistica/media/component/model.h" -#include "ballistica/media/component/texture.h" -#include "ballistica/media/data/sound_data.h" -#include "ballistica/media/media_server.h" #include "ballistica/python/python_sys.h" namespace ballistica { @@ -26,8 +26,8 @@ namespace ballistica { #define BA_SHOW_LOADS_UNLOADS 0 #define SHOW_PRUNING_INFO 0 -// Standard prune time for unused media: 10 minutes (1000ms * 60 * 10). -#define STANDARD_MEDIA_PRUNE_TIME 600000 +// Standard prune time for unused assets: 10 minutes (1000ms * 60 * 10). +#define STANDARD_ASSET_PRUNE_TIME 600000 // More aggressive prune time for dynamically-generated text-textures: 10 // seconds. @@ -35,53 +35,53 @@ namespace ballistica { #define QR_TEXTURE_PRUNE_TIME 10000 -// How long we should spend loading media in each runPendingLoads() call. +// How long we should spend loading assets in each runPendingLoads() call. #define PENDING_LOAD_PROCESS_TIME 5 -Media::Media() { - media_paths_.emplace_back("ba_data"); +Assets::Assets() { + asset_paths_.emplace_back("ba_data"); for (bool& have_pending_load : have_pending_loads_) { have_pending_load = false; } } -void Media::LoadSystemTexture(SystemTextureID id, const char* name) { - assert(media_lists_locked_); +void Assets::LoadSystemTexture(SystemTextureID id, const char* name) { + assert(asset_lists_locked_); system_textures_.push_back(GetTextureData(name)); assert(system_textures_.size() == static_cast(id) + 1); } -void Media::LoadSystemCubeMapTexture(SystemCubeMapTextureID id, - const char* name) { - assert(media_lists_locked_); +void Assets::LoadSystemCubeMapTexture(SystemCubeMapTextureID id, + const char* name) { + assert(asset_lists_locked_); system_cube_map_textures_.push_back(GetCubeMapTextureData(name)); assert(system_cube_map_textures_.size() == static_cast(id) + 1); } -void Media::LoadSystemSound(SystemSoundID id, const char* name) { +void Assets::LoadSystemSound(SystemSoundID id, const char* name) { system_sounds_.push_back(GetSoundData(name)); assert(system_sounds_.size() == static_cast(id) + 1); } -void Media::LoadSystemData(SystemDataID id, const char* name) { +void Assets::LoadSystemData(SystemDataID id, const char* name) { system_datas_.push_back(GetDataData(name)); assert(system_datas_.size() == static_cast(id) + 1); } -void Media::LoadSystemModel(SystemModelID id, const char* name) { +void Assets::LoadSystemModel(SystemModelID id, const char* name) { system_models_.push_back(GetModelData(name)); assert(system_models_.size() == static_cast(id) + 1); } -void Media::LoadSystemMedia() { +void Assets::LoadSystemAssets() { assert(InLogicThread()); - assert(g_audio_server && g_media_server && g_graphics_server); + assert(g_audio_server && g_assets_server && g_graphics_server); assert(g_graphics_server && g_graphics_server->texture_compression_types_are_set()); assert(g_graphics && g_graphics_server->texture_quality_set()); // Just grab the lock once for all this stuff for efficiency. - MediaListsLock lock; + AssetListLock lock; // System textures: LoadSystemTexture(SystemTextureID::kUIAtlas, "uiAtlas"); @@ -280,24 +280,24 @@ void Media::LoadSystemMedia() { LoadSystemModel(SystemModelID::kWing, "wing"); // Hooray! - system_media_loaded_ = true; + system_assets_loaded_ = true; } -void Media::PrintLoadInfo() { +void Assets::PrintLoadInfo() { std::string s; char buffer[256]; int num = 1; // Need to lock lists while iterating over them. - MediaListsLock lock; - s = "Media load results: (all times in milliseconds):\n"; + AssetListLock lock; + s = "Assets load results: (all times in milliseconds):\n"; snprintf(buffer, sizeof(buffer), " %-50s %10s %10s", "FILE", "PRELOAD_TIME", "LOAD_TIME"); s += buffer; Log(s, true, false); millisecs_t total_preload_time = 0; millisecs_t total_load_time = 0; - assert(media_lists_locked_); + assert(asset_lists_locked_); for (auto&& i : models_) { millisecs_t preload_time = i.second->preload_time(); millisecs_t load_time = i.second->load_time(); @@ -310,7 +310,7 @@ void Media::PrintLoadInfo() { Log(buffer, true, false); num++; } - assert(media_lists_locked_); + assert(asset_lists_locked_); for (auto&& i : collide_models_) { millisecs_t preload_time = i.second->preload_time(); millisecs_t load_time = i.second->load_time(); @@ -323,7 +323,7 @@ void Media::PrintLoadInfo() { Log(buffer, true, false); num++; } - assert(media_lists_locked_); + assert(asset_lists_locked_); for (auto&& i : sounds_) { millisecs_t preload_time = i.second->preload_time(); millisecs_t load_time = i.second->load_time(); @@ -336,7 +336,7 @@ void Media::PrintLoadInfo() { Log(buffer, true, false); num++; } - assert(media_lists_locked_); + assert(asset_lists_locked_); for (auto&& i : datas_) { millisecs_t preload_time = i.second->preload_time(); millisecs_t load_time = i.second->load_time(); @@ -349,7 +349,7 @@ void Media::PrintLoadInfo() { Log(buffer, true, false); num++; } - assert(media_lists_locked_); + assert(asset_lists_locked_); for (auto&& i : textures_) { millisecs_t preload_time = i.second->preload_time(); millisecs_t load_time = i.second->load_time(); @@ -370,96 +370,97 @@ void Media::PrintLoadInfo() { Log(buffer, true, false); } -void Media::MarkAllMediaForLoad() { +void Assets::MarkAllAssetsForLoad() { assert(InLogicThread()); // Need to keep lists locked while iterating over them. - MediaListsLock m_lock; + AssetListLock m_lock; for (auto&& i : textures_) { if (!i.second->preloaded()) { - MediaComponentData::LockGuard lock(i.second.get()); - have_pending_loads_[static_cast(MediaType::kTexture)] = true; + AssetComponentData::LockGuard lock(i.second.get()); + have_pending_loads_[static_cast(AssetType::kTexture)] = true; MarkComponentForLoad(i.second.get()); } } for (auto&& i : text_textures_) { if (!i.second->preloaded()) { - MediaComponentData::LockGuard lock(i.second.get()); - have_pending_loads_[static_cast(MediaType::kTexture)] = true; + AssetComponentData::LockGuard lock(i.second.get()); + have_pending_loads_[static_cast(AssetType::kTexture)] = true; MarkComponentForLoad(i.second.get()); } } for (auto&& i : qr_textures_) { if (!i.second->preloaded()) { - MediaComponentData::LockGuard lock(i.second.get()); - have_pending_loads_[static_cast(MediaType::kTexture)] = true; + AssetComponentData::LockGuard lock(i.second.get()); + have_pending_loads_[static_cast(AssetType::kTexture)] = true; MarkComponentForLoad(i.second.get()); } } for (auto&& i : models_) { if (!i.second->preloaded()) { - MediaComponentData::LockGuard lock(i.second.get()); - have_pending_loads_[static_cast(MediaType::kModel)] = true; + AssetComponentData::LockGuard lock(i.second.get()); + have_pending_loads_[static_cast(AssetType::kModel)] = true; MarkComponentForLoad(i.second.get()); } } } // Call this from the graphics thread to immediately unload all -// media used by it. (for when GL context gets lost, etc). -void Media::UnloadRendererBits(bool do_textures, bool do_models) { +// assets used by it. (for when GL context gets lost, etc). +void Assets::UnloadRendererBits(bool do_textures, bool do_models) { assert(InGraphicsThread()); // need to keep lists locked while iterating over them.. - MediaListsLock m_lock; + AssetListLock m_lock; if (do_textures) { - assert(media_lists_locked_); + assert(asset_lists_locked_); for (auto&& i : textures_) { - MediaComponentData::LockGuard lock(i.second.get()); + AssetComponentData::LockGuard lock(i.second.get()); i.second->Unload(true); } for (auto&& i : text_textures_) { - MediaComponentData::LockGuard lock(i.second.get()); + AssetComponentData::LockGuard lock(i.second.get()); i.second->Unload(true); } for (auto&& i : qr_textures_) { - MediaComponentData::LockGuard lock(i.second.get()); + AssetComponentData::LockGuard lock(i.second.get()); i.second->Unload(true); } } if (do_models) { for (auto&& i : models_) { - MediaComponentData::LockGuard lock(i.second.get()); + AssetComponentData::LockGuard lock(i.second.get()); i.second->Unload(true); } } } -auto Media::GetModelData(const std::string& file_name) +auto Assets::GetModelData(const std::string& file_name) -> Object::Ref { return GetComponentData(file_name, &models_); } -auto Media::GetSoundData(const std::string& file_name) +auto Assets::GetSoundData(const std::string& file_name) -> Object::Ref { return GetComponentData(file_name, &sounds_); } -auto Media::GetDataData(const std::string& file_name) -> Object::Ref { +auto Assets::GetDataData(const std::string& file_name) + -> Object::Ref { return GetComponentData(file_name, &datas_); } -auto Media::GetCollideModelData(const std::string& file_name) +auto Assets::GetCollideModelData(const std::string& file_name) -> Object::Ref { return GetComponentData(file_name, &collide_models_); } template -auto Media::GetComponentData( +auto Assets::GetComponentData( const std::string& file_name, std::unordered_map >* c_list) -> Object::Ref { assert(InLogicThread()); - assert(media_lists_locked_); + assert(asset_lists_locked_); auto i = c_list->find(file_name); if (i != c_list->end()) { return Object::Ref(i->second.get()); @@ -467,8 +468,8 @@ auto Media::GetComponentData( auto d(Object::New(file_name)); (*c_list)[file_name] = d; { - MediaComponentData::LockGuard lock(d.get()); - have_pending_loads_[static_cast(d->GetMediaType())] = true; + AssetComponentData::LockGuard lock(d.get()); + have_pending_loads_[static_cast(d->GetAssetType())] = true; MarkComponentForLoad(d.get()); } d->set_last_used_time(GetRealTime()); @@ -476,9 +477,9 @@ auto Media::GetComponentData( } } -auto Media::GetTextureData(TextPacker* packer) -> Object::Ref { +auto Assets::GetTextureData(TextPacker* packer) -> Object::Ref { assert(InLogicThread()); - assert(media_lists_locked_); + assert(asset_lists_locked_); const std::string& hash(packer->hash()); auto i = text_textures_.find(hash); if (i != text_textures_.end()) { @@ -487,8 +488,8 @@ auto Media::GetTextureData(TextPacker* packer) -> Object::Ref { auto d(Object::New(packer)); text_textures_[hash] = d; { - MediaComponentData::LockGuard lock(d.get()); - have_pending_loads_[static_cast(d->GetMediaType())] = true; + AssetComponentData::LockGuard lock(d.get()); + have_pending_loads_[static_cast(d->GetAssetType())] = true; MarkComponentForLoad(d.get()); } d->set_last_used_time(GetRealTime()); @@ -496,10 +497,10 @@ auto Media::GetTextureData(TextPacker* packer) -> Object::Ref { } } -auto Media::GetTextureDataQRCode(const std::string& url) +auto Assets::GetTextureDataQRCode(const std::string& url) -> Object::Ref { assert(InLogicThread()); - assert(media_lists_locked_); + assert(asset_lists_locked_); auto i = qr_textures_.find(url); if (i != qr_textures_.end()) { return Object::Ref(i->second.get()); @@ -507,8 +508,8 @@ auto Media::GetTextureDataQRCode(const std::string& url) auto d(Object::New(url)); qr_textures_[url] = d; { - MediaComponentData::LockGuard lock(d.get()); - have_pending_loads_[static_cast(d->GetMediaType())] = true; + AssetComponentData::LockGuard lock(d.get()); + have_pending_loads_[static_cast(d->GetAssetType())] = true; MarkComponentForLoad(d.get()); } d->set_last_used_time(GetRealTime()); @@ -518,10 +519,10 @@ auto Media::GetTextureDataQRCode(const std::string& url) // Eww can't recycle GetComponent here since we need extra stuff (tex-type arg) // ..should fix. -auto Media::GetCubeMapTextureData(const std::string& file_name) +auto Assets::GetCubeMapTextureData(const std::string& file_name) -> Object::Ref { assert(InLogicThread()); - assert(media_lists_locked_); + assert(asset_lists_locked_); auto i = textures_.find(file_name); if (i != textures_.end()) { return Object::Ref(i->second.get()); @@ -530,8 +531,8 @@ auto Media::GetCubeMapTextureData(const std::string& file_name) TextureMinQuality::kLow)); textures_[file_name] = d; { - MediaComponentData::LockGuard lock(d.get()); - have_pending_loads_[static_cast(d->GetMediaType())] = true; + AssetComponentData::LockGuard lock(d.get()); + have_pending_loads_[static_cast(d->GetAssetType())] = true; MarkComponentForLoad(d.get()); } d->set_last_used_time(GetRealTime()); @@ -541,10 +542,10 @@ auto Media::GetCubeMapTextureData(const std::string& file_name) // Eww; can't recycle GetComponent here since we need extra stuff (quality // settings, etc). Should fix. -auto Media::GetTextureData(const std::string& file_name) +auto Assets::GetTextureData(const std::string& file_name) -> Object::Ref { assert(InLogicThread()); - assert(media_lists_locked_); + assert(asset_lists_locked_); auto i = textures_.find(file_name); if (i != textures_.end()) { return Object::Ref(i->second.get()); @@ -586,8 +587,8 @@ auto Media::GetTextureData(const std::string& file_name) auto d(Object::New(file_name, TextureType::k2D, min_quality)); textures_[file_name] = d; { - MediaComponentData::LockGuard lock(d.get()); - have_pending_loads_[static_cast(d->GetMediaType())] = true; + AssetComponentData::LockGuard lock(d.get()); + have_pending_loads_[static_cast(d->GetAssetType())] = true; MarkComponentForLoad(d.get()); } d->set_last_used_time(GetRealTime()); @@ -595,7 +596,7 @@ auto Media::GetTextureData(const std::string& file_name) } } -void Media::MarkComponentForLoad(MediaComponentData* c) { +void Assets::MarkComponentForLoad(AssetComponentData* c) { assert(InLogicThread()); assert(c->locked()); @@ -606,19 +607,19 @@ void Media::MarkComponentForLoad(MediaComponentData* c) { // once it makes it back to us we can delete the ref (in // ClearPendingLoadsDoneList) - auto media_ptr = new Object::Ref(c); + auto asset_ptr = new Object::Ref(c); - g_media_server->thread()->PushCall([media_ptr] { - assert(InMediaThread()); + g_assets_server->thread()->PushCall([asset_ptr] { + assert(InAssetsThread()); // add our pointer to one of the preload lists and shake our preload thread // to wake it up - if ((**media_ptr).GetMediaType() == MediaType::kSound) { - g_media_server->pending_preloads_audio_.push_back(media_ptr); + if ((**asset_ptr).GetAssetType() == AssetType::kSound) { + g_assets_server->pending_preloads_audio_.push_back(asset_ptr); } else { - g_media_server->pending_preloads_.push_back(media_ptr); + g_assets_server->pending_preloads_.push_back(asset_ptr); } - g_media_server->process_timer_->SetLength(0); + g_assets_server->process_timer_->SetLength(0); }); } @@ -626,102 +627,102 @@ void Media::MarkComponentForLoad(MediaComponentData* c) { #pragma ide diagnostic ignored "UnreachableCode" #pragma ide diagnostic ignored "ConstantFunctionResult" -auto Media::GetModelPendingLoadCount() -> int { - if (!have_pending_loads_[static_cast(MediaType::kModel)]) { +auto Assets::GetModelPendingLoadCount() -> int { + if (!have_pending_loads_[static_cast(AssetType::kModel)]) { return 0; } - MediaListsLock lock; - int total = GetComponentPendingLoadCount(&models_, MediaType::kModel); + AssetListLock lock; + int total = GetComponentPendingLoadCount(&models_, AssetType::kModel); if (total == 0) { // When fully loaded, stop counting. - have_pending_loads_[static_cast(MediaType::kModel)] = false; + have_pending_loads_[static_cast(AssetType::kModel)] = false; } return total; } -auto Media::GetTexturePendingLoadCount() -> int { - if (!have_pending_loads_[static_cast(MediaType::kTexture)]) { +auto Assets::GetTexturePendingLoadCount() -> int { + if (!have_pending_loads_[static_cast(AssetType::kTexture)]) { return 0; } - MediaListsLock lock; + AssetListLock lock; int total = - (GetComponentPendingLoadCount(&textures_, MediaType::kTexture) - + GetComponentPendingLoadCount(&text_textures_, MediaType::kTexture) - + GetComponentPendingLoadCount(&qr_textures_, MediaType::kTexture)); + (GetComponentPendingLoadCount(&textures_, AssetType::kTexture) + + GetComponentPendingLoadCount(&text_textures_, AssetType::kTexture) + + GetComponentPendingLoadCount(&qr_textures_, AssetType::kTexture)); if (total == 0) { // When fully loaded, stop counting. - have_pending_loads_[static_cast(MediaType::kTexture)] = false; + have_pending_loads_[static_cast(AssetType::kTexture)] = false; } return total; } -auto Media::GetSoundPendingLoadCount() -> int { - if (!have_pending_loads_[static_cast(MediaType::kSound)]) { +auto Assets::GetSoundPendingLoadCount() -> int { + if (!have_pending_loads_[static_cast(AssetType::kSound)]) { return 0; } - MediaListsLock lock; - int total = GetComponentPendingLoadCount(&sounds_, MediaType::kSound); + AssetListLock lock; + int total = GetComponentPendingLoadCount(&sounds_, AssetType::kSound); if (total == 0) { // When fully loaded, stop counting. - have_pending_loads_[static_cast(MediaType::kSound)] = false; + have_pending_loads_[static_cast(AssetType::kSound)] = false; } return total; } -auto Media::GetDataPendingLoadCount() -> int { - if (!have_pending_loads_[static_cast(MediaType::kData)]) { +auto Assets::GetDataPendingLoadCount() -> int { + if (!have_pending_loads_[static_cast(AssetType::kData)]) { return 0; } - MediaListsLock lock; - int total = GetComponentPendingLoadCount(&datas_, MediaType::kData); + AssetListLock lock; + int total = GetComponentPendingLoadCount(&datas_, AssetType::kData); if (total == 0) { // When fully loaded, stop counting. - have_pending_loads_[static_cast(MediaType::kData)] = false; + have_pending_loads_[static_cast(AssetType::kData)] = false; } return total; } -auto Media::GetCollideModelPendingLoadCount() -> int { - if (!have_pending_loads_[static_cast(MediaType::kCollideModel)]) { +auto Assets::GetCollideModelPendingLoadCount() -> int { + if (!have_pending_loads_[static_cast(AssetType::kCollideModel)]) { return 0; } - MediaListsLock lock; + AssetListLock lock; int total = - GetComponentPendingLoadCount(&collide_models_, MediaType::kCollideModel); + GetComponentPendingLoadCount(&collide_models_, AssetType::kCollideModel); if (total == 0) { // When fully loaded, stop counting. - have_pending_loads_[static_cast(MediaType::kCollideModel)] = false; + have_pending_loads_[static_cast(AssetType::kCollideModel)] = false; } return total; } #pragma clang diagnostic pop -auto Media::GetGraphicalPendingLoadCount() -> int { - // Each of these calls lock the media-lists so we don't. +auto Assets::GetGraphicalPendingLoadCount() -> int { + // Each of these calls lock the asset-lists so we don't. return GetModelPendingLoadCount() + GetTexturePendingLoadCount(); } -auto Media::GetPendingLoadCount() -> int { - // Each of these calls lock the media-lists so we don't. +auto Assets::GetPendingLoadCount() -> int { + // Each of these calls lock the asset-lists so we don't. return GetModelPendingLoadCount() + GetTexturePendingLoadCount() + GetDataPendingLoadCount() + GetSoundPendingLoadCount() + GetCollideModelPendingLoadCount(); } template -auto Media::GetComponentPendingLoadCount( - std::unordered_map >* t_list, MediaType type) +auto Assets::GetComponentPendingLoadCount( + std::unordered_map >* t_list, AssetType type) -> int { assert(InLogicThread()); - assert(media_lists_locked_); + assert(asset_lists_locked_); int c = 0; for (auto&& i : (*t_list)) { if (i.second.exists()) { if (i.second->TryLock()) { - MediaComponentData::LockGuard lock( - i.second.get(), MediaComponentData::LockGuard::Type::kInheritLock); + AssetComponentData::LockGuard lock( + i.second.get(), AssetComponentData::LockGuard::Type::kInheritLock); if (!i.second->loaded()) { c++; } @@ -734,26 +735,26 @@ auto Media::GetComponentPendingLoadCount( } // Runs the pending loads that need to run from the audio thread. -auto Media::RunPendingAudioLoads() -> bool { +auto Assets::RunPendingAudioLoads() -> bool { assert(InAudioThread()); return RunPendingLoadList(&pending_loads_sounds_); } // Runs the pending loads that need to run from the graphics thread. -auto Media::RunPendingGraphicsLoads() -> bool { +auto Assets::RunPendingGraphicsLoads() -> bool { assert(InGraphicsThread()); return RunPendingLoadList(&pending_loads_graphics_); } // Runs the pending loads that run in the main thread. Also clears the list of // done loads. -auto Media::RunPendingLoadsLogicThread() -> bool { +auto Assets::RunPendingLoadsLogicThread() -> bool { assert(InLogicThread()); return RunPendingLoadList(&pending_loads_other_); } template -auto Media::RunPendingLoadList(std::vector*>* c_list) -> bool { +auto Assets::RunPendingLoadList(std::vector*>* c_list) -> bool { bool flush = false; millisecs_t starttime = GetRealTime(); @@ -830,31 +831,31 @@ auto Media::RunPendingLoadList(std::vector*>* c_list) -> bool { return (!l.empty()); } -void Media::Prune(int level) { +void Assets::Prune(int level) { assert(InLogicThread()); millisecs_t current_time = GetRealTime(); // need lists locked while accessing/modifying them - MediaListsLock lock; + AssetListLock lock; // we can specify level for more aggressive pruning (during memory warnings // and whatnot) - millisecs_t standard_media_prune_time = STANDARD_MEDIA_PRUNE_TIME; + millisecs_t standard_asset_prune_time = STANDARD_ASSET_PRUNE_TIME; millisecs_t text_texture_prune_time = TEXT_TEXTURE_PRUNE_TIME; millisecs_t qr_texture_prune_time = QR_TEXTURE_PRUNE_TIME; switch (level) { case 1: - standard_media_prune_time = 120000; // 2 min + standard_asset_prune_time = 120000; // 2 min text_texture_prune_time = 1000; // 1 sec qr_texture_prune_time = 1000; // 1 sec break; case 2: - standard_media_prune_time = 30000; // 30 sec + standard_asset_prune_time = 30000; // 30 sec text_texture_prune_time = 1000; // 1 sec qr_texture_prune_time = 1000; // 1 sec break; case 3: - standard_media_prune_time = 5000; // 5 sec + standard_asset_prune_time = 5000; // 5 sec text_texture_prune_time = 1000; // 1 sec qr_texture_prune_time = 1000; // 1 sec break; @@ -862,11 +863,11 @@ void Media::Prune(int level) { break; } - std::vector*> graphics_thread_unloads; - std::vector*> audio_thread_unloads; + std::vector*> graphics_thread_unloads; + std::vector*> audio_thread_unloads; #if SHOW_PRUNING_INFO - assert(media_lists_locked_); + assert(asset_lists_locked_); int old_texture_count = textures_.size(); int old_text_texture_count = text_textures_.size(); int old_qr_texture_count = qr_textures_.size(); @@ -876,13 +877,13 @@ void Media::Prune(int level) { #endif // SHOW_PRUNING_INFO // prune textures.. - assert(media_lists_locked_); + assert(asset_lists_locked_); for (auto i = textures_.begin(); i != textures_.end();) { TextureData* texture_data = i->second.get(); // attempt to prune if there are no references remaining except our own and // its been a while since it was used if (current_time - texture_data->last_used_time() - > standard_media_prune_time + > standard_asset_prune_time && (texture_data->object_strong_ref_count() <= 1)) { // if its preloaded/loaded we need to ask the graphics thread to unload it // first @@ -890,7 +891,7 @@ void Media::Prune(int level) { // allocate a reference to keep this texture_data alive while the unload // is happening graphics_thread_unloads.push_back( - new Object::Ref(texture_data)); + new Object::Ref(texture_data)); auto i_next = i; i_next++; textures_.erase(i); @@ -904,7 +905,7 @@ void Media::Prune(int level) { // prune text-textures more aggressively since we may generate lots of them // FIXME - we may want to prune based on total number of these instead of // time.. - assert(media_lists_locked_); + assert(asset_lists_locked_); for (auto i = text_textures_.begin(); i != text_textures_.end();) { TextureData* texture_data = i->second.get(); // attempt to prune if there are no references remaining except our own and @@ -917,7 +918,7 @@ void Media::Prune(int level) { // allocate a reference to keep this texture_data alive while the unload // is happening graphics_thread_unloads.push_back( - new Object::Ref(texture_data)); + new Object::Ref(texture_data)); auto i_next = i; i_next++; text_textures_.erase(i); @@ -929,7 +930,7 @@ void Media::Prune(int level) { } // prune textures - assert(media_lists_locked_); + assert(asset_lists_locked_); for (auto i = qr_textures_.begin(); i != qr_textures_.end();) { TextureData* texture_data = i->second.get(); // attempt to prune if there are no references remaining except our own and @@ -942,7 +943,7 @@ void Media::Prune(int level) { // allocate a reference to keep this texture_data alive while the unload // is happening graphics_thread_unloads.push_back( - new Object::Ref(texture_data)); + new Object::Ref(texture_data)); auto i_next = i; i_next++; qr_textures_.erase(i); @@ -954,12 +955,12 @@ void Media::Prune(int level) { } // prune models.. - assert(media_lists_locked_); + assert(asset_lists_locked_); for (auto i = models_.begin(); i != models_.end();) { ModelData* model_data = i->second.get(); // attempt to prune if there are no references remaining except our own and // its been a while since it was used - if (current_time - model_data->last_used_time() > standard_media_prune_time + if (current_time - model_data->last_used_time() > standard_asset_prune_time && (model_data->object_strong_ref_count() <= 1)) { // if its preloaded/loaded we need to ask the graphics thread to unload it // first @@ -967,7 +968,7 @@ void Media::Prune(int level) { // allocate a reference to keep this model_data alive while the unload // is happening graphics_thread_unloads.push_back( - new Object::Ref(model_data)); + new Object::Ref(model_data)); auto i_next = i; i_next++; models_.erase(i); @@ -979,14 +980,14 @@ void Media::Prune(int level) { } // Prune collide-models. - assert(media_lists_locked_); + assert(asset_lists_locked_); for (auto i = collide_models_.begin(); i != collide_models_.end();) { CollideModelData* collide_model_data = i->second.get(); // attempt to prune if there are no references remaining except our own and - // its been a while since it was used (unlike other media we never prune + // its been a while since it was used (unlike other assets we never prune // these if there's still references to them if (current_time - collide_model_data->last_used_time() - > standard_media_prune_time + > standard_asset_prune_time && (collide_model_data->object_strong_ref_count() <= 1)) { // we can unload it immediately since that happens in the game thread... collide_model_data->Unload(); @@ -1004,13 +1005,13 @@ void Media::Prune(int level) { // sounds are still in active use by OpenAL and ensure references exist for // them somewhere while that is the case if (explicit_bool(false)) { - assert(media_lists_locked_); + assert(asset_lists_locked_); for (auto i = sounds_.begin(); i != sounds_.end();) { SoundData* sound_data = i->second.get(); // Attempt to prune if there are no references remaining except our own // and its been a while since it was used. if (current_time - sound_data->last_used_time() - > standard_media_prune_time + > standard_asset_prune_time && (sound_data->object_strong_ref_count() <= 1)) { // If its preloaded/loaded we need to ask the graphics thread to unload // it first. @@ -1018,7 +1019,7 @@ void Media::Prune(int level) { // Allocate a reference to keep this sound_data alive while the unload // is happening. audio_thread_unloads.push_back( - new Object::Ref(sound_data)); + new Object::Ref(sound_data)); auto i_next = i; i_next++; sounds_.erase(i); @@ -1038,7 +1039,7 @@ void Media::Prune(int level) { } #if SHOW_PRUNING_INFO - assert(media_lists_locked_); + assert(asset_lists_locked_); if (textures_.size() != old_texture_count) { Log("Textures pruned from " + std::to_string(old_texture_count) + " to " + std::to_string(textures_.size())); @@ -1066,7 +1067,7 @@ void Media::Prune(int level) { #endif // SHOW_PRUNING_INFO } -auto Media::FindMediaFile(FileType type, const std::string& name) +auto Assets::FindAssetFile(FileType type, const std::string& name) -> std::string { std::string file_out; @@ -1136,9 +1137,9 @@ auto Media::FindMediaFile(FileType type, const std::string& name) break; } - const std::vector& media_paths_used = media_paths_; + const std::vector& asset_paths_used = asset_paths_; - for (auto&& i : media_paths_used) { + for (auto&& i : asset_paths_used) { struct BA_STAT stats {}; file_out = i + "/" + prefix + name + ext; // NOLINT int result; @@ -1163,26 +1164,26 @@ auto Media::FindMediaFile(FileType type, const std::string& name) // We wanna fail gracefully for some types. if (type == FileType::kSound && name != "blank") { Log("Unable to load audio: '" + name + "'; trying fallback..."); - return FindMediaFile(type, "blank"); + return FindAssetFile(type, "blank"); } else if (type == FileType::kTexture && name != "white") { Log("Unable to load texture: '" + name + "'; trying fallback..."); - return FindMediaFile(type, "white"); + return FindAssetFile(type, "white"); } - throw Exception("Can't find media: \"" + name + "\""); + throw Exception("Can't find asset: \"" + name + "\""); // return file_out; } -void Media::AddPendingLoad(Object::Ref* c) { - switch ((**c).GetMediaType()) { - case MediaType::kTexture: - case MediaType::kModel: { +void Assets::AddPendingLoad(Object::Ref* c) { + switch ((**c).GetAssetType()) { + case AssetType::kTexture: + case AssetType::kModel: { // Tell the graphics thread there's pending loads... std::scoped_lock lock(pending_load_list_mutex_); pending_loads_graphics_.push_back(c); break; } - case MediaType::kSound: { + case AssetType::kSound: { // Tell the audio thread there's pending loads. { std::scoped_lock lock(pending_load_list_mutex_); @@ -1203,7 +1204,7 @@ void Media::AddPendingLoad(Object::Ref* c) { } } -void Media::ClearPendingLoadsDoneList() { +void Assets::ClearPendingLoadsDoneList() { assert(InLogicThread()); std::scoped_lock lock(pending_load_list_mutex_); @@ -1213,13 +1214,13 @@ void Media::ClearPendingLoadsDoneList() { // We can now kill the reference knowing that it's safe for this component // to die at any time (anyone needing it to be alive now should be holding a // reference themselves). - for (Object::Ref* i : pending_loads_done_) { + for (Object::Ref* i : pending_loads_done_) { delete i; } pending_loads_done_.clear(); } -void Media::AddPackage(const std::string& name, const std::string& path) { +void Assets::AddPackage(const std::string& name, const std::string& path) { // we don't protect package-path access so make sure its always from here.. assert(InLogicThread()); #if BA_DEBUG_BUILD @@ -1230,18 +1231,18 @@ void Media::AddPackage(const std::string& name, const std::string& path) { packages_[name] = path; } -Media::MediaListsLock::MediaListsLock() { +Assets::AssetListLock::AssetListLock() { BA_DEBUG_FUNCTION_TIMER_BEGIN(); - g_media->media_lists_mutex_.lock(); - assert(!g_media->media_lists_locked_); - g_media->media_lists_locked_ = true; + g_assets->asset_lists_mutex_.lock(); + assert(!g_assets->asset_lists_locked_); + g_assets->asset_lists_locked_ = true; BA_DEBUG_FUNCTION_TIMER_END_THREAD(20); } -Media::MediaListsLock::~MediaListsLock() { - assert(g_media->media_lists_locked_); - g_media->media_lists_locked_ = false; - g_media->media_lists_mutex_.unlock(); +Assets::AssetListLock::~AssetListLock() { + assert(g_assets->asset_lists_locked_); + g_assets->asset_lists_locked_ = false; + g_assets->asset_lists_mutex_.unlock(); } } // namespace ballistica diff --git a/src/ballistica/media/media.h b/src/ballistica/assets/assets.h similarity index 75% rename from src/ballistica/media/media.h rename to src/ballistica/assets/assets.h index f9f1e7df..529d4856 100644 --- a/src/ballistica/media/media.h +++ b/src/ballistica/assets/assets.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_MEDIA_MEDIA_H_ -#define BALLISTICA_MEDIA_MEDIA_H_ +#ifndef BALLISTICA_ASSETS_ASSETS_H_ +#define BALLISTICA_ASSETS_ASSETS_H_ #include #include @@ -12,15 +12,15 @@ namespace ballistica { -/// Global media wrangling class. -class Media { +/// Global assets wrangling class. +class Assets { public: - Media(); + Assets(); - /// Handy function to try to return a bit of media from a std::unordered_map + /// Handy function to try to return an asset from a std::unordered_map /// of weak-refs, loading/adding it if need be. template - static auto GetMedia( + static auto GetAsset( std::unordered_map >* list, const std::string& name, Scene* scene) -> Object::Ref { assert(InLogicThread()); @@ -43,7 +43,7 @@ class Media { auto AddPackage(const std::string& name, const std::string& path) -> void; auto Prune(int level = 0) -> void; - /// Finish loading any media that has been preloaded but still needs to be + /// Finish loading any assets that have been preloaded but still need to be /// loaded by the proper thread. auto RunPendingLoadsLogicThread() -> bool; @@ -58,9 +58,9 @@ class Media { /// This function takes a newly allocated pointer which /// is deleted once the load is completed. - auto AddPendingLoad(Object::Ref* c) -> void; + auto AddPendingLoad(Object::Ref* c) -> void; enum class FileType { kModel, kCollisionModel, kTexture, kSound, kData }; - auto FindMediaFile(FileType fileType, const std::string& file_in) + auto FindAssetFile(FileType fileType, const std::string& file_in) -> std::string; /// Unload renderer-specific bits only (gl display lists, etc) - used when @@ -68,8 +68,8 @@ class Media { auto UnloadRendererBits(bool textures, bool models) -> void; /// Should be called from the game thread after UnloadRendererBits(); - /// kicks off bg loads for all existing unloaded media. - auto MarkAllMediaForLoad() -> void; + /// kicks off bg loads for all existing unloaded assets. + auto MarkAllAssetsForLoad() -> void; auto PrintLoadInfo() -> void; auto GetModelPendingLoadCount() -> int; @@ -85,13 +85,13 @@ class Media { auto GetPendingLoadCount() -> int; /// You must hold one of these locks while calling Get*Data() below. - class MediaListsLock { + class AssetListLock { public: - MediaListsLock(); - ~MediaListsLock(); + AssetListLock(); + ~AssetListLock(); }; - /// Load/cache media (make sure you hold a MediaListsLock). + /// Load/cache assets (make sure you hold a AssetListLock). auto GetTextureData(const std::string& file_name) -> Object::Ref; auto GetTextureData(TextPacker* packer) -> Object::Ref; auto GetTextureDataQRCode(const std::string& file_name) @@ -106,32 +106,32 @@ class Media { // Get system assets. auto GetTexture(SystemTextureID id) -> TextureData* { - BA_PRECONDITION_FATAL(system_media_loaded_); // Revert to assert later. + BA_PRECONDITION_FATAL(system_assets_loaded_); // Revert to assert later. assert(InLogicThread()); assert(static_cast(id) < system_textures_.size()); return system_textures_[static_cast(id)].get(); } auto GetCubeMapTexture(SystemCubeMapTextureID id) -> TextureData* { - BA_PRECONDITION_FATAL(system_media_loaded_); // Revert to assert later. + BA_PRECONDITION_FATAL(system_assets_loaded_); // Revert to assert later. assert(InLogicThread()); assert(static_cast(id) < system_cube_map_textures_.size()); return system_cube_map_textures_[static_cast(id)].get(); } auto GetSound(SystemSoundID id) -> SoundData* { - BA_PRECONDITION_FATAL(system_media_loaded_); // Revert to assert later. + BA_PRECONDITION_FATAL(system_assets_loaded_); // Revert to assert later. assert(InLogicThread()); assert(static_cast(id) < system_sounds_.size()); return system_sounds_[static_cast(id)].get(); } auto GetModel(SystemModelID id) -> ModelData* { - BA_PRECONDITION_FATAL(system_media_loaded_); // Revert to assert later. + BA_PRECONDITION_FATAL(system_assets_loaded_); // Revert to assert later. assert(InLogicThread()); assert(static_cast(id) < system_models_.size()); return system_models_[static_cast(id)].get(); } - /// Load up hard-coded media for interface, etc. - auto LoadSystemMedia() -> void; + /// Load up hard-coded assets for interface, etc. + auto LoadSystemAssets() -> void; auto total_model_count() const -> uint32_t { return static_cast(models_.size()); @@ -148,7 +148,7 @@ class Media { } private: - static auto MarkComponentForLoad(MediaComponentData* c) -> void; + static auto MarkComponentForLoad(AssetComponentData* c) -> void; auto LoadSystemTexture(SystemTextureID id, const char* name) -> void; auto LoadSystemCubeMapTexture(SystemCubeMapTextureID id, const char* name) -> void; @@ -158,7 +158,7 @@ class Media { template auto GetComponentPendingLoadCount( - std::unordered_map >* t_list, MediaType type) + std::unordered_map >* t_list, AssetType type) -> int; template @@ -167,26 +167,26 @@ class Media { std::unordered_map >* c_list) -> Object::Ref; - std::vector media_paths_; - bool have_pending_loads_[static_cast(MediaType::kLast)]{}; + std::vector asset_paths_; + bool have_pending_loads_[static_cast(AssetType::kLast)]{}; std::unordered_map packages_; - // For use by MediaListsLock; don't manually acquire - std::mutex media_lists_mutex_; + // For use by AssetListLock; don't manually acquire + std::mutex asset_lists_mutex_; - // Will be true while a MediaListsLock exists. Good to debug-verify this - // during any media list access. - bool media_lists_locked_{}; + // Will be true while a AssetListLock exists. Good to debug-verify this + // during any asset list access. + bool asset_lists_locked_{}; - // 'hard-wired' internal media - bool system_media_loaded_{}; + // 'hard-wired' internal assets + bool system_assets_loaded_{}; std::vector > system_textures_; std::vector > system_cube_map_textures_; std::vector > system_sounds_; std::vector > system_datas_; std::vector > system_models_; - // All existing media by filename (including internal). + // All existing assets by filename (including internal). std::unordered_map > textures_; std::unordered_map > text_textures_; std::unordered_map > qr_textures_; @@ -198,13 +198,13 @@ class Media { // Components that have been preloaded but need to be loaded. std::mutex pending_load_list_mutex_; - std::vector*> pending_loads_graphics_; - std::vector*> pending_loads_sounds_; - std::vector*> pending_loads_datas_; - std::vector*> pending_loads_other_; - std::vector*> pending_loads_done_; + std::vector*> pending_loads_graphics_; + std::vector*> pending_loads_sounds_; + std::vector*> pending_loads_datas_; + std::vector*> pending_loads_other_; + std::vector*> pending_loads_done_; }; } // namespace ballistica -#endif // BALLISTICA_MEDIA_MEDIA_H_ +#endif // BALLISTICA_ASSETS_ASSETS_H_ diff --git a/src/ballistica/media/media_server.cc b/src/ballistica/assets/assets_server.cc similarity index 88% rename from src/ballistica/media/media_server.cc rename to src/ballistica/assets/assets_server.cc index 5592b1b6..aba5b502 100644 --- a/src/ballistica/media/media_server.cc +++ b/src/ballistica/assets/assets_server.cc @@ -1,34 +1,34 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/media/media_server.h" +#include "ballistica/assets/assets_server.h" +#include "ballistica/assets/assets.h" +#include "ballistica/assets/data/asset_component_data.h" #include "ballistica/core/thread.h" #include "ballistica/generic/huffman.h" #include "ballistica/generic/timer.h" #include "ballistica/generic/utils.h" #include "ballistica/graphics/graphics_server.h" -#include "ballistica/media/data/media_component_data.h" -#include "ballistica/media/media.h" namespace ballistica { -MediaServer::MediaServer(Thread* thread) +AssetsServer::AssetsServer(Thread* thread) : thread_(thread), writing_replay_(false), replay_message_bytes_(0), replays_broken_(false), replay_out_file_(nullptr) { - assert(g_media_server == nullptr); - g_media_server = this; + assert(g_assets_server == nullptr); + g_assets_server = this; // get our thread to give us periodic processing time... process_timer_ = this->thread()->NewTimer( 1000, true, NewLambdaRunnable([this] { Process(); })); } -MediaServer::~MediaServer() = default; +AssetsServer::~AssetsServer() = default; -void MediaServer::PushBeginWriteReplayCall() { +void AssetsServer::PushBeginWriteReplayCall() { thread()->PushCall([this] { if (replays_broken_) { return; @@ -37,7 +37,7 @@ void MediaServer::PushBeginWriteReplayCall() { // we only allow writing one replay at once; make sure that's actually the // case if (writing_replay_) { - Log("MediaServer got BeginWriteReplayCall while already writing"); + Log("AssetsServer got BeginWriteReplayCall while already writing"); WriteReplayMessages(); if (replay_out_file_) { fclose(replay_out_file_); @@ -75,11 +75,12 @@ void MediaServer::PushBeginWriteReplayCall() { // trigger our process timer to go off immediately // (we may need to wake it up) - g_media_server->process_timer_->SetLength(0); + g_assets_server->process_timer_->SetLength(0); }); } -void MediaServer::PushAddMessageToReplayCall(const std::vector& data) { +void AssetsServer::PushAddMessageToReplayCall( + const std::vector& data) { thread()->PushCall([this, data] { if (replays_broken_) { return; @@ -87,7 +88,7 @@ void MediaServer::PushAddMessageToReplayCall(const std::vector& data) { // sanity check.. if (!writing_replay_) { - Log("MediaServer got AddMessageToReplayCall while not writing replay"); + Log("AssetsServer got AddMessageToReplayCall while not writing replay"); replays_broken_ = true; return; } @@ -110,7 +111,7 @@ void MediaServer::PushAddMessageToReplayCall(const std::vector& data) { }); } -void MediaServer::PushEndWriteReplayCall() { +void AssetsServer::PushEndWriteReplayCall() { thread()->PushCall([this] { if (replays_broken_) { return; @@ -134,7 +135,7 @@ void MediaServer::PushEndWriteReplayCall() { }); } -void MediaServer::WriteReplayMessages() { +void AssetsServer::WriteReplayMessages() { if (replay_out_file_) { for (auto&& i : replay_messages_) { std::vector data_compressed = g_utils->huffman()->compress(i); @@ -194,10 +195,10 @@ void MediaServer::WriteReplayMessages() { } } -void MediaServer::Process() { +void AssetsServer::Process() { // make sure we don't do any loading until we know what kind/quality of // textures we'll be loading - if (!g_media || !g_graphics_server + if (!g_assets || !g_graphics_server || !g_graphics_server->texture_compression_types_are_set() // NOLINT || !g_graphics_server->texture_quality_set()) { return; @@ -209,12 +210,12 @@ void MediaServer::Process() { if (!pending_preloads_.empty()) { (**pending_preloads_.back()).Preload(); // pass the ref-pointer along to the load queue - g_media->AddPendingLoad(pending_preloads_.back()); + g_assets->AddPendingLoad(pending_preloads_.back()); pending_preloads_.pop_back(); } else if (!pending_preloads_audio_.empty()) { (**pending_preloads_audio_.back()).Preload(); // pass the ref-pointer along to the load queue - g_media->AddPendingLoad(pending_preloads_audio_.back()); + g_assets->AddPendingLoad(pending_preloads_audio_.back()); pending_preloads_audio_.pop_back(); } diff --git a/src/ballistica/media/media_server.h b/src/ballistica/assets/assets_server.h similarity index 67% rename from src/ballistica/media/media_server.h rename to src/ballistica/assets/assets_server.h index cff7007e..3c831129 100644 --- a/src/ballistica/media/media_server.h +++ b/src/ballistica/assets/assets_server.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_MEDIA_MEDIA_SERVER_H_ -#define BALLISTICA_MEDIA_MEDIA_SERVER_H_ +#ifndef BALLISTICA_ASSETS_ASSETS_SERVER_H_ +#define BALLISTICA_ASSETS_ASSETS_SERVER_H_ #include #include @@ -10,10 +10,10 @@ namespace ballistica { -class MediaServer { +class AssetsServer { public: - explicit MediaServer(Thread* thread); - ~MediaServer(); + explicit AssetsServer(Thread* thread); + ~AssetsServer(); void PushBeginWriteReplayCall(); void PushEndWriteReplayCall(); void PushAddMessageToReplayCall(const std::vector& data); @@ -30,12 +30,12 @@ class MediaServer { std::list > replay_messages_; size_t replay_message_bytes_{}; Timer* process_timer_{}; - std::vector*> pending_preloads_; - std::vector*> pending_preloads_audio_; + std::vector*> pending_preloads_; + std::vector*> pending_preloads_audio_; friend struct PreloadRunnable; - friend class Media; + friend class Assets; }; } // namespace ballistica -#endif // BALLISTICA_MEDIA_MEDIA_SERVER_H_ +#endif // BALLISTICA_ASSETS_ASSETS_SERVER_H_ diff --git a/src/ballistica/media/component/media_component.cc b/src/ballistica/assets/component/asset_component.cc similarity index 60% rename from src/ballistica/media/component/media_component.cc rename to src/ballistica/assets/component/asset_component.cc index 049aedf9..9e7ace5e 100644 --- a/src/ballistica/media/component/media_component.cc +++ b/src/ballistica/assets/component/asset_component.cc @@ -1,16 +1,16 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/media/component/media_component.h" +#include "ballistica/assets/component/asset_component.h" #include "ballistica/python/python_sys.h" #include "ballistica/scene/scene.h" namespace ballistica { -MediaComponent::MediaComponent(std::string name, Scene* scene) +AssetComponent::AssetComponent(std::string name, Scene* scene) : name_(std::move(name)), scene_(scene) {} -auto MediaComponent::GetPyRef(bool new_ref) -> PyObject* { +auto AssetComponent::GetPyRef(bool new_ref) -> PyObject* { if (!py_object_) { // if we have no python object, create it py_object_ = CreatePyObject(); @@ -22,11 +22,11 @@ auto MediaComponent::GetPyRef(bool new_ref) -> PyObject* { return py_object_; } -auto MediaComponent::GetObjectDescription() const -> std::string { - return ""; +auto AssetComponent::GetObjectDescription() const -> std::string { + return ""; } -void MediaComponent::ClearPyObject() { +void AssetComponent::ClearPyObject() { assert(py_object_ != nullptr); py_object_ = nullptr; } diff --git a/src/ballistica/media/component/media_component.h b/src/ballistica/assets/component/asset_component.h similarity index 82% rename from src/ballistica/media/component/media_component.h rename to src/ballistica/assets/component/asset_component.h index 84887de1..335f39c0 100644 --- a/src/ballistica/media/component/media_component.h +++ b/src/ballistica/assets/component/asset_component.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_MEDIA_COMPONENT_MEDIA_COMPONENT_H_ -#define BALLISTICA_MEDIA_COMPONENT_MEDIA_COMPONENT_H_ +#ifndef BALLISTICA_ASSETS_COMPONENT_ASSET_COMPONENT_H_ +#define BALLISTICA_ASSETS_COMPONENT_ASSET_COMPONENT_H_ #include @@ -10,9 +10,9 @@ namespace ballistica { -class MediaComponent : public Object { +class AssetComponent : public Object { public: - MediaComponent(std::string name, Scene* scene); + AssetComponent(std::string name, Scene* scene); auto name() const -> std::string { return name_; } // Returns true if this texture was created in the UI context. @@ -41,7 +41,7 @@ class MediaComponent : public Object { } protected: - virtual auto GetMediaComponentTypeName() const -> std::string = 0; + virtual auto GetAssetComponentTypeName() const -> std::string = 0; // Create a python representation of this object. virtual auto CreatePyObject() -> PyObject* = 0; @@ -60,4 +60,4 @@ class MediaComponent : public Object { } // namespace ballistica -#endif // BALLISTICA_MEDIA_COMPONENT_MEDIA_COMPONENT_H_ +#endif // BALLISTICA_ASSETS_COMPONENT_ASSET_COMPONENT_H_ diff --git a/src/ballistica/media/component/collide_model.cc b/src/ballistica/assets/component/collide_model.cc similarity index 81% rename from src/ballistica/media/component/collide_model.cc rename to src/ballistica/assets/component/collide_model.cc index d24731b4..b86d5778 100644 --- a/src/ballistica/media/component/collide_model.cc +++ b/src/ballistica/assets/component/collide_model.cc @@ -1,6 +1,6 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/media/component/collide_model.h" +#include "ballistica/assets/component/collide_model.h" #include "ballistica/game/game_stream.h" #include "ballistica/python/class/python_class_collide_model.h" @@ -9,7 +9,7 @@ namespace ballistica { CollideModel::CollideModel(const std::string& name, Scene* scene) - : MediaComponent(name, scene), dead_(false) { + : AssetComponent(name, scene), dead_(false) { assert(InLogicThread()); if (scene) { if (GameStream* os = scene->GetGameStream()) { @@ -17,8 +17,8 @@ CollideModel::CollideModel(const std::string& name, Scene* scene) } } { - Media::MediaListsLock lock; - collide_model_data_ = g_media->GetCollideModelData(name); + Assets::AssetListLock lock; + collide_model_data_ = g_assets->GetCollideModelData(name); } assert(collide_model_data_.exists()); } diff --git a/src/ballistica/media/component/collide_model.h b/src/ballistica/assets/component/collide_model.h similarity index 63% rename from src/ballistica/media/component/collide_model.h rename to src/ballistica/assets/component/collide_model.h index 7b8fa1e8..09671fa3 100644 --- a/src/ballistica/media/component/collide_model.h +++ b/src/ballistica/assets/component/collide_model.h @@ -1,18 +1,18 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_MEDIA_COMPONENT_COLLIDE_MODEL_H_ -#define BALLISTICA_MEDIA_COMPONENT_COLLIDE_MODEL_H_ +#ifndef BALLISTICA_ASSETS_COMPONENT_COLLIDE_MODEL_H_ +#define BALLISTICA_ASSETS_COMPONENT_COLLIDE_MODEL_H_ #include -#include "ballistica/media/component/media_component.h" -#include "ballistica/media/data/collide_model_data.h" -#include "ballistica/media/media.h" +#include "ballistica/assets/assets.h" +#include "ballistica/assets/component/asset_component.h" +#include "ballistica/assets/data/collide_model_data.h" namespace ballistica { // user-facing collide_model class -class CollideModel : public MediaComponent { +class CollideModel : public AssetComponent { public: CollideModel(const std::string& name, Scene* scene); ~CollideModel() override; @@ -23,7 +23,7 @@ class CollideModel : public MediaComponent { auto collide_model_data() const -> CollideModelData* { return collide_model_data_.get(); } - auto GetMediaComponentTypeName() const -> std::string override { + auto GetAssetComponentTypeName() const -> std::string override { return "CollideModel"; } void MarkDead(); @@ -38,4 +38,4 @@ class CollideModel : public MediaComponent { } // namespace ballistica -#endif // BALLISTICA_MEDIA_COMPONENT_COLLIDE_MODEL_H_ +#endif // BALLISTICA_ASSETS_COMPONENT_COLLIDE_MODEL_H_ diff --git a/src/ballistica/media/component/cube_map_texture.cc b/src/ballistica/assets/component/cube_map_texture.cc similarity index 59% rename from src/ballistica/media/component/cube_map_texture.cc rename to src/ballistica/assets/component/cube_map_texture.cc index 6116bf58..6af4d80b 100644 --- a/src/ballistica/media/component/cube_map_texture.cc +++ b/src/ballistica/assets/component/cube_map_texture.cc @@ -1,19 +1,19 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/media/component/cube_map_texture.h" +#include "ballistica/assets/component/cube_map_texture.h" -#include "ballistica/media/media.h" +#include "ballistica/assets/assets.h" namespace ballistica { CubeMapTexture::CubeMapTexture(const std::string& name, Scene* scene) - : MediaComponent(name, scene) { + : AssetComponent(name, scene) { assert(InLogicThread()); // cant currently add these to scenes so nothing to do here.. { - Media::MediaListsLock lock; - texture_data_ = g_media->GetCubeMapTextureData(name); + Assets::AssetListLock lock; + texture_data_ = g_assets->GetCubeMapTextureData(name); } assert(texture_data_.exists()); } diff --git a/src/ballistica/media/component/cube_map_texture.h b/src/ballistica/assets/component/cube_map_texture.h similarity index 59% rename from src/ballistica/media/component/cube_map_texture.h rename to src/ballistica/assets/component/cube_map_texture.h index c72e4623..db5ed159 100644 --- a/src/ballistica/media/component/cube_map_texture.h +++ b/src/ballistica/assets/component/cube_map_texture.h @@ -1,17 +1,17 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_MEDIA_COMPONENT_CUBE_MAP_TEXTURE_H_ -#define BALLISTICA_MEDIA_COMPONENT_CUBE_MAP_TEXTURE_H_ +#ifndef BALLISTICA_ASSETS_COMPONENT_CUBE_MAP_TEXTURE_H_ +#define BALLISTICA_ASSETS_COMPONENT_CUBE_MAP_TEXTURE_H_ #include -#include "ballistica/media/component/media_component.h" -#include "ballistica/media/data/texture_data.h" +#include "ballistica/assets/component/asset_component.h" +#include "ballistica/assets/data/texture_data.h" namespace ballistica { // user-facing texture class -class CubeMapTexture : public MediaComponent { +class CubeMapTexture : public AssetComponent { public: CubeMapTexture(const std::string& name, Scene* s); @@ -19,7 +19,7 @@ class CubeMapTexture : public MediaComponent { // note that a texture's data can change over time as different // versions are spooled in/out/etc auto GetTextureData() const -> TextureData* { return texture_data_.get(); } - auto GetMediaComponentTypeName() const -> std::string override { + auto GetAssetComponentTypeName() const -> std::string override { return "CubeMapTexture"; } @@ -29,4 +29,4 @@ class CubeMapTexture : public MediaComponent { } // namespace ballistica -#endif // BALLISTICA_MEDIA_COMPONENT_CUBE_MAP_TEXTURE_H_ +#endif // BALLISTICA_ASSETS_COMPONENT_CUBE_MAP_TEXTURE_H_ diff --git a/src/ballistica/media/component/data.cc b/src/ballistica/assets/component/data.cc similarity index 81% rename from src/ballistica/media/component/data.cc rename to src/ballistica/assets/component/data.cc index cf3dec87..1f760ebb 100644 --- a/src/ballistica/media/component/data.cc +++ b/src/ballistica/assets/component/data.cc @@ -1,6 +1,6 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/media/component/data.h" +#include "ballistica/assets/component/data.h" #include "ballistica/game/game_stream.h" #include "ballistica/python/class/python_class_data.h" @@ -9,7 +9,7 @@ namespace ballistica { Data::Data(const std::string& name, Scene* scene) - : MediaComponent(name, scene), dead_(false) { + : AssetComponent(name, scene), dead_(false) { assert(InLogicThread()); if (scene) { @@ -18,8 +18,8 @@ Data::Data(const std::string& name, Scene* scene) } } { - Media::MediaListsLock lock; - data_data_ = g_media->GetDataData(name); + Assets::AssetListLock lock; + data_data_ = g_assets->GetDataData(name); } assert(data_data_.exists()); } diff --git a/src/ballistica/media/component/data.h b/src/ballistica/assets/component/data.h similarity index 62% rename from src/ballistica/media/component/data.h rename to src/ballistica/assets/component/data.h index 30e926a2..fe3e917d 100644 --- a/src/ballistica/media/component/data.h +++ b/src/ballistica/assets/component/data.h @@ -1,22 +1,22 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_MEDIA_COMPONENT_DATA_H_ -#define BALLISTICA_MEDIA_COMPONENT_DATA_H_ +#ifndef BALLISTICA_ASSETS_COMPONENT_DATA_H_ +#define BALLISTICA_ASSETS_COMPONENT_DATA_H_ #include #include +#include "ballistica/assets/assets.h" +#include "ballistica/assets/component/asset_component.h" +#include "ballistica/assets/data/asset_component_data.h" +#include "ballistica/assets/data/data_data.h" #include "ballistica/ballistica.h" #include "ballistica/core/object.h" -#include "ballistica/media/component/media_component.h" -#include "ballistica/media/data/data_data.h" -#include "ballistica/media/data/media_component_data.h" -#include "ballistica/media/media.h" namespace ballistica { // user-facing data class -class Data : public MediaComponent { +class Data : public AssetComponent { public: Data(const std::string& name, Scene* scene); ~Data() override; @@ -25,7 +25,7 @@ class Data : public MediaComponent { // note that a data's data can change over time as different // versions are spooled in/out/etc. auto data_data() const -> DataData* { return data_data_.get(); } - auto GetMediaComponentTypeName() const -> std::string override { + auto GetAssetComponentTypeName() const -> std::string override { return "Data"; } void MarkDead(); @@ -40,4 +40,4 @@ class Data : public MediaComponent { } // namespace ballistica -#endif // BALLISTICA_MEDIA_COMPONENT_DATA_H_ +#endif // BALLISTICA_ASSETS_COMPONENT_DATA_H_ diff --git a/src/ballistica/media/component/model.cc b/src/ballistica/assets/component/model.cc similarity index 81% rename from src/ballistica/media/component/model.cc rename to src/ballistica/assets/component/model.cc index 77b60aef..88679733 100644 --- a/src/ballistica/media/component/model.cc +++ b/src/ballistica/assets/component/model.cc @@ -1,6 +1,6 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/media/component/model.h" +#include "ballistica/assets/component/model.h" #include "ballistica/game/game_stream.h" #include "ballistica/python/class/python_class_model.h" @@ -9,7 +9,7 @@ namespace ballistica { Model::Model(const std::string& name, Scene* scene) - : MediaComponent(name, scene), dead_(false) { + : AssetComponent(name, scene), dead_(false) { assert(InLogicThread()); if (scene) { @@ -18,8 +18,8 @@ Model::Model(const std::string& name, Scene* scene) } } { - Media::MediaListsLock lock; - model_data_ = g_media->GetModelData(name); + Assets::AssetListLock lock; + model_data_ = g_assets->GetModelData(name); } assert(model_data_.exists()); } diff --git a/src/ballistica/media/component/model.h b/src/ballistica/assets/component/model.h similarity index 59% rename from src/ballistica/media/component/model.h rename to src/ballistica/assets/component/model.h index c7a8968b..239813a0 100644 --- a/src/ballistica/media/component/model.h +++ b/src/ballistica/assets/component/model.h @@ -1,23 +1,23 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_MEDIA_COMPONENT_MODEL_H_ -#define BALLISTICA_MEDIA_COMPONENT_MODEL_H_ +#ifndef BALLISTICA_ASSETS_COMPONENT_MODEL_H_ +#define BALLISTICA_ASSETS_COMPONENT_MODEL_H_ #include #include +#include "ballistica/assets/assets.h" +#include "ballistica/assets/component/asset_component.h" +#include "ballistica/assets/data/asset_component_data.h" +#include "ballistica/assets/data/model_data.h" +#include "ballistica/assets/data/model_renderer_data.h" #include "ballistica/ballistica.h" #include "ballistica/core/object.h" -#include "ballistica/media/component/media_component.h" -#include "ballistica/media/data/media_component_data.h" -#include "ballistica/media/data/model_data.h" -#include "ballistica/media/data/model_renderer_data.h" -#include "ballistica/media/media.h" namespace ballistica { // user-facing model class -class Model : public MediaComponent { +class Model : public AssetComponent { public: Model(const std::string& name, Scene* scene); ~Model() override; @@ -26,7 +26,7 @@ class Model : public MediaComponent { // note that a model's data can change over time as different // versions are spooled in/out/etc auto model_data() const -> ModelData* { return model_data_.get(); } - auto GetMediaComponentTypeName() const -> std::string override { + auto GetAssetComponentTypeName() const -> std::string override { return "Model"; } void MarkDead(); @@ -41,4 +41,4 @@ class Model : public MediaComponent { } // namespace ballistica -#endif // BALLISTICA_MEDIA_COMPONENT_MODEL_H_ +#endif // BALLISTICA_ASSETS_COMPONENT_MODEL_H_ diff --git a/src/ballistica/media/component/sound.cc b/src/ballistica/assets/component/sound.cc similarity index 75% rename from src/ballistica/media/component/sound.cc rename to src/ballistica/assets/component/sound.cc index babf5200..7f4962df 100644 --- a/src/ballistica/media/component/sound.cc +++ b/src/ballistica/assets/component/sound.cc @@ -1,17 +1,17 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/media/component/sound.h" +#include "ballistica/assets/component/sound.h" +#include "ballistica/assets/assets.h" +#include "ballistica/assets/data/sound_data.h" #include "ballistica/game/game_stream.h" -#include "ballistica/media/data/sound_data.h" -#include "ballistica/media/media.h" #include "ballistica/python/class/python_class_sound.h" #include "ballistica/scene/scene.h" namespace ballistica { Sound::Sound(const std::string& name, Scene* scene) - : MediaComponent(name, scene) { + : AssetComponent(name, scene) { assert(InLogicThread()); if (scene) { if (GameStream* os = scene->GetGameStream()) { @@ -19,8 +19,8 @@ Sound::Sound(const std::string& name, Scene* scene) } } { - Media::MediaListsLock lock; - sound_data_ = g_media->GetSoundData(name); + Assets::AssetListLock lock; + sound_data_ = g_assets->GetSoundData(name); } assert(sound_data_.exists()); } diff --git a/src/ballistica/media/component/sound.h b/src/ballistica/assets/component/sound.h similarity index 68% rename from src/ballistica/media/component/sound.h rename to src/ballistica/assets/component/sound.h index e712cced..ff0295b7 100644 --- a/src/ballistica/media/component/sound.h +++ b/src/ballistica/assets/component/sound.h @@ -1,16 +1,16 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_MEDIA_COMPONENT_SOUND_H_ -#define BALLISTICA_MEDIA_COMPONENT_SOUND_H_ +#ifndef BALLISTICA_ASSETS_COMPONENT_SOUND_H_ +#define BALLISTICA_ASSETS_COMPONENT_SOUND_H_ #include #include -#include "ballistica/media/component/media_component.h" +#include "ballistica/assets/component/asset_component.h" namespace ballistica { -class Sound : public MediaComponent { +class Sound : public AssetComponent { public: Sound(const std::string& name, Scene* scene); ~Sound() override; @@ -19,7 +19,7 @@ class Sound : public MediaComponent { // Note that a sound's data can change over time as different // versions are spooled in/out/etc. auto GetSoundData() const -> SoundData* { return sound_data_.get(); } - auto GetMediaComponentTypeName() const -> std::string override { + auto GetAssetComponentTypeName() const -> std::string override { return "Sound"; } void MarkDead(); @@ -34,4 +34,4 @@ class Sound : public MediaComponent { } // namespace ballistica -#endif // BALLISTICA_MEDIA_COMPONENT_SOUND_H_ +#endif // BALLISTICA_ASSETS_COMPONENT_SOUND_H_ diff --git a/src/ballistica/media/component/texture.cc b/src/ballistica/assets/component/texture.cc similarity index 74% rename from src/ballistica/media/component/texture.cc rename to src/ballistica/assets/component/texture.cc index 6a8c31d0..4a350773 100644 --- a/src/ballistica/media/component/texture.cc +++ b/src/ballistica/assets/component/texture.cc @@ -1,6 +1,6 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/media/component/texture.h" +#include "ballistica/assets/component/texture.h" #include "ballistica/game/game_stream.h" #include "ballistica/graphics/renderer.h" @@ -10,7 +10,7 @@ namespace ballistica { Texture::Texture(const std::string& name, Scene* scene) - : MediaComponent(name, scene), dead_(false) { + : AssetComponent(name, scene), dead_(false) { assert(InLogicThread()); // Add to the provided scene to get a numeric ID. @@ -20,18 +20,18 @@ Texture::Texture(const std::string& name, Scene* scene) } } { - Media::MediaListsLock lock; - texture_data_ = g_media->GetTextureData(name); + Assets::AssetListLock lock; + texture_data_ = g_assets->GetTextureData(name); } assert(texture_data_.exists()); } // qrcode version -Texture::Texture(const std::string& qr_url) : MediaComponent(qr_url, nullptr) { +Texture::Texture(const std::string& qr_url) : AssetComponent(qr_url, nullptr) { assert(InLogicThread()); { - Media::MediaListsLock lock; - texture_data_ = g_media->GetTextureDataQRCode(qr_url); + Assets::AssetListLock lock; + texture_data_ = g_assets->GetTextureDataQRCode(qr_url); } assert(texture_data_.exists()); } diff --git a/src/ballistica/media/component/texture.h b/src/ballistica/assets/component/texture.h similarity index 67% rename from src/ballistica/media/component/texture.h rename to src/ballistica/assets/component/texture.h index d03ed2e5..892767ee 100644 --- a/src/ballistica/media/component/texture.h +++ b/src/ballistica/assets/component/texture.h @@ -1,17 +1,17 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_MEDIA_COMPONENT_TEXTURE_H_ -#define BALLISTICA_MEDIA_COMPONENT_TEXTURE_H_ +#ifndef BALLISTICA_ASSETS_COMPONENT_TEXTURE_H_ +#define BALLISTICA_ASSETS_COMPONENT_TEXTURE_H_ #include -#include "ballistica/media/component/media_component.h" -#include "ballistica/media/data/texture_data.h" +#include "ballistica/assets/component/asset_component.h" +#include "ballistica/assets/data/texture_data.h" namespace ballistica { // User-facing texture class. -class Texture : public MediaComponent { +class Texture : public AssetComponent { public: Texture(const std::string& name, Scene* scene); explicit Texture(const std::string& qr_url); @@ -21,7 +21,7 @@ class Texture : public MediaComponent { // Note that a texture's data can change over time as different // versions are spooled in/out/etc. auto texture_data() const -> TextureData* { return texture_data_.get(); } - auto GetMediaComponentTypeName() const -> std::string override { + auto GetAssetComponentTypeName() const -> std::string override { return "Texture"; } void MarkDead(); @@ -36,4 +36,4 @@ class Texture : public MediaComponent { } // namespace ballistica -#endif // BALLISTICA_MEDIA_COMPONENT_TEXTURE_H_ +#endif // BALLISTICA_ASSETS_COMPONENT_TEXTURE_H_ diff --git a/src/ballistica/media/data/media_component_data.cc b/src/ballistica/assets/data/asset_component_data.cc similarity index 84% rename from src/ballistica/media/data/media_component_data.cc rename to src/ballistica/assets/data/asset_component_data.cc index ed5f79c6..bb7e96ed 100644 --- a/src/ballistica/media/data/media_component_data.cc +++ b/src/ballistica/assets/data/asset_component_data.cc @@ -1,25 +1,25 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/media/data/media_component_data.h" +#include "ballistica/assets/data/asset_component_data.h" namespace ballistica { -MediaComponentData::MediaComponentData() { +AssetComponentData::AssetComponentData() { assert(InLogicThread()); - assert(g_media); + assert(g_assets); last_used_time_ = GetRealTime(); } -MediaComponentData::~MediaComponentData() { +AssetComponentData::~AssetComponentData() { // at the moment whoever owns the last reference to us // needs to make sure to unload us before we die.. // I feel like there should be a more elegant solution to that. - assert(g_media); + assert(g_assets); assert(!locked()); assert(!loaded()); } -void MediaComponentData::Preload(bool already_locked) { +void AssetComponentData::Preload(bool already_locked) { LockGuard lock(this, already_locked ? LockGuard::Type::kDontLock : LockGuard::Type::kLock); if (!preloaded_) { @@ -35,7 +35,7 @@ void MediaComponentData::Preload(bool already_locked) { } } -void MediaComponentData::Load(bool already_locked) { +void AssetComponentData::Load(bool already_locked) { LockGuard lock(this, already_locked ? LockGuard::Type::kDontLock : LockGuard::Type::kLock); if (!preloaded_) { @@ -57,7 +57,7 @@ void MediaComponentData::Load(bool already_locked) { } } -void MediaComponentData::Unload(bool already_locked) { +void AssetComponentData::Unload(bool already_locked) { LockGuard lock(this, already_locked ? LockGuard::Type::kDontLock : LockGuard::Type::kLock); @@ -80,7 +80,7 @@ void MediaComponentData::Unload(bool already_locked) { } } -MediaComponentData::LockGuard::LockGuard(MediaComponentData* data, Type type) +AssetComponentData::LockGuard::LockGuard(AssetComponentData* data, Type type) : data_(data) { switch (type) { case kLock: { @@ -100,7 +100,7 @@ MediaComponentData::LockGuard::LockGuard(MediaComponentData* data, Type type) } } -MediaComponentData::LockGuard::~LockGuard() { +AssetComponentData::LockGuard::~LockGuard() { if (holds_lock_) { data_->Unlock(); } diff --git a/src/ballistica/media/data/media_component_data.h b/src/ballistica/assets/data/asset_component_data.h similarity index 88% rename from src/ballistica/media/data/media_component_data.h rename to src/ballistica/assets/data/asset_component_data.h index 7ab99e25..4a2f91e8 100644 --- a/src/ballistica/media/data/media_component_data.h +++ b/src/ballistica/assets/data/asset_component_data.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_MEDIA_DATA_MEDIA_COMPONENT_DATA_H_ -#define BALLISTICA_MEDIA_DATA_MEDIA_COMPONENT_DATA_H_ +#ifndef BALLISTICA_ASSETS_DATA_ASSET_COMPONENT_DATA_H_ +#define BALLISTICA_ASSETS_DATA_ASSET_COMPONENT_DATA_H_ #include #include @@ -11,17 +11,17 @@ namespace ballistica { -/// Base class for loadable media components. -class MediaComponentData : public Object { +/// Base class for loadable asset components. +class AssetComponentData : public Object { public: - MediaComponentData(); - ~MediaComponentData() override; + AssetComponentData(); + ~AssetComponentData() override; void Preload(bool already_locked = false); void Load(bool already_locked = false); void Unload(bool already_locked = false); auto preloaded() const -> bool { return preloaded_; } auto loaded() const -> bool { return preloaded_ && loaded_; } - virtual auto GetMediaType() const -> MediaType = 0; + virtual auto GetAssetType() const -> AssetType = 0; // Return name or another identifier. For debugging purposes. virtual auto GetName() const -> std::string { return "invalid"; } @@ -35,14 +35,14 @@ class MediaComponentData : public Object { class LockGuard { public: enum Type { kLock, kInheritLock, kDontLock }; - explicit LockGuard(MediaComponentData* data, Type type = kLock); + explicit LockGuard(AssetComponentData* data, Type type = kLock); ~LockGuard(); // Does this guard hold a lock? auto holds_lock() const -> bool { return holds_lock_; } private: - MediaComponentData* data_ = nullptr; + AssetComponentData* data_ = nullptr; bool holds_lock_ = false; }; @@ -128,9 +128,9 @@ class MediaComponentData : public Object { bool preloaded_ = false; bool loaded_ = false; std::mutex mutex_; - BA_DISALLOW_CLASS_COPIES(MediaComponentData); + BA_DISALLOW_CLASS_COPIES(AssetComponentData); }; } // namespace ballistica -#endif // BALLISTICA_MEDIA_DATA_MEDIA_COMPONENT_DATA_H_ +#endif // BALLISTICA_ASSETS_DATA_ASSET_COMPONENT_DATA_H_ diff --git a/src/ballistica/media/data/collide_model_data.cc b/src/ballistica/assets/data/collide_model_data.cc similarity index 95% rename from src/ballistica/media/data/collide_model_data.cc rename to src/ballistica/assets/data/collide_model_data.cc index 6a19aeac..763a6d23 100644 --- a/src/ballistica/media/data/collide_model_data.cc +++ b/src/ballistica/assets/data/collide_model_data.cc @@ -1,15 +1,15 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/media/data/collide_model_data.h" +#include "ballistica/assets/data/collide_model_data.h" -#include "ballistica/media/media.h" +#include "ballistica/assets/assets.h" namespace ballistica { CollideModelData::CollideModelData(const std::string& file_name_in) : file_name_(file_name_in) { file_name_full_ = - g_media->FindMediaFile(Media::FileType::kCollisionModel, file_name_in); + g_assets->FindAssetFile(Assets::FileType::kCollisionModel, file_name_in); valid_ = true; } diff --git a/src/ballistica/media/data/collide_model_data.h b/src/ballistica/assets/data/collide_model_data.h similarity index 71% rename from src/ballistica/media/data/collide_model_data.h rename to src/ballistica/assets/data/collide_model_data.h index 3e3223d3..0dba9bfd 100644 --- a/src/ballistica/media/data/collide_model_data.h +++ b/src/ballistica/assets/data/collide_model_data.h @@ -1,26 +1,26 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_MEDIA_DATA_COLLIDE_MODEL_DATA_H_ -#define BALLISTICA_MEDIA_DATA_COLLIDE_MODEL_DATA_H_ +#ifndef BALLISTICA_ASSETS_DATA_COLLIDE_MODEL_DATA_H_ +#define BALLISTICA_ASSETS_DATA_COLLIDE_MODEL_DATA_H_ #include #include -#include "ballistica/media/data/media_component_data.h" +#include "ballistica/assets/data/asset_component_data.h" #include "ode/ode.h" namespace ballistica { // Loadable model for collision detection. -class CollideModelData : public MediaComponentData { +class CollideModelData : public AssetComponentData { public: CollideModelData() = default; explicit CollideModelData(const std::string& file_name_in); void DoPreload() override; void DoLoad() override; void DoUnload() override; - auto GetMediaType() const -> MediaType override { - return MediaType::kCollideModel; + auto GetAssetType() const -> AssetType override { + return AssetType::kCollideModel; } auto GetName() const -> std::string override { if (!file_name_full_.empty()) { @@ -44,4 +44,4 @@ class CollideModelData : public MediaComponentData { } // namespace ballistica -#endif // BALLISTICA_MEDIA_DATA_COLLIDE_MODEL_DATA_H_ +#endif // BALLISTICA_ASSETS_DATA_COLLIDE_MODEL_DATA_H_ diff --git a/src/ballistica/media/data/data_data.cc b/src/ballistica/assets/data/data_data.cc similarity index 90% rename from src/ballistica/media/data/data_data.cc rename to src/ballistica/assets/data/data_data.cc index 360d0d14..770899e6 100644 --- a/src/ballistica/media/data/data_data.cc +++ b/src/ballistica/assets/data/data_data.cc @@ -1,8 +1,8 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/media/data/data_data.h" +#include "ballistica/assets/data/data_data.h" -#include "ballistica/media/media.h" +#include "ballistica/assets/assets.h" #include "ballistica/python/python.h" #include "ballistica/python/python_sys.h" @@ -10,7 +10,7 @@ namespace ballistica { DataData::DataData(const std::string& file_name_in) : file_name_(file_name_in) { file_name_full_ = - g_media->FindMediaFile(Media::FileType::kData, file_name_in); + g_assets->FindAssetFile(Assets::FileType::kData, file_name_in); valid_ = true; } diff --git a/src/ballistica/media/data/data_data.h b/src/ballistica/assets/data/data_data.h similarity index 75% rename from src/ballistica/media/data/data_data.h rename to src/ballistica/assets/data/data_data.h index 11888623..57baa42b 100644 --- a/src/ballistica/media/data/data_data.h +++ b/src/ballistica/assets/data/data_data.h @@ -1,16 +1,16 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_MEDIA_DATA_DATA_DATA_H_ -#define BALLISTICA_MEDIA_DATA_DATA_DATA_H_ +#ifndef BALLISTICA_ASSETS_DATA_DATA_DATA_H_ +#define BALLISTICA_ASSETS_DATA_DATA_DATA_H_ #include -#include "ballistica/media/data/media_component_data.h" +#include "ballistica/assets/data/asset_component_data.h" #include "ballistica/python/python_ref.h" namespace ballistica { -class DataData : public MediaComponentData { +class DataData : public AssetComponentData { public: DataData() = default; explicit DataData(const std::string& file_name_in); @@ -19,7 +19,7 @@ class DataData : public MediaComponentData { void DoLoad() override; void DoUnload() override; - auto GetMediaType() const -> MediaType override { return MediaType::kData; } + auto GetAssetType() const -> AssetType override { return AssetType::kData; } auto GetName() const -> std::string override { if (!file_name_full_.empty()) { return file_name_full_; @@ -44,4 +44,4 @@ class DataData : public MediaComponentData { } // namespace ballistica -#endif // BALLISTICA_MEDIA_DATA_DATA_DATA_H_ +#endif // BALLISTICA_ASSETS_DATA_DATA_DATA_H_ diff --git a/src/ballistica/media/data/model_data.cc b/src/ballistica/assets/data/model_data.cc similarity index 96% rename from src/ballistica/media/data/model_data.cc rename to src/ballistica/assets/data/model_data.cc index 637e4153..48e2cf99 100644 --- a/src/ballistica/media/data/model_data.cc +++ b/src/ballistica/assets/data/model_data.cc @@ -1,6 +1,6 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/media/data/model_data.h" +#include "ballistica/assets/data/model_data.h" #include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/renderer.h" @@ -10,7 +10,7 @@ namespace ballistica { ModelData::ModelData(const std::string& file_name_in) : file_name_(file_name_in) { file_name_full_ = - g_media->FindMediaFile(Media::FileType::kModel, file_name_in); + g_assets->FindAssetFile(Assets::FileType::kModel, file_name_in); valid_ = true; } diff --git a/src/ballistica/media/data/model_data.h b/src/ballistica/assets/data/model_data.h similarity index 81% rename from src/ballistica/media/data/model_data.h rename to src/ballistica/assets/data/model_data.h index cb155c6c..e5388922 100644 --- a/src/ballistica/media/data/model_data.h +++ b/src/ballistica/assets/data/model_data.h @@ -1,24 +1,24 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_MEDIA_DATA_MODEL_DATA_H_ -#define BALLISTICA_MEDIA_DATA_MODEL_DATA_H_ +#ifndef BALLISTICA_ASSETS_DATA_MODEL_DATA_H_ +#define BALLISTICA_ASSETS_DATA_MODEL_DATA_H_ #include #include -#include "ballistica/media/data/media_component_data.h" -#include "ballistica/media/data/model_renderer_data.h" +#include "ballistica/assets/data/asset_component_data.h" +#include "ballistica/assets/data/model_renderer_data.h" namespace ballistica { -class ModelData : public MediaComponentData { +class ModelData : public AssetComponentData { public: ModelData() = default; explicit ModelData(const std::string& file_name_in); void DoPreload() override; void DoLoad() override; void DoUnload() override; - auto GetMediaType() const -> MediaType override { return MediaType::kModel; } + auto GetAssetType() const -> AssetType override { return AssetType::kModel; } auto GetName() const -> std::string override { if (!file_name_full_.empty()) { return file_name_full_; @@ -64,4 +64,4 @@ class ModelData : public MediaComponentData { } // namespace ballistica -#endif // BALLISTICA_MEDIA_DATA_MODEL_DATA_H_ +#endif // BALLISTICA_ASSETS_DATA_MODEL_DATA_H_ diff --git a/src/ballistica/media/data/model_renderer_data.h b/src/ballistica/assets/data/model_renderer_data.h similarity index 70% rename from src/ballistica/media/data/model_renderer_data.h rename to src/ballistica/assets/data/model_renderer_data.h index ad23080a..d2ac255b 100644 --- a/src/ballistica/media/data/model_renderer_data.h +++ b/src/ballistica/assets/data/model_renderer_data.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_MEDIA_DATA_MODEL_RENDERER_DATA_H_ -#define BALLISTICA_MEDIA_DATA_MODEL_RENDERER_DATA_H_ +#ifndef BALLISTICA_ASSETS_DATA_MODEL_RENDERER_DATA_H_ +#define BALLISTICA_ASSETS_DATA_MODEL_RENDERER_DATA_H_ #include "ballistica/core/object.h" @@ -18,4 +18,4 @@ class ModelRendererData : public Object { } // namespace ballistica -#endif // BALLISTICA_MEDIA_DATA_MODEL_RENDERER_DATA_H_ +#endif // BALLISTICA_ASSETS_DATA_MODEL_RENDERER_DATA_H_ diff --git a/src/ballistica/media/data/sound_data.cc b/src/ballistica/assets/data/sound_data.cc similarity index 98% rename from src/ballistica/media/data/sound_data.cc rename to src/ballistica/assets/data/sound_data.cc index e5c2ab40..804b7fb9 100644 --- a/src/ballistica/media/data/sound_data.cc +++ b/src/ballistica/assets/data/sound_data.cc @@ -1,6 +1,6 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/media/data/sound_data.h" +#include "ballistica/assets/data/sound_data.h" #if BA_ENABLE_AUDIO #if BA_USE_TREMOR_VORBIS @@ -10,8 +10,8 @@ #endif #endif // BA_ENABLE_AUDIO +#include "ballistica/assets/assets.h" #include "ballistica/audio/audio_server.h" -#include "ballistica/media/media.h" #include "ballistica/python/python.h" // Need to move away from OpenAL on Apple stuff. @@ -248,7 +248,7 @@ SoundData::SoundData(const std::string& file_name_in) #endif // BA_ENABLE_AUDIO last_play_time_(0) { file_name_full_ = - g_media->FindMediaFile(Media::FileType::kSound, file_name_in); + g_assets->FindAssetFile(Assets::FileType::kSound, file_name_in); valid_ = true; } diff --git a/src/ballistica/media/data/sound_data.h b/src/ballistica/assets/data/sound_data.h similarity index 82% rename from src/ballistica/media/data/sound_data.h rename to src/ballistica/assets/data/sound_data.h index f1bc3092..d24172de 100644 --- a/src/ballistica/media/data/sound_data.h +++ b/src/ballistica/assets/data/sound_data.h @@ -1,17 +1,17 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_MEDIA_DATA_SOUND_DATA_H_ -#define BALLISTICA_MEDIA_DATA_SOUND_DATA_H_ +#ifndef BALLISTICA_ASSETS_DATA_SOUND_DATA_H_ +#define BALLISTICA_ASSETS_DATA_SOUND_DATA_H_ #include #include +#include "ballistica/assets/data/asset_component_data.h" #include "ballistica/audio/al_sys.h" -#include "ballistica/media/data/media_component_data.h" namespace ballistica { -class SoundData : public MediaComponentData { +class SoundData : public AssetComponentData { public: SoundData() = default; explicit SoundData(const std::string& file_name_in); @@ -20,7 +20,7 @@ class SoundData : public MediaComponentData { // FIXME: Should make sure the sound_data isn't in use before unloading it. void DoUnload() override; - auto GetMediaType() const -> MediaType override { return MediaType::kSound; } + auto GetAssetType() const -> AssetType override { return AssetType::kSound; } auto GetName() const -> std::string override { if (!file_name_full_.empty()) return file_name_full_; @@ -55,4 +55,4 @@ class SoundData : public MediaComponentData { } // namespace ballistica -#endif // BALLISTICA_MEDIA_DATA_SOUND_DATA_H_ +#endif // BALLISTICA_ASSETS_DATA_SOUND_DATA_H_ diff --git a/src/ballistica/media/data/texture_data.cc b/src/ballistica/assets/data/texture_data.cc similarity index 98% rename from src/ballistica/media/data/texture_data.cc rename to src/ballistica/assets/data/texture_data.cc index d931abfd..11aa82f7 100644 --- a/src/ballistica/media/data/texture_data.cc +++ b/src/ballistica/assets/data/texture_data.cc @@ -1,7 +1,9 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/media/data/texture_data.h" +#include "ballistica/assets/data/texture_data.h" +#include "ballistica/assets/data/texture_preload_data.h" +#include "ballistica/assets/data/texture_renderer_data.h" #include "ballistica/graphics/graphics.h" #include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/renderer.h" @@ -9,8 +11,6 @@ #include "ballistica/graphics/texture/dds.h" #include "ballistica/graphics/texture/ktx.h" #include "ballistica/graphics/texture/pvr.h" -#include "ballistica/media/data/texture_preload_data.h" -#include "ballistica/media/data/texture_renderer_data.h" #include "external/qr_code_generator/QrCode.hpp" namespace ballistica { @@ -43,7 +43,8 @@ TextureData::TextureData() = default; TextureData::TextureData(const std::string& file_in, TextureType type_in, TextureMinQuality min_quality_in) : file_name_(file_in), type_(type_in), min_quality_(min_quality_in) { - file_name_full_ = g_media->FindMediaFile(Media::FileType::kTexture, file_in); + file_name_full_ = + g_assets->FindAssetFile(Assets::FileType::kTexture, file_in); valid_ = true; } diff --git a/src/ballistica/media/data/texture_data.h b/src/ballistica/assets/data/texture_data.h similarity index 84% rename from src/ballistica/media/data/texture_data.h rename to src/ballistica/assets/data/texture_data.h index 1083f101..e1ce22db 100644 --- a/src/ballistica/media/data/texture_data.h +++ b/src/ballistica/assets/data/texture_data.h @@ -1,17 +1,17 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_MEDIA_DATA_TEXTURE_DATA_H_ -#define BALLISTICA_MEDIA_DATA_TEXTURE_DATA_H_ +#ifndef BALLISTICA_ASSETS_DATA_TEXTURE_DATA_H_ +#define BALLISTICA_ASSETS_DATA_TEXTURE_DATA_H_ #include #include -#include "ballistica/media/data/media_component_data.h" +#include "ballistica/assets/data/asset_component_data.h" namespace ballistica { // Loadable texture media component. -class TextureData : public MediaComponentData { +class TextureData : public AssetComponentData { public: TextureData(); ~TextureData() override; @@ -28,8 +28,8 @@ class TextureData : public MediaComponentData { auto GetNameFull() const -> std::string override { return file_name_full(); } auto file_name() const -> const std::string& { return file_name_; } auto file_name_full() const -> const std::string& { return file_name_full_; } - auto GetMediaType() const -> MediaType override { - return MediaType::kTexture; + auto GetAssetType() const -> AssetType override { + return AssetType::kTexture; } void DoPreload() override; void DoLoad() override; @@ -59,4 +59,4 @@ class TextureData : public MediaComponentData { } // namespace ballistica -#endif // BALLISTICA_MEDIA_DATA_TEXTURE_DATA_H_ +#endif // BALLISTICA_ASSETS_DATA_TEXTURE_DATA_H_ diff --git a/src/ballistica/media/data/texture_preload_data.cc b/src/ballistica/assets/data/texture_preload_data.cc similarity index 99% rename from src/ballistica/media/data/texture_preload_data.cc rename to src/ballistica/assets/data/texture_preload_data.cc index 3f54a7d4..eda797fa 100644 --- a/src/ballistica/media/data/texture_preload_data.cc +++ b/src/ballistica/assets/data/texture_preload_data.cc @@ -1,13 +1,13 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/media/data/texture_preload_data.h" +#include "ballistica/assets/data/texture_preload_data.h" #if BA_OSTYPE_LINUX #include #endif +#include "ballistica/assets/component/texture.h" #include "ballistica/graphics/texture/ktx.h" -#include "ballistica/media/component/texture.h" namespace ballistica { diff --git a/src/ballistica/media/data/texture_preload_data.h b/src/ballistica/assets/data/texture_preload_data.h similarity index 86% rename from src/ballistica/media/data/texture_preload_data.h rename to src/ballistica/assets/data/texture_preload_data.h index db0454df..03c9d5c4 100644 --- a/src/ballistica/media/data/texture_preload_data.h +++ b/src/ballistica/assets/data/texture_preload_data.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_MEDIA_DATA_TEXTURE_PRELOAD_DATA_H_ -#define BALLISTICA_MEDIA_DATA_TEXTURE_PRELOAD_DATA_H_ +#ifndef BALLISTICA_ASSETS_DATA_TEXTURE_PRELOAD_DATA_H_ +#define BALLISTICA_ASSETS_DATA_TEXTURE_PRELOAD_DATA_H_ #include "ballistica/ballistica.h" @@ -37,4 +37,4 @@ class TexturePreloadData { } // namespace ballistica -#endif // BALLISTICA_MEDIA_DATA_TEXTURE_PRELOAD_DATA_H_ +#endif // BALLISTICA_ASSETS_DATA_TEXTURE_PRELOAD_DATA_H_ diff --git a/src/ballistica/media/data/texture_renderer_data.h b/src/ballistica/assets/data/texture_renderer_data.h similarity index 78% rename from src/ballistica/media/data/texture_renderer_data.h rename to src/ballistica/assets/data/texture_renderer_data.h index ca7a71de..2538132c 100644 --- a/src/ballistica/media/data/texture_renderer_data.h +++ b/src/ballistica/assets/data/texture_renderer_data.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_MEDIA_DATA_TEXTURE_RENDERER_DATA_H_ -#define BALLISTICA_MEDIA_DATA_TEXTURE_RENDERER_DATA_H_ +#ifndef BALLISTICA_ASSETS_DATA_TEXTURE_RENDERER_DATA_H_ +#define BALLISTICA_ASSETS_DATA_TEXTURE_RENDERER_DATA_H_ namespace ballistica { @@ -24,4 +24,4 @@ class TextureRendererData : public Object { } // namespace ballistica -#endif // BALLISTICA_MEDIA_DATA_TEXTURE_RENDERER_DATA_H_ +#endif // BALLISTICA_ASSETS_DATA_TEXTURE_RENDERER_DATA_H_ diff --git a/src/ballistica/audio/audio.cc b/src/ballistica/audio/audio.cc index 95238edc..09f43eb5 100644 --- a/src/ballistica/audio/audio.cc +++ b/src/ballistica/audio/audio.cc @@ -2,10 +2,10 @@ #include "ballistica/audio/audio.h" +#include "ballistica/assets/data/sound_data.h" #include "ballistica/audio/audio_server.h" #include "ballistica/audio/audio_source.h" #include "ballistica/core/thread.h" -#include "ballistica/media/data/sound_data.h" namespace ballistica { diff --git a/src/ballistica/audio/audio_server.cc b/src/ballistica/audio/audio_server.cc index 5e3f4727..6282e89a 100644 --- a/src/ballistica/audio/audio_server.cc +++ b/src/ballistica/audio/audio_server.cc @@ -3,6 +3,8 @@ #include "ballistica/audio/audio_server.h" #include "ballistica/app/app.h" +#include "ballistica/assets/assets.h" +#include "ballistica/assets/data/sound_data.h" #include "ballistica/audio/al_sys.h" #include "ballistica/audio/audio.h" #include "ballistica/audio/audio_source.h" @@ -12,8 +14,6 @@ #include "ballistica/game/game.h" #include "ballistica/generic/timer.h" #include "ballistica/math/vector3f.h" -#include "ballistica/media/data/sound_data.h" -#include "ballistica/media/media.h" // Need to move away from OpenAL on Apple stuff. #if __clang__ @@ -601,7 +601,7 @@ void AudioServer::Process() { // If we're paused we don't do nothin'. if (!paused_) { // Do some loading... - have_pending_loads_ = g_media->RunPendingAudioLoads(); + have_pending_loads_ = g_assets->RunPendingAudioLoads(); // Keep that available-sources list filled. UpdateAvailableSources(); @@ -666,7 +666,7 @@ void AudioServer::FadeSoundOut(uint32_t play_id, uint32_t time) { std::make_pair(play_id, SoundFadeNode(play_id, time, true))); } -void AudioServer::DeleteMediaComponent(MediaComponentData* c) { +void AudioServer::DeleteAssetComponent(AssetComponentData* c) { assert(InAudioThread()); c->Unload(); delete c; @@ -1033,7 +1033,7 @@ void AudioServer::ThreadSource::Stop() { // to free up... // (we can't kill media-refs outside the main thread) if (source_sound_) { - assert(g_media); + assert(g_assets); g_audio_server->AddSoundRefDelete(source_sound_); source_sound_ = nullptr; } @@ -1094,7 +1094,7 @@ void AudioServer::PushSetPausedCall(bool pause) { } void AudioServer::PushComponentUnloadCall( - const std::vector*>& components) { + const std::vector*>& components) { thread()->PushCall([this, components] { // Unload all components we were passed... for (auto&& i : components) { @@ -1102,7 +1102,7 @@ void AudioServer::PushComponentUnloadCall( } // ...and then ship these pointers back to the game thread, so it can free // the references. - g_game->PushFreeMediaComponentRefsCall(components); + g_game->PushFreeAssetComponentRefsCall(components); }); } diff --git a/src/ballistica/audio/audio_server.h b/src/ballistica/audio/audio_server.h index d747b98e..75abe5b0 100644 --- a/src/ballistica/audio/audio_server.h +++ b/src/ballistica/audio/audio_server.h @@ -37,7 +37,7 @@ class AudioServer { void PushResetCall(); void PushHavePendingLoadsCall(); void PushComponentUnloadCall( - const std::vector*>& components); + const std::vector*>& components); /// For use by g_game_module(). void ClearSoundRefDeleteList(); @@ -89,7 +89,7 @@ class AudioServer { void Process(); /// Send a component to the audio thread to delete. - void DeleteMediaComponent(MediaComponentData* c); + void DeleteAssetComponent(AssetComponentData* c); void UpdateTimerInterval(); void UpdateAvailableSources(); diff --git a/src/ballistica/audio/audio_source.cc b/src/ballistica/audio/audio_source.cc index 88c16257..492fd0ec 100644 --- a/src/ballistica/audio/audio_source.cc +++ b/src/ballistica/audio/audio_source.cc @@ -2,10 +2,10 @@ #include "ballistica/audio/audio_source.h" +#include "ballistica/assets/data/sound_data.h" #include "ballistica/audio/audio.h" #include "ballistica/audio/audio_server.h" #include "ballistica/math/vector3f.h" -#include "ballistica/media/data/sound_data.h" namespace ballistica { diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 171ece0f..e0d92007 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -5,6 +5,8 @@ #include #include "ballistica/app/app_flavor.h" +#include "ballistica/assets/assets.h" +#include "ballistica/assets/assets_server.h" #include "ballistica/audio/audio_server.h" #include "ballistica/core/fatal_error.h" #include "ballistica/core/logging.h" @@ -13,8 +15,6 @@ #include "ballistica/game/v1_account.h" #include "ballistica/graphics/graphics_server.h" #include "ballistica/internal/app_internal.h" -#include "ballistica/media/media.h" -#include "ballistica/media/media_server.h" #include "ballistica/networking/network_writer.h" #include "ballistica/platform/platform.h" #include "ballistica/python/python.h" @@ -23,7 +23,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20803; +const int kAppBuildNumber = 20806; const char* kAppVersion = "1.7.7"; // Our standalone globals. @@ -45,8 +45,8 @@ Graphics* g_graphics{}; GraphicsServer* g_graphics_server{}; Input* g_input{}; Thread* g_main_thread{}; -Media* g_media{}; -MediaServer* g_media_server{}; +Assets* g_assets{}; +AssetsServer* g_assets_server{}; NetworkReader* g_network_reader{}; Networking* g_networking{}; NetworkWriteModule* g_network_writer{}; @@ -65,12 +65,12 @@ Utils* g_utils{}; // This event kicks off an initial-screen-creation message sent to the // graphics-server thread. Other systems are informed that bootstrapping // is complete and that they are free to talk to each other. Initial -// input-devices are added, media loads can begin (at least ones not +// input-devices are added, asset loads can begin (at least ones not // dependent on the screen/renderer), etc. // 3: The initial screen is created on the graphics-server thread in response // to the message sent from the game thread. A completion notice is sent // back to the game thread when done. -// 4: Back on the game thread, any renderer-dependent media-loads/etc. can begin +// 4: Back on the game thread, any renderer-dependent asset-loads/etc. can begin // and lastly the initial game session is kicked off. auto BallisticaMain(int argc, char** argv) -> int { @@ -107,12 +107,12 @@ auto BallisticaMain(int argc, char** argv) -> int { // Various other subsystems. g_v1_account = new V1Account(); g_utils = new Utils(); - g_media = new Media(); + g_assets = new Assets(); Scene::Init(); // Spin up our other standard threads. - auto* media_thread{new Thread(ThreadIdentifier::kMedia)}; - g_app->pausable_threads.push_back(media_thread); + auto* assets_thread{new Thread(ThreadIdentifier::kAssets)}; + g_app->pausable_threads.push_back(assets_thread); auto* audio_thread{new Thread(ThreadIdentifier::kAudio)}; g_app->pausable_threads.push_back(audio_thread); auto* logic_thread{new Thread(ThreadIdentifier::kLogic)}; @@ -126,8 +126,8 @@ auto BallisticaMain(int argc, char** argv) -> int { network_write_thread->PushCallSynchronous([network_write_thread] { new NetworkWriteModule(network_write_thread); }); - media_thread->PushCallSynchronous( - [media_thread] { new MediaServer(media_thread); }); + assets_thread->PushCallSynchronous( + [assets_thread] { new AssetsServer(assets_thread); }); new GraphicsServer(g_main_thread); audio_thread->PushCallSynchronous( [audio_thread] { new AudioServer(audio_thread); }); @@ -277,8 +277,8 @@ auto InBGDynamicsThread() -> bool { return (g_bg_dynamics_server && g_bg_dynamics_server->thread()->IsCurrent()); } -auto InMediaThread() -> bool { - return (g_media_server && g_media_server->thread()->IsCurrent()); +auto InAssetsThread() -> bool { + return (g_assets_server && g_assets_server->thread()->IsCurrent()); } auto InNetworkWriteThread() -> bool { diff --git a/src/ballistica/ballistica.h b/src/ballistica/ballistica.h index 6b290d95..163a5fcf 100644 --- a/src/ballistica/ballistica.h +++ b/src/ballistica/ballistica.h @@ -118,8 +118,8 @@ extern Graphics* g_graphics; extern GraphicsServer* g_graphics_server; extern Input* g_input; extern Thread* g_main_thread; -extern Media* g_media; -extern MediaServer* g_media_server; +extern Assets* g_assets; +extern AssetsServer* g_assets_server; extern Networking* g_networking; extern NetworkReader* g_network_reader; extern NetworkWriteModule* g_network_writer; @@ -158,7 +158,7 @@ auto InGraphicsThread() -> bool; // (main and graphics are same currently) auto InLogicThread() -> bool; auto InAudioThread() -> bool; auto InBGDynamicsThread() -> bool; -auto InMediaThread() -> bool; +auto InAssetsThread() -> bool; auto InNetworkWriteThread() -> bool; /// Return a human-readable name for the current thread. diff --git a/src/ballistica/core/object.cc b/src/ballistica/core/object.cc index 15634bcf..26b77b8b 100644 --- a/src/ballistica/core/object.cc +++ b/src/ballistica/core/object.cc @@ -150,8 +150,8 @@ static auto GetCurrentThreadIdentifier() -> ThreadIdentifier { return ThreadIdentifier::kAudio; } else if (InNetworkWriteThread()) { return ThreadIdentifier::kNetworkWrite; - } else if (InMediaThread()) { - return ThreadIdentifier::kMedia; + } else if (InAssetsThread()) { + return ThreadIdentifier::kAssets; } else if (InBGDynamicsThread()) { return ThreadIdentifier::kBGDynamics; } else { @@ -209,9 +209,9 @@ auto Object::ObjectThreadCheck() -> void { DO_FAIL("NetworkWrite"); } break; - case ThreadIdentifier::kMedia: - if (!InMediaThread()) { - DO_FAIL("Media"); + case ThreadIdentifier::kAssets: + if (!InAssetsThread()) { + DO_FAIL("Assets"); } break; case ThreadIdentifier::kBGDynamics: diff --git a/src/ballistica/core/thread.cc b/src/ballistica/core/thread.cc index a5490b52..e23d1213 100644 --- a/src/ballistica/core/thread.cc +++ b/src/ballistica/core/thread.cc @@ -59,7 +59,7 @@ auto Thread::RunStdInputThread(void* data) -> int { return static_cast(data)->ThreadMain(); } -auto Thread::RunMediaThread(void* data) -> int { +auto Thread::RunAssetsThread(void* data) -> int { return static_cast(data)->ThreadMain(); } @@ -221,8 +221,8 @@ Thread::Thread(ThreadIdentifier identifier_in, ThreadType type_in) case ThreadIdentifier::kLogic: func = RunLogicThread; break; - case ThreadIdentifier::kMedia: - func = RunMediaThread; + case ThreadIdentifier::kAssets: + func = RunAssetsThread; break; case ThreadIdentifier::kMain: // Shouldn't happen; this thread gets wrapped; not launched. @@ -288,9 +288,9 @@ auto Thread::ThreadMain() -> int { name = "stdin"; id_string = "ballistica stdin"; break; - case ThreadIdentifier::kMedia: - name = "media"; - id_string = "ballistica media"; + case ThreadIdentifier::kAssets: + name = "assets"; + id_string = "ballistica assets"; break; case ThreadIdentifier::kFileOut: name = "fileout"; diff --git a/src/ballistica/core/thread.h b/src/ballistica/core/thread.h index 4feabd0d..cfc2f0d4 100644 --- a/src/ballistica/core/thread.h +++ b/src/ballistica/core/thread.h @@ -152,7 +152,7 @@ class Thread { static auto RunBGDynamicThread(void* data) -> int; static auto RunNetworkWriteThread(void* data) -> int; static auto RunStdInputThread(void* data) -> int; - static auto RunMediaThread(void* data) -> int; + static auto RunAssetsThread(void* data) -> int; auto ThreadMain() -> int; auto GetThreadMessages(std::list* messages) -> void; diff --git a/src/ballistica/core/types.h b/src/ballistica/core/types.h index 1143e129..b6d1d74d 100644 --- a/src/ballistica/core/types.h +++ b/src/ballistica/core/types.h @@ -39,6 +39,7 @@ class AppConfig; class App; class AppInternal; class AreaOfInterest; +class Assets; class Audio; class AudioServer; class AudioStreamer; @@ -102,9 +103,8 @@ class MaterialComponent; class MaterialConditionNode; class MaterialContext; class Matrix44f; -class Media; -class MediaComponentData; -class MediaServer; +class AssetComponentData; +class AssetsServer; class MeshBufferBase; class MeshBufferVertexSprite; class MeshBufferVertexSimpleFull; @@ -403,7 +403,7 @@ enum class SpecialChar { kLast // Sentinel }; -enum class MediaType { kTexture, kCollideModel, kModel, kSound, kData, kLast }; +enum class AssetType { kTexture, kCollideModel, kModel, kSound, kData, kLast }; /// Python exception types we can raise from our own exceptions. enum class PyExcType { @@ -999,7 +999,7 @@ enum class ThreadType { enum class ThreadIdentifier { kInvalid, kLogic, - kMedia, + kAssets, kFileOut, kMain, kAudio, diff --git a/src/ballistica/dynamics/bg/bg_dynamics.cc b/src/ballistica/dynamics/bg/bg_dynamics.cc index dacfbce6..7f6aad21 100644 --- a/src/ballistica/dynamics/bg/bg_dynamics.cc +++ b/src/ballistica/dynamics/bg/bg_dynamics.cc @@ -2,6 +2,7 @@ #include "ballistica/dynamics/bg/bg_dynamics.h" +#include "ballistica/assets/component/collide_model.h" #include "ballistica/core/thread.h" #include "ballistica/dynamics/bg/bg_dynamics_draw_snapshot.h" #include "ballistica/dynamics/bg/bg_dynamics_fuse_data.h" @@ -10,7 +11,6 @@ #include "ballistica/graphics/component/object_component.h" #include "ballistica/graphics/component/smoke_component.h" #include "ballistica/graphics/component/sprite_component.h" -#include "ballistica/media/component/collide_model.h" namespace ballistica { @@ -188,7 +188,7 @@ void BGDynamics::Draw(FrameDef* frame_def) { c.SetCameraAligned(true); c.SetColor(2.0f, 2.0f, 2.0f, 1.0f); c.SetOverlay(draw_in_overlay); - c.SetTexture(g_media->GetTexture(SystemTextureID::kSparks)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kSparks)); c.DrawMesh(sparks_mesh_.get(), kModelDrawFlagNoReflection); c.Submit(); } @@ -203,7 +203,7 @@ void BGDynamics::Draw(FrameDef* frame_def) { lights_mesh_->SetData( Object::Ref>(ds->light_vertices)); SpriteComponent c(frame_def->light_shadow_pass()); - c.SetTexture(g_media->GetTexture(SystemTextureID::kLightSoft)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kLightSoft)); c.DrawMesh(lights_mesh_.get()); c.Submit(); } @@ -216,7 +216,7 @@ void BGDynamics::Draw(FrameDef* frame_def) { shadows_mesh_->SetData( Object::Ref>(ds->shadow_vertices)); SpriteComponent c(frame_def->light_shadow_pass()); - c.SetTexture(g_media->GetTexture(SystemTextureID::kLight)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kLight)); c.DrawMesh(shadows_mesh_.get()); c.Submit(); } @@ -268,7 +268,7 @@ void BGDynamics::Draw(FrameDef* frame_def) { Object::Ref>(ds->fuse_vertices)); { // Draw! ObjectComponent c(frame_def->beauty_pass()); - c.SetTexture(g_media->GetTexture(SystemTextureID::kFuse)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kFuse)); c.DrawMesh(fuses_mesh_.get(), kModelDrawFlagNoReflection); c.Submit(); } @@ -286,16 +286,16 @@ void BGDynamics::DrawChunks(FrameDef* frame_def, ModelData* model; switch (chunk_type) { case BGDynamicsChunkType::kFlagStand: - model = g_media->GetModel(SystemModelID::kFlagStand); + model = g_assets->GetModel(SystemModelID::kFlagStand); break; case BGDynamicsChunkType::kSplinter: - model = g_media->GetModel(SystemModelID::kShrapnelBoard); + model = g_assets->GetModel(SystemModelID::kShrapnelBoard); break; case BGDynamicsChunkType::kSlime: - model = g_media->GetModel(SystemModelID::kShrapnelSlime); + model = g_assets->GetModel(SystemModelID::kShrapnelSlime); break; default: - model = g_media->GetModel(SystemModelID::kShrapnel1); + model = g_assets->GetModel(SystemModelID::kShrapnel1); break; } ObjectComponent c(frame_def->beauty_pass()); @@ -303,20 +303,20 @@ void BGDynamics::DrawChunks(FrameDef* frame_def, // Set up shading. switch (chunk_type) { case BGDynamicsChunkType::kRock: { - c.SetTexture(g_media->GetTexture(SystemTextureID::kShrapnel1)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kShrapnel1)); c.SetReflection(ReflectionType::kSoft); c.SetReflectionScale(0.2f, 0.2f, 0.2f); c.SetColor(0.6f, 0.6f, 0.5f); break; } case BGDynamicsChunkType::kIce: { - c.SetTexture(g_media->GetTexture(SystemTextureID::kShrapnel1)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kShrapnel1)); c.SetReflection(ReflectionType::kSharp); c.SetAddColor(0.5f, 0.5f, 0.9f); break; } case BGDynamicsChunkType::kSlime: { - c.SetTexture(g_media->GetTexture(SystemTextureID::kShrapnel1)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kShrapnel1)); c.SetReflection(ReflectionType::kSharper); c.SetReflectionScale(3.0f, 3.0f, 3.0f); c.SetColor(0.0f, 0.0f, 0.0f); @@ -324,13 +324,13 @@ void BGDynamics::DrawChunks(FrameDef* frame_def, break; } case BGDynamicsChunkType::kMetal: { - c.SetTexture(g_media->GetTexture(SystemTextureID::kShrapnel1)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kShrapnel1)); c.SetReflection(ReflectionType::kPowerup); c.SetColor(0.5f, 0.5f, 0.55f); break; } case BGDynamicsChunkType::kSpark: { - c.SetTexture(g_media->GetTexture(SystemTextureID::kShrapnel1)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kShrapnel1)); c.SetReflection(ReflectionType::kSharp); c.SetColor(0.0f, 0.0f, 0.0f, 1.0f); c.SetReflectionScale(4.0f, 3.0f, 2.0f); @@ -338,7 +338,7 @@ void BGDynamics::DrawChunks(FrameDef* frame_def, break; } case BGDynamicsChunkType::kSplinter: { - c.SetTexture(g_media->GetTexture(SystemTextureID::kShrapnel1)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kShrapnel1)); c.SetReflection(ReflectionType::kSoft); c.SetColor(1.0f, 0.8f, 0.5f); break; @@ -347,7 +347,7 @@ void BGDynamics::DrawChunks(FrameDef* frame_def, c.SetTransparent(true); c.SetPremultiplied(true); c.SetLightShadow(LightShadowType::kNone); - c.SetTexture(g_media->GetTexture(SystemTextureID::kShrapnel1)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kShrapnel1)); c.SetReflection(ReflectionType::kSharp); c.SetReflectionScale(0.5f, 0.4f, 0.3f); c.SetColor(0.2f, 0.15f, 0.15f, 0.07f); @@ -355,7 +355,7 @@ void BGDynamics::DrawChunks(FrameDef* frame_def, break; } case BGDynamicsChunkType::kFlagStand: { - c.SetTexture(g_media->GetTexture(SystemTextureID::kFlagPole)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kFlagPole)); c.SetReflection(ReflectionType::kSharp); c.SetColor(0.9f, 0.6f, 0.3f, 1.0f); break; diff --git a/src/ballistica/dynamics/bg/bg_dynamics_server.cc b/src/ballistica/dynamics/bg/bg_dynamics_server.cc index 427d0edd..6c959e77 100644 --- a/src/ballistica/dynamics/bg/bg_dynamics_server.cc +++ b/src/ballistica/dynamics/bg/bg_dynamics_server.cc @@ -2,6 +2,7 @@ #include "ballistica/dynamics/bg/bg_dynamics_server.h" +#include "ballistica/assets/component/collide_model.h" #include "ballistica/core/thread.h" #include "ballistica/dynamics/bg/bg_dynamics_draw_snapshot.h" #include "ballistica/dynamics/bg/bg_dynamics_fuse_data.h" @@ -12,7 +13,6 @@ #include "ballistica/game/game.h" #include "ballistica/generic/utils.h" #include "ballistica/graphics/graphics_server.h" -#include "ballistica/media/component/collide_model.h" namespace ballistica { diff --git a/src/ballistica/dynamics/collision_cache.cc b/src/ballistica/dynamics/collision_cache.cc index dc3306d1..5c9a6ead 100644 --- a/src/ballistica/dynamics/collision_cache.cc +++ b/src/ballistica/dynamics/collision_cache.cc @@ -36,7 +36,7 @@ void CollisionCache::Draw(FrameDef* frame_def) { c.Scale(x_max_ - x_min_, 1, z_max_ - z_min_); c.PushTransform(); c.Scale(1, 0.01f, 1); - c.DrawModel(g_media->GetModel(SystemModelID::kBox)); + c.DrawModel(g_assets->GetModel(SystemModelID::kBox)); c.PopTransform(); c.Translate(-0.5f + 0.5f * cell_width, 0, -0.5f + 0.5f * cell_height); for (int x = 0; x < grid_width_; x++) { @@ -53,7 +53,7 @@ void CollisionCache::Draw(FrameDef* frame_def) { cells_[cell_index].height_confirmed_collide_, static_cast(z) / static_cast(grid_height_)); c.Scale(0.95f * cell_width, 0.01f, 0.95f * cell_height); - c.DrawModel(g_media->GetModel(SystemModelID::kBox)); + c.DrawModel(g_assets->GetModel(SystemModelID::kBox)); c.PopTransform(); if (glow_[cell_index]) { c.SetColor(1, 1, 1, 0.2f); @@ -65,7 +65,7 @@ void CollisionCache::Draw(FrameDef* frame_def) { cells_[cell_index].height_confirmed_empty_, static_cast(z) / static_cast(grid_height_)); c.Scale(0.95f * cell_width, 0.01f, 0.95f * cell_height); - c.DrawModel(g_media->GetModel(SystemModelID::kBox)); + c.DrawModel(g_assets->GetModel(SystemModelID::kBox)); c.PopTransform(); glow_[cell_index] = 0; } @@ -84,7 +84,7 @@ void CollisionCache::Draw(FrameDef* frame_def) { c2.Scale(x_max_ - x_min_, 1, z_max_ - z_min_); c2.PushTransform(); c2.Scale(1, 0.01f, 1); - c2.DrawModel(g_media->GetModel(SystemModelID::kBox)); + c2.DrawModel(g_assets->GetModel(SystemModelID::kBox)); c2.PopTransform(); c2.Translate(-0.5f + 0.5f * cell_width2, 0, -0.5f + 0.5f * cell_height2); for (int x = 0; x < grid_width_; x++) { @@ -101,7 +101,7 @@ void CollisionCache::Draw(FrameDef* frame_def) { cells_[cell_index].height_confirmed_empty_, static_cast(z) / static_cast(grid_height_)); c2.Scale(0.95f * cell_width2, 0.01f, 0.95f * cell_height2); - c2.DrawModel(g_media->GetModel(SystemModelID::kBox)); + c2.DrawModel(g_assets->GetModel(SystemModelID::kBox)); c2.PopTransform(); if (glow_[cell_index]) { c2.SetColor(1, 1, 1, 0.2f); @@ -113,7 +113,7 @@ void CollisionCache::Draw(FrameDef* frame_def) { cells_[cell_index].height_confirmed_collide_, static_cast(z) / static_cast(grid_height_)); c2.Scale(0.95f * cell_width2, 0.01f, 0.95f * cell_height2); - c2.DrawModel(g_media->GetModel(SystemModelID::kBox)); + c2.DrawModel(g_assets->GetModel(SystemModelID::kBox)); c2.PopTransform(); glow_[cell_index] = 0; diff --git a/src/ballistica/dynamics/dynamics.cc b/src/ballistica/dynamics/dynamics.cc index 813f1814..c5e69ed9 100644 --- a/src/ballistica/dynamics/dynamics.cc +++ b/src/ballistica/dynamics/dynamics.cc @@ -2,6 +2,7 @@ #include "ballistica/dynamics/dynamics.h" +#include "ballistica/assets/component/sound.h" #include "ballistica/audio/audio.h" #include "ballistica/audio/audio_source.h" #include "ballistica/dynamics/collision.h" @@ -9,7 +10,6 @@ #include "ballistica/dynamics/material/material_action.h" #include "ballistica/dynamics/part.h" #include "ballistica/graphics/renderer.h" -#include "ballistica/media/component/sound.h" #include "ballistica/scene/scene.h" #include "ode/ode_collision_kernel.h" #include "ode/ode_collision_util.h" @@ -157,7 +157,7 @@ void Dynamics::Draw(FrameDef* frame_def) { c.PushTransform(); c.Translate(i.x(), i.y(), i.z()); c.scaleUniform(0.05f); - c.DrawModel(g_media->GetModel(Media::BOX_MODEL)); + c.DrawModel(g_assets->GetModel(Assets::BOX_MODEL)); c.PopTransform(); } c.Submit(); diff --git a/src/ballistica/dynamics/material/impact_sound_material_action.h b/src/ballistica/dynamics/material/impact_sound_material_action.h index b64368c9..f7d18f9f 100644 --- a/src/ballistica/dynamics/material/impact_sound_material_action.h +++ b/src/ballistica/dynamics/material/impact_sound_material_action.h @@ -5,9 +5,9 @@ #include +#include "ballistica/assets/component/sound.h" #include "ballistica/ballistica.h" #include "ballistica/dynamics/material/material_action.h" -#include "ballistica/media/component/sound.h" namespace ballistica { diff --git a/src/ballistica/dynamics/material/material_context.cc b/src/ballistica/dynamics/material/material_context.cc index 9f26a4f9..6d50a332 100644 --- a/src/ballistica/dynamics/material/material_context.cc +++ b/src/ballistica/dynamics/material/material_context.cc @@ -2,10 +2,10 @@ #include "ballistica/dynamics/material/material_context.h" +#include "ballistica/assets/component/sound.h" #include "ballistica/audio/audio.h" #include "ballistica/dynamics/dynamics.h" #include "ballistica/dynamics/material/material_action.h" -#include "ballistica/media/component/sound.h" #include "ballistica/scene/scene.h" namespace ballistica { diff --git a/src/ballistica/dynamics/material/roll_sound_material_action.cc b/src/ballistica/dynamics/material/roll_sound_material_action.cc index feffbaef..9d371db1 100644 --- a/src/ballistica/dynamics/material/roll_sound_material_action.cc +++ b/src/ballistica/dynamics/material/roll_sound_material_action.cc @@ -2,13 +2,13 @@ #include "ballistica/dynamics/material/roll_sound_material_action.h" +#include "ballistica/assets/component/sound.h" #include "ballistica/dynamics/dynamics.h" #include "ballistica/dynamics/material/material_context.h" #include "ballistica/game/game_stream.h" #include "ballistica/game/session/client_session.h" #include "ballistica/generic/utils.h" #include "ballistica/graphics/graphics_server.h" -#include "ballistica/media/component/sound.h" namespace ballistica { diff --git a/src/ballistica/dynamics/material/roll_sound_material_action.h b/src/ballistica/dynamics/material/roll_sound_material_action.h index 37716c92..691c9298 100644 --- a/src/ballistica/dynamics/material/roll_sound_material_action.h +++ b/src/ballistica/dynamics/material/roll_sound_material_action.h @@ -3,9 +3,9 @@ #ifndef BALLISTICA_DYNAMICS_MATERIAL_ROLL_SOUND_MATERIAL_ACTION_H_ #define BALLISTICA_DYNAMICS_MATERIAL_ROLL_SOUND_MATERIAL_ACTION_H_ +#include "ballistica/assets/component/sound.h" #include "ballistica/ballistica.h" #include "ballistica/dynamics/material/material_action.h" -#include "ballistica/media/component/sound.h" namespace ballistica { diff --git a/src/ballistica/dynamics/material/skid_sound_material_action.h b/src/ballistica/dynamics/material/skid_sound_material_action.h index 2179e426..3bfe9058 100644 --- a/src/ballistica/dynamics/material/skid_sound_material_action.h +++ b/src/ballistica/dynamics/material/skid_sound_material_action.h @@ -3,9 +3,9 @@ #ifndef BALLISTICA_DYNAMICS_MATERIAL_SKID_SOUND_MATERIAL_ACTION_H_ #define BALLISTICA_DYNAMICS_MATERIAL_SKID_SOUND_MATERIAL_ACTION_H_ +#include "ballistica/assets/component/sound.h" #include "ballistica/ballistica.h" #include "ballistica/dynamics/material/material_action.h" -#include "ballistica/media/component/sound.h" namespace ballistica { diff --git a/src/ballistica/dynamics/material/sound_material_action.h b/src/ballistica/dynamics/material/sound_material_action.h index ddd46745..8d7a0bc7 100644 --- a/src/ballistica/dynamics/material/sound_material_action.h +++ b/src/ballistica/dynamics/material/sound_material_action.h @@ -3,9 +3,9 @@ #ifndef BALLISTICA_DYNAMICS_MATERIAL_SOUND_MATERIAL_ACTION_H_ #define BALLISTICA_DYNAMICS_MATERIAL_SOUND_MATERIAL_ACTION_H_ +#include "ballistica/assets/component/sound.h" #include "ballistica/ballistica.h" #include "ballistica/dynamics/material/material_action.h" -#include "ballistica/media/component/sound.h" namespace ballistica { diff --git a/src/ballistica/dynamics/rigid_body.cc b/src/ballistica/dynamics/rigid_body.cc index 62ed4fc0..2bbf37f3 100644 --- a/src/ballistica/dynamics/rigid_body.cc +++ b/src/ballistica/dynamics/rigid_body.cc @@ -2,11 +2,11 @@ #include "ballistica/dynamics/rigid_body.h" +#include "ballistica/assets/component/collide_model.h" #include "ballistica/dynamics/dynamics.h" #include "ballistica/dynamics/part.h" #include "ballistica/generic/utils.h" #include "ballistica/graphics/renderer.h" -#include "ballistica/media/component/collide_model.h" #include "ballistica/scene/scene.h" #include "ode/ode_collision_util.h" diff --git a/src/ballistica/game/connection/connection_to_client.cc b/src/ballistica/game/connection/connection_to_client.cc index 05fb2b42..d98d0af1 100644 --- a/src/ballistica/game/connection/connection_to_client.cc +++ b/src/ballistica/game/connection/connection_to_client.cc @@ -2,6 +2,7 @@ #include "ballistica/game/connection/connection_to_client.h" +#include "ballistica/assets/assets.h" #include "ballistica/audio/audio.h" #include "ballistica/game/client_controller_interface.h" #include "ballistica/game/connection/connection_set.h" @@ -11,7 +12,6 @@ #include "ballistica/generic/json.h" #include "ballistica/input/device/client_input_device.h" #include "ballistica/internal/app_internal.h" -#include "ballistica/media/media.h" #include "ballistica/networking/networking.h" #include "ballistica/python/python.h" #include "ballistica/python/python_sys.h" @@ -73,7 +73,7 @@ ConnectionToClient::~ConnectionToClient() { std::string s = g_game->GetResourceString("playerLeftPartyText"); Utils::StringReplaceOne(&s, "${NAME}", peer_spec().GetDisplayString()); ScreenMessage(s, {1, 0.5f, 0.0f}); - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kCorkPop)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kCorkPop)); } } @@ -215,7 +215,7 @@ void ConnectionToClient::HandleGamePacket(const std::vector& data) { Utils::StringReplaceOne(&s, "${NAME}", peer_spec().GetDisplayString()); ScreenMessage(s, {0.5f, 1, 0.5f}); - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kGunCock)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kGunCock)); } // Also mark the time for flashing the 'someone just joined your diff --git a/src/ballistica/game/connection/connection_to_host.cc b/src/ballistica/game/connection/connection_to_host.cc index ac401990..371a0a81 100644 --- a/src/ballistica/game/connection/connection_to_host.cc +++ b/src/ballistica/game/connection/connection_to_host.cc @@ -2,6 +2,7 @@ #include "ballistica/game/connection/connection_to_host.h" +#include "ballistica/assets/assets.h" #include "ballistica/audio/audio.h" #include "ballistica/game/game.h" #include "ballistica/game/session/net_client_session.h" @@ -10,7 +11,6 @@ #include "ballistica/input/input.h" #include "ballistica/internal/app_internal.h" #include "ballistica/math/vector3f.h" -#include "ballistica/media/media.h" #include "ballistica/networking/networking.h" #include "ballistica/platform/platform.h" #include "ballistica/python/python.h" @@ -39,7 +39,7 @@ ConnectionToHost::~ConnectionToHost() { Utils::StringReplaceOne(&s, "${NAME}", peer_spec().GetDisplayString()); } ScreenMessage(s, {1, 0.5f, 0.0f}); - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kCorkPop)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kCorkPop)); } else { ScreenMessage(g_game->GetResourceString("connectionRejectedText"), {1, 0, 0}); @@ -376,7 +376,7 @@ void ConnectionToHost::HandleMessagePacket(const std::vector& buffer) { Utils::StringReplaceOne( &s, "${NAME}", PlayerSpec(str_buffer.data()).GetDisplayString()); ScreenMessage(s, {0.5f, 1.0f, 0.5f}); - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kGunCock)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kGunCock)); } break; } @@ -391,7 +391,7 @@ void ConnectionToHost::HandleMessagePacket(const std::vector& buffer) { Utils::StringReplaceOne( &s, "${NAME}", PlayerSpec(&(str_buffer[0])).GetDisplayString()); ScreenMessage(s, {1, 0.5f, 0.0f}); - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kCorkPop)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kCorkPop)); } break; } @@ -486,7 +486,7 @@ void ConnectionToHost::HandleMessagePacket(const std::vector& buffer) { Utils::StringReplaceOne(&s, "${NAME}", peer_spec().GetDisplayString()); } ScreenMessage(s, {0.5f, 1, 0.5f}); - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kGunCock)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kGunCock)); printed_connect_message_ = true; } diff --git a/src/ballistica/game/game.cc b/src/ballistica/game/game.cc index a5455895..07ac3ec9 100644 --- a/src/ballistica/game/game.cc +++ b/src/ballistica/game/game.cc @@ -262,7 +262,7 @@ void Game::PushVRHandsState(const VRHandsState& state) { void Game::PushMediaPruneCall(int level) { thread()->PushCall([level] { assert(InLogicThread()); - g_media->Prune(level); + g_assets->Prune(level); }); } @@ -288,7 +288,7 @@ void Game::InitialScreenCreated() { // We can now let the media thread go to town pre-loading system media // while we wait. - g_media->LoadSystemMedia(); + g_assets->LoadSystemAssets(); // FIXME: ideally we should create this as part of bootstrapping, but // we need it to be possible to load textures/etc. before the renderer @@ -315,7 +315,7 @@ void Game::InitialScreenCreated() { RunAppLaunchCommands(); } -void Game::PruneMedia() { g_media->Prune(); } +void Game::PruneMedia() { g_assets->Prune(); } // Launch into main menu or whatever else. void Game::RunAppLaunchCommands() { @@ -1188,7 +1188,8 @@ void Game::ScoresToBeatResponse(bool success, } void Game::PushPlaySoundCall(SystemSoundID sound) { - thread()->PushCall([sound] { g_audio->PlaySound(g_media->GetSound(sound)); }); + thread()->PushCall( + [sound] { g_audio->PlaySound(g_assets->GetSound(sound)); }); } void Game::PushFriendScoreSetCall(const FriendScoreSet& score_set) { @@ -1214,7 +1215,7 @@ void Game::PushConfirmQuitCall() { // this needs to be run in the UI context ScopedSetContext cp(GetUIContextTarget()); - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kSwish)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kSwish)); g_python->obj(Python::ObjID::kQuitWindowCall).Call(); // if we have a keyboard, give it UI ownership @@ -1443,8 +1444,8 @@ void Game::PushRemoveGraphicsServerRenderHoldCall() { }); } -void Game::PushFreeMediaComponentRefsCall( - const std::vector*>& components) { +void Game::PushFreeAssetComponentRefsCall( + const std::vector*>& components) { thread()->PushCall([components] { for (auto&& i : components) { delete i; @@ -1453,7 +1454,7 @@ void Game::PushFreeMediaComponentRefsCall( } void Game::PushHavePendingLoadsDoneCall() { - thread()->PushCall([] { g_media->ClearPendingLoadsDoneList(); }); + thread()->PushCall([] { g_assets->ClearPendingLoadsDoneList(); }); } void Game::ToggleConsole() { @@ -1548,7 +1549,7 @@ void Game::SetRealTimerLength(int timer_id, millisecs_t length) { } void Game::Process() { - have_pending_loads_ = g_media->RunPendingLoadsLogicThread(); + have_pending_loads_ = g_assets->RunPendingLoadsLogicThread(); UpdateProcessTimer(); } @@ -1886,7 +1887,7 @@ void Game::LocalDisplayChatMessage(const std::vector& buffer) { g_python->HandleLocalChatMessage(final_message); } if (!chat_muted_) { - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kTap)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kTap)); } } } diff --git a/src/ballistica/game/game.h b/src/ballistica/game/game.h index acd50155..226e451f 100644 --- a/src/ballistica/game/game.h +++ b/src/ballistica/game/game.h @@ -61,8 +61,8 @@ class Game { auto PushToggleDebugInfoDisplayCall() -> void; auto PushToggleManualCameraCall() -> void; auto PushHavePendingLoadsDoneCall() -> void; - auto PushFreeMediaComponentRefsCall( - const std::vector*>& components) -> void; + auto PushFreeAssetComponentRefsCall( + const std::vector*>& components) -> void; auto PushHavePendingLoadsCall() -> void; auto PushShutdownCall(bool soft) -> void; diff --git a/src/ballistica/game/game_stream.cc b/src/ballistica/game/game_stream.cc index 71beb4e3..4f2c7437 100644 --- a/src/ballistica/game/game_stream.cc +++ b/src/ballistica/game/game_stream.cc @@ -3,6 +3,12 @@ #include "ballistica/game/game_stream.h" #include "ballistica/app/app.h" +#include "ballistica/assets/assets_server.h" +#include "ballistica/assets/component/collide_model.h" +#include "ballistica/assets/component/data.h" +#include "ballistica/assets/component/model.h" +#include "ballistica/assets/component/sound.h" +#include "ballistica/assets/component/texture.h" #include "ballistica/dynamics/bg/bg_dynamics.h" #include "ballistica/dynamics/material/material.h" #include "ballistica/dynamics/material/material_action.h" @@ -12,12 +18,6 @@ #include "ballistica/game/connection/connection_set.h" #include "ballistica/game/connection/connection_to_client.h" #include "ballistica/game/session/host_session.h" -#include "ballistica/media/component/collide_model.h" -#include "ballistica/media/component/data.h" -#include "ballistica/media/component/model.h" -#include "ballistica/media/component/sound.h" -#include "ballistica/media/component/texture.h" -#include "ballistica/media/media_server.h" #include "ballistica/networking/networking.h" #include "ballistica/scene/node/node_attribute.h" #include "ballistica/scene/node/node_type.h" @@ -37,8 +37,8 @@ GameStream::GameStream(HostSession* host_session, bool save_replay) if (g_app->replay_open) { Log("ERROR: g_replay_open true at replay start; shouldn't happen."); } - assert(g_media_server); - g_media_server->PushBeginWriteReplayCall(); + assert(g_assets_server); + g_assets_server->PushBeginWriteReplayCall(); writing_replay_ = true; g_app->replay_open = true; } @@ -60,8 +60,8 @@ GameStream::~GameStream() { Log("ERROR: g_replay_open false at replay close; shouldn't happen."); } g_app->replay_open = false; - assert(g_media_server); - g_media_server->PushEndWriteReplayCall(); + assert(g_assets_server); + g_assets_server->PushEndWriteReplayCall(); writing_replay_ = false; } @@ -192,8 +192,8 @@ void GameStream::Fail() { if (!g_app->replay_open) { Log("ERROR: g_replay_open false at replay close; shouldn't happen."); } - assert(g_media_server); - g_media_server->PushEndWriteReplayCall(); + assert(g_assets_server); + g_assets_server->PushEndWriteReplayCall(); writing_replay_ = false; g_app->replay_open = false; } @@ -374,7 +374,7 @@ void GameStream::ShipSessionCommandsMessage() { void GameStream::AddMessageToReplay(const std::vector& message) { assert(writing_replay_); - assert(g_media_server); + assert(g_assets_server); assert(!message.empty()); if (g_buildconfig.debug_build()) { @@ -389,7 +389,7 @@ void GameStream::AddMessageToReplay(const std::vector& message) { } } - g_media_server->PushAddMessageToReplayCall(message); + g_assets_server->PushAddMessageToReplayCall(message); } void GameStream::SendPhysicsCorrection(bool blend) { diff --git a/src/ballistica/game/host_activity.cc b/src/ballistica/game/host_activity.cc index 3d097d7e..82a83bd0 100644 --- a/src/ballistica/game/host_activity.cc +++ b/src/ballistica/game/host_activity.cc @@ -2,6 +2,11 @@ #include "ballistica/game/host_activity.h" +#include "ballistica/assets/component/collide_model.h" +#include "ballistica/assets/component/data.h" +#include "ballistica/assets/component/model.h" +#include "ballistica/assets/component/sound.h" +#include "ballistica/assets/component/texture.h" #include "ballistica/dynamics/material/material.h" #include "ballistica/game/game_stream.h" #include "ballistica/game/player.h" @@ -9,11 +14,6 @@ #include "ballistica/generic/lambda_runnable.h" #include "ballistica/generic/timer.h" #include "ballistica/input/device/input_device.h" -#include "ballistica/media/component/collide_model.h" -#include "ballistica/media/component/data.h" -#include "ballistica/media/component/model.h" -#include "ballistica/media/component/sound.h" -#include "ballistica/media/component/texture.h" #include "ballistica/python/python.h" #include "ballistica/python/python_context_call.h" #include "ballistica/python/python_sys.h" @@ -183,28 +183,28 @@ auto HostActivity::GetTexture(const std::string& name) -> Object::Ref { if (shutting_down_) { throw Exception("can't load assets during activity shutdown"); } - return Media::GetMedia(&textures_, name, scene()); + return Assets::GetAsset(&textures_, name, scene()); } auto HostActivity::GetSound(const std::string& name) -> Object::Ref { if (shutting_down_) { throw Exception("can't load assets during activity shutdown"); } - return Media::GetMedia(&sounds_, name, scene()); + return Assets::GetAsset(&sounds_, name, scene()); } auto HostActivity::GetData(const std::string& name) -> Object::Ref { if (shutting_down_) { throw Exception("can't load assets during activity shutdown"); } - return Media::GetMedia(&datas_, name, scene()); + return Assets::GetAsset(&datas_, name, scene()); } auto HostActivity::GetModel(const std::string& name) -> Object::Ref { if (shutting_down_) { throw Exception("can't load assets during activity shutdown"); } - return Media::GetMedia(&models_, name, scene()); + return Assets::GetAsset(&models_, name, scene()); } auto HostActivity::GetCollideModel(const std::string& name) @@ -212,7 +212,7 @@ auto HostActivity::GetCollideModel(const std::string& name) if (shutting_down_) { throw Exception("can't load assets during activity shutdown"); } - return Media::GetMedia(&collide_models_, name, scene()); + return Assets::GetAsset(&collide_models_, name, scene()); } void HostActivity::SetPaused(bool val) { diff --git a/src/ballistica/game/session/client_session.cc b/src/ballistica/game/session/client_session.cc index 30453ffe..4cd0d1b6 100644 --- a/src/ballistica/game/session/client_session.cc +++ b/src/ballistica/game/session/client_session.cc @@ -3,6 +3,10 @@ #include "ballistica/game/session/client_session.h" #include "ballistica/app/app.h" +#include "ballistica/assets/component/collide_model.h" +#include "ballistica/assets/component/model.h" +#include "ballistica/assets/component/sound.h" +#include "ballistica/assets/component/texture.h" #include "ballistica/audio/audio.h" #include "ballistica/dynamics/bg/bg_dynamics.h" #include "ballistica/dynamics/material/material.h" @@ -12,10 +16,6 @@ #include "ballistica/dynamics/rigid_body.h" #include "ballistica/game/game_stream.h" #include "ballistica/graphics/graphics.h" -#include "ballistica/media/component/collide_model.h" -#include "ballistica/media/component/model.h" -#include "ballistica/media/component/sound.h" -#include "ballistica/media/component/texture.h" #include "ballistica/networking/networking.h" #include "ballistica/python/python.h" #include "ballistica/scene/node/node_attribute.h" diff --git a/src/ballistica/game/session/host_session.cc b/src/ballistica/game/session/host_session.cc index b3dfa82b..21035c87 100644 --- a/src/ballistica/game/session/host_session.cc +++ b/src/ballistica/game/session/host_session.cc @@ -2,6 +2,10 @@ #include "ballistica/game/session/host_session.h" +#include "ballistica/assets/component/data.h" +#include "ballistica/assets/component/model.h" +#include "ballistica/assets/component/sound.h" +#include "ballistica/assets/component/texture.h" #include "ballistica/game/game_stream.h" #include "ballistica/game/host_activity.h" #include "ballistica/game/player.h" @@ -9,10 +13,6 @@ #include "ballistica/generic/timer.h" #include "ballistica/graphics/graphics.h" #include "ballistica/input/device/input_device.h" -#include "ballistica/media/component/data.h" -#include "ballistica/media/component/model.h" -#include "ballistica/media/component/sound.h" -#include "ballistica/media/component/texture.h" #include "ballistica/python/python.h" #include "ballistica/python/python_command.h" #include "ballistica/python/python_context_call.h" @@ -206,27 +206,27 @@ auto HostSession::GetSound(const std::string& name) -> Object::Ref { if (shutting_down_) { throw Exception("can't load assets during session shutdown"); } - return Media::GetMedia(&sounds_, name, scene()); + return Assets::GetAsset(&sounds_, name, scene()); } auto HostSession::GetData(const std::string& name) -> Object::Ref { if (shutting_down_) { throw Exception("can't load assets during session shutdown"); } - return Media::GetMedia(&datas_, name, scene()); + return Assets::GetAsset(&datas_, name, scene()); } auto HostSession::GetTexture(const std::string& name) -> Object::Ref { if (shutting_down_) { throw Exception("can't load assets during session shutdown"); } - return Media::GetMedia(&textures_, name, scene()); + return Assets::GetAsset(&textures_, name, scene()); } auto HostSession::GetModel(const std::string& name) -> Object::Ref { if (shutting_down_) { throw Exception("can't load media during session shutdown"); } - return Media::GetMedia(&models_, name, scene()); + return Assets::GetAsset(&models_, name, scene()); } auto HostSession::GetForegroundContext() -> Context { diff --git a/src/ballistica/game/session/net_client_session.cc b/src/ballistica/game/session/net_client_session.cc index 477d1c89..4826a057 100644 --- a/src/ballistica/game/session/net_client_session.cc +++ b/src/ballistica/game/session/net_client_session.cc @@ -3,10 +3,10 @@ #include "ballistica/game/session/net_client_session.h" #include "ballistica/app/app.h" +#include "ballistica/assets/assets_server.h" #include "ballistica/game/connection/connection_to_host.h" #include "ballistica/graphics/graphics.h" #include "ballistica/graphics/net_graph.h" -#include "ballistica/media/media_server.h" namespace ballistica { @@ -15,8 +15,8 @@ NetClientSession::NetClientSession() { if (g_app->replay_open) { Log("ERROR: g_replay_open true at netclient start; shouldn't happen."); } - assert(g_media_server); - g_media_server->PushBeginWriteReplayCall(); + assert(g_assets_server); + g_assets_server->PushBeginWriteReplayCall(); writing_replay_ = true; g_app->replay_open = true; } @@ -28,8 +28,8 @@ NetClientSession::~NetClientSession() { Log("ERROR: g_replay_open false at net-client close; shouldn't happen."); } g_app->replay_open = false; - assert(g_media_server); - g_media_server->PushEndWriteReplayCall(); + assert(g_assets_server); + g_assets_server->PushEndWriteReplayCall(); writing_replay_ = false; } } @@ -192,8 +192,8 @@ void NetClientSession::HandleSessionMessage( ClientSession::HandleSessionMessage(message); if (writing_replay_) { - assert(g_media_server); - g_media_server->PushAddMessageToReplayCall(message); + assert(g_assets_server); + g_assets_server->PushAddMessageToReplayCall(message); } } diff --git a/src/ballistica/graphics/component/object_component.cc b/src/ballistica/graphics/component/object_component.cc index 0058b61c..e8d1a6bd 100644 --- a/src/ballistica/graphics/component/object_component.cc +++ b/src/ballistica/graphics/component/object_component.cc @@ -9,7 +9,7 @@ void ObjectComponent::WriteConfig() { // This is not a common case and easier than forking all our shaders to // create non-textured versions. if (!texture_.exists()) { - texture_ = g_media->GetTexture(SystemTextureID::kWhite); + texture_ = g_assets->GetTexture(SystemTextureID::kWhite); } if (reflection_ == ReflectionType::kNone) { assert(!double_sided_); // Unsupported combo. @@ -58,7 +58,7 @@ void ObjectComponent::WriteConfig() { cmd_buffer_->PutTexture(texture_); SystemCubeMapTextureID r = Graphics::CubeMapFromReflectionType(reflection_); - cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); + cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r)); } else { ConfigForShading(ShadingType::kObjectReflectTransparent); cmd_buffer_->PutInt(premultiplied_); @@ -68,7 +68,7 @@ void ObjectComponent::WriteConfig() { cmd_buffer_->PutTexture(texture_); SystemCubeMapTextureID r = Graphics::CubeMapFromReflectionType(reflection_); - cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); + cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r)); } } else { ConfigForShading(ShadingType::kObjectReflect); @@ -79,7 +79,7 @@ void ObjectComponent::WriteConfig() { cmd_buffer_->PutTexture(texture_); SystemCubeMapTextureID r = Graphics::CubeMapFromReflectionType(reflection_); - cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); + cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r)); } } else { // With add. @@ -100,7 +100,7 @@ void ObjectComponent::WriteConfig() { cmd_buffer_->PutTexture(colorize_texture_); SystemCubeMapTextureID r = Graphics::CubeMapFromReflectionType(reflection_); - cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); + cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r)); } else { ConfigForShading(ShadingType::kObjectReflectLightShadowColorized); cmd_buffer_->PutInt(static_cast(light_shadow_)); @@ -112,7 +112,7 @@ void ObjectComponent::WriteConfig() { cmd_buffer_->PutTexture(colorize_texture_); SystemCubeMapTextureID r = Graphics::CubeMapFromReflectionType(reflection_); - cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); + cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r)); } } else { if (double_sided_) { @@ -125,7 +125,7 @@ void ObjectComponent::WriteConfig() { cmd_buffer_->PutTexture(texture_); SystemCubeMapTextureID r = Graphics::CubeMapFromReflectionType(reflection_); - cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); + cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r)); } else { ConfigForShading(ShadingType::kObjectReflectLightShadow); cmd_buffer_->PutInt(static_cast(light_shadow_)); @@ -136,7 +136,7 @@ void ObjectComponent::WriteConfig() { cmd_buffer_->PutTexture(texture_); SystemCubeMapTextureID r = Graphics::CubeMapFromReflectionType(reflection_); - cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); + cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r)); } } } else { @@ -157,7 +157,7 @@ void ObjectComponent::WriteConfig() { cmd_buffer_->PutTexture(colorize_texture_); SystemCubeMapTextureID r = Graphics::CubeMapFromReflectionType(reflection_); - cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); + cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r)); } else { ConfigForShading( ShadingType::kObjectReflectLightShadowAddColorized); @@ -171,7 +171,7 @@ void ObjectComponent::WriteConfig() { cmd_buffer_->PutTexture(colorize_texture_); SystemCubeMapTextureID r = Graphics::CubeMapFromReflectionType(reflection_); - cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); + cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r)); } } else { ConfigForShading(ShadingType::kObjectReflectLightShadowAdd); @@ -183,7 +183,7 @@ void ObjectComponent::WriteConfig() { cmd_buffer_->PutTexture(texture_); SystemCubeMapTextureID r = Graphics::CubeMapFromReflectionType(reflection_); - cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); + cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r)); } } } diff --git a/src/ballistica/graphics/component/simple_component.cc b/src/ballistica/graphics/component/simple_component.cc index 0b31e541..b6816201 100644 --- a/src/ballistica/graphics/component/simple_component.cc +++ b/src/ballistica/graphics/component/simple_component.cc @@ -132,7 +132,7 @@ void SimpleComponent::WriteConfig() { colorize_color2_g_, colorize_color2_b_); cmd_buffer_->PutTexture(texture_); cmd_buffer_->PutTexture( - g_media->GetTexture(SystemTextureID::kBlack)); + g_assets->GetTexture(SystemTextureID::kBlack)); cmd_buffer_->PutTexture(mask_texture_); } else { ConfigForShading( @@ -203,7 +203,8 @@ void SimpleComponent::WriteConfig() { colorize_color_b_, colorize_color2_r_, colorize_color2_g_, colorize_color2_b_); cmd_buffer_->PutTexture(texture_); - cmd_buffer_->PutTexture(g_media->GetTexture(SystemTextureID::kBlack)); + cmd_buffer_->PutTexture( + g_assets->GetTexture(SystemTextureID::kBlack)); cmd_buffer_->PutTexture(mask_texture_); } else { // if no color was provided we can do a super-cheap version diff --git a/src/ballistica/graphics/component/smoke_component.cc b/src/ballistica/graphics/component/smoke_component.cc index 9d7aaa35..617c9053 100644 --- a/src/ballistica/graphics/component/smoke_component.cc +++ b/src/ballistica/graphics/component/smoke_component.cc @@ -8,11 +8,11 @@ void SmokeComponent::WriteConfig() { if (overlay_) { ConfigForShading(ShadingType::kSmokeOverlay); cmd_buffer_->PutFloats(color_r_, color_g_, color_b_, color_a_); - cmd_buffer_->PutTexture(g_media->GetTexture(SystemTextureID::kSmoke)); + cmd_buffer_->PutTexture(g_assets->GetTexture(SystemTextureID::kSmoke)); } else { ConfigForShading(ShadingType::kSmoke); cmd_buffer_->PutFloats(color_r_, color_g_, color_b_, color_a_); - cmd_buffer_->PutTexture(g_media->GetTexture(SystemTextureID::kSmoke)); + cmd_buffer_->PutTexture(g_assets->GetTexture(SystemTextureID::kSmoke)); } } diff --git a/src/ballistica/graphics/component/sprite_component.cc b/src/ballistica/graphics/component/sprite_component.cc index d9f052bc..32a2ade4 100644 --- a/src/ballistica/graphics/component/sprite_component.cc +++ b/src/ballistica/graphics/component/sprite_component.cc @@ -9,7 +9,7 @@ void SpriteComponent::WriteConfig() { // this is not a common case and easier than forking all our shaders // to create non-textured versions. if (!texture_.exists()) { - texture_ = g_media->GetTexture(SystemTextureID::kWhite); + texture_ = g_assets->GetTexture(SystemTextureID::kWhite); } if (exponent_ == 1) { ConfigForShading(ShadingType::kSprite); diff --git a/src/ballistica/graphics/frame_def.h b/src/ballistica/graphics/frame_def.h index 5df6de21..8e794ea0 100644 --- a/src/ballistica/graphics/frame_def.h +++ b/src/ballistica/graphics/frame_def.h @@ -6,9 +6,9 @@ #include #include +#include "ballistica/assets/data/asset_component_data.h" #include "ballistica/math/matrix44f.h" #include "ballistica/math/vector2f.h" -#include "ballistica/media/data/media_component_data.h" namespace ballistica { @@ -101,7 +101,7 @@ class FrameDef { auto has_depth_texture() const -> bool { return (quality_ >= GraphicsQuality::kHigh); } - void AddComponent(const Object::Ref& component) { + void AddComponent(const Object::Ref& component) { // Add a reference to this component only if we havn't yet. if (component->last_frame_def_num() != frame_number_) { component->set_last_frame_def_num(frame_number_); @@ -156,7 +156,7 @@ class FrameDef { return mesh_index_sizes_; } auto media_components() const - -> const std::vector>& { + -> const std::vector>& { return media_components_; } @@ -189,7 +189,7 @@ class FrameDef { std::vector> meshes_; std::vector> mesh_buffers_; std::vector mesh_index_sizes_; - std::vector> media_components_; + std::vector> media_components_; #if BA_DEBUG_BUILD // Sanity checking: make sure components are completely submitted diff --git a/src/ballistica/graphics/gl/renderer_gl.cc b/src/ballistica/graphics/gl/renderer_gl.cc index 5bbaf731..9c803eee 100644 --- a/src/ballistica/graphics/gl/renderer_gl.cc +++ b/src/ballistica/graphics/gl/renderer_gl.cc @@ -3,11 +3,11 @@ #if BA_ENABLE_OPENGL #include "ballistica/graphics/gl/renderer_gl.h" +#include "ballistica/assets/data/texture_preload_data.h" +#include "ballistica/assets/data/texture_renderer_data.h" #include "ballistica/graphics/component/special_component.h" #include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/mesh/mesh_renderer_data.h" -#include "ballistica/media/data/texture_preload_data.h" -#include "ballistica/media/data/texture_renderer_data.h" #if BA_OSTYPE_IOS_TVOS #include "ballistica/platform/apple/apple_utils.h" diff --git a/src/ballistica/graphics/graphics.cc b/src/ballistica/graphics/graphics.cc index ef1949db..ca13b656 100644 --- a/src/ballistica/graphics/graphics.cc +++ b/src/ballistica/graphics/graphics.cc @@ -449,7 +449,7 @@ void Graphics::DrawMiscOverlays(RenderPass* pass) { { SimpleComponent c(pass); c.SetTransparent(true); - c.SetTexture(g_media->GetTexture(SystemTextureID::kSoftRectVertical)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kSoftRectVertical)); float screen_width = g_graphics->screen_virtual_width(); @@ -533,7 +533,7 @@ void Graphics::DrawMiscOverlays(RenderPass* pass) { // Align our bottom with where we just scaled from. c.Translate(0, 0.5f, 0); } - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); v += scale * (36 + str_height); @@ -690,14 +690,14 @@ void Graphics::DrawMiscOverlays(RenderPass* pass) { c2.SetColorizeColor(i->tint.x, i->tint.y, i->tint.z); c2.SetColorizeColor2(i->tint2.x, i->tint2.y, i->tint2.z); c2.SetMaskTexture( - g_media->GetTexture(SystemTextureID::kCharacterIconMask)); + g_assets->GetTexture(SystemTextureID::kCharacterIconMask)); } c2.SetColor(1, 1, 1, a); c2.PushTransform(); c2.Translate(h - 14, v_base + 10 + i->v_smoothed, kScreenMessageZDepth); c2.Scale(22.0f * s_extra, 22.0f * s_extra); - c2.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c2.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c2.PopTransform(); c2.Submit(); } @@ -898,7 +898,7 @@ void Graphics::DrawLoadDot(RenderPass* pass) { // Draw red if we've got graphics stuff loading. Green if only other stuff // left. - if (g_media->GetGraphicalPendingLoadCount() > 0) { + if (g_assets->GetGraphicalPendingLoadCount() > 0) { c.SetColor(0.2f, 0, 0, 1); } else { c.SetColor(0, 0.2f, 0, 1); @@ -1076,7 +1076,7 @@ void Graphics::BuildAndPushFrameDef() { } } - if (g_media->GetPendingLoadCount() > 0) { + if (g_assets->GetPendingLoadCount() > 0) { DrawLoadDot(overlay_pass); } @@ -1124,7 +1124,7 @@ void Graphics::DrawBoxingGlovesTest(FrameDef* frame_def) { c.Translate(0, 7, -3.3f); c.Scale(10, 10, 10); c.Rotate(a, 0, 0, 1); - c.DrawModel(g_media->GetModel(SystemModelID::kBoxingGlove)); + c.DrawModel(g_assets->GetModel(SystemModelID::kBoxingGlove)); c.PopTransform(); c.Submit(); } @@ -1132,14 +1132,14 @@ void Graphics::DrawBoxingGlovesTest(FrameDef* frame_def) { // Beauty. if (explicit_bool(false)) { ObjectComponent c(frame_def->beauty_pass()); - c.SetTexture(g_media->GetTexture(SystemTextureID::kBoxingGlove)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kBoxingGlove)); c.SetReflection(ReflectionType::kSoft); c.SetReflectionScale(0.4f, 0.4f, 0.4f); c.PushTransform(); c.Translate(0.0f, 3.7f, -3.3f); c.Scale(10.0f, 10.0f, 10.0f); c.Rotate(a, 0.0f, 0.0f, 1.0f); - c.DrawModel(g_media->GetModel(SystemModelID::kBoxingGlove)); + c.DrawModel(g_assets->GetModel(SystemModelID::kBoxingGlove)); c.PopTransform(); c.Submit(); } @@ -1153,7 +1153,7 @@ void Graphics::DrawBoxingGlovesTest(FrameDef* frame_def) { c.Translate(0.0f, 3.7f, -3.3f); c.Scale(10.0f, 10.0f, 10.0f); c.Rotate(a, 0.0f, 0.0f, 1.0f); - c.DrawModel(g_media->GetModel(SystemModelID::kBoxingGlove)); + c.DrawModel(g_assets->GetModel(SystemModelID::kBoxingGlove)); c.PopTransform(); c.Submit(); } @@ -1168,7 +1168,7 @@ void Graphics::DrawDebugBuffers(RenderPass* pass) { c.PushTransform(); c.Translate(70, 400, kDebugImgZDepth); c.Scale(csize, csize); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); c.Submit(); } @@ -1178,7 +1178,7 @@ void Graphics::DrawDebugBuffers(RenderPass* pass) { c.PushTransform(); c.Translate(70, 250, kDebugImgZDepth); c.Scale(csize, csize); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); c.Submit(); } @@ -1190,18 +1190,18 @@ void Graphics::UpdateAndDrawProgressBar(FrameDef* frame_def, RenderPass* pass = frame_def->overlay_pass(); UpdateProgressBarProgress( 1.0f - - static_cast(g_media->GetGraphicalPendingLoadCount()) + - static_cast(g_assets->GetGraphicalPendingLoadCount()) / static_cast(progress_bar_loads_)); DrawProgressBar(pass, 1.0f); // If we were drawing a progress bar, see if everything is now loaded.. if // so, start rendering normally next frame. - int count = g_media->GetGraphicalPendingLoadCount(); + int count = g_assets->GetGraphicalPendingLoadCount(); if (count <= 0) { progress_bar_ = false; progress_bar_end_time_ = real_time; } - if (g_media->GetPendingLoadCount() > 0) { + if (g_assets->GetPendingLoadCount() > 0) { DrawLoadDot(pass); } } @@ -1294,7 +1294,7 @@ void Graphics::DrawFades(FrameDef* frame_def, millisecs_t real_time) { float inv_a = 1.0f - a; float s = 100.0f * inv_a + 5.0f * a; c.Scale(s, s, s); - c.DrawModel(g_media->GetModel(SystemModelID::kVRFade)); + c.DrawModel(g_assets->GetModel(SystemModelID::kVRFade)); c.PopTransform(); c.Submit(); #else // BA_VR_BUILD @@ -1347,7 +1347,7 @@ void Graphics::DrawCursor(RenderPass* pass, millisecs_t real_time) { SimpleComponent c(pass); c.SetTransparent(true); float csize = 50.0f; - c.SetTexture(g_media->GetTexture(SystemTextureID::kCursor)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kCursor)); c.PushTransform(); // Note: we don't plug in known cursor position values here; we tell the @@ -1356,7 +1356,7 @@ void Graphics::DrawCursor(RenderPass* pass, millisecs_t real_time) { c.CursorTranslate(); c.Translate(csize * 0.44f, csize * -0.44f, kCursorZDepth); c.Scale(csize, csize); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); c.Submit(); } @@ -1372,7 +1372,7 @@ void Graphics::DrawBlotches(FrameDef* frame_def) { this->shadow_blotch_mesh_->SetData(Object::New>( this->blotch_verts_.size(), &this->blotch_verts_[0])); SpriteComponent c(frame_def->light_shadow_pass()); - c.SetTexture(g_media->GetTexture(SystemTextureID::kLight)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kLight)); c.DrawMesh(this->shadow_blotch_mesh_.get()); c.Submit(); } @@ -1385,7 +1385,7 @@ void Graphics::DrawBlotches(FrameDef* frame_def) { Object::New>(this->blotch_soft_verts_.size(), &this->blotch_soft_verts_[0])); SpriteComponent c(frame_def->light_shadow_pass()); - c.SetTexture(g_media->GetTexture(SystemTextureID::kLightSoft)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kLightSoft)); c.DrawMesh(this->shadow_blotch_soft_mesh_.get()); c.Submit(); } @@ -1401,7 +1401,7 @@ void Graphics::DrawBlotches(FrameDef* frame_def) { this->blotch_soft_obj_verts_.size(), &this->blotch_soft_obj_verts_[0])); SpriteComponent c(frame_def->light_pass()); - c.SetTexture(g_media->GetTexture(SystemTextureID::kLightSoft)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kLightSoft)); c.DrawMesh(this->shadow_blotch_soft_obj_mesh_.get()); c.Submit(); } @@ -1448,7 +1448,7 @@ void Graphics::AddMeshDataDestroy(MeshData* d) { void Graphics::EnableProgressBar(bool fade_in) { assert(InLogicThread()); - progress_bar_loads_ = g_media->GetGraphicalPendingLoadCount(); + progress_bar_loads_ = g_assets->GetGraphicalPendingLoadCount(); assert(progress_bar_loads_ >= 0); if (progress_bar_loads_ > 0) { progress_bar_ = true; diff --git a/src/ballistica/graphics/graphics_server.cc b/src/ballistica/graphics/graphics_server.cc index fe7b7862..8af8e73f 100644 --- a/src/ballistica/graphics/graphics_server.cc +++ b/src/ballistica/graphics/graphics_server.cc @@ -11,10 +11,10 @@ #include "ballistica/platform/sdl/sdl_app.h" #else #include "ballistica/app/app_flavor.h" +#include "ballistica/assets/assets.h" #include "ballistica/graphics/frame_def.h" #include "ballistica/graphics/mesh/mesh_data.h" #include "ballistica/graphics/renderer.h" -#include "ballistica/media/media.h" #include "ballistica/platform/platform.h" #endif @@ -75,7 +75,7 @@ auto GraphicsServer::GetRenderFrameDef() -> FrameDef* { } // Do some incremental loading every time we try to render. - g_media->RunPendingGraphicsLoads(); + g_assets->RunPendingGraphicsLoads(); // Spin and wait for a short bit for a frame_def to appear. If it does, we // grab it, render it, and also message the game thread to start generating @@ -185,7 +185,7 @@ void GraphicsServer::ReloadMedia() { // Immediately unload all renderer data here in this thread. if (renderer_) { - g_media->UnloadRendererBits(true, true); + g_assets->UnloadRendererBits(true, true); } // Set a render-hold so we ignore all frame_defs up until the point at which @@ -199,7 +199,7 @@ void GraphicsServer::ReloadMedia() { // progress bar drawing, and then tell the graphics thread to stop ignoring // frame-defs. g_game->thread()->PushCall([this] { - g_media->MarkAllMediaForLoad(); + g_assets->MarkAllAssetsForLoad(); g_graphics->EnableProgressBar(false); PushRemoveRenderHoldCall(); }); @@ -219,7 +219,7 @@ void GraphicsServer::RebuildLostContext() { set_renderer_context_lost(true); // Unload all texture and model data here in the render thread. - g_media->UnloadRendererBits(true, true); + g_assets->UnloadRendererBits(true, true); // Also unload dynamic meshes. for (auto&& i : mesh_datas_) { @@ -250,7 +250,7 @@ void GraphicsServer::RebuildLostContext() { // Now tell the game thread to kick off loads for everything, flip on progress // bar drawing, and then tell the graphics thread to stop ignoring frame-defs. g_game->thread()->PushCall([this] { - g_media->MarkAllMediaForLoad(); + g_assets->MarkAllAssetsForLoad(); g_graphics->EnableProgressBar(false); PushRemoveRenderHoldCall(); }); @@ -373,7 +373,7 @@ void GraphicsServer::HandleFullContextScreenRebuild( if (renderer_) { // Unload all textures and models.. these will be reloaded as-needed // automatically for the new context.. - g_media->UnloadRendererBits(true, true); + g_assets->UnloadRendererBits(true, true); // Also unload all dynamic meshes. for (auto&& i : mesh_datas_) { @@ -464,7 +464,7 @@ void GraphicsServer::HandleFullContextScreenRebuild( // progress bar drawing, and then tell the graphics thread to stop ignoring // frame-defs. g_game->thread()->PushCall([this] { - g_media->MarkAllMediaForLoad(); + g_assets->MarkAllAssetsForLoad(); g_graphics->set_internal_components_inited(false); g_graphics->EnableProgressBar(false); PushRemoveRenderHoldCall(); @@ -768,7 +768,7 @@ void GraphicsServer::PushSetVSyncCall(bool sync, bool auto_sync) { } void GraphicsServer::PushComponentUnloadCall( - const std::vector*>& components) { + const std::vector*>& components) { thread()->PushCall([this, components] { // Unload all components we were passed. for (auto&& i : components) { @@ -776,7 +776,7 @@ void GraphicsServer::PushComponentUnloadCall( } // ..and then ship these pointers back to the game thread so it can free the // references. - g_game->PushFreeMediaComponentRefsCall(components); + g_game->PushFreeAssetComponentRefsCall(components); }); } diff --git a/src/ballistica/graphics/graphics_server.h b/src/ballistica/graphics/graphics_server.h index 79cb989d..53edecfa 100644 --- a/src/ballistica/graphics/graphics_server.h +++ b/src/ballistica/graphics/graphics_server.h @@ -29,7 +29,7 @@ class GraphicsServer { auto PushReloadMediaCall() -> void; auto PushRemoveRenderHoldCall() -> void; auto PushComponentUnloadCall( - const std::vector*>& components) -> void; + const std::vector*>& components) -> void; auto SetRenderHold() -> void; // Used by the game thread to pass frame-defs to the graphics server diff --git a/src/ballistica/graphics/render_command_buffer.h b/src/ballistica/graphics/render_command_buffer.h index 27f8af98..691100f7 100644 --- a/src/ballistica/graphics/render_command_buffer.h +++ b/src/ballistica/graphics/render_command_buffer.h @@ -5,12 +5,12 @@ #include +#include "ballistica/assets/component/model.h" +#include "ballistica/assets/component/texture.h" #include "ballistica/ballistica.h" #include "ballistica/graphics/frame_def.h" #include "ballistica/graphics/mesh/mesh.h" #include "ballistica/math/matrix44f.h" -#include "ballistica/media/component/model.h" -#include "ballistica/media/component/texture.h" namespace ballistica { @@ -258,14 +258,14 @@ class RenderCommandBuffer { void PutModel(ModelData* model) { assert(frame_def_); assert(!finalized_); - frame_def_->AddComponent(Object::Ref(model)); + frame_def_->AddComponent(Object::Ref(model)); models_.push_back(model); } void PutTexture(TextureData* texture) { assert(frame_def_); assert(!finalized_); - frame_def_->AddComponent(Object::Ref(texture)); + frame_def_->AddComponent(Object::Ref(texture)); textures_.push_back(texture); } @@ -277,7 +277,7 @@ class RenderCommandBuffer { void PutCubeMapTexture(TextureData* texture) { assert(frame_def_); assert(!finalized_); - frame_def_->AddComponent(Object::Ref(texture)); + frame_def_->AddComponent(Object::Ref(texture)); textures_.push_back(texture); } diff --git a/src/ballistica/graphics/renderer.cc b/src/ballistica/graphics/renderer.cc index f5fe3ed4..43c9ddb1 100644 --- a/src/ballistica/graphics/renderer.cc +++ b/src/ballistica/graphics/renderer.cc @@ -650,7 +650,7 @@ void Renderer::UpdatePixelScaleAndBackingBuffer(FrameDef* frame_def) { void Renderer::LoadMedia(FrameDef* frame_def) { millisecs_t t = GetRealTime(); for (auto&& i : frame_def->media_components()) { - MediaComponentData* mc = i.get(); + AssetComponentData* mc = i.get(); assert(mc); mc->Load(); diff --git a/src/ballistica/graphics/renderer.h b/src/ballistica/graphics/renderer.h index b0ff2946..ccf7a257 100644 --- a/src/ballistica/graphics/renderer.h +++ b/src/ballistica/graphics/renderer.h @@ -7,6 +7,9 @@ #include #include +#include "ballistica/assets/assets.h" +#include "ballistica/assets/component/texture.h" +#include "ballistica/assets/data/model_data.h" #include "ballistica/core/object.h" #include "ballistica/graphics/frame_def.h" #include "ballistica/graphics/framebuffer.h" @@ -38,9 +41,6 @@ #include "ballistica/graphics/text/text_group.h" #include "ballistica/math/matrix44f.h" #include "ballistica/math/vector3f.h" -#include "ballistica/media/component/texture.h" -#include "ballistica/media/data/model_data.h" -#include "ballistica/media/media.h" namespace ballistica { diff --git a/src/ballistica/graphics/text/text_group.cc b/src/ballistica/graphics/text/text_group.cc index 43aee897..63e4e619 100644 --- a/src/ballistica/graphics/text/text_group.cc +++ b/src/ballistica/graphics/text/text_group.cc @@ -33,7 +33,7 @@ void TextGroup::SetText(const std::string& text, TextMesh::HAlign alignment_h, entry->max_flatness = 1.0f; entry->mesh.SetText(text, alignment_h, alignment_v, true, 0, 65535, TextMeshEntryType::kRegular, nullptr); - entry->tex = g_media->GetTexture(SystemTextureID::kFontBig); + entry->tex = g_assets->GetTexture(SystemTextureID::kFontBig); entries_.push_back(std::move(entry)); } else { @@ -109,8 +109,8 @@ void TextGroup::SetText(const std::string& text, TextMesh::HAlign alignment_h, // There should only ever be one of these. assert(!os_texture_.exists()); { - Media::MediaListsLock lock; - os_texture_ = g_media->GetTextureData(packer.get()); + Assets::AssetListLock lock; + os_texture_ = g_assets->GetTextureData(packer.get()); } // We also need to know what uv-scales to use for shadows/etc. @@ -122,43 +122,43 @@ void TextGroup::SetText(const std::string& text, TextMesh::HAlign alignment_h, } switch (*i) { case 0: - entry->tex = g_media->GetTexture(SystemTextureID::kFontSmall0); + entry->tex = g_assets->GetTexture(SystemTextureID::kFontSmall0); break; case 1: - entry->tex = g_media->GetTexture(SystemTextureID::kFontSmall1); + entry->tex = g_assets->GetTexture(SystemTextureID::kFontSmall1); break; case 2: - entry->tex = g_media->GetTexture(SystemTextureID::kFontSmall2); + entry->tex = g_assets->GetTexture(SystemTextureID::kFontSmall2); break; case 3: - entry->tex = g_media->GetTexture(SystemTextureID::kFontSmall3); + entry->tex = g_assets->GetTexture(SystemTextureID::kFontSmall3); break; case 4: - entry->tex = g_media->GetTexture(SystemTextureID::kFontSmall4); + entry->tex = g_assets->GetTexture(SystemTextureID::kFontSmall4); break; case 5: - entry->tex = g_media->GetTexture(SystemTextureID::kFontSmall5); + entry->tex = g_assets->GetTexture(SystemTextureID::kFontSmall5); break; case 6: - entry->tex = g_media->GetTexture(SystemTextureID::kFontSmall6); + entry->tex = g_assets->GetTexture(SystemTextureID::kFontSmall6); break; case 7: - entry->tex = g_media->GetTexture(SystemTextureID::kFontSmall7); + entry->tex = g_assets->GetTexture(SystemTextureID::kFontSmall7); break; case static_cast(TextGraphics::FontPage::kOSRendered): entry->tex = os_texture_; break; case static_cast(TextGraphics::FontPage::kExtras1): - entry->tex = g_media->GetTexture(SystemTextureID::kFontExtras); + entry->tex = g_assets->GetTexture(SystemTextureID::kFontExtras); break; case static_cast(TextGraphics::FontPage::kExtras2): - entry->tex = g_media->GetTexture(SystemTextureID::kFontExtras2); + entry->tex = g_assets->GetTexture(SystemTextureID::kFontExtras2); break; case static_cast(TextGraphics::FontPage::kExtras3): - entry->tex = g_media->GetTexture(SystemTextureID::kFontExtras3); + entry->tex = g_assets->GetTexture(SystemTextureID::kFontExtras3); break; case static_cast(TextGraphics::FontPage::kExtras4): - entry->tex = g_media->GetTexture(SystemTextureID::kFontExtras4); + entry->tex = g_assets->GetTexture(SystemTextureID::kFontExtras4); break; default: throw Exception(); diff --git a/src/ballistica/graphics/text/text_group.h b/src/ballistica/graphics/text/text_group.h index a9756e25..36081d75 100644 --- a/src/ballistica/graphics/text/text_group.h +++ b/src/ballistica/graphics/text/text_group.h @@ -7,10 +7,10 @@ #include #include +#include "ballistica/assets/assets.h" +#include "ballistica/assets/data/texture_data.h" #include "ballistica/core/object.h" #include "ballistica/graphics/mesh/text_mesh.h" -#include "ballistica/media/data/texture_data.h" -#include "ballistica/media/media.h" namespace ballistica { @@ -50,10 +50,10 @@ class TextGroup : public Object { } auto GetElementMaskUV2Texture(int index) const -> TextureData* { assert(index < static_cast(entries_.size())); - return g_media->GetTexture(entries_[index]->type - == TextMeshEntryType::kOSRendered - ? SystemTextureID::kSoftRect2 - : SystemTextureID::kSoftRect); + return g_assets->GetTexture(entries_[index]->type + == TextMeshEntryType::kOSRendered + ? SystemTextureID::kSoftRect2 + : SystemTextureID::kSoftRect); } void SetText(const std::string& text, TextMesh::HAlign alignment_h = TextMesh::HAlign::kLeft, diff --git a/src/ballistica/graphics/vr_graphics.cc b/src/ballistica/graphics/vr_graphics.cc index ebb6a81e..8bf2a90b 100644 --- a/src/ballistica/graphics/vr_graphics.cc +++ b/src/ballistica/graphics/vr_graphics.cc @@ -241,7 +241,7 @@ void VRGraphics::DrawVROverlay(FrameDef* frame_def) { c.Scale(kBaseVirtualResX * (1.0f + kVRBorder), kBaseVirtualResY * (1.0f + kVRBorder), kBaseVirtualResX * (1.0f + kVRBorder)); - c.DrawModel(g_media->GetModel(SystemModelID::kVROverlay)); + c.DrawModel(g_assets->GetModel(SystemModelID::kVROverlay)); c.PopTransform(); c.Submit(); } @@ -258,7 +258,7 @@ void VRGraphics::DrawOverlayBounds(RenderPass* pass) { // Slight offset in z to reduce z fighting. c.Translate(0.5f * width, 0.5f * height, 1.0f); c.Scale(width, height, 100.0f); - c.DrawModel(g_media->GetModel(SystemModelID::kOverlayGuide)); + c.DrawModel(g_assets->GetModel(SystemModelID::kOverlayGuide)); c.PopTransform(); c.Submit(); } @@ -277,14 +277,14 @@ void VRGraphics::DrawVRControllers(FrameDef* frame_def) { if (false) { ObjectComponent c(frame_def->beauty_pass()); c.SetColor(1, 0, 0); - c.SetTexture(g_media->GetTexture(SystemTextureID::kBoxingGlove)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kBoxingGlove)); c.SetReflection(ReflectionType::kSoft); c.SetReflectionScale(0.4f, 0.4f, 0.4f); c.PushTransform(); c.VRTransformToHead(); c.Translate(0, 0, 5); c.Scale(2, 2, 2); - c.DrawModel(g_media->GetModel(SystemModelID::kBoxingGlove)); + c.DrawModel(g_assets->GetModel(SystemModelID::kBoxingGlove)); c.PopTransform(); c.Submit(); } @@ -297,13 +297,13 @@ void VRGraphics::DrawVRControllers(FrameDef* frame_def) { case VRHandType::kDaydreamRemote: { ObjectComponent c(frame_def->beauty_pass()); c.SetColor(0, 1, 0); - c.SetTexture(g_media->GetTexture(SystemTextureID::kBoxingGlove)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kBoxingGlove)); c.SetReflection(ReflectionType::kSoft); c.SetReflectionScale(0.4f, 0.4f, 0.4f); c.PushTransform(); c.VRTransformToRightHand(); c.Scale(10, 10, 10); - c.DrawModel(g_media->GetModel(SystemModelID::kBoxingGlove)); + c.DrawModel(g_assets->GetModel(SystemModelID::kBoxingGlove)); c.PopTransform(); c.Submit(); break; @@ -316,13 +316,13 @@ void VRGraphics::DrawVRControllers(FrameDef* frame_def) { case VRHandType::kOculusTouchL: { ObjectComponent c(frame_def->beauty_pass()); c.SetColor(0, 0, 1); - c.SetTexture(g_media->GetTexture(SystemTextureID::kBoxingGlove)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kBoxingGlove)); c.SetReflection(ReflectionType::kSoft); c.SetReflectionScale(0.4f, 0.4f, 0.4f); c.PushTransform(); c.VRTransformToLeftHand(); c.Scale(10, 10, 10); - c.DrawModel(g_media->GetModel(SystemModelID::kBoxingGlove)); + c.DrawModel(g_assets->GetModel(SystemModelID::kBoxingGlove)); c.PopTransform(); c.Submit(); break; diff --git a/src/ballistica/input/device/touch_input.cc b/src/ballistica/input/device/touch_input.cc index 500b699e..a75e1dd6 100644 --- a/src/ballistica/input/device/touch_input.cc +++ b/src/ballistica/input/device/touch_input.cc @@ -429,7 +429,7 @@ void TouchInput::Draw(FrameDef* frame_def) { if (movement_control_type_ == MovementControlType::kSwipe) sc2 *= 0.6f; if (movement_control_type_ == MovementControlType::kSwipe) { - c.SetTexture(g_media->GetTexture(SystemTextureID::kTouchArrows)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kTouchArrows)); if (editing_) { float val = 1.5f + sinf(static_cast(real_time) * 0.02f); c.SetColor(val, val, 1.0f, 1.0f); @@ -442,7 +442,7 @@ void TouchInput::Draw(FrameDef* frame_def) { val = 0.35f; } c.SetColor(0.5f, 0.3f, 0.8f, val); - c.SetTexture(g_media->GetTexture(SystemTextureID::kCircle)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kCircle)); } float x_offs = @@ -453,7 +453,7 @@ void TouchInput::Draw(FrameDef* frame_def) { c.PushTransform(); c.Translate(d_pad_base_x_ + x_offs, d_pad_base_y_ + y_offs, kDrawDepth); c.Scale(sc2, sc2); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); if (movement_control_type_ == MovementControlType::kJoystick) { @@ -467,7 +467,7 @@ void TouchInput::Draw(FrameDef* frame_def) { c.PushTransform(); c.Translate(d_pad_x_ + x_offs, d_pad_y_ + y_offs, kDrawDepth); c.Scale(sc_move * 0.5f, sc_move * 0.5f); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); } } @@ -475,7 +475,7 @@ void TouchInput::Draw(FrameDef* frame_def) { if (!buttons_touch_ && action_control_type_ == ActionControlType::kSwipe && !swipe_controls_hidden_) { float sc2{sc_actions * 0.6f}; - c.SetTexture(g_media->GetTexture(SystemTextureID::kTouchArrowsActions)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kTouchArrowsActions)); if (editing_) { float val = 1.5f + sinf(static_cast(real_time) * 0.02f); c.SetColor(val, val, 1.0f, 1.0f); @@ -489,7 +489,7 @@ void TouchInput::Draw(FrameDef* frame_def) { height * (-0.1f - buttons_default_frac_y_) * (1.0f - presence_); c.Translate(buttons_x_ + x_offs, buttons_y_ + y_offs, kDrawDepth); c.Scale(sc2, sc2); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); } c.Submit(); @@ -539,7 +539,7 @@ void TouchInput::Draw(FrameDef* frame_def) { base_fade = 0.25f; } else { base_fade = 0.8f; - c.SetTexture(g_media->GetTexture(SystemTextureID::kActionButtons)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kActionButtons)); } float x_offs; @@ -632,7 +632,7 @@ void TouchInput::Draw(FrameDef* frame_def) { } else { c.Scale(b_width, b_width); } - c.DrawModel(g_media->GetModel(SystemModelID::kActionButtonRight)); + c.DrawModel(g_assets->GetModel(SystemModelID::kActionButtonRight)); c.PopTransform(); } @@ -659,7 +659,7 @@ void TouchInput::Draw(FrameDef* frame_def) { } else { c.Scale(b_width, b_width); } - c.DrawModel(g_media->GetModel(SystemModelID::kActionButtonLeft)); + c.DrawModel(g_assets->GetModel(SystemModelID::kActionButtonLeft)); c.PopTransform(); } @@ -685,7 +685,7 @@ void TouchInput::Draw(FrameDef* frame_def) { } else { c.Scale(b_width, b_width); } - c.DrawModel(g_media->GetModel(SystemModelID::kActionButtonBottom)); + c.DrawModel(g_assets->GetModel(SystemModelID::kActionButtonBottom)); c.PopTransform(); } @@ -713,13 +713,13 @@ void TouchInput::Draw(FrameDef* frame_def) { } else { c.Scale(b_width, b_width); } - c.DrawModel(g_media->GetModel(SystemModelID::kActionButtonTop)); + c.DrawModel(g_assets->GetModel(SystemModelID::kActionButtonTop)); c.PopTransform(); } // Center point. if (buttons_touch_ && action_control_type_ == ActionControlType::kSwipe) { - c.SetTexture(g_media->GetTexture(SystemTextureID::kCircle)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kCircle)); c.SetColor(1.0f, 1.0f, 0.0f, 0.8f); c.PushTransform(); @@ -744,7 +744,7 @@ void TouchInput::Draw(FrameDef* frame_def) { kDrawDepth); } c.Scale(b_width * 0.3f, b_width * 0.3f); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); } c.PopTransform(); @@ -784,7 +784,7 @@ void TouchInput::Draw(FrameDef* frame_def) { dist = 0.05f; } - c2.SetTexture(g_media->GetTexture(SystemTextureID::kArrow)); + c2.SetTexture(g_assets->GetTexture(SystemTextureID::kArrow)); Matrix44f orient = Matrix44fOrient(d_pad_draw_dir_, Vector3f(0.0f, 1.0f, 0.0f)); c2.PushTransform(); @@ -816,13 +816,13 @@ void TouchInput::Draw(FrameDef* frame_def) { c2.PushTransform(); c2.Translate(0.0f, dist * -0.5f, 0.0f); c2.Scale(0.15f, dist, 0.2f); - c2.DrawModel(g_media->GetModel(SystemModelID::kArrowBack)); + c2.DrawModel(g_assets->GetModel(SystemModelID::kArrowBack)); c2.PopTransform(); c2.PushTransform(); c2.Translate(0.0f, dist * -1.0f - 0.15f, 0.0f); c2.Scale(0.45f, 0.3f, 0.3f); - c2.DrawModel(g_media->GetModel(SystemModelID::kArrowFront)); + c2.DrawModel(g_assets->GetModel(SystemModelID::kArrowFront)); c2.PopTransform(); c2.PopTransform(); diff --git a/src/ballistica/input/input.cc b/src/ballistica/input/input.cc index 9af81231..7d3d166d 100644 --- a/src/ballistica/input/input.cc +++ b/src/ballistica/input/input.cc @@ -495,7 +495,7 @@ void Input::AnnounceConnects() { newly_connected_controllers_.front()); ScreenMessage(s); } - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kGunCock)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kGunCock)); } newly_connected_controllers_.clear(); @@ -515,7 +515,7 @@ void Input::AnnounceDisconnects() { newly_disconnected_controllers_.front()); ScreenMessage(s); } - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kCorkPop)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kCorkPop)); newly_disconnected_controllers_.clear(); } diff --git a/src/ballistica/input/remote_app.cc b/src/ballistica/input/remote_app.cc index b76a7fac..28c70dfe 100644 --- a/src/ballistica/input/remote_app.cc +++ b/src/ballistica/input/remote_app.cc @@ -10,11 +10,11 @@ #endif #include "ballistica/app/app.h" +#include "ballistica/assets/assets.h" #include "ballistica/game/game.h" #include "ballistica/generic/utils.h" #include "ballistica/input/input.h" #include "ballistica/math/vector3f.h" -#include "ballistica/media/media.h" #include "ballistica/networking/network_reader.h" #include "ballistica/platform/min_sdl.h" #include "ballistica/platform/platform.h" diff --git a/src/ballistica/python/class/python_class_collide_model.cc b/src/ballistica/python/class/python_class_collide_model.cc index 15da88cc..7ca5e787 100644 --- a/src/ballistica/python/class/python_class_collide_model.cc +++ b/src/ballistica/python/class/python_class_collide_model.cc @@ -2,9 +2,9 @@ #include "ballistica/python/class/python_class_collide_model.h" +#include "ballistica/assets/component/collide_model.h" #include "ballistica/core/thread.h" #include "ballistica/game/game.h" -#include "ballistica/media/component/collide_model.h" #include "ballistica/python/python.h" namespace ballistica { diff --git a/src/ballistica/python/class/python_class_data.cc b/src/ballistica/python/class/python_class_data.cc index 88791137..79bf242e 100644 --- a/src/ballistica/python/class/python_class_data.cc +++ b/src/ballistica/python/class/python_class_data.cc @@ -2,9 +2,9 @@ #include "ballistica/python/class/python_class_data.h" +#include "ballistica/assets/component/data.h" #include "ballistica/core/thread.h" #include "ballistica/game/game.h" -#include "ballistica/media/component/data.h" #include "ballistica/python/python.h" namespace ballistica { diff --git a/src/ballistica/python/class/python_class_model.cc b/src/ballistica/python/class/python_class_model.cc index 55e2b090..5fd51ccc 100644 --- a/src/ballistica/python/class/python_class_model.cc +++ b/src/ballistica/python/class/python_class_model.cc @@ -2,9 +2,9 @@ #include "ballistica/python/class/python_class_model.h" +#include "ballistica/assets/component/model.h" #include "ballistica/core/thread.h" #include "ballistica/game/game.h" -#include "ballistica/media/component/model.h" #include "ballistica/python/python.h" namespace ballistica { diff --git a/src/ballistica/python/class/python_class_sound.cc b/src/ballistica/python/class/python_class_sound.cc index 4186668e..5025c3a6 100644 --- a/src/ballistica/python/class/python_class_sound.cc +++ b/src/ballistica/python/class/python_class_sound.cc @@ -2,9 +2,9 @@ #include "ballistica/python/class/python_class_sound.h" +#include "ballistica/assets/component/sound.h" #include "ballistica/core/thread.h" #include "ballistica/game/game.h" -#include "ballistica/media/component/sound.h" #include "ballistica/python/python.h" namespace ballistica { diff --git a/src/ballistica/python/class/python_class_texture.cc b/src/ballistica/python/class/python_class_texture.cc index 396440dc..aeb27dda 100644 --- a/src/ballistica/python/class/python_class_texture.cc +++ b/src/ballistica/python/class/python_class_texture.cc @@ -2,9 +2,9 @@ #include "ballistica/python/class/python_class_texture.h" +#include "ballistica/assets/component/texture.h" #include "ballistica/core/thread.h" #include "ballistica/game/game.h" -#include "ballistica/media/component/texture.h" #include "ballistica/python/python.h" namespace ballistica { diff --git a/src/ballistica/python/methods/python_methods_app.cc b/src/ballistica/python/methods/python_methods_app.cc index 2b2fa725..3bb4d412 100644 --- a/src/ballistica/python/methods/python_methods_app.cc +++ b/src/ballistica/python/methods/python_methods_app.cc @@ -4,6 +4,7 @@ #include "ballistica/app/app.h" #include "ballistica/app/app_flavor.h" +#include "ballistica/assets/component/texture.h" #include "ballistica/core/logging.h" #include "ballistica/game/connection/connection_set.h" #include "ballistica/game/game_stream.h" @@ -11,7 +12,6 @@ #include "ballistica/game/session/host_session.h" #include "ballistica/game/session/replay_client_session.h" #include "ballistica/graphics/graphics.h" -#include "ballistica/media/component/texture.h" #include "ballistica/python/class/python_class_activity_data.h" #include "ballistica/python/class/python_class_session_data.h" #include "ballistica/python/python.h" diff --git a/src/ballistica/python/methods/python_methods_media.cc b/src/ballistica/python/methods/python_methods_assets.cc similarity index 98% rename from src/ballistica/python/methods/python_methods_media.cc rename to src/ballistica/python/methods/python_methods_assets.cc index 98d73a24..cc516ffe 100644 --- a/src/ballistica/python/methods/python_methods_media.cc +++ b/src/ballistica/python/methods/python_methods_assets.cc @@ -1,19 +1,19 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/python/methods/python_methods_media.h" +#include "ballistica/python/methods/python_methods_assets.h" #include #if 0 // Cpplint errs w/o this, CLion errs with it. Hard to please everybody. #include #endif +#include "ballistica/assets/component/collide_model.h" +#include "ballistica/assets/component/data.h" +#include "ballistica/assets/component/model.h" +#include "ballistica/assets/component/sound.h" +#include "ballistica/assets/component/texture.h" #include "ballistica/game/host_activity.h" #include "ballistica/graphics/graphics_server.h" -#include "ballistica/media/component/collide_model.h" -#include "ballistica/media/component/data.h" -#include "ballistica/media/component/model.h" -#include "ballistica/media/component/sound.h" -#include "ballistica/media/component/texture.h" #include "ballistica/python/python.h" #include "ballistica/python/python_sys.h" #include "ballistica/ui/ui.h" diff --git a/src/ballistica/python/methods/python_methods_media.h b/src/ballistica/python/methods/python_methods_assets.h similarity index 64% rename from src/ballistica/python/methods/python_methods_media.h rename to src/ballistica/python/methods/python_methods_assets.h index abf6713b..eb91a052 100644 --- a/src/ballistica/python/methods/python_methods_media.h +++ b/src/ballistica/python/methods/python_methods_assets.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_PYTHON_METHODS_PYTHON_METHODS_MEDIA_H_ -#define BALLISTICA_PYTHON_METHODS_PYTHON_METHODS_MEDIA_H_ +#ifndef BALLISTICA_PYTHON_METHODS_PYTHON_METHODS_ASSETS_H_ +#define BALLISTICA_PYTHON_METHODS_PYTHON_METHODS_ASSETS_H_ #include @@ -17,4 +17,4 @@ class PythonMethodsMedia { } // namespace ballistica -#endif // BALLISTICA_PYTHON_METHODS_PYTHON_METHODS_MEDIA_H_ +#endif // BALLISTICA_PYTHON_METHODS_PYTHON_METHODS_ASSETS_H_ diff --git a/src/ballistica/python/methods/python_methods_gameplay.cc b/src/ballistica/python/methods/python_methods_gameplay.cc index 8b59b903..25fc1f9c 100644 --- a/src/ballistica/python/methods/python_methods_gameplay.cc +++ b/src/ballistica/python/methods/python_methods_gameplay.cc @@ -5,6 +5,7 @@ #include #include "ballistica/app/app_flavor.h" +#include "ballistica/assets/component/sound.h" #include "ballistica/dynamics/bg/bg_dynamics.h" #include "ballistica/dynamics/collision.h" #include "ballistica/dynamics/dynamics.h" @@ -17,7 +18,6 @@ #include "ballistica/graphics/graphics.h" #include "ballistica/input/device/input_device.h" #include "ballistica/internal/app_internal.h" -#include "ballistica/media/component/sound.h" #include "ballistica/platform/platform.h" #include "ballistica/python/python.h" #include "ballistica/python/python_context_call_runnable.h" diff --git a/src/ballistica/python/methods/python_methods_system.cc b/src/ballistica/python/methods/python_methods_system.cc index 4081c087..4500fedd 100644 --- a/src/ballistica/python/methods/python_methods_system.cc +++ b/src/ballistica/python/methods/python_methods_system.cc @@ -8,6 +8,8 @@ #include "ballistica/app/app.h" #include "ballistica/app/app_config.h" #include "ballistica/app/app_flavor.h" +#include "ballistica/assets/assets.h" +#include "ballistica/assets/component/texture.h" #include "ballistica/game/game_stream.h" #include "ballistica/game/host_activity.h" #include "ballistica/game/session/host_session.h" @@ -15,8 +17,6 @@ #include "ballistica/graphics/camera.h" #include "ballistica/graphics/graphics.h" #include "ballistica/input/input.h" -#include "ballistica/media/component/texture.h" -#include "ballistica/media/media.h" #include "ballistica/python/python.h" #include "ballistica/python/python_context_call_runnable.h" #include "ballistica/python/python_sys.h" @@ -362,7 +362,7 @@ auto PyPrintContext(PyObject* self, PyObject* args, PyObject* keywds) auto PyPrintLoadInfo(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { BA_PYTHON_TRY; - g_media->PrintLoadInfo(); + g_assets->PrintLoadInfo(); Py_RETURN_NONE; BA_PYTHON_CATCH; } diff --git a/src/ballistica/python/python.cc b/src/ballistica/python/python.cc index e7540d64..80ccd37c 100644 --- a/src/ballistica/python/python.cc +++ b/src/ballistica/python/python.cc @@ -3,6 +3,10 @@ #include "ballistica/python/python.h" #include "ballistica/app/app.h" +#include "ballistica/assets/component/collide_model.h" +#include "ballistica/assets/component/model.h" +#include "ballistica/assets/component/sound.h" +#include "ballistica/assets/component/texture.h" #include "ballistica/audio/audio.h" #include "ballistica/core/thread.h" #include "ballistica/dynamics/material/material.h" @@ -16,10 +20,6 @@ #include "ballistica/input/device/joystick.h" #include "ballistica/input/device/keyboard_input.h" #include "ballistica/internal/app_internal.h" -#include "ballistica/media/component/collide_model.h" -#include "ballistica/media/component/model.h" -#include "ballistica/media/component/sound.h" -#include "ballistica/media/component/texture.h" #include "ballistica/python/class/python_class_activity_data.h" #include "ballistica/python/class/python_class_collide_model.h" #include "ballistica/python/class/python_class_context.h" @@ -37,10 +37,10 @@ #include "ballistica/python/class/python_class_vec3.h" #include "ballistica/python/class/python_class_widget.h" #include "ballistica/python/methods/python_methods_app.h" +#include "ballistica/python/methods/python_methods_assets.h" #include "ballistica/python/methods/python_methods_gameplay.h" #include "ballistica/python/methods/python_methods_graphics.h" #include "ballistica/python/methods/python_methods_input.h" -#include "ballistica/python/methods/python_methods_media.h" #include "ballistica/python/methods/python_methods_networking.h" #include "ballistica/python/methods/python_methods_system.h" #include "ballistica/python/methods/python_methods_ui.h" @@ -2045,7 +2045,7 @@ void Python::LaunchStringEdit(TextWidget* w) { BA_PRECONDITION(w); ScopedSetContext cp(g_game->GetUIContext()); - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kSwish)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kSwish)); // Gotta run this in the next cycle. PythonRef args(Py_BuildValue("(Osi)", w->BorrowPyRef(), diff --git a/src/ballistica/scene/node/bomb_node.cc b/src/ballistica/scene/node/bomb_node.cc index 6620a487..844267c1 100644 --- a/src/ballistica/scene/node/bomb_node.cc +++ b/src/ballistica/scene/node/bomb_node.cc @@ -2,8 +2,8 @@ #include "ballistica/scene/node/bomb_node.h" +#include "ballistica/assets/component/collide_model.h" #include "ballistica/graphics/graphics.h" -#include "ballistica/media/component/collide_model.h" #include "ballistica/scene/scene.h" namespace ballistica { diff --git a/src/ballistica/scene/node/explosion_node.cc b/src/ballistica/scene/node/explosion_node.cc index 60fbcb38..27f6367e 100644 --- a/src/ballistica/scene/node/explosion_node.cc +++ b/src/ballistica/scene/node/explosion_node.cc @@ -143,7 +143,7 @@ void ExplosionNode::Draw(FrameDef* frame_def) { 1.0f + s * 0.8f * 0.0015f * age, 1.0f + s * 0.8f * 0.025f * age); c.Scale(0.7f, 0.7f, 0.7f); - c.DrawModel(g_media->GetModel(SystemModelID::kShockWave), + c.DrawModel(g_assets->GetModel(SystemModelID::kShockWave), kModelDrawFlagNoReflection); c.PopTransform(); c.Submit(); @@ -161,7 +161,7 @@ void ExplosionNode::Draw(FrameDef* frame_def) { 1.0f + s * 0.8f * 0.0015f * age, 1.0f + s * 0.8f * 0.025f * age); c.Scale(0.7f, 0.7f, 0.7f); - c.DrawModel(g_media->GetModel(SystemModelID::kShockWave), + c.DrawModel(g_assets->GetModel(SystemModelID::kShockWave), kModelDrawFlagNoReflection); c.PopTransform(); c.Submit(); @@ -198,7 +198,7 @@ void ExplosionNode::Draw(FrameDef* frame_def) { c.SetTransparent(true); c.SetLightShadow(LightShadowType::kNone); c.SetPremultiplied(true); - c.SetTexture(g_media->GetTexture(SystemTextureID::kExplosion)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kExplosion)); c.SetColor(1.3f * o * color_[0] * b, o * color_[1] * b, o * color_[2] * b, 0.0f); c.PushTransform(); @@ -211,13 +211,13 @@ void ExplosionNode::Draw(FrameDef* frame_def) { Matrix44f om = Matrix44fOrient(right, to_cam, up); c.MultMatrix((om * m).m); c.Scale(0.9f * s, 0.9f * s, 0.9f * s); - c.DrawModel(g_media->GetModel(SystemModelID::kShield), + c.DrawModel(g_assets->GetModel(SystemModelID::kShield), kModelDrawFlagNoReflection); c.Scale(0.6f, 0.6f, 0.6f); c.Rotate(33, 0, 1, 0); c.SetColor(o * 7.0f * color_[0], o * 7.0f * color_[1], o * 7.0f * color_[2], 0); - c.DrawModel(g_media->GetModel(SystemModelID::kShield), + c.DrawModel(g_assets->GetModel(SystemModelID::kShield), kModelDrawFlagNoReflection); c.PopTransform(); c.Submit(); diff --git a/src/ballistica/scene/node/flag_node.cc b/src/ballistica/scene/node/flag_node.cc index 20c6b4cd..b67367a4 100644 --- a/src/ballistica/scene/node/flag_node.cc +++ b/src/ballistica/scene/node/flag_node.cc @@ -307,7 +307,7 @@ void FlagNode::Draw(FrameDef* frame_def) { float s_scale, s_density; SimpleComponent c(frame_def->light_shadow_pass()); - c.SetTexture(g_media->GetTexture(SystemTextureID::kShadow)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kShadow)); c.SetTransparent(true); FullShadowSet* full_shadows = full_shadow_set_.get(); @@ -353,12 +353,12 @@ void FlagNode::Draw(FrameDef* frame_def) { // Flag pole. { ObjectComponent c(frame_def->beauty_pass()); - c.SetTexture(g_media->GetTexture(SystemTextureID::kFlagPole)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kFlagPole)); c.SetReflection(ReflectionType::kSharp); c.SetReflectionScale(0.1f, 0.1f, 0.1f); c.PushTransform(); c.TransformToBody(*body_); - c.DrawModel(g_media->GetModel(SystemModelID::kFlagPole)); + c.DrawModel(g_assets->GetModel(SystemModelID::kFlagPole)); c.PopTransform(); c.Submit(); } diff --git a/src/ballistica/scene/node/flash_node.cc b/src/ballistica/scene/node/flash_node.cc index 326b4692..dd1bf589 100644 --- a/src/ballistica/scene/node/flash_node.cc +++ b/src/ballistica/scene/node/flash_node.cc @@ -50,7 +50,7 @@ void FlashNode::Draw(FrameDef* frame_def) { c.Translate(position_[0], position_[1], position_[2]); c.Scale(size_, size_, size_); c.Rotate(RandomFloat() * 360.0f, 1, 1, 0); - c.DrawModel(g_media->GetModel(SystemModelID::kFlash)); + c.DrawModel(g_assets->GetModel(SystemModelID::kFlash)); c.PopTransform(); c.Submit(); } diff --git a/src/ballistica/scene/node/image_node.cc b/src/ballistica/scene/node/image_node.cc index c9e1d723..fd312a88 100644 --- a/src/ballistica/scene/node/image_node.cc +++ b/src/ballistica/scene/node/image_node.cc @@ -331,7 +331,7 @@ void ImageNode::Draw(FrameDef* frame_def) { if (vr && fill_screen_) { #if BA_VR_BUILD model_opaque_used = - g_media->GetModel(SystemModelID::kImage1x1VRFullScreen); + g_assets->GetModel(SystemModelID::kImage1x1VRFullScreen); #else throw Exception(); #endif // BA_VR_BUILD @@ -339,9 +339,9 @@ void ImageNode::Draw(FrameDef* frame_def) { SystemModelID m = fill_screen_ ? SystemModelID::kImage1x1FullScreen : SystemModelID::kImage1x1; if (has_alpha_channel) { - model_transparent_used = g_media->GetModel(m); + model_transparent_used = g_assets->GetModel(m); } else { - model_opaque_used = g_media->GetModel(m); + model_opaque_used = g_assets->GetModel(m); } } } diff --git a/src/ballistica/scene/node/image_node.h b/src/ballistica/scene/node/image_node.h index 813f9b5b..689d8280 100644 --- a/src/ballistica/scene/node/image_node.h +++ b/src/ballistica/scene/node/image_node.h @@ -6,8 +6,8 @@ #include #include -#include "ballistica/media/component/model.h" -#include "ballistica/media/component/texture.h" +#include "ballistica/assets/component/model.h" +#include "ballistica/assets/component/texture.h" #include "ballistica/scene/node/node.h" namespace ballistica { diff --git a/src/ballistica/scene/node/locator_node.cc b/src/ballistica/scene/node/locator_node.cc index 319ed2b3..d54c3d54 100644 --- a/src/ballistica/scene/node/locator_node.cc +++ b/src/ballistica/scene/node/locator_node.cc @@ -140,11 +140,11 @@ void LocatorNode::Draw(FrameDef* frame_def) { c.SetTransparent(true); } c.SetColor(color_[0], color_[1], color_[2], opacity_); - c.SetTexture(g_media->GetTexture(texture)); + c.SetTexture(g_assets->GetTexture(texture)); c.PushTransform(); c.Translate(position_[0], position_[1], position_[2]); c.Scale(size_[0], size_[1], size_[2]); - c.DrawModel(g_media->GetModel(model)); + c.DrawModel(g_assets->GetModel(model)); c.PopTransform(); c.Submit(); } @@ -164,11 +164,11 @@ void LocatorNode::Draw(FrameDef* frame_def) { } else { c.SetColor(color_[0], color_[1], color_[2], opacity_); } - c.SetTexture(g_media->GetTexture(texture)); + c.SetTexture(g_assets->GetTexture(texture)); c.PushTransform(); c.Translate(position_[0], position_[1], position_[2]); c.Scale(size_[0], size_[1], size_[2]); - c.DrawModel(g_media->GetModel(model)); + c.DrawModel(g_assets->GetModel(model)); c.PopTransform(); c.Submit(); } else { @@ -179,7 +179,7 @@ void LocatorNode::Draw(FrameDef* frame_def) { c.PushTransform(); c.Translate(position_[0], position_[1], position_[2]); c.Scale(size_[0], size_[1], size_[2]); - c.DrawModel(g_media->GetModel(model)); + c.DrawModel(g_assets->GetModel(model)); c.PopTransform(); c.Submit(); } diff --git a/src/ballistica/scene/node/prop_node.h b/src/ballistica/scene/node/prop_node.h index b8ea5684..d50c5122 100644 --- a/src/ballistica/scene/node/prop_node.h +++ b/src/ballistica/scene/node/prop_node.h @@ -6,10 +6,10 @@ #include #include +#include "ballistica/assets/component/model.h" +#include "ballistica/assets/component/texture.h" #include "ballistica/dynamics/bg/bg_dynamics_shadow.h" #include "ballistica/dynamics/part.h" -#include "ballistica/media/component/model.h" -#include "ballistica/media/component/texture.h" #include "ballistica/scene/node/node.h" #include "ballistica/scene/node/node_attribute.h" #include "ballistica/scene/node/node_type.h" diff --git a/src/ballistica/scene/node/scorch_node.cc b/src/ballistica/scene/node/scorch_node.cc index 2c468287..a3d025f7 100644 --- a/src/ballistica/scene/node/scorch_node.cc +++ b/src/ballistica/scene/node/scorch_node.cc @@ -66,14 +66,14 @@ void ScorchNode::Draw(FrameDef* frame_def) { SimpleComponent c(frame_def->light_shadow_pass()); c.SetTransparent(true); c.SetColor(color_[0], color_[1], color_[2], o * 0.35f); - c.SetTexture(g_media->GetTexture(big_ ? SystemTextureID::kScorchBig - : SystemTextureID::kScorch)); + c.SetTexture(g_assets->GetTexture(big_ ? SystemTextureID::kScorchBig + : SystemTextureID::kScorch)); c.PushTransform(); c.Translate(position_[0], position_[1], position_[2]); c.Scale(o * size_ * rand_size_[0], o * size_ * rand_size_[1], o * size_ * rand_size_[2]); c.Rotate(Utils::precalc_rand_1(id() % kPrecalcRandsCount) * 360.0f, 0, 1, 0); - c.DrawModel(g_media->GetModel(SystemModelID::kScorch)); + c.DrawModel(g_assets->GetModel(SystemModelID::kScorch)); c.PopTransform(); c.Submit(); } diff --git a/src/ballistica/scene/node/shield_node.cc b/src/ballistica/scene/node/shield_node.cc index c52f859d..44db758c 100644 --- a/src/ballistica/scene/node/shield_node.cc +++ b/src/ballistica/scene/node/shield_node.cc @@ -174,25 +174,25 @@ void ShieldNode::Draw(FrameDef* frame_def) { c.PushTransform(); c.Translate(0.5f, half_height); c.Scale(1.1f, height + 0.1f); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); c.SetColor(0.4f * o, 0.4f * o, 0.8f * o, 0.0f * o); c.PushTransform(); c.Translate(p_left * 0.5f, half_height); c.Scale(p_left, height); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); c.SetColor(1.0f * o, 1.0f * o, 1.0f * o, 0.0f); c.PushTransform(); c.Translate((p_left + p_right) * 0.5f, half_height); c.Scale(p_right - p_left, height); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); c.SetColor(0.1f * o, 0.1f * o, 0.2f * o, 0.4f * o); c.PushTransform(); c.Translate((p_right + 1.0f) * 0.5f, half_height); c.Scale(1.0f - p_right, height); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); c.PopTransform(); c.Submit(); @@ -224,7 +224,7 @@ void ShieldNode::Draw(FrameDef* frame_def) { c.SetLightShadow(LightShadowType::kNone); c.SetReflection(ReflectionType::kSharp); c.SetReflectionScale(0.34f * o, 0.34f * o, 0.34f * o); - c.SetTexture(g_media->GetTexture(SystemTextureID::kShield)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kShield)); c.SetColor(col[0], col[1], col[2], 0.13f * o); c.PushTransform(); Vector3f to_cam = @@ -245,7 +245,7 @@ void ShieldNode::Draw(FrameDef* frame_def) { * (0.97f + 0.05f * Utils::precalc_rand_2(rot_count_ % kPrecalcRandsCount)); c.Scale(r2, r2, r2); - c.DrawModel(g_media->GetModel(SystemModelID::kShield), + c.DrawModel(g_assets->GetModel(SystemModelID::kShield), kModelDrawFlagNoReflection); c.PopTransform(); c.Submit(); @@ -259,7 +259,7 @@ void ShieldNode::Draw(FrameDef* frame_def) { c2.Rotate(Utils::precalc_rand_1(rot_count_ % kPrecalcRandsCount) * 360, 0, 1, 0); c2.Scale(r2, r2, r2); - c2.DrawModel(g_media->GetModel(SystemModelID::kShield)); + c2.DrawModel(g_assets->GetModel(SystemModelID::kShield)); c2.PopTransform(); c2.Submit(); } @@ -273,7 +273,7 @@ void ShieldNode::Draw(FrameDef* frame_def) { 1, 0); float sc = r2 * 1.1f; c2.Scale(sc, sc, sc); - c2.DrawModel(g_media->GetModel(SystemModelID::kShield)); + c2.DrawModel(g_assets->GetModel(SystemModelID::kShield)); c2.PopTransform(); c2.Submit(); } diff --git a/src/ballistica/scene/node/sound_node.cc b/src/ballistica/scene/node/sound_node.cc index 75cc6e8e..a34e70b2 100644 --- a/src/ballistica/scene/node/sound_node.cc +++ b/src/ballistica/scene/node/sound_node.cc @@ -2,9 +2,9 @@ #include "ballistica/scene/node/sound_node.h" +#include "ballistica/assets/component/sound.h" #include "ballistica/audio/audio.h" #include "ballistica/audio/audio_source.h" -#include "ballistica/media/component/sound.h" #include "ballistica/scene/node/node_attribute.h" #include "ballistica/scene/node/node_type.h" #include "ballistica/scene/scene.h" diff --git a/src/ballistica/scene/node/spaz_node.cc b/src/ballistica/scene/node/spaz_node.cc index 1e2386a5..26ef2b15 100644 --- a/src/ballistica/scene/node/spaz_node.cc +++ b/src/ballistica/scene/node/spaz_node.cc @@ -2,6 +2,7 @@ #include "ballistica/scene/node/spaz_node.h" +#include "ballistica/assets/component/sound.h" #include "ballistica/audio/audio.h" #include "ballistica/audio/audio_source.h" #include "ballistica/dynamics/bg/bg_dynamics_shadow.h" @@ -17,7 +18,6 @@ #include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/text/text_graphics.h" #include "ballistica/input/device/input_device.h" -#include "ballistica/media/component/sound.h" #include "ballistica/python/python.h" #include "ballistica/scene/node/node_attribute.h" #include "ballistica/scene/node/node_type.h" @@ -1839,7 +1839,7 @@ void SpazNode::DoFlyPress() { } else { s_id = SystemSoundID::kSparkle3; } - s->Play(g_media->GetSound(s_id)); + s->Play(g_assets->GetSound(s_id)); s->End(); } } @@ -4000,9 +4000,9 @@ void SpazNode::DrawEyeBalls(RenderComponent* c, ObjectComponent* oc, if (blink_smooth_ < 0.9f) { if (shading) { oc->SetLightShadow(LightShadowType::kObject); - oc->SetTexture(g_media->GetTexture(SystemTextureID::kEye)); + oc->SetTexture(g_assets->GetTexture(SystemTextureID::kEye)); oc->SetColorizeColor(eye_color_red_, eye_color_green_, eye_color_blue_); - oc->SetColorizeTexture(g_media->GetTexture(SystemTextureID::kEyeTint)); + oc->SetColorizeTexture(g_assets->GetTexture(SystemTextureID::kEyeTint)); oc->SetReflection(ReflectionType::kSharpest); oc->SetReflectionScale(3, 3, 3); oc->SetAddColor(add_color[0], add_color[1], add_color[2]); @@ -4020,12 +4020,12 @@ void SpazNode::DrawEyeBalls(RenderComponent* c, ObjectComponent* oc, if (death_scale != 1.0f) c->Scale(death_scale, death_scale, death_scale); if (!frosty_ && !eyeless_) { - c->DrawModel(g_media->GetModel(SystemModelID::kEyeBall)); + c->DrawModel(g_assets->GetModel(SystemModelID::kEyeBall)); if (shading) { oc->SetReflectionScale(2, 2, 2); } if (death_scale != 1.0f) c->Scale(death_scale, death_scale, death_scale); - c->DrawModel(g_media->GetModel(SystemModelID::kEyeBallIris)); + c->DrawModel(g_assets->GetModel(SystemModelID::kEyeBallIris)); } c->PopTransform(); @@ -4040,12 +4040,12 @@ void SpazNode::DrawEyeBalls(RenderComponent* c, ObjectComponent* oc, c->Rotate(eyes_lr_smooth_, 0, 1, 0); c->Scale(0.09f, 0.09f, 0.09f); if (death_scale != 1.0f) c->Scale(death_scale, death_scale, death_scale); - c->DrawModel(g_media->GetModel(SystemModelID::kEyeBall)); + c->DrawModel(g_assets->GetModel(SystemModelID::kEyeBall)); if (death_scale != 1.0f) c->Scale(death_scale, death_scale, death_scale); if (shading) { oc->SetReflectionScale(2, 2, 2); } - c->DrawModel(g_media->GetModel(SystemModelID::kEyeBallIris)); + c->DrawModel(g_assets->GetModel(SystemModelID::kEyeBallIris)); c->PopTransform(); } c->PopTransform(); @@ -4054,7 +4054,7 @@ void SpazNode::DrawEyeBalls(RenderComponent* c, ObjectComponent* oc, void SpazNode::SetupEyeLidShading(ObjectComponent* c, float death_fade, float* add_color) { - c->SetTexture(g_media->GetTexture(SystemTextureID::kEye)); + c->SetTexture(g_assets->GetTexture(SystemTextureID::kEye)); c->SetColorizeTexture(nullptr); float r, g, b; r = eye_lid_color_red_; @@ -4097,7 +4097,7 @@ void SpazNode::DrawEyeLids(RenderComponent* c, float death_fade, } if (!frosty_ && !eyeless_) { - c->DrawModel(g_media->GetModel(SystemModelID::kEyeLid)); + c->DrawModel(g_assets->GetModel(SystemModelID::kEyeLid)); } c->PopTransform(); @@ -4117,7 +4117,7 @@ void SpazNode::DrawEyeLids(RenderComponent* c, float death_fade, c->Scale(-0.09f, 0.09f, 0.09f); if (death_scale != 1.0f) c->Scale(death_scale, death_scale, death_scale); if (!pirate_ && !frosty_ && !eyeless_) - c->DrawModel(g_media->GetModel(SystemModelID::kEyeLid)); + c->DrawModel(g_assets->GetModel(SystemModelID::kEyeLid)); c->PopTransform(); c->FlipCullFace(); // back to normal } @@ -4179,7 +4179,7 @@ void SpazNode::DrawBodyParts(ObjectComponent* c, bool shading, float death_fade, if (death_scale != 1.0f) { c->Scale(death_scale, death_scale, death_scale); } - c->DrawModel(g_media->GetModel(SystemModelID::kHairTuft1)); + c->DrawModel(g_assets->GetModel(SystemModelID::kHairTuft1)); c->PopTransform(); // Hair tuft 1b; just reuse tuft 1 with some extra translating. @@ -4193,7 +4193,7 @@ void SpazNode::DrawBodyParts(ObjectComponent* c, bool shading, float death_fade, if (death_scale != 1.0f) { c->Scale(death_scale, death_scale, death_scale); } - c->DrawModel(g_media->GetModel(SystemModelID::kHairTuft1b)); + c->DrawModel(g_assets->GetModel(SystemModelID::kHairTuft1b)); c->PopTransform(); } @@ -4202,7 +4202,7 @@ void SpazNode::DrawBodyParts(ObjectComponent* c, bool shading, float death_fade, c->PushTransform(); c->TransformToBody(*hair_front_left_body_); if (death_scale != 1.0f) c->Scale(death_scale, death_scale, death_scale); - c->DrawModel(g_media->GetModel(SystemModelID::kHairTuft2)); + c->DrawModel(g_assets->GetModel(SystemModelID::kHairTuft2)); c->PopTransform(); } @@ -4213,7 +4213,7 @@ void SpazNode::DrawBodyParts(ObjectComponent* c, bool shading, float death_fade, if (death_scale != 1.0f) { c->Scale(death_scale, death_scale, death_scale); } - c->DrawModel(g_media->GetModel(SystemModelID::kHairTuft3)); + c->DrawModel(g_assets->GetModel(SystemModelID::kHairTuft3)); c->PopTransform(); } @@ -4224,7 +4224,7 @@ void SpazNode::DrawBodyParts(ObjectComponent* c, bool shading, float death_fade, if (death_scale != 1.0f) { c->Scale(death_scale, death_scale, death_scale); } - c->DrawModel(g_media->GetModel(SystemModelID::kHairTuft4)); + c->DrawModel(g_assets->GetModel(SystemModelID::kHairTuft4)); c->PopTransform(); } @@ -4864,7 +4864,7 @@ void SpazNode::Draw(FrameDef* frame_def) { c.Translate(torso_pos[0] - 0.3f, torso_pos[1] + 1.47f, torso_pos[2] - 0.2f); c.Scale(1.5f * 0.2f, 1.5f * 0.2f, 1.5f * 0.2f); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); c.Submit(); } @@ -4966,7 +4966,7 @@ void SpazNode::Draw(FrameDef* frame_def) { c.PushTransform(); c.Translate(pos[0], pos[1] + 1.6f, pos[2] - 0.2f); c.Scale(2.3f * 0.2f * s, 2.3f * 0.2f * s, 2.3f * 0.2f * s); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); c.Submit(); @@ -4980,7 +4980,7 @@ void SpazNode::Draw(FrameDef* frame_def) { c2.PushTransform(); c2.Translate(pos[0], pos[1] + 1.6f, pos[2] - 0.2f); c2.Scale(2.3f * 0.2f * s, 2.3f * 0.2f * s, 2.3f * 0.2f * s); - c2.DrawModel(g_media->GetModel(SystemModelID::kCrossOut)); + c2.DrawModel(g_assets->GetModel(SystemModelID::kCrossOut)); c2.PopTransform(); c2.Submit(); } @@ -5028,7 +5028,7 @@ void SpazNode::Draw(FrameDef* frame_def) { c.PushTransform(); c.Translate(0.5f, half_height); c.Scale(1.1f, height + 0.1f); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); c.SetColor(0, 0.35f * o, 0, 0.3f * o); @@ -5036,7 +5036,7 @@ void SpazNode::Draw(FrameDef* frame_def) { c.PushTransform(); c.Translate(p_left * 0.5f, half_height); c.Scale(p_left, height); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); if (dead_ && scene()->stepnum() % 10 < 5) { @@ -5048,7 +5048,7 @@ void SpazNode::Draw(FrameDef* frame_def) { c.PushTransform(); c.Translate((p_left + p_right) * 0.5f, half_height); c.Scale(p_right - p_left, height); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); c.SetColor((dead_ && scene()->stepnum() % 10 < 5) ? 0.55f * o : 0.01f * o, @@ -5057,7 +5057,7 @@ void SpazNode::Draw(FrameDef* frame_def) { c.PushTransform(); c.Translate((p_right + 1.0f) * 0.5f, half_height); c.Scale(1.0f - p_right, height); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); c.PopTransform(); @@ -5098,7 +5098,7 @@ void SpazNode::Draw(FrameDef* frame_def) { c.SetColor(1, 1, 1, 1.0f); c.SetReflection(ReflectionType::kSoft); c.SetReflectionScale(0.4f, 0.4f, 0.4f); - c.SetTexture(g_media->GetTexture(SystemTextureID::kWings)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kWings)); // Fade to reddish on death. if (dead_ && !frozen_) { @@ -5118,14 +5118,14 @@ void SpazNode::Draw(FrameDef* frame_def) { c.PushTransform(); c.Translate(p_wing_l[0], p_wing_l[1], p_wing_l[2]); c.Scale(0.05f, 0.05f, 0.05f); - c.DrawModel(g_media->GetModel(SystemModelID::kBox)); + c.DrawModel(g_assets->GetModel(SystemModelID::kBox)); c.PopTransform(); // Draw wing point. c.PushTransform(); c.Translate(wing_pos_left_.x, wing_pos_left_.y, wing_pos_left_.z); c.Scale(0.1f, 0.1f, 0.1f); - c.DrawModel(g_media->GetModel(SystemModelID::kBox)); + c.DrawModel(g_assets->GetModel(SystemModelID::kBox)); c.PopTransform(); // Draw target. @@ -5134,14 +5134,14 @@ void SpazNode::Draw(FrameDef* frame_def) { c.PushTransform(); c.Translate(p_wing_r[0], p_wing_r[1], p_wing_r[2]); c.Scale(0.05f, 0.05f, 0.05f); - c.DrawModel(g_media->GetModel(SystemModelID::kBox)); + c.DrawModel(g_assets->GetModel(SystemModelID::kBox)); c.PopTransform(); // Draw wing point. c.PushTransform(); c.Translate(wing_pos_right_.x, wing_pos_right_.y, wing_pos_right_.z); c.Scale(0.1f, 0.1f, 0.1f); - c.DrawModel(g_media->GetModel(SystemModelID::kBox)); + c.DrawModel(g_assets->GetModel(SystemModelID::kBox)); c.PopTransform(); } @@ -5167,7 +5167,7 @@ void SpazNode::Draw(FrameDef* frame_def) { if (death_scale != 1.0f) { c.Scale(death_scale, death_scale, death_scale); } - c.DrawModel(g_media->GetModel(SystemModelID::kWing)); + c.DrawModel(g_assets->GetModel(SystemModelID::kWing)); c.PopTransform(); Vector3f to_right_wing = wing_pos_right_ - torso_pos2; @@ -5185,7 +5185,7 @@ void SpazNode::Draw(FrameDef* frame_def) { if (death_scale != 1.0f) { c.Scale(death_scale, death_scale, death_scale); } - c.DrawModel(g_media->GetModel(SystemModelID::kWing)); + c.DrawModel(g_assets->GetModel(SystemModelID::kWing)); c.PopTransform(); c.Submit(); } @@ -5222,14 +5222,14 @@ void SpazNode::Draw(FrameDef* frame_def) { } } c.SetLightShadow(LightShadowType::kObject); - c.SetTexture(g_media->GetTexture(SystemTextureID::kBoxingGlove)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kBoxingGlove)); c.PushTransform(); c.TransformToBody(*lower_right_arm_body_); if (death_scale != 1.0f) { c.Scale(death_scale, death_scale, death_scale); } - c.DrawModel(g_media->GetModel(SystemModelID::kBoxingGlove)); + c.DrawModel(g_assets->GetModel(SystemModelID::kBoxingGlove)); c.PopTransform(); c.FlipCullFace(); @@ -5239,7 +5239,7 @@ void SpazNode::Draw(FrameDef* frame_def) { if (death_scale != 1.0f) { c.Scale(death_scale, death_scale, death_scale); } - c.DrawModel(g_media->GetModel(SystemModelID::kBoxingGlove)); + c.DrawModel(g_assets->GetModel(SystemModelID::kBoxingGlove)); c.FlipCullFace(); c.PopTransform(); c.Submit(); @@ -6149,7 +6149,7 @@ void SpazNode::SetCurseDeathTime(millisecs_t val) { const dReal* p_head = dGeomGetPosition(body_head_->geom()); s->SetPosition(p_head[0], p_head[1], p_head[2]); tick_play_id_ = - s->Play(g_media->GetSound(SystemSoundID::kTickingCrazy)); + s->Play(g_assets->GetSound(SystemSoundID::kTickingCrazy)); s->End(); } } diff --git a/src/ballistica/scene/node/terrain_node.cc b/src/ballistica/scene/node/terrain_node.cc index 338975f6..b8b831ad 100644 --- a/src/ballistica/scene/node/terrain_node.cc +++ b/src/ballistica/scene/node/terrain_node.cc @@ -2,10 +2,10 @@ #include "ballistica/scene/node/terrain_node.h" +#include "ballistica/assets/component/collide_model.h" #include "ballistica/dynamics/bg/bg_dynamics.h" #include "ballistica/dynamics/material/material.h" #include "ballistica/graphics/component/object_component.h" -#include "ballistica/media/component/collide_model.h" #include "ballistica/scene/node/node_attribute.h" #include "ballistica/scene/node/node_type.h" #include "ballistica/scene/scene.h" diff --git a/src/ballistica/scene/node/texture_sequence_node.cc b/src/ballistica/scene/node/texture_sequence_node.cc index 6644f9dd..e5bc8821 100644 --- a/src/ballistica/scene/node/texture_sequence_node.cc +++ b/src/ballistica/scene/node/texture_sequence_node.cc @@ -2,7 +2,7 @@ #include "ballistica/scene/node/texture_sequence_node.h" -#include "ballistica/media/component/texture.h" +#include "ballistica/assets/component/texture.h" #include "ballistica/scene/node/node_attribute.h" #include "ballistica/scene/node/node_type.h" #include "ballistica/scene/scene.h" diff --git a/src/ballistica/scene/scene.cc b/src/ballistica/scene/scene.cc index 9bc1d71a..39fc3544 100644 --- a/src/ballistica/scene/scene.cc +++ b/src/ballistica/scene/scene.cc @@ -3,6 +3,7 @@ #include "ballistica/scene/scene.h" #include "ballistica/app/app.h" +#include "ballistica/assets/component/sound.h" #include "ballistica/audio/audio.h" #include "ballistica/dynamics/bg/bg_dynamics.h" #include "ballistica/dynamics/dynamics.h" @@ -12,7 +13,6 @@ #include "ballistica/graphics/camera.h" #include "ballistica/graphics/graphics.h" #include "ballistica/input/device/input_device.h" -#include "ballistica/media/component/sound.h" #include "ballistica/networking/networking.h" #include "ballistica/python/python_context_call.h" #include "ballistica/scene/node/anim_curve_node.h" diff --git a/src/ballistica/ui/console.cc b/src/ballistica/ui/console.cc index cc9ffc5a..a40bcec0 100644 --- a/src/ballistica/ui/console.cc +++ b/src/ballistica/ui/console.cc @@ -153,7 +153,7 @@ void Console::ToggleState() { state_ = State::kInactive; break; } - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kBlip)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kBlip)); transition_start_ = GetRealTime(); } @@ -312,7 +312,7 @@ void Console::Draw(RenderPass* pass) { c.Translate(19.0f + g_text_graphics->GetStringWidth(input_string_) * 0.5f, bottom + 23.0f, kConsoleZDepth); c.Scale(5, 11, 1.0f); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); c.Submit(); } diff --git a/src/ballistica/ui/root_ui.cc b/src/ballistica/ui/root_ui.cc index 7b1e4705..8f13411b 100644 --- a/src/ballistica/ui/root_ui.cc +++ b/src/ballistica/ui/root_ui.cc @@ -176,7 +176,7 @@ void RootUI::Draw(FrameDef* frame_def) { if (draw_menu_button) { SimpleComponent c(frame_def->overlay_pass()); c.SetTransparent(true); - c.SetTexture(g_media->GetTexture(SystemTextureID::kMenuButton)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kMenuButton)); // Draw menu button. float width = g_graphics->screen_virtual_width(); @@ -191,7 +191,7 @@ void RootUI::Draw(FrameDef* frame_def) { c.Translate(width - menu_button_size_ * 0.5f, height - menu_button_size_ * 0.38f, kMenuButtonDrawDepth); c.Scale(menu_button_size_ * 0.8f, menu_button_size_ * 0.8f); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); c.Submit(); } @@ -224,7 +224,7 @@ void RootUI::Draw(FrameDef* frame_def) { SimpleComponent c(frame_def->overlay_pass()); c.SetTransparent(true); - c.SetTexture(g_media->GetTexture(SystemTextureID::kUsersButton)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kUsersButton)); // Draw button. float width = g_graphics->screen_virtual_width(); @@ -245,7 +245,7 @@ void RootUI::Draw(FrameDef* frame_def) { if (flash && frame_def->base_time() % 250 < 125) { c.SetColor(1.0f, 1.4f, 1.0f); } - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); c.Submit(); diff --git a/src/ballistica/ui/ui.cc b/src/ballistica/ui/ui.cc index 967a96a9..d0cf6d51 100644 --- a/src/ballistica/ui/ui.cc +++ b/src/ballistica/ui/ui.cc @@ -3,13 +3,13 @@ #include "ballistica/ui/ui.h" #include "ballistica/app/app.h" +#include "ballistica/assets/component/data.h" +#include "ballistica/assets/component/sound.h" #include "ballistica/audio/audio.h" #include "ballistica/generic/lambda_runnable.h" #include "ballistica/graphics/component/empty_component.h" #include "ballistica/input/device/input_device.h" #include "ballistica/input/input.h" -#include "ballistica/media/component/data.h" -#include "ballistica/media/component/sound.h" #include "ballistica/python/python.h" #include "ballistica/scene/scene.h" #include "ballistica/ui/root_ui.h" @@ -292,7 +292,7 @@ auto UI::GetWidgetForInput(InputDevice* input_device) -> Widget* { // they're not the chosen one. if (time - last_widget_input_reject_err_sound_time_ > 5000) { last_widget_input_reject_err_sound_time_ = time; - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kErrorBeep)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kErrorBeep)); print_menu_owner = true; } ret_val = nullptr; // Rejected! @@ -341,19 +341,19 @@ auto UI::GetWidgetForInput(InputDevice* input_device) -> Widget* { } auto UI::GetModel(const std::string& name) -> Object::Ref { - return Media::GetMedia(&models_, name, scene()); + return Assets::GetAsset(&models_, name, scene()); } auto UI::GetTexture(const std::string& name) -> Object::Ref { - return Media::GetMedia(&textures_, name, scene()); + return Assets::GetAsset(&textures_, name, scene()); } auto UI::GetSound(const std::string& name) -> Object::Ref { - return Media::GetMedia(&sounds_, name, scene()); + return Assets::GetAsset(&sounds_, name, scene()); } auto UI::GetData(const std::string& name) -> Object::Ref { - return Media::GetMedia(&datas_, name, scene()); + return Assets::GetAsset(&datas_, name, scene()); } auto UI::GetAsUIContext() -> UI* { return this; } diff --git a/src/ballistica/ui/widget/button_widget.cc b/src/ballistica/ui/widget/button_widget.cc index 434c47ef..de09fb05 100644 --- a/src/ballistica/ui/widget/button_widget.cc +++ b/src/ballistica/ui/widget/button_widget.cc @@ -262,7 +262,7 @@ void ButtonWidget::Draw(RenderPass* pass, bool draw_transparent) { // Custom button texture. if (texture_.exists()) { if (!custom_model.exists()) { - model = g_media->GetModel(SystemModelID::kImage1x1); + model = g_assets->GetModel(SystemModelID::kImage1x1); } else { model = custom_model->model_data(); } @@ -374,8 +374,8 @@ void ButtonWidget::Draw(RenderPass* pass, bool draw_transparent) { break; } } - c.SetTexture(g_media->GetTexture(tex_id)); - model = g_media->GetModel(model_id); + c.SetTexture(g_assets->GetTexture(tex_id)); + model = g_assets->GetModel(model_id); } if (doDraw) { c.PushTransform(); @@ -392,20 +392,20 @@ void ButtonWidget::Draw(RenderPass* pass, bool draw_transparent) { if (icon_type_ == IconType::kStart) { c.SetColor(1.4f * mult * (color_red_), 1.4f * mult * (color_green_), 1.4f * mult * (color_blue_), 1.0f); - c.SetTexture(g_media->GetTexture(SystemTextureID::kStartButton)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kStartButton)); } else if (icon_type_ == IconType::kCancel) { if (remote_icons) { c.SetColor(1.0f * mult * (1.0f), 1.0f * mult * (1.0f), 1.0f * mult * (1.0f), 1.0f); - c.SetTexture(g_media->GetTexture(SystemTextureID::kBackIcon)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kBackIcon)); } else if (ouya_icons) { c.SetColor(1.0f * mult * (1.0f), 1.0f * mult * (1.0f), 1.0f * mult * (1.0f), 1.0f); - c.SetTexture(g_media->GetTexture(SystemTextureID::kOuyaAButton)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kOuyaAButton)); } else { c.SetColor(1.5f * mult * (color_red_), 1.5f * mult * (color_green_), 1.5f * mult * (color_blue_), 1.0f); - c.SetTexture(g_media->GetTexture(SystemTextureID::kBombButton)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kBombButton)); } } else if (icon_.exists()) { c.SetColor(icon_color_red_ @@ -425,7 +425,7 @@ void ButtonWidget::Draw(RenderPass* pass, bool draw_transparent) { } } else { c.SetColor(1, 1, 1); - c.SetTexture(g_media->GetTexture(SystemTextureID::kCircle)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kCircle)); } if (doDrawIcon) { c.PushTransform(); @@ -433,7 +433,7 @@ void ButtonWidget::Draw(RenderPass* pass, bool draw_transparent) { - (string_width * string_scale) * 0.5f - 5.0f, (b + t) * 0.5f + extra_offs_y, 0.001f); c.Scale(34.0f * icon_scale_, 34.f * icon_scale_, 1.0f); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); } } @@ -565,11 +565,11 @@ void ButtonWidget::DoActivate(bool isRepeat) { if (sound_enabled_) { int r = rand() % 3; // NOLINT if (r == 0) { - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kSwish)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kSwish)); } else if (r == 1) { - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kSwish2)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kSwish2)); } else { - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kSwish3)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kSwish3)); } } if (on_activate_call_.exists()) { diff --git a/src/ballistica/ui/widget/check_box_widget.cc b/src/ballistica/ui/widget/check_box_widget.cc index 13c8aaa4..f45ecafd 100644 --- a/src/ballistica/ui/widget/check_box_widget.cc +++ b/src/ballistica/ui/widget/check_box_widget.cc @@ -88,11 +88,11 @@ void CheckBoxWidget::Draw(RenderPass* pass, bool draw_transparent) { c.SetTransparent(true); c.SetPremultiplied(true); c.SetColor(0.25f * m, 0.3f * m, 0, 0.3f * m); - c.SetTexture(g_media->GetTexture(SystemTextureID::kGlow)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kGlow)); c.PushTransform(); c.Translate(highlight_center_x_, highlight_center_y_); c.Scale(highlight_width_, highlight_height_); - c.DrawModel(g_media->GetModel(SystemModelID::kImage4x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage4x1)); c.PopTransform(); c.Submit(); } @@ -132,14 +132,14 @@ void CheckBoxWidget::Draw(RenderPass* pass, bool draw_transparent) { c.SetTransparent(draw_transparent); c.SetColor(glow_amt * color_r_, glow_amt * color_g_, glow_amt * color_b_, 1); - c.SetTexture(g_media->GetTexture(SystemTextureID::kUIAtlas)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kUIAtlas)); c.PushTransform(); c.Translate(box_center_x_ + extra_offs_x, box_center_y_ + extra_offs_y, 0.1f); c.Scale(box_width_, box_height_, 0.4f); - c.DrawModel(g_media->GetModel(draw_transparent - ? SystemModelID::kButtonSmallTransparent - : SystemModelID::kButtonSmallOpaque)); + c.DrawModel(g_assets->GetModel( + draw_transparent ? SystemModelID::kButtonSmallTransparent + : SystemModelID::kButtonSmallOpaque)); c.PopTransform(); c.Submit(); } @@ -171,9 +171,9 @@ void CheckBoxWidget::Draw(RenderPass* pass, bool draw_transparent) { SimpleComponent c(pass); c.SetTransparent(draw_transparent); if (is_radio_button_) { - c.SetTexture(g_media->GetTexture(SystemTextureID::kNub)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kNub)); } else { - c.SetTexture(g_media->GetTexture(SystemTextureID::kUIAtlas)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kUIAtlas)); } if (mouse_over_ && g_platform->IsRunningOnDesktop()) { @@ -188,12 +188,12 @@ void CheckBoxWidget::Draw(RenderPass* pass, bool draw_transparent) { check_center_y_ + 2 + 3.0f * extra_offs_y, 0.5f); c.Scale(check_width_ * 0.45f, check_height_ * 0.45f, 0.5f); c.Translate(-0.17f, -0.17f, 0.5f); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); } else { c.Translate(check_center_x_ + 3.0f * extra_offs_x, check_center_y_ + 3.0f * extra_offs_y, 0.5f); c.Scale(check_width_, check_height_, 0.5f); - c.DrawModel(g_media->GetModel(SystemModelID::kCheckTransparent)); + c.DrawModel(g_assets->GetModel(SystemModelID::kCheckTransparent)); } c.PopTransform(); c.Submit(); @@ -235,7 +235,7 @@ void CheckBoxWidget::SetValue(bool value) { } void CheckBoxWidget::Activate() { - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kSwish3)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kSwish3)); checked_ = !checked_; check_dirty_ = true; last_change_time_ = GetRealTime(); diff --git a/src/ballistica/ui/widget/container_widget.cc b/src/ballistica/ui/widget/container_widget.cc index 2cc0edb6..dbd41b05 100644 --- a/src/ballistica/ui/widget/container_widget.cc +++ b/src/ballistica/ui/widget/container_widget.cc @@ -596,7 +596,7 @@ auto ContainerWidget::HandleMessage(const WidgetMessage& m) -> bool { // First click just selects. if (click_count == 1) { - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kTap)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kTap)); } } else { // Special case: If we've got a child text widget that's @@ -948,7 +948,7 @@ void ContainerWidget::Draw(RenderPass* pass, bool draw_transparent) { bg_center_x_ = l - l_border + bg_width_ * 0.5f; bg_center_y_ = b - b_border + bg_height_ * 0.5f; if (background_) { - tex_ = g_media->GetTexture(tex_id); + tex_ = g_assets->GetTexture(tex_id); } bg_dirty_ = false; } @@ -974,8 +974,8 @@ void ContainerWidget::Draw(RenderPass* pass, bool draw_transparent) { c.PushTransform(); c.Translate(bg_center_x_, bg_center_y_); c.Scale(bg_width_ * transition_scale_, bg_height_ * transition_scale_); - c.DrawModel(g_media->GetModel(draw_transparent ? bg_model_transparent_i_d_ - : bg_model_opaque_i_d_)); + c.DrawModel(g_assets->GetModel( + draw_transparent ? bg_model_transparent_i_d_ : bg_model_opaque_i_d_)); c.PopTransform(); c.Submit(); } @@ -1005,12 +1005,12 @@ void ContainerWidget::Draw(RenderPass* pass, bool draw_transparent) { SimpleComponent c(pass); c.SetTransparent(true); c.SetPremultiplied(true); - c.SetTexture(g_media->GetTexture(SystemTextureID::kGlow)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kGlow)); c.SetColor(0.25f * m, 0.25f * m, 0, 0.3f * m); c.PushTransform(); c.Translate(glow_center_x_, glow_center_y_); c.Scale(glow_width_, glow_height_); - c.DrawModel(g_media->GetModel(SystemModelID::kImage4x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage4x1)); c.PopTransform(); c.Submit(); } @@ -1582,7 +1582,7 @@ void ContainerWidget::SelectDownWidget() { // Avoid tap sounds and whatnot if we're just re-selecting ourself. if (w != selected_widget_) { w->GlobalSelect(); - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kTap)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kTap)); } } } else { @@ -1646,7 +1646,7 @@ void ContainerWidget::SelectUpWidget() { // Avoid tap sounds and whatnot if we're just re-selecting ourself. if (w != selected_widget_) { w->GlobalSelect(); - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kTap)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kTap)); } } } else { @@ -1697,7 +1697,7 @@ void ContainerWidget::SelectLeftWidget() { // Avoid tap sounds and whatnot if we're just re-selecting ourself. if (w != selected_widget_) { w->GlobalSelect(); - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kTap)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kTap)); } } } else { @@ -1748,7 +1748,7 @@ void ContainerWidget::SelectRightWidget() { // Avoid tap sounds and whatnot if we're just re-selecting ourself. if (w != selected_widget_) { w->GlobalSelect(); - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kTap)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kTap)); } } } else { @@ -1828,7 +1828,7 @@ void ContainerWidget::SelectNextWidget() { } if ((**i).IsSelectable() && (**i).IsSelectableViaKeys()) { SelectWidget(&(**i), SelectionCause::NEXT_SELECTED); - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kTap)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kTap)); return; } i++; @@ -1843,7 +1843,7 @@ void ContainerWidget::PrintExitListInstructions( if ((t - old_last_prev_next_time > 250) && (t - last_list_exit_instructions_print_time_ > 5000)) { last_list_exit_instructions_print_time_ = t; - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kErrorBeep)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kErrorBeep)); std::string s = g_game->GetResourceString("arrowsToExitListText"); { // Left arrow. @@ -1915,7 +1915,7 @@ void ContainerWidget::SelectPrevWidget() { if ((**i).IsSelectable() && (**i).IsSelectableViaKeys()) { SelectWidget(&(**i), SelectionCause::PREV_SELECTED); - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kTap)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kTap)); return; } i++; diff --git a/src/ballistica/ui/widget/h_scroll_widget.cc b/src/ballistica/ui/widget/h_scroll_widget.cc index d23164db..27aecc66 100644 --- a/src/ballistica/ui/widget/h_scroll_widget.cc +++ b/src/ballistica/ui/widget/h_scroll_widget.cc @@ -625,12 +625,12 @@ void HScrollWidget::Draw(RenderPass* pass, bool draw_transparent) { SimpleComponent c(pass); c.SetTransparent(true); c.SetColor(1, 1, 1, border_opacity_); - c.SetTexture(g_media->GetTexture(SystemTextureID::kUIAtlas)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kUIAtlas)); c.PushTransform(); c.Translate(trough_center_x_, trough_center_y_, 0.7f); c.Scale(trough_width_, trough_height_, 0.1f); c.Rotate(-90, 0, 0, 1); - c.DrawModel(g_media->GetModel(SystemModelID::kScrollBarTroughTransparent)); + c.DrawModel(g_assets->GetModel(SystemModelID::kScrollBarTroughTransparent)); c.PopTransform(); c.Submit(); } @@ -710,20 +710,21 @@ void HScrollWidget::Draw(RenderPass* pass, bool draw_transparent) { // on touch, just draw these transiently #if 1 if (draw_transparent) { - c.DrawModel(g_media->GetModel( + c.DrawModel(g_assets->GetModel( sb_thumb_width > 100 ? SystemModelID::kScrollBarThumbSimple : SystemModelID::kScrollBarThumbShortSimple)); } #else if (draw_transparent) { - c.DrawModel(g_media->GetModel( + c.DrawModel(g_assets->GetModel( sb_thumb_width > 100 - ? Media::SCROLL_BAR_THUMB_TRANSPARENT_MODEL - : Media::SCROLL_BAR_THUMB_SHORT_TRANSPARENT_MODEL)); + ? Assets::SCROLL_BAR_THUMB_TRANSPARENT_MODEL + : Assets::SCROLL_BAR_THUMB_SHORT_TRANSPARENT_MODEL)); } else { - c.DrawModel(g_media->GetModel( - sb_thumb_width > 100 ? Media::SCROLL_BAR_THUMB_OPAQUE_MODEL - : Media::SCROLL_BAR_THUMB_SHORT_OPAQUE_MODEL)); + c.DrawModel(g_assets->GetModel( + sb_thumb_width > 100 + ? Assets::SCROLL_BAR_THUMB_OPAQUE_MODEL + : Assets::SCROLL_BAR_THUMB_SHORT_OPAQUE_MODEL)); } #endif @@ -755,11 +756,11 @@ void HScrollWidget::Draw(RenderPass* pass, bool draw_transparent) { SimpleComponent c(pass); c.SetTransparent(true); c.SetColor(1, 1, 1, border_opacity_); - c.SetTexture(g_media->GetTexture(SystemTextureID::kScrollWidget)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kScrollWidget)); c.PushTransform(); c.Translate(outline_center_x_, outline_center_y_, 0.9f); c.Scale(outline_width_, outline_height_, 0.1f); - c.DrawModel(g_media->GetModel(SystemModelID::kSoftEdgeOutside)); + c.DrawModel(g_assets->GetModel(SystemModelID::kSoftEdgeOutside)); c.PopTransform(); c.Submit(); } @@ -792,11 +793,11 @@ void HScrollWidget::Draw(RenderPass* pass, bool draw_transparent) { c.SetTransparent(true); c.SetPremultiplied(true); c.SetColor(0.4f * m, 0.5f * m, 0.05f * m, 0.0f); - c.SetTexture(g_media->GetTexture(SystemTextureID::kScrollWidgetGlow)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kScrollWidgetGlow)); c.PushTransform(); c.Translate(glow_center_x_, glow_center_y_, 0.9f); c.Scale(glow_width_, glow_height_, 0.1f); - c.DrawModel(g_media->GetModel(SystemModelID::kSoftEdgeOutside)); + c.DrawModel(g_assets->GetModel(SystemModelID::kSoftEdgeOutside)); c.PopTransform(); c.Submit(); } diff --git a/src/ballistica/ui/widget/image_widget.cc b/src/ballistica/ui/widget/image_widget.cc index 3dd117a7..75c63b86 100644 --- a/src/ballistica/ui/widget/image_widget.cc +++ b/src/ballistica/ui/widget/image_widget.cc @@ -70,13 +70,13 @@ void ImageWidget::Draw(RenderPass* pass, bool draw_transparent) { draw_radial_transparent = true; } else { model_transparent_used = - g_media->GetModel(SystemModelID::kImage1x1); + g_assets->GetModel(SystemModelID::kImage1x1); } } else { if (radial_amount_ < 1.0f) { draw_radial_opaque = true; } else { - model_opaque_used = g_media->GetModel(SystemModelID::kImage1x1); + model_opaque_used = g_assets->GetModel(SystemModelID::kImage1x1); } } } diff --git a/src/ballistica/ui/widget/image_widget.h b/src/ballistica/ui/widget/image_widget.h index 00979437..18dc66a2 100644 --- a/src/ballistica/ui/widget/image_widget.h +++ b/src/ballistica/ui/widget/image_widget.h @@ -5,8 +5,8 @@ #include -#include "ballistica/media/component/model.h" -#include "ballistica/media/component/texture.h" +#include "ballistica/assets/component/model.h" +#include "ballistica/assets/component/texture.h" #include "ballistica/ui/widget/widget.h" namespace ballistica { diff --git a/src/ballistica/ui/widget/scroll_widget.cc b/src/ballistica/ui/widget/scroll_widget.cc index d479ac94..3e9ba042 100644 --- a/src/ballistica/ui/widget/scroll_widget.cc +++ b/src/ballistica/ui/widget/scroll_widget.cc @@ -696,11 +696,11 @@ void ScrollWidget::Draw(RenderPass* pass, bool draw_transparent) { SimpleComponent c(pass); c.SetTransparent(true); c.SetColor(1, 1, 1, border_opacity_); - c.SetTexture(g_media->GetTexture(SystemTextureID::kUIAtlas)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kUIAtlas)); c.PushTransform(); c.Translate(trough_center_x_, trough_center_y_, 0.7f); c.Scale(trough_width_, trough_height_, 0.1f); - c.DrawModel(g_media->GetModel(SystemModelID::kScrollBarTroughTransparent)); + c.DrawModel(g_assets->GetModel(SystemModelID::kScrollBarTroughTransparent)); c.PopTransform(); c.Submit(); } @@ -748,19 +748,19 @@ void ScrollWidget::Draw(RenderPass* pass, bool draw_transparent) { c.SetColor(color_red_ * c_scale, color_green_ * c_scale, color_blue_ * c_scale, 1.0f); - c.SetTexture(g_media->GetTexture(SystemTextureID::kUIAtlas)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kUIAtlas)); c.ScissorPush(Rect(l + border_width_, b + border_height_ + 1, l + (width()), b + (height() * 0.995f))); c.PushTransform(); c.Translate(thumb_center_x_, thumb_center_y_, 0.8f); c.Scale(thumb_width_, thumb_height_, 0.1f); if (draw_transparent) { - c.DrawModel(g_media->GetModel( + c.DrawModel(g_assets->GetModel( sb_thumb_height > 100 ? SystemModelID::kScrollBarThumbTransparent : SystemModelID::kScrollBarThumbShortTransparent)); } else { - c.DrawModel(g_media->GetModel( + c.DrawModel(g_assets->GetModel( sb_thumb_height > 100 ? SystemModelID::kScrollBarThumbOpaque : SystemModelID::kScrollBarThumbShortOpaque)); } @@ -791,11 +791,11 @@ void ScrollWidget::Draw(RenderPass* pass, bool draw_transparent) { SimpleComponent c(pass); c.SetTransparent(true); c.SetColor(1, 1, 1, border_opacity_); - c.SetTexture(g_media->GetTexture(SystemTextureID::kScrollWidget)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kScrollWidget)); c.PushTransform(); c.Translate(outline_center_x_, outline_center_y_, 0.9f); c.Scale(outline_width_, outline_height_, 0.1f); - c.DrawModel(g_media->GetModel(SystemModelID::kSoftEdgeOutside)); + c.DrawModel(g_assets->GetModel(SystemModelID::kSoftEdgeOutside)); c.PopTransform(); c.Submit(); } @@ -827,11 +827,11 @@ void ScrollWidget::Draw(RenderPass* pass, bool draw_transparent) { c.SetTransparent(true); c.SetPremultiplied(true); c.SetColor(0.4f * m, 0.5f * m, 0.05f * m, 0.0f); - c.SetTexture(g_media->GetTexture(SystemTextureID::kScrollWidgetGlow)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kScrollWidgetGlow)); c.PushTransform(); c.Translate(glow_center_x_, glow_center_y_, 0.9f); c.Scale(glow_width_, glow_height_, 0.1f); - c.DrawModel(g_media->GetModel(SystemModelID::kSoftEdgeOutside)); + c.DrawModel(g_assets->GetModel(SystemModelID::kSoftEdgeOutside)); c.PopTransform(); c.Submit(); } diff --git a/src/ballistica/ui/widget/text_widget.cc b/src/ballistica/ui/widget/text_widget.cc index 064d3323..795a009d 100644 --- a/src/ballistica/ui/widget/text_widget.cc +++ b/src/ballistica/ui/widget/text_widget.cc @@ -177,11 +177,11 @@ void TextWidget::Draw(RenderPass* pass, bool draw_transparent) { c.SetTransparent(true); c.SetPremultiplied(true); c.SetColor(0.25f * m, 0.3f * m, 0, 0.3f * m); - c.SetTexture(g_media->GetTexture(SystemTextureID::kGlow)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kGlow)); c.PushTransform(); c.Translate(highlight_center_x_, highlight_center_y_, 0.1f); c.Scale(highlight_width_, highlight_height_); - c.DrawModel(g_media->GetModel(SystemModelID::kImage4x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage4x1)); c.PopTransform(); c.Submit(); } @@ -202,11 +202,11 @@ void TextWidget::Draw(RenderPass* pass, bool draw_transparent) { SimpleComponent c(pass); c.SetTransparent(true); c.SetColor(1, 1, 1, 1); - c.SetTexture(g_media->GetTexture(SystemTextureID::kUIAtlas)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kUIAtlas)); c.PushTransform(); c.Translate(outline_center_x_, outline_center_y_, 0.1f); c.Scale(outline_width_, outline_height_); - c.DrawModel(g_media->GetModel(SystemModelID::kTextBoxTransparent)); + c.DrawModel(g_assets->GetModel(SystemModelID::kTextBoxTransparent)); c.PopTransform(); c.Submit(); } @@ -221,7 +221,7 @@ void TextWidget::Draw(RenderPass* pass, bool draw_transparent) { } else { c.SetColor(0.5f, 0.5f, 0.5f, 1); } - c.SetTexture(g_media->GetTexture(SystemTextureID::kTextClearButton)); + c.SetTexture(g_assets->GetTexture(SystemTextureID::kTextClearButton)); c.PushTransform(); c.Translate(r - 20, b * 0.5f + t * 0.5f, 0.1f); if (g_ui->scale() == UIScale::kSmall) { @@ -229,7 +229,7 @@ void TextWidget::Draw(RenderPass* pass, bool draw_transparent) { } else { c.Scale(25, 25); } - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); c.Submit(); } @@ -401,10 +401,10 @@ void TextWidget::Draw(RenderPass* pass, bool draw_transparent) { c.Scale(max_width_height_scale, max_width_height_scale); c.Translate(h + 4, v + 17.0f); c.Scale(6, 27); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.SetColor(1, 1, 1, 0); c.Scale(0.3f, 0.8f); - c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); + c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1)); c.PopTransform(); c.Submit(); } @@ -617,7 +617,7 @@ auto TextWidget::HandleMessage(const WidgetMessage& m) -> bool { case SDLK_KP_ENTER: if (g_buildconfig.ostype_ios_tvos() || g_buildconfig.ostype_android()) { // On mobile, return currently just deselects us. - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kSwish)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kSwish)); parent_widget()->SelectWidget(nullptr); return true; } else { @@ -838,7 +838,7 @@ auto TextWidget::HandleMessage(const WidgetMessage& m) -> bool { pressed_activate_ = (click_count == 2 || click_activate_) && !editable_; if (click_count == 1) { - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kTap)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kTap)); } } return true; @@ -861,7 +861,7 @@ auto TextWidget::HandleMessage(const WidgetMessage& m) -> bool { carat_position_ = 0; text_group_dirty_ = true; clear_pressed_ = false; - g_audio->PlaySound(g_media->GetSound(SystemSoundID::kTap)); + g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kTap)); return true; } clear_pressed_ = false; From b837d3707ecedc71719eae9206b80f46cdfcd1ff Mon Sep 17 00:00:00 2001 From: Eric Date: Sat, 10 Sep 2022 16:58:20 -0700 Subject: [PATCH 06/40] more c++ reorganizing --- .efrocachemap | 80 +++--- .idea/dictionaries/ericf.xml | 1 + CHANGELOG.md | 7 +- Makefile | 4 + .../ba_data/python/._bainternal_sources_hash | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- assets/src/ba_data/python/ba/_coopgame.py | 13 - assets/src/ba_data/python/ba/internal.py | 21 +- .../ba_data/python/bastd/activity/coopjoin.py | 183 ++++--------- .../.idea/dictionaries/ericf.xml | 1 + ballisticacore-cmake/CMakeLists.txt | 5 +- .../Generic/BallisticaCoreGeneric.vcxproj | 5 +- .../BallisticaCoreGeneric.vcxproj.filters | 15 +- .../Headless/BallisticaCoreHeadless.vcxproj | 5 +- .../BallisticaCoreHeadless.vcxproj.filters | 15 +- src/ballistica/app/app_flavor.cc | 9 - src/ballistica/app/app_flavor.h | 3 - .../assets/component/collide_model.cc | 6 +- src/ballistica/assets/component/data.cc | 6 +- src/ballistica/assets/component/model.cc | 6 +- src/ballistica/assets/component/sound.cc | 6 +- src/ballistica/assets/component/texture.cc | 6 +- src/ballistica/ballistica.cc | 2 +- src/ballistica/core/types.h | 2 +- .../material/impact_sound_material_action.cc | 4 +- .../material/impact_sound_material_action.h | 2 +- src/ballistica/dynamics/material/material.cc | 10 +- src/ballistica/dynamics/material/material.h | 2 +- .../dynamics/material/material_action.h | 2 +- .../dynamics/material/material_component.cc | 2 +- .../dynamics/material/material_component.h | 2 +- .../material/material_condition_node.cc | 4 +- .../material/material_condition_node.h | 2 +- .../material/node_message_material_action.h | 2 +- .../material/node_mod_material_action.cc | 2 +- .../material/node_mod_material_action.h | 2 +- .../material/part_mod_material_action.cc | 2 +- .../material/part_mod_material_action.h | 2 +- .../material/roll_sound_material_action.cc | 4 +- .../material/roll_sound_material_action.h | 2 +- .../material/skid_sound_material_action.cc | 4 +- .../material/skid_sound_material_action.h | 2 +- .../material/sound_material_action.cc | 4 +- .../dynamics/material/sound_material_action.h | 2 +- src/ballistica/game/game.cc | 17 -- src/ballistica/game/game.h | 5 - src/ballistica/game/host_activity.cc | 12 +- src/ballistica/game/host_activity.h | 4 +- src/ballistica/game/score_to_beat.h | 28 -- src/ballistica/game/session/client_session.cc | 4 +- src/ballistica/game/session/client_session.h | 2 +- src/ballistica/game/session/host_session.cc | 8 +- src/ballistica/game/session/host_session.h | 6 +- .../game/session/replay_client_session.cc | 4 +- src/ballistica/game/session/session.cc | 2 +- src/ballistica/game/session/session.h | 2 +- .../platform/apple/platform_apple.h | 2 - src/ballistica/platform/platform.cc | 32 +-- src/ballistica/platform/platform.h | 5 - .../python/class/python_class_node.cc | 6 +- .../python/methods/python_methods_app.cc | 6 +- .../python/methods/python_methods_gameplay.cc | 32 +-- .../python/methods/python_methods_system.cc | 2 +- src/ballistica/python/python.cc | 34 +-- src/ballistica/python/python.h | 4 - src/ballistica/python/python_sys.h | 8 +- src/ballistica/scene/node/node.cc | 6 +- src/ballistica/scene/scene.cc | 10 +- src/ballistica/scene/scene.h | 10 +- .../game_stream.cc => scene/scene_stream.cc} | 246 +++++++++--------- .../game_stream.h => scene/scene_stream.h} | 12 +- 71 files changed, 365 insertions(+), 607 deletions(-) delete mode 100644 src/ballistica/game/score_to_beat.h rename src/ballistica/{game/game_stream.cc => scene/scene_stream.cc} (82%) rename src/ballistica/{game/game_stream.h => scene/scene_stream.h} (96%) diff --git a/.efrocachemap b/.efrocachemap index 29edee20..64defef2 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,50 +3995,50 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/33/fa/2b4dc04a7e94af821486c0baaadd", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/39/c0/0a8c20d90b3bb0b605f56cf57cd6", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9d/9e/36bc9196a661b7ac730309363b25", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/78/61/3ee51d8c85ac897cb48326059f4f", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/41/24/ea579f7f46ee8764b99aa1f740e6", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d7/79/db7ba776fe53a432f501cc524f29", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/67/8c/fd54c4640fe9574c819eb93235de", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d0/23/0ed4f59b045bd996e9e8c3adac25", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/7b/7a/65e4a1a866aa716f339934316888", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/4c/96/40086b7256c6b69500231234816f", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/25/4e/65658e3b1137e29c26e5a250cb7f", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a4/d3/9e94f9f4a3f326ab3fb4563605e8", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/70/82/54ac546d3d6404259c025e4697a6", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/8c/71/35e658ed48d1732ac1ace9a651d0", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cb/c1/66f115696b5694b203d2a3e3f3b6", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/76/7e/ef8ca6f4baae2d3540658a43238e", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/e5/01/48f01b3bfb0e11dfa298809751d6", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/4e/35/3e14be7308b3b8a4d7ee00223d02", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/2f/8d/5bf66b9999ac4a0b109ce6a93ee9", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/6f/ba/6814ccb61a86032c381b59092b92", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e0/b3/7ccccfd8721033582cabdfe11f73", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c7/7c/11757954adb7da34c0e8cb6a6470", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/30/4e/361603ee5faf75168ddefd070b44", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b6/2e/e3bd12f2c9e7baa173479686485d", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1e/fe/0f73516a00159f6cd4b4791f010d", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/60/a4/f6798a377123b4f0ea58067173b9", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/60/0d/772009d20e18def687f6b76021f8", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ec/98/ca24d22fa6870cf2fa4b1dc81e2a", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ab/71/616a553794306a406be45697895c", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/41/14/bae7db8e7361d538096253c36792", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/91/5f/d2bfb2b30befdae9270a119d51b5", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d8/07/bd414612e9bf05f2a3c0b531a552", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/49/64/5943868e08758fc103e8ce70f334", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/1a/a9/bae1d4c1840d6e4c1931c529e4f8", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/22/a9/75669c9a475fc8080ce422ce2baa", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e1/87/95cbc6fc53e43e206f43eb3a1c61", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a4/1b/9a6145a32ef40fd3b8357cfbfb30", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/6a/a5/5afd24a1043a652af8ae76ec33ea", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/dd/3a/71c400bbac9edc5fa7b63e099ae7", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/dc/18/7e47d66f054e81314b39c14b26dc", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/43/25/36e8e8fc1eac369727f9639bbcf9", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e7/25/6fb628f1f5260834692bdeab63b0", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/86/d2/d18cbc017a7d64001f96718cc5ed", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/64/9b/78cdb9eda7b30611774769859caa", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8e/e5/cfbcc97e2b8c7ee46d0422e54380", "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/06/70/9e5becbdf873ea42fae9541dd123", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8e/1b/8a766948a66967084da94255ad51", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0d/18/6a515fce87613b2293a8f7bf1a35", "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a3/47/f46d4455e6ee1ebb397508495d90", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/54/ea/a250bddec2d7285ea5f4e9a29864", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/14/49/890119e5ff8800edf3b3cda113df", "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4c/32/de6296fdbd72d6a82d47a2403efd", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d2/1d/c111bdf386178fd46eff2c5a8cff", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3b/a5/e0aa43ca227c6bfa2ae8f44add14", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b5/6d/7506bdad0891a0e7cb6d04c6b018", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/95/bc/affcb077742c90c9d51fd2dc4274", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/cd/c2/72b9276880eddb6121542c052b1d", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c8/d2/5df66f66e26c1beb8a1e2b1f0613", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7e/57/593e8ceeee37a65972f1fb30d2cd", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2f/fc/a2ac394899e6527f8def0cad4d8a", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/b9/00/54be93a362cac005b111902cf725", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/cf/33/0aba47dbe0848b9a0fe65e3fe5ac", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/7f/a5/705f0b9b047d439d7b8805e684a1", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/e1/11/91da47c90faced11f80ce365e6ca", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/f0/47/fec8d08adc467bc46516ce39423a", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/c0/cb/36553e332fb3297e8f632387fdbb", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/a7/96/f19a4cc19386511d732533ead3d3", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/0c/23/5d5da73cd643d4fb344849768bf3", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/89/94/c90bb234585a62a097c6f6642e7d", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/39/2c/773ff4c64734bcd6205080a0563d", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0c/18/4a032d351000cf732bb7494d85f7", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4b/9d/be9915b6f1f1a0d83ae11885bd42", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/31/d2/e658b66d64c828f85d84a9b0d482", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/31/26/5c531133795d1381ced85e519b10", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/24/4f/c0a11a834ae10e9706bf92879d23", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a3/c6/d9b0509fe23a07de2ccee6ba1fd4", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/1b/93/23b7d341894fb875acaefe0804c5", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/86/e1/65b4096af71168842a99278708da", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/d8/91/3b918141edeaeb3034e558f54246", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/74/ff/12db4137ed498dbbffd892c5000f", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/41/0a/18695d2503c1062d7b2f47c88380", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/2d/59/5bd72f8f691f041059cab3df99d5", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/3b/63/7eeb46b7832e1135e58345866abf", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/89/e4/0b7890024077f73e328b20b543f5", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d" } \ No newline at end of file diff --git a/.idea/dictionaries/ericf.xml b/.idea/dictionaries/ericf.xml index 013a0841..06bafff1 100644 --- a/.idea/dictionaries/ericf.xml +++ b/.idea/dictionaries/ericf.xml @@ -433,6 +433,7 @@ clrhdr clrnames clrred + cmakelist cmakelists cmakeserver cmath diff --git a/CHANGELOG.md b/CHANGELOG.md index ccf592e0..41ea3be9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20806, api 7, 2022-09-10) +### 1.7.7 (build 20809, api 7, 2022-09-10) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. @@ -20,8 +20,9 @@ - There is now a `_bainternal.py` dummy-module alongside the existing `_ba.py` one. Be sure to exclude it from any script collections used by the game (the same as `_ba.py`). - Added checks to make sure _ba or _bainternal arent used outside of ba. Any 'internal' functionality needed outside of ba should be exposed through ba.internal. _ba and _bainternal are internal implementation details. - Removed C++ Module class and simplified Thread class. The Module class was an old relic of long ago before C++ had lambdas and its existence was pretty pointless and confusing these days. -- Renamed C++ App to AppFlavor and AppGlobals to App -- Renamed C++ Media to Assets +- Renamed C++ App to AppFlavor and AppGlobals to App. +- Renamed C++ Media to Assets. +- Removed 'scores to beat' list in coop which was only ever functional in limited cases on the Mac version. Perhaps that feature can reappear in a cross-platform way sometime. ### 1.7.6 (build 20687, api 7, 2022-08-11) - Cleaned up da MetaSubsystem code. diff --git a/Makefile b/Makefile index 53284308..59935c80 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,10 @@ help: # Set env-var BA_ENABLE_IRONY_BUILD_DB=1 to enable creating/updating a # cmake compile-commands database for use with irony for emacs (and possibly # other tools). +# FIXME - this can break if we move/rename files and then run 'make update' +# because it tries to use the previous cmakelist with the no-longer-valid +# filename *before* it updates the cmakelist. Need to rethink order of +# operations there. ifeq ($(BA_ENABLE_IRONY_BUILD_DB),1) PREREQ_IRONY = .cache/irony/compile_commands.json endif diff --git a/assets/src/ba_data/python/._bainternal_sources_hash b/assets/src/ba_data/python/._bainternal_sources_hash index 4f751038..1da66812 100644 --- a/assets/src/ba_data/python/._bainternal_sources_hash +++ b/assets/src/ba_data/python/._bainternal_sources_hash @@ -1 +1 @@ -319717366410279141138094934973337011486 \ No newline at end of file +174884230264825984620020844009502663721 \ No newline at end of file diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index bb1b9804..3b9fd900 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -38,7 +38,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20806 + expected_build = 20809 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/assets/src/ba_data/python/ba/_coopgame.py b/assets/src/ba_data/python/ba/_coopgame.py index ecae427b..6e380d84 100644 --- a/assets/src/ba_data/python/ba/_coopgame.py +++ b/assets/src/ba_data/python/ba/_coopgame.py @@ -55,19 +55,6 @@ class CoopGameActivity(GameActivity[PlayerType, TeamType]): # Preload achievement images in case we get some. _ba.timer(2.0, WeakCall(self._preload_achievements)) - # Let's ask the server for a 'time-to-beat' value. - levelname = self._get_coop_level_name() - campaign = self.session.campaign - assert campaign is not None - config_str = (str(len(self.players)) + 'p' + campaign.getlevel( - self.settings_raw['name']).get_score_version_string().replace( - ' ', '_')) - _ba.get_scores_to_beat(levelname, config_str, - WeakCall(self._on_got_scores_to_beat)) - - def _on_got_scores_to_beat(self, scores: list[dict[str, Any]]) -> None: - pass - def _show_standard_scores_to_beat_ui(self, scores: list[dict[str, Any]]) -> None: from efro.util import asserttype diff --git a/assets/src/ba_data/python/ba/internal.py b/assets/src/ba_data/python/ba/internal.py index d5b47820..fdf99803 100644 --- a/assets/src/ba_data/python/ba/internal.py +++ b/assets/src/ba_data/python/ba/internal.py @@ -9,16 +9,16 @@ defensively) in mods. from __future__ import annotations from _ba import ( - get_scores_to_beat, show_online_score_ui, set_ui_input_device, - is_party_icon_visible, getinputdevice, add_clean_frame_callback, - unlock_all_input, increment_analytics_count, set_debug_speed_exponent, - get_special_widget, get_qrcode_texture, get_string_height, - get_string_width, show_app_invite, appnameupper, lock_all_input, - open_file_externally, fade_screen, appname, have_incentivized_ad, - has_video_ads, workspaces_in_use, set_party_icon_always_visible, - connect_to_party, get_game_port, end_host_scanning, host_scan_cycle, - charstr, get_public_party_enabled, get_public_party_max_size, - set_public_party_name, set_public_party_max_size, set_authenticate_clients, + show_online_score_ui, set_ui_input_device, is_party_icon_visible, + getinputdevice, add_clean_frame_callback, unlock_all_input, + increment_analytics_count, set_debug_speed_exponent, get_special_widget, + get_qrcode_texture, get_string_height, get_string_width, show_app_invite, + appnameupper, lock_all_input, open_file_externally, fade_screen, appname, + have_incentivized_ad, has_video_ads, workspaces_in_use, + set_party_icon_always_visible, connect_to_party, get_game_port, + end_host_scanning, host_scan_cycle, charstr, get_public_party_enabled, + get_public_party_max_size, set_public_party_name, + set_public_party_max_size, set_authenticate_clients, set_public_party_enabled, reset_random_player_names, new_host_session, get_foreground_host_session, get_local_active_input_devices_count, get_ui_input_device, is_in_replay, set_replay_speed_exponent, @@ -78,7 +78,6 @@ from ba._internal import ( sign_out_v1, sign_in_v1, mark_config_dirty) __all__ = [ - 'get_scores_to_beat', 'show_online_score_ui', 'set_ui_input_device', 'is_party_icon_visible', diff --git a/assets/src/ba_data/python/bastd/activity/coopjoin.py b/assets/src/ba_data/python/bastd/activity/coopjoin.py index 3e60af76..b8cc8af5 100644 --- a/assets/src/ba_data/python/bastd/activity/coopjoin.py +++ b/assets/src/ba_data/python/bastd/activity/coopjoin.py @@ -10,7 +10,7 @@ import ba from ba.internal import JoinActivity if TYPE_CHECKING: - from typing import Any, Sequence + pass class CoopJoinActivity(JoinActivity): @@ -24,17 +24,6 @@ class CoopJoinActivity(JoinActivity): session = self.session assert isinstance(session, ba.CoopSession) - # Let's show a list of scores-to-beat for 1 player at least. - assert session.campaign is not None - level_name_full = (session.campaign.name + ':' + - session.campaign_level_name) - config_str = ('1p' + session.campaign.getlevel( - session.campaign_level_name).get_score_version_string().replace( - ' ', '_')) - ba.internal.get_scores_to_beat( - level_name_full, config_str, - ba.WeakCall(self._on_got_scores_to_beat)) - def on_transition_in(self) -> None: from bastd.actor.controlsguide import ControlsGuide from bastd.actor.text import Text @@ -53,143 +42,61 @@ class CoopJoinActivity(JoinActivity): position=(0, -95)).autoretain() ControlsGuide(delay=1.0).autoretain() - def _on_got_scores_to_beat(self, - scores: list[dict[str, Any]] | None) -> None: - # pylint: disable=too-many-locals - # pylint: disable=too-many-statements - from efro.util import asserttype - from bastd.actor.text import Text + ba.pushcall(self._show_remaining_achievements) - # Sort by originating date so that the most recent is first. - if scores is not None: - scores.sort(reverse=True, - key=lambda score: asserttype(score['time'], int)) + def _show_remaining_achievements(self) -> None: + from bastd.actor.text import Text # We only show achievements and challenges for CoopGameActivities. session = self.session assert isinstance(session, ba.CoopSession) gameinstance = session.get_current_game_instance() - if isinstance(gameinstance, ba.CoopGameActivity): - score_type = gameinstance.get_score_type() - if scores is not None: - achievement_challenges = [ - a for a in scores if a['type'] == 'achievement_challenge' - ] - score_challenges = [ - a for a in scores if a['type'] == 'score_challenge' - ] - else: - achievement_challenges = score_challenges = [] + if not isinstance(gameinstance, ba.CoopGameActivity): + return - delay = 1.0 - vpos = -140.0 - spacing = 25 - delay_inc = 0.1 + delay = 1.0 + vpos = -140.0 - def _add_t( - text: str | ba.Lstr, - h_offs: float = 0.0, - scale: float = 1.0, - color: Sequence[float] = (1.0, 1.0, 1.0, 0.46) - ) -> None: - Text(text, - scale=scale * 0.76, - h_align=Text.HAlign.LEFT, + # Now list our remaining achievements for this level. + assert self.session.campaign is not None + assert isinstance(self.session, ba.CoopSession) + levelname = (self.session.campaign.name + ':' + + self.session.campaign_level_name) + ts_h_offs = 60 + + if not (ba.app.demo_mode or ba.app.arcade_mode): + achievements = [ + a for a in ba.app.ach.achievements_for_coop_level(levelname) + if not a.complete + ] + have_achievements = bool(achievements) + achievements = [a for a in achievements if not a.complete] + vrmode = ba.app.vr_mode + if have_achievements: + Text(ba.Lstr(resource='achievementsRemainingText'), + host_only=True, + position=(ts_h_offs - 10, vpos), + transition=Text.Transition.FADE_IN, + scale=1.1 * 0.76, h_attach=Text.HAttach.LEFT, v_attach=Text.VAttach.TOP, - transition=Text.Transition.FADE_IN, - transition_delay=delay, - color=color, - position=(60 + h_offs, vpos)).autoretain() - - if score_challenges: - _add_t(ba.Lstr(value='${A}:', - subs=[('${A}', - ba.Lstr(resource='scoreChallengesText')) - ]), - scale=1.1) - delay += delay_inc - vpos -= spacing - for chal in score_challenges: - _add_t(str(chal['value'] if score_type == 'points' else ba. - timestring(int(chal['value']) * 10, - timeformat=ba.TimeFormat.MILLISECONDS - ).evaluate()) + ' (1 player)', - h_offs=30, - color=(0.9, 0.7, 1.0, 0.8)) - delay += delay_inc - vpos -= 0.6 * spacing - _add_t(chal['player'], - h_offs=40, - color=(0.8, 1, 0.8, 0.6), - scale=0.8) - delay += delay_inc - vpos -= 1.2 * spacing - vpos -= 0.5 * spacing - - if achievement_challenges: - _add_t(ba.Lstr( - value='${A}:', - subs=[('${A}', - ba.Lstr(resource='achievementChallengesText'))]), - scale=1.1) - delay += delay_inc - vpos -= spacing - for chal in achievement_challenges: - _add_t(str(chal['value']), - h_offs=30, - color=(0.9, 0.7, 1.0, 0.8)) - delay += delay_inc - vpos -= 0.6 * spacing - _add_t(chal['player'], - h_offs=40, - color=(0.8, 1, 0.8, 0.6), - scale=0.8) - delay += delay_inc - vpos -= 1.2 * spacing - vpos -= 0.5 * spacing - - # Now list our remaining achievements for this level. - assert self.session.campaign is not None - assert isinstance(self.session, ba.CoopSession) - levelname = (self.session.campaign.name + ':' + - self.session.campaign_level_name) - ts_h_offs = 60 - - if not (ba.app.demo_mode or ba.app.arcade_mode): - achievements = [ - a - for a in ba.app.ach.achievements_for_coop_level(levelname) - if not a.complete - ] - have_achievements = bool(achievements) - achievements = [a for a in achievements if not a.complete] - vrmode = ba.app.vr_mode - if have_achievements: - Text(ba.Lstr(resource='achievementsRemainingText'), + color=(1, 1, 1.2, 1) if vrmode else (0.8, 0.8, 1, 1), + shadow=1.0, + flatness=1.0 if vrmode else 0.6, + transition_delay=delay).autoretain() + hval = ts_h_offs + 50 + vpos -= 35 + for ach in achievements: + delay += 0.05 + ach.create_display(hval, vpos, delay, style='in_game') + vpos -= 55 + if not achievements: + Text(ba.Lstr(resource='noAchievementsRemainingText'), host_only=True, - position=(ts_h_offs - 10, vpos), + position=(ts_h_offs + 15, vpos + 10), transition=Text.Transition.FADE_IN, - scale=1.1 * 0.76, + scale=0.7, h_attach=Text.HAttach.LEFT, v_attach=Text.VAttach.TOP, - color=(1, 1, 1.2, 1) if vrmode else (0.8, 0.8, 1, 1), - shadow=1.0, - flatness=1.0 if vrmode else 0.6, - transition_delay=delay).autoretain() - hval = ts_h_offs + 50 - vpos -= 35 - for ach in achievements: - delay += 0.05 - ach.create_display(hval, vpos, delay, style='in_game') - vpos -= 55 - if not achievements: - Text(ba.Lstr(resource='noAchievementsRemainingText'), - host_only=True, - position=(ts_h_offs + 15, vpos + 10), - transition=Text.Transition.FADE_IN, - scale=0.7, - h_attach=Text.HAttach.LEFT, - v_attach=Text.VAttach.TOP, - color=(1, 1, 1, 0.5), - transition_delay=delay + 0.5).autoretain() + color=(1, 1, 1, 0.5), + transition_delay=delay + 0.5).autoretain() diff --git a/ballisticacore-cmake/.idea/dictionaries/ericf.xml b/ballisticacore-cmake/.idea/dictionaries/ericf.xml index 160953f7..597eda1d 100644 --- a/ballisticacore-cmake/.idea/dictionaries/ericf.xml +++ b/ballisticacore-cmake/.idea/dictionaries/ericf.xml @@ -230,6 +230,7 @@ clientinfo clienttobasn clipcount + cmakelist cmath cmds cmdvals diff --git a/ballisticacore-cmake/CMakeLists.txt b/ballisticacore-cmake/CMakeLists.txt index 68b79db8..34c4d99d 100644 --- a/ballisticacore-cmake/CMakeLists.txt +++ b/ballisticacore-cmake/CMakeLists.txt @@ -348,15 +348,12 @@ add_executable(ballisticacore ${BA_SRC_ROOT}/ballistica/game/friend_score_set.h ${BA_SRC_ROOT}/ballistica/game/game.cc ${BA_SRC_ROOT}/ballistica/game/game.h - ${BA_SRC_ROOT}/ballistica/game/game_stream.cc - ${BA_SRC_ROOT}/ballistica/game/game_stream.h ${BA_SRC_ROOT}/ballistica/game/host_activity.cc ${BA_SRC_ROOT}/ballistica/game/host_activity.h ${BA_SRC_ROOT}/ballistica/game/player.cc ${BA_SRC_ROOT}/ballistica/game/player.h ${BA_SRC_ROOT}/ballistica/game/player_spec.cc ${BA_SRC_ROOT}/ballistica/game/player_spec.h - ${BA_SRC_ROOT}/ballistica/game/score_to_beat.h ${BA_SRC_ROOT}/ballistica/game/session/client_session.cc ${BA_SRC_ROOT}/ballistica/game/session/client_session.h ${BA_SRC_ROOT}/ballistica/game/session/host_session.cc @@ -638,6 +635,8 @@ add_executable(ballisticacore ${BA_SRC_ROOT}/ballistica/scene/node/time_display_node.h ${BA_SRC_ROOT}/ballistica/scene/scene.cc ${BA_SRC_ROOT}/ballistica/scene/scene.h + ${BA_SRC_ROOT}/ballistica/scene/scene_stream.cc + ${BA_SRC_ROOT}/ballistica/scene/scene_stream.h ${BA_SRC_ROOT}/ballistica/ui/console.cc ${BA_SRC_ROOT}/ballistica/ui/console.h ${BA_SRC_ROOT}/ballistica/ui/root_ui.cc diff --git a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj index 82c02cee..3e188941 100644 --- a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj +++ b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj @@ -339,15 +339,12 @@ - - - @@ -629,6 +626,8 @@ + + diff --git a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters index 3644f340..ba9bcbbd 100644 --- a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters +++ b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters @@ -451,12 +451,6 @@ ballistica\game - - ballistica\game - - - ballistica\game - ballistica\game @@ -475,9 +469,6 @@ ballistica\game - - ballistica\game - ballistica\game\session @@ -1321,6 +1312,12 @@ ballistica\scene + + ballistica\scene + + + ballistica\scene + ballistica\ui diff --git a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj index cca83bf4..f99ff553 100644 --- a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj +++ b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj @@ -334,15 +334,12 @@ - - - @@ -624,6 +621,8 @@ + + diff --git a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters index 3644f340..ba9bcbbd 100644 --- a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters +++ b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters @@ -451,12 +451,6 @@ ballistica\game - - ballistica\game - - - ballistica\game - ballistica\game @@ -475,9 +469,6 @@ ballistica\game - - ballistica\game - ballistica\game\session @@ -1321,6 +1312,12 @@ ballistica\scene + + ballistica\scene + + + ballistica\scene + ballistica\ui diff --git a/src/ballistica/app/app_flavor.cc b/src/ballistica/app/app_flavor.cc index 37d59fc7..6d01350a 100644 --- a/src/ballistica/app/app_flavor.cc +++ b/src/ballistica/app/app_flavor.cc @@ -291,15 +291,6 @@ void AppFlavor::PushPurchaseAckCall(const std::string& purchase, [purchase, order_id] { g_platform->PurchaseAck(purchase, order_id); }); } -void AppFlavor::PushGetScoresToBeatCall(const std::string& level, - const std::string& config, - void* py_callback) { - thread()->PushCall([level, config, py_callback] { - assert(InMainThread()); - g_platform->GetScoresToBeat(level, config, py_callback); - }); -} - void AppFlavor::PushPurchaseCall(const std::string& item) { thread()->PushCall([item] { assert(InMainThread()); diff --git a/src/ballistica/app/app_flavor.h b/src/ballistica/app/app_flavor.h index 14688fb4..65fcb317 100644 --- a/src/ballistica/app/app_flavor.h +++ b/src/ballistica/app/app_flavor.h @@ -108,9 +108,6 @@ class AppFlavor { const std::string& game_version, int64_t score) -> void; auto PushAchievementReportCall(const std::string& achievement) -> void; - auto PushGetScoresToBeatCall(const std::string& level, - const std::string& config, void* py_callback) - -> void; auto PushOpenURLCall(const std::string& url) -> void; auto PushStringEditCall(const std::string& name, const std::string& value, int max_chars) -> void; diff --git a/src/ballistica/assets/component/collide_model.cc b/src/ballistica/assets/component/collide_model.cc index b86d5778..99435d4f 100644 --- a/src/ballistica/assets/component/collide_model.cc +++ b/src/ballistica/assets/component/collide_model.cc @@ -2,9 +2,9 @@ #include "ballistica/assets/component/collide_model.h" -#include "ballistica/game/game_stream.h" #include "ballistica/python/class/python_class_collide_model.h" #include "ballistica/scene/scene.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { @@ -12,7 +12,7 @@ CollideModel::CollideModel(const std::string& name, Scene* scene) : AssetComponent(name, scene), dead_(false) { assert(InLogicThread()); if (scene) { - if (GameStream* os = scene->GetGameStream()) { + if (SceneStream* os = scene->GetSceneStream()) { os->AddCollideModel(this); } } @@ -30,7 +30,7 @@ void CollideModel::MarkDead() { return; } if (Scene* s = scene()) { - if (GameStream* os = s->GetGameStream()) { + if (SceneStream* os = s->GetSceneStream()) { os->RemoveCollideModel(this); } } diff --git a/src/ballistica/assets/component/data.cc b/src/ballistica/assets/component/data.cc index 1f760ebb..17b23702 100644 --- a/src/ballistica/assets/component/data.cc +++ b/src/ballistica/assets/component/data.cc @@ -2,9 +2,9 @@ #include "ballistica/assets/component/data.h" -#include "ballistica/game/game_stream.h" #include "ballistica/python/class/python_class_data.h" #include "ballistica/scene/scene.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { @@ -13,7 +13,7 @@ Data::Data(const std::string& name, Scene* scene) assert(InLogicThread()); if (scene) { - if (GameStream* os = scene->GetGameStream()) { + if (SceneStream* os = scene->GetSceneStream()) { os->AddData(this); } } @@ -31,7 +31,7 @@ void Data::MarkDead() { return; } if (Scene* s = scene()) { - if (GameStream* os = s->GetGameStream()) { + if (SceneStream* os = s->GetSceneStream()) { os->RemoveData(this); } } diff --git a/src/ballistica/assets/component/model.cc b/src/ballistica/assets/component/model.cc index 88679733..196ebbf6 100644 --- a/src/ballistica/assets/component/model.cc +++ b/src/ballistica/assets/component/model.cc @@ -2,9 +2,9 @@ #include "ballistica/assets/component/model.h" -#include "ballistica/game/game_stream.h" #include "ballistica/python/class/python_class_model.h" #include "ballistica/scene/scene.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { @@ -13,7 +13,7 @@ Model::Model(const std::string& name, Scene* scene) assert(InLogicThread()); if (scene) { - if (GameStream* os = scene->GetGameStream()) { + if (SceneStream* os = scene->GetSceneStream()) { os->AddModel(this); } } @@ -31,7 +31,7 @@ void Model::MarkDead() { return; } if (Scene* s = scene()) { - if (GameStream* os = s->GetGameStream()) { + if (SceneStream* os = s->GetSceneStream()) { os->RemoveModel(this); } } diff --git a/src/ballistica/assets/component/sound.cc b/src/ballistica/assets/component/sound.cc index 7f4962df..9c76aba2 100644 --- a/src/ballistica/assets/component/sound.cc +++ b/src/ballistica/assets/component/sound.cc @@ -4,9 +4,9 @@ #include "ballistica/assets/assets.h" #include "ballistica/assets/data/sound_data.h" -#include "ballistica/game/game_stream.h" #include "ballistica/python/class/python_class_sound.h" #include "ballistica/scene/scene.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { @@ -14,7 +14,7 @@ Sound::Sound(const std::string& name, Scene* scene) : AssetComponent(name, scene) { assert(InLogicThread()); if (scene) { - if (GameStream* os = scene->GetGameStream()) { + if (SceneStream* os = scene->GetSceneStream()) { os->AddSound(this); } } @@ -30,7 +30,7 @@ Sound::~Sound() { MarkDead(); } void Sound::MarkDead() { if (dead_) return; if (Scene* s = scene()) { - if (GameStream* os = s->GetGameStream()) { + if (SceneStream* os = s->GetSceneStream()) { os->RemoveSound(this); } } diff --git a/src/ballistica/assets/component/texture.cc b/src/ballistica/assets/component/texture.cc index 4a350773..52994fdb 100644 --- a/src/ballistica/assets/component/texture.cc +++ b/src/ballistica/assets/component/texture.cc @@ -2,10 +2,10 @@ #include "ballistica/assets/component/texture.h" -#include "ballistica/game/game_stream.h" #include "ballistica/graphics/renderer.h" #include "ballistica/python/class/python_class_texture.h" #include "ballistica/scene/scene.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { @@ -15,7 +15,7 @@ Texture::Texture(const std::string& name, Scene* scene) // Add to the provided scene to get a numeric ID. if (scene) { - if (GameStream* os = scene->GetGameStream()) { + if (SceneStream* os = scene->GetSceneStream()) { os->AddTexture(this); } } @@ -43,7 +43,7 @@ void Texture::MarkDead() { return; } if (Scene* s = scene()) { - if (GameStream* os = s->GetGameStream()) { + if (SceneStream* os = s->GetSceneStream()) { os->RemoveTexture(this); } } diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index e0d92007..57429cf6 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -23,7 +23,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20806; +const int kAppBuildNumber = 20809; const char* kAppVersion = "1.7.7"; // Our standalone globals. diff --git a/src/ballistica/core/types.h b/src/ballistica/core/types.h index b6d1d74d..fcc3ad19 100644 --- a/src/ballistica/core/types.h +++ b/src/ballistica/core/types.h @@ -131,7 +131,6 @@ class NodeAttributeConnection; class NodeAttributeUnbound; class Object; class ObjectComponent; -class GameStream; class Part; class Python; class Platform; @@ -163,6 +162,7 @@ class RootUI; class RootWidget; class Runnable; class Scene; +class SceneStream; class ScoreToBeat; class SDLApp; class SDLContext; diff --git a/src/ballistica/dynamics/material/impact_sound_material_action.cc b/src/ballistica/dynamics/material/impact_sound_material_action.cc index fa06c9ea..b0eb9871 100644 --- a/src/ballistica/dynamics/material/impact_sound_material_action.cc +++ b/src/ballistica/dynamics/material/impact_sound_material_action.cc @@ -4,10 +4,10 @@ #include "ballistica/dynamics/dynamics.h" #include "ballistica/dynamics/material/material_context.h" -#include "ballistica/game/game_stream.h" #include "ballistica/game/session/client_session.h" #include "ballistica/generic/utils.h" #include "ballistica/graphics/graphics_server.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { @@ -17,7 +17,7 @@ auto ImpactSoundMaterialAction::GetFlattenedSize() -> size_t { } void ImpactSoundMaterialAction::Flatten(char** buffer, - GameStream* output_stream) { + SceneStream* output_stream) { assert(sounds.size() < 100); auto sound_count{static_cast(sounds.size())}; Utils::EmbedInt8(buffer, sound_count); diff --git a/src/ballistica/dynamics/material/impact_sound_material_action.h b/src/ballistica/dynamics/material/impact_sound_material_action.h index f7d18f9f..c3b2398a 100644 --- a/src/ballistica/dynamics/material/impact_sound_material_action.h +++ b/src/ballistica/dynamics/material/impact_sound_material_action.h @@ -26,7 +26,7 @@ class ImpactSoundMaterialAction : public MaterialAction { const Object::Ref& p) override; auto GetType() const -> Type override { return Type::IMPACT_SOUND; } auto GetFlattenedSize() -> size_t override; - void Flatten(char** buffer, GameStream* output_stream) override; + void Flatten(char** buffer, SceneStream* output_stream) override; void Restore(const char** buffer, ClientSession* cs) override; private: diff --git a/src/ballistica/dynamics/material/material.cc b/src/ballistica/dynamics/material/material.cc index 397f295c..4a6e07a5 100644 --- a/src/ballistica/dynamics/material/material.cc +++ b/src/ballistica/dynamics/material/material.cc @@ -5,9 +5,9 @@ // #include "ballistica/dynamics/material/material_action.h" #include "ballistica/dynamics/material/material_component.h" #include "ballistica/dynamics/material/material_condition_node.h" -#include "ballistica/game/game_stream.h" #include "ballistica/python/python_sys.h" #include "ballistica/scene/scene.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { @@ -16,7 +16,7 @@ Material::Material(std::string name_in, Scene* scene) // If we're being made in a scene with an output stream, // write ourself to it. assert(scene); - if (GameStream* os = scene->GetGameStream()) { + if (SceneStream* os = scene->GetSceneStream()) { os->AddMaterial(this); } } @@ -30,7 +30,7 @@ void Material::MarkDead() { // If we're in a scene with an output-stream, inform them of our demise. Scene* scene = scene_.get(); if (scene) { - if (GameStream* os = scene->GetGameStream()) { + if (SceneStream* os = scene->GetSceneStream()) { os->RemoveMaterial(this); } } @@ -62,13 +62,13 @@ void Material::Apply(MaterialContext* s, const Part* src_part, void Material::AddComponent(const Object::Ref& c) { // If there's an output stream, push this to that first - if (GameStream* output_stream = scene()->GetGameStream()) { + if (SceneStream* output_stream = scene()->GetSceneStream()) { output_stream->AddMaterialComponent(this, c.get()); } components_.push_back(c); } -void Material::DumpComponents(GameStream* out) { +void Material::DumpComponents(SceneStream* out) { for (auto& i : components_) { assert(i.exists()); out->AddMaterialComponent(this, i.get()); diff --git a/src/ballistica/dynamics/material/material.h b/src/ballistica/dynamics/material/material.h index 85b5c7a4..a8f86199 100644 --- a/src/ballistica/dynamics/material/material.h +++ b/src/ballistica/dynamics/material/material.h @@ -30,7 +30,7 @@ class Material : public Object { auto BorrowPyRef() -> PyObject* { return GetPyRef(false); } void MarkDead(); auto scene() const -> Scene* { return scene_.get(); } - void DumpComponents(GameStream* out); + void DumpComponents(SceneStream* out); auto stream_id() const -> int64_t { return stream_id_; } void set_stream_id(int64_t val) { assert(stream_id_ == -1); diff --git a/src/ballistica/dynamics/material/material_action.h b/src/ballistica/dynamics/material/material_action.h index 443992fb..b722bf73 100644 --- a/src/ballistica/dynamics/material/material_action.h +++ b/src/ballistica/dynamics/material/material_action.h @@ -28,7 +28,7 @@ class MaterialAction : public Object { const Object::Ref& p) = 0; virtual void Execute(Node* node1, Node* node2, Scene* scene) {} virtual auto GetFlattenedSize() -> size_t { return 0; } - virtual void Flatten(char** buffer, GameStream* output_stream) {} + virtual void Flatten(char** buffer, SceneStream* output_stream) {} virtual void Restore(const char** buffer, ClientSession* cs) {} auto IsNeededOnClient() -> bool { switch (GetType()) { diff --git a/src/ballistica/dynamics/material/material_component.cc b/src/ballistica/dynamics/material/material_component.cc index 6e7fb561..e211ff15 100644 --- a/src/ballistica/dynamics/material/material_component.cc +++ b/src/ballistica/dynamics/material/material_component.cc @@ -143,7 +143,7 @@ auto MaterialComponent::GetFlattenedSize() -> size_t { return size; } -void MaterialComponent::Flatten(char** buffer, GameStream* output_stream) { +void MaterialComponent::Flatten(char** buffer, SceneStream* output_stream) { // Embed a byte telling whether we have conditions. Utils::EmbedInt8(buffer, conditions.exists()); diff --git a/src/ballistica/dynamics/material/material_component.h b/src/ballistica/dynamics/material/material_component.h index a7ec3abf..cdc426f6 100644 --- a/src/ballistica/dynamics/material/material_component.h +++ b/src/ballistica/dynamics/material/material_component.h @@ -18,7 +18,7 @@ class MaterialComponent : public Object { } auto GetFlattenedSize() -> size_t; - void Flatten(char** buffer, GameStream* output_stream); + void Flatten(char** buffer, SceneStream* output_stream); void Restore(const char** buffer, ClientSession* cs); // Actions are stored as shared pointers so references diff --git a/src/ballistica/dynamics/material/material_condition_node.cc b/src/ballistica/dynamics/material/material_condition_node.cc index 895c9f07..6fb5a663 100644 --- a/src/ballistica/dynamics/material/material_condition_node.cc +++ b/src/ballistica/dynamics/material/material_condition_node.cc @@ -3,9 +3,9 @@ #include "ballistica/dynamics/material/material_condition_node.h" #include "ballistica/dynamics/material/material.h" -#include "ballistica/game/game_stream.h" #include "ballistica/game/session/client_session.h" #include "ballistica/generic/utils.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { @@ -22,7 +22,7 @@ auto MaterialConditionNode::GetFlattenedSize() -> size_t { return size; } -void MaterialConditionNode::Flatten(char** buffer, GameStream* output_stream) { +void MaterialConditionNode::Flatten(char** buffer, SceneStream* output_stream) { // Pack our opmode in. Or if we're a leaf note stick zero in. Utils::EmbedInt8(buffer, static_cast(opmode)); if (opmode == OpMode::LEAF_NODE) { diff --git a/src/ballistica/dynamics/material/material_condition_node.h b/src/ballistica/dynamics/material/material_condition_node.h index 0764bf31..dc6ea0b5 100644 --- a/src/ballistica/dynamics/material/material_condition_node.h +++ b/src/ballistica/dynamics/material/material_condition_node.h @@ -50,7 +50,7 @@ class MaterialConditionNode : public Object { } } auto GetFlattenedSize() -> size_t; - void Flatten(char** buffer, GameStream* output_stream); + void Flatten(char** buffer, SceneStream* output_stream); void Restore(const char** buffer, ClientSession* cs); }; diff --git a/src/ballistica/dynamics/material/node_message_material_action.h b/src/ballistica/dynamics/material/node_message_material_action.h index eb1ecd85..64eae91c 100644 --- a/src/ballistica/dynamics/material/node_message_material_action.h +++ b/src/ballistica/dynamics/material/node_message_material_action.h @@ -27,7 +27,7 @@ class NodeMessageMaterialAction : public MaterialAction { // 1 byte for bools + data return static_cast(1 + data.GetFlattenedSize()); } - void Flatten(char** buffer, GameStream* output_stream) override { + void Flatten(char** buffer, SceneStream* output_stream) override { Utils::EmbedBools(buffer, target_other, at_disconnect); data.embed(buffer); } diff --git a/src/ballistica/dynamics/material/node_mod_material_action.cc b/src/ballistica/dynamics/material/node_mod_material_action.cc index 9e799a45..0e207f45 100644 --- a/src/ballistica/dynamics/material/node_mod_material_action.cc +++ b/src/ballistica/dynamics/material/node_mod_material_action.cc @@ -13,7 +13,7 @@ auto NodeModMaterialAction::GetType() const -> MaterialAction::Type { auto NodeModMaterialAction::GetFlattenedSize() -> size_t { return 1 + 4; } -void NodeModMaterialAction::Flatten(char** buffer, GameStream* output_stream) { +void NodeModMaterialAction::Flatten(char** buffer, SceneStream* output_stream) { Utils::EmbedInt8(buffer, static_cast(attr)); Utils::EmbedFloat32(buffer, attr_val); } diff --git a/src/ballistica/dynamics/material/node_mod_material_action.h b/src/ballistica/dynamics/material/node_mod_material_action.h index 27fd9a3d..77902e5f 100644 --- a/src/ballistica/dynamics/material/node_mod_material_action.h +++ b/src/ballistica/dynamics/material/node_mod_material_action.h @@ -19,7 +19,7 @@ class NodeModMaterialAction : public MaterialAction { const Object::Ref& p) override; auto GetType() const -> Type override; auto GetFlattenedSize() -> size_t override; - void Flatten(char** buffer, GameStream* output_stream) override; + void Flatten(char** buffer, SceneStream* output_stream) override; void Restore(const char** buffer, ClientSession* cs) override; }; diff --git a/src/ballistica/dynamics/material/part_mod_material_action.cc b/src/ballistica/dynamics/material/part_mod_material_action.cc index 95599bc4..62a18200 100644 --- a/src/ballistica/dynamics/material/part_mod_material_action.cc +++ b/src/ballistica/dynamics/material/part_mod_material_action.cc @@ -13,7 +13,7 @@ auto PartModMaterialAction::GetType() const -> MaterialAction::Type { auto PartModMaterialAction::GetFlattenedSize() -> size_t { return 1 + 4; } -void PartModMaterialAction::Flatten(char** buffer, GameStream* output_stream) { +void PartModMaterialAction::Flatten(char** buffer, SceneStream* output_stream) { Utils::EmbedInt8(buffer, static_cast(attr)); Utils::EmbedFloat32(buffer, attr_val); } diff --git a/src/ballistica/dynamics/material/part_mod_material_action.h b/src/ballistica/dynamics/material/part_mod_material_action.h index 151e0dde..f192e59d 100644 --- a/src/ballistica/dynamics/material/part_mod_material_action.h +++ b/src/ballistica/dynamics/material/part_mod_material_action.h @@ -19,7 +19,7 @@ class PartModMaterialAction : public MaterialAction { const Object::Ref& p) override; auto GetType() const -> Type override; auto GetFlattenedSize() -> size_t override; - void Flatten(char** buffer, GameStream* output_stream) override; + void Flatten(char** buffer, SceneStream* output_stream) override; void Restore(const char** buffer, ClientSession* cs) override; }; diff --git a/src/ballistica/dynamics/material/roll_sound_material_action.cc b/src/ballistica/dynamics/material/roll_sound_material_action.cc index 9d371db1..b9969a3b 100644 --- a/src/ballistica/dynamics/material/roll_sound_material_action.cc +++ b/src/ballistica/dynamics/material/roll_sound_material_action.cc @@ -5,17 +5,17 @@ #include "ballistica/assets/component/sound.h" #include "ballistica/dynamics/dynamics.h" #include "ballistica/dynamics/material/material_context.h" -#include "ballistica/game/game_stream.h" #include "ballistica/game/session/client_session.h" #include "ballistica/generic/utils.h" #include "ballistica/graphics/graphics_server.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { auto RollSoundMaterialAction::GetFlattenedSize() -> size_t { return 4 + 2 + 2; } void RollSoundMaterialAction::Flatten(char** buffer, - GameStream* output_stream) { + SceneStream* output_stream) { Utils::EmbedInt32NBO(buffer, static_cast_check_fit( output_stream->GetSoundID(sound.get()))); Utils::EmbedFloat16NBO(buffer, target_impulse); diff --git a/src/ballistica/dynamics/material/roll_sound_material_action.h b/src/ballistica/dynamics/material/roll_sound_material_action.h index 691c9298..88e25b80 100644 --- a/src/ballistica/dynamics/material/roll_sound_material_action.h +++ b/src/ballistica/dynamics/material/roll_sound_material_action.h @@ -24,7 +24,7 @@ class RollSoundMaterialAction : public MaterialAction { const Object::Ref& p) override; auto GetType() const -> Type override { return Type::ROLL_SOUND; } auto GetFlattenedSize() -> size_t override; - void Flatten(char** buffer, GameStream* output_stream) override; + void Flatten(char** buffer, SceneStream* output_stream) override; void Restore(const char** buffer, ClientSession* cs) override; }; diff --git a/src/ballistica/dynamics/material/skid_sound_material_action.cc b/src/ballistica/dynamics/material/skid_sound_material_action.cc index b608355c..652bfe29 100644 --- a/src/ballistica/dynamics/material/skid_sound_material_action.cc +++ b/src/ballistica/dynamics/material/skid_sound_material_action.cc @@ -4,17 +4,17 @@ #include "ballistica/dynamics/dynamics.h" #include "ballistica/dynamics/material/material_context.h" -#include "ballistica/game/game_stream.h" #include "ballistica/game/session/client_session.h" #include "ballistica/generic/utils.h" #include "ballistica/graphics/graphics_server.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { auto SkidSoundMaterialAction::GetFlattenedSize() -> size_t { return 4 + 2 + 2; } void SkidSoundMaterialAction::Flatten(char** buffer, - GameStream* output_stream) { + SceneStream* output_stream) { Utils::EmbedInt32NBO(buffer, static_cast_check_fit( output_stream->GetSoundID(sound.get()))); Utils::EmbedFloat16NBO(buffer, target_impulse); diff --git a/src/ballistica/dynamics/material/skid_sound_material_action.h b/src/ballistica/dynamics/material/skid_sound_material_action.h index 3bfe9058..63723629 100644 --- a/src/ballistica/dynamics/material/skid_sound_material_action.h +++ b/src/ballistica/dynamics/material/skid_sound_material_action.h @@ -24,7 +24,7 @@ class SkidSoundMaterialAction : public MaterialAction { const Object::Ref& p) override; auto GetType() const -> Type override { return Type::SKID_SOUND; } auto GetFlattenedSize() -> size_t override; - void Flatten(char** buffer, GameStream* output_stream) override; + void Flatten(char** buffer, SceneStream* output_stream) override; void Restore(const char** buffer, ClientSession* cs) override; }; diff --git a/src/ballistica/dynamics/material/sound_material_action.cc b/src/ballistica/dynamics/material/sound_material_action.cc index db5bd6b7..9b9221b0 100644 --- a/src/ballistica/dynamics/material/sound_material_action.cc +++ b/src/ballistica/dynamics/material/sound_material_action.cc @@ -3,9 +3,9 @@ #include "ballistica/dynamics/material/sound_material_action.h" #include "ballistica/dynamics/material/material_context.h" -#include "ballistica/game/game_stream.h" #include "ballistica/game/session/client_session.h" #include "ballistica/generic/utils.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { @@ -18,7 +18,7 @@ void SoundMaterialAction::Apply(MaterialContext* context, const Part* src_part, auto SoundMaterialAction::GetFlattenedSize() -> size_t { return 4 + 2; } -void SoundMaterialAction::Flatten(char** buffer, GameStream* output_stream) { +void SoundMaterialAction::Flatten(char** buffer, SceneStream* output_stream) { Utils::EmbedInt32NBO(buffer, static_cast_check_fit( output_stream->GetSoundID(sound_.get()))); Utils::EmbedFloat16NBO(buffer, volume_); diff --git a/src/ballistica/dynamics/material/sound_material_action.h b/src/ballistica/dynamics/material/sound_material_action.h index 8d7a0bc7..8e6089b5 100644 --- a/src/ballistica/dynamics/material/sound_material_action.h +++ b/src/ballistica/dynamics/material/sound_material_action.h @@ -19,7 +19,7 @@ class SoundMaterialAction : public MaterialAction { const Object::Ref& p) override; auto GetType() const -> Type override { return Type::SOUND; } auto GetFlattenedSize() -> size_t override; - void Flatten(char** buffer, GameStream* output_stream) override; + void Flatten(char** buffer, SceneStream* output_stream) override; void Restore(const char** buffer, ClientSession* cs) override; private: diff --git a/src/ballistica/game/game.cc b/src/ballistica/game/game.cc index 07ac3ec9..b2c57cab 100644 --- a/src/ballistica/game/game.cc +++ b/src/ballistica/game/game.cc @@ -13,7 +13,6 @@ #include "ballistica/game/friend_score_set.h" #include "ballistica/game/host_activity.h" #include "ballistica/game/player.h" -#include "ballistica/game/score_to_beat.h" #include "ballistica/game/session/client_session.h" #include "ballistica/game/session/host_session.h" #include "ballistica/game/session/net_client_session.h" @@ -1171,22 +1170,6 @@ void Game::GameServiceAchievementList( g_app_internal->DispatchRemoteAchievementList(achievements); } -void Game::PushScoresToBeatResponseCall(bool success, - const std::list& scores, - void* py_callback) { - thread()->PushCall([this, success, scores, py_callback] { - ScoresToBeatResponse(success, scores, py_callback); - }); -} - -void Game::ScoresToBeatResponse(bool success, - const std::list& scores, - void* py_callback) { - assert(g_python); - assert(InLogicThread()); - g_python->DispatchScoresToBeatResponse(success, scores, py_callback); -} - void Game::PushPlaySoundCall(SystemSoundID sound) { thread()->PushCall( [sound] { g_audio->PlaySound(g_assets->GetSound(sound)); }); diff --git a/src/ballistica/game/game.h b/src/ballistica/game/game.h index 226e451f..5c4cbf7d 100644 --- a/src/ballistica/game/game.h +++ b/src/ballistica/game/game.h @@ -54,9 +54,6 @@ class Game { auto PushGameServiceAchievementListCall( const std::set& achievements) -> void; - auto PushScoresToBeatResponseCall(bool success, - const std::list& scores, - void* py_callback) -> void; auto PushToggleCollisionGeometryDisplayCall() -> void; auto PushToggleDebugInfoDisplayCall() -> void; auto PushToggleManualCameraCall() -> void; @@ -256,8 +253,6 @@ class Game { float pixel_width, float pixel_height) -> void; auto GameServiceAchievementList(const std::set& achievements) -> void; - auto ScoresToBeatResponse(bool success, const std::list& scores, - void* py_callback) -> void; auto PruneMedia() -> void; auto Update() -> void; diff --git a/src/ballistica/game/host_activity.cc b/src/ballistica/game/host_activity.cc index 82a83bd0..850a5886 100644 --- a/src/ballistica/game/host_activity.cc +++ b/src/ballistica/game/host_activity.cc @@ -8,7 +8,6 @@ #include "ballistica/assets/component/sound.h" #include "ballistica/assets/component/texture.h" #include "ballistica/dynamics/material/material.h" -#include "ballistica/game/game_stream.h" #include "ballistica/game/player.h" #include "ballistica/game/session/host_session.h" #include "ballistica/generic/lambda_runnable.h" @@ -19,6 +18,7 @@ #include "ballistica/python/python_sys.h" #include "ballistica/scene/node/globals_node.h" #include "ballistica/scene/node/node_type.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { @@ -36,7 +36,7 @@ HostActivity::HostActivity(HostSession* host_session) { scene_ = Object::New(0); // If there's an output stream, add to it. - if (GameStream* out = host_session->GetGameStream()) { + if (SceneStream* out = host_session->GetSceneStream()) { out->AddScene(scene_.get()); } } @@ -110,9 +110,9 @@ HostActivity::~HostActivity() { } } -auto HostActivity::GetGameStream() const -> GameStream* { +auto HostActivity::GetSceneStream() const -> SceneStream* { if (!host_session_.exists()) return nullptr; - return host_session_->GetGameStream(); + return host_session_->GetSceneStream(); } auto HostActivity::SetGlobalsNode(GlobalsNode* node) -> void { @@ -314,7 +314,7 @@ void HostActivity::SetIsForeground(bool val) { g_game->SetForegroundScene(sg); // Also push it to clients. - if (GameStream* out = GetGameStream()) { + if (SceneStream* out = GetSceneStream()) { out->SetForegroundScene(scene_.get()); } } @@ -433,7 +433,7 @@ void HostActivity::Draw(FrameDef* frame_def) { scene()->Draw(frame_def); } -void HostActivity::DumpFullState(GameStream* out) { +void HostActivity::DumpFullState(SceneStream* out) { // Add our scene. if (scene_.exists()) { scene_->Dump(out); diff --git a/src/ballistica/game/host_activity.h b/src/ballistica/game/host_activity.h index 4aebc6a2..c42edeb2 100644 --- a/src/ballistica/game/host_activity.h +++ b/src/ballistica/game/host_activity.h @@ -69,8 +69,8 @@ class HostActivity : public ContextTarget { auto getAllowKickIdlePlayers() const -> bool { return allow_kick_idle_players_; } - auto GetGameStream() const -> GameStream*; - auto DumpFullState(GameStream* out) -> void; + auto GetSceneStream() const -> SceneStream*; + auto DumpFullState(SceneStream* out) -> void; auto SetGlobalsNode(GlobalsNode* node) -> void; auto SetIsForeground(bool val) -> void; auto RegisterPyActivity(PyObject* pyActivity) -> void; diff --git a/src/ballistica/game/score_to_beat.h b/src/ballistica/game/score_to_beat.h deleted file mode 100644 index 39b084b8..00000000 --- a/src/ballistica/game/score_to_beat.h +++ /dev/null @@ -1,28 +0,0 @@ -// Released under the MIT License. See LICENSE for details. - -#ifndef BALLISTICA_GAME_SCORE_TO_BEAT_H_ -#define BALLISTICA_GAME_SCORE_TO_BEAT_H_ - -#include -#include - -namespace ballistica { - -// Do we still need this? -class ScoreToBeat { - public: - ScoreToBeat(std::string player_in, std::string type_in, std::string value_in, - double timeIn) - : player(std::move(player_in)), - type(std::move(type_in)), - value(std::move(value_in)), - time(timeIn) {} - std::string player; - std::string type; - std::string value; - double time; -}; - -} // namespace ballistica - -#endif // BALLISTICA_GAME_SCORE_TO_BEAT_H_ diff --git a/src/ballistica/game/session/client_session.cc b/src/ballistica/game/session/client_session.cc index 4cd0d1b6..b1b4994c 100644 --- a/src/ballistica/game/session/client_session.cc +++ b/src/ballistica/game/session/client_session.cc @@ -14,13 +14,13 @@ #include "ballistica/dynamics/material/material_component.h" #include "ballistica/dynamics/material/material_condition_node.h" #include "ballistica/dynamics/rigid_body.h" -#include "ballistica/game/game_stream.h" #include "ballistica/graphics/graphics.h" #include "ballistica/networking/networking.h" #include "ballistica/python/python.h" #include "ballistica/scene/node/node_attribute.h" #include "ballistica/scene/node/node_type.h" #include "ballistica/scene/scene.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { @@ -1063,7 +1063,7 @@ void ClientSession::GetCorrectionMessages( } } -void ClientSession::DumpFullState(GameStream* out) { +void ClientSession::DumpFullState(SceneStream* out) { // Add all scenes. for (auto&& i : scenes()) { if (Scene* sg = i.get()) { diff --git a/src/ballistica/game/session/client_session.h b/src/ballistica/game/session/client_session.h index 6d01a8b3..4779a269 100644 --- a/src/ballistica/game/session/client_session.h +++ b/src/ballistica/game/session/client_session.h @@ -86,7 +86,7 @@ class ClientSession : public Session { virtual auto FetchMessages() -> void {} virtual void Error(const std::string& description); void End(); - void DumpFullState(GameStream* out) override; + void DumpFullState(SceneStream* out) override; /// Reset target base time to equal current. This can be used during command /// buffer underruns to cause playback to pause momentarily instead of diff --git a/src/ballistica/game/session/host_session.cc b/src/ballistica/game/session/host_session.cc index 21035c87..2a35b169 100644 --- a/src/ballistica/game/session/host_session.cc +++ b/src/ballistica/game/session/host_session.cc @@ -6,7 +6,6 @@ #include "ballistica/assets/component/model.h" #include "ballistica/assets/component/sound.h" #include "ballistica/assets/component/texture.h" -#include "ballistica/game/game_stream.h" #include "ballistica/game/host_activity.h" #include "ballistica/game/player.h" #include "ballistica/generic/lambda_runnable.h" @@ -17,6 +16,7 @@ #include "ballistica/python/python_command.h" #include "ballistica/python/python_context_call.h" #include "ballistica/python/python_sys.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { @@ -51,7 +51,7 @@ HostSession::HostSession(PyObject* session_type_obj) do_replay = false; } - output_stream_ = Object::New(this, do_replay); + output_stream_ = Object::New(this, do_replay); // Make a scene for our session-level nodes, etc. scene_ = Object::New(0); @@ -499,7 +499,7 @@ void HostSession::Update(int time_advance) { ProcessPlayerTimeOuts(); - GameStream* output_stream = GetGameStream(); + SceneStream* output_stream = GetSceneStream(); // Advance base time by the specified amount, // firing all timers along the way. @@ -656,7 +656,7 @@ auto HostSession::GetUnusedPlayerName(Player* p, const std::string& base_name) return name_test; } -void HostSession::DumpFullState(GameStream* out) { +void HostSession::DumpFullState(SceneStream* out) { // Add session-scene. if (scene_.exists()) { scene_->Dump(out); diff --git a/src/ballistica/game/session/host_session.h b/src/ballistica/game/session/host_session.h index e594e52d..2f5e7546 100644 --- a/src/ballistica/game/session/host_session.h +++ b/src/ballistica/game/session/host_session.h @@ -64,11 +64,11 @@ class HostSession : public Session { return scene_.get(); } void RegisterCall(PythonContextCall* call); - auto GetGameStream() const -> GameStream* { return output_stream_.get(); } + auto GetSceneStream() const -> SceneStream* { return output_stream_.get(); } auto is_main_menu() const -> bool { return is_main_menu_; } // fixme remove this - void DumpFullState(GameStream* out) override; + void DumpFullState(SceneStream* out) override; void GetCorrectionMessages(bool blend, std::vector >* messages); auto base_time() const -> millisecs_t { return base_time_; } @@ -98,7 +98,7 @@ class HostSession : public Session { void IssuePlayerLeft(Player* player); bool is_main_menu_; // FIXME: Remove this. - Object::Ref output_stream_; + Object::Ref output_stream_; Timer* step_scene_timer_; millisecs_t base_time_ = 0; TimerList sim_timers_; diff --git a/src/ballistica/game/session/replay_client_session.cc b/src/ballistica/game/session/replay_client_session.cc index f924439f..3d299168 100644 --- a/src/ballistica/game/session/replay_client_session.cc +++ b/src/ballistica/game/session/replay_client_session.cc @@ -5,13 +5,13 @@ #include "ballistica/dynamics/material/material.h" #include "ballistica/game/connection/connection_set.h" #include "ballistica/game/connection/connection_to_client.h" -#include "ballistica/game/game_stream.h" #include "ballistica/generic/huffman.h" #include "ballistica/generic/utils.h" #include "ballistica/math/vector3f.h" #include "ballistica/networking/networking.h" #include "ballistica/platform/platform.h" #include "ballistica/scene/scene.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { @@ -67,7 +67,7 @@ void ReplayClientSession::OnClientConnected(ConnectionToClient* c) { // we create a temporary output stream just for the purpose of building // a giant session-commands message that we can send to the client // to build its state up to where we are currently. - GameStream out(nullptr, false); + SceneStream out(nullptr, false); // go ahead and dump our full state.. DumpFullState(&out); diff --git a/src/ballistica/game/session/session.cc b/src/ballistica/game/session/session.cc index 6085642f..0a93eede 100644 --- a/src/ballistica/game/session/session.cc +++ b/src/ballistica/game/session/session.cc @@ -30,7 +30,7 @@ void Session::GraphicsQualityChanged(GraphicsQuality q) {} void Session::DebugSpeedMultChanged() {} -void Session::DumpFullState(GameStream* out) { +void Session::DumpFullState(SceneStream* out) { Log("Session::DumpFullState() being called; shouldn't happen."); } diff --git a/src/ballistica/game/session/session.h b/src/ballistica/game/session/session.h index a6e4f7ca..476cc11f 100644 --- a/src/ballistica/game/session/session.h +++ b/src/ballistica/game/session/session.h @@ -33,7 +33,7 @@ class Session : public ContextTarget { virtual void DebugSpeedMultChanged(); auto benchmark_type() const -> BenchmarkType { return benchmark_type_; } void set_benchmark_type(BenchmarkType val) { benchmark_type_ = val; } - virtual void DumpFullState(GameStream* s); + virtual void DumpFullState(SceneStream* s); private: BenchmarkType benchmark_type_ = BenchmarkType::kNone; diff --git a/src/ballistica/platform/apple/platform_apple.h b/src/ballistica/platform/apple/platform_apple.h index 1208489b..90055735 100644 --- a/src/ballistica/platform/apple/platform_apple.h +++ b/src/ballistica/platform/apple/platform_apple.h @@ -57,8 +57,6 @@ class PlatformApple : public Platform { auto IsOSPlayingMusic() -> bool override; auto SetHardwareCursorVisible(bool visible) -> void override; auto QuitApp() -> void override; - auto GetScoresToBeat(const std::string& level, const std::string& config, - void* py_callback) -> void override; auto OpenFileExternally(const std::string& path) -> void override; auto OpenDirExternally(const std::string& path) -> void override; auto MacMusicAppInit() -> void override; diff --git a/src/ballistica/platform/platform.cc b/src/ballistica/platform/platform.cc index 0a074a7c..45b3855f 100644 --- a/src/ballistica/platform/platform.cc +++ b/src/ballistica/platform/platform.cc @@ -24,7 +24,6 @@ #include "ballistica/dynamics/bg/bg_dynamics_server.h" #include "ballistica/game/friend_score_set.h" #include "ballistica/game/game.h" -#include "ballistica/game/score_to_beat.h" #include "ballistica/generic/utils.h" #include "ballistica/graphics/camera.h" #include "ballistica/graphics/graphics.h" @@ -1093,39 +1092,36 @@ void Platform::SetHardwareCursorVisible(bool visible) { #endif } -void Platform::QuitApp() { exit(g_app->return_value); } +auto Platform::QuitApp() -> void { exit(g_app->return_value); } -void Platform::GetScoresToBeat(const std::string& level, - const std::string& config, void* py_callback) { - // By default, return nothing. - g_game->PushScoresToBeatResponseCall(false, std::list(), - py_callback); -} - -void Platform::OpenFileExternally(const std::string& path) { +auto Platform::OpenFileExternally(const std::string& path) -> void { Log("OpenFileExternally() unimplemented"); } -void Platform::OpenDirExternally(const std::string& path) { +auto Platform::OpenDirExternally(const std::string& path) -> void { Log("OpenDirExternally() unimplemented"); } -void Platform::MacMusicAppInit() { Log("MacMusicAppInit() unimplemented"); } +auto Platform::MacMusicAppInit() -> void { + Log("MacMusicAppInit() unimplemented"); +} auto Platform::MacMusicAppGetVolume() -> int { Log("MacMusicAppGetVolume() unimplemented"); return 0; } -void Platform::MacMusicAppSetVolume(int volume) { +auto Platform::MacMusicAppSetVolume(int volume) -> void { Log("MacMusicAppSetVolume() unimplemented"); } -void Platform::MacMusicAppGetLibrarySource() { +auto Platform::MacMusicAppGetLibrarySource() -> void { Log("MacMusicAppGetLibrarySource() unimplemented"); } -void Platform::MacMusicAppStop() { Log("MacMusicAppStop() unimplemented"); } +auto Platform::MacMusicAppStop() -> void { + Log("MacMusicAppStop() unimplemented"); +} auto Platform::MacMusicAppPlayPlaylist(const std::string& playlist) -> bool { Log("MacMusicAppPlayPlaylist() unimplemented"); @@ -1136,7 +1132,7 @@ auto Platform::MacMusicAppGetPlaylists() -> std::list { return {}; } -void Platform::SetCurrentThreadName(const std::string& name) { +auto Platform::SetCurrentThreadName(const std::string& name) -> void { // Currently we leave the main thread alone, otherwise we show up as // "BallisticaMainThread" under "top" on linux (should check other platforms). if (InMainThread()) { @@ -1149,7 +1145,7 @@ void Platform::SetCurrentThreadName(const std::string& name) { #endif } -void Platform::Unlink(const char* path) { +auto Platform::Unlink(const char* path) -> void { // This default implementation covers non-windows platforms. #if BA_OSTYPE_WINDOWS throw Exception(); @@ -1186,7 +1182,7 @@ auto Platform::IsEventPushMode() -> bool { return false; } auto Platform::GetDisplayResolution(int* x, int* y) -> bool { return false; } -void Platform::CloseSocket(int socket) { +auto Platform::CloseSocket(int socket) -> void { // This default implementation covers non-windows platforms. #if BA_OSTYPE_WINDOWS throw Exception(); diff --git a/src/ballistica/platform/platform.h b/src/ballistica/platform/platform.h index f1596019..248e285c 100644 --- a/src/ballistica/platform/platform.h +++ b/src/ballistica/platform/platform.h @@ -491,11 +491,6 @@ class Platform { /// Quit the app (can be immediate or via posting some high level event). virtual auto QuitApp() -> void; - // Note to self: do we want to deprecate this?... - virtual auto GetScoresToBeat(const std::string& level, - const std::string& config, void* py_callback) - -> void; - /// Open a file using the system default method (in another app, etc.) virtual auto OpenFileExternally(const std::string& path) -> void; diff --git a/src/ballistica/python/class/python_class_node.cc b/src/ballistica/python/class/python_class_node.cc index a9e6b395..b6f11427 100644 --- a/src/ballistica/python/class/python_class_node.cc +++ b/src/ballistica/python/class/python_class_node.cc @@ -5,9 +5,9 @@ #include #include "ballistica/core/thread.h" -#include "ballistica/game/game_stream.h" #include "ballistica/python/python.h" #include "ballistica/scene/scene.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { @@ -277,7 +277,7 @@ auto PythonClassNode::HandleMessage(PythonClassNode* self, PyObject* args) if (user_message_obj) { node->DispatchUserMessage(user_message_obj, "Node User-Message dispatch"); } else { - if (GameStream* output_stream = node->scene()->GetGameStream()) { + if (SceneStream* output_stream = node->scene()->GetSceneStream()) { output_stream->NodeMessage(node, b.data(), b.size()); } node->DispatchNodeMessage(b.data()); @@ -335,7 +335,7 @@ auto PythonClassNode::ConnectAttr(PythonClassNode* self, PyObject* args) dst_node->type()->GetAttribute(std::string(dst_attr_name)); // Push to output_stream first to catch scene mismatch errors. - if (GameStream* output_stream = node->scene()->GetGameStream()) { + if (SceneStream* output_stream = node->scene()->GetSceneStream()) { output_stream->ConnectNodeAttribute(node, src_attr, dst_node, dst_attr); } diff --git a/src/ballistica/python/methods/python_methods_app.cc b/src/ballistica/python/methods/python_methods_app.cc index 3bb4d412..4f12a15a 100644 --- a/src/ballistica/python/methods/python_methods_app.cc +++ b/src/ballistica/python/methods/python_methods_app.cc @@ -7,7 +7,6 @@ #include "ballistica/assets/component/texture.h" #include "ballistica/core/logging.h" #include "ballistica/game/connection/connection_set.h" -#include "ballistica/game/game_stream.h" #include "ballistica/game/host_activity.h" #include "ballistica/game/session/host_session.h" #include "ballistica/game/session/replay_client_session.h" @@ -17,6 +16,7 @@ #include "ballistica/python/python.h" #include "ballistica/python/python_context_call_runnable.h" #include "ballistica/scene/scene.h" +#include "ballistica/scene/scene_stream.h" #include "ballistica/ui/ui.h" namespace ballistica { @@ -499,8 +499,8 @@ auto PyScreenMessage(PyObject* self, PyObject* args, PyObject* keywds) PyExcType::kValue); } Scene* context_scene = Context::current().GetMutableScene(); - GameStream* output_stream = - context_scene ? context_scene->GetGameStream() : nullptr; + SceneStream* output_stream = + context_scene ? context_scene->GetSceneStream() : nullptr; Texture* texture = nullptr; Texture* tint_texture = nullptr; diff --git a/src/ballistica/python/methods/python_methods_gameplay.cc b/src/ballistica/python/methods/python_methods_gameplay.cc index 25fc1f9c..aabcf0d2 100644 --- a/src/ballistica/python/methods/python_methods_gameplay.cc +++ b/src/ballistica/python/methods/python_methods_gameplay.cc @@ -12,7 +12,6 @@ #include "ballistica/dynamics/material/material_action.h" #include "ballistica/game/connection/connection_set.h" #include "ballistica/game/connection/connection_to_client.h" -#include "ballistica/game/game_stream.h" #include "ballistica/game/host_activity.h" #include "ballistica/generic/json.h" #include "ballistica/graphics/graphics.h" @@ -25,6 +24,7 @@ #include "ballistica/scene/node/node.h" #include "ballistica/scene/node/node_type.h" #include "ballistica/scene/scene.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { @@ -341,7 +341,7 @@ auto PyEmitFx(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { e.spread = spread; e.chunk_type = chunk_type; e.tendril_type = tendril_type; - if (GameStream* output_stream = scene->GetGameStream()) { + if (SceneStream* output_stream = scene->GetSceneStream()) { output_stream->EmitBGDynamics(e); } #if !BA_HEADLESS_BUILD @@ -489,27 +489,6 @@ auto PyGetGameRoster(PyObject* self, PyObject* args, PyObject* keywds) BA_PYTHON_CATCH; } -auto PyGetScoresToBeat(PyObject* self, PyObject* args, PyObject* keywds) - -> PyObject* { - BA_PYTHON_TRY; - const char* level; - const char* config; - PyObject* callback_obj = Py_None; - static const char* kwlist[] = {"level", "config", "callback", nullptr}; - if (!PyArg_ParseTupleAndKeywords(args, keywds, "ssO", - const_cast(kwlist), &level, &config, - &callback_obj)) { - return nullptr; - } - - // Allocate a Call object for this and pass its pointer to the main thread; - // we'll ref/de-ref it when it comes back. - auto* call = Object::NewDeferred(callback_obj); - g_app_flavor->PushGetScoresToBeatCall(level, config, call); - Py_RETURN_NONE; - BA_PYTHON_CATCH; -} - auto PySetDebugSpeedExponent(PyObject* self, PyObject* args) -> PyObject* { BA_PYTHON_TRY; int speed; @@ -627,13 +606,6 @@ auto PythonMethodsGameplay::GetMethods() -> std::vector { "Sets the debug speed scale for the game. Actual speed is " "pow(2,speed)."}, - {"get_scores_to_beat", (PyCFunction)PyGetScoresToBeat, - METH_VARARGS | METH_KEYWORDS, - "get_scores_to_beat(level: str, config: str, callback: Callable) -> " - "None\n" - "\n" - "(internal)"}, - {"get_game_roster", (PyCFunction)PyGetGameRoster, METH_VARARGS | METH_KEYWORDS, "get_game_roster() -> list[dict[str, Any]]\n" diff --git a/src/ballistica/python/methods/python_methods_system.cc b/src/ballistica/python/methods/python_methods_system.cc index 4500fedd..aac12fa6 100644 --- a/src/ballistica/python/methods/python_methods_system.cc +++ b/src/ballistica/python/methods/python_methods_system.cc @@ -10,7 +10,6 @@ #include "ballistica/app/app_flavor.h" #include "ballistica/assets/assets.h" #include "ballistica/assets/component/texture.h" -#include "ballistica/game/game_stream.h" #include "ballistica/game/host_activity.h" #include "ballistica/game/session/host_session.h" #include "ballistica/game/session/replay_client_session.h" @@ -21,6 +20,7 @@ #include "ballistica/python/python_context_call_runnable.h" #include "ballistica/python/python_sys.h" #include "ballistica/scene/scene.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { diff --git a/src/ballistica/python/python.cc b/src/ballistica/python/python.cc index 80ccd37c..5739a151 100644 --- a/src/ballistica/python/python.cc +++ b/src/ballistica/python/python.cc @@ -11,10 +11,8 @@ #include "ballistica/core/thread.h" #include "ballistica/dynamics/material/material.h" #include "ballistica/game/friend_score_set.h" -#include "ballistica/game/game_stream.h" #include "ballistica/game/host_activity.h" #include "ballistica/game/player.h" -#include "ballistica/game/score_to_beat.h" #include "ballistica/game/v1_account.h" #include "ballistica/graphics/graphics.h" #include "ballistica/input/device/joystick.h" @@ -47,6 +45,7 @@ #include "ballistica/python/python_command.h" #include "ballistica/python/python_context_call_runnable.h" #include "ballistica/scene/node/node_attribute.h" +#include "ballistica/scene/scene_stream.h" #include "ballistica/ui/ui.h" #include "ballistica/ui/widget/text_widget.h" @@ -1275,33 +1274,6 @@ void Python::HandleLocalChatMessage(const std::string& message) { obj(ObjID::kHandleLocalChatMessageCall).Call(args); } -void Python::DispatchScoresToBeatResponse( - bool success, const std::list& scores_to_beat, - void* callback_in) { - // callback_in was a newly allocated PythonContextCall. - // This will make it ref-counted so it'll die when we're done with it - auto callback( - Object::MakeRefCounted(static_cast(callback_in))); - - // Empty type denotes error. - if (!success) { - PythonRef args(Py_BuildValue("(O)", Py_None), PythonRef::kSteal); - callback->Run(args); - } else { - PyObject* py_list = PyList_New(0); - for (const auto& i : scores_to_beat) { - PyObject* val = Py_BuildValue("{sssssssd}", "player", i.player.c_str(), - "type", i.type.c_str(), "value", - i.value.c_str(), "time", i.time); - PyList_Append(py_list, val); - Py_DECREF(val); - } - PythonRef args(Py_BuildValue("(O)", py_list), PythonRef::kSteal); - Py_DECREF(py_list); - callback->Run(args); - } -} - // Put together a node message with all args on the provided tuple (starting // with arg_offset) returns false on failure, true on success. void Python::DoBuildNodeMessage(PyObject* args, int arg_offset, Buffer* b, @@ -1506,7 +1478,7 @@ auto Python::GetPythonFileLocation(bool pretty) -> std::string { void Python::SetNodeAttr(Node* node, const char* attr_name, PyObject* value_obj) { assert(node); - GameStream* out_stream = node->scene()->GetGameStream(); + SceneStream* out_stream = node->scene()->GetSceneStream(); NodeAttribute attr = node->GetAttribute(attr_name); switch (attr.type()) { case NodeAttributeType::kFloat: { @@ -1820,7 +1792,7 @@ auto Python::DoNewNode(PyObject* args, PyObject* keywds) -> Node* { // do. try { // Tell clients to do the same. - if (GameStream* output_stream = scene->GetGameStream()) { + if (SceneStream* output_stream = scene->GetSceneStream()) { output_stream->NodeOnCreate(node); } node->OnCreate(); diff --git a/src/ballistica/python/python.h b/src/ballistica/python/python.h index bd3e82a1..95eb02ca 100644 --- a/src/ballistica/python/python.h +++ b/src/ballistica/python/python.h @@ -127,10 +127,6 @@ class Python { /// Pass a chat message along to the python UI layer for handling.. auto HandleLocalChatMessage(const std::string& message) -> void; - auto DispatchScoresToBeatResponse( - bool success, const std::list& scores_to_beat, - void* PyCallback) -> void; - /// Pop up an in-game window to show a url (NOT in a browser). auto ShowURL(const std::string& url) -> void; diff --git a/src/ballistica/python/python_sys.h b/src/ballistica/python/python_sys.h index dd4068bd..23508ae6 100644 --- a/src/ballistica/python/python_sys.h +++ b/src/ballistica/python/python_sys.h @@ -3,11 +3,11 @@ #ifndef BALLISTICA_PYTHON_PYTHON_SYS_H_ #define BALLISTICA_PYTHON_PYTHON_SYS_H_ -// Any code that actually runs any python logic should include this. -// This header pulls in the actual python includes and also defines some handy -// macros and functions for working with python objects. +// Any code that actually runs any Python logic should include this. +// This header pulls in the actual Python includes and also defines some handy +// macros and functions for working with Python objects. -// This is the ONE place we actually include python. +// This is the ONE place we actually include Python. #include #include #include diff --git a/src/ballistica/scene/node/node.cc b/src/ballistica/scene/node/node.cc index 1b056791..e61d147c 100644 --- a/src/ballistica/scene/node/node.cc +++ b/src/ballistica/scene/node/node.cc @@ -3,13 +3,13 @@ #include "ballistica/scene/node/node.h" #include "ballistica/dynamics/part.h" -#include "ballistica/game/game_stream.h" #include "ballistica/python/class/python_class_node.h" #include "ballistica/python/python.h" #include "ballistica/python/python_context_call.h" #include "ballistica/scene/node/node_attribute.h" #include "ballistica/scene/node/node_attribute_connection.h" #include "ballistica/scene/scene.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { @@ -30,7 +30,7 @@ void Node::AddToScene(Scene* scene) { // id_ = scene->next_node_id_++; // our_iterator_ = // scene->nodes_.insert(scene->nodes_.end(), Object::Ref(this)); - if (GameStream* os = scene->GetGameStream()) { + if (SceneStream* os = scene->GetSceneStream()) { os->AddNode(this); } } @@ -71,7 +71,7 @@ Node::~Node() { // If we were going to an output stream, inform them of our demise. assert(scene()); - if (GameStream* output_stream = scene()->GetGameStream()) { + if (SceneStream* output_stream = scene()->GetSceneStream()) { output_stream->RemoveNode(this); } } diff --git a/src/ballistica/scene/scene.cc b/src/ballistica/scene/scene.cc index 39fc3544..0f3ede77 100644 --- a/src/ballistica/scene/scene.cc +++ b/src/ballistica/scene/scene.cc @@ -8,7 +8,6 @@ #include "ballistica/dynamics/bg/bg_dynamics.h" #include "ballistica/dynamics/dynamics.h" #include "ballistica/dynamics/part.h" -#include "ballistica/game/game_stream.h" #include "ballistica/game/player.h" #include "ballistica/graphics/camera.h" #include "ballistica/graphics/graphics.h" @@ -39,6 +38,7 @@ #include "ballistica/scene/node/text_node.h" #include "ballistica/scene/node/texture_sequence_node.h" #include "ballistica/scene/node/time_display_node.h" +#include "ballistica/scene/scene_stream.h" namespace ballistica { @@ -106,7 +106,7 @@ void Scene::SetupNodeMessageType(const std::string& name, NodeMessageType val, g_app->node_message_formats[static_cast(val)] = format; } -auto Scene::GetGameStream() const -> GameStream* { +auto Scene::GetSceneStream() const -> SceneStream* { return output_stream_.get(); } @@ -372,7 +372,7 @@ auto Scene::NewNode(const std::string& type_string, const std::string& name, return node.get(); // NOLINT } -void Scene::Dump(GameStream* stream) { +void Scene::Dump(SceneStream* stream) { assert(InLogicThread()); stream->AddScene(this); @@ -382,7 +382,7 @@ void Scene::Dump(GameStream* stream) { } } -void Scene::DumpNodes(GameStream* out) { +void Scene::DumpNodes(SceneStream* out) { // Dumps commands to the output stream to recreate scene's nodes // in their current state. @@ -623,7 +623,7 @@ auto Scene::GetCorrectionMessage(bool blended) -> std::vector { return message; } -void Scene::SetOutputStream(GameStream* val) { output_stream_ = val; } +void Scene::SetOutputStream(SceneStream* val) { output_stream_ = val; } auto Scene::AddNode(Node* node, int64_t* node_id, NodeList::iterator* i) -> void { diff --git a/src/ballistica/scene/scene.h b/src/ballistica/scene/scene.h index b55f4c97..9907a029 100644 --- a/src/ballistica/scene/scene.h +++ b/src/ballistica/scene/scene.h @@ -53,7 +53,7 @@ class Scene : public Object { auto DeleteNode(Node* node) -> void; auto shutting_down() const -> bool { return shutting_down_; } auto set_shutting_down(bool val) -> void { shutting_down_ = val; } - auto GetGameStream() const -> GameStream*; + auto GetSceneStream() const -> SceneStream*; auto SetPlayerNode(int id, PlayerNode* n) -> void; auto GetPlayerNode(int id) -> PlayerNode*; auto use_fixed_vr_overlay() const -> bool { return use_fixed_vr_overlay_; } @@ -63,11 +63,11 @@ class Scene : public Object { auto increment_bg_cover_count() -> void { bg_cover_count_++; } auto decrement_bg_cover_count() -> void { bg_cover_count_--; } auto has_bg_cover() const -> bool { return (bg_cover_count_ > 0); } - auto Dump(GameStream* out) -> void; - auto DumpNodes(GameStream* out) -> void; + auto Dump(SceneStream* out) -> void; + auto DumpNodes(SceneStream* out) -> void; auto GetCorrectionMessage(bool blended) -> std::vector; - auto SetOutputStream(GameStream* val) -> void; + auto SetOutputStream(SceneStream* val) -> void; auto stream_id() const -> int64_t { return stream_id_; } auto set_stream_id(int64_t val) -> void { assert(stream_id_ == -1); @@ -91,7 +91,7 @@ class Scene : public Object { GlobalsNode* globals_node_{}; // Current globals node (if any). std::unordered_map > player_nodes_; int64_t stream_id_{-1}; - Object::WeakRef output_stream_; + Object::WeakRef output_stream_; bool use_fixed_vr_overlay_{}; Context context_; // Context we were made in. millisecs_t time_{}; diff --git a/src/ballistica/game/game_stream.cc b/src/ballistica/scene/scene_stream.cc similarity index 82% rename from src/ballistica/game/game_stream.cc rename to src/ballistica/scene/scene_stream.cc index 4f2c7437..f3b7074b 100644 --- a/src/ballistica/game/game_stream.cc +++ b/src/ballistica/scene/scene_stream.cc @@ -1,6 +1,6 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/game/game_stream.h" +#include "ballistica/scene/scene_stream.h" #include "ballistica/app/app.h" #include "ballistica/assets/assets_server.h" @@ -25,7 +25,7 @@ namespace ballistica { -GameStream::GameStream(HostSession* host_session, bool save_replay) +SceneStream::SceneStream(HostSession* host_session, bool save_replay) : time_(0), host_session_(host_session), next_flush_time_(0), @@ -50,7 +50,7 @@ GameStream::GameStream(HostSession* host_session, bool save_replay) } } -GameStream::~GameStream() { +SceneStream::~SceneStream() { // Ship our last commands (if it matters..) Flush(); @@ -117,17 +117,17 @@ GameStream::~GameStream() { } // Pull the current built-up message. -auto GameStream::GetOutMessage() const -> std::vector { +auto SceneStream::GetOutMessage() const -> std::vector { assert(!host_session_); // this should only be getting used for // standalone temp ones.. if (!out_command_.empty()) { - Log("Error: GameStream shutting down with non-empty outCommand"); + Log("Error: SceneStream shutting down with non-empty outCommand"); } return out_message_; } template -auto GameStream::GetPointerCount(const std::vector& vec) -> size_t { +auto SceneStream::GetPointerCount(const std::vector& vec) -> size_t { size_t count = 0; auto size = vec.size(); @@ -143,8 +143,8 @@ auto GameStream::GetPointerCount(const std::vector& vec) -> size_t { // Given a vector of pointers, return an index to an available (nullptr) entry, // expanding the vector if need be. template -auto GameStream::GetFreeIndex(std::vector* vec, - std::vector* free_indices) -> size_t { +auto SceneStream::GetFreeIndex(std::vector* vec, + std::vector* free_indices) -> size_t { // If we have any free indices, use one of them. if (!free_indices->empty()) { size_t val = free_indices->back(); @@ -159,8 +159,8 @@ auto GameStream::GetFreeIndex(std::vector* vec, // Add an entry. template -void GameStream::Add(T* val, std::vector* vec, - std::vector* free_indices) { +void SceneStream::Add(T* val, std::vector* vec, + std::vector* free_indices) { // This should only get used when we're being driven by the host-session. assert(host_session_); assert(val); @@ -172,8 +172,8 @@ void GameStream::Add(T* val, std::vector* vec, // Remove an entry. template -void GameStream::Remove(T* val, std::vector* vec, - std::vector* free_indices) { +void SceneStream::Remove(T* val, std::vector* vec, + std::vector* free_indices) { assert(val); assert(val->stream_id() >= 0); assert(static_cast(vec->size()) > val->stream_id()); @@ -185,7 +185,7 @@ void GameStream::Remove(T* val, std::vector* vec, val->clear_stream_id(); } -void GameStream::Fail() { +void SceneStream::Fail() { Log("Error writing replay file"); if (writing_replay_) { // Sanity check: We should only ever be writing one replay at once. @@ -199,9 +199,9 @@ void GameStream::Fail() { } } -void GameStream::Flush() { +void SceneStream::Flush() { if (!out_command_.empty()) - Log("Error: GameStream flushing down with non-empty outCommand"); + Log("Error: SceneStream flushing down with non-empty outCommand"); if (!out_message_.empty()) { ShipSessionCommandsMessage(); } @@ -211,7 +211,7 @@ void GameStream::Flush() { #pragma ide diagnostic ignored "ConstantParameter" // Writes just a command. -void GameStream::WriteCommand(SessionCommand cmd) { +void SceneStream::WriteCommand(SessionCommand cmd) { assert(out_command_.empty()); // For now just use full size values. @@ -224,7 +224,7 @@ void GameStream::WriteCommand(SessionCommand cmd) { #pragma clang diagnostic pop // Writes a command plus an int to the stream, using whatever size is optimal. -void GameStream::WriteCommandInt32(SessionCommand cmd, int32_t value) { +void SceneStream::WriteCommandInt32(SessionCommand cmd, int32_t value) { assert(out_command_.empty()); // For now just use full size values. @@ -236,8 +236,8 @@ void GameStream::WriteCommandInt32(SessionCommand cmd, int32_t value) { memcpy(ptr, vals, 4); } -void GameStream::WriteCommandInt32_2(SessionCommand cmd, int32_t value1, - int32_t value2) { +void SceneStream::WriteCommandInt32_2(SessionCommand cmd, int32_t value1, + int32_t value2) { assert(out_command_.empty()); // For now just use full size vals. @@ -249,8 +249,8 @@ void GameStream::WriteCommandInt32_2(SessionCommand cmd, int32_t value1, memcpy(ptr, vals, 8); } -void GameStream::WriteCommandInt32_3(SessionCommand cmd, int32_t value1, - int32_t value2, int32_t value3) { +void SceneStream::WriteCommandInt32_3(SessionCommand cmd, int32_t value1, + int32_t value2, int32_t value3) { assert(out_command_.empty()); // For now just use full size vals. @@ -262,9 +262,9 @@ void GameStream::WriteCommandInt32_3(SessionCommand cmd, int32_t value1, memcpy(ptr, vals, 12); } -void GameStream::WriteCommandInt32_4(SessionCommand cmd, int32_t value1, - int32_t value2, int32_t value3, - int32_t value4) { +void SceneStream::WriteCommandInt32_4(SessionCommand cmd, int32_t value1, + int32_t value2, int32_t value3, + int32_t value4) { assert(out_command_.empty()); // For now just use full size vals. @@ -280,33 +280,33 @@ void GameStream::WriteCommandInt32_4(SessionCommand cmd, int32_t value1, // adding these placeholders for if/when we do. // They will also catch values greater than 32 bits in debug mode. // We'll need a protocol update to add support for 64 bit over the wire. -void GameStream::WriteCommandInt64(SessionCommand cmd, int64_t value) { +void SceneStream::WriteCommandInt64(SessionCommand cmd, int64_t value) { WriteCommandInt32(cmd, static_cast_check_fit(value)); } -void GameStream::WriteCommandInt64_2(SessionCommand cmd, int64_t value1, - int64_t value2) { +void SceneStream::WriteCommandInt64_2(SessionCommand cmd, int64_t value1, + int64_t value2) { WriteCommandInt32_2(cmd, static_cast_check_fit(value1), static_cast_check_fit(value2)); } -void GameStream::WriteCommandInt64_3(SessionCommand cmd, int64_t value1, - int64_t value2, int64_t value3) { +void SceneStream::WriteCommandInt64_3(SessionCommand cmd, int64_t value1, + int64_t value2, int64_t value3) { WriteCommandInt32_3(cmd, static_cast_check_fit(value1), static_cast_check_fit(value2), static_cast_check_fit(value3)); } -void GameStream::WriteCommandInt64_4(SessionCommand cmd, int64_t value1, - int64_t value2, int64_t value3, - int64_t value4) { +void SceneStream::WriteCommandInt64_4(SessionCommand cmd, int64_t value1, + int64_t value2, int64_t value3, + int64_t value4) { WriteCommandInt32_4(cmd, static_cast_check_fit(value1), static_cast_check_fit(value2), static_cast_check_fit(value3), static_cast_check_fit(value4)); } -void GameStream::WriteString(const std::string& s) { +void SceneStream::WriteString(const std::string& s) { // Write length int. auto string_size = s.size(); auto size = out_command_.size(); @@ -317,13 +317,13 @@ void GameStream::WriteString(const std::string& s) { } } -void GameStream::WriteFloat(float val) { +void SceneStream::WriteFloat(float val) { auto size = static_cast(out_command_.size()); out_command_.resize(size + sizeof(val)); memcpy(&out_command_[size], &val, 4); } -void GameStream::WriteFloats(size_t count, const float* vals) { +void SceneStream::WriteFloats(size_t count, const float* vals) { assert(count > 0); auto size = out_command_.size(); size_t vals_size = sizeof(float) * count; @@ -331,7 +331,7 @@ void GameStream::WriteFloats(size_t count, const float* vals) { memcpy(&(out_command_[size]), vals, vals_size); } -void GameStream::WriteInts32(size_t count, const int32_t* vals) { +void SceneStream::WriteInts32(size_t count, const int32_t* vals) { assert(count > 0); auto size = out_command_.size(); size_t vals_size = sizeof(int32_t) * count; @@ -339,7 +339,7 @@ void GameStream::WriteInts32(size_t count, const int32_t* vals) { memcpy(&(out_command_[size]), vals, vals_size); } -void GameStream::WriteInts64(size_t count, const int64_t* vals) { +void SceneStream::WriteInts64(size_t count, const int64_t* vals) { // FIXME: we don't actually support writing 64 bit values to the wire // at the moment; will need a protocol update for that. // This is just implemented as a placeholder. @@ -350,7 +350,7 @@ void GameStream::WriteInts64(size_t count, const int64_t* vals) { WriteInts32(count, vals32.data()); } -void GameStream::WriteChars(size_t count, const char* vals) { +void SceneStream::WriteChars(size_t count, const char* vals) { assert(count > 0); auto size = out_command_.size(); auto vals_size = static_cast(count); @@ -358,7 +358,7 @@ void GameStream::WriteChars(size_t count, const char* vals) { memcpy(&(out_command_[size]), vals, vals_size); } -void GameStream::ShipSessionCommandsMessage() { +void SceneStream::ShipSessionCommandsMessage() { BA_PRECONDITION(!out_message_.empty()); // Send this message to all client-connections we're attached to. @@ -372,7 +372,7 @@ void GameStream::ShipSessionCommandsMessage() { last_send_time_ = GetRealTime(); } -void GameStream::AddMessageToReplay(const std::vector& message) { +void SceneStream::AddMessageToReplay(const std::vector& message) { assert(writing_replay_); assert(g_assets_server); @@ -392,7 +392,7 @@ void GameStream::AddMessageToReplay(const std::vector& message) { g_assets_server->PushAddMessageToReplayCall(message); } -void GameStream::SendPhysicsCorrection(bool blend) { +void SceneStream::SendPhysicsCorrection(bool blend) { assert(host_session_); std::vector > messages; @@ -410,7 +410,7 @@ void GameStream::SendPhysicsCorrection(bool blend) { } } -void GameStream::EndCommand(bool is_time_set) { +void SceneStream::EndCommand(bool is_time_set) { assert(!out_command_.empty()); int out_message_size; @@ -456,7 +456,7 @@ void GameStream::EndCommand(bool is_time_set) { out_command_.clear(); } -auto GameStream::IsValidScene(Scene* s) -> bool { +auto SceneStream::IsValidScene(Scene* s) -> bool { if (!host_session_) { return true; // We don't build lists in this mode so can't verify this. } @@ -465,7 +465,7 @@ auto GameStream::IsValidScene(Scene* s) -> bool { && scenes_[s->stream_id()] == s); } -auto GameStream::IsValidNode(Node* n) -> bool { +auto SceneStream::IsValidNode(Node* n) -> bool { if (!host_session_) { return true; // We don't build lists in this mode so can't verify this. } @@ -474,7 +474,7 @@ auto GameStream::IsValidNode(Node* n) -> bool { && nodes_[n->stream_id()] == n); } -auto GameStream::IsValidTexture(Texture* n) -> bool { +auto SceneStream::IsValidTexture(Texture* n) -> bool { if (!host_session_) { return true; // We don't build lists in this mode so can't verify this. } @@ -483,7 +483,7 @@ auto GameStream::IsValidTexture(Texture* n) -> bool { && textures_[n->stream_id()] == n); } -auto GameStream::IsValidModel(Model* n) -> bool { +auto SceneStream::IsValidModel(Model* n) -> bool { if (!host_session_) { return true; // We don't build lists in this mode so can't verify this. } @@ -492,7 +492,7 @@ auto GameStream::IsValidModel(Model* n) -> bool { && models_[n->stream_id()] == n); } -auto GameStream::IsValidSound(Sound* n) -> bool { +auto SceneStream::IsValidSound(Sound* n) -> bool { if (!host_session_) { return true; // We don't build lists in this mode so can't verify this. } @@ -501,7 +501,7 @@ auto GameStream::IsValidSound(Sound* n) -> bool { && sounds_[n->stream_id()] == n); } -auto GameStream::IsValidData(Data* n) -> bool { +auto SceneStream::IsValidData(Data* n) -> bool { if (!host_session_) { return true; // We don't build lists in this mode so can't verify this. } @@ -510,7 +510,7 @@ auto GameStream::IsValidData(Data* n) -> bool { && datas_[n->stream_id()] == n); } -auto GameStream::IsValidCollideModel(CollideModel* n) -> bool { +auto SceneStream::IsValidCollideModel(CollideModel* n) -> bool { if (!host_session_) { return true; // We don't build lists in this mode so can't verify this. } @@ -519,7 +519,7 @@ auto GameStream::IsValidCollideModel(CollideModel* n) -> bool { && collide_models_[n->stream_id()] == n); } -auto GameStream::IsValidMaterial(Material* n) -> bool { +auto SceneStream::IsValidMaterial(Material* n) -> bool { if (!host_session_) { return true; // We don't build lists in this mode so can't verify this. } @@ -528,13 +528,13 @@ auto GameStream::IsValidMaterial(Material* n) -> bool { && materials_[n->stream_id()] == n); } -void GameStream::SetTime(millisecs_t t) { +void SceneStream::SetTime(millisecs_t t) { if (time_ == t) { return; // Ignore redundants. } millisecs_t diff = t - time_; if (diff > 255) { - Log("Error: GameStream got time diff > 255; not expected."); + Log("Error: SceneStream got time diff > 255; not expected."); diff = 255; } WriteCommandInt64(SessionCommand::kBaseTimeStep, diff); @@ -542,7 +542,7 @@ void GameStream::SetTime(millisecs_t t) { EndCommand(true); } -void GameStream::AddScene(Scene* s) { +void SceneStream::AddScene(Scene* s) { // Host mode. if (host_session_) { Add(s, &scenes_, &free_indices_scene_graphs_); @@ -556,19 +556,19 @@ void GameStream::AddScene(Scene* s) { EndCommand(); } -void GameStream::RemoveScene(Scene* s) { +void SceneStream::RemoveScene(Scene* s) { WriteCommandInt64(SessionCommand::kRemoveSceneGraph, s->stream_id()); Remove(s, &scenes_, &free_indices_scene_graphs_); EndCommand(); } -void GameStream::StepScene(Scene* s) { +void SceneStream::StepScene(Scene* s) { assert(IsValidScene(s)); WriteCommandInt64(SessionCommand::kStepSceneGraph, s->stream_id()); EndCommand(); } -void GameStream::AddNode(Node* n) { +void SceneStream::AddNode(Node* n) { assert(n); if (host_session_) { Add(n, &nodes_, &free_indices_nodes_); @@ -583,26 +583,26 @@ void GameStream::AddNode(Node* n) { EndCommand(); } -void GameStream::NodeOnCreate(Node* n) { +void SceneStream::NodeOnCreate(Node* n) { assert(IsValidNode(n)); WriteCommandInt64(SessionCommand::kNodeOnCreate, n->stream_id()); EndCommand(); } -void GameStream::SetForegroundScene(Scene* sg) { +void SceneStream::SetForegroundScene(Scene* sg) { assert(IsValidScene(sg)); WriteCommandInt64(SessionCommand::kSetForegroundSceneGraph, sg->stream_id()); EndCommand(); } -void GameStream::RemoveNode(Node* n) { +void SceneStream::RemoveNode(Node* n) { assert(IsValidNode(n)); WriteCommandInt64(SessionCommand::kRemoveNode, n->stream_id()); Remove(n, &nodes_, &free_indices_nodes_); EndCommand(); } -void GameStream::AddTexture(Texture* t) { +void SceneStream::AddTexture(Texture* t) { // Register an ID in host mode. if (host_session_) { Add(t, &textures_, &free_indices_textures_); @@ -617,14 +617,14 @@ void GameStream::AddTexture(Texture* t) { EndCommand(); } -void GameStream::RemoveTexture(Texture* t) { +void SceneStream::RemoveTexture(Texture* t) { assert(IsValidTexture(t)); WriteCommandInt64(SessionCommand::kRemoveTexture, t->stream_id()); Remove(t, &textures_, &free_indices_textures_); EndCommand(); } -void GameStream::AddModel(Model* t) { +void SceneStream::AddModel(Model* t) { // Register an ID in host mode. if (host_session_) { Add(t, &models_, &free_indices_models_); @@ -639,14 +639,14 @@ void GameStream::AddModel(Model* t) { EndCommand(); } -void GameStream::RemoveModel(Model* t) { +void SceneStream::RemoveModel(Model* t) { assert(IsValidModel(t)); WriteCommandInt64(SessionCommand::kRemoveModel, t->stream_id()); Remove(t, &models_, &free_indices_models_); EndCommand(); } -void GameStream::AddSound(Sound* t) { +void SceneStream::AddSound(Sound* t) { // Register an ID in host mode. if (host_session_) { Add(t, &sounds_, &free_indices_sounds_); @@ -661,14 +661,14 @@ void GameStream::AddSound(Sound* t) { EndCommand(); } -void GameStream::RemoveSound(Sound* t) { +void SceneStream::RemoveSound(Sound* t) { assert(IsValidSound(t)); WriteCommandInt64(SessionCommand::kRemoveSound, t->stream_id()); Remove(t, &sounds_, &free_indices_sounds_); EndCommand(); } -void GameStream::AddData(Data* t) { +void SceneStream::AddData(Data* t) { // Register an ID in host mode. if (host_session_) { Add(t, &datas_, &free_indices_datas_); @@ -683,14 +683,14 @@ void GameStream::AddData(Data* t) { EndCommand(); } -void GameStream::RemoveData(Data* t) { +void SceneStream::RemoveData(Data* t) { assert(IsValidData(t)); WriteCommandInt64(SessionCommand::kRemoveData, t->stream_id()); Remove(t, &datas_, &free_indices_datas_); EndCommand(); } -void GameStream::AddCollideModel(CollideModel* t) { +void SceneStream::AddCollideModel(CollideModel* t) { if (host_session_) { Add(t, &collide_models_, &free_indices_collide_models_); } else { @@ -704,14 +704,14 @@ void GameStream::AddCollideModel(CollideModel* t) { EndCommand(); } -void GameStream::RemoveCollideModel(CollideModel* t) { +void SceneStream::RemoveCollideModel(CollideModel* t) { assert(IsValidCollideModel(t)); WriteCommandInt64(SessionCommand::kRemoveCollideModel, t->stream_id()); Remove(t, &collide_models_, &free_indices_collide_models_); EndCommand(); } -void GameStream::AddMaterial(Material* m) { +void SceneStream::AddMaterial(Material* m) { if (host_session_) { Add(m, &materials_, &free_indices_materials_); } else { @@ -724,14 +724,14 @@ void GameStream::AddMaterial(Material* m) { EndCommand(); } -void GameStream::RemoveMaterial(Material* m) { +void SceneStream::RemoveMaterial(Material* m) { assert(IsValidMaterial(m)); WriteCommandInt64(SessionCommand::kRemoveMaterial, m->stream_id()); Remove(m, &materials_, &free_indices_materials_); EndCommand(); } -void GameStream::AddMaterialComponent(Material* m, MaterialComponent* c) { +void SceneStream::AddMaterialComponent(Material* m, MaterialComponent* c) { assert(IsValidMaterial(m)); auto flattened_size = c->GetFlattenedSize(); assert(flattened_size > 0 && flattened_size < 10000); @@ -750,10 +750,10 @@ void GameStream::AddMaterialComponent(Material* m, MaterialComponent* c) { EndCommand(); } -void GameStream::ConnectNodeAttribute(Node* src_node, - NodeAttributeUnbound* src_attr, - Node* dst_node, - NodeAttributeUnbound* dst_attr) { +void SceneStream::ConnectNodeAttribute(Node* src_node, + NodeAttributeUnbound* src_attr, + Node* dst_node, + NodeAttributeUnbound* dst_attr) { assert(IsValidNode(src_node)); assert(IsValidNode(dst_node)); assert(src_attr->node_type() == src_node->type()); @@ -768,7 +768,7 @@ void GameStream::ConnectNodeAttribute(Node* src_node, EndCommand(); } -void GameStream::NodeMessage(Node* node, const char* buffer, size_t size) { +void SceneStream::NodeMessage(Node* node, const char* buffer, size_t size) { assert(IsValidNode(node)); BA_PRECONDITION(size > 0 && size < 10000); WriteCommandInt64_2(SessionCommand::kNodeMessage, node->stream_id(), @@ -777,7 +777,7 @@ void GameStream::NodeMessage(Node* node, const char* buffer, size_t size) { EndCommand(); } -void GameStream::SetNodeAttr(const NodeAttribute& attr, float val) { +void SceneStream::SetNodeAttr(const NodeAttribute& attr, float val) { assert(IsValidNode(attr.node)); WriteCommandInt64_2(SessionCommand::kSetNodeAttrFloat, attr.node->stream_id(), attr.index()); @@ -785,22 +785,22 @@ void GameStream::SetNodeAttr(const NodeAttribute& attr, float val) { EndCommand(); } -void GameStream::SetNodeAttr(const NodeAttribute& attr, int64_t val) { +void SceneStream::SetNodeAttr(const NodeAttribute& attr, int64_t val) { assert(IsValidNode(attr.node)); WriteCommandInt64_3(SessionCommand::kSetNodeAttrInt32, attr.node->stream_id(), attr.index(), val); EndCommand(); } -void GameStream::SetNodeAttr(const NodeAttribute& attr, bool val) { +void SceneStream::SetNodeAttr(const NodeAttribute& attr, bool val) { assert(IsValidNode(attr.node)); WriteCommandInt64_3(SessionCommand::kSetNodeAttrBool, attr.node->stream_id(), attr.index(), val); EndCommand(); } -void GameStream::SetNodeAttr(const NodeAttribute& attr, - const std::vector& vals) { +void SceneStream::SetNodeAttr(const NodeAttribute& attr, + const std::vector& vals) { assert(IsValidNode(attr.node)); size_t count{vals.size()}; WriteCommandInt64_3(SessionCommand::kSetNodeAttrFloats, @@ -812,8 +812,8 @@ void GameStream::SetNodeAttr(const NodeAttribute& attr, EndCommand(); } -void GameStream::SetNodeAttr(const NodeAttribute& attr, - const std::vector& vals) { +void SceneStream::SetNodeAttr(const NodeAttribute& attr, + const std::vector& vals) { assert(IsValidNode(attr.node)); size_t count{vals.size()}; WriteCommandInt64_3(SessionCommand::kSetNodeAttrInt32s, @@ -825,8 +825,8 @@ void GameStream::SetNodeAttr(const NodeAttribute& attr, EndCommand(); } -void GameStream::SetNodeAttr(const NodeAttribute& attr, - const std::string& val) { +void SceneStream::SetNodeAttr(const NodeAttribute& attr, + const std::string& val) { assert(IsValidNode(attr.node)); WriteCommandInt64_2(SessionCommand::kSetNodeAttrString, attr.node->stream_id(), attr.index()); @@ -834,7 +834,7 @@ void GameStream::SetNodeAttr(const NodeAttribute& attr, EndCommand(); } -void GameStream::SetNodeAttr(const NodeAttribute& attr, Node* val) { +void SceneStream::SetNodeAttr(const NodeAttribute& attr, Node* val) { assert(IsValidNode(attr.node)); if (val) { assert(IsValidNode(val)); @@ -850,8 +850,8 @@ void GameStream::SetNodeAttr(const NodeAttribute& attr, Node* val) { EndCommand(); } -void GameStream::SetNodeAttr(const NodeAttribute& attr, - const std::vector& vals) { +void SceneStream::SetNodeAttr(const NodeAttribute& attr, + const std::vector& vals) { assert(IsValidNode(attr.node)); if (g_buildconfig.debug_build()) { for (auto val : vals) { @@ -878,12 +878,12 @@ void GameStream::SetNodeAttr(const NodeAttribute& attr, EndCommand(); } -void GameStream::SetNodeAttr(const NodeAttribute& attr, Player* val) { +void SceneStream::SetNodeAttr(const NodeAttribute& attr, Player* val) { // cout << "SET PLAYER ATTR " << attr.getIndex() << endl; } -void GameStream::SetNodeAttr(const NodeAttribute& attr, - const std::vector& vals) { +void SceneStream::SetNodeAttr(const NodeAttribute& attr, + const std::vector& vals) { assert(IsValidNode(attr.node)); if (g_buildconfig.debug_build()) { for (auto val : vals) { @@ -911,7 +911,7 @@ void GameStream::SetNodeAttr(const NodeAttribute& attr, EndCommand(); } -void GameStream::SetNodeAttr(const NodeAttribute& attr, Texture* val) { +void SceneStream::SetNodeAttr(const NodeAttribute& attr, Texture* val) { if (val) { assert(IsValidNode(attr.node)); assert(IsValidTexture(val)); @@ -927,8 +927,8 @@ void GameStream::SetNodeAttr(const NodeAttribute& attr, Texture* val) { EndCommand(); } -void GameStream::SetNodeAttr(const NodeAttribute& attr, - const std::vector& vals) { +void SceneStream::SetNodeAttr(const NodeAttribute& attr, + const std::vector& vals) { assert(IsValidNode(attr.node)); if (g_buildconfig.debug_build()) { for (auto val : vals) { @@ -956,7 +956,7 @@ void GameStream::SetNodeAttr(const NodeAttribute& attr, EndCommand(); } -void GameStream::SetNodeAttr(const NodeAttribute& attr, Sound* val) { +void SceneStream::SetNodeAttr(const NodeAttribute& attr, Sound* val) { if (val) { assert(IsValidNode(attr.node)); assert(IsValidSound(val)); @@ -972,8 +972,8 @@ void GameStream::SetNodeAttr(const NodeAttribute& attr, Sound* val) { EndCommand(); } -void GameStream::SetNodeAttr(const NodeAttribute& attr, - const std::vector& vals) { +void SceneStream::SetNodeAttr(const NodeAttribute& attr, + const std::vector& vals) { assert(IsValidNode(attr.node)); if (g_buildconfig.debug_build()) { for (auto val : vals) { @@ -1001,7 +1001,7 @@ void GameStream::SetNodeAttr(const NodeAttribute& attr, EndCommand(); } -void GameStream::SetNodeAttr(const NodeAttribute& attr, Model* val) { +void SceneStream::SetNodeAttr(const NodeAttribute& attr, Model* val) { if (val) { assert(IsValidNode(attr.node)); assert(IsValidModel(val)); @@ -1017,8 +1017,8 @@ void GameStream::SetNodeAttr(const NodeAttribute& attr, Model* val) { EndCommand(); } -void GameStream::SetNodeAttr(const NodeAttribute& attr, - const std::vector& vals) { +void SceneStream::SetNodeAttr(const NodeAttribute& attr, + const std::vector& vals) { assert(IsValidNode(attr.node)); if (g_buildconfig.debug_build()) { for (auto val : vals) { @@ -1045,7 +1045,7 @@ void GameStream::SetNodeAttr(const NodeAttribute& attr, } EndCommand(); } -void GameStream::SetNodeAttr(const NodeAttribute& attr, CollideModel* val) { +void SceneStream::SetNodeAttr(const NodeAttribute& attr, CollideModel* val) { if (val) { assert(IsValidNode(attr.node)); assert(IsValidCollideModel(val)); @@ -1060,8 +1060,8 @@ void GameStream::SetNodeAttr(const NodeAttribute& attr, CollideModel* val) { } EndCommand(); } -void GameStream::SetNodeAttr(const NodeAttribute& attr, - const std::vector& vals) { +void SceneStream::SetNodeAttr(const NodeAttribute& attr, + const std::vector& vals) { assert(IsValidNode(attr.node)); if (g_buildconfig.debug_build()) { for (auto val : vals) { @@ -1089,8 +1089,8 @@ void GameStream::SetNodeAttr(const NodeAttribute& attr, EndCommand(); } -void GameStream::PlaySoundAtPosition(Sound* sound, float volume, float x, - float y, float z) { +void SceneStream::PlaySoundAtPosition(Sound* sound, float volume, float x, + float y, float z) { assert(IsValidSound(sound)); assert(IsValidScene(sound->scene())); @@ -1103,7 +1103,7 @@ void GameStream::PlaySoundAtPosition(Sound* sound, float volume, float x, EndCommand(); } -void GameStream::EmitBGDynamics(const BGDynamicsEmission& e) { +void SceneStream::EmitBGDynamics(const BGDynamicsEmission& e) { WriteCommandInt64_4(SessionCommand::kEmitBGDynamics, static_cast(e.emit_type), e.count, static_cast(e.chunk_type), @@ -1121,7 +1121,7 @@ void GameStream::EmitBGDynamics(const BGDynamicsEmission& e) { EndCommand(); } -void GameStream::PlaySound(Sound* sound, float volume) { +void SceneStream::PlaySound(Sound* sound, float volume) { assert(IsValidSound(sound)); assert(IsValidScene(sound->scene())); @@ -1131,11 +1131,11 @@ void GameStream::PlaySound(Sound* sound, float volume) { EndCommand(); } -void GameStream::ScreenMessageTop(const std::string& val, float r, float g, - float b, Texture* texture, - Texture* tint_texture, float tint_r, - float tint_g, float tint_b, float tint2_r, - float tint2_g, float tint2_b) { +void SceneStream::ScreenMessageTop(const std::string& val, float r, float g, + float b, Texture* texture, + Texture* tint_texture, float tint_r, + float tint_g, float tint_b, float tint2_r, + float tint2_g, float tint2_b) { assert(IsValidTexture(texture)); assert(IsValidTexture(tint_texture)); assert(IsValidScene(texture->scene())); @@ -1157,8 +1157,8 @@ void GameStream::ScreenMessageTop(const std::string& val, float r, float g, EndCommand(); } -void GameStream::ScreenMessageBottom(const std::string& val, float r, float g, - float b) { +void SceneStream::ScreenMessageBottom(const std::string& val, float r, float g, + float b) { WriteCommand(SessionCommand::kScreenMessageBottom); WriteString(val); float color[3]; @@ -1169,27 +1169,27 @@ void GameStream::ScreenMessageBottom(const std::string& val, float r, float g, EndCommand(); } -auto GameStream::GetSoundID(Sound* s) -> int64_t { +auto SceneStream::GetSoundID(Sound* s) -> int64_t { assert(IsValidSound(s)); return s->stream_id(); } -auto GameStream::GetMaterialID(Material* m) -> int64_t { +auto SceneStream::GetMaterialID(Material* m) -> int64_t { assert(IsValidMaterial(m)); return m->stream_id(); } -void GameStream::OnClientConnected(ConnectionToClient* c) { +void SceneStream::OnClientConnected(ConnectionToClient* c) { // Sanity check - abort if its on either of our lists already. for (auto& connections_to_client : connections_to_clients_) { if (connections_to_client == c) { - Log("Error: GameStream::OnClientConnected() got duplicate connection."); + Log("Error: SceneStream::OnClientConnected() got duplicate connection."); return; } } for (auto& i : connections_to_clients_ignored_) { if (i == c) { - Log("Error: GameStream::OnClientConnected() got duplicate connection."); + Log("Error: SceneStream::OnClientConnected() got duplicate connection."); return; } } @@ -1208,7 +1208,7 @@ void GameStream::OnClientConnected(ConnectionToClient* c) { // We create a temporary output stream just for the purpose of building // a giant session-commands message to reconstruct everything in our // host-session in its current form. - GameStream out(nullptr, false); + SceneStream out(nullptr, false); // Ask the host-session that we came from to dump it's complete state. host_session_->DumpFullState(&out); @@ -1226,7 +1226,7 @@ void GameStream::OnClientConnected(ConnectionToClient* c) { } } -void GameStream::OnClientDisconnected(ConnectionToClient* c) { +void SceneStream::OnClientDisconnected(ConnectionToClient* c) { // Search for it on either our ignored or regular lists. for (auto i = connections_to_clients_.begin(); i != connections_to_clients_.end(); i++) { @@ -1242,7 +1242,7 @@ void GameStream::OnClientDisconnected(ConnectionToClient* c) { return; } } - Log("Error: GameStream::OnClientDisconnected() called for connection not on " + Log("Error: SceneStream::OnClientDisconnected() called for connection not on " "lists"); } diff --git a/src/ballistica/game/game_stream.h b/src/ballistica/scene/scene_stream.h similarity index 96% rename from src/ballistica/game/game_stream.h rename to src/ballistica/scene/scene_stream.h index 0cb56b24..43187319 100644 --- a/src/ballistica/game/game_stream.h +++ b/src/ballistica/scene/scene_stream.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_GAME_STREAM_H_ -#define BALLISTICA_GAME_GAME_STREAM_H_ +#ifndef BALLISTICA_SCENE_SCENE_STREAM_H_ +#define BALLISTICA_SCENE_SCENE_STREAM_H_ #include #include @@ -13,10 +13,10 @@ namespace ballistica { // A mechanism for dumping a live session or session-creation-commands to a // stream of messages that can be saved to file or sent over the network. -class GameStream : public Object, public ClientControllerInterface { +class SceneStream : public Object, public ClientControllerInterface { public: - GameStream(HostSession* host_session, bool save_replay); - ~GameStream() override; + SceneStream(HostSession* host_session, bool save_replay); + ~SceneStream() override; auto SetTime(millisecs_t t) -> void; auto AddScene(Scene* s) -> void; auto RemoveScene(Scene* s) -> void; @@ -169,4 +169,4 @@ class GameStream : public Object, public ClientControllerInterface { } // namespace ballistica -#endif // BALLISTICA_GAME_GAME_STREAM_H_ +#endif // BALLISTICA_SCENE_SCENE_STREAM_H_ From 014a996933d3f7d3e32328ce4654697eb0c8b88a Mon Sep 17 00:00:00 2001 From: Eric Date: Sun, 11 Sep 2022 10:32:02 -0700 Subject: [PATCH 07/40] simplifying c++ bootstrapping --- .efrocachemap | 72 +++++++------- CHANGELOG.md | 3 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/app/app.h | 15 +-- src/ballistica/app/app_config.cc | 9 +- src/ballistica/app/app_config.h | 1 - src/ballistica/assets/assets.cc | 16 +-- src/ballistica/assets/assets_server.cc | 40 ++++++-- src/ballistica/assets/assets_server.h | 15 +-- src/ballistica/audio/audio.cc | 8 +- src/ballistica/audio/audio.h | 29 +++--- src/ballistica/audio/audio_server.cc | 98 +++++++++++-------- src/ballistica/audio/audio_server.h | 77 ++++++++------- src/ballistica/ballistica.cc | 46 +++++---- src/ballistica/ballistica.h | 2 +- src/ballistica/core/context.cc | 8 -- src/ballistica/core/context.h | 2 - src/ballistica/core/thread.cc | 8 +- src/ballistica/core/thread.h | 4 +- src/ballistica/core/types.h | 2 +- src/ballistica/game/game.cc | 32 ++---- src/ballistica/game/game.h | 2 +- src/ballistica/game/host_activity.h | 18 ++-- src/ballistica/game/player.h | 2 +- src/ballistica/game/player_spec.h | 2 +- src/ballistica/game/session/client_session.h | 8 +- src/ballistica/graphics/graphics_server.cc | 5 +- src/ballistica/graphics/graphics_server.h | 23 +++-- src/ballistica/graphics/text/text_graphics.cc | 6 -- src/ballistica/graphics/text/text_graphics.h | 2 - src/ballistica/input/input.cc | 14 +-- src/ballistica/input/input.h | 1 - src/ballistica/networking/network_writer.cc | 6 +- src/ballistica/networking/network_writer.h | 4 +- src/ballistica/networking/networking.cc | 11 +-- src/ballistica/networking/networking.h | 3 +- src/ballistica/platform/platform.cc | 19 ++-- src/ballistica/ui/ui.cc | 47 +++++---- src/ballistica/ui/ui.h | 3 +- 39 files changed, 319 insertions(+), 346 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 64defef2..a8d83350 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,50 +3995,50 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c7/7c/11757954adb7da34c0e8cb6a6470", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/30/4e/361603ee5faf75168ddefd070b44", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b6/2e/e3bd12f2c9e7baa173479686485d", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1e/fe/0f73516a00159f6cd4b4791f010d", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/60/a4/f6798a377123b4f0ea58067173b9", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/60/0d/772009d20e18def687f6b76021f8", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ec/98/ca24d22fa6870cf2fa4b1dc81e2a", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ab/71/616a553794306a406be45697895c", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/41/14/bae7db8e7361d538096253c36792", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/91/5f/d2bfb2b30befdae9270a119d51b5", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d8/07/bd414612e9bf05f2a3c0b531a552", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/49/64/5943868e08758fc103e8ce70f334", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/1a/a9/bae1d4c1840d6e4c1931c529e4f8", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/22/a9/75669c9a475fc8080ce422ce2baa", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e1/87/95cbc6fc53e43e206f43eb3a1c61", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a4/1b/9a6145a32ef40fd3b8357cfbfb30", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/6a/a5/5afd24a1043a652af8ae76ec33ea", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/dd/3a/71c400bbac9edc5fa7b63e099ae7", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/dc/18/7e47d66f054e81314b39c14b26dc", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/43/25/36e8e8fc1eac369727f9639bbcf9", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e7/25/6fb628f1f5260834692bdeab63b0", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/e4/55/ec1e32f714af2ad914ea2c5e35b0", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c2/29/5c9ef7b0c3b068c700835f62abe6", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/60/30/248f57b0e0950c74aef828fe3667", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/62/3c/1b789be64fa12c6dd4609271c0b8", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ca/bf/66e24379dff682f1fb33d96b8c72", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ce/e9/e578aecdd0146a4a242dacbef95d", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/11/b8/76cf26f61214c4b75e8515f0766a", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d8/c0/74a187c3ebddec6313ea6385343d", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/90/74/0e809006cb921253e92b78d87ec8", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/7c/de/d2ceb7f9d52f78a33792395c4f2e", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/51/71/1a249c35f5a9459322c546b1ec5a", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d5/0a/56f81ecbdc45218159edf9c08aeb", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/25/5d/4569f3ae73cfa0a33427885ef5b4", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/74/2e/c987767fca3cc4b5bb738e259b0a", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/6b/8a/79e987afa129e07d36486cad1602", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b1/c0/46efd467c46e3ad8ed64d3893e1e", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/f8/51/80d6f06fb1579a95f79796e14235", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/32/6d/9190219d7454f5cc2d75bcaa7084", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/fc/39/4f03d2ebf27e521d4d8b3cc6313d", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/9d/22/8e1aa2c9ac9c589985b7ff6d744f", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d9/e3/5491d9859e329f629adb139e1c02", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/86/d2/d18cbc017a7d64001f96718cc5ed", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8e/e5/cfbcc97e2b8c7ee46d0422e54380", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d3/5f/a6501aae21bc6dbda5503cd3ed74", "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/06/70/9e5becbdf873ea42fae9541dd123", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0d/18/6a515fce87613b2293a8f7bf1a35", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/94/19/7c70a5388ab5dc9f8b4cd2a643bd", "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a3/47/f46d4455e6ee1ebb397508495d90", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/14/49/890119e5ff8800edf3b3cda113df", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/53/63/891be47740b031ad1e08f6fe9c77", "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4c/32/de6296fdbd72d6a82d47a2403efd", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/89/94/c90bb234585a62a097c6f6642e7d", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e6/be/16d22d7d53a87ad6c9e1b7835950", "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/39/2c/773ff4c64734bcd6205080a0563d", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0c/18/4a032d351000cf732bb7494d85f7", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/24/a6/eb221317cdae775c195aa81a2f0c", "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4b/9d/be9915b6f1f1a0d83ae11885bd42", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/31/d2/e658b66d64c828f85d84a9b0d482", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4b/84/6074d1f32482e5a1914aac08747f", "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/31/26/5c531133795d1381ced85e519b10", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/24/4f/c0a11a834ae10e9706bf92879d23", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0d/75/0044708d9f8af5ba85bbe9709f92", "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a3/c6/d9b0509fe23a07de2ccee6ba1fd4", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/1b/93/23b7d341894fb875acaefe0804c5", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/86/e1/65b4096af71168842a99278708da", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/d8/91/3b918141edeaeb3034e558f54246", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/74/ff/12db4137ed498dbbffd892c5000f", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/41/0a/18695d2503c1062d7b2f47c88380", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/2d/59/5bd72f8f691f041059cab3df99d5", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/3b/63/7eeb46b7832e1135e58345866abf", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/89/e4/0b7890024077f73e328b20b543f5", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/16/a1/0283e8d4c813236f30f558fe7152", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/80/76/3f3b0aa3ee0c39b276d55adf31f5", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/32/39/1a7d9be4330f5c74f67c6f7e22d8", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/1c/c6/59922c32624d3a93be2080c1ff7d", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/9f/4e/4e6d977fb3bff4746d3c599e7567", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/7f/28/36b8586b6b139ccb052accc29d2b", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/8c/b6/99368c99f9b63242df1f1875b5b5", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/74/9c/09e7f929fbcf075d41b976200950", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 41ea3be9..f43b466d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20809, api 7, 2022-09-10) +### 1.7.7 (build 20821, api 7, 2022-09-11) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. @@ -23,6 +23,7 @@ - Renamed C++ App to AppFlavor and AppGlobals to App. - Renamed C++ Media to Assets. - Removed 'scores to beat' list in coop which was only ever functional in limited cases on the Mac version. Perhaps that feature can reappear in a cross-platform way sometime. +- Simplified C++ bootstrapping to allocate all globals in one place. ### 1.7.6 (build 20687, api 7, 2022-08-11) - Cleaned up da MetaSubsystem code. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 3b9fd900..f11dce98 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -38,7 +38,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20809 + expected_build = 20821 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/app/app.h b/src/ballistica/app/app.h index c3d3546c..babeecd3 100644 --- a/src/ballistica/app/app.h +++ b/src/ballistica/app/app.h @@ -13,24 +13,15 @@ namespace ballistica { -// The first thing the engine does is allocate an instance of this as g_globals. -// As much as possible, previously static/global values should be moved to here, -// ideally as a temporary measure until they can be placed as non-static members -// in the proper classes. -// Any use of non-trivial global/static values such as class instances should be -// avoided since it can introduce ambiguities during init and teardown. -// For more explanation, see the 'Static and Global Variables' section in the -// Google C++ Style Guide. +// The first thing the engine does is allocate an instance of this as g_app. class App { public: App(int argc, char** argv); - /// Program argument count (on applicable platforms). + // The following are misc values that should be migrated to applicable + // subsystem classes. int argc{}; - - /// Program argument values (on applicable platforms). char** argv{}; - bool threads_paused{}; std::unordered_map node_types; std::unordered_map node_types_by_id; diff --git a/src/ballistica/app/app_config.cc b/src/ballistica/app/app_config.cc index b529ec9f..cf6f0b23 100644 --- a/src/ballistica/app/app_config.cc +++ b/src/ballistica/app/app_config.cc @@ -8,8 +8,6 @@ namespace ballistica { -void AppConfig::Init() { new AppConfig(); } - auto AppConfig::Entry::FloatValue() const -> float { throw Exception("not a float entry"); } @@ -137,12 +135,7 @@ class AppConfig::BoolEntry : public AppConfig::Entry { bool default_value_{}; }; -AppConfig::AppConfig() { - // (We're a singleton). - assert(g_app_config == nullptr); - g_app_config = this; - SetupEntries(); -} +AppConfig::AppConfig() { SetupEntries(); } // Clion think all calls of this are unreachable. #pragma clang diagnostic push diff --git a/src/ballistica/app/app_config.h b/src/ballistica/app/app_config.h index 6e3303e7..ed45fdc9 100644 --- a/src/ballistica/app/app_config.h +++ b/src/ballistica/app/app_config.h @@ -94,7 +94,6 @@ class AppConfig { std::string name_; }; - static void Init(); AppConfig(); // Given specific ids, returns resolved values (fastest access). diff --git a/src/ballistica/assets/assets.cc b/src/ballistica/assets/assets.cc index 190be948..734e59e3 100644 --- a/src/ballistica/assets/assets.cc +++ b/src/ballistica/assets/assets.cc @@ -607,20 +607,8 @@ void Assets::MarkComponentForLoad(AssetComponentData* c) { // once it makes it back to us we can delete the ref (in // ClearPendingLoadsDoneList) - auto asset_ptr = new Object::Ref(c); - - g_assets_server->thread()->PushCall([asset_ptr] { - assert(InAssetsThread()); - - // add our pointer to one of the preload lists and shake our preload thread - // to wake it up - if ((**asset_ptr).GetAssetType() == AssetType::kSound) { - g_assets_server->pending_preloads_audio_.push_back(asset_ptr); - } else { - g_assets_server->pending_preloads_.push_back(asset_ptr); - } - g_assets_server->process_timer_->SetLength(0); - }); + auto asset_ref_ptr = new Object::Ref(c); + g_assets_server->PushPendingPreload(asset_ref_ptr); } #pragma clang diagnostic push diff --git a/src/ballistica/assets/assets_server.cc b/src/ballistica/assets/assets_server.cc index aba5b502..8cd61f89 100644 --- a/src/ballistica/assets/assets_server.cc +++ b/src/ballistica/assets/assets_server.cc @@ -12,21 +12,45 @@ namespace ballistica { -AssetsServer::AssetsServer(Thread* thread) - : thread_(thread), - writing_replay_(false), +AssetsServer::AssetsServer() + : writing_replay_(false), replay_message_bytes_(0), replays_broken_(false), replay_out_file_(nullptr) { + // We're a singleton; make sure we don't already exist. assert(g_assets_server == nullptr); - g_assets_server = this; - // get our thread to give us periodic processing time... - process_timer_ = this->thread()->NewTimer( - 1000, true, NewLambdaRunnable([this] { Process(); })); + // Spin up our thread. + thread_ = new Thread(ThreadIdentifier::kAssets); + g_app->pausable_threads.push_back(thread_); } -AssetsServer::~AssetsServer() = default; +auto AssetsServer::Start() -> void { + thread_->PushCallSynchronous([this] { StartInThread(); }); +} + +auto AssetsServer::StartInThread() -> void { + assert(InAssetsThread()); + // get our thread to give us periodic processing time... + process_timer_ = + thread()->NewTimer(1000, true, NewLambdaRunnable([this] { Process(); })); +} + +auto AssetsServer::PushPendingPreload( + Object::Ref* asset_ref_ptr) -> void { + thread()->PushCall([this, asset_ref_ptr] { + assert(InAssetsThread()); + + // Add our pointer to one of the preload lists and shake our preload thread + // to wake it up + if ((**asset_ref_ptr).GetAssetType() == AssetType::kSound) { + pending_preloads_audio_.push_back(asset_ref_ptr); + } else { + pending_preloads_.push_back(asset_ref_ptr); + } + process_timer_->SetLength(0); + }); +} void AssetsServer::PushBeginWriteReplayCall() { thread()->PushCall([this] { diff --git a/src/ballistica/assets/assets_server.h b/src/ballistica/assets/assets_server.h index 3c831129..f482b966 100644 --- a/src/ballistica/assets/assets_server.h +++ b/src/ballistica/assets/assets_server.h @@ -12,14 +12,17 @@ namespace ballistica { class AssetsServer { public: - explicit AssetsServer(Thread* thread); - ~AssetsServer(); - void PushBeginWriteReplayCall(); - void PushEndWriteReplayCall(); - void PushAddMessageToReplayCall(const std::vector& data); + AssetsServer(); + auto Start() -> void; + auto PushBeginWriteReplayCall() -> void; + auto PushEndWriteReplayCall() -> void; + auto PushAddMessageToReplayCall(const std::vector& data) -> void; + auto PushPendingPreload(Object::Ref* asset_ref_ptr) + -> void; auto thread() const -> Thread* { return thread_; } private: + auto StartInThread() -> void; void Process(); void WriteReplayMessages(); Thread* thread_{}; @@ -32,8 +35,6 @@ class AssetsServer { Timer* process_timer_{}; std::vector*> pending_preloads_; std::vector*> pending_preloads_audio_; - friend struct PreloadRunnable; - friend class Assets; }; } // namespace ballistica diff --git a/src/ballistica/audio/audio.cc b/src/ballistica/audio/audio.cc index 09f43eb5..8f4fef9a 100644 --- a/src/ballistica/audio/audio.cc +++ b/src/ballistica/audio/audio.cc @@ -9,13 +9,7 @@ namespace ballistica { -Audio::Audio() { assert(InLogicThread()); } - -void Audio::Init() { - // Init our singleton. - assert(g_audio == nullptr); - g_audio = new Audio(); -} +Audio::Audio() {} void Audio::Reset() { assert(InLogicThread()); diff --git a/src/ballistica/audio/audio.h b/src/ballistica/audio/audio.h index 3a0b40d0..1cc1f000 100644 --- a/src/ballistica/audio/audio.h +++ b/src/ballistica/audio/audio.h @@ -15,14 +15,15 @@ namespace ballistica { /// used by the game and/or other threads. class Audio { public: - static void Init(); - void Reset(); + Audio(); + auto Reset() -> void; - void SetVolumes(float music_volume, float sound_volume); + auto SetVolumes(float music_volume, float sound_volume) -> void; - void SetListenerPosition(const Vector3f& p); - void SetListenerOrientation(const Vector3f& forward, const Vector3f& up); - void SetSoundPitch(float pitch); + auto SetListenerPosition(const Vector3f& p) -> void; + auto SetListenerOrientation(const Vector3f& forward, const Vector3f& up) + -> void; + auto SetSoundPitch(float pitch) -> void; // Return a pointer to a locked sound source, or nullptr if they're all busy. // The sound source will be reset to standard settings (no loop, fade 1, pos @@ -41,9 +42,9 @@ class Audio { auto IsSoundPlaying(uint32_t play_id) -> bool; // Simple one-shot play functions. - void PlaySound(SoundData* s, float volume = 1.0f); - void PlaySoundAtPosition(SoundData* sound, float volume, float x, float y, - float z); + auto PlaySound(SoundData* s, float volume = 1.0f) -> void; + auto PlaySoundAtPosition(SoundData* sound, float volume, float x, float y, + float z) -> void; // Call this if you want to prevent repeated plays of the same sound. It'll // tell you if the sound has been played recently. The one-shot sound-play @@ -51,19 +52,17 @@ class Audio { auto ShouldPlay(SoundData* s) -> bool; // Hmm; shouldn't these be accessed through the Source class? - void PushSourceFadeOutCall(uint32_t play_id, uint32_t time); - void PushSourceStopSoundCall(uint32_t play_id); + auto PushSourceFadeOutCall(uint32_t play_id, uint32_t time) -> void; + auto PushSourceStopSoundCall(uint32_t play_id) -> void; - void AddClientSource(AudioSource* source); + auto AddClientSource(AudioSource* source) -> void; - void MakeSourceAvailable(AudioSource* source); + auto MakeSourceAvailable(AudioSource* source) -> void; auto available_sources_mutex() -> std::mutex& { return available_sources_mutex_; } private: - Audio(); - // Flat list of client sources indexed by id. std::vector client_sources_; diff --git a/src/ballistica/audio/audio_server.cc b/src/ballistica/audio/audio_server.cc index 6282e89a..d162c1db 100644 --- a/src/ballistica/audio/audio_server.cc +++ b/src/ballistica/audio/audio_server.cc @@ -30,10 +30,10 @@ extern "C" void opensl_resume_playback(); extern std::string g_rift_audio_device_name; #endif -const int kAudioProcessIntervalNormal = 500; -const int kAudioProcessIntervalFade = 50; -const int kAudioProcessIntervalPendingLoad = 1; -const bool kShowInUseSounds = false; +const int kAudioProcessIntervalNormal{500}; +const int kAudioProcessIntervalFade{50}; +const int kAudioProcessIntervalPendingLoad{1}; +const bool kShowInUseSounds{}; int AudioServer::al_source_count_ = 0; @@ -55,7 +55,7 @@ class AudioServer::ThreadSource : public Object { // not be used. ThreadSource(AudioServer* audio_thread, int id, bool* valid); ~ThreadSource() override; - void Reset() { + auto Reset() -> void { SetIsMusic(false); SetPositional(true); SetPosition(0, 0, 0); @@ -66,18 +66,18 @@ class AudioServer::ThreadSource : public Object { /// Set whether a sound is "music". /// This influences which volume controls affect it. - void SetIsMusic(bool m); + auto SetIsMusic(bool m) -> void; /// Set whether a source is positional. /// A non-positional source's position coords are always relative to the /// listener - ie: 0, 0, 0 will always be centered. - void SetPositional(bool p); - void SetPosition(float x, float y, float z); - void SetGain(float g); - void SetFade(float f); - void SetLooping(bool loop); + auto SetPositional(bool p) -> void; + auto SetPosition(float x, float y, float z) -> void; + auto SetGain(float g) -> void; + auto SetFade(float f) -> void; + auto SetLooping(bool loop) -> void; auto Play(const Object::Ref* s) -> uint32_t; - void Stop(); + auto Stop() -> void; auto play_count() -> uint32_t { return play_count_; } auto is_streamed() const -> bool { return is_streamed_; } auto current_is_music() const -> bool { return current_is_music_; } @@ -93,34 +93,34 @@ class AudioServer::ThreadSource : public Object { return source_sound_ ? source_sound_->get() : nullptr; } - void UpdatePitch(); - void UpdateVolume(); - void ExecStop(); - void ExecPlay(); - void Update(); + auto UpdatePitch() -> void; + auto UpdateVolume() -> void; + auto ExecStop() -> void; + auto ExecPlay() -> void; + auto Update() -> void; private: - bool looping_ = false; + bool looping_{}; std::unique_ptr client_source_; - float fade_ = 1.0f; - float gain_ = 1.0f; - AudioServer* audio_thread_; - bool valid_ = false; - const Object::Ref* source_sound_ = nullptr; - int id_; - uint32_t play_count_ = 0; - bool is_actually_playing_ = false; - bool want_to_play_ = false; + float fade_{1.0f}; + float gain_{1.0f}; + AudioServer* audio_thread_{}; + bool valid_{}; + const Object::Ref* source_sound_{}; + int id_{}; + uint32_t play_count_{}; + bool is_actually_playing_{}; + bool want_to_play_{}; #if BA_ENABLE_AUDIO - ALuint source_ = 0; + ALuint source_{}; #endif - bool is_streamed_ = false; + bool is_streamed_{}; /// Whether we should be designated as "music" next time we play. - bool is_music_ = false; + bool is_music_{}; /// Whether currently playing as music. - bool current_is_music_ = false; + bool current_is_music_{}; #if BA_ENABLE_AUDIO Object::Ref streamer_; @@ -321,24 +321,34 @@ void AudioServer::PushSetListenerOrientationCall(const Vector3f& forward, }); } -AudioServer::AudioServer(Thread* thread) - : thread_(thread), impl_{new AudioServer::Impl()} { - // we're a singleton... +AudioServer::AudioServer() : impl_{new AudioServer::Impl()} { + // We're a singleton; make sure we don't already exist. assert(g_audio_server == nullptr); - g_audio_server = this; - thread->AddPauseCallback(NewLambdaRunnableRaw([this] { OnThreadPause(); })); - thread->AddResumeCallback(NewLambdaRunnableRaw([this] { OnThreadResume(); })); + // Spin up our thread. + thread_ = new Thread(ThreadIdentifier::kAudio); + g_app->pausable_threads.push_back(thread_); +} + +auto AudioServer::Start() -> void { + thread_->PushCallSynchronous([this] { StartInThread(); }); +} + +auto AudioServer::StartInThread() -> void { + assert(InAudioThread()); + thread()->AddPauseCallback(NewLambdaRunnableRaw([this] { OnThreadPause(); })); + thread()->AddResumeCallback( + NewLambdaRunnableRaw([this] { OnThreadResume(); })); // Get our thread to give us periodic processing time. - process_timer_ = thread->NewTimer(kAudioProcessIntervalNormal, true, - NewLambdaRunnable([this] { Process(); })); + process_timer_ = thread()->NewTimer(kAudioProcessIntervalNormal, true, + NewLambdaRunnable([this] { Process(); })); #if BA_ENABLE_AUDIO // Bring up OpenAL stuff. { - const char* alDeviceName = nullptr; + const char* al_device_name = nullptr; // On the rift build in vr mode we need to make sure we open the rift audio // device. @@ -363,7 +373,7 @@ AudioServer::AudioServer(Thread* thread) // These names seem to be things like "OpenAL Soft on FOO" // ..we should be able to search for FOO. if (strstr(device, g_rift_audio_device_name.c_str())) { - alDeviceName = device; + al_device_name = device; } len = strlen(device); device += (len + 1); @@ -376,7 +386,7 @@ AudioServer::AudioServer(Thread* thread) #endif // BA_RIFT_BUILD ALCdevice* device; - device = alcOpenDevice(alDeviceName); + device = alcOpenDevice(al_device_name); BA_PRECONDITION(device); impl_->alc_context_ = alcCreateContext(device, nullptr); BA_PRECONDITION(impl_->alc_context_); @@ -702,7 +712,9 @@ AudioServer::ThreadSource::ThreadSource(AudioServer* audio_thread_in, int id_in, CHECK_AL_ERROR; } *valid_out = valid_; - if (valid_) al_source_count_++; + if (valid_) { + al_source_count_++; + } #endif // BA_ENABLE_AUDIO } diff --git a/src/ballistica/audio/audio_server.h b/src/ballistica/audio/audio_server.h index 75abe5b0..da180dcc 100644 --- a/src/ballistica/audio/audio_server.h +++ b/src/ballistica/audio/audio_server.h @@ -22,45 +22,47 @@ class AudioServer { return play_id >> 16u; } - explicit AudioServer(Thread* o); + AudioServer(); + auto Start() -> void; - void PushSetVolumesCall(float music_volume, float sound_volume); - void PushSetSoundPitchCall(float val); - void PushSetPausedCall(bool pause); + auto PushSetVolumesCall(float music_volume, float sound_volume) -> void; + auto PushSetSoundPitchCall(float val) -> void; + auto PushSetPausedCall(bool pause) -> void; - static void BeginInterruption(); - static void EndInterruption(); + static auto BeginInterruption() -> void; + static auto EndInterruption() -> void; - void PushSetListenerPositionCall(const Vector3f& p); - void PushSetListenerOrientationCall(const Vector3f& forward, - const Vector3f& up); - void PushResetCall(); - void PushHavePendingLoadsCall(); - void PushComponentUnloadCall( - const std::vector*>& components); + auto PushSetListenerPositionCall(const Vector3f& p) -> void; + auto PushSetListenerOrientationCall(const Vector3f& forward, + const Vector3f& up) -> void; + auto PushResetCall() -> void; + auto PushHavePendingLoadsCall() -> void; + auto PushComponentUnloadCall( + const std::vector*>& components) -> void; /// For use by g_game_module(). - void ClearSoundRefDeleteList(); + auto ClearSoundRefDeleteList() -> void; auto paused() const -> bool { return paused_; } // Client sources use these to pass settings to the server. - void PushSourceSetIsMusicCall(uint32_t play_id, bool val); - void PushSourceSetPositionalCall(uint32_t play_id, bool val); - void PushSourceSetPositionCall(uint32_t play_id, const Vector3f& p); - void PushSourceSetGainCall(uint32_t play_id, float val); - void PushSourceSetFadeCall(uint32_t play_id, float val); - void PushSourceSetLoopingCall(uint32_t play_id, bool val); - void PushSourcePlayCall(uint32_t play_id, Object::Ref* sound); - void PushSourceStopCall(uint32_t play_id); - void PushSourceEndCall(uint32_t play_id); + auto PushSourceSetIsMusicCall(uint32_t play_id, bool val) -> void; + auto PushSourceSetPositionalCall(uint32_t play_id, bool val) -> void; + auto PushSourceSetPositionCall(uint32_t play_id, const Vector3f& p) -> void; + auto PushSourceSetGainCall(uint32_t play_id, float val) -> void; + auto PushSourceSetFadeCall(uint32_t play_id, float val) -> void; + auto PushSourceSetLoopingCall(uint32_t play_id, bool val) -> void; + auto PushSourcePlayCall(uint32_t play_id, Object::Ref* sound) + -> void; + auto PushSourceStopCall(uint32_t play_id) -> void; + auto PushSourceEndCall(uint32_t play_id) -> void; // Fade a playing sound out over the given time. If it is already // fading or does not exist, does nothing. - void FadeSoundOut(uint32_t play_id, uint32_t time); + auto FadeSoundOut(uint32_t play_id, uint32_t time) -> void; // Stop a sound from playing if it exists. - void StopSound(uint32_t play_id); + auto StopSound(uint32_t play_id) -> void; auto thread() const -> Thread* { return thread_; } @@ -68,16 +70,17 @@ class AudioServer { class ThreadSource; struct Impl; + auto StartInThread() -> void; ~AudioServer(); auto OnThreadPause() -> void; auto OnThreadResume() -> void; - void SetPaused(bool paused); + auto SetPaused(bool paused) -> void; - void SetMusicVolume(float volume); - void SetSoundVolume(float volume); - void SetSoundPitch(float pitch); + auto SetMusicVolume(float volume) -> void; + auto SetSoundVolume(float volume) -> void; + auto SetSoundPitch(float pitch) -> void; auto music_volume() -> float { return music_volume_; } auto sound_volume() -> float { return sound_volume_; } auto sound_pitch() -> float { return sound_pitch_; } @@ -85,22 +88,22 @@ class AudioServer { /// If a sound play id is currently playing, return the sound. auto GetPlayingSound(uint32_t play_id) -> ThreadSource*; - void Reset(); - void Process(); + auto Reset() -> void; + auto Process() -> void; /// Send a component to the audio thread to delete. - void DeleteAssetComponent(AssetComponentData* c); + auto DeleteAssetComponent(AssetComponentData* c) -> void; - void UpdateTimerInterval(); - void UpdateAvailableSources(); - void UpdateMusicPlayState(); - void ProcessSoundFades(); + auto UpdateTimerInterval() -> void; + auto UpdateAvailableSources() -> void; + auto UpdateMusicPlayState() -> void; + auto ProcessSoundFades() -> void; // Some threads such as audio hold onto allocated Media-Component-Refs to keep // media components alive that they need. Media-Component-Refs, however, must // be disposed of in the game thread, so they are passed back to it through // this function. - void AddSoundRefDelete(const Object::Ref* c); + auto AddSoundRefDelete(const Object::Ref* c) -> void; // Note: should use unique_ptr for this, but build fails on raspberry pi // (gcc 8.3.0). Works on Ubuntu 9.3 so should try again later. diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 57429cf6..3a7053c9 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -4,26 +4,33 @@ #include +#include "ballistica/app/app_config.h" #include "ballistica/app/app_flavor.h" #include "ballistica/assets/assets.h" #include "ballistica/assets/assets_server.h" +#include "ballistica/audio/audio.h" #include "ballistica/audio/audio_server.h" +#include "ballistica/core/context.h" #include "ballistica/core/fatal_error.h" #include "ballistica/core/logging.h" #include "ballistica/core/thread.h" #include "ballistica/dynamics/bg/bg_dynamics_server.h" #include "ballistica/game/v1_account.h" #include "ballistica/graphics/graphics_server.h" +#include "ballistica/graphics/text/text_graphics.h" +#include "ballistica/input/input.h" #include "ballistica/internal/app_internal.h" #include "ballistica/networking/network_writer.h" +#include "ballistica/networking/networking.h" #include "ballistica/platform/platform.h" #include "ballistica/python/python.h" #include "ballistica/scene/scene.h" +#include "ballistica/ui/ui.h" namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20809; +const int kAppBuildNumber = 20821; const char* kAppVersion = "1.7.7"; // Our standalone globals. @@ -40,6 +47,7 @@ Audio* g_audio{}; AudioServer* g_audio_server{}; BGDynamics* g_bg_dynamics{}; BGDynamicsServer* g_bg_dynamics_server{}; +Context* g_context{}; Game* g_game{}; Graphics* g_graphics{}; GraphicsServer* g_graphics_server{}; @@ -49,7 +57,7 @@ Assets* g_assets{}; AssetsServer* g_assets_server{}; NetworkReader* g_network_reader{}; Networking* g_networking{}; -NetworkWriteModule* g_network_writer{}; +NetworkWriter* g_network_writer{}; Platform* g_platform{}; Python* g_python{}; StdInputModule* g_std_input_module{}; @@ -93,28 +101,35 @@ auto BallisticaMain(int argc, char** argv) -> int { // Bootstrap our Python environment as early as we can (depends on // g_platform for locating OS-specific paths). - assert(g_python == nullptr); g_python = new Python(); // Create a Thread wrapper around the current (main) thread. g_main_thread = new Thread(ThreadIdentifier::kMain, ThreadType::kMain); Thread::UpdateMainThreadID(); - // Spin up our specific app variation (VR, headless, regular, etc.) + // Spin up our specific app and graphics variations + // (VR, headless, regular, etc.) g_app_flavor = g_platform->CreateAppFlavor(); - g_app_flavor->PostInit(); + g_graphics = g_platform->CreateGraphics(); // Various other subsystems. + g_graphics_server = new GraphicsServer(); + g_audio = new Audio(); + g_audio_server = new AudioServer(); + g_context = new Context(nullptr); + g_text_graphics = new TextGraphics(); + g_app_config = new AppConfig(); g_v1_account = new V1Account(); g_utils = new Utils(); g_assets = new Assets(); + g_assets_server = new AssetsServer(); + g_ui = Object::NewUnmanaged(); + g_networking = new Networking(); + g_input = new Input(); + g_app_internal = GetAppInternal(); Scene::Init(); // Spin up our other standard threads. - auto* assets_thread{new Thread(ThreadIdentifier::kAssets)}; - g_app->pausable_threads.push_back(assets_thread); - auto* audio_thread{new Thread(ThreadIdentifier::kAudio)}; - g_app->pausable_threads.push_back(audio_thread); auto* logic_thread{new Thread(ThreadIdentifier::kLogic)}; g_app->pausable_threads.push_back(logic_thread); auto* network_write_thread{new Thread(ThreadIdentifier::kNetworkWrite)}; @@ -123,14 +138,8 @@ auto BallisticaMain(int argc, char** argv) -> int { // Spin up our subsystems in those threads. logic_thread->PushCallSynchronous( [logic_thread] { new Game(logic_thread); }); - network_write_thread->PushCallSynchronous([network_write_thread] { - new NetworkWriteModule(network_write_thread); - }); - assets_thread->PushCallSynchronous( - [assets_thread] { new AssetsServer(assets_thread); }); - new GraphicsServer(g_main_thread); - audio_thread->PushCallSynchronous( - [audio_thread] { new AudioServer(audio_thread); }); + network_write_thread->PushCallSynchronous( + [network_write_thread] { new NetworkWriter(network_write_thread); }); // Now let the platform spin up any other threads/modules it uses. // (bg-dynamics in non-headless builds, stdin/stdout where applicable, @@ -144,6 +153,9 @@ auto BallisticaMain(int argc, char** argv) -> int { // Phase 2: Set things in motion. // ------------------------------------------------------------------------- + g_audio_server->Start(); + g_assets_server->Start(); + // Let the app and platform do whatever else it wants here such as adding // initial input devices/etc. g_app_flavor->OnBootstrapComplete(); diff --git a/src/ballistica/ballistica.h b/src/ballistica/ballistica.h index 163a5fcf..de4226af 100644 --- a/src/ballistica/ballistica.h +++ b/src/ballistica/ballistica.h @@ -122,7 +122,7 @@ extern Assets* g_assets; extern AssetsServer* g_assets_server; extern Networking* g_networking; extern NetworkReader* g_network_reader; -extern NetworkWriteModule* g_network_writer; +extern NetworkWriter* g_network_writer; extern Platform* g_platform; extern Python* g_python; extern StdInputModule* g_std_input_module; diff --git a/src/ballistica/core/context.cc b/src/ballistica/core/context.cc index d21d96fe..6b6da3fb 100644 --- a/src/ballistica/core/context.cc +++ b/src/ballistica/core/context.cc @@ -8,14 +8,6 @@ namespace ballistica { -// Dynamically allocate this; don't want it torn down on quit. -Context* g_context = nullptr; - -void Context::Init() { - assert(!g_context); - g_context = new Context(nullptr); -} - ContextTarget::ContextTarget() = default; ContextTarget::~ContextTarget() = default; diff --git a/src/ballistica/core/context.h b/src/ballistica/core/context.h index abd8a61e..68b0d101 100644 --- a/src/ballistica/core/context.h +++ b/src/ballistica/core/context.h @@ -14,8 +14,6 @@ namespace ballistica { // effects properly apply to the place they came from. class Context { public: - static void Init(); - static auto current() -> const Context& { assert(g_context); diff --git a/src/ballistica/core/thread.cc b/src/ballistica/core/thread.cc index e23d1213..fe7e1650 100644 --- a/src/ballistica/core/thread.cc +++ b/src/ballistica/core/thread.cc @@ -84,7 +84,7 @@ void Thread::WaitForNextEvent(bool single_cycle) { } // While we're waiting, allow other python threads to run. - if (owns_python_) { + if (holds_python_gil_) { g_python->ReleaseGIL(); } @@ -117,7 +117,7 @@ void Thread::WaitForNextEvent(bool single_cycle) { } } - if (owns_python_) { + if (holds_python_gil_) { g_python->AcquireGIL(); } } @@ -357,8 +357,8 @@ auto Thread::ThreadMain() -> int { } } -void Thread::SetOwnsPython() { - owns_python_ = true; +void Thread::SetHoldsPythonGIL() { + holds_python_gil_ = true; g_python->AcquireGIL(); } diff --git a/src/ballistica/core/thread.h b/src/ballistica/core/thread.h index cfc2f0d4..63cfe5f3 100644 --- a/src/ballistica/core/thread.h +++ b/src/ballistica/core/thread.h @@ -44,7 +44,7 @@ class Thread { // Used to quit the main thread. void Quit(); - void SetOwnsPython(); + void SetHoldsPythonGIL(); void SetPaused(bool paused); auto thread_id() const -> std::thread::id { return thread_id_; } @@ -137,7 +137,7 @@ class Thread { std::thread::id thread_id_{}; ThreadIdentifier identifier_{ThreadIdentifier::kInvalid}; millisecs_t last_complaint_time_{}; - bool owns_python_{}; + bool holds_python_gil_{}; // FIXME: Should generalize this to some sort of PlatformThreadData class. #if BA_XCODE_BUILD diff --git a/src/ballistica/core/types.h b/src/ballistica/core/types.h index fcc3ad19..f9ba491e 100644 --- a/src/ballistica/core/types.h +++ b/src/ballistica/core/types.h @@ -123,7 +123,7 @@ class NetClientThread; class NetGraph; class Networking; class NetworkReader; -class NetworkWriteModule; +class NetworkWriter; class Node; class NodeType; class NodeAttribute; diff --git a/src/ballistica/game/game.cc b/src/ballistica/game/game.cc index b2c57cab..db06dd04 100644 --- a/src/ballistica/game/game.cc +++ b/src/ballistica/game/game.cc @@ -73,45 +73,27 @@ Game::Game(Thread* thread) g_game = this; try { - // Spin up some other game-thread-based stuff. - AppConfig::Init(); - assert(g_graphics == nullptr); - g_graphics = g_platform->CreateGraphics(); - TextGraphics::Init(); - Audio::Init(); + // Our thread should hold the Python GIL by default. + // TODO(ericf): It could be better to have each individual Python call + // we make acquire the GIL. Then we're not holding it during long + // bits of C++ logic. + thread->SetHoldsPythonGIL(); + if (!HeadlessMode()) { BGDynamics::Init(); } InitSpecialChars(); - Context::Init(); - // We want to be informed when our thread is pausing. thread->AddPauseCallback(NewLambdaRunnableRaw([this] { OnThreadPause(); })); - // Waaah does UI need to be a bs::Object? - // Update: yes it does in order to be a context target. - // (need to be able to create weak-refs to it). - assert(g_ui == nullptr); - g_ui = Object::NewUnmanaged(); - g_ui->PostInit(); - - assert(g_networking == nullptr); - g_networking = new Networking(); - - assert(g_input == nullptr); - g_input = new Input(); - - g_app_internal = GetAppInternal(); + g_ui->LogicThreadInit(); // Init python and apply our settings immediately. // This way we can get started loading stuff in the background // and it'll come in with the correct texture quality etc. g_python->Reset(true); - - // We're the thread that 'owns' python so we need to wrangle the GIL. - thread->SetOwnsPython(); } catch (const std::exception& e) { // If anything went wrong, trigger a deferred error. // This way it is more likely we can show a fatal error dialog diff --git a/src/ballistica/game/game.h b/src/ballistica/game/game.h index 5c4cbf7d..5c9e8a87 100644 --- a/src/ballistica/game/game.h +++ b/src/ballistica/game/game.h @@ -324,7 +324,7 @@ class Game { int last_kick_votes_needed_{-1}; Object::WeakRef kick_vote_starter_; Object::WeakRef kick_vote_target_; - bool public_party_enabled_{false}; + bool public_party_enabled_{}; int public_party_size_{1}; // Always count ourself (is that what we want?). int public_party_max_size_{8}; int public_party_player_count_{0}; diff --git a/src/ballistica/game/host_activity.h b/src/ballistica/game/host_activity.h index c42edeb2..d87ad6c1 100644 --- a/src/ballistica/game/host_activity.h +++ b/src/ballistica/game/host_activity.h @@ -87,8 +87,8 @@ class HostActivity : public ContextTarget { auto StepScene() -> void; Object::WeakRef globals_node_; - bool allow_kick_idle_players_ = false; - Timer* step_scene_timer_ = nullptr; + bool allow_kick_idle_players_{}; + Timer* step_scene_timer_{}; std::unordered_map > textures_; std::unordered_map > sounds_; std::unordered_map > datas_; @@ -96,18 +96,18 @@ class HostActivity : public ContextTarget { collide_models_; std::unordered_map > models_; std::list > materials_; - bool shutting_down_ = false; + bool shutting_down_{}; // Our list of python calls created in the context of this activity; // we clear them as we are shutting down and ensure nothing runs after // that point. std::list > python_calls_; - millisecs_t next_prune_time_ = 0; - bool _started = false; - int out_of_bounds_in_a_row_ = 0; - bool paused_ = false; - float game_speed_ = 0.0f; - millisecs_t base_time_ = 0; + millisecs_t next_prune_time_{}; + bool _started{}; + int out_of_bounds_in_a_row_{}; + bool paused_{}; + float game_speed_{}; + millisecs_t base_time_{}; Object::Ref scene_; Object::WeakRef host_session_; PythonRef py_activity_weak_ref_; diff --git a/src/ballistica/game/player.h b/src/ballistica/game/player.h index 1d416764..d501cda2 100644 --- a/src/ballistica/game/player.h +++ b/src/ballistica/game/player.h @@ -147,7 +147,7 @@ class Player : public Object { // Player's position for use by input devices and whatnot for guides. // FIXME: This info should be acquired through the player node. - bool have_position_{false}; + bool have_position_{}; Vector3f position_{0.0f, 0.0f, 0.0f}; // These should be destructed before the rest of our class goes down, diff --git a/src/ballistica/game/player_spec.h b/src/ballistica/game/player_spec.h index a93af89b..c9d5d225 100644 --- a/src/ballistica/game/player_spec.h +++ b/src/ballistica/game/player_spec.h @@ -16,7 +16,7 @@ namespace ballistica { /// should not know or care about V2 accounts. class PlayerSpec { public: - /// Init an invalid player-spec + /// Create an invalid player-spec. PlayerSpec(); auto operator==(const PlayerSpec& spec) const -> bool; diff --git a/src/ballistica/game/session/client_session.h b/src/ballistica/game/session/client_session.h index 4779a269..e696c707 100644 --- a/src/ballistica/game/session/client_session.h +++ b/src/ballistica/game/session/client_session.h @@ -85,8 +85,8 @@ class ClientSession : public Session { virtual auto OnReset(bool rewind) -> void; virtual auto FetchMessages() -> void {} virtual void Error(const std::string& description); - void End(); - void DumpFullState(SceneStream* out) override; + auto End() -> void; + auto DumpFullState(SceneStream* out) -> void override; /// Reset target base time to equal current. This can be used during command /// buffer underruns to cause playback to pause momentarily instead of @@ -95,8 +95,8 @@ class ClientSession : public Session { auto ResetTargetBaseTime() -> void { target_base_time_ = base_time_; } private: - void ClearSessionObjs(); - void AddCommand(const std::vector& command); + auto ClearSessionObjs() -> void; + auto AddCommand(const std::vector& command) -> void; auto ReadByte() -> uint8_t; auto ReadInt32() -> int32_t; diff --git a/src/ballistica/graphics/graphics_server.cc b/src/ballistica/graphics/graphics_server.cc index 8af8e73f..81dcdc78 100644 --- a/src/ballistica/graphics/graphics_server.cc +++ b/src/ballistica/graphics/graphics_server.cc @@ -30,10 +30,9 @@ void GraphicsServer::FullscreenCheck() { } #endif -GraphicsServer::GraphicsServer(Thread* thread) : thread_(thread) { - // We're a singleton. +GraphicsServer::GraphicsServer() : thread_(g_main_thread) { + // We're a singleton; make sure we don't already exist. assert(g_graphics_server == nullptr); - g_graphics_server = this; // For janky old non-event-push mode, just fall back on a timer for rendering. if (!g_platform->IsEventPushMode()) { diff --git a/src/ballistica/graphics/graphics_server.h b/src/ballistica/graphics/graphics_server.h index 53edecfa..aaa590fa 100644 --- a/src/ballistica/graphics/graphics_server.h +++ b/src/ballistica/graphics/graphics_server.h @@ -18,7 +18,7 @@ namespace ballistica { // Graphics class GraphicsServer { public: - explicit GraphicsServer(Thread* thread); + GraphicsServer(); auto PushSetScreenGammaCall(float gamma) -> void; auto PushSetScreenPixelScaleCall(float pixel_scale) -> void; auto PushSetVSyncCall(bool sync, bool auto_sync) -> void; @@ -61,18 +61,22 @@ class GraphicsServer { // init the modelview matrix to look here auto SetCamera(const Vector3f& eye, const Vector3f& target, const Vector3f& up) -> void; + auto SetOrthoProjection(float left, float right, float bottom, float top, float near, float far) -> void; + auto ModelViewReset() -> void { model_view_matrix_ = kMatrix44fIdentity; model_view_projection_matrix_dirty_ = model_world_matrix_dirty_ = true; model_view_stack_.clear(); } + auto SetProjectionMatrix(const Matrix44f& p) -> void { projection_matrix_ = p; model_view_projection_matrix_dirty_ = true; projection_matrix_state_++; } + auto projection_matrix_state() -> uint32_t { return projection_matrix_state_; } @@ -85,9 +89,11 @@ class GraphicsServer { light_shadow_projection_matrix_state_++; } } + auto light_shadow_projection_matrix_state() const -> uint32_t { return light_shadow_projection_matrix_state_; } + auto light_shadow_projection_matrix() const -> const Matrix44f& { return light_shadow_projection_matrix_; } @@ -270,6 +276,13 @@ class GraphicsServer { model_world_matrix_dirty_ = false; } } + auto SetScreen(bool fullscreen, int width, int height, + TextureQuality texture_quality, + GraphicsQuality graphics_quality, + const std::string& android_res) -> void; +#if BA_OSTYPE_MACOS && BA_XCODE_BUILD + void FullscreenCheck(); +#endif #if BA_ENABLE_OPENGL std::unique_ptr gl_context_; #endif @@ -291,7 +304,6 @@ class GraphicsServer { bool fullscreen_enabled_{}; float target_res_x_{800.0f}; float target_res_y_{600.0f}; - Matrix44f model_view_matrix_{kMatrix44fIdentity}; Matrix44f view_world_matrix_{kMatrix44fIdentity}; Matrix44f projection_matrix_{kMatrix44fIdentity}; @@ -314,18 +326,11 @@ class GraphicsServer { std::list mesh_datas_; bool v_sync_{}; bool auto_vsync_{}; - auto SetScreen(bool fullscreen, int width, int height, - TextureQuality texture_quality, - GraphicsQuality graphics_quality, - const std::string& android_res) -> void; Timer* render_timer_{}; Renderer* renderer_{}; FrameDef* frame_def_{}; bool initial_screen_created_{}; int render_hold_{}; -#if BA_OSTYPE_MACOS && BA_XCODE_BUILD - void FullscreenCheck(); -#endif }; } // namespace ballistica diff --git a/src/ballistica/graphics/text/text_graphics.cc b/src/ballistica/graphics/text/text_graphics.cc index fb8de9fb..c0153431 100644 --- a/src/ballistica/graphics/text/text_graphics.cc +++ b/src/ballistica/graphics/text/text_graphics.cc @@ -19,12 +19,6 @@ class TextGraphics::TextSpanBoundsCacheEntry : public Object { std::list>::iterator list_iterator_; }; -void TextGraphics::Init() { - assert(InLogicThread()); - assert(g_text_graphics == nullptr); - g_text_graphics = new TextGraphics(); -} - TextGraphics::TextGraphics() { // Init glyph values for our custom font pages // (just a 5x5 array currently). diff --git a/src/ballistica/graphics/text/text_graphics.h b/src/ballistica/graphics/text/text_graphics.h index b041f2e2..e0ff8bda 100644 --- a/src/ballistica/graphics/text/text_graphics.h +++ b/src/ballistica/graphics/text/text_graphics.h @@ -22,8 +22,6 @@ const float kTextRowHeight = 32.0f; // Encapsulates text-display functionality used by the game thread. class TextGraphics { public: - static void Init(); - TextGraphics(); enum class FontPage { diff --git a/src/ballistica/input/input.cc b/src/ballistica/input/input.cc index 7d3d166d..5ddd187f 100644 --- a/src/ballistica/input/input.cc +++ b/src/ballistica/input/input.cc @@ -318,17 +318,7 @@ static const char* const scancode_names[SDL_NUM_SCANCODES] = { }; #endif // BA_SDL2_BUILD || BA_MINSDL_BUILD -Input::Input() { - // We're a singleton. - // assert(g_input == nullptr); - // g_input = this; - - assert(InLogicThread()); - - // Config should have always been read by this point; right? - // assert(g_python); - // UpdateEnabledControllerSubsystems(); -} +Input::Input() {} void Input::PushCreateKeyboardInputDevices() { g_game->thread()->PushCall([this] { CreateKeyboardInputDevices(); }); @@ -362,8 +352,6 @@ void Input::DestroyKeyboardInputDevices() { keyboard_input_2_ = nullptr; } -Input::~Input() = default; - auto Input::GetInputDevice(int id) -> InputDevice* { if (id < 0 || id >= static_cast(input_devices_.size())) { return nullptr; diff --git a/src/ballistica/input/input.h b/src/ballistica/input/input.h index b2750784..6c02956e 100644 --- a/src/ballistica/input/input.h +++ b/src/ballistica/input/input.h @@ -18,7 +18,6 @@ namespace ballistica { class Input { public: Input(); - virtual ~Input(); // Add an input device. Must be called from the game thread; otherwise use // PushAddInputDeviceCall. diff --git a/src/ballistica/networking/network_writer.cc b/src/ballistica/networking/network_writer.cc index c6a1a269..b2473812 100644 --- a/src/ballistica/networking/network_writer.cc +++ b/src/ballistica/networking/network_writer.cc @@ -8,14 +8,14 @@ namespace ballistica { -NetworkWriteModule::NetworkWriteModule(Thread* thread) : thread_(thread) { +NetworkWriter::NetworkWriter(Thread* thread) : thread_(thread) { // we're a singleton assert(g_network_writer == nullptr); g_network_writer = this; } -void NetworkWriteModule::PushSendToCall(const std::vector& msg, - const SockAddr& addr) { +void NetworkWriter::PushSendToCall(const std::vector& msg, + const SockAddr& addr) { // Avoid buffer-full errors if something is causing us to write too often; // these are unreliable messages so its ok to just drop them. if (!thread()->CheckPushSafety()) { diff --git a/src/ballistica/networking/network_writer.h b/src/ballistica/networking/network_writer.h index 1c8235c6..e88b2ac1 100644 --- a/src/ballistica/networking/network_writer.h +++ b/src/ballistica/networking/network_writer.h @@ -10,10 +10,10 @@ namespace ballistica { // A subsystem handling outbound network traffic. -class NetworkWriteModule { +class NetworkWriter { public: void PushSendToCall(const std::vector& msg, const SockAddr& addr); - explicit NetworkWriteModule(Thread* thread); + explicit NetworkWriter(Thread* thread); auto thread() const -> Thread* { return thread_; } private: diff --git a/src/ballistica/networking/networking.cc b/src/ballistica/networking/networking.cc index 14304ecd..1cfbcbf0 100644 --- a/src/ballistica/networking/networking.cc +++ b/src/ballistica/networking/networking.cc @@ -17,12 +17,7 @@ struct Networking::ScanResultsEntryPriv { millisecs_t last_contact_time{}; }; -Networking::Networking() { - assert(InLogicThread()); - Resume(); -} - -Networking::~Networking() = default; +Networking::Networking() {} // Note: for now we're making our host-scan network calls directly from the game // thread. This is generally not a good idea since it appears that even in @@ -232,7 +227,9 @@ void Networking::EndHostScanning() { } void Networking::Pause() { - if (!running_) Log("Networking::pause() called with running_ already false"); + if (!running_) { + Log("Networking::pause() called with running_ already false"); + } running_ = false; // Game is going into background or whatnot. Kill any sockets/etc. diff --git a/src/ballistica/networking/networking.h b/src/ballistica/networking/networking.h index 430c6198..76f6766e 100644 --- a/src/ballistica/networking/networking.h +++ b/src/ballistica/networking/networking.h @@ -120,7 +120,6 @@ class Networking { // will do this there. static void SendTo(const std::vector& buffer, const SockAddr& addr); Networking(); - ~Networking(); // Run a cycle of host scanning (basically sending out a broadcast packet to // see who's out there). @@ -147,7 +146,7 @@ class Networking { std::mutex scan_results_mutex_; uint32_t next_scan_query_id_{}; int scan_socket_{-1}; - bool running_{}; + bool running_{true}; }; } // namespace ballistica diff --git a/src/ballistica/platform/platform.cc b/src/ballistica/platform/platform.cc index 45b3855f..6af72aa1 100644 --- a/src/ballistica/platform/platform.cc +++ b/src/ballistica/platform/platform.cc @@ -657,26 +657,31 @@ auto Platform::CreateAppFlavor() -> AppFlavor* { SDLApp::InitSDL(); #endif + AppFlavor* app_flavor{}; + #if BA_HEADLESS_BUILD - return new AppFlavorHeadless(g_main_thread); + app_flavor = new AppFlavorHeadless(g_main_thread); #elif BA_RIFT_BUILD // Rift build can spin up in either VR or regular mode. if (g_app->vr_mode) { - return new AppFlavorVR(g_main_thread); + app_flavor = new AppFlavorVR(g_main_thread); } else { - return new SDLApp(g_main_thread); + app_flavor = new SDLApp(g_main_thread); } #elif BA_CARDBOARD_BUILD - return new AppFlavorVR(g_main_thread); + app_flavor = new AppFlavorVR(g_main_thread); #elif BA_SDL_BUILD - return new SDLApp(g_main_thread); + app_flavor = new SDLApp(g_main_thread); #else - return new AppFlavor(g_main_thread); + app_flavor = new AppFlavor(g_main_thread); #endif + + assert(app_flavor); + app_flavor->PostInit(); + return app_flavor; } auto Platform::CreateGraphics() -> Graphics* { - assert(InLogicThread()); #if BA_VR_BUILD return new VRGraphics(); #else diff --git a/src/ballistica/ui/ui.cc b/src/ballistica/ui/ui.cc index d0cf6d51..9389eb9a 100644 --- a/src/ballistica/ui/ui.cc +++ b/src/ballistica/ui/ui.cc @@ -27,25 +27,19 @@ UI::UI() { // Allow overriding via an environment variable. auto* ui_override = getenv("BA_UI_SCALE"); - bool force_test_small{}; - bool force_test_medium{}; - bool force_test_large{}; if (ui_override) { if (ui_override == std::string("small")) { - force_test_small = true; + scale_ = UIScale::kSmall; + force_scale_ = true; } else if (ui_override == std::string("medium")) { - force_test_medium = true; + scale_ = UIScale::kMedium; + force_scale_ = true; } else if (ui_override == std::string("large")) { - force_test_large = true; + scale_ = UIScale::kLarge; + force_scale_ = true; } } - if (force_test_small) { - scale_ = UIScale::kSmall; - } else if (force_test_medium) { - scale_ = UIScale::kMedium; - } else if (force_test_large) { - scale_ = UIScale::kLarge; - } else { + if (!force_scale_) { // Use automatic val. if (g_buildconfig.iircade_build()) { // NOLINT(bugprone-branch-clone) scale_ = UIScale::kMedium; @@ -56,17 +50,24 @@ UI::UI() { scale_ = g_platform->GetUIScale(); } } +} +auto UI::LogicThreadInit() -> void { + root_ui_ = new RootUI(); // Make sure we know when forced-ui-scale is enabled. - if (force_test_small) { - ScreenMessage("FORCING SMALL UI FOR TESTING", Vector3f(1, 0, 0)); - Log("FORCING SMALL UI FOR TESTING"); - } else if (force_test_medium) { - ScreenMessage("FORCING MEDIUM UI FOR TESTING", Vector3f(1, 0, 0)); - Log("FORCING MEDIUM UI FOR TESTING"); - } else if (force_test_large) { - ScreenMessage("FORCING LARGE UI FOR TESTING", Vector3f(1, 0, 0)); - Log("FORCING LARGE UI FOR TESTING"); + if (force_scale_) { + if (scale_ == UIScale::kSmall) { + ScreenMessage("FORCING SMALL UI FOR TESTING", Vector3f(1, 0, 0)); + Log("FORCING SMALL UI FOR TESTING"); + } else if (scale_ == UIScale::kMedium) { + ScreenMessage("FORCING MEDIUM UI FOR TESTING", Vector3f(1, 0, 0)); + Log("FORCING MEDIUM UI FOR TESTING"); + } else if (scale_ == UIScale::kLarge) { + ScreenMessage("FORCING LARGE UI FOR TESTING", Vector3f(1, 0, 0)); + Log("FORCING LARGE UI FOR TESTING"); + } else { + FatalError("Unhandled scale."); + } } step_scene_timer_ = @@ -75,8 +76,6 @@ UI::UI() { scene_ = Object::New(0); } -auto UI::PostInit() -> void { root_ui_ = new RootUI(); } - // Currently the UI never dies so we don't bother doing a clean tear-down.. // (verifying scene cleanup, etc) UI::~UI() { diff --git a/src/ballistica/ui/ui.h b/src/ballistica/ui/ui.h index f5f5e10a..08dd7228 100644 --- a/src/ballistica/ui/ui.h +++ b/src/ballistica/ui/ui.h @@ -31,7 +31,7 @@ namespace ballistica { class UI : public ContextTarget { public: UI(); - auto PostInit() -> void; + auto LogicThreadInit() -> void; ~UI() override; auto Reset() -> void; @@ -142,6 +142,7 @@ class UI : public ContextTarget { Object::Ref root_widget_; int ui_lock_count_{}; UIScale scale_{UIScale::kLarge}; + bool force_scale_{}; // Media loaded in the UI context. std::unordered_map > textures_; From 866f9475fbe383fafe792a42408495e9289068e2 Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Mon, 12 Sep 2022 10:09:31 -0700 Subject: [PATCH 08/40] more c++ bootstrap refactoring --- .efrocachemap | 1194 ++++++++--------- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/ballistica.cc | 42 +- src/ballistica/core/thread.cc | 8 +- src/ballistica/core/thread.h | 4 +- src/ballistica/dynamics/bg/bg_dynamics.cc | 8 +- src/ballistica/dynamics/bg/bg_dynamics.h | 3 +- .../dynamics/bg/bg_dynamics_server.cc | 11 +- .../dynamics/bg/bg_dynamics_server.h | 2 +- src/ballistica/dynamics/collision_cache.cc | 18 +- src/ballistica/dynamics/collision_cache.h | 2 +- src/ballistica/game/game.cc | 38 +- src/ballistica/game/game.h | 4 +- src/ballistica/input/std_input_module.cc | 2 +- src/ballistica/internal/app_internal.h | 2 +- src/ballistica/networking/network_writer.cc | 9 +- src/ballistica/networking/network_writer.h | 2 +- src/ballistica/platform/platform.cc | 9 - 18 files changed, 676 insertions(+), 684 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index a8d83350..e4744f01 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -1,425 +1,425 @@ { - "assets/build/ba_data/audio/achievement.ogg": "https://files.ballistica.net/cache/ba1/58/60/72ea79f720fe3025edccb074795c", - "assets/build/ba_data/audio/actionHero1.ogg": "https://files.ballistica.net/cache/ba1/df/19/3dca52242f89fea536675460662d", - "assets/build/ba_data/audio/actionHero2.ogg": "https://files.ballistica.net/cache/ba1/cf/59/e9370637605e17e06782a3ded253", - "assets/build/ba_data/audio/actionHero3.ogg": "https://files.ballistica.net/cache/ba1/28/90/1bcbfedccddb1dbb75f1be534a40", - "assets/build/ba_data/audio/actionHero4.ogg": "https://files.ballistica.net/cache/ba1/4e/40/b163b9e464e3ad61fbb1669faccf", - "assets/build/ba_data/audio/actionHeroDeath.ogg": "https://files.ballistica.net/cache/ba1/ab/59/f8c8b4374989b7f4291897d12136", - "assets/build/ba_data/audio/actionHeroFall.ogg": "https://files.ballistica.net/cache/ba1/67/10/fbf1be54bb261de5be005b698ac6", - "assets/build/ba_data/audio/actionHeroHit1.ogg": "https://files.ballistica.net/cache/ba1/5b/6f/f33a2387e511c98990b503120332", - "assets/build/ba_data/audio/actionHeroHit2.ogg": "https://files.ballistica.net/cache/ba1/d0/50/1a0773c6d9f75f5a59397cc7f570", - "assets/build/ba_data/audio/activateBeep.ogg": "https://files.ballistica.net/cache/ba1/5a/e7/f46f191ed3bf9141ce584670f5ef", - "assets/build/ba_data/audio/agent1.ogg": "https://files.ballistica.net/cache/ba1/5f/1d/56573ce369bab1278f8f5ca3df20", - "assets/build/ba_data/audio/agent2.ogg": "https://files.ballistica.net/cache/ba1/96/ce/9d2fa9e025c18f6a549308398622", - "assets/build/ba_data/audio/agent3.ogg": "https://files.ballistica.net/cache/ba1/7a/02/192379d0855a384a6f4602070d2f", - "assets/build/ba_data/audio/agent4.ogg": "https://files.ballistica.net/cache/ba1/d6/c2/ded31e0ca74e18fb1cc9b2848eac", - "assets/build/ba_data/audio/agentDeath.ogg": "https://files.ballistica.net/cache/ba1/37/e2/799c72c85d5580ed91f3d07f353f", - "assets/build/ba_data/audio/agentFall.ogg": "https://files.ballistica.net/cache/ba1/f7/2d/b0f45c9b63c00011d0d0726e99dc", - "assets/build/ba_data/audio/agentHit1.ogg": "https://files.ballistica.net/cache/ba1/0d/62/79bcab98bfc875de8caf8cb584ce", - "assets/build/ba_data/audio/agentHit2.ogg": "https://files.ballistica.net/cache/ba1/15/bc/08460f83e57a794f273ca6b6a0ec", - "assets/build/ba_data/audio/alarm.ogg": "https://files.ballistica.net/cache/ba1/ad/60/b59451d596fcc3f01c74622fe91b", - "assets/build/ba_data/audio/ali1.ogg": "https://files.ballistica.net/cache/ba1/75/6f/f1db853370363e61b4b59fdc34f1", - "assets/build/ba_data/audio/ali2.ogg": "https://files.ballistica.net/cache/ba1/47/dd/5fbbbf4636d3f5f1b1ccdbcd7ee9", - "assets/build/ba_data/audio/ali3.ogg": "https://files.ballistica.net/cache/ba1/e7/e2/3d9421fe70a347e421817a2b7281", - "assets/build/ba_data/audio/ali4.ogg": "https://files.ballistica.net/cache/ba1/75/6d/3986f030b46a23325ffe590ae864", - "assets/build/ba_data/audio/aliDeath.ogg": "https://files.ballistica.net/cache/ba1/0d/55/3b5715fc528462a85857209bddf5", - "assets/build/ba_data/audio/aliFall.ogg": "https://files.ballistica.net/cache/ba1/9b/44/4ae14fa4e34460eff4ff79adca82", - "assets/build/ba_data/audio/aliHit1.ogg": "https://files.ballistica.net/cache/ba1/69/7f/34fddf7c9c23d5bdb88765f246f3", - "assets/build/ba_data/audio/aliHit2.ogg": "https://files.ballistica.net/cache/ba1/d3/67/871f6ee7fbe3c0b079c1c376cad4", - "assets/build/ba_data/audio/alien1.ogg": "https://files.ballistica.net/cache/ba1/8d/25/7e7e6484081f461a3c835a40466a", - "assets/build/ba_data/audio/alien2.ogg": "https://files.ballistica.net/cache/ba1/27/17/aeabc20283ce7542d5e5dc959efb", - "assets/build/ba_data/audio/alien3.ogg": "https://files.ballistica.net/cache/ba1/83/2e/46a27a8d9650cb64fd6cd2df865f", - "assets/build/ba_data/audio/alien4.ogg": "https://files.ballistica.net/cache/ba1/37/33/4f765d486286c1f998ae4b68d98e", - "assets/build/ba_data/audio/alienDeath.ogg": "https://files.ballistica.net/cache/ba1/92/99/e9fe339c6cb5d5d91d653f2a2894", - "assets/build/ba_data/audio/alienFall.ogg": "https://files.ballistica.net/cache/ba1/70/8e/8e2fb00c82452632854959c664ce", - "assets/build/ba_data/audio/alienHit1.ogg": "https://files.ballistica.net/cache/ba1/c4/9c/181dd79a43686ebb8cc05851d7ea", - "assets/build/ba_data/audio/alienHit2.ogg": "https://files.ballistica.net/cache/ba1/bb/3e/4238ca124fdf0bdbb9aac13549f8", - "assets/build/ba_data/audio/announceEight.ogg": "https://files.ballistica.net/cache/ba1/27/6a/574c3185d7c35d9480a839c8888a", - "assets/build/ba_data/audio/announceFive.ogg": "https://files.ballistica.net/cache/ba1/11/6f/072ad78bb410d30cf26d6e511d67", - "assets/build/ba_data/audio/announceFour.ogg": "https://files.ballistica.net/cache/ba1/32/f2/c02875245b900e5fbb7a384f2c17", - "assets/build/ba_data/audio/announceNine.ogg": "https://files.ballistica.net/cache/ba1/11/c0/47a7d6d8e578229db28b604932cb", - "assets/build/ba_data/audio/announceOne.ogg": "https://files.ballistica.net/cache/ba1/96/5f/5985e6a5cc5596d507d64908ecfa", - "assets/build/ba_data/audio/announceSeven.ogg": "https://files.ballistica.net/cache/ba1/3a/11/dcc1c4c6573f29852ebe55e5b549", - "assets/build/ba_data/audio/announceSix.ogg": "https://files.ballistica.net/cache/ba1/2a/22/a966bc15bab28ed56f8ff7e5bbfa", - "assets/build/ba_data/audio/announceTen.ogg": "https://files.ballistica.net/cache/ba1/e0/2e/5c614c252c2b3c24e63ae8498dbf", - "assets/build/ba_data/audio/announceThree.ogg": "https://files.ballistica.net/cache/ba1/dc/29/3172eee392826010e9d2fa9c138e", - "assets/build/ba_data/audio/announceTwo.ogg": "https://files.ballistica.net/cache/ba1/43/18/098574d833d394808a07ba36cede", - "assets/build/ba_data/audio/assassin1.ogg": "https://files.ballistica.net/cache/ba1/c3/5f/6598616f4f1f96c40413b71de9e8", - "assets/build/ba_data/audio/assassin2.ogg": "https://files.ballistica.net/cache/ba1/a4/8d/4116a1ea3715f1c4bb788819cd18", - "assets/build/ba_data/audio/assassin3.ogg": "https://files.ballistica.net/cache/ba1/4e/92/ab9b6565d11b89b73aaa265eb8f0", - "assets/build/ba_data/audio/assassin4.ogg": "https://files.ballistica.net/cache/ba1/7b/e0/a40c91b027bace02667c0fcf158c", - "assets/build/ba_data/audio/assassinDeath.ogg": "https://files.ballistica.net/cache/ba1/05/88/f550d7014923a2c6134f12628098", - "assets/build/ba_data/audio/assassinFall.ogg": "https://files.ballistica.net/cache/ba1/dd/df/94392604b6a346f8b11b696c8f1d", - "assets/build/ba_data/audio/assassinHit1.ogg": "https://files.ballistica.net/cache/ba1/c0/6f/de6f72745e850af65cf9a5dbb3a6", - "assets/build/ba_data/audio/assassinHit2.ogg": "https://files.ballistica.net/cache/ba1/9e/e2/a69db7c14065ee8d570a100a263b", - "assets/build/ba_data/audio/bear1.ogg": "https://files.ballistica.net/cache/ba1/72/49/9551e6ff43e4fdd863cca11134f4", - "assets/build/ba_data/audio/bear2.ogg": "https://files.ballistica.net/cache/ba1/d7/1f/2c830ac5e0a0c43f145a20fa2c25", - "assets/build/ba_data/audio/bear3.ogg": "https://files.ballistica.net/cache/ba1/aa/98/9f1a21aa9dac07d05085e8687068", - "assets/build/ba_data/audio/bear4.ogg": "https://files.ballistica.net/cache/ba1/c7/26/69891bac03ddbea748f9baec9f95", - "assets/build/ba_data/audio/bearDeath.ogg": "https://files.ballistica.net/cache/ba1/e9/eb/39834342979b9340776d814902bb", - "assets/build/ba_data/audio/bearFall.ogg": "https://files.ballistica.net/cache/ba1/15/6b/2be51a0c48077b44166ce9b5a133", - "assets/build/ba_data/audio/bearHit1.ogg": "https://files.ballistica.net/cache/ba1/96/22/6f56ec5c0b58ce8faf959c766a61", - "assets/build/ba_data/audio/bearHit2.ogg": "https://files.ballistica.net/cache/ba1/4f/98/5366c6a26a83e9618b8eca54780a", - "assets/build/ba_data/audio/bellHigh.ogg": "https://files.ballistica.net/cache/ba1/7c/02/4bc38047fc4301eb3c195e0539b9", - "assets/build/ba_data/audio/bellLow.ogg": "https://files.ballistica.net/cache/ba1/85/e0/6ebea452dc2a1284e6668f18e6ec", - "assets/build/ba_data/audio/bellMed.ogg": "https://files.ballistica.net/cache/ba1/a2/d0/57fc42d7e5b76024f0221b43cdfe", - "assets/build/ba_data/audio/bigImpact.ogg": "https://files.ballistica.net/cache/ba1/90/6c/07bb89e1e1d59f927c7530c88fe8", - "assets/build/ba_data/audio/bigImpact2.ogg": "https://files.ballistica.net/cache/ba1/04/81/87864481b02fecb9914e3b50e2a6", - "assets/build/ba_data/audio/blank.ogg": "https://files.ballistica.net/cache/ba1/55/70/90a49806365698031bd7c2a1e55f", - "assets/build/ba_data/audio/blip.ogg": "https://files.ballistica.net/cache/ba1/be/d9/c7bae6f1b9900727cdcffe70adad", - "assets/build/ba_data/audio/block.ogg": "https://files.ballistica.net/cache/ba1/f6/5e/e27553fb56edd40e854a8310ce6b", - "assets/build/ba_data/audio/bombDrop01.ogg": "https://files.ballistica.net/cache/ba1/1a/e8/2bd59450bb142dd8edb7fc875337", - "assets/build/ba_data/audio/bombDrop02.ogg": "https://files.ballistica.net/cache/ba1/28/f5/f7601c05201d1cb088f7b01dd244", - "assets/build/ba_data/audio/bombRoll01.ogg": "https://files.ballistica.net/cache/ba1/4b/64/e0c24177793c47547e3f57c7273b", - "assets/build/ba_data/audio/bones1.ogg": "https://files.ballistica.net/cache/ba1/66/99/fc98f957a6db4a93b5fbb5786b4e", - "assets/build/ba_data/audio/bones2.ogg": "https://files.ballistica.net/cache/ba1/a1/38/064ad0b952104f931c1bcc34d747", - "assets/build/ba_data/audio/bones3.ogg": "https://files.ballistica.net/cache/ba1/20/6e/665a3bd95dc7769c95938da89a2b", - "assets/build/ba_data/audio/bonesDeath.ogg": "https://files.ballistica.net/cache/ba1/2c/53/450b0d309913653756599fb54f25", - "assets/build/ba_data/audio/bonesFall.ogg": "https://files.ballistica.net/cache/ba1/b5/94/d157d5a2b02016caf4a3b40c358c", - "assets/build/ba_data/audio/boo.ogg": "https://files.ballistica.net/cache/ba1/9e/b6/e71d3e3cb099fd93034adc78d079", - "assets/build/ba_data/audio/boxDrop.ogg": "https://files.ballistica.net/cache/ba1/4a/b6/c9f4c108be9808134c15cf44e4b2", - "assets/build/ba_data/audio/boxingBell.ogg": "https://files.ballistica.net/cache/ba1/34/e1/05c5c1400662d2fb3a07594db5b7", - "assets/build/ba_data/audio/bunny1.ogg": "https://files.ballistica.net/cache/ba1/24/8f/bb616af82630e9dc7b98f29318a9", - "assets/build/ba_data/audio/bunny2.ogg": "https://files.ballistica.net/cache/ba1/9d/63/3b247d4a4de0a673008868342765", - "assets/build/ba_data/audio/bunny3.ogg": "https://files.ballistica.net/cache/ba1/0e/08/6490c22fe15808b214068bdc7753", - "assets/build/ba_data/audio/bunny4.ogg": "https://files.ballistica.net/cache/ba1/2a/b7/c480591a278edfe518df5e12ec6a", - "assets/build/ba_data/audio/bunnyDeath.ogg": "https://files.ballistica.net/cache/ba1/93/7d/152e5bf4fdd7880c3f0b9abf178d", - "assets/build/ba_data/audio/bunnyFall.ogg": "https://files.ballistica.net/cache/ba1/0c/31/97752e51b1ab8f581d467b453d29", - "assets/build/ba_data/audio/bunnyHit1.ogg": "https://files.ballistica.net/cache/ba1/1a/e9/7b62eeb9abb596b89bfe53c41df2", - "assets/build/ba_data/audio/bunnyHit2.ogg": "https://files.ballistica.net/cache/ba1/37/56/f44055d623b9f16a6d3ea52cf95d", - "assets/build/ba_data/audio/bunnyJump.ogg": "https://files.ballistica.net/cache/ba1/be/92/b63a629718a81effe5858530a2be", - "assets/build/ba_data/audio/cashRegister.ogg": "https://files.ballistica.net/cache/ba1/91/07/33e1d7d98479aeb0386898bc633e", - "assets/build/ba_data/audio/cashRegister2.ogg": "https://files.ballistica.net/cache/ba1/f8/12/74edab7ebda050f913428793f477", - "assets/build/ba_data/audio/charSelectMusic.ogg": "https://files.ballistica.net/cache/ba1/a7/6d/53b41cd118b34d9ab8254dbd2ff1", - "assets/build/ba_data/audio/cheer.ogg": "https://files.ballistica.net/cache/ba1/c7/ff/c962b9c39a35de2004198e9f03f1", - "assets/build/ba_data/audio/click01.ogg": "https://files.ballistica.net/cache/ba1/7e/a6/42511f8b555d460156424bc53f47", - "assets/build/ba_data/audio/corkPop.ogg": "https://files.ballistica.net/cache/ba1/68/a4/2b7c6d678fe1fa09cde1081c83ef", - "assets/build/ba_data/audio/cowboy1.ogg": "https://files.ballistica.net/cache/ba1/1b/0f/a0bea97d774aa221a3941f0e0af2", - "assets/build/ba_data/audio/cowboy2.ogg": "https://files.ballistica.net/cache/ba1/eb/da/b25db53f6a6d4871db7a7829a8b3", - "assets/build/ba_data/audio/cowboy3.ogg": "https://files.ballistica.net/cache/ba1/42/7c/8eeaec50726c9f6bbd62694bffc5", - "assets/build/ba_data/audio/cowboy4.ogg": "https://files.ballistica.net/cache/ba1/c6/f4/a0f56e61df27ced1d7f03b1dc458", - "assets/build/ba_data/audio/cowboyDeath.ogg": "https://files.ballistica.net/cache/ba1/cb/0e/abb677f438cd64b63dd6fc363d4a", - "assets/build/ba_data/audio/cowboyFall.ogg": "https://files.ballistica.net/cache/ba1/1d/af/c302b9caba1d7f736a6dd9f52268", - "assets/build/ba_data/audio/cowboyHit1.ogg": "https://files.ballistica.net/cache/ba1/71/57/0a9213ba8dea0404318893385068", - "assets/build/ba_data/audio/cowboyHit2.ogg": "https://files.ballistica.net/cache/ba1/cb/13/afa6a5a87981e947177695af64d5", - "assets/build/ba_data/audio/crowdChant.ogg": "https://files.ballistica.net/cache/ba1/f5/c0/92c75181f783dae40075d9c2b689", - "assets/build/ba_data/audio/cyborg1.ogg": "https://files.ballistica.net/cache/ba1/47/15/b4930affbf40421447247546fe99", - "assets/build/ba_data/audio/cyborg2.ogg": "https://files.ballistica.net/cache/ba1/b2/af/626e8e08ab19d5854e474b9195aa", - "assets/build/ba_data/audio/cyborg3.ogg": "https://files.ballistica.net/cache/ba1/8c/0c/b25cf168c367368689c2830361ba", - "assets/build/ba_data/audio/cyborg4.ogg": "https://files.ballistica.net/cache/ba1/38/85/714969eb77f14b8b89c1fdf4bb54", - "assets/build/ba_data/audio/cyborgDeath.ogg": "https://files.ballistica.net/cache/ba1/2f/16/437f9756452e7386a6f737e957db", - "assets/build/ba_data/audio/cyborgFall.ogg": "https://files.ballistica.net/cache/ba1/77/db/a912a8c114f815799738da41ad5f", - "assets/build/ba_data/audio/cyborgHit1.ogg": "https://files.ballistica.net/cache/ba1/86/0c/c988a0ec4cf50cadbb3617b51547", - "assets/build/ba_data/audio/cyborgHit2.ogg": "https://files.ballistica.net/cache/ba1/30/86/9a0fd20c447caa136f902c0995aa", - "assets/build/ba_data/audio/cymbal.ogg": "https://files.ballistica.net/cache/ba1/74/c6/0f51346d8bd9ca177d20c913d4bc", - "assets/build/ba_data/audio/debrisFall.ogg": "https://files.ballistica.net/cache/ba1/82/8a/cc77cccd8f885307237e3091a43f", - "assets/build/ba_data/audio/deek.ogg": "https://files.ballistica.net/cache/ba1/4c/cf/d44e49553a8f590e6044d5a29c40", - "assets/build/ba_data/audio/deek2.ogg": "https://files.ballistica.net/cache/ba1/a1/9d/6feb67617bd1d6b0e116ba8f4051", - "assets/build/ba_data/audio/ding.ogg": "https://files.ballistica.net/cache/ba1/49/44/70398a2997c7238349abd56f64e9", - "assets/build/ba_data/audio/dingSmall.ogg": "https://files.ballistica.net/cache/ba1/ce/5d/6de4581beee72fd2dbf78e884f6d", - "assets/build/ba_data/audio/dingSmallHigh.ogg": "https://files.ballistica.net/cache/ba1/d8/6c/c290d65aa888309b14172b4550f5", - "assets/build/ba_data/audio/dripity.ogg": "https://files.ballistica.net/cache/ba1/5a/c7/2012a0547b43f4fe22300ba1e435", - "assets/build/ba_data/audio/drumRoll.ogg": "https://files.ballistica.net/cache/ba1/f9/c9/eb8cdc6911207e1b9fc37c856550", - "assets/build/ba_data/audio/error.ogg": "https://files.ballistica.net/cache/ba1/f0/fb/8db7d282d17f6549439472a17443", - "assets/build/ba_data/audio/explosion01.ogg": "https://files.ballistica.net/cache/ba1/7e/5c/60d2827cf919ce3a2a742c13656d", - "assets/build/ba_data/audio/explosion02.ogg": "https://files.ballistica.net/cache/ba1/40/5b/0ad2e9b46bdbeb5117c6c35d0c06", - "assets/build/ba_data/audio/explosion03.ogg": "https://files.ballistica.net/cache/ba1/fc/55/a9abae0b44d7a38e8965dbe0e82d", - "assets/build/ba_data/audio/explosion04.ogg": "https://files.ballistica.net/cache/ba1/3e/1d/6956a0ebd528c85d928f64e986ad", - "assets/build/ba_data/audio/explosion05.ogg": "https://files.ballistica.net/cache/ba1/1f/6a/ad37d5a4a16390ff4984008c4529", - "assets/build/ba_data/audio/fanfare.ogg": "https://files.ballistica.net/cache/ba1/65/89/78fb925efb8e70a3a7b3b8e6eb22", - "assets/build/ba_data/audio/flagCatcherMusic.ogg": "https://files.ballistica.net/cache/ba1/d2/63/1214d61047ae93562e81ebb5ff31", - "assets/build/ba_data/audio/flyingMusic.ogg": "https://files.ballistica.net/cache/ba1/84/62/853c3e325b4709e59e4d08c05f71", - "assets/build/ba_data/audio/foghorn.ogg": "https://files.ballistica.net/cache/ba1/74/26/2338cc1801cfa18e1e106aeb4ae6", - "assets/build/ba_data/audio/footImpact01.ogg": "https://files.ballistica.net/cache/ba1/d2/86/b525c0f04e5118b20d55cd075b8d", - "assets/build/ba_data/audio/footImpact02.ogg": "https://files.ballistica.net/cache/ba1/cc/c9/3a00e1b3f628412877c88f1be1dd", - "assets/build/ba_data/audio/footImpact03.ogg": "https://files.ballistica.net/cache/ba1/15/43/3e555fb6ea381f384d3ac1646707", - "assets/build/ba_data/audio/forwardMarchMusic.ogg": "https://files.ballistica.net/cache/ba1/4f/bd/c9a96a8949fca5328df20bf6c160", - "assets/build/ba_data/audio/freeze.ogg": "https://files.ballistica.net/cache/ba1/02/ab/e598b181e844a065925f2bf97963", - "assets/build/ba_data/audio/frosty01.ogg": "https://files.ballistica.net/cache/ba1/ef/6d/3400f25717f7f442dd8d1419033e", - "assets/build/ba_data/audio/frosty02.ogg": "https://files.ballistica.net/cache/ba1/76/38/5854a95ec204f41e43b50d263409", - "assets/build/ba_data/audio/frosty03.ogg": "https://files.ballistica.net/cache/ba1/a8/16/60fc348f2edc081c4c338e7956e6", - "assets/build/ba_data/audio/frosty04.ogg": "https://files.ballistica.net/cache/ba1/11/f0/7860caaada9174a47251c9c66018", - "assets/build/ba_data/audio/frosty05.ogg": "https://files.ballistica.net/cache/ba1/45/8f/def4659833a1dbd76f14b13d2bff", - "assets/build/ba_data/audio/frostyDeath.ogg": "https://files.ballistica.net/cache/ba1/d4/bd/d214a161586e03503c21d859b615", - "assets/build/ba_data/audio/frostyFall.ogg": "https://files.ballistica.net/cache/ba1/e9/44/98873e7072b05ab1fda1f35ee9cf", - "assets/build/ba_data/audio/frostyHit01.ogg": "https://files.ballistica.net/cache/ba1/7d/c9/5a6686a9f625692a51845f8b1a9e", - "assets/build/ba_data/audio/frostyHit02.ogg": "https://files.ballistica.net/cache/ba1/65/d3/bd26b06bc0d3840d12971a8ff7a3", - "assets/build/ba_data/audio/frostyHit03.ogg": "https://files.ballistica.net/cache/ba1/62/b8/ff9ae4125d95afff1eabfa70e85f", - "assets/build/ba_data/audio/fuse01.ogg": "https://files.ballistica.net/cache/ba1/e0/33/05a6deab05d5fc024078294911e6", - "assets/build/ba_data/audio/gladiator1.ogg": "https://files.ballistica.net/cache/ba1/62/c9/9a1677c7ac53aa1e2d86b6a41cb8", - "assets/build/ba_data/audio/gladiator2.ogg": "https://files.ballistica.net/cache/ba1/01/03/826a4dc462a2ffde058c229563c4", - "assets/build/ba_data/audio/gladiator3.ogg": "https://files.ballistica.net/cache/ba1/75/ac/4153c1bae224e124e6a0c14f3767", - "assets/build/ba_data/audio/gladiator4.ogg": "https://files.ballistica.net/cache/ba1/41/57/9d42f96a7b4f2501516c76acd8eb", - "assets/build/ba_data/audio/gladiatorDeath.ogg": "https://files.ballistica.net/cache/ba1/0b/3f/7b823002ac4823e692f3e3772e6d", - "assets/build/ba_data/audio/gladiatorFall.ogg": "https://files.ballistica.net/cache/ba1/59/52/bd80868601bbe451ea2b8bbedd3b", - "assets/build/ba_data/audio/gladiatorHit1.ogg": "https://files.ballistica.net/cache/ba1/d5/f1/eec7713ca5613b27827f2cecd23e", - "assets/build/ba_data/audio/gladiatorHit2.ogg": "https://files.ballistica.net/cache/ba1/8d/f6/65d8116517cedabd94498fad52f5", - "assets/build/ba_data/audio/gong.ogg": "https://files.ballistica.net/cache/ba1/22/74/cbebc4aea2e05e0b04acc6505247", - "assets/build/ba_data/audio/grandRompMusic.ogg": "https://files.ballistica.net/cache/ba1/d8/8d/c58f032720cf364033eca76836db", - "assets/build/ba_data/audio/gravelSkid.ogg": "https://files.ballistica.net/cache/ba1/53/45/06c085914c1f9faef2486bb97437", - "assets/build/ba_data/audio/gunCocking.ogg": "https://files.ballistica.net/cache/ba1/d8/ce/edd7befc975296aef73d732bb663", - "assets/build/ba_data/audio/healthPowerup.ogg": "https://files.ballistica.net/cache/ba1/f0/34/72c44aef2241471debca16f03870", - "assets/build/ba_data/audio/hiss.ogg": "https://files.ballistica.net/cache/ba1/04/3a/9b820db7a76beb8271c9737558ba", - "assets/build/ba_data/audio/impactHard.ogg": "https://files.ballistica.net/cache/ba1/30/e7/9e78011593669448536cfc97cfd2", - "assets/build/ba_data/audio/impactHard2.ogg": "https://files.ballistica.net/cache/ba1/3e/5f/4da1dd1467abf87db71303958898", - "assets/build/ba_data/audio/impactHard3.ogg": "https://files.ballistica.net/cache/ba1/19/b6/3350b18401d089a06ed953b664d8", - "assets/build/ba_data/audio/impactMedium.ogg": "https://files.ballistica.net/cache/ba1/fc/50/e6d167d4c54f01a23a8a509c0033", - "assets/build/ba_data/audio/impactMedium2.ogg": "https://files.ballistica.net/cache/ba1/d9/c9/594cee989be6e1101e5b81f84e21", - "assets/build/ba_data/audio/jack01.ogg": "https://files.ballistica.net/cache/ba1/e9/1d/924768dd46f3ebba712f7c4671fd", - "assets/build/ba_data/audio/jack02.ogg": "https://files.ballistica.net/cache/ba1/bd/6b/6f1071d7151a0c2cfb58203d3b0a", - "assets/build/ba_data/audio/jack03.ogg": "https://files.ballistica.net/cache/ba1/fe/2e/ee03645ecc98b87351b36dc8bad8", - "assets/build/ba_data/audio/jack04.ogg": "https://files.ballistica.net/cache/ba1/04/eb/2b842246184c956b63e03a030eb0", - "assets/build/ba_data/audio/jack05.ogg": "https://files.ballistica.net/cache/ba1/ee/9b/e9505d780f8df0b7f52521633033", - "assets/build/ba_data/audio/jack06.ogg": "https://files.ballistica.net/cache/ba1/28/c1/fc96bb381c38fe24db32ce943d39", - "assets/build/ba_data/audio/jackDeath01.ogg": "https://files.ballistica.net/cache/ba1/10/ad/a44b04f740f29112e146f61d08dd", - "assets/build/ba_data/audio/jackFall01.ogg": "https://files.ballistica.net/cache/ba1/d8/69/8185e28dedad83a6ce42412eca0b", - "assets/build/ba_data/audio/jackHit01.ogg": "https://files.ballistica.net/cache/ba1/c9/7d/076eb7ef2e45129e8f7870d2b5fa", - "assets/build/ba_data/audio/jackHit02.ogg": "https://files.ballistica.net/cache/ba1/cc/8c/8196a164dfa4a7304753767bc806", - "assets/build/ba_data/audio/jackHit03.ogg": "https://files.ballistica.net/cache/ba1/c0/93/280556ce2e97fbb3cfd43d4cc6f8", - "assets/build/ba_data/audio/jackHit04.ogg": "https://files.ballistica.net/cache/ba1/7d/2e/59fb210c91477798962076d40bed", - "assets/build/ba_data/audio/jackHit05.ogg": "https://files.ballistica.net/cache/ba1/d9/15/8db623ab332a7adf3087c54eb439", - "assets/build/ba_data/audio/jackHit06.ogg": "https://files.ballistica.net/cache/ba1/14/25/d85c7443244ff9c4b762cfba7d45", - "assets/build/ba_data/audio/jackHit07.ogg": "https://files.ballistica.net/cache/ba1/c3/92/70e73537e642c3de7c0d1514c62c", - "assets/build/ba_data/audio/jumpsuit1.ogg": "https://files.ballistica.net/cache/ba1/1d/e6/caeb8f3d75ad8d00a896493d4981", - "assets/build/ba_data/audio/jumpsuit2.ogg": "https://files.ballistica.net/cache/ba1/9d/65/5bada79073612f81dada09cdd669", - "assets/build/ba_data/audio/jumpsuit3.ogg": "https://files.ballistica.net/cache/ba1/ec/97/1807c9196930f55ed29080374395", - "assets/build/ba_data/audio/jumpsuit4.ogg": "https://files.ballistica.net/cache/ba1/3c/84/d62da6a915e3255434a0929e4ec8", - "assets/build/ba_data/audio/jumpsuitDeath.ogg": "https://files.ballistica.net/cache/ba1/8c/b3/525216f8302f9d948095bfa9799a", - "assets/build/ba_data/audio/jumpsuitFall.ogg": "https://files.ballistica.net/cache/ba1/7f/af/6b411b9a46ad8be33e15dc9e6429", - "assets/build/ba_data/audio/jumpsuitHit1.ogg": "https://files.ballistica.net/cache/ba1/a6/29/bed67bd2fa608427b5b27703a369", - "assets/build/ba_data/audio/jumpsuitHit2.ogg": "https://files.ballistica.net/cache/ba1/de/ff/aac029f85323dfde023607bd5b98", - "assets/build/ba_data/audio/kronk1.ogg": "https://files.ballistica.net/cache/ba1/a5/25/6ffeb4f7c0b479f6ea331fad4cb0", - "assets/build/ba_data/audio/kronk10.ogg": "https://files.ballistica.net/cache/ba1/e0/72/50b27a07c338b3ea9467877fcba6", - "assets/build/ba_data/audio/kronk2.ogg": "https://files.ballistica.net/cache/ba1/d3/4a/ab1f9a3af8ec7a35dc4c84ebec93", - "assets/build/ba_data/audio/kronk3.ogg": "https://files.ballistica.net/cache/ba1/78/3e/04ed2f524aa8c9d7cc20240dd102", - "assets/build/ba_data/audio/kronk4.ogg": "https://files.ballistica.net/cache/ba1/a7/90/67fc1bcc1e29225c6560b22dc797", - "assets/build/ba_data/audio/kronk5.ogg": "https://files.ballistica.net/cache/ba1/47/73/ebadf9e3e762761b486574f92ae5", - "assets/build/ba_data/audio/kronk6.ogg": "https://files.ballistica.net/cache/ba1/d7/12/eb34c17c7eae64861019d8b9d0e4", - "assets/build/ba_data/audio/kronk7.ogg": "https://files.ballistica.net/cache/ba1/50/12/4bbf79acb96de2891d0c04793dd8", - "assets/build/ba_data/audio/kronk8.ogg": "https://files.ballistica.net/cache/ba1/fb/3d/cf3678af97b1e9453b2a5ccf6556", - "assets/build/ba_data/audio/kronk9.ogg": "https://files.ballistica.net/cache/ba1/2b/5d/80ac256b9a0395ce0c1df07198b7", - "assets/build/ba_data/audio/kronkDeath.ogg": "https://files.ballistica.net/cache/ba1/a8/86/adb0bcf982f41aef1266bfef4ac3", - "assets/build/ba_data/audio/kronkFall.ogg": "https://files.ballistica.net/cache/ba1/01/bc/933e24668420f71aa5a7f405166e", - "assets/build/ba_data/audio/laser.ogg": "https://files.ballistica.net/cache/ba1/9e/ef/c95d203792e7c2410cf48b8e6242", - "assets/build/ba_data/audio/laserReverse.ogg": "https://files.ballistica.net/cache/ba1/ee/de/e4e5513a1e0b45bd7c21802a0680", - "assets/build/ba_data/audio/mel01.ogg": "https://files.ballistica.net/cache/ba1/df/e6/9597698cb9abe30ceade8ab682e1", - "assets/build/ba_data/audio/mel02.ogg": "https://files.ballistica.net/cache/ba1/28/0e/41a16319712fc1c0d7999d439dff", - "assets/build/ba_data/audio/mel03.ogg": "https://files.ballistica.net/cache/ba1/bf/b0/5ae8a0a1c92664a078869125aa33", - "assets/build/ba_data/audio/mel04.ogg": "https://files.ballistica.net/cache/ba1/62/8d/30104cf07b07d7f8044324587f8b", - "assets/build/ba_data/audio/mel05.ogg": "https://files.ballistica.net/cache/ba1/a3/ba/7e268b1bf136ab431ed8aa600c92", - "assets/build/ba_data/audio/mel06.ogg": "https://files.ballistica.net/cache/ba1/18/e1/f9a292341b7ae940dcdfc9af6dde", - "assets/build/ba_data/audio/mel07.ogg": "https://files.ballistica.net/cache/ba1/4e/42/c512f97edc448246a89e4c92f9c8", - "assets/build/ba_data/audio/mel08.ogg": "https://files.ballistica.net/cache/ba1/73/52/3930c7eb099dfe89fbd09c90309c", - "assets/build/ba_data/audio/mel09.ogg": "https://files.ballistica.net/cache/ba1/22/79/82f9d313915592a142e8cf0c6e99", - "assets/build/ba_data/audio/mel10.ogg": "https://files.ballistica.net/cache/ba1/a0/3a/067da88e50b7fb576cb30441065e", - "assets/build/ba_data/audio/melDeath01.ogg": "https://files.ballistica.net/cache/ba1/cd/e1/b3a3cf043eba71e1f6fdecb010f2", - "assets/build/ba_data/audio/melFall01.ogg": "https://files.ballistica.net/cache/ba1/fd/48/d9903063f4a5cd445f140280faba", - "assets/build/ba_data/audio/menuMusic.ogg": "https://files.ballistica.net/cache/ba1/61/25/949add05fbdc5d6d163192a5bf96", - "assets/build/ba_data/audio/metalHit.ogg": "https://files.ballistica.net/cache/ba1/ee/80/b0305bfb666556e8931ec5729088", - "assets/build/ba_data/audio/metalSkid.ogg": "https://files.ballistica.net/cache/ba1/de/81/6d1597d6bb6ae20d6715c52b8757", - "assets/build/ba_data/audio/ninjaAttack1.ogg": "https://files.ballistica.net/cache/ba1/b0/ec/7e6ea6898010fc117fe7ab3cfd14", - "assets/build/ba_data/audio/ninjaAttack2.ogg": "https://files.ballistica.net/cache/ba1/b9/2a/1b3045380c083e67252cade17f60", - "assets/build/ba_data/audio/ninjaAttack3.ogg": "https://files.ballistica.net/cache/ba1/83/fe/6854cffa06c237e8ba11aa1c3811", - "assets/build/ba_data/audio/ninjaAttack4.ogg": "https://files.ballistica.net/cache/ba1/09/f7/5b3de6c0c466c3fc6d2f6b19102c", - "assets/build/ba_data/audio/ninjaAttack5.ogg": "https://files.ballistica.net/cache/ba1/ec/42/e0784271bec8a82dfb54201c2e1c", - "assets/build/ba_data/audio/ninjaAttack6.ogg": "https://files.ballistica.net/cache/ba1/b2/e6/20743d838354bbc70b0eab0942e6", - "assets/build/ba_data/audio/ninjaAttack7.ogg": "https://files.ballistica.net/cache/ba1/9e/bb/e7002c6810d6a66d1a9779091364", - "assets/build/ba_data/audio/ninjaDeath1.ogg": "https://files.ballistica.net/cache/ba1/b8/62/c9f0b5aed52a44cda7c1d874f096", - "assets/build/ba_data/audio/ninjaFall1.ogg": "https://files.ballistica.net/cache/ba1/45/f8/461537290f94f4e93e6d127e73eb", - "assets/build/ba_data/audio/ninjaHit1.ogg": "https://files.ballistica.net/cache/ba1/b5/4d/0acb8fe85d7c67ec8afe3005ae2a", - "assets/build/ba_data/audio/ninjaHit2.ogg": "https://files.ballistica.net/cache/ba1/41/7b/bc492022c86f91cd38a203a7dbc8", - "assets/build/ba_data/audio/ninjaHit3.ogg": "https://files.ballistica.net/cache/ba1/21/a9/4bf5331435ab7f0118a769efc82e", - "assets/build/ba_data/audio/ninjaHit4.ogg": "https://files.ballistica.net/cache/ba1/90/9a/6a012a5e6782726a5e2d6fe91f44", - "assets/build/ba_data/audio/ninjaHit5.ogg": "https://files.ballistica.net/cache/ba1/30/ef/7d13306f36cb7827273062c3f2a4", - "assets/build/ba_data/audio/ninjaHit6.ogg": "https://files.ballistica.net/cache/ba1/5f/fe/fb2532d2e6de096a9feeab7f6c17", - "assets/build/ba_data/audio/ninjaHit7.ogg": "https://files.ballistica.net/cache/ba1/57/56/0ba4ab0f1233ef72108ccda9ccfa", - "assets/build/ba_data/audio/ninjaHit8.ogg": "https://files.ballistica.net/cache/ba1/d2/d9/b1fbfc0a864161fc879785b544c5", - "assets/build/ba_data/audio/oldLady1.ogg": "https://files.ballistica.net/cache/ba1/27/9c/4ae89ba2d90c5491a05a9098dfb7", - "assets/build/ba_data/audio/oldLady2.ogg": "https://files.ballistica.net/cache/ba1/6d/55/0f3a7a838905dde023bd93775ebb", - "assets/build/ba_data/audio/oldLady3.ogg": "https://files.ballistica.net/cache/ba1/d8/77/08e31296569e99eaea6e3335dac3", - "assets/build/ba_data/audio/oldLady4.ogg": "https://files.ballistica.net/cache/ba1/b7/96/5f7dd93a643a3ab1f5d6a0a4e8c3", - "assets/build/ba_data/audio/oldLadyDeath.ogg": "https://files.ballistica.net/cache/ba1/71/f0/ee089bbd54bb57734d09477cc2d9", - "assets/build/ba_data/audio/oldLadyFall.ogg": "https://files.ballistica.net/cache/ba1/b3/4b/a3dc06498650caee6290e364f2d6", - "assets/build/ba_data/audio/oldLadyHit1.ogg": "https://files.ballistica.net/cache/ba1/4a/66/358ad6790d13b4b2edcfc3e0f271", - "assets/build/ba_data/audio/oldLadyHit2.ogg": "https://files.ballistica.net/cache/ba1/18/cb/d7c3037b62cd77781fe4f12691fa", - "assets/build/ba_data/audio/ooh.ogg": "https://files.ballistica.net/cache/ba1/b7/28/6cefdb25ff8d908cc3feae409db3", - "assets/build/ba_data/audio/operaSinger1.ogg": "https://files.ballistica.net/cache/ba1/1f/ae/192442b203a9ea76ede63f8c6703", - "assets/build/ba_data/audio/operaSinger2.ogg": "https://files.ballistica.net/cache/ba1/ec/bd/5f82598f65e996cd38808750d31e", - "assets/build/ba_data/audio/operaSinger3.ogg": "https://files.ballistica.net/cache/ba1/6f/05/650ce355834ff955bd92e826bf61", - "assets/build/ba_data/audio/operaSinger4.ogg": "https://files.ballistica.net/cache/ba1/d9/7b/912192363ea7bdefad644d581031", - "assets/build/ba_data/audio/operaSingerDeath.ogg": "https://files.ballistica.net/cache/ba1/80/3b/9f46ff5e3935ef65a5fc241f6f69", - "assets/build/ba_data/audio/operaSingerFall.ogg": "https://files.ballistica.net/cache/ba1/31/87/7a3b7d9a0f30b97ea4c9465b1ed6", - "assets/build/ba_data/audio/operaSingerHit1.ogg": "https://files.ballistica.net/cache/ba1/af/f5/eed5e1c078a8ebb42da718d8eb2c", - "assets/build/ba_data/audio/operaSingerHit2.ogg": "https://files.ballistica.net/cache/ba1/81/9d/d2d943aec38c910aec3cd37ca8ce", - "assets/build/ba_data/audio/orchestraHit.ogg": "https://files.ballistica.net/cache/ba1/10/52/c067809e0e67ada9f51b7df4f905", - "assets/build/ba_data/audio/orchestraHit2.ogg": "https://files.ballistica.net/cache/ba1/cf/c5/f176dba87e6b8e9d8b23f79b6875", - "assets/build/ba_data/audio/orchestraHit3.ogg": "https://files.ballistica.net/cache/ba1/22/db/069cd352d268b36532fe44863a2c", - "assets/build/ba_data/audio/orchestraHit4.ogg": "https://files.ballistica.net/cache/ba1/0d/ca/e27abfc328e28c6ef394d7ae8820", - "assets/build/ba_data/audio/orchestraHitBig1.ogg": "https://files.ballistica.net/cache/ba1/b6/8f/310a8e3b4584274806ec4a623a37", - "assets/build/ba_data/audio/orchestraHitBig2.ogg": "https://files.ballistica.net/cache/ba1/36/7f/4d6affb3c51d5ab2d1f2c8161fbf", - "assets/build/ba_data/audio/penguin1.ogg": "https://files.ballistica.net/cache/ba1/05/e8/6a85b96b711a24d6b3ed85754de6", - "assets/build/ba_data/audio/penguin2.ogg": "https://files.ballistica.net/cache/ba1/a6/1c/684a4571e1e99b214ca21d600e41", - "assets/build/ba_data/audio/penguin3.ogg": "https://files.ballistica.net/cache/ba1/79/13/d728dd568a344cc7383a88a0f05a", - "assets/build/ba_data/audio/penguin4.ogg": "https://files.ballistica.net/cache/ba1/2d/f2/5b11c310268ef32a62b2ba4dcea2", - "assets/build/ba_data/audio/penguinDeath.ogg": "https://files.ballistica.net/cache/ba1/df/68/cd8363872bcef0b18d509685e3d0", - "assets/build/ba_data/audio/penguinFall.ogg": "https://files.ballistica.net/cache/ba1/a3/bb/28be81b10af2e47443e55e114878", - "assets/build/ba_data/audio/penguinHit1.ogg": "https://files.ballistica.net/cache/ba1/11/3a/9cd37ea4d2d61015c395d0e33815", - "assets/build/ba_data/audio/penguinHit2.ogg": "https://files.ballistica.net/cache/ba1/d2/5f/115f8eb45fff640967df5749383c", - "assets/build/ba_data/audio/pixie1.ogg": "https://files.ballistica.net/cache/ba1/f6/d6/8a1395d4d7305e8633f6e1caf0fb", - "assets/build/ba_data/audio/pixie2.ogg": "https://files.ballistica.net/cache/ba1/c0/5b/d0d2547b0887b7d7bbd81500b89a", - "assets/build/ba_data/audio/pixie3.ogg": "https://files.ballistica.net/cache/ba1/95/23/77e22310dd9377bb7a3444ac2bd7", - "assets/build/ba_data/audio/pixie4.ogg": "https://files.ballistica.net/cache/ba1/05/8b/81cf7b359746d76c762e2fd6004d", - "assets/build/ba_data/audio/pixieDeath.ogg": "https://files.ballistica.net/cache/ba1/e7/be/8a191fa33b425029a7e13625fa91", - "assets/build/ba_data/audio/pixieFall.ogg": "https://files.ballistica.net/cache/ba1/d5/64/34231aa7e9d336fa462cfaaec999", - "assets/build/ba_data/audio/pixieHit1.ogg": "https://files.ballistica.net/cache/ba1/e3/05/08b1c6f7e5906e6cb992dfbe514b", - "assets/build/ba_data/audio/pixieHit2.ogg": "https://files.ballistica.net/cache/ba1/ec/3f/c663c857d7530f216052ce814e97", - "assets/build/ba_data/audio/playerDeath.ogg": "https://files.ballistica.net/cache/ba1/96/a2/1e632a728ef300bcae2ff2d717a6", - "assets/build/ba_data/audio/playerLeft.ogg": "https://files.ballistica.net/cache/ba1/79/d8/7713140a3ede3b65e3bcdcba7d26", - "assets/build/ba_data/audio/pop01.ogg": "https://files.ballistica.net/cache/ba1/cc/48/4c7972a8ec6e7dbecc50debf05c9", - "assets/build/ba_data/audio/powerdown01.ogg": "https://files.ballistica.net/cache/ba1/a8/6d/9302b1a73bcbd9764f41875d7380", - "assets/build/ba_data/audio/powerup01.ogg": "https://files.ballistica.net/cache/ba1/fb/d4/deac2edc909c60ca651080a53794", - "assets/build/ba_data/audio/punch01.ogg": "https://files.ballistica.net/cache/ba1/55/4c/c31706350cfbb2a86af697848dab", - "assets/build/ba_data/audio/punchStrong01.ogg": "https://files.ballistica.net/cache/ba1/0d/7a/f1da7cbbd0597e5854a66efc2a88", - "assets/build/ba_data/audio/punchStrong02.ogg": "https://files.ballistica.net/cache/ba1/4e/c0/e100a891c673a56deeee605602b3", - "assets/build/ba_data/audio/punchSwish.ogg": "https://files.ballistica.net/cache/ba1/11/0c/d80e4d0842595fdc0923c4195ceb", - "assets/build/ba_data/audio/punchWeak01.ogg": "https://files.ballistica.net/cache/ba1/20/d3/08715bb8a195bc632c477469aed1", - "assets/build/ba_data/audio/raceBeep1.ogg": "https://files.ballistica.net/cache/ba1/53/5d/c54ae886ee8f56d3bb060fb0dfcb", - "assets/build/ba_data/audio/raceBeep2.ogg": "https://files.ballistica.net/cache/ba1/96/bc/455cf8d28acb205d13f01d4900bc", - "assets/build/ba_data/audio/refWhistle.ogg": "https://files.ballistica.net/cache/ba1/87/77/008ed6d8eac37f8b5aeabd8879c7", - "assets/build/ba_data/audio/robot1.ogg": "https://files.ballistica.net/cache/ba1/18/86/1ff23c315df417652e854b440c34", - "assets/build/ba_data/audio/robot2.ogg": "https://files.ballistica.net/cache/ba1/88/85/9f0ccaf6facb14a0a17d5ec89160", - "assets/build/ba_data/audio/robot3.ogg": "https://files.ballistica.net/cache/ba1/ac/92/647c8b99c83c1230d0709a27107b", - "assets/build/ba_data/audio/robot4.ogg": "https://files.ballistica.net/cache/ba1/ac/1e/6d1decef47d1fe68c36373f44cb4", - "assets/build/ba_data/audio/robotDeath.ogg": "https://files.ballistica.net/cache/ba1/0e/89/8e8dc3869dfa1349cfe6f400bd82", - "assets/build/ba_data/audio/robotFall.ogg": "https://files.ballistica.net/cache/ba1/02/d9/60eddc36b7ee6fbb02ae1ddb6b9e", - "assets/build/ba_data/audio/robotHit1.ogg": "https://files.ballistica.net/cache/ba1/eb/e2/f7f1492bd1ef17599b4253dea8e1", - "assets/build/ba_data/audio/robotHit2.ogg": "https://files.ballistica.net/cache/ba1/72/c3/3c9343953f884808f5452e6c7a1e", - "assets/build/ba_data/audio/runAwayMusic.ogg": "https://files.ballistica.net/cache/ba1/5a/d2/8dd3ec953d5a99a454250cee0cf2", - "assets/build/ba_data/audio/santa01.ogg": "https://files.ballistica.net/cache/ba1/f4/a4/18b599e1a8d2030e5ac71f57caad", - "assets/build/ba_data/audio/santa02.ogg": "https://files.ballistica.net/cache/ba1/c2/68/5bf7fc6c40706a830fa8feafd76d", - "assets/build/ba_data/audio/santa03.ogg": "https://files.ballistica.net/cache/ba1/0f/79/5ba921fe0af18aadc66b56443cd1", - "assets/build/ba_data/audio/santa04.ogg": "https://files.ballistica.net/cache/ba1/c7/7c/99c0b38cd9b457eafcc933efe0c4", - "assets/build/ba_data/audio/santa05.ogg": "https://files.ballistica.net/cache/ba1/e3/2f/03b8d771be498553d76dc3e1ca77", - "assets/build/ba_data/audio/santaDeath.ogg": "https://files.ballistica.net/cache/ba1/af/d2/17ef3bd225d342711fdaeaa13292", - "assets/build/ba_data/audio/santaFall.ogg": "https://files.ballistica.net/cache/ba1/3a/35/e7fd2c83bfa02fb4ef12226093bc", - "assets/build/ba_data/audio/santaHit01.ogg": "https://files.ballistica.net/cache/ba1/e5/a3/8212320d1f05b0abc8219f15283f", - "assets/build/ba_data/audio/santaHit02.ogg": "https://files.ballistica.net/cache/ba1/3f/56/d4f4afae2fe9f7d47fa57b2234c4", - "assets/build/ba_data/audio/santaHit03.ogg": "https://files.ballistica.net/cache/ba1/1d/63/5ba4653014fbc2885db708afd1ae", - "assets/build/ba_data/audio/santaHit04.ogg": "https://files.ballistica.net/cache/ba1/9c/fe/f0a5d119bf94ecd4547e81f12d7d", - "assets/build/ba_data/audio/scamper01.ogg": "https://files.ballistica.net/cache/ba1/b0/c0/77de611e53981f058e85d9d747b3", - "assets/build/ba_data/audio/scaryMusic.ogg": "https://files.ballistica.net/cache/ba1/62/a4/3f9af814e9a4796e994bde555a8f", - "assets/build/ba_data/audio/score.ogg": "https://files.ballistica.net/cache/ba1/5e/94/05dc50f166c99202a4aa2d106fff", - "assets/build/ba_data/audio/scoreHit01.ogg": "https://files.ballistica.net/cache/ba1/81/97/4ffd5ba4357e44df8f3ec37d75ed", - "assets/build/ba_data/audio/scoreHit02.ogg": "https://files.ballistica.net/cache/ba1/74/eb/220feb610faafde1e4601ff1dc65", - "assets/build/ba_data/audio/scoreIncrease.ogg": "https://files.ballistica.net/cache/ba1/cd/31/7ea93db05ec08d109bc53ff27114", - "assets/build/ba_data/audio/scoresEpicMusic.ogg": "https://files.ballistica.net/cache/ba1/16/63/0f6f47b8335573ae995d48671761", - "assets/build/ba_data/audio/shatter.ogg": "https://files.ballistica.net/cache/ba1/8c/10/27917e07d416be160445fbc51b30", - "assets/build/ba_data/audio/shieldDown.ogg": "https://files.ballistica.net/cache/ba1/f3/d8/039af57511dcf0c6a357a8607e31", - "assets/build/ba_data/audio/shieldHit.ogg": "https://files.ballistica.net/cache/ba1/ac/d8/191e528070dcfae914b1cd3a9ac3", - "assets/build/ba_data/audio/shieldUp.ogg": "https://files.ballistica.net/cache/ba1/eb/26/0d5329d330ee90542e8f7827ae9f", - "assets/build/ba_data/audio/skid01.ogg": "https://files.ballistica.net/cache/ba1/4f/0b/e12f1bd0b6e6b6246d5367ba492b", - "assets/build/ba_data/audio/slowEpicMusic.ogg": "https://files.ballistica.net/cache/ba1/5c/2e/7aa87fc4557c43009247e89d1a7e", - "assets/build/ba_data/audio/sparkle01.ogg": "https://files.ballistica.net/cache/ba1/06/97/865ba23d8393f0a6856e5ff9fa9f", - "assets/build/ba_data/audio/sparkle02.ogg": "https://files.ballistica.net/cache/ba1/e9/34/c7306677c23abe96b25005c4b227", - "assets/build/ba_data/audio/sparkle03.ogg": "https://files.ballistica.net/cache/ba1/fc/40/5883d06dc893f796276288494cda", - "assets/build/ba_data/audio/spawn.ogg": "https://files.ballistica.net/cache/ba1/1c/ad/832c7ca8efbd1933d05994b7f97c", - "assets/build/ba_data/audio/spazAttack01.ogg": "https://files.ballistica.net/cache/ba1/d0/af/5bba53f113f3ddd418da226a6383", - "assets/build/ba_data/audio/spazAttack02.ogg": "https://files.ballistica.net/cache/ba1/5c/99/cc38e0ef3afdce2e8957af33b100", - "assets/build/ba_data/audio/spazAttack03.ogg": "https://files.ballistica.net/cache/ba1/3c/1d/8c2d8fb2481e760da082cb976b40", - "assets/build/ba_data/audio/spazAttack04.ogg": "https://files.ballistica.net/cache/ba1/18/7c/d502771339dd6e0ac3425325ef7c", - "assets/build/ba_data/audio/spazDeath01.ogg": "https://files.ballistica.net/cache/ba1/41/96/bef46473014670f54ef9ea16df16", - "assets/build/ba_data/audio/spazEff.ogg": "https://files.ballistica.net/cache/ba1/70/72/d84808938005033bba5ca6955fef", - "assets/build/ba_data/audio/spazFall01.ogg": "https://files.ballistica.net/cache/ba1/aa/76/a7b3444ea49ff74f509108a22a66", - "assets/build/ba_data/audio/spazImpact01.ogg": "https://files.ballistica.net/cache/ba1/47/f1/58a6e673edfee76a535959ac574b", - "assets/build/ba_data/audio/spazImpact02.ogg": "https://files.ballistica.net/cache/ba1/1f/ca/ceb0cfe82f3269ecb595647d01f5", - "assets/build/ba_data/audio/spazImpact03.ogg": "https://files.ballistica.net/cache/ba1/7d/8a/6b5cb7d301808eb014a37e9b6d8f", - "assets/build/ba_data/audio/spazImpact04.ogg": "https://files.ballistica.net/cache/ba1/ad/32/6a3f980d5336cee41807efe6a9d6", - "assets/build/ba_data/audio/spazJump01.ogg": "https://files.ballistica.net/cache/ba1/77/b1/1478ab4c054f555d83f1a49d64b2", - "assets/build/ba_data/audio/spazJump02.ogg": "https://files.ballistica.net/cache/ba1/c3/70/f0acbf2c0916b2ac67b821c91372", - "assets/build/ba_data/audio/spazJump03.ogg": "https://files.ballistica.net/cache/ba1/cc/2c/66a30feb9b4781c8fbde12010ef5", - "assets/build/ba_data/audio/spazJump04.ogg": "https://files.ballistica.net/cache/ba1/91/83/cdcc15feadbd08dd4d899534ecf7", - "assets/build/ba_data/audio/spazOw.ogg": "https://files.ballistica.net/cache/ba1/1e/81/dc0302757a2d0ce8efbed226ce9e", - "assets/build/ba_data/audio/spazPickup01.ogg": "https://files.ballistica.net/cache/ba1/93/bf/c9b53b241bbec978c772c7e14caa", - "assets/build/ba_data/audio/spazScream01.ogg": "https://files.ballistica.net/cache/ba1/79/20/eb98e70397b0cd98149952753ef1", - "assets/build/ba_data/audio/splatter.ogg": "https://files.ballistica.net/cache/ba1/be/05/35059cebfb5658f7d434d32c94d1", - "assets/build/ba_data/audio/sportsMusic.ogg": "https://files.ballistica.net/cache/ba1/ff/cc/ba30edcc58ecc75ad4cf9f13e987", - "assets/build/ba_data/audio/stickyImpact.ogg": "https://files.ballistica.net/cache/ba1/5a/1c/bcfb5574c3ba2b8aec3d04d5937b", - "assets/build/ba_data/audio/superPunch.ogg": "https://files.ballistica.net/cache/ba1/ab/05/7ccdbb7ec4dc2da7e519644b7ab1", - "assets/build/ba_data/audio/superhero1.ogg": "https://files.ballistica.net/cache/ba1/2d/4b/d07a04dba349620a7b4f22e2340c", - "assets/build/ba_data/audio/superhero2.ogg": "https://files.ballistica.net/cache/ba1/35/b3/cf4479013786a22f2d378a998a15", - "assets/build/ba_data/audio/superhero3.ogg": "https://files.ballistica.net/cache/ba1/09/24/9aaf558d4eefad33845179b001f1", - "assets/build/ba_data/audio/superhero4.ogg": "https://files.ballistica.net/cache/ba1/3f/8e/219bab660637500a61f5be205b99", - "assets/build/ba_data/audio/superheroDeath.ogg": "https://files.ballistica.net/cache/ba1/d8/65/a0c7dc72b3a900ee3e9fc3a6c703", - "assets/build/ba_data/audio/superheroFall.ogg": "https://files.ballistica.net/cache/ba1/ba/21/c92b72275739cf682fe687fff10a", - "assets/build/ba_data/audio/superheroHit1.ogg": "https://files.ballistica.net/cache/ba1/fc/23/e15bb8d3e6daf77b4e393123d6f7", - "assets/build/ba_data/audio/superheroHit2.ogg": "https://files.ballistica.net/cache/ba1/f4/05/e2719c56ac77f3db1be03a0feac8", - "assets/build/ba_data/audio/survivalMusic.ogg": "https://files.ballistica.net/cache/ba1/69/45/5993fb4a9b6caba465feae60e3aa", - "assets/build/ba_data/audio/swip.ogg": "https://files.ballistica.net/cache/ba1/b2/fe/1a0796807eeb42160aeed59622f7", - "assets/build/ba_data/audio/swip2.ogg": "https://files.ballistica.net/cache/ba1/08/3d/12d4291235d240dd7e44dbe7f283", - "assets/build/ba_data/audio/swish.ogg": "https://files.ballistica.net/cache/ba1/33/41/3648e08fa50e2cf876f6ffa7fb3e", - "assets/build/ba_data/audio/swish2.ogg": "https://files.ballistica.net/cache/ba1/cc/67/8294681a9e9a88d055f33022a41f", - "assets/build/ba_data/audio/swish3.ogg": "https://files.ballistica.net/cache/ba1/06/35/7e03c8300a493d9c6ec4185b62fb", - "assets/build/ba_data/audio/tap.ogg": "https://files.ballistica.net/cache/ba1/30/7f/9f2a2aabfc63dfdb3e93106f3835", - "assets/build/ba_data/audio/technoHit01.ogg": "https://files.ballistica.net/cache/ba1/61/8a/d322dc58f7f41f34f2937a3879cf", - "assets/build/ba_data/audio/tick.ogg": "https://files.ballistica.net/cache/ba1/f5/cf/722bc46de90a550cab9ca11dd076", - "assets/build/ba_data/audio/ticking.ogg": "https://files.ballistica.net/cache/ba1/fb/55/55e5508fc180a67b2730d731856b", - "assets/build/ba_data/audio/tickingCrazy.ogg": "https://files.ballistica.net/cache/ba1/75/1c/43cea75988866fe0674883d70e08", - "assets/build/ba_data/audio/toTheDeathMusic.ogg": "https://files.ballistica.net/cache/ba1/ee/9a/9d2459da2a3fa0fbc977c639c5c6", - "assets/build/ba_data/audio/trashRummage.ogg": "https://files.ballistica.net/cache/ba1/ce/93/0e1b7d2155bcaccb585b3bcbf8b6", - "assets/build/ba_data/audio/victoryMusic.ogg": "https://files.ballistica.net/cache/ba1/6a/a7/0cf20971661de58dd3ee118856dc", - "assets/build/ba_data/audio/warnBeep.ogg": "https://files.ballistica.net/cache/ba1/51/ab/710c0882ab078f155ee574e124f4", - "assets/build/ba_data/audio/warnBeeps.ogg": "https://files.ballistica.net/cache/ba1/bc/b4/fed2b34f7ec47465b637b49e69fa", - "assets/build/ba_data/audio/warrior1.ogg": "https://files.ballistica.net/cache/ba1/fc/29/a88557dabe502eaa1f4e61e66050", - "assets/build/ba_data/audio/warrior2.ogg": "https://files.ballistica.net/cache/ba1/f1/37/cb391e6b920f278c5b007b381388", - "assets/build/ba_data/audio/warrior3.ogg": "https://files.ballistica.net/cache/ba1/8c/2e/d7c4c7a599a3a368f2d95f247127", - "assets/build/ba_data/audio/warrior4.ogg": "https://files.ballistica.net/cache/ba1/07/51/4796e3f9f9de9c5566740e951222", - "assets/build/ba_data/audio/warriorDeath.ogg": "https://files.ballistica.net/cache/ba1/d9/b6/c2e7f4a83928534e285f7ce1c922", - "assets/build/ba_data/audio/warriorFall.ogg": "https://files.ballistica.net/cache/ba1/2d/c5/ba39d507aa20f054feda013a9f21", - "assets/build/ba_data/audio/warriorHit1.ogg": "https://files.ballistica.net/cache/ba1/4f/83/1cbd4d2fb3e94e5e25979ed097ca", - "assets/build/ba_data/audio/warriorHit2.ogg": "https://files.ballistica.net/cache/ba1/be/ac/36bf2226134a7d319fd12fd6b28a", - "assets/build/ba_data/audio/whenJohnnyComesMarchingHomeMusic.ogg": "https://files.ballistica.net/cache/ba1/08/b1/21ee18cb2db336861c5a04d86f45", - "assets/build/ba_data/audio/witch1.ogg": "https://files.ballistica.net/cache/ba1/67/4e/05132bdb446fbdc1e1915089763b", - "assets/build/ba_data/audio/witch2.ogg": "https://files.ballistica.net/cache/ba1/57/a2/141d27861ab6a6177337d422e428", - "assets/build/ba_data/audio/witch3.ogg": "https://files.ballistica.net/cache/ba1/41/13/88fe3efdbc6b300ea74b8db0c816", - "assets/build/ba_data/audio/witch4.ogg": "https://files.ballistica.net/cache/ba1/1e/6a/67aaa75635a97116ca7bb5761051", - "assets/build/ba_data/audio/witchDeath.ogg": "https://files.ballistica.net/cache/ba1/22/33/2c7098263df931564f14815be5e8", - "assets/build/ba_data/audio/witchFall.ogg": "https://files.ballistica.net/cache/ba1/54/1c/d2de34a6985d56b469f10b7560ef", - "assets/build/ba_data/audio/witchHit1.ogg": "https://files.ballistica.net/cache/ba1/ae/24/430389e6bafba567a096b55228e6", - "assets/build/ba_data/audio/witchHit2.ogg": "https://files.ballistica.net/cache/ba1/c1/56/89955e8ab2fabaa5ff989bdf299e", - "assets/build/ba_data/audio/wizard1.ogg": "https://files.ballistica.net/cache/ba1/ff/6a/f81dc1a4656c6dffd1a36216d1b8", - "assets/build/ba_data/audio/wizard2.ogg": "https://files.ballistica.net/cache/ba1/52/43/f0e9af1d49b8d20bf561f8f9d3a9", - "assets/build/ba_data/audio/wizard3.ogg": "https://files.ballistica.net/cache/ba1/50/ba/716520f2f0137d8f86410a6089fb", - "assets/build/ba_data/audio/wizard4.ogg": "https://files.ballistica.net/cache/ba1/50/cc/2d239102cdc2ace02e79d8b0879c", - "assets/build/ba_data/audio/wizardDeath.ogg": "https://files.ballistica.net/cache/ba1/bb/4c/5e4dc54df830187c63a2bc7922b6", - "assets/build/ba_data/audio/wizardFall.ogg": "https://files.ballistica.net/cache/ba1/25/a5/21d69464843cb9f067541383468d", - "assets/build/ba_data/audio/wizardHit1.ogg": "https://files.ballistica.net/cache/ba1/10/47/be3966c620333be4ca9c30e1a2c4", - "assets/build/ba_data/audio/wizardHit2.ogg": "https://files.ballistica.net/cache/ba1/40/9a/0aed7b1bff3e69c257099ac26c1d", - "assets/build/ba_data/audio/woodDebrisFall.ogg": "https://files.ballistica.net/cache/ba1/94/03/59046559bc61e1e4b01078e778dd", - "assets/build/ba_data/audio/wrestler1.ogg": "https://files.ballistica.net/cache/ba1/52/71/c84d34f895c64d2fb38d880c737e", - "assets/build/ba_data/audio/wrestler2.ogg": "https://files.ballistica.net/cache/ba1/81/1f/c93c1b89d8d434fe84985d7d1af0", - "assets/build/ba_data/audio/wrestler3.ogg": "https://files.ballistica.net/cache/ba1/d8/2e/af82c6b47d77e9fa91b431ae03d1", - "assets/build/ba_data/audio/wrestler4.ogg": "https://files.ballistica.net/cache/ba1/7b/28/3aab8e16de76fc7453ed1e0886a8", - "assets/build/ba_data/audio/wrestlerDeath.ogg": "https://files.ballistica.net/cache/ba1/ae/b3/090c2525c3f697450a142458f6dc", - "assets/build/ba_data/audio/wrestlerFall.ogg": "https://files.ballistica.net/cache/ba1/1f/15/15fb12bb80fa7363b2ba88a4dce3", - "assets/build/ba_data/audio/wrestlerHit1.ogg": "https://files.ballistica.net/cache/ba1/90/b6/403ede16b60bdf089ce92079ef65", - "assets/build/ba_data/audio/wrestlerHit2.ogg": "https://files.ballistica.net/cache/ba1/d8/f7/4b4104842d9a408a9bb757cebabf", - "assets/build/ba_data/audio/zoeAttack01.ogg": "https://files.ballistica.net/cache/ba1/22/66/786bb399ac6bfc406f8fb0f6b3b4", - "assets/build/ba_data/audio/zoeAttack02.ogg": "https://files.ballistica.net/cache/ba1/37/42/60be96146c62bb29b10efae99fbe", - "assets/build/ba_data/audio/zoeAttack03.ogg": "https://files.ballistica.net/cache/ba1/0d/1f/9a71c8ce2aa31ffc2bdaa3341aed", - "assets/build/ba_data/audio/zoeAttack04.ogg": "https://files.ballistica.net/cache/ba1/52/e2/97d0299a564d2b7454fb742d5aab", - "assets/build/ba_data/audio/zoeDeath01.ogg": "https://files.ballistica.net/cache/ba1/fa/aa/f622e55e348e145955e27a4c3e57", - "assets/build/ba_data/audio/zoeEff.ogg": "https://files.ballistica.net/cache/ba1/42/c3/0bf8991471b650a1d2cd320c5ce3", - "assets/build/ba_data/audio/zoeFall01.ogg": "https://files.ballistica.net/cache/ba1/9e/12/ce19febfcbf2b43eb733dbd1626b", - "assets/build/ba_data/audio/zoeImpact01.ogg": "https://files.ballistica.net/cache/ba1/01/8c/90ab117e9c73fc33d556d18b079a", - "assets/build/ba_data/audio/zoeImpact02.ogg": "https://files.ballistica.net/cache/ba1/01/69/21c09400f109285b9d8cb8814d69", - "assets/build/ba_data/audio/zoeImpact03.ogg": "https://files.ballistica.net/cache/ba1/61/72/5bf11492feba95994f75040e36ce", - "assets/build/ba_data/audio/zoeImpact04.ogg": "https://files.ballistica.net/cache/ba1/c1/b1/a1159e8caeb1f5b80fcff55e8244", - "assets/build/ba_data/audio/zoeJump01.ogg": "https://files.ballistica.net/cache/ba1/b1/f0/5220fdb723a42e9177a99f9f5bdc", - "assets/build/ba_data/audio/zoeJump02.ogg": "https://files.ballistica.net/cache/ba1/71/01/4b2e5d9e2fcdfba254290c71a002", - "assets/build/ba_data/audio/zoeJump03.ogg": "https://files.ballistica.net/cache/ba1/66/3b/8ffff9c3d0280b7d1a15c92dfa94", - "assets/build/ba_data/audio/zoeOw.ogg": "https://files.ballistica.net/cache/ba1/60/ad/38269b7f1c7dc20cb9a506cd0681", - "assets/build/ba_data/audio/zoePickup01.ogg": "https://files.ballistica.net/cache/ba1/72/85/d6fc4d16b7081d91fba2850b5b10", - "assets/build/ba_data/audio/zoeScream01.ogg": "https://files.ballistica.net/cache/ba1/e9/ae/1d674d0c086eaa0bd1c3b1db0505", + "assets/build/ba_data/audio/achievement.ogg": "https://files.ballistica.net/cache/ba1/4c/ab/e1154f41cef441f99a1c9fd83235", + "assets/build/ba_data/audio/actionHero1.ogg": "https://files.ballistica.net/cache/ba1/96/ea/60517e6a08b88cb72b781fe31f90", + "assets/build/ba_data/audio/actionHero2.ogg": "https://files.ballistica.net/cache/ba1/96/a5/f9a96d2494371f2649f26fe87c59", + "assets/build/ba_data/audio/actionHero3.ogg": "https://files.ballistica.net/cache/ba1/90/c4/a2b396109a1795bfc5346b440966", + "assets/build/ba_data/audio/actionHero4.ogg": "https://files.ballistica.net/cache/ba1/a6/98/15a57f791cf06e41fa356722b6e0", + "assets/build/ba_data/audio/actionHeroDeath.ogg": "https://files.ballistica.net/cache/ba1/ac/3c/5667d984ed9699337d061a5f097d", + "assets/build/ba_data/audio/actionHeroFall.ogg": "https://files.ballistica.net/cache/ba1/93/02/89b89e8dd9d1dda5bfcaaa396837", + "assets/build/ba_data/audio/actionHeroHit1.ogg": "https://files.ballistica.net/cache/ba1/88/81/5d5611d5ff0efdc20c85b8332fa5", + "assets/build/ba_data/audio/actionHeroHit2.ogg": "https://files.ballistica.net/cache/ba1/0b/a3/fca8a5a2ca4887cda6e346052fdf", + "assets/build/ba_data/audio/activateBeep.ogg": "https://files.ballistica.net/cache/ba1/a9/ad/fb033737da69cdef29d01163bd27", + "assets/build/ba_data/audio/agent1.ogg": "https://files.ballistica.net/cache/ba1/ed/d1/509b2f050261aba148502c429735", + "assets/build/ba_data/audio/agent2.ogg": "https://files.ballistica.net/cache/ba1/c8/93/bad055de98ec67ab4d9459e542d6", + "assets/build/ba_data/audio/agent3.ogg": "https://files.ballistica.net/cache/ba1/e3/a0/187c8efe456bf430e780d4218298", + "assets/build/ba_data/audio/agent4.ogg": "https://files.ballistica.net/cache/ba1/08/f0/c65c9ddf2f4a24799794707c3558", + "assets/build/ba_data/audio/agentDeath.ogg": "https://files.ballistica.net/cache/ba1/c4/2d/0ce2fa5e094f33d50180585d52dd", + "assets/build/ba_data/audio/agentFall.ogg": "https://files.ballistica.net/cache/ba1/19/2e/ca49382dddb3db67bfe5df9a34eb", + "assets/build/ba_data/audio/agentHit1.ogg": "https://files.ballistica.net/cache/ba1/74/a3/dfacee4b64a61bd9095d45d686ff", + "assets/build/ba_data/audio/agentHit2.ogg": "https://files.ballistica.net/cache/ba1/42/8b/b0202b366069c2b5f6eb16591241", + "assets/build/ba_data/audio/alarm.ogg": "https://files.ballistica.net/cache/ba1/2e/40/887745329353b6cd33cd6d06c6b4", + "assets/build/ba_data/audio/ali1.ogg": "https://files.ballistica.net/cache/ba1/a2/1e/eaba9cc06b7510c78f66dadb53ee", + "assets/build/ba_data/audio/ali2.ogg": "https://files.ballistica.net/cache/ba1/63/87/44cb7e7df1598e7f26cff7f6a090", + "assets/build/ba_data/audio/ali3.ogg": "https://files.ballistica.net/cache/ba1/52/53/f216b23929a6faf6c7c5cecd17f2", + "assets/build/ba_data/audio/ali4.ogg": "https://files.ballistica.net/cache/ba1/f1/05/aca331991f970b632420018f7eea", + "assets/build/ba_data/audio/aliDeath.ogg": "https://files.ballistica.net/cache/ba1/ac/d0/c728fd363f4f762fd156bfd65c0f", + "assets/build/ba_data/audio/aliFall.ogg": "https://files.ballistica.net/cache/ba1/55/37/b25b38109f524244056e16f74034", + "assets/build/ba_data/audio/aliHit1.ogg": "https://files.ballistica.net/cache/ba1/7f/b7/5a6d2e4fcd33b9adb0da4f6314e8", + "assets/build/ba_data/audio/aliHit2.ogg": "https://files.ballistica.net/cache/ba1/8a/3b/96fdd4502a464d7c7699e8e9bdcf", + "assets/build/ba_data/audio/alien1.ogg": "https://files.ballistica.net/cache/ba1/41/9c/d631e0a9efd17f147736c8611b98", + "assets/build/ba_data/audio/alien2.ogg": "https://files.ballistica.net/cache/ba1/48/a4/484a00ff524802f13f2e08be6080", + "assets/build/ba_data/audio/alien3.ogg": "https://files.ballistica.net/cache/ba1/75/cd/8813e4d1978627d4225f32f94c98", + "assets/build/ba_data/audio/alien4.ogg": "https://files.ballistica.net/cache/ba1/b8/b3/37dabea0e5d41df99a5873f4b991", + "assets/build/ba_data/audio/alienDeath.ogg": "https://files.ballistica.net/cache/ba1/dd/0a/4d7817c706318f12b121a522a8d5", + "assets/build/ba_data/audio/alienFall.ogg": "https://files.ballistica.net/cache/ba1/5c/fc/634329fcf55a24a4ffcccbfd84d9", + "assets/build/ba_data/audio/alienHit1.ogg": "https://files.ballistica.net/cache/ba1/6f/cc/b363c0d88cc5f9d014e912b32d86", + "assets/build/ba_data/audio/alienHit2.ogg": "https://files.ballistica.net/cache/ba1/f5/ce/639fa986b114e1384d054c14ac5c", + "assets/build/ba_data/audio/announceEight.ogg": "https://files.ballistica.net/cache/ba1/ab/b4/11a149ed6ee54e1fd0a0877ead3e", + "assets/build/ba_data/audio/announceFive.ogg": "https://files.ballistica.net/cache/ba1/02/0d/56be5e6d0924cb0d8de27905c5e8", + "assets/build/ba_data/audio/announceFour.ogg": "https://files.ballistica.net/cache/ba1/04/ed/e35301b5be093bba4e766b3a71ae", + "assets/build/ba_data/audio/announceNine.ogg": "https://files.ballistica.net/cache/ba1/59/d6/736c75da6a82bf4681ff4ac106b7", + "assets/build/ba_data/audio/announceOne.ogg": "https://files.ballistica.net/cache/ba1/07/37/0739ea4b2b39cdf85e9506e2e05b", + "assets/build/ba_data/audio/announceSeven.ogg": "https://files.ballistica.net/cache/ba1/98/6a/87cdaa970d66ab5ad133f31fdd99", + "assets/build/ba_data/audio/announceSix.ogg": "https://files.ballistica.net/cache/ba1/fc/a9/4dd925835804ede9ed12aabff466", + "assets/build/ba_data/audio/announceTen.ogg": "https://files.ballistica.net/cache/ba1/66/6e/2af3f644d2b30cca793b2ef99d22", + "assets/build/ba_data/audio/announceThree.ogg": "https://files.ballistica.net/cache/ba1/db/92/389b17e197a80e85cc0b5a34c70c", + "assets/build/ba_data/audio/announceTwo.ogg": "https://files.ballistica.net/cache/ba1/e1/56/fba827af6da1bda1d5122eee3061", + "assets/build/ba_data/audio/assassin1.ogg": "https://files.ballistica.net/cache/ba1/aa/6f/cdb3d3deb823296735676b025a88", + "assets/build/ba_data/audio/assassin2.ogg": "https://files.ballistica.net/cache/ba1/b7/c3/60dc64f5417e22763b61515e4110", + "assets/build/ba_data/audio/assassin3.ogg": "https://files.ballistica.net/cache/ba1/f3/bc/c20858849ce290c3beddf3c148e3", + "assets/build/ba_data/audio/assassin4.ogg": "https://files.ballistica.net/cache/ba1/7e/74/3a4320e52e03924b70b9a30fe676", + "assets/build/ba_data/audio/assassinDeath.ogg": "https://files.ballistica.net/cache/ba1/e7/2d/9b14cd07c0db556c6022dbc2a29a", + "assets/build/ba_data/audio/assassinFall.ogg": "https://files.ballistica.net/cache/ba1/20/d3/d94ac4cfcfcb90725c15d0feca49", + "assets/build/ba_data/audio/assassinHit1.ogg": "https://files.ballistica.net/cache/ba1/2b/18/ae15ef011e17e0d0a3dbd5d5373d", + "assets/build/ba_data/audio/assassinHit2.ogg": "https://files.ballistica.net/cache/ba1/c4/b6/3b522c094896fcf103b3923e27d2", + "assets/build/ba_data/audio/bear1.ogg": "https://files.ballistica.net/cache/ba1/2f/41/d6ceef1c2d9e2eb93fc4b2d811ad", + "assets/build/ba_data/audio/bear2.ogg": "https://files.ballistica.net/cache/ba1/4d/53/d79bebd3ea5943dc58aa4a0e9423", + "assets/build/ba_data/audio/bear3.ogg": "https://files.ballistica.net/cache/ba1/25/35/844cdfac4d8b509fecab363699fd", + "assets/build/ba_data/audio/bear4.ogg": "https://files.ballistica.net/cache/ba1/08/bb/b39664fa93a7db1f02d64f841ea6", + "assets/build/ba_data/audio/bearDeath.ogg": "https://files.ballistica.net/cache/ba1/77/b6/36245034a174b9523a8881c93c2c", + "assets/build/ba_data/audio/bearFall.ogg": "https://files.ballistica.net/cache/ba1/4f/23/8c8d7c9f6bd4de2bfe942611185d", + "assets/build/ba_data/audio/bearHit1.ogg": "https://files.ballistica.net/cache/ba1/f6/6e/6122b803136020403d30f1ea5013", + "assets/build/ba_data/audio/bearHit2.ogg": "https://files.ballistica.net/cache/ba1/8c/d3/4feb37dd4ae7fa55d0e3a8dd8398", + "assets/build/ba_data/audio/bellHigh.ogg": "https://files.ballistica.net/cache/ba1/c2/68/62386652a3ded182ba512fe1b580", + "assets/build/ba_data/audio/bellLow.ogg": "https://files.ballistica.net/cache/ba1/25/8b/826780179e3550b8bab7cfe3b1ca", + "assets/build/ba_data/audio/bellMed.ogg": "https://files.ballistica.net/cache/ba1/cf/0f/c33b3ffd7d35f28dd2bf57f57dd1", + "assets/build/ba_data/audio/bigImpact.ogg": "https://files.ballistica.net/cache/ba1/3a/0f/075ddb45b3e3a9b0483ed4d57b3c", + "assets/build/ba_data/audio/bigImpact2.ogg": "https://files.ballistica.net/cache/ba1/86/ff/383b5b2cdb0b41eb795e250daafb", + "assets/build/ba_data/audio/blank.ogg": "https://files.ballistica.net/cache/ba1/56/59/a71905187964480718fb38757c06", + "assets/build/ba_data/audio/blip.ogg": "https://files.ballistica.net/cache/ba1/72/fa/a13c5c75972469b19eea5e74c80d", + "assets/build/ba_data/audio/block.ogg": "https://files.ballistica.net/cache/ba1/ca/05/1c3062d40871a620caf9e67de970", + "assets/build/ba_data/audio/bombDrop01.ogg": "https://files.ballistica.net/cache/ba1/6d/cd/46a035a85f960c2303173f2c82d5", + "assets/build/ba_data/audio/bombDrop02.ogg": "https://files.ballistica.net/cache/ba1/c7/4a/245e66d68a7cc99f3d2341e4aacf", + "assets/build/ba_data/audio/bombRoll01.ogg": "https://files.ballistica.net/cache/ba1/77/af/1688cc31b5ede80b5ec0c9ca268c", + "assets/build/ba_data/audio/bones1.ogg": "https://files.ballistica.net/cache/ba1/da/65/58b60dd8cde4ba9c99cdf4e52c24", + "assets/build/ba_data/audio/bones2.ogg": "https://files.ballistica.net/cache/ba1/b3/8a/c31b67e3bdfb7f34706695795661", + "assets/build/ba_data/audio/bones3.ogg": "https://files.ballistica.net/cache/ba1/13/ba/c4a356d9bff8b8d7086de7b5f4ed", + "assets/build/ba_data/audio/bonesDeath.ogg": "https://files.ballistica.net/cache/ba1/9f/0f/3e90549fd84443759f133d2c4631", + "assets/build/ba_data/audio/bonesFall.ogg": "https://files.ballistica.net/cache/ba1/4d/34/19b792e5779c41454e11cb9188d9", + "assets/build/ba_data/audio/boo.ogg": "https://files.ballistica.net/cache/ba1/b4/47/555501d21d992ac5e8324200f690", + "assets/build/ba_data/audio/boxDrop.ogg": "https://files.ballistica.net/cache/ba1/f7/31/5c203554a50c9e449ef44c536149", + "assets/build/ba_data/audio/boxingBell.ogg": "https://files.ballistica.net/cache/ba1/02/08/28d77f45440524863d74a8fed816", + "assets/build/ba_data/audio/bunny1.ogg": "https://files.ballistica.net/cache/ba1/b1/e4/484c57751a7f766b17782981153f", + "assets/build/ba_data/audio/bunny2.ogg": "https://files.ballistica.net/cache/ba1/8b/b6/98baa48c680afdfb2a213d243d0a", + "assets/build/ba_data/audio/bunny3.ogg": "https://files.ballistica.net/cache/ba1/d9/2d/aa8f4a711a0c852b10832be69a1a", + "assets/build/ba_data/audio/bunny4.ogg": "https://files.ballistica.net/cache/ba1/09/c1/fd65d3d7d8e0fd49ec2cb7cc9115", + "assets/build/ba_data/audio/bunnyDeath.ogg": "https://files.ballistica.net/cache/ba1/5b/64/27e47283e4eba8b11fa5948f7e81", + "assets/build/ba_data/audio/bunnyFall.ogg": "https://files.ballistica.net/cache/ba1/93/58/13b596c3f2c5f4c6d94c864e08ea", + "assets/build/ba_data/audio/bunnyHit1.ogg": "https://files.ballistica.net/cache/ba1/3b/55/578f7d270e21c8510e8706961bb8", + "assets/build/ba_data/audio/bunnyHit2.ogg": "https://files.ballistica.net/cache/ba1/bf/a5/216d97d599411ec0598b8b90c371", + "assets/build/ba_data/audio/bunnyJump.ogg": "https://files.ballistica.net/cache/ba1/7f/a5/9f1687202efb69ccd552cf0304c8", + "assets/build/ba_data/audio/cashRegister.ogg": "https://files.ballistica.net/cache/ba1/53/1a/e6766cb6638356a4b0ac64f19d21", + "assets/build/ba_data/audio/cashRegister2.ogg": "https://files.ballistica.net/cache/ba1/43/e4/c3cd7c0815c1fd9b6ccaa732d764", + "assets/build/ba_data/audio/charSelectMusic.ogg": "https://files.ballistica.net/cache/ba1/24/bb/c00f21c532be0161883be43373fa", + "assets/build/ba_data/audio/cheer.ogg": "https://files.ballistica.net/cache/ba1/b4/76/fe95993a5352fc334c2bcf072473", + "assets/build/ba_data/audio/click01.ogg": "https://files.ballistica.net/cache/ba1/0a/a4/3c97fba01ca7f3af22dd65031b81", + "assets/build/ba_data/audio/corkPop.ogg": "https://files.ballistica.net/cache/ba1/ea/3b/ca7e3eaf73d4d03326da4516f34d", + "assets/build/ba_data/audio/cowboy1.ogg": "https://files.ballistica.net/cache/ba1/a0/6c/f7f17eee09b79d3c95f6337d6f7a", + "assets/build/ba_data/audio/cowboy2.ogg": "https://files.ballistica.net/cache/ba1/9f/c3/a552ed6626c239e383171fbd7730", + "assets/build/ba_data/audio/cowboy3.ogg": "https://files.ballistica.net/cache/ba1/16/9c/e1c01e11c4d3495e56e427979d1a", + "assets/build/ba_data/audio/cowboy4.ogg": "https://files.ballistica.net/cache/ba1/bc/7f/97671bbd2552534035ef576462c5", + "assets/build/ba_data/audio/cowboyDeath.ogg": "https://files.ballistica.net/cache/ba1/c6/09/f94800a39c279407331ed69b9502", + "assets/build/ba_data/audio/cowboyFall.ogg": "https://files.ballistica.net/cache/ba1/32/74/e9d54e250ec301a2f86a121bf405", + "assets/build/ba_data/audio/cowboyHit1.ogg": "https://files.ballistica.net/cache/ba1/32/4d/fcf7083a0de971423987ad4f12af", + "assets/build/ba_data/audio/cowboyHit2.ogg": "https://files.ballistica.net/cache/ba1/b1/a2/dd38ff16ad4119c709bedc9791b8", + "assets/build/ba_data/audio/crowdChant.ogg": "https://files.ballistica.net/cache/ba1/6f/22/43eaf15ea29061f90eac44086c24", + "assets/build/ba_data/audio/cyborg1.ogg": "https://files.ballistica.net/cache/ba1/d9/a0/84dc9019a0201bdac81c445fe1f1", + "assets/build/ba_data/audio/cyborg2.ogg": "https://files.ballistica.net/cache/ba1/22/e9/776ab7fd9c4cc87ab4969417fa0b", + "assets/build/ba_data/audio/cyborg3.ogg": "https://files.ballistica.net/cache/ba1/a5/15/ea26fbd1f9b90c7b5315a9228178", + "assets/build/ba_data/audio/cyborg4.ogg": "https://files.ballistica.net/cache/ba1/6a/70/5422e02532cc69222a24edbddc27", + "assets/build/ba_data/audio/cyborgDeath.ogg": "https://files.ballistica.net/cache/ba1/99/a2/4266aeb332eb7c858ab9f5aa40b6", + "assets/build/ba_data/audio/cyborgFall.ogg": "https://files.ballistica.net/cache/ba1/b5/7f/163c3a7e938454daa4c8e0e24072", + "assets/build/ba_data/audio/cyborgHit1.ogg": "https://files.ballistica.net/cache/ba1/f1/e6/82c2e27b36ceaa0996f08c0e0dfa", + "assets/build/ba_data/audio/cyborgHit2.ogg": "https://files.ballistica.net/cache/ba1/c3/00/b38ff84d269e4a2e7de2e7efb806", + "assets/build/ba_data/audio/cymbal.ogg": "https://files.ballistica.net/cache/ba1/62/f9/0c5310d9c64c187c33c43dff4c89", + "assets/build/ba_data/audio/debrisFall.ogg": "https://files.ballistica.net/cache/ba1/65/54/1aa7c3ebeab78da86e08017e5124", + "assets/build/ba_data/audio/deek.ogg": "https://files.ballistica.net/cache/ba1/a4/fc/9a28514f77e23f4d412dc954b699", + "assets/build/ba_data/audio/deek2.ogg": "https://files.ballistica.net/cache/ba1/8c/ff/e5cafbb7acfd90c5f1666d1851d3", + "assets/build/ba_data/audio/ding.ogg": "https://files.ballistica.net/cache/ba1/c5/1b/568e1a8a633281c34f26d2b6d996", + "assets/build/ba_data/audio/dingSmall.ogg": "https://files.ballistica.net/cache/ba1/79/79/184cb2b1c26d78c01a2a870904d8", + "assets/build/ba_data/audio/dingSmallHigh.ogg": "https://files.ballistica.net/cache/ba1/75/54/e266d3e474a00848a9d831a06793", + "assets/build/ba_data/audio/dripity.ogg": "https://files.ballistica.net/cache/ba1/a1/a1/5448dfb9616ae579e65eeb1ab97c", + "assets/build/ba_data/audio/drumRoll.ogg": "https://files.ballistica.net/cache/ba1/02/0b/6c9e0d1129dc22c6b7f49213e2a9", + "assets/build/ba_data/audio/error.ogg": "https://files.ballistica.net/cache/ba1/ae/2b/b07689e388770e84a45ff439a15b", + "assets/build/ba_data/audio/explosion01.ogg": "https://files.ballistica.net/cache/ba1/17/17/15af19b044d3d8a7ab7f52307ffd", + "assets/build/ba_data/audio/explosion02.ogg": "https://files.ballistica.net/cache/ba1/24/96/8f546c83cabd69309959339a7a1d", + "assets/build/ba_data/audio/explosion03.ogg": "https://files.ballistica.net/cache/ba1/df/bb/b449ad108807e1f551e87f766ec8", + "assets/build/ba_data/audio/explosion04.ogg": "https://files.ballistica.net/cache/ba1/98/83/c951977471fdeae6ac0c4789e383", + "assets/build/ba_data/audio/explosion05.ogg": "https://files.ballistica.net/cache/ba1/eb/6b/5f2fac209da45843c7dd4544d924", + "assets/build/ba_data/audio/fanfare.ogg": "https://files.ballistica.net/cache/ba1/9d/fd/46c70880354037733ea23d162b35", + "assets/build/ba_data/audio/flagCatcherMusic.ogg": "https://files.ballistica.net/cache/ba1/ec/69/cab794be00936090427025b42161", + "assets/build/ba_data/audio/flyingMusic.ogg": "https://files.ballistica.net/cache/ba1/61/e9/f62150d91de8893f9494d3529654", + "assets/build/ba_data/audio/foghorn.ogg": "https://files.ballistica.net/cache/ba1/30/49/d661a0c712f91c6cc259f56c1fd1", + "assets/build/ba_data/audio/footImpact01.ogg": "https://files.ballistica.net/cache/ba1/9b/41/0ec70413973bb390fde2568442e5", + "assets/build/ba_data/audio/footImpact02.ogg": "https://files.ballistica.net/cache/ba1/a9/c0/6051510e0d91f6d6b1da1b0e0d3b", + "assets/build/ba_data/audio/footImpact03.ogg": "https://files.ballistica.net/cache/ba1/7f/93/95f6aad73fef701da563117e5c24", + "assets/build/ba_data/audio/forwardMarchMusic.ogg": "https://files.ballistica.net/cache/ba1/3c/0e/8462b7a99fb01b280319e5f694ed", + "assets/build/ba_data/audio/freeze.ogg": "https://files.ballistica.net/cache/ba1/14/f3/bff7ae39c6592fc39e0c664bbd3d", + "assets/build/ba_data/audio/frosty01.ogg": "https://files.ballistica.net/cache/ba1/32/70/f234804610641c2a1c9700c68d3d", + "assets/build/ba_data/audio/frosty02.ogg": "https://files.ballistica.net/cache/ba1/87/9e/03f631dd692267a63ae9609aba22", + "assets/build/ba_data/audio/frosty03.ogg": "https://files.ballistica.net/cache/ba1/f1/b5/cb19195ebac98386ac76581d7dc7", + "assets/build/ba_data/audio/frosty04.ogg": "https://files.ballistica.net/cache/ba1/99/55/9a70ee58a7170631fb29c1958295", + "assets/build/ba_data/audio/frosty05.ogg": "https://files.ballistica.net/cache/ba1/c1/16/a75511bcc29cd4e829cf5c24763b", + "assets/build/ba_data/audio/frostyDeath.ogg": "https://files.ballistica.net/cache/ba1/4d/7c/0f2bc1900cb5124904375130d680", + "assets/build/ba_data/audio/frostyFall.ogg": "https://files.ballistica.net/cache/ba1/81/84/620019b5f9df0dbb3fef2ceee79f", + "assets/build/ba_data/audio/frostyHit01.ogg": "https://files.ballistica.net/cache/ba1/f4/d1/feb64d6f9955ba8fdbd8cf096095", + "assets/build/ba_data/audio/frostyHit02.ogg": "https://files.ballistica.net/cache/ba1/df/4a/909fd74c4afd04931f82dfd5aab6", + "assets/build/ba_data/audio/frostyHit03.ogg": "https://files.ballistica.net/cache/ba1/44/65/82ccb01e1d1f606a45a79e9ff172", + "assets/build/ba_data/audio/fuse01.ogg": "https://files.ballistica.net/cache/ba1/ec/0c/d47db6eb3e362049521e3d3af5b3", + "assets/build/ba_data/audio/gladiator1.ogg": "https://files.ballistica.net/cache/ba1/35/1c/b90ffecf5f095749ff29997cb9ca", + "assets/build/ba_data/audio/gladiator2.ogg": "https://files.ballistica.net/cache/ba1/ca/c3/aad6747d33d62d6d3865e079bab5", + "assets/build/ba_data/audio/gladiator3.ogg": "https://files.ballistica.net/cache/ba1/09/30/8cf43ba318aa7046687117cabf60", + "assets/build/ba_data/audio/gladiator4.ogg": "https://files.ballistica.net/cache/ba1/bc/66/1fd1973e42d40ae51896f2c90234", + "assets/build/ba_data/audio/gladiatorDeath.ogg": "https://files.ballistica.net/cache/ba1/49/bb/71d2400bcc98e42e6b34cb5d56eb", + "assets/build/ba_data/audio/gladiatorFall.ogg": "https://files.ballistica.net/cache/ba1/98/55/939edd78fa816acbd15b65f49f17", + "assets/build/ba_data/audio/gladiatorHit1.ogg": "https://files.ballistica.net/cache/ba1/67/e7/4a67a0877f6df365bc7359e40414", + "assets/build/ba_data/audio/gladiatorHit2.ogg": "https://files.ballistica.net/cache/ba1/d4/e4/ace3958dca54ad979addb2432d62", + "assets/build/ba_data/audio/gong.ogg": "https://files.ballistica.net/cache/ba1/98/f6/578cc6e6c8ac95556ef1409e679b", + "assets/build/ba_data/audio/grandRompMusic.ogg": "https://files.ballistica.net/cache/ba1/67/71/58d76aa5504d3addf9b6fa0a1796", + "assets/build/ba_data/audio/gravelSkid.ogg": "https://files.ballistica.net/cache/ba1/53/87/6ad837fa0f1154d36d10908d8ed5", + "assets/build/ba_data/audio/gunCocking.ogg": "https://files.ballistica.net/cache/ba1/d8/83/6fcc5cc3ee12c1cc19e2bddf0f90", + "assets/build/ba_data/audio/healthPowerup.ogg": "https://files.ballistica.net/cache/ba1/ff/f1/e974a389f74a33c98f63a1961cc9", + "assets/build/ba_data/audio/hiss.ogg": "https://files.ballistica.net/cache/ba1/49/b6/446f8436367be94c24e3c570fd4d", + "assets/build/ba_data/audio/impactHard.ogg": "https://files.ballistica.net/cache/ba1/af/bd/2b72668c76820b55d4c06df02071", + "assets/build/ba_data/audio/impactHard2.ogg": "https://files.ballistica.net/cache/ba1/89/d8/d5b6836ac1bdad2044332e732dd5", + "assets/build/ba_data/audio/impactHard3.ogg": "https://files.ballistica.net/cache/ba1/4b/09/f355150897c36b48335525b228be", + "assets/build/ba_data/audio/impactMedium.ogg": "https://files.ballistica.net/cache/ba1/d9/6c/204f5d4f85b877672132f133b7db", + "assets/build/ba_data/audio/impactMedium2.ogg": "https://files.ballistica.net/cache/ba1/61/48/5c0ced953eaea7624a23f4887227", + "assets/build/ba_data/audio/jack01.ogg": "https://files.ballistica.net/cache/ba1/02/e8/5be330fc5865d3b724a9e5e5ca85", + "assets/build/ba_data/audio/jack02.ogg": "https://files.ballistica.net/cache/ba1/57/f5/1c45ea733da3d04e364cca9fd9f6", + "assets/build/ba_data/audio/jack03.ogg": "https://files.ballistica.net/cache/ba1/31/8e/afd5363437428632528209bff749", + "assets/build/ba_data/audio/jack04.ogg": "https://files.ballistica.net/cache/ba1/5a/fb/0d5d6bf3d0ca57a9ae4e9112d147", + "assets/build/ba_data/audio/jack05.ogg": "https://files.ballistica.net/cache/ba1/43/5d/9e5b46debd96873945d67d693a2d", + "assets/build/ba_data/audio/jack06.ogg": "https://files.ballistica.net/cache/ba1/70/ba/97c0e018f09cb03b75b47cabc1a5", + "assets/build/ba_data/audio/jackDeath01.ogg": "https://files.ballistica.net/cache/ba1/57/a8/ab8bfe47d4250f82333d7cd85e71", + "assets/build/ba_data/audio/jackFall01.ogg": "https://files.ballistica.net/cache/ba1/d5/94/d39edbd5e097a224b55b121db8ae", + "assets/build/ba_data/audio/jackHit01.ogg": "https://files.ballistica.net/cache/ba1/c2/86/c7d5064ecba1fbcf4aa118c2a15d", + "assets/build/ba_data/audio/jackHit02.ogg": "https://files.ballistica.net/cache/ba1/26/c2/765be6c3ef0700ee56453047de03", + "assets/build/ba_data/audio/jackHit03.ogg": "https://files.ballistica.net/cache/ba1/41/65/744455d8ee80865fdd08e9640265", + "assets/build/ba_data/audio/jackHit04.ogg": "https://files.ballistica.net/cache/ba1/ba/e7/5deae42568d4a10360ba9257d999", + "assets/build/ba_data/audio/jackHit05.ogg": "https://files.ballistica.net/cache/ba1/62/1e/6ffd348db0b0cd8ee8b73a5b2afe", + "assets/build/ba_data/audio/jackHit06.ogg": "https://files.ballistica.net/cache/ba1/cf/2d/406106b6009dca703703702cf465", + "assets/build/ba_data/audio/jackHit07.ogg": "https://files.ballistica.net/cache/ba1/86/52/357eab91c4050172bbc1019300e8", + "assets/build/ba_data/audio/jumpsuit1.ogg": "https://files.ballistica.net/cache/ba1/11/c0/b88288b3c041a34c1e343782fade", + "assets/build/ba_data/audio/jumpsuit2.ogg": "https://files.ballistica.net/cache/ba1/d9/e3/599946e2dd2f2303be60c31928d2", + "assets/build/ba_data/audio/jumpsuit3.ogg": "https://files.ballistica.net/cache/ba1/5f/30/726f25efa091fb9e5b73941d9816", + "assets/build/ba_data/audio/jumpsuit4.ogg": "https://files.ballistica.net/cache/ba1/e0/3a/df647695b2e6f5b0d938646e5bd8", + "assets/build/ba_data/audio/jumpsuitDeath.ogg": "https://files.ballistica.net/cache/ba1/48/13/93b0b49d2ba0c917604adf669d3a", + "assets/build/ba_data/audio/jumpsuitFall.ogg": "https://files.ballistica.net/cache/ba1/e1/16/9280ddce8a87e1f2f9a938bd645b", + "assets/build/ba_data/audio/jumpsuitHit1.ogg": "https://files.ballistica.net/cache/ba1/cf/45/9104a510a397860b137289cec17a", + "assets/build/ba_data/audio/jumpsuitHit2.ogg": "https://files.ballistica.net/cache/ba1/7e/9f/229554af0aa830835c5d40aeff88", + "assets/build/ba_data/audio/kronk1.ogg": "https://files.ballistica.net/cache/ba1/2d/6a/c8a173ed0daf6ca8220f94c6c3c3", + "assets/build/ba_data/audio/kronk10.ogg": "https://files.ballistica.net/cache/ba1/b1/b1/c4b7818ed566d15487d1b367be5a", + "assets/build/ba_data/audio/kronk2.ogg": "https://files.ballistica.net/cache/ba1/e2/b0/27a3e922f73766a73818e8f49fe6", + "assets/build/ba_data/audio/kronk3.ogg": "https://files.ballistica.net/cache/ba1/67/c4/6da53b2279b3730b385db2a535b8", + "assets/build/ba_data/audio/kronk4.ogg": "https://files.ballistica.net/cache/ba1/5d/50/c5d6d5284e0c441106feb84c06ac", + "assets/build/ba_data/audio/kronk5.ogg": "https://files.ballistica.net/cache/ba1/c4/cc/0f0c1edba861f61b290afd7dde00", + "assets/build/ba_data/audio/kronk6.ogg": "https://files.ballistica.net/cache/ba1/6b/be/42943e62ec0906141b3553febd63", + "assets/build/ba_data/audio/kronk7.ogg": "https://files.ballistica.net/cache/ba1/c8/d6/94da4cf95aa4834a4fcfe644931b", + "assets/build/ba_data/audio/kronk8.ogg": "https://files.ballistica.net/cache/ba1/16/6b/7d7b9b21d4c3102d7f863bf6980f", + "assets/build/ba_data/audio/kronk9.ogg": "https://files.ballistica.net/cache/ba1/bc/b8/8f9a3489c8d2596539da5982d350", + "assets/build/ba_data/audio/kronkDeath.ogg": "https://files.ballistica.net/cache/ba1/1e/0d/d4bf41468ea7ca82b68a4fa170d8", + "assets/build/ba_data/audio/kronkFall.ogg": "https://files.ballistica.net/cache/ba1/de/d8/8a88aa03423ab6363451ca7d0f9d", + "assets/build/ba_data/audio/laser.ogg": "https://files.ballistica.net/cache/ba1/fa/ca/0cc96c25a47fb440d3f3412fa66a", + "assets/build/ba_data/audio/laserReverse.ogg": "https://files.ballistica.net/cache/ba1/67/58/86c611a05cee292779a6e5f63a7b", + "assets/build/ba_data/audio/mel01.ogg": "https://files.ballistica.net/cache/ba1/60/24/f1b628245df09ab296e7127a19a0", + "assets/build/ba_data/audio/mel02.ogg": "https://files.ballistica.net/cache/ba1/2c/a5/b4f4c0b9497b6c92d10b5dd0ec31", + "assets/build/ba_data/audio/mel03.ogg": "https://files.ballistica.net/cache/ba1/35/8f/baf41d6fad44e9fe13d5c20005b7", + "assets/build/ba_data/audio/mel04.ogg": "https://files.ballistica.net/cache/ba1/9a/c1/b759e3b6e2cf1a41d283a0021577", + "assets/build/ba_data/audio/mel05.ogg": "https://files.ballistica.net/cache/ba1/32/8b/ce020ed4f0ae5e138fe948fa6e09", + "assets/build/ba_data/audio/mel06.ogg": "https://files.ballistica.net/cache/ba1/8d/9f/ba9feb5b981bb2f9a30fe8268a18", + "assets/build/ba_data/audio/mel07.ogg": "https://files.ballistica.net/cache/ba1/1f/14/96f16e5dfd4fb5eab030242b13ce", + "assets/build/ba_data/audio/mel08.ogg": "https://files.ballistica.net/cache/ba1/c8/02/5438996876a2e8542981aecdc8a5", + "assets/build/ba_data/audio/mel09.ogg": "https://files.ballistica.net/cache/ba1/c9/2f/b3ca3cbc7ed21af49508c279bb00", + "assets/build/ba_data/audio/mel10.ogg": "https://files.ballistica.net/cache/ba1/46/a4/8f4cf097b1aad5f67f04f327c817", + "assets/build/ba_data/audio/melDeath01.ogg": "https://files.ballistica.net/cache/ba1/3c/65/e640047da53ff11242db7fac304e", + "assets/build/ba_data/audio/melFall01.ogg": "https://files.ballistica.net/cache/ba1/11/b4/e4476a2a241006b349c1a05ef87c", + "assets/build/ba_data/audio/menuMusic.ogg": "https://files.ballistica.net/cache/ba1/46/dd/6084abb9b07ba87f38df14a5cbe5", + "assets/build/ba_data/audio/metalHit.ogg": "https://files.ballistica.net/cache/ba1/e5/2c/4a55e76bbb8ed01dafbab5e0e2a7", + "assets/build/ba_data/audio/metalSkid.ogg": "https://files.ballistica.net/cache/ba1/eb/c9/873a4d3de271ed04f85eaa597751", + "assets/build/ba_data/audio/ninjaAttack1.ogg": "https://files.ballistica.net/cache/ba1/7b/34/8da8913f2a8f91f0e209855b5ef2", + "assets/build/ba_data/audio/ninjaAttack2.ogg": "https://files.ballistica.net/cache/ba1/3f/2e/bff368c6ce23991d1fc8ef21adb6", + "assets/build/ba_data/audio/ninjaAttack3.ogg": "https://files.ballistica.net/cache/ba1/d3/45/f9a96792ec8a3a9a869dc667b40f", + "assets/build/ba_data/audio/ninjaAttack4.ogg": "https://files.ballistica.net/cache/ba1/97/6b/daa0aa8d449cd1fc59c273bbf51d", + "assets/build/ba_data/audio/ninjaAttack5.ogg": "https://files.ballistica.net/cache/ba1/18/be/3367a40b663b7ff30c0cde8bee19", + "assets/build/ba_data/audio/ninjaAttack6.ogg": "https://files.ballistica.net/cache/ba1/ca/84/1fa7c85341defd5936ac3a0b9b07", + "assets/build/ba_data/audio/ninjaAttack7.ogg": "https://files.ballistica.net/cache/ba1/97/f9/4e7ef88c1de5bbaa3e462db8ed0a", + "assets/build/ba_data/audio/ninjaDeath1.ogg": "https://files.ballistica.net/cache/ba1/8d/ab/edcc555ea75b571c80929eee5b76", + "assets/build/ba_data/audio/ninjaFall1.ogg": "https://files.ballistica.net/cache/ba1/53/5c/747b1feaa79a65612e9597354e54", + "assets/build/ba_data/audio/ninjaHit1.ogg": "https://files.ballistica.net/cache/ba1/75/67/85728e06e7ec1e04647cdbda0557", + "assets/build/ba_data/audio/ninjaHit2.ogg": "https://files.ballistica.net/cache/ba1/1b/c9/d83750c57a88ca2d7fe3d5f152a8", + "assets/build/ba_data/audio/ninjaHit3.ogg": "https://files.ballistica.net/cache/ba1/1b/05/14e17a35da74d3171f2e56e60874", + "assets/build/ba_data/audio/ninjaHit4.ogg": "https://files.ballistica.net/cache/ba1/07/61/ec850c93b7f4581e2ebddc076f47", + "assets/build/ba_data/audio/ninjaHit5.ogg": "https://files.ballistica.net/cache/ba1/8a/71/d00a4acd898f4b66620675d656c7", + "assets/build/ba_data/audio/ninjaHit6.ogg": "https://files.ballistica.net/cache/ba1/b3/25/d63e6729ba1ed9b540b9b7a1447b", + "assets/build/ba_data/audio/ninjaHit7.ogg": "https://files.ballistica.net/cache/ba1/5c/c5/70c3839f0e1ac6d913f6cb670f7f", + "assets/build/ba_data/audio/ninjaHit8.ogg": "https://files.ballistica.net/cache/ba1/a1/71/f77a6577e9f1cff45b666a2324ea", + "assets/build/ba_data/audio/oldLady1.ogg": "https://files.ballistica.net/cache/ba1/61/bb/44710de78e866beb3c6f1083aa1a", + "assets/build/ba_data/audio/oldLady2.ogg": "https://files.ballistica.net/cache/ba1/7a/8a/fb35cbf10c68f2e02ccd81392829", + "assets/build/ba_data/audio/oldLady3.ogg": "https://files.ballistica.net/cache/ba1/6f/15/6fe6d51a43cddc869322ea6ae69c", + "assets/build/ba_data/audio/oldLady4.ogg": "https://files.ballistica.net/cache/ba1/47/12/b85dc9be6accc3bda188389e3dc0", + "assets/build/ba_data/audio/oldLadyDeath.ogg": "https://files.ballistica.net/cache/ba1/14/dd/4d6882f9e94304ac46f358fb8cb4", + "assets/build/ba_data/audio/oldLadyFall.ogg": "https://files.ballistica.net/cache/ba1/27/79/02d236aed8c6f56f6a4f03997cef", + "assets/build/ba_data/audio/oldLadyHit1.ogg": "https://files.ballistica.net/cache/ba1/52/ce/1d7f3f3d59e75b2b81959007f463", + "assets/build/ba_data/audio/oldLadyHit2.ogg": "https://files.ballistica.net/cache/ba1/e0/1f/a4ef23d809ee66120af1745a3f78", + "assets/build/ba_data/audio/ooh.ogg": "https://files.ballistica.net/cache/ba1/6e/12/7ef78a1acb6e0e77d22a853a1e2a", + "assets/build/ba_data/audio/operaSinger1.ogg": "https://files.ballistica.net/cache/ba1/0f/dd/834f46d66adc5a2a7c59ab61469a", + "assets/build/ba_data/audio/operaSinger2.ogg": "https://files.ballistica.net/cache/ba1/00/ae/6c811bb19f221c02ac7cadbfa158", + "assets/build/ba_data/audio/operaSinger3.ogg": "https://files.ballistica.net/cache/ba1/ce/d0/035644cdade7628c74cf8e524d04", + "assets/build/ba_data/audio/operaSinger4.ogg": "https://files.ballistica.net/cache/ba1/f3/c9/9773a449f156ad66c45d86033194", + "assets/build/ba_data/audio/operaSingerDeath.ogg": "https://files.ballistica.net/cache/ba1/c4/2b/5787527e1b5efb4624e212b9893e", + "assets/build/ba_data/audio/operaSingerFall.ogg": "https://files.ballistica.net/cache/ba1/56/e3/e0d165dd8589be1cdb4c21ef7a6e", + "assets/build/ba_data/audio/operaSingerHit1.ogg": "https://files.ballistica.net/cache/ba1/70/30/51e07c8b2e2e3efc9356178e88a8", + "assets/build/ba_data/audio/operaSingerHit2.ogg": "https://files.ballistica.net/cache/ba1/77/5e/c7aa928082cf2979ba1e85d0c9c7", + "assets/build/ba_data/audio/orchestraHit.ogg": "https://files.ballistica.net/cache/ba1/99/7e/29f6c152587151a4c16a52150bed", + "assets/build/ba_data/audio/orchestraHit2.ogg": "https://files.ballistica.net/cache/ba1/3a/f3/e62d86aff37abe8d123c765a1f39", + "assets/build/ba_data/audio/orchestraHit3.ogg": "https://files.ballistica.net/cache/ba1/00/24/fd11e03805dc703a334aeb38beaa", + "assets/build/ba_data/audio/orchestraHit4.ogg": "https://files.ballistica.net/cache/ba1/43/b5/6004e5b6dc6df934f323d5341f2a", + "assets/build/ba_data/audio/orchestraHitBig1.ogg": "https://files.ballistica.net/cache/ba1/6f/f4/a5fe078b1beae7060958f1b2a200", + "assets/build/ba_data/audio/orchestraHitBig2.ogg": "https://files.ballistica.net/cache/ba1/c5/c0/576bbc2a0bf0c8fbd674c224f28e", + "assets/build/ba_data/audio/penguin1.ogg": "https://files.ballistica.net/cache/ba1/d2/cf/80da81a9d7bd86499f9cc497c545", + "assets/build/ba_data/audio/penguin2.ogg": "https://files.ballistica.net/cache/ba1/a1/fe/adbd1237268ede601217c983f2b9", + "assets/build/ba_data/audio/penguin3.ogg": "https://files.ballistica.net/cache/ba1/e6/3f/31026c7f802999b351f746ec78dc", + "assets/build/ba_data/audio/penguin4.ogg": "https://files.ballistica.net/cache/ba1/d8/32/447ecc8786010b84d471afbe8059", + "assets/build/ba_data/audio/penguinDeath.ogg": "https://files.ballistica.net/cache/ba1/14/a9/42fb892143da3d177f1491a51fab", + "assets/build/ba_data/audio/penguinFall.ogg": "https://files.ballistica.net/cache/ba1/74/e3/39961669441e01a677b8ae647a51", + "assets/build/ba_data/audio/penguinHit1.ogg": "https://files.ballistica.net/cache/ba1/bb/06/bedbe09744e5e681b91b145fabc4", + "assets/build/ba_data/audio/penguinHit2.ogg": "https://files.ballistica.net/cache/ba1/21/32/5ba66eea53deef5b131ea2bad733", + "assets/build/ba_data/audio/pixie1.ogg": "https://files.ballistica.net/cache/ba1/17/d3/6987c9d698f7fb1694acdde66151", + "assets/build/ba_data/audio/pixie2.ogg": "https://files.ballistica.net/cache/ba1/b3/4e/1a05705259fcc878e5821ab5d04a", + "assets/build/ba_data/audio/pixie3.ogg": "https://files.ballistica.net/cache/ba1/96/44/123dcfe0df176ceb28156b8c83e3", + "assets/build/ba_data/audio/pixie4.ogg": "https://files.ballistica.net/cache/ba1/a6/f9/6db63f037364e7b11f7f14e9c769", + "assets/build/ba_data/audio/pixieDeath.ogg": "https://files.ballistica.net/cache/ba1/4c/6e/b93719e2443d72f374c39679db7a", + "assets/build/ba_data/audio/pixieFall.ogg": "https://files.ballistica.net/cache/ba1/f6/99/4ba61d8c5ebb754c71a8dbeda142", + "assets/build/ba_data/audio/pixieHit1.ogg": "https://files.ballistica.net/cache/ba1/f7/b2/4fa09ec81039f7f507c0361e1139", + "assets/build/ba_data/audio/pixieHit2.ogg": "https://files.ballistica.net/cache/ba1/e8/d8/e278c7a8efed91cd7dc5324128f1", + "assets/build/ba_data/audio/playerDeath.ogg": "https://files.ballistica.net/cache/ba1/af/07/35b72d5ec74e190c088432b116e1", + "assets/build/ba_data/audio/playerLeft.ogg": "https://files.ballistica.net/cache/ba1/2c/fc/a78484ca7dbc715e854406e291f0", + "assets/build/ba_data/audio/pop01.ogg": "https://files.ballistica.net/cache/ba1/5f/25/643ad3b68415beeb3dae770b3573", + "assets/build/ba_data/audio/powerdown01.ogg": "https://files.ballistica.net/cache/ba1/f8/23/990dcd75fb9cfc357c4fb200645f", + "assets/build/ba_data/audio/powerup01.ogg": "https://files.ballistica.net/cache/ba1/58/41/98f59a71e645ee5bf27f60854e17", + "assets/build/ba_data/audio/punch01.ogg": "https://files.ballistica.net/cache/ba1/c4/7b/f1ddda8bbac71750b0a2b1d6383c", + "assets/build/ba_data/audio/punchStrong01.ogg": "https://files.ballistica.net/cache/ba1/a2/d2/e56a12592f12c4ab7f44ff4d94df", + "assets/build/ba_data/audio/punchStrong02.ogg": "https://files.ballistica.net/cache/ba1/2d/4f/fee4289fec8165207f32e602b8b8", + "assets/build/ba_data/audio/punchSwish.ogg": "https://files.ballistica.net/cache/ba1/8b/63/554524ce68a4ce9608962c067060", + "assets/build/ba_data/audio/punchWeak01.ogg": "https://files.ballistica.net/cache/ba1/aa/11/916bf27fba4e4576dbeb72b60eb6", + "assets/build/ba_data/audio/raceBeep1.ogg": "https://files.ballistica.net/cache/ba1/56/74/d453b8d90eff9d8456be8f700f1b", + "assets/build/ba_data/audio/raceBeep2.ogg": "https://files.ballistica.net/cache/ba1/83/8f/b8785d0d7c18a3e609d33e2a3fa7", + "assets/build/ba_data/audio/refWhistle.ogg": "https://files.ballistica.net/cache/ba1/cf/f4/79be01cb63cc37fc12d390511054", + "assets/build/ba_data/audio/robot1.ogg": "https://files.ballistica.net/cache/ba1/48/4f/62689f73f1081239ba332cb6c4e9", + "assets/build/ba_data/audio/robot2.ogg": "https://files.ballistica.net/cache/ba1/6f/2e/802a9dc4e42778c82dd729c0a1c6", + "assets/build/ba_data/audio/robot3.ogg": "https://files.ballistica.net/cache/ba1/d9/aa/eab6926797d878eae9054418409d", + "assets/build/ba_data/audio/robot4.ogg": "https://files.ballistica.net/cache/ba1/cc/d0/201fe0a75d88c1fee1435a6839c4", + "assets/build/ba_data/audio/robotDeath.ogg": "https://files.ballistica.net/cache/ba1/76/2d/5fe8e36a43af4abcea540f0520eb", + "assets/build/ba_data/audio/robotFall.ogg": "https://files.ballistica.net/cache/ba1/60/f7/56037dd2caae982c6bb20780f74c", + "assets/build/ba_data/audio/robotHit1.ogg": "https://files.ballistica.net/cache/ba1/c4/8e/603db8104ff99d5d7e103be94a35", + "assets/build/ba_data/audio/robotHit2.ogg": "https://files.ballistica.net/cache/ba1/6e/7d/1cd5be5006c06934fea07c60b913", + "assets/build/ba_data/audio/runAwayMusic.ogg": "https://files.ballistica.net/cache/ba1/0b/48/b08ff423d4af4d398c9eff34be56", + "assets/build/ba_data/audio/santa01.ogg": "https://files.ballistica.net/cache/ba1/15/3d/2015b69f2435bc5d5829fa3694a6", + "assets/build/ba_data/audio/santa02.ogg": "https://files.ballistica.net/cache/ba1/f9/4d/84f6519f63036eba513c3d6b1f07", + "assets/build/ba_data/audio/santa03.ogg": "https://files.ballistica.net/cache/ba1/a8/4a/dd918b8cc1d418ff8f97acf9deb6", + "assets/build/ba_data/audio/santa04.ogg": "https://files.ballistica.net/cache/ba1/7c/8d/515c6240a09fff15625b76d348ff", + "assets/build/ba_data/audio/santa05.ogg": "https://files.ballistica.net/cache/ba1/96/64/f638dceb799f8539e1c15fbcc4b1", + "assets/build/ba_data/audio/santaDeath.ogg": "https://files.ballistica.net/cache/ba1/b1/1f/c331a9fff9d410d378ddc4961012", + "assets/build/ba_data/audio/santaFall.ogg": "https://files.ballistica.net/cache/ba1/16/ba/01fa3991cd6ad62afbe85db3ebae", + "assets/build/ba_data/audio/santaHit01.ogg": "https://files.ballistica.net/cache/ba1/4f/c5/b51515b4145700394e08963484de", + "assets/build/ba_data/audio/santaHit02.ogg": "https://files.ballistica.net/cache/ba1/2c/eb/64bc09d5ff3533c3f879210a1150", + "assets/build/ba_data/audio/santaHit03.ogg": "https://files.ballistica.net/cache/ba1/0c/3c/7adf18a351c9465ef6846fefe7d7", + "assets/build/ba_data/audio/santaHit04.ogg": "https://files.ballistica.net/cache/ba1/cb/91/29992c61e4266475f1bd1806a964", + "assets/build/ba_data/audio/scamper01.ogg": "https://files.ballistica.net/cache/ba1/01/db/a9aa0e57acf9529fd070cb08567a", + "assets/build/ba_data/audio/scaryMusic.ogg": "https://files.ballistica.net/cache/ba1/1a/c2/c0d44c30317790bd404703033f3c", + "assets/build/ba_data/audio/score.ogg": "https://files.ballistica.net/cache/ba1/91/4d/aa2c6b2445f3a02a9fc1fc9eb0b8", + "assets/build/ba_data/audio/scoreHit01.ogg": "https://files.ballistica.net/cache/ba1/7f/ad/37bfd4d43e9365636b27782b2c26", + "assets/build/ba_data/audio/scoreHit02.ogg": "https://files.ballistica.net/cache/ba1/2e/6b/6fd9edd1663e56a19dfdc37d5fa3", + "assets/build/ba_data/audio/scoreIncrease.ogg": "https://files.ballistica.net/cache/ba1/20/cb/dea4a1e8b21368f9ce87467a1d40", + "assets/build/ba_data/audio/scoresEpicMusic.ogg": "https://files.ballistica.net/cache/ba1/de/4a/506915675f812c240fcb1fcb130b", + "assets/build/ba_data/audio/shatter.ogg": "https://files.ballistica.net/cache/ba1/cc/c3/bb1e9ffb2c9c8ac7affdc33d838f", + "assets/build/ba_data/audio/shieldDown.ogg": "https://files.ballistica.net/cache/ba1/c2/93/b88da0ef5671dd51ac176ad41e43", + "assets/build/ba_data/audio/shieldHit.ogg": "https://files.ballistica.net/cache/ba1/0a/a5/b7b73c267425bfb0cf8a30241e66", + "assets/build/ba_data/audio/shieldUp.ogg": "https://files.ballistica.net/cache/ba1/ae/29/5904557c1fd771878a4e8eb14f02", + "assets/build/ba_data/audio/skid01.ogg": "https://files.ballistica.net/cache/ba1/55/df/a41652bfbf5b061e42224dc162a3", + "assets/build/ba_data/audio/slowEpicMusic.ogg": "https://files.ballistica.net/cache/ba1/3e/29/13365abd4b91e06761653e591f08", + "assets/build/ba_data/audio/sparkle01.ogg": "https://files.ballistica.net/cache/ba1/fc/20/1a7aa8a565cb2c8a1221cf41d282", + "assets/build/ba_data/audio/sparkle02.ogg": "https://files.ballistica.net/cache/ba1/b0/2d/f2abf46b6767146f2e5e524e8ec8", + "assets/build/ba_data/audio/sparkle03.ogg": "https://files.ballistica.net/cache/ba1/0d/ae/815fa959c1f3c2aa1449a8603494", + "assets/build/ba_data/audio/spawn.ogg": "https://files.ballistica.net/cache/ba1/14/ce/a15931c8a134157544b49e50d2be", + "assets/build/ba_data/audio/spazAttack01.ogg": "https://files.ballistica.net/cache/ba1/4c/45/a0396d186400a819aa8a9049cdf6", + "assets/build/ba_data/audio/spazAttack02.ogg": "https://files.ballistica.net/cache/ba1/cb/6e/4e7d2f38a2d3299f59c976a37f14", + "assets/build/ba_data/audio/spazAttack03.ogg": "https://files.ballistica.net/cache/ba1/b3/cd/7649d5944eebdecce88e28e1ae7a", + "assets/build/ba_data/audio/spazAttack04.ogg": "https://files.ballistica.net/cache/ba1/dd/52/7dad8770be5cb4b3ddbba2c6271e", + "assets/build/ba_data/audio/spazDeath01.ogg": "https://files.ballistica.net/cache/ba1/f6/2f/a810bbcb1f4af634801b37ed6d9a", + "assets/build/ba_data/audio/spazEff.ogg": "https://files.ballistica.net/cache/ba1/8d/d5/fadec4e02c0ce45a28cbc6576c03", + "assets/build/ba_data/audio/spazFall01.ogg": "https://files.ballistica.net/cache/ba1/ec/29/3d34ccc86fbe793fa2086ba3303b", + "assets/build/ba_data/audio/spazImpact01.ogg": "https://files.ballistica.net/cache/ba1/8f/8c/22a477089c78df46e514b5640444", + "assets/build/ba_data/audio/spazImpact02.ogg": "https://files.ballistica.net/cache/ba1/d6/b4/81d89ec9602b49eb354317bcd417", + "assets/build/ba_data/audio/spazImpact03.ogg": "https://files.ballistica.net/cache/ba1/1a/8c/7bce8384b0e1cbd12d43f1705e1e", + "assets/build/ba_data/audio/spazImpact04.ogg": "https://files.ballistica.net/cache/ba1/00/f1/c0c3409c93efaeb2cf767064ba0f", + "assets/build/ba_data/audio/spazJump01.ogg": "https://files.ballistica.net/cache/ba1/bb/cb/3c4bb578915f13373a99f34255fc", + "assets/build/ba_data/audio/spazJump02.ogg": "https://files.ballistica.net/cache/ba1/d5/ef/93d61697c8f7d283808127258b73", + "assets/build/ba_data/audio/spazJump03.ogg": "https://files.ballistica.net/cache/ba1/bd/dd/a48974ba07a3f14579622af00047", + "assets/build/ba_data/audio/spazJump04.ogg": "https://files.ballistica.net/cache/ba1/e5/ac/7642b2da09cbeb0a8a8eeb04af1e", + "assets/build/ba_data/audio/spazOw.ogg": "https://files.ballistica.net/cache/ba1/d7/7b/ba75e7c58de39b05f8c713ad8822", + "assets/build/ba_data/audio/spazPickup01.ogg": "https://files.ballistica.net/cache/ba1/c2/88/b86c83d55ec57b79e8070d11b16e", + "assets/build/ba_data/audio/spazScream01.ogg": "https://files.ballistica.net/cache/ba1/d8/bd/b5ff6fe3a5daa53ad0fabed05a99", + "assets/build/ba_data/audio/splatter.ogg": "https://files.ballistica.net/cache/ba1/e3/ea/c17c8dc6d4e4380ef10bb3945821", + "assets/build/ba_data/audio/sportsMusic.ogg": "https://files.ballistica.net/cache/ba1/2a/34/868145f30a694d0b932fd89453a9", + "assets/build/ba_data/audio/stickyImpact.ogg": "https://files.ballistica.net/cache/ba1/cd/bc/86e695187a5b8c046ff90938c5c6", + "assets/build/ba_data/audio/superPunch.ogg": "https://files.ballistica.net/cache/ba1/a0/65/a068c90821766ca0a7ef2c2d54a3", + "assets/build/ba_data/audio/superhero1.ogg": "https://files.ballistica.net/cache/ba1/49/1e/2d975eb33577c5626a7a6bf0db56", + "assets/build/ba_data/audio/superhero2.ogg": "https://files.ballistica.net/cache/ba1/be/6f/3e83bb6c886cf9484ffc9847b984", + "assets/build/ba_data/audio/superhero3.ogg": "https://files.ballistica.net/cache/ba1/74/a5/f979c62d6e685b634de01a7491df", + "assets/build/ba_data/audio/superhero4.ogg": "https://files.ballistica.net/cache/ba1/3b/56/a0601a81145a97f6778847038ea4", + "assets/build/ba_data/audio/superheroDeath.ogg": "https://files.ballistica.net/cache/ba1/4e/52/197ea656c283532b1ff8cdbefa8e", + "assets/build/ba_data/audio/superheroFall.ogg": "https://files.ballistica.net/cache/ba1/82/3c/723f08ac4d52b29fbcabe625237d", + "assets/build/ba_data/audio/superheroHit1.ogg": "https://files.ballistica.net/cache/ba1/02/3e/bad703d34a9bb6bd912d1b979497", + "assets/build/ba_data/audio/superheroHit2.ogg": "https://files.ballistica.net/cache/ba1/f0/ac/df302e530d83c1e7b61d5bfaa50b", + "assets/build/ba_data/audio/survivalMusic.ogg": "https://files.ballistica.net/cache/ba1/60/86/ca1bf5152ce9cdc198106cf20df6", + "assets/build/ba_data/audio/swip.ogg": "https://files.ballistica.net/cache/ba1/f6/b3/c045639cf0ed73844ddcc3191f1e", + "assets/build/ba_data/audio/swip2.ogg": "https://files.ballistica.net/cache/ba1/f9/1f/b509e44dcbe234a4f81fabbc7ac2", + "assets/build/ba_data/audio/swish.ogg": "https://files.ballistica.net/cache/ba1/3a/df/16cbf89c210d383adf32551656b0", + "assets/build/ba_data/audio/swish2.ogg": "https://files.ballistica.net/cache/ba1/b3/ca/d08ec715a0e61d490bc8dd685562", + "assets/build/ba_data/audio/swish3.ogg": "https://files.ballistica.net/cache/ba1/cc/52/0a88c1e4939afb882558044b37bd", + "assets/build/ba_data/audio/tap.ogg": "https://files.ballistica.net/cache/ba1/a6/a0/90d5359db0b3704adbb8e2d92e64", + "assets/build/ba_data/audio/technoHit01.ogg": "https://files.ballistica.net/cache/ba1/bc/ad/aad8e7bf0bb3f8a1ab14e55efbca", + "assets/build/ba_data/audio/tick.ogg": "https://files.ballistica.net/cache/ba1/ed/7a/28b8fb9e8fd321a1b5f86b4bd801", + "assets/build/ba_data/audio/ticking.ogg": "https://files.ballistica.net/cache/ba1/62/78/3ce5dabf81918a5196c1a6a06394", + "assets/build/ba_data/audio/tickingCrazy.ogg": "https://files.ballistica.net/cache/ba1/fd/ee/bdb75073ded60a74be48074f3116", + "assets/build/ba_data/audio/toTheDeathMusic.ogg": "https://files.ballistica.net/cache/ba1/d4/5e/fb8cc5bdb4e655663a1071015a31", + "assets/build/ba_data/audio/trashRummage.ogg": "https://files.ballistica.net/cache/ba1/2d/07/99e3b6b93f1eacaf2dfb1686ecdd", + "assets/build/ba_data/audio/victoryMusic.ogg": "https://files.ballistica.net/cache/ba1/8f/00/9fb84fc8e4ea02f5c045b778679c", + "assets/build/ba_data/audio/warnBeep.ogg": "https://files.ballistica.net/cache/ba1/6f/e0/2a2c48ac6fcfe2e8f7de8812e991", + "assets/build/ba_data/audio/warnBeeps.ogg": "https://files.ballistica.net/cache/ba1/75/99/e3c70eb2c7f9f0dc24bbe240b4c7", + "assets/build/ba_data/audio/warrior1.ogg": "https://files.ballistica.net/cache/ba1/18/73/35f73f91fe58e3c8eb4369b690fb", + "assets/build/ba_data/audio/warrior2.ogg": "https://files.ballistica.net/cache/ba1/b9/f3/be7605706477279cf7b7e95b1a6a", + "assets/build/ba_data/audio/warrior3.ogg": "https://files.ballistica.net/cache/ba1/07/21/efe65ebfb7a04c460cbc6b8df325", + "assets/build/ba_data/audio/warrior4.ogg": "https://files.ballistica.net/cache/ba1/19/c4/b0758d469c56d3a89f61611d1fec", + "assets/build/ba_data/audio/warriorDeath.ogg": "https://files.ballistica.net/cache/ba1/7f/a3/a0544d6af799e6cb35bf595905f0", + "assets/build/ba_data/audio/warriorFall.ogg": "https://files.ballistica.net/cache/ba1/6c/3c/76232645ad124153f6cdc2b38d8f", + "assets/build/ba_data/audio/warriorHit1.ogg": "https://files.ballistica.net/cache/ba1/e8/7b/218e3b14f6baa5ee39f08595bd99", + "assets/build/ba_data/audio/warriorHit2.ogg": "https://files.ballistica.net/cache/ba1/07/64/1a4cfde7149b543923c644b1353f", + "assets/build/ba_data/audio/whenJohnnyComesMarchingHomeMusic.ogg": "https://files.ballistica.net/cache/ba1/92/e4/7cb703f3694574c5d9ebec6b4a95", + "assets/build/ba_data/audio/witch1.ogg": "https://files.ballistica.net/cache/ba1/bb/65/c8acc9289766b9e9eb87a9e35bd3", + "assets/build/ba_data/audio/witch2.ogg": "https://files.ballistica.net/cache/ba1/9a/33/c10d127f566213edc6b33ec5ee32", + "assets/build/ba_data/audio/witch3.ogg": "https://files.ballistica.net/cache/ba1/01/f4/80580ae2f456fdbe1d5cfead170a", + "assets/build/ba_data/audio/witch4.ogg": "https://files.ballistica.net/cache/ba1/04/39/8451387f6bcc747dd572cefa5d58", + "assets/build/ba_data/audio/witchDeath.ogg": "https://files.ballistica.net/cache/ba1/04/6f/017cdd2b73e257f25672512d6ae5", + "assets/build/ba_data/audio/witchFall.ogg": "https://files.ballistica.net/cache/ba1/e7/2f/44d7e597c161a18a419d3f0a183c", + "assets/build/ba_data/audio/witchHit1.ogg": "https://files.ballistica.net/cache/ba1/86/2a/e71e59006cc1317b39d141f0cad9", + "assets/build/ba_data/audio/witchHit2.ogg": "https://files.ballistica.net/cache/ba1/fa/49/4401104414c8bc76019c978b0154", + "assets/build/ba_data/audio/wizard1.ogg": "https://files.ballistica.net/cache/ba1/2d/bc/ec823e58ec642462c1a8324f640e", + "assets/build/ba_data/audio/wizard2.ogg": "https://files.ballistica.net/cache/ba1/92/b1/f82c9c09322ffc2a21d6c83be619", + "assets/build/ba_data/audio/wizard3.ogg": "https://files.ballistica.net/cache/ba1/59/eb/7cab4abb368aa63d7c3400f5c372", + "assets/build/ba_data/audio/wizard4.ogg": "https://files.ballistica.net/cache/ba1/a0/f6/c1397864fde8a6f668e10bf0b602", + "assets/build/ba_data/audio/wizardDeath.ogg": "https://files.ballistica.net/cache/ba1/5d/b8/a6daf919712762323a7e7404b67e", + "assets/build/ba_data/audio/wizardFall.ogg": "https://files.ballistica.net/cache/ba1/a4/e8/6ccdfae05090f65275388ca51032", + "assets/build/ba_data/audio/wizardHit1.ogg": "https://files.ballistica.net/cache/ba1/5d/01/f17776b644bde0efa2f168852850", + "assets/build/ba_data/audio/wizardHit2.ogg": "https://files.ballistica.net/cache/ba1/c4/8f/d279e241810dfa8281b63994a849", + "assets/build/ba_data/audio/woodDebrisFall.ogg": "https://files.ballistica.net/cache/ba1/83/ac/fc663523d3e1b2de0e1184cbaa76", + "assets/build/ba_data/audio/wrestler1.ogg": "https://files.ballistica.net/cache/ba1/d1/18/6f1fffd2bdd66f5d1e89f077457c", + "assets/build/ba_data/audio/wrestler2.ogg": "https://files.ballistica.net/cache/ba1/7a/43/015f81d7300aabead7a58446f239", + "assets/build/ba_data/audio/wrestler3.ogg": "https://files.ballistica.net/cache/ba1/e8/c8/59d8ace2d579eb1d58d53fbf8ca7", + "assets/build/ba_data/audio/wrestler4.ogg": "https://files.ballistica.net/cache/ba1/14/18/f505a9078dbfe88012e770daacdb", + "assets/build/ba_data/audio/wrestlerDeath.ogg": "https://files.ballistica.net/cache/ba1/b1/05/ea62c29f994fef9153ef20f104f0", + "assets/build/ba_data/audio/wrestlerFall.ogg": "https://files.ballistica.net/cache/ba1/9a/57/e773876ef948eec8a678653765e9", + "assets/build/ba_data/audio/wrestlerHit1.ogg": "https://files.ballistica.net/cache/ba1/cb/25/20ac19a0e7ef5efb2aa4605a8280", + "assets/build/ba_data/audio/wrestlerHit2.ogg": "https://files.ballistica.net/cache/ba1/46/d7/592aac9f2833e92c5b41fcc1d86d", + "assets/build/ba_data/audio/zoeAttack01.ogg": "https://files.ballistica.net/cache/ba1/f3/d9/6c50db6ba814269133ab9f94c547", + "assets/build/ba_data/audio/zoeAttack02.ogg": "https://files.ballistica.net/cache/ba1/2a/1d/3b2b92e7cc01063a05f20a75b898", + "assets/build/ba_data/audio/zoeAttack03.ogg": "https://files.ballistica.net/cache/ba1/c2/65/eae21f2f726d30b2de94627d5160", + "assets/build/ba_data/audio/zoeAttack04.ogg": "https://files.ballistica.net/cache/ba1/9c/b8/0dfc8986aa8595a5a25cd8d6cd10", + "assets/build/ba_data/audio/zoeDeath01.ogg": "https://files.ballistica.net/cache/ba1/3c/b0/f80295ffb1ec23c77e4e2e45ed06", + "assets/build/ba_data/audio/zoeEff.ogg": "https://files.ballistica.net/cache/ba1/5b/eb/14e6cd25ab532024261dfc0c3997", + "assets/build/ba_data/audio/zoeFall01.ogg": "https://files.ballistica.net/cache/ba1/ba/f5/cbda576d8fc965af522e88689832", + "assets/build/ba_data/audio/zoeImpact01.ogg": "https://files.ballistica.net/cache/ba1/cc/ca/aef59b4f31abbb639d3136b4cd23", + "assets/build/ba_data/audio/zoeImpact02.ogg": "https://files.ballistica.net/cache/ba1/4f/8d/2738b3b8b9cdb08f3e794891681a", + "assets/build/ba_data/audio/zoeImpact03.ogg": "https://files.ballistica.net/cache/ba1/e5/94/313a7b832f3abfc258e78ac1f18e", + "assets/build/ba_data/audio/zoeImpact04.ogg": "https://files.ballistica.net/cache/ba1/51/a8/75c9278930441114be759c4e71e1", + "assets/build/ba_data/audio/zoeJump01.ogg": "https://files.ballistica.net/cache/ba1/cf/f9/0365503a7c47b00c7977374b649a", + "assets/build/ba_data/audio/zoeJump02.ogg": "https://files.ballistica.net/cache/ba1/a0/4d/22976458a7a898337f05cdd7033b", + "assets/build/ba_data/audio/zoeJump03.ogg": "https://files.ballistica.net/cache/ba1/93/2a/79028027dcb4e03254948b37370a", + "assets/build/ba_data/audio/zoeOw.ogg": "https://files.ballistica.net/cache/ba1/f9/b0/9740d36641949b9d22996cca8fdc", + "assets/build/ba_data/audio/zoePickup01.ogg": "https://files.ballistica.net/cache/ba1/5e/e4/d744cb4b4a14c7cd7e9d06b0a9e8", + "assets/build/ba_data/audio/zoeScream01.ogg": "https://files.ballistica.net/cache/ba1/e6/c7/08fbc1ff179cf69806ca2ead333a", "assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/e8/42/a43c158be7fa45f2c0c3d4b84a1f", "assets/build/ba_data/data/languages/arabic.json": "https://files.ballistica.net/cache/ba1/5b/cf/4501b151257c3d8d6ee8d0497d14", "assets/build/ba_data/data/languages/belarussian.json": "https://files.ballistica.net/cache/ba1/61/03/89070ca765e06da3a419a579f503", @@ -1073,7 +1073,7 @@ "assets/build/ba_data/textures/actionHeroColor.dds": "https://files.ballistica.net/cache/ba1/62/91/355fa26219c26750e46ad358dbc7", "assets/build/ba_data/textures/actionHeroColor.ktx": "https://files.ballistica.net/cache/ba1/01/ce/95415b6b29f60015900b2f33db42", "assets/build/ba_data/textures/actionHeroColor.pvr": "https://files.ballistica.net/cache/ba1/0d/03/832309d85531d4be991b6f7a9107", - "assets/build/ba_data/textures/actionHeroColorMask.dds": "https://files.ballistica.net/cache/ba1/5c/c0/7f52de795a1f08ffa72030cf9178", + "assets/build/ba_data/textures/actionHeroColorMask.dds": "https://files.ballistica.net/cache/ba1/7d/8d/5b94b6e589f7f67ecc310e2cfa3c", "assets/build/ba_data/textures/actionHeroColorMask.ktx": "https://files.ballistica.net/cache/ba1/07/ed/6791e01ac69bb61cdffade59808f", "assets/build/ba_data/textures/actionHeroColorMask.pvr": "https://files.ballistica.net/cache/ba1/22/40/d50cbe4fa13a3294638bb1b42c72", "assets/build/ba_data/textures/actionHeroColorMask_preview.png": "https://files.ballistica.net/cache/ba1/83/2f/9a009e8f2cc9b956043511db105c", @@ -1090,15 +1090,15 @@ "assets/build/ba_data/textures/advancedIcon.ktx": "https://files.ballistica.net/cache/ba1/87/6d/1758aaf14120f6c418e2ecdb410f", "assets/build/ba_data/textures/advancedIcon.pvr": "https://files.ballistica.net/cache/ba1/39/00/237c07cd4a239ca69f90ba571e07", "assets/build/ba_data/textures/advancedIcon_preview.png": "https://files.ballistica.net/cache/ba1/21/d5/3a3a834112b84befe910c15df2b6", - "assets/build/ba_data/textures/agentColor.dds": "https://files.ballistica.net/cache/ba1/05/19/15d35284e062e8d037dfece71af5", + "assets/build/ba_data/textures/agentColor.dds": "https://files.ballistica.net/cache/ba1/17/c2/2a9cc0d3c88e048cce4e75880328", "assets/build/ba_data/textures/agentColor.ktx": "https://files.ballistica.net/cache/ba1/ff/8a/3e375971f932cba1e4c8800129e8", "assets/build/ba_data/textures/agentColor.pvr": "https://files.ballistica.net/cache/ba1/f8/3a/438fae77e7ad607345ff883c272d", - "assets/build/ba_data/textures/agentColorMask.dds": "https://files.ballistica.net/cache/ba1/dc/b1/a5a98e27864377a91452abcfba66", + "assets/build/ba_data/textures/agentColorMask.dds": "https://files.ballistica.net/cache/ba1/4f/ab/db5c3baed96dbec309c33ca13258", "assets/build/ba_data/textures/agentColorMask.ktx": "https://files.ballistica.net/cache/ba1/64/9a/255eeabf2f4a5626d478b41f2268", "assets/build/ba_data/textures/agentColorMask.pvr": "https://files.ballistica.net/cache/ba1/6a/d2/7a311a8525c02f7c8edb974e9651", "assets/build/ba_data/textures/agentColorMask_preview.png": "https://files.ballistica.net/cache/ba1/78/ec/c4ddf22b95d893fa467412334ff5", "assets/build/ba_data/textures/agentColor_preview.png": "https://files.ballistica.net/cache/ba1/9f/1b/1c128a69900d438c220ca7885dc7", - "assets/build/ba_data/textures/agentIcon.dds": "https://files.ballistica.net/cache/ba1/b4/ea/bc2ed456f6536711e03d292121fa", + "assets/build/ba_data/textures/agentIcon.dds": "https://files.ballistica.net/cache/ba1/64/37/c020b7e02cf7a7b90eec2e094395", "assets/build/ba_data/textures/agentIcon.ktx": "https://files.ballistica.net/cache/ba1/eb/1e/e73199f7c33e9002e92fe363a23b", "assets/build/ba_data/textures/agentIcon.pvr": "https://files.ballistica.net/cache/ba1/5e/2d/e18e2133517fdcc8cb7ac28b31a8", "assets/build/ba_data/textures/agentIconColorMask.dds": "https://files.ballistica.net/cache/ba1/b1/9a/ecb2300afababd460ca4bae36d96", @@ -1106,11 +1106,11 @@ "assets/build/ba_data/textures/agentIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/22/24/8aadc852761e3f2c0fbf9d2f025a", "assets/build/ba_data/textures/agentIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/e2/02/85032b1257accbb85ad1904018ef", "assets/build/ba_data/textures/agentIcon_preview.png": "https://files.ballistica.net/cache/ba1/49/70/68d243aeff2de4e474e9a22ee6ef", - "assets/build/ba_data/textures/aliBSRemoteIOSQR.dds": "https://files.ballistica.net/cache/ba1/b7/69/9c4a96ceb3f84c6670355cac136d", + "assets/build/ba_data/textures/aliBSRemoteIOSQR.dds": "https://files.ballistica.net/cache/ba1/32/c7/d95e248a28236f7495f285a9e65f", "assets/build/ba_data/textures/aliBSRemoteIOSQR.ktx": "https://files.ballistica.net/cache/ba1/10/a6/2cc21c0bae6eb45208974d8b1f60", "assets/build/ba_data/textures/aliBSRemoteIOSQR.pvr": "https://files.ballistica.net/cache/ba1/56/8f/3f31426a93b70d4c1c7c54050473", "assets/build/ba_data/textures/aliBSRemoteIOSQR_preview.png": "https://files.ballistica.net/cache/ba1/96/d8/d37b845efc618616a8e1fd0dd04b", - "assets/build/ba_data/textures/aliColor.dds": "https://files.ballistica.net/cache/ba1/54/17/1d3b7c4d9577908ed773ad11dad2", + "assets/build/ba_data/textures/aliColor.dds": "https://files.ballistica.net/cache/ba1/d8/6d/edff4cac631ca75db279ccfb1399", "assets/build/ba_data/textures/aliColor.ktx": "https://files.ballistica.net/cache/ba1/ed/f3/3005b276e2b231be8170102c1cd7", "assets/build/ba_data/textures/aliColor.pvr": "https://files.ballistica.net/cache/ba1/f3/bd/2c82648f6ef242ca4b34fd278629", "assets/build/ba_data/textures/aliColorMask.dds": "https://files.ballistica.net/cache/ba1/68/bb/c7db9f1886a6d3fd5cdb308f3cef", @@ -1118,14 +1118,14 @@ "assets/build/ba_data/textures/aliColorMask.pvr": "https://files.ballistica.net/cache/ba1/31/2a/ddb2a68bdfb3b175be2d3d6bcade", "assets/build/ba_data/textures/aliColorMask_preview.png": "https://files.ballistica.net/cache/ba1/3b/05/0dd47cdf3a3ac437e5e276f5fd86", "assets/build/ba_data/textures/aliColor_preview.png": "https://files.ballistica.net/cache/ba1/cb/93/d9230bee0324b2eec4bb8519dae3", - "assets/build/ba_data/textures/aliControllerQR.dds": "https://files.ballistica.net/cache/ba1/55/0a/44ecb9f5cf4e5c02b83089d0d13b", + "assets/build/ba_data/textures/aliControllerQR.dds": "https://files.ballistica.net/cache/ba1/68/f4/742194ee422ce66e9c0c4c7a2c66", "assets/build/ba_data/textures/aliControllerQR.ktx": "https://files.ballistica.net/cache/ba1/56/50/6d84e5b788b25b4e7275d20ce635", "assets/build/ba_data/textures/aliControllerQR.pvr": "https://files.ballistica.net/cache/ba1/22/8d/34c3d66662866cc806c81ee13517", "assets/build/ba_data/textures/aliControllerQR_preview.png": "https://files.ballistica.net/cache/ba1/59/83/a2dce8f9ec55f87cf450813a31c1", - "assets/build/ba_data/textures/aliIcon.dds": "https://files.ballistica.net/cache/ba1/bf/c9/ad39ef333825bbd5d6f5462d1a11", + "assets/build/ba_data/textures/aliIcon.dds": "https://files.ballistica.net/cache/ba1/a0/a6/f4fc06a5e3967f1cfc35eb627706", "assets/build/ba_data/textures/aliIcon.ktx": "https://files.ballistica.net/cache/ba1/d1/ee/7c1c37d57cdb70d854ecdfb235ed", "assets/build/ba_data/textures/aliIcon.pvr": "https://files.ballistica.net/cache/ba1/b6/04/931fbed4b2a9c75ae7745a88ed40", - "assets/build/ba_data/textures/aliIconColorMask.dds": "https://files.ballistica.net/cache/ba1/58/bc/04f52451d42f051acb8409ab965b", + "assets/build/ba_data/textures/aliIconColorMask.dds": "https://files.ballistica.net/cache/ba1/64/09/2fdf334c8cb3661bdbecdd2d2dd4", "assets/build/ba_data/textures/aliIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/78/89/c3e95a7c3794e4c86ece540aa3a3", "assets/build/ba_data/textures/aliIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/7a/81/d269ece740203c2e1a9a3c9523af", "assets/build/ba_data/textures/aliIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/0f/8d/203f6ec0ff5a8dd380330a0f3853", @@ -1137,7 +1137,7 @@ "assets/build/ba_data/textures/alienColor.dds": "https://files.ballistica.net/cache/ba1/b3/63/1ec79e210306f871f4d24b7a005e", "assets/build/ba_data/textures/alienColor.ktx": "https://files.ballistica.net/cache/ba1/97/fe/96c9ab440866a08d2510109eaaff", "assets/build/ba_data/textures/alienColor.pvr": "https://files.ballistica.net/cache/ba1/39/dc/bb457bc12cd61482e2c7edfa457c", - "assets/build/ba_data/textures/alienColorMask.dds": "https://files.ballistica.net/cache/ba1/ce/51/a41c4af1205bd33dc8647898e4b6", + "assets/build/ba_data/textures/alienColorMask.dds": "https://files.ballistica.net/cache/ba1/12/8c/4b32a6cb77e2d4b840b7fd19ec8a", "assets/build/ba_data/textures/alienColorMask.ktx": "https://files.ballistica.net/cache/ba1/a7/3e/7759a1566e2dacd35c0a23304fc7", "assets/build/ba_data/textures/alienColorMask.pvr": "https://files.ballistica.net/cache/ba1/70/70/49e327a70992f6f2cd57a69e182b", "assets/build/ba_data/textures/alienColorMask_preview.png": "https://files.ballistica.net/cache/ba1/6a/7c/7e2fe077f46778b639b58d533ef8", @@ -1150,15 +1150,15 @@ "assets/build/ba_data/textures/alienIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/0b/8a/54fa4a11a7d066ff0cbc6c741451", "assets/build/ba_data/textures/alienIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/55/bc/686e349c8557f232c6404bc22371", "assets/build/ba_data/textures/alienIcon_preview.png": "https://files.ballistica.net/cache/ba1/4c/c9/12ab7e3cf9f1af93c608ce1bcefb", - "assets/build/ba_data/textures/alwaysLandBGColor.dds": "https://files.ballistica.net/cache/ba1/88/d6/3afdd31b573a08eb0cf3771f86bb", + "assets/build/ba_data/textures/alwaysLandBGColor.dds": "https://files.ballistica.net/cache/ba1/3e/1e/ee38b7626761d3ead1f2fec82070", "assets/build/ba_data/textures/alwaysLandBGColor.ktx": "https://files.ballistica.net/cache/ba1/5a/80/c2ff48e9f0f3e549f105e926dd3d", "assets/build/ba_data/textures/alwaysLandBGColor.pvr": "https://files.ballistica.net/cache/ba1/2d/c0/c236df146c22606a3d290139e5b3", "assets/build/ba_data/textures/alwaysLandBGColor_preview.png": "https://files.ballistica.net/cache/ba1/59/9c/933c8322bf93c02968e6f440ae59", - "assets/build/ba_data/textures/alwaysLandLevelColor.dds": "https://files.ballistica.net/cache/ba1/1e/da/7e0f8f4f82a9728a9996fe4b76bc", + "assets/build/ba_data/textures/alwaysLandLevelColor.dds": "https://files.ballistica.net/cache/ba1/8a/5e/a2d2c01be327dd3fc34e46706b43", "assets/build/ba_data/textures/alwaysLandLevelColor.ktx": "https://files.ballistica.net/cache/ba1/13/bd/5458fc8068b06a20ec00d2e35c2e", "assets/build/ba_data/textures/alwaysLandLevelColor.pvr": "https://files.ballistica.net/cache/ba1/29/12/7c1b247f977a20c2d70069f95787", "assets/build/ba_data/textures/alwaysLandLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/4a/61/15580dd303e1682c7c2f63e890da", - "assets/build/ba_data/textures/alwaysLandPreview.dds": "https://files.ballistica.net/cache/ba1/de/5e/62854d25f37a4f2151716dcbb5e0", + "assets/build/ba_data/textures/alwaysLandPreview.dds": "https://files.ballistica.net/cache/ba1/36/6c/c1c4fcc4464359de5403244d3e30", "assets/build/ba_data/textures/alwaysLandPreview.ktx": "https://files.ballistica.net/cache/ba1/44/1b/8985da2a7c0670089ec086237de2", "assets/build/ba_data/textures/alwaysLandPreview.pvr": "https://files.ballistica.net/cache/ba1/8b/bb/db84d43e0acd251940d39ad52622", "assets/build/ba_data/textures/alwaysLandPreview_preview.png": "https://files.ballistica.net/cache/ba1/c7/6d/d633bbe5ad1fb1478a49cc51f702", @@ -1173,7 +1173,7 @@ "assets/build/ba_data/textures/assassinColor.dds": "https://files.ballistica.net/cache/ba1/74/4c/15d8400e13ddef0e6712bf52dd6e", "assets/build/ba_data/textures/assassinColor.ktx": "https://files.ballistica.net/cache/ba1/77/1e/340bae7b1759427c0cf4ef6f200a", "assets/build/ba_data/textures/assassinColor.pvr": "https://files.ballistica.net/cache/ba1/88/27/2a6734a37b350a8fe9d4313169ae", - "assets/build/ba_data/textures/assassinColorMask.dds": "https://files.ballistica.net/cache/ba1/b9/72/87c5ff1b72de68f5751140508d0e", + "assets/build/ba_data/textures/assassinColorMask.dds": "https://files.ballistica.net/cache/ba1/e2/e5/dc0bcae56faf7203eda79a9397d0", "assets/build/ba_data/textures/assassinColorMask.ktx": "https://files.ballistica.net/cache/ba1/52/6b/126ba01cd6e6f883e0a6695aec9c", "assets/build/ba_data/textures/assassinColorMask.pvr": "https://files.ballistica.net/cache/ba1/c0/2c/5b137a905b0719022101f82f581d", "assets/build/ba_data/textures/assassinColorMask_preview.png": "https://files.ballistica.net/cache/ba1/b0/c5/cb9321a0aca799d83159479d602c", @@ -1198,7 +1198,7 @@ "assets/build/ba_data/textures/bar.ktx": "https://files.ballistica.net/cache/ba1/69/25/7c811b9c7e77e6c7d1df1a047991", "assets/build/ba_data/textures/bar.pvr": "https://files.ballistica.net/cache/ba1/1c/b7/605cdb8193d4190f3a90a173cc90", "assets/build/ba_data/textures/bar_preview.png": "https://files.ballistica.net/cache/ba1/b6/63/94b82a98ae1305b0f6b57fe32e8b", - "assets/build/ba_data/textures/bearColor.dds": "https://files.ballistica.net/cache/ba1/e3/9a/f6b129a0fe2933fb23643e71d9ef", + "assets/build/ba_data/textures/bearColor.dds": "https://files.ballistica.net/cache/ba1/8d/13/f83d6f1249673ad7ba10996d0ac8", "assets/build/ba_data/textures/bearColor.ktx": "https://files.ballistica.net/cache/ba1/62/fc/be9341da4cfa66a8ce63807a3a8e", "assets/build/ba_data/textures/bearColor.pvr": "https://files.ballistica.net/cache/ba1/c3/f7/1773a5033ab0a6689d01e0683a63", "assets/build/ba_data/textures/bearColorMask.dds": "https://files.ballistica.net/cache/ba1/38/04/166ea3d73ed0af9b285db1b7e6c0", @@ -1209,19 +1209,19 @@ "assets/build/ba_data/textures/bearIcon.dds": "https://files.ballistica.net/cache/ba1/cd/80/163ac24028fd5d8ce484040d4176", "assets/build/ba_data/textures/bearIcon.ktx": "https://files.ballistica.net/cache/ba1/01/f7/c2ef1c82862e74f74386c6341cb8", "assets/build/ba_data/textures/bearIcon.pvr": "https://files.ballistica.net/cache/ba1/87/83/c856c8fb48ba9d7a7fd9869746f2", - "assets/build/ba_data/textures/bearIconColorMask.dds": "https://files.ballistica.net/cache/ba1/78/c9/123f72ce037631bb8f1906b8fd92", + "assets/build/ba_data/textures/bearIconColorMask.dds": "https://files.ballistica.net/cache/ba1/60/b8/634304bf7f29d239d63dd89ce96b", "assets/build/ba_data/textures/bearIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/ad/75/804e6901f09e75348f1d480c5ae8", "assets/build/ba_data/textures/bearIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/ce/23/1fd7ce03b72db0dc6b3903d8146f", "assets/build/ba_data/textures/bearIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/72/1c/9775c5e7acec13a491299b998703", "assets/build/ba_data/textures/bearIcon_preview.png": "https://files.ballistica.net/cache/ba1/d9/d2/b74a4de7ca068c378d78c745331b", - "assets/build/ba_data/textures/bg.dds": "https://files.ballistica.net/cache/ba1/92/e3/7beb6a9b50408b92e02a94965664", + "assets/build/ba_data/textures/bg.dds": "https://files.ballistica.net/cache/ba1/2e/60/a4e78e526ace713727738e3a5587", "assets/build/ba_data/textures/bg.ktx": "https://files.ballistica.net/cache/ba1/97/6c/b965850bfa25cf9db805b921d291", "assets/build/ba_data/textures/bg.pvr": "https://files.ballistica.net/cache/ba1/11/84/be878cc8fbe77a3ffdb4cd4ce125", "assets/build/ba_data/textures/bg_preview.png": "https://files.ballistica.net/cache/ba1/6a/77/7613140be4610b02dcb0372111ed", - "assets/build/ba_data/textures/bigG.dds": "https://files.ballistica.net/cache/ba1/49/34/fe6162a12af04927e4c3489dcfff", + "assets/build/ba_data/textures/bigG.dds": "https://files.ballistica.net/cache/ba1/2e/74/5d1c4fe9f920a291846c62c7d65e", "assets/build/ba_data/textures/bigG.ktx": "https://files.ballistica.net/cache/ba1/df/1c/526de060409ebbd5235592943e94", "assets/build/ba_data/textures/bigG.pvr": "https://files.ballistica.net/cache/ba1/41/82/532ef83baefbde887504c11ce140", - "assets/build/ba_data/textures/bigGPreview.dds": "https://files.ballistica.net/cache/ba1/2b/1c/8fb6a40e7e08419473d22e23cfcc", + "assets/build/ba_data/textures/bigGPreview.dds": "https://files.ballistica.net/cache/ba1/93/0e/842e2e3a11f71802c81a5de450a6", "assets/build/ba_data/textures/bigGPreview.ktx": "https://files.ballistica.net/cache/ba1/4a/28/d3c6f8ad9f0c65cd7a422d9177dd", "assets/build/ba_data/textures/bigGPreview.pvr": "https://files.ballistica.net/cache/ba1/4f/b4/9b4069351815040b2af7c4c9b498", "assets/build/ba_data/textures/bigGPreview_preview.png": "https://files.ballistica.net/cache/ba1/4b/24/f4b442bc8ed68d6f3f740ffb19fd", @@ -1237,16 +1237,16 @@ "assets/build/ba_data/textures/bombColor.dds": "https://files.ballistica.net/cache/ba1/5e/2b/492e68d77e6be9d6399e49435a8d", "assets/build/ba_data/textures/bombColor.ktx": "https://files.ballistica.net/cache/ba1/bc/9f/c7a76334cf56bb0bb93d1f720b40", "assets/build/ba_data/textures/bombColor.pvr": "https://files.ballistica.net/cache/ba1/c7/bb/89159008de3b624bcb90b3c25568", - "assets/build/ba_data/textures/bombColorIce.dds": "https://files.ballistica.net/cache/ba1/ab/ed/3f5a8f9f2fb8d1e60f34f1f1701b", + "assets/build/ba_data/textures/bombColorIce.dds": "https://files.ballistica.net/cache/ba1/27/d6/7790056abb3e73e7ffd01920dfb8", "assets/build/ba_data/textures/bombColorIce.ktx": "https://files.ballistica.net/cache/ba1/4b/2d/c8cfa1990fa1f211de36679a3665", "assets/build/ba_data/textures/bombColorIce.pvr": "https://files.ballistica.net/cache/ba1/71/aa/3127d32782835de9fa0fab8c7395", "assets/build/ba_data/textures/bombColorIce_preview.png": "https://files.ballistica.net/cache/ba1/ec/3a/96b5191c5e7662be273c311fa826", "assets/build/ba_data/textures/bombColor_preview.png": "https://files.ballistica.net/cache/ba1/a5/65/878c8aa7876031426f5adf3aeb79", - "assets/build/ba_data/textures/bombStickyColor.dds": "https://files.ballistica.net/cache/ba1/c2/2d/cf8b630173546f03926c56258724", + "assets/build/ba_data/textures/bombStickyColor.dds": "https://files.ballistica.net/cache/ba1/b9/54/8e1dc631ecdb5a045441e96ea2e9", "assets/build/ba_data/textures/bombStickyColor.ktx": "https://files.ballistica.net/cache/ba1/be/83/f3b7ca04ca377e2df7359784d6cf", "assets/build/ba_data/textures/bombStickyColor.pvr": "https://files.ballistica.net/cache/ba1/14/a3/90a633e9edd9f826d89d2f610a0d", "assets/build/ba_data/textures/bombStickyColor_preview.png": "https://files.ballistica.net/cache/ba1/c0/98/05587d954ce791ba5caa41af943f", - "assets/build/ba_data/textures/bonesColor.dds": "https://files.ballistica.net/cache/ba1/02/23/f9f6293644faaff5d3fe2f49408f", + "assets/build/ba_data/textures/bonesColor.dds": "https://files.ballistica.net/cache/ba1/31/d5/90d0088aa8435ff2eb9c3b79ebc0", "assets/build/ba_data/textures/bonesColor.ktx": "https://files.ballistica.net/cache/ba1/51/24/beed81e702c15d04b4f94388a328", "assets/build/ba_data/textures/bonesColor.pvr": "https://files.ballistica.net/cache/ba1/84/85/d3822cbf93732d312b64dd0d2b26", "assets/build/ba_data/textures/bonesColorMask.dds": "https://files.ballistica.net/cache/ba1/9e/57/bc0c41cf259d94e11814170d0137", @@ -1266,7 +1266,7 @@ "assets/build/ba_data/textures/boxingGlovesColor.ktx": "https://files.ballistica.net/cache/ba1/9c/c1/fcb445a18de7bb2adb9c93644840", "assets/build/ba_data/textures/boxingGlovesColor.pvr": "https://files.ballistica.net/cache/ba1/93/a9/c6d48979dc6c72c70f5c39ccabff", "assets/build/ba_data/textures/boxingGlovesColor_preview.png": "https://files.ballistica.net/cache/ba1/75/d2/6056b445e3c8da206f4d7574c623", - "assets/build/ba_data/textures/bridgitLevelColor.dds": "https://files.ballistica.net/cache/ba1/91/ab/184a0bbeba1c1bb79d28168709be", + "assets/build/ba_data/textures/bridgitLevelColor.dds": "https://files.ballistica.net/cache/ba1/04/af/6c34a515c1e52a5f9c4303683853", "assets/build/ba_data/textures/bridgitLevelColor.ktx": "https://files.ballistica.net/cache/ba1/30/08/4f5fec91381abc98c3382763cad9", "assets/build/ba_data/textures/bridgitLevelColor.pvr": "https://files.ballistica.net/cache/ba1/6f/89/65a75daf364c9f3aec77c73bc343", "assets/build/ba_data/textures/bridgitLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/c9/fd/7e9daa40ebce9e08d2daf07aef49", @@ -1274,7 +1274,7 @@ "assets/build/ba_data/textures/bridgitPreview.ktx": "https://files.ballistica.net/cache/ba1/d4/d9/6f936f48e988e335ee1949c2219d", "assets/build/ba_data/textures/bridgitPreview.pvr": "https://files.ballistica.net/cache/ba1/51/18/4716016fd0d40a0bb94cdac9c627", "assets/build/ba_data/textures/bridgitPreview_preview.png": "https://files.ballistica.net/cache/ba1/c8/77/01fcaf507ca7c4575a76bff62ff0", - "assets/build/ba_data/textures/bunnyColor.dds": "https://files.ballistica.net/cache/ba1/fc/32/5452de45237f804355667a2584ba", + "assets/build/ba_data/textures/bunnyColor.dds": "https://files.ballistica.net/cache/ba1/9e/30/d07e0031093130e6cbc23a135e45", "assets/build/ba_data/textures/bunnyColor.ktx": "https://files.ballistica.net/cache/ba1/52/88/9b31fa2ce14ef7b98631cb36e769", "assets/build/ba_data/textures/bunnyColor.pvr": "https://files.ballistica.net/cache/ba1/6b/33/e48393656bbbf7a146d4e246fdc9", "assets/build/ba_data/textures/bunnyColorMask.dds": "https://files.ballistica.net/cache/ba1/b8/f2/7570c919e1f06c66c7236524d53f", @@ -1282,7 +1282,7 @@ "assets/build/ba_data/textures/bunnyColorMask.pvr": "https://files.ballistica.net/cache/ba1/db/91/d3ad07cabd17cffa0d9591532477", "assets/build/ba_data/textures/bunnyColorMask_preview.png": "https://files.ballistica.net/cache/ba1/72/b8/27c36d27c73d19f496f955fa50e2", "assets/build/ba_data/textures/bunnyColor_preview.png": "https://files.ballistica.net/cache/ba1/cb/f2/861b06f9154cd59a8e20802a0875", - "assets/build/ba_data/textures/bunnyIcon.dds": "https://files.ballistica.net/cache/ba1/ca/2e/0352302668a840b50cf83b7d69b3", + "assets/build/ba_data/textures/bunnyIcon.dds": "https://files.ballistica.net/cache/ba1/3a/8c/c4615ce15d075e64da5768272ee7", "assets/build/ba_data/textures/bunnyIcon.ktx": "https://files.ballistica.net/cache/ba1/da/92/e1ce1ba464ffc9ce57bfe87dd792", "assets/build/ba_data/textures/bunnyIcon.pvr": "https://files.ballistica.net/cache/ba1/6e/03/4848e2435ac4f9938a98a7adaf25", "assets/build/ba_data/textures/bunnyIconColorMask.dds": "https://files.ballistica.net/cache/ba1/d2/5d/7427e249e21960ab7f5e738f833d", @@ -1353,14 +1353,14 @@ "assets/build/ba_data/textures/circle.dds": "https://files.ballistica.net/cache/ba1/88/a6/c2e3db7c1c6aab2ad9b05d7074b4", "assets/build/ba_data/textures/circle.ktx": "https://files.ballistica.net/cache/ba1/85/cd/0d9bd306a8f91a9ed661f99529b2", "assets/build/ba_data/textures/circle.pvr": "https://files.ballistica.net/cache/ba1/3a/a2/d61927bc0770e37848ddd6712876", - "assets/build/ba_data/textures/circleNoAlpha.dds": "https://files.ballistica.net/cache/ba1/90/8b/7c1942e8bd58a3f2f20fc4be7173", + "assets/build/ba_data/textures/circleNoAlpha.dds": "https://files.ballistica.net/cache/ba1/e9/c1/6af34d954867f725dbb7c63026f1", "assets/build/ba_data/textures/circleNoAlpha.ktx": "https://files.ballistica.net/cache/ba1/e4/83/17f847e9f832201929a30f1ea535", "assets/build/ba_data/textures/circleNoAlpha.pvr": "https://files.ballistica.net/cache/ba1/23/d1/6d053de8f4ab7871c3275920cf18", "assets/build/ba_data/textures/circleNoAlpha_preview.png": "https://files.ballistica.net/cache/ba1/5c/9d/0ffc70edd5440cea9d5b22810aa2", "assets/build/ba_data/textures/circleOutline.dds": "https://files.ballistica.net/cache/ba1/a4/c2/e0a5bf011be78509dbef899b8f28", "assets/build/ba_data/textures/circleOutline.ktx": "https://files.ballistica.net/cache/ba1/ce/91/5fe4f6f2ade655564632f78ddb32", "assets/build/ba_data/textures/circleOutline.pvr": "https://files.ballistica.net/cache/ba1/df/7a/6de156c06892d833f7ebd264e772", - "assets/build/ba_data/textures/circleOutlineNoAlpha.dds": "https://files.ballistica.net/cache/ba1/60/0e/c7d019fe5cd651e26967c97c4969", + "assets/build/ba_data/textures/circleOutlineNoAlpha.dds": "https://files.ballistica.net/cache/ba1/86/32/c8fe0fbf2003b7883216b19984fa", "assets/build/ba_data/textures/circleOutlineNoAlpha.ktx": "https://files.ballistica.net/cache/ba1/3d/19/19c290ceb02d8d41740c864e7793", "assets/build/ba_data/textures/circleOutlineNoAlpha.pvr": "https://files.ballistica.net/cache/ba1/b0/56/02950e983c0fb55e9bc491b8860c", "assets/build/ba_data/textures/circleOutlineNoAlpha_preview.png": "https://files.ballistica.net/cache/ba1/fc/b5/7d4368c1ff5655ecd7b22234cf54", @@ -1382,18 +1382,18 @@ "assets/build/ba_data/textures/controllerIcon.ktx": "https://files.ballistica.net/cache/ba1/14/16/a15ad29481944559f81f54fdfe20", "assets/build/ba_data/textures/controllerIcon.pvr": "https://files.ballistica.net/cache/ba1/fe/01/befdbde27b052c35d3b12d80e80f", "assets/build/ba_data/textures/controllerIcon_preview.png": "https://files.ballistica.net/cache/ba1/59/a5/1465197ee1267ba0e0b25c43d80f", - "assets/build/ba_data/textures/courtyardLevelColor.dds": "https://files.ballistica.net/cache/ba1/b2/e1/fb40e54fac2969cbaa71682af9ce", + "assets/build/ba_data/textures/courtyardLevelColor.dds": "https://files.ballistica.net/cache/ba1/46/f5/b4e9bdd3e30776884339293408eb", "assets/build/ba_data/textures/courtyardLevelColor.ktx": "https://files.ballistica.net/cache/ba1/bd/56/4b6d7c0144fc37f99f35c52ab009", "assets/build/ba_data/textures/courtyardLevelColor.pvr": "https://files.ballistica.net/cache/ba1/77/97/bf195499e7e18777f02bb87061d7", "assets/build/ba_data/textures/courtyardLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/91/bf/617c0d77529aa079200fdf75173d", - "assets/build/ba_data/textures/courtyardPreview.dds": "https://files.ballistica.net/cache/ba1/cf/c7/5e5a25f7b6b1c0840d66d203e030", + "assets/build/ba_data/textures/courtyardPreview.dds": "https://files.ballistica.net/cache/ba1/52/e5/cfdaab9a05d3f5706c7e5be114a1", "assets/build/ba_data/textures/courtyardPreview.ktx": "https://files.ballistica.net/cache/ba1/58/1c/ceeccf17dd5f3f1beb9af1ab720a", "assets/build/ba_data/textures/courtyardPreview.pvr": "https://files.ballistica.net/cache/ba1/a4/e8/9f1afe13ee2ebb9f6754a5f00f26", "assets/build/ba_data/textures/courtyardPreview_preview.png": "https://files.ballistica.net/cache/ba1/cb/40/06faf314dd35177a6d0e2a041bb7", "assets/build/ba_data/textures/cowboyColor.dds": "https://files.ballistica.net/cache/ba1/a4/49/f004e03fe36543d89dd8d1a6ed7f", "assets/build/ba_data/textures/cowboyColor.ktx": "https://files.ballistica.net/cache/ba1/00/30/f2ae84970bd0697725b821f2f152", "assets/build/ba_data/textures/cowboyColor.pvr": "https://files.ballistica.net/cache/ba1/45/1a/5bbcf702a33fd48e2b9a7016323f", - "assets/build/ba_data/textures/cowboyColorMask.dds": "https://files.ballistica.net/cache/ba1/52/2f/874896a060d55f6498656cb8ba1d", + "assets/build/ba_data/textures/cowboyColorMask.dds": "https://files.ballistica.net/cache/ba1/bd/6a/6158fd65af4641bcd936045005a2", "assets/build/ba_data/textures/cowboyColorMask.ktx": "https://files.ballistica.net/cache/ba1/51/68/9145727dc989afded72318e673c7", "assets/build/ba_data/textures/cowboyColorMask.pvr": "https://files.ballistica.net/cache/ba1/69/44/41ab993ebfc0a1aa32e431582fb4", "assets/build/ba_data/textures/cowboyColorMask_preview.png": "https://files.ballistica.net/cache/ba1/93/43/7bb7d6df6b89daa507ead29d4f2a", @@ -1406,11 +1406,11 @@ "assets/build/ba_data/textures/cowboyIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/b9/bf/be1704729e7714781060d58d65c2", "assets/build/ba_data/textures/cowboyIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/ca/e7/0bc54a6b3fd60923c951fc97d790", "assets/build/ba_data/textures/cowboyIcon_preview.png": "https://files.ballistica.net/cache/ba1/1c/67/f2c47c042d89c220e78e7ebce5ed", - "assets/build/ba_data/textures/cragCastleLevelColor.dds": "https://files.ballistica.net/cache/ba1/fe/9a/3d8efc6b02fe3f071b832d41dacb", + "assets/build/ba_data/textures/cragCastleLevelColor.dds": "https://files.ballistica.net/cache/ba1/89/88/9723a3035d39ef69cf3f3c7bda03", "assets/build/ba_data/textures/cragCastleLevelColor.ktx": "https://files.ballistica.net/cache/ba1/ea/44/3b99b25e09c05fc6e85583866694", "assets/build/ba_data/textures/cragCastleLevelColor.pvr": "https://files.ballistica.net/cache/ba1/1e/9a/9b5125e165f5ebaecc8f1934a2c1", "assets/build/ba_data/textures/cragCastleLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/b4/6c/6b8f525be822459dd4bd6548b2a8", - "assets/build/ba_data/textures/cragCastlePreview.dds": "https://files.ballistica.net/cache/ba1/fb/22/e6c8a874a13b94a688ba5421141a", + "assets/build/ba_data/textures/cragCastlePreview.dds": "https://files.ballistica.net/cache/ba1/87/12/9abc61fcd67f230597f166220d60", "assets/build/ba_data/textures/cragCastlePreview.ktx": "https://files.ballistica.net/cache/ba1/0c/b2/890cb8167c41cd2c220daa3db7a9", "assets/build/ba_data/textures/cragCastlePreview.pvr": "https://files.ballistica.net/cache/ba1/c9/61/1c57e31b464b26c5e6c125d38944", "assets/build/ba_data/textures/cragCastlePreview_preview.png": "https://files.ballistica.net/cache/ba1/b1/b2/d49537dbba63c3cbc25b3989a2e2", @@ -1430,31 +1430,31 @@ "assets/build/ba_data/textures/cuteSpaz.ktx": "https://files.ballistica.net/cache/ba1/9a/65/5bfc1d1ef2bb7ac9b767e70d6015", "assets/build/ba_data/textures/cuteSpaz.pvr": "https://files.ballistica.net/cache/ba1/ff/ec/9172f64f96803393de8da58f7566", "assets/build/ba_data/textures/cuteSpaz_preview.png": "https://files.ballistica.net/cache/ba1/e9/74/364547fef623e7bbbbc8a92a9efa", - "assets/build/ba_data/textures/cyborgColor.dds": "https://files.ballistica.net/cache/ba1/93/d4/75c140eff1c3cc45e1766fc0e95c", + "assets/build/ba_data/textures/cyborgColor.dds": "https://files.ballistica.net/cache/ba1/35/94/7e5c288cb0f17bd904f3a66ee6f7", "assets/build/ba_data/textures/cyborgColor.ktx": "https://files.ballistica.net/cache/ba1/d0/d6/e611760948207bebc5cec40721ee", "assets/build/ba_data/textures/cyborgColor.pvr": "https://files.ballistica.net/cache/ba1/3b/b4/14499682862c916ba7e6df183445", - "assets/build/ba_data/textures/cyborgColorMask.dds": "https://files.ballistica.net/cache/ba1/34/e0/24881a8cabf3b48f1e68635b0096", + "assets/build/ba_data/textures/cyborgColorMask.dds": "https://files.ballistica.net/cache/ba1/28/57/0bd64f9f7d5573a9e1fd1c5f422d", "assets/build/ba_data/textures/cyborgColorMask.ktx": "https://files.ballistica.net/cache/ba1/09/49/64a4b4bd11d7f43ee3e3b4557ccb", "assets/build/ba_data/textures/cyborgColorMask.pvr": "https://files.ballistica.net/cache/ba1/aa/8f/2017c219d46766b0a8a58b12ef80", "assets/build/ba_data/textures/cyborgColorMask_preview.png": "https://files.ballistica.net/cache/ba1/b2/c8/1ca1bb73d93dd93169977aef26eb", "assets/build/ba_data/textures/cyborgColor_preview.png": "https://files.ballistica.net/cache/ba1/23/68/de2999bc4db759030c77dd372e23", - "assets/build/ba_data/textures/cyborgIcon.dds": "https://files.ballistica.net/cache/ba1/5a/55/c63bdf0b63c76da7b387b4bebecb", + "assets/build/ba_data/textures/cyborgIcon.dds": "https://files.ballistica.net/cache/ba1/99/c3/8eed2f236f66aef901d452cdb98b", "assets/build/ba_data/textures/cyborgIcon.ktx": "https://files.ballistica.net/cache/ba1/de/ab/4d5b2163047d3fb9b05d43c9183d", "assets/build/ba_data/textures/cyborgIcon.pvr": "https://files.ballistica.net/cache/ba1/0c/7b/b47a4bfbbfd8607ea06375963485", - "assets/build/ba_data/textures/cyborgIconColorMask.dds": "https://files.ballistica.net/cache/ba1/ad/20/71a5de426d081b99c1abe672474a", + "assets/build/ba_data/textures/cyborgIconColorMask.dds": "https://files.ballistica.net/cache/ba1/9d/2a/1852d636d06de05bff2ffac52d9c", "assets/build/ba_data/textures/cyborgIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/20/95/85096b550149fb17500c673a9589", "assets/build/ba_data/textures/cyborgIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/1f/70/35e302e1a91d78ab23cb3e936bde", "assets/build/ba_data/textures/cyborgIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/09/bb/e6563f614b2cda0ca5da89b80b2a", "assets/build/ba_data/textures/cyborgIcon_preview.png": "https://files.ballistica.net/cache/ba1/4e/af/0d54cad1089f73c91ed766519d77", - "assets/build/ba_data/textures/doomShroomBGColor.dds": "https://files.ballistica.net/cache/ba1/5c/2b/88deea7de0cf4b7e3250ca76bcc1", + "assets/build/ba_data/textures/doomShroomBGColor.dds": "https://files.ballistica.net/cache/ba1/12/cc/3fa62b5809176403776958657571", "assets/build/ba_data/textures/doomShroomBGColor.ktx": "https://files.ballistica.net/cache/ba1/db/35/7f5884df9de36467179b45e8e241", "assets/build/ba_data/textures/doomShroomBGColor.pvr": "https://files.ballistica.net/cache/ba1/65/5d/fc508d48f3703e91cfbfce0187ed", "assets/build/ba_data/textures/doomShroomBGColor_preview.png": "https://files.ballistica.net/cache/ba1/b5/7e/995e3c648eb68d4c72c4e50be7e6", - "assets/build/ba_data/textures/doomShroomLevelColor.dds": "https://files.ballistica.net/cache/ba1/cd/1e/f297f1c37249810e7aaffca591a4", + "assets/build/ba_data/textures/doomShroomLevelColor.dds": "https://files.ballistica.net/cache/ba1/ac/a4/03513b905d7379ee44e6e686056d", "assets/build/ba_data/textures/doomShroomLevelColor.ktx": "https://files.ballistica.net/cache/ba1/6c/96/d887b3d3cf79d2264ad2e601193d", "assets/build/ba_data/textures/doomShroomLevelColor.pvr": "https://files.ballistica.net/cache/ba1/e2/15/8303117a33a96a61376dad6f5e9d", "assets/build/ba_data/textures/doomShroomLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/61/cf/327dd838ebab6875b92ee28c3bcd", - "assets/build/ba_data/textures/doomShroomPreview.dds": "https://files.ballistica.net/cache/ba1/d7/c7/888bb15afe907f3a37006e76b3af", + "assets/build/ba_data/textures/doomShroomPreview.dds": "https://files.ballistica.net/cache/ba1/f5/68/bd828096f33579d65a44c5357933", "assets/build/ba_data/textures/doomShroomPreview.ktx": "https://files.ballistica.net/cache/ba1/f6/3c/20abd773a8502a0954d62c0917c7", "assets/build/ba_data/textures/doomShroomPreview.pvr": "https://files.ballistica.net/cache/ba1/d3/92/aca35e87cb29f4da683e88859a21", "assets/build/ba_data/textures/doomShroomPreview_preview.png": "https://files.ballistica.net/cache/ba1/19/85/7ec1b3b28c5bc564fd0a106d2423", @@ -1494,7 +1494,7 @@ "assets/build/ba_data/textures/empty.ktx": "https://files.ballistica.net/cache/ba1/1c/1a/c944b4615540bebbd2337f37a36e", "assets/build/ba_data/textures/empty.pvr": "https://files.ballistica.net/cache/ba1/e1/85/0e5d594e57336cf14b4914ebb37c", "assets/build/ba_data/textures/empty_preview.png": "https://files.ballistica.net/cache/ba1/27/1d/936488a18c78f387f2f4ec562545", - "assets/build/ba_data/textures/explosion.dds": "https://files.ballistica.net/cache/ba1/e7/95/a6d20541c8ffff02583799ab77ba", + "assets/build/ba_data/textures/explosion.dds": "https://files.ballistica.net/cache/ba1/da/1f/fac45c02f2f889b62335f3f85d77", "assets/build/ba_data/textures/explosion.ktx": "https://files.ballistica.net/cache/ba1/72/e7/7db06c8ab6f0dd8dfc48162824b1", "assets/build/ba_data/textures/explosion.pvr": "https://files.ballistica.net/cache/ba1/38/42/e4de72086e36187dcb5e4005f4e9", "assets/build/ba_data/textures/explosion_preview.png": "https://files.ballistica.net/cache/ba1/6f/01/8a6cf54d2e9b24c87c00ea2ca9c3", @@ -1510,11 +1510,11 @@ "assets/build/ba_data/textures/file.ktx": "https://files.ballistica.net/cache/ba1/d5/f6/a80ff58c84435b33a05a1e61016e", "assets/build/ba_data/textures/file.pvr": "https://files.ballistica.net/cache/ba1/5f/25/e6079cc54364d95d6101fc74bdba", "assets/build/ba_data/textures/file_preview.png": "https://files.ballistica.net/cache/ba1/ef/c6/71a8f503449908b15a40ce3b5b03", - "assets/build/ba_data/textures/flagColor.dds": "https://files.ballistica.net/cache/ba1/4a/ce/2682d3720bff14ec43bdfcaca346", + "assets/build/ba_data/textures/flagColor.dds": "https://files.ballistica.net/cache/ba1/ee/84/655bd471f8265bc7d61f95beda16", "assets/build/ba_data/textures/flagColor.ktx": "https://files.ballistica.net/cache/ba1/81/3c/f16914e9d68d64ce59a1f7681bff", "assets/build/ba_data/textures/flagColor.pvr": "https://files.ballistica.net/cache/ba1/e0/b0/06fd752a0f3563252d6dee64dcb3", "assets/build/ba_data/textures/flagColor_preview.png": "https://files.ballistica.net/cache/ba1/0b/33/50db4a9487b0ef8d65f2628776e5", - "assets/build/ba_data/textures/flagPoleColor.dds": "https://files.ballistica.net/cache/ba1/22/e0/43555f1a8a4bff7088c33ccd179e", + "assets/build/ba_data/textures/flagPoleColor.dds": "https://files.ballistica.net/cache/ba1/ba/7a/25e2cd1d33d4f323682716489099", "assets/build/ba_data/textures/flagPoleColor.ktx": "https://files.ballistica.net/cache/ba1/0f/56/7d16d9b2af848d004da2012c2cf7", "assets/build/ba_data/textures/flagPoleColor.pvr": "https://files.ballistica.net/cache/ba1/7b/63/e163c96ff68bb242e8b9ef339711", "assets/build/ba_data/textures/flagPoleColor_preview.png": "https://files.ballistica.net/cache/ba1/e0/e4/6c41b0bfd6796344ba60d0bdf189", @@ -1574,10 +1574,10 @@ "assets/build/ba_data/textures/fontSmall7.ktx": "https://files.ballistica.net/cache/ba1/14/d0/23e59a31103533757dea7ffae94e", "assets/build/ba_data/textures/fontSmall7.pvr": "https://files.ballistica.net/cache/ba1/48/b5/26321b2643219162a713170ab9b8", "assets/build/ba_data/textures/fontSmall7_preview.png": "https://files.ballistica.net/cache/ba1/70/56/13b940fb6d0ba48023e7fac6f184", - "assets/build/ba_data/textures/footballStadium.dds": "https://files.ballistica.net/cache/ba1/c6/f3/1906912b8e4d923a0ec975de5e8f", + "assets/build/ba_data/textures/footballStadium.dds": "https://files.ballistica.net/cache/ba1/37/98/82cd29605606ef50ec7f7f1a2b38", "assets/build/ba_data/textures/footballStadium.ktx": "https://files.ballistica.net/cache/ba1/00/bf/6b8e37071ad1d6e33f30f1998bed", "assets/build/ba_data/textures/footballStadium.pvr": "https://files.ballistica.net/cache/ba1/92/69/f2c5577a1de103343ddcb01d6104", - "assets/build/ba_data/textures/footballStadiumPreview.dds": "https://files.ballistica.net/cache/ba1/d9/7f/b42a16567ea5ae5a85faa027e4ce", + "assets/build/ba_data/textures/footballStadiumPreview.dds": "https://files.ballistica.net/cache/ba1/f6/f3/032deefbd09bdb75806d9ed813c2", "assets/build/ba_data/textures/footballStadiumPreview.ktx": "https://files.ballistica.net/cache/ba1/96/f2/6cf9b95e27aeca2d8be08feedaef", "assets/build/ba_data/textures/footballStadiumPreview.pvr": "https://files.ballistica.net/cache/ba1/3f/1b/ce5faa6a8678c3b7d0a461c9509b", "assets/build/ba_data/textures/footballStadiumPreview_preview.png": "https://files.ballistica.net/cache/ba1/a7/c8/393d085e92e185e6c43ab28cd5ee", @@ -1586,15 +1586,15 @@ "assets/build/ba_data/textures/frameInset.ktx": "https://files.ballistica.net/cache/ba1/61/d7/264cfcdd0d07d67ac90827969caa", "assets/build/ba_data/textures/frameInset.pvr": "https://files.ballistica.net/cache/ba1/d1/ef/b0dd66aab3c8cf21933dc53f0c8f", "assets/build/ba_data/textures/frameInset_preview.png": "https://files.ballistica.net/cache/ba1/51/2f/a18329872f0d0b71f0a333c0db81", - "assets/build/ba_data/textures/frostyColor.dds": "https://files.ballistica.net/cache/ba1/6d/c6/2a49a0ec7810e7431c35752d3d37", + "assets/build/ba_data/textures/frostyColor.dds": "https://files.ballistica.net/cache/ba1/8c/ae/6ca51f72866944ce9691c8a1a7d5", "assets/build/ba_data/textures/frostyColor.ktx": "https://files.ballistica.net/cache/ba1/17/6c/fe178ee04831b332ff771bade627", "assets/build/ba_data/textures/frostyColor.pvr": "https://files.ballistica.net/cache/ba1/f8/fb/83779ec75b8113a47b9368ad6992", - "assets/build/ba_data/textures/frostyColorMask.dds": "https://files.ballistica.net/cache/ba1/7c/a3/3cd619ea33d9e222af6da8ce7ccc", + "assets/build/ba_data/textures/frostyColorMask.dds": "https://files.ballistica.net/cache/ba1/f0/aa/0c7c2dfc831bb96d76b2c1719597", "assets/build/ba_data/textures/frostyColorMask.ktx": "https://files.ballistica.net/cache/ba1/5d/ff/5a82bf1855c957357d277dec18c7", "assets/build/ba_data/textures/frostyColorMask.pvr": "https://files.ballistica.net/cache/ba1/d2/e3/5ccf3bc21b48180ef890cfd1ebab", "assets/build/ba_data/textures/frostyColorMask_preview.png": "https://files.ballistica.net/cache/ba1/44/6f/795803f91fbf1628e708a6a293a4", "assets/build/ba_data/textures/frostyColor_preview.png": "https://files.ballistica.net/cache/ba1/cd/3c/f7e49e7cf8164f754c2384f35e55", - "assets/build/ba_data/textures/frostyIcon.dds": "https://files.ballistica.net/cache/ba1/17/76/45c5a0a3d416259aab598bad0303", + "assets/build/ba_data/textures/frostyIcon.dds": "https://files.ballistica.net/cache/ba1/52/39/1044bf10f62219a9c804efec91ea", "assets/build/ba_data/textures/frostyIcon.ktx": "https://files.ballistica.net/cache/ba1/74/b4/d498eb65a6a3b562e9eb6195131b", "assets/build/ba_data/textures/frostyIcon.pvr": "https://files.ballistica.net/cache/ba1/a2/a6/589107d7ab94e8ba9dec5895ba6d", "assets/build/ba_data/textures/frostyIconColorMask.dds": "https://files.ballistica.net/cache/ba1/af/d5/5421823e52ef7bb86d1e24a610c4", @@ -1602,7 +1602,7 @@ "assets/build/ba_data/textures/frostyIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/8e/98/89e07ef5493074a2c4cbb7aa1592", "assets/build/ba_data/textures/frostyIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/ef/77/6b17bc9b8d8d3fa37760ed4d96ac", "assets/build/ba_data/textures/frostyIcon_preview.png": "https://files.ballistica.net/cache/ba1/3e/dd/9cc6d8f3f494b586237b050a4e06", - "assets/build/ba_data/textures/fuse.dds": "https://files.ballistica.net/cache/ba1/9a/72/5eb4b3235d38ec3f69c61fdb0445", + "assets/build/ba_data/textures/fuse.dds": "https://files.ballistica.net/cache/ba1/4b/72/e7709195c5903f968c33209dc1ed", "assets/build/ba_data/textures/fuse.ktx": "https://files.ballistica.net/cache/ba1/49/ea/71c5c7dcbdcb213c036460d59117", "assets/build/ba_data/textures/fuse.pvr": "https://files.ballistica.net/cache/ba1/48/3a/710945756ee605974820d4c98e49", "assets/build/ba_data/textures/fuse_preview.png": "https://files.ballistica.net/cache/ba1/f1/69/975f7d19d7db9a01d78ecb33bfe2", @@ -1617,7 +1617,7 @@ "assets/build/ba_data/textures/gladiatorColor.dds": "https://files.ballistica.net/cache/ba1/a8/6a/2b8eb1e0f4c15993e98be5395e4c", "assets/build/ba_data/textures/gladiatorColor.ktx": "https://files.ballistica.net/cache/ba1/20/13/e491823b8cc38a52400f9d74a209", "assets/build/ba_data/textures/gladiatorColor.pvr": "https://files.ballistica.net/cache/ba1/14/60/1d4a45b0036538368348613ad01f", - "assets/build/ba_data/textures/gladiatorColorMask.dds": "https://files.ballistica.net/cache/ba1/d2/ac/02d7c9a4320ed6a8b416d48f2665", + "assets/build/ba_data/textures/gladiatorColorMask.dds": "https://files.ballistica.net/cache/ba1/05/7f/ee686ec23643b388502639d98879", "assets/build/ba_data/textures/gladiatorColorMask.ktx": "https://files.ballistica.net/cache/ba1/1e/ae/f91222e92e938c0fc8be66103cb5", "assets/build/ba_data/textures/gladiatorColorMask.pvr": "https://files.ballistica.net/cache/ba1/46/18/4ad8171ff791a86b03160648afcf", "assets/build/ba_data/textures/gladiatorColorMask_preview.png": "https://files.ballistica.net/cache/ba1/87/45/0621a7a40782a938a8f66f8985ae", @@ -1662,10 +1662,10 @@ "assets/build/ba_data/textures/heart.ktx": "https://files.ballistica.net/cache/ba1/b7/b1/8db1d5e585578b16ad0e7dac922e", "assets/build/ba_data/textures/heart.pvr": "https://files.ballistica.net/cache/ba1/b1/78/46eb38e941aa94b7a8c654c1ef38", "assets/build/ba_data/textures/heart_preview.png": "https://files.ballistica.net/cache/ba1/3c/d8/bc7b73e6920382202f1bf27b7b40", - "assets/build/ba_data/textures/hockeyStadium.dds": "https://files.ballistica.net/cache/ba1/bc/a0/0ddbb1707aab5481582f40b5042c", + "assets/build/ba_data/textures/hockeyStadium.dds": "https://files.ballistica.net/cache/ba1/8e/19/703679fb5ac0e07d577d2727ab27", "assets/build/ba_data/textures/hockeyStadium.ktx": "https://files.ballistica.net/cache/ba1/57/14/4a768367b5a3ada80b8b866320ae", "assets/build/ba_data/textures/hockeyStadium.pvr": "https://files.ballistica.net/cache/ba1/f4/e4/65792658b9ef354781472d5f82ba", - "assets/build/ba_data/textures/hockeyStadiumPreview.dds": "https://files.ballistica.net/cache/ba1/3c/d6/a0f39559e614781ef7590cf98826", + "assets/build/ba_data/textures/hockeyStadiumPreview.dds": "https://files.ballistica.net/cache/ba1/e0/84/38b2f0294f016bf122dcbfa226d2", "assets/build/ba_data/textures/hockeyStadiumPreview.ktx": "https://files.ballistica.net/cache/ba1/af/05/69b7f2c83e332b6ec410163a59fd", "assets/build/ba_data/textures/hockeyStadiumPreview.pvr": "https://files.ballistica.net/cache/ba1/4c/fb/7bcd3e1d5f830558cd01206c57e6", "assets/build/ba_data/textures/hockeyStadiumPreview_preview.png": "https://files.ballistica.net/cache/ba1/d8/99/5d6922a337009674a13b647e06c5", @@ -1682,7 +1682,7 @@ "assets/build/ba_data/textures/iircadeLogo.ktx": "https://files.ballistica.net/cache/ba1/58/b9/848fbac7a1c7ad6a9b2efd758ff1", "assets/build/ba_data/textures/iircadeLogo.pvr": "https://files.ballistica.net/cache/ba1/19/ba/66f832c978d9cf46f991e4811401", "assets/build/ba_data/textures/iircadeLogo_preview.png": "https://files.ballistica.net/cache/ba1/c7/d6/0740136951cbc17907f6192357b2", - "assets/build/ba_data/textures/impactBombColor.dds": "https://files.ballistica.net/cache/ba1/a6/70/8486c52fb904e18e9b13f4850b5e", + "assets/build/ba_data/textures/impactBombColor.dds": "https://files.ballistica.net/cache/ba1/59/f6/810262f238679951f7702f2ed1a5", "assets/build/ba_data/textures/impactBombColor.ktx": "https://files.ballistica.net/cache/ba1/fc/3b/e1051061b1ed03bcbfdc6b9f8c79", "assets/build/ba_data/textures/impactBombColor.pvr": "https://files.ballistica.net/cache/ba1/d6/d9/0f81193db5aa44780ee8bb0943b9", "assets/build/ba_data/textures/impactBombColorLit.dds": "https://files.ballistica.net/cache/ba1/fe/65/a55aba9c983239516c96f28fd4b2", @@ -1694,15 +1694,15 @@ "assets/build/ba_data/textures/inventoryIcon.ktx": "https://files.ballistica.net/cache/ba1/3c/ca/1a61ddc33fbae07060b3ffe24531", "assets/build/ba_data/textures/inventoryIcon.pvr": "https://files.ballistica.net/cache/ba1/a7/e3/6fe1d29dd307067b5b42aa1e78ca", "assets/build/ba_data/textures/inventoryIcon_preview.png": "https://files.ballistica.net/cache/ba1/5d/95/fc2f9cf29120f6e5714a82b49762", - "assets/build/ba_data/textures/jackColor.dds": "https://files.ballistica.net/cache/ba1/9c/16/c4c568eec16b4ac15110e2213107", + "assets/build/ba_data/textures/jackColor.dds": "https://files.ballistica.net/cache/ba1/3e/bb/562defe30cd5860a6648aa8c3127", "assets/build/ba_data/textures/jackColor.ktx": "https://files.ballistica.net/cache/ba1/b4/92/c66d4bd99efdd17578c1ab40eb38", "assets/build/ba_data/textures/jackColor.pvr": "https://files.ballistica.net/cache/ba1/93/f0/b67389b8a52446f9d60119b4e4b0", - "assets/build/ba_data/textures/jackColorMask.dds": "https://files.ballistica.net/cache/ba1/33/86/4e8b48b1274373302fed850899f3", + "assets/build/ba_data/textures/jackColorMask.dds": "https://files.ballistica.net/cache/ba1/74/c3/18ed606a334e8096ab0f9a6b6045", "assets/build/ba_data/textures/jackColorMask.ktx": "https://files.ballistica.net/cache/ba1/c9/40/a44ca36c9fcb3ca51fb61dbaa2cf", "assets/build/ba_data/textures/jackColorMask.pvr": "https://files.ballistica.net/cache/ba1/32/89/9243f17fdd9d8c3d7c9cc8a26191", "assets/build/ba_data/textures/jackColorMask_preview.png": "https://files.ballistica.net/cache/ba1/71/92/54cc17903955e0b923f64bb746a7", "assets/build/ba_data/textures/jackColor_preview.png": "https://files.ballistica.net/cache/ba1/83/f8/daf0dc5014e0220a8e4bc8d1113a", - "assets/build/ba_data/textures/jackIcon.dds": "https://files.ballistica.net/cache/ba1/42/a1/c6f5a537e23a509a22a13870470f", + "assets/build/ba_data/textures/jackIcon.dds": "https://files.ballistica.net/cache/ba1/0c/1f/ec2d1e00f2b409df11b485667334", "assets/build/ba_data/textures/jackIcon.ktx": "https://files.ballistica.net/cache/ba1/e8/5d/e5e222130b790f5239089333fd92", "assets/build/ba_data/textures/jackIcon.pvr": "https://files.ballistica.net/cache/ba1/da/f9/29d46bb6b052d5aad5a81efa994e", "assets/build/ba_data/textures/jackIconColorMask.dds": "https://files.ballistica.net/cache/ba1/1e/8e/395cb09dbe9ca002ad0d5532f6bd", @@ -1713,7 +1713,7 @@ "assets/build/ba_data/textures/jumpsuitColor.dds": "https://files.ballistica.net/cache/ba1/5b/9c/4761afb2e6fc3e0f8ef028d317be", "assets/build/ba_data/textures/jumpsuitColor.ktx": "https://files.ballistica.net/cache/ba1/45/25/6084698fbdd038fbd750fc72dd28", "assets/build/ba_data/textures/jumpsuitColor.pvr": "https://files.ballistica.net/cache/ba1/6c/77/39fe91748b79f2aabc640f38fd2a", - "assets/build/ba_data/textures/jumpsuitColorMask.dds": "https://files.ballistica.net/cache/ba1/04/00/8fbe70c2d5bc499f842e76b6a71d", + "assets/build/ba_data/textures/jumpsuitColorMask.dds": "https://files.ballistica.net/cache/ba1/c3/3c/5ad8f955187c9825ea9871fa3c3c", "assets/build/ba_data/textures/jumpsuitColorMask.ktx": "https://files.ballistica.net/cache/ba1/50/c2/79341c7081f28d70de09cb6db116", "assets/build/ba_data/textures/jumpsuitColorMask.pvr": "https://files.ballistica.net/cache/ba1/51/1e/5f4580d17068abebb0f8d2609c3c", "assets/build/ba_data/textures/jumpsuitColorMask_preview.png": "https://files.ballistica.net/cache/ba1/6f/05/15f3184259761adc208e2dd659ca", @@ -1726,26 +1726,26 @@ "assets/build/ba_data/textures/jumpsuitIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/77/e0/1326a95629aec5d0a447f4694dc8", "assets/build/ba_data/textures/jumpsuitIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/d0/81/c975a77166d8bac47d63340960b4", "assets/build/ba_data/textures/jumpsuitIcon_preview.png": "https://files.ballistica.net/cache/ba1/06/1f/0f16b73da3b140ae91a645ad3920", - "assets/build/ba_data/textures/kronk.dds": "https://files.ballistica.net/cache/ba1/79/99/217e4d40c7107337bf4ff402e020", + "assets/build/ba_data/textures/kronk.dds": "https://files.ballistica.net/cache/ba1/41/b3/1173def9511feb2ebc516e070ed6", "assets/build/ba_data/textures/kronk.ktx": "https://files.ballistica.net/cache/ba1/80/d7/0f40cc83961456cca52f50d87657", "assets/build/ba_data/textures/kronk.pvr": "https://files.ballistica.net/cache/ba1/4d/74/fb56c0df66aa36551ae4ac73a141", - "assets/build/ba_data/textures/kronkColorMask.dds": "https://files.ballistica.net/cache/ba1/f7/e2/92c6c2179b0ea3dcaa85f357e3d7", + "assets/build/ba_data/textures/kronkColorMask.dds": "https://files.ballistica.net/cache/ba1/fa/9c/bba4cffffd4d7e7bdc53bd27819b", "assets/build/ba_data/textures/kronkColorMask.ktx": "https://files.ballistica.net/cache/ba1/de/23/7ab48fef2af0a1253b2eb6a083ab", "assets/build/ba_data/textures/kronkColorMask.pvr": "https://files.ballistica.net/cache/ba1/d4/ab/0df43e24f6aa11608a2f9b2bda6d", "assets/build/ba_data/textures/kronkColorMask_preview.png": "https://files.ballistica.net/cache/ba1/5c/14/80f2148210e89e8ca6b3b03b6e10", "assets/build/ba_data/textures/kronkIcon.dds": "https://files.ballistica.net/cache/ba1/d2/66/367fb5a09d45419be710683f0b8a", "assets/build/ba_data/textures/kronkIcon.ktx": "https://files.ballistica.net/cache/ba1/0b/23/ca03de39efd26cc2ca53a46f70b4", "assets/build/ba_data/textures/kronkIcon.pvr": "https://files.ballistica.net/cache/ba1/d7/2c/17a833f010265c66243ec90fcf09", - "assets/build/ba_data/textures/kronkIconColorMask.dds": "https://files.ballistica.net/cache/ba1/ec/4f/d9c86c700f2feaf28767f666a836", + "assets/build/ba_data/textures/kronkIconColorMask.dds": "https://files.ballistica.net/cache/ba1/8b/b1/d2f52c09816856963fa41e1e8b83", "assets/build/ba_data/textures/kronkIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/41/41/5c76cd5af36248308d96cf1b4bcd", "assets/build/ba_data/textures/kronkIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/4c/0c/41d95110ecda25e0e66a3876cce4", "assets/build/ba_data/textures/kronkIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/a3/24/7b66c17a8bae4ef0f9f3ca4a95ca", "assets/build/ba_data/textures/kronkIcon_preview.png": "https://files.ballistica.net/cache/ba1/5f/28/4ca750d54dcb57ad82f3bbacd2e5", "assets/build/ba_data/textures/kronk_preview.png": "https://files.ballistica.net/cache/ba1/0b/2e/083f0a0c74bec4b4f629e2bdd2a0", - "assets/build/ba_data/textures/lakeFrigid.dds": "https://files.ballistica.net/cache/ba1/de/16/41f8895b19d81123ab48ad72f38d", + "assets/build/ba_data/textures/lakeFrigid.dds": "https://files.ballistica.net/cache/ba1/52/fb/3df33cd21b7e6cfa4e4f9b03add5", "assets/build/ba_data/textures/lakeFrigid.ktx": "https://files.ballistica.net/cache/ba1/d2/ad/c28e092d9eeea2c5643d1d89613f", "assets/build/ba_data/textures/lakeFrigid.pvr": "https://files.ballistica.net/cache/ba1/f8/c0/53f0c6ec9f5ec37514b07d0c3506", - "assets/build/ba_data/textures/lakeFrigidPreview.dds": "https://files.ballistica.net/cache/ba1/eb/fd/9d832e847a72de6f62a02403abc5", + "assets/build/ba_data/textures/lakeFrigidPreview.dds": "https://files.ballistica.net/cache/ba1/23/9b/b65965dc2da90a77737df299527f", "assets/build/ba_data/textures/lakeFrigidPreview.ktx": "https://files.ballistica.net/cache/ba1/8f/d5/185af314124e8ca312475205704e", "assets/build/ba_data/textures/lakeFrigidPreview.pvr": "https://files.ballistica.net/cache/ba1/9b/2d/8b05ecb7e85b4dd42613e3e0ff89", "assets/build/ba_data/textures/lakeFrigidPreview_preview.png": "https://files.ballistica.net/cache/ba1/80/ef/8283d6c6c7f144b1dd187262b661", @@ -1822,10 +1822,10 @@ "assets/build/ba_data/textures/medalSilver.ktx": "https://files.ballistica.net/cache/ba1/68/84/934ab97c1014e98ffd6bbb24ad89", "assets/build/ba_data/textures/medalSilver.pvr": "https://files.ballistica.net/cache/ba1/37/e8/0f2d99b80e98d8388cbb1fb81aed", "assets/build/ba_data/textures/medalSilver_preview.png": "https://files.ballistica.net/cache/ba1/1c/38/7e840a4f3b6f7c15e21b22628603", - "assets/build/ba_data/textures/melColor.dds": "https://files.ballistica.net/cache/ba1/c6/f1/ef8f3740635ec2b601f73afe0424", + "assets/build/ba_data/textures/melColor.dds": "https://files.ballistica.net/cache/ba1/bd/29/6743f3197828fb39a9f424788023", "assets/build/ba_data/textures/melColor.ktx": "https://files.ballistica.net/cache/ba1/fa/a1/645eb759ffd7b046fe91ff4f9f8b", "assets/build/ba_data/textures/melColor.pvr": "https://files.ballistica.net/cache/ba1/b1/90/45696ef2a4717ce5f3e1838e31f1", - "assets/build/ba_data/textures/melColorMask.dds": "https://files.ballistica.net/cache/ba1/b7/64/9ae23dc4897fd612952d3193c023", + "assets/build/ba_data/textures/melColorMask.dds": "https://files.ballistica.net/cache/ba1/0c/95/4cce7a44347eef0356dd96dbae60", "assets/build/ba_data/textures/melColorMask.ktx": "https://files.ballistica.net/cache/ba1/bb/ed/2e666f6e2d647b45874645084028", "assets/build/ba_data/textures/melColorMask.pvr": "https://files.ballistica.net/cache/ba1/af/a4/002bc32b803774a668ce8953014e", "assets/build/ba_data/textures/melColorMask_preview.png": "https://files.ballistica.net/cache/ba1/58/ee/347860a4fc2faf37f1fa3013ce18", @@ -1833,12 +1833,12 @@ "assets/build/ba_data/textures/melIcon.dds": "https://files.ballistica.net/cache/ba1/0e/b2/683438456569eacf65b24f18b66f", "assets/build/ba_data/textures/melIcon.ktx": "https://files.ballistica.net/cache/ba1/a6/fb/e0f4945bea0edf83729dadf52f24", "assets/build/ba_data/textures/melIcon.pvr": "https://files.ballistica.net/cache/ba1/b6/ec/ed46dda142a62f35c28720878c8f", - "assets/build/ba_data/textures/melIconColorMask.dds": "https://files.ballistica.net/cache/ba1/61/b4/637cf663cd1df1d6adacfcbc148c", + "assets/build/ba_data/textures/melIconColorMask.dds": "https://files.ballistica.net/cache/ba1/5a/db/4439edcfbbef9ea932fb7d56e26a", "assets/build/ba_data/textures/melIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/64/e0/2f0de4aca98350b0cecbaea53cda", "assets/build/ba_data/textures/melIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/ba/94/c1955a495fcb9156ef4415105fa3", "assets/build/ba_data/textures/melIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/60/9b/38b259d63b5b8c17e0e8f4a09682", "assets/build/ba_data/textures/melIcon_preview.png": "https://files.ballistica.net/cache/ba1/cf/1d/5fd4405703e177ab90cc331e2809", - "assets/build/ba_data/textures/menuBG.dds": "https://files.ballistica.net/cache/ba1/66/38/e19d5d26e0c3b7750ad612288f51", + "assets/build/ba_data/textures/menuBG.dds": "https://files.ballistica.net/cache/ba1/7c/60/840dbf0ae2e0273c5553a81a9613", "assets/build/ba_data/textures/menuBG.ktx": "https://files.ballistica.net/cache/ba1/f9/f7/a09f825ab514e1a57fcf67149798", "assets/build/ba_data/textures/menuBG.pvr": "https://files.ballistica.net/cache/ba1/2e/8a/11960533b874cb081c384a521710", "assets/build/ba_data/textures/menuBG_preview.png": "https://files.ballistica.net/cache/ba1/03/1c/9a07cf577bdf39e58effdbc2e242", @@ -1854,11 +1854,11 @@ "assets/build/ba_data/textures/meter.ktx": "https://files.ballistica.net/cache/ba1/b5/e7/3ba3d4c7c7e05081eb033ae5da8f", "assets/build/ba_data/textures/meter.pvr": "https://files.ballistica.net/cache/ba1/58/de/ab83ad9e0d9b434ca42811030ef9", "assets/build/ba_data/textures/meter_preview.png": "https://files.ballistica.net/cache/ba1/09/b7/40a1a187d7b057defa6f32c6b372", - "assets/build/ba_data/textures/monkeyFaceLevelColor.dds": "https://files.ballistica.net/cache/ba1/e8/41/cfcdc67b1adbf50621ae9ebdafef", + "assets/build/ba_data/textures/monkeyFaceLevelColor.dds": "https://files.ballistica.net/cache/ba1/c6/29/e07d5663f90bec057f4c0a175baa", "assets/build/ba_data/textures/monkeyFaceLevelColor.ktx": "https://files.ballistica.net/cache/ba1/33/d0/e2600748ebab847b7a146350a3c9", "assets/build/ba_data/textures/monkeyFaceLevelColor.pvr": "https://files.ballistica.net/cache/ba1/09/98/9491294da842980b75739e8d1c59", "assets/build/ba_data/textures/monkeyFaceLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/2f/84/fd142ba957ead4acb7b4081a3771", - "assets/build/ba_data/textures/monkeyFacePreview.dds": "https://files.ballistica.net/cache/ba1/7d/53/6c90a28662f70e03ae967a63151c", + "assets/build/ba_data/textures/monkeyFacePreview.dds": "https://files.ballistica.net/cache/ba1/3d/14/795c5ec8cf2e1b5c49e1dba05341", "assets/build/ba_data/textures/monkeyFacePreview.ktx": "https://files.ballistica.net/cache/ba1/ff/83/d340f1495861ebb97bd7f766ccbb", "assets/build/ba_data/textures/monkeyFacePreview.pvr": "https://files.ballistica.net/cache/ba1/85/e7/807edc04137ee1a3b7767e90d692", "assets/build/ba_data/textures/monkeyFacePreview_preview.png": "https://files.ballistica.net/cache/ba1/5c/62/929429eb7fd47b21edf6dd8d8f63", @@ -1866,19 +1866,19 @@ "assets/build/ba_data/textures/multiplayerExamples.ktx": "https://files.ballistica.net/cache/ba1/48/2c/081cf255b138824720c0b49d2e1e", "assets/build/ba_data/textures/multiplayerExamples.pvr": "https://files.ballistica.net/cache/ba1/d1/db/8902cdbf501bf919e5f9f0ada2b4", "assets/build/ba_data/textures/multiplayerExamples_preview.png": "https://files.ballistica.net/cache/ba1/ea/7c/acf4240ca1fa313126060a8258f0", - "assets/build/ba_data/textures/natureBackgroundColor.dds": "https://files.ballistica.net/cache/ba1/41/5a/2821b371bfb514531fd617be39cd", + "assets/build/ba_data/textures/natureBackgroundColor.dds": "https://files.ballistica.net/cache/ba1/78/ff/45c52ff0f98ffabcd472e68e3a04", "assets/build/ba_data/textures/natureBackgroundColor.ktx": "https://files.ballistica.net/cache/ba1/60/09/50676eca6d0599eabf895f18aa21", "assets/build/ba_data/textures/natureBackgroundColor.pvr": "https://files.ballistica.net/cache/ba1/1f/37/b4950cf37311fc39f53235adb190", "assets/build/ba_data/textures/natureBackgroundColor_preview.png": "https://files.ballistica.net/cache/ba1/61/91/2af689aba61ee35bc281a8c2fc88", - "assets/build/ba_data/textures/neoSpazColor.dds": "https://files.ballistica.net/cache/ba1/e7/77/ba83d0d9a1472d495d3ebaa182c4", + "assets/build/ba_data/textures/neoSpazColor.dds": "https://files.ballistica.net/cache/ba1/91/44/f06dba5c1cb7fda6d62e2c0c5484", "assets/build/ba_data/textures/neoSpazColor.ktx": "https://files.ballistica.net/cache/ba1/d1/d7/797152df3d1260338405ea0ea59f", "assets/build/ba_data/textures/neoSpazColor.pvr": "https://files.ballistica.net/cache/ba1/8b/68/60b1e0bc0c6295fba84e493c313d", - "assets/build/ba_data/textures/neoSpazColorMask.dds": "https://files.ballistica.net/cache/ba1/05/ff/08bba0e201d0eea3ead5746ca96f", + "assets/build/ba_data/textures/neoSpazColorMask.dds": "https://files.ballistica.net/cache/ba1/72/05/774cf76faed583a54d1658e17402", "assets/build/ba_data/textures/neoSpazColorMask.ktx": "https://files.ballistica.net/cache/ba1/ef/f6/84779b7eb27ccbbcdb77f3b6f2fb", "assets/build/ba_data/textures/neoSpazColorMask.pvr": "https://files.ballistica.net/cache/ba1/a2/a8/4aa145599bd4b8c53d87624553e2", "assets/build/ba_data/textures/neoSpazColorMask_preview.png": "https://files.ballistica.net/cache/ba1/62/88/1239b81fe081de88c08ac7434bc3", "assets/build/ba_data/textures/neoSpazColor_preview.png": "https://files.ballistica.net/cache/ba1/23/2c/b541bf04f85d1aa5de3b475b82d2", - "assets/build/ba_data/textures/neoSpazIcon.dds": "https://files.ballistica.net/cache/ba1/e0/6e/59525196623212ac76d96d9cd3bb", + "assets/build/ba_data/textures/neoSpazIcon.dds": "https://files.ballistica.net/cache/ba1/d9/ef/2e3e5cb4151c3ac209c0774dea79", "assets/build/ba_data/textures/neoSpazIcon.ktx": "https://files.ballistica.net/cache/ba1/d2/b5/f7c3badf697bc9dd82cffd17352c", "assets/build/ba_data/textures/neoSpazIcon.pvr": "https://files.ballistica.net/cache/ba1/47/c1/5ee2e1475e142aa8468b2d50c752", "assets/build/ba_data/textures/neoSpazIconColorMask.dds": "https://files.ballistica.net/cache/ba1/60/46/4e61726cb5e2c81b0e0af5a7cd5e", @@ -1890,15 +1890,15 @@ "assets/build/ba_data/textures/nextLevelIcon.ktx": "https://files.ballistica.net/cache/ba1/b2/84/0bb105ab76cc15c66f52ecbefcf7", "assets/build/ba_data/textures/nextLevelIcon.pvr": "https://files.ballistica.net/cache/ba1/0b/8d/087ad0de136250c54e42f4dca92f", "assets/build/ba_data/textures/nextLevelIcon_preview.png": "https://files.ballistica.net/cache/ba1/76/5f/ffae5ff97775780301b96a1a3f52", - "assets/build/ba_data/textures/ninjaColor.dds": "https://files.ballistica.net/cache/ba1/e7/25/60195fddd30365324328f09e1230", + "assets/build/ba_data/textures/ninjaColor.dds": "https://files.ballistica.net/cache/ba1/d3/5c/67af280eab6793195bb039488ce1", "assets/build/ba_data/textures/ninjaColor.ktx": "https://files.ballistica.net/cache/ba1/2a/a1/22d137826995da608c2e3898083e", "assets/build/ba_data/textures/ninjaColor.pvr": "https://files.ballistica.net/cache/ba1/2d/0c/6a9364e38112591a5f77de741ca2", - "assets/build/ba_data/textures/ninjaColorMask.dds": "https://files.ballistica.net/cache/ba1/db/da/51021e6f1482e5664af808b29b00", + "assets/build/ba_data/textures/ninjaColorMask.dds": "https://files.ballistica.net/cache/ba1/02/06/3c07252b18ba88964bba62b8a656", "assets/build/ba_data/textures/ninjaColorMask.ktx": "https://files.ballistica.net/cache/ba1/1d/68/ee8c4f656d583b49638f3cb40b4e", "assets/build/ba_data/textures/ninjaColorMask.pvr": "https://files.ballistica.net/cache/ba1/06/0a/58e0e29f5b9f503afcfc1a93f052", "assets/build/ba_data/textures/ninjaColorMask_preview.png": "https://files.ballistica.net/cache/ba1/8c/22/0103111a22390dd49615eaf2a4c3", "assets/build/ba_data/textures/ninjaColor_preview.png": "https://files.ballistica.net/cache/ba1/d9/d9/52cf79858329ee664417fa86325a", - "assets/build/ba_data/textures/ninjaIcon.dds": "https://files.ballistica.net/cache/ba1/a4/34/ac0523aa0d224b5668966a1ce6cd", + "assets/build/ba_data/textures/ninjaIcon.dds": "https://files.ballistica.net/cache/ba1/38/30/a7b91f95d0d38b8d31558ca83680", "assets/build/ba_data/textures/ninjaIcon.ktx": "https://files.ballistica.net/cache/ba1/fb/be/7acdbf4b9e212c3a20bf7b7ffe1a", "assets/build/ba_data/textures/ninjaIcon.pvr": "https://files.ballistica.net/cache/ba1/1a/c3/a5843f74115717fcbeb44cb792df", "assets/build/ba_data/textures/ninjaIconColorMask.dds": "https://files.ballistica.net/cache/ba1/b8/eb/6b4811f664e79059a8604db820d6", @@ -1917,7 +1917,7 @@ "assets/build/ba_data/textures/oldLadyColor.dds": "https://files.ballistica.net/cache/ba1/9c/9a/7b82b343061f5b2f8f2b281abf07", "assets/build/ba_data/textures/oldLadyColor.ktx": "https://files.ballistica.net/cache/ba1/e9/a6/b2c434cba993f176a1fbce5e017c", "assets/build/ba_data/textures/oldLadyColor.pvr": "https://files.ballistica.net/cache/ba1/49/6e/5d95e58db32fafff298781d3c379", - "assets/build/ba_data/textures/oldLadyColorMask.dds": "https://files.ballistica.net/cache/ba1/e5/91/354e94e932df33f458ee0bf6e1a0", + "assets/build/ba_data/textures/oldLadyColorMask.dds": "https://files.ballistica.net/cache/ba1/e3/9e/dc76d3799d4e1900d605745f71e6", "assets/build/ba_data/textures/oldLadyColorMask.ktx": "https://files.ballistica.net/cache/ba1/81/da/80cd97c5f4c228ea585d4c6b1906", "assets/build/ba_data/textures/oldLadyColorMask.pvr": "https://files.ballistica.net/cache/ba1/b7/fc/328a89dfc0578184d0cd9be05e5f", "assets/build/ba_data/textures/oldLadyColorMask_preview.png": "https://files.ballistica.net/cache/ba1/f7/23/f290703d2c69f7f115151907afdd", @@ -1933,7 +1933,7 @@ "assets/build/ba_data/textures/operaSingerColor.dds": "https://files.ballistica.net/cache/ba1/06/40/1d46db18bbf308f1e8e88ed25c7d", "assets/build/ba_data/textures/operaSingerColor.ktx": "https://files.ballistica.net/cache/ba1/a9/34/bac2cb5bfa5cfac1b5a209e77a36", "assets/build/ba_data/textures/operaSingerColor.pvr": "https://files.ballistica.net/cache/ba1/1b/e3/4a871e36791bf302c0ecb68426a7", - "assets/build/ba_data/textures/operaSingerColorMask.dds": "https://files.ballistica.net/cache/ba1/a6/c8/eb903a977a1c83792b5a9485357a", + "assets/build/ba_data/textures/operaSingerColorMask.dds": "https://files.ballistica.net/cache/ba1/e4/57/7f6534987c17b43ac14da7aa15cc", "assets/build/ba_data/textures/operaSingerColorMask.ktx": "https://files.ballistica.net/cache/ba1/ad/76/24839951a638bcdbd2f399e26b96", "assets/build/ba_data/textures/operaSingerColorMask.pvr": "https://files.ballistica.net/cache/ba1/1e/56/ce51acda0e9f77cf8450c4871503", "assets/build/ba_data/textures/operaSingerColorMask_preview.png": "https://files.ballistica.net/cache/ba1/99/5e/a20ff9e112ae711dff9d9b0602c0", @@ -1966,34 +1966,34 @@ "assets/build/ba_data/textures/ouyaYButton.ktx": "https://files.ballistica.net/cache/ba1/dd/99/0a8364d55243d59174e449445c40", "assets/build/ba_data/textures/ouyaYButton.pvr": "https://files.ballistica.net/cache/ba1/2d/f8/ebd32f8ca2f65f450641eda0e4b3", "assets/build/ba_data/textures/ouyaYButton_preview.png": "https://files.ballistica.net/cache/ba1/a0/39/27eb09f33ca04d133a2c86d30f87", - "assets/build/ba_data/textures/penguinColor.dds": "https://files.ballistica.net/cache/ba1/46/06/98a0d4e3a61c17eabca8a5addac9", + "assets/build/ba_data/textures/penguinColor.dds": "https://files.ballistica.net/cache/ba1/b0/90/b5e0f65db8428e7f58a677fc8712", "assets/build/ba_data/textures/penguinColor.ktx": "https://files.ballistica.net/cache/ba1/e8/a4/4bebf5671504129dd5daa25a8eaf", "assets/build/ba_data/textures/penguinColor.pvr": "https://files.ballistica.net/cache/ba1/5c/7b/af36d581b9c5e920609861c4fab0", - "assets/build/ba_data/textures/penguinColorMask.dds": "https://files.ballistica.net/cache/ba1/ea/71/c0d2e8b03f5e02a17e884c332691", + "assets/build/ba_data/textures/penguinColorMask.dds": "https://files.ballistica.net/cache/ba1/70/9c/9b96ade9b7231f07ae0580e4f60f", "assets/build/ba_data/textures/penguinColorMask.ktx": "https://files.ballistica.net/cache/ba1/8a/10/60999fce550b8de1444f1d05f263", "assets/build/ba_data/textures/penguinColorMask.pvr": "https://files.ballistica.net/cache/ba1/46/27/d3978fdfac00e02373d9298e755f", "assets/build/ba_data/textures/penguinColorMask_preview.png": "https://files.ballistica.net/cache/ba1/a9/f6/99954cafdabea10227ac0943a206", "assets/build/ba_data/textures/penguinColor_preview.png": "https://files.ballistica.net/cache/ba1/d5/4d/bb509ed353b4dd0e1e5231ddb59d", - "assets/build/ba_data/textures/penguinIcon.dds": "https://files.ballistica.net/cache/ba1/8b/01/d805bef78053a8bc2980fa9e987d", + "assets/build/ba_data/textures/penguinIcon.dds": "https://files.ballistica.net/cache/ba1/2c/07/d519ac490eec7432713ce7b85473", "assets/build/ba_data/textures/penguinIcon.ktx": "https://files.ballistica.net/cache/ba1/5a/d8/daadfc2654dd77d31caf4e0796d0", "assets/build/ba_data/textures/penguinIcon.pvr": "https://files.ballistica.net/cache/ba1/87/1c/dcbc92cc2fe862c43e81d587b1fe", - "assets/build/ba_data/textures/penguinIconColorMask.dds": "https://files.ballistica.net/cache/ba1/f0/0d/71a45142684d98ec7004eab7cfcd", + "assets/build/ba_data/textures/penguinIconColorMask.dds": "https://files.ballistica.net/cache/ba1/b7/be/a11bb4ae3d7535c43ca02afd0ee3", "assets/build/ba_data/textures/penguinIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/b2/10/73b6efac0d2df908570c53ded344", "assets/build/ba_data/textures/penguinIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/25/26/0551afc2a52c6a6426ff3c21e4f4", "assets/build/ba_data/textures/penguinIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/7c/0e/7df9e0157fd40450e0b5935cdc41", "assets/build/ba_data/textures/penguinIcon_preview.png": "https://files.ballistica.net/cache/ba1/db/bf/98796d0f0d33bc200c896ba82109", - "assets/build/ba_data/textures/pixieColor.dds": "https://files.ballistica.net/cache/ba1/75/cc/389a63b73cfcbae4aed11b8b710a", + "assets/build/ba_data/textures/pixieColor.dds": "https://files.ballistica.net/cache/ba1/f0/f6/90a78ac8b17c8b3b6cb258f078ed", "assets/build/ba_data/textures/pixieColor.ktx": "https://files.ballistica.net/cache/ba1/23/90/c836828f9342e6bd21612ff78938", "assets/build/ba_data/textures/pixieColor.pvr": "https://files.ballistica.net/cache/ba1/3d/ce/acca60b5cde2111bd62d90adc41e", - "assets/build/ba_data/textures/pixieColorMask.dds": "https://files.ballistica.net/cache/ba1/82/27/8c1fe9eec5b984f42fca3d3e9381", + "assets/build/ba_data/textures/pixieColorMask.dds": "https://files.ballistica.net/cache/ba1/7f/8f/4eaddebfa9dfb7909c7cdad4b576", "assets/build/ba_data/textures/pixieColorMask.ktx": "https://files.ballistica.net/cache/ba1/59/fe/138ccc612be62ef4a30b9adfbcf9", "assets/build/ba_data/textures/pixieColorMask.pvr": "https://files.ballistica.net/cache/ba1/57/84/72b8fc64aad487d406fc876b1b42", "assets/build/ba_data/textures/pixieColorMask_preview.png": "https://files.ballistica.net/cache/ba1/8a/7e/51ba798eac9278727df8a804ba35", "assets/build/ba_data/textures/pixieColor_preview.png": "https://files.ballistica.net/cache/ba1/07/86/d9bab7a777b2e38107403edfcd50", - "assets/build/ba_data/textures/pixieIcon.dds": "https://files.ballistica.net/cache/ba1/68/32/7d731f50bf51e633df18254034a3", + "assets/build/ba_data/textures/pixieIcon.dds": "https://files.ballistica.net/cache/ba1/b7/f4/fd43b64dacef89608c5ab6db0377", "assets/build/ba_data/textures/pixieIcon.ktx": "https://files.ballistica.net/cache/ba1/e8/25/576bf3a4e9e2dba964c5f18b6622", "assets/build/ba_data/textures/pixieIcon.pvr": "https://files.ballistica.net/cache/ba1/21/72/ba1ca96c4f017c11cffaec11d788", - "assets/build/ba_data/textures/pixieIconColorMask.dds": "https://files.ballistica.net/cache/ba1/3c/25/1f57bdf36447463ad1065a614c7f", + "assets/build/ba_data/textures/pixieIconColorMask.dds": "https://files.ballistica.net/cache/ba1/1d/8c/bcfcc534447ae4a5eb33effa157c", "assets/build/ba_data/textures/pixieIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/76/3f/caf7f06633052fa327db6eaa39d6", "assets/build/ba_data/textures/pixieIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/1f/1e/da8a3c0f1a42acbe09140e29609d", "assets/build/ba_data/textures/pixieIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/18/f4/e96160f142153a37f9e0919c883e", @@ -2006,7 +2006,7 @@ "assets/build/ba_data/textures/powerupBomb.ktx": "https://files.ballistica.net/cache/ba1/1b/bc/5bf3f52c9f880476221d63a41ee1", "assets/build/ba_data/textures/powerupBomb.pvr": "https://files.ballistica.net/cache/ba1/99/05/7144537430a306d45efbd75f733f", "assets/build/ba_data/textures/powerupBomb_preview.png": "https://files.ballistica.net/cache/ba1/75/17/31e7f1997e0f3304b597a062efa7", - "assets/build/ba_data/textures/powerupCurse.dds": "https://files.ballistica.net/cache/ba1/6f/cd/50c78074de3f655afe1d029ffce8", + "assets/build/ba_data/textures/powerupCurse.dds": "https://files.ballistica.net/cache/ba1/2e/ff/9c66e6f7c1a973155e68ab5560a8", "assets/build/ba_data/textures/powerupCurse.ktx": "https://files.ballistica.net/cache/ba1/40/4f/0648e5b36ad56442fdba6e07ce6c", "assets/build/ba_data/textures/powerupCurse.pvr": "https://files.ballistica.net/cache/ba1/31/2b/01f49d263a0915691651ae6b8196", "assets/build/ba_data/textures/powerupCurse_preview.png": "https://files.ballistica.net/cache/ba1/07/21/962169962af41bec8c43cf3d01a1", @@ -2014,7 +2014,7 @@ "assets/build/ba_data/textures/powerupHealth.ktx": "https://files.ballistica.net/cache/ba1/be/3e/5bd4f2ac8d7bf972571f89992264", "assets/build/ba_data/textures/powerupHealth.pvr": "https://files.ballistica.net/cache/ba1/64/ec/f1507c9ed94d0bd4b0c9ab8569da", "assets/build/ba_data/textures/powerupHealth_preview.png": "https://files.ballistica.net/cache/ba1/42/11/e09c9daf2dadf44be3b9249e3fa4", - "assets/build/ba_data/textures/powerupIceBombs.dds": "https://files.ballistica.net/cache/ba1/9f/4d/af9b3707142271e4b6090c19f330", + "assets/build/ba_data/textures/powerupIceBombs.dds": "https://files.ballistica.net/cache/ba1/03/8e/96c1d4ef593ea45528f2dda9853c", "assets/build/ba_data/textures/powerupIceBombs.ktx": "https://files.ballistica.net/cache/ba1/27/6e/3b2b5fa2e68a073db9ed5c67da39", "assets/build/ba_data/textures/powerupIceBombs.pvr": "https://files.ballistica.net/cache/ba1/b3/32/b9c0df53502d4402b36b8bdba951", "assets/build/ba_data/textures/powerupIceBombs_preview.png": "https://files.ballistica.net/cache/ba1/61/8b/7f43a09b4ca30edef5099cecbbb1", @@ -2022,7 +2022,7 @@ "assets/build/ba_data/textures/powerupImpactBombs.ktx": "https://files.ballistica.net/cache/ba1/49/0c/df4b313585f897592ccee9d5c542", "assets/build/ba_data/textures/powerupImpactBombs.pvr": "https://files.ballistica.net/cache/ba1/f2/1b/8b6c447613d2bbec20cff630b1f1", "assets/build/ba_data/textures/powerupImpactBombs_preview.png": "https://files.ballistica.net/cache/ba1/0c/33/5d041471446792bb5da31291b869", - "assets/build/ba_data/textures/powerupLandMines.dds": "https://files.ballistica.net/cache/ba1/99/f8/ea06e3d99018797fe82841988cce", + "assets/build/ba_data/textures/powerupLandMines.dds": "https://files.ballistica.net/cache/ba1/8b/96/2731079019cf1688415831619c76", "assets/build/ba_data/textures/powerupLandMines.ktx": "https://files.ballistica.net/cache/ba1/79/ac/333130d040444c03fbcf7302e35b", "assets/build/ba_data/textures/powerupLandMines.pvr": "https://files.ballistica.net/cache/ba1/2b/7a/4ac9f04cfa3a59e19fd3ddd72b2e", "assets/build/ba_data/textures/powerupLandMines_preview.png": "https://files.ballistica.net/cache/ba1/21/bc/b619e59db015ed4cc8020972a336", @@ -2038,31 +2038,31 @@ "assets/build/ba_data/textures/powerupSpeed.ktx": "https://files.ballistica.net/cache/ba1/2e/fc/63e2a260e55d0d33ed0dc4400cb0", "assets/build/ba_data/textures/powerupSpeed.pvr": "https://files.ballistica.net/cache/ba1/35/c1/657cc9772d575786c21d2575034d", "assets/build/ba_data/textures/powerupSpeed_preview.png": "https://files.ballistica.net/cache/ba1/f1/2a/278da1921f939809afad254fbb03", - "assets/build/ba_data/textures/powerupStickyBombs.dds": "https://files.ballistica.net/cache/ba1/02/93/92f9be86367f44404b8257bdbf6c", + "assets/build/ba_data/textures/powerupStickyBombs.dds": "https://files.ballistica.net/cache/ba1/eb/e0/0191d68d9daf896e9d2298c57941", "assets/build/ba_data/textures/powerupStickyBombs.ktx": "https://files.ballistica.net/cache/ba1/fd/1b/0a64a4e0149e6c9acc3bd5710283", "assets/build/ba_data/textures/powerupStickyBombs.pvr": "https://files.ballistica.net/cache/ba1/f5/44/ea00c858e1fdd2c73ae953b6fbe5", "assets/build/ba_data/textures/powerupStickyBombs_preview.png": "https://files.ballistica.net/cache/ba1/76/67/7e11feb9a7f94a68be36128e9afd", - "assets/build/ba_data/textures/puckColor.dds": "https://files.ballistica.net/cache/ba1/14/5f/893c54c1ccb320272450c24d232b", + "assets/build/ba_data/textures/puckColor.dds": "https://files.ballistica.net/cache/ba1/55/0f/0ad93b23a0a4d86ce4799135b26d", "assets/build/ba_data/textures/puckColor.ktx": "https://files.ballistica.net/cache/ba1/91/a8/49adfe0386637b17fd0d5df798d5", "assets/build/ba_data/textures/puckColor.pvr": "https://files.ballistica.net/cache/ba1/00/54/b9d50d210bfba69387909e6e91de", "assets/build/ba_data/textures/puckColor_preview.png": "https://files.ballistica.net/cache/ba1/bd/c4/4a3a3dcb8c1084a34479d43dcaed", - "assets/build/ba_data/textures/rampageBGColor.dds": "https://files.ballistica.net/cache/ba1/37/a1/a11281d3002afc84c3d28db58395", + "assets/build/ba_data/textures/rampageBGColor.dds": "https://files.ballistica.net/cache/ba1/34/2b/e98df914e71d6789e771ea70a264", "assets/build/ba_data/textures/rampageBGColor.ktx": "https://files.ballistica.net/cache/ba1/b0/39/acaf74037621c74a29a72576ee20", "assets/build/ba_data/textures/rampageBGColor.pvr": "https://files.ballistica.net/cache/ba1/6b/9d/54521c22a5e2de98eabfb985fa85", - "assets/build/ba_data/textures/rampageBGColor2.dds": "https://files.ballistica.net/cache/ba1/08/35/b2aca6e05626aaf870cceb35ba8e", + "assets/build/ba_data/textures/rampageBGColor2.dds": "https://files.ballistica.net/cache/ba1/22/94/8c49d6e549a2f08076d48417fb40", "assets/build/ba_data/textures/rampageBGColor2.ktx": "https://files.ballistica.net/cache/ba1/60/23/d866c382fc22fdea03bf2527d147", "assets/build/ba_data/textures/rampageBGColor2.pvr": "https://files.ballistica.net/cache/ba1/3e/69/d3c1a9d7f8910199598f010efd8a", "assets/build/ba_data/textures/rampageBGColor2_preview.png": "https://files.ballistica.net/cache/ba1/79/f6/068a9185d32b580a4e73806d8d12", "assets/build/ba_data/textures/rampageBGColor_preview.png": "https://files.ballistica.net/cache/ba1/38/39/0a2366c421eacc7c5a051c430e15", - "assets/build/ba_data/textures/rampageLevelColor.dds": "https://files.ballistica.net/cache/ba1/fe/40/41c878b5db3ebe47686d8a605cf6", + "assets/build/ba_data/textures/rampageLevelColor.dds": "https://files.ballistica.net/cache/ba1/81/69/f4b28c3c4713d96e3cb208bcfbce", "assets/build/ba_data/textures/rampageLevelColor.ktx": "https://files.ballistica.net/cache/ba1/ef/06/d2ac2ec0f775180b62e341a5890f", "assets/build/ba_data/textures/rampageLevelColor.pvr": "https://files.ballistica.net/cache/ba1/8a/74/ff813c81875c81cd8ccd345c5a27", "assets/build/ba_data/textures/rampageLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/b9/db/0920892160b677dac33844acb9e3", - "assets/build/ba_data/textures/rampagePreview.dds": "https://files.ballistica.net/cache/ba1/15/af/3089f17f4e969b3780c92ef1ba58", + "assets/build/ba_data/textures/rampagePreview.dds": "https://files.ballistica.net/cache/ba1/09/56/67a073d1abfec5e861e3412bca94", "assets/build/ba_data/textures/rampagePreview.ktx": "https://files.ballistica.net/cache/ba1/b3/80/783d2507b45af55ebe7d9e4aa7b1", "assets/build/ba_data/textures/rampagePreview.pvr": "https://files.ballistica.net/cache/ba1/97/d2/99028f0da86ef4d61a70da709c29", "assets/build/ba_data/textures/rampagePreview_preview.png": "https://files.ballistica.net/cache/ba1/4f/64/6469bc8cfe52cdd9590c1edbc89c", - "assets/build/ba_data/textures/reflectionChar_+x.dds": "https://files.ballistica.net/cache/ba1/5b/6d/76948a60ad687d91d4db8696ff35", + "assets/build/ba_data/textures/reflectionChar_+x.dds": "https://files.ballistica.net/cache/ba1/2c/ec/82270cbcd6f3fc72aa1c69036163", "assets/build/ba_data/textures/reflectionChar_+x.ktx": "https://files.ballistica.net/cache/ba1/d2/31/6eb2af3d54a5a9b194f5fd5a0cd7", "assets/build/ba_data/textures/reflectionChar_+x.pvr": "https://files.ballistica.net/cache/ba1/45/72/1bf60fc63ee6024e2c62026e1d13", "assets/build/ba_data/textures/reflectionChar_+x_preview.png": "https://files.ballistica.net/cache/ba1/3e/19/1545732b54357b959468baeadb05", @@ -2078,7 +2078,7 @@ "assets/build/ba_data/textures/reflectionChar_-x.ktx": "https://files.ballistica.net/cache/ba1/7b/a7/6592e876e7c31687e11e019a305d", "assets/build/ba_data/textures/reflectionChar_-x.pvr": "https://files.ballistica.net/cache/ba1/88/fb/372bde1b68e238da396a7576088f", "assets/build/ba_data/textures/reflectionChar_-x_preview.png": "https://files.ballistica.net/cache/ba1/81/8f/422c1c54b3021abc70a4aa64b3fd", - "assets/build/ba_data/textures/reflectionChar_-y.dds": "https://files.ballistica.net/cache/ba1/25/03/628a5da0305261041300f75ef756", + "assets/build/ba_data/textures/reflectionChar_-y.dds": "https://files.ballistica.net/cache/ba1/45/c3/d1f2ffdb624d2236eb41e93b79cc", "assets/build/ba_data/textures/reflectionChar_-y.ktx": "https://files.ballistica.net/cache/ba1/25/1f/4e5b9240dcf6ea6639fb81f3579a", "assets/build/ba_data/textures/reflectionChar_-y.pvr": "https://files.ballistica.net/cache/ba1/4e/ee/7cdca1ae6b1458a443262c5a4e9c", "assets/build/ba_data/textures/reflectionChar_-y_preview.png": "https://files.ballistica.net/cache/ba1/ba/70/f2f188b95e2735467e823c94504a", @@ -2086,7 +2086,7 @@ "assets/build/ba_data/textures/reflectionChar_-z.ktx": "https://files.ballistica.net/cache/ba1/96/56/0f9aef42c876c3d2832ba570de79", "assets/build/ba_data/textures/reflectionChar_-z.pvr": "https://files.ballistica.net/cache/ba1/60/68/cb7fefc89119f14265c58200afde", "assets/build/ba_data/textures/reflectionChar_-z_preview.png": "https://files.ballistica.net/cache/ba1/b5/10/70b59c9cd551b44f8422867a38c2", - "assets/build/ba_data/textures/reflectionPowerup_+x.dds": "https://files.ballistica.net/cache/ba1/4b/3d/76538e3f18edb2a373bb3b591314", + "assets/build/ba_data/textures/reflectionPowerup_+x.dds": "https://files.ballistica.net/cache/ba1/aa/16/e46748f64851d1f0fd6c3b0bab9a", "assets/build/ba_data/textures/reflectionPowerup_+x.ktx": "https://files.ballistica.net/cache/ba1/a6/9b/682e676c993ae660475b4467fa6a", "assets/build/ba_data/textures/reflectionPowerup_+x.pvr": "https://files.ballistica.net/cache/ba1/f9/45/2b58be3bf14314607a25143fb477", "assets/build/ba_data/textures/reflectionPowerup_+x_preview.png": "https://files.ballistica.net/cache/ba1/66/cc/5021c0239527286f8c8f63aad21a", @@ -2118,11 +2118,11 @@ "assets/build/ba_data/textures/reflectionSharp_+y.ktx": "https://files.ballistica.net/cache/ba1/2c/a5/141e266b590226ee4a3474ac874e", "assets/build/ba_data/textures/reflectionSharp_+y.pvr": "https://files.ballistica.net/cache/ba1/a5/10/cdd96a99404584f090032ca60e62", "assets/build/ba_data/textures/reflectionSharp_+y_preview.png": "https://files.ballistica.net/cache/ba1/0f/58/f04fac2b705b92c8b0e11036a8ff", - "assets/build/ba_data/textures/reflectionSharp_+z.dds": "https://files.ballistica.net/cache/ba1/2a/be/a4ec2fb348452797276aa8a7ea52", + "assets/build/ba_data/textures/reflectionSharp_+z.dds": "https://files.ballistica.net/cache/ba1/ac/4b/db6e2bf52594a0cb882d17579bec", "assets/build/ba_data/textures/reflectionSharp_+z.ktx": "https://files.ballistica.net/cache/ba1/21/2c/51df5254932dac26b7068bc1e044", "assets/build/ba_data/textures/reflectionSharp_+z.pvr": "https://files.ballistica.net/cache/ba1/e4/87/2eaf17f6a15512b4326c7a2ae395", "assets/build/ba_data/textures/reflectionSharp_+z_preview.png": "https://files.ballistica.net/cache/ba1/1f/14/cd9fa509c22fea0f73a5eb76ac54", - "assets/build/ba_data/textures/reflectionSharp_-x.dds": "https://files.ballistica.net/cache/ba1/8f/2f/def7cd6049055701946f6ba7efcb", + "assets/build/ba_data/textures/reflectionSharp_-x.dds": "https://files.ballistica.net/cache/ba1/d7/b4/19de232b288604ffd66e48b182cf", "assets/build/ba_data/textures/reflectionSharp_-x.ktx": "https://files.ballistica.net/cache/ba1/04/cf/03b8b252c6d0a14b4a74df1697b2", "assets/build/ba_data/textures/reflectionSharp_-x.pvr": "https://files.ballistica.net/cache/ba1/f3/5b/36f37a9ca99d555c8950524ca118", "assets/build/ba_data/textures/reflectionSharp_-x_preview.png": "https://files.ballistica.net/cache/ba1/80/18/f2f8c9ce1f0dc8f297e0b29def1b", @@ -2134,7 +2134,7 @@ "assets/build/ba_data/textures/reflectionSharp_-z.ktx": "https://files.ballistica.net/cache/ba1/09/79/7c34e93c1453fa653098644dc902", "assets/build/ba_data/textures/reflectionSharp_-z.pvr": "https://files.ballistica.net/cache/ba1/08/d2/fa84664b3558ce68269581d52ab3", "assets/build/ba_data/textures/reflectionSharp_-z_preview.png": "https://files.ballistica.net/cache/ba1/e0/6e/de9a4cfdcb483bf92a63ac64e435", - "assets/build/ba_data/textures/reflectionSharper_+x.dds": "https://files.ballistica.net/cache/ba1/ed/05/68ad6e013833ba230bee61037591", + "assets/build/ba_data/textures/reflectionSharper_+x.dds": "https://files.ballistica.net/cache/ba1/86/21/0ed2cff91343e7d697e3fdbc9d15", "assets/build/ba_data/textures/reflectionSharper_+x.ktx": "https://files.ballistica.net/cache/ba1/ab/9b/243e80e52d6f837f206472054489", "assets/build/ba_data/textures/reflectionSharper_+x.pvr": "https://files.ballistica.net/cache/ba1/70/29/f1847b9d9c4892e3d383c8136b28", "assets/build/ba_data/textures/reflectionSharper_+x_preview.png": "https://files.ballistica.net/cache/ba1/22/db/1afb62440951a98fcf57663d5884", @@ -2202,7 +2202,7 @@ "assets/build/ba_data/textures/reflectionSoft_-y.ktx": "https://files.ballistica.net/cache/ba1/c7/af/7e09853ae6f0487e3a4122ac31d5", "assets/build/ba_data/textures/reflectionSoft_-y.pvr": "https://files.ballistica.net/cache/ba1/80/81/e5428d62dd5a31f708a68b258366", "assets/build/ba_data/textures/reflectionSoft_-y_preview.png": "https://files.ballistica.net/cache/ba1/2f/e1/b0cee0f161188752abcba04c9291", - "assets/build/ba_data/textures/reflectionSoft_-z.dds": "https://files.ballistica.net/cache/ba1/14/be/6bab80deb23a5105dd1ddd57740b", + "assets/build/ba_data/textures/reflectionSoft_-z.dds": "https://files.ballistica.net/cache/ba1/35/65/f84fc0c302b96ffde8d816c118c4", "assets/build/ba_data/textures/reflectionSoft_-z.ktx": "https://files.ballistica.net/cache/ba1/55/b2/45ec181ec07cd28be1a089b6bb79", "assets/build/ba_data/textures/reflectionSoft_-z.pvr": "https://files.ballistica.net/cache/ba1/67/6e/271b323497b797718b7d9bd3f939", "assets/build/ba_data/textures/reflectionSoft_-z_preview.png": "https://files.ballistica.net/cache/ba1/6f/38/dce6d5c26bc45005b9355b030c94", @@ -2221,7 +2221,7 @@ "assets/build/ba_data/textures/robotColor.dds": "https://files.ballistica.net/cache/ba1/a3/c0/2f7089d363c3e22b4ab10cd1c589", "assets/build/ba_data/textures/robotColor.ktx": "https://files.ballistica.net/cache/ba1/9a/9d/dbdec15776fd014e03eb1808ad28", "assets/build/ba_data/textures/robotColor.pvr": "https://files.ballistica.net/cache/ba1/9d/24/cc381a8ff6e80947618a97d36107", - "assets/build/ba_data/textures/robotColorMask.dds": "https://files.ballistica.net/cache/ba1/ec/0e/d1b4b152415679464cd0bf773b94", + "assets/build/ba_data/textures/robotColorMask.dds": "https://files.ballistica.net/cache/ba1/9f/89/248c558b1f019a7e37c24c6f2c74", "assets/build/ba_data/textures/robotColorMask.ktx": "https://files.ballistica.net/cache/ba1/19/4e/6bf15a0ac4ba4ad3bedd5eb3a3f3", "assets/build/ba_data/textures/robotColorMask.pvr": "https://files.ballistica.net/cache/ba1/ee/88/47d89b21335c4ba8916ff4eb11fd", "assets/build/ba_data/textures/robotColorMask_preview.png": "https://files.ballistica.net/cache/ba1/03/fd/c13045e5beed778e19f9a70f81ea", @@ -2234,18 +2234,18 @@ "assets/build/ba_data/textures/robotIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/b8/65/40642024959c225ce4704b954f8f", "assets/build/ba_data/textures/robotIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/3a/c2/771b5f4aa159f61383b8bbefa291", "assets/build/ba_data/textures/robotIcon_preview.png": "https://files.ballistica.net/cache/ba1/7a/b8/1dad64c97fa4655f70490004cedc", - "assets/build/ba_data/textures/roundaboutLevelColor.dds": "https://files.ballistica.net/cache/ba1/69/bd/5a0e33f022abb454eebf4b9668ab", + "assets/build/ba_data/textures/roundaboutLevelColor.dds": "https://files.ballistica.net/cache/ba1/b6/df/cc3d90cdccfc1e07c99a4a5a5851", "assets/build/ba_data/textures/roundaboutLevelColor.ktx": "https://files.ballistica.net/cache/ba1/19/f8/d8ea41097c6dfe7bec255d85ea0a", "assets/build/ba_data/textures/roundaboutLevelColor.pvr": "https://files.ballistica.net/cache/ba1/0a/5a/19e1f33492b7ae2a9f100cf26fff", "assets/build/ba_data/textures/roundaboutLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/18/c7/7dbe95a06d9e877fbe848f415141", - "assets/build/ba_data/textures/roundaboutPreview.dds": "https://files.ballistica.net/cache/ba1/a8/c2/d800722b8b7e172fcf19227abf05", + "assets/build/ba_data/textures/roundaboutPreview.dds": "https://files.ballistica.net/cache/ba1/c5/62/00e8ad165d2350b7136784bc0dc7", "assets/build/ba_data/textures/roundaboutPreview.ktx": "https://files.ballistica.net/cache/ba1/1f/63/e4776ec44e00a0d736aec31f1dfb", "assets/build/ba_data/textures/roundaboutPreview.pvr": "https://files.ballistica.net/cache/ba1/65/1a/019c03931b513047b9a5fcb7e8af", "assets/build/ba_data/textures/roundaboutPreview_preview.png": "https://files.ballistica.net/cache/ba1/d4/df/d26e050aac7285a6f453185f0046", - "assets/build/ba_data/textures/santaColor.dds": "https://files.ballistica.net/cache/ba1/5f/a1/91e228dda47c28f430ec2ff226b8", + "assets/build/ba_data/textures/santaColor.dds": "https://files.ballistica.net/cache/ba1/26/e6/febe3c69537cb30d8f1988cd405d", "assets/build/ba_data/textures/santaColor.ktx": "https://files.ballistica.net/cache/ba1/cc/f4/de2aaaf8cc855afaaceb1e618409", "assets/build/ba_data/textures/santaColor.pvr": "https://files.ballistica.net/cache/ba1/b6/22/85dfce13ccc2a531a42a91d4dd89", - "assets/build/ba_data/textures/santaColorMask.dds": "https://files.ballistica.net/cache/ba1/8a/9c/db332211cdc1deb5d60ce035d5a8", + "assets/build/ba_data/textures/santaColorMask.dds": "https://files.ballistica.net/cache/ba1/5e/5f/6c47e8aa0cdfc92d06bfd3a23b6d", "assets/build/ba_data/textures/santaColorMask.ktx": "https://files.ballistica.net/cache/ba1/b7/b0/9ebd903f0d9e491fa6a65181de19", "assets/build/ba_data/textures/santaColorMask.pvr": "https://files.ballistica.net/cache/ba1/a8/8c/6ab8ad9a2ea2e907635286163e57", "assets/build/ba_data/textures/santaColorMask_preview.png": "https://files.ballistica.net/cache/ba1/01/c4/436aca37ae86e73db9b7c856056a", @@ -2253,7 +2253,7 @@ "assets/build/ba_data/textures/santaIcon.dds": "https://files.ballistica.net/cache/ba1/50/10/67dc3f02df57883342cc345cf72e", "assets/build/ba_data/textures/santaIcon.ktx": "https://files.ballistica.net/cache/ba1/b7/6c/f22cde80b89403aeb4e950d8e2d2", "assets/build/ba_data/textures/santaIcon.pvr": "https://files.ballistica.net/cache/ba1/a0/4c/24e260da5e86b10a86049503b986", - "assets/build/ba_data/textures/santaIconColorMask.dds": "https://files.ballistica.net/cache/ba1/9e/36/dbeba27f8008aa3404864070f5bc", + "assets/build/ba_data/textures/santaIconColorMask.dds": "https://files.ballistica.net/cache/ba1/6c/54/c155cd9278a8411441fe9f68f09b", "assets/build/ba_data/textures/santaIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/32/7a/c2d2cc16c7be82dbcff72a376f70", "assets/build/ba_data/textures/santaIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/25/db/3dfff995ae0b87511a6bb7cc8b79", "assets/build/ba_data/textures/santaIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/ca/f2/a9f44952811c708bd50525d4da30", @@ -2302,7 +2302,7 @@ "assets/build/ba_data/textures/slash.ktx": "https://files.ballistica.net/cache/ba1/54/cb/a35780a274f021fc1044b45daf99", "assets/build/ba_data/textures/slash.pvr": "https://files.ballistica.net/cache/ba1/b6/d2/fa0617f78a81fc0eacb962484729", "assets/build/ba_data/textures/slash_preview.png": "https://files.ballistica.net/cache/ba1/33/2f/060dad5afdba8162d7a3ad082df0", - "assets/build/ba_data/textures/smoke.dds": "https://files.ballistica.net/cache/ba1/c1/b5/f1c19535edd6f9abc74b85a9673a", + "assets/build/ba_data/textures/smoke.dds": "https://files.ballistica.net/cache/ba1/66/a6/714c50394e08e6709f9470f2f02d", "assets/build/ba_data/textures/smoke.ktx": "https://files.ballistica.net/cache/ba1/8c/d8/74ac19c7930bbd695f533ec09fa3", "assets/build/ba_data/textures/smoke.pvr": "https://files.ballistica.net/cache/ba1/d7/a5/014c007053212e96096b545626ea", "assets/build/ba_data/textures/smoke_preview.png": "https://files.ballistica.net/cache/ba1/b1/c6/52443210c0229920389219868dcc", @@ -2318,7 +2318,7 @@ "assets/build/ba_data/textures/softRectVertical.pvr": "https://files.ballistica.net/cache/ba1/4d/19/857d457d9b5a0279a80dceea2cd3", "assets/build/ba_data/textures/softRectVertical_preview.png": "https://files.ballistica.net/cache/ba1/56/0f/524a88de51160a96224fb40249c1", "assets/build/ba_data/textures/softRect_preview.png": "https://files.ballistica.net/cache/ba1/5e/31/512ca0d886a0d866f194f875c3db", - "assets/build/ba_data/textures/sparks.dds": "https://files.ballistica.net/cache/ba1/89/77/00c8ba51a9cf06bfc0a0a427efc3", + "assets/build/ba_data/textures/sparks.dds": "https://files.ballistica.net/cache/ba1/0a/c4/0514ac00c5978979f65fbdf1b56e", "assets/build/ba_data/textures/sparks.ktx": "https://files.ballistica.net/cache/ba1/3d/6d/beee025480e5711ecd52bc5f6b07", "assets/build/ba_data/textures/sparks.pvr": "https://files.ballistica.net/cache/ba1/39/af/5b9e1081c0973f5e853c11fa06bc", "assets/build/ba_data/textures/sparks_preview.png": "https://files.ballistica.net/cache/ba1/19/fc/4a53d76b56ea0f0c3d5eaeed93b4", @@ -2330,11 +2330,11 @@ "assets/build/ba_data/textures/startButton.ktx": "https://files.ballistica.net/cache/ba1/ef/9a/9323a447cb7cf8fa119bbeadbf7c", "assets/build/ba_data/textures/startButton.pvr": "https://files.ballistica.net/cache/ba1/a8/25/74bd9ee857764fba362a0ecdc9b3", "assets/build/ba_data/textures/startButton_preview.png": "https://files.ballistica.net/cache/ba1/ba/d5/48858f0b1a1e0e4043762d4b0216", - "assets/build/ba_data/textures/stepRightUpLevelColor.dds": "https://files.ballistica.net/cache/ba1/aa/27/277f7741294d367810f01ef150f8", + "assets/build/ba_data/textures/stepRightUpLevelColor.dds": "https://files.ballistica.net/cache/ba1/58/51/eec340a570c3797198bcd9c7c205", "assets/build/ba_data/textures/stepRightUpLevelColor.ktx": "https://files.ballistica.net/cache/ba1/6f/35/3380ac50585bce22311666d28782", "assets/build/ba_data/textures/stepRightUpLevelColor.pvr": "https://files.ballistica.net/cache/ba1/8b/fb/eba3c0faa304123c784c888d0c65", "assets/build/ba_data/textures/stepRightUpLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/5d/b9/bcdca38ad1d808b541b8008d5555", - "assets/build/ba_data/textures/stepRightUpPreview.dds": "https://files.ballistica.net/cache/ba1/ce/8f/8843ebbc561cf5dd44eb657b797d", + "assets/build/ba_data/textures/stepRightUpPreview.dds": "https://files.ballistica.net/cache/ba1/26/45/d61d7173f3875fb5a8e7a748b2df", "assets/build/ba_data/textures/stepRightUpPreview.ktx": "https://files.ballistica.net/cache/ba1/bd/75/7b19bfb14c8a73ae9a42156d70f2", "assets/build/ba_data/textures/stepRightUpPreview.pvr": "https://files.ballistica.net/cache/ba1/fe/44/e09c5a523cb3e8576709256c79a9", "assets/build/ba_data/textures/stepRightUpPreview_preview.png": "https://files.ballistica.net/cache/ba1/ad/ff/086bca9f87fdc17bae4bd55e904f", @@ -2357,7 +2357,7 @@ "assets/build/ba_data/textures/superheroColor.dds": "https://files.ballistica.net/cache/ba1/20/22/1e1f70c67cdbf49ce120b454f76a", "assets/build/ba_data/textures/superheroColor.ktx": "https://files.ballistica.net/cache/ba1/6d/7c/bc6c4f9b237301fefea90f27f9a0", "assets/build/ba_data/textures/superheroColor.pvr": "https://files.ballistica.net/cache/ba1/48/12/34feeaf8bb9724e3d084b96cda3b", - "assets/build/ba_data/textures/superheroColorMask.dds": "https://files.ballistica.net/cache/ba1/68/a5/b09635c375edc462cf4b102c3236", + "assets/build/ba_data/textures/superheroColorMask.dds": "https://files.ballistica.net/cache/ba1/3b/2f/c7890bc048477e15698c7663b3d4", "assets/build/ba_data/textures/superheroColorMask.ktx": "https://files.ballistica.net/cache/ba1/a5/19/f7169d492c759f9f3416887df9d5", "assets/build/ba_data/textures/superheroColorMask.pvr": "https://files.ballistica.net/cache/ba1/39/dc/256d7b9203f90032bbe21cec3a03", "assets/build/ba_data/textures/superheroColorMask_preview.png": "https://files.ballistica.net/cache/ba1/7d/f0/d05466477b420b25ff7dd881c87b", @@ -2374,11 +2374,11 @@ "assets/build/ba_data/textures/textClearButton.ktx": "https://files.ballistica.net/cache/ba1/05/60/2ae6636eb10907f2973342229949", "assets/build/ba_data/textures/textClearButton.pvr": "https://files.ballistica.net/cache/ba1/b1/32/dc45a735786df68c442b16a62a57", "assets/build/ba_data/textures/textClearButton_preview.png": "https://files.ballistica.net/cache/ba1/12/64/67e74f9e5d77ba1230304ea40497", - "assets/build/ba_data/textures/thePadLevelColor.dds": "https://files.ballistica.net/cache/ba1/61/17/6fb9d7fef2499c9ef5e3eb7ac928", + "assets/build/ba_data/textures/thePadLevelColor.dds": "https://files.ballistica.net/cache/ba1/7c/0d/09d84d8de458a7bcc7343b65ab9f", "assets/build/ba_data/textures/thePadLevelColor.ktx": "https://files.ballistica.net/cache/ba1/4e/34/bf0d6a8b0e64cf7fef14b1ec9da5", "assets/build/ba_data/textures/thePadLevelColor.pvr": "https://files.ballistica.net/cache/ba1/27/ad/471ab1086db8d6669040fc48742a", "assets/build/ba_data/textures/thePadLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/88/1d/42616ff95265cb0d0db6c353a044", - "assets/build/ba_data/textures/thePadPreview.dds": "https://files.ballistica.net/cache/ba1/12/67/c64f2c3a5726712453400859e0f3", + "assets/build/ba_data/textures/thePadPreview.dds": "https://files.ballistica.net/cache/ba1/cd/ee/a4e2f05ada77eab50013534e46fc", "assets/build/ba_data/textures/thePadPreview.ktx": "https://files.ballistica.net/cache/ba1/5e/11/ff9caf9657a7c439b2e0fab39049", "assets/build/ba_data/textures/thePadPreview.pvr": "https://files.ballistica.net/cache/ba1/5a/8f/4061a1deafca6ba331738f6c9db8", "assets/build/ba_data/textures/thePadPreview_preview.png": "https://files.ballistica.net/cache/ba1/94/12/ec4cc8f0378cf62f811122e6faec", @@ -2402,11 +2402,11 @@ "assets/build/ba_data/textures/ticketsMore.pvr": "https://files.ballistica.net/cache/ba1/59/1a/73c4109d96e85316c2c46ff2c025", "assets/build/ba_data/textures/ticketsMore_preview.png": "https://files.ballistica.net/cache/ba1/24/01/32ba85edd6394dd56562f64eee09", "assets/build/ba_data/textures/tickets_preview.png": "https://files.ballistica.net/cache/ba1/90/ce/b693dd116e50d1b0eff488cfdd98", - "assets/build/ba_data/textures/tipTopBGColor.dds": "https://files.ballistica.net/cache/ba1/19/bf/258c624e1b3e3e3efabeefe3dd20", + "assets/build/ba_data/textures/tipTopBGColor.dds": "https://files.ballistica.net/cache/ba1/ac/31/d9009e21104f4131117610ba03a0", "assets/build/ba_data/textures/tipTopBGColor.ktx": "https://files.ballistica.net/cache/ba1/39/8c/a9f1ba489b23f5d899bb3f9941b1", "assets/build/ba_data/textures/tipTopBGColor.pvr": "https://files.ballistica.net/cache/ba1/1b/0d/89ecc99bc58aa985f00f7097177a", "assets/build/ba_data/textures/tipTopBGColor_preview.png": "https://files.ballistica.net/cache/ba1/54/0b/9978639a58e703cece49de6523b7", - "assets/build/ba_data/textures/tipTopLevelColor.dds": "https://files.ballistica.net/cache/ba1/d9/9d/5887220819a9bceaf547349cc1f3", + "assets/build/ba_data/textures/tipTopLevelColor.dds": "https://files.ballistica.net/cache/ba1/5f/d8/d29d224f0fcdcbf04ce625945baf", "assets/build/ba_data/textures/tipTopLevelColor.ktx": "https://files.ballistica.net/cache/ba1/4f/77/17f60fceaa239805af2bb7a169be", "assets/build/ba_data/textures/tipTopLevelColor.pvr": "https://files.ballistica.net/cache/ba1/8b/20/240ddac5158fb481ce41c50a86ce", "assets/build/ba_data/textures/tipTopLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/75/88/019f15db873f836c5651b1b12130", @@ -2426,15 +2426,15 @@ "assets/build/ba_data/textures/touchArrowsActions.pvr": "https://files.ballistica.net/cache/ba1/74/1b/7642cfb899d1337073b10855d01d", "assets/build/ba_data/textures/touchArrowsActions_preview.png": "https://files.ballistica.net/cache/ba1/3c/21/1933b01847e20ed77164097aaea5", "assets/build/ba_data/textures/touchArrows_preview.png": "https://files.ballistica.net/cache/ba1/14/bd/595019a7e3b87bd844f8a60bf04c", - "assets/build/ba_data/textures/towerDLevelColor.dds": "https://files.ballistica.net/cache/ba1/8a/1f/997dafb004fe5b2122c66ae66302", + "assets/build/ba_data/textures/towerDLevelColor.dds": "https://files.ballistica.net/cache/ba1/08/c1/8925800c38503c077829f7b3fa96", "assets/build/ba_data/textures/towerDLevelColor.ktx": "https://files.ballistica.net/cache/ba1/8d/42/47252953095838210efdf6abc37d", "assets/build/ba_data/textures/towerDLevelColor.pvr": "https://files.ballistica.net/cache/ba1/9f/18/de2d35f9737871b3a1a914561428", "assets/build/ba_data/textures/towerDLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/d4/e2/96ed47c7c856cf772a74f7385fab", - "assets/build/ba_data/textures/towerDPreview.dds": "https://files.ballistica.net/cache/ba1/4f/91/7de86add4cdc30060477c93e2aa6", + "assets/build/ba_data/textures/towerDPreview.dds": "https://files.ballistica.net/cache/ba1/de/cc/3810b38d96b849375c4d9a416665", "assets/build/ba_data/textures/towerDPreview.ktx": "https://files.ballistica.net/cache/ba1/e9/3a/d62eb672f3f26757b59f4d6d9e48", "assets/build/ba_data/textures/towerDPreview.pvr": "https://files.ballistica.net/cache/ba1/be/40/cc2ad06c0c08a1b937a2165f3bdb", "assets/build/ba_data/textures/towerDPreview_preview.png": "https://files.ballistica.net/cache/ba1/20/80/2314d36626f44f2ded99773ce267", - "assets/build/ba_data/textures/treesColor.dds": "https://files.ballistica.net/cache/ba1/a9/c6/e78e8aecedb379288c5a2d6e41f0", + "assets/build/ba_data/textures/treesColor.dds": "https://files.ballistica.net/cache/ba1/ff/c9/f24bda9787c79435fea19b8ff647", "assets/build/ba_data/textures/treesColor.ktx": "https://files.ballistica.net/cache/ba1/e7/19/2b8b0c8cfd26839ebd1d514354b7", "assets/build/ba_data/textures/treesColor.pvr": "https://files.ballistica.net/cache/ba1/03/b2/159518817084766a2cc464ba0a1b", "assets/build/ba_data/textures/treesColor_preview.png": "https://files.ballistica.net/cache/ba1/72/2b/7addb4861a6a8cd09748248e4de4", @@ -2462,14 +2462,14 @@ "assets/build/ba_data/textures/usersButton.ktx": "https://files.ballistica.net/cache/ba1/5b/e6/34fb5d6f905c30b3a2b9aa9e5734", "assets/build/ba_data/textures/usersButton.pvr": "https://files.ballistica.net/cache/ba1/0a/de/0f45f12e34557fb1141d7a266a0d", "assets/build/ba_data/textures/usersButton_preview.png": "https://files.ballistica.net/cache/ba1/1a/fc/7d74541cd06ad5db3de119418f81", - "assets/build/ba_data/textures/vrFillMound.dds": "https://files.ballistica.net/cache/ba1/bc/b3/8e14500bb766cf3639ea003cd9af", + "assets/build/ba_data/textures/vrFillMound.dds": "https://files.ballistica.net/cache/ba1/03/2e/06c7ee248c6adef3fde077f4e4e1", "assets/build/ba_data/textures/vrFillMound.ktx": "https://files.ballistica.net/cache/ba1/5d/1e/e86c34fd33355e21955d3d48bfe6", "assets/build/ba_data/textures/vrFillMound.pvr": "https://files.ballistica.net/cache/ba1/e8/da/46ed26badb88b6fd10abc37f35f6", "assets/build/ba_data/textures/vrFillMound_preview.png": "https://files.ballistica.net/cache/ba1/fd/33/4f817cfe06d2f8a04c395a9dc960", "assets/build/ba_data/textures/warriorColor.dds": "https://files.ballistica.net/cache/ba1/f2/51/d42750c9df1f55f39c134c925c7f", "assets/build/ba_data/textures/warriorColor.ktx": "https://files.ballistica.net/cache/ba1/e7/72/6f9a3314300c12b5ffd99a4d0000", "assets/build/ba_data/textures/warriorColor.pvr": "https://files.ballistica.net/cache/ba1/f2/63/d8bf3ba74b47932b4465847ef133", - "assets/build/ba_data/textures/warriorColorMask.dds": "https://files.ballistica.net/cache/ba1/e4/4c/e0ccd356704be279c55ad5d7bc68", + "assets/build/ba_data/textures/warriorColorMask.dds": "https://files.ballistica.net/cache/ba1/9f/d5/4787b04a7004e2b830f37cea8f2d", "assets/build/ba_data/textures/warriorColorMask.ktx": "https://files.ballistica.net/cache/ba1/d4/22/c8c01a12e9ec10f214659ce9faa4", "assets/build/ba_data/textures/warriorColorMask.pvr": "https://files.ballistica.net/cache/ba1/17/c5/87586c89935377cb8d4336713094", "assets/build/ba_data/textures/warriorColorMask_preview.png": "https://files.ballistica.net/cache/ba1/d9/97/16b01e9e4bf3bdc8c57672526158", @@ -2501,7 +2501,7 @@ "assets/build/ba_data/textures/witchColor.dds": "https://files.ballistica.net/cache/ba1/41/36/4b562ef0323d0b3ad88fea31bec8", "assets/build/ba_data/textures/witchColor.ktx": "https://files.ballistica.net/cache/ba1/f2/32/d61ee331287b1c4e508a1f6ea317", "assets/build/ba_data/textures/witchColor.pvr": "https://files.ballistica.net/cache/ba1/e5/f4/1ae61921f42efa27ed72120337a1", - "assets/build/ba_data/textures/witchColorMask.dds": "https://files.ballistica.net/cache/ba1/85/13/5d498983b93a3b27565525e60e03", + "assets/build/ba_data/textures/witchColorMask.dds": "https://files.ballistica.net/cache/ba1/39/b4/db14abde641fa3b63447936f2f9b", "assets/build/ba_data/textures/witchColorMask.ktx": "https://files.ballistica.net/cache/ba1/e0/23/4fb45223a969626489041af0de9f", "assets/build/ba_data/textures/witchColorMask.pvr": "https://files.ballistica.net/cache/ba1/ab/d9/d03a2366b07854e7c82cd0e1e443", "assets/build/ba_data/textures/witchColorMask_preview.png": "https://files.ballistica.net/cache/ba1/49/7f/61faa30b3b091c142c1212a85019", @@ -2514,18 +2514,18 @@ "assets/build/ba_data/textures/witchIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/2e/76/a2b8bfd7868a47c11b2c5fd1660b", "assets/build/ba_data/textures/witchIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/49/bc/8479175256d1e62e607b2c392f2d", "assets/build/ba_data/textures/witchIcon_preview.png": "https://files.ballistica.net/cache/ba1/5f/96/cb2eb1c3a9fb0240f5748c5c1da5", - "assets/build/ba_data/textures/wizardColor.dds": "https://files.ballistica.net/cache/ba1/ec/e9/fcbc0fc4d1fc397f8ec5b498337f", + "assets/build/ba_data/textures/wizardColor.dds": "https://files.ballistica.net/cache/ba1/91/1b/af0d8cd18532d766b4b129317ed4", "assets/build/ba_data/textures/wizardColor.ktx": "https://files.ballistica.net/cache/ba1/50/da/d0569142ec7924ca40eccf82a930", "assets/build/ba_data/textures/wizardColor.pvr": "https://files.ballistica.net/cache/ba1/11/dc/b7f4a083ef2a93d7834b3d841443", - "assets/build/ba_data/textures/wizardColorMask.dds": "https://files.ballistica.net/cache/ba1/b4/32/3d46d2e5920e7530b384d7626617", + "assets/build/ba_data/textures/wizardColorMask.dds": "https://files.ballistica.net/cache/ba1/ad/cc/a104746ef03fa4a788e118424fc4", "assets/build/ba_data/textures/wizardColorMask.ktx": "https://files.ballistica.net/cache/ba1/0d/0d/80e2b947ebd3dbde1330682f62a4", "assets/build/ba_data/textures/wizardColorMask.pvr": "https://files.ballistica.net/cache/ba1/5a/7c/9933e396902aca69b786468d1c38", "assets/build/ba_data/textures/wizardColorMask_preview.png": "https://files.ballistica.net/cache/ba1/44/93/65a9e806485cd757e6a05655916a", "assets/build/ba_data/textures/wizardColor_preview.png": "https://files.ballistica.net/cache/ba1/cf/3c/3db3b3f5b6dab73f8b8a5353fe1a", - "assets/build/ba_data/textures/wizardIcon.dds": "https://files.ballistica.net/cache/ba1/e6/2f/74df3fe2e97c960ff1ca64aed588", + "assets/build/ba_data/textures/wizardIcon.dds": "https://files.ballistica.net/cache/ba1/0a/79/2ccd8ee9c225bf6a969f8f29d5d9", "assets/build/ba_data/textures/wizardIcon.ktx": "https://files.ballistica.net/cache/ba1/b9/3d/2c10de406177de22b8e89c9cb3b3", "assets/build/ba_data/textures/wizardIcon.pvr": "https://files.ballistica.net/cache/ba1/e3/c0/7d62f35ec06d5c4442a92b175cc0", - "assets/build/ba_data/textures/wizardIconColorMask.dds": "https://files.ballistica.net/cache/ba1/b5/16/7f556e4b852a94400388b4c96db4", + "assets/build/ba_data/textures/wizardIconColorMask.dds": "https://files.ballistica.net/cache/ba1/f1/aa/65c24f94a227616f5ef7d1f77bb8", "assets/build/ba_data/textures/wizardIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/91/17/307bfa8af7dc435aa92dd38158f6", "assets/build/ba_data/textures/wizardIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/3e/31/19cb4995ec02f1884bd35b29a464", "assets/build/ba_data/textures/wizardIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/20/24/700221546a08f3bc9c31e751ebcc", @@ -2533,7 +2533,7 @@ "assets/build/ba_data/textures/wrestlerColor.dds": "https://files.ballistica.net/cache/ba1/1f/d5/d21adac8982ad713b0bbdbb7ee6c", "assets/build/ba_data/textures/wrestlerColor.ktx": "https://files.ballistica.net/cache/ba1/d7/22/bf15886b227531620eec6462be2d", "assets/build/ba_data/textures/wrestlerColor.pvr": "https://files.ballistica.net/cache/ba1/ab/76/9f573919ed6b9e635f4a014584ba", - "assets/build/ba_data/textures/wrestlerColorMask.dds": "https://files.ballistica.net/cache/ba1/fb/a5/472ae89a40a52d189c9337c179fa", + "assets/build/ba_data/textures/wrestlerColorMask.dds": "https://files.ballistica.net/cache/ba1/9f/98/98d3c41b83875f850abc3b2c31df", "assets/build/ba_data/textures/wrestlerColorMask.ktx": "https://files.ballistica.net/cache/ba1/21/1f/eebe5e1fe740412aad15026d21b5", "assets/build/ba_data/textures/wrestlerColorMask.pvr": "https://files.ballistica.net/cache/ba1/36/43/ef6da6107379ac3f74204a34c529", "assets/build/ba_data/textures/wrestlerColorMask_preview.png": "https://files.ballistica.net/cache/ba1/0c/5f/8619903636053dc0ff1858bf3451", @@ -2546,26 +2546,26 @@ "assets/build/ba_data/textures/wrestlerIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/7b/5d/83a1a0f4d7b06303d5da137e5847", "assets/build/ba_data/textures/wrestlerIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/b5/74/774b56f03e583df47388c552c63e", "assets/build/ba_data/textures/wrestlerIcon_preview.png": "https://files.ballistica.net/cache/ba1/38/71/8b5f4d69dde24101ce0d69747486", - "assets/build/ba_data/textures/zigZagLevelColor.dds": "https://files.ballistica.net/cache/ba1/df/17/9994816ad67f481800bae16f2db2", + "assets/build/ba_data/textures/zigZagLevelColor.dds": "https://files.ballistica.net/cache/ba1/ea/cf/a59f7ca3b2f0d7a08e3ad42d83ab", "assets/build/ba_data/textures/zigZagLevelColor.ktx": "https://files.ballistica.net/cache/ba1/c1/1e/82884d1423ce4a7d641003e84bfb", "assets/build/ba_data/textures/zigZagLevelColor.pvr": "https://files.ballistica.net/cache/ba1/56/df/c53d264147677138e47799ea990e", "assets/build/ba_data/textures/zigZagLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/cd/d7/b45e95db0117c4fe5d957136b4bb", - "assets/build/ba_data/textures/zigzagPreview.dds": "https://files.ballistica.net/cache/ba1/6c/13/64e4a3570343f8a8965b8c6bb318", + "assets/build/ba_data/textures/zigzagPreview.dds": "https://files.ballistica.net/cache/ba1/00/3b/3a7f2ab4aed12f4d911e94093002", "assets/build/ba_data/textures/zigzagPreview.ktx": "https://files.ballistica.net/cache/ba1/33/ca/b022d38b1306d8382c2ecdb270b9", "assets/build/ba_data/textures/zigzagPreview.pvr": "https://files.ballistica.net/cache/ba1/0e/21/4f296b4440f8467c904221d18400", "assets/build/ba_data/textures/zigzagPreview_preview.png": "https://files.ballistica.net/cache/ba1/f4/32/1f69e507893d054aca0371c31248", - "assets/build/ba_data/textures/zoeColor.dds": "https://files.ballistica.net/cache/ba1/05/e4/93016a653b2bb3433138594c9c0e", + "assets/build/ba_data/textures/zoeColor.dds": "https://files.ballistica.net/cache/ba1/82/6e/c531db13a3eff5a2e37c32af79c1", "assets/build/ba_data/textures/zoeColor.ktx": "https://files.ballistica.net/cache/ba1/8d/80/906fb08660e1fcde3f5997108abf", "assets/build/ba_data/textures/zoeColor.pvr": "https://files.ballistica.net/cache/ba1/4a/74/8ca47effb87502b7334398e967be", - "assets/build/ba_data/textures/zoeColorMask.dds": "https://files.ballistica.net/cache/ba1/b6/06/e4086e65b697d7de1c8864f49029", + "assets/build/ba_data/textures/zoeColorMask.dds": "https://files.ballistica.net/cache/ba1/eb/a5/a71bc5739b02d7101dbd29e6b81b", "assets/build/ba_data/textures/zoeColorMask.ktx": "https://files.ballistica.net/cache/ba1/b9/32/91c389da7403df50125cddc37575", "assets/build/ba_data/textures/zoeColorMask.pvr": "https://files.ballistica.net/cache/ba1/f4/6a/4cbdbcf47abdb7f8fdc8d283451e", "assets/build/ba_data/textures/zoeColorMask_preview.png": "https://files.ballistica.net/cache/ba1/ca/0e/66481610316607e9adcb456467d1", "assets/build/ba_data/textures/zoeColor_preview.png": "https://files.ballistica.net/cache/ba1/3b/3e/91abd548d271a97df63b327a1f82", - "assets/build/ba_data/textures/zoeIcon.dds": "https://files.ballistica.net/cache/ba1/da/63/063fc70b4a22b7a0f32ca8e9f8b4", + "assets/build/ba_data/textures/zoeIcon.dds": "https://files.ballistica.net/cache/ba1/23/d4/d1b9a5a9fd790beb494b823f7a35", "assets/build/ba_data/textures/zoeIcon.ktx": "https://files.ballistica.net/cache/ba1/fd/75/88d1a4355980906272cf904bd722", "assets/build/ba_data/textures/zoeIcon.pvr": "https://files.ballistica.net/cache/ba1/7c/66/7959cdfaa884068bdb11db1ef330", - "assets/build/ba_data/textures/zoeIconColorMask.dds": "https://files.ballistica.net/cache/ba1/75/06/c186a1ad6e54ba6d8862b23c2136", + "assets/build/ba_data/textures/zoeIconColorMask.dds": "https://files.ballistica.net/cache/ba1/0b/61/f5e3848c72b5359e129ed7fd9ee0", "assets/build/ba_data/textures/zoeIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/bd/eb/deb5899cffa81a665248e3062363", "assets/build/ba_data/textures/zoeIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/2b/dc/22df1ef245a7f368060d2eecb839", "assets/build/ba_data/textures/zoeIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/d5/08/7d5e28abf51591fb4923892f43dd", @@ -3995,50 +3995,50 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/e4/55/ec1e32f714af2ad914ea2c5e35b0", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c2/29/5c9ef7b0c3b068c700835f62abe6", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/60/30/248f57b0e0950c74aef828fe3667", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/62/3c/1b789be64fa12c6dd4609271c0b8", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ca/bf/66e24379dff682f1fb33d96b8c72", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ce/e9/e578aecdd0146a4a242dacbef95d", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/11/b8/76cf26f61214c4b75e8515f0766a", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d8/c0/74a187c3ebddec6313ea6385343d", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/90/74/0e809006cb921253e92b78d87ec8", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/7c/de/d2ceb7f9d52f78a33792395c4f2e", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/51/71/1a249c35f5a9459322c546b1ec5a", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d5/0a/56f81ecbdc45218159edf9c08aeb", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/25/5d/4569f3ae73cfa0a33427885ef5b4", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/74/2e/c987767fca3cc4b5bb738e259b0a", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/6b/8a/79e987afa129e07d36486cad1602", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b1/c0/46efd467c46e3ad8ed64d3893e1e", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/f8/51/80d6f06fb1579a95f79796e14235", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/32/6d/9190219d7454f5cc2d75bcaa7084", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/fc/39/4f03d2ebf27e521d4d8b3cc6313d", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/9d/22/8e1aa2c9ac9c589985b7ff6d744f", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d9/e3/5491d9859e329f629adb139e1c02", - "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/86/d2/d18cbc017a7d64001f96718cc5ed", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d3/5f/a6501aae21bc6dbda5503cd3ed74", - "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/06/70/9e5becbdf873ea42fae9541dd123", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/94/19/7c70a5388ab5dc9f8b4cd2a643bd", - "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a3/47/f46d4455e6ee1ebb397508495d90", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/53/63/891be47740b031ad1e08f6fe9c77", - "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4c/32/de6296fdbd72d6a82d47a2403efd", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e6/be/16d22d7d53a87ad6c9e1b7835950", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/39/2c/773ff4c64734bcd6205080a0563d", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/24/a6/eb221317cdae775c195aa81a2f0c", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4b/9d/be9915b6f1f1a0d83ae11885bd42", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4b/84/6074d1f32482e5a1914aac08747f", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/31/26/5c531133795d1381ced85e519b10", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0d/75/0044708d9f8af5ba85bbe9709f92", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a3/c6/d9b0509fe23a07de2ccee6ba1fd4", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/16/a1/0283e8d4c813236f30f558fe7152", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/80/76/3f3b0aa3ee0c39b276d55adf31f5", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/32/39/1a7d9be4330f5c74f67c6f7e22d8", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/1c/c6/59922c32624d3a93be2080c1ff7d", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/9f/4e/4e6d977fb3bff4746d3c599e7567", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/7f/28/36b8586b6b139ccb052accc29d2b", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/8c/b6/99368c99f9b63242df1f1875b5b5", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/74/9c/09e7f929fbcf075d41b976200950", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/69/b1/5c028c7e31ce5382ae6d194f15d3", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/64/20/ce0a3f20574b86e86104618880ec", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/0e/bf/3bed1b64a53e9b6003577f5bcb79", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/db/7c/72eb8c5d29c9241800e1260cbbcb", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/9e/d0/1c9a1a2c9598d2b800d469518a62", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/64/66/536379773bef375df871c2b9ac1b", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/17/35/c04056d61490d0380d6f4d292e97", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/32/99/3fcc56b3ea13005626c930db8916", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/5b/00/b362b64ecdef9fc1c7881d0708cf", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c6/19/e8ccd6168aedabca82ed461e8dc4", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/78/0d/804900218a8dade12e2dbb63ac1b", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/62/92/d0a17051d315094931e321505281", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/06/ac/811271cc4b78c7df2ca21c026342", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3d/19/47944b62b0f8ebccf4b776c6b9e0", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/0a/35/9557357ff36e15ae7ff0b405e2bc", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ba/d3/02a4702f37e8fd8d39289415757b", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/49/d3/ecb6e66795a128b9eed8532eb1ab", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/40/03/436e9ab893949472c0703dbcd54e", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/02/b4/24f7667e6e69389112678e501ba3", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/82/22/179e2c44806751d5c76a092ccb25", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/68/9e/c0f11e89b3da91ea188adf6f1c8b", + "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d1/d9/66f7e4526e733ca085c2eb96877f", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/94/a2/bd823b5a84ff49678fecd229b5a2", + "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e1/82/ce530098283734eb34d0a78682a8", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/1b/bd/e1046b2f01fff4c59c0ecb18fd7f", + "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7f/e5/2acde40bf16c08d037bfce2b502c", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d4/8d/02f02bd621a2ab6e1b9634e2d8fd", + "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/21/50/c4cfe81e571b40623ccd72fe77a6", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/cb/6a/88729063e5f9857da695c4fe906d", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/93/a7/6ba2b7509dbac96b43d5ebd51edb", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/92/7c/78aa7dfb1f2aea8c984aa666cabc", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c2/d0/65f8cc8676c3a31e6f02dcd79bf2", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/21/dc/f3ecdd8ee8725623cd1de11aa38d", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7c/21/578d14c74a46a3ddea3880964a73", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6d/ae/ef61dc65606bb450b905ea61af39", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b4/d6/7c5d71b41ee7d6373cb037ccb3ac", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/de/ac/904b63a66351b3dfb6de6659befe", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/a4/24/e095b112f7aa6b903e4cf9073a00", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/fa/fd/4c340f14afdf270387bd581d6801", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/61/93/d6dc5f8fac0b30415014891778c6", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/2f/db/cb1f0fde72e964dbccb0b7085748", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/b1/0f/c7c254077c09e63694f34d3c4091", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/14/df/c8df600f12679d3dfb909cc053ef", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/9e/24/d85239ed12cc53d83b76b21d7ef4", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d" } \ No newline at end of file diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index f11dce98..b6369b76 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -38,7 +38,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20821 + expected_build = 20822 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 3a7053c9..fc4f5ad1 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -14,6 +14,7 @@ #include "ballistica/core/fatal_error.h" #include "ballistica/core/logging.h" #include "ballistica/core/thread.h" +#include "ballistica/dynamics/bg/bg_dynamics.h" #include "ballistica/dynamics/bg/bg_dynamics_server.h" #include "ballistica/game/v1_account.h" #include "ballistica/graphics/graphics_server.h" @@ -30,7 +31,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20821; +const int kAppBuildNumber = 20822; const char* kAppVersion = "1.7.7"; // Our standalone globals. @@ -55,8 +56,8 @@ Input* g_input{}; Thread* g_main_thread{}; Assets* g_assets{}; AssetsServer* g_assets_server{}; -NetworkReader* g_network_reader{}; Networking* g_networking{}; +NetworkReader* g_network_reader{}; NetworkWriter* g_network_writer{}; Platform* g_platform{}; Python* g_python{}; @@ -99,16 +100,15 @@ auto BallisticaMain(int argc, char** argv) -> int { g_app = new App(argc, argv); g_platform = Platform::Create(); - // Bootstrap our Python environment as early as we can (depends on - // g_platform for locating OS-specific paths). - g_python = new Python(); - // Create a Thread wrapper around the current (main) thread. g_main_thread = new Thread(ThreadIdentifier::kMain, ThreadType::kMain); Thread::UpdateMainThreadID(); - // Spin up our specific app and graphics variations - // (VR, headless, regular, etc.) + // Bootstrap our Python environment as early as we can (depends on + // g_platform for locating OS-specific paths). + g_python = new Python(); + + // Spin up our specific app and graphics variations (VR, headless, etc.) g_app_flavor = g_platform->CreateAppFlavor(); g_graphics = g_platform->CreateGraphics(); @@ -125,25 +125,21 @@ auto BallisticaMain(int argc, char** argv) -> int { g_assets_server = new AssetsServer(); g_ui = Object::NewUnmanaged(); g_networking = new Networking(); + g_network_writer = new NetworkWriter(); g_input = new Input(); - g_app_internal = GetAppInternal(); + g_app_internal = CreateAppInternal(); + g_game = new Game(); Scene::Init(); + if (!HeadlessMode()) { + g_bg_dynamics = new BGDynamics(); + g_bg_dynamics_server = new BGDynamicsServer(); + } - // Spin up our other standard threads. - auto* logic_thread{new Thread(ThreadIdentifier::kLogic)}; - g_app->pausable_threads.push_back(logic_thread); - auto* network_write_thread{new Thread(ThreadIdentifier::kNetworkWrite)}; - g_app->pausable_threads.push_back(network_write_thread); + // FIXME - move this later but need to init Python earlier then. + g_game->Start(); - // Spin up our subsystems in those threads. - logic_thread->PushCallSynchronous( - [logic_thread] { new Game(logic_thread); }); - network_write_thread->PushCallSynchronous( - [network_write_thread] { new NetworkWriter(network_write_thread); }); - - // Now let the platform spin up any other threads/modules it uses. - // (bg-dynamics in non-headless builds, stdin/stdout where applicable, - // etc.) + // NOTE TO SELF: this starts reading stdin and py-init hangs if we do + // it after here. g_platform->CreateAuxiliaryModules(); // Ok at this point we can be considered up-and-running. diff --git a/src/ballistica/core/thread.cc b/src/ballistica/core/thread.cc index fe7e1650..1b277acc 100644 --- a/src/ballistica/core/thread.cc +++ b/src/ballistica/core/thread.cc @@ -84,7 +84,7 @@ void Thread::WaitForNextEvent(bool single_cycle) { } // While we're waiting, allow other python threads to run. - if (holds_python_gil_) { + if (acquires_python_gil_) { g_python->ReleaseGIL(); } @@ -117,7 +117,7 @@ void Thread::WaitForNextEvent(bool single_cycle) { } } - if (holds_python_gil_) { + if (acquires_python_gil_) { g_python->AcquireGIL(); } } @@ -357,8 +357,8 @@ auto Thread::ThreadMain() -> int { } } -void Thread::SetHoldsPythonGIL() { - holds_python_gil_ = true; +void Thread::SetAcquiresPythonGIL() { + acquires_python_gil_ = true; g_python->AcquireGIL(); } diff --git a/src/ballistica/core/thread.h b/src/ballistica/core/thread.h index 63cfe5f3..c994997c 100644 --- a/src/ballistica/core/thread.h +++ b/src/ballistica/core/thread.h @@ -44,7 +44,7 @@ class Thread { // Used to quit the main thread. void Quit(); - void SetHoldsPythonGIL(); + void SetAcquiresPythonGIL(); void SetPaused(bool paused); auto thread_id() const -> std::thread::id { return thread_id_; } @@ -137,7 +137,7 @@ class Thread { std::thread::id thread_id_{}; ThreadIdentifier identifier_{ThreadIdentifier::kInvalid}; millisecs_t last_complaint_time_{}; - bool holds_python_gil_{}; + bool acquires_python_gil_{}; // FIXME: Should generalize this to some sort of PlatformThreadData class. #if BA_XCODE_BUILD diff --git a/src/ballistica/dynamics/bg/bg_dynamics.cc b/src/ballistica/dynamics/bg/bg_dynamics.cc index 7f6aad21..6a3565f3 100644 --- a/src/ballistica/dynamics/bg/bg_dynamics.cc +++ b/src/ballistica/dynamics/bg/bg_dynamics.cc @@ -14,15 +14,9 @@ namespace ballistica { -void BGDynamics::Init() { - // Just init our singleton. - new BGDynamics(); -} - BGDynamics::BGDynamics() { - assert(InLogicThread()); + // We're a singleton; make sure we don't already exist. assert(g_bg_dynamics == nullptr); - g_bg_dynamics = this; } void BGDynamics::AddTerrain(CollideModelData* o) { diff --git a/src/ballistica/dynamics/bg/bg_dynamics.h b/src/ballistica/dynamics/bg/bg_dynamics.h index 1115f547..934811ad 100644 --- a/src/ballistica/dynamics/bg/bg_dynamics.h +++ b/src/ballistica/dynamics/bg/bg_dynamics.h @@ -48,7 +48,7 @@ class BGDynamicsEmission { // client (game thread) functionality for bg dynamics class BGDynamics { public: - static void Init(); + BGDynamics(); void Emit(const BGDynamicsEmission& def); void Step(const Vector3f& cam_pos); @@ -68,7 +68,6 @@ class BGDynamics { void SetDrawSnapshot(BGDynamicsDrawSnapshot* s); private: - BGDynamics(); void DrawChunks(FrameDef* frame_def, std::vector* instances, BGDynamicsChunkType chunk_type); Object::Ref lights_mesh_; diff --git a/src/ballistica/dynamics/bg/bg_dynamics_server.cc b/src/ballistica/dynamics/bg/bg_dynamics_server.cc index 6c959e77..1da1bf9b 100644 --- a/src/ballistica/dynamics/bg/bg_dynamics_server.cc +++ b/src/ballistica/dynamics/bg/bg_dynamics_server.cc @@ -660,12 +660,15 @@ void BGDynamicsServer::ParticleSet::UpdateAndCreateSnapshot( current_set = !current_set; } -BGDynamicsServer::BGDynamicsServer(Thread* thread) - : thread_(thread), - height_cache_(new BGDynamicsHeightCache()), +BGDynamicsServer::BGDynamicsServer() + : height_cache_(new BGDynamicsHeightCache()), collision_cache_(new CollisionCache) { + // We're a singleton; make sure we don't already exist. BA_PRECONDITION(g_bg_dynamics_server == nullptr); - g_bg_dynamics_server = this; + + // Spin up our thread. + thread_ = new Thread(ThreadIdentifier::kBGDynamics); + g_app->pausable_threads.push_back(thread_); // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer) ode_world_ = dWorldCreate(); diff --git a/src/ballistica/dynamics/bg/bg_dynamics_server.h b/src/ballistica/dynamics/bg/bg_dynamics_server.h index 90a229f5..691aeba8 100644 --- a/src/ballistica/dynamics/bg/bg_dynamics_server.h +++ b/src/ballistica/dynamics/bg/bg_dynamics_server.h @@ -80,7 +80,7 @@ class BGDynamicsServer { std::vector > fuse_step_data_; }; - explicit BGDynamicsServer(Thread* thread); + BGDynamicsServer(); auto time() const -> uint32_t { return time_; } auto graphics_quality() const -> GraphicsQuality { return graphics_quality_; } diff --git a/src/ballistica/dynamics/collision_cache.cc b/src/ballistica/dynamics/collision_cache.cc index 5c9a6ead..8568d0f6 100644 --- a/src/ballistica/dynamics/collision_cache.cc +++ b/src/ballistica/dynamics/collision_cache.cc @@ -17,12 +17,12 @@ CollisionCache::~CollisionCache() { dGeomDestroy(test_box_); } -void CollisionCache::SetGeoms(const std::vector& geoms) { +auto CollisionCache::SetGeoms(const std::vector& geoms) -> void { dirty_ = true; geoms_ = geoms; } -void CollisionCache::Draw(FrameDef* frame_def) { +auto CollisionCache::Draw(FrameDef* frame_def) -> void { if (cells_.empty()) { return; } @@ -124,7 +124,7 @@ void CollisionCache::Draw(FrameDef* frame_def) { } } -void CollisionCache::Precalc() { +auto CollisionCache::Precalc() -> void { Update(); if (precalc_index_ >= cells_.size()) { @@ -138,8 +138,8 @@ void CollisionCache::Precalc() { TestCell(precalc_index_++, x, z); } -void CollisionCache::CollideAgainstGeom(dGeomID g1, void* data, - dNearCallback* callback) { +auto CollisionCache::CollideAgainstGeom(dGeomID g1, void* data, + dNearCallback* callback) -> void { // Update bounds, test for quick out against our height map, // and proceed to a full test on a positive result. g1->recomputeAABB(); @@ -204,7 +204,7 @@ void CollisionCache::CollideAgainstGeom(dGeomID g1, void* data, } } -void CollisionCache::TestCell(size_t cell_index, int x, int z) { +auto CollisionCache::TestCell(size_t cell_index, int x, int z) -> void { int t_count = static_cast(geoms_.size()); float top = cells_[cell_index].height_confirmed_empty_; @@ -252,8 +252,8 @@ void CollisionCache::TestCell(size_t cell_index, int x, int z) { } } -void CollisionCache::CollideAgainstSpace(dSpaceID space, void* data, - dNearCallback* callback) { +auto CollisionCache::CollideAgainstSpace(dSpaceID space, void* data, + dNearCallback* callback) -> void { // We handle our own testing against trimeshes, so we can bring our fancy // caching into play. if (!geoms_.empty()) { @@ -264,7 +264,7 @@ void CollisionCache::CollideAgainstSpace(dSpaceID space, void* data, } } -void CollisionCache::Update() { +auto CollisionCache::Update() -> void { if (!dirty_) { return; } diff --git a/src/ballistica/dynamics/collision_cache.h b/src/ballistica/dynamics/collision_cache.h index 471f7c9a..ea8e02c7 100644 --- a/src/ballistica/dynamics/collision_cache.h +++ b/src/ballistica/dynamics/collision_cache.h @@ -27,7 +27,7 @@ class CollisionCache { // Call this periodically (once per cycle or so) to slowly fill in // the cache so there's less to do during spurts of activity; - void Precalc(); + auto Precalc() -> void; private: auto TestCell(size_t cell_index, int x, int z) -> void; diff --git a/src/ballistica/game/game.cc b/src/ballistica/game/game.cc index db06dd04..4c458e95 100644 --- a/src/ballistica/game/game.cc +++ b/src/ballistica/game/game.cc @@ -64,29 +64,33 @@ const int kMaxChatMessages = 40; // Go with 5 minute ban. const int kKickBanSeconds = 5 * 60; -Game::Game(Thread* thread) - : thread_(thread), - game_roster_(cJSON_CreateArray()), +Game::Game() + : game_roster_(cJSON_CreateArray()), realtimers_(new TimerList()), connections_(std::make_unique()) { + // We're a singleton; make sure we don't already exist. assert(g_game == nullptr); - g_game = this; + InitSpecialChars(); + + // Spin up our thread. + thread_ = new Thread(ThreadIdentifier::kLogic); + g_app->pausable_threads.push_back(thread_); + // Our thread should hold the Python GIL by default. + // TODO(ericf): It could be better to have each individual Python call + // we make acquire the GIL. Then we're not holding it during long + // bits of C++ logic. + thread_->SetAcquiresPythonGIL(); +} +auto Game::Start() -> void { + thread_->PushCallSynchronous([this] { StartInThread(); }); +} + +auto Game::StartInThread() -> void { try { - // Our thread should hold the Python GIL by default. - // TODO(ericf): It could be better to have each individual Python call - // we make acquire the GIL. Then we're not holding it during long - // bits of C++ logic. - thread->SetHoldsPythonGIL(); - - if (!HeadlessMode()) { - BGDynamics::Init(); - } - - InitSpecialChars(); - // We want to be informed when our thread is pausing. - thread->AddPauseCallback(NewLambdaRunnableRaw([this] { OnThreadPause(); })); + thread()->AddPauseCallback( + NewLambdaRunnableRaw([this] { OnThreadPause(); })); g_ui->LogicThreadInit(); diff --git a/src/ballistica/game/game.h b/src/ballistica/game/game.h index 5c9e8a87..9112158a 100644 --- a/src/ballistica/game/game.h +++ b/src/ballistica/game/game.h @@ -24,7 +24,8 @@ const int kMaxPartyNameCombinedSize = 25; /// rendering, etc. class Game { public: - explicit Game(Thread* thread); + Game(); + auto Start() -> void; auto LaunchHostSession(PyObject* session_type_obj, BenchmarkType benchmark_type = BenchmarkType::kNone) @@ -244,6 +245,7 @@ class Game { auto thread() const -> Thread* { return thread_; } private: + auto StartInThread() -> void; auto HandleQuitOnIdle() -> void; auto InitSpecialChars() -> void; auto Draw() -> void; diff --git a/src/ballistica/input/std_input_module.cc b/src/ballistica/input/std_input_module.cc index 8f662be0..5b50f78d 100644 --- a/src/ballistica/input/std_input_module.cc +++ b/src/ballistica/input/std_input_module.cc @@ -24,7 +24,7 @@ void StdInputModule::PushBeginReadCall() { while (true) { // Print a prompt if we're a tty. - // We send this to the game thread so it happens AFTER the + // We send this to the logic thread so it happens AFTER the // results of the last script-command message we may have just sent. if (stdin_is_terminal) { g_game->thread()->PushCall([] { diff --git a/src/ballistica/internal/app_internal.h b/src/ballistica/internal/app_internal.h index e1cf5d08..3c26ee9b 100644 --- a/src/ballistica/internal/app_internal.h +++ b/src/ballistica/internal/app_internal.h @@ -10,7 +10,7 @@ namespace ballistica { -auto GetAppInternal() -> AppInternal*; +auto CreateAppInternal() -> AppInternal*; class AppInternal { public: diff --git a/src/ballistica/networking/network_writer.cc b/src/ballistica/networking/network_writer.cc index b2473812..3177f2e7 100644 --- a/src/ballistica/networking/network_writer.cc +++ b/src/ballistica/networking/network_writer.cc @@ -8,10 +8,13 @@ namespace ballistica { -NetworkWriter::NetworkWriter(Thread* thread) : thread_(thread) { - // we're a singleton +NetworkWriter::NetworkWriter() { + // We're a singleton; make sure we don't already exist. assert(g_network_writer == nullptr); - g_network_writer = this; + + // Spin up our thread. + thread_ = new Thread(ThreadIdentifier::kNetworkWrite); + g_app->pausable_threads.push_back(thread_); } void NetworkWriter::PushSendToCall(const std::vector& msg, diff --git a/src/ballistica/networking/network_writer.h b/src/ballistica/networking/network_writer.h index e88b2ac1..a67c336b 100644 --- a/src/ballistica/networking/network_writer.h +++ b/src/ballistica/networking/network_writer.h @@ -12,8 +12,8 @@ namespace ballistica { // A subsystem handling outbound network traffic. class NetworkWriter { public: + NetworkWriter(); void PushSendToCall(const std::vector& msg, const SockAddr& addr); - explicit NetworkWriter(Thread* thread); auto thread() const -> Thread* { return thread_; } private: diff --git a/src/ballistica/platform/platform.cc b/src/ballistica/platform/platform.cc index 6af72aa1..55fb4df3 100644 --- a/src/ballistica/platform/platform.cc +++ b/src/ballistica/platform/platform.cc @@ -701,15 +701,6 @@ auto Platform::GetKeyName(int keycode) -> std::string { } void Platform::CreateAuxiliaryModules() { -#if !BA_HEADLESS_BUILD - auto* bg_dynamics_thread = new Thread(ThreadIdentifier::kBGDynamics); - g_app->pausable_threads.push_back(bg_dynamics_thread); -#endif -#if !BA_HEADLESS_BUILD - bg_dynamics_thread->PushCallSynchronous( - [bg_dynamics_thread] { new BGDynamicsServer(bg_dynamics_thread); }); -#endif - if (g_buildconfig.use_stdin_thread()) { // Start listening for stdin commands (on platforms where that makes sense). // Note: this thread blocks indefinitely for input so we don't add it to the From c73793c2e7848d518504f9fb6f73a28044aa8091 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 12 Sep 2022 10:18:34 -0700 Subject: [PATCH 09/40] fixing build caches --- .efrocachemap | 1174 ++++++++++---------- CHANGELOG.md | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/ballistica.cc | 2 +- 4 files changed, 590 insertions(+), 590 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index e4744f01..8c5552a0 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -1,425 +1,425 @@ { - "assets/build/ba_data/audio/achievement.ogg": "https://files.ballistica.net/cache/ba1/4c/ab/e1154f41cef441f99a1c9fd83235", - "assets/build/ba_data/audio/actionHero1.ogg": "https://files.ballistica.net/cache/ba1/96/ea/60517e6a08b88cb72b781fe31f90", - "assets/build/ba_data/audio/actionHero2.ogg": "https://files.ballistica.net/cache/ba1/96/a5/f9a96d2494371f2649f26fe87c59", - "assets/build/ba_data/audio/actionHero3.ogg": "https://files.ballistica.net/cache/ba1/90/c4/a2b396109a1795bfc5346b440966", - "assets/build/ba_data/audio/actionHero4.ogg": "https://files.ballistica.net/cache/ba1/a6/98/15a57f791cf06e41fa356722b6e0", - "assets/build/ba_data/audio/actionHeroDeath.ogg": "https://files.ballistica.net/cache/ba1/ac/3c/5667d984ed9699337d061a5f097d", - "assets/build/ba_data/audio/actionHeroFall.ogg": "https://files.ballistica.net/cache/ba1/93/02/89b89e8dd9d1dda5bfcaaa396837", - "assets/build/ba_data/audio/actionHeroHit1.ogg": "https://files.ballistica.net/cache/ba1/88/81/5d5611d5ff0efdc20c85b8332fa5", - "assets/build/ba_data/audio/actionHeroHit2.ogg": "https://files.ballistica.net/cache/ba1/0b/a3/fca8a5a2ca4887cda6e346052fdf", - "assets/build/ba_data/audio/activateBeep.ogg": "https://files.ballistica.net/cache/ba1/a9/ad/fb033737da69cdef29d01163bd27", - "assets/build/ba_data/audio/agent1.ogg": "https://files.ballistica.net/cache/ba1/ed/d1/509b2f050261aba148502c429735", - "assets/build/ba_data/audio/agent2.ogg": "https://files.ballistica.net/cache/ba1/c8/93/bad055de98ec67ab4d9459e542d6", - "assets/build/ba_data/audio/agent3.ogg": "https://files.ballistica.net/cache/ba1/e3/a0/187c8efe456bf430e780d4218298", - "assets/build/ba_data/audio/agent4.ogg": "https://files.ballistica.net/cache/ba1/08/f0/c65c9ddf2f4a24799794707c3558", - "assets/build/ba_data/audio/agentDeath.ogg": "https://files.ballistica.net/cache/ba1/c4/2d/0ce2fa5e094f33d50180585d52dd", - "assets/build/ba_data/audio/agentFall.ogg": "https://files.ballistica.net/cache/ba1/19/2e/ca49382dddb3db67bfe5df9a34eb", - "assets/build/ba_data/audio/agentHit1.ogg": "https://files.ballistica.net/cache/ba1/74/a3/dfacee4b64a61bd9095d45d686ff", - "assets/build/ba_data/audio/agentHit2.ogg": "https://files.ballistica.net/cache/ba1/42/8b/b0202b366069c2b5f6eb16591241", - "assets/build/ba_data/audio/alarm.ogg": "https://files.ballistica.net/cache/ba1/2e/40/887745329353b6cd33cd6d06c6b4", - "assets/build/ba_data/audio/ali1.ogg": "https://files.ballistica.net/cache/ba1/a2/1e/eaba9cc06b7510c78f66dadb53ee", - "assets/build/ba_data/audio/ali2.ogg": "https://files.ballistica.net/cache/ba1/63/87/44cb7e7df1598e7f26cff7f6a090", - "assets/build/ba_data/audio/ali3.ogg": "https://files.ballistica.net/cache/ba1/52/53/f216b23929a6faf6c7c5cecd17f2", - "assets/build/ba_data/audio/ali4.ogg": "https://files.ballistica.net/cache/ba1/f1/05/aca331991f970b632420018f7eea", - "assets/build/ba_data/audio/aliDeath.ogg": "https://files.ballistica.net/cache/ba1/ac/d0/c728fd363f4f762fd156bfd65c0f", - "assets/build/ba_data/audio/aliFall.ogg": "https://files.ballistica.net/cache/ba1/55/37/b25b38109f524244056e16f74034", - "assets/build/ba_data/audio/aliHit1.ogg": "https://files.ballistica.net/cache/ba1/7f/b7/5a6d2e4fcd33b9adb0da4f6314e8", - "assets/build/ba_data/audio/aliHit2.ogg": "https://files.ballistica.net/cache/ba1/8a/3b/96fdd4502a464d7c7699e8e9bdcf", - "assets/build/ba_data/audio/alien1.ogg": "https://files.ballistica.net/cache/ba1/41/9c/d631e0a9efd17f147736c8611b98", - "assets/build/ba_data/audio/alien2.ogg": "https://files.ballistica.net/cache/ba1/48/a4/484a00ff524802f13f2e08be6080", - "assets/build/ba_data/audio/alien3.ogg": "https://files.ballistica.net/cache/ba1/75/cd/8813e4d1978627d4225f32f94c98", - "assets/build/ba_data/audio/alien4.ogg": "https://files.ballistica.net/cache/ba1/b8/b3/37dabea0e5d41df99a5873f4b991", - "assets/build/ba_data/audio/alienDeath.ogg": "https://files.ballistica.net/cache/ba1/dd/0a/4d7817c706318f12b121a522a8d5", - "assets/build/ba_data/audio/alienFall.ogg": "https://files.ballistica.net/cache/ba1/5c/fc/634329fcf55a24a4ffcccbfd84d9", - "assets/build/ba_data/audio/alienHit1.ogg": "https://files.ballistica.net/cache/ba1/6f/cc/b363c0d88cc5f9d014e912b32d86", - "assets/build/ba_data/audio/alienHit2.ogg": "https://files.ballistica.net/cache/ba1/f5/ce/639fa986b114e1384d054c14ac5c", - "assets/build/ba_data/audio/announceEight.ogg": "https://files.ballistica.net/cache/ba1/ab/b4/11a149ed6ee54e1fd0a0877ead3e", - "assets/build/ba_data/audio/announceFive.ogg": "https://files.ballistica.net/cache/ba1/02/0d/56be5e6d0924cb0d8de27905c5e8", - "assets/build/ba_data/audio/announceFour.ogg": "https://files.ballistica.net/cache/ba1/04/ed/e35301b5be093bba4e766b3a71ae", - "assets/build/ba_data/audio/announceNine.ogg": "https://files.ballistica.net/cache/ba1/59/d6/736c75da6a82bf4681ff4ac106b7", - "assets/build/ba_data/audio/announceOne.ogg": "https://files.ballistica.net/cache/ba1/07/37/0739ea4b2b39cdf85e9506e2e05b", - "assets/build/ba_data/audio/announceSeven.ogg": "https://files.ballistica.net/cache/ba1/98/6a/87cdaa970d66ab5ad133f31fdd99", - "assets/build/ba_data/audio/announceSix.ogg": "https://files.ballistica.net/cache/ba1/fc/a9/4dd925835804ede9ed12aabff466", - "assets/build/ba_data/audio/announceTen.ogg": "https://files.ballistica.net/cache/ba1/66/6e/2af3f644d2b30cca793b2ef99d22", - "assets/build/ba_data/audio/announceThree.ogg": "https://files.ballistica.net/cache/ba1/db/92/389b17e197a80e85cc0b5a34c70c", - "assets/build/ba_data/audio/announceTwo.ogg": "https://files.ballistica.net/cache/ba1/e1/56/fba827af6da1bda1d5122eee3061", - "assets/build/ba_data/audio/assassin1.ogg": "https://files.ballistica.net/cache/ba1/aa/6f/cdb3d3deb823296735676b025a88", - "assets/build/ba_data/audio/assassin2.ogg": "https://files.ballistica.net/cache/ba1/b7/c3/60dc64f5417e22763b61515e4110", - "assets/build/ba_data/audio/assassin3.ogg": "https://files.ballistica.net/cache/ba1/f3/bc/c20858849ce290c3beddf3c148e3", - "assets/build/ba_data/audio/assassin4.ogg": "https://files.ballistica.net/cache/ba1/7e/74/3a4320e52e03924b70b9a30fe676", - "assets/build/ba_data/audio/assassinDeath.ogg": "https://files.ballistica.net/cache/ba1/e7/2d/9b14cd07c0db556c6022dbc2a29a", - "assets/build/ba_data/audio/assassinFall.ogg": "https://files.ballistica.net/cache/ba1/20/d3/d94ac4cfcfcb90725c15d0feca49", - "assets/build/ba_data/audio/assassinHit1.ogg": "https://files.ballistica.net/cache/ba1/2b/18/ae15ef011e17e0d0a3dbd5d5373d", - "assets/build/ba_data/audio/assassinHit2.ogg": "https://files.ballistica.net/cache/ba1/c4/b6/3b522c094896fcf103b3923e27d2", - "assets/build/ba_data/audio/bear1.ogg": "https://files.ballistica.net/cache/ba1/2f/41/d6ceef1c2d9e2eb93fc4b2d811ad", - "assets/build/ba_data/audio/bear2.ogg": "https://files.ballistica.net/cache/ba1/4d/53/d79bebd3ea5943dc58aa4a0e9423", - "assets/build/ba_data/audio/bear3.ogg": "https://files.ballistica.net/cache/ba1/25/35/844cdfac4d8b509fecab363699fd", - "assets/build/ba_data/audio/bear4.ogg": "https://files.ballistica.net/cache/ba1/08/bb/b39664fa93a7db1f02d64f841ea6", - "assets/build/ba_data/audio/bearDeath.ogg": "https://files.ballistica.net/cache/ba1/77/b6/36245034a174b9523a8881c93c2c", - "assets/build/ba_data/audio/bearFall.ogg": "https://files.ballistica.net/cache/ba1/4f/23/8c8d7c9f6bd4de2bfe942611185d", - "assets/build/ba_data/audio/bearHit1.ogg": "https://files.ballistica.net/cache/ba1/f6/6e/6122b803136020403d30f1ea5013", - "assets/build/ba_data/audio/bearHit2.ogg": "https://files.ballistica.net/cache/ba1/8c/d3/4feb37dd4ae7fa55d0e3a8dd8398", - "assets/build/ba_data/audio/bellHigh.ogg": "https://files.ballistica.net/cache/ba1/c2/68/62386652a3ded182ba512fe1b580", - "assets/build/ba_data/audio/bellLow.ogg": "https://files.ballistica.net/cache/ba1/25/8b/826780179e3550b8bab7cfe3b1ca", - "assets/build/ba_data/audio/bellMed.ogg": "https://files.ballistica.net/cache/ba1/cf/0f/c33b3ffd7d35f28dd2bf57f57dd1", - "assets/build/ba_data/audio/bigImpact.ogg": "https://files.ballistica.net/cache/ba1/3a/0f/075ddb45b3e3a9b0483ed4d57b3c", - "assets/build/ba_data/audio/bigImpact2.ogg": "https://files.ballistica.net/cache/ba1/86/ff/383b5b2cdb0b41eb795e250daafb", - "assets/build/ba_data/audio/blank.ogg": "https://files.ballistica.net/cache/ba1/56/59/a71905187964480718fb38757c06", - "assets/build/ba_data/audio/blip.ogg": "https://files.ballistica.net/cache/ba1/72/fa/a13c5c75972469b19eea5e74c80d", - "assets/build/ba_data/audio/block.ogg": "https://files.ballistica.net/cache/ba1/ca/05/1c3062d40871a620caf9e67de970", - "assets/build/ba_data/audio/bombDrop01.ogg": "https://files.ballistica.net/cache/ba1/6d/cd/46a035a85f960c2303173f2c82d5", - "assets/build/ba_data/audio/bombDrop02.ogg": "https://files.ballistica.net/cache/ba1/c7/4a/245e66d68a7cc99f3d2341e4aacf", - "assets/build/ba_data/audio/bombRoll01.ogg": "https://files.ballistica.net/cache/ba1/77/af/1688cc31b5ede80b5ec0c9ca268c", - "assets/build/ba_data/audio/bones1.ogg": "https://files.ballistica.net/cache/ba1/da/65/58b60dd8cde4ba9c99cdf4e52c24", - "assets/build/ba_data/audio/bones2.ogg": "https://files.ballistica.net/cache/ba1/b3/8a/c31b67e3bdfb7f34706695795661", - "assets/build/ba_data/audio/bones3.ogg": "https://files.ballistica.net/cache/ba1/13/ba/c4a356d9bff8b8d7086de7b5f4ed", - "assets/build/ba_data/audio/bonesDeath.ogg": "https://files.ballistica.net/cache/ba1/9f/0f/3e90549fd84443759f133d2c4631", - "assets/build/ba_data/audio/bonesFall.ogg": "https://files.ballistica.net/cache/ba1/4d/34/19b792e5779c41454e11cb9188d9", - "assets/build/ba_data/audio/boo.ogg": "https://files.ballistica.net/cache/ba1/b4/47/555501d21d992ac5e8324200f690", - "assets/build/ba_data/audio/boxDrop.ogg": "https://files.ballistica.net/cache/ba1/f7/31/5c203554a50c9e449ef44c536149", - "assets/build/ba_data/audio/boxingBell.ogg": "https://files.ballistica.net/cache/ba1/02/08/28d77f45440524863d74a8fed816", - "assets/build/ba_data/audio/bunny1.ogg": "https://files.ballistica.net/cache/ba1/b1/e4/484c57751a7f766b17782981153f", - "assets/build/ba_data/audio/bunny2.ogg": "https://files.ballistica.net/cache/ba1/8b/b6/98baa48c680afdfb2a213d243d0a", - "assets/build/ba_data/audio/bunny3.ogg": "https://files.ballistica.net/cache/ba1/d9/2d/aa8f4a711a0c852b10832be69a1a", - "assets/build/ba_data/audio/bunny4.ogg": "https://files.ballistica.net/cache/ba1/09/c1/fd65d3d7d8e0fd49ec2cb7cc9115", - "assets/build/ba_data/audio/bunnyDeath.ogg": "https://files.ballistica.net/cache/ba1/5b/64/27e47283e4eba8b11fa5948f7e81", - "assets/build/ba_data/audio/bunnyFall.ogg": "https://files.ballistica.net/cache/ba1/93/58/13b596c3f2c5f4c6d94c864e08ea", - "assets/build/ba_data/audio/bunnyHit1.ogg": "https://files.ballistica.net/cache/ba1/3b/55/578f7d270e21c8510e8706961bb8", - "assets/build/ba_data/audio/bunnyHit2.ogg": "https://files.ballistica.net/cache/ba1/bf/a5/216d97d599411ec0598b8b90c371", - "assets/build/ba_data/audio/bunnyJump.ogg": "https://files.ballistica.net/cache/ba1/7f/a5/9f1687202efb69ccd552cf0304c8", - "assets/build/ba_data/audio/cashRegister.ogg": "https://files.ballistica.net/cache/ba1/53/1a/e6766cb6638356a4b0ac64f19d21", - "assets/build/ba_data/audio/cashRegister2.ogg": "https://files.ballistica.net/cache/ba1/43/e4/c3cd7c0815c1fd9b6ccaa732d764", - "assets/build/ba_data/audio/charSelectMusic.ogg": "https://files.ballistica.net/cache/ba1/24/bb/c00f21c532be0161883be43373fa", - "assets/build/ba_data/audio/cheer.ogg": "https://files.ballistica.net/cache/ba1/b4/76/fe95993a5352fc334c2bcf072473", - "assets/build/ba_data/audio/click01.ogg": "https://files.ballistica.net/cache/ba1/0a/a4/3c97fba01ca7f3af22dd65031b81", - "assets/build/ba_data/audio/corkPop.ogg": "https://files.ballistica.net/cache/ba1/ea/3b/ca7e3eaf73d4d03326da4516f34d", - "assets/build/ba_data/audio/cowboy1.ogg": "https://files.ballistica.net/cache/ba1/a0/6c/f7f17eee09b79d3c95f6337d6f7a", - "assets/build/ba_data/audio/cowboy2.ogg": "https://files.ballistica.net/cache/ba1/9f/c3/a552ed6626c239e383171fbd7730", - "assets/build/ba_data/audio/cowboy3.ogg": "https://files.ballistica.net/cache/ba1/16/9c/e1c01e11c4d3495e56e427979d1a", - "assets/build/ba_data/audio/cowboy4.ogg": "https://files.ballistica.net/cache/ba1/bc/7f/97671bbd2552534035ef576462c5", - "assets/build/ba_data/audio/cowboyDeath.ogg": "https://files.ballistica.net/cache/ba1/c6/09/f94800a39c279407331ed69b9502", - "assets/build/ba_data/audio/cowboyFall.ogg": "https://files.ballistica.net/cache/ba1/32/74/e9d54e250ec301a2f86a121bf405", - "assets/build/ba_data/audio/cowboyHit1.ogg": "https://files.ballistica.net/cache/ba1/32/4d/fcf7083a0de971423987ad4f12af", - "assets/build/ba_data/audio/cowboyHit2.ogg": "https://files.ballistica.net/cache/ba1/b1/a2/dd38ff16ad4119c709bedc9791b8", - "assets/build/ba_data/audio/crowdChant.ogg": "https://files.ballistica.net/cache/ba1/6f/22/43eaf15ea29061f90eac44086c24", - "assets/build/ba_data/audio/cyborg1.ogg": "https://files.ballistica.net/cache/ba1/d9/a0/84dc9019a0201bdac81c445fe1f1", - "assets/build/ba_data/audio/cyborg2.ogg": "https://files.ballistica.net/cache/ba1/22/e9/776ab7fd9c4cc87ab4969417fa0b", - "assets/build/ba_data/audio/cyborg3.ogg": "https://files.ballistica.net/cache/ba1/a5/15/ea26fbd1f9b90c7b5315a9228178", - "assets/build/ba_data/audio/cyborg4.ogg": "https://files.ballistica.net/cache/ba1/6a/70/5422e02532cc69222a24edbddc27", - "assets/build/ba_data/audio/cyborgDeath.ogg": "https://files.ballistica.net/cache/ba1/99/a2/4266aeb332eb7c858ab9f5aa40b6", - "assets/build/ba_data/audio/cyborgFall.ogg": "https://files.ballistica.net/cache/ba1/b5/7f/163c3a7e938454daa4c8e0e24072", - "assets/build/ba_data/audio/cyborgHit1.ogg": "https://files.ballistica.net/cache/ba1/f1/e6/82c2e27b36ceaa0996f08c0e0dfa", - "assets/build/ba_data/audio/cyborgHit2.ogg": "https://files.ballistica.net/cache/ba1/c3/00/b38ff84d269e4a2e7de2e7efb806", - "assets/build/ba_data/audio/cymbal.ogg": "https://files.ballistica.net/cache/ba1/62/f9/0c5310d9c64c187c33c43dff4c89", - "assets/build/ba_data/audio/debrisFall.ogg": "https://files.ballistica.net/cache/ba1/65/54/1aa7c3ebeab78da86e08017e5124", - "assets/build/ba_data/audio/deek.ogg": "https://files.ballistica.net/cache/ba1/a4/fc/9a28514f77e23f4d412dc954b699", - "assets/build/ba_data/audio/deek2.ogg": "https://files.ballistica.net/cache/ba1/8c/ff/e5cafbb7acfd90c5f1666d1851d3", - "assets/build/ba_data/audio/ding.ogg": "https://files.ballistica.net/cache/ba1/c5/1b/568e1a8a633281c34f26d2b6d996", - "assets/build/ba_data/audio/dingSmall.ogg": "https://files.ballistica.net/cache/ba1/79/79/184cb2b1c26d78c01a2a870904d8", - "assets/build/ba_data/audio/dingSmallHigh.ogg": "https://files.ballistica.net/cache/ba1/75/54/e266d3e474a00848a9d831a06793", - "assets/build/ba_data/audio/dripity.ogg": "https://files.ballistica.net/cache/ba1/a1/a1/5448dfb9616ae579e65eeb1ab97c", - "assets/build/ba_data/audio/drumRoll.ogg": "https://files.ballistica.net/cache/ba1/02/0b/6c9e0d1129dc22c6b7f49213e2a9", - "assets/build/ba_data/audio/error.ogg": "https://files.ballistica.net/cache/ba1/ae/2b/b07689e388770e84a45ff439a15b", - "assets/build/ba_data/audio/explosion01.ogg": "https://files.ballistica.net/cache/ba1/17/17/15af19b044d3d8a7ab7f52307ffd", - "assets/build/ba_data/audio/explosion02.ogg": "https://files.ballistica.net/cache/ba1/24/96/8f546c83cabd69309959339a7a1d", - "assets/build/ba_data/audio/explosion03.ogg": "https://files.ballistica.net/cache/ba1/df/bb/b449ad108807e1f551e87f766ec8", - "assets/build/ba_data/audio/explosion04.ogg": "https://files.ballistica.net/cache/ba1/98/83/c951977471fdeae6ac0c4789e383", - "assets/build/ba_data/audio/explosion05.ogg": "https://files.ballistica.net/cache/ba1/eb/6b/5f2fac209da45843c7dd4544d924", - "assets/build/ba_data/audio/fanfare.ogg": "https://files.ballistica.net/cache/ba1/9d/fd/46c70880354037733ea23d162b35", - "assets/build/ba_data/audio/flagCatcherMusic.ogg": "https://files.ballistica.net/cache/ba1/ec/69/cab794be00936090427025b42161", - "assets/build/ba_data/audio/flyingMusic.ogg": "https://files.ballistica.net/cache/ba1/61/e9/f62150d91de8893f9494d3529654", - "assets/build/ba_data/audio/foghorn.ogg": "https://files.ballistica.net/cache/ba1/30/49/d661a0c712f91c6cc259f56c1fd1", - "assets/build/ba_data/audio/footImpact01.ogg": "https://files.ballistica.net/cache/ba1/9b/41/0ec70413973bb390fde2568442e5", - "assets/build/ba_data/audio/footImpact02.ogg": "https://files.ballistica.net/cache/ba1/a9/c0/6051510e0d91f6d6b1da1b0e0d3b", - "assets/build/ba_data/audio/footImpact03.ogg": "https://files.ballistica.net/cache/ba1/7f/93/95f6aad73fef701da563117e5c24", - "assets/build/ba_data/audio/forwardMarchMusic.ogg": "https://files.ballistica.net/cache/ba1/3c/0e/8462b7a99fb01b280319e5f694ed", - "assets/build/ba_data/audio/freeze.ogg": "https://files.ballistica.net/cache/ba1/14/f3/bff7ae39c6592fc39e0c664bbd3d", - "assets/build/ba_data/audio/frosty01.ogg": "https://files.ballistica.net/cache/ba1/32/70/f234804610641c2a1c9700c68d3d", - "assets/build/ba_data/audio/frosty02.ogg": "https://files.ballistica.net/cache/ba1/87/9e/03f631dd692267a63ae9609aba22", - "assets/build/ba_data/audio/frosty03.ogg": "https://files.ballistica.net/cache/ba1/f1/b5/cb19195ebac98386ac76581d7dc7", - "assets/build/ba_data/audio/frosty04.ogg": "https://files.ballistica.net/cache/ba1/99/55/9a70ee58a7170631fb29c1958295", - "assets/build/ba_data/audio/frosty05.ogg": "https://files.ballistica.net/cache/ba1/c1/16/a75511bcc29cd4e829cf5c24763b", - "assets/build/ba_data/audio/frostyDeath.ogg": "https://files.ballistica.net/cache/ba1/4d/7c/0f2bc1900cb5124904375130d680", - "assets/build/ba_data/audio/frostyFall.ogg": "https://files.ballistica.net/cache/ba1/81/84/620019b5f9df0dbb3fef2ceee79f", - "assets/build/ba_data/audio/frostyHit01.ogg": "https://files.ballistica.net/cache/ba1/f4/d1/feb64d6f9955ba8fdbd8cf096095", - "assets/build/ba_data/audio/frostyHit02.ogg": "https://files.ballistica.net/cache/ba1/df/4a/909fd74c4afd04931f82dfd5aab6", - "assets/build/ba_data/audio/frostyHit03.ogg": "https://files.ballistica.net/cache/ba1/44/65/82ccb01e1d1f606a45a79e9ff172", - "assets/build/ba_data/audio/fuse01.ogg": "https://files.ballistica.net/cache/ba1/ec/0c/d47db6eb3e362049521e3d3af5b3", - "assets/build/ba_data/audio/gladiator1.ogg": "https://files.ballistica.net/cache/ba1/35/1c/b90ffecf5f095749ff29997cb9ca", - "assets/build/ba_data/audio/gladiator2.ogg": "https://files.ballistica.net/cache/ba1/ca/c3/aad6747d33d62d6d3865e079bab5", - "assets/build/ba_data/audio/gladiator3.ogg": "https://files.ballistica.net/cache/ba1/09/30/8cf43ba318aa7046687117cabf60", - "assets/build/ba_data/audio/gladiator4.ogg": "https://files.ballistica.net/cache/ba1/bc/66/1fd1973e42d40ae51896f2c90234", - "assets/build/ba_data/audio/gladiatorDeath.ogg": "https://files.ballistica.net/cache/ba1/49/bb/71d2400bcc98e42e6b34cb5d56eb", - "assets/build/ba_data/audio/gladiatorFall.ogg": "https://files.ballistica.net/cache/ba1/98/55/939edd78fa816acbd15b65f49f17", - "assets/build/ba_data/audio/gladiatorHit1.ogg": "https://files.ballistica.net/cache/ba1/67/e7/4a67a0877f6df365bc7359e40414", - "assets/build/ba_data/audio/gladiatorHit2.ogg": "https://files.ballistica.net/cache/ba1/d4/e4/ace3958dca54ad979addb2432d62", - "assets/build/ba_data/audio/gong.ogg": "https://files.ballistica.net/cache/ba1/98/f6/578cc6e6c8ac95556ef1409e679b", - "assets/build/ba_data/audio/grandRompMusic.ogg": "https://files.ballistica.net/cache/ba1/67/71/58d76aa5504d3addf9b6fa0a1796", - "assets/build/ba_data/audio/gravelSkid.ogg": "https://files.ballistica.net/cache/ba1/53/87/6ad837fa0f1154d36d10908d8ed5", - "assets/build/ba_data/audio/gunCocking.ogg": "https://files.ballistica.net/cache/ba1/d8/83/6fcc5cc3ee12c1cc19e2bddf0f90", - "assets/build/ba_data/audio/healthPowerup.ogg": "https://files.ballistica.net/cache/ba1/ff/f1/e974a389f74a33c98f63a1961cc9", - "assets/build/ba_data/audio/hiss.ogg": "https://files.ballistica.net/cache/ba1/49/b6/446f8436367be94c24e3c570fd4d", - "assets/build/ba_data/audio/impactHard.ogg": "https://files.ballistica.net/cache/ba1/af/bd/2b72668c76820b55d4c06df02071", - "assets/build/ba_data/audio/impactHard2.ogg": "https://files.ballistica.net/cache/ba1/89/d8/d5b6836ac1bdad2044332e732dd5", - "assets/build/ba_data/audio/impactHard3.ogg": "https://files.ballistica.net/cache/ba1/4b/09/f355150897c36b48335525b228be", - "assets/build/ba_data/audio/impactMedium.ogg": "https://files.ballistica.net/cache/ba1/d9/6c/204f5d4f85b877672132f133b7db", - "assets/build/ba_data/audio/impactMedium2.ogg": "https://files.ballistica.net/cache/ba1/61/48/5c0ced953eaea7624a23f4887227", - "assets/build/ba_data/audio/jack01.ogg": "https://files.ballistica.net/cache/ba1/02/e8/5be330fc5865d3b724a9e5e5ca85", - "assets/build/ba_data/audio/jack02.ogg": "https://files.ballistica.net/cache/ba1/57/f5/1c45ea733da3d04e364cca9fd9f6", - "assets/build/ba_data/audio/jack03.ogg": "https://files.ballistica.net/cache/ba1/31/8e/afd5363437428632528209bff749", - "assets/build/ba_data/audio/jack04.ogg": "https://files.ballistica.net/cache/ba1/5a/fb/0d5d6bf3d0ca57a9ae4e9112d147", - "assets/build/ba_data/audio/jack05.ogg": "https://files.ballistica.net/cache/ba1/43/5d/9e5b46debd96873945d67d693a2d", - "assets/build/ba_data/audio/jack06.ogg": "https://files.ballistica.net/cache/ba1/70/ba/97c0e018f09cb03b75b47cabc1a5", - "assets/build/ba_data/audio/jackDeath01.ogg": "https://files.ballistica.net/cache/ba1/57/a8/ab8bfe47d4250f82333d7cd85e71", - "assets/build/ba_data/audio/jackFall01.ogg": "https://files.ballistica.net/cache/ba1/d5/94/d39edbd5e097a224b55b121db8ae", - "assets/build/ba_data/audio/jackHit01.ogg": "https://files.ballistica.net/cache/ba1/c2/86/c7d5064ecba1fbcf4aa118c2a15d", - "assets/build/ba_data/audio/jackHit02.ogg": "https://files.ballistica.net/cache/ba1/26/c2/765be6c3ef0700ee56453047de03", - "assets/build/ba_data/audio/jackHit03.ogg": "https://files.ballistica.net/cache/ba1/41/65/744455d8ee80865fdd08e9640265", - "assets/build/ba_data/audio/jackHit04.ogg": "https://files.ballistica.net/cache/ba1/ba/e7/5deae42568d4a10360ba9257d999", - "assets/build/ba_data/audio/jackHit05.ogg": "https://files.ballistica.net/cache/ba1/62/1e/6ffd348db0b0cd8ee8b73a5b2afe", - "assets/build/ba_data/audio/jackHit06.ogg": "https://files.ballistica.net/cache/ba1/cf/2d/406106b6009dca703703702cf465", - "assets/build/ba_data/audio/jackHit07.ogg": "https://files.ballistica.net/cache/ba1/86/52/357eab91c4050172bbc1019300e8", - "assets/build/ba_data/audio/jumpsuit1.ogg": "https://files.ballistica.net/cache/ba1/11/c0/b88288b3c041a34c1e343782fade", - "assets/build/ba_data/audio/jumpsuit2.ogg": "https://files.ballistica.net/cache/ba1/d9/e3/599946e2dd2f2303be60c31928d2", - "assets/build/ba_data/audio/jumpsuit3.ogg": "https://files.ballistica.net/cache/ba1/5f/30/726f25efa091fb9e5b73941d9816", - "assets/build/ba_data/audio/jumpsuit4.ogg": "https://files.ballistica.net/cache/ba1/e0/3a/df647695b2e6f5b0d938646e5bd8", - "assets/build/ba_data/audio/jumpsuitDeath.ogg": "https://files.ballistica.net/cache/ba1/48/13/93b0b49d2ba0c917604adf669d3a", - "assets/build/ba_data/audio/jumpsuitFall.ogg": "https://files.ballistica.net/cache/ba1/e1/16/9280ddce8a87e1f2f9a938bd645b", - "assets/build/ba_data/audio/jumpsuitHit1.ogg": "https://files.ballistica.net/cache/ba1/cf/45/9104a510a397860b137289cec17a", - "assets/build/ba_data/audio/jumpsuitHit2.ogg": "https://files.ballistica.net/cache/ba1/7e/9f/229554af0aa830835c5d40aeff88", - "assets/build/ba_data/audio/kronk1.ogg": "https://files.ballistica.net/cache/ba1/2d/6a/c8a173ed0daf6ca8220f94c6c3c3", - "assets/build/ba_data/audio/kronk10.ogg": "https://files.ballistica.net/cache/ba1/b1/b1/c4b7818ed566d15487d1b367be5a", - "assets/build/ba_data/audio/kronk2.ogg": "https://files.ballistica.net/cache/ba1/e2/b0/27a3e922f73766a73818e8f49fe6", - "assets/build/ba_data/audio/kronk3.ogg": "https://files.ballistica.net/cache/ba1/67/c4/6da53b2279b3730b385db2a535b8", - "assets/build/ba_data/audio/kronk4.ogg": "https://files.ballistica.net/cache/ba1/5d/50/c5d6d5284e0c441106feb84c06ac", - "assets/build/ba_data/audio/kronk5.ogg": "https://files.ballistica.net/cache/ba1/c4/cc/0f0c1edba861f61b290afd7dde00", - "assets/build/ba_data/audio/kronk6.ogg": "https://files.ballistica.net/cache/ba1/6b/be/42943e62ec0906141b3553febd63", - "assets/build/ba_data/audio/kronk7.ogg": "https://files.ballistica.net/cache/ba1/c8/d6/94da4cf95aa4834a4fcfe644931b", - "assets/build/ba_data/audio/kronk8.ogg": "https://files.ballistica.net/cache/ba1/16/6b/7d7b9b21d4c3102d7f863bf6980f", - "assets/build/ba_data/audio/kronk9.ogg": "https://files.ballistica.net/cache/ba1/bc/b8/8f9a3489c8d2596539da5982d350", - "assets/build/ba_data/audio/kronkDeath.ogg": "https://files.ballistica.net/cache/ba1/1e/0d/d4bf41468ea7ca82b68a4fa170d8", - "assets/build/ba_data/audio/kronkFall.ogg": "https://files.ballistica.net/cache/ba1/de/d8/8a88aa03423ab6363451ca7d0f9d", - "assets/build/ba_data/audio/laser.ogg": "https://files.ballistica.net/cache/ba1/fa/ca/0cc96c25a47fb440d3f3412fa66a", - "assets/build/ba_data/audio/laserReverse.ogg": "https://files.ballistica.net/cache/ba1/67/58/86c611a05cee292779a6e5f63a7b", - "assets/build/ba_data/audio/mel01.ogg": "https://files.ballistica.net/cache/ba1/60/24/f1b628245df09ab296e7127a19a0", - "assets/build/ba_data/audio/mel02.ogg": "https://files.ballistica.net/cache/ba1/2c/a5/b4f4c0b9497b6c92d10b5dd0ec31", - "assets/build/ba_data/audio/mel03.ogg": "https://files.ballistica.net/cache/ba1/35/8f/baf41d6fad44e9fe13d5c20005b7", - "assets/build/ba_data/audio/mel04.ogg": "https://files.ballistica.net/cache/ba1/9a/c1/b759e3b6e2cf1a41d283a0021577", - "assets/build/ba_data/audio/mel05.ogg": "https://files.ballistica.net/cache/ba1/32/8b/ce020ed4f0ae5e138fe948fa6e09", - "assets/build/ba_data/audio/mel06.ogg": "https://files.ballistica.net/cache/ba1/8d/9f/ba9feb5b981bb2f9a30fe8268a18", - "assets/build/ba_data/audio/mel07.ogg": "https://files.ballistica.net/cache/ba1/1f/14/96f16e5dfd4fb5eab030242b13ce", - "assets/build/ba_data/audio/mel08.ogg": "https://files.ballistica.net/cache/ba1/c8/02/5438996876a2e8542981aecdc8a5", - "assets/build/ba_data/audio/mel09.ogg": "https://files.ballistica.net/cache/ba1/c9/2f/b3ca3cbc7ed21af49508c279bb00", - "assets/build/ba_data/audio/mel10.ogg": "https://files.ballistica.net/cache/ba1/46/a4/8f4cf097b1aad5f67f04f327c817", - "assets/build/ba_data/audio/melDeath01.ogg": "https://files.ballistica.net/cache/ba1/3c/65/e640047da53ff11242db7fac304e", - "assets/build/ba_data/audio/melFall01.ogg": "https://files.ballistica.net/cache/ba1/11/b4/e4476a2a241006b349c1a05ef87c", - "assets/build/ba_data/audio/menuMusic.ogg": "https://files.ballistica.net/cache/ba1/46/dd/6084abb9b07ba87f38df14a5cbe5", - "assets/build/ba_data/audio/metalHit.ogg": "https://files.ballistica.net/cache/ba1/e5/2c/4a55e76bbb8ed01dafbab5e0e2a7", - "assets/build/ba_data/audio/metalSkid.ogg": "https://files.ballistica.net/cache/ba1/eb/c9/873a4d3de271ed04f85eaa597751", - "assets/build/ba_data/audio/ninjaAttack1.ogg": "https://files.ballistica.net/cache/ba1/7b/34/8da8913f2a8f91f0e209855b5ef2", - "assets/build/ba_data/audio/ninjaAttack2.ogg": "https://files.ballistica.net/cache/ba1/3f/2e/bff368c6ce23991d1fc8ef21adb6", - "assets/build/ba_data/audio/ninjaAttack3.ogg": "https://files.ballistica.net/cache/ba1/d3/45/f9a96792ec8a3a9a869dc667b40f", - "assets/build/ba_data/audio/ninjaAttack4.ogg": "https://files.ballistica.net/cache/ba1/97/6b/daa0aa8d449cd1fc59c273bbf51d", - "assets/build/ba_data/audio/ninjaAttack5.ogg": "https://files.ballistica.net/cache/ba1/18/be/3367a40b663b7ff30c0cde8bee19", - "assets/build/ba_data/audio/ninjaAttack6.ogg": "https://files.ballistica.net/cache/ba1/ca/84/1fa7c85341defd5936ac3a0b9b07", - "assets/build/ba_data/audio/ninjaAttack7.ogg": "https://files.ballistica.net/cache/ba1/97/f9/4e7ef88c1de5bbaa3e462db8ed0a", - "assets/build/ba_data/audio/ninjaDeath1.ogg": "https://files.ballistica.net/cache/ba1/8d/ab/edcc555ea75b571c80929eee5b76", - "assets/build/ba_data/audio/ninjaFall1.ogg": "https://files.ballistica.net/cache/ba1/53/5c/747b1feaa79a65612e9597354e54", - "assets/build/ba_data/audio/ninjaHit1.ogg": "https://files.ballistica.net/cache/ba1/75/67/85728e06e7ec1e04647cdbda0557", - "assets/build/ba_data/audio/ninjaHit2.ogg": "https://files.ballistica.net/cache/ba1/1b/c9/d83750c57a88ca2d7fe3d5f152a8", - "assets/build/ba_data/audio/ninjaHit3.ogg": "https://files.ballistica.net/cache/ba1/1b/05/14e17a35da74d3171f2e56e60874", - "assets/build/ba_data/audio/ninjaHit4.ogg": "https://files.ballistica.net/cache/ba1/07/61/ec850c93b7f4581e2ebddc076f47", - "assets/build/ba_data/audio/ninjaHit5.ogg": "https://files.ballistica.net/cache/ba1/8a/71/d00a4acd898f4b66620675d656c7", - "assets/build/ba_data/audio/ninjaHit6.ogg": "https://files.ballistica.net/cache/ba1/b3/25/d63e6729ba1ed9b540b9b7a1447b", - "assets/build/ba_data/audio/ninjaHit7.ogg": "https://files.ballistica.net/cache/ba1/5c/c5/70c3839f0e1ac6d913f6cb670f7f", - "assets/build/ba_data/audio/ninjaHit8.ogg": "https://files.ballistica.net/cache/ba1/a1/71/f77a6577e9f1cff45b666a2324ea", - "assets/build/ba_data/audio/oldLady1.ogg": "https://files.ballistica.net/cache/ba1/61/bb/44710de78e866beb3c6f1083aa1a", - "assets/build/ba_data/audio/oldLady2.ogg": "https://files.ballistica.net/cache/ba1/7a/8a/fb35cbf10c68f2e02ccd81392829", - "assets/build/ba_data/audio/oldLady3.ogg": "https://files.ballistica.net/cache/ba1/6f/15/6fe6d51a43cddc869322ea6ae69c", - "assets/build/ba_data/audio/oldLady4.ogg": "https://files.ballistica.net/cache/ba1/47/12/b85dc9be6accc3bda188389e3dc0", - "assets/build/ba_data/audio/oldLadyDeath.ogg": "https://files.ballistica.net/cache/ba1/14/dd/4d6882f9e94304ac46f358fb8cb4", - "assets/build/ba_data/audio/oldLadyFall.ogg": "https://files.ballistica.net/cache/ba1/27/79/02d236aed8c6f56f6a4f03997cef", - "assets/build/ba_data/audio/oldLadyHit1.ogg": "https://files.ballistica.net/cache/ba1/52/ce/1d7f3f3d59e75b2b81959007f463", - "assets/build/ba_data/audio/oldLadyHit2.ogg": "https://files.ballistica.net/cache/ba1/e0/1f/a4ef23d809ee66120af1745a3f78", - "assets/build/ba_data/audio/ooh.ogg": "https://files.ballistica.net/cache/ba1/6e/12/7ef78a1acb6e0e77d22a853a1e2a", - "assets/build/ba_data/audio/operaSinger1.ogg": "https://files.ballistica.net/cache/ba1/0f/dd/834f46d66adc5a2a7c59ab61469a", - "assets/build/ba_data/audio/operaSinger2.ogg": "https://files.ballistica.net/cache/ba1/00/ae/6c811bb19f221c02ac7cadbfa158", - "assets/build/ba_data/audio/operaSinger3.ogg": "https://files.ballistica.net/cache/ba1/ce/d0/035644cdade7628c74cf8e524d04", - "assets/build/ba_data/audio/operaSinger4.ogg": "https://files.ballistica.net/cache/ba1/f3/c9/9773a449f156ad66c45d86033194", - "assets/build/ba_data/audio/operaSingerDeath.ogg": "https://files.ballistica.net/cache/ba1/c4/2b/5787527e1b5efb4624e212b9893e", - "assets/build/ba_data/audio/operaSingerFall.ogg": "https://files.ballistica.net/cache/ba1/56/e3/e0d165dd8589be1cdb4c21ef7a6e", - "assets/build/ba_data/audio/operaSingerHit1.ogg": "https://files.ballistica.net/cache/ba1/70/30/51e07c8b2e2e3efc9356178e88a8", - "assets/build/ba_data/audio/operaSingerHit2.ogg": "https://files.ballistica.net/cache/ba1/77/5e/c7aa928082cf2979ba1e85d0c9c7", - "assets/build/ba_data/audio/orchestraHit.ogg": "https://files.ballistica.net/cache/ba1/99/7e/29f6c152587151a4c16a52150bed", - "assets/build/ba_data/audio/orchestraHit2.ogg": "https://files.ballistica.net/cache/ba1/3a/f3/e62d86aff37abe8d123c765a1f39", - "assets/build/ba_data/audio/orchestraHit3.ogg": "https://files.ballistica.net/cache/ba1/00/24/fd11e03805dc703a334aeb38beaa", - "assets/build/ba_data/audio/orchestraHit4.ogg": "https://files.ballistica.net/cache/ba1/43/b5/6004e5b6dc6df934f323d5341f2a", - "assets/build/ba_data/audio/orchestraHitBig1.ogg": "https://files.ballistica.net/cache/ba1/6f/f4/a5fe078b1beae7060958f1b2a200", - "assets/build/ba_data/audio/orchestraHitBig2.ogg": "https://files.ballistica.net/cache/ba1/c5/c0/576bbc2a0bf0c8fbd674c224f28e", - "assets/build/ba_data/audio/penguin1.ogg": "https://files.ballistica.net/cache/ba1/d2/cf/80da81a9d7bd86499f9cc497c545", - "assets/build/ba_data/audio/penguin2.ogg": "https://files.ballistica.net/cache/ba1/a1/fe/adbd1237268ede601217c983f2b9", - "assets/build/ba_data/audio/penguin3.ogg": "https://files.ballistica.net/cache/ba1/e6/3f/31026c7f802999b351f746ec78dc", - "assets/build/ba_data/audio/penguin4.ogg": "https://files.ballistica.net/cache/ba1/d8/32/447ecc8786010b84d471afbe8059", - "assets/build/ba_data/audio/penguinDeath.ogg": "https://files.ballistica.net/cache/ba1/14/a9/42fb892143da3d177f1491a51fab", - "assets/build/ba_data/audio/penguinFall.ogg": "https://files.ballistica.net/cache/ba1/74/e3/39961669441e01a677b8ae647a51", - "assets/build/ba_data/audio/penguinHit1.ogg": "https://files.ballistica.net/cache/ba1/bb/06/bedbe09744e5e681b91b145fabc4", - "assets/build/ba_data/audio/penguinHit2.ogg": "https://files.ballistica.net/cache/ba1/21/32/5ba66eea53deef5b131ea2bad733", - "assets/build/ba_data/audio/pixie1.ogg": "https://files.ballistica.net/cache/ba1/17/d3/6987c9d698f7fb1694acdde66151", - "assets/build/ba_data/audio/pixie2.ogg": "https://files.ballistica.net/cache/ba1/b3/4e/1a05705259fcc878e5821ab5d04a", - "assets/build/ba_data/audio/pixie3.ogg": "https://files.ballistica.net/cache/ba1/96/44/123dcfe0df176ceb28156b8c83e3", - "assets/build/ba_data/audio/pixie4.ogg": "https://files.ballistica.net/cache/ba1/a6/f9/6db63f037364e7b11f7f14e9c769", - "assets/build/ba_data/audio/pixieDeath.ogg": "https://files.ballistica.net/cache/ba1/4c/6e/b93719e2443d72f374c39679db7a", - "assets/build/ba_data/audio/pixieFall.ogg": "https://files.ballistica.net/cache/ba1/f6/99/4ba61d8c5ebb754c71a8dbeda142", - "assets/build/ba_data/audio/pixieHit1.ogg": "https://files.ballistica.net/cache/ba1/f7/b2/4fa09ec81039f7f507c0361e1139", - "assets/build/ba_data/audio/pixieHit2.ogg": "https://files.ballistica.net/cache/ba1/e8/d8/e278c7a8efed91cd7dc5324128f1", - "assets/build/ba_data/audio/playerDeath.ogg": "https://files.ballistica.net/cache/ba1/af/07/35b72d5ec74e190c088432b116e1", - "assets/build/ba_data/audio/playerLeft.ogg": "https://files.ballistica.net/cache/ba1/2c/fc/a78484ca7dbc715e854406e291f0", - "assets/build/ba_data/audio/pop01.ogg": "https://files.ballistica.net/cache/ba1/5f/25/643ad3b68415beeb3dae770b3573", - "assets/build/ba_data/audio/powerdown01.ogg": "https://files.ballistica.net/cache/ba1/f8/23/990dcd75fb9cfc357c4fb200645f", - "assets/build/ba_data/audio/powerup01.ogg": "https://files.ballistica.net/cache/ba1/58/41/98f59a71e645ee5bf27f60854e17", - "assets/build/ba_data/audio/punch01.ogg": "https://files.ballistica.net/cache/ba1/c4/7b/f1ddda8bbac71750b0a2b1d6383c", - "assets/build/ba_data/audio/punchStrong01.ogg": "https://files.ballistica.net/cache/ba1/a2/d2/e56a12592f12c4ab7f44ff4d94df", - "assets/build/ba_data/audio/punchStrong02.ogg": "https://files.ballistica.net/cache/ba1/2d/4f/fee4289fec8165207f32e602b8b8", - "assets/build/ba_data/audio/punchSwish.ogg": "https://files.ballistica.net/cache/ba1/8b/63/554524ce68a4ce9608962c067060", - "assets/build/ba_data/audio/punchWeak01.ogg": "https://files.ballistica.net/cache/ba1/aa/11/916bf27fba4e4576dbeb72b60eb6", - "assets/build/ba_data/audio/raceBeep1.ogg": "https://files.ballistica.net/cache/ba1/56/74/d453b8d90eff9d8456be8f700f1b", - "assets/build/ba_data/audio/raceBeep2.ogg": "https://files.ballistica.net/cache/ba1/83/8f/b8785d0d7c18a3e609d33e2a3fa7", - "assets/build/ba_data/audio/refWhistle.ogg": "https://files.ballistica.net/cache/ba1/cf/f4/79be01cb63cc37fc12d390511054", - "assets/build/ba_data/audio/robot1.ogg": "https://files.ballistica.net/cache/ba1/48/4f/62689f73f1081239ba332cb6c4e9", - "assets/build/ba_data/audio/robot2.ogg": "https://files.ballistica.net/cache/ba1/6f/2e/802a9dc4e42778c82dd729c0a1c6", - "assets/build/ba_data/audio/robot3.ogg": "https://files.ballistica.net/cache/ba1/d9/aa/eab6926797d878eae9054418409d", - "assets/build/ba_data/audio/robot4.ogg": "https://files.ballistica.net/cache/ba1/cc/d0/201fe0a75d88c1fee1435a6839c4", - "assets/build/ba_data/audio/robotDeath.ogg": "https://files.ballistica.net/cache/ba1/76/2d/5fe8e36a43af4abcea540f0520eb", - "assets/build/ba_data/audio/robotFall.ogg": "https://files.ballistica.net/cache/ba1/60/f7/56037dd2caae982c6bb20780f74c", - "assets/build/ba_data/audio/robotHit1.ogg": "https://files.ballistica.net/cache/ba1/c4/8e/603db8104ff99d5d7e103be94a35", - "assets/build/ba_data/audio/robotHit2.ogg": "https://files.ballistica.net/cache/ba1/6e/7d/1cd5be5006c06934fea07c60b913", - "assets/build/ba_data/audio/runAwayMusic.ogg": "https://files.ballistica.net/cache/ba1/0b/48/b08ff423d4af4d398c9eff34be56", - "assets/build/ba_data/audio/santa01.ogg": "https://files.ballistica.net/cache/ba1/15/3d/2015b69f2435bc5d5829fa3694a6", - "assets/build/ba_data/audio/santa02.ogg": "https://files.ballistica.net/cache/ba1/f9/4d/84f6519f63036eba513c3d6b1f07", - "assets/build/ba_data/audio/santa03.ogg": "https://files.ballistica.net/cache/ba1/a8/4a/dd918b8cc1d418ff8f97acf9deb6", - "assets/build/ba_data/audio/santa04.ogg": "https://files.ballistica.net/cache/ba1/7c/8d/515c6240a09fff15625b76d348ff", - "assets/build/ba_data/audio/santa05.ogg": "https://files.ballistica.net/cache/ba1/96/64/f638dceb799f8539e1c15fbcc4b1", - "assets/build/ba_data/audio/santaDeath.ogg": "https://files.ballistica.net/cache/ba1/b1/1f/c331a9fff9d410d378ddc4961012", - "assets/build/ba_data/audio/santaFall.ogg": "https://files.ballistica.net/cache/ba1/16/ba/01fa3991cd6ad62afbe85db3ebae", - "assets/build/ba_data/audio/santaHit01.ogg": "https://files.ballistica.net/cache/ba1/4f/c5/b51515b4145700394e08963484de", - "assets/build/ba_data/audio/santaHit02.ogg": "https://files.ballistica.net/cache/ba1/2c/eb/64bc09d5ff3533c3f879210a1150", - "assets/build/ba_data/audio/santaHit03.ogg": "https://files.ballistica.net/cache/ba1/0c/3c/7adf18a351c9465ef6846fefe7d7", - "assets/build/ba_data/audio/santaHit04.ogg": "https://files.ballistica.net/cache/ba1/cb/91/29992c61e4266475f1bd1806a964", - "assets/build/ba_data/audio/scamper01.ogg": "https://files.ballistica.net/cache/ba1/01/db/a9aa0e57acf9529fd070cb08567a", - "assets/build/ba_data/audio/scaryMusic.ogg": "https://files.ballistica.net/cache/ba1/1a/c2/c0d44c30317790bd404703033f3c", - "assets/build/ba_data/audio/score.ogg": "https://files.ballistica.net/cache/ba1/91/4d/aa2c6b2445f3a02a9fc1fc9eb0b8", - "assets/build/ba_data/audio/scoreHit01.ogg": "https://files.ballistica.net/cache/ba1/7f/ad/37bfd4d43e9365636b27782b2c26", - "assets/build/ba_data/audio/scoreHit02.ogg": "https://files.ballistica.net/cache/ba1/2e/6b/6fd9edd1663e56a19dfdc37d5fa3", - "assets/build/ba_data/audio/scoreIncrease.ogg": "https://files.ballistica.net/cache/ba1/20/cb/dea4a1e8b21368f9ce87467a1d40", - "assets/build/ba_data/audio/scoresEpicMusic.ogg": "https://files.ballistica.net/cache/ba1/de/4a/506915675f812c240fcb1fcb130b", - "assets/build/ba_data/audio/shatter.ogg": "https://files.ballistica.net/cache/ba1/cc/c3/bb1e9ffb2c9c8ac7affdc33d838f", - "assets/build/ba_data/audio/shieldDown.ogg": "https://files.ballistica.net/cache/ba1/c2/93/b88da0ef5671dd51ac176ad41e43", - "assets/build/ba_data/audio/shieldHit.ogg": "https://files.ballistica.net/cache/ba1/0a/a5/b7b73c267425bfb0cf8a30241e66", - "assets/build/ba_data/audio/shieldUp.ogg": "https://files.ballistica.net/cache/ba1/ae/29/5904557c1fd771878a4e8eb14f02", - "assets/build/ba_data/audio/skid01.ogg": "https://files.ballistica.net/cache/ba1/55/df/a41652bfbf5b061e42224dc162a3", - "assets/build/ba_data/audio/slowEpicMusic.ogg": "https://files.ballistica.net/cache/ba1/3e/29/13365abd4b91e06761653e591f08", - "assets/build/ba_data/audio/sparkle01.ogg": "https://files.ballistica.net/cache/ba1/fc/20/1a7aa8a565cb2c8a1221cf41d282", - "assets/build/ba_data/audio/sparkle02.ogg": "https://files.ballistica.net/cache/ba1/b0/2d/f2abf46b6767146f2e5e524e8ec8", - "assets/build/ba_data/audio/sparkle03.ogg": "https://files.ballistica.net/cache/ba1/0d/ae/815fa959c1f3c2aa1449a8603494", - "assets/build/ba_data/audio/spawn.ogg": "https://files.ballistica.net/cache/ba1/14/ce/a15931c8a134157544b49e50d2be", - "assets/build/ba_data/audio/spazAttack01.ogg": "https://files.ballistica.net/cache/ba1/4c/45/a0396d186400a819aa8a9049cdf6", - "assets/build/ba_data/audio/spazAttack02.ogg": "https://files.ballistica.net/cache/ba1/cb/6e/4e7d2f38a2d3299f59c976a37f14", - "assets/build/ba_data/audio/spazAttack03.ogg": "https://files.ballistica.net/cache/ba1/b3/cd/7649d5944eebdecce88e28e1ae7a", - "assets/build/ba_data/audio/spazAttack04.ogg": "https://files.ballistica.net/cache/ba1/dd/52/7dad8770be5cb4b3ddbba2c6271e", - "assets/build/ba_data/audio/spazDeath01.ogg": "https://files.ballistica.net/cache/ba1/f6/2f/a810bbcb1f4af634801b37ed6d9a", - "assets/build/ba_data/audio/spazEff.ogg": "https://files.ballistica.net/cache/ba1/8d/d5/fadec4e02c0ce45a28cbc6576c03", - "assets/build/ba_data/audio/spazFall01.ogg": "https://files.ballistica.net/cache/ba1/ec/29/3d34ccc86fbe793fa2086ba3303b", - "assets/build/ba_data/audio/spazImpact01.ogg": "https://files.ballistica.net/cache/ba1/8f/8c/22a477089c78df46e514b5640444", - "assets/build/ba_data/audio/spazImpact02.ogg": "https://files.ballistica.net/cache/ba1/d6/b4/81d89ec9602b49eb354317bcd417", - "assets/build/ba_data/audio/spazImpact03.ogg": "https://files.ballistica.net/cache/ba1/1a/8c/7bce8384b0e1cbd12d43f1705e1e", - "assets/build/ba_data/audio/spazImpact04.ogg": "https://files.ballistica.net/cache/ba1/00/f1/c0c3409c93efaeb2cf767064ba0f", - "assets/build/ba_data/audio/spazJump01.ogg": "https://files.ballistica.net/cache/ba1/bb/cb/3c4bb578915f13373a99f34255fc", - "assets/build/ba_data/audio/spazJump02.ogg": "https://files.ballistica.net/cache/ba1/d5/ef/93d61697c8f7d283808127258b73", - "assets/build/ba_data/audio/spazJump03.ogg": "https://files.ballistica.net/cache/ba1/bd/dd/a48974ba07a3f14579622af00047", - "assets/build/ba_data/audio/spazJump04.ogg": "https://files.ballistica.net/cache/ba1/e5/ac/7642b2da09cbeb0a8a8eeb04af1e", - "assets/build/ba_data/audio/spazOw.ogg": "https://files.ballistica.net/cache/ba1/d7/7b/ba75e7c58de39b05f8c713ad8822", - "assets/build/ba_data/audio/spazPickup01.ogg": "https://files.ballistica.net/cache/ba1/c2/88/b86c83d55ec57b79e8070d11b16e", - "assets/build/ba_data/audio/spazScream01.ogg": "https://files.ballistica.net/cache/ba1/d8/bd/b5ff6fe3a5daa53ad0fabed05a99", - "assets/build/ba_data/audio/splatter.ogg": "https://files.ballistica.net/cache/ba1/e3/ea/c17c8dc6d4e4380ef10bb3945821", - "assets/build/ba_data/audio/sportsMusic.ogg": "https://files.ballistica.net/cache/ba1/2a/34/868145f30a694d0b932fd89453a9", - "assets/build/ba_data/audio/stickyImpact.ogg": "https://files.ballistica.net/cache/ba1/cd/bc/86e695187a5b8c046ff90938c5c6", - "assets/build/ba_data/audio/superPunch.ogg": "https://files.ballistica.net/cache/ba1/a0/65/a068c90821766ca0a7ef2c2d54a3", - "assets/build/ba_data/audio/superhero1.ogg": "https://files.ballistica.net/cache/ba1/49/1e/2d975eb33577c5626a7a6bf0db56", - "assets/build/ba_data/audio/superhero2.ogg": "https://files.ballistica.net/cache/ba1/be/6f/3e83bb6c886cf9484ffc9847b984", - "assets/build/ba_data/audio/superhero3.ogg": "https://files.ballistica.net/cache/ba1/74/a5/f979c62d6e685b634de01a7491df", - "assets/build/ba_data/audio/superhero4.ogg": "https://files.ballistica.net/cache/ba1/3b/56/a0601a81145a97f6778847038ea4", - "assets/build/ba_data/audio/superheroDeath.ogg": "https://files.ballistica.net/cache/ba1/4e/52/197ea656c283532b1ff8cdbefa8e", - "assets/build/ba_data/audio/superheroFall.ogg": "https://files.ballistica.net/cache/ba1/82/3c/723f08ac4d52b29fbcabe625237d", - "assets/build/ba_data/audio/superheroHit1.ogg": "https://files.ballistica.net/cache/ba1/02/3e/bad703d34a9bb6bd912d1b979497", - "assets/build/ba_data/audio/superheroHit2.ogg": "https://files.ballistica.net/cache/ba1/f0/ac/df302e530d83c1e7b61d5bfaa50b", - "assets/build/ba_data/audio/survivalMusic.ogg": "https://files.ballistica.net/cache/ba1/60/86/ca1bf5152ce9cdc198106cf20df6", - "assets/build/ba_data/audio/swip.ogg": "https://files.ballistica.net/cache/ba1/f6/b3/c045639cf0ed73844ddcc3191f1e", - "assets/build/ba_data/audio/swip2.ogg": "https://files.ballistica.net/cache/ba1/f9/1f/b509e44dcbe234a4f81fabbc7ac2", - "assets/build/ba_data/audio/swish.ogg": "https://files.ballistica.net/cache/ba1/3a/df/16cbf89c210d383adf32551656b0", - "assets/build/ba_data/audio/swish2.ogg": "https://files.ballistica.net/cache/ba1/b3/ca/d08ec715a0e61d490bc8dd685562", - "assets/build/ba_data/audio/swish3.ogg": "https://files.ballistica.net/cache/ba1/cc/52/0a88c1e4939afb882558044b37bd", - "assets/build/ba_data/audio/tap.ogg": "https://files.ballistica.net/cache/ba1/a6/a0/90d5359db0b3704adbb8e2d92e64", - "assets/build/ba_data/audio/technoHit01.ogg": "https://files.ballistica.net/cache/ba1/bc/ad/aad8e7bf0bb3f8a1ab14e55efbca", - "assets/build/ba_data/audio/tick.ogg": "https://files.ballistica.net/cache/ba1/ed/7a/28b8fb9e8fd321a1b5f86b4bd801", - "assets/build/ba_data/audio/ticking.ogg": "https://files.ballistica.net/cache/ba1/62/78/3ce5dabf81918a5196c1a6a06394", - "assets/build/ba_data/audio/tickingCrazy.ogg": "https://files.ballistica.net/cache/ba1/fd/ee/bdb75073ded60a74be48074f3116", - "assets/build/ba_data/audio/toTheDeathMusic.ogg": "https://files.ballistica.net/cache/ba1/d4/5e/fb8cc5bdb4e655663a1071015a31", - "assets/build/ba_data/audio/trashRummage.ogg": "https://files.ballistica.net/cache/ba1/2d/07/99e3b6b93f1eacaf2dfb1686ecdd", - "assets/build/ba_data/audio/victoryMusic.ogg": "https://files.ballistica.net/cache/ba1/8f/00/9fb84fc8e4ea02f5c045b778679c", - "assets/build/ba_data/audio/warnBeep.ogg": "https://files.ballistica.net/cache/ba1/6f/e0/2a2c48ac6fcfe2e8f7de8812e991", - "assets/build/ba_data/audio/warnBeeps.ogg": "https://files.ballistica.net/cache/ba1/75/99/e3c70eb2c7f9f0dc24bbe240b4c7", - "assets/build/ba_data/audio/warrior1.ogg": "https://files.ballistica.net/cache/ba1/18/73/35f73f91fe58e3c8eb4369b690fb", - "assets/build/ba_data/audio/warrior2.ogg": "https://files.ballistica.net/cache/ba1/b9/f3/be7605706477279cf7b7e95b1a6a", - "assets/build/ba_data/audio/warrior3.ogg": "https://files.ballistica.net/cache/ba1/07/21/efe65ebfb7a04c460cbc6b8df325", - "assets/build/ba_data/audio/warrior4.ogg": "https://files.ballistica.net/cache/ba1/19/c4/b0758d469c56d3a89f61611d1fec", - "assets/build/ba_data/audio/warriorDeath.ogg": "https://files.ballistica.net/cache/ba1/7f/a3/a0544d6af799e6cb35bf595905f0", - "assets/build/ba_data/audio/warriorFall.ogg": "https://files.ballistica.net/cache/ba1/6c/3c/76232645ad124153f6cdc2b38d8f", - "assets/build/ba_data/audio/warriorHit1.ogg": "https://files.ballistica.net/cache/ba1/e8/7b/218e3b14f6baa5ee39f08595bd99", - "assets/build/ba_data/audio/warriorHit2.ogg": "https://files.ballistica.net/cache/ba1/07/64/1a4cfde7149b543923c644b1353f", - "assets/build/ba_data/audio/whenJohnnyComesMarchingHomeMusic.ogg": "https://files.ballistica.net/cache/ba1/92/e4/7cb703f3694574c5d9ebec6b4a95", - "assets/build/ba_data/audio/witch1.ogg": "https://files.ballistica.net/cache/ba1/bb/65/c8acc9289766b9e9eb87a9e35bd3", - "assets/build/ba_data/audio/witch2.ogg": "https://files.ballistica.net/cache/ba1/9a/33/c10d127f566213edc6b33ec5ee32", - "assets/build/ba_data/audio/witch3.ogg": "https://files.ballistica.net/cache/ba1/01/f4/80580ae2f456fdbe1d5cfead170a", - "assets/build/ba_data/audio/witch4.ogg": "https://files.ballistica.net/cache/ba1/04/39/8451387f6bcc747dd572cefa5d58", - "assets/build/ba_data/audio/witchDeath.ogg": "https://files.ballistica.net/cache/ba1/04/6f/017cdd2b73e257f25672512d6ae5", - "assets/build/ba_data/audio/witchFall.ogg": "https://files.ballistica.net/cache/ba1/e7/2f/44d7e597c161a18a419d3f0a183c", - "assets/build/ba_data/audio/witchHit1.ogg": "https://files.ballistica.net/cache/ba1/86/2a/e71e59006cc1317b39d141f0cad9", - "assets/build/ba_data/audio/witchHit2.ogg": "https://files.ballistica.net/cache/ba1/fa/49/4401104414c8bc76019c978b0154", - "assets/build/ba_data/audio/wizard1.ogg": "https://files.ballistica.net/cache/ba1/2d/bc/ec823e58ec642462c1a8324f640e", - "assets/build/ba_data/audio/wizard2.ogg": "https://files.ballistica.net/cache/ba1/92/b1/f82c9c09322ffc2a21d6c83be619", - "assets/build/ba_data/audio/wizard3.ogg": "https://files.ballistica.net/cache/ba1/59/eb/7cab4abb368aa63d7c3400f5c372", - "assets/build/ba_data/audio/wizard4.ogg": "https://files.ballistica.net/cache/ba1/a0/f6/c1397864fde8a6f668e10bf0b602", - "assets/build/ba_data/audio/wizardDeath.ogg": "https://files.ballistica.net/cache/ba1/5d/b8/a6daf919712762323a7e7404b67e", - "assets/build/ba_data/audio/wizardFall.ogg": "https://files.ballistica.net/cache/ba1/a4/e8/6ccdfae05090f65275388ca51032", - "assets/build/ba_data/audio/wizardHit1.ogg": "https://files.ballistica.net/cache/ba1/5d/01/f17776b644bde0efa2f168852850", - "assets/build/ba_data/audio/wizardHit2.ogg": "https://files.ballistica.net/cache/ba1/c4/8f/d279e241810dfa8281b63994a849", - "assets/build/ba_data/audio/woodDebrisFall.ogg": "https://files.ballistica.net/cache/ba1/83/ac/fc663523d3e1b2de0e1184cbaa76", - "assets/build/ba_data/audio/wrestler1.ogg": "https://files.ballistica.net/cache/ba1/d1/18/6f1fffd2bdd66f5d1e89f077457c", - "assets/build/ba_data/audio/wrestler2.ogg": "https://files.ballistica.net/cache/ba1/7a/43/015f81d7300aabead7a58446f239", - "assets/build/ba_data/audio/wrestler3.ogg": "https://files.ballistica.net/cache/ba1/e8/c8/59d8ace2d579eb1d58d53fbf8ca7", - "assets/build/ba_data/audio/wrestler4.ogg": "https://files.ballistica.net/cache/ba1/14/18/f505a9078dbfe88012e770daacdb", - "assets/build/ba_data/audio/wrestlerDeath.ogg": "https://files.ballistica.net/cache/ba1/b1/05/ea62c29f994fef9153ef20f104f0", - "assets/build/ba_data/audio/wrestlerFall.ogg": "https://files.ballistica.net/cache/ba1/9a/57/e773876ef948eec8a678653765e9", - "assets/build/ba_data/audio/wrestlerHit1.ogg": "https://files.ballistica.net/cache/ba1/cb/25/20ac19a0e7ef5efb2aa4605a8280", - "assets/build/ba_data/audio/wrestlerHit2.ogg": "https://files.ballistica.net/cache/ba1/46/d7/592aac9f2833e92c5b41fcc1d86d", - "assets/build/ba_data/audio/zoeAttack01.ogg": "https://files.ballistica.net/cache/ba1/f3/d9/6c50db6ba814269133ab9f94c547", - "assets/build/ba_data/audio/zoeAttack02.ogg": "https://files.ballistica.net/cache/ba1/2a/1d/3b2b92e7cc01063a05f20a75b898", - "assets/build/ba_data/audio/zoeAttack03.ogg": "https://files.ballistica.net/cache/ba1/c2/65/eae21f2f726d30b2de94627d5160", - "assets/build/ba_data/audio/zoeAttack04.ogg": "https://files.ballistica.net/cache/ba1/9c/b8/0dfc8986aa8595a5a25cd8d6cd10", - "assets/build/ba_data/audio/zoeDeath01.ogg": "https://files.ballistica.net/cache/ba1/3c/b0/f80295ffb1ec23c77e4e2e45ed06", - "assets/build/ba_data/audio/zoeEff.ogg": "https://files.ballistica.net/cache/ba1/5b/eb/14e6cd25ab532024261dfc0c3997", - "assets/build/ba_data/audio/zoeFall01.ogg": "https://files.ballistica.net/cache/ba1/ba/f5/cbda576d8fc965af522e88689832", - "assets/build/ba_data/audio/zoeImpact01.ogg": "https://files.ballistica.net/cache/ba1/cc/ca/aef59b4f31abbb639d3136b4cd23", - "assets/build/ba_data/audio/zoeImpact02.ogg": "https://files.ballistica.net/cache/ba1/4f/8d/2738b3b8b9cdb08f3e794891681a", - "assets/build/ba_data/audio/zoeImpact03.ogg": "https://files.ballistica.net/cache/ba1/e5/94/313a7b832f3abfc258e78ac1f18e", - "assets/build/ba_data/audio/zoeImpact04.ogg": "https://files.ballistica.net/cache/ba1/51/a8/75c9278930441114be759c4e71e1", - "assets/build/ba_data/audio/zoeJump01.ogg": "https://files.ballistica.net/cache/ba1/cf/f9/0365503a7c47b00c7977374b649a", - "assets/build/ba_data/audio/zoeJump02.ogg": "https://files.ballistica.net/cache/ba1/a0/4d/22976458a7a898337f05cdd7033b", - "assets/build/ba_data/audio/zoeJump03.ogg": "https://files.ballistica.net/cache/ba1/93/2a/79028027dcb4e03254948b37370a", - "assets/build/ba_data/audio/zoeOw.ogg": "https://files.ballistica.net/cache/ba1/f9/b0/9740d36641949b9d22996cca8fdc", - "assets/build/ba_data/audio/zoePickup01.ogg": "https://files.ballistica.net/cache/ba1/5e/e4/d744cb4b4a14c7cd7e9d06b0a9e8", - "assets/build/ba_data/audio/zoeScream01.ogg": "https://files.ballistica.net/cache/ba1/e6/c7/08fbc1ff179cf69806ca2ead333a", + "assets/build/ba_data/audio/achievement.ogg": "https://files.ballistica.net/cache/ba1/58/60/72ea79f720fe3025edccb074795c", + "assets/build/ba_data/audio/actionHero1.ogg": "https://files.ballistica.net/cache/ba1/df/19/3dca52242f89fea536675460662d", + "assets/build/ba_data/audio/actionHero2.ogg": "https://files.ballistica.net/cache/ba1/cf/59/e9370637605e17e06782a3ded253", + "assets/build/ba_data/audio/actionHero3.ogg": "https://files.ballistica.net/cache/ba1/28/90/1bcbfedccddb1dbb75f1be534a40", + "assets/build/ba_data/audio/actionHero4.ogg": "https://files.ballistica.net/cache/ba1/4e/40/b163b9e464e3ad61fbb1669faccf", + "assets/build/ba_data/audio/actionHeroDeath.ogg": "https://files.ballistica.net/cache/ba1/ab/59/f8c8b4374989b7f4291897d12136", + "assets/build/ba_data/audio/actionHeroFall.ogg": "https://files.ballistica.net/cache/ba1/67/10/fbf1be54bb261de5be005b698ac6", + "assets/build/ba_data/audio/actionHeroHit1.ogg": "https://files.ballistica.net/cache/ba1/5b/6f/f33a2387e511c98990b503120332", + "assets/build/ba_data/audio/actionHeroHit2.ogg": "https://files.ballistica.net/cache/ba1/d0/50/1a0773c6d9f75f5a59397cc7f570", + "assets/build/ba_data/audio/activateBeep.ogg": "https://files.ballistica.net/cache/ba1/5a/e7/f46f191ed3bf9141ce584670f5ef", + "assets/build/ba_data/audio/agent1.ogg": "https://files.ballistica.net/cache/ba1/5f/1d/56573ce369bab1278f8f5ca3df20", + "assets/build/ba_data/audio/agent2.ogg": "https://files.ballistica.net/cache/ba1/96/ce/9d2fa9e025c18f6a549308398622", + "assets/build/ba_data/audio/agent3.ogg": "https://files.ballistica.net/cache/ba1/7a/02/192379d0855a384a6f4602070d2f", + "assets/build/ba_data/audio/agent4.ogg": "https://files.ballistica.net/cache/ba1/d6/c2/ded31e0ca74e18fb1cc9b2848eac", + "assets/build/ba_data/audio/agentDeath.ogg": "https://files.ballistica.net/cache/ba1/37/e2/799c72c85d5580ed91f3d07f353f", + "assets/build/ba_data/audio/agentFall.ogg": "https://files.ballistica.net/cache/ba1/f7/2d/b0f45c9b63c00011d0d0726e99dc", + "assets/build/ba_data/audio/agentHit1.ogg": "https://files.ballistica.net/cache/ba1/0d/62/79bcab98bfc875de8caf8cb584ce", + "assets/build/ba_data/audio/agentHit2.ogg": "https://files.ballistica.net/cache/ba1/15/bc/08460f83e57a794f273ca6b6a0ec", + "assets/build/ba_data/audio/alarm.ogg": "https://files.ballistica.net/cache/ba1/ad/60/b59451d596fcc3f01c74622fe91b", + "assets/build/ba_data/audio/ali1.ogg": "https://files.ballistica.net/cache/ba1/75/6f/f1db853370363e61b4b59fdc34f1", + "assets/build/ba_data/audio/ali2.ogg": "https://files.ballistica.net/cache/ba1/47/dd/5fbbbf4636d3f5f1b1ccdbcd7ee9", + "assets/build/ba_data/audio/ali3.ogg": "https://files.ballistica.net/cache/ba1/e7/e2/3d9421fe70a347e421817a2b7281", + "assets/build/ba_data/audio/ali4.ogg": "https://files.ballistica.net/cache/ba1/75/6d/3986f030b46a23325ffe590ae864", + "assets/build/ba_data/audio/aliDeath.ogg": "https://files.ballistica.net/cache/ba1/0d/55/3b5715fc528462a85857209bddf5", + "assets/build/ba_data/audio/aliFall.ogg": "https://files.ballistica.net/cache/ba1/9b/44/4ae14fa4e34460eff4ff79adca82", + "assets/build/ba_data/audio/aliHit1.ogg": "https://files.ballistica.net/cache/ba1/69/7f/34fddf7c9c23d5bdb88765f246f3", + "assets/build/ba_data/audio/aliHit2.ogg": "https://files.ballistica.net/cache/ba1/d3/67/871f6ee7fbe3c0b079c1c376cad4", + "assets/build/ba_data/audio/alien1.ogg": "https://files.ballistica.net/cache/ba1/8d/25/7e7e6484081f461a3c835a40466a", + "assets/build/ba_data/audio/alien2.ogg": "https://files.ballistica.net/cache/ba1/27/17/aeabc20283ce7542d5e5dc959efb", + "assets/build/ba_data/audio/alien3.ogg": "https://files.ballistica.net/cache/ba1/83/2e/46a27a8d9650cb64fd6cd2df865f", + "assets/build/ba_data/audio/alien4.ogg": "https://files.ballistica.net/cache/ba1/37/33/4f765d486286c1f998ae4b68d98e", + "assets/build/ba_data/audio/alienDeath.ogg": "https://files.ballistica.net/cache/ba1/92/99/e9fe339c6cb5d5d91d653f2a2894", + "assets/build/ba_data/audio/alienFall.ogg": "https://files.ballistica.net/cache/ba1/70/8e/8e2fb00c82452632854959c664ce", + "assets/build/ba_data/audio/alienHit1.ogg": "https://files.ballistica.net/cache/ba1/c4/9c/181dd79a43686ebb8cc05851d7ea", + "assets/build/ba_data/audio/alienHit2.ogg": "https://files.ballistica.net/cache/ba1/bb/3e/4238ca124fdf0bdbb9aac13549f8", + "assets/build/ba_data/audio/announceEight.ogg": "https://files.ballistica.net/cache/ba1/27/6a/574c3185d7c35d9480a839c8888a", + "assets/build/ba_data/audio/announceFive.ogg": "https://files.ballistica.net/cache/ba1/11/6f/072ad78bb410d30cf26d6e511d67", + "assets/build/ba_data/audio/announceFour.ogg": "https://files.ballistica.net/cache/ba1/32/f2/c02875245b900e5fbb7a384f2c17", + "assets/build/ba_data/audio/announceNine.ogg": "https://files.ballistica.net/cache/ba1/11/c0/47a7d6d8e578229db28b604932cb", + "assets/build/ba_data/audio/announceOne.ogg": "https://files.ballistica.net/cache/ba1/96/5f/5985e6a5cc5596d507d64908ecfa", + "assets/build/ba_data/audio/announceSeven.ogg": "https://files.ballistica.net/cache/ba1/3a/11/dcc1c4c6573f29852ebe55e5b549", + "assets/build/ba_data/audio/announceSix.ogg": "https://files.ballistica.net/cache/ba1/2a/22/a966bc15bab28ed56f8ff7e5bbfa", + "assets/build/ba_data/audio/announceTen.ogg": "https://files.ballistica.net/cache/ba1/e0/2e/5c614c252c2b3c24e63ae8498dbf", + "assets/build/ba_data/audio/announceThree.ogg": "https://files.ballistica.net/cache/ba1/dc/29/3172eee392826010e9d2fa9c138e", + "assets/build/ba_data/audio/announceTwo.ogg": "https://files.ballistica.net/cache/ba1/43/18/098574d833d394808a07ba36cede", + "assets/build/ba_data/audio/assassin1.ogg": "https://files.ballistica.net/cache/ba1/c3/5f/6598616f4f1f96c40413b71de9e8", + "assets/build/ba_data/audio/assassin2.ogg": "https://files.ballistica.net/cache/ba1/a4/8d/4116a1ea3715f1c4bb788819cd18", + "assets/build/ba_data/audio/assassin3.ogg": "https://files.ballistica.net/cache/ba1/4e/92/ab9b6565d11b89b73aaa265eb8f0", + "assets/build/ba_data/audio/assassin4.ogg": "https://files.ballistica.net/cache/ba1/7b/e0/a40c91b027bace02667c0fcf158c", + "assets/build/ba_data/audio/assassinDeath.ogg": "https://files.ballistica.net/cache/ba1/05/88/f550d7014923a2c6134f12628098", + "assets/build/ba_data/audio/assassinFall.ogg": "https://files.ballistica.net/cache/ba1/dd/df/94392604b6a346f8b11b696c8f1d", + "assets/build/ba_data/audio/assassinHit1.ogg": "https://files.ballistica.net/cache/ba1/c0/6f/de6f72745e850af65cf9a5dbb3a6", + "assets/build/ba_data/audio/assassinHit2.ogg": "https://files.ballistica.net/cache/ba1/9e/e2/a69db7c14065ee8d570a100a263b", + "assets/build/ba_data/audio/bear1.ogg": "https://files.ballistica.net/cache/ba1/72/49/9551e6ff43e4fdd863cca11134f4", + "assets/build/ba_data/audio/bear2.ogg": "https://files.ballistica.net/cache/ba1/d7/1f/2c830ac5e0a0c43f145a20fa2c25", + "assets/build/ba_data/audio/bear3.ogg": "https://files.ballistica.net/cache/ba1/aa/98/9f1a21aa9dac07d05085e8687068", + "assets/build/ba_data/audio/bear4.ogg": "https://files.ballistica.net/cache/ba1/c7/26/69891bac03ddbea748f9baec9f95", + "assets/build/ba_data/audio/bearDeath.ogg": "https://files.ballistica.net/cache/ba1/e9/eb/39834342979b9340776d814902bb", + "assets/build/ba_data/audio/bearFall.ogg": "https://files.ballistica.net/cache/ba1/15/6b/2be51a0c48077b44166ce9b5a133", + "assets/build/ba_data/audio/bearHit1.ogg": "https://files.ballistica.net/cache/ba1/96/22/6f56ec5c0b58ce8faf959c766a61", + "assets/build/ba_data/audio/bearHit2.ogg": "https://files.ballistica.net/cache/ba1/4f/98/5366c6a26a83e9618b8eca54780a", + "assets/build/ba_data/audio/bellHigh.ogg": "https://files.ballistica.net/cache/ba1/7c/02/4bc38047fc4301eb3c195e0539b9", + "assets/build/ba_data/audio/bellLow.ogg": "https://files.ballistica.net/cache/ba1/85/e0/6ebea452dc2a1284e6668f18e6ec", + "assets/build/ba_data/audio/bellMed.ogg": "https://files.ballistica.net/cache/ba1/a2/d0/57fc42d7e5b76024f0221b43cdfe", + "assets/build/ba_data/audio/bigImpact.ogg": "https://files.ballistica.net/cache/ba1/90/6c/07bb89e1e1d59f927c7530c88fe8", + "assets/build/ba_data/audio/bigImpact2.ogg": "https://files.ballistica.net/cache/ba1/04/81/87864481b02fecb9914e3b50e2a6", + "assets/build/ba_data/audio/blank.ogg": "https://files.ballistica.net/cache/ba1/55/70/90a49806365698031bd7c2a1e55f", + "assets/build/ba_data/audio/blip.ogg": "https://files.ballistica.net/cache/ba1/be/d9/c7bae6f1b9900727cdcffe70adad", + "assets/build/ba_data/audio/block.ogg": "https://files.ballistica.net/cache/ba1/f6/5e/e27553fb56edd40e854a8310ce6b", + "assets/build/ba_data/audio/bombDrop01.ogg": "https://files.ballistica.net/cache/ba1/1a/e8/2bd59450bb142dd8edb7fc875337", + "assets/build/ba_data/audio/bombDrop02.ogg": "https://files.ballistica.net/cache/ba1/28/f5/f7601c05201d1cb088f7b01dd244", + "assets/build/ba_data/audio/bombRoll01.ogg": "https://files.ballistica.net/cache/ba1/4b/64/e0c24177793c47547e3f57c7273b", + "assets/build/ba_data/audio/bones1.ogg": "https://files.ballistica.net/cache/ba1/66/99/fc98f957a6db4a93b5fbb5786b4e", + "assets/build/ba_data/audio/bones2.ogg": "https://files.ballistica.net/cache/ba1/a1/38/064ad0b952104f931c1bcc34d747", + "assets/build/ba_data/audio/bones3.ogg": "https://files.ballistica.net/cache/ba1/20/6e/665a3bd95dc7769c95938da89a2b", + "assets/build/ba_data/audio/bonesDeath.ogg": "https://files.ballistica.net/cache/ba1/2c/53/450b0d309913653756599fb54f25", + "assets/build/ba_data/audio/bonesFall.ogg": "https://files.ballistica.net/cache/ba1/b5/94/d157d5a2b02016caf4a3b40c358c", + "assets/build/ba_data/audio/boo.ogg": "https://files.ballistica.net/cache/ba1/9e/b6/e71d3e3cb099fd93034adc78d079", + "assets/build/ba_data/audio/boxDrop.ogg": "https://files.ballistica.net/cache/ba1/4a/b6/c9f4c108be9808134c15cf44e4b2", + "assets/build/ba_data/audio/boxingBell.ogg": "https://files.ballistica.net/cache/ba1/34/e1/05c5c1400662d2fb3a07594db5b7", + "assets/build/ba_data/audio/bunny1.ogg": "https://files.ballistica.net/cache/ba1/24/8f/bb616af82630e9dc7b98f29318a9", + "assets/build/ba_data/audio/bunny2.ogg": "https://files.ballistica.net/cache/ba1/9d/63/3b247d4a4de0a673008868342765", + "assets/build/ba_data/audio/bunny3.ogg": "https://files.ballistica.net/cache/ba1/0e/08/6490c22fe15808b214068bdc7753", + "assets/build/ba_data/audio/bunny4.ogg": "https://files.ballistica.net/cache/ba1/2a/b7/c480591a278edfe518df5e12ec6a", + "assets/build/ba_data/audio/bunnyDeath.ogg": "https://files.ballistica.net/cache/ba1/93/7d/152e5bf4fdd7880c3f0b9abf178d", + "assets/build/ba_data/audio/bunnyFall.ogg": "https://files.ballistica.net/cache/ba1/0c/31/97752e51b1ab8f581d467b453d29", + "assets/build/ba_data/audio/bunnyHit1.ogg": "https://files.ballistica.net/cache/ba1/1a/e9/7b62eeb9abb596b89bfe53c41df2", + "assets/build/ba_data/audio/bunnyHit2.ogg": "https://files.ballistica.net/cache/ba1/37/56/f44055d623b9f16a6d3ea52cf95d", + "assets/build/ba_data/audio/bunnyJump.ogg": "https://files.ballistica.net/cache/ba1/be/92/b63a629718a81effe5858530a2be", + "assets/build/ba_data/audio/cashRegister.ogg": "https://files.ballistica.net/cache/ba1/91/07/33e1d7d98479aeb0386898bc633e", + "assets/build/ba_data/audio/cashRegister2.ogg": "https://files.ballistica.net/cache/ba1/f8/12/74edab7ebda050f913428793f477", + "assets/build/ba_data/audio/charSelectMusic.ogg": "https://files.ballistica.net/cache/ba1/a7/6d/53b41cd118b34d9ab8254dbd2ff1", + "assets/build/ba_data/audio/cheer.ogg": "https://files.ballistica.net/cache/ba1/c7/ff/c962b9c39a35de2004198e9f03f1", + "assets/build/ba_data/audio/click01.ogg": "https://files.ballistica.net/cache/ba1/7e/a6/42511f8b555d460156424bc53f47", + "assets/build/ba_data/audio/corkPop.ogg": "https://files.ballistica.net/cache/ba1/68/a4/2b7c6d678fe1fa09cde1081c83ef", + "assets/build/ba_data/audio/cowboy1.ogg": "https://files.ballistica.net/cache/ba1/1b/0f/a0bea97d774aa221a3941f0e0af2", + "assets/build/ba_data/audio/cowboy2.ogg": "https://files.ballistica.net/cache/ba1/eb/da/b25db53f6a6d4871db7a7829a8b3", + "assets/build/ba_data/audio/cowboy3.ogg": "https://files.ballistica.net/cache/ba1/42/7c/8eeaec50726c9f6bbd62694bffc5", + "assets/build/ba_data/audio/cowboy4.ogg": "https://files.ballistica.net/cache/ba1/c6/f4/a0f56e61df27ced1d7f03b1dc458", + "assets/build/ba_data/audio/cowboyDeath.ogg": "https://files.ballistica.net/cache/ba1/cb/0e/abb677f438cd64b63dd6fc363d4a", + "assets/build/ba_data/audio/cowboyFall.ogg": "https://files.ballistica.net/cache/ba1/1d/af/c302b9caba1d7f736a6dd9f52268", + "assets/build/ba_data/audio/cowboyHit1.ogg": "https://files.ballistica.net/cache/ba1/71/57/0a9213ba8dea0404318893385068", + "assets/build/ba_data/audio/cowboyHit2.ogg": "https://files.ballistica.net/cache/ba1/cb/13/afa6a5a87981e947177695af64d5", + "assets/build/ba_data/audio/crowdChant.ogg": "https://files.ballistica.net/cache/ba1/f5/c0/92c75181f783dae40075d9c2b689", + "assets/build/ba_data/audio/cyborg1.ogg": "https://files.ballistica.net/cache/ba1/47/15/b4930affbf40421447247546fe99", + "assets/build/ba_data/audio/cyborg2.ogg": "https://files.ballistica.net/cache/ba1/b2/af/626e8e08ab19d5854e474b9195aa", + "assets/build/ba_data/audio/cyborg3.ogg": "https://files.ballistica.net/cache/ba1/8c/0c/b25cf168c367368689c2830361ba", + "assets/build/ba_data/audio/cyborg4.ogg": "https://files.ballistica.net/cache/ba1/38/85/714969eb77f14b8b89c1fdf4bb54", + "assets/build/ba_data/audio/cyborgDeath.ogg": "https://files.ballistica.net/cache/ba1/2f/16/437f9756452e7386a6f737e957db", + "assets/build/ba_data/audio/cyborgFall.ogg": "https://files.ballistica.net/cache/ba1/77/db/a912a8c114f815799738da41ad5f", + "assets/build/ba_data/audio/cyborgHit1.ogg": "https://files.ballistica.net/cache/ba1/86/0c/c988a0ec4cf50cadbb3617b51547", + "assets/build/ba_data/audio/cyborgHit2.ogg": "https://files.ballistica.net/cache/ba1/30/86/9a0fd20c447caa136f902c0995aa", + "assets/build/ba_data/audio/cymbal.ogg": "https://files.ballistica.net/cache/ba1/74/c6/0f51346d8bd9ca177d20c913d4bc", + "assets/build/ba_data/audio/debrisFall.ogg": "https://files.ballistica.net/cache/ba1/82/8a/cc77cccd8f885307237e3091a43f", + "assets/build/ba_data/audio/deek.ogg": "https://files.ballistica.net/cache/ba1/4c/cf/d44e49553a8f590e6044d5a29c40", + "assets/build/ba_data/audio/deek2.ogg": "https://files.ballistica.net/cache/ba1/a1/9d/6feb67617bd1d6b0e116ba8f4051", + "assets/build/ba_data/audio/ding.ogg": "https://files.ballistica.net/cache/ba1/49/44/70398a2997c7238349abd56f64e9", + "assets/build/ba_data/audio/dingSmall.ogg": "https://files.ballistica.net/cache/ba1/ce/5d/6de4581beee72fd2dbf78e884f6d", + "assets/build/ba_data/audio/dingSmallHigh.ogg": "https://files.ballistica.net/cache/ba1/d8/6c/c290d65aa888309b14172b4550f5", + "assets/build/ba_data/audio/dripity.ogg": "https://files.ballistica.net/cache/ba1/5a/c7/2012a0547b43f4fe22300ba1e435", + "assets/build/ba_data/audio/drumRoll.ogg": "https://files.ballistica.net/cache/ba1/f9/c9/eb8cdc6911207e1b9fc37c856550", + "assets/build/ba_data/audio/error.ogg": "https://files.ballistica.net/cache/ba1/f0/fb/8db7d282d17f6549439472a17443", + "assets/build/ba_data/audio/explosion01.ogg": "https://files.ballistica.net/cache/ba1/7e/5c/60d2827cf919ce3a2a742c13656d", + "assets/build/ba_data/audio/explosion02.ogg": "https://files.ballistica.net/cache/ba1/40/5b/0ad2e9b46bdbeb5117c6c35d0c06", + "assets/build/ba_data/audio/explosion03.ogg": "https://files.ballistica.net/cache/ba1/fc/55/a9abae0b44d7a38e8965dbe0e82d", + "assets/build/ba_data/audio/explosion04.ogg": "https://files.ballistica.net/cache/ba1/3e/1d/6956a0ebd528c85d928f64e986ad", + "assets/build/ba_data/audio/explosion05.ogg": "https://files.ballistica.net/cache/ba1/1f/6a/ad37d5a4a16390ff4984008c4529", + "assets/build/ba_data/audio/fanfare.ogg": "https://files.ballistica.net/cache/ba1/65/89/78fb925efb8e70a3a7b3b8e6eb22", + "assets/build/ba_data/audio/flagCatcherMusic.ogg": "https://files.ballistica.net/cache/ba1/d2/63/1214d61047ae93562e81ebb5ff31", + "assets/build/ba_data/audio/flyingMusic.ogg": "https://files.ballistica.net/cache/ba1/84/62/853c3e325b4709e59e4d08c05f71", + "assets/build/ba_data/audio/foghorn.ogg": "https://files.ballistica.net/cache/ba1/74/26/2338cc1801cfa18e1e106aeb4ae6", + "assets/build/ba_data/audio/footImpact01.ogg": "https://files.ballistica.net/cache/ba1/d2/86/b525c0f04e5118b20d55cd075b8d", + "assets/build/ba_data/audio/footImpact02.ogg": "https://files.ballistica.net/cache/ba1/cc/c9/3a00e1b3f628412877c88f1be1dd", + "assets/build/ba_data/audio/footImpact03.ogg": "https://files.ballistica.net/cache/ba1/15/43/3e555fb6ea381f384d3ac1646707", + "assets/build/ba_data/audio/forwardMarchMusic.ogg": "https://files.ballistica.net/cache/ba1/4f/bd/c9a96a8949fca5328df20bf6c160", + "assets/build/ba_data/audio/freeze.ogg": "https://files.ballistica.net/cache/ba1/02/ab/e598b181e844a065925f2bf97963", + "assets/build/ba_data/audio/frosty01.ogg": "https://files.ballistica.net/cache/ba1/ef/6d/3400f25717f7f442dd8d1419033e", + "assets/build/ba_data/audio/frosty02.ogg": "https://files.ballistica.net/cache/ba1/76/38/5854a95ec204f41e43b50d263409", + "assets/build/ba_data/audio/frosty03.ogg": "https://files.ballistica.net/cache/ba1/a8/16/60fc348f2edc081c4c338e7956e6", + "assets/build/ba_data/audio/frosty04.ogg": "https://files.ballistica.net/cache/ba1/11/f0/7860caaada9174a47251c9c66018", + "assets/build/ba_data/audio/frosty05.ogg": "https://files.ballistica.net/cache/ba1/45/8f/def4659833a1dbd76f14b13d2bff", + "assets/build/ba_data/audio/frostyDeath.ogg": "https://files.ballistica.net/cache/ba1/d4/bd/d214a161586e03503c21d859b615", + "assets/build/ba_data/audio/frostyFall.ogg": "https://files.ballistica.net/cache/ba1/e9/44/98873e7072b05ab1fda1f35ee9cf", + "assets/build/ba_data/audio/frostyHit01.ogg": "https://files.ballistica.net/cache/ba1/7d/c9/5a6686a9f625692a51845f8b1a9e", + "assets/build/ba_data/audio/frostyHit02.ogg": "https://files.ballistica.net/cache/ba1/65/d3/bd26b06bc0d3840d12971a8ff7a3", + "assets/build/ba_data/audio/frostyHit03.ogg": "https://files.ballistica.net/cache/ba1/62/b8/ff9ae4125d95afff1eabfa70e85f", + "assets/build/ba_data/audio/fuse01.ogg": "https://files.ballistica.net/cache/ba1/e0/33/05a6deab05d5fc024078294911e6", + "assets/build/ba_data/audio/gladiator1.ogg": "https://files.ballistica.net/cache/ba1/62/c9/9a1677c7ac53aa1e2d86b6a41cb8", + "assets/build/ba_data/audio/gladiator2.ogg": "https://files.ballistica.net/cache/ba1/01/03/826a4dc462a2ffde058c229563c4", + "assets/build/ba_data/audio/gladiator3.ogg": "https://files.ballistica.net/cache/ba1/75/ac/4153c1bae224e124e6a0c14f3767", + "assets/build/ba_data/audio/gladiator4.ogg": "https://files.ballistica.net/cache/ba1/41/57/9d42f96a7b4f2501516c76acd8eb", + "assets/build/ba_data/audio/gladiatorDeath.ogg": "https://files.ballistica.net/cache/ba1/0b/3f/7b823002ac4823e692f3e3772e6d", + "assets/build/ba_data/audio/gladiatorFall.ogg": "https://files.ballistica.net/cache/ba1/59/52/bd80868601bbe451ea2b8bbedd3b", + "assets/build/ba_data/audio/gladiatorHit1.ogg": "https://files.ballistica.net/cache/ba1/d5/f1/eec7713ca5613b27827f2cecd23e", + "assets/build/ba_data/audio/gladiatorHit2.ogg": "https://files.ballistica.net/cache/ba1/8d/f6/65d8116517cedabd94498fad52f5", + "assets/build/ba_data/audio/gong.ogg": "https://files.ballistica.net/cache/ba1/22/74/cbebc4aea2e05e0b04acc6505247", + "assets/build/ba_data/audio/grandRompMusic.ogg": "https://files.ballistica.net/cache/ba1/d8/8d/c58f032720cf364033eca76836db", + "assets/build/ba_data/audio/gravelSkid.ogg": "https://files.ballistica.net/cache/ba1/53/45/06c085914c1f9faef2486bb97437", + "assets/build/ba_data/audio/gunCocking.ogg": "https://files.ballistica.net/cache/ba1/d8/ce/edd7befc975296aef73d732bb663", + "assets/build/ba_data/audio/healthPowerup.ogg": "https://files.ballistica.net/cache/ba1/f0/34/72c44aef2241471debca16f03870", + "assets/build/ba_data/audio/hiss.ogg": "https://files.ballistica.net/cache/ba1/04/3a/9b820db7a76beb8271c9737558ba", + "assets/build/ba_data/audio/impactHard.ogg": "https://files.ballistica.net/cache/ba1/30/e7/9e78011593669448536cfc97cfd2", + "assets/build/ba_data/audio/impactHard2.ogg": "https://files.ballistica.net/cache/ba1/3e/5f/4da1dd1467abf87db71303958898", + "assets/build/ba_data/audio/impactHard3.ogg": "https://files.ballistica.net/cache/ba1/19/b6/3350b18401d089a06ed953b664d8", + "assets/build/ba_data/audio/impactMedium.ogg": "https://files.ballistica.net/cache/ba1/fc/50/e6d167d4c54f01a23a8a509c0033", + "assets/build/ba_data/audio/impactMedium2.ogg": "https://files.ballistica.net/cache/ba1/d9/c9/594cee989be6e1101e5b81f84e21", + "assets/build/ba_data/audio/jack01.ogg": "https://files.ballistica.net/cache/ba1/e9/1d/924768dd46f3ebba712f7c4671fd", + "assets/build/ba_data/audio/jack02.ogg": "https://files.ballistica.net/cache/ba1/bd/6b/6f1071d7151a0c2cfb58203d3b0a", + "assets/build/ba_data/audio/jack03.ogg": "https://files.ballistica.net/cache/ba1/fe/2e/ee03645ecc98b87351b36dc8bad8", + "assets/build/ba_data/audio/jack04.ogg": "https://files.ballistica.net/cache/ba1/04/eb/2b842246184c956b63e03a030eb0", + "assets/build/ba_data/audio/jack05.ogg": "https://files.ballistica.net/cache/ba1/ee/9b/e9505d780f8df0b7f52521633033", + "assets/build/ba_data/audio/jack06.ogg": "https://files.ballistica.net/cache/ba1/28/c1/fc96bb381c38fe24db32ce943d39", + "assets/build/ba_data/audio/jackDeath01.ogg": "https://files.ballistica.net/cache/ba1/10/ad/a44b04f740f29112e146f61d08dd", + "assets/build/ba_data/audio/jackFall01.ogg": "https://files.ballistica.net/cache/ba1/d8/69/8185e28dedad83a6ce42412eca0b", + "assets/build/ba_data/audio/jackHit01.ogg": "https://files.ballistica.net/cache/ba1/c9/7d/076eb7ef2e45129e8f7870d2b5fa", + "assets/build/ba_data/audio/jackHit02.ogg": "https://files.ballistica.net/cache/ba1/cc/8c/8196a164dfa4a7304753767bc806", + "assets/build/ba_data/audio/jackHit03.ogg": "https://files.ballistica.net/cache/ba1/c0/93/280556ce2e97fbb3cfd43d4cc6f8", + "assets/build/ba_data/audio/jackHit04.ogg": "https://files.ballistica.net/cache/ba1/7d/2e/59fb210c91477798962076d40bed", + "assets/build/ba_data/audio/jackHit05.ogg": "https://files.ballistica.net/cache/ba1/d9/15/8db623ab332a7adf3087c54eb439", + "assets/build/ba_data/audio/jackHit06.ogg": "https://files.ballistica.net/cache/ba1/14/25/d85c7443244ff9c4b762cfba7d45", + "assets/build/ba_data/audio/jackHit07.ogg": "https://files.ballistica.net/cache/ba1/c3/92/70e73537e642c3de7c0d1514c62c", + "assets/build/ba_data/audio/jumpsuit1.ogg": "https://files.ballistica.net/cache/ba1/1d/e6/caeb8f3d75ad8d00a896493d4981", + "assets/build/ba_data/audio/jumpsuit2.ogg": "https://files.ballistica.net/cache/ba1/9d/65/5bada79073612f81dada09cdd669", + "assets/build/ba_data/audio/jumpsuit3.ogg": "https://files.ballistica.net/cache/ba1/ec/97/1807c9196930f55ed29080374395", + "assets/build/ba_data/audio/jumpsuit4.ogg": "https://files.ballistica.net/cache/ba1/3c/84/d62da6a915e3255434a0929e4ec8", + "assets/build/ba_data/audio/jumpsuitDeath.ogg": "https://files.ballistica.net/cache/ba1/8c/b3/525216f8302f9d948095bfa9799a", + "assets/build/ba_data/audio/jumpsuitFall.ogg": "https://files.ballistica.net/cache/ba1/7f/af/6b411b9a46ad8be33e15dc9e6429", + "assets/build/ba_data/audio/jumpsuitHit1.ogg": "https://files.ballistica.net/cache/ba1/a6/29/bed67bd2fa608427b5b27703a369", + "assets/build/ba_data/audio/jumpsuitHit2.ogg": "https://files.ballistica.net/cache/ba1/de/ff/aac029f85323dfde023607bd5b98", + "assets/build/ba_data/audio/kronk1.ogg": "https://files.ballistica.net/cache/ba1/a5/25/6ffeb4f7c0b479f6ea331fad4cb0", + "assets/build/ba_data/audio/kronk10.ogg": "https://files.ballistica.net/cache/ba1/e0/72/50b27a07c338b3ea9467877fcba6", + "assets/build/ba_data/audio/kronk2.ogg": "https://files.ballistica.net/cache/ba1/d3/4a/ab1f9a3af8ec7a35dc4c84ebec93", + "assets/build/ba_data/audio/kronk3.ogg": "https://files.ballistica.net/cache/ba1/78/3e/04ed2f524aa8c9d7cc20240dd102", + "assets/build/ba_data/audio/kronk4.ogg": "https://files.ballistica.net/cache/ba1/a7/90/67fc1bcc1e29225c6560b22dc797", + "assets/build/ba_data/audio/kronk5.ogg": "https://files.ballistica.net/cache/ba1/47/73/ebadf9e3e762761b486574f92ae5", + "assets/build/ba_data/audio/kronk6.ogg": "https://files.ballistica.net/cache/ba1/d7/12/eb34c17c7eae64861019d8b9d0e4", + "assets/build/ba_data/audio/kronk7.ogg": "https://files.ballistica.net/cache/ba1/50/12/4bbf79acb96de2891d0c04793dd8", + "assets/build/ba_data/audio/kronk8.ogg": "https://files.ballistica.net/cache/ba1/fb/3d/cf3678af97b1e9453b2a5ccf6556", + "assets/build/ba_data/audio/kronk9.ogg": "https://files.ballistica.net/cache/ba1/2b/5d/80ac256b9a0395ce0c1df07198b7", + "assets/build/ba_data/audio/kronkDeath.ogg": "https://files.ballistica.net/cache/ba1/a8/86/adb0bcf982f41aef1266bfef4ac3", + "assets/build/ba_data/audio/kronkFall.ogg": "https://files.ballistica.net/cache/ba1/01/bc/933e24668420f71aa5a7f405166e", + "assets/build/ba_data/audio/laser.ogg": "https://files.ballistica.net/cache/ba1/9e/ef/c95d203792e7c2410cf48b8e6242", + "assets/build/ba_data/audio/laserReverse.ogg": "https://files.ballistica.net/cache/ba1/ee/de/e4e5513a1e0b45bd7c21802a0680", + "assets/build/ba_data/audio/mel01.ogg": "https://files.ballistica.net/cache/ba1/df/e6/9597698cb9abe30ceade8ab682e1", + "assets/build/ba_data/audio/mel02.ogg": "https://files.ballistica.net/cache/ba1/28/0e/41a16319712fc1c0d7999d439dff", + "assets/build/ba_data/audio/mel03.ogg": "https://files.ballistica.net/cache/ba1/bf/b0/5ae8a0a1c92664a078869125aa33", + "assets/build/ba_data/audio/mel04.ogg": "https://files.ballistica.net/cache/ba1/62/8d/30104cf07b07d7f8044324587f8b", + "assets/build/ba_data/audio/mel05.ogg": "https://files.ballistica.net/cache/ba1/a3/ba/7e268b1bf136ab431ed8aa600c92", + "assets/build/ba_data/audio/mel06.ogg": "https://files.ballistica.net/cache/ba1/18/e1/f9a292341b7ae940dcdfc9af6dde", + "assets/build/ba_data/audio/mel07.ogg": "https://files.ballistica.net/cache/ba1/4e/42/c512f97edc448246a89e4c92f9c8", + "assets/build/ba_data/audio/mel08.ogg": "https://files.ballistica.net/cache/ba1/73/52/3930c7eb099dfe89fbd09c90309c", + "assets/build/ba_data/audio/mel09.ogg": "https://files.ballistica.net/cache/ba1/22/79/82f9d313915592a142e8cf0c6e99", + "assets/build/ba_data/audio/mel10.ogg": "https://files.ballistica.net/cache/ba1/a0/3a/067da88e50b7fb576cb30441065e", + "assets/build/ba_data/audio/melDeath01.ogg": "https://files.ballistica.net/cache/ba1/cd/e1/b3a3cf043eba71e1f6fdecb010f2", + "assets/build/ba_data/audio/melFall01.ogg": "https://files.ballistica.net/cache/ba1/fd/48/d9903063f4a5cd445f140280faba", + "assets/build/ba_data/audio/menuMusic.ogg": "https://files.ballistica.net/cache/ba1/61/25/949add05fbdc5d6d163192a5bf96", + "assets/build/ba_data/audio/metalHit.ogg": "https://files.ballistica.net/cache/ba1/ee/80/b0305bfb666556e8931ec5729088", + "assets/build/ba_data/audio/metalSkid.ogg": "https://files.ballistica.net/cache/ba1/de/81/6d1597d6bb6ae20d6715c52b8757", + "assets/build/ba_data/audio/ninjaAttack1.ogg": "https://files.ballistica.net/cache/ba1/b0/ec/7e6ea6898010fc117fe7ab3cfd14", + "assets/build/ba_data/audio/ninjaAttack2.ogg": "https://files.ballistica.net/cache/ba1/b9/2a/1b3045380c083e67252cade17f60", + "assets/build/ba_data/audio/ninjaAttack3.ogg": "https://files.ballistica.net/cache/ba1/83/fe/6854cffa06c237e8ba11aa1c3811", + "assets/build/ba_data/audio/ninjaAttack4.ogg": "https://files.ballistica.net/cache/ba1/09/f7/5b3de6c0c466c3fc6d2f6b19102c", + "assets/build/ba_data/audio/ninjaAttack5.ogg": "https://files.ballistica.net/cache/ba1/ec/42/e0784271bec8a82dfb54201c2e1c", + "assets/build/ba_data/audio/ninjaAttack6.ogg": "https://files.ballistica.net/cache/ba1/b2/e6/20743d838354bbc70b0eab0942e6", + "assets/build/ba_data/audio/ninjaAttack7.ogg": "https://files.ballistica.net/cache/ba1/9e/bb/e7002c6810d6a66d1a9779091364", + "assets/build/ba_data/audio/ninjaDeath1.ogg": "https://files.ballistica.net/cache/ba1/b8/62/c9f0b5aed52a44cda7c1d874f096", + "assets/build/ba_data/audio/ninjaFall1.ogg": "https://files.ballistica.net/cache/ba1/45/f8/461537290f94f4e93e6d127e73eb", + "assets/build/ba_data/audio/ninjaHit1.ogg": "https://files.ballistica.net/cache/ba1/b5/4d/0acb8fe85d7c67ec8afe3005ae2a", + "assets/build/ba_data/audio/ninjaHit2.ogg": "https://files.ballistica.net/cache/ba1/41/7b/bc492022c86f91cd38a203a7dbc8", + "assets/build/ba_data/audio/ninjaHit3.ogg": "https://files.ballistica.net/cache/ba1/21/a9/4bf5331435ab7f0118a769efc82e", + "assets/build/ba_data/audio/ninjaHit4.ogg": "https://files.ballistica.net/cache/ba1/90/9a/6a012a5e6782726a5e2d6fe91f44", + "assets/build/ba_data/audio/ninjaHit5.ogg": "https://files.ballistica.net/cache/ba1/30/ef/7d13306f36cb7827273062c3f2a4", + "assets/build/ba_data/audio/ninjaHit6.ogg": "https://files.ballistica.net/cache/ba1/5f/fe/fb2532d2e6de096a9feeab7f6c17", + "assets/build/ba_data/audio/ninjaHit7.ogg": "https://files.ballistica.net/cache/ba1/57/56/0ba4ab0f1233ef72108ccda9ccfa", + "assets/build/ba_data/audio/ninjaHit8.ogg": "https://files.ballistica.net/cache/ba1/d2/d9/b1fbfc0a864161fc879785b544c5", + "assets/build/ba_data/audio/oldLady1.ogg": "https://files.ballistica.net/cache/ba1/27/9c/4ae89ba2d90c5491a05a9098dfb7", + "assets/build/ba_data/audio/oldLady2.ogg": "https://files.ballistica.net/cache/ba1/6d/55/0f3a7a838905dde023bd93775ebb", + "assets/build/ba_data/audio/oldLady3.ogg": "https://files.ballistica.net/cache/ba1/d8/77/08e31296569e99eaea6e3335dac3", + "assets/build/ba_data/audio/oldLady4.ogg": "https://files.ballistica.net/cache/ba1/b7/96/5f7dd93a643a3ab1f5d6a0a4e8c3", + "assets/build/ba_data/audio/oldLadyDeath.ogg": "https://files.ballistica.net/cache/ba1/71/f0/ee089bbd54bb57734d09477cc2d9", + "assets/build/ba_data/audio/oldLadyFall.ogg": "https://files.ballistica.net/cache/ba1/b3/4b/a3dc06498650caee6290e364f2d6", + "assets/build/ba_data/audio/oldLadyHit1.ogg": "https://files.ballistica.net/cache/ba1/4a/66/358ad6790d13b4b2edcfc3e0f271", + "assets/build/ba_data/audio/oldLadyHit2.ogg": "https://files.ballistica.net/cache/ba1/18/cb/d7c3037b62cd77781fe4f12691fa", + "assets/build/ba_data/audio/ooh.ogg": "https://files.ballistica.net/cache/ba1/b7/28/6cefdb25ff8d908cc3feae409db3", + "assets/build/ba_data/audio/operaSinger1.ogg": "https://files.ballistica.net/cache/ba1/1f/ae/192442b203a9ea76ede63f8c6703", + "assets/build/ba_data/audio/operaSinger2.ogg": "https://files.ballistica.net/cache/ba1/ec/bd/5f82598f65e996cd38808750d31e", + "assets/build/ba_data/audio/operaSinger3.ogg": "https://files.ballistica.net/cache/ba1/6f/05/650ce355834ff955bd92e826bf61", + "assets/build/ba_data/audio/operaSinger4.ogg": "https://files.ballistica.net/cache/ba1/d9/7b/912192363ea7bdefad644d581031", + "assets/build/ba_data/audio/operaSingerDeath.ogg": "https://files.ballistica.net/cache/ba1/80/3b/9f46ff5e3935ef65a5fc241f6f69", + "assets/build/ba_data/audio/operaSingerFall.ogg": "https://files.ballistica.net/cache/ba1/31/87/7a3b7d9a0f30b97ea4c9465b1ed6", + "assets/build/ba_data/audio/operaSingerHit1.ogg": "https://files.ballistica.net/cache/ba1/af/f5/eed5e1c078a8ebb42da718d8eb2c", + "assets/build/ba_data/audio/operaSingerHit2.ogg": "https://files.ballistica.net/cache/ba1/81/9d/d2d943aec38c910aec3cd37ca8ce", + "assets/build/ba_data/audio/orchestraHit.ogg": "https://files.ballistica.net/cache/ba1/10/52/c067809e0e67ada9f51b7df4f905", + "assets/build/ba_data/audio/orchestraHit2.ogg": "https://files.ballistica.net/cache/ba1/cf/c5/f176dba87e6b8e9d8b23f79b6875", + "assets/build/ba_data/audio/orchestraHit3.ogg": "https://files.ballistica.net/cache/ba1/22/db/069cd352d268b36532fe44863a2c", + "assets/build/ba_data/audio/orchestraHit4.ogg": "https://files.ballistica.net/cache/ba1/0d/ca/e27abfc328e28c6ef394d7ae8820", + "assets/build/ba_data/audio/orchestraHitBig1.ogg": "https://files.ballistica.net/cache/ba1/b6/8f/310a8e3b4584274806ec4a623a37", + "assets/build/ba_data/audio/orchestraHitBig2.ogg": "https://files.ballistica.net/cache/ba1/36/7f/4d6affb3c51d5ab2d1f2c8161fbf", + "assets/build/ba_data/audio/penguin1.ogg": "https://files.ballistica.net/cache/ba1/05/e8/6a85b96b711a24d6b3ed85754de6", + "assets/build/ba_data/audio/penguin2.ogg": "https://files.ballistica.net/cache/ba1/a6/1c/684a4571e1e99b214ca21d600e41", + "assets/build/ba_data/audio/penguin3.ogg": "https://files.ballistica.net/cache/ba1/79/13/d728dd568a344cc7383a88a0f05a", + "assets/build/ba_data/audio/penguin4.ogg": "https://files.ballistica.net/cache/ba1/2d/f2/5b11c310268ef32a62b2ba4dcea2", + "assets/build/ba_data/audio/penguinDeath.ogg": "https://files.ballistica.net/cache/ba1/df/68/cd8363872bcef0b18d509685e3d0", + "assets/build/ba_data/audio/penguinFall.ogg": "https://files.ballistica.net/cache/ba1/a3/bb/28be81b10af2e47443e55e114878", + "assets/build/ba_data/audio/penguinHit1.ogg": "https://files.ballistica.net/cache/ba1/11/3a/9cd37ea4d2d61015c395d0e33815", + "assets/build/ba_data/audio/penguinHit2.ogg": "https://files.ballistica.net/cache/ba1/d2/5f/115f8eb45fff640967df5749383c", + "assets/build/ba_data/audio/pixie1.ogg": "https://files.ballistica.net/cache/ba1/f6/d6/8a1395d4d7305e8633f6e1caf0fb", + "assets/build/ba_data/audio/pixie2.ogg": "https://files.ballistica.net/cache/ba1/c0/5b/d0d2547b0887b7d7bbd81500b89a", + "assets/build/ba_data/audio/pixie3.ogg": "https://files.ballistica.net/cache/ba1/95/23/77e22310dd9377bb7a3444ac2bd7", + "assets/build/ba_data/audio/pixie4.ogg": "https://files.ballistica.net/cache/ba1/05/8b/81cf7b359746d76c762e2fd6004d", + "assets/build/ba_data/audio/pixieDeath.ogg": "https://files.ballistica.net/cache/ba1/e7/be/8a191fa33b425029a7e13625fa91", + "assets/build/ba_data/audio/pixieFall.ogg": "https://files.ballistica.net/cache/ba1/d5/64/34231aa7e9d336fa462cfaaec999", + "assets/build/ba_data/audio/pixieHit1.ogg": "https://files.ballistica.net/cache/ba1/e3/05/08b1c6f7e5906e6cb992dfbe514b", + "assets/build/ba_data/audio/pixieHit2.ogg": "https://files.ballistica.net/cache/ba1/ec/3f/c663c857d7530f216052ce814e97", + "assets/build/ba_data/audio/playerDeath.ogg": "https://files.ballistica.net/cache/ba1/96/a2/1e632a728ef300bcae2ff2d717a6", + "assets/build/ba_data/audio/playerLeft.ogg": "https://files.ballistica.net/cache/ba1/79/d8/7713140a3ede3b65e3bcdcba7d26", + "assets/build/ba_data/audio/pop01.ogg": "https://files.ballistica.net/cache/ba1/cc/48/4c7972a8ec6e7dbecc50debf05c9", + "assets/build/ba_data/audio/powerdown01.ogg": "https://files.ballistica.net/cache/ba1/a8/6d/9302b1a73bcbd9764f41875d7380", + "assets/build/ba_data/audio/powerup01.ogg": "https://files.ballistica.net/cache/ba1/fb/d4/deac2edc909c60ca651080a53794", + "assets/build/ba_data/audio/punch01.ogg": "https://files.ballistica.net/cache/ba1/55/4c/c31706350cfbb2a86af697848dab", + "assets/build/ba_data/audio/punchStrong01.ogg": "https://files.ballistica.net/cache/ba1/0d/7a/f1da7cbbd0597e5854a66efc2a88", + "assets/build/ba_data/audio/punchStrong02.ogg": "https://files.ballistica.net/cache/ba1/4e/c0/e100a891c673a56deeee605602b3", + "assets/build/ba_data/audio/punchSwish.ogg": "https://files.ballistica.net/cache/ba1/11/0c/d80e4d0842595fdc0923c4195ceb", + "assets/build/ba_data/audio/punchWeak01.ogg": "https://files.ballistica.net/cache/ba1/20/d3/08715bb8a195bc632c477469aed1", + "assets/build/ba_data/audio/raceBeep1.ogg": "https://files.ballistica.net/cache/ba1/53/5d/c54ae886ee8f56d3bb060fb0dfcb", + "assets/build/ba_data/audio/raceBeep2.ogg": "https://files.ballistica.net/cache/ba1/96/bc/455cf8d28acb205d13f01d4900bc", + "assets/build/ba_data/audio/refWhistle.ogg": "https://files.ballistica.net/cache/ba1/87/77/008ed6d8eac37f8b5aeabd8879c7", + "assets/build/ba_data/audio/robot1.ogg": "https://files.ballistica.net/cache/ba1/18/86/1ff23c315df417652e854b440c34", + "assets/build/ba_data/audio/robot2.ogg": "https://files.ballistica.net/cache/ba1/88/85/9f0ccaf6facb14a0a17d5ec89160", + "assets/build/ba_data/audio/robot3.ogg": "https://files.ballistica.net/cache/ba1/ac/92/647c8b99c83c1230d0709a27107b", + "assets/build/ba_data/audio/robot4.ogg": "https://files.ballistica.net/cache/ba1/ac/1e/6d1decef47d1fe68c36373f44cb4", + "assets/build/ba_data/audio/robotDeath.ogg": "https://files.ballistica.net/cache/ba1/0e/89/8e8dc3869dfa1349cfe6f400bd82", + "assets/build/ba_data/audio/robotFall.ogg": "https://files.ballistica.net/cache/ba1/02/d9/60eddc36b7ee6fbb02ae1ddb6b9e", + "assets/build/ba_data/audio/robotHit1.ogg": "https://files.ballistica.net/cache/ba1/eb/e2/f7f1492bd1ef17599b4253dea8e1", + "assets/build/ba_data/audio/robotHit2.ogg": "https://files.ballistica.net/cache/ba1/72/c3/3c9343953f884808f5452e6c7a1e", + "assets/build/ba_data/audio/runAwayMusic.ogg": "https://files.ballistica.net/cache/ba1/5a/d2/8dd3ec953d5a99a454250cee0cf2", + "assets/build/ba_data/audio/santa01.ogg": "https://files.ballistica.net/cache/ba1/f4/a4/18b599e1a8d2030e5ac71f57caad", + "assets/build/ba_data/audio/santa02.ogg": "https://files.ballistica.net/cache/ba1/c2/68/5bf7fc6c40706a830fa8feafd76d", + "assets/build/ba_data/audio/santa03.ogg": "https://files.ballistica.net/cache/ba1/0f/79/5ba921fe0af18aadc66b56443cd1", + "assets/build/ba_data/audio/santa04.ogg": "https://files.ballistica.net/cache/ba1/c7/7c/99c0b38cd9b457eafcc933efe0c4", + "assets/build/ba_data/audio/santa05.ogg": "https://files.ballistica.net/cache/ba1/e3/2f/03b8d771be498553d76dc3e1ca77", + "assets/build/ba_data/audio/santaDeath.ogg": "https://files.ballistica.net/cache/ba1/af/d2/17ef3bd225d342711fdaeaa13292", + "assets/build/ba_data/audio/santaFall.ogg": "https://files.ballistica.net/cache/ba1/3a/35/e7fd2c83bfa02fb4ef12226093bc", + "assets/build/ba_data/audio/santaHit01.ogg": "https://files.ballistica.net/cache/ba1/e5/a3/8212320d1f05b0abc8219f15283f", + "assets/build/ba_data/audio/santaHit02.ogg": "https://files.ballistica.net/cache/ba1/3f/56/d4f4afae2fe9f7d47fa57b2234c4", + "assets/build/ba_data/audio/santaHit03.ogg": "https://files.ballistica.net/cache/ba1/1d/63/5ba4653014fbc2885db708afd1ae", + "assets/build/ba_data/audio/santaHit04.ogg": "https://files.ballistica.net/cache/ba1/9c/fe/f0a5d119bf94ecd4547e81f12d7d", + "assets/build/ba_data/audio/scamper01.ogg": "https://files.ballistica.net/cache/ba1/b0/c0/77de611e53981f058e85d9d747b3", + "assets/build/ba_data/audio/scaryMusic.ogg": "https://files.ballistica.net/cache/ba1/62/a4/3f9af814e9a4796e994bde555a8f", + "assets/build/ba_data/audio/score.ogg": "https://files.ballistica.net/cache/ba1/5e/94/05dc50f166c99202a4aa2d106fff", + "assets/build/ba_data/audio/scoreHit01.ogg": "https://files.ballistica.net/cache/ba1/81/97/4ffd5ba4357e44df8f3ec37d75ed", + "assets/build/ba_data/audio/scoreHit02.ogg": "https://files.ballistica.net/cache/ba1/74/eb/220feb610faafde1e4601ff1dc65", + "assets/build/ba_data/audio/scoreIncrease.ogg": "https://files.ballistica.net/cache/ba1/cd/31/7ea93db05ec08d109bc53ff27114", + "assets/build/ba_data/audio/scoresEpicMusic.ogg": "https://files.ballistica.net/cache/ba1/16/63/0f6f47b8335573ae995d48671761", + "assets/build/ba_data/audio/shatter.ogg": "https://files.ballistica.net/cache/ba1/8c/10/27917e07d416be160445fbc51b30", + "assets/build/ba_data/audio/shieldDown.ogg": "https://files.ballistica.net/cache/ba1/f3/d8/039af57511dcf0c6a357a8607e31", + "assets/build/ba_data/audio/shieldHit.ogg": "https://files.ballistica.net/cache/ba1/ac/d8/191e528070dcfae914b1cd3a9ac3", + "assets/build/ba_data/audio/shieldUp.ogg": "https://files.ballistica.net/cache/ba1/eb/26/0d5329d330ee90542e8f7827ae9f", + "assets/build/ba_data/audio/skid01.ogg": "https://files.ballistica.net/cache/ba1/4f/0b/e12f1bd0b6e6b6246d5367ba492b", + "assets/build/ba_data/audio/slowEpicMusic.ogg": "https://files.ballistica.net/cache/ba1/5c/2e/7aa87fc4557c43009247e89d1a7e", + "assets/build/ba_data/audio/sparkle01.ogg": "https://files.ballistica.net/cache/ba1/06/97/865ba23d8393f0a6856e5ff9fa9f", + "assets/build/ba_data/audio/sparkle02.ogg": "https://files.ballistica.net/cache/ba1/e9/34/c7306677c23abe96b25005c4b227", + "assets/build/ba_data/audio/sparkle03.ogg": "https://files.ballistica.net/cache/ba1/fc/40/5883d06dc893f796276288494cda", + "assets/build/ba_data/audio/spawn.ogg": "https://files.ballistica.net/cache/ba1/1c/ad/832c7ca8efbd1933d05994b7f97c", + "assets/build/ba_data/audio/spazAttack01.ogg": "https://files.ballistica.net/cache/ba1/d0/af/5bba53f113f3ddd418da226a6383", + "assets/build/ba_data/audio/spazAttack02.ogg": "https://files.ballistica.net/cache/ba1/5c/99/cc38e0ef3afdce2e8957af33b100", + "assets/build/ba_data/audio/spazAttack03.ogg": "https://files.ballistica.net/cache/ba1/3c/1d/8c2d8fb2481e760da082cb976b40", + "assets/build/ba_data/audio/spazAttack04.ogg": "https://files.ballistica.net/cache/ba1/18/7c/d502771339dd6e0ac3425325ef7c", + "assets/build/ba_data/audio/spazDeath01.ogg": "https://files.ballistica.net/cache/ba1/41/96/bef46473014670f54ef9ea16df16", + "assets/build/ba_data/audio/spazEff.ogg": "https://files.ballistica.net/cache/ba1/70/72/d84808938005033bba5ca6955fef", + "assets/build/ba_data/audio/spazFall01.ogg": "https://files.ballistica.net/cache/ba1/aa/76/a7b3444ea49ff74f509108a22a66", + "assets/build/ba_data/audio/spazImpact01.ogg": "https://files.ballistica.net/cache/ba1/47/f1/58a6e673edfee76a535959ac574b", + "assets/build/ba_data/audio/spazImpact02.ogg": "https://files.ballistica.net/cache/ba1/1f/ca/ceb0cfe82f3269ecb595647d01f5", + "assets/build/ba_data/audio/spazImpact03.ogg": "https://files.ballistica.net/cache/ba1/7d/8a/6b5cb7d301808eb014a37e9b6d8f", + "assets/build/ba_data/audio/spazImpact04.ogg": "https://files.ballistica.net/cache/ba1/ad/32/6a3f980d5336cee41807efe6a9d6", + "assets/build/ba_data/audio/spazJump01.ogg": "https://files.ballistica.net/cache/ba1/77/b1/1478ab4c054f555d83f1a49d64b2", + "assets/build/ba_data/audio/spazJump02.ogg": "https://files.ballistica.net/cache/ba1/c3/70/f0acbf2c0916b2ac67b821c91372", + "assets/build/ba_data/audio/spazJump03.ogg": "https://files.ballistica.net/cache/ba1/cc/2c/66a30feb9b4781c8fbde12010ef5", + "assets/build/ba_data/audio/spazJump04.ogg": "https://files.ballistica.net/cache/ba1/91/83/cdcc15feadbd08dd4d899534ecf7", + "assets/build/ba_data/audio/spazOw.ogg": "https://files.ballistica.net/cache/ba1/1e/81/dc0302757a2d0ce8efbed226ce9e", + "assets/build/ba_data/audio/spazPickup01.ogg": "https://files.ballistica.net/cache/ba1/93/bf/c9b53b241bbec978c772c7e14caa", + "assets/build/ba_data/audio/spazScream01.ogg": "https://files.ballistica.net/cache/ba1/79/20/eb98e70397b0cd98149952753ef1", + "assets/build/ba_data/audio/splatter.ogg": "https://files.ballistica.net/cache/ba1/be/05/35059cebfb5658f7d434d32c94d1", + "assets/build/ba_data/audio/sportsMusic.ogg": "https://files.ballistica.net/cache/ba1/ff/cc/ba30edcc58ecc75ad4cf9f13e987", + "assets/build/ba_data/audio/stickyImpact.ogg": "https://files.ballistica.net/cache/ba1/5a/1c/bcfb5574c3ba2b8aec3d04d5937b", + "assets/build/ba_data/audio/superPunch.ogg": "https://files.ballistica.net/cache/ba1/ab/05/7ccdbb7ec4dc2da7e519644b7ab1", + "assets/build/ba_data/audio/superhero1.ogg": "https://files.ballistica.net/cache/ba1/2d/4b/d07a04dba349620a7b4f22e2340c", + "assets/build/ba_data/audio/superhero2.ogg": "https://files.ballistica.net/cache/ba1/35/b3/cf4479013786a22f2d378a998a15", + "assets/build/ba_data/audio/superhero3.ogg": "https://files.ballistica.net/cache/ba1/09/24/9aaf558d4eefad33845179b001f1", + "assets/build/ba_data/audio/superhero4.ogg": "https://files.ballistica.net/cache/ba1/3f/8e/219bab660637500a61f5be205b99", + "assets/build/ba_data/audio/superheroDeath.ogg": "https://files.ballistica.net/cache/ba1/d8/65/a0c7dc72b3a900ee3e9fc3a6c703", + "assets/build/ba_data/audio/superheroFall.ogg": "https://files.ballistica.net/cache/ba1/ba/21/c92b72275739cf682fe687fff10a", + "assets/build/ba_data/audio/superheroHit1.ogg": "https://files.ballistica.net/cache/ba1/fc/23/e15bb8d3e6daf77b4e393123d6f7", + "assets/build/ba_data/audio/superheroHit2.ogg": "https://files.ballistica.net/cache/ba1/f4/05/e2719c56ac77f3db1be03a0feac8", + "assets/build/ba_data/audio/survivalMusic.ogg": "https://files.ballistica.net/cache/ba1/69/45/5993fb4a9b6caba465feae60e3aa", + "assets/build/ba_data/audio/swip.ogg": "https://files.ballistica.net/cache/ba1/b2/fe/1a0796807eeb42160aeed59622f7", + "assets/build/ba_data/audio/swip2.ogg": "https://files.ballistica.net/cache/ba1/08/3d/12d4291235d240dd7e44dbe7f283", + "assets/build/ba_data/audio/swish.ogg": "https://files.ballistica.net/cache/ba1/33/41/3648e08fa50e2cf876f6ffa7fb3e", + "assets/build/ba_data/audio/swish2.ogg": "https://files.ballistica.net/cache/ba1/cc/67/8294681a9e9a88d055f33022a41f", + "assets/build/ba_data/audio/swish3.ogg": "https://files.ballistica.net/cache/ba1/06/35/7e03c8300a493d9c6ec4185b62fb", + "assets/build/ba_data/audio/tap.ogg": "https://files.ballistica.net/cache/ba1/30/7f/9f2a2aabfc63dfdb3e93106f3835", + "assets/build/ba_data/audio/technoHit01.ogg": "https://files.ballistica.net/cache/ba1/61/8a/d322dc58f7f41f34f2937a3879cf", + "assets/build/ba_data/audio/tick.ogg": "https://files.ballistica.net/cache/ba1/f5/cf/722bc46de90a550cab9ca11dd076", + "assets/build/ba_data/audio/ticking.ogg": "https://files.ballistica.net/cache/ba1/fb/55/55e5508fc180a67b2730d731856b", + "assets/build/ba_data/audio/tickingCrazy.ogg": "https://files.ballistica.net/cache/ba1/75/1c/43cea75988866fe0674883d70e08", + "assets/build/ba_data/audio/toTheDeathMusic.ogg": "https://files.ballistica.net/cache/ba1/ee/9a/9d2459da2a3fa0fbc977c639c5c6", + "assets/build/ba_data/audio/trashRummage.ogg": "https://files.ballistica.net/cache/ba1/ce/93/0e1b7d2155bcaccb585b3bcbf8b6", + "assets/build/ba_data/audio/victoryMusic.ogg": "https://files.ballistica.net/cache/ba1/6a/a7/0cf20971661de58dd3ee118856dc", + "assets/build/ba_data/audio/warnBeep.ogg": "https://files.ballistica.net/cache/ba1/51/ab/710c0882ab078f155ee574e124f4", + "assets/build/ba_data/audio/warnBeeps.ogg": "https://files.ballistica.net/cache/ba1/bc/b4/fed2b34f7ec47465b637b49e69fa", + "assets/build/ba_data/audio/warrior1.ogg": "https://files.ballistica.net/cache/ba1/fc/29/a88557dabe502eaa1f4e61e66050", + "assets/build/ba_data/audio/warrior2.ogg": "https://files.ballistica.net/cache/ba1/f1/37/cb391e6b920f278c5b007b381388", + "assets/build/ba_data/audio/warrior3.ogg": "https://files.ballistica.net/cache/ba1/8c/2e/d7c4c7a599a3a368f2d95f247127", + "assets/build/ba_data/audio/warrior4.ogg": "https://files.ballistica.net/cache/ba1/07/51/4796e3f9f9de9c5566740e951222", + "assets/build/ba_data/audio/warriorDeath.ogg": "https://files.ballistica.net/cache/ba1/d9/b6/c2e7f4a83928534e285f7ce1c922", + "assets/build/ba_data/audio/warriorFall.ogg": "https://files.ballistica.net/cache/ba1/2d/c5/ba39d507aa20f054feda013a9f21", + "assets/build/ba_data/audio/warriorHit1.ogg": "https://files.ballistica.net/cache/ba1/4f/83/1cbd4d2fb3e94e5e25979ed097ca", + "assets/build/ba_data/audio/warriorHit2.ogg": "https://files.ballistica.net/cache/ba1/be/ac/36bf2226134a7d319fd12fd6b28a", + "assets/build/ba_data/audio/whenJohnnyComesMarchingHomeMusic.ogg": "https://files.ballistica.net/cache/ba1/08/b1/21ee18cb2db336861c5a04d86f45", + "assets/build/ba_data/audio/witch1.ogg": "https://files.ballistica.net/cache/ba1/67/4e/05132bdb446fbdc1e1915089763b", + "assets/build/ba_data/audio/witch2.ogg": "https://files.ballistica.net/cache/ba1/57/a2/141d27861ab6a6177337d422e428", + "assets/build/ba_data/audio/witch3.ogg": "https://files.ballistica.net/cache/ba1/41/13/88fe3efdbc6b300ea74b8db0c816", + "assets/build/ba_data/audio/witch4.ogg": "https://files.ballistica.net/cache/ba1/1e/6a/67aaa75635a97116ca7bb5761051", + "assets/build/ba_data/audio/witchDeath.ogg": "https://files.ballistica.net/cache/ba1/22/33/2c7098263df931564f14815be5e8", + "assets/build/ba_data/audio/witchFall.ogg": "https://files.ballistica.net/cache/ba1/54/1c/d2de34a6985d56b469f10b7560ef", + "assets/build/ba_data/audio/witchHit1.ogg": "https://files.ballistica.net/cache/ba1/ae/24/430389e6bafba567a096b55228e6", + "assets/build/ba_data/audio/witchHit2.ogg": "https://files.ballistica.net/cache/ba1/c1/56/89955e8ab2fabaa5ff989bdf299e", + "assets/build/ba_data/audio/wizard1.ogg": "https://files.ballistica.net/cache/ba1/ff/6a/f81dc1a4656c6dffd1a36216d1b8", + "assets/build/ba_data/audio/wizard2.ogg": "https://files.ballistica.net/cache/ba1/52/43/f0e9af1d49b8d20bf561f8f9d3a9", + "assets/build/ba_data/audio/wizard3.ogg": "https://files.ballistica.net/cache/ba1/50/ba/716520f2f0137d8f86410a6089fb", + "assets/build/ba_data/audio/wizard4.ogg": "https://files.ballistica.net/cache/ba1/50/cc/2d239102cdc2ace02e79d8b0879c", + "assets/build/ba_data/audio/wizardDeath.ogg": "https://files.ballistica.net/cache/ba1/bb/4c/5e4dc54df830187c63a2bc7922b6", + "assets/build/ba_data/audio/wizardFall.ogg": "https://files.ballistica.net/cache/ba1/25/a5/21d69464843cb9f067541383468d", + "assets/build/ba_data/audio/wizardHit1.ogg": "https://files.ballistica.net/cache/ba1/10/47/be3966c620333be4ca9c30e1a2c4", + "assets/build/ba_data/audio/wizardHit2.ogg": "https://files.ballistica.net/cache/ba1/40/9a/0aed7b1bff3e69c257099ac26c1d", + "assets/build/ba_data/audio/woodDebrisFall.ogg": "https://files.ballistica.net/cache/ba1/94/03/59046559bc61e1e4b01078e778dd", + "assets/build/ba_data/audio/wrestler1.ogg": "https://files.ballistica.net/cache/ba1/52/71/c84d34f895c64d2fb38d880c737e", + "assets/build/ba_data/audio/wrestler2.ogg": "https://files.ballistica.net/cache/ba1/81/1f/c93c1b89d8d434fe84985d7d1af0", + "assets/build/ba_data/audio/wrestler3.ogg": "https://files.ballistica.net/cache/ba1/d8/2e/af82c6b47d77e9fa91b431ae03d1", + "assets/build/ba_data/audio/wrestler4.ogg": "https://files.ballistica.net/cache/ba1/7b/28/3aab8e16de76fc7453ed1e0886a8", + "assets/build/ba_data/audio/wrestlerDeath.ogg": "https://files.ballistica.net/cache/ba1/ae/b3/090c2525c3f697450a142458f6dc", + "assets/build/ba_data/audio/wrestlerFall.ogg": "https://files.ballistica.net/cache/ba1/1f/15/15fb12bb80fa7363b2ba88a4dce3", + "assets/build/ba_data/audio/wrestlerHit1.ogg": "https://files.ballistica.net/cache/ba1/90/b6/403ede16b60bdf089ce92079ef65", + "assets/build/ba_data/audio/wrestlerHit2.ogg": "https://files.ballistica.net/cache/ba1/d8/f7/4b4104842d9a408a9bb757cebabf", + "assets/build/ba_data/audio/zoeAttack01.ogg": "https://files.ballistica.net/cache/ba1/22/66/786bb399ac6bfc406f8fb0f6b3b4", + "assets/build/ba_data/audio/zoeAttack02.ogg": "https://files.ballistica.net/cache/ba1/37/42/60be96146c62bb29b10efae99fbe", + "assets/build/ba_data/audio/zoeAttack03.ogg": "https://files.ballistica.net/cache/ba1/0d/1f/9a71c8ce2aa31ffc2bdaa3341aed", + "assets/build/ba_data/audio/zoeAttack04.ogg": "https://files.ballistica.net/cache/ba1/52/e2/97d0299a564d2b7454fb742d5aab", + "assets/build/ba_data/audio/zoeDeath01.ogg": "https://files.ballistica.net/cache/ba1/fa/aa/f622e55e348e145955e27a4c3e57", + "assets/build/ba_data/audio/zoeEff.ogg": "https://files.ballistica.net/cache/ba1/42/c3/0bf8991471b650a1d2cd320c5ce3", + "assets/build/ba_data/audio/zoeFall01.ogg": "https://files.ballistica.net/cache/ba1/9e/12/ce19febfcbf2b43eb733dbd1626b", + "assets/build/ba_data/audio/zoeImpact01.ogg": "https://files.ballistica.net/cache/ba1/01/8c/90ab117e9c73fc33d556d18b079a", + "assets/build/ba_data/audio/zoeImpact02.ogg": "https://files.ballistica.net/cache/ba1/01/69/21c09400f109285b9d8cb8814d69", + "assets/build/ba_data/audio/zoeImpact03.ogg": "https://files.ballistica.net/cache/ba1/61/72/5bf11492feba95994f75040e36ce", + "assets/build/ba_data/audio/zoeImpact04.ogg": "https://files.ballistica.net/cache/ba1/c1/b1/a1159e8caeb1f5b80fcff55e8244", + "assets/build/ba_data/audio/zoeJump01.ogg": "https://files.ballistica.net/cache/ba1/b1/f0/5220fdb723a42e9177a99f9f5bdc", + "assets/build/ba_data/audio/zoeJump02.ogg": "https://files.ballistica.net/cache/ba1/71/01/4b2e5d9e2fcdfba254290c71a002", + "assets/build/ba_data/audio/zoeJump03.ogg": "https://files.ballistica.net/cache/ba1/66/3b/8ffff9c3d0280b7d1a15c92dfa94", + "assets/build/ba_data/audio/zoeOw.ogg": "https://files.ballistica.net/cache/ba1/60/ad/38269b7f1c7dc20cb9a506cd0681", + "assets/build/ba_data/audio/zoePickup01.ogg": "https://files.ballistica.net/cache/ba1/72/85/d6fc4d16b7081d91fba2850b5b10", + "assets/build/ba_data/audio/zoeScream01.ogg": "https://files.ballistica.net/cache/ba1/e9/ae/1d674d0c086eaa0bd1c3b1db0505", "assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/e8/42/a43c158be7fa45f2c0c3d4b84a1f", "assets/build/ba_data/data/languages/arabic.json": "https://files.ballistica.net/cache/ba1/5b/cf/4501b151257c3d8d6ee8d0497d14", "assets/build/ba_data/data/languages/belarussian.json": "https://files.ballistica.net/cache/ba1/61/03/89070ca765e06da3a419a579f503", @@ -1073,7 +1073,7 @@ "assets/build/ba_data/textures/actionHeroColor.dds": "https://files.ballistica.net/cache/ba1/62/91/355fa26219c26750e46ad358dbc7", "assets/build/ba_data/textures/actionHeroColor.ktx": "https://files.ballistica.net/cache/ba1/01/ce/95415b6b29f60015900b2f33db42", "assets/build/ba_data/textures/actionHeroColor.pvr": "https://files.ballistica.net/cache/ba1/0d/03/832309d85531d4be991b6f7a9107", - "assets/build/ba_data/textures/actionHeroColorMask.dds": "https://files.ballistica.net/cache/ba1/7d/8d/5b94b6e589f7f67ecc310e2cfa3c", + "assets/build/ba_data/textures/actionHeroColorMask.dds": "https://files.ballistica.net/cache/ba1/5c/c0/7f52de795a1f08ffa72030cf9178", "assets/build/ba_data/textures/actionHeroColorMask.ktx": "https://files.ballistica.net/cache/ba1/07/ed/6791e01ac69bb61cdffade59808f", "assets/build/ba_data/textures/actionHeroColorMask.pvr": "https://files.ballistica.net/cache/ba1/22/40/d50cbe4fa13a3294638bb1b42c72", "assets/build/ba_data/textures/actionHeroColorMask_preview.png": "https://files.ballistica.net/cache/ba1/83/2f/9a009e8f2cc9b956043511db105c", @@ -1090,15 +1090,15 @@ "assets/build/ba_data/textures/advancedIcon.ktx": "https://files.ballistica.net/cache/ba1/87/6d/1758aaf14120f6c418e2ecdb410f", "assets/build/ba_data/textures/advancedIcon.pvr": "https://files.ballistica.net/cache/ba1/39/00/237c07cd4a239ca69f90ba571e07", "assets/build/ba_data/textures/advancedIcon_preview.png": "https://files.ballistica.net/cache/ba1/21/d5/3a3a834112b84befe910c15df2b6", - "assets/build/ba_data/textures/agentColor.dds": "https://files.ballistica.net/cache/ba1/17/c2/2a9cc0d3c88e048cce4e75880328", + "assets/build/ba_data/textures/agentColor.dds": "https://files.ballistica.net/cache/ba1/05/19/15d35284e062e8d037dfece71af5", "assets/build/ba_data/textures/agentColor.ktx": "https://files.ballistica.net/cache/ba1/ff/8a/3e375971f932cba1e4c8800129e8", "assets/build/ba_data/textures/agentColor.pvr": "https://files.ballistica.net/cache/ba1/f8/3a/438fae77e7ad607345ff883c272d", - "assets/build/ba_data/textures/agentColorMask.dds": "https://files.ballistica.net/cache/ba1/4f/ab/db5c3baed96dbec309c33ca13258", + "assets/build/ba_data/textures/agentColorMask.dds": "https://files.ballistica.net/cache/ba1/dc/b1/a5a98e27864377a91452abcfba66", "assets/build/ba_data/textures/agentColorMask.ktx": "https://files.ballistica.net/cache/ba1/64/9a/255eeabf2f4a5626d478b41f2268", "assets/build/ba_data/textures/agentColorMask.pvr": "https://files.ballistica.net/cache/ba1/6a/d2/7a311a8525c02f7c8edb974e9651", "assets/build/ba_data/textures/agentColorMask_preview.png": "https://files.ballistica.net/cache/ba1/78/ec/c4ddf22b95d893fa467412334ff5", "assets/build/ba_data/textures/agentColor_preview.png": "https://files.ballistica.net/cache/ba1/9f/1b/1c128a69900d438c220ca7885dc7", - "assets/build/ba_data/textures/agentIcon.dds": "https://files.ballistica.net/cache/ba1/64/37/c020b7e02cf7a7b90eec2e094395", + "assets/build/ba_data/textures/agentIcon.dds": "https://files.ballistica.net/cache/ba1/b4/ea/bc2ed456f6536711e03d292121fa", "assets/build/ba_data/textures/agentIcon.ktx": "https://files.ballistica.net/cache/ba1/eb/1e/e73199f7c33e9002e92fe363a23b", "assets/build/ba_data/textures/agentIcon.pvr": "https://files.ballistica.net/cache/ba1/5e/2d/e18e2133517fdcc8cb7ac28b31a8", "assets/build/ba_data/textures/agentIconColorMask.dds": "https://files.ballistica.net/cache/ba1/b1/9a/ecb2300afababd460ca4bae36d96", @@ -1106,11 +1106,11 @@ "assets/build/ba_data/textures/agentIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/22/24/8aadc852761e3f2c0fbf9d2f025a", "assets/build/ba_data/textures/agentIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/e2/02/85032b1257accbb85ad1904018ef", "assets/build/ba_data/textures/agentIcon_preview.png": "https://files.ballistica.net/cache/ba1/49/70/68d243aeff2de4e474e9a22ee6ef", - "assets/build/ba_data/textures/aliBSRemoteIOSQR.dds": "https://files.ballistica.net/cache/ba1/32/c7/d95e248a28236f7495f285a9e65f", + "assets/build/ba_data/textures/aliBSRemoteIOSQR.dds": "https://files.ballistica.net/cache/ba1/b7/69/9c4a96ceb3f84c6670355cac136d", "assets/build/ba_data/textures/aliBSRemoteIOSQR.ktx": "https://files.ballistica.net/cache/ba1/10/a6/2cc21c0bae6eb45208974d8b1f60", "assets/build/ba_data/textures/aliBSRemoteIOSQR.pvr": "https://files.ballistica.net/cache/ba1/56/8f/3f31426a93b70d4c1c7c54050473", "assets/build/ba_data/textures/aliBSRemoteIOSQR_preview.png": "https://files.ballistica.net/cache/ba1/96/d8/d37b845efc618616a8e1fd0dd04b", - "assets/build/ba_data/textures/aliColor.dds": "https://files.ballistica.net/cache/ba1/d8/6d/edff4cac631ca75db279ccfb1399", + "assets/build/ba_data/textures/aliColor.dds": "https://files.ballistica.net/cache/ba1/54/17/1d3b7c4d9577908ed773ad11dad2", "assets/build/ba_data/textures/aliColor.ktx": "https://files.ballistica.net/cache/ba1/ed/f3/3005b276e2b231be8170102c1cd7", "assets/build/ba_data/textures/aliColor.pvr": "https://files.ballistica.net/cache/ba1/f3/bd/2c82648f6ef242ca4b34fd278629", "assets/build/ba_data/textures/aliColorMask.dds": "https://files.ballistica.net/cache/ba1/68/bb/c7db9f1886a6d3fd5cdb308f3cef", @@ -1118,14 +1118,14 @@ "assets/build/ba_data/textures/aliColorMask.pvr": "https://files.ballistica.net/cache/ba1/31/2a/ddb2a68bdfb3b175be2d3d6bcade", "assets/build/ba_data/textures/aliColorMask_preview.png": "https://files.ballistica.net/cache/ba1/3b/05/0dd47cdf3a3ac437e5e276f5fd86", "assets/build/ba_data/textures/aliColor_preview.png": "https://files.ballistica.net/cache/ba1/cb/93/d9230bee0324b2eec4bb8519dae3", - "assets/build/ba_data/textures/aliControllerQR.dds": "https://files.ballistica.net/cache/ba1/68/f4/742194ee422ce66e9c0c4c7a2c66", + "assets/build/ba_data/textures/aliControllerQR.dds": "https://files.ballistica.net/cache/ba1/55/0a/44ecb9f5cf4e5c02b83089d0d13b", "assets/build/ba_data/textures/aliControllerQR.ktx": "https://files.ballistica.net/cache/ba1/56/50/6d84e5b788b25b4e7275d20ce635", "assets/build/ba_data/textures/aliControllerQR.pvr": "https://files.ballistica.net/cache/ba1/22/8d/34c3d66662866cc806c81ee13517", "assets/build/ba_data/textures/aliControllerQR_preview.png": "https://files.ballistica.net/cache/ba1/59/83/a2dce8f9ec55f87cf450813a31c1", - "assets/build/ba_data/textures/aliIcon.dds": "https://files.ballistica.net/cache/ba1/a0/a6/f4fc06a5e3967f1cfc35eb627706", + "assets/build/ba_data/textures/aliIcon.dds": "https://files.ballistica.net/cache/ba1/bf/c9/ad39ef333825bbd5d6f5462d1a11", "assets/build/ba_data/textures/aliIcon.ktx": "https://files.ballistica.net/cache/ba1/d1/ee/7c1c37d57cdb70d854ecdfb235ed", "assets/build/ba_data/textures/aliIcon.pvr": "https://files.ballistica.net/cache/ba1/b6/04/931fbed4b2a9c75ae7745a88ed40", - "assets/build/ba_data/textures/aliIconColorMask.dds": "https://files.ballistica.net/cache/ba1/64/09/2fdf334c8cb3661bdbecdd2d2dd4", + "assets/build/ba_data/textures/aliIconColorMask.dds": "https://files.ballistica.net/cache/ba1/58/bc/04f52451d42f051acb8409ab965b", "assets/build/ba_data/textures/aliIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/78/89/c3e95a7c3794e4c86ece540aa3a3", "assets/build/ba_data/textures/aliIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/7a/81/d269ece740203c2e1a9a3c9523af", "assets/build/ba_data/textures/aliIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/0f/8d/203f6ec0ff5a8dd380330a0f3853", @@ -1137,7 +1137,7 @@ "assets/build/ba_data/textures/alienColor.dds": "https://files.ballistica.net/cache/ba1/b3/63/1ec79e210306f871f4d24b7a005e", "assets/build/ba_data/textures/alienColor.ktx": "https://files.ballistica.net/cache/ba1/97/fe/96c9ab440866a08d2510109eaaff", "assets/build/ba_data/textures/alienColor.pvr": "https://files.ballistica.net/cache/ba1/39/dc/bb457bc12cd61482e2c7edfa457c", - "assets/build/ba_data/textures/alienColorMask.dds": "https://files.ballistica.net/cache/ba1/12/8c/4b32a6cb77e2d4b840b7fd19ec8a", + "assets/build/ba_data/textures/alienColorMask.dds": "https://files.ballistica.net/cache/ba1/ce/51/a41c4af1205bd33dc8647898e4b6", "assets/build/ba_data/textures/alienColorMask.ktx": "https://files.ballistica.net/cache/ba1/a7/3e/7759a1566e2dacd35c0a23304fc7", "assets/build/ba_data/textures/alienColorMask.pvr": "https://files.ballistica.net/cache/ba1/70/70/49e327a70992f6f2cd57a69e182b", "assets/build/ba_data/textures/alienColorMask_preview.png": "https://files.ballistica.net/cache/ba1/6a/7c/7e2fe077f46778b639b58d533ef8", @@ -1150,15 +1150,15 @@ "assets/build/ba_data/textures/alienIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/0b/8a/54fa4a11a7d066ff0cbc6c741451", "assets/build/ba_data/textures/alienIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/55/bc/686e349c8557f232c6404bc22371", "assets/build/ba_data/textures/alienIcon_preview.png": "https://files.ballistica.net/cache/ba1/4c/c9/12ab7e3cf9f1af93c608ce1bcefb", - "assets/build/ba_data/textures/alwaysLandBGColor.dds": "https://files.ballistica.net/cache/ba1/3e/1e/ee38b7626761d3ead1f2fec82070", + "assets/build/ba_data/textures/alwaysLandBGColor.dds": "https://files.ballistica.net/cache/ba1/88/d6/3afdd31b573a08eb0cf3771f86bb", "assets/build/ba_data/textures/alwaysLandBGColor.ktx": "https://files.ballistica.net/cache/ba1/5a/80/c2ff48e9f0f3e549f105e926dd3d", "assets/build/ba_data/textures/alwaysLandBGColor.pvr": "https://files.ballistica.net/cache/ba1/2d/c0/c236df146c22606a3d290139e5b3", "assets/build/ba_data/textures/alwaysLandBGColor_preview.png": "https://files.ballistica.net/cache/ba1/59/9c/933c8322bf93c02968e6f440ae59", - "assets/build/ba_data/textures/alwaysLandLevelColor.dds": "https://files.ballistica.net/cache/ba1/8a/5e/a2d2c01be327dd3fc34e46706b43", + "assets/build/ba_data/textures/alwaysLandLevelColor.dds": "https://files.ballistica.net/cache/ba1/1e/da/7e0f8f4f82a9728a9996fe4b76bc", "assets/build/ba_data/textures/alwaysLandLevelColor.ktx": "https://files.ballistica.net/cache/ba1/13/bd/5458fc8068b06a20ec00d2e35c2e", "assets/build/ba_data/textures/alwaysLandLevelColor.pvr": "https://files.ballistica.net/cache/ba1/29/12/7c1b247f977a20c2d70069f95787", "assets/build/ba_data/textures/alwaysLandLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/4a/61/15580dd303e1682c7c2f63e890da", - "assets/build/ba_data/textures/alwaysLandPreview.dds": "https://files.ballistica.net/cache/ba1/36/6c/c1c4fcc4464359de5403244d3e30", + "assets/build/ba_data/textures/alwaysLandPreview.dds": "https://files.ballistica.net/cache/ba1/de/5e/62854d25f37a4f2151716dcbb5e0", "assets/build/ba_data/textures/alwaysLandPreview.ktx": "https://files.ballistica.net/cache/ba1/44/1b/8985da2a7c0670089ec086237de2", "assets/build/ba_data/textures/alwaysLandPreview.pvr": "https://files.ballistica.net/cache/ba1/8b/bb/db84d43e0acd251940d39ad52622", "assets/build/ba_data/textures/alwaysLandPreview_preview.png": "https://files.ballistica.net/cache/ba1/c7/6d/d633bbe5ad1fb1478a49cc51f702", @@ -1173,7 +1173,7 @@ "assets/build/ba_data/textures/assassinColor.dds": "https://files.ballistica.net/cache/ba1/74/4c/15d8400e13ddef0e6712bf52dd6e", "assets/build/ba_data/textures/assassinColor.ktx": "https://files.ballistica.net/cache/ba1/77/1e/340bae7b1759427c0cf4ef6f200a", "assets/build/ba_data/textures/assassinColor.pvr": "https://files.ballistica.net/cache/ba1/88/27/2a6734a37b350a8fe9d4313169ae", - "assets/build/ba_data/textures/assassinColorMask.dds": "https://files.ballistica.net/cache/ba1/e2/e5/dc0bcae56faf7203eda79a9397d0", + "assets/build/ba_data/textures/assassinColorMask.dds": "https://files.ballistica.net/cache/ba1/b9/72/87c5ff1b72de68f5751140508d0e", "assets/build/ba_data/textures/assassinColorMask.ktx": "https://files.ballistica.net/cache/ba1/52/6b/126ba01cd6e6f883e0a6695aec9c", "assets/build/ba_data/textures/assassinColorMask.pvr": "https://files.ballistica.net/cache/ba1/c0/2c/5b137a905b0719022101f82f581d", "assets/build/ba_data/textures/assassinColorMask_preview.png": "https://files.ballistica.net/cache/ba1/b0/c5/cb9321a0aca799d83159479d602c", @@ -1198,7 +1198,7 @@ "assets/build/ba_data/textures/bar.ktx": "https://files.ballistica.net/cache/ba1/69/25/7c811b9c7e77e6c7d1df1a047991", "assets/build/ba_data/textures/bar.pvr": "https://files.ballistica.net/cache/ba1/1c/b7/605cdb8193d4190f3a90a173cc90", "assets/build/ba_data/textures/bar_preview.png": "https://files.ballistica.net/cache/ba1/b6/63/94b82a98ae1305b0f6b57fe32e8b", - "assets/build/ba_data/textures/bearColor.dds": "https://files.ballistica.net/cache/ba1/8d/13/f83d6f1249673ad7ba10996d0ac8", + "assets/build/ba_data/textures/bearColor.dds": "https://files.ballistica.net/cache/ba1/e3/9a/f6b129a0fe2933fb23643e71d9ef", "assets/build/ba_data/textures/bearColor.ktx": "https://files.ballistica.net/cache/ba1/62/fc/be9341da4cfa66a8ce63807a3a8e", "assets/build/ba_data/textures/bearColor.pvr": "https://files.ballistica.net/cache/ba1/c3/f7/1773a5033ab0a6689d01e0683a63", "assets/build/ba_data/textures/bearColorMask.dds": "https://files.ballistica.net/cache/ba1/38/04/166ea3d73ed0af9b285db1b7e6c0", @@ -1209,19 +1209,19 @@ "assets/build/ba_data/textures/bearIcon.dds": "https://files.ballistica.net/cache/ba1/cd/80/163ac24028fd5d8ce484040d4176", "assets/build/ba_data/textures/bearIcon.ktx": "https://files.ballistica.net/cache/ba1/01/f7/c2ef1c82862e74f74386c6341cb8", "assets/build/ba_data/textures/bearIcon.pvr": "https://files.ballistica.net/cache/ba1/87/83/c856c8fb48ba9d7a7fd9869746f2", - "assets/build/ba_data/textures/bearIconColorMask.dds": "https://files.ballistica.net/cache/ba1/60/b8/634304bf7f29d239d63dd89ce96b", + "assets/build/ba_data/textures/bearIconColorMask.dds": "https://files.ballistica.net/cache/ba1/78/c9/123f72ce037631bb8f1906b8fd92", "assets/build/ba_data/textures/bearIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/ad/75/804e6901f09e75348f1d480c5ae8", "assets/build/ba_data/textures/bearIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/ce/23/1fd7ce03b72db0dc6b3903d8146f", "assets/build/ba_data/textures/bearIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/72/1c/9775c5e7acec13a491299b998703", "assets/build/ba_data/textures/bearIcon_preview.png": "https://files.ballistica.net/cache/ba1/d9/d2/b74a4de7ca068c378d78c745331b", - "assets/build/ba_data/textures/bg.dds": "https://files.ballistica.net/cache/ba1/2e/60/a4e78e526ace713727738e3a5587", + "assets/build/ba_data/textures/bg.dds": "https://files.ballistica.net/cache/ba1/92/e3/7beb6a9b50408b92e02a94965664", "assets/build/ba_data/textures/bg.ktx": "https://files.ballistica.net/cache/ba1/97/6c/b965850bfa25cf9db805b921d291", "assets/build/ba_data/textures/bg.pvr": "https://files.ballistica.net/cache/ba1/11/84/be878cc8fbe77a3ffdb4cd4ce125", "assets/build/ba_data/textures/bg_preview.png": "https://files.ballistica.net/cache/ba1/6a/77/7613140be4610b02dcb0372111ed", - "assets/build/ba_data/textures/bigG.dds": "https://files.ballistica.net/cache/ba1/2e/74/5d1c4fe9f920a291846c62c7d65e", + "assets/build/ba_data/textures/bigG.dds": "https://files.ballistica.net/cache/ba1/49/34/fe6162a12af04927e4c3489dcfff", "assets/build/ba_data/textures/bigG.ktx": "https://files.ballistica.net/cache/ba1/df/1c/526de060409ebbd5235592943e94", "assets/build/ba_data/textures/bigG.pvr": "https://files.ballistica.net/cache/ba1/41/82/532ef83baefbde887504c11ce140", - "assets/build/ba_data/textures/bigGPreview.dds": "https://files.ballistica.net/cache/ba1/93/0e/842e2e3a11f71802c81a5de450a6", + "assets/build/ba_data/textures/bigGPreview.dds": "https://files.ballistica.net/cache/ba1/2b/1c/8fb6a40e7e08419473d22e23cfcc", "assets/build/ba_data/textures/bigGPreview.ktx": "https://files.ballistica.net/cache/ba1/4a/28/d3c6f8ad9f0c65cd7a422d9177dd", "assets/build/ba_data/textures/bigGPreview.pvr": "https://files.ballistica.net/cache/ba1/4f/b4/9b4069351815040b2af7c4c9b498", "assets/build/ba_data/textures/bigGPreview_preview.png": "https://files.ballistica.net/cache/ba1/4b/24/f4b442bc8ed68d6f3f740ffb19fd", @@ -1237,16 +1237,16 @@ "assets/build/ba_data/textures/bombColor.dds": "https://files.ballistica.net/cache/ba1/5e/2b/492e68d77e6be9d6399e49435a8d", "assets/build/ba_data/textures/bombColor.ktx": "https://files.ballistica.net/cache/ba1/bc/9f/c7a76334cf56bb0bb93d1f720b40", "assets/build/ba_data/textures/bombColor.pvr": "https://files.ballistica.net/cache/ba1/c7/bb/89159008de3b624bcb90b3c25568", - "assets/build/ba_data/textures/bombColorIce.dds": "https://files.ballistica.net/cache/ba1/27/d6/7790056abb3e73e7ffd01920dfb8", + "assets/build/ba_data/textures/bombColorIce.dds": "https://files.ballistica.net/cache/ba1/ab/ed/3f5a8f9f2fb8d1e60f34f1f1701b", "assets/build/ba_data/textures/bombColorIce.ktx": "https://files.ballistica.net/cache/ba1/4b/2d/c8cfa1990fa1f211de36679a3665", "assets/build/ba_data/textures/bombColorIce.pvr": "https://files.ballistica.net/cache/ba1/71/aa/3127d32782835de9fa0fab8c7395", "assets/build/ba_data/textures/bombColorIce_preview.png": "https://files.ballistica.net/cache/ba1/ec/3a/96b5191c5e7662be273c311fa826", "assets/build/ba_data/textures/bombColor_preview.png": "https://files.ballistica.net/cache/ba1/a5/65/878c8aa7876031426f5adf3aeb79", - "assets/build/ba_data/textures/bombStickyColor.dds": "https://files.ballistica.net/cache/ba1/b9/54/8e1dc631ecdb5a045441e96ea2e9", + "assets/build/ba_data/textures/bombStickyColor.dds": "https://files.ballistica.net/cache/ba1/c2/2d/cf8b630173546f03926c56258724", "assets/build/ba_data/textures/bombStickyColor.ktx": "https://files.ballistica.net/cache/ba1/be/83/f3b7ca04ca377e2df7359784d6cf", "assets/build/ba_data/textures/bombStickyColor.pvr": "https://files.ballistica.net/cache/ba1/14/a3/90a633e9edd9f826d89d2f610a0d", "assets/build/ba_data/textures/bombStickyColor_preview.png": "https://files.ballistica.net/cache/ba1/c0/98/05587d954ce791ba5caa41af943f", - "assets/build/ba_data/textures/bonesColor.dds": "https://files.ballistica.net/cache/ba1/31/d5/90d0088aa8435ff2eb9c3b79ebc0", + "assets/build/ba_data/textures/bonesColor.dds": "https://files.ballistica.net/cache/ba1/02/23/f9f6293644faaff5d3fe2f49408f", "assets/build/ba_data/textures/bonesColor.ktx": "https://files.ballistica.net/cache/ba1/51/24/beed81e702c15d04b4f94388a328", "assets/build/ba_data/textures/bonesColor.pvr": "https://files.ballistica.net/cache/ba1/84/85/d3822cbf93732d312b64dd0d2b26", "assets/build/ba_data/textures/bonesColorMask.dds": "https://files.ballistica.net/cache/ba1/9e/57/bc0c41cf259d94e11814170d0137", @@ -1266,7 +1266,7 @@ "assets/build/ba_data/textures/boxingGlovesColor.ktx": "https://files.ballistica.net/cache/ba1/9c/c1/fcb445a18de7bb2adb9c93644840", "assets/build/ba_data/textures/boxingGlovesColor.pvr": "https://files.ballistica.net/cache/ba1/93/a9/c6d48979dc6c72c70f5c39ccabff", "assets/build/ba_data/textures/boxingGlovesColor_preview.png": "https://files.ballistica.net/cache/ba1/75/d2/6056b445e3c8da206f4d7574c623", - "assets/build/ba_data/textures/bridgitLevelColor.dds": "https://files.ballistica.net/cache/ba1/04/af/6c34a515c1e52a5f9c4303683853", + "assets/build/ba_data/textures/bridgitLevelColor.dds": "https://files.ballistica.net/cache/ba1/91/ab/184a0bbeba1c1bb79d28168709be", "assets/build/ba_data/textures/bridgitLevelColor.ktx": "https://files.ballistica.net/cache/ba1/30/08/4f5fec91381abc98c3382763cad9", "assets/build/ba_data/textures/bridgitLevelColor.pvr": "https://files.ballistica.net/cache/ba1/6f/89/65a75daf364c9f3aec77c73bc343", "assets/build/ba_data/textures/bridgitLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/c9/fd/7e9daa40ebce9e08d2daf07aef49", @@ -1274,7 +1274,7 @@ "assets/build/ba_data/textures/bridgitPreview.ktx": "https://files.ballistica.net/cache/ba1/d4/d9/6f936f48e988e335ee1949c2219d", "assets/build/ba_data/textures/bridgitPreview.pvr": "https://files.ballistica.net/cache/ba1/51/18/4716016fd0d40a0bb94cdac9c627", "assets/build/ba_data/textures/bridgitPreview_preview.png": "https://files.ballistica.net/cache/ba1/c8/77/01fcaf507ca7c4575a76bff62ff0", - "assets/build/ba_data/textures/bunnyColor.dds": "https://files.ballistica.net/cache/ba1/9e/30/d07e0031093130e6cbc23a135e45", + "assets/build/ba_data/textures/bunnyColor.dds": "https://files.ballistica.net/cache/ba1/fc/32/5452de45237f804355667a2584ba", "assets/build/ba_data/textures/bunnyColor.ktx": "https://files.ballistica.net/cache/ba1/52/88/9b31fa2ce14ef7b98631cb36e769", "assets/build/ba_data/textures/bunnyColor.pvr": "https://files.ballistica.net/cache/ba1/6b/33/e48393656bbbf7a146d4e246fdc9", "assets/build/ba_data/textures/bunnyColorMask.dds": "https://files.ballistica.net/cache/ba1/b8/f2/7570c919e1f06c66c7236524d53f", @@ -1282,7 +1282,7 @@ "assets/build/ba_data/textures/bunnyColorMask.pvr": "https://files.ballistica.net/cache/ba1/db/91/d3ad07cabd17cffa0d9591532477", "assets/build/ba_data/textures/bunnyColorMask_preview.png": "https://files.ballistica.net/cache/ba1/72/b8/27c36d27c73d19f496f955fa50e2", "assets/build/ba_data/textures/bunnyColor_preview.png": "https://files.ballistica.net/cache/ba1/cb/f2/861b06f9154cd59a8e20802a0875", - "assets/build/ba_data/textures/bunnyIcon.dds": "https://files.ballistica.net/cache/ba1/3a/8c/c4615ce15d075e64da5768272ee7", + "assets/build/ba_data/textures/bunnyIcon.dds": "https://files.ballistica.net/cache/ba1/ca/2e/0352302668a840b50cf83b7d69b3", "assets/build/ba_data/textures/bunnyIcon.ktx": "https://files.ballistica.net/cache/ba1/da/92/e1ce1ba464ffc9ce57bfe87dd792", "assets/build/ba_data/textures/bunnyIcon.pvr": "https://files.ballistica.net/cache/ba1/6e/03/4848e2435ac4f9938a98a7adaf25", "assets/build/ba_data/textures/bunnyIconColorMask.dds": "https://files.ballistica.net/cache/ba1/d2/5d/7427e249e21960ab7f5e738f833d", @@ -1353,14 +1353,14 @@ "assets/build/ba_data/textures/circle.dds": "https://files.ballistica.net/cache/ba1/88/a6/c2e3db7c1c6aab2ad9b05d7074b4", "assets/build/ba_data/textures/circle.ktx": "https://files.ballistica.net/cache/ba1/85/cd/0d9bd306a8f91a9ed661f99529b2", "assets/build/ba_data/textures/circle.pvr": "https://files.ballistica.net/cache/ba1/3a/a2/d61927bc0770e37848ddd6712876", - "assets/build/ba_data/textures/circleNoAlpha.dds": "https://files.ballistica.net/cache/ba1/e9/c1/6af34d954867f725dbb7c63026f1", + "assets/build/ba_data/textures/circleNoAlpha.dds": "https://files.ballistica.net/cache/ba1/90/8b/7c1942e8bd58a3f2f20fc4be7173", "assets/build/ba_data/textures/circleNoAlpha.ktx": "https://files.ballistica.net/cache/ba1/e4/83/17f847e9f832201929a30f1ea535", "assets/build/ba_data/textures/circleNoAlpha.pvr": "https://files.ballistica.net/cache/ba1/23/d1/6d053de8f4ab7871c3275920cf18", "assets/build/ba_data/textures/circleNoAlpha_preview.png": "https://files.ballistica.net/cache/ba1/5c/9d/0ffc70edd5440cea9d5b22810aa2", "assets/build/ba_data/textures/circleOutline.dds": "https://files.ballistica.net/cache/ba1/a4/c2/e0a5bf011be78509dbef899b8f28", "assets/build/ba_data/textures/circleOutline.ktx": "https://files.ballistica.net/cache/ba1/ce/91/5fe4f6f2ade655564632f78ddb32", "assets/build/ba_data/textures/circleOutline.pvr": "https://files.ballistica.net/cache/ba1/df/7a/6de156c06892d833f7ebd264e772", - "assets/build/ba_data/textures/circleOutlineNoAlpha.dds": "https://files.ballistica.net/cache/ba1/86/32/c8fe0fbf2003b7883216b19984fa", + "assets/build/ba_data/textures/circleOutlineNoAlpha.dds": "https://files.ballistica.net/cache/ba1/60/0e/c7d019fe5cd651e26967c97c4969", "assets/build/ba_data/textures/circleOutlineNoAlpha.ktx": "https://files.ballistica.net/cache/ba1/3d/19/19c290ceb02d8d41740c864e7793", "assets/build/ba_data/textures/circleOutlineNoAlpha.pvr": "https://files.ballistica.net/cache/ba1/b0/56/02950e983c0fb55e9bc491b8860c", "assets/build/ba_data/textures/circleOutlineNoAlpha_preview.png": "https://files.ballistica.net/cache/ba1/fc/b5/7d4368c1ff5655ecd7b22234cf54", @@ -1382,18 +1382,18 @@ "assets/build/ba_data/textures/controllerIcon.ktx": "https://files.ballistica.net/cache/ba1/14/16/a15ad29481944559f81f54fdfe20", "assets/build/ba_data/textures/controllerIcon.pvr": "https://files.ballistica.net/cache/ba1/fe/01/befdbde27b052c35d3b12d80e80f", "assets/build/ba_data/textures/controllerIcon_preview.png": "https://files.ballistica.net/cache/ba1/59/a5/1465197ee1267ba0e0b25c43d80f", - "assets/build/ba_data/textures/courtyardLevelColor.dds": "https://files.ballistica.net/cache/ba1/46/f5/b4e9bdd3e30776884339293408eb", + "assets/build/ba_data/textures/courtyardLevelColor.dds": "https://files.ballistica.net/cache/ba1/b2/e1/fb40e54fac2969cbaa71682af9ce", "assets/build/ba_data/textures/courtyardLevelColor.ktx": "https://files.ballistica.net/cache/ba1/bd/56/4b6d7c0144fc37f99f35c52ab009", "assets/build/ba_data/textures/courtyardLevelColor.pvr": "https://files.ballistica.net/cache/ba1/77/97/bf195499e7e18777f02bb87061d7", "assets/build/ba_data/textures/courtyardLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/91/bf/617c0d77529aa079200fdf75173d", - "assets/build/ba_data/textures/courtyardPreview.dds": "https://files.ballistica.net/cache/ba1/52/e5/cfdaab9a05d3f5706c7e5be114a1", + "assets/build/ba_data/textures/courtyardPreview.dds": "https://files.ballistica.net/cache/ba1/cf/c7/5e5a25f7b6b1c0840d66d203e030", "assets/build/ba_data/textures/courtyardPreview.ktx": "https://files.ballistica.net/cache/ba1/58/1c/ceeccf17dd5f3f1beb9af1ab720a", "assets/build/ba_data/textures/courtyardPreview.pvr": "https://files.ballistica.net/cache/ba1/a4/e8/9f1afe13ee2ebb9f6754a5f00f26", "assets/build/ba_data/textures/courtyardPreview_preview.png": "https://files.ballistica.net/cache/ba1/cb/40/06faf314dd35177a6d0e2a041bb7", "assets/build/ba_data/textures/cowboyColor.dds": "https://files.ballistica.net/cache/ba1/a4/49/f004e03fe36543d89dd8d1a6ed7f", "assets/build/ba_data/textures/cowboyColor.ktx": "https://files.ballistica.net/cache/ba1/00/30/f2ae84970bd0697725b821f2f152", "assets/build/ba_data/textures/cowboyColor.pvr": "https://files.ballistica.net/cache/ba1/45/1a/5bbcf702a33fd48e2b9a7016323f", - "assets/build/ba_data/textures/cowboyColorMask.dds": "https://files.ballistica.net/cache/ba1/bd/6a/6158fd65af4641bcd936045005a2", + "assets/build/ba_data/textures/cowboyColorMask.dds": "https://files.ballistica.net/cache/ba1/52/2f/874896a060d55f6498656cb8ba1d", "assets/build/ba_data/textures/cowboyColorMask.ktx": "https://files.ballistica.net/cache/ba1/51/68/9145727dc989afded72318e673c7", "assets/build/ba_data/textures/cowboyColorMask.pvr": "https://files.ballistica.net/cache/ba1/69/44/41ab993ebfc0a1aa32e431582fb4", "assets/build/ba_data/textures/cowboyColorMask_preview.png": "https://files.ballistica.net/cache/ba1/93/43/7bb7d6df6b89daa507ead29d4f2a", @@ -1406,11 +1406,11 @@ "assets/build/ba_data/textures/cowboyIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/b9/bf/be1704729e7714781060d58d65c2", "assets/build/ba_data/textures/cowboyIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/ca/e7/0bc54a6b3fd60923c951fc97d790", "assets/build/ba_data/textures/cowboyIcon_preview.png": "https://files.ballistica.net/cache/ba1/1c/67/f2c47c042d89c220e78e7ebce5ed", - "assets/build/ba_data/textures/cragCastleLevelColor.dds": "https://files.ballistica.net/cache/ba1/89/88/9723a3035d39ef69cf3f3c7bda03", + "assets/build/ba_data/textures/cragCastleLevelColor.dds": "https://files.ballistica.net/cache/ba1/fe/9a/3d8efc6b02fe3f071b832d41dacb", "assets/build/ba_data/textures/cragCastleLevelColor.ktx": "https://files.ballistica.net/cache/ba1/ea/44/3b99b25e09c05fc6e85583866694", "assets/build/ba_data/textures/cragCastleLevelColor.pvr": "https://files.ballistica.net/cache/ba1/1e/9a/9b5125e165f5ebaecc8f1934a2c1", "assets/build/ba_data/textures/cragCastleLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/b4/6c/6b8f525be822459dd4bd6548b2a8", - "assets/build/ba_data/textures/cragCastlePreview.dds": "https://files.ballistica.net/cache/ba1/87/12/9abc61fcd67f230597f166220d60", + "assets/build/ba_data/textures/cragCastlePreview.dds": "https://files.ballistica.net/cache/ba1/fb/22/e6c8a874a13b94a688ba5421141a", "assets/build/ba_data/textures/cragCastlePreview.ktx": "https://files.ballistica.net/cache/ba1/0c/b2/890cb8167c41cd2c220daa3db7a9", "assets/build/ba_data/textures/cragCastlePreview.pvr": "https://files.ballistica.net/cache/ba1/c9/61/1c57e31b464b26c5e6c125d38944", "assets/build/ba_data/textures/cragCastlePreview_preview.png": "https://files.ballistica.net/cache/ba1/b1/b2/d49537dbba63c3cbc25b3989a2e2", @@ -1430,31 +1430,31 @@ "assets/build/ba_data/textures/cuteSpaz.ktx": "https://files.ballistica.net/cache/ba1/9a/65/5bfc1d1ef2bb7ac9b767e70d6015", "assets/build/ba_data/textures/cuteSpaz.pvr": "https://files.ballistica.net/cache/ba1/ff/ec/9172f64f96803393de8da58f7566", "assets/build/ba_data/textures/cuteSpaz_preview.png": "https://files.ballistica.net/cache/ba1/e9/74/364547fef623e7bbbbc8a92a9efa", - "assets/build/ba_data/textures/cyborgColor.dds": "https://files.ballistica.net/cache/ba1/35/94/7e5c288cb0f17bd904f3a66ee6f7", + "assets/build/ba_data/textures/cyborgColor.dds": "https://files.ballistica.net/cache/ba1/93/d4/75c140eff1c3cc45e1766fc0e95c", "assets/build/ba_data/textures/cyborgColor.ktx": "https://files.ballistica.net/cache/ba1/d0/d6/e611760948207bebc5cec40721ee", "assets/build/ba_data/textures/cyborgColor.pvr": "https://files.ballistica.net/cache/ba1/3b/b4/14499682862c916ba7e6df183445", - "assets/build/ba_data/textures/cyborgColorMask.dds": "https://files.ballistica.net/cache/ba1/28/57/0bd64f9f7d5573a9e1fd1c5f422d", + "assets/build/ba_data/textures/cyborgColorMask.dds": "https://files.ballistica.net/cache/ba1/34/e0/24881a8cabf3b48f1e68635b0096", "assets/build/ba_data/textures/cyborgColorMask.ktx": "https://files.ballistica.net/cache/ba1/09/49/64a4b4bd11d7f43ee3e3b4557ccb", "assets/build/ba_data/textures/cyborgColorMask.pvr": "https://files.ballistica.net/cache/ba1/aa/8f/2017c219d46766b0a8a58b12ef80", "assets/build/ba_data/textures/cyborgColorMask_preview.png": "https://files.ballistica.net/cache/ba1/b2/c8/1ca1bb73d93dd93169977aef26eb", "assets/build/ba_data/textures/cyborgColor_preview.png": "https://files.ballistica.net/cache/ba1/23/68/de2999bc4db759030c77dd372e23", - "assets/build/ba_data/textures/cyborgIcon.dds": "https://files.ballistica.net/cache/ba1/99/c3/8eed2f236f66aef901d452cdb98b", + "assets/build/ba_data/textures/cyborgIcon.dds": "https://files.ballistica.net/cache/ba1/5a/55/c63bdf0b63c76da7b387b4bebecb", "assets/build/ba_data/textures/cyborgIcon.ktx": "https://files.ballistica.net/cache/ba1/de/ab/4d5b2163047d3fb9b05d43c9183d", "assets/build/ba_data/textures/cyborgIcon.pvr": "https://files.ballistica.net/cache/ba1/0c/7b/b47a4bfbbfd8607ea06375963485", - "assets/build/ba_data/textures/cyborgIconColorMask.dds": "https://files.ballistica.net/cache/ba1/9d/2a/1852d636d06de05bff2ffac52d9c", + "assets/build/ba_data/textures/cyborgIconColorMask.dds": "https://files.ballistica.net/cache/ba1/ad/20/71a5de426d081b99c1abe672474a", "assets/build/ba_data/textures/cyborgIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/20/95/85096b550149fb17500c673a9589", "assets/build/ba_data/textures/cyborgIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/1f/70/35e302e1a91d78ab23cb3e936bde", "assets/build/ba_data/textures/cyborgIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/09/bb/e6563f614b2cda0ca5da89b80b2a", "assets/build/ba_data/textures/cyborgIcon_preview.png": "https://files.ballistica.net/cache/ba1/4e/af/0d54cad1089f73c91ed766519d77", - "assets/build/ba_data/textures/doomShroomBGColor.dds": "https://files.ballistica.net/cache/ba1/12/cc/3fa62b5809176403776958657571", + "assets/build/ba_data/textures/doomShroomBGColor.dds": "https://files.ballistica.net/cache/ba1/5c/2b/88deea7de0cf4b7e3250ca76bcc1", "assets/build/ba_data/textures/doomShroomBGColor.ktx": "https://files.ballistica.net/cache/ba1/db/35/7f5884df9de36467179b45e8e241", "assets/build/ba_data/textures/doomShroomBGColor.pvr": "https://files.ballistica.net/cache/ba1/65/5d/fc508d48f3703e91cfbfce0187ed", "assets/build/ba_data/textures/doomShroomBGColor_preview.png": "https://files.ballistica.net/cache/ba1/b5/7e/995e3c648eb68d4c72c4e50be7e6", - "assets/build/ba_data/textures/doomShroomLevelColor.dds": "https://files.ballistica.net/cache/ba1/ac/a4/03513b905d7379ee44e6e686056d", + "assets/build/ba_data/textures/doomShroomLevelColor.dds": "https://files.ballistica.net/cache/ba1/cd/1e/f297f1c37249810e7aaffca591a4", "assets/build/ba_data/textures/doomShroomLevelColor.ktx": "https://files.ballistica.net/cache/ba1/6c/96/d887b3d3cf79d2264ad2e601193d", "assets/build/ba_data/textures/doomShroomLevelColor.pvr": "https://files.ballistica.net/cache/ba1/e2/15/8303117a33a96a61376dad6f5e9d", "assets/build/ba_data/textures/doomShroomLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/61/cf/327dd838ebab6875b92ee28c3bcd", - "assets/build/ba_data/textures/doomShroomPreview.dds": "https://files.ballistica.net/cache/ba1/f5/68/bd828096f33579d65a44c5357933", + "assets/build/ba_data/textures/doomShroomPreview.dds": "https://files.ballistica.net/cache/ba1/d7/c7/888bb15afe907f3a37006e76b3af", "assets/build/ba_data/textures/doomShroomPreview.ktx": "https://files.ballistica.net/cache/ba1/f6/3c/20abd773a8502a0954d62c0917c7", "assets/build/ba_data/textures/doomShroomPreview.pvr": "https://files.ballistica.net/cache/ba1/d3/92/aca35e87cb29f4da683e88859a21", "assets/build/ba_data/textures/doomShroomPreview_preview.png": "https://files.ballistica.net/cache/ba1/19/85/7ec1b3b28c5bc564fd0a106d2423", @@ -1494,7 +1494,7 @@ "assets/build/ba_data/textures/empty.ktx": "https://files.ballistica.net/cache/ba1/1c/1a/c944b4615540bebbd2337f37a36e", "assets/build/ba_data/textures/empty.pvr": "https://files.ballistica.net/cache/ba1/e1/85/0e5d594e57336cf14b4914ebb37c", "assets/build/ba_data/textures/empty_preview.png": "https://files.ballistica.net/cache/ba1/27/1d/936488a18c78f387f2f4ec562545", - "assets/build/ba_data/textures/explosion.dds": "https://files.ballistica.net/cache/ba1/da/1f/fac45c02f2f889b62335f3f85d77", + "assets/build/ba_data/textures/explosion.dds": "https://files.ballistica.net/cache/ba1/e7/95/a6d20541c8ffff02583799ab77ba", "assets/build/ba_data/textures/explosion.ktx": "https://files.ballistica.net/cache/ba1/72/e7/7db06c8ab6f0dd8dfc48162824b1", "assets/build/ba_data/textures/explosion.pvr": "https://files.ballistica.net/cache/ba1/38/42/e4de72086e36187dcb5e4005f4e9", "assets/build/ba_data/textures/explosion_preview.png": "https://files.ballistica.net/cache/ba1/6f/01/8a6cf54d2e9b24c87c00ea2ca9c3", @@ -1510,11 +1510,11 @@ "assets/build/ba_data/textures/file.ktx": "https://files.ballistica.net/cache/ba1/d5/f6/a80ff58c84435b33a05a1e61016e", "assets/build/ba_data/textures/file.pvr": "https://files.ballistica.net/cache/ba1/5f/25/e6079cc54364d95d6101fc74bdba", "assets/build/ba_data/textures/file_preview.png": "https://files.ballistica.net/cache/ba1/ef/c6/71a8f503449908b15a40ce3b5b03", - "assets/build/ba_data/textures/flagColor.dds": "https://files.ballistica.net/cache/ba1/ee/84/655bd471f8265bc7d61f95beda16", + "assets/build/ba_data/textures/flagColor.dds": "https://files.ballistica.net/cache/ba1/4a/ce/2682d3720bff14ec43bdfcaca346", "assets/build/ba_data/textures/flagColor.ktx": "https://files.ballistica.net/cache/ba1/81/3c/f16914e9d68d64ce59a1f7681bff", "assets/build/ba_data/textures/flagColor.pvr": "https://files.ballistica.net/cache/ba1/e0/b0/06fd752a0f3563252d6dee64dcb3", "assets/build/ba_data/textures/flagColor_preview.png": "https://files.ballistica.net/cache/ba1/0b/33/50db4a9487b0ef8d65f2628776e5", - "assets/build/ba_data/textures/flagPoleColor.dds": "https://files.ballistica.net/cache/ba1/ba/7a/25e2cd1d33d4f323682716489099", + "assets/build/ba_data/textures/flagPoleColor.dds": "https://files.ballistica.net/cache/ba1/22/e0/43555f1a8a4bff7088c33ccd179e", "assets/build/ba_data/textures/flagPoleColor.ktx": "https://files.ballistica.net/cache/ba1/0f/56/7d16d9b2af848d004da2012c2cf7", "assets/build/ba_data/textures/flagPoleColor.pvr": "https://files.ballistica.net/cache/ba1/7b/63/e163c96ff68bb242e8b9ef339711", "assets/build/ba_data/textures/flagPoleColor_preview.png": "https://files.ballistica.net/cache/ba1/e0/e4/6c41b0bfd6796344ba60d0bdf189", @@ -1574,10 +1574,10 @@ "assets/build/ba_data/textures/fontSmall7.ktx": "https://files.ballistica.net/cache/ba1/14/d0/23e59a31103533757dea7ffae94e", "assets/build/ba_data/textures/fontSmall7.pvr": "https://files.ballistica.net/cache/ba1/48/b5/26321b2643219162a713170ab9b8", "assets/build/ba_data/textures/fontSmall7_preview.png": "https://files.ballistica.net/cache/ba1/70/56/13b940fb6d0ba48023e7fac6f184", - "assets/build/ba_data/textures/footballStadium.dds": "https://files.ballistica.net/cache/ba1/37/98/82cd29605606ef50ec7f7f1a2b38", + "assets/build/ba_data/textures/footballStadium.dds": "https://files.ballistica.net/cache/ba1/c6/f3/1906912b8e4d923a0ec975de5e8f", "assets/build/ba_data/textures/footballStadium.ktx": "https://files.ballistica.net/cache/ba1/00/bf/6b8e37071ad1d6e33f30f1998bed", "assets/build/ba_data/textures/footballStadium.pvr": "https://files.ballistica.net/cache/ba1/92/69/f2c5577a1de103343ddcb01d6104", - "assets/build/ba_data/textures/footballStadiumPreview.dds": "https://files.ballistica.net/cache/ba1/f6/f3/032deefbd09bdb75806d9ed813c2", + "assets/build/ba_data/textures/footballStadiumPreview.dds": "https://files.ballistica.net/cache/ba1/d9/7f/b42a16567ea5ae5a85faa027e4ce", "assets/build/ba_data/textures/footballStadiumPreview.ktx": "https://files.ballistica.net/cache/ba1/96/f2/6cf9b95e27aeca2d8be08feedaef", "assets/build/ba_data/textures/footballStadiumPreview.pvr": "https://files.ballistica.net/cache/ba1/3f/1b/ce5faa6a8678c3b7d0a461c9509b", "assets/build/ba_data/textures/footballStadiumPreview_preview.png": "https://files.ballistica.net/cache/ba1/a7/c8/393d085e92e185e6c43ab28cd5ee", @@ -1586,15 +1586,15 @@ "assets/build/ba_data/textures/frameInset.ktx": "https://files.ballistica.net/cache/ba1/61/d7/264cfcdd0d07d67ac90827969caa", "assets/build/ba_data/textures/frameInset.pvr": "https://files.ballistica.net/cache/ba1/d1/ef/b0dd66aab3c8cf21933dc53f0c8f", "assets/build/ba_data/textures/frameInset_preview.png": "https://files.ballistica.net/cache/ba1/51/2f/a18329872f0d0b71f0a333c0db81", - "assets/build/ba_data/textures/frostyColor.dds": "https://files.ballistica.net/cache/ba1/8c/ae/6ca51f72866944ce9691c8a1a7d5", + "assets/build/ba_data/textures/frostyColor.dds": "https://files.ballistica.net/cache/ba1/6d/c6/2a49a0ec7810e7431c35752d3d37", "assets/build/ba_data/textures/frostyColor.ktx": "https://files.ballistica.net/cache/ba1/17/6c/fe178ee04831b332ff771bade627", "assets/build/ba_data/textures/frostyColor.pvr": "https://files.ballistica.net/cache/ba1/f8/fb/83779ec75b8113a47b9368ad6992", - "assets/build/ba_data/textures/frostyColorMask.dds": "https://files.ballistica.net/cache/ba1/f0/aa/0c7c2dfc831bb96d76b2c1719597", + "assets/build/ba_data/textures/frostyColorMask.dds": "https://files.ballistica.net/cache/ba1/7c/a3/3cd619ea33d9e222af6da8ce7ccc", "assets/build/ba_data/textures/frostyColorMask.ktx": "https://files.ballistica.net/cache/ba1/5d/ff/5a82bf1855c957357d277dec18c7", "assets/build/ba_data/textures/frostyColorMask.pvr": "https://files.ballistica.net/cache/ba1/d2/e3/5ccf3bc21b48180ef890cfd1ebab", "assets/build/ba_data/textures/frostyColorMask_preview.png": "https://files.ballistica.net/cache/ba1/44/6f/795803f91fbf1628e708a6a293a4", "assets/build/ba_data/textures/frostyColor_preview.png": "https://files.ballistica.net/cache/ba1/cd/3c/f7e49e7cf8164f754c2384f35e55", - "assets/build/ba_data/textures/frostyIcon.dds": "https://files.ballistica.net/cache/ba1/52/39/1044bf10f62219a9c804efec91ea", + "assets/build/ba_data/textures/frostyIcon.dds": "https://files.ballistica.net/cache/ba1/17/76/45c5a0a3d416259aab598bad0303", "assets/build/ba_data/textures/frostyIcon.ktx": "https://files.ballistica.net/cache/ba1/74/b4/d498eb65a6a3b562e9eb6195131b", "assets/build/ba_data/textures/frostyIcon.pvr": "https://files.ballistica.net/cache/ba1/a2/a6/589107d7ab94e8ba9dec5895ba6d", "assets/build/ba_data/textures/frostyIconColorMask.dds": "https://files.ballistica.net/cache/ba1/af/d5/5421823e52ef7bb86d1e24a610c4", @@ -1602,7 +1602,7 @@ "assets/build/ba_data/textures/frostyIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/8e/98/89e07ef5493074a2c4cbb7aa1592", "assets/build/ba_data/textures/frostyIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/ef/77/6b17bc9b8d8d3fa37760ed4d96ac", "assets/build/ba_data/textures/frostyIcon_preview.png": "https://files.ballistica.net/cache/ba1/3e/dd/9cc6d8f3f494b586237b050a4e06", - "assets/build/ba_data/textures/fuse.dds": "https://files.ballistica.net/cache/ba1/4b/72/e7709195c5903f968c33209dc1ed", + "assets/build/ba_data/textures/fuse.dds": "https://files.ballistica.net/cache/ba1/9a/72/5eb4b3235d38ec3f69c61fdb0445", "assets/build/ba_data/textures/fuse.ktx": "https://files.ballistica.net/cache/ba1/49/ea/71c5c7dcbdcb213c036460d59117", "assets/build/ba_data/textures/fuse.pvr": "https://files.ballistica.net/cache/ba1/48/3a/710945756ee605974820d4c98e49", "assets/build/ba_data/textures/fuse_preview.png": "https://files.ballistica.net/cache/ba1/f1/69/975f7d19d7db9a01d78ecb33bfe2", @@ -1617,7 +1617,7 @@ "assets/build/ba_data/textures/gladiatorColor.dds": "https://files.ballistica.net/cache/ba1/a8/6a/2b8eb1e0f4c15993e98be5395e4c", "assets/build/ba_data/textures/gladiatorColor.ktx": "https://files.ballistica.net/cache/ba1/20/13/e491823b8cc38a52400f9d74a209", "assets/build/ba_data/textures/gladiatorColor.pvr": "https://files.ballistica.net/cache/ba1/14/60/1d4a45b0036538368348613ad01f", - "assets/build/ba_data/textures/gladiatorColorMask.dds": "https://files.ballistica.net/cache/ba1/05/7f/ee686ec23643b388502639d98879", + "assets/build/ba_data/textures/gladiatorColorMask.dds": "https://files.ballistica.net/cache/ba1/d2/ac/02d7c9a4320ed6a8b416d48f2665", "assets/build/ba_data/textures/gladiatorColorMask.ktx": "https://files.ballistica.net/cache/ba1/1e/ae/f91222e92e938c0fc8be66103cb5", "assets/build/ba_data/textures/gladiatorColorMask.pvr": "https://files.ballistica.net/cache/ba1/46/18/4ad8171ff791a86b03160648afcf", "assets/build/ba_data/textures/gladiatorColorMask_preview.png": "https://files.ballistica.net/cache/ba1/87/45/0621a7a40782a938a8f66f8985ae", @@ -1662,10 +1662,10 @@ "assets/build/ba_data/textures/heart.ktx": "https://files.ballistica.net/cache/ba1/b7/b1/8db1d5e585578b16ad0e7dac922e", "assets/build/ba_data/textures/heart.pvr": "https://files.ballistica.net/cache/ba1/b1/78/46eb38e941aa94b7a8c654c1ef38", "assets/build/ba_data/textures/heart_preview.png": "https://files.ballistica.net/cache/ba1/3c/d8/bc7b73e6920382202f1bf27b7b40", - "assets/build/ba_data/textures/hockeyStadium.dds": "https://files.ballistica.net/cache/ba1/8e/19/703679fb5ac0e07d577d2727ab27", + "assets/build/ba_data/textures/hockeyStadium.dds": "https://files.ballistica.net/cache/ba1/bc/a0/0ddbb1707aab5481582f40b5042c", "assets/build/ba_data/textures/hockeyStadium.ktx": "https://files.ballistica.net/cache/ba1/57/14/4a768367b5a3ada80b8b866320ae", "assets/build/ba_data/textures/hockeyStadium.pvr": "https://files.ballistica.net/cache/ba1/f4/e4/65792658b9ef354781472d5f82ba", - "assets/build/ba_data/textures/hockeyStadiumPreview.dds": "https://files.ballistica.net/cache/ba1/e0/84/38b2f0294f016bf122dcbfa226d2", + "assets/build/ba_data/textures/hockeyStadiumPreview.dds": "https://files.ballistica.net/cache/ba1/3c/d6/a0f39559e614781ef7590cf98826", "assets/build/ba_data/textures/hockeyStadiumPreview.ktx": "https://files.ballistica.net/cache/ba1/af/05/69b7f2c83e332b6ec410163a59fd", "assets/build/ba_data/textures/hockeyStadiumPreview.pvr": "https://files.ballistica.net/cache/ba1/4c/fb/7bcd3e1d5f830558cd01206c57e6", "assets/build/ba_data/textures/hockeyStadiumPreview_preview.png": "https://files.ballistica.net/cache/ba1/d8/99/5d6922a337009674a13b647e06c5", @@ -1682,7 +1682,7 @@ "assets/build/ba_data/textures/iircadeLogo.ktx": "https://files.ballistica.net/cache/ba1/58/b9/848fbac7a1c7ad6a9b2efd758ff1", "assets/build/ba_data/textures/iircadeLogo.pvr": "https://files.ballistica.net/cache/ba1/19/ba/66f832c978d9cf46f991e4811401", "assets/build/ba_data/textures/iircadeLogo_preview.png": "https://files.ballistica.net/cache/ba1/c7/d6/0740136951cbc17907f6192357b2", - "assets/build/ba_data/textures/impactBombColor.dds": "https://files.ballistica.net/cache/ba1/59/f6/810262f238679951f7702f2ed1a5", + "assets/build/ba_data/textures/impactBombColor.dds": "https://files.ballistica.net/cache/ba1/a6/70/8486c52fb904e18e9b13f4850b5e", "assets/build/ba_data/textures/impactBombColor.ktx": "https://files.ballistica.net/cache/ba1/fc/3b/e1051061b1ed03bcbfdc6b9f8c79", "assets/build/ba_data/textures/impactBombColor.pvr": "https://files.ballistica.net/cache/ba1/d6/d9/0f81193db5aa44780ee8bb0943b9", "assets/build/ba_data/textures/impactBombColorLit.dds": "https://files.ballistica.net/cache/ba1/fe/65/a55aba9c983239516c96f28fd4b2", @@ -1694,15 +1694,15 @@ "assets/build/ba_data/textures/inventoryIcon.ktx": "https://files.ballistica.net/cache/ba1/3c/ca/1a61ddc33fbae07060b3ffe24531", "assets/build/ba_data/textures/inventoryIcon.pvr": "https://files.ballistica.net/cache/ba1/a7/e3/6fe1d29dd307067b5b42aa1e78ca", "assets/build/ba_data/textures/inventoryIcon_preview.png": "https://files.ballistica.net/cache/ba1/5d/95/fc2f9cf29120f6e5714a82b49762", - "assets/build/ba_data/textures/jackColor.dds": "https://files.ballistica.net/cache/ba1/3e/bb/562defe30cd5860a6648aa8c3127", + "assets/build/ba_data/textures/jackColor.dds": "https://files.ballistica.net/cache/ba1/9c/16/c4c568eec16b4ac15110e2213107", "assets/build/ba_data/textures/jackColor.ktx": "https://files.ballistica.net/cache/ba1/b4/92/c66d4bd99efdd17578c1ab40eb38", "assets/build/ba_data/textures/jackColor.pvr": "https://files.ballistica.net/cache/ba1/93/f0/b67389b8a52446f9d60119b4e4b0", - "assets/build/ba_data/textures/jackColorMask.dds": "https://files.ballistica.net/cache/ba1/74/c3/18ed606a334e8096ab0f9a6b6045", + "assets/build/ba_data/textures/jackColorMask.dds": "https://files.ballistica.net/cache/ba1/33/86/4e8b48b1274373302fed850899f3", "assets/build/ba_data/textures/jackColorMask.ktx": "https://files.ballistica.net/cache/ba1/c9/40/a44ca36c9fcb3ca51fb61dbaa2cf", "assets/build/ba_data/textures/jackColorMask.pvr": "https://files.ballistica.net/cache/ba1/32/89/9243f17fdd9d8c3d7c9cc8a26191", "assets/build/ba_data/textures/jackColorMask_preview.png": "https://files.ballistica.net/cache/ba1/71/92/54cc17903955e0b923f64bb746a7", "assets/build/ba_data/textures/jackColor_preview.png": "https://files.ballistica.net/cache/ba1/83/f8/daf0dc5014e0220a8e4bc8d1113a", - "assets/build/ba_data/textures/jackIcon.dds": "https://files.ballistica.net/cache/ba1/0c/1f/ec2d1e00f2b409df11b485667334", + "assets/build/ba_data/textures/jackIcon.dds": "https://files.ballistica.net/cache/ba1/42/a1/c6f5a537e23a509a22a13870470f", "assets/build/ba_data/textures/jackIcon.ktx": "https://files.ballistica.net/cache/ba1/e8/5d/e5e222130b790f5239089333fd92", "assets/build/ba_data/textures/jackIcon.pvr": "https://files.ballistica.net/cache/ba1/da/f9/29d46bb6b052d5aad5a81efa994e", "assets/build/ba_data/textures/jackIconColorMask.dds": "https://files.ballistica.net/cache/ba1/1e/8e/395cb09dbe9ca002ad0d5532f6bd", @@ -1713,7 +1713,7 @@ "assets/build/ba_data/textures/jumpsuitColor.dds": "https://files.ballistica.net/cache/ba1/5b/9c/4761afb2e6fc3e0f8ef028d317be", "assets/build/ba_data/textures/jumpsuitColor.ktx": "https://files.ballistica.net/cache/ba1/45/25/6084698fbdd038fbd750fc72dd28", "assets/build/ba_data/textures/jumpsuitColor.pvr": "https://files.ballistica.net/cache/ba1/6c/77/39fe91748b79f2aabc640f38fd2a", - "assets/build/ba_data/textures/jumpsuitColorMask.dds": "https://files.ballistica.net/cache/ba1/c3/3c/5ad8f955187c9825ea9871fa3c3c", + "assets/build/ba_data/textures/jumpsuitColorMask.dds": "https://files.ballistica.net/cache/ba1/04/00/8fbe70c2d5bc499f842e76b6a71d", "assets/build/ba_data/textures/jumpsuitColorMask.ktx": "https://files.ballistica.net/cache/ba1/50/c2/79341c7081f28d70de09cb6db116", "assets/build/ba_data/textures/jumpsuitColorMask.pvr": "https://files.ballistica.net/cache/ba1/51/1e/5f4580d17068abebb0f8d2609c3c", "assets/build/ba_data/textures/jumpsuitColorMask_preview.png": "https://files.ballistica.net/cache/ba1/6f/05/15f3184259761adc208e2dd659ca", @@ -1726,26 +1726,26 @@ "assets/build/ba_data/textures/jumpsuitIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/77/e0/1326a95629aec5d0a447f4694dc8", "assets/build/ba_data/textures/jumpsuitIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/d0/81/c975a77166d8bac47d63340960b4", "assets/build/ba_data/textures/jumpsuitIcon_preview.png": "https://files.ballistica.net/cache/ba1/06/1f/0f16b73da3b140ae91a645ad3920", - "assets/build/ba_data/textures/kronk.dds": "https://files.ballistica.net/cache/ba1/41/b3/1173def9511feb2ebc516e070ed6", + "assets/build/ba_data/textures/kronk.dds": "https://files.ballistica.net/cache/ba1/79/99/217e4d40c7107337bf4ff402e020", "assets/build/ba_data/textures/kronk.ktx": "https://files.ballistica.net/cache/ba1/80/d7/0f40cc83961456cca52f50d87657", "assets/build/ba_data/textures/kronk.pvr": "https://files.ballistica.net/cache/ba1/4d/74/fb56c0df66aa36551ae4ac73a141", - "assets/build/ba_data/textures/kronkColorMask.dds": "https://files.ballistica.net/cache/ba1/fa/9c/bba4cffffd4d7e7bdc53bd27819b", + "assets/build/ba_data/textures/kronkColorMask.dds": "https://files.ballistica.net/cache/ba1/f7/e2/92c6c2179b0ea3dcaa85f357e3d7", "assets/build/ba_data/textures/kronkColorMask.ktx": "https://files.ballistica.net/cache/ba1/de/23/7ab48fef2af0a1253b2eb6a083ab", "assets/build/ba_data/textures/kronkColorMask.pvr": "https://files.ballistica.net/cache/ba1/d4/ab/0df43e24f6aa11608a2f9b2bda6d", "assets/build/ba_data/textures/kronkColorMask_preview.png": "https://files.ballistica.net/cache/ba1/5c/14/80f2148210e89e8ca6b3b03b6e10", "assets/build/ba_data/textures/kronkIcon.dds": "https://files.ballistica.net/cache/ba1/d2/66/367fb5a09d45419be710683f0b8a", "assets/build/ba_data/textures/kronkIcon.ktx": "https://files.ballistica.net/cache/ba1/0b/23/ca03de39efd26cc2ca53a46f70b4", "assets/build/ba_data/textures/kronkIcon.pvr": "https://files.ballistica.net/cache/ba1/d7/2c/17a833f010265c66243ec90fcf09", - "assets/build/ba_data/textures/kronkIconColorMask.dds": "https://files.ballistica.net/cache/ba1/8b/b1/d2f52c09816856963fa41e1e8b83", + "assets/build/ba_data/textures/kronkIconColorMask.dds": "https://files.ballistica.net/cache/ba1/ec/4f/d9c86c700f2feaf28767f666a836", "assets/build/ba_data/textures/kronkIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/41/41/5c76cd5af36248308d96cf1b4bcd", "assets/build/ba_data/textures/kronkIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/4c/0c/41d95110ecda25e0e66a3876cce4", "assets/build/ba_data/textures/kronkIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/a3/24/7b66c17a8bae4ef0f9f3ca4a95ca", "assets/build/ba_data/textures/kronkIcon_preview.png": "https://files.ballistica.net/cache/ba1/5f/28/4ca750d54dcb57ad82f3bbacd2e5", "assets/build/ba_data/textures/kronk_preview.png": "https://files.ballistica.net/cache/ba1/0b/2e/083f0a0c74bec4b4f629e2bdd2a0", - "assets/build/ba_data/textures/lakeFrigid.dds": "https://files.ballistica.net/cache/ba1/52/fb/3df33cd21b7e6cfa4e4f9b03add5", + "assets/build/ba_data/textures/lakeFrigid.dds": "https://files.ballistica.net/cache/ba1/de/16/41f8895b19d81123ab48ad72f38d", "assets/build/ba_data/textures/lakeFrigid.ktx": "https://files.ballistica.net/cache/ba1/d2/ad/c28e092d9eeea2c5643d1d89613f", "assets/build/ba_data/textures/lakeFrigid.pvr": "https://files.ballistica.net/cache/ba1/f8/c0/53f0c6ec9f5ec37514b07d0c3506", - "assets/build/ba_data/textures/lakeFrigidPreview.dds": "https://files.ballistica.net/cache/ba1/23/9b/b65965dc2da90a77737df299527f", + "assets/build/ba_data/textures/lakeFrigidPreview.dds": "https://files.ballistica.net/cache/ba1/eb/fd/9d832e847a72de6f62a02403abc5", "assets/build/ba_data/textures/lakeFrigidPreview.ktx": "https://files.ballistica.net/cache/ba1/8f/d5/185af314124e8ca312475205704e", "assets/build/ba_data/textures/lakeFrigidPreview.pvr": "https://files.ballistica.net/cache/ba1/9b/2d/8b05ecb7e85b4dd42613e3e0ff89", "assets/build/ba_data/textures/lakeFrigidPreview_preview.png": "https://files.ballistica.net/cache/ba1/80/ef/8283d6c6c7f144b1dd187262b661", @@ -1822,10 +1822,10 @@ "assets/build/ba_data/textures/medalSilver.ktx": "https://files.ballistica.net/cache/ba1/68/84/934ab97c1014e98ffd6bbb24ad89", "assets/build/ba_data/textures/medalSilver.pvr": "https://files.ballistica.net/cache/ba1/37/e8/0f2d99b80e98d8388cbb1fb81aed", "assets/build/ba_data/textures/medalSilver_preview.png": "https://files.ballistica.net/cache/ba1/1c/38/7e840a4f3b6f7c15e21b22628603", - "assets/build/ba_data/textures/melColor.dds": "https://files.ballistica.net/cache/ba1/bd/29/6743f3197828fb39a9f424788023", + "assets/build/ba_data/textures/melColor.dds": "https://files.ballistica.net/cache/ba1/c6/f1/ef8f3740635ec2b601f73afe0424", "assets/build/ba_data/textures/melColor.ktx": "https://files.ballistica.net/cache/ba1/fa/a1/645eb759ffd7b046fe91ff4f9f8b", "assets/build/ba_data/textures/melColor.pvr": "https://files.ballistica.net/cache/ba1/b1/90/45696ef2a4717ce5f3e1838e31f1", - "assets/build/ba_data/textures/melColorMask.dds": "https://files.ballistica.net/cache/ba1/0c/95/4cce7a44347eef0356dd96dbae60", + "assets/build/ba_data/textures/melColorMask.dds": "https://files.ballistica.net/cache/ba1/b7/64/9ae23dc4897fd612952d3193c023", "assets/build/ba_data/textures/melColorMask.ktx": "https://files.ballistica.net/cache/ba1/bb/ed/2e666f6e2d647b45874645084028", "assets/build/ba_data/textures/melColorMask.pvr": "https://files.ballistica.net/cache/ba1/af/a4/002bc32b803774a668ce8953014e", "assets/build/ba_data/textures/melColorMask_preview.png": "https://files.ballistica.net/cache/ba1/58/ee/347860a4fc2faf37f1fa3013ce18", @@ -1833,12 +1833,12 @@ "assets/build/ba_data/textures/melIcon.dds": "https://files.ballistica.net/cache/ba1/0e/b2/683438456569eacf65b24f18b66f", "assets/build/ba_data/textures/melIcon.ktx": "https://files.ballistica.net/cache/ba1/a6/fb/e0f4945bea0edf83729dadf52f24", "assets/build/ba_data/textures/melIcon.pvr": "https://files.ballistica.net/cache/ba1/b6/ec/ed46dda142a62f35c28720878c8f", - "assets/build/ba_data/textures/melIconColorMask.dds": "https://files.ballistica.net/cache/ba1/5a/db/4439edcfbbef9ea932fb7d56e26a", + "assets/build/ba_data/textures/melIconColorMask.dds": "https://files.ballistica.net/cache/ba1/61/b4/637cf663cd1df1d6adacfcbc148c", "assets/build/ba_data/textures/melIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/64/e0/2f0de4aca98350b0cecbaea53cda", "assets/build/ba_data/textures/melIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/ba/94/c1955a495fcb9156ef4415105fa3", "assets/build/ba_data/textures/melIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/60/9b/38b259d63b5b8c17e0e8f4a09682", "assets/build/ba_data/textures/melIcon_preview.png": "https://files.ballistica.net/cache/ba1/cf/1d/5fd4405703e177ab90cc331e2809", - "assets/build/ba_data/textures/menuBG.dds": "https://files.ballistica.net/cache/ba1/7c/60/840dbf0ae2e0273c5553a81a9613", + "assets/build/ba_data/textures/menuBG.dds": "https://files.ballistica.net/cache/ba1/66/38/e19d5d26e0c3b7750ad612288f51", "assets/build/ba_data/textures/menuBG.ktx": "https://files.ballistica.net/cache/ba1/f9/f7/a09f825ab514e1a57fcf67149798", "assets/build/ba_data/textures/menuBG.pvr": "https://files.ballistica.net/cache/ba1/2e/8a/11960533b874cb081c384a521710", "assets/build/ba_data/textures/menuBG_preview.png": "https://files.ballistica.net/cache/ba1/03/1c/9a07cf577bdf39e58effdbc2e242", @@ -1854,11 +1854,11 @@ "assets/build/ba_data/textures/meter.ktx": "https://files.ballistica.net/cache/ba1/b5/e7/3ba3d4c7c7e05081eb033ae5da8f", "assets/build/ba_data/textures/meter.pvr": "https://files.ballistica.net/cache/ba1/58/de/ab83ad9e0d9b434ca42811030ef9", "assets/build/ba_data/textures/meter_preview.png": "https://files.ballistica.net/cache/ba1/09/b7/40a1a187d7b057defa6f32c6b372", - "assets/build/ba_data/textures/monkeyFaceLevelColor.dds": "https://files.ballistica.net/cache/ba1/c6/29/e07d5663f90bec057f4c0a175baa", + "assets/build/ba_data/textures/monkeyFaceLevelColor.dds": "https://files.ballistica.net/cache/ba1/e8/41/cfcdc67b1adbf50621ae9ebdafef", "assets/build/ba_data/textures/monkeyFaceLevelColor.ktx": "https://files.ballistica.net/cache/ba1/33/d0/e2600748ebab847b7a146350a3c9", "assets/build/ba_data/textures/monkeyFaceLevelColor.pvr": "https://files.ballistica.net/cache/ba1/09/98/9491294da842980b75739e8d1c59", "assets/build/ba_data/textures/monkeyFaceLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/2f/84/fd142ba957ead4acb7b4081a3771", - "assets/build/ba_data/textures/monkeyFacePreview.dds": "https://files.ballistica.net/cache/ba1/3d/14/795c5ec8cf2e1b5c49e1dba05341", + "assets/build/ba_data/textures/monkeyFacePreview.dds": "https://files.ballistica.net/cache/ba1/7d/53/6c90a28662f70e03ae967a63151c", "assets/build/ba_data/textures/monkeyFacePreview.ktx": "https://files.ballistica.net/cache/ba1/ff/83/d340f1495861ebb97bd7f766ccbb", "assets/build/ba_data/textures/monkeyFacePreview.pvr": "https://files.ballistica.net/cache/ba1/85/e7/807edc04137ee1a3b7767e90d692", "assets/build/ba_data/textures/monkeyFacePreview_preview.png": "https://files.ballistica.net/cache/ba1/5c/62/929429eb7fd47b21edf6dd8d8f63", @@ -1866,19 +1866,19 @@ "assets/build/ba_data/textures/multiplayerExamples.ktx": "https://files.ballistica.net/cache/ba1/48/2c/081cf255b138824720c0b49d2e1e", "assets/build/ba_data/textures/multiplayerExamples.pvr": "https://files.ballistica.net/cache/ba1/d1/db/8902cdbf501bf919e5f9f0ada2b4", "assets/build/ba_data/textures/multiplayerExamples_preview.png": "https://files.ballistica.net/cache/ba1/ea/7c/acf4240ca1fa313126060a8258f0", - "assets/build/ba_data/textures/natureBackgroundColor.dds": "https://files.ballistica.net/cache/ba1/78/ff/45c52ff0f98ffabcd472e68e3a04", + "assets/build/ba_data/textures/natureBackgroundColor.dds": "https://files.ballistica.net/cache/ba1/41/5a/2821b371bfb514531fd617be39cd", "assets/build/ba_data/textures/natureBackgroundColor.ktx": "https://files.ballistica.net/cache/ba1/60/09/50676eca6d0599eabf895f18aa21", "assets/build/ba_data/textures/natureBackgroundColor.pvr": "https://files.ballistica.net/cache/ba1/1f/37/b4950cf37311fc39f53235adb190", "assets/build/ba_data/textures/natureBackgroundColor_preview.png": "https://files.ballistica.net/cache/ba1/61/91/2af689aba61ee35bc281a8c2fc88", - "assets/build/ba_data/textures/neoSpazColor.dds": "https://files.ballistica.net/cache/ba1/91/44/f06dba5c1cb7fda6d62e2c0c5484", + "assets/build/ba_data/textures/neoSpazColor.dds": "https://files.ballistica.net/cache/ba1/e7/77/ba83d0d9a1472d495d3ebaa182c4", "assets/build/ba_data/textures/neoSpazColor.ktx": "https://files.ballistica.net/cache/ba1/d1/d7/797152df3d1260338405ea0ea59f", "assets/build/ba_data/textures/neoSpazColor.pvr": "https://files.ballistica.net/cache/ba1/8b/68/60b1e0bc0c6295fba84e493c313d", - "assets/build/ba_data/textures/neoSpazColorMask.dds": "https://files.ballistica.net/cache/ba1/72/05/774cf76faed583a54d1658e17402", + "assets/build/ba_data/textures/neoSpazColorMask.dds": "https://files.ballistica.net/cache/ba1/05/ff/08bba0e201d0eea3ead5746ca96f", "assets/build/ba_data/textures/neoSpazColorMask.ktx": "https://files.ballistica.net/cache/ba1/ef/f6/84779b7eb27ccbbcdb77f3b6f2fb", "assets/build/ba_data/textures/neoSpazColorMask.pvr": "https://files.ballistica.net/cache/ba1/a2/a8/4aa145599bd4b8c53d87624553e2", "assets/build/ba_data/textures/neoSpazColorMask_preview.png": "https://files.ballistica.net/cache/ba1/62/88/1239b81fe081de88c08ac7434bc3", "assets/build/ba_data/textures/neoSpazColor_preview.png": "https://files.ballistica.net/cache/ba1/23/2c/b541bf04f85d1aa5de3b475b82d2", - "assets/build/ba_data/textures/neoSpazIcon.dds": "https://files.ballistica.net/cache/ba1/d9/ef/2e3e5cb4151c3ac209c0774dea79", + "assets/build/ba_data/textures/neoSpazIcon.dds": "https://files.ballistica.net/cache/ba1/e0/6e/59525196623212ac76d96d9cd3bb", "assets/build/ba_data/textures/neoSpazIcon.ktx": "https://files.ballistica.net/cache/ba1/d2/b5/f7c3badf697bc9dd82cffd17352c", "assets/build/ba_data/textures/neoSpazIcon.pvr": "https://files.ballistica.net/cache/ba1/47/c1/5ee2e1475e142aa8468b2d50c752", "assets/build/ba_data/textures/neoSpazIconColorMask.dds": "https://files.ballistica.net/cache/ba1/60/46/4e61726cb5e2c81b0e0af5a7cd5e", @@ -1890,15 +1890,15 @@ "assets/build/ba_data/textures/nextLevelIcon.ktx": "https://files.ballistica.net/cache/ba1/b2/84/0bb105ab76cc15c66f52ecbefcf7", "assets/build/ba_data/textures/nextLevelIcon.pvr": "https://files.ballistica.net/cache/ba1/0b/8d/087ad0de136250c54e42f4dca92f", "assets/build/ba_data/textures/nextLevelIcon_preview.png": "https://files.ballistica.net/cache/ba1/76/5f/ffae5ff97775780301b96a1a3f52", - "assets/build/ba_data/textures/ninjaColor.dds": "https://files.ballistica.net/cache/ba1/d3/5c/67af280eab6793195bb039488ce1", + "assets/build/ba_data/textures/ninjaColor.dds": "https://files.ballistica.net/cache/ba1/e7/25/60195fddd30365324328f09e1230", "assets/build/ba_data/textures/ninjaColor.ktx": "https://files.ballistica.net/cache/ba1/2a/a1/22d137826995da608c2e3898083e", "assets/build/ba_data/textures/ninjaColor.pvr": "https://files.ballistica.net/cache/ba1/2d/0c/6a9364e38112591a5f77de741ca2", - "assets/build/ba_data/textures/ninjaColorMask.dds": "https://files.ballistica.net/cache/ba1/02/06/3c07252b18ba88964bba62b8a656", + "assets/build/ba_data/textures/ninjaColorMask.dds": "https://files.ballistica.net/cache/ba1/db/da/51021e6f1482e5664af808b29b00", "assets/build/ba_data/textures/ninjaColorMask.ktx": "https://files.ballistica.net/cache/ba1/1d/68/ee8c4f656d583b49638f3cb40b4e", "assets/build/ba_data/textures/ninjaColorMask.pvr": "https://files.ballistica.net/cache/ba1/06/0a/58e0e29f5b9f503afcfc1a93f052", "assets/build/ba_data/textures/ninjaColorMask_preview.png": "https://files.ballistica.net/cache/ba1/8c/22/0103111a22390dd49615eaf2a4c3", "assets/build/ba_data/textures/ninjaColor_preview.png": "https://files.ballistica.net/cache/ba1/d9/d9/52cf79858329ee664417fa86325a", - "assets/build/ba_data/textures/ninjaIcon.dds": "https://files.ballistica.net/cache/ba1/38/30/a7b91f95d0d38b8d31558ca83680", + "assets/build/ba_data/textures/ninjaIcon.dds": "https://files.ballistica.net/cache/ba1/a4/34/ac0523aa0d224b5668966a1ce6cd", "assets/build/ba_data/textures/ninjaIcon.ktx": "https://files.ballistica.net/cache/ba1/fb/be/7acdbf4b9e212c3a20bf7b7ffe1a", "assets/build/ba_data/textures/ninjaIcon.pvr": "https://files.ballistica.net/cache/ba1/1a/c3/a5843f74115717fcbeb44cb792df", "assets/build/ba_data/textures/ninjaIconColorMask.dds": "https://files.ballistica.net/cache/ba1/b8/eb/6b4811f664e79059a8604db820d6", @@ -1917,7 +1917,7 @@ "assets/build/ba_data/textures/oldLadyColor.dds": "https://files.ballistica.net/cache/ba1/9c/9a/7b82b343061f5b2f8f2b281abf07", "assets/build/ba_data/textures/oldLadyColor.ktx": "https://files.ballistica.net/cache/ba1/e9/a6/b2c434cba993f176a1fbce5e017c", "assets/build/ba_data/textures/oldLadyColor.pvr": "https://files.ballistica.net/cache/ba1/49/6e/5d95e58db32fafff298781d3c379", - "assets/build/ba_data/textures/oldLadyColorMask.dds": "https://files.ballistica.net/cache/ba1/e3/9e/dc76d3799d4e1900d605745f71e6", + "assets/build/ba_data/textures/oldLadyColorMask.dds": "https://files.ballistica.net/cache/ba1/e5/91/354e94e932df33f458ee0bf6e1a0", "assets/build/ba_data/textures/oldLadyColorMask.ktx": "https://files.ballistica.net/cache/ba1/81/da/80cd97c5f4c228ea585d4c6b1906", "assets/build/ba_data/textures/oldLadyColorMask.pvr": "https://files.ballistica.net/cache/ba1/b7/fc/328a89dfc0578184d0cd9be05e5f", "assets/build/ba_data/textures/oldLadyColorMask_preview.png": "https://files.ballistica.net/cache/ba1/f7/23/f290703d2c69f7f115151907afdd", @@ -1933,7 +1933,7 @@ "assets/build/ba_data/textures/operaSingerColor.dds": "https://files.ballistica.net/cache/ba1/06/40/1d46db18bbf308f1e8e88ed25c7d", "assets/build/ba_data/textures/operaSingerColor.ktx": "https://files.ballistica.net/cache/ba1/a9/34/bac2cb5bfa5cfac1b5a209e77a36", "assets/build/ba_data/textures/operaSingerColor.pvr": "https://files.ballistica.net/cache/ba1/1b/e3/4a871e36791bf302c0ecb68426a7", - "assets/build/ba_data/textures/operaSingerColorMask.dds": "https://files.ballistica.net/cache/ba1/e4/57/7f6534987c17b43ac14da7aa15cc", + "assets/build/ba_data/textures/operaSingerColorMask.dds": "https://files.ballistica.net/cache/ba1/a6/c8/eb903a977a1c83792b5a9485357a", "assets/build/ba_data/textures/operaSingerColorMask.ktx": "https://files.ballistica.net/cache/ba1/ad/76/24839951a638bcdbd2f399e26b96", "assets/build/ba_data/textures/operaSingerColorMask.pvr": "https://files.ballistica.net/cache/ba1/1e/56/ce51acda0e9f77cf8450c4871503", "assets/build/ba_data/textures/operaSingerColorMask_preview.png": "https://files.ballistica.net/cache/ba1/99/5e/a20ff9e112ae711dff9d9b0602c0", @@ -1966,34 +1966,34 @@ "assets/build/ba_data/textures/ouyaYButton.ktx": "https://files.ballistica.net/cache/ba1/dd/99/0a8364d55243d59174e449445c40", "assets/build/ba_data/textures/ouyaYButton.pvr": "https://files.ballistica.net/cache/ba1/2d/f8/ebd32f8ca2f65f450641eda0e4b3", "assets/build/ba_data/textures/ouyaYButton_preview.png": "https://files.ballistica.net/cache/ba1/a0/39/27eb09f33ca04d133a2c86d30f87", - "assets/build/ba_data/textures/penguinColor.dds": "https://files.ballistica.net/cache/ba1/b0/90/b5e0f65db8428e7f58a677fc8712", + "assets/build/ba_data/textures/penguinColor.dds": "https://files.ballistica.net/cache/ba1/46/06/98a0d4e3a61c17eabca8a5addac9", "assets/build/ba_data/textures/penguinColor.ktx": "https://files.ballistica.net/cache/ba1/e8/a4/4bebf5671504129dd5daa25a8eaf", "assets/build/ba_data/textures/penguinColor.pvr": "https://files.ballistica.net/cache/ba1/5c/7b/af36d581b9c5e920609861c4fab0", - "assets/build/ba_data/textures/penguinColorMask.dds": "https://files.ballistica.net/cache/ba1/70/9c/9b96ade9b7231f07ae0580e4f60f", + "assets/build/ba_data/textures/penguinColorMask.dds": "https://files.ballistica.net/cache/ba1/ea/71/c0d2e8b03f5e02a17e884c332691", "assets/build/ba_data/textures/penguinColorMask.ktx": "https://files.ballistica.net/cache/ba1/8a/10/60999fce550b8de1444f1d05f263", "assets/build/ba_data/textures/penguinColorMask.pvr": "https://files.ballistica.net/cache/ba1/46/27/d3978fdfac00e02373d9298e755f", "assets/build/ba_data/textures/penguinColorMask_preview.png": "https://files.ballistica.net/cache/ba1/a9/f6/99954cafdabea10227ac0943a206", "assets/build/ba_data/textures/penguinColor_preview.png": "https://files.ballistica.net/cache/ba1/d5/4d/bb509ed353b4dd0e1e5231ddb59d", - "assets/build/ba_data/textures/penguinIcon.dds": "https://files.ballistica.net/cache/ba1/2c/07/d519ac490eec7432713ce7b85473", + "assets/build/ba_data/textures/penguinIcon.dds": "https://files.ballistica.net/cache/ba1/8b/01/d805bef78053a8bc2980fa9e987d", "assets/build/ba_data/textures/penguinIcon.ktx": "https://files.ballistica.net/cache/ba1/5a/d8/daadfc2654dd77d31caf4e0796d0", "assets/build/ba_data/textures/penguinIcon.pvr": "https://files.ballistica.net/cache/ba1/87/1c/dcbc92cc2fe862c43e81d587b1fe", - "assets/build/ba_data/textures/penguinIconColorMask.dds": "https://files.ballistica.net/cache/ba1/b7/be/a11bb4ae3d7535c43ca02afd0ee3", + "assets/build/ba_data/textures/penguinIconColorMask.dds": "https://files.ballistica.net/cache/ba1/f0/0d/71a45142684d98ec7004eab7cfcd", "assets/build/ba_data/textures/penguinIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/b2/10/73b6efac0d2df908570c53ded344", "assets/build/ba_data/textures/penguinIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/25/26/0551afc2a52c6a6426ff3c21e4f4", "assets/build/ba_data/textures/penguinIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/7c/0e/7df9e0157fd40450e0b5935cdc41", "assets/build/ba_data/textures/penguinIcon_preview.png": "https://files.ballistica.net/cache/ba1/db/bf/98796d0f0d33bc200c896ba82109", - "assets/build/ba_data/textures/pixieColor.dds": "https://files.ballistica.net/cache/ba1/f0/f6/90a78ac8b17c8b3b6cb258f078ed", + "assets/build/ba_data/textures/pixieColor.dds": "https://files.ballistica.net/cache/ba1/75/cc/389a63b73cfcbae4aed11b8b710a", "assets/build/ba_data/textures/pixieColor.ktx": "https://files.ballistica.net/cache/ba1/23/90/c836828f9342e6bd21612ff78938", "assets/build/ba_data/textures/pixieColor.pvr": "https://files.ballistica.net/cache/ba1/3d/ce/acca60b5cde2111bd62d90adc41e", - "assets/build/ba_data/textures/pixieColorMask.dds": "https://files.ballistica.net/cache/ba1/7f/8f/4eaddebfa9dfb7909c7cdad4b576", + "assets/build/ba_data/textures/pixieColorMask.dds": "https://files.ballistica.net/cache/ba1/82/27/8c1fe9eec5b984f42fca3d3e9381", "assets/build/ba_data/textures/pixieColorMask.ktx": "https://files.ballistica.net/cache/ba1/59/fe/138ccc612be62ef4a30b9adfbcf9", "assets/build/ba_data/textures/pixieColorMask.pvr": "https://files.ballistica.net/cache/ba1/57/84/72b8fc64aad487d406fc876b1b42", "assets/build/ba_data/textures/pixieColorMask_preview.png": "https://files.ballistica.net/cache/ba1/8a/7e/51ba798eac9278727df8a804ba35", "assets/build/ba_data/textures/pixieColor_preview.png": "https://files.ballistica.net/cache/ba1/07/86/d9bab7a777b2e38107403edfcd50", - "assets/build/ba_data/textures/pixieIcon.dds": "https://files.ballistica.net/cache/ba1/b7/f4/fd43b64dacef89608c5ab6db0377", + "assets/build/ba_data/textures/pixieIcon.dds": "https://files.ballistica.net/cache/ba1/68/32/7d731f50bf51e633df18254034a3", "assets/build/ba_data/textures/pixieIcon.ktx": "https://files.ballistica.net/cache/ba1/e8/25/576bf3a4e9e2dba964c5f18b6622", "assets/build/ba_data/textures/pixieIcon.pvr": "https://files.ballistica.net/cache/ba1/21/72/ba1ca96c4f017c11cffaec11d788", - "assets/build/ba_data/textures/pixieIconColorMask.dds": "https://files.ballistica.net/cache/ba1/1d/8c/bcfcc534447ae4a5eb33effa157c", + "assets/build/ba_data/textures/pixieIconColorMask.dds": "https://files.ballistica.net/cache/ba1/3c/25/1f57bdf36447463ad1065a614c7f", "assets/build/ba_data/textures/pixieIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/76/3f/caf7f06633052fa327db6eaa39d6", "assets/build/ba_data/textures/pixieIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/1f/1e/da8a3c0f1a42acbe09140e29609d", "assets/build/ba_data/textures/pixieIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/18/f4/e96160f142153a37f9e0919c883e", @@ -2006,7 +2006,7 @@ "assets/build/ba_data/textures/powerupBomb.ktx": "https://files.ballistica.net/cache/ba1/1b/bc/5bf3f52c9f880476221d63a41ee1", "assets/build/ba_data/textures/powerupBomb.pvr": "https://files.ballistica.net/cache/ba1/99/05/7144537430a306d45efbd75f733f", "assets/build/ba_data/textures/powerupBomb_preview.png": "https://files.ballistica.net/cache/ba1/75/17/31e7f1997e0f3304b597a062efa7", - "assets/build/ba_data/textures/powerupCurse.dds": "https://files.ballistica.net/cache/ba1/2e/ff/9c66e6f7c1a973155e68ab5560a8", + "assets/build/ba_data/textures/powerupCurse.dds": "https://files.ballistica.net/cache/ba1/6f/cd/50c78074de3f655afe1d029ffce8", "assets/build/ba_data/textures/powerupCurse.ktx": "https://files.ballistica.net/cache/ba1/40/4f/0648e5b36ad56442fdba6e07ce6c", "assets/build/ba_data/textures/powerupCurse.pvr": "https://files.ballistica.net/cache/ba1/31/2b/01f49d263a0915691651ae6b8196", "assets/build/ba_data/textures/powerupCurse_preview.png": "https://files.ballistica.net/cache/ba1/07/21/962169962af41bec8c43cf3d01a1", @@ -2014,7 +2014,7 @@ "assets/build/ba_data/textures/powerupHealth.ktx": "https://files.ballistica.net/cache/ba1/be/3e/5bd4f2ac8d7bf972571f89992264", "assets/build/ba_data/textures/powerupHealth.pvr": "https://files.ballistica.net/cache/ba1/64/ec/f1507c9ed94d0bd4b0c9ab8569da", "assets/build/ba_data/textures/powerupHealth_preview.png": "https://files.ballistica.net/cache/ba1/42/11/e09c9daf2dadf44be3b9249e3fa4", - "assets/build/ba_data/textures/powerupIceBombs.dds": "https://files.ballistica.net/cache/ba1/03/8e/96c1d4ef593ea45528f2dda9853c", + "assets/build/ba_data/textures/powerupIceBombs.dds": "https://files.ballistica.net/cache/ba1/9f/4d/af9b3707142271e4b6090c19f330", "assets/build/ba_data/textures/powerupIceBombs.ktx": "https://files.ballistica.net/cache/ba1/27/6e/3b2b5fa2e68a073db9ed5c67da39", "assets/build/ba_data/textures/powerupIceBombs.pvr": "https://files.ballistica.net/cache/ba1/b3/32/b9c0df53502d4402b36b8bdba951", "assets/build/ba_data/textures/powerupIceBombs_preview.png": "https://files.ballistica.net/cache/ba1/61/8b/7f43a09b4ca30edef5099cecbbb1", @@ -2022,7 +2022,7 @@ "assets/build/ba_data/textures/powerupImpactBombs.ktx": "https://files.ballistica.net/cache/ba1/49/0c/df4b313585f897592ccee9d5c542", "assets/build/ba_data/textures/powerupImpactBombs.pvr": "https://files.ballistica.net/cache/ba1/f2/1b/8b6c447613d2bbec20cff630b1f1", "assets/build/ba_data/textures/powerupImpactBombs_preview.png": "https://files.ballistica.net/cache/ba1/0c/33/5d041471446792bb5da31291b869", - "assets/build/ba_data/textures/powerupLandMines.dds": "https://files.ballistica.net/cache/ba1/8b/96/2731079019cf1688415831619c76", + "assets/build/ba_data/textures/powerupLandMines.dds": "https://files.ballistica.net/cache/ba1/99/f8/ea06e3d99018797fe82841988cce", "assets/build/ba_data/textures/powerupLandMines.ktx": "https://files.ballistica.net/cache/ba1/79/ac/333130d040444c03fbcf7302e35b", "assets/build/ba_data/textures/powerupLandMines.pvr": "https://files.ballistica.net/cache/ba1/2b/7a/4ac9f04cfa3a59e19fd3ddd72b2e", "assets/build/ba_data/textures/powerupLandMines_preview.png": "https://files.ballistica.net/cache/ba1/21/bc/b619e59db015ed4cc8020972a336", @@ -2038,31 +2038,31 @@ "assets/build/ba_data/textures/powerupSpeed.ktx": "https://files.ballistica.net/cache/ba1/2e/fc/63e2a260e55d0d33ed0dc4400cb0", "assets/build/ba_data/textures/powerupSpeed.pvr": "https://files.ballistica.net/cache/ba1/35/c1/657cc9772d575786c21d2575034d", "assets/build/ba_data/textures/powerupSpeed_preview.png": "https://files.ballistica.net/cache/ba1/f1/2a/278da1921f939809afad254fbb03", - "assets/build/ba_data/textures/powerupStickyBombs.dds": "https://files.ballistica.net/cache/ba1/eb/e0/0191d68d9daf896e9d2298c57941", + "assets/build/ba_data/textures/powerupStickyBombs.dds": "https://files.ballistica.net/cache/ba1/02/93/92f9be86367f44404b8257bdbf6c", "assets/build/ba_data/textures/powerupStickyBombs.ktx": "https://files.ballistica.net/cache/ba1/fd/1b/0a64a4e0149e6c9acc3bd5710283", "assets/build/ba_data/textures/powerupStickyBombs.pvr": "https://files.ballistica.net/cache/ba1/f5/44/ea00c858e1fdd2c73ae953b6fbe5", "assets/build/ba_data/textures/powerupStickyBombs_preview.png": "https://files.ballistica.net/cache/ba1/76/67/7e11feb9a7f94a68be36128e9afd", - "assets/build/ba_data/textures/puckColor.dds": "https://files.ballistica.net/cache/ba1/55/0f/0ad93b23a0a4d86ce4799135b26d", + "assets/build/ba_data/textures/puckColor.dds": "https://files.ballistica.net/cache/ba1/14/5f/893c54c1ccb320272450c24d232b", "assets/build/ba_data/textures/puckColor.ktx": "https://files.ballistica.net/cache/ba1/91/a8/49adfe0386637b17fd0d5df798d5", "assets/build/ba_data/textures/puckColor.pvr": "https://files.ballistica.net/cache/ba1/00/54/b9d50d210bfba69387909e6e91de", "assets/build/ba_data/textures/puckColor_preview.png": "https://files.ballistica.net/cache/ba1/bd/c4/4a3a3dcb8c1084a34479d43dcaed", - "assets/build/ba_data/textures/rampageBGColor.dds": "https://files.ballistica.net/cache/ba1/34/2b/e98df914e71d6789e771ea70a264", + "assets/build/ba_data/textures/rampageBGColor.dds": "https://files.ballistica.net/cache/ba1/37/a1/a11281d3002afc84c3d28db58395", "assets/build/ba_data/textures/rampageBGColor.ktx": "https://files.ballistica.net/cache/ba1/b0/39/acaf74037621c74a29a72576ee20", "assets/build/ba_data/textures/rampageBGColor.pvr": "https://files.ballistica.net/cache/ba1/6b/9d/54521c22a5e2de98eabfb985fa85", - "assets/build/ba_data/textures/rampageBGColor2.dds": "https://files.ballistica.net/cache/ba1/22/94/8c49d6e549a2f08076d48417fb40", + "assets/build/ba_data/textures/rampageBGColor2.dds": "https://files.ballistica.net/cache/ba1/08/35/b2aca6e05626aaf870cceb35ba8e", "assets/build/ba_data/textures/rampageBGColor2.ktx": "https://files.ballistica.net/cache/ba1/60/23/d866c382fc22fdea03bf2527d147", "assets/build/ba_data/textures/rampageBGColor2.pvr": "https://files.ballistica.net/cache/ba1/3e/69/d3c1a9d7f8910199598f010efd8a", "assets/build/ba_data/textures/rampageBGColor2_preview.png": "https://files.ballistica.net/cache/ba1/79/f6/068a9185d32b580a4e73806d8d12", "assets/build/ba_data/textures/rampageBGColor_preview.png": "https://files.ballistica.net/cache/ba1/38/39/0a2366c421eacc7c5a051c430e15", - "assets/build/ba_data/textures/rampageLevelColor.dds": "https://files.ballistica.net/cache/ba1/81/69/f4b28c3c4713d96e3cb208bcfbce", + "assets/build/ba_data/textures/rampageLevelColor.dds": "https://files.ballistica.net/cache/ba1/fe/40/41c878b5db3ebe47686d8a605cf6", "assets/build/ba_data/textures/rampageLevelColor.ktx": "https://files.ballistica.net/cache/ba1/ef/06/d2ac2ec0f775180b62e341a5890f", "assets/build/ba_data/textures/rampageLevelColor.pvr": "https://files.ballistica.net/cache/ba1/8a/74/ff813c81875c81cd8ccd345c5a27", "assets/build/ba_data/textures/rampageLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/b9/db/0920892160b677dac33844acb9e3", - "assets/build/ba_data/textures/rampagePreview.dds": "https://files.ballistica.net/cache/ba1/09/56/67a073d1abfec5e861e3412bca94", + "assets/build/ba_data/textures/rampagePreview.dds": "https://files.ballistica.net/cache/ba1/15/af/3089f17f4e969b3780c92ef1ba58", "assets/build/ba_data/textures/rampagePreview.ktx": "https://files.ballistica.net/cache/ba1/b3/80/783d2507b45af55ebe7d9e4aa7b1", "assets/build/ba_data/textures/rampagePreview.pvr": "https://files.ballistica.net/cache/ba1/97/d2/99028f0da86ef4d61a70da709c29", "assets/build/ba_data/textures/rampagePreview_preview.png": "https://files.ballistica.net/cache/ba1/4f/64/6469bc8cfe52cdd9590c1edbc89c", - "assets/build/ba_data/textures/reflectionChar_+x.dds": "https://files.ballistica.net/cache/ba1/2c/ec/82270cbcd6f3fc72aa1c69036163", + "assets/build/ba_data/textures/reflectionChar_+x.dds": "https://files.ballistica.net/cache/ba1/5b/6d/76948a60ad687d91d4db8696ff35", "assets/build/ba_data/textures/reflectionChar_+x.ktx": "https://files.ballistica.net/cache/ba1/d2/31/6eb2af3d54a5a9b194f5fd5a0cd7", "assets/build/ba_data/textures/reflectionChar_+x.pvr": "https://files.ballistica.net/cache/ba1/45/72/1bf60fc63ee6024e2c62026e1d13", "assets/build/ba_data/textures/reflectionChar_+x_preview.png": "https://files.ballistica.net/cache/ba1/3e/19/1545732b54357b959468baeadb05", @@ -2078,7 +2078,7 @@ "assets/build/ba_data/textures/reflectionChar_-x.ktx": "https://files.ballistica.net/cache/ba1/7b/a7/6592e876e7c31687e11e019a305d", "assets/build/ba_data/textures/reflectionChar_-x.pvr": "https://files.ballistica.net/cache/ba1/88/fb/372bde1b68e238da396a7576088f", "assets/build/ba_data/textures/reflectionChar_-x_preview.png": "https://files.ballistica.net/cache/ba1/81/8f/422c1c54b3021abc70a4aa64b3fd", - "assets/build/ba_data/textures/reflectionChar_-y.dds": "https://files.ballistica.net/cache/ba1/45/c3/d1f2ffdb624d2236eb41e93b79cc", + "assets/build/ba_data/textures/reflectionChar_-y.dds": "https://files.ballistica.net/cache/ba1/25/03/628a5da0305261041300f75ef756", "assets/build/ba_data/textures/reflectionChar_-y.ktx": "https://files.ballistica.net/cache/ba1/25/1f/4e5b9240dcf6ea6639fb81f3579a", "assets/build/ba_data/textures/reflectionChar_-y.pvr": "https://files.ballistica.net/cache/ba1/4e/ee/7cdca1ae6b1458a443262c5a4e9c", "assets/build/ba_data/textures/reflectionChar_-y_preview.png": "https://files.ballistica.net/cache/ba1/ba/70/f2f188b95e2735467e823c94504a", @@ -2086,7 +2086,7 @@ "assets/build/ba_data/textures/reflectionChar_-z.ktx": "https://files.ballistica.net/cache/ba1/96/56/0f9aef42c876c3d2832ba570de79", "assets/build/ba_data/textures/reflectionChar_-z.pvr": "https://files.ballistica.net/cache/ba1/60/68/cb7fefc89119f14265c58200afde", "assets/build/ba_data/textures/reflectionChar_-z_preview.png": "https://files.ballistica.net/cache/ba1/b5/10/70b59c9cd551b44f8422867a38c2", - "assets/build/ba_data/textures/reflectionPowerup_+x.dds": "https://files.ballistica.net/cache/ba1/aa/16/e46748f64851d1f0fd6c3b0bab9a", + "assets/build/ba_data/textures/reflectionPowerup_+x.dds": "https://files.ballistica.net/cache/ba1/4b/3d/76538e3f18edb2a373bb3b591314", "assets/build/ba_data/textures/reflectionPowerup_+x.ktx": "https://files.ballistica.net/cache/ba1/a6/9b/682e676c993ae660475b4467fa6a", "assets/build/ba_data/textures/reflectionPowerup_+x.pvr": "https://files.ballistica.net/cache/ba1/f9/45/2b58be3bf14314607a25143fb477", "assets/build/ba_data/textures/reflectionPowerup_+x_preview.png": "https://files.ballistica.net/cache/ba1/66/cc/5021c0239527286f8c8f63aad21a", @@ -2118,11 +2118,11 @@ "assets/build/ba_data/textures/reflectionSharp_+y.ktx": "https://files.ballistica.net/cache/ba1/2c/a5/141e266b590226ee4a3474ac874e", "assets/build/ba_data/textures/reflectionSharp_+y.pvr": "https://files.ballistica.net/cache/ba1/a5/10/cdd96a99404584f090032ca60e62", "assets/build/ba_data/textures/reflectionSharp_+y_preview.png": "https://files.ballistica.net/cache/ba1/0f/58/f04fac2b705b92c8b0e11036a8ff", - "assets/build/ba_data/textures/reflectionSharp_+z.dds": "https://files.ballistica.net/cache/ba1/ac/4b/db6e2bf52594a0cb882d17579bec", + "assets/build/ba_data/textures/reflectionSharp_+z.dds": "https://files.ballistica.net/cache/ba1/2a/be/a4ec2fb348452797276aa8a7ea52", "assets/build/ba_data/textures/reflectionSharp_+z.ktx": "https://files.ballistica.net/cache/ba1/21/2c/51df5254932dac26b7068bc1e044", "assets/build/ba_data/textures/reflectionSharp_+z.pvr": "https://files.ballistica.net/cache/ba1/e4/87/2eaf17f6a15512b4326c7a2ae395", "assets/build/ba_data/textures/reflectionSharp_+z_preview.png": "https://files.ballistica.net/cache/ba1/1f/14/cd9fa509c22fea0f73a5eb76ac54", - "assets/build/ba_data/textures/reflectionSharp_-x.dds": "https://files.ballistica.net/cache/ba1/d7/b4/19de232b288604ffd66e48b182cf", + "assets/build/ba_data/textures/reflectionSharp_-x.dds": "https://files.ballistica.net/cache/ba1/8f/2f/def7cd6049055701946f6ba7efcb", "assets/build/ba_data/textures/reflectionSharp_-x.ktx": "https://files.ballistica.net/cache/ba1/04/cf/03b8b252c6d0a14b4a74df1697b2", "assets/build/ba_data/textures/reflectionSharp_-x.pvr": "https://files.ballistica.net/cache/ba1/f3/5b/36f37a9ca99d555c8950524ca118", "assets/build/ba_data/textures/reflectionSharp_-x_preview.png": "https://files.ballistica.net/cache/ba1/80/18/f2f8c9ce1f0dc8f297e0b29def1b", @@ -2134,7 +2134,7 @@ "assets/build/ba_data/textures/reflectionSharp_-z.ktx": "https://files.ballistica.net/cache/ba1/09/79/7c34e93c1453fa653098644dc902", "assets/build/ba_data/textures/reflectionSharp_-z.pvr": "https://files.ballistica.net/cache/ba1/08/d2/fa84664b3558ce68269581d52ab3", "assets/build/ba_data/textures/reflectionSharp_-z_preview.png": "https://files.ballistica.net/cache/ba1/e0/6e/de9a4cfdcb483bf92a63ac64e435", - "assets/build/ba_data/textures/reflectionSharper_+x.dds": "https://files.ballistica.net/cache/ba1/86/21/0ed2cff91343e7d697e3fdbc9d15", + "assets/build/ba_data/textures/reflectionSharper_+x.dds": "https://files.ballistica.net/cache/ba1/ed/05/68ad6e013833ba230bee61037591", "assets/build/ba_data/textures/reflectionSharper_+x.ktx": "https://files.ballistica.net/cache/ba1/ab/9b/243e80e52d6f837f206472054489", "assets/build/ba_data/textures/reflectionSharper_+x.pvr": "https://files.ballistica.net/cache/ba1/70/29/f1847b9d9c4892e3d383c8136b28", "assets/build/ba_data/textures/reflectionSharper_+x_preview.png": "https://files.ballistica.net/cache/ba1/22/db/1afb62440951a98fcf57663d5884", @@ -2202,7 +2202,7 @@ "assets/build/ba_data/textures/reflectionSoft_-y.ktx": "https://files.ballistica.net/cache/ba1/c7/af/7e09853ae6f0487e3a4122ac31d5", "assets/build/ba_data/textures/reflectionSoft_-y.pvr": "https://files.ballistica.net/cache/ba1/80/81/e5428d62dd5a31f708a68b258366", "assets/build/ba_data/textures/reflectionSoft_-y_preview.png": "https://files.ballistica.net/cache/ba1/2f/e1/b0cee0f161188752abcba04c9291", - "assets/build/ba_data/textures/reflectionSoft_-z.dds": "https://files.ballistica.net/cache/ba1/35/65/f84fc0c302b96ffde8d816c118c4", + "assets/build/ba_data/textures/reflectionSoft_-z.dds": "https://files.ballistica.net/cache/ba1/14/be/6bab80deb23a5105dd1ddd57740b", "assets/build/ba_data/textures/reflectionSoft_-z.ktx": "https://files.ballistica.net/cache/ba1/55/b2/45ec181ec07cd28be1a089b6bb79", "assets/build/ba_data/textures/reflectionSoft_-z.pvr": "https://files.ballistica.net/cache/ba1/67/6e/271b323497b797718b7d9bd3f939", "assets/build/ba_data/textures/reflectionSoft_-z_preview.png": "https://files.ballistica.net/cache/ba1/6f/38/dce6d5c26bc45005b9355b030c94", @@ -2221,7 +2221,7 @@ "assets/build/ba_data/textures/robotColor.dds": "https://files.ballistica.net/cache/ba1/a3/c0/2f7089d363c3e22b4ab10cd1c589", "assets/build/ba_data/textures/robotColor.ktx": "https://files.ballistica.net/cache/ba1/9a/9d/dbdec15776fd014e03eb1808ad28", "assets/build/ba_data/textures/robotColor.pvr": "https://files.ballistica.net/cache/ba1/9d/24/cc381a8ff6e80947618a97d36107", - "assets/build/ba_data/textures/robotColorMask.dds": "https://files.ballistica.net/cache/ba1/9f/89/248c558b1f019a7e37c24c6f2c74", + "assets/build/ba_data/textures/robotColorMask.dds": "https://files.ballistica.net/cache/ba1/ec/0e/d1b4b152415679464cd0bf773b94", "assets/build/ba_data/textures/robotColorMask.ktx": "https://files.ballistica.net/cache/ba1/19/4e/6bf15a0ac4ba4ad3bedd5eb3a3f3", "assets/build/ba_data/textures/robotColorMask.pvr": "https://files.ballistica.net/cache/ba1/ee/88/47d89b21335c4ba8916ff4eb11fd", "assets/build/ba_data/textures/robotColorMask_preview.png": "https://files.ballistica.net/cache/ba1/03/fd/c13045e5beed778e19f9a70f81ea", @@ -2234,18 +2234,18 @@ "assets/build/ba_data/textures/robotIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/b8/65/40642024959c225ce4704b954f8f", "assets/build/ba_data/textures/robotIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/3a/c2/771b5f4aa159f61383b8bbefa291", "assets/build/ba_data/textures/robotIcon_preview.png": "https://files.ballistica.net/cache/ba1/7a/b8/1dad64c97fa4655f70490004cedc", - "assets/build/ba_data/textures/roundaboutLevelColor.dds": "https://files.ballistica.net/cache/ba1/b6/df/cc3d90cdccfc1e07c99a4a5a5851", + "assets/build/ba_data/textures/roundaboutLevelColor.dds": "https://files.ballistica.net/cache/ba1/69/bd/5a0e33f022abb454eebf4b9668ab", "assets/build/ba_data/textures/roundaboutLevelColor.ktx": "https://files.ballistica.net/cache/ba1/19/f8/d8ea41097c6dfe7bec255d85ea0a", "assets/build/ba_data/textures/roundaboutLevelColor.pvr": "https://files.ballistica.net/cache/ba1/0a/5a/19e1f33492b7ae2a9f100cf26fff", "assets/build/ba_data/textures/roundaboutLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/18/c7/7dbe95a06d9e877fbe848f415141", - "assets/build/ba_data/textures/roundaboutPreview.dds": "https://files.ballistica.net/cache/ba1/c5/62/00e8ad165d2350b7136784bc0dc7", + "assets/build/ba_data/textures/roundaboutPreview.dds": "https://files.ballistica.net/cache/ba1/a8/c2/d800722b8b7e172fcf19227abf05", "assets/build/ba_data/textures/roundaboutPreview.ktx": "https://files.ballistica.net/cache/ba1/1f/63/e4776ec44e00a0d736aec31f1dfb", "assets/build/ba_data/textures/roundaboutPreview.pvr": "https://files.ballistica.net/cache/ba1/65/1a/019c03931b513047b9a5fcb7e8af", "assets/build/ba_data/textures/roundaboutPreview_preview.png": "https://files.ballistica.net/cache/ba1/d4/df/d26e050aac7285a6f453185f0046", - "assets/build/ba_data/textures/santaColor.dds": "https://files.ballistica.net/cache/ba1/26/e6/febe3c69537cb30d8f1988cd405d", + "assets/build/ba_data/textures/santaColor.dds": "https://files.ballistica.net/cache/ba1/5f/a1/91e228dda47c28f430ec2ff226b8", "assets/build/ba_data/textures/santaColor.ktx": "https://files.ballistica.net/cache/ba1/cc/f4/de2aaaf8cc855afaaceb1e618409", "assets/build/ba_data/textures/santaColor.pvr": "https://files.ballistica.net/cache/ba1/b6/22/85dfce13ccc2a531a42a91d4dd89", - "assets/build/ba_data/textures/santaColorMask.dds": "https://files.ballistica.net/cache/ba1/5e/5f/6c47e8aa0cdfc92d06bfd3a23b6d", + "assets/build/ba_data/textures/santaColorMask.dds": "https://files.ballistica.net/cache/ba1/8a/9c/db332211cdc1deb5d60ce035d5a8", "assets/build/ba_data/textures/santaColorMask.ktx": "https://files.ballistica.net/cache/ba1/b7/b0/9ebd903f0d9e491fa6a65181de19", "assets/build/ba_data/textures/santaColorMask.pvr": "https://files.ballistica.net/cache/ba1/a8/8c/6ab8ad9a2ea2e907635286163e57", "assets/build/ba_data/textures/santaColorMask_preview.png": "https://files.ballistica.net/cache/ba1/01/c4/436aca37ae86e73db9b7c856056a", @@ -2253,7 +2253,7 @@ "assets/build/ba_data/textures/santaIcon.dds": "https://files.ballistica.net/cache/ba1/50/10/67dc3f02df57883342cc345cf72e", "assets/build/ba_data/textures/santaIcon.ktx": "https://files.ballistica.net/cache/ba1/b7/6c/f22cde80b89403aeb4e950d8e2d2", "assets/build/ba_data/textures/santaIcon.pvr": "https://files.ballistica.net/cache/ba1/a0/4c/24e260da5e86b10a86049503b986", - "assets/build/ba_data/textures/santaIconColorMask.dds": "https://files.ballistica.net/cache/ba1/6c/54/c155cd9278a8411441fe9f68f09b", + "assets/build/ba_data/textures/santaIconColorMask.dds": "https://files.ballistica.net/cache/ba1/9e/36/dbeba27f8008aa3404864070f5bc", "assets/build/ba_data/textures/santaIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/32/7a/c2d2cc16c7be82dbcff72a376f70", "assets/build/ba_data/textures/santaIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/25/db/3dfff995ae0b87511a6bb7cc8b79", "assets/build/ba_data/textures/santaIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/ca/f2/a9f44952811c708bd50525d4da30", @@ -2302,7 +2302,7 @@ "assets/build/ba_data/textures/slash.ktx": "https://files.ballistica.net/cache/ba1/54/cb/a35780a274f021fc1044b45daf99", "assets/build/ba_data/textures/slash.pvr": "https://files.ballistica.net/cache/ba1/b6/d2/fa0617f78a81fc0eacb962484729", "assets/build/ba_data/textures/slash_preview.png": "https://files.ballistica.net/cache/ba1/33/2f/060dad5afdba8162d7a3ad082df0", - "assets/build/ba_data/textures/smoke.dds": "https://files.ballistica.net/cache/ba1/66/a6/714c50394e08e6709f9470f2f02d", + "assets/build/ba_data/textures/smoke.dds": "https://files.ballistica.net/cache/ba1/c1/b5/f1c19535edd6f9abc74b85a9673a", "assets/build/ba_data/textures/smoke.ktx": "https://files.ballistica.net/cache/ba1/8c/d8/74ac19c7930bbd695f533ec09fa3", "assets/build/ba_data/textures/smoke.pvr": "https://files.ballistica.net/cache/ba1/d7/a5/014c007053212e96096b545626ea", "assets/build/ba_data/textures/smoke_preview.png": "https://files.ballistica.net/cache/ba1/b1/c6/52443210c0229920389219868dcc", @@ -2318,7 +2318,7 @@ "assets/build/ba_data/textures/softRectVertical.pvr": "https://files.ballistica.net/cache/ba1/4d/19/857d457d9b5a0279a80dceea2cd3", "assets/build/ba_data/textures/softRectVertical_preview.png": "https://files.ballistica.net/cache/ba1/56/0f/524a88de51160a96224fb40249c1", "assets/build/ba_data/textures/softRect_preview.png": "https://files.ballistica.net/cache/ba1/5e/31/512ca0d886a0d866f194f875c3db", - "assets/build/ba_data/textures/sparks.dds": "https://files.ballistica.net/cache/ba1/0a/c4/0514ac00c5978979f65fbdf1b56e", + "assets/build/ba_data/textures/sparks.dds": "https://files.ballistica.net/cache/ba1/89/77/00c8ba51a9cf06bfc0a0a427efc3", "assets/build/ba_data/textures/sparks.ktx": "https://files.ballistica.net/cache/ba1/3d/6d/beee025480e5711ecd52bc5f6b07", "assets/build/ba_data/textures/sparks.pvr": "https://files.ballistica.net/cache/ba1/39/af/5b9e1081c0973f5e853c11fa06bc", "assets/build/ba_data/textures/sparks_preview.png": "https://files.ballistica.net/cache/ba1/19/fc/4a53d76b56ea0f0c3d5eaeed93b4", @@ -2330,11 +2330,11 @@ "assets/build/ba_data/textures/startButton.ktx": "https://files.ballistica.net/cache/ba1/ef/9a/9323a447cb7cf8fa119bbeadbf7c", "assets/build/ba_data/textures/startButton.pvr": "https://files.ballistica.net/cache/ba1/a8/25/74bd9ee857764fba362a0ecdc9b3", "assets/build/ba_data/textures/startButton_preview.png": "https://files.ballistica.net/cache/ba1/ba/d5/48858f0b1a1e0e4043762d4b0216", - "assets/build/ba_data/textures/stepRightUpLevelColor.dds": "https://files.ballistica.net/cache/ba1/58/51/eec340a570c3797198bcd9c7c205", + "assets/build/ba_data/textures/stepRightUpLevelColor.dds": "https://files.ballistica.net/cache/ba1/aa/27/277f7741294d367810f01ef150f8", "assets/build/ba_data/textures/stepRightUpLevelColor.ktx": "https://files.ballistica.net/cache/ba1/6f/35/3380ac50585bce22311666d28782", "assets/build/ba_data/textures/stepRightUpLevelColor.pvr": "https://files.ballistica.net/cache/ba1/8b/fb/eba3c0faa304123c784c888d0c65", "assets/build/ba_data/textures/stepRightUpLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/5d/b9/bcdca38ad1d808b541b8008d5555", - "assets/build/ba_data/textures/stepRightUpPreview.dds": "https://files.ballistica.net/cache/ba1/26/45/d61d7173f3875fb5a8e7a748b2df", + "assets/build/ba_data/textures/stepRightUpPreview.dds": "https://files.ballistica.net/cache/ba1/ce/8f/8843ebbc561cf5dd44eb657b797d", "assets/build/ba_data/textures/stepRightUpPreview.ktx": "https://files.ballistica.net/cache/ba1/bd/75/7b19bfb14c8a73ae9a42156d70f2", "assets/build/ba_data/textures/stepRightUpPreview.pvr": "https://files.ballistica.net/cache/ba1/fe/44/e09c5a523cb3e8576709256c79a9", "assets/build/ba_data/textures/stepRightUpPreview_preview.png": "https://files.ballistica.net/cache/ba1/ad/ff/086bca9f87fdc17bae4bd55e904f", @@ -2357,7 +2357,7 @@ "assets/build/ba_data/textures/superheroColor.dds": "https://files.ballistica.net/cache/ba1/20/22/1e1f70c67cdbf49ce120b454f76a", "assets/build/ba_data/textures/superheroColor.ktx": "https://files.ballistica.net/cache/ba1/6d/7c/bc6c4f9b237301fefea90f27f9a0", "assets/build/ba_data/textures/superheroColor.pvr": "https://files.ballistica.net/cache/ba1/48/12/34feeaf8bb9724e3d084b96cda3b", - "assets/build/ba_data/textures/superheroColorMask.dds": "https://files.ballistica.net/cache/ba1/3b/2f/c7890bc048477e15698c7663b3d4", + "assets/build/ba_data/textures/superheroColorMask.dds": "https://files.ballistica.net/cache/ba1/68/a5/b09635c375edc462cf4b102c3236", "assets/build/ba_data/textures/superheroColorMask.ktx": "https://files.ballistica.net/cache/ba1/a5/19/f7169d492c759f9f3416887df9d5", "assets/build/ba_data/textures/superheroColorMask.pvr": "https://files.ballistica.net/cache/ba1/39/dc/256d7b9203f90032bbe21cec3a03", "assets/build/ba_data/textures/superheroColorMask_preview.png": "https://files.ballistica.net/cache/ba1/7d/f0/d05466477b420b25ff7dd881c87b", @@ -2374,11 +2374,11 @@ "assets/build/ba_data/textures/textClearButton.ktx": "https://files.ballistica.net/cache/ba1/05/60/2ae6636eb10907f2973342229949", "assets/build/ba_data/textures/textClearButton.pvr": "https://files.ballistica.net/cache/ba1/b1/32/dc45a735786df68c442b16a62a57", "assets/build/ba_data/textures/textClearButton_preview.png": "https://files.ballistica.net/cache/ba1/12/64/67e74f9e5d77ba1230304ea40497", - "assets/build/ba_data/textures/thePadLevelColor.dds": "https://files.ballistica.net/cache/ba1/7c/0d/09d84d8de458a7bcc7343b65ab9f", + "assets/build/ba_data/textures/thePadLevelColor.dds": "https://files.ballistica.net/cache/ba1/61/17/6fb9d7fef2499c9ef5e3eb7ac928", "assets/build/ba_data/textures/thePadLevelColor.ktx": "https://files.ballistica.net/cache/ba1/4e/34/bf0d6a8b0e64cf7fef14b1ec9da5", "assets/build/ba_data/textures/thePadLevelColor.pvr": "https://files.ballistica.net/cache/ba1/27/ad/471ab1086db8d6669040fc48742a", "assets/build/ba_data/textures/thePadLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/88/1d/42616ff95265cb0d0db6c353a044", - "assets/build/ba_data/textures/thePadPreview.dds": "https://files.ballistica.net/cache/ba1/cd/ee/a4e2f05ada77eab50013534e46fc", + "assets/build/ba_data/textures/thePadPreview.dds": "https://files.ballistica.net/cache/ba1/12/67/c64f2c3a5726712453400859e0f3", "assets/build/ba_data/textures/thePadPreview.ktx": "https://files.ballistica.net/cache/ba1/5e/11/ff9caf9657a7c439b2e0fab39049", "assets/build/ba_data/textures/thePadPreview.pvr": "https://files.ballistica.net/cache/ba1/5a/8f/4061a1deafca6ba331738f6c9db8", "assets/build/ba_data/textures/thePadPreview_preview.png": "https://files.ballistica.net/cache/ba1/94/12/ec4cc8f0378cf62f811122e6faec", @@ -2402,11 +2402,11 @@ "assets/build/ba_data/textures/ticketsMore.pvr": "https://files.ballistica.net/cache/ba1/59/1a/73c4109d96e85316c2c46ff2c025", "assets/build/ba_data/textures/ticketsMore_preview.png": "https://files.ballistica.net/cache/ba1/24/01/32ba85edd6394dd56562f64eee09", "assets/build/ba_data/textures/tickets_preview.png": "https://files.ballistica.net/cache/ba1/90/ce/b693dd116e50d1b0eff488cfdd98", - "assets/build/ba_data/textures/tipTopBGColor.dds": "https://files.ballistica.net/cache/ba1/ac/31/d9009e21104f4131117610ba03a0", + "assets/build/ba_data/textures/tipTopBGColor.dds": "https://files.ballistica.net/cache/ba1/19/bf/258c624e1b3e3e3efabeefe3dd20", "assets/build/ba_data/textures/tipTopBGColor.ktx": "https://files.ballistica.net/cache/ba1/39/8c/a9f1ba489b23f5d899bb3f9941b1", "assets/build/ba_data/textures/tipTopBGColor.pvr": "https://files.ballistica.net/cache/ba1/1b/0d/89ecc99bc58aa985f00f7097177a", "assets/build/ba_data/textures/tipTopBGColor_preview.png": "https://files.ballistica.net/cache/ba1/54/0b/9978639a58e703cece49de6523b7", - "assets/build/ba_data/textures/tipTopLevelColor.dds": "https://files.ballistica.net/cache/ba1/5f/d8/d29d224f0fcdcbf04ce625945baf", + "assets/build/ba_data/textures/tipTopLevelColor.dds": "https://files.ballistica.net/cache/ba1/d9/9d/5887220819a9bceaf547349cc1f3", "assets/build/ba_data/textures/tipTopLevelColor.ktx": "https://files.ballistica.net/cache/ba1/4f/77/17f60fceaa239805af2bb7a169be", "assets/build/ba_data/textures/tipTopLevelColor.pvr": "https://files.ballistica.net/cache/ba1/8b/20/240ddac5158fb481ce41c50a86ce", "assets/build/ba_data/textures/tipTopLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/75/88/019f15db873f836c5651b1b12130", @@ -2426,15 +2426,15 @@ "assets/build/ba_data/textures/touchArrowsActions.pvr": "https://files.ballistica.net/cache/ba1/74/1b/7642cfb899d1337073b10855d01d", "assets/build/ba_data/textures/touchArrowsActions_preview.png": "https://files.ballistica.net/cache/ba1/3c/21/1933b01847e20ed77164097aaea5", "assets/build/ba_data/textures/touchArrows_preview.png": "https://files.ballistica.net/cache/ba1/14/bd/595019a7e3b87bd844f8a60bf04c", - "assets/build/ba_data/textures/towerDLevelColor.dds": "https://files.ballistica.net/cache/ba1/08/c1/8925800c38503c077829f7b3fa96", + "assets/build/ba_data/textures/towerDLevelColor.dds": "https://files.ballistica.net/cache/ba1/8a/1f/997dafb004fe5b2122c66ae66302", "assets/build/ba_data/textures/towerDLevelColor.ktx": "https://files.ballistica.net/cache/ba1/8d/42/47252953095838210efdf6abc37d", "assets/build/ba_data/textures/towerDLevelColor.pvr": "https://files.ballistica.net/cache/ba1/9f/18/de2d35f9737871b3a1a914561428", "assets/build/ba_data/textures/towerDLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/d4/e2/96ed47c7c856cf772a74f7385fab", - "assets/build/ba_data/textures/towerDPreview.dds": "https://files.ballistica.net/cache/ba1/de/cc/3810b38d96b849375c4d9a416665", + "assets/build/ba_data/textures/towerDPreview.dds": "https://files.ballistica.net/cache/ba1/4f/91/7de86add4cdc30060477c93e2aa6", "assets/build/ba_data/textures/towerDPreview.ktx": "https://files.ballistica.net/cache/ba1/e9/3a/d62eb672f3f26757b59f4d6d9e48", "assets/build/ba_data/textures/towerDPreview.pvr": "https://files.ballistica.net/cache/ba1/be/40/cc2ad06c0c08a1b937a2165f3bdb", "assets/build/ba_data/textures/towerDPreview_preview.png": "https://files.ballistica.net/cache/ba1/20/80/2314d36626f44f2ded99773ce267", - "assets/build/ba_data/textures/treesColor.dds": "https://files.ballistica.net/cache/ba1/ff/c9/f24bda9787c79435fea19b8ff647", + "assets/build/ba_data/textures/treesColor.dds": "https://files.ballistica.net/cache/ba1/a9/c6/e78e8aecedb379288c5a2d6e41f0", "assets/build/ba_data/textures/treesColor.ktx": "https://files.ballistica.net/cache/ba1/e7/19/2b8b0c8cfd26839ebd1d514354b7", "assets/build/ba_data/textures/treesColor.pvr": "https://files.ballistica.net/cache/ba1/03/b2/159518817084766a2cc464ba0a1b", "assets/build/ba_data/textures/treesColor_preview.png": "https://files.ballistica.net/cache/ba1/72/2b/7addb4861a6a8cd09748248e4de4", @@ -2462,14 +2462,14 @@ "assets/build/ba_data/textures/usersButton.ktx": "https://files.ballistica.net/cache/ba1/5b/e6/34fb5d6f905c30b3a2b9aa9e5734", "assets/build/ba_data/textures/usersButton.pvr": "https://files.ballistica.net/cache/ba1/0a/de/0f45f12e34557fb1141d7a266a0d", "assets/build/ba_data/textures/usersButton_preview.png": "https://files.ballistica.net/cache/ba1/1a/fc/7d74541cd06ad5db3de119418f81", - "assets/build/ba_data/textures/vrFillMound.dds": "https://files.ballistica.net/cache/ba1/03/2e/06c7ee248c6adef3fde077f4e4e1", + "assets/build/ba_data/textures/vrFillMound.dds": "https://files.ballistica.net/cache/ba1/bc/b3/8e14500bb766cf3639ea003cd9af", "assets/build/ba_data/textures/vrFillMound.ktx": "https://files.ballistica.net/cache/ba1/5d/1e/e86c34fd33355e21955d3d48bfe6", "assets/build/ba_data/textures/vrFillMound.pvr": "https://files.ballistica.net/cache/ba1/e8/da/46ed26badb88b6fd10abc37f35f6", "assets/build/ba_data/textures/vrFillMound_preview.png": "https://files.ballistica.net/cache/ba1/fd/33/4f817cfe06d2f8a04c395a9dc960", "assets/build/ba_data/textures/warriorColor.dds": "https://files.ballistica.net/cache/ba1/f2/51/d42750c9df1f55f39c134c925c7f", "assets/build/ba_data/textures/warriorColor.ktx": "https://files.ballistica.net/cache/ba1/e7/72/6f9a3314300c12b5ffd99a4d0000", "assets/build/ba_data/textures/warriorColor.pvr": "https://files.ballistica.net/cache/ba1/f2/63/d8bf3ba74b47932b4465847ef133", - "assets/build/ba_data/textures/warriorColorMask.dds": "https://files.ballistica.net/cache/ba1/9f/d5/4787b04a7004e2b830f37cea8f2d", + "assets/build/ba_data/textures/warriorColorMask.dds": "https://files.ballistica.net/cache/ba1/e4/4c/e0ccd356704be279c55ad5d7bc68", "assets/build/ba_data/textures/warriorColorMask.ktx": "https://files.ballistica.net/cache/ba1/d4/22/c8c01a12e9ec10f214659ce9faa4", "assets/build/ba_data/textures/warriorColorMask.pvr": "https://files.ballistica.net/cache/ba1/17/c5/87586c89935377cb8d4336713094", "assets/build/ba_data/textures/warriorColorMask_preview.png": "https://files.ballistica.net/cache/ba1/d9/97/16b01e9e4bf3bdc8c57672526158", @@ -2501,7 +2501,7 @@ "assets/build/ba_data/textures/witchColor.dds": "https://files.ballistica.net/cache/ba1/41/36/4b562ef0323d0b3ad88fea31bec8", "assets/build/ba_data/textures/witchColor.ktx": "https://files.ballistica.net/cache/ba1/f2/32/d61ee331287b1c4e508a1f6ea317", "assets/build/ba_data/textures/witchColor.pvr": "https://files.ballistica.net/cache/ba1/e5/f4/1ae61921f42efa27ed72120337a1", - "assets/build/ba_data/textures/witchColorMask.dds": "https://files.ballistica.net/cache/ba1/39/b4/db14abde641fa3b63447936f2f9b", + "assets/build/ba_data/textures/witchColorMask.dds": "https://files.ballistica.net/cache/ba1/85/13/5d498983b93a3b27565525e60e03", "assets/build/ba_data/textures/witchColorMask.ktx": "https://files.ballistica.net/cache/ba1/e0/23/4fb45223a969626489041af0de9f", "assets/build/ba_data/textures/witchColorMask.pvr": "https://files.ballistica.net/cache/ba1/ab/d9/d03a2366b07854e7c82cd0e1e443", "assets/build/ba_data/textures/witchColorMask_preview.png": "https://files.ballistica.net/cache/ba1/49/7f/61faa30b3b091c142c1212a85019", @@ -2514,18 +2514,18 @@ "assets/build/ba_data/textures/witchIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/2e/76/a2b8bfd7868a47c11b2c5fd1660b", "assets/build/ba_data/textures/witchIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/49/bc/8479175256d1e62e607b2c392f2d", "assets/build/ba_data/textures/witchIcon_preview.png": "https://files.ballistica.net/cache/ba1/5f/96/cb2eb1c3a9fb0240f5748c5c1da5", - "assets/build/ba_data/textures/wizardColor.dds": "https://files.ballistica.net/cache/ba1/91/1b/af0d8cd18532d766b4b129317ed4", + "assets/build/ba_data/textures/wizardColor.dds": "https://files.ballistica.net/cache/ba1/ec/e9/fcbc0fc4d1fc397f8ec5b498337f", "assets/build/ba_data/textures/wizardColor.ktx": "https://files.ballistica.net/cache/ba1/50/da/d0569142ec7924ca40eccf82a930", "assets/build/ba_data/textures/wizardColor.pvr": "https://files.ballistica.net/cache/ba1/11/dc/b7f4a083ef2a93d7834b3d841443", - "assets/build/ba_data/textures/wizardColorMask.dds": "https://files.ballistica.net/cache/ba1/ad/cc/a104746ef03fa4a788e118424fc4", + "assets/build/ba_data/textures/wizardColorMask.dds": "https://files.ballistica.net/cache/ba1/b4/32/3d46d2e5920e7530b384d7626617", "assets/build/ba_data/textures/wizardColorMask.ktx": "https://files.ballistica.net/cache/ba1/0d/0d/80e2b947ebd3dbde1330682f62a4", "assets/build/ba_data/textures/wizardColorMask.pvr": "https://files.ballistica.net/cache/ba1/5a/7c/9933e396902aca69b786468d1c38", "assets/build/ba_data/textures/wizardColorMask_preview.png": "https://files.ballistica.net/cache/ba1/44/93/65a9e806485cd757e6a05655916a", "assets/build/ba_data/textures/wizardColor_preview.png": "https://files.ballistica.net/cache/ba1/cf/3c/3db3b3f5b6dab73f8b8a5353fe1a", - "assets/build/ba_data/textures/wizardIcon.dds": "https://files.ballistica.net/cache/ba1/0a/79/2ccd8ee9c225bf6a969f8f29d5d9", + "assets/build/ba_data/textures/wizardIcon.dds": "https://files.ballistica.net/cache/ba1/e6/2f/74df3fe2e97c960ff1ca64aed588", "assets/build/ba_data/textures/wizardIcon.ktx": "https://files.ballistica.net/cache/ba1/b9/3d/2c10de406177de22b8e89c9cb3b3", "assets/build/ba_data/textures/wizardIcon.pvr": "https://files.ballistica.net/cache/ba1/e3/c0/7d62f35ec06d5c4442a92b175cc0", - "assets/build/ba_data/textures/wizardIconColorMask.dds": "https://files.ballistica.net/cache/ba1/f1/aa/65c24f94a227616f5ef7d1f77bb8", + "assets/build/ba_data/textures/wizardIconColorMask.dds": "https://files.ballistica.net/cache/ba1/b5/16/7f556e4b852a94400388b4c96db4", "assets/build/ba_data/textures/wizardIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/91/17/307bfa8af7dc435aa92dd38158f6", "assets/build/ba_data/textures/wizardIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/3e/31/19cb4995ec02f1884bd35b29a464", "assets/build/ba_data/textures/wizardIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/20/24/700221546a08f3bc9c31e751ebcc", @@ -2533,7 +2533,7 @@ "assets/build/ba_data/textures/wrestlerColor.dds": "https://files.ballistica.net/cache/ba1/1f/d5/d21adac8982ad713b0bbdbb7ee6c", "assets/build/ba_data/textures/wrestlerColor.ktx": "https://files.ballistica.net/cache/ba1/d7/22/bf15886b227531620eec6462be2d", "assets/build/ba_data/textures/wrestlerColor.pvr": "https://files.ballistica.net/cache/ba1/ab/76/9f573919ed6b9e635f4a014584ba", - "assets/build/ba_data/textures/wrestlerColorMask.dds": "https://files.ballistica.net/cache/ba1/9f/98/98d3c41b83875f850abc3b2c31df", + "assets/build/ba_data/textures/wrestlerColorMask.dds": "https://files.ballistica.net/cache/ba1/fb/a5/472ae89a40a52d189c9337c179fa", "assets/build/ba_data/textures/wrestlerColorMask.ktx": "https://files.ballistica.net/cache/ba1/21/1f/eebe5e1fe740412aad15026d21b5", "assets/build/ba_data/textures/wrestlerColorMask.pvr": "https://files.ballistica.net/cache/ba1/36/43/ef6da6107379ac3f74204a34c529", "assets/build/ba_data/textures/wrestlerColorMask_preview.png": "https://files.ballistica.net/cache/ba1/0c/5f/8619903636053dc0ff1858bf3451", @@ -2546,26 +2546,26 @@ "assets/build/ba_data/textures/wrestlerIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/7b/5d/83a1a0f4d7b06303d5da137e5847", "assets/build/ba_data/textures/wrestlerIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/b5/74/774b56f03e583df47388c552c63e", "assets/build/ba_data/textures/wrestlerIcon_preview.png": "https://files.ballistica.net/cache/ba1/38/71/8b5f4d69dde24101ce0d69747486", - "assets/build/ba_data/textures/zigZagLevelColor.dds": "https://files.ballistica.net/cache/ba1/ea/cf/a59f7ca3b2f0d7a08e3ad42d83ab", + "assets/build/ba_data/textures/zigZagLevelColor.dds": "https://files.ballistica.net/cache/ba1/df/17/9994816ad67f481800bae16f2db2", "assets/build/ba_data/textures/zigZagLevelColor.ktx": "https://files.ballistica.net/cache/ba1/c1/1e/82884d1423ce4a7d641003e84bfb", "assets/build/ba_data/textures/zigZagLevelColor.pvr": "https://files.ballistica.net/cache/ba1/56/df/c53d264147677138e47799ea990e", "assets/build/ba_data/textures/zigZagLevelColor_preview.png": "https://files.ballistica.net/cache/ba1/cd/d7/b45e95db0117c4fe5d957136b4bb", - "assets/build/ba_data/textures/zigzagPreview.dds": "https://files.ballistica.net/cache/ba1/00/3b/3a7f2ab4aed12f4d911e94093002", + "assets/build/ba_data/textures/zigzagPreview.dds": "https://files.ballistica.net/cache/ba1/6c/13/64e4a3570343f8a8965b8c6bb318", "assets/build/ba_data/textures/zigzagPreview.ktx": "https://files.ballistica.net/cache/ba1/33/ca/b022d38b1306d8382c2ecdb270b9", "assets/build/ba_data/textures/zigzagPreview.pvr": "https://files.ballistica.net/cache/ba1/0e/21/4f296b4440f8467c904221d18400", "assets/build/ba_data/textures/zigzagPreview_preview.png": "https://files.ballistica.net/cache/ba1/f4/32/1f69e507893d054aca0371c31248", - "assets/build/ba_data/textures/zoeColor.dds": "https://files.ballistica.net/cache/ba1/82/6e/c531db13a3eff5a2e37c32af79c1", + "assets/build/ba_data/textures/zoeColor.dds": "https://files.ballistica.net/cache/ba1/05/e4/93016a653b2bb3433138594c9c0e", "assets/build/ba_data/textures/zoeColor.ktx": "https://files.ballistica.net/cache/ba1/8d/80/906fb08660e1fcde3f5997108abf", "assets/build/ba_data/textures/zoeColor.pvr": "https://files.ballistica.net/cache/ba1/4a/74/8ca47effb87502b7334398e967be", - "assets/build/ba_data/textures/zoeColorMask.dds": "https://files.ballistica.net/cache/ba1/eb/a5/a71bc5739b02d7101dbd29e6b81b", + "assets/build/ba_data/textures/zoeColorMask.dds": "https://files.ballistica.net/cache/ba1/b6/06/e4086e65b697d7de1c8864f49029", "assets/build/ba_data/textures/zoeColorMask.ktx": "https://files.ballistica.net/cache/ba1/b9/32/91c389da7403df50125cddc37575", "assets/build/ba_data/textures/zoeColorMask.pvr": "https://files.ballistica.net/cache/ba1/f4/6a/4cbdbcf47abdb7f8fdc8d283451e", "assets/build/ba_data/textures/zoeColorMask_preview.png": "https://files.ballistica.net/cache/ba1/ca/0e/66481610316607e9adcb456467d1", "assets/build/ba_data/textures/zoeColor_preview.png": "https://files.ballistica.net/cache/ba1/3b/3e/91abd548d271a97df63b327a1f82", - "assets/build/ba_data/textures/zoeIcon.dds": "https://files.ballistica.net/cache/ba1/23/d4/d1b9a5a9fd790beb494b823f7a35", + "assets/build/ba_data/textures/zoeIcon.dds": "https://files.ballistica.net/cache/ba1/da/63/063fc70b4a22b7a0f32ca8e9f8b4", "assets/build/ba_data/textures/zoeIcon.ktx": "https://files.ballistica.net/cache/ba1/fd/75/88d1a4355980906272cf904bd722", "assets/build/ba_data/textures/zoeIcon.pvr": "https://files.ballistica.net/cache/ba1/7c/66/7959cdfaa884068bdb11db1ef330", - "assets/build/ba_data/textures/zoeIconColorMask.dds": "https://files.ballistica.net/cache/ba1/0b/61/f5e3848c72b5359e129ed7fd9ee0", + "assets/build/ba_data/textures/zoeIconColorMask.dds": "https://files.ballistica.net/cache/ba1/75/06/c186a1ad6e54ba6d8862b23c2136", "assets/build/ba_data/textures/zoeIconColorMask.ktx": "https://files.ballistica.net/cache/ba1/bd/eb/deb5899cffa81a665248e3062363", "assets/build/ba_data/textures/zoeIconColorMask.pvr": "https://files.ballistica.net/cache/ba1/2b/dc/22df1ef245a7f368060d2eecb839", "assets/build/ba_data/textures/zoeIconColorMask_preview.png": "https://files.ballistica.net/cache/ba1/d5/08/7d5e28abf51591fb4923892f43dd", @@ -3995,50 +3995,50 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/69/b1/5c028c7e31ce5382ae6d194f15d3", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/64/20/ce0a3f20574b86e86104618880ec", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/0e/bf/3bed1b64a53e9b6003577f5bcb79", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/db/7c/72eb8c5d29c9241800e1260cbbcb", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/9e/d0/1c9a1a2c9598d2b800d469518a62", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/64/66/536379773bef375df871c2b9ac1b", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/17/35/c04056d61490d0380d6f4d292e97", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/32/99/3fcc56b3ea13005626c930db8916", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/5b/00/b362b64ecdef9fc1c7881d0708cf", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c6/19/e8ccd6168aedabca82ed461e8dc4", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/78/0d/804900218a8dade12e2dbb63ac1b", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/62/92/d0a17051d315094931e321505281", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/06/ac/811271cc4b78c7df2ca21c026342", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3d/19/47944b62b0f8ebccf4b776c6b9e0", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/0a/35/9557357ff36e15ae7ff0b405e2bc", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ba/d3/02a4702f37e8fd8d39289415757b", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/49/d3/ecb6e66795a128b9eed8532eb1ab", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/40/03/436e9ab893949472c0703dbcd54e", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/02/b4/24f7667e6e69389112678e501ba3", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/82/22/179e2c44806751d5c76a092ccb25", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/68/9e/c0f11e89b3da91ea188adf6f1c8b", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/10/4a/ffe015cc2ebd47d50975be3eeb0e", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/cb/d7/75c584de816b729e6c3a9f736c4e", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/12/19/5845a35b791d8c7fdc0961857d0a", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/39/d8/2be8c0a549de0e65f31c5ad77152", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/87/6b/680b1c0ac793a8cd136d92af70f6", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/20/57/4c1bbeda1a616da1797b86c1bd61", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1d/5d/ad1529c4eb1f55fdde0eb0c20490", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ee/be/588cc300939f4b3f696089297418", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/22/b5/242086174808668e27b1959f4378", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/0f/8a/ce4e2545160c97e46ac40c3cad5a", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ef/9b/aceebec46e3bdbfb48c851fffd84", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c6/2e/cb2d5cadd82a3dd5a218d9b00b1f", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/cc/7d/8cfdc4cdaa0f746c38c95cc2846c", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/8b/39/3ca21bc68eb05e8a0be3b9616de4", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1c/be/c6a5f5fdb8bd179ff2ad3ebda239", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/72/f4/0d34c518ae2fee1c3c99c00aaf7f", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/c5/ac/8a25d9a65fe146e1b461cff8d0b1", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/7c/6d/5fe242ad6afc646aea1405f9d3db", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/41/51/9bbbc5007870d145b1ab4ca28c1e", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/56/3a/1c798b5ac4f042af6221605a45c7", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ec/2a/4d3ceb7b285b9a711cf7ca0ec0f7", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d1/d9/66f7e4526e733ca085c2eb96877f", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/94/a2/bd823b5a84ff49678fecd229b5a2", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b8/56/ee30665ae62ca08660845c9730c0", "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e1/82/ce530098283734eb34d0a78682a8", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/1b/bd/e1046b2f01fff4c59c0ecb18fd7f", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/66/e1/6aa3c3de153a5a50a06e35fe9134", "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7f/e5/2acde40bf16c08d037bfce2b502c", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d4/8d/02f02bd621a2ab6e1b9634e2d8fd", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b0/cb/300a523ef70690dc9b7b4fd91f21", "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/21/50/c4cfe81e571b40623ccd72fe77a6", "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/cb/6a/88729063e5f9857da695c4fe906d", "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/93/a7/6ba2b7509dbac96b43d5ebd51edb", "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/92/7c/78aa7dfb1f2aea8c984aa666cabc", "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c2/d0/65f8cc8676c3a31e6f02dcd79bf2", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/21/dc/f3ecdd8ee8725623cd1de11aa38d", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/39/39/84895810a54817053bbbc1c6851e", "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7c/21/578d14c74a46a3ddea3880964a73", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6d/ae/ef61dc65606bb450b905ea61af39", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b2/e3/b529b59785149007257c47ffddf4", "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b4/d6/7c5d71b41ee7d6373cb037ccb3ac", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/de/ac/904b63a66351b3dfb6de6659befe", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/a4/24/e095b112f7aa6b903e4cf9073a00", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/fa/fd/4c340f14afdf270387bd581d6801", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/61/93/d6dc5f8fac0b30415014891778c6", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/2f/db/cb1f0fde72e964dbccb0b7085748", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/b1/0f/c7c254077c09e63694f34d3c4091", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/14/df/c8df600f12679d3dfb909cc053ef", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/9e/24/d85239ed12cc53d83b76b21d7ef4", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/75/a6/82f3f6dd8dcb6cda1906a5c3f88b", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/c8/3b/232c5613ebb145cf2831a44c4a22", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/e1/6e/5df594275e30b61b9506b04a2bb4", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/70/4e/8b2fc5255a57055b7d6b5a357c9a", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/60/11/16f18674b12113f43cbe39027d19", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/f9/3b/6cca025ed2ec433facf6ceb4b6ec", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/af/a6/93fd32df5427917bf89a2ca4328e", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/58/a0/25ca5194d30f2449e85fe4fab215", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index f43b466d..85de9a4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20821, api 7, 2022-09-11) +### 1.7.7 (build 20823, api 7, 2022-09-12) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index b6369b76..ee4ffb00 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -38,7 +38,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20822 + expected_build = 20823 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index fc4f5ad1..eb7d1aff 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -31,7 +31,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20822; +const int kAppBuildNumber = 20823; const char* kAppVersion = "1.7.7"; // Our standalone globals. From 3f53c70bebaa9abc2751fb354b9cf87ce1935dd4 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 12 Sep 2022 11:39:17 -0700 Subject: [PATCH 10/40] more c++ bootstrap refactoring --- .efrocachemap | 88 +++++++++---------- CHANGELOG.md | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- ballisticacore-cmake/CMakeLists.txt | 4 +- .../Generic/BallisticaCoreGeneric.vcxproj | 4 +- .../BallisticaCoreGeneric.vcxproj.filters | 12 +-- .../Headless/BallisticaCoreHeadless.vcxproj | 4 +- .../BallisticaCoreHeadless.vcxproj.filters | 12 +-- src/ballistica/app/app_flavor.cc | 46 ++++++++-- src/ballistica/app/app_flavor.h | 2 +- src/ballistica/assets/assets_server.cc | 8 +- src/ballistica/assets/assets_server.h | 2 +- src/ballistica/audio/audio_server.cc | 2 +- src/ballistica/audio/audio_server.h | 2 +- src/ballistica/ballistica.cc | 39 ++++---- src/ballistica/ballistica.h | 2 +- src/ballistica/config/config_cmake.h | 2 +- src/ballistica/config/config_common.h | 8 +- .../config/config_windows_generic.h | 2 +- .../config/config_windows_headless.h | 2 +- src/ballistica/core/types.h | 2 +- src/ballistica/game/game.cc | 2 +- src/ballistica/game/game.h | 2 +- src/ballistica/platform/platform.cc | 53 +---------- src/ballistica/platform/platform.h | 3 +- src/ballistica/platform/sdl/sdl_app.cc | 4 +- src/ballistica/platform/sdl/sdl_app.h | 2 +- .../stdio_console.cc} | 17 ++-- .../stdio_console.h} | 12 +-- 29 files changed, 161 insertions(+), 181 deletions(-) rename src/ballistica/{input/std_input_module.cc => platform/stdio_console.cc} (85%) rename src/ballistica/{input/std_input_module.h => platform/stdio_console.h} (54%) diff --git a/.efrocachemap b/.efrocachemap index 8c5552a0..754e3439 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,50 +3995,50 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/10/4a/ffe015cc2ebd47d50975be3eeb0e", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/cb/d7/75c584de816b729e6c3a9f736c4e", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/12/19/5845a35b791d8c7fdc0961857d0a", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/39/d8/2be8c0a549de0e65f31c5ad77152", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/87/6b/680b1c0ac793a8cd136d92af70f6", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/20/57/4c1bbeda1a616da1797b86c1bd61", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1d/5d/ad1529c4eb1f55fdde0eb0c20490", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ee/be/588cc300939f4b3f696089297418", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/22/b5/242086174808668e27b1959f4378", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/0f/8a/ce4e2545160c97e46ac40c3cad5a", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ef/9b/aceebec46e3bdbfb48c851fffd84", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c6/2e/cb2d5cadd82a3dd5a218d9b00b1f", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/cc/7d/8cfdc4cdaa0f746c38c95cc2846c", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/8b/39/3ca21bc68eb05e8a0be3b9616de4", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1c/be/c6a5f5fdb8bd179ff2ad3ebda239", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/72/f4/0d34c518ae2fee1c3c99c00aaf7f", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/c5/ac/8a25d9a65fe146e1b461cff8d0b1", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/7c/6d/5fe242ad6afc646aea1405f9d3db", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/41/51/9bbbc5007870d145b1ab4ca28c1e", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/56/3a/1c798b5ac4f042af6221605a45c7", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ec/2a/4d3ceb7b285b9a711cf7ca0ec0f7", - "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d1/d9/66f7e4526e733ca085c2eb96877f", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b8/56/ee30665ae62ca08660845c9730c0", - "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e1/82/ce530098283734eb34d0a78682a8", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/66/e1/6aa3c3de153a5a50a06e35fe9134", - "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7f/e5/2acde40bf16c08d037bfce2b502c", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b0/cb/300a523ef70690dc9b7b4fd91f21", - "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/21/50/c4cfe81e571b40623ccd72fe77a6", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/cb/6a/88729063e5f9857da695c4fe906d", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/93/a7/6ba2b7509dbac96b43d5ebd51edb", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/92/7c/78aa7dfb1f2aea8c984aa666cabc", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c2/d0/65f8cc8676c3a31e6f02dcd79bf2", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/39/39/84895810a54817053bbbc1c6851e", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7c/21/578d14c74a46a3ddea3880964a73", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b2/e3/b529b59785149007257c47ffddf4", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b4/d6/7c5d71b41ee7d6373cb037ccb3ac", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/75/a6/82f3f6dd8dcb6cda1906a5c3f88b", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/c8/3b/232c5613ebb145cf2831a44c4a22", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/e1/6e/5df594275e30b61b9506b04a2bb4", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/70/4e/8b2fc5255a57055b7d6b5a357c9a", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/60/11/16f18674b12113f43cbe39027d19", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/f9/3b/6cca025ed2ec433facf6ceb4b6ec", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/af/a6/93fd32df5427917bf89a2ca4328e", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/58/a0/25ca5194d30f2449e85fe4fab215", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a1/66/39cac09bf6b06e56c530835eb181", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/2b/cb/6dd8bdf3a077d3aa761f9b8fbd63", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b5/e9/5c0a89d56a6e483229da89281796", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/fe/f9/c33d7708c6186bfd96d5e47955a3", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/73/5b/93a06dabd24015bb45150bf9b504", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/cb/e0/a0da487b59ded7b3906f14bfa720", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d2/fe/bace2357c3c17373a474bb4c2550", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/bb/1c/8f71bc4449cd828817e7eb5e685e", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/59/c0/562d9fdf5769951cd04f4389f0b8", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/0a/7d/8a7148a088f5b2c7c1fa770368a9", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d8/d3/b107c0c0564b59544af598ebb975", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c2/10/e29b058f51d202b47315a78e9426", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/1a/25/fd41d552ce3c4d3b6097ddf38575", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/68/35/afcdb16cb02aee02aefecda09c18", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/89/a6/ed6fb097d9f5b7bf213750399b09", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c6/e0/ac51274e398c2d4c9ca96918ff24", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/83/46/3a7a9981de261f0ade01976d5ff7", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a4/a9/0cfdc1a7499515d9ae1742a1556d", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/cd/9b/2b5530a52e1da3912f2b89f2de83", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/24/32/c583f30ff2e5f77c02e1716033b8", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/26/1d/c05986ea5543313a3d9ad8f87551", + "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a9/30/62c8fa6369762561e87708d625ae", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/32/e2/27313549815bc9201818b4db6c10", + "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/48/67/bac46275cec3dbdbee7d4c698406", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/13/37/b2a85900f3d5f518cc7e67151282", + "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7e/4f/2bc692ccdcb53a278ad9b06ddbf1", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/38/12/6e9a96f48a7af39f526dcd41ebce", + "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8f/f3/deee23add01a2c2d8bb4b6197366", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/83/4d/8bdc0827cf90d2cd09e56a1846ed", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4a/55/b93f1eae564c146ca60f1a23b915", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e7/fc/58cd588c4aecd56e1ef2bba7b11d", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/21/83/f5bcb13224fec91b6139b7ae83ed", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/69/1a/eb5f3c85fc8f8194cc96b19714b3", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/27/75/a18262f80729191921e12da1b2dc", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4e/a5/7144c121faf50b2e6cf1db40e281", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/29/08/889f9f0cbd89b692cbcdc0dad96c", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/96/8e/6da028cf907b53fa621cf0275352", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/c3/81/6591a6f11570c598e5dee0d58586", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/ee/f9/e0c13708771197ee7f41db988d19", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/a2/66/c5433ea1cbd812a532d23895379d", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/c9/21/154dae08aceb0c162c1ba9580ceb", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/74/c9/fd45708e613a27dcf3782b3d9dfe", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/e1/8e/f5a16f655ae1f2b075e80fb3a981", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/02/73/2dd954ea8a85a542ce900047ab6c", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 85de9a4c..1d9a38ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20823, api 7, 2022-09-12) +### 1.7.7 (build 20825, api 7, 2022-09-12) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index ee4ffb00..039c0fcd 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -38,7 +38,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20823 + expected_build = 20825 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/ballisticacore-cmake/CMakeLists.txt b/ballisticacore-cmake/CMakeLists.txt index 34c4d99d..1cc4586d 100644 --- a/ballisticacore-cmake/CMakeLists.txt +++ b/ballisticacore-cmake/CMakeLists.txt @@ -484,8 +484,6 @@ add_executable(ballisticacore ${BA_SRC_ROOT}/ballistica/input/input.h ${BA_SRC_ROOT}/ballistica/input/remote_app.cc ${BA_SRC_ROOT}/ballistica/input/remote_app.h - ${BA_SRC_ROOT}/ballistica/input/std_input_module.cc - ${BA_SRC_ROOT}/ballistica/input/std_input_module.h ${BA_SRC_ROOT}/ballistica/internal/app_internal.h ${BA_SRC_ROOT}/ballistica/math/matrix44f.cc ${BA_SRC_ROOT}/ballistica/math/matrix44f.h @@ -516,6 +514,8 @@ add_executable(ballisticacore ${BA_SRC_ROOT}/ballistica/platform/platform.h ${BA_SRC_ROOT}/ballistica/platform/sdl/sdl_app.cc ${BA_SRC_ROOT}/ballistica/platform/sdl/sdl_app.h + ${BA_SRC_ROOT}/ballistica/platform/stdio_console.cc + ${BA_SRC_ROOT}/ballistica/platform/stdio_console.h ${BA_SRC_ROOT}/ballistica/platform/windows/platform_windows.cc ${BA_SRC_ROOT}/ballistica/platform/windows/platform_windows.h ${BA_SRC_ROOT}/ballistica/python/class/python_class.cc diff --git a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj index 3e188941..504b79cc 100644 --- a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj +++ b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj @@ -475,8 +475,6 @@ - - @@ -507,6 +505,8 @@ + + diff --git a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters index ba9bcbbd..7e1d56f9 100644 --- a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters +++ b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters @@ -859,12 +859,6 @@ ballistica\input - - ballistica\input - - - ballistica\input - ballistica\internal @@ -955,6 +949,12 @@ ballistica\platform\sdl + + ballistica\platform + + + ballistica\platform + ballistica\platform\windows diff --git a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj index f99ff553..303289b0 100644 --- a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj +++ b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj @@ -470,8 +470,6 @@ - - @@ -502,6 +500,8 @@ + + diff --git a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters index ba9bcbbd..7e1d56f9 100644 --- a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters +++ b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters @@ -859,12 +859,6 @@ ballistica\input - - ballistica\input - - - ballistica\input - ballistica\internal @@ -955,6 +949,12 @@ ballistica\platform\sdl + + ballistica\platform + + + ballistica\platform + ballistica\platform\windows diff --git a/src/ballistica/app/app_flavor.cc b/src/ballistica/app/app_flavor.cc index 6d01350a..4dfef290 100644 --- a/src/ballistica/app/app_flavor.cc +++ b/src/ballistica/app/app_flavor.cc @@ -18,20 +18,30 @@ namespace ballistica { AppFlavor::AppFlavor(Thread* thread) : thread_(thread), stress_test_(std::make_unique()) { - // assert(g_app_flavor == nullptr); - // g_app_flavor = this; - // We modify some app behavior when run under the server manager. auto* envval = getenv("BA_SERVER_WRAPPER_MANAGED"); server_wrapper_managed_ = (envval && strcmp(envval, "1") == 0); } void AppFlavor::PostInit() { - // If we've got a nice themed hardware cursor, show it. - // Otherwise, hide the hardware cursor; we'll draw it in software. - // (need to run this in postinit because SDL/etc. may not be inited yet - // as of AppFlavor::AppFlavor()). - g_platform->SetHardwareCursorVisible(g_buildconfig.hardware_cursor()); + // Sanity check: make sure asserts are stripped out of release builds + // (NDEBUG should do this). +#if !BA_DEBUG_BUILD +#ifndef NDEBUG +#error Expected NDEBUG to be defined for release builds. +#endif // NDEBUG + assert(true); +#endif // !BA_DEBUG_BUILD + + g_app->user_agent_string = g_platform->GetUserAgentString(); + + // Figure out where our data is and chdir there. + g_platform->SetupDataDirectory(); + + // Run these just to make sure these dirs exist. + // (otherwise they might not get made if nothing writes to them). + g_platform->GetConfigDirectory(); + g_platform->GetUserPythonDirectory(); } auto AppFlavor::ManagesEventLoop() const -> bool { @@ -357,10 +367,28 @@ void AppFlavor::PushResetAchievementsCall() { thread()->PushCall([] { g_platform->ResetAchievements(); }); } -void AppFlavor::OnBootstrapComplete() { +void AppFlavor::OnAppStart() { assert(InMainThread()); assert(g_input); + // If we're running in a terminal, print some info. + if (g_platform->is_stdin_a_terminal()) { + if (g_buildconfig.headless_build()) { + printf("BallisticaCore Headless %s build %d.\n", kAppVersion, + kAppBuildNumber); + fflush(stdout); + } else { + printf("BallisticaCore %s build %d.\n", kAppVersion, kAppBuildNumber); + fflush(stdout); + } + } + + // If we've got a nice themed hardware cursor, show it. + // Otherwise, hide the hardware cursor; we'll draw it in software. + // (need to run this in postinit because SDL/etc. may not be inited yet + // as of AppFlavor::AppFlavor()). + g_platform->SetHardwareCursorVisible(g_buildconfig.hardware_cursor()); + if (!HeadlessMode()) { // On desktop systems we just assume keyboard input exists and add it // immediately. diff --git a/src/ballistica/app/app_flavor.h b/src/ballistica/app/app_flavor.h index 65fcb317..fb1f013a 100644 --- a/src/ballistica/app/app_flavor.h +++ b/src/ballistica/app/app_flavor.h @@ -93,7 +93,7 @@ class AppFlavor { return server_wrapper_managed_; } - virtual auto OnBootstrapComplete() -> void; + virtual auto OnAppStart() -> void; // Deferred calls that can be made from other threads. diff --git a/src/ballistica/assets/assets_server.cc b/src/ballistica/assets/assets_server.cc index 8cd61f89..815318c9 100644 --- a/src/ballistica/assets/assets_server.cc +++ b/src/ballistica/assets/assets_server.cc @@ -12,11 +12,7 @@ namespace ballistica { -AssetsServer::AssetsServer() - : writing_replay_(false), - replay_message_bytes_(0), - replays_broken_(false), - replay_out_file_(nullptr) { +AssetsServer::AssetsServer() { // We're a singleton; make sure we don't already exist. assert(g_assets_server == nullptr); @@ -25,7 +21,7 @@ AssetsServer::AssetsServer() g_app->pausable_threads.push_back(thread_); } -auto AssetsServer::Start() -> void { +auto AssetsServer::OnAppStart() -> void { thread_->PushCallSynchronous([this] { StartInThread(); }); } diff --git a/src/ballistica/assets/assets_server.h b/src/ballistica/assets/assets_server.h index f482b966..1875c2d2 100644 --- a/src/ballistica/assets/assets_server.h +++ b/src/ballistica/assets/assets_server.h @@ -13,7 +13,7 @@ namespace ballistica { class AssetsServer { public: AssetsServer(); - auto Start() -> void; + auto OnAppStart() -> void; auto PushBeginWriteReplayCall() -> void; auto PushEndWriteReplayCall() -> void; auto PushAddMessageToReplayCall(const std::vector& data) -> void; diff --git a/src/ballistica/audio/audio_server.cc b/src/ballistica/audio/audio_server.cc index d162c1db..e6abaca9 100644 --- a/src/ballistica/audio/audio_server.cc +++ b/src/ballistica/audio/audio_server.cc @@ -330,7 +330,7 @@ AudioServer::AudioServer() : impl_{new AudioServer::Impl()} { g_app->pausable_threads.push_back(thread_); } -auto AudioServer::Start() -> void { +auto AudioServer::OnAppStart() -> void { thread_->PushCallSynchronous([this] { StartInThread(); }); } diff --git a/src/ballistica/audio/audio_server.h b/src/ballistica/audio/audio_server.h index da180dcc..026bda6a 100644 --- a/src/ballistica/audio/audio_server.h +++ b/src/ballistica/audio/audio_server.h @@ -23,7 +23,7 @@ class AudioServer { } AudioServer(); - auto Start() -> void; + auto OnAppStart() -> void; auto PushSetVolumesCall(float music_volume, float sound_volume) -> void; auto PushSetSoundPitchCall(float val) -> void; diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index eb7d1aff..3d2efe3a 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -24,6 +24,7 @@ #include "ballistica/networking/network_writer.h" #include "ballistica/networking/networking.h" #include "ballistica/platform/platform.h" +#include "ballistica/platform/stdio_console.h" #include "ballistica/python/python.h" #include "ballistica/scene/scene.h" #include "ballistica/ui/ui.h" @@ -31,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20823; +const int kAppBuildNumber = 20825; const char* kAppVersion = "1.7.7"; // Our standalone globals. @@ -61,7 +62,7 @@ NetworkReader* g_network_reader{}; NetworkWriter* g_network_writer{}; Platform* g_platform{}; Python* g_python{}; -StdInputModule* g_std_input_module{}; +StdioConsole* g_stdio_console{}; TextGraphics* g_text_graphics{}; UI* g_ui{}; Utils* g_utils{}; @@ -70,9 +71,9 @@ Utils* g_utils{}; // 1: All threads and globals are created and provisioned. Everything above // should exist at the end of this step (if it is going to exist). // Threads should not be talking to each other yet at this point. -// 2: The system is set in motion. Game thread is told to load/apply the config. -// This event kicks off an initial-screen-creation message sent to the -// graphics-server thread. Other systems are informed that bootstrapping +// 2: The system is set in motion. The logic thread is told to load/apply the +// config. This event kicks off an initial-screen-creation message sent to +// the graphics-server thread. Other systems are informed that bootstrapping // is complete and that they are free to talk to each other. Initial // input-devices are added, asset loads can begin (at least ones not // dependent on the screen/renderer), etc. @@ -97,8 +98,8 @@ auto BallisticaMain(int argc, char** argv) -> int { // ------------------------------------------------------------------------- // Absolute bare-bones basics. - g_app = new App(argc, argv); g_platform = Platform::Create(); + g_app = new App(argc, argv); // Create a Thread wrapper around the current (main) thread. g_main_thread = new Thread(ThreadIdentifier::kMain, ThreadType::kMain); @@ -134,13 +135,9 @@ auto BallisticaMain(int argc, char** argv) -> int { g_bg_dynamics = new BGDynamics(); g_bg_dynamics_server = new BGDynamicsServer(); } - - // FIXME - move this later but need to init Python earlier then. - g_game->Start(); - - // NOTE TO SELF: this starts reading stdin and py-init hangs if we do - // it after here. - g_platform->CreateAuxiliaryModules(); + if (g_buildconfig.enable_stdio_console()) { + g_stdio_console = new StdioConsole(); + } // Ok at this point we can be considered up-and-running. g_app->is_bootstrapped = true; @@ -149,14 +146,14 @@ auto BallisticaMain(int argc, char** argv) -> int { // Phase 2: Set things in motion. // ------------------------------------------------------------------------- - g_audio_server->Start(); - g_assets_server->Start(); - - // Let the app and platform do whatever else it wants here such as adding - // initial input devices/etc. - g_app_flavor->OnBootstrapComplete(); - g_platform->OnBootstrapComplete(); - + g_game->OnAppStart(); + g_audio_server->OnAppStart(); + g_assets_server->OnAppStart(); + g_platform->OnAppStart(); + g_app_flavor->OnAppStart(); + if (g_stdio_console) { + g_stdio_console->OnAppStart(); + } // Ok; now that we're bootstrapped, tell the game thread to read and apply // the config which should kick off the real action. g_game->PushApplyConfigCall(); diff --git a/src/ballistica/ballistica.h b/src/ballistica/ballistica.h index de4226af..ddba4f1c 100644 --- a/src/ballistica/ballistica.h +++ b/src/ballistica/ballistica.h @@ -125,7 +125,7 @@ extern NetworkReader* g_network_reader; extern NetworkWriter* g_network_writer; extern Platform* g_platform; extern Python* g_python; -extern StdInputModule* g_std_input_module; +extern StdioConsole* g_stdio_console; extern TextGraphics* g_text_graphics; extern UI* g_ui; extern Utils* g_utils; diff --git a/src/ballistica/config/config_cmake.h b/src/ballistica/config/config_cmake.h index 4c1fdb94..ececdaf0 100644 --- a/src/ballistica/config/config_cmake.h +++ b/src/ballistica/config/config_cmake.h @@ -62,7 +62,7 @@ #define BA_ENABLE_EXECINFO_BACKTRACES 1 // Allow stdin commands too. -#define BA_USE_STDIN_THREAD 1 +#define BA_ENABLE_STDIO_CONSOLE 1 #define BA_DEFINE_MAIN 1 diff --git a/src/ballistica/config/config_common.h b/src/ballistica/config/config_common.h index b807eacb..4a00f930 100644 --- a/src/ballistica/config/config_common.h +++ b/src/ballistica/config/config_common.h @@ -122,8 +122,8 @@ namespace ballistica { #error platform string undefined #endif -#ifndef BA_USE_STDIN_THREAD -#define BA_USE_STDIN_THREAD 0 +#ifndef BA_ENABLE_STDIO_CONSOLE +#define BA_ENABLE_STDIO_CONSOLE 0 #endif #ifndef BA_HARDWARE_CURSOR @@ -240,7 +240,9 @@ class BuildConfig { bool use_store_kit() const { return EXPBOOL_(BA_USE_STORE_KIT); } bool use_game_center() const { return EXPBOOL_(BA_USE_GAME_CENTER); } - bool use_stdin_thread() const { return EXPBOOL_(BA_USE_STDIN_THREAD); } + bool enable_stdio_console() const { + return EXPBOOL_(BA_ENABLE_STDIO_CONSOLE); + } bool enable_os_font_rendering() const { return EXPBOOL_(BA_ENABLE_OS_FONT_RENDERING); } diff --git a/src/ballistica/config/config_windows_generic.h b/src/ballistica/config/config_windows_generic.h index da1b56ee..eadd9a58 100644 --- a/src/ballistica/config/config_windows_generic.h +++ b/src/ballistica/config/config_windows_generic.h @@ -5,7 +5,7 @@ // note: define overrides BEFORE common makefile -#define BA_USE_STDIN_THREAD 1 +#define BA_ENABLE_STDIO_CONSOLE 1 #define BA_SDL_BUILD 1 #define BA_SDL2_BUILD 1 diff --git a/src/ballistica/config/config_windows_headless.h b/src/ballistica/config/config_windows_headless.h index cc98856d..1d205ed3 100644 --- a/src/ballistica/config/config_windows_headless.h +++ b/src/ballistica/config/config_windows_headless.h @@ -6,7 +6,7 @@ // note: define overrides BEFORE common header #define BA_HEADLESS_BUILD 1 -#define BA_USE_STDIN_THREAD 1 +#define BA_ENABLE_STDIO_CONSOLE 1 #define BA_MINSDL_BUILD 1 diff --git a/src/ballistica/core/types.h b/src/ballistica/core/types.h index f9ba491e..154bfe9a 100644 --- a/src/ballistica/core/types.h +++ b/src/ballistica/core/types.h @@ -173,7 +173,7 @@ class SoundData; class SpriteMesh; class StackWidget; class StressTest; -class StdInputModule; +class StdioConsole; class Module; class TelnetServer; class TestInput; diff --git a/src/ballistica/game/game.cc b/src/ballistica/game/game.cc index 4c458e95..c5efd18c 100644 --- a/src/ballistica/game/game.cc +++ b/src/ballistica/game/game.cc @@ -82,7 +82,7 @@ Game::Game() // bits of C++ logic. thread_->SetAcquiresPythonGIL(); } -auto Game::Start() -> void { +auto Game::OnAppStart() -> void { thread_->PushCallSynchronous([this] { StartInThread(); }); } diff --git a/src/ballistica/game/game.h b/src/ballistica/game/game.h index 9112158a..9685e5bf 100644 --- a/src/ballistica/game/game.h +++ b/src/ballistica/game/game.h @@ -25,7 +25,7 @@ const int kMaxPartyNameCombinedSize = 25; class Game { public: Game(); - auto Start() -> void; + auto OnAppStart() -> void; auto LaunchHostSession(PyObject* session_type_obj, BenchmarkType benchmark_type = BenchmarkType::kNone) diff --git a/src/ballistica/platform/platform.cc b/src/ballistica/platform/platform.cc index 55fb4df3..292355e0 100644 --- a/src/ballistica/platform/platform.cc +++ b/src/ballistica/platform/platform.cc @@ -30,9 +30,9 @@ #include "ballistica/graphics/mesh/sprite_mesh.h" #include "ballistica/graphics/vr_graphics.h" #include "ballistica/input/input.h" -#include "ballistica/input/std_input_module.h" #include "ballistica/networking/networking_sys.h" #include "ballistica/platform/sdl/sdl_app.h" +#include "ballistica/platform/stdio_console.h" #include "ballistica/python/python.h" #if BA_HEADLESS_BUILD @@ -120,7 +120,7 @@ auto Platform::PostInit() -> void { ran_base_post_init_ = true; // Are we running in a terminal? - if (g_buildconfig.use_stdin_thread()) { + if (g_buildconfig.enable_stdio_console()) { is_stdin_a_terminal_ = GetIsStdinATerminal(); } else { is_stdin_a_terminal_ = false; @@ -531,40 +531,6 @@ void Platform::SleepMS(millisecs_t ms) { std::this_thread::sleep_for(std::chrono::milliseconds(ms)); } -// General one-time initialization stuff -static void Init() { - // Sanity check: make sure asserts are stripped out of release builds - // (NDEBUG should do this). -#if !BA_DEBUG_BUILD -#ifndef NDEBUG -#error Expected NDEBUG to be defined for release builds. -#endif // NDEBUG - assert(true); -#endif // !BA_DEBUG_BUILD - - // If we're running in a terminal, print some info. - if (g_platform->is_stdin_a_terminal()) { - if (g_buildconfig.headless_build()) { - printf("BallisticaCore Headless %s build %d.\n", kAppVersion, - kAppBuildNumber); - fflush(stdout); - } else { - printf("BallisticaCore %s build %d.\n", kAppVersion, kAppBuildNumber); - fflush(stdout); - } - } - - g_app->user_agent_string = g_platform->GetUserAgentString(); - - // Figure out where our data is and chdir there. - g_platform->SetupDataDirectory(); - - // Run these just to make sure these dirs exist. - // (otherwise they might not get made if nothing writes to them). - g_platform->GetConfigDirectory(); - g_platform->GetUserPythonDirectory(); -} - #pragma clang diagnostic push #pragma ide diagnostic ignored "NullDereferences" @@ -649,7 +615,6 @@ auto Platform::CreateAppFlavor() -> AppFlavor* { // Hmm do these belong here?... HandleArgs(g_app->argc, g_app->argv); - Init(); // TEMP - need to init sdl on our legacy mac build even though its not // technically an SDL app. Kill this once the old mac build is gone. @@ -700,18 +665,6 @@ auto Platform::GetKeyName(int keycode) -> std::string { #endif } -void Platform::CreateAuxiliaryModules() { - if (g_buildconfig.use_stdin_thread()) { - // Start listening for stdin commands (on platforms where that makes sense). - // Note: this thread blocks indefinitely for input so we don't add it to the - // pausable list. - auto* std_input_thread = new Thread(ThreadIdentifier::kStdin); - std_input_thread->PushCallSynchronous( - [std_input_thread] { new StdInputModule(std_input_thread); }); - g_std_input_module->PushBeginReadCall(); - } -} - void Platform::WillExitMain(bool errored) {} auto Platform::GetUIScale() -> UIScale { @@ -885,7 +838,7 @@ auto Platform::CreateTextTexture(int width, int height, auto Platform::GetTextTextureData(void* tex) -> uint8_t* { throw Exception(); } -void Platform::OnBootstrapComplete() {} +void Platform::OnAppStart() {} auto Platform::ConvertIncomingLeaderboardScore( const std::string& leaderboard_id, int score) -> int { diff --git a/src/ballistica/platform/platform.h b/src/ballistica/platform/platform.h index 248e285c..e1ced644 100644 --- a/src/ballistica/platform/platform.h +++ b/src/ballistica/platform/platform.h @@ -54,12 +54,11 @@ class Platform { /// Create the appropriate Graphics subclass for the app. auto CreateGraphics() -> Graphics*; - virtual auto CreateAuxiliaryModules() -> void; virtual auto WillExitMain(bool errored) -> void; /// Inform the platform that all subsystems are up and running and it can /// start talking to them. - virtual auto OnBootstrapComplete() -> void; + virtual auto OnAppStart() -> void; // Get/set values before standard game settings are available // (for values needed before SDL init/etc). diff --git a/src/ballistica/platform/sdl/sdl_app.cc b/src/ballistica/platform/sdl/sdl_app.cc index 589723ea..bda417c7 100644 --- a/src/ballistica/platform/sdl/sdl_app.cc +++ b/src/ballistica/platform/sdl/sdl_app.cc @@ -488,8 +488,8 @@ void SDLApp::SetAutoVSync(bool enable) { } } -void SDLApp::OnBootstrapComplete() { - AppFlavor::OnBootstrapComplete(); +void SDLApp::OnAppStart() { + AppFlavor::OnAppStart(); if (!HeadlessMode() && g_buildconfig.enable_sdl_joysticks()) { // Add initial sdl joysticks. any added/removed after this will be handled diff --git a/src/ballistica/platform/sdl/sdl_app.h b/src/ballistica/platform/sdl/sdl_app.h index 9215f266..367061e5 100644 --- a/src/ballistica/platform/sdl/sdl_app.h +++ b/src/ballistica/platform/sdl/sdl_app.h @@ -22,7 +22,7 @@ class SDLApp : public AppFlavor { auto SetAutoVSync(bool enable) -> void; static auto SDLJoystickConnected(int index) -> void; static auto SDLJoystickDisconnected(int index) -> void; - auto OnBootstrapComplete() -> void override; + auto OnAppStart() -> void override; /// Return g_app_flavor as a SDLApp. (assumes it actually is one). static SDLApp* get() { diff --git a/src/ballistica/input/std_input_module.cc b/src/ballistica/platform/stdio_console.cc similarity index 85% rename from src/ballistica/input/std_input_module.cc rename to src/ballistica/platform/stdio_console.cc index 5b50f78d..8b7b335b 100644 --- a/src/ballistica/input/std_input_module.cc +++ b/src/ballistica/platform/stdio_console.cc @@ -1,6 +1,6 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/input/std_input_module.h" +#include "ballistica/platform/stdio_console.h" #if BA_OSTYPE_LINUX #include @@ -13,12 +13,17 @@ namespace ballistica { -StdInputModule::StdInputModule(Thread* thread) : thread_(thread) { - assert(g_std_input_module == nullptr); - g_std_input_module = this; +StdioConsole::StdioConsole() { + // We're a singleton; make sure we don't already exist. + assert(g_stdio_console == nullptr); + + // Spin up our thread. + thread_ = new Thread(ThreadIdentifier::kAssets); + g_app->pausable_threads.push_back(thread_); } -void StdInputModule::PushBeginReadCall() { +auto StdioConsole::OnAppStart() -> void { + // Tell our thread to start reading. thread()->PushCall([this] { bool stdin_is_terminal = g_platform->is_stdin_a_terminal(); @@ -72,7 +77,7 @@ void StdInputModule::PushBeginReadCall() { } } } else { - Log("StdInputModule got non-eof error reading stdin: " + Log("StdioConsole got non-eof error reading stdin: " + std::to_string(ferror(stdin))); } break; diff --git a/src/ballistica/input/std_input_module.h b/src/ballistica/platform/stdio_console.h similarity index 54% rename from src/ballistica/input/std_input_module.h rename to src/ballistica/platform/stdio_console.h index 7b8e04ee..1ff0f2d6 100644 --- a/src/ballistica/input/std_input_module.h +++ b/src/ballistica/platform/stdio_console.h @@ -1,16 +1,16 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_INPUT_STD_INPUT_MODULE_H_ -#define BALLISTICA_INPUT_STD_INPUT_MODULE_H_ +#ifndef BALLISTICA_PLATFORM_STDIO_CONSOLE_H_ +#define BALLISTICA_PLATFORM_STDIO_CONSOLE_H_ #include "ballistica/ballistica.h" namespace ballistica { -class StdInputModule { +class StdioConsole { public: - explicit StdInputModule(Thread* thread); - void PushBeginReadCall(); + StdioConsole(); + void OnAppStart(); auto thread() const -> Thread* { return thread_; } private: @@ -20,4 +20,4 @@ class StdInputModule { } // namespace ballistica -#endif // BALLISTICA_INPUT_STD_INPUT_MODULE_H_ +#endif // BALLISTICA_PLATFORM_STDIO_CONSOLE_H_ From 575a97bc44c2814bee3dd6d0f30fb535ebcaa526 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 12 Sep 2022 12:54:05 -0700 Subject: [PATCH 11/40] renamed c++ game class to logic --- .efrocachemap | 88 +++---- CHANGELOG.md | 3 +- .../ba_data/python/._bainternal_sources_hash | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- ballisticacore-cmake/CMakeLists.txt | 68 ++--- .../Generic/BallisticaCoreGeneric.vcxproj | 68 ++--- .../BallisticaCoreGeneric.vcxproj.filters | 210 +++++++-------- .../Headless/BallisticaCoreHeadless.vcxproj | 68 ++--- .../BallisticaCoreHeadless.vcxproj.filters | 210 +++++++-------- src/ballistica/app/app_flavor.cc | 6 +- src/ballistica/app/app_flavor_vr.cc | 4 +- src/ballistica/app/stress_test.cc | 2 +- src/ballistica/assets/assets.cc | 8 +- src/ballistica/audio/audio_server.cc | 7 +- src/ballistica/audio/audio_server.h | 2 +- src/ballistica/ballistica.cc | 20 +- src/ballistica/ballistica.h | 2 +- src/ballistica/core/context.cc | 2 +- src/ballistica/core/logging.cc | 6 +- src/ballistica/core/types.h | 2 +- .../dynamics/bg/bg_dynamics_server.cc | 6 +- .../material/impact_sound_material_action.cc | 2 +- .../material/material_condition_node.cc | 2 +- .../material/roll_sound_material_action.cc | 2 +- .../material/skid_sound_material_action.cc | 2 +- .../material/sound_material_action.cc | 2 +- src/ballistica/dynamics/part.h | 2 +- src/ballistica/generic/real_timer.h | 10 +- src/ballistica/graphics/graphics.cc | 26 +- src/ballistica/graphics/graphics_server.cc | 18 +- src/ballistica/graphics/vr_graphics.cc | 4 +- .../input/device/client_input_device.cc | 4 +- src/ballistica/input/device/input_device.cc | 22 +- src/ballistica/input/device/joystick.cc | 32 +-- src/ballistica/input/device/keyboard_input.cc | 4 +- src/ballistica/input/device/test_input.cc | 2 +- src/ballistica/input/device/touch_input.cc | 13 +- src/ballistica/input/input.cc | 79 +++--- src/ballistica/input/remote_app.cc | 26 +- .../client_controller_interface.h | 6 +- .../{game => logic}/connection/connection.cc | 2 +- .../{game => logic}/connection/connection.h | 8 +- .../connection/connection_set.cc | 57 ++-- .../connection/connection_set.h | 6 +- .../connection/connection_to_client.cc | 74 +++--- .../connection/connection_to_client.h | 8 +- .../connection/connection_to_client_udp.cc | 14 +- .../connection/connection_to_client_udp.h | 8 +- .../connection/connection_to_host.cc | 32 +-- .../connection/connection_to_host.h | 8 +- .../connection/connection_to_host_udp.cc | 22 +- .../connection/connection_to_host_udp.h | 8 +- .../{game => logic}/friend_score_set.h | 6 +- .../{game => logic}/host_activity.cc | 10 +- .../{game => logic}/host_activity.h | 6 +- .../{game/game.cc => logic/logic.cc} | 246 +++++++++--------- src/ballistica/{game/game.h => logic/logic.h} | 10 +- src/ballistica/{game => logic}/player.cc | 8 +- src/ballistica/{game => logic}/player.h | 6 +- src/ballistica/{game => logic}/player_spec.cc | 10 +- src/ballistica/{game => logic}/player_spec.h | 6 +- .../{game => logic}/session/client_session.cc | 4 +- .../{game => logic}/session/client_session.h | 10 +- .../{game => logic}/session/host_session.cc | 28 +- .../{game => logic}/session/host_session.h | 8 +- .../session/net_client_session.cc | 4 +- .../session/net_client_session.h | 8 +- .../session/replay_client_session.cc | 16 +- .../session/replay_client_session.h | 10 +- .../{game => logic}/session/session.cc | 6 +- .../{game => logic}/session/session.h | 6 +- src/ballistica/{game => logic}/v1_account.cc | 22 +- src/ballistica/{game => logic}/v1_account.h | 6 +- src/ballistica/networking/network_reader.cc | 14 +- src/ballistica/networking/networking.cc | 2 +- src/ballistica/networking/telnet_server.cc | 24 +- src/ballistica/platform/platform.cc | 14 +- src/ballistica/platform/sdl/sdl_app.cc | 4 +- src/ballistica/platform/stdio_console.cc | 6 +- .../platform/windows/platform_windows.cc | 8 +- .../class/python_class_activity_data.cc | 8 +- .../class/python_class_collide_model.cc | 4 +- .../python/class/python_class_context.cc | 12 +- .../python/class/python_class_context_call.cc | 4 +- .../python/class/python_class_data.cc | 4 +- .../python/class/python_class_input_device.cc | 4 +- .../python/class/python_class_material.cc | 6 +- .../python/class/python_class_model.cc | 4 +- .../python/class/python_class_node.cc | 2 +- .../python/class/python_class_session_data.cc | 6 +- .../class/python_class_session_player.cc | 8 +- .../python/class/python_class_sound.cc | 4 +- .../python/class/python_class_texture.cc | 4 +- .../python/class/python_class_timer.cc | 4 +- .../python/class/python_class_widget.cc | 4 +- .../python/methods/python_methods_app.cc | 30 +-- .../python/methods/python_methods_assets.cc | 2 +- .../python/methods/python_methods_gameplay.cc | 30 +-- .../python/methods/python_methods_graphics.cc | 20 +- .../python/methods/python_methods_input.cc | 2 +- .../methods/python_methods_networking.cc | 50 ++-- .../python/methods/python_methods_system.cc | 10 +- .../python/methods/python_methods_ui.cc | 67 ++--- src/ballistica/python/python.cc | 42 +-- src/ballistica/python/python.h | 2 +- src/ballistica/python/python_context_call.cc | 4 +- src/ballistica/scene/node/globals_node.cc | 6 +- src/ballistica/scene/node/spaz_node.h | 2 +- src/ballistica/scene/node/text_node.cc | 4 +- .../scene/node/time_display_node.cc | 8 +- src/ballistica/scene/scene.cc | 6 +- src/ballistica/scene/scene.h | 2 +- src/ballistica/scene/scene_stream.cc | 10 +- src/ballistica/scene/scene_stream.h | 2 +- src/ballistica/ui/console.cc | 8 +- src/ballistica/ui/root_ui.cc | 29 ++- src/ballistica/ui/ui.cc | 16 +- src/ballistica/ui/widget/button_widget.cc | 6 +- src/ballistica/ui/widget/check_box_widget.cc | 4 +- src/ballistica/ui/widget/container_widget.cc | 30 +-- src/ballistica/ui/widget/h_scroll_widget.cc | 2 +- src/ballistica/ui/widget/image_widget.cc | 4 +- src/ballistica/ui/widget/root_widget.cc | 12 +- src/ballistica/ui/widget/scroll_widget.cc | 2 +- src/ballistica/ui/widget/text_widget.cc | 18 +- src/ballistica/ui/widget/widget.cc | 4 +- tools/batools/project.py | 21 +- 127 files changed, 1178 insertions(+), 1154 deletions(-) rename src/ballistica/{game => logic}/client_controller_interface.h (78%) rename src/ballistica/{game => logic}/connection/connection.cc (99%) rename src/ballistica/{game => logic}/connection/connection.h (96%) rename src/ballistica/{game => logic}/connection/connection_set.cc (94%) rename src/ballistica/{game => logic}/connection/connection_set.h (96%) rename src/ballistica/{game => logic}/connection/connection_to_client.cc (92%) rename src/ballistica/{game => logic}/connection/connection_to_client.h (92%) rename src/ballistica/{game => logic}/connection/connection_to_client_udp.cc (88%) rename src/ballistica/{game => logic}/connection/connection_to_client_udp.h (81%) rename src/ballistica/{game => logic}/connection/connection_to_host.cc (94%) rename src/ballistica/{game => logic}/connection/connection_to_host.h (85%) rename src/ballistica/{game => logic}/connection/connection_to_host_udp.cc (89%) rename src/ballistica/{game => logic}/connection/connection_to_host_udp.h (83%) rename src/ballistica/{game => logic}/friend_score_set.h (81%) rename src/ballistica/{game => logic}/host_activity.cc (98%) rename src/ballistica/{game => logic}/host_activity.h (97%) rename src/ballistica/{game/game.cc => logic/logic.cc} (91%) rename src/ballistica/{game/game.h => logic/logic.h} (99%) rename src/ballistica/{game => logic}/player.cc (98%) rename src/ballistica/{game => logic}/player.h (98%) rename src/ballistica/{game => logic}/player_spec.cc (93%) rename src/ballistica/{game => logic}/player_spec.h (93%) rename src/ballistica/{game => logic}/session/client_session.cc (99%) rename src/ballistica/{game => logic}/session/client_session.h (94%) rename src/ballistica/{game => logic}/session/host_session.cc (96%) rename src/ballistica/{game => logic}/session/host_session.h (95%) rename src/ballistica/{game => logic}/session/net_client_session.cc (98%) rename src/ballistica/{game => logic}/session/net_client_session.h (88%) rename src/ballistica/{game => logic}/session/replay_client_session.cc (93%) rename src/ballistica/{game => logic}/session/replay_client_session.h (79%) rename src/ballistica/{game => logic}/session/session.cc (85%) rename src/ballistica/{game => logic}/session/session.h (90%) rename src/ballistica/{game => logic}/v1_account.cc (90%) rename src/ballistica/{game => logic}/v1_account.h (94%) diff --git a/.efrocachemap b/.efrocachemap index 754e3439..43f04760 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,50 +3995,50 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a1/66/39cac09bf6b06e56c530835eb181", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/2b/cb/6dd8bdf3a077d3aa761f9b8fbd63", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b5/e9/5c0a89d56a6e483229da89281796", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/fe/f9/c33d7708c6186bfd96d5e47955a3", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/73/5b/93a06dabd24015bb45150bf9b504", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/cb/e0/a0da487b59ded7b3906f14bfa720", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d2/fe/bace2357c3c17373a474bb4c2550", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/bb/1c/8f71bc4449cd828817e7eb5e685e", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/59/c0/562d9fdf5769951cd04f4389f0b8", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/0a/7d/8a7148a088f5b2c7c1fa770368a9", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d8/d3/b107c0c0564b59544af598ebb975", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c2/10/e29b058f51d202b47315a78e9426", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/1a/25/fd41d552ce3c4d3b6097ddf38575", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/68/35/afcdb16cb02aee02aefecda09c18", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/89/a6/ed6fb097d9f5b7bf213750399b09", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c6/e0/ac51274e398c2d4c9ca96918ff24", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/83/46/3a7a9981de261f0ade01976d5ff7", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a4/a9/0cfdc1a7499515d9ae1742a1556d", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/cd/9b/2b5530a52e1da3912f2b89f2de83", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/24/32/c583f30ff2e5f77c02e1716033b8", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/26/1d/c05986ea5543313a3d9ad8f87551", - "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a9/30/62c8fa6369762561e87708d625ae", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/32/e2/27313549815bc9201818b4db6c10", - "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/48/67/bac46275cec3dbdbee7d4c698406", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/13/37/b2a85900f3d5f518cc7e67151282", - "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7e/4f/2bc692ccdcb53a278ad9b06ddbf1", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/38/12/6e9a96f48a7af39f526dcd41ebce", - "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8f/f3/deee23add01a2c2d8bb4b6197366", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/83/4d/8bdc0827cf90d2cd09e56a1846ed", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4a/55/b93f1eae564c146ca60f1a23b915", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e7/fc/58cd588c4aecd56e1ef2bba7b11d", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/21/83/f5bcb13224fec91b6139b7ae83ed", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/69/1a/eb5f3c85fc8f8194cc96b19714b3", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/27/75/a18262f80729191921e12da1b2dc", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4e/a5/7144c121faf50b2e6cf1db40e281", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/29/08/889f9f0cbd89b692cbcdc0dad96c", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/96/8e/6da028cf907b53fa621cf0275352", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/c3/81/6591a6f11570c598e5dee0d58586", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/ee/f9/e0c13708771197ee7f41db988d19", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/a2/66/c5433ea1cbd812a532d23895379d", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/c9/21/154dae08aceb0c162c1ba9580ceb", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/74/c9/fd45708e613a27dcf3782b3d9dfe", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/e1/8e/f5a16f655ae1f2b075e80fb3a981", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/02/73/2dd954ea8a85a542ce900047ab6c", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c2/cb/1e9b2d26994e9dcd55d1df152b19", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/4a/ae/c8878226f4a2d507f4ff5f377859", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/18/0f/9abd66eae1925271ab132163f2e0", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/54/c0/bb411385e3aefb55ca3fb4150e60", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/3c/61/37d143c8b14fb05990c0b8bc8f52", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/f6/61/3958823929bcf2cdd9ca694d0ad7", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d5/73/b714b3e9a36076dee085fcdc7db2", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/fc/42/8ad2896d59013850516d54f49b7d", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/d1/7c/c554ffc1f8c71bc08d4b025ccf4e", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/48/a9/94778472d1c43f556fee5e93c0ab", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/aa/f1/1c36c23d4d5bd6516adddc206514", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/af/76/63cfa6cc0915d35583bcaf30a2e0", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/2f/bb/8bfbea820878f58c5cb9cc702ff0", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/4b/06/d72c7d9965890905dd3291c7f2c6", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c1/02/c9cfaf45b9003df94a2a8e277075", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4c/47/a66e6ce399dc00ade26e761f876f", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/b4/a4/6c844726fc0fb13925622b754cc9", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/4b/39/91b9746101e23fd615424b1721e5", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/31/07/5e49d34cd8bc204fb38e920f133c", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/6d/b1/6c593726c41a32066ba34ccf2ff5", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/81/60/37044e17e52ca125c1d48af83d03", + "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fb/47/d505c3feea40888985dd335dc8c4", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4f/3d/20c78e744ac26a13b7418166d675", + "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e3/77/67a1fafff2c1918b1661b71ecaa0", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9b/00/f11d8f7f79c9b692b84f6dbd54dc", + "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f8/3a/0cd5030cbe13f99bf23d05ee6cfb", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5b/2a/3be2a55cbd63f9c42618c4013c87", + "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/09/ef/8fbfc6032e6a6089215c3dc365a1", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f8/79/31ecc50de3e52c55a1569b8b9438", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8a/a0/3ef54e3c6c3c777f8a221da16c14", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ee/a8/07c5e78d027bfc1acc88a25932b4", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ec/f5/a161f6c194a64f371e35e31bbfca", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/56/45/b6b9259f447f19ef0643b972bc64", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3b/79/592c41691e94807d23a783723861", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/13/d9/36f4cf8527494f419db74ae6c78f", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ee/e5/7f0677e6fb8d7cfa169930579712", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/8c/4c/3bb058268312359ad8be98f35d9a", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/0a/09/1708ba819095ed0d708fdf4db96a", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/51/79/b0cccbb7292b56b00a9298d1a22f", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/20/2a/30500076cd30d44260a8365c02b5", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/88/a2/ca9e4011d6fa8b366159838b53a1", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/af/b2/b3a702920a14288ceb1603f1f091", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/70/57/1c725a736ebba2035fe3a3ec64df", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/ba/b8/e952aa9d40f5453db0acd4361f10", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d9a38ec..8602aef4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20825, api 7, 2022-09-12) +### 1.7.7 (build 20829, api 7, 2022-09-12) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. @@ -24,6 +24,7 @@ - Renamed C++ Media to Assets. - Removed 'scores to beat' list in coop which was only ever functional in limited cases on the Mac version. Perhaps that feature can reappear in a cross-platform way sometime. - Simplified C++ bootstrapping to allocate all globals in one place. +- Renamed C++ Game class to Logic. ### 1.7.6 (build 20687, api 7, 2022-08-11) - Cleaned up da MetaSubsystem code. diff --git a/assets/src/ba_data/python/._bainternal_sources_hash b/assets/src/ba_data/python/._bainternal_sources_hash index 1da66812..0321a786 100644 --- a/assets/src/ba_data/python/._bainternal_sources_hash +++ b/assets/src/ba_data/python/._bainternal_sources_hash @@ -1 +1 @@ -174884230264825984620020844009502663721 \ No newline at end of file +304827393730630459319623179535089986346 \ No newline at end of file diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 039c0fcd..fdd14841 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -38,7 +38,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20825 + expected_build = 20829 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/ballisticacore-cmake/CMakeLists.txt b/ballisticacore-cmake/CMakeLists.txt index 1cc4586d..8311aaf2 100644 --- a/ballisticacore-cmake/CMakeLists.txt +++ b/ballisticacore-cmake/CMakeLists.txt @@ -332,40 +332,6 @@ add_executable(ballisticacore ${BA_SRC_ROOT}/ballistica/dynamics/part.h ${BA_SRC_ROOT}/ballistica/dynamics/rigid_body.cc ${BA_SRC_ROOT}/ballistica/dynamics/rigid_body.h - ${BA_SRC_ROOT}/ballistica/game/client_controller_interface.h - ${BA_SRC_ROOT}/ballistica/game/connection/connection.cc - ${BA_SRC_ROOT}/ballistica/game/connection/connection.h - ${BA_SRC_ROOT}/ballistica/game/connection/connection_set.cc - ${BA_SRC_ROOT}/ballistica/game/connection/connection_set.h - ${BA_SRC_ROOT}/ballistica/game/connection/connection_to_client.cc - ${BA_SRC_ROOT}/ballistica/game/connection/connection_to_client.h - ${BA_SRC_ROOT}/ballistica/game/connection/connection_to_client_udp.cc - ${BA_SRC_ROOT}/ballistica/game/connection/connection_to_client_udp.h - ${BA_SRC_ROOT}/ballistica/game/connection/connection_to_host.cc - ${BA_SRC_ROOT}/ballistica/game/connection/connection_to_host.h - ${BA_SRC_ROOT}/ballistica/game/connection/connection_to_host_udp.cc - ${BA_SRC_ROOT}/ballistica/game/connection/connection_to_host_udp.h - ${BA_SRC_ROOT}/ballistica/game/friend_score_set.h - ${BA_SRC_ROOT}/ballistica/game/game.cc - ${BA_SRC_ROOT}/ballistica/game/game.h - ${BA_SRC_ROOT}/ballistica/game/host_activity.cc - ${BA_SRC_ROOT}/ballistica/game/host_activity.h - ${BA_SRC_ROOT}/ballistica/game/player.cc - ${BA_SRC_ROOT}/ballistica/game/player.h - ${BA_SRC_ROOT}/ballistica/game/player_spec.cc - ${BA_SRC_ROOT}/ballistica/game/player_spec.h - ${BA_SRC_ROOT}/ballistica/game/session/client_session.cc - ${BA_SRC_ROOT}/ballistica/game/session/client_session.h - ${BA_SRC_ROOT}/ballistica/game/session/host_session.cc - ${BA_SRC_ROOT}/ballistica/game/session/host_session.h - ${BA_SRC_ROOT}/ballistica/game/session/net_client_session.cc - ${BA_SRC_ROOT}/ballistica/game/session/net_client_session.h - ${BA_SRC_ROOT}/ballistica/game/session/replay_client_session.cc - ${BA_SRC_ROOT}/ballistica/game/session/replay_client_session.h - ${BA_SRC_ROOT}/ballistica/game/session/session.cc - ${BA_SRC_ROOT}/ballistica/game/session/session.h - ${BA_SRC_ROOT}/ballistica/game/v1_account.cc - ${BA_SRC_ROOT}/ballistica/game/v1_account.h ${BA_SRC_ROOT}/ballistica/generic/base64.cc ${BA_SRC_ROOT}/ballistica/generic/base64.h ${BA_SRC_ROOT}/ballistica/generic/buffer.h @@ -485,6 +451,40 @@ add_executable(ballisticacore ${BA_SRC_ROOT}/ballistica/input/remote_app.cc ${BA_SRC_ROOT}/ballistica/input/remote_app.h ${BA_SRC_ROOT}/ballistica/internal/app_internal.h + ${BA_SRC_ROOT}/ballistica/logic/client_controller_interface.h + ${BA_SRC_ROOT}/ballistica/logic/connection/connection.cc + ${BA_SRC_ROOT}/ballistica/logic/connection/connection.h + ${BA_SRC_ROOT}/ballistica/logic/connection/connection_set.cc + ${BA_SRC_ROOT}/ballistica/logic/connection/connection_set.h + ${BA_SRC_ROOT}/ballistica/logic/connection/connection_to_client.cc + ${BA_SRC_ROOT}/ballistica/logic/connection/connection_to_client.h + ${BA_SRC_ROOT}/ballistica/logic/connection/connection_to_client_udp.cc + ${BA_SRC_ROOT}/ballistica/logic/connection/connection_to_client_udp.h + ${BA_SRC_ROOT}/ballistica/logic/connection/connection_to_host.cc + ${BA_SRC_ROOT}/ballistica/logic/connection/connection_to_host.h + ${BA_SRC_ROOT}/ballistica/logic/connection/connection_to_host_udp.cc + ${BA_SRC_ROOT}/ballistica/logic/connection/connection_to_host_udp.h + ${BA_SRC_ROOT}/ballistica/logic/friend_score_set.h + ${BA_SRC_ROOT}/ballistica/logic/host_activity.cc + ${BA_SRC_ROOT}/ballistica/logic/host_activity.h + ${BA_SRC_ROOT}/ballistica/logic/logic.cc + ${BA_SRC_ROOT}/ballistica/logic/logic.h + ${BA_SRC_ROOT}/ballistica/logic/player.cc + ${BA_SRC_ROOT}/ballistica/logic/player.h + ${BA_SRC_ROOT}/ballistica/logic/player_spec.cc + ${BA_SRC_ROOT}/ballistica/logic/player_spec.h + ${BA_SRC_ROOT}/ballistica/logic/session/client_session.cc + ${BA_SRC_ROOT}/ballistica/logic/session/client_session.h + ${BA_SRC_ROOT}/ballistica/logic/session/host_session.cc + ${BA_SRC_ROOT}/ballistica/logic/session/host_session.h + ${BA_SRC_ROOT}/ballistica/logic/session/net_client_session.cc + ${BA_SRC_ROOT}/ballistica/logic/session/net_client_session.h + ${BA_SRC_ROOT}/ballistica/logic/session/replay_client_session.cc + ${BA_SRC_ROOT}/ballistica/logic/session/replay_client_session.h + ${BA_SRC_ROOT}/ballistica/logic/session/session.cc + ${BA_SRC_ROOT}/ballistica/logic/session/session.h + ${BA_SRC_ROOT}/ballistica/logic/v1_account.cc + ${BA_SRC_ROOT}/ballistica/logic/v1_account.h ${BA_SRC_ROOT}/ballistica/math/matrix44f.cc ${BA_SRC_ROOT}/ballistica/math/matrix44f.h ${BA_SRC_ROOT}/ballistica/math/point2d.h diff --git a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj index 504b79cc..ba959b23 100644 --- a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj +++ b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj @@ -323,40 +323,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -476,6 +442,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters index 7e1d56f9..cd16c516 100644 --- a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters +++ b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters @@ -403,108 +403,6 @@ ballistica\dynamics - - ballistica\game - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game - - - ballistica\game - - - ballistica\game - - - ballistica\game - - - ballistica\game - - - ballistica\game - - - ballistica\game - - - ballistica\game - - - ballistica\game - - - ballistica\game\session - - - ballistica\game\session - - - ballistica\game\session - - - ballistica\game\session - - - ballistica\game\session - - - ballistica\game\session - - - ballistica\game\session - - - ballistica\game\session - - - ballistica\game\session - - - ballistica\game\session - - - ballistica\game - - - ballistica\game - ballistica\generic @@ -862,6 +760,108 @@ ballistica\internal + + ballistica\logic + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic + + + ballistica\logic + + + ballistica\logic + + + ballistica\logic + + + ballistica\logic + + + ballistica\logic + + + ballistica\logic + + + ballistica\logic + + + ballistica\logic + + + ballistica\logic\session + + + ballistica\logic\session + + + ballistica\logic\session + + + ballistica\logic\session + + + ballistica\logic\session + + + ballistica\logic\session + + + ballistica\logic\session + + + ballistica\logic\session + + + ballistica\logic\session + + + ballistica\logic\session + + + ballistica\logic + + + ballistica\logic + ballistica\math @@ -1652,9 +1652,6 @@ - - - @@ -1665,6 +1662,9 @@ + + + diff --git a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj index 303289b0..c6adfba9 100644 --- a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj +++ b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj @@ -318,40 +318,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -471,6 +437,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters index 7e1d56f9..cd16c516 100644 --- a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters +++ b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters @@ -403,108 +403,6 @@ ballistica\dynamics - - ballistica\game - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game\connection - - - ballistica\game - - - ballistica\game - - - ballistica\game - - - ballistica\game - - - ballistica\game - - - ballistica\game - - - ballistica\game - - - ballistica\game - - - ballistica\game - - - ballistica\game\session - - - ballistica\game\session - - - ballistica\game\session - - - ballistica\game\session - - - ballistica\game\session - - - ballistica\game\session - - - ballistica\game\session - - - ballistica\game\session - - - ballistica\game\session - - - ballistica\game\session - - - ballistica\game - - - ballistica\game - ballistica\generic @@ -862,6 +760,108 @@ ballistica\internal + + ballistica\logic + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic\connection + + + ballistica\logic + + + ballistica\logic + + + ballistica\logic + + + ballistica\logic + + + ballistica\logic + + + ballistica\logic + + + ballistica\logic + + + ballistica\logic + + + ballistica\logic + + + ballistica\logic\session + + + ballistica\logic\session + + + ballistica\logic\session + + + ballistica\logic\session + + + ballistica\logic\session + + + ballistica\logic\session + + + ballistica\logic\session + + + ballistica\logic\session + + + ballistica\logic\session + + + ballistica\logic\session + + + ballistica\logic + + + ballistica\logic + ballistica\math @@ -1652,9 +1652,6 @@ - - - @@ -1665,6 +1662,9 @@ + + + diff --git a/src/ballistica/app/app_flavor.cc b/src/ballistica/app/app_flavor.cc index 4dfef290..3e085ae3 100644 --- a/src/ballistica/app/app_flavor.cc +++ b/src/ballistica/app/app_flavor.cc @@ -4,11 +4,11 @@ #include "ballistica/app/stress_test.h" #include "ballistica/core/thread.h" -#include "ballistica/game/game.h" #include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/renderer.h" #include "ballistica/input/device/touch_input.h" #include "ballistica/input/input.h" +#include "ballistica/logic/logic.h" #include "ballistica/networking/network_reader.h" #include "ballistica/networking/networking.h" #include "ballistica/networking/telnet_server.h" @@ -196,7 +196,7 @@ void AppFlavor::OnResume() { // Also let the Python layer do what it needs to // (starting/stopping music, etc.). g_python->PushObjCall(Python::ObjID::kHandleAppResumeCall); - g_game->PushOnAppResumeCall(); + g_logic->PushOnAppResumeCall(); g_graphics->SetGyroEnabled(true); @@ -211,7 +211,7 @@ void AppFlavor::OnResume() { // If we've been completely backgrounded, // send a menu-press command to the game; this will // bring up a pause menu if we're in the game/etc. - g_game->PushMainMenuPressCall(nullptr); + g_logic->PushMainMenuPressCall(nullptr); } } diff --git a/src/ballistica/app/app_flavor_vr.cc b/src/ballistica/app/app_flavor_vr.cc index 129d8b51..4fa5f7a6 100644 --- a/src/ballistica/app/app_flavor_vr.cc +++ b/src/ballistica/app/app_flavor_vr.cc @@ -4,9 +4,9 @@ #include "ballistica/app/app_flavor_vr.h" #include "ballistica/core/thread.h" -#include "ballistica/game/game.h" #include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/renderer.h" +#include "ballistica/logic/logic.h" namespace ballistica { @@ -87,7 +87,7 @@ auto AppFlavorVR::VRSetHands(const VRHandsState& state) -> void { renderer->VRSetHands(state); // ALSO ship it off to the game/ui thread to actually handle input from it. - g_game->PushVRHandsState(state); + g_logic->PushVRHandsState(state); } auto AppFlavorVR::VRDrawEye(int eye, float yaw, float pitch, float roll, diff --git a/src/ballistica/app/stress_test.cc b/src/ballistica/app/stress_test.cc index d7f22d39..dd63eb23 100644 --- a/src/ballistica/app/stress_test.cc +++ b/src/ballistica/app/stress_test.cc @@ -82,7 +82,7 @@ void StressTest::Update() { texture_count = g_assets->total_texture_count(); sound_count = g_assets->total_sound_count(); } - assert(g_game); + assert(g_logic); std::string mem_usage = g_platform->GetMemUsageInfo(); fprintf(stress_test_stats_file_, "%d,%.1f,%d,%d,%d,%d,%d,%s\n", static_cast_check_fit(GetRealTime()), avg, node_count, diff --git a/src/ballistica/assets/assets.cc b/src/ballistica/assets/assets.cc index 734e59e3..9393e7a8 100644 --- a/src/ballistica/assets/assets.cc +++ b/src/ballistica/assets/assets.cc @@ -14,10 +14,10 @@ #include "ballistica/assets/data/sound_data.h" #include "ballistica/audio/audio_server.h" #include "ballistica/core/thread.h" -#include "ballistica/game/game.h" #include "ballistica/generic/timer.h" #include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/text/text_packer.h" +#include "ballistica/logic/logic.h" #include "ballistica/python/python_sys.h" namespace ballistica { @@ -813,8 +813,8 @@ auto Assets::RunPendingLoadList(std::vector*>* c_list) -> bool { // if we dumped anything on the pending loads done list, shake the game thread // to tell it to kill the reference.. if (!l_finished.empty()) { - assert(g_game); - g_game->PushHavePendingLoadsDoneCall(); + assert(g_logic); + g_logic->PushHavePendingLoadsDoneCall(); } return (!l.empty()); } @@ -1186,7 +1186,7 @@ void Assets::AddPendingLoad(Object::Ref* c) { std::scoped_lock lock(pending_load_list_mutex_); pending_loads_other_.push_back(c); } - g_game->PushHavePendingLoadsCall(); + g_logic->PushHavePendingLoadsCall(); break; } } diff --git a/src/ballistica/audio/audio_server.cc b/src/ballistica/audio/audio_server.cc index e6abaca9..074ee8d4 100644 --- a/src/ballistica/audio/audio_server.cc +++ b/src/ballistica/audio/audio_server.cc @@ -11,8 +11,8 @@ #include "ballistica/audio/audio_streamer.h" #include "ballistica/audio/ogg_stream.h" #include "ballistica/core/thread.h" -#include "ballistica/game/game.h" #include "ballistica/generic/timer.h" +#include "ballistica/logic/logic.h" #include "ballistica/math/vector3f.h" // Need to move away from OpenAL on Apple stuff. @@ -1114,7 +1114,7 @@ void AudioServer::PushComponentUnloadCall( } // ...and then ship these pointers back to the game thread, so it can free // the references. - g_game->PushFreeAssetComponentRefsCall(components); + g_logic->PushFreeAssetComponentRefsCall(components); }); } @@ -1131,7 +1131,8 @@ void AudioServer::AddSoundRefDelete(const Object::Ref* c) { sound_ref_delete_list_.push_back(c); } // Now push a call to the game thread to do the deletes. - g_game->thread()->PushCall([] { g_audio_server->ClearSoundRefDeleteList(); }); + g_logic->thread()->PushCall( + [] { g_audio_server->ClearSoundRefDeleteList(); }); } void AudioServer::ClearSoundRefDeleteList() { diff --git a/src/ballistica/audio/audio_server.h b/src/ballistica/audio/audio_server.h index 026bda6a..4b9bad0c 100644 --- a/src/ballistica/audio/audio_server.h +++ b/src/ballistica/audio/audio_server.h @@ -40,7 +40,7 @@ class AudioServer { auto PushComponentUnloadCall( const std::vector*>& components) -> void; - /// For use by g_game_module(). + /// For use by g_logic_module(). auto ClearSoundRefDeleteList() -> void; auto paused() const -> bool { return paused_; } diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 3d2efe3a..6e2515fe 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -16,11 +16,11 @@ #include "ballistica/core/thread.h" #include "ballistica/dynamics/bg/bg_dynamics.h" #include "ballistica/dynamics/bg/bg_dynamics_server.h" -#include "ballistica/game/v1_account.h" #include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/text/text_graphics.h" #include "ballistica/input/input.h" #include "ballistica/internal/app_internal.h" +#include "ballistica/logic/v1_account.h" #include "ballistica/networking/network_writer.h" #include "ballistica/networking/networking.h" #include "ballistica/platform/platform.h" @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20825; +const int kAppBuildNumber = 20829; const char* kAppVersion = "1.7.7"; // Our standalone globals. @@ -50,7 +50,7 @@ AudioServer* g_audio_server{}; BGDynamics* g_bg_dynamics{}; BGDynamicsServer* g_bg_dynamics_server{}; Context* g_context{}; -Game* g_game{}; +Logic* g_logic{}; Graphics* g_graphics{}; GraphicsServer* g_graphics_server{}; Input* g_input{}; @@ -129,7 +129,7 @@ auto BallisticaMain(int argc, char** argv) -> int { g_network_writer = new NetworkWriter(); g_input = new Input(); g_app_internal = CreateAppInternal(); - g_game = new Game(); + g_logic = new Logic(); Scene::Init(); if (!HeadlessMode()) { g_bg_dynamics = new BGDynamics(); @@ -146,7 +146,7 @@ auto BallisticaMain(int argc, char** argv) -> int { // Phase 2: Set things in motion. // ------------------------------------------------------------------------- - g_game->OnAppStart(); + g_logic->OnAppStart(); g_audio_server->OnAppStart(); g_assets_server->OnAppStart(); g_platform->OnAppStart(); @@ -156,7 +156,7 @@ auto BallisticaMain(int argc, char** argv) -> int { } // Ok; now that we're bootstrapped, tell the game thread to read and apply // the config which should kick off the real action. - g_game->PushApplyConfigCall(); + g_logic->PushApplyConfigCall(); // ------------------------------------------------------------------------- // Phase 3/4: Create a screen and/or kick off game (in other threads). @@ -263,7 +263,7 @@ auto GetAppInstanceUUID() -> const std::string& { } auto InLogicThread() -> bool { - return (g_game && g_game->thread()->IsCurrent()); + return (g_logic && g_logic->thread()->IsCurrent()); } auto InMainThread() -> bool { @@ -297,10 +297,10 @@ auto Log(const std::string& msg, bool to_stdout, bool to_server) -> void { auto IsVRMode() -> bool { return g_app->vr_mode; } void ScreenMessage(const std::string& s, const Vector3f& color) { - if (g_game) { - g_game->PushScreenMessage(s, color); + if (g_logic) { + g_logic->PushScreenMessage(s, color); } else { - Log("ScreenMessage before g_game init (will be lost): '" + s + "'"); + Log("ScreenMessage before g_logic init (will be lost): '" + s + "'"); } } diff --git a/src/ballistica/ballistica.h b/src/ballistica/ballistica.h index ddba4f1c..f68705fb 100644 --- a/src/ballistica/ballistica.h +++ b/src/ballistica/ballistica.h @@ -113,10 +113,10 @@ extern AudioServer* g_audio_server; extern BGDynamics* g_bg_dynamics; extern BGDynamicsServer* g_bg_dynamics_server; extern Context* g_context; -extern Game* g_game; extern Graphics* g_graphics; extern GraphicsServer* g_graphics_server; extern Input* g_input; +extern Logic* g_logic; extern Thread* g_main_thread; extern Assets* g_assets; extern AssetsServer* g_assets_server; diff --git a/src/ballistica/core/context.cc b/src/ballistica/core/context.cc index 6b6da3fb..632f9f1b 100644 --- a/src/ballistica/core/context.cc +++ b/src/ballistica/core/context.cc @@ -2,8 +2,8 @@ #include "ballistica/core/context.h" -#include "ballistica/game/host_activity.h" #include "ballistica/generic/runnable.h" +#include "ballistica/logic/host_activity.h" #include "ballistica/ui/ui.h" namespace ballistica { diff --git a/src/ballistica/core/logging.cc b/src/ballistica/core/logging.cc index 5635ceb4..69a892b9 100644 --- a/src/ballistica/core/logging.cc +++ b/src/ballistica/core/logging.cc @@ -5,8 +5,8 @@ #include #include "ballistica/app/app.h" -#include "ballistica/game/game.h" #include "ballistica/internal/app_internal.h" +#include "ballistica/logic/logic.h" #include "ballistica/networking/telnet_server.h" #include "ballistica/platform/platform.h" #include "ballistica/python/python.h" @@ -16,8 +16,8 @@ namespace ballistica { static void PrintCommon(const std::string& s) { // Print to in-game console. { - if (g_game != nullptr) { - g_game->PushConsolePrintCall(s); + if (g_logic != nullptr) { + g_logic->PushConsolePrintCall(s); } else { if (g_platform != nullptr) { g_platform->HandleLog( diff --git a/src/ballistica/core/types.h b/src/ballistica/core/types.h index 154bfe9a..ab64b1d2 100644 --- a/src/ballistica/core/types.h +++ b/src/ballistica/core/types.h @@ -81,7 +81,6 @@ class DataData; class Dynamics; class FrameDef; struct FriendScoreSet; -class Game; class GLContext; class GlobalsNode; class Graphics; @@ -97,6 +96,7 @@ struct JointFixedEF; class Joystick; class JsonDict; class KeyboardInput; +class Logic; class Material; class MaterialAction; class MaterialComponent; diff --git a/src/ballistica/dynamics/bg/bg_dynamics_server.cc b/src/ballistica/dynamics/bg/bg_dynamics_server.cc index 1da1bf9b..c77d3369 100644 --- a/src/ballistica/dynamics/bg/bg_dynamics_server.cc +++ b/src/ballistica/dynamics/bg/bg_dynamics_server.cc @@ -10,9 +10,9 @@ #include "ballistica/dynamics/bg/bg_dynamics_shadow_data.h" #include "ballistica/dynamics/bg/bg_dynamics_volume_light_data.h" #include "ballistica/dynamics/collision_cache.h" -#include "ballistica/game/game.h" #include "ballistica/generic/utils.h" #include "ballistica/graphics/graphics_server.h" +#include "ballistica/logic/logic.h" namespace ballistica { @@ -87,7 +87,7 @@ class BGDynamicsServer::Terrain { // back to the main thread to get freed. if (collide_model_) { Object::Ref* ref = collide_model_; - g_game->thread()->PushCall([ref] { + g_logic->thread()->PushCall([ref] { (**ref).set_last_used_time(GetRealTime()); delete ref; }); @@ -2315,7 +2315,7 @@ void BGDynamicsServer::Step(StepData* step_data) { // Now generate a snapshot of our state and send it to the game thread, // so they can draw us. BGDynamicsDrawSnapshot* snapshot = CreateDrawSnapshot(); - g_game->thread()->PushCall([snapshot] { + g_logic->thread()->PushCall([snapshot] { snapshot->SetLogicThreadOwnership(); g_bg_dynamics->SetDrawSnapshot(snapshot); }); diff --git a/src/ballistica/dynamics/material/impact_sound_material_action.cc b/src/ballistica/dynamics/material/impact_sound_material_action.cc index b0eb9871..fd4952a4 100644 --- a/src/ballistica/dynamics/material/impact_sound_material_action.cc +++ b/src/ballistica/dynamics/material/impact_sound_material_action.cc @@ -4,9 +4,9 @@ #include "ballistica/dynamics/dynamics.h" #include "ballistica/dynamics/material/material_context.h" -#include "ballistica/game/session/client_session.h" #include "ballistica/generic/utils.h" #include "ballistica/graphics/graphics_server.h" +#include "ballistica/logic/session/client_session.h" #include "ballistica/scene/scene_stream.h" namespace ballistica { diff --git a/src/ballistica/dynamics/material/material_condition_node.cc b/src/ballistica/dynamics/material/material_condition_node.cc index 6fb5a663..6053ffbf 100644 --- a/src/ballistica/dynamics/material/material_condition_node.cc +++ b/src/ballistica/dynamics/material/material_condition_node.cc @@ -3,8 +3,8 @@ #include "ballistica/dynamics/material/material_condition_node.h" #include "ballistica/dynamics/material/material.h" -#include "ballistica/game/session/client_session.h" #include "ballistica/generic/utils.h" +#include "ballistica/logic/session/client_session.h" #include "ballistica/scene/scene_stream.h" namespace ballistica { diff --git a/src/ballistica/dynamics/material/roll_sound_material_action.cc b/src/ballistica/dynamics/material/roll_sound_material_action.cc index b9969a3b..363e9492 100644 --- a/src/ballistica/dynamics/material/roll_sound_material_action.cc +++ b/src/ballistica/dynamics/material/roll_sound_material_action.cc @@ -5,9 +5,9 @@ #include "ballistica/assets/component/sound.h" #include "ballistica/dynamics/dynamics.h" #include "ballistica/dynamics/material/material_context.h" -#include "ballistica/game/session/client_session.h" #include "ballistica/generic/utils.h" #include "ballistica/graphics/graphics_server.h" +#include "ballistica/logic/session/client_session.h" #include "ballistica/scene/scene_stream.h" namespace ballistica { diff --git a/src/ballistica/dynamics/material/skid_sound_material_action.cc b/src/ballistica/dynamics/material/skid_sound_material_action.cc index 652bfe29..838e3b7f 100644 --- a/src/ballistica/dynamics/material/skid_sound_material_action.cc +++ b/src/ballistica/dynamics/material/skid_sound_material_action.cc @@ -4,9 +4,9 @@ #include "ballistica/dynamics/dynamics.h" #include "ballistica/dynamics/material/material_context.h" -#include "ballistica/game/session/client_session.h" #include "ballistica/generic/utils.h" #include "ballistica/graphics/graphics_server.h" +#include "ballistica/logic/session/client_session.h" #include "ballistica/scene/scene_stream.h" namespace ballistica { diff --git a/src/ballistica/dynamics/material/sound_material_action.cc b/src/ballistica/dynamics/material/sound_material_action.cc index 9b9221b0..30d12696 100644 --- a/src/ballistica/dynamics/material/sound_material_action.cc +++ b/src/ballistica/dynamics/material/sound_material_action.cc @@ -3,8 +3,8 @@ #include "ballistica/dynamics/material/sound_material_action.h" #include "ballistica/dynamics/material/material_context.h" -#include "ballistica/game/session/client_session.h" #include "ballistica/generic/utils.h" +#include "ballistica/logic/session/client_session.h" #include "ballistica/scene/scene_stream.h" namespace ballistica { diff --git a/src/ballistica/dynamics/part.h b/src/ballistica/dynamics/part.h index b0bc494f..042ab6d1 100644 --- a/src/ballistica/dynamics/part.h +++ b/src/ballistica/dynamics/part.h @@ -71,7 +71,7 @@ class Part : public Object { // node/part combo. auto IsCollidingWith(int64_t node, int part) const -> bool; - // Used by g_game to inform us we're now colliding with another part + // Used by g_logic to inform us we're now colliding with another part // if colliding is false, we've stopped colliding with this part. void SetCollidingWith(int64_t node_id, int part, bool colliding, bool physical); diff --git a/src/ballistica/generic/real_timer.h b/src/ballistica/generic/real_timer.h index d59d23b4..88ce26f4 100644 --- a/src/ballistica/generic/real_timer.h +++ b/src/ballistica/generic/real_timer.h @@ -5,8 +5,8 @@ #include "ballistica/ballistica.h" #include "ballistica/core/object.h" -#include "ballistica/game/game.h" #include "ballistica/generic/runnable.h" +#include "ballistica/logic/logic.h" namespace ballistica { @@ -16,18 +16,18 @@ template class RealTimer : public Object { public: RealTimer(millisecs_t length, bool repeat, T* delegate) { - assert(g_game); + assert(g_logic); assert(InLogicThread()); - timer_id_ = g_game->NewRealTimer( + timer_id_ = g_logic->NewRealTimer( length, repeat, Object::New(delegate, this)); } void SetLength(uint32_t length) { assert(InLogicThread()); - g_game->SetRealTimerLength(timer_id_, length); + g_logic->SetRealTimerLength(timer_id_, length); } ~RealTimer() override { assert(InLogicThread()); - g_game->DeleteRealTimer(timer_id_); + g_logic->DeleteRealTimer(timer_id_); } private: diff --git a/src/ballistica/graphics/graphics.cc b/src/ballistica/graphics/graphics.cc index ca13b656..ac573e62 100644 --- a/src/ballistica/graphics/graphics.cc +++ b/src/ballistica/graphics/graphics.cc @@ -5,10 +5,6 @@ #include "ballistica/app/app.h" #include "ballistica/app/app_flavor.h" #include "ballistica/dynamics/bg/bg_dynamics.h" -#include "ballistica/game/connection/connection_set.h" -#include "ballistica/game/connection/connection_to_client.h" -#include "ballistica/game/connection/connection_to_host.h" -#include "ballistica/game/session/session.h" #include "ballistica/generic/utils.h" #include "ballistica/graphics/camera.h" #include "ballistica/graphics/component/empty_component.h" @@ -22,6 +18,10 @@ #include "ballistica/graphics/net_graph.h" #include "ballistica/graphics/text/text_graphics.h" #include "ballistica/input/input.h" +#include "ballistica/logic/connection/connection_set.h" +#include "ballistica/logic/connection/connection_to_client.h" +#include "ballistica/logic/connection/connection_to_host.h" +#include "ballistica/logic/session/session.h" #include "ballistica/python/python.h" #include "ballistica/python/python_context_call.h" #include "ballistica/scene/node/globals_node.h" @@ -293,7 +293,7 @@ void Graphics::DrawMiscOverlays(RenderPass* pass) { // Add in/out data for any host connection. if (ConnectionToHost* connection_to_host = - g_game->connections()->connection_to_host()) { + g_logic->connections()->connection_to_host()) { if (connection_to_host->can_communicate()) show = true; in_size += connection_to_host->GetBytesInPerSecond(); in_size_compressed += connection_to_host->GetBytesInPerSecondCompressed(); @@ -307,7 +307,7 @@ void Graphics::DrawMiscOverlays(RenderPass* pass) { ping = connection_to_host->average_ping(); } else { int connected_count = 0; - for (auto&& i : g_game->connections()->connections_to_clients()) { + for (auto&& i : g_logic->connections()->connections_to_clients()) { ConnectionToClient* client = i.second.get(); if (client->can_communicate()) { show = true; @@ -879,7 +879,7 @@ void Graphics::FadeScreen(bool to, millisecs_t time, PyObject* endcall) { if (g_buildconfig.debug_build()) { Log("WARNING: 2 fades overlapping; running first fade-end-call early"); } - g_game->PushPythonCall(fade_end_call_); + g_logic->PushPythonCall(fade_end_call_); fade_end_call_.Clear(); } set_fade_start_on_next_draw_ = true; @@ -991,17 +991,17 @@ void Graphics::BuildAndPushFrameDef() { // We should not be building/pushing any frames until after // app-launch-commands have been run.. - BA_PRECONDITION_FATAL(g_game->ran_app_launch_commands()); + BA_PRECONDITION_FATAL(g_logic->ran_app_launch_commands()); // This should no longer be necessary.. WaitForRendererToExist(); - Session* session = g_game->GetForegroundSession(); + Session* session = g_logic->GetForegroundSession(); bool session_fills_screen = session ? session->DoesFillScreen() : false; millisecs_t real_time = GetRealTime(); // Store how much time this frame_def represents. - millisecs_t net_time = g_game->master_time(); + millisecs_t net_time = g_logic->master_time(); millisecs_t elapsed = std::min(millisecs_t{50}, net_time - last_create_frame_def_time_); last_create_frame_def_time_ = net_time; @@ -1010,7 +1010,7 @@ void Graphics::BuildAndPushFrameDef() { FrameDef* frame_def = GetEmptyFrameDef(); frame_def->set_real_time(real_time); - frame_def->set_base_time(g_game->master_time()); + frame_def->set_base_time(g_logic->master_time()); frame_def->set_base_time_elapsed(elapsed); frame_def->set_frame_number(frame_def_count_++); @@ -1238,7 +1238,7 @@ void Graphics::DrawFades(FrameDef* frame_def, millisecs_t real_time) { } else { fade_ = 0; if (!was_done && fade_end_call_.exists()) { - g_game->PushPythonCall(fade_end_call_); + g_logic->PushPythonCall(fade_end_call_); fade_end_call_.Clear(); } } @@ -1801,7 +1801,7 @@ void Graphics::ScreenResize(float virtual_width, float virtual_height, void Graphics::ScreenMessageEntry::UpdateTranslation() { if (translation_dirty) { - s_translated = g_game->CompileResourceString( + s_translated = g_logic->CompileResourceString( s_raw, "Graphics::ScreenMessageEntry::UpdateTranslation"); translation_dirty = false; mesh_dirty = true; diff --git a/src/ballistica/graphics/graphics_server.cc b/src/ballistica/graphics/graphics_server.cc index 81dcdc78..9cabd091 100644 --- a/src/ballistica/graphics/graphics_server.cc +++ b/src/ballistica/graphics/graphics_server.cc @@ -86,7 +86,7 @@ auto GraphicsServer::GetRenderFrameDef() -> FrameDef* { // Tell the game thread we're ready for the next frame_def so it can start // building it while we render this one. - g_game->PushFrameDefRequest(); + g_logic->PushFrameDefRequest(); return frame_def; } @@ -197,7 +197,7 @@ void GraphicsServer::ReloadMedia() { // Now tell the game thread to kick off loads for everything, flip on // progress bar drawing, and then tell the graphics thread to stop ignoring // frame-defs. - g_game->thread()->PushCall([this] { + g_logic->thread()->PushCall([this] { g_assets->MarkAllAssetsForLoad(); g_graphics->EnableProgressBar(false); PushRemoveRenderHoldCall(); @@ -248,7 +248,7 @@ void GraphicsServer::RebuildLostContext() { // Now tell the game thread to kick off loads for everything, flip on progress // bar drawing, and then tell the graphics thread to stop ignoring frame-defs. - g_game->thread()->PushCall([this] { + g_logic->thread()->PushCall([this] { g_assets->MarkAllAssetsForLoad(); g_graphics->EnableProgressBar(false); PushRemoveRenderHoldCall(); @@ -356,7 +356,7 @@ void GraphicsServer::SetScreen(bool fullscreen, int width, int height, // what types of textures to load, etc) if (!initial_screen_created_) { initial_screen_created_ = true; - g_game->PushInitialScreenCreatedCall(); + g_logic->PushInitialScreenCreatedCall(); } } @@ -403,8 +403,8 @@ void GraphicsServer::HandleFullContextScreenRebuild( UpdateVirtualScreenRes(); // Inform the game thread of the latest values. - g_game->PushScreenResizeCall(res_x_virtual_, res_y_virtual_, res_x_, - res_y_); + g_logic->PushScreenResizeCall(res_x_virtual_, res_y_virtual_, res_x_, + res_y_); } if (!renderer_) { @@ -462,7 +462,7 @@ void GraphicsServer::HandleFullContextScreenRebuild( // Now tell the game thread to kick off loads for everything, flip on // progress bar drawing, and then tell the graphics thread to stop ignoring // frame-defs. - g_game->thread()->PushCall([this] { + g_logic->thread()->PushCall([this] { g_assets->MarkAllAssetsForLoad(); g_graphics->set_internal_components_inited(false); g_graphics->EnableProgressBar(false); @@ -514,7 +514,7 @@ void GraphicsServer::VideoResize(float h, float v) { UpdateVirtualScreenRes(); // Inform the game thread of the latest values. - g_game->PushScreenResizeCall(res_x_virtual_, res_y_virtual_, res_x_, res_y_); + g_logic->PushScreenResizeCall(res_x_virtual_, res_y_virtual_, res_x_, res_y_); if (renderer_) { renderer_->ScreenSizeChanged(); } @@ -775,7 +775,7 @@ void GraphicsServer::PushComponentUnloadCall( } // ..and then ship these pointers back to the game thread so it can free the // references. - g_game->PushFreeAssetComponentRefsCall(components); + g_logic->PushFreeAssetComponentRefsCall(components); }); } diff --git a/src/ballistica/graphics/vr_graphics.cc b/src/ballistica/graphics/vr_graphics.cc index 8bf2a90b..30aa4514 100644 --- a/src/ballistica/graphics/vr_graphics.cc +++ b/src/ballistica/graphics/vr_graphics.cc @@ -4,13 +4,13 @@ #include "ballistica/graphics/vr_graphics.h" #include "ballistica/app/app.h" -#include "ballistica/game/game.h" #include "ballistica/graphics/camera.h" #include "ballistica/graphics/component/object_component.h" #include "ballistica/graphics/component/simple_component.h" #include "ballistica/graphics/component/special_component.h" #include "ballistica/graphics/frame_def.h" #include "ballistica/graphics/render_pass.h" +#include "ballistica/logic/logic.h" #include "ballistica/scene/node/globals_node.h" namespace ballistica { @@ -290,7 +290,7 @@ void VRGraphics::DrawVRControllers(FrameDef* frame_def) { } // test right hand - const VRHandsState& s(g_game->vr_hands_state()); + const VRHandsState& s(g_logic->vr_hands_state()); switch (s.r.type) { case VRHandType::kOculusTouchR: diff --git a/src/ballistica/input/device/client_input_device.cc b/src/ballistica/input/device/client_input_device.cc index 7cd9de43..378292d0 100644 --- a/src/ballistica/input/device/client_input_device.cc +++ b/src/ballistica/input/device/client_input_device.cc @@ -2,8 +2,8 @@ #include "ballistica/input/device/client_input_device.h" -#include "ballistica/game/connection/connection_to_client.h" -#include "ballistica/game/player.h" +#include "ballistica/logic/connection/connection_to_client.h" +#include "ballistica/logic/player.h" #include "ballistica/networking/networking.h" namespace ballistica { diff --git a/src/ballistica/input/device/input_device.cc b/src/ballistica/input/device/input_device.cc index 16926d6f..b1ff66bd 100644 --- a/src/ballistica/input/device/input_device.cc +++ b/src/ballistica/input/device/input_device.cc @@ -6,11 +6,11 @@ #include #include "ballistica/app/app.h" -#include "ballistica/game/connection/connection_to_host.h" -#include "ballistica/game/player.h" -#include "ballistica/game/session/host_session.h" -#include "ballistica/game/session/net_client_session.h" #include "ballistica/internal/app_internal.h" +#include "ballistica/logic/connection/connection_to_host.h" +#include "ballistica/logic/player.h" +#include "ballistica/logic/session/host_session.h" +#include "ballistica/logic/session/net_client_session.h" #include "ballistica/networking/networking.h" #include "ballistica/python/class/python_class_input_device.h" #include "ballistica/python/python.h" @@ -109,13 +109,13 @@ auto InputDevice::GetDefaultPlayerName() -> std::string { auto InputDevice::GetButtonName(int id) -> std::string { // By default just say 'button 1' or whatnot. // FIXME: should return this in Lstr json form. - return g_game->GetResourceString("buttonText") + " " + std::to_string(id); + return g_logic->GetResourceString("buttonText") + " " + std::to_string(id); } auto InputDevice::GetAxisName(int id) -> std::string { // By default just return 'axis 5' or whatnot. // FIXME: should return this in Lstr json form. - return g_game->GetResourceString("axisText") + " " + std::to_string(id); + return g_logic->GetResourceString("axisText") + " " + std::to_string(id); } auto InputDevice::HasMeaningfulButtonNames() -> bool { return false; } @@ -207,7 +207,7 @@ void InputDevice::RequestPlayer() { assert(InLogicThread()); // Make note that we're being used in some way. - last_input_time_ = g_game->master_time(); + last_input_time_ = g_logic->master_time(); if (player_.exists()) { Log("Error: InputDevice::RequestPlayer()" @@ -222,14 +222,14 @@ void InputDevice::RequestPlayer() { // If we have a local host-session, ask it for a player.. otherwise if we have // a client-session, ask it for a player. - assert(g_game); - if (auto* hs = dynamic_cast(g_game->GetForegroundSession())) { + assert(g_logic); + if (auto* hs = dynamic_cast(g_logic->GetForegroundSession())) { { Python::ScopedCallLabel label("requestPlayer"); hs->RequestPlayer(this); } } else if (auto* client_session = dynamic_cast( - g_game->GetForegroundSession())) { + g_logic->GetForegroundSession())) { if (ConnectionToHost* connection_to_host = client_session->connection_to_host()) { std::vector data(2); @@ -270,7 +270,7 @@ void InputDevice::Update() { void InputDevice::UpdateLastInputTime() { // Keep our own individual time, and also let // the overall input system know something happened. - last_input_time_ = g_game->master_time(); + last_input_time_ = g_logic->master_time(); g_input->mark_input_active(); } diff --git a/src/ballistica/input/device/joystick.cc b/src/ballistica/input/device/joystick.cc index 292c1c01..5ee52393 100644 --- a/src/ballistica/input/device/joystick.cc +++ b/src/ballistica/input/device/joystick.cc @@ -6,9 +6,9 @@ #include "ballistica/app/app_flavor.h" #include "ballistica/audio/audio.h" #include "ballistica/core/thread.h" -#include "ballistica/game/connection/connection_set.h" -#include "ballistica/game/player.h" #include "ballistica/graphics/renderer.h" +#include "ballistica/logic/connection/connection_set.h" +#include "ballistica/logic/player.h" #include "ballistica/python/python.h" #include "ballistica/python/python_command.h" #include "ballistica/ui/root_ui.h" @@ -183,13 +183,13 @@ auto Joystick::GetButtonName(int index) -> std::string { if (strstr(GetDeviceName().c_str(), "Samsung Game Pad EI")) { switch (index) { case 101: - return g_game->CharStr(SpecialChar::kDiceButton4); // Y + return g_logic->CharStr(SpecialChar::kDiceButton4); // Y case 100: - return g_game->CharStr(SpecialChar::kDiceButton3); // X + return g_logic->CharStr(SpecialChar::kDiceButton3); // X case 98: - return g_game->CharStr(SpecialChar::kDiceButton2); // B + return g_logic->CharStr(SpecialChar::kDiceButton2); // B case 97: - return g_game->CharStr(SpecialChar::kDiceButton1); // A + return g_logic->CharStr(SpecialChar::kDiceButton1); // A default: break; } @@ -272,13 +272,13 @@ auto Joystick::GetButtonName(int index) -> std::string { case 204: return "B16"; case 90: - return g_game->CharStr(SpecialChar::kRewindButton); + return g_logic->CharStr(SpecialChar::kRewindButton); case 91: - return g_game->CharStr(SpecialChar::kFastForwardButton); + return g_logic->CharStr(SpecialChar::kFastForwardButton); case 24: - return g_game->CharStr(SpecialChar::kDpadCenterButton); + return g_logic->CharStr(SpecialChar::kDpadCenterButton); case 86: - return g_game->CharStr(SpecialChar::kPlayPauseButton); + return g_logic->CharStr(SpecialChar::kPlayPauseButton); default: break; } @@ -536,7 +536,7 @@ void Joystick::HandleSDLEvent(const SDL_Event* e) { // If we've got a child joystick, send them any events they're set to handle. if (child_joy_stick_) { - assert(g_game); + assert(g_logic); bool send = false; switch (e->type) { @@ -762,14 +762,14 @@ void Joystick::HandleSDLEvent(const SDL_Event* e) { } else { // If there's no menu up, // tell the game to pop it up and snag menu ownership for ourself. - g_game->PushMainMenuPressCall(this); + g_logic->PushMainMenuPressCall(this); return; } } // On our oculus build, select presses reset the orientation. if (e->jbutton.button == vr_reorient_button_ && IsVRMode()) { - ScreenMessage(g_game->GetResourceString("vrOrientationResetText"), + ScreenMessage(g_logic->GetResourceString("vrOrientationResetText"), {0, 1, 0}); g_app->reset_vr_orientation = true; return; @@ -991,8 +991,8 @@ void Joystick::HandleSDLEvent(const SDL_Event* e) { } else { // FIXME: Need a call we can make for this. bool do_party_button = false; - int party_size = g_game->GetPartySize(); - if (party_size > 1 || g_game->connections()->connection_to_host() + int party_size = g_logic->GetPartySize(); + if (party_size > 1 || g_logic->connections()->connection_to_host() || g_ui->root_ui()->always_draw_party_icon()) { do_party_button = true; } @@ -1533,7 +1533,7 @@ auto Joystick::GetPartyButtonName() const -> std::string { if (g_buildconfig.iircade_build()) { return "X"; } - return g_game->CharStr(SpecialChar::kTopButton); + return g_logic->CharStr(SpecialChar::kTopButton); } } // namespace ballistica diff --git a/src/ballistica/input/device/keyboard_input.cc b/src/ballistica/input/device/keyboard_input.cc index 415578eb..b76c5ee6 100644 --- a/src/ballistica/input/device/keyboard_input.cc +++ b/src/ballistica/input/device/keyboard_input.cc @@ -2,7 +2,7 @@ #include "ballistica/input/device/keyboard_input.h" -#include "ballistica/game/player.h" +#include "ballistica/logic/player.h" #include "ballistica/platform/platform.h" #include "ballistica/python/python.h" #include "ballistica/ui/ui.h" @@ -139,7 +139,7 @@ auto KeyboardInput::HandleKey(const SDL_Keysym* keysym, bool repeat, bool down) // Bring up menu if start is pressed. if (keysym->sym == start_key_ && !repeat && g_ui && g_ui->screen_root_widget() && g_ui->screen_root_widget()->GetChildCount() == 0) { - g_game->PushMainMenuPressCall(this); + g_logic->PushMainMenuPressCall(this); return true; } diff --git a/src/ballistica/input/device/test_input.cc b/src/ballistica/input/device/test_input.cc index d3ad9fc2..40272ee4 100644 --- a/src/ballistica/input/device/test_input.cc +++ b/src/ballistica/input/device/test_input.cc @@ -2,9 +2,9 @@ #include "ballistica/input/device/test_input.h" -#include "ballistica/game/game.h" #include "ballistica/input/device/joystick.h" #include "ballistica/input/input.h" +#include "ballistica/logic/logic.h" #include "ballistica/platform/min_sdl.h" namespace ballistica { diff --git a/src/ballistica/input/device/touch_input.cc b/src/ballistica/input/device/touch_input.cc index a75e1dd6..6ecb4dc7 100644 --- a/src/ballistica/input/device/touch_input.cc +++ b/src/ballistica/input/device/touch_input.cc @@ -4,10 +4,10 @@ #include "ballistica/app/app.h" #include "ballistica/app/app_config.h" -#include "ballistica/game/host_activity.h" -#include "ballistica/game/player.h" #include "ballistica/graphics/camera.h" #include "ballistica/graphics/component/simple_component.h" +#include "ballistica/logic/host_activity.h" +#include "ballistica/logic/player.h" #include "ballistica/python/python.h" #include "ballistica/scene/node/player_node.h" #include "ballistica/ui/ui.h" @@ -504,12 +504,12 @@ void TouchInput::Draw(FrameDef* frame_def) { // to pull a node for the player we're attached to. if (HostActivity* host_activity = - g_game->GetForegroundContext().GetHostActivity()) { + g_logic->GetForegroundContext().GetHostActivity()) { if (Player* player = GetPlayer()) { player_node = host_activity->scene()->GetPlayerNode(player->id()); } } else { - if (Scene* scene = g_game->GetForegroundScene()) { + if (Scene* scene = g_logic->GetForegroundScene()) { player_node = scene->GetPlayerNode(remote_player_id()); } } @@ -944,8 +944,9 @@ auto TouchInput::HandleTouchDown(void* touch, float x, float y) -> bool { // ..so lets issue a warning to that effect if there's already // controllers active.. (only if we got a player though). if (attached_to_player() && g_input->HaveControllerWithPlayer()) { - ScreenMessage(g_game->GetResourceString("touchScreenJoinWarningText"), - {1.0f, 1.0f, 0.0f}); + ScreenMessage( + g_logic->GetResourceString("touchScreenJoinWarningText"), + {1.0f, 1.0f, 0.0f}); } } } else { diff --git a/src/ballistica/input/input.cc b/src/ballistica/input/input.cc index 5ddd187f..4cbfd4ed 100644 --- a/src/ballistica/input/input.cc +++ b/src/ballistica/input/input.cc @@ -6,12 +6,12 @@ #include "ballistica/app/app_config.h" #include "ballistica/audio/audio.h" #include "ballistica/core/thread.h" -#include "ballistica/game/player.h" #include "ballistica/graphics/camera.h" #include "ballistica/input/device/joystick.h" #include "ballistica/input/device/keyboard_input.h" #include "ballistica/input/device/test_input.h" #include "ballistica/input/device/touch_input.h" +#include "ballistica/logic/player.h" #include "ballistica/python/python.h" #include "ballistica/ui/console.h" #include "ballistica/ui/root_ui.h" @@ -321,7 +321,7 @@ static const char* const scancode_names[SDL_NUM_SCANCODES] = { Input::Input() {} void Input::PushCreateKeyboardInputDevices() { - g_game->thread()->PushCall([this] { CreateKeyboardInputDevices(); }); + g_logic->thread()->PushCall([this] { CreateKeyboardInputDevices(); }); } void Input::CreateKeyboardInputDevices() { @@ -337,7 +337,7 @@ void Input::CreateKeyboardInputDevices() { } void Input::PushDestroyKeyboardInputDevices() { - g_game->thread()->PushCall([this] { DestroyKeyboardInputDevices(); }); + g_logic->thread()->PushCall([this] { DestroyKeyboardInputDevices(); }); } void Input::DestroyKeyboardInputDevices() { @@ -460,25 +460,25 @@ void Input::AnnounceConnects() { // If there's been several connected, just give a number. if (explicit_bool(do_print)) { if (newly_connected_controllers_.size() > 1) { - std::string s = g_game->GetResourceString("controllersDetectedText"); + std::string s = g_logic->GetResourceString("controllersDetectedText"); Utils::StringReplaceOne( &s, "${COUNT}", std::to_string(newly_connected_controllers_.size())); ScreenMessage(s); } else { - ScreenMessage(g_game->GetResourceString("controllerDetectedText")); + ScreenMessage(g_logic->GetResourceString("controllerDetectedText")); } } } else { // If there's been several connected, just give a number. if (newly_connected_controllers_.size() > 1) { - std::string s = g_game->GetResourceString("controllersConnectedText"); + std::string s = g_logic->GetResourceString("controllersConnectedText"); Utils::StringReplaceOne( &s, "${COUNT}", std::to_string(newly_connected_controllers_.size())); ScreenMessage(s); } else { // If its just one, name it. - std::string s = g_game->GetResourceString("controllerConnectedText"); + std::string s = g_logic->GetResourceString("controllerConnectedText"); Utils::StringReplaceOne(&s, "${CONTROLLER}", newly_connected_controllers_.front()); ScreenMessage(s); @@ -492,13 +492,13 @@ void Input::AnnounceConnects() { void Input::AnnounceDisconnects() { // If there's been several connected, just give a number. if (newly_disconnected_controllers_.size() > 1) { - std::string s = g_game->GetResourceString("controllersDisconnectedText"); + std::string s = g_logic->GetResourceString("controllersDisconnectedText"); Utils::StringReplaceOne( &s, "${COUNT}", std::to_string(newly_disconnected_controllers_.size())); ScreenMessage(s); } else { // If its just one, name it. - std::string s = g_game->GetResourceString("controllerDisconnectedText"); + std::string s = g_logic->GetResourceString("controllerDisconnectedText"); Utils::StringReplaceOne(&s, "${CONTROLLER}", newly_disconnected_controllers_.front()); ScreenMessage(s); @@ -520,9 +520,9 @@ void Input::ShowStandardInputDeviceConnectedMessage(InputDevice* j) { // Set a timer to go off and announce the accumulated additions. if (connect_print_timer_id_ != 0) { - g_game->DeleteRealTimer(connect_print_timer_id_); + g_logic->DeleteRealTimer(connect_print_timer_id_); } - connect_print_timer_id_ = g_game->NewRealTimer( + connect_print_timer_id_ = g_logic->NewRealTimer( 250, false, NewLambdaRunnable([this] { AnnounceConnects(); })); } @@ -535,15 +535,15 @@ void Input::ShowStandardInputDeviceDisconnectedMessage(InputDevice* j) { // Set a timer to go off and announce the accumulated additions. if (disconnect_print_timer_id_ != 0) { - g_game->DeleteRealTimer(disconnect_print_timer_id_); + g_logic->DeleteRealTimer(disconnect_print_timer_id_); } - disconnect_print_timer_id_ = g_game->NewRealTimer( + disconnect_print_timer_id_ = g_logic->NewRealTimer( 250, false, NewLambdaRunnable([this] { AnnounceDisconnects(); })); } void Input::PushAddInputDeviceCall(InputDevice* input_device, bool standard_message) { - g_game->thread()->PushCall([this, input_device, standard_message] { + g_logic->thread()->PushCall([this, input_device, standard_message] { AddInputDevice(input_device, standard_message); }); } @@ -605,7 +605,7 @@ void Input::AddInputDevice(InputDevice* input, bool standard_message) { void Input::PushRemoveInputDeviceCall(InputDevice* input_device, bool standard_message) { - g_game->thread()->PushCall([this, input_device, standard_message] { + g_logic->thread()->PushCall([this, input_device, standard_message] { RemoveInputDevice(input_device, standard_message); }); } @@ -636,8 +636,8 @@ void Input::RemoveInputDevice(InputDevice* input, bool standard_message) { // a call to do it; otherwise its possible that someone tries // to access the player's inputdevice before the call goes // through which would lead to an exception. - g_game->RemovePlayer(input->GetPlayer()); - // g_game->PushRemovePlayerCall(input->GetPlayer()); + g_logic->RemovePlayer(input->GetPlayer()); + // g_logic->PushRemovePlayerCall(input->GetPlayer()); } if (input->GetRemotePlayer() != nullptr) { input->RemoveRemotePlayerFromGame(); @@ -672,7 +672,7 @@ void Input::UpdateInputDeviceCounts() { if (input_device.exists() && ((*input_device).IsTouchScreen() || (*input_device).IsKeyboard() || ((*input_device).last_input_time() != 0 - && g_game->master_time() - (*input_device).last_input_time() + && g_logic->master_time() - (*input_device).last_input_time() < 60000))) { total++; if (!(*input_device).IsTouchScreen()) { @@ -703,7 +703,7 @@ auto Input::GetLocalActiveInputDeviceCount() -> int { assert(InLogicThread()); // This can get called alot so lets cache the value. - millisecs_t current_time = g_game->master_time(); + millisecs_t current_time = g_logic->master_time(); if (current_time != last_get_local_active_input_device_count_check_time_) { last_get_local_active_input_device_count_check_time_ = current_time; @@ -715,7 +715,7 @@ auto Input::GetLocalActiveInputDeviceCount() -> int { && !input_device->IsTouchScreen() && !input_device->IsUIOnly() && input_device->IsLocal() && (input_device->last_input_time() != 0 - && g_game->master_time() - input_device->last_input_time() + && g_logic->master_time() - input_device->last_input_time() < 60000)) { count++; } @@ -1061,7 +1061,7 @@ void Input::HandleBackPress(bool from_toolbar) { // if available). if (g_ui->screen_root_widget()->GetChildCount() == 0 && g_ui->overlay_root_widget()->GetChildCount() == 0) { - g_game->PushMainMenuPressCall(touch_input_); + g_logic->PushMainMenuPressCall(touch_input_); } else { if (from_toolbar) { // NOTE - this means the toolbar back button can never apply to overlay @@ -1076,7 +1076,7 @@ void Input::HandleBackPress(bool from_toolbar) { } void Input::PushTextInputEvent(const std::string& text) { - g_game->thread()->PushCall([this, text] { + g_logic->thread()->PushCall([this, text] { mark_input_active(); // Ignore if input is locked. @@ -1093,7 +1093,7 @@ void Input::PushTextInputEvent(const std::string& text) { auto Input::PushJoystickEvent(const SDL_Event& event, InputDevice* input_device) -> void { - g_game->thread()->PushCall([this, event, input_device] { + g_logic->thread()->PushCall([this, event, input_device] { HandleJoystickEvent(event, input_device); }); } @@ -1125,11 +1125,11 @@ void Input::HandleJoystickEvent(const SDL_Event& event, } void Input::PushKeyPressEvent(const SDL_Keysym& keysym) { - g_game->thread()->PushCall([this, keysym] { HandleKeyPress(&keysym); }); + g_logic->thread()->PushCall([this, keysym] { HandleKeyPress(&keysym); }); } void Input::PushKeyReleaseEvent(const SDL_Keysym& keysym) { - g_game->thread()->PushCall([this, keysym] { HandleKeyRelease(&keysym); }); + g_logic->thread()->PushCall([this, keysym] { HandleKeyRelease(&keysym); }); } void Input::HandleKeyPress(const SDL_Keysym* keysym) { @@ -1194,7 +1194,7 @@ void Input::HandleKeyPress(const SDL_Keysym* keysym) { // Command-Q or Control-Q quits. if (!repeat_press && keysym->sym == SDLK_q && ((keysym->mod & KMOD_CTRL) || (keysym->mod & KMOD_GUI))) { // NOLINT - g_game->PushConfirmQuitCall(); + g_logic->PushConfirmQuitCall(); return; } } @@ -1223,7 +1223,7 @@ void Input::HandleKeyPress(const SDL_Keysym* keysym) { // If there's no dialogs/windows up, ask for a menu (owned by the // touch-screen if available). if (g_ui->screen_root_widget()->GetChildCount() == 0) { - g_game->PushMainMenuPressCall(touch_input_); + g_logic->PushMainMenuPressCall(touch_input_); } } handled = true; @@ -1237,12 +1237,12 @@ void Input::HandleKeyPress(const SDL_Keysym* keysym) { case SDLK_EQUALS: case SDLK_PLUS: - g_game->ChangeGameSpeed(1); + g_logic->ChangeGameSpeed(1); handled = true; break; case SDLK_MINUS: - g_game->ChangeGameSpeed(-1); + g_logic->ChangeGameSpeed(-1); handled = true; break; @@ -1253,12 +1253,12 @@ void Input::HandleKeyPress(const SDL_Keysym* keysym) { } case SDLK_F7: - g_game->PushToggleManualCameraCall(); + g_logic->PushToggleManualCameraCall(); handled = true; break; case SDLK_F8: - g_game->PushToggleDebugInfoDisplayCall(); + g_logic->PushToggleDebugInfoDisplayCall(); handled = true; break; @@ -1268,7 +1268,7 @@ void Input::HandleKeyPress(const SDL_Keysym* keysym) { break; case SDLK_F10: - g_game->PushToggleCollisionGeometryDisplayCall(); + g_logic->PushToggleCollisionGeometryDisplayCall(); handled = true; break; @@ -1281,7 +1281,7 @@ void Input::HandleKeyPress(const SDL_Keysym* keysym) { if (g_ui->screen_root_widget()->GetChildCount() == 0 && g_ui->overlay_root_widget()->GetChildCount() == 0) { if (keyboard_input_) { - g_game->PushMainMenuPressCall(keyboard_input_); + g_logic->PushMainMenuPressCall(keyboard_input_); } } else { // Ok there's a UI up.. send along a cancel message. @@ -1378,7 +1378,7 @@ auto Input::UpdateModKeyStates(const SDL_Keysym* keysym, bool press) -> void { } auto Input::PushMouseScrollEvent(const Vector2f& amount) -> void { - g_game->thread()->PushCall([this, amount] { HandleMouseScroll(amount); }); + g_logic->thread()->PushCall([this, amount] { HandleMouseScroll(amount); }); } auto Input::HandleMouseScroll(const Vector2f& amount) -> void { @@ -1411,7 +1411,7 @@ auto Input::HandleMouseScroll(const Vector2f& amount) -> void { auto Input::PushSmoothMouseScrollEvent(const Vector2f& velocity, bool momentum) -> void { - g_game->thread()->PushCall([this, velocity, momentum] { + g_logic->thread()->PushCall([this, velocity, momentum] { HandleSmoothMouseScroll(velocity, momentum); }); } @@ -1446,7 +1446,8 @@ auto Input::HandleSmoothMouseScroll(const Vector2f& velocity, bool momentum) } auto Input::PushMouseMotionEvent(const Vector2f& position) -> void { - g_game->thread()->PushCall([this, position] { HandleMouseMotion(position); }); + g_logic->thread()->PushCall( + [this, position] { HandleMouseMotion(position); }); } auto Input::HandleMouseMotion(const Vector2f& position) -> void { @@ -1497,7 +1498,7 @@ auto Input::HandleMouseMotion(const Vector2f& position) -> void { } auto Input::PushMouseDownEvent(int button, const Vector2f& position) -> void { - g_game->thread()->PushCall( + g_logic->thread()->PushCall( [this, button, position] { HandleMouseDown(button, position); }); } @@ -1574,7 +1575,7 @@ auto Input::HandleMouseDown(int button, const Vector2f& position) -> void { } auto Input::PushMouseUpEvent(int button, const Vector2f& position) -> void { - g_game->thread()->PushCall( + g_logic->thread()->PushCall( [this, button, position] { HandleMouseUp(button, position); }); } @@ -1623,7 +1624,7 @@ auto Input::HandleMouseUp(int button, const Vector2f& position) -> void { } void Input::PushTouchEvent(const TouchEvent& e) { - g_game->thread()->PushCall([e, this] { HandleTouchEvent(e); }); + g_logic->thread()->PushCall([e, this] { HandleTouchEvent(e); }); } void Input::HandleTouchEvent(const TouchEvent& e) { diff --git a/src/ballistica/input/remote_app.cc b/src/ballistica/input/remote_app.cc index 28c70dfe..2bac63ec 100644 --- a/src/ballistica/input/remote_app.cc +++ b/src/ballistica/input/remote_app.cc @@ -11,9 +11,9 @@ #include "ballistica/app/app.h" #include "ballistica/assets/assets.h" -#include "ballistica/game/game.h" #include "ballistica/generic/utils.h" #include "ballistica/input/input.h" +#include "ballistica/logic/logic.h" #include "ballistica/math/vector3f.h" #include "ballistica/networking/network_reader.h" #include "ballistica/platform/min_sdl.h" @@ -165,10 +165,10 @@ void RemoteAppServer::HandleData(int socket, uint8_t* buffer, size_t amt, // Replace ${CONTROLLER} with it in our message. std::string s = - g_game->GetResourceString("controllerDisconnectedText"); + g_logic->GetResourceString("controllerDisconnectedText"); Utils::StringReplaceOne(&s, "${CONTROLLER}", m); - g_game->PushScreenMessage(s, Vector3f(1, 1, 1)); - g_game->PushPlaySoundCall(SystemSoundID::kCorkPop); + g_logic->PushScreenMessage(s, Vector3f(1, 1, 1)); + g_logic->PushPlaySoundCall(SystemSoundID::kCorkPop); g_input->PushRemoveInputDeviceCall(client->joystick_, false); client->joystick_ = nullptr; client->in_use = false; @@ -367,10 +367,10 @@ auto RemoteAppServer::GetClient(int request_id, struct sockaddr* addr, snprintf(m, sizeof(m), "%s", clients_[i].display_name); // Replace ${CONTROLLER} with it in our message. - std::string s = g_game->GetResourceString("controllerReconnectedText"); + std::string s = g_logic->GetResourceString("controllerReconnectedText"); Utils::StringReplaceOne(&s, "${CONTROLLER}", m); - g_game->PushScreenMessage(s, Vector3f(1, 1, 1)); - g_game->PushPlaySoundCall(SystemSoundID::kGunCock); + g_logic->PushScreenMessage(s, Vector3f(1, 1, 1)); + g_logic->PushPlaySoundCall(SystemSoundID::kGunCock); } clients_[i].in_use = true; return i; @@ -407,10 +407,10 @@ auto RemoteAppServer::GetClient(int request_id, struct sockaddr* addr, snprintf(m, sizeof(m), "%s", clients_[i].display_name); // Replace ${CONTROLLER} with it in our message. - std::string s = g_game->GetResourceString("controllerConnectedText"); + std::string s = g_logic->GetResourceString("controllerConnectedText"); Utils::StringReplaceOne(&s, "${CONTROLLER}", m); - g_game->PushScreenMessage(s, Vector3f(1, 1, 1)); - g_game->PushPlaySoundCall(SystemSoundID::kGunCock); + g_logic->PushScreenMessage(s, Vector3f(1, 1, 1)); + g_logic->PushPlaySoundCall(SystemSoundID::kGunCock); std::string utf8 = Utils::GetValidUTF8(clients_[i].display_name, "rsgc1"); clients_[i].joystick_ = Object::NewDeferred( -1, // not an sdl joystick @@ -425,7 +425,7 @@ auto RemoteAppServer::GetClient(int request_id, struct sockaddr* addr, if (Utils::UTF8StringLength(utf8.c_str()) <= 10) { clients_[i].joystick_->set_custom_default_player_name(utf8); } - assert(g_game); + assert(g_logic); g_input->PushAddInputDeviceCall(clients_[i].joystick_, false); return i; } @@ -512,7 +512,7 @@ void RemoteAppServer::HandleRemoteEvent(RemoteAppClient* client, break; } if (send) { - assert(g_game); + assert(g_logic); g_input->PushJoystickEvent(e, client->joystick_); } #pragma clang diagnostic pop @@ -542,7 +542,7 @@ void RemoteAppServer::HandleRemoteFloatEvent(RemoteAppClient* client, break; } if (send) { - assert(g_game); + assert(g_logic); g_input->PushJoystickEvent(e, client->joystick_); } #pragma clang diagnostic pop diff --git a/src/ballistica/game/client_controller_interface.h b/src/ballistica/logic/client_controller_interface.h similarity index 78% rename from src/ballistica/game/client_controller_interface.h rename to src/ballistica/logic/client_controller_interface.h index 0b686329..3f1a2cf4 100644 --- a/src/ballistica/game/client_controller_interface.h +++ b/src/ballistica/logic/client_controller_interface.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_CLIENT_CONTROLLER_INTERFACE_H_ -#define BALLISTICA_GAME_CLIENT_CONTROLLER_INTERFACE_H_ +#ifndef BALLISTICA_LOGIC_CLIENT_CONTROLLER_INTERFACE_H_ +#define BALLISTICA_LOGIC_CLIENT_CONTROLLER_INTERFACE_H_ #include "ballistica/ballistica.h" @@ -19,4 +19,4 @@ class ClientControllerInterface { } // namespace ballistica -#endif // BALLISTICA_GAME_CLIENT_CONTROLLER_INTERFACE_H_ +#endif // BALLISTICA_LOGIC_CLIENT_CONTROLLER_INTERFACE_H_ diff --git a/src/ballistica/game/connection/connection.cc b/src/ballistica/logic/connection/connection.cc similarity index 99% rename from src/ballistica/game/connection/connection.cc rename to src/ballistica/logic/connection/connection.cc index 75e87f96..654602ba 100644 --- a/src/ballistica/game/connection/connection.cc +++ b/src/ballistica/logic/connection/connection.cc @@ -1,6 +1,6 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/game/connection/connection.h" +#include "ballistica/logic/connection/connection.h" #include "ballistica/generic/huffman.h" #include "ballistica/generic/json.h" diff --git a/src/ballistica/game/connection/connection.h b/src/ballistica/logic/connection/connection.h similarity index 96% rename from src/ballistica/game/connection/connection.h rename to src/ballistica/logic/connection/connection.h index d4565f66..b130ed21 100644 --- a/src/ballistica/game/connection/connection.h +++ b/src/ballistica/logic/connection/connection.h @@ -1,14 +1,14 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_CONNECTION_CONNECTION_H_ -#define BALLISTICA_GAME_CONNECTION_CONNECTION_H_ +#ifndef BALLISTICA_LOGIC_CONNECTION_CONNECTION_H_ +#define BALLISTICA_LOGIC_CONNECTION_CONNECTION_H_ #include #include #include #include "ballistica/core/object.h" -#include "ballistica/game/player_spec.h" +#include "ballistica/logic/player_spec.h" #include "ballistica/python/python_ref.h" namespace ballistica { @@ -142,4 +142,4 @@ class Connection : public Object { } // namespace ballistica -#endif // BALLISTICA_GAME_CONNECTION_CONNECTION_H_ +#endif // BALLISTICA_LOGIC_CONNECTION_CONNECTION_H_ diff --git a/src/ballistica/game/connection/connection_set.cc b/src/ballistica/logic/connection/connection_set.cc similarity index 94% rename from src/ballistica/game/connection/connection_set.cc rename to src/ballistica/logic/connection/connection_set.cc index 25f9f027..1748a3b9 100644 --- a/src/ballistica/game/connection/connection_set.cc +++ b/src/ballistica/logic/connection/connection_set.cc @@ -1,14 +1,14 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/game/connection/connection_set.h" +#include "ballistica/logic/connection/connection_set.h" #include "ballistica/core/thread.h" -#include "ballistica/game/connection/connection_to_client_udp.h" -#include "ballistica/game/connection/connection_to_host_udp.h" -#include "ballistica/game/game.h" -#include "ballistica/game/player.h" -#include "ballistica/game/session/host_session.h" #include "ballistica/input/device/input_device.h" +#include "ballistica/logic/connection/connection_to_client_udp.h" +#include "ballistica/logic/connection/connection_to_host_udp.h" +#include "ballistica/logic/logic.h" +#include "ballistica/logic/player.h" +#include "ballistica/logic/session/host_session.h" #include "ballistica/networking/network_writer.h" #include "ballistica/networking/sockaddr.h" #include "ballistica/python/python.h" @@ -113,7 +113,7 @@ void ConnectionSet::SendChatMessage(const std::string& message, // spec out of their name(s). std::string p_name_combined; if (auto* hs = - dynamic_cast(g_game->GetForegroundSession())) { + dynamic_cast(g_logic->GetForegroundSession())) { for (auto&& p : hs->players()) { InputDevice* input_device = p->GetInputDevice(); if (p->accepted() && p->name_is_real() && input_device != nullptr @@ -192,7 +192,7 @@ void ConnectionSet::SendChatMessage(const std::string& message, // And display locally if the message is addressed to all. if (clients == nullptr) { - g_game->LocalDisplayChatMessage(msg_out); + g_logic->LocalDisplayChatMessage(msg_out); } } } @@ -216,14 +216,14 @@ void ConnectionSet::PushUDPConnectionPacketCall( const std::vector& data, const SockAddr& addr) { // Avoid buffer-full errors if something is causing us to write too often; // these are unreliable messages so its ok to just drop them. - if (!g_game->thread()->CheckPushSafety()) { + if (!g_logic->thread()->CheckPushSafety()) { BA_LOG_ONCE( "Ignoring excessive udp-connection input packets; (could this be a " "flood attack?)."); return; } - g_game->thread()->PushCall( + g_logic->thread()->PushCall( [this, data, addr] { UDPConnectionPacket(data, addr); }); } @@ -284,7 +284,7 @@ auto ConnectionSet::PrepareForLaunchHostSession() -> void { connection_to_host_->RequestDisconnect(); connection_to_host_.Clear(); has_connection_to_host_ = false; - g_game->UpdateGameRoster(); + g_logic->UpdateGameRoster(); } } @@ -303,9 +303,9 @@ auto ConnectionSet::HandleClientDisconnected(int id) -> void { // gone. Also inform everyone who just left so they can announce it // (technically could consolidate these messages but whatever...). if (was_connected) { - g_game->UpdateGameRoster(); + g_logic->UpdateGameRoster(); for (auto&& connection : connections_to_clients_) { - if (g_game->ShouldAnnouncePartyJoinsAndLeaves()) { + if (g_logic->ShouldAnnouncePartyJoinsAndLeaves()) { connection.second->SendReliableMessage(leave_msg); } } @@ -339,7 +339,7 @@ auto ConnectionSet::DisconnectClient(int client_id, int ban_seconds) -> bool { // If this is considered a kick, add an entry to our banned list so we // know not to let them back in for a while. if (ban_seconds > 0) { - g_game->BanPlayer(i->second->peer_spec(), 1000 * ban_seconds); + g_logic->BanPlayer(i->second->peer_spec(), 1000 * ban_seconds); } i->second->RequestDisconnect(); @@ -354,24 +354,24 @@ auto ConnectionSet::DisconnectClient(int client_id, int ban_seconds) -> bool { } void ConnectionSet::PushClientDisconnectedCall(int id) { - g_game->thread()->PushCall([this, id] { HandleClientDisconnected(id); }); + g_logic->thread()->PushCall([this, id] { HandleClientDisconnected(id); }); } void ConnectionSet::PushDisconnectedFromHostCall() { - g_game->thread()->PushCall([this] { + g_logic->thread()->PushCall([this] { if (connection_to_host_.exists()) { bool was_connected = connection_to_host_->can_communicate(); connection_to_host_.Clear(); has_connection_to_host_ = false; // Clear out our party roster. - g_game->UpdateGameRoster(); + g_logic->UpdateGameRoster(); // Go back to main menu *if* the connection was fully connected. // Otherwise we're still probably sitting at the main menu // so no need to reset it. if (was_connected) { - g_game->RunMainMenu(); + g_logic->RunMainMenu(); } } }); @@ -379,10 +379,10 @@ void ConnectionSet::PushDisconnectedFromHostCall() { void ConnectionSet::PushHostConnectedUDPCall(const SockAddr& addr, bool print_connect_progress) { - g_game->thread()->PushCall([this, addr, print_connect_progress] { + g_logic->thread()->PushCall([this, addr, print_connect_progress] { // Attempt to disconnect any clients we have, turn off public-party // advertising, etc. - g_game->CleanUpBeforeConnectingToHost(); + g_logic->CleanUpBeforeConnectingToHost(); print_udp_connect_progress_ = print_connect_progress; connection_to_host_ = Object::New(addr); has_connection_to_host_ = true; @@ -391,7 +391,7 @@ void ConnectionSet::PushHostConnectedUDPCall(const SockAddr& addr, } void ConnectionSet::PushDisconnectFromHostCall() { - g_game->thread()->PushCall([this] { + g_logic->thread()->PushCall([this] { if (connection_to_host_.exists()) { connection_to_host_->RequestDisconnect(); } @@ -562,7 +562,7 @@ auto ConnectionSet::UDPConnectionPacket(const std::vector& data_in, keep_trying = hc->SwitchProtocol(); if (!keep_trying) { if (!printed_host_disconnect_) { - ScreenMessage(g_game->GetResourceString( + ScreenMessage(g_logic->GetResourceString( "connectionFailedVersionMismatchText"), {1, 0, 0}); printed_host_disconnect_ = true; @@ -572,22 +572,23 @@ auto ConnectionSet::UDPConnectionPacket(const std::vector& data_in, if (!printed_host_disconnect_) { if (print_udp_connect_progress_) { ScreenMessage( - g_game->GetResourceString("connectionFailedPartyFullText"), + g_logic->GetResourceString("connectionFailedPartyFullText"), {1, 0, 0}); } printed_host_disconnect_ = true; } } else if (data[0] == BA_PACKET_CLIENT_DENY_ALREADY_IN_PARTY) { if (!printed_host_disconnect_) { - ScreenMessage(g_game->GetResourceString( + ScreenMessage(g_logic->GetResourceString( "connectionFailedHostAlreadyInPartyText"), {1, 0, 0}); printed_host_disconnect_ = true; } } else { if (!printed_host_disconnect_) { - ScreenMessage(g_game->GetResourceString("connectionRejectedText"), - {1, 0, 0}); + ScreenMessage( + g_logic->GetResourceString("connectionRejectedText"), + {1, 0, 0}); printed_host_disconnect_ = true; } } @@ -615,7 +616,7 @@ auto ConnectionSet::UDPConnectionPacket(const std::vector& data_in, std::string client_instance_uuid = &(client_instance_buffer[0]); if (static_cast(connections_to_clients_.size() + 1) - >= g_game->public_party_max_size()) { + >= g_logic->public_party_max_size()) { // If we've reached our party size limit (including ourself in that // count), reject. @@ -730,7 +731,7 @@ void ConnectionSet::SetClientInfoFromMasterServer( client->HandleMasterServerClientInfo(info_obj); // Roster will now include account-id... - g_game->mark_game_roster_dirty(); + g_logic->mark_game_roster_dirty(); break; } } diff --git a/src/ballistica/game/connection/connection_set.h b/src/ballistica/logic/connection/connection_set.h similarity index 96% rename from src/ballistica/game/connection/connection_set.h rename to src/ballistica/logic/connection/connection_set.h index c3b1888d..2d44e1da 100644 --- a/src/ballistica/game/connection/connection_set.h +++ b/src/ballistica/logic/connection/connection_set.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_CONNECTION_CONNECTION_SET_H_ -#define BALLISTICA_GAME_CONNECTION_CONNECTION_SET_H_ +#ifndef BALLISTICA_LOGIC_CONNECTION_CONNECTION_SET_H_ +#define BALLISTICA_LOGIC_CONNECTION_CONNECTION_SET_H_ #include #include @@ -118,4 +118,4 @@ class ConnectionSet { } // namespace ballistica -#endif // BALLISTICA_GAME_CONNECTION_CONNECTION_SET_H_ +#endif // BALLISTICA_LOGIC_CONNECTION_CONNECTION_SET_H_ diff --git a/src/ballistica/game/connection/connection_to_client.cc b/src/ballistica/logic/connection/connection_to_client.cc similarity index 92% rename from src/ballistica/game/connection/connection_to_client.cc rename to src/ballistica/logic/connection/connection_to_client.cc index d98d0af1..402a7593 100644 --- a/src/ballistica/game/connection/connection_to_client.cc +++ b/src/ballistica/logic/connection/connection_to_client.cc @@ -1,17 +1,17 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/game/connection/connection_to_client.h" +#include "ballistica/logic/connection/connection_to_client.h" #include "ballistica/assets/assets.h" #include "ballistica/audio/audio.h" -#include "ballistica/game/client_controller_interface.h" -#include "ballistica/game/connection/connection_set.h" -#include "ballistica/game/game.h" -#include "ballistica/game/player.h" -#include "ballistica/game/session/host_session.h" #include "ballistica/generic/json.h" #include "ballistica/input/device/client_input_device.h" #include "ballistica/internal/app_internal.h" +#include "ballistica/logic/client_controller_interface.h" +#include "ballistica/logic/connection/connection_set.h" +#include "ballistica/logic/logic.h" +#include "ballistica/logic/player.h" +#include "ballistica/logic/session/host_session.h" #include "ballistica/networking/networking.h" #include "ballistica/python/python.h" #include "ballistica/python/python_sys.h" @@ -69,8 +69,8 @@ ConnectionToClient::~ConnectionToClient() { } // If they had been announced as connected, announce their departure. - if (can_communicate() && g_game->ShouldAnnouncePartyJoinsAndLeaves()) { - std::string s = g_game->GetResourceString("playerLeftPartyText"); + if (can_communicate() && g_logic->ShouldAnnouncePartyJoinsAndLeaves()) { + std::string s = g_logic->GetResourceString("playerLeftPartyText"); Utils::StringReplaceOne(&s, "${NAME}", peer_spec().GetDisplayString()); ScreenMessage(s, {1, 0.5f, 0.0f}); g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kCorkPop)); @@ -174,7 +174,7 @@ void ConnectionToClient::HandleGamePacket(const std::vector& data) { // Compare this against our blocked specs.. if there's a match, reject // them. - if (g_game->IsPlayerBanned(peer_spec())) { + if (g_logic->IsPlayerBanned(peer_spec())) { Error(""); return; } @@ -193,7 +193,7 @@ void ConnectionToClient::HandleGamePacket(const std::vector& data) { // connection attempt so this will only apply to things like Google // Play invites where we probably want to be more verbose as // to why the game just died. - s = g_game->GetResourceString("incompatibleVersionPlayerText"); + s = g_logic->GetResourceString("incompatibleVersionPlayerText"); Utils::StringReplaceOne(&s, "${NAME}", peer_spec().GetDisplayString()); } @@ -210,8 +210,8 @@ void ConnectionToClient::HandleGamePacket(const std::vector& data) { next_kick_vote_allow_time_ = GetRealTime() + kNewClientKickVoteDelay; // At this point we have their name, so lets announce their arrival. - if (g_game->ShouldAnnouncePartyJoinsAndLeaves()) { - std::string s = g_game->GetResourceString("playerJoinedPartyText"); + if (g_logic->ShouldAnnouncePartyJoinsAndLeaves()) { + std::string s = g_logic->GetResourceString("playerJoinedPartyText"); Utils::StringReplaceOne(&s, "${NAME}", peer_spec().GetDisplayString()); ScreenMessage(s, {0.5f, 1, 0.5f}); @@ -220,7 +220,7 @@ void ConnectionToClient::HandleGamePacket(const std::vector& data) { // Also mark the time for flashing the 'someone just joined your // party' message in the corner. - g_game->set_last_connection_to_client_join_time(GetRealTime()); + g_logic->set_last_connection_to_client_join_time(GetRealTime()); // Added midway through protocol 29: // We now send a json dict of info about ourself first thing. This @@ -234,10 +234,10 @@ void ConnectionToClient::HandleGamePacket(const std::vector& data) { cJSON_CreateNumber(kAppBuildNumber)); // Add a name entry if we've got a public party name set. - if (!g_game->public_party_name().empty()) { + if (!g_logic->public_party_name().empty()) { cJSON_AddItemToObject( info_dict, "n", - cJSON_CreateString(g_game->public_party_name().c_str())); + cJSON_CreateString(g_logic->public_party_name().c_str())); } std::string info = cJSON_PrintUnformatted(info_dict); cJSON_Delete(info_dict); @@ -253,23 +253,23 @@ void ConnectionToClient::HandleGamePacket(const std::vector& data) { join_msg[0] = BA_MESSAGE_PARTY_MEMBER_JOINED; memcpy(&(join_msg[1]), joiner_spec.c_str(), joiner_spec.size()); - for (auto&& i : g_game->connections()->connections_to_clients()) { + for (auto&& i : g_logic->connections()->connections_to_clients()) { // Also send a 'party-member-joined' notification to all clients // *except* the new one. if (i.second.exists() && i.second.get() != this - && g_game->ShouldAnnouncePartyJoinsAndLeaves()) { + && g_logic->ShouldAnnouncePartyJoinsAndLeaves()) { i.second->SendReliableMessage(join_msg); } } // Update the game party roster and send it to all clients (including // this new one). - g_game->UpdateGameRoster(); + g_logic->UpdateGameRoster(); // Lastly, we hand this connection over to whoever is currently // feeding client connections. - if (g_game->connections()->client_controller()) { - SetController(g_game->connections()->client_controller()); + if (g_logic->connections()->client_controller()) { + SetController(g_logic->connections()->client_controller()); } } break; @@ -295,7 +295,7 @@ void ConnectionToClient::SendScreenMessage(const std::string& s, float r, // Older clients don't support the screen-message message, so in that case // we just send it as a chat-message from . if (build_number() < 14248) { - std::string value = g_game->CompileResourceString(s, "sendScreenMessage"); + std::string value = g_logic->CompileResourceString(s, "sendScreenMessage"); std::string our_spec_string = PlayerSpec::GetDummyPlayerSpec("").GetSpecString(); std::vector msg_out(1 + 1 + our_spec_string.size() + value.size()); @@ -347,10 +347,10 @@ void ConnectionToClient::HandleMessagePacket( case BA_MESSAGE_KICK_VOTE: { if (buffer.size() == 2) { - for (auto&& i : g_game->connections()->connections_to_clients()) { + for (auto&& i : g_logic->connections()->connections_to_clients()) { ConnectionToClient* client = i.second.get(); if (client->id() == static_cast(buffer[1])) { - g_game->StartKickVote(this, client); + g_logic->StartKickVote(this, client); break; } } @@ -409,7 +409,7 @@ void ConnectionToClient::HandleMessagePacket( // Newer type using json. // Only accept peer info if we've not gotten official info from // the master server (and if we're allowing it in general). - if (!g_game->require_client_authentication() + if (!g_logic->require_client_authentication() && !got_info_from_master_server_) { std::vector b2(buffer.size()); memcpy(&(b2[0]), &(buffer[1]), buffer.size() - 1); @@ -460,13 +460,13 @@ void ConnectionToClient::HandleMessagePacket( // If we require client-info and don't have it from this guy yet, // ignore their chat messages (prevent bots from jumping in and // spamming before we can verify their identities) - if (g_game->require_client_authentication() + if (g_logic->require_client_authentication() && !got_info_from_master_server_) { Log("Ignoring chat message from peer with no client info."); SendScreenMessage(R"({"r":"loadingTryAgainText"})", 1, 0, 0); } else if (last_chat_times_.size() >= 5) { chat_block_time_ = now + next_chat_block_seconds_ * 1000; - g_game->connections()->SendScreenMessageToAll( + g_logic->connections()->SendScreenMessageToAll( R"({"r":"internal.chatBlockedText","s":[["${NAME}",)" + Utils::GetJSONString( GetCombinedSpec().GetDisplayString().c_str()) @@ -498,7 +498,7 @@ void ConnectionToClient::HandleMessagePacket( "{\"t\":[\"serverResponses\"," "\"Message is too long.\"]}", 1, 0, 0); - } else if (g_game->kick_vote_in_progress() + } else if (g_logic->kick_vote_in_progress() && (!strcmp(b2.data(), "1") || !strcmp(b2.data(), "2"))) { // Special case - if there's a kick vote going on, take '1' or @@ -535,14 +535,14 @@ void ConnectionToClient::HandleMessagePacket( // Send it out to all clients. for (auto&& i : - g_game->connections()->connections_to_clients()) { + g_logic->connections()->connections_to_clients()) { if (i.second->can_communicate()) { i.second->SendReliableMessage(msg_out); } } // Display it locally. - g_game->LocalDisplayChatMessage(msg_out); + g_logic->LocalDisplayChatMessage(msg_out); } } } @@ -598,7 +598,7 @@ void ConnectionToClient::HandleMessagePacket( ClientInputDevice* cid = GetClientInputDevice(buffer[1]); if (auto* hs = - dynamic_cast(g_game->GetForegroundSession())) { + dynamic_cast(g_logic->GetForegroundSession())) { if (!cid->attached_to_player()) { millisecs_t seconds_since_last_left = (GetRealTime() - last_remove_player_time_) / 1000; @@ -615,7 +615,7 @@ void ConnectionToClient::HandleMessagePacket( + "\"]]}", 1, 1, 0); } else { - bool still_waiting = (g_game->require_client_authentication() + bool still_waiting = (g_logic->require_client_authentication() && !got_info_from_master_server_); // If we're not allowing peer client-info and have yet to get // master-server info for this client, delay their join (we'll @@ -652,7 +652,7 @@ void ConnectionToClient::HandleMessagePacket( SendScreenMessage(R"({"r":"errorUnknownText"})", 1, 0, 0); Log("Client data limit exceeded by '" + peer_spec().GetShortName() + "'; kicking."); - g_game->BanPlayer(peer_spec(), 1000 * 60); + g_logic->BanPlayer(peer_spec(), 1000 * 60); Error(""); return; } @@ -666,7 +666,7 @@ void ConnectionToClient::HandleMessagePacket( auto ConnectionToClient::GetCombinedSpec() -> PlayerSpec { // Look for players coming from this client-connection. // If we find any, make a spec out of their name(s). - if (auto* hs = dynamic_cast(g_game->GetForegroundSession())) { + if (auto* hs = dynamic_cast(g_logic->GetForegroundSession())) { std::string p_name_combined; for (auto&& p : hs->players()) { InputDevice* input_device = p->GetInputDevice(); @@ -733,7 +733,7 @@ void ConnectionToClient::HandleMasterServerClientInfo(PyObject* info_obj) { // If the server returned no valid account info for them // and we're not trusting peers, kick this fella right out // and ban him for a short bit (to hopefully limit rejoin spam). - if (g_game->require_client_authentication()) { + if (g_logic->require_client_authentication()) { SendScreenMessage( "{\"t\":[\"serverResponses\"," "\"Your account was rejected. Are you signed in?\"]}", @@ -744,7 +744,7 @@ void ConnectionToClient::HandleMasterServerClientInfo(PyObject* info_obj) { // Not benning anymore. People were exploiting this by impersonating // other players using their public ids to get them banned from // their own servers/etc. - // g_game->BanPlayer(peer_spec(), 1000 * 60); + // g_logic->BanPlayer(peer_spec(), 1000 * 60); Error(""); } } @@ -755,8 +755,8 @@ auto ConnectionToClient::IsAdmin() const -> bool { if (peer_public_account_id_.empty()) { return false; } - return (g_game->admin_public_ids().find(peer_public_account_id_) - != g_game->admin_public_ids().end()); + return (g_logic->admin_public_ids().find(peer_public_account_id_) + != g_logic->admin_public_ids().end()); } } // namespace ballistica diff --git a/src/ballistica/game/connection/connection_to_client.h b/src/ballistica/logic/connection/connection_to_client.h similarity index 92% rename from src/ballistica/game/connection/connection_to_client.h rename to src/ballistica/logic/connection/connection_to_client.h index 5269e1c5..be548a94 100644 --- a/src/ballistica/game/connection/connection_to_client.h +++ b/src/ballistica/logic/connection/connection_to_client.h @@ -1,13 +1,13 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_CONNECTION_CONNECTION_TO_CLIENT_H_ -#define BALLISTICA_GAME_CONNECTION_CONNECTION_TO_CLIENT_H_ +#ifndef BALLISTICA_LOGIC_CONNECTION_CONNECTION_TO_CLIENT_H_ +#define BALLISTICA_LOGIC_CONNECTION_CONNECTION_TO_CLIENT_H_ #include #include #include -#include "ballistica/game/connection/connection.h" +#include "ballistica/logic/connection/connection.h" namespace ballistica { @@ -83,4 +83,4 @@ class ConnectionToClient : public Connection { } // namespace ballistica -#endif // BALLISTICA_GAME_CONNECTION_CONNECTION_TO_CLIENT_H_ +#endif // BALLISTICA_LOGIC_CONNECTION_CONNECTION_TO_CLIENT_H_ diff --git a/src/ballistica/game/connection/connection_to_client_udp.cc b/src/ballistica/logic/connection/connection_to_client_udp.cc similarity index 88% rename from src/ballistica/game/connection/connection_to_client_udp.cc rename to src/ballistica/logic/connection/connection_to_client_udp.cc index b330ba8e..09a65a34 100644 --- a/src/ballistica/game/connection/connection_to_client_udp.cc +++ b/src/ballistica/logic/connection/connection_to_client_udp.cc @@ -1,9 +1,9 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/game/connection/connection_to_client_udp.h" +#include "ballistica/logic/connection/connection_to_client_udp.h" -#include "ballistica/game/connection/connection_set.h" -#include "ballistica/game/game.h" +#include "ballistica/logic/connection/connection_set.h" +#include "ballistica/logic/logic.h" #include "ballistica/networking/network_writer.h" #include "ballistica/networking/sockaddr.h" @@ -16,7 +16,7 @@ ConnectionToClientUDP::ConnectionToClientUDP(const SockAddr& addr, request_id_(request_id), addr_(new SockAddr(addr)), client_instance_uuid_(std::move(client_name)), - last_client_response_time_(g_game->master_time()), + last_client_response_time_(g_logic->master_time()), did_die_(false) {} ConnectionToClientUDP::~ConnectionToClientUDP() { @@ -46,7 +46,7 @@ void ConnectionToClientUDP::SendGamePacketCompressed( void ConnectionToClientUDP::Update() { ConnectionToClient::Update(); - millisecs_t current_time = g_game->master_time(); + millisecs_t current_time = g_logic->master_time(); // if its been long enough since we've heard anything from the host, error. if (current_time - last_client_response_time_ @@ -60,7 +60,7 @@ void ConnectionToClientUDP::Update() { void ConnectionToClientUDP::HandleGamePacket( const std::vector& buffer) { // keep track of when we last heard from the host for disconnect purposes - last_client_response_time_ = g_game->master_time(); + last_client_response_time_ = g_logic->master_time(); ConnectionToClient::HandleGamePacket(buffer); } @@ -70,7 +70,7 @@ void ConnectionToClientUDP::Die() { return; } // this will actually clear the object.. - g_game->connections()->PushClientDisconnectedCall(id()); + g_logic->connections()->PushClientDisconnectedCall(id()); did_die_ = true; } diff --git a/src/ballistica/game/connection/connection_to_client_udp.h b/src/ballistica/logic/connection/connection_to_client_udp.h similarity index 81% rename from src/ballistica/game/connection/connection_to_client_udp.h rename to src/ballistica/logic/connection/connection_to_client_udp.h index cac1b30a..c6a99237 100644 --- a/src/ballistica/game/connection/connection_to_client_udp.h +++ b/src/ballistica/logic/connection/connection_to_client_udp.h @@ -1,13 +1,13 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_CONNECTION_CONNECTION_TO_CLIENT_UDP_H_ -#define BALLISTICA_GAME_CONNECTION_CONNECTION_TO_CLIENT_UDP_H_ +#ifndef BALLISTICA_LOGIC_CONNECTION_CONNECTION_TO_CLIENT_UDP_H_ +#define BALLISTICA_LOGIC_CONNECTION_CONNECTION_TO_CLIENT_UDP_H_ #include #include #include -#include "ballistica/game/connection/connection_to_client.h" +#include "ballistica/logic/connection/connection_to_client.h" #include "ballistica/networking/networking.h" #include "ballistica/networking/sockaddr.h" @@ -40,4 +40,4 @@ class ConnectionToClientUDP : public ConnectionToClient { } // namespace ballistica -#endif // BALLISTICA_GAME_CONNECTION_CONNECTION_TO_CLIENT_UDP_H_ +#endif // BALLISTICA_LOGIC_CONNECTION_CONNECTION_TO_CLIENT_UDP_H_ diff --git a/src/ballistica/game/connection/connection_to_host.cc b/src/ballistica/logic/connection/connection_to_host.cc similarity index 94% rename from src/ballistica/game/connection/connection_to_host.cc rename to src/ballistica/logic/connection/connection_to_host.cc index 371a0a81..baede471 100644 --- a/src/ballistica/game/connection/connection_to_host.cc +++ b/src/ballistica/logic/connection/connection_to_host.cc @@ -1,15 +1,15 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/game/connection/connection_to_host.h" +#include "ballistica/logic/connection/connection_to_host.h" #include "ballistica/assets/assets.h" #include "ballistica/audio/audio.h" -#include "ballistica/game/game.h" -#include "ballistica/game/session/net_client_session.h" #include "ballistica/generic/json.h" #include "ballistica/input/device/input_device.h" #include "ballistica/input/input.h" #include "ballistica/internal/app_internal.h" +#include "ballistica/logic/logic.h" +#include "ballistica/logic/session/net_client_session.h" #include "ballistica/math/vector3f.h" #include "ballistica/networking/networking.h" #include "ballistica/platform/platform.h" @@ -32,16 +32,16 @@ ConnectionToHost::~ConnectionToHost() { // '${PEER-NAME}'s party'. std::string s; if (!party_name_.empty()) { - s = g_game->GetResourceString("leftGameText"); + s = g_logic->GetResourceString("leftGameText"); Utils::StringReplaceOne(&s, "${NAME}", party_name_); } else { - s = g_game->GetResourceString("leftPartyText"); + s = g_logic->GetResourceString("leftPartyText"); Utils::StringReplaceOne(&s, "${NAME}", peer_spec().GetDisplayString()); } ScreenMessage(s, {1, 0.5f, 0.0f}); g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kCorkPop)); } else { - ScreenMessage(g_game->GetResourceString("connectionRejectedText"), + ScreenMessage(g_logic->GetResourceString("connectionRejectedText"), {1, 0, 0}); } } @@ -126,9 +126,9 @@ void ConnectionToHost::HandleGamePacket(const std::vector& data) { if (!compatible) { if (their_protocol_version > kProtocolVersion) { - Error(g_game->GetResourceString("incompatibleNewerVersionHostText")); + Error(g_logic->GetResourceString("incompatibleNewerVersionHostText")); } else { - Error(g_game->GetResourceString("incompatibleVersionHostText")); + Error(g_logic->GetResourceString("incompatibleVersionHostText")); } return; } @@ -175,7 +175,7 @@ void ConnectionToHost::HandleGamePacket(const std::vector& data) { peer_hash_ = g_app_internal->CalcV1PeerHash(peer_hash_input_); set_can_communicate(true); - g_game->LaunchClientSession(); + g_logic->LaunchClientSession(); // NOTE: // we don't actually print a 'connected' message until after @@ -185,7 +185,7 @@ void ConnectionToHost::HandleGamePacket(const std::vector& data) { // Wire ourselves up to drive the client-session we're in. auto* cs = - dynamic_cast(g_game->GetForegroundSession()); + dynamic_cast(g_logic->GetForegroundSession()); assert(cs); assert(!cs->connection_to_host()); client_session_ = cs; @@ -321,7 +321,7 @@ void ConnectionToHost::HandleMessagePacket(const std::vector& buffer) { cJSON* new_roster = cJSON_Parse(reinterpret_cast(&(buffer[1]))); if (new_roster) { - g_game->SetGameRoster(new_roster); + g_logic->SetGameRoster(new_roster); } } break; @@ -372,7 +372,7 @@ void ConnectionToHost::HandleMessagePacket(const std::vector& buffer) { std::vector str_buffer(buffer.size()); memcpy(&(str_buffer[0]), &(buffer[1]), buffer.size() - 1); str_buffer[str_buffer.size() - 1] = 0; - std::string s = g_game->GetResourceString("playerJoinedPartyText"); + std::string s = g_logic->GetResourceString("playerJoinedPartyText"); Utils::StringReplaceOne( &s, "${NAME}", PlayerSpec(str_buffer.data()).GetDisplayString()); ScreenMessage(s, {0.5f, 1.0f, 0.5f}); @@ -387,7 +387,7 @@ void ConnectionToHost::HandleMessagePacket(const std::vector& buffer) { std::vector str_buffer(buffer.size()); memcpy(&(str_buffer[0]), &(buffer[1]), buffer.size() - 1); str_buffer[str_buffer.size() - 1] = 0; - std::string s = g_game->GetResourceString("playerLeftPartyText"); + std::string s = g_logic->GetResourceString("playerLeftPartyText"); Utils::StringReplaceOne( &s, "${NAME}", PlayerSpec(&(str_buffer[0])).GetDisplayString()); ScreenMessage(s, {1, 0.5f, 0.0f}); @@ -441,7 +441,7 @@ void ConnectionToHost::HandleMessagePacket(const std::vector& buffer) { } case BA_MESSAGE_CHAT: { - g_game->LocalDisplayChatMessage(buffer); + g_logic->LocalDisplayChatMessage(buffer); break; } @@ -479,10 +479,10 @@ void ConnectionToHost::HandleMessagePacket(const std::vector& buffer) { // If we've got a name for their party, use it; otherwise call it // '${NAME}'s party'. if (!party_name_.empty()) { - s = g_game->GetResourceString("connectedToGameText"); + s = g_logic->GetResourceString("connectedToGameText"); Utils::StringReplaceOne(&s, "${NAME}", party_name_); } else { - s = g_game->GetResourceString("connectedToPartyText"); + s = g_logic->GetResourceString("connectedToPartyText"); Utils::StringReplaceOne(&s, "${NAME}", peer_spec().GetDisplayString()); } ScreenMessage(s, {0.5f, 1, 0.5f}); diff --git a/src/ballistica/game/connection/connection_to_host.h b/src/ballistica/logic/connection/connection_to_host.h similarity index 85% rename from src/ballistica/game/connection/connection_to_host.h rename to src/ballistica/logic/connection/connection_to_host.h index 40b0e74b..0f1b5c54 100644 --- a/src/ballistica/game/connection/connection_to_host.h +++ b/src/ballistica/logic/connection/connection_to_host.h @@ -1,12 +1,12 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_CONNECTION_CONNECTION_TO_HOST_H_ -#define BALLISTICA_GAME_CONNECTION_CONNECTION_TO_HOST_H_ +#ifndef BALLISTICA_LOGIC_CONNECTION_CONNECTION_TO_HOST_H_ +#define BALLISTICA_LOGIC_CONNECTION_CONNECTION_TO_HOST_H_ #include #include -#include "ballistica/game/connection/connection.h" +#include "ballistica/logic/connection/connection.h" namespace ballistica { @@ -44,4 +44,4 @@ class ConnectionToHost : public Connection { } // namespace ballistica -#endif // BALLISTICA_GAME_CONNECTION_CONNECTION_TO_HOST_H_ +#endif // BALLISTICA_LOGIC_CONNECTION_CONNECTION_TO_HOST_H_ diff --git a/src/ballistica/game/connection/connection_to_host_udp.cc b/src/ballistica/logic/connection/connection_to_host_udp.cc similarity index 89% rename from src/ballistica/game/connection/connection_to_host_udp.cc rename to src/ballistica/logic/connection/connection_to_host_udp.cc index f7dca8e8..c77a8a8d 100644 --- a/src/ballistica/game/connection/connection_to_host_udp.cc +++ b/src/ballistica/logic/connection/connection_to_host_udp.cc @@ -1,9 +1,9 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/game/connection/connection_to_host_udp.h" +#include "ballistica/logic/connection/connection_to_host_udp.h" -#include "ballistica/game/connection/connection_set.h" -#include "ballistica/game/game.h" +#include "ballistica/logic/connection/connection_set.h" +#include "ballistica/logic/logic.h" #include "ballistica/math/vector3f.h" #include "ballistica/networking/network_writer.h" #include "ballistica/networking/sockaddr.h" @@ -28,10 +28,10 @@ ConnectionToHostUDP::ConnectionToHostUDP(const SockAddr& addr) last_client_id_request_time_(0), last_disconnect_request_time_(0), did_die_(false), - last_host_response_time_(g_game->master_time()) { + last_host_response_time_(g_logic->master_time()) { GetRequestID(); - if (g_game->connections()->GetPrintUDPConnectProgress()) { - ScreenMessage(g_game->GetResourceString("connectingToPartyText")); + if (g_logic->connections()->GetPrintUDPConnectProgress()) { + ScreenMessage(g_logic->GetResourceString("connectingToPartyText")); } } @@ -54,7 +54,7 @@ void ConnectionToHostUDP::GetRequestID() { void ConnectionToHostUDP::Update() { ConnectionToHost::Update(); - millisecs_t current_time = g_game->master_time(); + millisecs_t current_time = g_logic->master_time(); // If we've not gotten a client_id from the host yet, keep pestering it. if (!errored()) { @@ -80,7 +80,7 @@ void ConnectionToHostUDP::Update() { > (can_communicate() ? 10000u : 5000u)) { // If the connection never got established, announce it failed. if (!can_communicate()) { - ScreenMessage(g_game->GetResourceString("connectionFailedText"), + ScreenMessage(g_logic->GetResourceString("connectionFailedText"), {1, 0, 0}); } @@ -113,8 +113,8 @@ void ConnectionToHostUDP::Die() { Log("Error: posting multiple die messages; probably not good."); return; } - if (g_game->connections()->connection_to_host() == this) { - g_game->connections()->PushDisconnectedFromHostCall(); + if (g_logic->connections()->connection_to_host() == this) { + g_logic->connections()->PushDisconnectedFromHostCall(); did_die_ = true; } else { Log("Error: Running update for non-current host-connection; shouldn't " @@ -134,7 +134,7 @@ void ConnectionToHostUDP::SendDisconnectRequest() { void ConnectionToHostUDP::HandleGamePacket(const std::vector& buffer) { // Keep track of when we last heard from the host for time-out purposes. - last_host_response_time_ = g_game->master_time(); + last_host_response_time_ = g_logic->master_time(); ConnectionToHost::HandleGamePacket(buffer); } diff --git a/src/ballistica/game/connection/connection_to_host_udp.h b/src/ballistica/logic/connection/connection_to_host_udp.h similarity index 83% rename from src/ballistica/game/connection/connection_to_host_udp.h rename to src/ballistica/logic/connection/connection_to_host_udp.h index d3fe9cbe..40de91e0 100644 --- a/src/ballistica/game/connection/connection_to_host_udp.h +++ b/src/ballistica/logic/connection/connection_to_host_udp.h @@ -1,13 +1,13 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_CONNECTION_CONNECTION_TO_HOST_UDP_H_ -#define BALLISTICA_GAME_CONNECTION_CONNECTION_TO_HOST_UDP_H_ +#ifndef BALLISTICA_LOGIC_CONNECTION_CONNECTION_TO_HOST_UDP_H_ +#define BALLISTICA_LOGIC_CONNECTION_CONNECTION_TO_HOST_UDP_H_ #include #include #include -#include "ballistica/game/connection/connection_to_host.h" +#include "ballistica/logic/connection/connection_to_host.h" #include "ballistica/networking/networking.h" namespace ballistica { @@ -46,4 +46,4 @@ class ConnectionToHostUDP : public ConnectionToHost { } // namespace ballistica -#endif // BALLISTICA_GAME_CONNECTION_CONNECTION_TO_HOST_UDP_H_ +#endif // BALLISTICA_LOGIC_CONNECTION_CONNECTION_TO_HOST_UDP_H_ diff --git a/src/ballistica/game/friend_score_set.h b/src/ballistica/logic/friend_score_set.h similarity index 81% rename from src/ballistica/game/friend_score_set.h rename to src/ballistica/logic/friend_score_set.h index a4108c8d..e90dd619 100644 --- a/src/ballistica/game/friend_score_set.h +++ b/src/ballistica/logic/friend_score_set.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_FRIEND_SCORE_SET_H_ -#define BALLISTICA_GAME_FRIEND_SCORE_SET_H_ +#ifndef BALLISTICA_LOGIC_FRIEND_SCORE_SET_H_ +#define BALLISTICA_LOGIC_FRIEND_SCORE_SET_H_ #include #include @@ -27,4 +27,4 @@ struct FriendScoreSet { } // namespace ballistica -#endif // BALLISTICA_GAME_FRIEND_SCORE_SET_H_ +#endif // BALLISTICA_LOGIC_FRIEND_SCORE_SET_H_ diff --git a/src/ballistica/game/host_activity.cc b/src/ballistica/logic/host_activity.cc similarity index 98% rename from src/ballistica/game/host_activity.cc rename to src/ballistica/logic/host_activity.cc index 850a5886..9685cadd 100644 --- a/src/ballistica/game/host_activity.cc +++ b/src/ballistica/logic/host_activity.cc @@ -1,6 +1,6 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/game/host_activity.h" +#include "ballistica/logic/host_activity.h" #include "ballistica/assets/component/collide_model.h" #include "ballistica/assets/component/data.h" @@ -8,11 +8,11 @@ #include "ballistica/assets/component/sound.h" #include "ballistica/assets/component/texture.h" #include "ballistica/dynamics/material/material.h" -#include "ballistica/game/player.h" -#include "ballistica/game/session/host_session.h" #include "ballistica/generic/lambda_runnable.h" #include "ballistica/generic/timer.h" #include "ballistica/input/device/input_device.h" +#include "ballistica/logic/player.h" +#include "ballistica/logic/session/host_session.h" #include "ballistica/python/python.h" #include "ballistica/python/python_context_call.h" #include "ballistica/python/python_sys.h" @@ -239,7 +239,7 @@ void HostActivity::UpdateStepTimerLength() { step_scene_timer_->SetLength( std::max(1, static_cast( round(static_cast(kGameStepMilliseconds) - / (game_speed_ * g_game->debug_speed_mult())))), + / (game_speed_ * g_logic->debug_speed_mult())))), true, base_time_); } } @@ -311,7 +311,7 @@ void HostActivity::SetIsForeground(bool val) { Scene* sg = scene(); if (val && sg) { // Set it locally. - g_game->SetForegroundScene(sg); + g_logic->SetForegroundScene(sg); // Also push it to clients. if (SceneStream* out = GetSceneStream()) { diff --git a/src/ballistica/game/host_activity.h b/src/ballistica/logic/host_activity.h similarity index 97% rename from src/ballistica/game/host_activity.h rename to src/ballistica/logic/host_activity.h index d87ad6c1..f9dfca16 100644 --- a/src/ballistica/game/host_activity.h +++ b/src/ballistica/logic/host_activity.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_HOST_ACTIVITY_H_ -#define BALLISTICA_GAME_HOST_ACTIVITY_H_ +#ifndef BALLISTICA_LOGIC_HOST_ACTIVITY_H_ +#define BALLISTICA_LOGIC_HOST_ACTIVITY_H_ #include #include @@ -120,4 +120,4 @@ class HostActivity : public ContextTarget { } // namespace ballistica -#endif // BALLISTICA_GAME_HOST_ACTIVITY_H_ +#endif // BALLISTICA_LOGIC_HOST_ACTIVITY_H_ diff --git a/src/ballistica/game/game.cc b/src/ballistica/logic/logic.cc similarity index 91% rename from src/ballistica/game/game.cc rename to src/ballistica/logic/logic.cc index c5efd18c..4a54876f 100644 --- a/src/ballistica/game/game.cc +++ b/src/ballistica/logic/logic.cc @@ -1,23 +1,12 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/game/game.h" +#include "ballistica/logic/logic.h" #include "ballistica/app/app_config.h" #include "ballistica/app/app_flavor.h" #include "ballistica/audio/audio.h" #include "ballistica/core/thread.h" #include "ballistica/dynamics/bg/bg_dynamics.h" -#include "ballistica/game/connection/connection_set.h" -#include "ballistica/game/connection/connection_to_client_udp.h" -#include "ballistica/game/connection/connection_to_host_udp.h" -#include "ballistica/game/friend_score_set.h" -#include "ballistica/game/host_activity.h" -#include "ballistica/game/player.h" -#include "ballistica/game/session/client_session.h" -#include "ballistica/game/session/host_session.h" -#include "ballistica/game/session/net_client_session.h" -#include "ballistica/game/session/replay_client_session.h" -#include "ballistica/game/v1_account.h" #include "ballistica/generic/json.h" #include "ballistica/generic/timer.h" #include "ballistica/graphics/graphics.h" @@ -27,6 +16,17 @@ #include "ballistica/input/device/keyboard_input.h" #include "ballistica/input/device/touch_input.h" #include "ballistica/internal/app_internal.h" +#include "ballistica/logic/connection/connection_set.h" +#include "ballistica/logic/connection/connection_to_client_udp.h" +#include "ballistica/logic/connection/connection_to_host_udp.h" +#include "ballistica/logic/friend_score_set.h" +#include "ballistica/logic/host_activity.h" +#include "ballistica/logic/player.h" +#include "ballistica/logic/session/client_session.h" +#include "ballistica/logic/session/host_session.h" +#include "ballistica/logic/session/net_client_session.h" +#include "ballistica/logic/session/replay_client_session.h" +#include "ballistica/logic/v1_account.h" #include "ballistica/networking/network_writer.h" #include "ballistica/networking/sockaddr.h" #include "ballistica/networking/telnet_server.h" @@ -64,12 +64,12 @@ const int kMaxChatMessages = 40; // Go with 5 minute ban. const int kKickBanSeconds = 5 * 60; -Game::Game() +Logic::Logic() : game_roster_(cJSON_CreateArray()), realtimers_(new TimerList()), connections_(std::make_unique()) { // We're a singleton; make sure we don't already exist. - assert(g_game == nullptr); + assert(g_logic == nullptr); InitSpecialChars(); @@ -82,11 +82,11 @@ Game::Game() // bits of C++ logic. thread_->SetAcquiresPythonGIL(); } -auto Game::OnAppStart() -> void { +auto Logic::OnAppStart() -> void { thread_->PushCallSynchronous([this] { StartInThread(); }); } -auto Game::StartInThread() -> void { +auto Logic::StartInThread() -> void { try { // We want to be informed when our thread is pausing. thread()->AddPauseCallback( @@ -112,7 +112,7 @@ auto Game::StartInThread() -> void { } } -auto Game::OnThreadPause() -> void { +auto Logic::OnThreadPause() -> void { ScopedSetContext cp(GetUIContextTarget()); // Let Python and internal layers do their thing. @@ -120,7 +120,7 @@ auto Game::OnThreadPause() -> void { g_app_internal->OnLogicThreadPause(); } -void Game::InitSpecialChars() { +void Logic::InitSpecialChars() { std::scoped_lock lock(special_char_mutex_); special_char_strings_[SpecialChar::kDownArrow] = "\xee\x80\x84"; @@ -224,37 +224,37 @@ void Game::InitSpecialChars() { special_char_strings_[SpecialChar::kV2Logo] = "\xee\x81\xA3"; } -void Game::SetGameRoster(cJSON* r) { +void Logic::SetGameRoster(cJSON* r) { if (game_roster_ != nullptr) { cJSON_Delete(game_roster_); } game_roster_ = r; } -void Game::ResetActivityTracking() { +void Logic::ResetActivityTracking() { largest_draw_time_increment_since_last_reset_ = 0; first_draw_real_time_ = last_draw_real_time_ = g_platform->GetTicks(); } #if BA_VR_BUILD -void Game::PushVRHandsState(const VRHandsState& state) { +void Logic::PushVRHandsState(const VRHandsState& state) { thread()->PushCall([this, state] { vr_hands_state_ = state; }); } #endif // BA_VR_BUILD -void Game::PushMediaPruneCall(int level) { +void Logic::PushMediaPruneCall(int level) { thread()->PushCall([level] { assert(InLogicThread()); g_assets->Prune(level); }); } -void Game::PushSetV1LoginCall(V1AccountType account_type, - V1LoginState account_state, - const std::string& account_name, - const std::string& account_id) { +void Logic::PushSetV1LoginCall(V1AccountType account_type, + V1LoginState account_state, + const std::string& account_name, + const std::string& account_id) { thread()->PushCall( [this, account_type, account_state, account_name, account_id] { g_v1_account->SetLogin(account_type, account_state, account_name, @@ -262,11 +262,11 @@ void Game::PushSetV1LoginCall(V1AccountType account_type, }); } -void Game::PushInitialScreenCreatedCall() { +void Logic::PushInitialScreenCreatedCall() { thread()->PushCall([this] { InitialScreenCreated(); }); } -void Game::InitialScreenCreated() { +void Logic::InitialScreenCreated() { assert(InLogicThread()); // Ok; graphics-server is telling us we've got a screen. @@ -300,10 +300,10 @@ void Game::InitialScreenCreated() { RunAppLaunchCommands(); } -void Game::PruneMedia() { g_assets->Prune(); } +void Logic::PruneMedia() { g_assets->Prune(); } // Launch into main menu or whatever else. -void Game::RunAppLaunchCommands() { +void Logic::RunAppLaunchCommands() { assert(InLogicThread()); assert(!ran_app_launch_commands_); @@ -332,7 +332,7 @@ void Game::RunAppLaunchCommands() { } // Set up our sleeping based on what we're doing. -void Game::UpdateProcessTimer() { +void Logic::UpdateProcessTimer() { assert(InLogicThread()); // This might get called before we set up our timer in some cases. (such as @@ -353,7 +353,7 @@ void Game::UpdateProcessTimer() { } } -void Game::PruneSessions() { +void Logic::PruneSessions() { bool have_dead_session = false; for (auto&& i : sessions_) { if (i.exists()) { @@ -381,7 +381,7 @@ void Game::PruneSessions() { } } -void Game::UpdateKickVote() { +void Logic::UpdateKickVote() { if (!kick_vote_in_progress_) { return; } @@ -486,7 +486,7 @@ void Game::UpdateKickVote() { } } -void Game::HandleQuitOnIdle() { +void Logic::HandleQuitOnIdle() { if (idle_exit_minutes_) { float idle_seconds{g_input->input_idle_time() * 0.001f}; if (!idle_exiting_ && idle_seconds > (idle_exit_minutes_.value() * 60.0f)) { @@ -504,7 +504,7 @@ void Game::HandleQuitOnIdle() { } // Bring our scenes, real-time timers, etc up to date. -void Game::Update() { +void Logic::Update() { auto startms{Platform::GetCurrentMilliseconds()}; assert(InLogicThread()); millisecs_t real_time = GetRealTime(); @@ -662,7 +662,7 @@ void Game::Update() { } // Reset the game to a blank slate. -void Game::Reset() { +void Logic::Reset() { assert(InLogicThread()); // Tear down any existing setup. @@ -676,7 +676,7 @@ void Game::Reset() { // If all is well our sessions should all be dead. if (g_app->session_count != 0) { Log("Error: session-count is non-zero (" - + std::to_string(g_app->session_count) + ") on Game::Reset."); + + std::to_string(g_app->session_count) + ") on Logic::Reset."); } // Note: we don't clear real-time timers anymore. Should we?.. @@ -697,11 +697,11 @@ void Game::Reset() { } } -auto Game::IsInUIContext() const -> bool { +auto Logic::IsInUIContext() const -> bool { return (g_ui && Context::current().target.get() == g_ui); } -void Game::PushShowURLCall(const std::string& url) { +void Logic::PushShowURLCall(const std::string& url) { thread()->PushCall([url] { assert(InLogicThread()); assert(g_python); @@ -709,7 +709,7 @@ void Game::PushShowURLCall(const std::string& url) { }); } -auto Game::GetForegroundContext() -> Context { +auto Logic::GetForegroundContext() -> Context { Session* s = GetForegroundSession(); if (s) { return s->GetForegroundContext(); @@ -718,7 +718,7 @@ auto Game::GetForegroundContext() -> Context { } } -void Game::PushBackButtonCall(InputDevice* input_device) { +void Logic::PushBackButtonCall(InputDevice* input_device) { thread()->PushCall([this, input_device] { assert(InLogicThread()); @@ -740,7 +740,7 @@ void Game::PushBackButtonCall(InputDevice* input_device) { }); } -void Game::PushStringEditSetCall(const std::string& value) { +void Logic::PushStringEditSetCall(const std::string& value) { thread()->PushCall([value] { if (!g_ui) { Log("Error: No ui on StringEditSetEvent."); @@ -757,7 +757,7 @@ void Game::PushStringEditSetCall(const std::string& value) { }); } -void Game::PushStringEditCancelCall() { +void Logic::PushStringEditCancelCall() { thread()->PushCall([] { if (!g_ui) { Log("Error: No ui in PushStringEditCancelCall."); @@ -768,12 +768,12 @@ void Game::PushStringEditCancelCall() { // Called by a newly made Session instance to set itself as the current // session. -void Game::SetForegroundSession(Session* s) { +void Logic::SetForegroundSession(Session* s) { assert(InLogicThread()); foreground_session_ = s; } -void Game::SetForegroundScene(Scene* sg) { +void Logic::SetForegroundScene(Scene* sg) { assert(InLogicThread()); if (foreground_scene_.get() != sg) { foreground_scene_ = sg; @@ -785,7 +785,7 @@ void Game::SetForegroundScene(Scene* sg) { } } -void Game::LaunchClientSession() { +void Logic::LaunchClientSession() { if (in_update_) { throw Exception( "can't launch a session from within a session update; use " @@ -814,7 +814,7 @@ void Game::LaunchClientSession() { } } -void Game::LaunchReplaySession(const std::string& file_name) { +void Logic::LaunchReplaySession(const std::string& file_name) { if (in_update_) throw Exception( "can't launch a session from within a session update; use " @@ -844,8 +844,8 @@ void Game::LaunchReplaySession(const std::string& file_name) { } } -void Game::LaunchHostSession(PyObject* session_type_obj, - BenchmarkType benchmark_type) { +void Logic::LaunchHostSession(PyObject* session_type_obj, + BenchmarkType benchmark_type) { if (in_update_) { throw Exception( "can't call host_session() from within session update; use " @@ -879,7 +879,7 @@ void Game::LaunchHostSession(PyObject* session_type_obj, } } -void Game::RunMainMenu() { +void Logic::RunMainMenu() { assert(InLogicThread()); if (g_app->shutting_down) { return; @@ -896,7 +896,7 @@ void Game::RunMainMenu() { // Commands run via the in-game console. These are a bit more 'casual' and run // in the current visible context. -void Game::PushInGameConsoleScriptCommand(const std::string& command) { +void Logic::PushInGameConsoleScriptCommand(const std::string& command) { thread()->PushCall([this, command] { // These are always run in whichever context is 'visible'. ScopedSetContext cp(GetForegroundContext()); @@ -925,7 +925,7 @@ void Game::PushInGameConsoleScriptCommand(const std::string& command) { } // Commands run via stdin. -void Game::PushStdinScriptCommand(const std::string& command) { +void Logic::PushStdinScriptCommand(const std::string& command) { thread()->PushCall([this, command] { // These are always run in whichever context is 'visible'. ScopedSetContext cp(GetForegroundContext()); @@ -959,7 +959,7 @@ void Game::PushStdinScriptCommand(const std::string& command) { }); } -void Game::PushInterruptSignalCall() { +void Logic::PushInterruptSignalCall() { thread()->PushCall([this] { assert(InLogicThread()); @@ -974,7 +974,7 @@ void Game::PushInterruptSignalCall() { }); } -void Game::PushAskUserForTelnetAccessCall() { +void Logic::PushAskUserForTelnetAccessCall() { thread()->PushCall([this] { assert(InLogicThread()); ScopedSetContext cp(GetUIContext()); @@ -982,7 +982,7 @@ void Game::PushAskUserForTelnetAccessCall() { }); } -void Game::PushPythonCall(const Object::Ref& call) { +void Logic::PushPythonCall(const Object::Ref& call) { // Since we're mucking with refs, need to limit to game thread. BA_PRECONDITION(InLogicThread()); BA_PRECONDITION(call->object_strong_ref_count() > 0); @@ -992,8 +992,8 @@ void Game::PushPythonCall(const Object::Ref& call) { }); } -void Game::PushPythonCallArgs(const Object::Ref& call, - const PythonRef& args) { +void Logic::PushPythonCallArgs(const Object::Ref& call, + const PythonRef& args) { // Since we're mucking with refs, need to limit to game thread. BA_PRECONDITION(InLogicThread()); BA_PRECONDITION(call->object_strong_ref_count() > 0); @@ -1003,7 +1003,7 @@ void Game::PushPythonCallArgs(const Object::Ref& call, }); } -void Game::PushPythonWeakCall(const Object::WeakRef& call) { +void Logic::PushPythonWeakCall(const Object::WeakRef& call) { // Since we're mucking with refs, need to limit to game thread. BA_PRECONDITION(InLogicThread()); @@ -1019,7 +1019,7 @@ void Game::PushPythonWeakCall(const Object::WeakRef& call) { }); } -void Game::PushPythonWeakCallArgs( +void Logic::PushPythonWeakCallArgs( const Object::WeakRef& call, const PythonRef& args) { // Since we're mucking with refs, need to limit to game thread. BA_PRECONDITION(InLogicThread()); @@ -1033,7 +1033,7 @@ void Game::PushPythonWeakCallArgs( }); } -void Game::PushPythonRawCallable(PyObject* callable) { +void Logic::PushPythonRawCallable(PyObject* callable) { thread()->PushCall([this, callable] { assert(InLogicThread()); @@ -1049,18 +1049,18 @@ void Game::PushPythonRawCallable(PyObject* callable) { }); } -void Game::PushScreenMessage(const std::string& message, - const Vector3f& color) { +void Logic::PushScreenMessage(const std::string& message, + const Vector3f& color) { thread()->PushCall( [message, color] { g_graphics->AddScreenMessage(message, color); }); } -void Game::SetReplaySpeedExponent(int val) { +void Logic::SetReplaySpeedExponent(int val) { replay_speed_exponent_ = std::min(3, std::max(-3, val)); replay_speed_mult_ = powf(2.0f, static_cast(replay_speed_exponent_)); } -void Game::SetDebugSpeedExponent(int val) { +void Logic::SetDebugSpeedExponent(int val) { debug_speed_exponent_ = val; debug_speed_mult_ = powf(2.0f, static_cast(debug_speed_exponent_)); @@ -1068,7 +1068,7 @@ void Game::SetDebugSpeedExponent(int val) { if (s) s->DebugSpeedMultChanged(); } -void Game::ChangeGameSpeed(int offs) { +void Logic::ChangeGameSpeed(int offs) { assert(InLogicThread()); // If we're in a replay session, adjust playback speed there. @@ -1095,40 +1095,40 @@ void Game::ChangeGameSpeed(int offs) { } } -auto Game::GetUIContext() const -> Context { +auto Logic::GetUIContext() const -> Context { return Context(GetUIContextTarget()); } -void Game::PushToggleManualCameraCall() { +void Logic::PushToggleManualCameraCall() { thread()->PushCall([] { g_graphics->ToggleManualCamera(); }); } -void Game::PushToggleDebugInfoDisplayCall() { +void Logic::PushToggleDebugInfoDisplayCall() { thread()->PushCall([] { g_graphics->ToggleNetworkDebugDisplay(); }); } -void Game::PushToggleCollisionGeometryDisplayCall() { +void Logic::PushToggleCollisionGeometryDisplayCall() { thread()->PushCall([] { g_graphics->ToggleDebugDraw(); }); } -void Game::PushMainMenuPressCall(InputDevice* device) { +void Logic::PushMainMenuPressCall(InputDevice* device) { thread()->PushCall([this, device] { MainMenuPress(device); }); } -void Game::MainMenuPress(InputDevice* device) { +void Logic::MainMenuPress(InputDevice* device) { assert(InLogicThread()); g_python->HandleDeviceMenuPress(device); } -void Game::PushScreenResizeCall(float virtual_width, float virtual_height, - float pixel_width, float pixel_height) { +void Logic::PushScreenResizeCall(float virtual_width, float virtual_height, + float pixel_width, float pixel_height) { thread()->PushCall([=] { ScreenResize(virtual_width, virtual_height, pixel_width, pixel_height); }); } -void Game::ScreenResize(float virtual_width, float virtual_height, - float pixel_width, float pixel_height) { +void Logic::ScreenResize(float virtual_width, float virtual_height, + float pixel_width, float pixel_height) { assert(InLogicThread()); assert(g_graphics != nullptr); if (g_graphics) { @@ -1143,30 +1143,30 @@ void Game::ScreenResize(float virtual_width, float virtual_height, } } -void Game::PushGameServiceAchievementListCall( +void Logic::PushGameServiceAchievementListCall( const std::set& achievements) { thread()->PushCall( [this, achievements] { GameServiceAchievementList(achievements); }); } -void Game::GameServiceAchievementList( +void Logic::GameServiceAchievementList( const std::set& achievements) { assert(g_python); assert(InLogicThread()); g_app_internal->DispatchRemoteAchievementList(achievements); } -void Game::PushPlaySoundCall(SystemSoundID sound) { +void Logic::PushPlaySoundCall(SystemSoundID sound) { thread()->PushCall( [sound] { g_audio->PlaySound(g_assets->GetSound(sound)); }); } -void Game::PushFriendScoreSetCall(const FriendScoreSet& score_set) { +void Logic::PushFriendScoreSetCall(const FriendScoreSet& score_set) { thread()->PushCall( [score_set] { g_python->HandleFriendScoresCB(score_set); }); } -void Game::PushConfirmQuitCall() { +void Logic::PushConfirmQuitCall() { thread()->PushCall([this] { assert(InLogicThread()); if (HeadlessMode()) { @@ -1197,7 +1197,7 @@ void Game::PushConfirmQuitCall() { }); } -void Game::Draw() { +void Logic::Draw() { g_graphics->BuildAndPushFrameDef(); // Now bring the game up to date. @@ -1228,11 +1228,11 @@ void Game::Draw() { } } -void Game::PushFrameDefRequest() { +void Logic::PushFrameDefRequest() { thread()->PushCall([this] { Draw(); }); } -void Game::PushOnAppResumeCall() { +void Logic::PushOnAppResumeCall() { thread()->PushCall([] { // Wipe out whatever input device was in control of the UI. assert(g_ui); @@ -1241,7 +1241,7 @@ void Game::PushOnAppResumeCall() { } // Look through everything in our config dict and act on it. -void Game::ApplyConfig() { +void Logic::ApplyConfig() { assert(InLogicThread()); // Not relevant for fullscreen anymore @@ -1399,11 +1399,11 @@ void Game::ApplyConfig() { g_platform->ApplyConfig(); } -void Game::PushApplyConfigCall() { +void Logic::PushApplyConfigCall() { thread()->PushCall([this] { ApplyConfig(); }); } -void Game::PushRemoveGraphicsServerRenderHoldCall() { +void Logic::PushRemoveGraphicsServerRenderHoldCall() { thread()->PushCall([] { // This call acts as a flush of sorts; when it goes through, // we push a call to the graphics server saying its ok for it @@ -1413,7 +1413,7 @@ void Game::PushRemoveGraphicsServerRenderHoldCall() { }); } -void Game::PushFreeAssetComponentRefsCall( +void Logic::PushFreeAssetComponentRefsCall( const std::vector*>& components) { thread()->PushCall([components] { for (auto&& i : components) { @@ -1422,18 +1422,18 @@ void Game::PushFreeAssetComponentRefsCall( }); } -void Game::PushHavePendingLoadsDoneCall() { +void Logic::PushHavePendingLoadsDoneCall() { thread()->PushCall([] { g_assets->ClearPendingLoadsDoneList(); }); } -void Game::ToggleConsole() { +void Logic::ToggleConsole() { assert(InLogicThread()); if (auto console = g_app->console) { console->ToggleState(); } } -void Game::PushConsolePrintCall(const std::string& msg) { +void Logic::PushConsolePrintCall(const std::string& msg) { thread()->PushCall([msg] { // Send them to the console if its been created or store them // for when it is (unless we're headless in which case it never will). @@ -1445,18 +1445,18 @@ void Game::PushConsolePrintCall(const std::string& msg) { }); } -void Game::PushHavePendingLoadsCall() { +void Logic::PushHavePendingLoadsCall() { thread()->PushCall([this] { have_pending_loads_ = true; UpdateProcessTimer(); }); } -void Game::PushShutdownCall(bool soft) { +void Logic::PushShutdownCall(bool soft) { thread()->PushCall([this, soft] { Shutdown(soft); }); } -void Game::Shutdown(bool soft) { +void Logic::Shutdown(bool soft) { assert(InLogicThread()); if (!g_app->shutting_down) { @@ -1483,13 +1483,13 @@ void Game::Shutdown(bool soft) { } } -void Game::ResetInput() { +void Logic::ResetInput() { assert(InLogicThread()); g_input->ResetKeyboardHeldKeys(); g_input->ResetJoyStickHeldButtons(); } -auto Game::RemovePlayer(Player* player) -> void { +auto Logic::RemovePlayer(Player* player) -> void { assert(InLogicThread()); if (HostSession* host_session = player->GetHostSession()) { host_session->RemovePlayer(player); @@ -1498,31 +1498,33 @@ auto Game::RemovePlayer(Player* player) -> void { } } -auto Game::NewRealTimer(millisecs_t length, bool repeat, - const Object::Ref& runnable) -> int { +auto Logic::NewRealTimer(millisecs_t length, bool repeat, + const Object::Ref& runnable) -> int { int offset = 0; Timer* t = realtimers_->NewTimer(GetRealTime(), length, offset, repeat ? -1 : 0, runnable); return t->id(); } -void Game::DeleteRealTimer(int timer_id) { realtimers_->DeleteTimer(timer_id); } +void Logic::DeleteRealTimer(int timer_id) { + realtimers_->DeleteTimer(timer_id); +} -void Game::SetRealTimerLength(int timer_id, millisecs_t length) { +void Logic::SetRealTimerLength(int timer_id, millisecs_t length) { Timer* t = realtimers_->GetTimer(timer_id); if (t) { t->SetLength(length); } else { - Log("Error: Game::SetRealTimerLength() called on nonexistent timer."); + Log("Error: Logic::SetRealTimerLength() called on nonexistent timer."); } } -void Game::Process() { +void Logic::Process() { have_pending_loads_ = g_assets->RunPendingLoadsLogicThread(); UpdateProcessTimer(); } -void Game::SetLanguageKeys( +void Logic::SetLanguageKeys( const std::unordered_map& language) { assert(InLogicThread()); { @@ -1730,8 +1732,8 @@ auto DoCompileResourceString(cJSON* obj) -> std::string { return result; } -auto Game::CompileResourceString(const std::string& s, const std::string& loc, - bool* valid) -> std::string { +auto Logic::CompileResourceString(const std::string& s, const std::string& loc, + bool* valid) -> std::string { assert(g_python != nullptr); bool dummyvalid; @@ -1767,7 +1769,7 @@ auto Game::CompileResourceString(const std::string& s, const std::string& loc, return result; } -auto Game::GetResourceString(const std::string& key) -> std::string { +auto Logic::GetResourceString(const std::string& key) -> std::string { std::string val; { std::scoped_lock lock(language_mutex_); @@ -1779,7 +1781,7 @@ auto Game::GetResourceString(const std::string& key) -> std::string { return val; } -auto Game::CharStr(SpecialChar id) -> std::string { +auto Logic::CharStr(SpecialChar id) -> std::string { std::scoped_lock lock(special_char_mutex_); std::string val; auto i = special_char_strings_.find(id); @@ -1793,7 +1795,7 @@ auto Game::CharStr(SpecialChar id) -> std::string { return val; } -auto Game::ShouldAnnouncePartyJoinsAndLeaves() -> bool { +auto Logic::ShouldAnnouncePartyJoinsAndLeaves() -> bool { assert(InLogicThread()); // At the moment we don't announce these for public internet parties.. (too @@ -1801,7 +1803,7 @@ auto Game::ShouldAnnouncePartyJoinsAndLeaves() -> bool { return !public_party_enabled(); } -void Game::CleanUpBeforeConnectingToHost() { +void Logic::CleanUpBeforeConnectingToHost() { // We can't have connected clients and a host-connection at the same time. // Make a minimal attempt to disconnect any client connections we have, but // get them off the list immediately. @@ -1815,13 +1817,13 @@ void Game::CleanUpBeforeConnectingToHost() { SetPublicPartyEnabled(false); } -auto Game::GetPartySize() const -> int { +auto Logic::GetPartySize() const -> int { assert(InLogicThread()); assert(game_roster_ != nullptr); return cJSON_GetArraySize(game_roster_); } -void Game::LocalDisplayChatMessage(const std::vector& buffer) { +void Logic::LocalDisplayChatMessage(const std::vector& buffer) { // 1 type byte, 1 spec-len byte, 1 or more spec chars, 0 or more msg chars. if (buffer.size() > 3) { size_t spec_len = buffer[1]; @@ -1862,7 +1864,7 @@ void Game::LocalDisplayChatMessage(const std::vector& buffer) { } } -auto Game::GetGameRosterMessage() -> std::vector { +auto Logic::GetGameRosterMessage() -> std::vector { // This message is simply a flattened json string of our roster (including // terminating char). char* s = cJSON_PrintUnformatted(game_roster_); @@ -1875,7 +1877,7 @@ auto Game::GetGameRosterMessage() -> std::vector { return msg; } -auto Game::IsPlayerBanned(const PlayerSpec& spec) -> bool { +auto Logic::IsPlayerBanned(const PlayerSpec& spec) -> bool { millisecs_t current_time = GetRealTime(); // Now is a good time to prune no-longer-banned specs. @@ -1892,8 +1894,8 @@ auto Game::IsPlayerBanned(const PlayerSpec& spec) -> bool { return false; } -void Game::StartKickVote(ConnectionToClient* starter, - ConnectionToClient* target) { +void Logic::StartKickVote(ConnectionToClient* starter, + ConnectionToClient* target) { // Restrict votes per client. millisecs_t current_time = GetRealTime(); @@ -1991,11 +1993,11 @@ void Game::StartKickVote(ConnectionToClient* starter, } } -void Game::BanPlayer(const PlayerSpec& spec, millisecs_t duration) { +void Logic::BanPlayer(const PlayerSpec& spec, millisecs_t duration) { banned_players_.emplace_back(GetRealTime() + duration, spec); } -void Game::UpdateGameRoster() { +void Logic::UpdateGameRoster() { assert(InLogicThread()); assert(game_roster_ != nullptr); @@ -2106,7 +2108,7 @@ void Game::UpdateGameRoster() { game_roster_dirty_ = true; } -void Game::SetPublicPartyEnabled(bool val) { +void Logic::SetPublicPartyEnabled(bool val) { assert(InLogicThread()); if (val == public_party_enabled_) { return; @@ -2115,7 +2117,7 @@ void Game::SetPublicPartyEnabled(bool val) { g_app_internal->PushPublicPartyState(); } -void Game::SetPublicPartySize(int count) { +void Logic::SetPublicPartySize(int count) { assert(InLogicThread()); if (count == public_party_size_) { return; @@ -2129,7 +2131,7 @@ void Game::SetPublicPartySize(int count) { } } -void Game::SetPublicPartyMaxSize(int count) { +void Logic::SetPublicPartyMaxSize(int count) { assert(InLogicThread()); if (count == public_party_max_size_) { return; @@ -2143,7 +2145,7 @@ void Game::SetPublicPartyMaxSize(int count) { } } -void Game::SetPublicPartyName(const std::string& name) { +void Logic::SetPublicPartyName(const std::string& name) { assert(InLogicThread()); if (name == public_party_name_) { return; @@ -2157,7 +2159,7 @@ void Game::SetPublicPartyName(const std::string& name) { } } -void Game::SetPublicPartyStatsURL(const std::string& url) { +void Logic::SetPublicPartyStatsURL(const std::string& url) { assert(InLogicThread()); if (url == public_party_stats_url_) { return; @@ -2171,7 +2173,7 @@ void Game::SetPublicPartyStatsURL(const std::string& url) { } } -void Game::SetPublicPartyPlayerCount(int count) { +void Logic::SetPublicPartyPlayerCount(int count) { assert(InLogicThread()); if (count == public_party_player_count_) { return; diff --git a/src/ballistica/game/game.h b/src/ballistica/logic/logic.h similarity index 99% rename from src/ballistica/game/game.h rename to src/ballistica/logic/logic.h index 9685e5bf..def5a310 100644 --- a/src/ballistica/game/game.h +++ b/src/ballistica/logic/logic.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_GAME_H_ -#define BALLISTICA_GAME_GAME_H_ +#ifndef BALLISTICA_LOGIC_LOGIC_H_ +#define BALLISTICA_LOGIC_LOGIC_H_ #include #include @@ -22,9 +22,9 @@ const int kMaxPartyNameCombinedSize = 25; /// The Game Module generally runs on a dedicated thread; it manages /// all game logic, builds frame_defs to send to the graphics-server for /// rendering, etc. -class Game { +class Logic { public: - Game(); + Logic(); auto OnAppStart() -> void; auto LaunchHostSession(PyObject* session_type_obj, @@ -338,4 +338,4 @@ class Game { } // namespace ballistica -#endif // BALLISTICA_GAME_GAME_H_ +#endif // BALLISTICA_LOGIC_LOGIC_H_ diff --git a/src/ballistica/game/player.cc b/src/ballistica/logic/player.cc similarity index 98% rename from src/ballistica/game/player.cc rename to src/ballistica/logic/player.cc index 198d4ad1..78589270 100644 --- a/src/ballistica/game/player.cc +++ b/src/ballistica/logic/player.cc @@ -1,11 +1,11 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/game/player.h" +#include "ballistica/logic/player.h" -#include "ballistica/game/host_activity.h" -#include "ballistica/game/session/host_session.h" #include "ballistica/generic/utils.h" #include "ballistica/input/device/joystick.h" +#include "ballistica/logic/host_activity.h" +#include "ballistica/logic/session/host_session.h" #include "ballistica/python/class/python_class_session_player.h" #include "ballistica/python/python.h" #include "ballistica/python/python_context_call.h" @@ -367,7 +367,7 @@ void Player::SetName(const std::string& name, const std::string& full_name, // If we're already in the game and our name is changing, we need to update // the roster. if (accepted_) { - g_game->UpdateGameRoster(); + g_logic->UpdateGameRoster(); } } diff --git a/src/ballistica/game/player.h b/src/ballistica/logic/player.h similarity index 98% rename from src/ballistica/game/player.h rename to src/ballistica/logic/player.h index d501cda2..e9d6682c 100644 --- a/src/ballistica/game/player.h +++ b/src/ballistica/logic/player.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_PLAYER_H_ -#define BALLISTICA_GAME_PLAYER_H_ +#ifndef BALLISTICA_LOGIC_PLAYER_H_ +#define BALLISTICA_LOGIC_PLAYER_H_ #include #include @@ -164,4 +164,4 @@ class Player : public Object { } // namespace ballistica -#endif // BALLISTICA_GAME_PLAYER_H_ +#endif // BALLISTICA_LOGIC_PLAYER_H_ diff --git a/src/ballistica/game/player_spec.cc b/src/ballistica/logic/player_spec.cc similarity index 93% rename from src/ballistica/game/player_spec.cc rename to src/ballistica/logic/player_spec.cc index fc5b4502..71b6f515 100644 --- a/src/ballistica/game/player_spec.cc +++ b/src/ballistica/logic/player_spec.cc @@ -1,12 +1,12 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/game/player_spec.h" +#include "ballistica/logic/player_spec.h" #include "ballistica/app/app.h" -#include "ballistica/game/game.h" -#include "ballistica/game/v1_account.h" #include "ballistica/generic/json.h" #include "ballistica/generic/utils.h" +#include "ballistica/logic/logic.h" +#include "ballistica/logic/v1_account.h" #include "ballistica/platform/platform.h" namespace ballistica { @@ -84,9 +84,9 @@ auto PlayerSpec::GetAccountPlayerSpec() -> PlayerSpec { } else { // Headless builds fall back to V1 public-party name if that's available. if (g_buildconfig.headless_build() - && !g_game->public_party_name().empty()) { + && !g_logic->public_party_name().empty()) { spec.name_ = - Utils::GetValidUTF8(g_game->public_party_name().c_str(), "bsgp3r"); + Utils::GetValidUTF8(g_logic->public_party_name().c_str(), "bsgp3r"); } else { // Or lastly fall back to device name. spec.name_ = diff --git a/src/ballistica/game/player_spec.h b/src/ballistica/logic/player_spec.h similarity index 93% rename from src/ballistica/game/player_spec.h rename to src/ballistica/logic/player_spec.h index c9d5d225..8d1bbc49 100644 --- a/src/ballistica/game/player_spec.h +++ b/src/ballistica/logic/player_spec.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_PLAYER_SPEC_H_ -#define BALLISTICA_GAME_PLAYER_SPEC_H_ +#ifndef BALLISTICA_LOGIC_PLAYER_SPEC_H_ +#define BALLISTICA_LOGIC_PLAYER_SPEC_H_ #include @@ -56,4 +56,4 @@ class PlayerSpec { } // namespace ballistica -#endif // BALLISTICA_GAME_PLAYER_SPEC_H_ +#endif // BALLISTICA_LOGIC_PLAYER_SPEC_H_ diff --git a/src/ballistica/game/session/client_session.cc b/src/ballistica/logic/session/client_session.cc similarity index 99% rename from src/ballistica/game/session/client_session.cc rename to src/ballistica/logic/session/client_session.cc index b1b4994c..d9b72a57 100644 --- a/src/ballistica/game/session/client_session.cc +++ b/src/ballistica/logic/session/client_session.cc @@ -1,6 +1,6 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/game/session/client_session.h" +#include "ballistica/logic/session/client_session.h" #include "ballistica/app/app.h" #include "ballistica/assets/component/collide_model.h" @@ -360,7 +360,7 @@ void ClientSession::Update(int time_advance) { } case SessionCommand::kSetForegroundSceneGraph: { Scene* scene = GetScene(ReadInt32()); - g_game->SetForegroundScene(scene); + g_logic->SetForegroundScene(scene); break; } case SessionCommand::kNodeMessage: { diff --git a/src/ballistica/game/session/client_session.h b/src/ballistica/logic/session/client_session.h similarity index 94% rename from src/ballistica/game/session/client_session.h rename to src/ballistica/logic/session/client_session.h index e696c707..2536848d 100644 --- a/src/ballistica/game/session/client_session.h +++ b/src/ballistica/logic/session/client_session.h @@ -1,14 +1,14 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_SESSION_CLIENT_SESSION_H_ -#define BALLISTICA_GAME_SESSION_CLIENT_SESSION_H_ +#ifndef BALLISTICA_LOGIC_SESSION_CLIENT_SESSION_H_ +#define BALLISTICA_LOGIC_SESSION_CLIENT_SESSION_H_ #include #include #include -#include "ballistica/game/client_controller_interface.h" -#include "ballistica/game/session/session.h" +#include "ballistica/logic/client_controller_interface.h" +#include "ballistica/logic/session/session.h" namespace ballistica { @@ -135,4 +135,4 @@ class ClientSession : public Session { } // namespace ballistica -#endif // BALLISTICA_GAME_SESSION_CLIENT_SESSION_H_ +#endif // BALLISTICA_LOGIC_SESSION_CLIENT_SESSION_H_ diff --git a/src/ballistica/game/session/host_session.cc b/src/ballistica/logic/session/host_session.cc similarity index 96% rename from src/ballistica/game/session/host_session.cc rename to src/ballistica/logic/session/host_session.cc index 2a35b169..6dbbe3a1 100644 --- a/src/ballistica/game/session/host_session.cc +++ b/src/ballistica/logic/session/host_session.cc @@ -1,17 +1,17 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/game/session/host_session.h" +#include "ballistica/logic/session/host_session.h" #include "ballistica/assets/component/data.h" #include "ballistica/assets/component/model.h" #include "ballistica/assets/component/sound.h" #include "ballistica/assets/component/texture.h" -#include "ballistica/game/host_activity.h" -#include "ballistica/game/player.h" #include "ballistica/generic/lambda_runnable.h" #include "ballistica/generic/timer.h" #include "ballistica/graphics/graphics.h" #include "ballistica/input/device/input_device.h" +#include "ballistica/logic/host_activity.h" +#include "ballistica/logic/player.h" #include "ballistica/python/python.h" #include "ballistica/python/python_command.h" #include "ballistica/python/python_context_call.h" @@ -22,7 +22,7 @@ namespace ballistica { HostSession::HostSession(PyObject* session_type_obj) : last_kick_idle_players_decrement_time_(GetRealTime()) { - assert(g_game); + assert(g_logic); assert(InLogicThread()); assert(session_type_obj != nullptr); @@ -34,7 +34,7 @@ HostSession::HostSession(PyObject* session_type_obj) "bastd.mainmenu.MainMenuSession")); // Log("MAIN MENU? " + std::to_string(is_main_menu())); - kick_idle_players_ = g_game->kick_idle_players(); + kick_idle_players_ = g_logic->kick_idle_players(); // Create a timer to step our session scene. step_scene_timer_ = @@ -90,7 +90,7 @@ HostSession::HostSession(PyObject* session_type_obj) // Lastly, keep the python layer fed with our latest player count in case // it is updating the master-server with our current/max player counts. - g_game->SetPublicPartyPlayerCount(static_cast(players_.size())); + g_logic->SetPublicPartyPlayerCount(static_cast(players_.size())); } auto HostSession::GetHostSession() -> HostSession* { return this; } @@ -272,12 +272,12 @@ void HostSession::RequestPlayer(InputDevice* device) { // If he was accepted, update our game roster with the new info. if (accept) { - g_game->UpdateGameRoster(); + g_logic->UpdateGameRoster(); } // Lastly, keep the python layer fed with our latest player count in case it // is updating the master-server with our current/max player counts. - g_game->SetPublicPartyPlayerCount(static_cast(players_.size())); + g_logic->SetPublicPartyPlayerCount(static_cast(players_.size())); } void HostSession::RemovePlayer(Player* player) { @@ -296,11 +296,11 @@ void HostSession::RemovePlayer(Player* player) { } // Update our game roster with the departure. - g_game->UpdateGameRoster(); + g_logic->UpdateGameRoster(); // Lastly, keep the python layer fed with our latest player count in case // it is updating the master-server with our current/max player counts. - g_game->SetPublicPartyPlayerCount(static_cast(players_.size())); + g_logic->SetPublicPartyPlayerCount(static_cast(players_.size())); return; } @@ -369,7 +369,7 @@ void HostSession::SetForegroundHostActivity(HostActivity* a) { // Now go through telling each host-activity whether it's foregrounded or not. // FIXME: Dying sessions never get told they're un-foregrounded.. could that // ever be a problem? - bool session_is_foreground = (g_game->GetForegroundSession() != nullptr); + bool session_is_foreground = (g_logic->GetForegroundSession() != nullptr); for (auto&& i : host_activities_) { i->SetIsForeground(session_is_foreground && (i == a)); } @@ -442,7 +442,7 @@ void HostSession::DecrementPlayerTimeOuts(millisecs_t millisecs) { assert(player); if (player->time_out() < millisecs) { std::string kick_str = - g_game->GetResourceString("kickIdlePlayersKickedText"); + g_logic->GetResourceString("kickIdlePlayersKickedText"); Utils::StringReplaceOne(&kick_str, "${NAME}", player->GetName()); ScreenMessage(kick_str); RemovePlayer(player); @@ -450,12 +450,12 @@ void HostSession::DecrementPlayerTimeOuts(millisecs_t millisecs) { } else if (player->time_out() > BA_PLAYER_TIME_OUT_WARN && (player->time_out() - millisecs <= BA_PLAYER_TIME_OUT_WARN)) { std::string kick_str_1 = - g_game->GetResourceString("kickIdlePlayersWarning1Text"); + g_logic->GetResourceString("kickIdlePlayersWarning1Text"); Utils::StringReplaceOne(&kick_str_1, "${NAME}", player->GetName()); Utils::StringReplaceOne(&kick_str_1, "${COUNT}", std::to_string(BA_PLAYER_TIME_OUT_WARN / 1000)); ScreenMessage(kick_str_1); - ScreenMessage(g_game->GetResourceString("kickIdlePlayersWarning2Text")); + ScreenMessage(g_logic->GetResourceString("kickIdlePlayersWarning2Text")); } player->set_time_out(player->time_out() - millisecs); } diff --git a/src/ballistica/game/session/host_session.h b/src/ballistica/logic/session/host_session.h similarity index 95% rename from src/ballistica/game/session/host_session.h rename to src/ballistica/logic/session/host_session.h index 2f5e7546..20729dfa 100644 --- a/src/ballistica/game/session/host_session.h +++ b/src/ballistica/logic/session/host_session.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_SESSION_HOST_SESSION_H_ -#define BALLISTICA_GAME_SESSION_HOST_SESSION_H_ +#ifndef BALLISTICA_LOGIC_SESSION_HOST_SESSION_H_ +#define BALLISTICA_LOGIC_SESSION_HOST_SESSION_H_ #include #include @@ -9,8 +9,8 @@ #include #include "ballistica/core/context.h" -#include "ballistica/game/session/session.h" #include "ballistica/generic/timer_list.h" +#include "ballistica/logic/session/session.h" #include "ballistica/python/python_ref.h" namespace ballistica { @@ -128,4 +128,4 @@ class HostSession : public Session { } // namespace ballistica -#endif // BALLISTICA_GAME_SESSION_HOST_SESSION_H_ +#endif // BALLISTICA_LOGIC_SESSION_HOST_SESSION_H_ diff --git a/src/ballistica/game/session/net_client_session.cc b/src/ballistica/logic/session/net_client_session.cc similarity index 98% rename from src/ballistica/game/session/net_client_session.cc rename to src/ballistica/logic/session/net_client_session.cc index 4826a057..795bd1ee 100644 --- a/src/ballistica/game/session/net_client_session.cc +++ b/src/ballistica/logic/session/net_client_session.cc @@ -1,12 +1,12 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/game/session/net_client_session.h" +#include "ballistica/logic/session/net_client_session.h" #include "ballistica/app/app.h" #include "ballistica/assets/assets_server.h" -#include "ballistica/game/connection/connection_to_host.h" #include "ballistica/graphics/graphics.h" #include "ballistica/graphics/net_graph.h" +#include "ballistica/logic/connection/connection_to_host.h" namespace ballistica { diff --git a/src/ballistica/game/session/net_client_session.h b/src/ballistica/logic/session/net_client_session.h similarity index 88% rename from src/ballistica/game/session/net_client_session.h rename to src/ballistica/logic/session/net_client_session.h index de232896..c53e9b0f 100644 --- a/src/ballistica/game/session/net_client_session.h +++ b/src/ballistica/logic/session/net_client_session.h @@ -1,11 +1,11 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_SESSION_NET_CLIENT_SESSION_H_ -#define BALLISTICA_GAME_SESSION_NET_CLIENT_SESSION_H_ +#ifndef BALLISTICA_LOGIC_SESSION_NET_CLIENT_SESSION_H_ +#define BALLISTICA_LOGIC_SESSION_NET_CLIENT_SESSION_H_ #include -#include "ballistica/game/session/client_session.h" +#include "ballistica/logic/session/client_session.h" namespace ballistica { @@ -59,4 +59,4 @@ class NetClientSession : public ClientSession { } // namespace ballistica -#endif // BALLISTICA_GAME_SESSION_NET_CLIENT_SESSION_H_ +#endif // BALLISTICA_LOGIC_SESSION_NET_CLIENT_SESSION_H_ diff --git a/src/ballistica/game/session/replay_client_session.cc b/src/ballistica/logic/session/replay_client_session.cc similarity index 93% rename from src/ballistica/game/session/replay_client_session.cc rename to src/ballistica/logic/session/replay_client_session.cc index 3d299168..c93fb45f 100644 --- a/src/ballistica/game/session/replay_client_session.cc +++ b/src/ballistica/logic/session/replay_client_session.cc @@ -1,12 +1,12 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/game/session/replay_client_session.h" +#include "ballistica/logic/session/replay_client_session.h" #include "ballistica/dynamics/material/material.h" -#include "ballistica/game/connection/connection_set.h" -#include "ballistica/game/connection/connection_to_client.h" #include "ballistica/generic/huffman.h" #include "ballistica/generic/utils.h" +#include "ballistica/logic/connection/connection_set.h" +#include "ballistica/logic/connection/connection_to_client.h" #include "ballistica/math/vector3f.h" #include "ballistica/networking/networking.h" #include "ballistica/platform/platform.h" @@ -17,13 +17,13 @@ namespace ballistica { auto ReplayClientSession::GetActualTimeAdvance(int advance_in) -> int { return static_cast( - round(advance_in * pow(2.0f, g_game->replay_speed_exponent()))); + round(advance_in * pow(2.0f, g_logic->replay_speed_exponent()))); } ReplayClientSession::ReplayClientSession(std::string filename) : file_name_(std::move(filename)) { // take responsibility for feeding all clients to this device.. - g_game->connections()->RegisterClientController(this); + g_logic->connections()->RegisterClientController(this); // go ahead and just do a reset here, which will get things going.. Reset(true); @@ -31,7 +31,7 @@ ReplayClientSession::ReplayClientSession(std::string filename) ReplayClientSession::~ReplayClientSession() { // we no longer are responsible for feeding clients to this device.. - g_game->connections()->UnregisterClientController(this); + g_logic->connections()->UnregisterClientController(this); if (file_) { fclose(file_); @@ -198,7 +198,7 @@ void ReplayClientSession::FetchMessages() { void ReplayClientSession::Error(const std::string& description) { // Close the replay, announce something went wrong with it, and then do // standard error response.. - ScreenMessage(g_game->GetResourceString("replayReadErrorText"), {1, 0, 0}); + ScreenMessage(g_logic->GetResourceString("replayReadErrorText"), {1, 0, 0}); if (file_) { fclose(file_); file_ = nullptr; @@ -246,7 +246,7 @@ void ReplayClientSession::OnReset(bool rewind) { return; } if (version > kProtocolVersion || version < kProtocolVersionMin) { - ScreenMessage(g_game->GetResourceString("replayVersionErrorText"), + ScreenMessage(g_logic->GetResourceString("replayVersionErrorText"), {1, 0, 0}); End(); return; diff --git a/src/ballistica/game/session/replay_client_session.h b/src/ballistica/logic/session/replay_client_session.h similarity index 79% rename from src/ballistica/game/session/replay_client_session.h rename to src/ballistica/logic/session/replay_client_session.h index 411da3db..5e03044a 100644 --- a/src/ballistica/game/session/replay_client_session.h +++ b/src/ballistica/logic/session/replay_client_session.h @@ -1,13 +1,13 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_SESSION_REPLAY_CLIENT_SESSION_H_ -#define BALLISTICA_GAME_SESSION_REPLAY_CLIENT_SESSION_H_ +#ifndef BALLISTICA_LOGIC_SESSION_REPLAY_CLIENT_SESSION_H_ +#define BALLISTICA_LOGIC_SESSION_REPLAY_CLIENT_SESSION_H_ #include #include -#include "ballistica/game/client_controller_interface.h" -#include "ballistica/game/session/client_session.h" +#include "ballistica/logic/client_controller_interface.h" +#include "ballistica/logic/session/client_session.h" namespace ballistica { @@ -39,4 +39,4 @@ class ReplayClientSession : public ClientSession, } // namespace ballistica -#endif // BALLISTICA_GAME_SESSION_REPLAY_CLIENT_SESSION_H_ +#endif // BALLISTICA_LOGIC_SESSION_REPLAY_CLIENT_SESSION_H_ diff --git a/src/ballistica/game/session/session.cc b/src/ballistica/logic/session/session.cc similarity index 85% rename from src/ballistica/game/session/session.cc rename to src/ballistica/logic/session/session.cc index 0a93eede..facb0460 100644 --- a/src/ballistica/game/session/session.cc +++ b/src/ballistica/logic/session/session.cc @@ -1,9 +1,9 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/game/session/session.h" +#include "ballistica/logic/session/session.h" #include "ballistica/app/app.h" -#include "ballistica/game/game.h" +#include "ballistica/logic/logic.h" namespace ballistica { @@ -11,7 +11,7 @@ Session::Session() { g_app->session_count++; // New sessions immediately become foreground. - g_game->SetForegroundSession(this); + g_logic->SetForegroundSession(this); } Session::~Session() { g_app->session_count--; } diff --git a/src/ballistica/game/session/session.h b/src/ballistica/logic/session/session.h similarity index 90% rename from src/ballistica/game/session/session.h rename to src/ballistica/logic/session/session.h index 476cc11f..e212b79f 100644 --- a/src/ballistica/game/session/session.h +++ b/src/ballistica/logic/session/session.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_SESSION_SESSION_H_ -#define BALLISTICA_GAME_SESSION_SESSION_H_ +#ifndef BALLISTICA_LOGIC_SESSION_SESSION_H_ +#define BALLISTICA_LOGIC_SESSION_SESSION_H_ #include "ballistica/core/context.h" #include "ballistica/core/object.h" @@ -41,4 +41,4 @@ class Session : public ContextTarget { } // namespace ballistica -#endif // BALLISTICA_GAME_SESSION_SESSION_H_ +#endif // BALLISTICA_LOGIC_SESSION_SESSION_H_ diff --git a/src/ballistica/game/v1_account.cc b/src/ballistica/logic/v1_account.cc similarity index 90% rename from src/ballistica/game/v1_account.cc rename to src/ballistica/logic/v1_account.cc index 3b16bd91..23ccd39b 100644 --- a/src/ballistica/game/v1_account.cc +++ b/src/ballistica/logic/v1_account.cc @@ -1,11 +1,11 @@ // Released under the MIT License. See LICENSE for details. -#include "ballistica/game/v1_account.h" +#include "ballistica/logic/v1_account.h" #include "ballistica/app/app.h" -#include "ballistica/game/game.h" #include "ballistica/generic/utils.h" #include "ballistica/internal/app_internal.h" +#include "ballistica/logic/logic.h" #include "ballistica/platform/platform.h" namespace ballistica { @@ -66,24 +66,24 @@ auto V1Account::AccountTypeToString(V1AccountType type) -> std::string { auto V1Account::AccountTypeToIconString(V1AccountType type) -> std::string { switch (type) { case V1AccountType::kTest: - return g_game->CharStr(SpecialChar::kTestAccount); + return g_logic->CharStr(SpecialChar::kTestAccount); case V1AccountType::kNvidiaChina: - return g_game->CharStr(SpecialChar::kNvidiaLogo); + return g_logic->CharStr(SpecialChar::kNvidiaLogo); case V1AccountType::kGooglePlay: - return g_game->CharStr(SpecialChar::kGooglePlayGamesLogo); + return g_logic->CharStr(SpecialChar::kGooglePlayGamesLogo); case V1AccountType::kSteam: - return g_game->CharStr(SpecialChar::kSteamLogo); + return g_logic->CharStr(SpecialChar::kSteamLogo); case V1AccountType::kOculus: - return g_game->CharStr(SpecialChar::kOculusLogo); + return g_logic->CharStr(SpecialChar::kOculusLogo); case V1AccountType::kGameCenter: - return g_game->CharStr(SpecialChar::kGameCenterLogo); + return g_logic->CharStr(SpecialChar::kGameCenterLogo); case V1AccountType::kGameCircle: - return g_game->CharStr(SpecialChar::kGameCircleLogo); + return g_logic->CharStr(SpecialChar::kGameCircleLogo); case V1AccountType::kDevice: case V1AccountType::kServer: - return g_game->CharStr(SpecialChar::kLocalAccount); + return g_logic->CharStr(SpecialChar::kLocalAccount); case V1AccountType::kV2: - return g_game->CharStr(SpecialChar::kV2Logo); + return g_logic->CharStr(SpecialChar::kV2Logo); default: return ""; } diff --git a/src/ballistica/game/v1_account.h b/src/ballistica/logic/v1_account.h similarity index 94% rename from src/ballistica/game/v1_account.h rename to src/ballistica/logic/v1_account.h index d7c03345..6b61243b 100644 --- a/src/ballistica/game/v1_account.h +++ b/src/ballistica/logic/v1_account.h @@ -1,7 +1,7 @@ // Released under the MIT License. See LICENSE for details. -#ifndef BALLISTICA_GAME_V1_ACCOUNT_H_ -#define BALLISTICA_GAME_V1_ACCOUNT_H_ +#ifndef BALLISTICA_LOGIC_V1_ACCOUNT_H_ +#define BALLISTICA_LOGIC_V1_ACCOUNT_H_ #include #include @@ -63,4 +63,4 @@ class V1Account { } // namespace ballistica -#endif // BALLISTICA_GAME_V1_ACCOUNT_H_ +#endif // BALLISTICA_LOGIC_V1_ACCOUNT_H_ diff --git a/src/ballistica/networking/network_reader.cc b/src/ballistica/networking/network_reader.cc index 653a28c6..203afb4f 100644 --- a/src/ballistica/networking/network_reader.cc +++ b/src/ballistica/networking/network_reader.cc @@ -2,11 +2,11 @@ #include "ballistica/networking/network_reader.h" -#include "ballistica/game/connection/connection_set.h" -#include "ballistica/game/game.h" -#include "ballistica/game/player_spec.h" #include "ballistica/generic/json.h" #include "ballistica/input/remote_app.h" +#include "ballistica/logic/connection/connection_set.h" +#include "ballistica/logic/logic.h" +#include "ballistica/logic/player_spec.h" #include "ballistica/math/vector3f.h" #include "ballistica/networking/network_writer.h" #include "ballistica/networking/sockaddr.h" @@ -97,8 +97,8 @@ static auto HandleJSONPing(const std::string& data_str) -> std::string { int party_size = 0; int party_size_max = 10; if (g_python != nullptr) { - party_size = g_game->public_party_size(); - party_size_max = g_game->public_party_max_size(); + party_size = g_logic->public_party_size(); + party_size_max = g_logic->public_party_max_size(); } snprintf(buffer, sizeof(buffer), R"({"b":%d,"ps":%d,"psmx":%d})", kAppBuildNumber, party_size, party_size_max); @@ -110,7 +110,7 @@ static auto HandleGameQuery(const char* buffer, size_t size, if (size == 5) { // If we're already in a party, don't advertise since they // wouldn't be able to join us anyway. - if (g_game->connections()->has_connection_to_host()) { + if (g_logic->connections()->has_connection_to_host()) { return; } @@ -348,7 +348,7 @@ auto NetworkReader::RunThread() -> int { // connections.. pass them to the game thread to wrangle. std::vector msg_buffer(rresult2); memcpy(&(msg_buffer[0]), buffer, rresult2); - g_game->connections()->PushUDPConnectionPacketCall( + g_logic->connections()->PushUDPConnectionPacketCall( msg_buffer, SockAddr(from)); break; } diff --git a/src/ballistica/networking/networking.cc b/src/ballistica/networking/networking.cc index 1cfbcbf0..3aaca894 100644 --- a/src/ballistica/networking/networking.cc +++ b/src/ballistica/networking/networking.cc @@ -3,7 +3,7 @@ #include "ballistica/networking/networking.h" #include "ballistica/app/app.h" -#include "ballistica/game/player_spec.h" +#include "ballistica/logic/player_spec.h" #include "ballistica/networking/network_reader.h" #include "ballistica/networking/sockaddr.h" #include "ballistica/platform/platform.h" diff --git a/src/ballistica/networking/telnet_server.cc b/src/ballistica/networking/telnet_server.cc index 224afaca..91c430c1 100644 --- a/src/ballistica/networking/telnet_server.cc +++ b/src/ballistica/networking/telnet_server.cc @@ -5,7 +5,7 @@ #include "ballistica/app/app.h" #include "ballistica/core/context.h" #include "ballistica/core/thread.h" -#include "ballistica/game/game.h" +#include "ballistica/logic/logic.h" #include "ballistica/networking/networking.h" #include "ballistica/networking/networking_sys.h" #include "ballistica/platform/platform.h" @@ -106,16 +106,16 @@ auto TelnetServer::RunThread() -> int { } // If we dont have access and havnt asked the user for it yet, ask them. - if (!user_has_granted_access_ && g_game + if (!user_has_granted_access_ && g_logic && !have_asked_user_for_access_) { - g_game->PushAskUserForTelnetAccessCall(); + g_logic->PushAskUserForTelnetAccessCall(); have_asked_user_for_access_ = true; } // Require password for each connection if we have one reading_password_ = require_password_; - if (g_game) { + if (g_logic) { if (reading_password_) { PushPrint(password_prompt); } else { @@ -144,7 +144,7 @@ auto TelnetServer::RunThread() -> int { if (result > 1 && (buffer[result - 2] == '\r')) buffer[result - 2] = 0; } - if (g_game) { + if (g_logic) { if (user_has_granted_access_) { if (reading_password_) { if (GetRealTime() - last_try_time_ < 2000) { @@ -163,7 +163,7 @@ auto TelnetServer::RunThread() -> int { PushTelnetScriptCommand(buffer); } } else { - PushPrint(g_game->GetResourceString("telnetAccessDeniedText")); + PushPrint(g_logic->GetResourceString("telnetAccessDeniedText")); } } } @@ -185,13 +185,13 @@ auto TelnetServer::RunThread() -> int { #pragma clang diagnostic pop void TelnetServer::PushTelnetScriptCommand(const std::string& command) { - assert(g_game); - if (g_game == nullptr) { + assert(g_logic); + if (g_logic == nullptr) { return; } - g_game->thread()->PushCall([this, command] { + g_logic->thread()->PushCall([this, command] { // These are always run in whichever context is 'visible'. - ScopedSetContext cp(g_game->GetForegroundContext()); + ScopedSetContext cp(g_logic->GetForegroundContext()); if (!g_app->user_ran_commands) { g_app->user_ran_commands = true; } @@ -216,8 +216,8 @@ void TelnetServer::PushTelnetScriptCommand(const std::string& command) { } void TelnetServer::PushPrint(const std::string& s) { - assert(g_game); - g_game->thread()->PushCall([this, s] { Print(s); }); + assert(g_logic); + g_logic->thread()->PushCall([this, s] { Print(s); }); } void TelnetServer::Print(const std::string& s) { diff --git a/src/ballistica/platform/platform.cc b/src/ballistica/platform/platform.cc index 292355e0..8ce6ada9 100644 --- a/src/ballistica/platform/platform.cc +++ b/src/ballistica/platform/platform.cc @@ -22,14 +22,14 @@ #include "ballistica/app/app_flavor.h" #include "ballistica/core/thread.h" #include "ballistica/dynamics/bg/bg_dynamics_server.h" -#include "ballistica/game/friend_score_set.h" -#include "ballistica/game/game.h" #include "ballistica/generic/utils.h" #include "ballistica/graphics/camera.h" #include "ballistica/graphics/graphics.h" #include "ballistica/graphics/mesh/sprite_mesh.h" #include "ballistica/graphics/vr_graphics.h" #include "ballistica/input/input.h" +#include "ballistica/logic/friend_score_set.h" +#include "ballistica/logic/logic.h" #include "ballistica/networking/networking_sys.h" #include "ballistica/platform/sdl/sdl_app.h" #include "ballistica/platform/stdio_console.h" @@ -849,7 +849,7 @@ void Platform::GetFriendScores(const std::string& game, const std::string& game_version, void* data) { // As a default, just fail gracefully. Log("FIXME: GetFriendScores unimplemented"); - g_game->PushFriendScoreSetCall(FriendScoreSet(false, data)); + g_logic->PushFriendScoreSetCall(FriendScoreSet(false, data)); } void Platform::SubmitScore(const std::string& game, const std::string& version, @@ -940,7 +940,7 @@ void Platform::DrainAutoReleasePool(void* pool) { throw Exception(); } void Platform::OpenURL(const std::string& url) { // Can't open URLs in VR - just tell the game thread to show the url. if (IsVRMode()) { - g_game->PushShowURLCall(url); + g_logic->PushShowURLCall(url); return; } @@ -1277,10 +1277,10 @@ auto Platform::HavePermission(Permission p) -> bool { #if !BA_OSTYPE_WINDOWS static void HandleSIGINT(int s) { - if (g_game) { - g_game->PushInterruptSignalCall(); + if (g_logic) { + g_logic->PushInterruptSignalCall(); } else { - Log("SigInt handler called before g_game exists."); + Log("SigInt handler called before g_logic exists."); } } #endif diff --git a/src/ballistica/platform/sdl/sdl_app.cc b/src/ballistica/platform/sdl/sdl_app.cc index bda417c7..24801293 100644 --- a/src/ballistica/platform/sdl/sdl_app.cc +++ b/src/ballistica/platform/sdl/sdl_app.cc @@ -7,11 +7,11 @@ #include "ballistica/app/stress_test.h" #include "ballistica/core/thread.h" #include "ballistica/dynamics/bg/bg_dynamics.h" -#include "ballistica/game/game.h" #include "ballistica/graphics/gl/gl_sys.h" #include "ballistica/graphics/graphics_server.h" #include "ballistica/input/device/joystick.h" #include "ballistica/input/input.h" +#include "ballistica/logic/logic.h" #include "ballistica/platform/platform.h" #include "ballistica/python/python.h" @@ -155,7 +155,7 @@ void SDLApp::HandleSDLEvent(const SDL_Event& event) { #endif case SDL_QUIT: - g_game->PushShutdownCall(false); + g_logic->PushShutdownCall(false); break; #if BA_OSTYPE_MACOS && BA_XCODE_BUILD && !BA_HEADLESS_BUILD diff --git a/src/ballistica/platform/stdio_console.cc b/src/ballistica/platform/stdio_console.cc index 8b7b335b..e0882e65 100644 --- a/src/ballistica/platform/stdio_console.cc +++ b/src/ballistica/platform/stdio_console.cc @@ -8,7 +8,7 @@ #include "ballistica/app/app.h" #include "ballistica/core/thread.h" -#include "ballistica/game/game.h" +#include "ballistica/logic/logic.h" #include "ballistica/platform/platform.h" namespace ballistica { @@ -32,7 +32,7 @@ auto StdioConsole::OnAppStart() -> void { // We send this to the logic thread so it happens AFTER the // results of the last script-command message we may have just sent. if (stdin_is_terminal) { - g_game->thread()->PushCall([] { + g_logic->thread()->PushCall([] { if (!g_app->shutting_down) { printf(">>> "); fflush(stdout); @@ -53,7 +53,7 @@ auto StdioConsole::OnAppStart() -> void { && pending_input_[pending_input_.size() - 1] == '\n') { // Get rid of the last newline and ship it to the game. pending_input_.pop_back(); - g_game->PushStdinScriptCommand(pending_input_); + g_logic->PushStdinScriptCommand(pending_input_); pending_input_.clear(); } } else { diff --git a/src/ballistica/platform/windows/platform_windows.cc b/src/ballistica/platform/windows/platform_windows.cc index 04fb6233..9269f3ad 100644 --- a/src/ballistica/platform/windows/platform_windows.cc +++ b/src/ballistica/platform/windows/platform_windows.cc @@ -32,7 +32,7 @@ #pragma comment(lib, "SDL2main.lib") #endif -#include "ballistica/game/game.h" +#include "ballistica/logic/logic.h" #include "ballistica/networking/networking_sys.h" #include "ballistica/platform/min_sdl.h" @@ -108,10 +108,10 @@ PlatformWindows::PlatformWindows() { BOOL WINAPI CtrlHandler(DWORD fdwCtrlType) { switch (fdwCtrlType) { case CTRL_C_EVENT: - if (g_game) { - g_game->PushInterruptSignalCall(); + if (g_logic) { + g_logic->PushInterruptSignalCall(); } else { - Log("SigInt handler called before g_game exists."); + Log("SigInt handler called before g_logic exists."); } return TRUE; diff --git a/src/ballistica/python/class/python_class_activity_data.cc b/src/ballistica/python/class/python_class_activity_data.cc index 016a1a8b..b08927f9 100644 --- a/src/ballistica/python/class/python_class_activity_data.cc +++ b/src/ballistica/python/class/python_class_activity_data.cc @@ -3,10 +3,10 @@ #include "ballistica/python/class/python_class_activity_data.h" #include "ballistica/core/thread.h" -#include "ballistica/game/game.h" -#include "ballistica/game/host_activity.h" -#include "ballistica/game/session/host_session.h" #include "ballistica/generic/utils.h" +#include "ballistica/logic/host_activity.h" +#include "ballistica/logic/logic.h" +#include "ballistica/logic/session/host_session.h" #include "ballistica/python/python.h" namespace ballistica { @@ -85,7 +85,7 @@ void PythonClassActivityData::tp_dealloc(PythonClassActivityData* self) { // it if need be; otherwise do it immediately. if (!InLogicThread()) { Object::WeakRef* h = self->host_activity_; - g_game->thread()->PushCall([h] { delete h; }); + g_logic->thread()->PushCall([h] { delete h; }); } else { delete self->host_activity_; } diff --git a/src/ballistica/python/class/python_class_collide_model.cc b/src/ballistica/python/class/python_class_collide_model.cc index 7ca5e787..6616aadc 100644 --- a/src/ballistica/python/class/python_class_collide_model.cc +++ b/src/ballistica/python/class/python_class_collide_model.cc @@ -4,7 +4,7 @@ #include "ballistica/assets/component/collide_model.h" #include "ballistica/core/thread.h" -#include "ballistica/game/game.h" +#include "ballistica/logic/logic.h" #include "ballistica/python/python.h" namespace ballistica { @@ -105,7 +105,7 @@ void PythonClassCollideModel::tp_dealloc(PythonClassCollideModel* self) { // be; otherwise do it immediately if (!InLogicThread()) { Object::Ref* c = self->collide_model_; - g_game->thread()->PushCall([c] { Delete(c); }); + g_logic->thread()->PushCall([c] { Delete(c); }); } else { Delete(self->collide_model_); } diff --git a/src/ballistica/python/class/python_class_context.cc b/src/ballistica/python/class/python_class_context.cc index 09338be3..2b4c52ab 100644 --- a/src/ballistica/python/class/python_class_context.cc +++ b/src/ballistica/python/class/python_class_context.cc @@ -3,9 +3,9 @@ #include "ballistica/python/class/python_class_context.h" #include "ballistica/core/thread.h" -#include "ballistica/game/game.h" -#include "ballistica/game/host_activity.h" -#include "ballistica/game/session/host_session.h" +#include "ballistica/logic/host_activity.h" +#include "ballistica/logic/logic.h" +#include "ballistica/logic/session/host_session.h" #include "ballistica/python/python.h" #include "ballistica/ui/ui.h" @@ -145,11 +145,11 @@ auto PythonClassContext::tp_new(PyTypeObject* type, PyObject* args, if (Python::IsPyString(source_obj)) { std::string source = Python::GetPyString(source_obj); if (source == "ui") { - cs = Context(g_game->GetUIContextTarget()); + cs = Context(g_logic->GetUIContextTarget()); } else if (source == "UI") { BA_LOG_ONCE("'UI' context-target option is deprecated; please use 'ui'"); Python::PrintStackTrace(); - cs = Context(g_game->GetUIContextTarget()); + cs = Context(g_logic->GetUIContextTarget()); } else if (source == "current") { cs = Context::current(); } else if (source == "empty") { @@ -188,7 +188,7 @@ void PythonClassContext::tp_dealloc(PythonClassContext* self) { if (!InLogicThread()) { Context* c = self->context_; Context* c2 = self->context_prev_; - g_game->thread()->PushCall([c, c2] { + g_logic->thread()->PushCall([c, c2] { delete c; delete c2; }); diff --git a/src/ballistica/python/class/python_class_context_call.cc b/src/ballistica/python/class/python_class_context_call.cc index 9e5eac31..2aa433dc 100644 --- a/src/ballistica/python/class/python_class_context_call.cc +++ b/src/ballistica/python/class/python_class_context_call.cc @@ -3,7 +3,7 @@ #include "ballistica/python/class/python_class_context_call.h" #include "ballistica/core/thread.h" -#include "ballistica/game/game.h" +#include "ballistica/logic/logic.h" #include "ballistica/python/python.h" #include "ballistica/python/python_context_call.h" @@ -119,7 +119,7 @@ void PythonClassContextCall::tp_dealloc(PythonClassContextCall* self) { // be; otherwise do it immediately if (!InLogicThread()) { Object::Ref* c = self->context_call_; - g_game->thread()->PushCall([c] { delete c; }); + g_logic->thread()->PushCall([c] { delete c; }); } else { delete self->context_call_; } diff --git a/src/ballistica/python/class/python_class_data.cc b/src/ballistica/python/class/python_class_data.cc index 79bf242e..4f6584dc 100644 --- a/src/ballistica/python/class/python_class_data.cc +++ b/src/ballistica/python/class/python_class_data.cc @@ -4,7 +4,7 @@ #include "ballistica/assets/component/data.h" #include "ballistica/core/thread.h" -#include "ballistica/game/game.h" +#include "ballistica/logic/logic.h" #include "ballistica/python/python.h" namespace ballistica { @@ -102,7 +102,7 @@ void PythonClassData::tp_dealloc(PythonClassData* self) { // be; otherwise do it immediately if (!InLogicThread()) { Object::Ref* s = self->data_; - g_game->thread()->PushCall([s] { Delete(s); }); + g_logic->thread()->PushCall([s] { Delete(s); }); } else { Delete(self->data_); } diff --git a/src/ballistica/python/class/python_class_input_device.cc b/src/ballistica/python/class/python_class_input_device.cc index 38e04607..d9b6ecd6 100644 --- a/src/ballistica/python/class/python_class_input_device.cc +++ b/src/ballistica/python/class/python_class_input_device.cc @@ -3,8 +3,8 @@ #include "ballistica/python/class/python_class_input_device.h" #include "ballistica/core/thread.h" -#include "ballistica/game/player.h" #include "ballistica/input/device/input_device.h" +#include "ballistica/logic/player.h" #include "ballistica/python/python.h" namespace ballistica { @@ -143,7 +143,7 @@ void PythonClassInputDevice::tp_dealloc(PythonClassInputDevice* self) { // until the delete goes through; could that ever be a problem? if (!InLogicThread()) { Object::WeakRef* d = self->input_device_; - g_game->thread()->PushCall([d] { delete d; }); + g_logic->thread()->PushCall([d] { delete d; }); } else { delete self->input_device_; } diff --git a/src/ballistica/python/class/python_class_material.cc b/src/ballistica/python/class/python_class_material.cc index 2999279e..c1a049ad 100644 --- a/src/ballistica/python/class/python_class_material.cc +++ b/src/ballistica/python/class/python_class_material.cc @@ -15,8 +15,8 @@ #include "ballistica/dynamics/material/roll_sound_material_action.h" #include "ballistica/dynamics/material/skid_sound_material_action.h" #include "ballistica/dynamics/material/sound_material_action.h" -#include "ballistica/game/game.h" -#include "ballistica/game/host_activity.h" +#include "ballistica/logic/host_activity.h" +#include "ballistica/logic/logic.h" #include "ballistica/python/python.h" namespace ballistica { @@ -148,7 +148,7 @@ void PythonClassMaterial::tp_dealloc(PythonClassMaterial* self) { // need be.. otherwise do it immediately. if (!InLogicThread()) { Object::Ref* ptr = self->material_; - g_game->thread()->PushCall([ptr] { Delete(ptr); }); + g_logic->thread()->PushCall([ptr] { Delete(ptr); }); } else { Delete(self->material_); } diff --git a/src/ballistica/python/class/python_class_model.cc b/src/ballistica/python/class/python_class_model.cc index 5fd51ccc..7e0d637d 100644 --- a/src/ballistica/python/class/python_class_model.cc +++ b/src/ballistica/python/class/python_class_model.cc @@ -4,7 +4,7 @@ #include "ballistica/assets/component/model.h" #include "ballistica/core/thread.h" -#include "ballistica/game/game.h" +#include "ballistica/logic/logic.h" #include "ballistica/python/python.h" namespace ballistica { @@ -103,7 +103,7 @@ void PythonClassModel::tp_dealloc(PythonClassModel* self) { // be; otherwise do it immediately if (!InLogicThread()) { Object::Ref* m = self->model_; - g_game->thread()->PushCall([m] { Delete(m); }); + g_logic->thread()->PushCall([m] { Delete(m); }); } else { Delete(self->model_); } diff --git a/src/ballistica/python/class/python_class_node.cc b/src/ballistica/python/class/python_class_node.cc index b6f11427..ef4b67ed 100644 --- a/src/ballistica/python/class/python_class_node.cc +++ b/src/ballistica/python/class/python_class_node.cc @@ -114,7 +114,7 @@ void PythonClassNode::tp_dealloc(PythonClassNode* self) { // be; otherwise do it immediately. if (!InLogicThread()) { Object::WeakRef* n = self->node_; - g_game->thread()->PushCall([n] { delete n; }); + g_logic->thread()->PushCall([n] { delete n; }); } else { delete self->node_; } diff --git a/src/ballistica/python/class/python_class_session_data.cc b/src/ballistica/python/class/python_class_session_data.cc index ec97ae43..db534145 100644 --- a/src/ballistica/python/class/python_class_session_data.cc +++ b/src/ballistica/python/class/python_class_session_data.cc @@ -3,9 +3,9 @@ #include "ballistica/python/class/python_class_session_data.h" #include "ballistica/core/thread.h" -#include "ballistica/game/game.h" -#include "ballistica/game/session/session.h" #include "ballistica/generic/utils.h" +#include "ballistica/logic/logic.h" +#include "ballistica/logic/session/session.h" #include "ballistica/python/python.h" namespace ballistica { @@ -83,7 +83,7 @@ void PythonClassSessionData::tp_dealloc(PythonClassSessionData* self) { // until the delete goes through; could that ever be a problem? if (!InLogicThread()) { Object::WeakRef* s = self->session_; - g_game->thread()->PushCall([s] { delete s; }); + g_logic->thread()->PushCall([s] { delete s; }); } else { delete self->session_; } diff --git a/src/ballistica/python/class/python_class_session_player.cc b/src/ballistica/python/class/python_class_session_player.cc index 2c3a7ffc..9e92af8f 100644 --- a/src/ballistica/python/class/python_class_session_player.cc +++ b/src/ballistica/python/class/python_class_session_player.cc @@ -3,10 +3,10 @@ #include "ballistica/python/class/python_class_session_player.h" #include "ballistica/core/thread.h" -#include "ballistica/game/host_activity.h" -#include "ballistica/game/player.h" -#include "ballistica/game/session/host_session.h" #include "ballistica/input/device/input_device.h" +#include "ballistica/logic/host_activity.h" +#include "ballistica/logic/player.h" +#include "ballistica/logic/session/host_session.h" #include "ballistica/python/python.h" namespace ballistica { @@ -188,7 +188,7 @@ void PythonClassSessionPlayer::tp_dealloc(PythonClassSessionPlayer* self) { // be; otherwise do it immediately. if (!InLogicThread()) { Object::WeakRef* p = self->player_; - g_game->thread()->PushCall([p] { delete p; }); + g_logic->thread()->PushCall([p] { delete p; }); } else { delete self->player_; } diff --git a/src/ballistica/python/class/python_class_sound.cc b/src/ballistica/python/class/python_class_sound.cc index 5025c3a6..59491749 100644 --- a/src/ballistica/python/class/python_class_sound.cc +++ b/src/ballistica/python/class/python_class_sound.cc @@ -4,7 +4,7 @@ #include "ballistica/assets/component/sound.h" #include "ballistica/core/thread.h" -#include "ballistica/game/game.h" +#include "ballistica/logic/logic.h" #include "ballistica/python/python.h" namespace ballistica { @@ -102,7 +102,7 @@ void PythonClassSound::tp_dealloc(PythonClassSound* self) { // be; otherwise do it immediately if (!InLogicThread()) { Object::Ref* s = self->sound_; - g_game->thread()->PushCall([s] { Delete(s); }); + g_logic->thread()->PushCall([s] { Delete(s); }); } else { Delete(self->sound_); } diff --git a/src/ballistica/python/class/python_class_texture.cc b/src/ballistica/python/class/python_class_texture.cc index aeb27dda..33d13cd4 100644 --- a/src/ballistica/python/class/python_class_texture.cc +++ b/src/ballistica/python/class/python_class_texture.cc @@ -4,7 +4,7 @@ #include "ballistica/assets/component/texture.h" #include "ballistica/core/thread.h" -#include "ballistica/game/game.h" +#include "ballistica/logic/logic.h" #include "ballistica/python/python.h" namespace ballistica { @@ -95,7 +95,7 @@ void PythonClassTexture::tp_dealloc(PythonClassTexture* self) { // be; otherwise do it immediately. if (!InLogicThread()) { Object::Ref* t = self->texture_; - g_game->thread()->PushCall([t] { Delete(t); }); + g_logic->thread()->PushCall([t] { Delete(t); }); } else { Delete(self->texture_); } diff --git a/src/ballistica/python/class/python_class_timer.cc b/src/ballistica/python/class/python_class_timer.cc index 8a53687d..ac553819 100644 --- a/src/ballistica/python/class/python_class_timer.cc +++ b/src/ballistica/python/class/python_class_timer.cc @@ -3,7 +3,7 @@ #include "ballistica/python/class/python_class_timer.h" #include "ballistica/core/thread.h" -#include "ballistica/game/game.h" +#include "ballistica/logic/logic.h" #include "ballistica/python/python_context_call_runnable.h" namespace ballistica { @@ -167,7 +167,7 @@ void PythonClassTimer::tp_dealloc(PythonClassTimer* self) { auto a1 = self->time_type_; auto a2 = self->timer_id_; auto a3 = self->context_; - g_game->thread()->PushCall( + g_logic->thread()->PushCall( [a0, a1, a2, a3] { PythonClassTimer::DoDelete(a0, a1, a2, a3); }); } else { DoDelete(self->have_timer_, self->time_type_, self->timer_id_, diff --git a/src/ballistica/python/class/python_class_widget.cc b/src/ballistica/python/class/python_class_widget.cc index cf8e0a07..8ebf2b39 100644 --- a/src/ballistica/python/class/python_class_widget.cc +++ b/src/ballistica/python/class/python_class_widget.cc @@ -3,9 +3,9 @@ #include "ballistica/python/class/python_class_widget.h" #include "ballistica/core/thread.h" -#include "ballistica/game/game.h" #include "ballistica/generic/utils.h" #include "ballistica/graphics/graphics.h" +#include "ballistica/logic/logic.h" #include "ballistica/python/python.h" #include "ballistica/ui/widget/container_widget.h" @@ -93,7 +93,7 @@ void PythonClassWidget::tp_dealloc(PythonClassWidget* self) { // need be if (!InLogicThread()) { Object::WeakRef* w = self->widget_; - g_game->thread()->PushCall([w] { delete w; }); + g_logic->thread()->PushCall([w] { delete w; }); } else { delete self->widget_; } diff --git a/src/ballistica/python/methods/python_methods_app.cc b/src/ballistica/python/methods/python_methods_app.cc index 4f12a15a..54a10daf 100644 --- a/src/ballistica/python/methods/python_methods_app.cc +++ b/src/ballistica/python/methods/python_methods_app.cc @@ -6,11 +6,11 @@ #include "ballistica/app/app_flavor.h" #include "ballistica/assets/component/texture.h" #include "ballistica/core/logging.h" -#include "ballistica/game/connection/connection_set.h" -#include "ballistica/game/host_activity.h" -#include "ballistica/game/session/host_session.h" -#include "ballistica/game/session/replay_client_session.h" #include "ballistica/graphics/graphics.h" +#include "ballistica/logic/connection/connection_set.h" +#include "ballistica/logic/host_activity.h" +#include "ballistica/logic/session/host_session.h" +#include "ballistica/logic/session/replay_client_session.h" #include "ballistica/python/class/python_class_activity_data.h" #include "ballistica/python/class/python_class_session_data.h" #include "ballistica/python/python.h" @@ -107,7 +107,7 @@ auto PyNewHostSession(PyObject* self, PyObject* args, PyObject* keywds) PyExcType::kValue); } } - g_game->LaunchHostSession(sessiontype_obj, benchmark_type); + g_logic->LaunchHostSession(sessiontype_obj, benchmark_type); Py_RETURN_NONE; BA_PYTHON_CATCH; } @@ -123,7 +123,7 @@ auto PyNewReplaySession(PyObject* self, PyObject* args, PyObject* keywds) return nullptr; } file_name = Python::GetPyString(file_name_obj); - g_game->LaunchReplaySession(file_name); + g_logic->LaunchReplaySession(file_name); Py_RETURN_NONE; BA_PYTHON_CATCH; } @@ -137,7 +137,7 @@ auto PyIsInReplay(PyObject* self, PyObject* args, PyObject* keywds) const_cast(kwlist))) { return nullptr; } - if (dynamic_cast(g_game->GetForegroundSession())) { + if (dynamic_cast(g_logic->GetForegroundSession())) { Py_RETURN_TRUE; } else { Py_RETURN_FALSE; @@ -199,7 +199,7 @@ auto PyGetForegroundHostSession(PyObject* self, PyObject* args, // Note: we return None if not in the game thread. HostSession* s = InLogicThread() - ? g_game->GetForegroundContext().GetHostSession() + ? g_logic->GetForegroundContext().GetHostSession() : nullptr; if (s != nullptr) { PyObject* obj = s->GetSessionPyObj(); @@ -303,12 +303,12 @@ auto PyPushCall(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { // just increment the python object's refcount and pass it along raw; // the game thread decrements it on the other end. Py_INCREF(call_obj); - g_game->PushPythonRawCallable(call_obj); + g_logic->PushPythonRawCallable(call_obj); } else { if (!InLogicThread()) { throw Exception("You must use from_other_thread mode."); } - g_game->PushPythonCall(Object::New(call_obj)); + g_logic->PushPythonCall(Object::New(call_obj)); } Py_RETURN_NONE; BA_PYTHON_CATCH; @@ -483,11 +483,11 @@ auto PyScreenMessage(PyObject* self, PyObject* args, PyObject* keywds) std::vector client_ids; if (clients_obj != Py_None) { std::vector client_ids2 = Python::GetPyInts(clients_obj); - g_game->connections()->SendScreenMessageToSpecificClients( + g_logic->connections()->SendScreenMessageToSpecificClients( message, color.x, color.y, color.z, client_ids2); } else { - g_game->connections()->SendScreenMessageToAll(message, color.x, color.y, - color.z); + g_logic->connections()->SendScreenMessageToAll(message, color.x, color.y, + color.z); } } else { // Currently specifying client_ids only works for transient messages; we'd @@ -610,7 +610,7 @@ auto PyQuit(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { } } if (!handled) { - g_game->PushShutdownCall(false); + g_logic->PushShutdownCall(false); } Py_RETURN_NONE; BA_PYTHON_CATCH; @@ -630,7 +630,7 @@ auto PyApplyConfig(PyObject* self, PyObject* args) -> PyObject* { // Hmm; python runs in the game thread; technically we could just run // ApplyConfig() immediately (though pushing is probably safer). - g_game->PushApplyConfigCall(); + g_logic->PushApplyConfigCall(); Py_RETURN_NONE; BA_PYTHON_CATCH; } diff --git a/src/ballistica/python/methods/python_methods_assets.cc b/src/ballistica/python/methods/python_methods_assets.cc index cc516ffe..0eb9ba88 100644 --- a/src/ballistica/python/methods/python_methods_assets.cc +++ b/src/ballistica/python/methods/python_methods_assets.cc @@ -12,8 +12,8 @@ #include "ballistica/assets/component/model.h" #include "ballistica/assets/component/sound.h" #include "ballistica/assets/component/texture.h" -#include "ballistica/game/host_activity.h" #include "ballistica/graphics/graphics_server.h" +#include "ballistica/logic/host_activity.h" #include "ballistica/python/python.h" #include "ballistica/python/python_sys.h" #include "ballistica/ui/ui.h" diff --git a/src/ballistica/python/methods/python_methods_gameplay.cc b/src/ballistica/python/methods/python_methods_gameplay.cc index aabcf0d2..4ba23115 100644 --- a/src/ballistica/python/methods/python_methods_gameplay.cc +++ b/src/ballistica/python/methods/python_methods_gameplay.cc @@ -10,13 +10,13 @@ #include "ballistica/dynamics/collision.h" #include "ballistica/dynamics/dynamics.h" #include "ballistica/dynamics/material/material_action.h" -#include "ballistica/game/connection/connection_set.h" -#include "ballistica/game/connection/connection_to_client.h" -#include "ballistica/game/host_activity.h" #include "ballistica/generic/json.h" #include "ballistica/graphics/graphics.h" #include "ballistica/input/device/input_device.h" #include "ballistica/internal/app_internal.h" +#include "ballistica/logic/connection/connection_set.h" +#include "ballistica/logic/connection/connection_to_client.h" +#include "ballistica/logic/host_activity.h" #include "ballistica/platform/platform.h" #include "ballistica/python/python.h" #include "ballistica/python/python_context_call_runnable.h" @@ -45,7 +45,7 @@ auto PyNewNode(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { auto PyPrintNodes(PyObject* self, PyObject* args) -> PyObject* { BA_PYTHON_TRY; HostActivity* host_activity = - g_game->GetForegroundContext().GetHostActivity(); + g_logic->GetForegroundContext().GetHostActivity(); if (!host_activity) { throw Exception(PyExcType::kContext); } @@ -383,7 +383,7 @@ auto PyGetForegroundHostActivity(PyObject* self, PyObject* args, // Note: we return None if not in the game thread. HostActivity* h = InLogicThread() - ? g_game->GetForegroundContext().GetHostActivity() + ? g_logic->GetForegroundContext().GetHostActivity() : nullptr; if (h != nullptr) { PyObject* obj = h->GetPyActivity(); @@ -404,7 +404,7 @@ auto PyGetGameRoster(PyObject* self, PyObject* args, PyObject* keywds) return nullptr; } PythonRef py_client_list(PyList_New(0), PythonRef::kSteal); - cJSON* party = g_game->game_roster(); + cJSON* party = g_logic->game_roster(); assert(party); int len = cJSON_GetArraySize(party); for (int i = 0; i < len; i++) { @@ -458,8 +458,8 @@ auto PyGetGameRoster(PyObject* self, PyObject* args, PyObject* keywds) account_id = g_app_internal->GetPublicV1AccountID(); } else { auto client2 = - g_game->connections()->connections_to_clients().find(clientid); - if (client2 != g_game->connections()->connections_to_clients().end()) { + g_logic->connections()->connections_to_clients().find(clientid); + if (client2 != g_logic->connections()->connections_to_clients().end()) { account_id = client2->second->peer_public_account_id(); } } @@ -500,7 +500,7 @@ auto PySetDebugSpeedExponent(PyObject* self, PyObject* args) -> PyObject* { throw Exception(PyExcType::kContext); } #if BA_DEBUG_BUILD - g_game->SetDebugSpeedExponent(speed); + g_logic->SetDebugSpeedExponent(speed); #else throw Exception("This call only functions in the debug build."); #endif @@ -510,8 +510,8 @@ auto PySetDebugSpeedExponent(PyObject* self, PyObject* args) -> PyObject* { auto PyGetReplaySpeedExponent(PyObject* self, PyObject* args) -> PyObject* { BA_PYTHON_TRY; - assert(g_game); - return PyLong_FromLong(g_game->replay_speed_exponent()); + assert(g_logic); + return PyLong_FromLong(g_logic->replay_speed_exponent()); BA_PYTHON_CATCH; } @@ -519,8 +519,8 @@ auto PySetReplaySpeedExponent(PyObject* self, PyObject* args) -> PyObject* { BA_PYTHON_TRY; int speed; if (!PyArg_ParseTuple(args, "i", &speed)) return nullptr; - assert(g_game); - g_game->SetReplaySpeedExponent(speed); + assert(g_logic); + g_logic->SetReplaySpeedExponent(speed); Py_RETURN_NONE; BA_PYTHON_CATCH; } @@ -533,8 +533,8 @@ auto PyResetGameActivityTracking(PyObject* self, PyObject* args, const_cast(kwlist))) { return nullptr; } - if (g_game) { - g_game->ResetActivityTracking(); + if (g_logic) { + g_logic->ResetActivityTracking(); } Py_RETURN_NONE; BA_PYTHON_CATCH; diff --git a/src/ballistica/python/methods/python_methods_graphics.cc b/src/ballistica/python/methods/python_methods_graphics.cc index 87f72ca9..0e59a559 100644 --- a/src/ballistica/python/methods/python_methods_graphics.cc +++ b/src/ballistica/python/methods/python_methods_graphics.cc @@ -2,10 +2,10 @@ #include "ballistica/python/methods/python_methods_graphics.h" -#include "ballistica/game/game.h" #include "ballistica/graphics/camera.h" #include "ballistica/graphics/graphics.h" #include "ballistica/graphics/text/text_graphics.h" +#include "ballistica/logic/logic.h" #include "ballistica/platform/platform.h" #include "ballistica/python/python.h" #include "ballistica/python/python_context_call_runnable.h" @@ -52,7 +52,7 @@ auto PySetCameraPosition(PyObject* self, PyObject* args, PyObject* keywds) const_cast(kwlist), &x, &y, &z)) { return nullptr; } - assert(g_game); + assert(g_logic); g_graphics->camera()->SetPosition(x, y, z); Py_RETURN_NONE; BA_PYTHON_CATCH; @@ -69,7 +69,7 @@ auto PySetCameraTarget(PyObject* self, PyObject* args, PyObject* keywds) const_cast(kwlist), &x, &y, &z)) { return nullptr; } - assert(g_game); + assert(g_logic); g_graphics->camera()->SetTarget(x, y, z); Py_RETURN_NONE; BA_PYTHON_CATCH; @@ -84,7 +84,7 @@ auto PySetCameraManual(PyObject* self, PyObject* args, PyObject* keywds) const_cast(kwlist), &value)) { return nullptr; } - assert(g_game); + assert(g_logic); g_graphics->camera()->SetManual(value); Py_RETURN_NONE; BA_PYTHON_CATCH; @@ -98,10 +98,10 @@ auto PyCharStr(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { const_cast(kwlist), &name_obj)) { return nullptr; } - assert(g_game); + assert(g_logic); auto id(Python::GetPyEnum_SpecialChar(name_obj)); - assert(Utils::IsValidUTF8(g_game->CharStr(id))); - return PyUnicode_FromString(g_game->CharStr(id).c_str()); + assert(Utils::IsValidUTF8(g_logic->CharStr(id))); + return PyUnicode_FromString(g_logic->CharStr(id).c_str()); BA_PYTHON_CATCH; } @@ -164,7 +164,7 @@ auto PyEvaluateLstr(PyObject* self, PyObject* args, PyObject* keywds) return nullptr; } return PyUnicode_FromString( - g_game->CompileResourceString(value, "evaluate_lstr").c_str()); + g_logic->CompileResourceString(value, "evaluate_lstr").c_str()); BA_PYTHON_CATCH; } @@ -188,7 +188,7 @@ auto PyGetStringHeight(PyObject* self, PyObject* args, PyObject* keywds) } s = Python::GetPyString(s_obj); #if BA_DEBUG_BUILD - if (g_game->CompileResourceString(s, "get_string_height test") != s) { + if (g_logic->CompileResourceString(s, "get_string_height test") != s) { BA_LOG_PYTHON_TRACE( "resource-string passed to get_string_height; this should be avoided"); } @@ -218,7 +218,7 @@ auto PyGetStringWidth(PyObject* self, PyObject* args, PyObject* keywds) } s = Python::GetPyString(s_obj); #if BA_DEBUG_BUILD - if (g_game->CompileResourceString(s, "get_string_width debug test") != s) { + if (g_logic->CompileResourceString(s, "get_string_width debug test") != s) { BA_LOG_PYTHON_TRACE( "resource-string passed to get_string_width; this should be avoided"); } diff --git a/src/ballistica/python/methods/python_methods_input.cc b/src/ballistica/python/methods/python_methods_input.cc index c03bf5b4..8f1cde34 100644 --- a/src/ballistica/python/methods/python_methods_input.cc +++ b/src/ballistica/python/methods/python_methods_input.cc @@ -3,10 +3,10 @@ #include "ballistica/python/methods/python_methods_input.h" #include "ballistica/app/app.h" -#include "ballistica/game/game.h" #include "ballistica/input/device/input_device.h" #include "ballistica/input/device/touch_input.h" #include "ballistica/input/input.h" +#include "ballistica/logic/logic.h" #include "ballistica/platform/platform.h" #include "ballistica/python/python.h" #include "ballistica/python/python_sys.h" diff --git a/src/ballistica/python/methods/python_methods_networking.cc b/src/ballistica/python/methods/python_methods_networking.cc index 8066dfd5..27eb5a2d 100644 --- a/src/ballistica/python/methods/python_methods_networking.cc +++ b/src/ballistica/python/methods/python_methods_networking.cc @@ -3,10 +3,10 @@ #include "ballistica/python/methods/python_methods_networking.h" #include "ballistica/app/app.h" -#include "ballistica/game/connection/connection_set.h" -#include "ballistica/game/connection/connection_to_client.h" -#include "ballistica/game/connection/connection_to_host.h" -#include "ballistica/game/game.h" +#include "ballistica/logic/connection/connection_set.h" +#include "ballistica/logic/connection/connection_to_client.h" +#include "ballistica/logic/connection/connection_to_host.h" +#include "ballistica/logic/logic.h" #include "ballistica/math/vector3f.h" #include "ballistica/networking/network_reader.h" #include "ballistica/networking/networking.h" @@ -30,7 +30,7 @@ auto PyGetPublicPartyEnabled(PyObject* self, PyObject* args, PyObject* keywds) const_cast(kwlist))) return nullptr; assert(g_python); - if (g_game->public_party_enabled()) { + if (g_logic->public_party_enabled()) { Py_RETURN_TRUE; } else { Py_RETURN_FALSE; @@ -48,7 +48,7 @@ auto PySetPublicPartyEnabled(PyObject* self, PyObject* args, PyObject* keywds) return nullptr; } assert(g_python); - g_game->SetPublicPartyEnabled(static_cast(enable)); + g_logic->SetPublicPartyEnabled(static_cast(enable)); Py_RETURN_NONE; BA_PYTHON_CATCH; } @@ -64,7 +64,7 @@ auto PySetPublicPartyName(PyObject* self, PyObject* args, PyObject* keywds) } std::string name = Python::GetPyString(name_obj); assert(g_python); - g_game->SetPublicPartyName(name); + g_logic->SetPublicPartyName(name); Py_RETURN_NONE; BA_PYTHON_CATCH; } @@ -81,7 +81,7 @@ auto PySetPublicPartyStatsURL(PyObject* self, PyObject* args, PyObject* keywds) // The call expects an empty string for the no-url option. std::string url = (url_obj == Py_None) ? "" : Python::GetPyString(url_obj); assert(g_python); - g_game->SetPublicPartyStatsURL(url); + g_logic->SetPublicPartyStatsURL(url); Py_RETURN_NONE; BA_PYTHON_CATCH; } @@ -95,7 +95,7 @@ auto PyGetPublicPartyMaxSize(PyObject* self, PyObject* args, PyObject* keywds) return nullptr; } assert(g_python); - return PyLong_FromLong(g_game->public_party_max_size()); + return PyLong_FromLong(g_logic->public_party_max_size()); BA_PYTHON_CATCH; } @@ -109,7 +109,7 @@ auto PySetPublicPartyMaxSize(PyObject* self, PyObject* args, PyObject* keywds) return nullptr; } assert(g_python); - g_game->SetPublicPartyMaxSize(max_size); + g_logic->SetPublicPartyMaxSize(max_size); Py_RETURN_NONE; BA_PYTHON_CATCH; } @@ -123,8 +123,8 @@ auto PySetAuthenticateClients(PyObject* self, PyObject* args, PyObject* keywds) const_cast(kwlist), &enable)) { return nullptr; } - assert(g_game); - g_game->set_require_client_authentication(static_cast(enable)); + assert(g_logic); + g_logic->set_require_client_authentication(static_cast(enable)); Py_RETURN_NONE; BA_PYTHON_CATCH; } @@ -138,14 +138,14 @@ auto PySetAdmins(PyObject* self, PyObject* args, PyObject* keywds) const_cast(kwlist), &admins_obj)) { return nullptr; } - assert(g_game); + assert(g_logic); auto admins = Python::GetPyStrings(admins_obj); std::set adminset; for (auto&& admin : admins) { adminset.insert(admin); } - g_game->set_admin_public_ids(adminset); + g_logic->set_admin_public_ids(adminset); Py_RETURN_NONE; BA_PYTHON_CATCH; @@ -160,8 +160,8 @@ auto PySetEnableDefaultKickVoting(PyObject* self, PyObject* args, const_cast(kwlist), &enable)) { return nullptr; } - assert(g_game); - g_game->set_kick_voting_enabled(static_cast(enable)); + assert(g_logic); + g_logic->set_kick_voting_enabled(static_cast(enable)); Py_RETURN_NONE; BA_PYTHON_CATCH; } @@ -202,11 +202,11 @@ auto PyConnectToParty(PyObject* self, PyObject* args, PyObject* keywds) throw Exception(); } } catch (const std::exception&) { - ScreenMessage(g_game->GetResourceString("invalidAddressErrorText"), + ScreenMessage(g_logic->GetResourceString("invalidAddressErrorText"), {1, 0, 0}); Py_RETURN_NONE; } - g_game->connections()->PushHostConnectedUDPCall( + g_logic->connections()->PushHostConnectedUDPCall( s, static_cast(print_progress)); Py_RETURN_NONE; BA_PYTHON_CATCH; @@ -223,7 +223,7 @@ auto PyClientInfoQueryResponse(PyObject* self, PyObject* args, PyObject* keywds) &response_obj)) { return nullptr; } - g_game->connections()->SetClientInfoFromMasterServer(token, response_obj); + g_logic->connections()->SetClientInfoFromMasterServer(token, response_obj); Py_RETURN_NONE; BA_PYTHON_CATCH; } @@ -236,7 +236,7 @@ auto PyGetConnectionToHostInfo(PyObject* self, PyObject* args, PyObject* keywds) const_cast(kwlist))) { return nullptr; } - ConnectionToHost* hc = g_game->connections()->connection_to_host(); + ConnectionToHost* hc = g_logic->connections()->connection_to_host(); if (hc) { return Py_BuildValue("{sssi}", "name", hc->party_name().c_str(), "build_number", hc->build_number()); @@ -255,7 +255,7 @@ auto PyDisconnectFromHost(PyObject* self, PyObject* args, PyObject* keywds) const_cast(kwlist))) { return nullptr; } - g_game->connections()->PushDisconnectFromHostCall(); + g_logic->connections()->PushDisconnectFromHostCall(); Py_RETURN_NONE; BA_PYTHON_CATCH; } @@ -271,7 +271,7 @@ auto PyDisconnectClient(PyObject* self, PyObject* args, PyObject* keywds) &ban_time)) { return nullptr; } - bool kickable = g_game->connections()->DisconnectClient(client_id, ban_time); + bool kickable = g_logic->connections()->DisconnectClient(client_id, ban_time); if (kickable) { Py_RETURN_TRUE; } else { @@ -290,10 +290,10 @@ auto PyGetClientPublicDeviceUUID(PyObject* self, PyObject* args, return nullptr; } auto&& connection{ - g_game->connections()->connections_to_clients().find(client_id)}; + g_logic->connections()->connections_to_clients().find(client_id)}; // Does this connection exist? - if (connection == g_game->connections()->connections_to_clients().end()) { + if (connection == g_logic->connections()->connections_to_clients().end()) { Py_RETURN_NONE; } @@ -379,7 +379,7 @@ auto PyEndHostScanning(PyObject* self, PyObject* args, PyObject* keywds) auto PyHaveConnectedClients(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { BA_PYTHON_TRY; - if (g_game->connections()->GetConnectedClientCount() > 0) { + if (g_logic->connections()->GetConnectedClientCount() > 0) { Py_RETURN_TRUE; } else { Py_RETURN_FALSE; diff --git a/src/ballistica/python/methods/python_methods_system.cc b/src/ballistica/python/methods/python_methods_system.cc index aac12fa6..7b593c8f 100644 --- a/src/ballistica/python/methods/python_methods_system.cc +++ b/src/ballistica/python/methods/python_methods_system.cc @@ -10,12 +10,12 @@ #include "ballistica/app/app_flavor.h" #include "ballistica/assets/assets.h" #include "ballistica/assets/component/texture.h" -#include "ballistica/game/host_activity.h" -#include "ballistica/game/session/host_session.h" -#include "ballistica/game/session/replay_client_session.h" #include "ballistica/graphics/camera.h" #include "ballistica/graphics/graphics.h" #include "ballistica/input/input.h" +#include "ballistica/logic/host_activity.h" +#include "ballistica/logic/session/host_session.h" +#include "ballistica/logic/session/replay_client_session.h" #include "ballistica/python/python.h" #include "ballistica/python/python_context_call_runnable.h" #include "ballistica/python/python_sys.h" @@ -652,8 +652,8 @@ auto PySetInternalLanguageKeys(PyObject* self, PyObject* args) -> PyObject* { random_names.emplace_back(PyUnicode_AsUTF8(entry)); } Utils::SetRandomNameList(random_names); - assert(g_game); - g_game->SetLanguageKeys(language); + assert(g_logic); + g_logic->SetLanguageKeys(language); Py_RETURN_NONE; BA_PYTHON_CATCH; } diff --git a/src/ballistica/python/methods/python_methods_ui.cc b/src/ballistica/python/methods/python_methods_ui.cc index d249b519..f5a7a6cc 100644 --- a/src/ballistica/python/methods/python_methods_ui.cc +++ b/src/ballistica/python/methods/python_methods_ui.cc @@ -4,11 +4,11 @@ #include "ballistica/app/app.h" #include "ballistica/app/app_flavor.h" -#include "ballistica/game/connection/connection_set.h" -#include "ballistica/game/game.h" -#include "ballistica/game/v1_account.h" #include "ballistica/input/input.h" #include "ballistica/internal/app_internal.h" +#include "ballistica/logic/connection/connection_set.h" +#include "ballistica/logic/logic.h" +#include "ballistica/logic/v1_account.h" #include "ballistica/python/python.h" #include "ballistica/python/python_sys.h" #include "ballistica/ui/root_ui.h" @@ -130,12 +130,12 @@ auto PyButtonWidget(PyObject* self, PyObject* args, PyObject* keywds) &text_res_scale_obj, &enabled_obj)) return nullptr; - if (!g_game->IsInUIContext()) { + if (!g_logic->IsInUIContext()) { throw Exception( "This must be called within the UI context (see ba.Context docs)", PyExcType::kContext); } - ScopedSetContext cp(g_game->GetUIContextTarget()); + ScopedSetContext cp(g_logic->GetUIContextTarget()); // grab the edited widget or create a new one --------------------- Object::Ref b; @@ -381,12 +381,12 @@ auto PyCheckBoxWidget(PyObject* self, PyObject* args, PyObject* keywds) return nullptr; } - if (!g_game->IsInUIContext()) { + if (!g_logic->IsInUIContext()) { throw Exception( "This must be called within the UI context (see ba.Context docs).", PyExcType::kContext); } - ScopedSetContext cp(g_game->GetUIContextTarget()); + ScopedSetContext cp(g_logic->GetUIContextTarget()); // grab the edited widget or create a new one --------------------- Object::Ref widget; @@ -525,12 +525,12 @@ auto PyImageWidget(PyObject* self, PyObject* args, PyObject* keywds) &tilt_scale_obj, &mask_texture_obj, &radial_amount_obj)) return nullptr; - if (!g_game->IsInUIContext()) { + if (!g_logic->IsInUIContext()) { throw Exception( "This must be called within the UI context (see ba.Context docs).", PyExcType::kContext); } - ScopedSetContext cp(g_game->GetUIContextTarget()); + ScopedSetContext cp(g_logic->GetUIContextTarget()); // grab the edited widget or create a new one --------------------- Object::Ref b; @@ -681,15 +681,15 @@ auto PyColumnWidget(PyObject* self, PyObject* args, PyObject* keywds) &margin_obj, &claims_left_right_obj, &claims_tab_obj)) return nullptr; - if (!g_game->IsInUIContext()) { + if (!g_logic->IsInUIContext()) { throw Exception( "This must be called within the UI context (see ba.Context " "docs).", PyExcType::kContext); } - // if (!g_game->IsInUIContext()) { BA_LOG_PYTHON_TRACE("ERROR: This should be + // if (!g_logic->IsInUIContext()) { BA_LOG_PYTHON_TRACE("ERROR: This should be // called within the UI context (see ba.Context docs)");} - ScopedSetContext cp(g_game->GetUIContextTarget()); + ScopedSetContext cp(g_logic->GetUIContextTarget()); // grab the edited widget or create a new one --------------------- Object::Ref widget; @@ -859,11 +859,11 @@ auto PyContainerWidget(PyObject* self, PyObject* args, PyObject* keywds) return nullptr; } - if (!g_game->IsInUIContext()) + if (!g_logic->IsInUIContext()) throw Exception( "This must be called within the UI context (see ba.Context docs).", PyExcType::kContext); - ScopedSetContext cp(g_game->GetUIContextTarget()); + ScopedSetContext cp(g_logic->GetUIContextTarget()); // grab the edited widget or create a new one --------------------- Object::Ref widget; @@ -1080,13 +1080,13 @@ auto PyRowWidget(PyObject* /* self */, PyObject* args, PyObject* keywds) &claims_tab_obj, &selection_loops_to_parent_obj)) return nullptr; - if (!g_game->IsInUIContext()) + if (!g_logic->IsInUIContext()) throw Exception( "This must be called within the UI context (see ba.Context docs).", PyExcType::kContext); // Called within the UI context (see ba.Context docs)");} - ScopedSetContext cp(g_game->GetUIContextTarget()); + ScopedSetContext cp(g_logic->GetUIContextTarget()); // Grab the edited widget or create a new one. Object::Ref widget; @@ -1202,12 +1202,12 @@ auto PyScrollWidget(PyObject* self, PyObject* args, PyObject* keywds) &claims_up_down_obj, &claims_tab_obj, &autoselect_obj)) return nullptr; - if (!g_game->IsInUIContext()) { + if (!g_logic->IsInUIContext()) { throw Exception( "This must be called within the UI context (see ba.Context docs).", PyExcType::kContext); } - ScopedSetContext cp(g_game->GetUIContextTarget()); + ScopedSetContext cp(g_logic->GetUIContextTarget()); // Grab the edited widget or create a new one. --------------------- Object::Ref widget; @@ -1348,12 +1348,12 @@ auto PyHScrollWidget(PyObject* self, PyObject* args, PyObject* keywds) &claims_up_down_obj, &claims_tab_obj, &autoselect_obj)) return nullptr; - if (!g_game->IsInUIContext()) { + if (!g_logic->IsInUIContext()) { throw Exception( "This must be called within the UI context (see ba.Context docs).", PyExcType::kContext); } - ScopedSetContext cp(g_game->GetUIContextTarget()); + ScopedSetContext cp(g_logic->GetUIContextTarget()); // grab the edited widget or create a new one --------------------- Object::Ref widget; @@ -1528,13 +1528,13 @@ auto PyTextWidget(PyObject* self, PyObject* args, PyObject* keywds) &extra_touch_border_scale_obj, &res_scale_obj)) return nullptr; - if (!g_game->IsInUIContext()) + if (!g_logic->IsInUIContext()) throw Exception( "This must be called within the UI context (see ba.Context docs).", PyExcType::kContext); - // if (!g_game->IsInUIContext()) { BA_LOG_PYTHON_TRACE("ERROR: This should be + // if (!g_logic->IsInUIContext()) { BA_LOG_PYTHON_TRACE("ERROR: This should be // called within the UI context (see ba.Context docs)");} - ScopedSetContext cp(g_game->GetUIContextTarget()); + ScopedSetContext cp(g_logic->GetUIContextTarget()); // grab the edited widget or create a new one --------------------- Object::Ref widget; @@ -1578,7 +1578,7 @@ auto PyTextWidget(PyObject* self, PyObject* args, PyObject* keywds) // FIXME - compiling Lstr values to flat strings before passing them in; // we should probably extend TextWidget to handle this internally, but // punting on that for now.. - widget->set_description(g_game->CompileResourceString( + widget->set_description(g_logic->CompileResourceString( Python::GetPyString(description_obj), "textwidget set desc")); } if (autoselect_obj != Py_None) { @@ -1753,12 +1753,12 @@ auto PyWidgetCall(PyObject* self, PyObject* args, PyObject* keywds) &show_buffer_right_obj, &autoselect_obj)) return nullptr; - if (!g_game->IsInUIContext()) { + if (!g_logic->IsInUIContext()) { throw Exception( "This must be called within the UI context (see ba.Context docs).", PyExcType::kContext); } - ScopedSetContext cp(g_game->GetUIContextTarget()); + ScopedSetContext cp(g_logic->GetUIContextTarget()); Widget* widget = nullptr; if (edit_obj != Py_None) { @@ -2032,7 +2032,8 @@ auto PyChatMessage(PyObject* self, PyObject* args, PyObject* keywds) clients = Python::GetPyInts(clients_obj); clients_p = &clients; } - g_game->connections()->SendChatMessage(message, clients_p, sender_override_p); + g_logic->connections()->SendChatMessage(message, clients_p, + sender_override_p); Py_RETURN_NONE; BA_PYTHON_CATCH; } @@ -2048,7 +2049,7 @@ auto PyGetChatMessages(PyObject* self, PyObject* args, PyObject* keywds) return nullptr; } PyObject* py_list = PyList_New(0); - for (auto&& i : g_game->chat_messages()) { + for (auto&& i : g_logic->chat_messages()) { PyList_Append(py_list, PyUnicode_FromString(i.c_str())); } return py_list; @@ -2121,8 +2122,8 @@ auto PyCanShowAd(PyObject* self, PyObject* args, PyObject* keywds) // them or whatnot) also disallow ads if remote apps are connected; at least // on android ads pause our activity which disconnects the remote app.. (could // potentially still allow on other platforms; should verify..) - if (g_game->connections()->connection_to_host() - || g_game->connections()->has_connection_to_clients() + if (g_logic->connections()->connection_to_host() + || g_logic->connections()->has_connection_to_clients() || g_input->HaveRemoteAppController()) { Py_RETURN_FALSE; } @@ -2212,7 +2213,7 @@ auto PyConsolePrint(PyObject* self, PyObject* args) -> PyObject* { throw Exception(); } const char* c = PyUnicode_AsUTF8(str_obj); - g_game->PushConsolePrintCall(c); + g_logic->PushConsolePrintCall(c); Py_DECREF(str_obj); } #endif // !BA_HEADLESS_BUILD @@ -2224,8 +2225,8 @@ auto PyIsPartyIconVisible(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { BA_PYTHON_TRY; bool party_button_active = - (g_game->connections()->GetConnectedClientCount() > 0 - || g_game->connections()->connection_to_host() + (g_logic->connections()->GetConnectedClientCount() > 0 + || g_logic->connections()->connection_to_host() || g_ui->root_ui()->always_draw_party_icon()); if (party_button_active) { Py_RETURN_TRUE; diff --git a/src/ballistica/python/python.cc b/src/ballistica/python/python.cc index 5739a151..169564bd 100644 --- a/src/ballistica/python/python.cc +++ b/src/ballistica/python/python.cc @@ -10,14 +10,14 @@ #include "ballistica/audio/audio.h" #include "ballistica/core/thread.h" #include "ballistica/dynamics/material/material.h" -#include "ballistica/game/friend_score_set.h" -#include "ballistica/game/host_activity.h" -#include "ballistica/game/player.h" -#include "ballistica/game/v1_account.h" #include "ballistica/graphics/graphics.h" #include "ballistica/input/device/joystick.h" #include "ballistica/input/device/keyboard_input.h" #include "ballistica/internal/app_internal.h" +#include "ballistica/logic/friend_score_set.h" +#include "ballistica/logic/host_activity.h" +#include "ballistica/logic/player.h" +#include "ballistica/logic/v1_account.h" #include "ballistica/python/class/python_class_activity_data.h" #include "ballistica/python/class/python_class_collide_model.h" #include "ballistica/python/class/python_class_context.h" @@ -1099,15 +1099,15 @@ auto Python::InitModuleClasses(PyObject* module) -> void { } void Python::PushObjCall(ObjID obj_id) { - g_game->thread()->PushCall([obj_id] { - ScopedSetContext cp(g_game->GetUIContext()); + g_logic->thread()->PushCall([obj_id] { + ScopedSetContext cp(g_logic->GetUIContext()); g_python->obj(obj_id).Call(); }); } void Python::PushObjCall(ObjID obj_id, const std::string& arg) { - g_game->thread()->PushCall([this, obj_id, arg] { - ScopedSetContext cp(g_game->GetUIContext()); + g_logic->thread()->PushCall([this, obj_id, arg] { + ScopedSetContext cp(g_logic->GetUIContext()); PythonRef args(Py_BuildValue("(s)", arg.c_str()), ballistica::PythonRef::kSteal); obj(obj_id).Call(args); @@ -1191,7 +1191,7 @@ auto Python::GetTranslation(const char* category, const char* s) void Python::RunDeepLink(const std::string& url) { assert(InLogicThread()); if (objexists(ObjID::kDeepLinkCall)) { - ScopedSetContext cp(g_game->GetUIContext()); + ScopedSetContext cp(g_logic->GetUIContext()); PythonRef args(Py_BuildValue("(s)", url.c_str()), PythonRef::kSteal); obj(ObjID::kDeepLinkCall).Call(args); } else { @@ -1216,7 +1216,7 @@ void Python::PlayMusic(const std::string& music_type, bool continuous) { void Python::ShowURL(const std::string& url) { if (objexists(ObjID::kShowURLWindowCall)) { - ScopedSetContext cp(g_game->GetUIContext()); + ScopedSetContext cp(g_logic->GetUIContext()); PythonRef args(Py_BuildValue("(s)", url.c_str()), PythonRef::kSteal); obj(ObjID::kShowURLWindowCall).Call(args); } else { @@ -1244,7 +1244,7 @@ auto Python::SingleMemberTuple(const PythonRef& member) -> PythonRef { auto Python::FilterChatMessage(std::string* message, int client_id) -> bool { assert(message); - ScopedSetContext cp(g_game->GetUIContext()); + ScopedSetContext cp(g_logic->GetUIContext()); PythonRef args(Py_BuildValue("(si)", message->c_str(), client_id), PythonRef::kSteal); PythonRef result = obj(ObjID::kFilterChatMessageCall).Call(args); @@ -1269,7 +1269,7 @@ auto Python::FilterChatMessage(std::string* message, int client_id) -> bool { } void Python::HandleLocalChatMessage(const std::string& message) { - ScopedSetContext cp(g_game->GetUIContext()); + ScopedSetContext cp(g_logic->GetUIContext()); PythonRef args(Py_BuildValue("(s)", message.c_str()), PythonRef::kSteal); obj(ObjID::kHandleLocalChatMessageCall).Call(args); } @@ -2016,14 +2016,14 @@ void Python::LaunchStringEdit(TextWidget* w) { assert(InLogicThread()); BA_PRECONDITION(w); - ScopedSetContext cp(g_game->GetUIContext()); + ScopedSetContext cp(g_logic->GetUIContext()); g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kSwish)); // Gotta run this in the next cycle. PythonRef args(Py_BuildValue("(Osi)", w->BorrowPyRef(), w->description().c_str(), w->max_chars()), PythonRef::kSteal); - g_game->PushPythonCallArgs( + g_logic->PushPythonCallArgs( Object::New(obj(ObjID::kOnScreenKeyboardClass).get()), args); } @@ -2066,11 +2066,11 @@ void Python::HandleFriendScoresCB(const FriendScoreSet& score_set) { PyObject* py_list = PyList_New(0); std::string icon_str; #if BA_USE_GOOGLE_PLAY_GAME_SERVICES - icon_str = g_game->CharStr(SpecialChar::kGooglePlayGamesLogo); + icon_str = g_logic->CharStr(SpecialChar::kGooglePlayGamesLogo); #elif BA_USE_GAME_CIRCLE - icon_str = g_game->CharStr(SpecialChar::kGameCircleLogo); + icon_str = g_logic->CharStr(SpecialChar::kGameCircleLogo); #elif BA_USE_GAME_CENTER - icon_str = g_game->CharStr(SpecialChar::kGameCenterLogo); + icon_str = g_logic->CharStr(SpecialChar::kGameCenterLogo); #endif for (auto&& i : score_set.entries) { PyObject* obj = @@ -2090,7 +2090,7 @@ auto Python::HandleKeyPressEvent(const SDL_Keysym& keysym) -> bool { if (!keyboard_call_.exists()) { return false; } - ScopedSetContext cp(g_game->GetUIContextTarget()); + ScopedSetContext cp(g_logic->GetUIContextTarget()); InputDevice* keyboard = g_input->keyboard_input(); PythonRef args( Py_BuildValue("({s:s,s:i,s:O})", "type", "BUTTONDOWN", "button", @@ -2105,7 +2105,7 @@ auto Python::HandleKeyReleaseEvent(const SDL_Keysym& keysym) -> bool { if (!keyboard_call_.exists()) { return false; } - ScopedSetContext cp(g_game->GetUIContextTarget()); + ScopedSetContext cp(g_logic->GetUIContextTarget()); InputDevice* keyboard = g_input->keyboard_input(); PythonRef args(Py_BuildValue("({s:s,s:i,s:O})", "type", "BUTTONUP", "button", static_cast(keysym.sym), "input_device", @@ -2122,7 +2122,7 @@ auto Python::HandleJoystickEvent(const SDL_Event& event, if (!game_pad_call_.exists()) { return false; } - ScopedSetContext cp(g_game->GetUIContextTarget()); + ScopedSetContext cp(g_logic->GetUIContextTarget()); InputDevice* device{}; device = input_device; @@ -2335,7 +2335,7 @@ void Python::HandleDeviceMenuPress(InputDevice* input_device) { if (g_input->IsInputLocked()) { return; } - ScopedSetContext cp(g_game->GetUIContext()); + ScopedSetContext cp(g_logic->GetUIContext()); PythonRef args(Py_BuildValue("(O)", input_device ? input_device->BorrowPyRef() : Py_None), PythonRef::kSteal); diff --git a/src/ballistica/python/python.h b/src/ballistica/python/python.h index 95eb02ca..e1094129 100644 --- a/src/ballistica/python/python.h +++ b/src/ballistica/python/python.h @@ -111,7 +111,7 @@ class Python { /// results. static auto generic_dir(PyObject* self) -> PyObject*; - /// For use by g_game in passing events along to the python layer (for + /// For use by g_logic in passing events along to the python layer (for /// captured input, etc). auto HandleJoystickEvent(const SDL_Event& event, InputDevice* input_device = nullptr) -> bool; diff --git a/src/ballistica/python/python_context_call.cc b/src/ballistica/python/python_context_call.cc index 958e599c..279d58c0 100644 --- a/src/ballistica/python/python_context_call.cc +++ b/src/ballistica/python/python_context_call.cc @@ -2,8 +2,8 @@ #include "ballistica/python/python_context_call.h" -#include "ballistica/game/host_activity.h" -#include "ballistica/game/session/host_session.h" +#include "ballistica/logic/host_activity.h" +#include "ballistica/logic/session/host_session.h" #include "ballistica/python/python.h" #include "ballistica/python/python_sys.h" diff --git a/src/ballistica/scene/node/globals_node.cc b/src/ballistica/scene/node/globals_node.cc index 9cc39704..34772cb3 100644 --- a/src/ballistica/scene/node/globals_node.cc +++ b/src/ballistica/scene/node/globals_node.cc @@ -4,9 +4,9 @@ #include "ballistica/audio/audio.h" #include "ballistica/dynamics/bg/bg_dynamics.h" -#include "ballistica/game/host_activity.h" #include "ballistica/graphics/camera.h" #include "ballistica/graphics/graphics.h" +#include "ballistica/logic/host_activity.h" #include "ballistica/python/python.h" #include "ballistica/scene/node/node_attribute.h" #include "ballistica/scene/node/node_type.h" @@ -121,7 +121,7 @@ GlobalsNode::GlobalsNode(Scene* scene) : Node(scene, node_type) { // If our scene is currently the game's foreground one, go ahead and // push our values globally. - if (g_game->GetForegroundScene() == this->scene()) { + if (g_logic->GetForegroundScene() == this->scene()) { SetAsForeground(); } } @@ -154,7 +154,7 @@ auto GlobalsNode::IsCurrentGlobals() const -> bool { // node for our scene. Scene* scene = this->scene(); assert(scene); - return (g_game->GetForegroundScene() == this->scene() + return (g_logic->GetForegroundScene() == this->scene() && scene->globals_node() == this); } diff --git a/src/ballistica/scene/node/spaz_node.h b/src/ballistica/scene/node/spaz_node.h index f1e76af5..4133c127 100644 --- a/src/ballistica/scene/node/spaz_node.h +++ b/src/ballistica/scene/node/spaz_node.h @@ -7,8 +7,8 @@ #include #include "ballistica/dynamics/part.h" -#include "ballistica/game/player.h" #include "ballistica/graphics/renderer.h" +#include "ballistica/logic/player.h" #include "ballistica/scene/node/node.h" namespace ballistica { diff --git a/src/ballistica/scene/node/text_node.cc b/src/ballistica/scene/node/text_node.cc index 10a0c0f8..a6f27062 100644 --- a/src/ballistica/scene/node/text_node.cc +++ b/src/ballistica/scene/node/text_node.cc @@ -113,7 +113,7 @@ void TextNode::SetText(const std::string& val) { if (do_format_check) { bool valid; - g_game->CompileResourceString(val, "setText format check", &valid); + g_logic->CompileResourceString(val, "setText format check", &valid); if (!valid) { BA_LOG_ONCE("Invalid resource string: '" + val + "' on node '" + label() + "'"); @@ -348,7 +348,7 @@ void TextNode::Draw(FrameDef* frame_def) { // Apply subs/resources to get our actual text if need be. if (text_translation_dirty_) { text_translated_ = - g_game->CompileResourceString(text_raw_, "TextNode::OnDraw"); + g_logic->CompileResourceString(text_raw_, "TextNode::OnDraw"); text_translation_dirty_ = false; text_group_dirty_ = true; text_width_dirty_ = true; diff --git a/src/ballistica/scene/node/time_display_node.cc b/src/ballistica/scene/node/time_display_node.cc index ff23f07e..17bc7ebf 100644 --- a/src/ballistica/scene/node/time_display_node.cc +++ b/src/ballistica/scene/node/time_display_node.cc @@ -4,8 +4,8 @@ #include -#include "ballistica/game/game.h" #include "ballistica/generic/utils.h" +#include "ballistica/logic/logic.h" #include "ballistica/scene/node/node_attribute.h" #include "ballistica/scene/node/node_type.h" @@ -48,10 +48,10 @@ auto TimeDisplayNode::GetOutput() -> std::string { assert(InLogicThread()); if (translations_dirty_) { time_suffix_hours_ = - g_game->CompileResourceString(R"({"r":"timeSuffixHoursText"})", "tda"); - time_suffix_minutes_ = g_game->CompileResourceString( + g_logic->CompileResourceString(R"({"r":"timeSuffixHoursText"})", "tda"); + time_suffix_minutes_ = g_logic->CompileResourceString( R"({"r":"timeSuffixMinutesText"})", "tdb"); - time_suffix_seconds_ = g_game->CompileResourceString( + time_suffix_seconds_ = g_logic->CompileResourceString( R"({"r":"timeSuffixSecondsText"})", "tdc"); translations_dirty_ = false; output_dirty_ = true; diff --git a/src/ballistica/scene/scene.cc b/src/ballistica/scene/scene.cc index 0f3ede77..a77ce3ff 100644 --- a/src/ballistica/scene/scene.cc +++ b/src/ballistica/scene/scene.cc @@ -8,10 +8,10 @@ #include "ballistica/dynamics/bg/bg_dynamics.h" #include "ballistica/dynamics/dynamics.h" #include "ballistica/dynamics/part.h" -#include "ballistica/game/player.h" #include "ballistica/graphics/camera.h" #include "ballistica/graphics/graphics.h" #include "ballistica/input/device/input_device.h" +#include "ballistica/logic/player.h" #include "ballistica/networking/networking.h" #include "ballistica/python/python_context_call.h" #include "ballistica/scene/node/anim_curve_node.h" @@ -235,7 +235,7 @@ void Scene::Step() { } in_step_ = false; } - bool is_foreground = (g_game->GetForegroundScene() == this); + bool is_foreground = (g_logic->GetForegroundScene() == this); // Add a step command to the output stream. if (output_stream_.exists()) { @@ -377,7 +377,7 @@ void Scene::Dump(SceneStream* stream) { stream->AddScene(this); // If we're the foreground one, communicate that fact as well. - if (g_game->GetForegroundScene() == this) { + if (g_logic->GetForegroundScene() == this) { stream->SetForegroundScene(this); } } diff --git a/src/ballistica/scene/scene.h b/src/ballistica/scene/scene.h index 9907a029..9f7dbf92 100644 --- a/src/ballistica/scene/scene.h +++ b/src/ballistica/scene/scene.h @@ -8,7 +8,7 @@ #include #include "ballistica/core/object.h" -#include "ballistica/game/game.h" +#include "ballistica/logic/logic.h" #include "ballistica/scene/node/node.h" namespace ballistica { diff --git a/src/ballistica/scene/scene_stream.cc b/src/ballistica/scene/scene_stream.cc index f3b7074b..cdea88f5 100644 --- a/src/ballistica/scene/scene_stream.cc +++ b/src/ballistica/scene/scene_stream.cc @@ -15,9 +15,9 @@ #include "ballistica/dynamics/material/material_component.h" #include "ballistica/dynamics/material/material_condition_node.h" #include "ballistica/dynamics/part.h" -#include "ballistica/game/connection/connection_set.h" -#include "ballistica/game/connection/connection_to_client.h" -#include "ballistica/game/session/host_session.h" +#include "ballistica/logic/connection/connection_set.h" +#include "ballistica/logic/connection/connection_to_client.h" +#include "ballistica/logic/session/host_session.h" #include "ballistica/networking/networking.h" #include "ballistica/scene/node/node_attribute.h" #include "ballistica/scene/node/node_type.h" @@ -46,7 +46,7 @@ SceneStream::SceneStream(HostSession* host_session, bool save_replay) // If we're the live output-stream from a host-session, // take responsibility for feeding all clients to this device. if (host_session_) { - g_game->connections()->RegisterClientController(this); + g_logic->connections()->RegisterClientController(this); } } @@ -67,7 +67,7 @@ SceneStream::~SceneStream() { // If we're wired to the host-session, go ahead and release clients. if (host_session_) { - g_game->connections()->UnregisterClientController(this); + g_logic->connections()->UnregisterClientController(this); #pragma clang diagnostic push #pragma ide diagnostic ignored "UnreachableCode" diff --git a/src/ballistica/scene/scene_stream.h b/src/ballistica/scene/scene_stream.h index 43187319..a43906a4 100644 --- a/src/ballistica/scene/scene_stream.h +++ b/src/ballistica/scene/scene_stream.h @@ -7,7 +7,7 @@ #include #include "ballistica/core/object.h" -#include "ballistica/game/client_controller_interface.h" +#include "ballistica/logic/client_controller_interface.h" namespace ballistica { diff --git a/src/ballistica/ui/console.cc b/src/ballistica/ui/console.cc index a40bcec0..89cff2e0 100644 --- a/src/ballistica/ui/console.cc +++ b/src/ballistica/ui/console.cc @@ -4,10 +4,10 @@ #include "ballistica/app/app.h" #include "ballistica/audio/audio.h" -#include "ballistica/game/game.h" #include "ballistica/generic/utils.h" #include "ballistica/graphics/component/simple_component.h" #include "ballistica/graphics/text/text_graphics.h" +#include "ballistica/logic/logic.h" #include "ballistica/platform/min_sdl.h" namespace ballistica { @@ -53,8 +53,8 @@ auto Console::HandleKeyPress(const SDL_Keysym* keysym) -> bool { case kActivateKey2: { if (!g_buildconfig.demo_build() && !g_buildconfig.arcade_build()) { // (reset input so characters don't continue walking and stuff) - g_game->ResetInput(); - g_game->ToggleConsole(); + g_logic->ResetInput(); + g_logic->ToggleConsole(); } return true; } @@ -113,7 +113,7 @@ auto Console::HandleKeyPress(const SDL_Keysym* keysym) -> bool { last_line_.clear(); lines_.clear(); } else { - g_game->PushInGameConsoleScriptCommand(input_string_); + g_logic->PushInGameConsoleScriptCommand(input_string_); } input_history_.push_front(input_string_); if (input_history_.size() > 100) input_history_.pop_back(); diff --git a/src/ballistica/ui/root_ui.cc b/src/ballistica/ui/root_ui.cc index 8f13411b..1b0cbe72 100644 --- a/src/ballistica/ui/root_ui.cc +++ b/src/ballistica/ui/root_ui.cc @@ -2,13 +2,13 @@ #include "ballistica/ui/root_ui.h" -#include "ballistica/game/connection/connection_set.h" -#include "ballistica/game/game.h" -#include "ballistica/game/session/host_session.h" #include "ballistica/graphics/component/simple_component.h" #include "ballistica/input/device/keyboard_input.h" #include "ballistica/input/device/touch_input.h" #include "ballistica/input/input.h" +#include "ballistica/logic/connection/connection_set.h" +#include "ballistica/logic/logic.h" +#include "ballistica/logic/session/host_session.h" #include "ballistica/python/python.h" #include "ballistica/ui/ui.h" #include "ballistica/ui/widget/container_widget.h" @@ -43,7 +43,8 @@ RootUI::~RootUI() = default; void RootUI::TogglePartyWindowKeyPress() { assert(InLogicThread()); - if (g_game->GetPartySize() > 1 || g_game->connections()->connection_to_host() + if (g_logic->GetPartySize() > 1 + || g_logic->connections()->connection_to_host() || always_draw_party_icon()) { ActivatePartyIcon(); } @@ -51,7 +52,7 @@ void RootUI::TogglePartyWindowKeyPress() { void RootUI::ActivatePartyIcon() const { assert(InLogicThread()); - ScopedSetContext cp(g_game->GetUIContext()); + ScopedSetContext cp(g_logic->GetUIContext()); // Originate from center of party icon. If menu button is shown, it is to the // left of that. @@ -78,8 +79,8 @@ auto RootUI::HandleMouseButtonDown(float x, float y) -> bool { if (explicit_bool(DO_OLD_MENU_PARTY_BUTTONS)) { bool party_button_active = (!party_window_open_ - && (g_game->connections()->GetConnectedClientCount() > 0 - || g_game->connections()->connection_to_host() + && (g_logic->connections()->GetConnectedClientCount() > 0 + || g_logic->connections()->connection_to_host() || always_draw_party_icon())); float party_button_left = menu_active ? 2 * menu_button_size_ : menu_button_size_; @@ -123,7 +124,7 @@ void RootUI::HandleMouseButtonUp(float x, float y) { } if ((g_graphics->screen_virtual_width() - x < menu_button_size_) && (g_graphics->screen_virtual_height() - y < menu_button_size_)) { - g_game->PushMainMenuPressCall(input_device); + g_logic->PushMainMenuPressCall(input_device); last_menu_button_press_time_ = GetRealTime(); } } @@ -199,17 +200,17 @@ void RootUI::Draw(FrameDef* frame_def) { // To the left of the menu button, draw our connected-players indicator // (this probably shouldn't live here). bool draw_connected_players_icon = false; - int party_size = g_game->GetPartySize(); - bool is_host = (g_game->connections()->connection_to_host() == nullptr); + int party_size = g_logic->GetPartySize(); + bool is_host = (g_logic->connections()->connection_to_host() == nullptr); millisecs_t last_connection_to_client_join_time = - g_game->last_connection_to_client_join_time(); + g_logic->last_connection_to_client_join_time(); bool show_client_joined = (is_host && last_connection_to_client_join_time != 0 && real_time - last_connection_to_client_join_time < 5000); if (!party_window_open_ - && (party_size != 0 || g_game->connections()->connection_to_host() + && (party_size != 0 || g_logic->connections()->connection_to_host() || always_draw_party_icon_)) { draw_connected_players_icon = true; } @@ -218,7 +219,7 @@ void RootUI::Draw(FrameDef* frame_def) { // Flash and show a message if we're in the main menu instructing the // player to start a game. bool flash = false; - HostSession* s = g_game->GetForegroundContext().GetHostSession(); + HostSession* s = g_logic->GetForegroundContext().GetHostSession(); if (s && s->is_main_menu() && party_size > 0 && show_client_joined) flash = true; @@ -306,7 +307,7 @@ void RootUI::Draw(FrameDef* frame_def) { } if (party_size == 2) { // (includes us as host) start_a_game_text_group_->SetText( - g_game->GetResourceString("joinedPartyInstructionsText"), + g_logic->GetResourceString("joinedPartyInstructionsText"), TextMesh::HAlign::kRight, TextMesh::VAlign::kTop); } else if (party_size > 2) { start_a_game_text_group_->SetText( diff --git a/src/ballistica/ui/ui.cc b/src/ballistica/ui/ui.cc index 9389eb9a..b33fe840 100644 --- a/src/ballistica/ui/ui.cc +++ b/src/ballistica/ui/ui.cc @@ -219,7 +219,7 @@ void UI::AddWidget(Widget* w, ContainerWidget* parent) { // will not get stuck running or whatnot. if (screen_root_widget_.exists() && !screen_root_widget_->HasChildren() && parent == &(*screen_root_widget_)) { - g_game->ResetInput(); + g_logic->ResetInput(); } parent->AddWidget(w); @@ -305,18 +305,18 @@ auto UI::GetWidgetForInput(InputDevice* input_device) -> Widget* { kUIOwnerTimeoutSeconds - (time - last_input_device_use_time_) / 1000; std::string time_out_str; if (timeout > 0 && timeout < (kUIOwnerTimeoutSeconds - 10)) { - time_out_str = " " + g_game->GetResourceString("timeOutText"); + time_out_str = " " + g_logic->GetResourceString("timeOutText"); Utils::StringReplaceOne(&time_out_str, "${TIME}", std::to_string(timeout)); } else { - time_out_str = " " + g_game->GetResourceString("willTimeOutText"); + time_out_str = " " + g_logic->GetResourceString("willTimeOutText"); } std::string name; if (input->GetDeviceName() == "Keyboard") { - name = g_game->GetResourceString("keyboardText"); + name = g_logic->GetResourceString("keyboardText"); } else if (input->GetDeviceName() == "TouchScreen") { - name = g_game->GetResourceString("touchScreenText"); + name = g_logic->GetResourceString("touchScreenText"); } else { // We used to use player names here, but that's kinda sloppy and random; // lets just go with device names/numbers. @@ -331,7 +331,7 @@ auto UI::GetWidgetForInput(InputDevice* input_device) -> Widget* { } } - std::string b = g_game->GetResourceString("hasMenuControlText"); + std::string b = g_logic->GetResourceString("hasMenuControlText"); Utils::StringReplaceOne(&b, "${NAME}", name); ScreenMessage(b + time_out_str, {0.45f, 0.4f, 0.5f}); } @@ -371,7 +371,7 @@ auto UI::NewTimer(TimeType timetype, TimerMedium length, bool repeat, case TimeType::kSim: case TimeType::kBase: case TimeType::kReal: - return g_game->NewRealTimer(length, repeat, runnable); + return g_logic->NewRealTimer(length, repeat, runnable); default: // Fall back to default for descriptive error otherwise. return ContextTarget::NewTimer(timetype, length, repeat, runnable); @@ -383,7 +383,7 @@ void UI::DeleteTimer(TimeType timetype, int timer_id) { case TimeType::kSim: case TimeType::kBase: case TimeType::kReal: - g_game->DeleteRealTimer(timer_id); + g_logic->DeleteRealTimer(timer_id); break; default: // Fall back to default for descriptive error otherwise. diff --git a/src/ballistica/ui/widget/button_widget.cc b/src/ballistica/ui/widget/button_widget.cc index de09fb05..507d45d7 100644 --- a/src/ballistica/ui/widget/button_widget.cc +++ b/src/ballistica/ui/widget/button_widget.cc @@ -14,7 +14,7 @@ namespace ballistica { -ButtonWidget::ButtonWidget() : birth_time_{g_game->master_time()} { +ButtonWidget::ButtonWidget() : birth_time_{g_logic->master_time()} { text_ = Object::New(); SetText("Button"); text_->set_valign(TextWidget::VAlign::kCenter); @@ -560,7 +560,7 @@ void ButtonWidget::DoActivate(bool isRepeat) { // We don't want holding down a repeat-button to keep flashing it. if (!isRepeat) { - last_activate_time_ = g_game->master_time(); + last_activate_time_ = g_logic->master_time(); } if (sound_enabled_) { int r = rand() % 3; // NOLINT @@ -575,7 +575,7 @@ void ButtonWidget::DoActivate(bool isRepeat) { if (on_activate_call_.exists()) { // Call this in the next cycle (don't want to risk mucking with UI from // within a UI loop.) - g_game->PushPythonWeakCall( + g_logic->PushPythonWeakCall( Object::WeakRef(on_activate_call_)); return; } diff --git a/src/ballistica/ui/widget/check_box_widget.cc b/src/ballistica/ui/widget/check_box_widget.cc index f45ecafd..8341fffd 100644 --- a/src/ballistica/ui/widget/check_box_widget.cc +++ b/src/ballistica/ui/widget/check_box_widget.cc @@ -3,9 +3,9 @@ #include "ballistica/ui/widget/check_box_widget.h" #include "ballistica/audio/audio.h" -#include "ballistica/game/game.h" #include "ballistica/graphics/component/empty_component.h" #include "ballistica/graphics/component/simple_component.h" +#include "ballistica/logic/logic.h" #include "ballistica/python/python_context_call.h" #include "ballistica/python/python_sys.h" #include "ballistica/ui/ui.h" @@ -245,7 +245,7 @@ void CheckBoxWidget::Activate() { // Call this in the next cycle (don't want to risk mucking with UI from // within a UI loop) - g_game->PushPythonWeakCallArgs( + g_logic->PushPythonWeakCallArgs( Object::WeakRef(on_value_change_call_), args); } } diff --git a/src/ballistica/ui/widget/container_widget.cc b/src/ballistica/ui/widget/container_widget.cc index dbd41b05..9d1e0eeb 100644 --- a/src/ballistica/ui/widget/container_widget.cc +++ b/src/ballistica/ui/widget/container_widget.cc @@ -4,10 +4,10 @@ #include "ballistica/audio/audio.h" #include "ballistica/core/thread.h" -#include "ballistica/game/game.h" #include "ballistica/graphics/component/empty_component.h" #include "ballistica/graphics/component/simple_component.h" #include "ballistica/input/input.h" +#include "ballistica/logic/logic.h" #include "ballistica/python/python.h" #include "ballistica/python/python_context_call.h" #include "ballistica/ui/ui.h" @@ -32,7 +32,7 @@ namespace ballistica { ContainerWidget::ContainerWidget(float width_in, float height_in) : width_(width_in), height_(height_in), - dynamics_update_time_(g_game->master_time()) {} + dynamics_update_time_(g_logic->master_time()) {} ContainerWidget::~ContainerWidget() { BA_DEBUG_UI_READ_LOCK; @@ -343,7 +343,7 @@ auto ContainerWidget::HandleMessage(const WidgetMessage& m) -> bool { // Call this in the next cycle (don't wanna risk mucking with UI from // within a UI loop). - g_game->PushPythonWeakCall( + g_logic->PushPythonWeakCall( Object::WeakRef(on_cancel_call_)); } else { OnCancelCustom(); @@ -619,7 +619,7 @@ auto ContainerWidget::HandleMessage(const WidgetMessage& m) -> bool { if (!claimed && on_outside_click_call_.exists()) { // Call this in the next cycle (don't wanna risk mucking with UI from // within a UI loop). - g_game->PushPythonWeakCall( + g_logic->PushPythonWeakCall( Object::WeakRef(on_outside_click_call_)); } @@ -809,7 +809,7 @@ void ContainerWidget::Draw(RenderPass* pass, bool draw_transparent) { // Probably not safe to delete ourself here since we're in // the draw loop, but we can push a call to do it. Object::WeakRef weakref(this); - g_game->thread()->PushCall([weakref] { + g_logic->thread()->PushCall([weakref] { Widget* w = weakref.get(); if (w) g_ui->DeleteWidget(w); }); @@ -864,7 +864,7 @@ void ContainerWidget::Draw(RenderPass* pass, bool draw_transparent) { // Probably not safe to delete ourself here since we're in the // draw loop, but we can set up an event to do it. Object::WeakRef weakref(this); - g_game->thread()->PushCall([weakref] { + g_logic->thread()->PushCall([weakref] { Widget* w = weakref.get(); if (w) g_ui->DeleteWidget(w); }); @@ -1046,11 +1046,11 @@ void ContainerWidget::TransformPointFromChild(float* x, float* y, } void ContainerWidget::Activate() { - last_activate_time_ = g_game->master_time(); + last_activate_time_ = g_logic->master_time(); if (on_activate_call_.exists()) { // Call this in the next cycle (don't wanna risk mucking with UI from within // a UI loop). - g_game->PushPythonWeakCall( + g_logic->PushPythonWeakCall( Object::WeakRef(on_activate_call_)); } } @@ -1143,7 +1143,7 @@ void ContainerWidget::SetTransition(TransitionType t) { return; } parent->CheckLayout(); - millisecs_t net_time = g_game->master_time(); + millisecs_t net_time = g_logic->master_time(); transition_type_ = t; // Scale transitions are simpler. @@ -1779,7 +1779,7 @@ void ContainerWidget::SelectNextWidget() { millisecs_t old_last_prev_next_time = last_prev_next_time_; if (should_print_list_exit_instructions_) { - last_prev_next_time_ = g_game->master_time(); + last_prev_next_time_ = g_logic->master_time(); } // Grab the iterator for our selected widget if possible. @@ -1839,21 +1839,21 @@ void ContainerWidget::SelectNextWidget() { void ContainerWidget::PrintExitListInstructions( millisecs_t old_last_prev_next_time) { if (should_print_list_exit_instructions_) { - millisecs_t t = g_game->master_time(); + millisecs_t t = g_logic->master_time(); if ((t - old_last_prev_next_time > 250) && (t - last_list_exit_instructions_print_time_ > 5000)) { last_list_exit_instructions_print_time_ = t; g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kErrorBeep)); - std::string s = g_game->GetResourceString("arrowsToExitListText"); + std::string s = g_logic->GetResourceString("arrowsToExitListText"); { // Left arrow. Utils::StringReplaceOne(&s, "${LEFT}", - g_game->CharStr(SpecialChar::kLeftArrow)); + g_logic->CharStr(SpecialChar::kLeftArrow)); } { // Right arrow. Utils::StringReplaceOne(&s, "${RIGHT}", - g_game->CharStr(SpecialChar::kRightArrow)); + g_logic->CharStr(SpecialChar::kRightArrow)); } ScreenMessage(s); } @@ -1865,7 +1865,7 @@ void ContainerWidget::SelectPrevWidget() { millisecs_t old_last_prev_next_time = last_prev_next_time_; if (should_print_list_exit_instructions_) { - last_prev_next_time_ = g_game->master_time(); + last_prev_next_time_ = g_logic->master_time(); } // Grab the iterator for our selected widget if possible. diff --git a/src/ballistica/ui/widget/h_scroll_widget.cc b/src/ballistica/ui/widget/h_scroll_widget.cc index 27aecc66..49e0e2b7 100644 --- a/src/ballistica/ui/widget/h_scroll_widget.cc +++ b/src/ballistica/ui/widget/h_scroll_widget.cc @@ -348,7 +348,7 @@ auto HScrollWidget::HandleMessage(const WidgetMessage& m) -> bool { inertia_scroll_rate_ = smoothing * inertia_scroll_rate_ + (1.0f - smoothing) * new_val; } - last_velocity_event_time_ = g_game->master_time(); + last_velocity_event_time_ = g_logic->master_time(); MarkForUpdate(); } else { // Not within our widget; dont allow children to claim. diff --git a/src/ballistica/ui/widget/image_widget.cc b/src/ballistica/ui/widget/image_widget.cc index 75c63b86..28b2a369 100644 --- a/src/ballistica/ui/widget/image_widget.cc +++ b/src/ballistica/ui/widget/image_widget.cc @@ -2,12 +2,12 @@ #include "ballistica/ui/widget/image_widget.h" -#include "ballistica/game/game.h" #include "ballistica/graphics/component/simple_component.h" +#include "ballistica/logic/logic.h" namespace ballistica { -ImageWidget::ImageWidget() : birth_time_{g_game->master_time()} {} +ImageWidget::ImageWidget() : birth_time_{g_logic->master_time()} {} ImageWidget::~ImageWidget() = default; diff --git a/src/ballistica/ui/widget/root_widget.cc b/src/ballistica/ui/widget/root_widget.cc index 846a92b0..f3d24b03 100644 --- a/src/ballistica/ui/widget/root_widget.cc +++ b/src/ballistica/ui/widget/root_widget.cc @@ -2,10 +2,10 @@ #include "ballistica/ui/widget/root_widget.h" -#include "ballistica/game/game.h" -#include "ballistica/game/session/host_session.h" #include "ballistica/graphics/renderer.h" #include "ballistica/input/input.h" +#include "ballistica/logic/logic.h" +#include "ballistica/logic/session/host_session.h" #include "ballistica/python/python.h" #include "ballistica/ui/ui.h" #include "ballistica/ui/widget/button_widget.h" @@ -346,7 +346,7 @@ void RootWidget::Setup() { td.x = 5.0f; td.y = 3.0f; td.width = bd.width * 0.9f; - td.text = g_game->CharStr(SpecialChar::kBack); + td.text = g_logic->CharStr(SpecialChar::kBack); td.color_a = 1.0f; td.scale = 2.0f; td.flatness = 0.0f; @@ -812,7 +812,7 @@ void RootWidget::Draw(RenderPass* pass, bool transparent) { } auto RootWidget::AddButton(const ButtonDef& def) -> RootWidget::Button* { - ScopedSetContext cp(g_game->GetUIContextTarget()); + ScopedSetContext cp(g_logic->GetUIContextTarget()); buttons_.emplace_back(); Button& b(buttons_.back()); b.x = b.x_smoothed = b.x_target = def.x; @@ -862,7 +862,7 @@ auto RootWidget::AddButton(const ButtonDef& def) -> RootWidget::Button* { } auto RootWidget::AddText(const TextDef& def) -> RootWidget::Text* { - ScopedSetContext cp(g_game->GetUIContextTarget()); + ScopedSetContext cp(g_logic->GetUIContextTarget()); texts_.emplace_back(); Text& t(texts_.back()); t.button = def.button; @@ -896,7 +896,7 @@ void RootWidget::UpdateForFocusedWindow() { void RootWidget::UpdateForFocusedWindow(Widget* widget) { // Take note if the current session is the main menu; we do a few things // differently there. - HostSession* s = g_game->GetForegroundContext().GetHostSession(); + HostSession* s = g_logic->GetForegroundContext().GetHostSession(); in_main_menu_ = (s ? s->is_main_menu() : false); if (widget == nullptr) { diff --git a/src/ballistica/ui/widget/scroll_widget.cc b/src/ballistica/ui/widget/scroll_widget.cc index 3e9ba042..9c3b29f3 100644 --- a/src/ballistica/ui/widget/scroll_widget.cc +++ b/src/ballistica/ui/widget/scroll_widget.cc @@ -265,7 +265,7 @@ auto ScrollWidget::HandleMessage(const WidgetMessage& m) -> bool { inertia_scroll_rate_ = smoothing * inertia_scroll_rate_ + (1.0f - smoothing) * new_val; } - last_velocity_event_time_ = g_game->master_time(); + last_velocity_event_time_ = g_logic->master_time(); MarkForUpdate(); } else { // Not within our widget; don't allow children to claim. diff --git a/src/ballistica/ui/widget/text_widget.cc b/src/ballistica/ui/widget/text_widget.cc index 795a009d..060ea48a 100644 --- a/src/ballistica/ui/widget/text_widget.cc +++ b/src/ballistica/ui/widget/text_widget.cc @@ -4,13 +4,13 @@ #include "ballistica/app/app_flavor.h" #include "ballistica/audio/audio.h" -#include "ballistica/game/game.h" #include "ballistica/generic/utils.h" #include "ballistica/graphics/component/empty_component.h" #include "ballistica/graphics/component/simple_component.h" #include "ballistica/graphics/text/text_graphics.h" #include "ballistica/input/device/keyboard_input.h" #include "ballistica/input/input.h" +#include "ballistica/logic/logic.h" #include "ballistica/python/python.h" #include "ballistica/python/python_context_call.h" #include "ballistica/ui/ui.h" @@ -39,7 +39,7 @@ TextWidget::TextWidget() { } } - birth_time_ = g_game->master_time(); + birth_time_ = g_logic->master_time(); } TextWidget::~TextWidget() = default; @@ -461,8 +461,8 @@ void TextWidget::SetText(const std::string& text_in_raw) { if (do_format_check) { bool valid; - g_game->CompileResourceString(text_in_raw, - "TextWidget::SetText format check", &valid); + g_logic->CompileResourceString(text_in_raw, + "TextWidget::SetText format check", &valid); if (!valid) { BA_LOG_ONCE("Invalid resource string: '" + text_in_raw + "'"); Python::PrintStackTrace(); @@ -557,12 +557,12 @@ void TextWidget::BringUpEditDialog() { } void TextWidget::Activate() { - last_activate_time_ = g_game->master_time(); + last_activate_time_ = g_logic->master_time(); if (on_activate_call_.exists()) { // Call this in the next cycle (don't wanna risk mucking with UI from within // a UI loop). - g_game->PushPythonWeakCall( + g_logic->PushPythonWeakCall( Object::WeakRef(on_activate_call_)); } @@ -603,7 +603,7 @@ auto TextWidget::HandleMessage(const WidgetMessage& m) -> bool { } // If we're doing inline editing, handle some key events. if (m.has_keysym && !ShouldUseStringEditDialog()) { - last_carat_change_time_ = g_game->master_time(); + last_carat_change_time_ = g_logic->master_time(); text_group_dirty_ = true; bool claimed = false; @@ -626,7 +626,7 @@ auto TextWidget::HandleMessage(const WidgetMessage& m) -> bool { if (on_return_press_call_.exists()) { // Call this in the next cycle (don't wanna risk mucking with UI // from within a UI loop) - g_game->PushPythonWeakCall( + g_logic->PushPythonWeakCall( Object::WeakRef(on_return_press_call_)); } } @@ -933,7 +933,7 @@ void TextWidget::UpdateTranslation() { if (editable()) { text_translated_ = text_raw_; } else { - text_translated_ = g_game->CompileResourceString( + text_translated_ = g_logic->CompileResourceString( text_raw_, "TextWidget::UpdateTranslation"); } text_translation_dirty_ = false; diff --git a/src/ballistica/ui/widget/widget.cc b/src/ballistica/ui/widget/widget.cc index ced12799..ea0f1bab 100644 --- a/src/ballistica/ui/widget/widget.cc +++ b/src/ballistica/ui/widget/widget.cc @@ -2,7 +2,7 @@ #include "ballistica/ui/widget/widget.h" -#include "ballistica/game/game.h" +#include "ballistica/logic/logic.h" #include "ballistica/python/class/python_class_widget.h" #include "ballistica/python/python_context_call.h" #include "ballistica/ui/ui.h" @@ -87,7 +87,7 @@ void Widget::SetSelected(bool s, SelectionCause cause) { if (selected_ && on_select_call_.exists()) { // Call this in the next cycle (don't wanna risk mucking // with UI from within a UI loop). - g_game->PushPythonWeakCall( + g_logic->PushPythonWeakCall( Object::WeakRef(on_select_call_)); } } diff --git a/tools/batools/project.py b/tools/batools/project.py index 507b8ebe..a810b09f 100755 --- a/tools/batools/project.py +++ b/tools/batools/project.py @@ -202,7 +202,9 @@ class Updater: if auto_changes: if not self._fix: for i, change in enumerate(auto_changes): - print(f'{Clr.RED}#{i}: {change[0]}:{Clr.RST}') + print(f'{Clr.RED}#{i}:' + f' {change[0]}:{change[1].line_number+1}:' + f'{Clr.RST}') print( f'{Clr.RED} Expected "{change[1].expected}"{Clr.RST}') with open(change[0], encoding='utf-8') as infile: @@ -262,6 +264,9 @@ class Updater: def _add_line_correction(self, filename: str, line_number: int, expected: str, can_auto_update: bool) -> None: + # No longer allowing negatives here since they don't show up nicely + # in correction list. + assert line_number >= 0 self._line_corrections.setdefault(filename, []).append( LineChange(line_number=line_number, expected=expected, @@ -301,7 +306,7 @@ class Updater: if self._license_line_checks: self._check_c_license(fname, lines) - # Check for header guard at top + # Check for header guard lines at top line = '#ifndef ' + guard lnum = 2 if lines[lnum] != line: @@ -312,10 +317,20 @@ class Updater: line_number=lnum, expected=line, can_auto_update=allow_auto) + line = '#define ' + guard + lnum = 3 + if lines[lnum] != line: + # Allow auto-correcting if it looks close already + # (don't want to blow away an unrelated line) + allow_auto = lines[lnum].startswith('#define BALLISTICA_') + self._add_line_correction(fname, + line_number=lnum, + expected=line, + can_auto_update=allow_auto) # Check for header guard at bottom line = '#endif // ' + guard - lnum = -1 + lnum = len(lines) - 1 if lines[lnum] != line: # Allow auto-correcting if it looks close already # (don't want to blow away an unrelated line) From 30a29893a165087286cf3f884a7155c5db6c5c16 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 12 Sep 2022 13:41:03 -0700 Subject: [PATCH 12/40] c++ tidying --- .efrocachemap | 56 +++++++++---------- CHANGELOG.md | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/assets/assets_server.cc | 4 +- src/ballistica/assets/assets_server.h | 2 +- src/ballistica/audio/audio_server.cc | 4 +- src/ballistica/audio/audio_server.h | 2 +- src/ballistica/ballistica.cc | 5 +- src/ballistica/core/thread.cc | 65 +++++++++++----------- src/ballistica/core/thread.h | 13 +---- src/ballistica/core/types.h | 6 +- src/ballistica/logic/logic.cc | 17 +++--- src/ballistica/logic/logic.h | 2 +- src/ballistica/ui/ui.cc | 4 +- src/ballistica/ui/ui.h | 2 +- 15 files changed, 91 insertions(+), 95 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 43f04760..c5a2542a 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c2/cb/1e9b2d26994e9dcd55d1df152b19", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/4a/ae/c8878226f4a2d507f4ff5f377859", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/18/0f/9abd66eae1925271ab132163f2e0", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/54/c0/bb411385e3aefb55ca3fb4150e60", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/3c/61/37d143c8b14fb05990c0b8bc8f52", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/f6/61/3958823929bcf2cdd9ca694d0ad7", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d5/73/b714b3e9a36076dee085fcdc7db2", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/fc/42/8ad2896d59013850516d54f49b7d", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/d1/7c/c554ffc1f8c71bc08d4b025ccf4e", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/48/a9/94778472d1c43f556fee5e93c0ab", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/aa/f1/1c36c23d4d5bd6516adddc206514", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/af/76/63cfa6cc0915d35583bcaf30a2e0", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/2f/bb/8bfbea820878f58c5cb9cc702ff0", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/4b/06/d72c7d9965890905dd3291c7f2c6", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c1/02/c9cfaf45b9003df94a2a8e277075", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4c/47/a66e6ce399dc00ade26e761f876f", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/b4/a4/6c844726fc0fb13925622b754cc9", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/4b/39/91b9746101e23fd615424b1721e5", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/31/07/5e49d34cd8bc204fb38e920f133c", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/6d/b1/6c593726c41a32066ba34ccf2ff5", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/eb/f0/36d00e5087e6d76d79672b018cc8", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/f2/40/9f3c84455aac48d733b30df6b5b7", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2e/d3/aeacdcc49c0a4954afef6755f560", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/86/b2/80a8128225146f9515ad45c73de1", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ca/59/cbb3fe58cbaabf413340dec12e1a", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ec/94/076e15d29f647b7eb6b902f37198", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/55/77/07c16135863548bf52cd4cf2b0db", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/0c/c0/9ccb23d2b58d57d66dfa95346b32", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ca/13/d71a2a3d204b62ec4cc23a54e384", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c7/f0/f8c0d2e3162111499f60806b29e6", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/66/82/8fdb20a2f00ea4920ec048193f97", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a1/fe/ddc0c3dd421f421494b8e6a0c0cd", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/18/7b/3ccdfcb541be04196f489d8517d6", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/2a/02/d4bb405140bda1c17517717adda8", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/54/74/53d8c3f6b0faa4518dbac71ddff6", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f7/76/1bd98e4b273ef56d9d4051b8e170", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/56/18/d70ca8c1ed2ad1c0d05d082da786", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/00/11/19c14108e432a9dfca5a9ef32ec2", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/a6/34/d209303ed932c0c1fb1c9b480103", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/6b/7b/9f4c160d3d0e6198089898741957", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/81/60/37044e17e52ca125c1d48af83d03", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fb/47/d505c3feea40888985dd335dc8c4", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4f/3d/20c78e744ac26a13b7418166d675", @@ -4031,14 +4031,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3b/79/592c41691e94807d23a783723861", "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/13/d9/36f4cf8527494f419db74ae6c78f", "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ee/e5/7f0677e6fb8d7cfa169930579712", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/8c/4c/3bb058268312359ad8be98f35d9a", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/0a/09/1708ba819095ed0d708fdf4db96a", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/51/79/b0cccbb7292b56b00a9298d1a22f", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/20/2a/30500076cd30d44260a8365c02b5", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/88/a2/ca9e4011d6fa8b366159838b53a1", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/af/b2/b3a702920a14288ceb1603f1f091", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/70/57/1c725a736ebba2035fe3a3ec64df", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/ba/b8/e952aa9d40f5453db0acd4361f10", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/f1/e9/a36a2743cc11e888e4d877341724", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/4b/cd/accbffc3bd13d11b4266cad62b44", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/91/c1/fe42b2d9442edffed30f42dbcb1e", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/3b/d3/dc7bf863a0f7a986f8c88024cbe7", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/2b/2a/13183d1ae34b5e46baf5c2cd51eb", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/0d/98/59f17b4afffc44e0fdd7bc3fd6de", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/7e/f0/1946bfea786757842991e01e7749", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/33/68/499d8ceb69645456ee7e25d93a3c", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8602aef4..37f2286c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20829, api 7, 2022-09-12) +### 1.7.7 (build 20831, api 7, 2022-09-12) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index fdd14841..340dae7a 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -38,7 +38,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20829 + expected_build = 20831 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/assets/assets_server.cc b/src/ballistica/assets/assets_server.cc index 815318c9..b905ca03 100644 --- a/src/ballistica/assets/assets_server.cc +++ b/src/ballistica/assets/assets_server.cc @@ -22,10 +22,10 @@ AssetsServer::AssetsServer() { } auto AssetsServer::OnAppStart() -> void { - thread_->PushCallSynchronous([this] { StartInThread(); }); + thread_->PushCallSynchronous([this] { OnAppStartInThread(); }); } -auto AssetsServer::StartInThread() -> void { +auto AssetsServer::OnAppStartInThread() -> void { assert(InAssetsThread()); // get our thread to give us periodic processing time... process_timer_ = diff --git a/src/ballistica/assets/assets_server.h b/src/ballistica/assets/assets_server.h index 1875c2d2..e9be2e6a 100644 --- a/src/ballistica/assets/assets_server.h +++ b/src/ballistica/assets/assets_server.h @@ -22,7 +22,7 @@ class AssetsServer { auto thread() const -> Thread* { return thread_; } private: - auto StartInThread() -> void; + auto OnAppStartInThread() -> void; void Process(); void WriteReplayMessages(); Thread* thread_{}; diff --git a/src/ballistica/audio/audio_server.cc b/src/ballistica/audio/audio_server.cc index 074ee8d4..21dcee95 100644 --- a/src/ballistica/audio/audio_server.cc +++ b/src/ballistica/audio/audio_server.cc @@ -331,10 +331,10 @@ AudioServer::AudioServer() : impl_{new AudioServer::Impl()} { } auto AudioServer::OnAppStart() -> void { - thread_->PushCallSynchronous([this] { StartInThread(); }); + thread_->PushCallSynchronous([this] { OnAppStartInThread(); }); } -auto AudioServer::StartInThread() -> void { +auto AudioServer::OnAppStartInThread() -> void { assert(InAudioThread()); thread()->AddPauseCallback(NewLambdaRunnableRaw([this] { OnThreadPause(); })); thread()->AddResumeCallback( diff --git a/src/ballistica/audio/audio_server.h b/src/ballistica/audio/audio_server.h index 4b9bad0c..9efb480a 100644 --- a/src/ballistica/audio/audio_server.h +++ b/src/ballistica/audio/audio_server.h @@ -70,7 +70,7 @@ class AudioServer { class ThreadSource; struct Impl; - auto StartInThread() -> void; + auto OnAppStartInThread() -> void; ~AudioServer(); auto OnThreadPause() -> void; diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 6e2515fe..e8964397 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20829; +const int kAppBuildNumber = 20831; const char* kAppVersion = "1.7.7"; // Our standalone globals. @@ -102,7 +102,8 @@ auto BallisticaMain(int argc, char** argv) -> int { g_app = new App(argc, argv); // Create a Thread wrapper around the current (main) thread. - g_main_thread = new Thread(ThreadIdentifier::kMain, ThreadType::kMain); + g_main_thread = + new Thread(ThreadIdentifier::kMain, ThreadSource::kWrapMain); Thread::UpdateMainThreadID(); // Bootstrap our Python environment as early as we can (depends on diff --git a/src/ballistica/core/thread.cc b/src/ballistica/core/thread.cc index 1b277acc..e7559344 100644 --- a/src/ballistica/core/thread.cc +++ b/src/ballistica/core/thread.cc @@ -95,24 +95,24 @@ void Thread::WaitForNextEvent(bool single_cycle) { millisecs_t wait_time = timers_.GetTimeToNextExpire(real_time); if (wait_time > 0) { std::unique_lock lock(thread_message_mutex_); - if (thread_message_count_ == 0) { + if (thread_messages_.empty()) { thread_message_cv_.wait_for(lock, std::chrono::milliseconds(wait_time), [this] { // Go back to sleep on spurious wakeups // if we didn't wind up with any new // messages. - return (thread_message_count_ > 0); + return !thread_messages_.empty(); }); } } } else { // Not running timers; just wait indefinitely for the next message. std::unique_lock lock(thread_message_mutex_); - if (thread_message_count_ == 0) { + if (thread_messages_.empty()) { thread_message_cv_.wait(lock, [this] { // Go back to sleep on spurious wakeups // (if we didn't wind up with any new messages). - return (thread_message_count_ > 0); + return !(thread_messages_.empty()); }); } } @@ -202,20 +202,16 @@ void Thread::GetThreadMessages(std::list* messages) { // Make sure they passed an empty one in. assert(messages->empty()); - if (thread_message_count_ > 0) { - std::unique_lock lock(thread_message_mutex_); - assert(thread_messages_.size() == thread_message_count_); + std::scoped_lock lock(thread_message_mutex_); + if (!thread_messages_.empty()) { messages->swap(thread_messages_); - thread_message_count_ = 0; } } -Thread::Thread(ThreadIdentifier identifier_in, ThreadType type_in) - : type_(type_in), identifier_(identifier_in) { - switch (type_) { - case ThreadType::kStandard: { - // Lock down until the thread is up and running. It'll unlock us when - // it's ready to go. +Thread::Thread(ThreadIdentifier identifier_in, ThreadSource source) + : source_(source), identifier_(identifier_in) { + switch (source_) { + case ThreadSource::kCreate: { int (*func)(void*); switch (identifier_) { case ThreadIdentifier::kLogic: @@ -254,7 +250,7 @@ Thread::Thread(ThreadIdentifier identifier_in, ThreadType type_in) break; } - case ThreadType::kMain: { + case ThreadSource::kWrapMain: { // We've got no thread of our own to launch // so we run our setup stuff right here instead of off in some. assert(std::this_thread::get_id() == g_app->main_thread_id); @@ -274,7 +270,7 @@ Thread::Thread(ThreadIdentifier identifier_in, ThreadType type_in) auto Thread::ThreadMain() -> int { try { - assert(type_ == ThreadType::kStandard); + assert(source_ == ThreadSource::kCreate); thread_id_ = std::this_thread::get_id(); const char* name; const char* id_string; @@ -321,10 +317,7 @@ auto Thread::ThreadMain() -> int { // Mark ourself as bootstrapped and signal listeners so // anyone waiting for us to spin up can move along. - { - std::scoped_lock lock(client_listener_mutex_); - bootstrapped_ = true; - } + bootstrapped_ = true; client_listener_cv_.notify_all(); // Now just run our loop until we die. @@ -358,14 +351,16 @@ auto Thread::ThreadMain() -> int { } void Thread::SetAcquiresPythonGIL() { + assert(!acquires_python_gil_); // This should be called exactly once. + assert(IsCurrent()); acquires_python_gil_ = true; g_python->AcquireGIL(); } // Explicitly kill the main thread. void Thread::Quit() { - assert(type_ == ThreadType::kMain); - if (type_ == ThreadType::kMain) { + assert(source_ == ThreadSource::kWrapMain); + if (source_ == ThreadSource::kWrapMain) { done_ = true; } } @@ -431,13 +426,10 @@ void Thread::PushThreadMessage(const ThreadMessage& t) { // Plop the data on to the list; we're assuming the mutex is locked. thread_messages_.push_back(t); - // Keep our own count; apparently size() on an stl list involves - // iterating. + // Keep our own count; apparently size() on an stl list involves iterating. // FIXME: Actually I don't think this is the case anymore; should check. - thread_message_count_++; - assert(thread_message_count_ == thread_messages_.size()); - // Show message count states. + // Debugging: show message count states. if (explicit_bool(false)) { static int one_off = 0; static int foo = 0; @@ -445,7 +437,7 @@ void Thread::PushThreadMessage(const ThreadMessage& t) { one_off++; // Show momemtary spikes. - if (thread_message_count_ > 100 && one_off > 100) { + if (thread_messages_.size() > 100 && one_off > 100) { one_off = 0; foo = 999; } @@ -453,11 +445,11 @@ void Thread::PushThreadMessage(const ThreadMessage& t) { // Show count periodically. if ((std::this_thread::get_id() == g_app->main_thread_id) && foo > 100) { foo = 0; - Log("MSG COUNT " + std::to_string(thread_message_count_)); + Log("MSG COUNT " + std::to_string(thread_messages_.size())); } } - if (thread_message_count_ > 1000) { + if (thread_messages_.size() > 1000) { static bool sent_error = false; if (!sent_error) { sent_error = true; @@ -468,9 +460,9 @@ void Thread::PushThreadMessage(const ThreadMessage& t) { } // Prevent runaway mem usage if the list gets out of control. - if (thread_message_count_ > 10000) { - throw Exception("KILLING APP: ThreadMessage list > 10000 in thread: " - + GetCurrentThreadName()); + if (thread_messages_.size() > 10000) { + FatalError("ThreadMessage list > 10000 in thread: " + + GetCurrentThreadName()); } // Unlock thread-message list and inform thread that there's something @@ -617,5 +609,12 @@ auto Thread::CheckPushSafety() -> bool { return CheckPushRunnableSafety(); } } +auto Thread::CheckPushRunnableSafety() -> bool { + std::scoped_lock lock(client_listener_mutex_); + + // We first complain when we get to 1000 queued messages so + // let's consider things unsafe when we're halfway there. + return (thread_messages_.size() < kThreadMessageSafetyThreshold); +} } // namespace ballistica diff --git a/src/ballistica/core/thread.h b/src/ballistica/core/thread.h index c994997c..df24bad4 100644 --- a/src/ballistica/core/thread.h +++ b/src/ballistica/core/thread.h @@ -24,7 +24,7 @@ const int kThreadMessageSafetyThreshold{500}; class Thread { public: explicit Thread(ThreadIdentifier id, - ThreadType type_in = ThreadType::kStandard); + ThreadSource source = ThreadSource::kCreate); virtual ~Thread(); auto ClearCurrentThreadName() -> void; @@ -57,12 +57,6 @@ class Thread { auto RunEventLoop(bool single_cycle = false) -> int; auto identifier() const -> ThreadIdentifier { return identifier_; } - auto CheckPushRunnableSafety() -> bool { - // We first complain when we get to 1000 queued messages so - // let's consider things unsafe when we're halfway there. - return (thread_message_count_ < kThreadMessageSafetyThreshold); - } - // Register a timer to run on the thread. auto NewTimer(millisecs_t length, bool repeat, const Object::Ref& runnable) -> Timer*; @@ -116,7 +110,7 @@ class Thread { explicit ThreadMessage(Type type, Runnable* runnable, bool* completion_flag) : type(type), runnable(runnable), completion_flag{completion_flag} {} }; - + auto CheckPushRunnableSafety() -> bool; auto SetInternalThreadName(const std::string& name) -> void; auto WaitForNextEvent(bool single_cycle) -> void; auto LoopUpkeep(bool once) -> void; @@ -132,7 +126,7 @@ class Thread { int messages_since_paused_{}; millisecs_t last_paused_message_report_time_{}; bool done_{}; - ThreadType type_; + ThreadSource source_; int listen_sd_{}; std::thread::id thread_id_{}; ThreadIdentifier identifier_{ThreadIdentifier::kInvalid}; @@ -162,7 +156,6 @@ class Thread { auto RunPauseCallbacks() -> void; auto RunResumeCallbacks() -> void; - int thread_message_count_{}; bool bootstrapped_{}; std::list> runnables_; std::list pause_callbacks_; diff --git a/src/ballistica/core/types.h b/src/ballistica/core/types.h index ab64b1d2..71ab11ef 100644 --- a/src/ballistica/core/types.h +++ b/src/ballistica/core/types.h @@ -986,11 +986,11 @@ enum class NodeAttributeType { kCollideModelArray }; -enum class ThreadType { +enum class ThreadSource { /// A normal thread spun up by us. - kStandard, + kCreate, /// For wrapping a ballistica thread around the existing main thread. - kMain + kWrapMain }; /// Used for module-thread identification. diff --git a/src/ballistica/logic/logic.cc b/src/ballistica/logic/logic.cc index 4a54876f..ce1a5456 100644 --- a/src/ballistica/logic/logic.cc +++ b/src/ballistica/logic/logic.cc @@ -76,23 +76,24 @@ Logic::Logic() // Spin up our thread. thread_ = new Thread(ThreadIdentifier::kLogic); g_app->pausable_threads.push_back(thread_); - // Our thread should hold the Python GIL by default. - // TODO(ericf): It could be better to have each individual Python call - // we make acquire the GIL. Then we're not holding it during long - // bits of C++ logic. - thread_->SetAcquiresPythonGIL(); } auto Logic::OnAppStart() -> void { - thread_->PushCallSynchronous([this] { StartInThread(); }); + thread_->PushCallSynchronous([this] { OnAppStartInThread(); }); } -auto Logic::StartInThread() -> void { +auto Logic::OnAppStartInThread() -> void { try { + // Our thread should hold the Python GIL any time it is running. + // TODO(ericf): It could be better to have each individual Python call + // we make acquire the GIL. Then we're not holding it during long + // bits of C++ logic. + thread_->SetAcquiresPythonGIL(); + // We want to be informed when our thread is pausing. thread()->AddPauseCallback( NewLambdaRunnableRaw([this] { OnThreadPause(); })); - g_ui->LogicThreadInit(); + g_ui->OnAppStart(); // Init python and apply our settings immediately. // This way we can get started loading stuff in the background diff --git a/src/ballistica/logic/logic.h b/src/ballistica/logic/logic.h index def5a310..7fcd4163 100644 --- a/src/ballistica/logic/logic.h +++ b/src/ballistica/logic/logic.h @@ -245,7 +245,7 @@ class Logic { auto thread() const -> Thread* { return thread_; } private: - auto StartInThread() -> void; + auto OnAppStartInThread() -> void; auto HandleQuitOnIdle() -> void; auto InitSpecialChars() -> void; auto Draw() -> void; diff --git a/src/ballistica/ui/ui.cc b/src/ballistica/ui/ui.cc index b33fe840..7ddf8c4b 100644 --- a/src/ballistica/ui/ui.cc +++ b/src/ballistica/ui/ui.cc @@ -52,7 +52,9 @@ UI::UI() { } } -auto UI::LogicThreadInit() -> void { +auto UI::OnAppStart() -> void { + assert(InLogicThread()); + root_ui_ = new RootUI(); // Make sure we know when forced-ui-scale is enabled. if (force_scale_) { diff --git a/src/ballistica/ui/ui.h b/src/ballistica/ui/ui.h index 08dd7228..95d3e537 100644 --- a/src/ballistica/ui/ui.h +++ b/src/ballistica/ui/ui.h @@ -31,7 +31,7 @@ namespace ballistica { class UI : public ContextTarget { public: UI(); - auto LogicThreadInit() -> void; + auto OnAppStart() -> void; ~UI() override; auto Reset() -> void; From 2a43584d5a5921af2150661947838724095fcf16 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 12 Sep 2022 14:19:23 -0700 Subject: [PATCH 13/40] beginning bits of scene versioning --- .efrocachemap | 56 +++++------ CHANGELOG.md | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- ballisticacore-cmake/CMakeLists.txt | 2 + .../Generic/BallisticaCoreGeneric.vcxproj | 2 + .../BallisticaCoreGeneric.vcxproj.filters | 7 ++ .../Headless/BallisticaCoreHeadless.vcxproj | 2 + .../BallisticaCoreHeadless.vcxproj.filters | 7 ++ src/ballistica/ballistica.cc | 11 +-- src/ballistica/ballistica.h | 1 + src/ballistica/core/types.h | 1 + src/ballistica/scene/scene.cc | 89 ----------------- src/ballistica/scene/scene.h | 4 - src/ballistica/scene/v1/scene_v1.cc | 96 +++++++++++++++++++ src/ballistica/scene/v1/scene_v1.h | 16 ++++ 15 files changed, 169 insertions(+), 129 deletions(-) create mode 100644 src/ballistica/scene/v1/scene_v1.cc create mode 100644 src/ballistica/scene/v1/scene_v1.h diff --git a/.efrocachemap b/.efrocachemap index c5a2542a..75ad56fa 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/eb/f0/36d00e5087e6d76d79672b018cc8", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/f2/40/9f3c84455aac48d733b30df6b5b7", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2e/d3/aeacdcc49c0a4954afef6755f560", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/86/b2/80a8128225146f9515ad45c73de1", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ca/59/cbb3fe58cbaabf413340dec12e1a", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ec/94/076e15d29f647b7eb6b902f37198", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/55/77/07c16135863548bf52cd4cf2b0db", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/0c/c0/9ccb23d2b58d57d66dfa95346b32", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ca/13/d71a2a3d204b62ec4cc23a54e384", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c7/f0/f8c0d2e3162111499f60806b29e6", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/66/82/8fdb20a2f00ea4920ec048193f97", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a1/fe/ddc0c3dd421f421494b8e6a0c0cd", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/18/7b/3ccdfcb541be04196f489d8517d6", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/2a/02/d4bb405140bda1c17517717adda8", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/54/74/53d8c3f6b0faa4518dbac71ddff6", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f7/76/1bd98e4b273ef56d9d4051b8e170", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/56/18/d70ca8c1ed2ad1c0d05d082da786", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/00/11/19c14108e432a9dfca5a9ef32ec2", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/a6/34/d209303ed932c0c1fb1c9b480103", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/6b/7b/9f4c160d3d0e6198089898741957", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/f2/08/c51a835abdfb830800214b5d4ee2", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/29/86/d7dbef8da1cbf6a2227679baab80", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/0a/a1/7fc60dfb937f3aac13386368dc56", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f3/4f/90c63ed7c3ac40a666946d83e61c", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/02/fc/63aaa0249b27e36c5e33391ac301", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d3/ad/5788ce11e94538cea04c48dc3ef0", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/69/12/9dbc452fe20c0f092cf39d50c77f", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f9/33/cf16d5d6c40efbc185a474b9a701", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/10/e6/5c8896149d987ea44b4daf8a6b30", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/2f/46/22652fbf1e6d8644381fa6907fa2", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/7a/08/d71c945cffd15214e889af6ae86d", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9c/9f/8fdc621bd6589bf85dad88cb1e7c", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b5/25/f58dd573f8fd0ed2bce92468d2eb", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a2/c8/8abb7f6cf9cca43d4341ba4a0359", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/bc/ed/796ba1a0004b208ac462e7fc022b", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/21/38/dff36d635433f885c46fed606956", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a0/e3/8a438b7be97ea9b5e3a3108014bf", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/f8/8a/33f28e4746adac552e0f65d85b06", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/d0/1b/56a99ad953586b701e238a341d51", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/5e/4c/5082c1b732784f50b30d453bbed9", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/81/60/37044e17e52ca125c1d48af83d03", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fb/47/d505c3feea40888985dd335dc8c4", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4f/3d/20c78e744ac26a13b7418166d675", @@ -4031,14 +4031,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3b/79/592c41691e94807d23a783723861", "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/13/d9/36f4cf8527494f419db74ae6c78f", "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ee/e5/7f0677e6fb8d7cfa169930579712", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/f1/e9/a36a2743cc11e888e4d877341724", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/4b/cd/accbffc3bd13d11b4266cad62b44", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/91/c1/fe42b2d9442edffed30f42dbcb1e", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/3b/d3/dc7bf863a0f7a986f8c88024cbe7", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/2b/2a/13183d1ae34b5e46baf5c2cd51eb", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/0d/98/59f17b4afffc44e0fdd7bc3fd6de", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/7e/f0/1946bfea786757842991e01e7749", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/33/68/499d8ceb69645456ee7e25d93a3c", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/9f/5f/8e3d43b1d7c21afc621998c549da", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/33/b5/23da6c12e960e583cb98072ad637", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/43/04/136cab4b0edf4feafae6c279c977", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/95/f7/41e8fe3e7a8ab6786ee5ed4956c2", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/b4/a1/2a5fa558d0bdcc34e6c14b819bea", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/1c/c9/aa2a975716b79c79801d61ecfb54", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/d5/8c/e96d8b68d3c217fa43ce357980df", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/0d/d2/3c11d620c85cc775d284cc9d79c1", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 37f2286c..07b0c8b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20831, api 7, 2022-09-12) +### 1.7.7 (build 20833, api 7, 2022-09-12) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 340dae7a..d31e3ae2 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -38,7 +38,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20831 + expected_build = 20833 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/ballisticacore-cmake/CMakeLists.txt b/ballisticacore-cmake/CMakeLists.txt index 8311aaf2..77deaf38 100644 --- a/ballisticacore-cmake/CMakeLists.txt +++ b/ballisticacore-cmake/CMakeLists.txt @@ -637,6 +637,8 @@ add_executable(ballisticacore ${BA_SRC_ROOT}/ballistica/scene/scene.h ${BA_SRC_ROOT}/ballistica/scene/scene_stream.cc ${BA_SRC_ROOT}/ballistica/scene/scene_stream.h + ${BA_SRC_ROOT}/ballistica/scene/v1/scene_v1.cc + ${BA_SRC_ROOT}/ballistica/scene/v1/scene_v1.h ${BA_SRC_ROOT}/ballistica/ui/console.cc ${BA_SRC_ROOT}/ballistica/ui/console.h ${BA_SRC_ROOT}/ballistica/ui/root_ui.cc diff --git a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj index ba959b23..8f4b7c5a 100644 --- a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj +++ b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj @@ -628,6 +628,8 @@ + + diff --git a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters index cd16c516..4430ba75 100644 --- a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters +++ b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters @@ -1318,6 +1318,12 @@ ballistica\scene + + ballistica\scene\v1 + + + ballistica\scene\v1 + ballistica\ui @@ -1677,6 +1683,7 @@ + diff --git a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj index c6adfba9..f1654fcf 100644 --- a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj +++ b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj @@ -623,6 +623,8 @@ + + diff --git a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters index cd16c516..4430ba75 100644 --- a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters +++ b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters @@ -1318,6 +1318,12 @@ ballistica\scene + + ballistica\scene\v1 + + + ballistica\scene\v1 + ballistica\ui @@ -1677,6 +1683,7 @@ + diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index e8964397..90d12bc4 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -10,11 +10,9 @@ #include "ballistica/assets/assets_server.h" #include "ballistica/audio/audio.h" #include "ballistica/audio/audio_server.h" -#include "ballistica/core/context.h" #include "ballistica/core/fatal_error.h" #include "ballistica/core/logging.h" #include "ballistica/core/thread.h" -#include "ballistica/dynamics/bg/bg_dynamics.h" #include "ballistica/dynamics/bg/bg_dynamics_server.h" #include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/text/text_graphics.h" @@ -27,12 +25,13 @@ #include "ballistica/platform/stdio_console.h" #include "ballistica/python/python.h" #include "ballistica/scene/scene.h" +#include "ballistica/scene/v1/scene_v1.h" #include "ballistica/ui/ui.h" namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20831; +const int kAppBuildNumber = 20833; const char* kAppVersion = "1.7.7"; // Our standalone globals. @@ -62,6 +61,7 @@ NetworkReader* g_network_reader{}; NetworkWriter* g_network_writer{}; Platform* g_platform{}; Python* g_python{}; +SceneV1* g_scene_v1{}; StdioConsole* g_stdio_console{}; TextGraphics* g_text_graphics{}; UI* g_ui{}; @@ -104,7 +104,6 @@ auto BallisticaMain(int argc, char** argv) -> int { // Create a Thread wrapper around the current (main) thread. g_main_thread = new Thread(ThreadIdentifier::kMain, ThreadSource::kWrapMain); - Thread::UpdateMainThreadID(); // Bootstrap our Python environment as early as we can (depends on // g_platform for locating OS-specific paths). @@ -131,7 +130,7 @@ auto BallisticaMain(int argc, char** argv) -> int { g_input = new Input(); g_app_internal = CreateAppInternal(); g_logic = new Logic(); - Scene::Init(); + g_scene_v1 = new SceneV1(); if (!HeadlessMode()) { g_bg_dynamics = new BGDynamics(); g_bg_dynamics_server = new BGDynamicsServer(); @@ -140,7 +139,7 @@ auto BallisticaMain(int argc, char** argv) -> int { g_stdio_console = new StdioConsole(); } - // Ok at this point we can be considered up-and-running. + // At this point all of our globals should exist. g_app->is_bootstrapped = true; // ------------------------------------------------------------------------- diff --git a/src/ballistica/ballistica.h b/src/ballistica/ballistica.h index f68705fb..eaab6d8b 100644 --- a/src/ballistica/ballistica.h +++ b/src/ballistica/ballistica.h @@ -125,6 +125,7 @@ extern NetworkReader* g_network_reader; extern NetworkWriter* g_network_writer; extern Platform* g_platform; extern Python* g_python; +extern SceneV1* g_scene_v1; extern StdioConsole* g_stdio_console; extern TextGraphics* g_text_graphics; extern UI* g_ui; diff --git a/src/ballistica/core/types.h b/src/ballistica/core/types.h index 71ab11ef..1519352d 100644 --- a/src/ballistica/core/types.h +++ b/src/ballistica/core/types.h @@ -162,6 +162,7 @@ class RootUI; class RootWidget; class Runnable; class Scene; +class SceneV1; class SceneStream; class ScoreToBeat; class SDLApp; diff --git a/src/ballistica/scene/scene.cc b/src/ballistica/scene/scene.cc index a77ce3ff..2f1acc65 100644 --- a/src/ballistica/scene/scene.cc +++ b/src/ballistica/scene/scene.cc @@ -5,107 +5,18 @@ #include "ballistica/app/app.h" #include "ballistica/assets/component/sound.h" #include "ballistica/audio/audio.h" -#include "ballistica/dynamics/bg/bg_dynamics.h" #include "ballistica/dynamics/dynamics.h" -#include "ballistica/dynamics/part.h" #include "ballistica/graphics/camera.h" -#include "ballistica/graphics/graphics.h" -#include "ballistica/input/device/input_device.h" -#include "ballistica/logic/player.h" #include "ballistica/networking/networking.h" #include "ballistica/python/python_context_call.h" -#include "ballistica/scene/node/anim_curve_node.h" #include "ballistica/scene/node/bomb_node.h" -#include "ballistica/scene/node/combine_node.h" -#include "ballistica/scene/node/explosion_node.h" -#include "ballistica/scene/node/flag_node.h" -#include "ballistica/scene/node/flash_node.h" -#include "ballistica/scene/node/globals_node.h" -#include "ballistica/scene/node/image_node.h" -#include "ballistica/scene/node/light_node.h" -#include "ballistica/scene/node/locator_node.h" -#include "ballistica/scene/node/math_node.h" #include "ballistica/scene/node/node_attribute_connection.h" -#include "ballistica/scene/node/null_node.h" #include "ballistica/scene/node/player_node.h" -#include "ballistica/scene/node/region_node.h" -#include "ballistica/scene/node/scorch_node.h" -#include "ballistica/scene/node/session_globals_node.h" -#include "ballistica/scene/node/shield_node.h" -#include "ballistica/scene/node/sound_node.h" -#include "ballistica/scene/node/spaz_node.h" -#include "ballistica/scene/node/terrain_node.h" #include "ballistica/scene/node/text_node.h" -#include "ballistica/scene/node/texture_sequence_node.h" -#include "ballistica/scene/node/time_display_node.h" #include "ballistica/scene/scene_stream.h" namespace ballistica { -void Scene::Init() { - NodeType* node_types[] = {NullNode::InitType(), - GlobalsNode::InitType(), - SessionGlobalsNode::InitType(), - PropNode::InitType(), - FlagNode::InitType(), - BombNode::InitType(), - ExplosionNode::InitType(), - ShieldNode::InitType(), - LightNode::InitType(), - TextNode::InitType(), - AnimCurveNode::InitType(), - ImageNode::InitType(), - TerrainNode::InitType(), - MathNode::InitType(), - LocatorNode::InitType(), - PlayerNode::InitType(), - CombineNode::InitType(), - SoundNode::InitType(), - SpazNode::InitType(), - RegionNode::InitType(), - ScorchNode::InitType(), - FlashNode::InitType(), - TextureSequenceNode::InitType(), - TimeDisplayNode::InitType()}; - - int next_type_id = 0; - assert(g_app != nullptr); - for (auto* t : node_types) { - g_app->node_types[t->name()] = t; - g_app->node_types_by_id[next_type_id] = t; - t->set_id(next_type_id++); - } - - // Types: I is 32 bit int, i is 16 bit int, c is 8 bit int, - // F is 32 bit float, f is 16 bit float, - // s is string, b is bool. - SetupNodeMessageType("flash", NodeMessageType::kFlash, ""); - SetupNodeMessageType("footing", NodeMessageType::kFooting, "c"); - SetupNodeMessageType("impulse", NodeMessageType::kImpulse, "fffffffffifff"); - SetupNodeMessageType("kick_back", NodeMessageType::kKickback, "fffffff"); - SetupNodeMessageType("celebrate", NodeMessageType::kCelebrate, "i"); - SetupNodeMessageType("celebrate_l", NodeMessageType::kCelebrateL, "i"); - SetupNodeMessageType("celebrate_r", NodeMessageType::kCelebrateR, "i"); - SetupNodeMessageType("knockout", NodeMessageType::kKnockout, "f"); - SetupNodeMessageType("hurt_sound", NodeMessageType::kHurtSound, ""); - SetupNodeMessageType("picked_up", NodeMessageType::kPickedUp, ""); - SetupNodeMessageType("jump_sound", NodeMessageType::kJumpSound, ""); - SetupNodeMessageType("attack_sound", NodeMessageType::kAttackSound, ""); - SetupNodeMessageType("scream_sound", NodeMessageType::kScreamSound, ""); - SetupNodeMessageType("stand", NodeMessageType::kStand, "ffff"); -} - -void Scene::SetupNodeMessageType(const std::string& name, NodeMessageType val, - const std::string& format) { - assert(g_app != nullptr); - g_app->node_message_types[name] = val; - assert(static_cast(val) >= 0); - if (g_app->node_message_formats.size() <= static_cast(val)) { - g_app->node_message_formats.resize(static_cast(val) + 1); - } - g_app->node_message_formats[static_cast(val)] = format; -} - auto Scene::GetSceneStream() const -> SceneStream* { return output_stream_.get(); } diff --git a/src/ballistica/scene/scene.h b/src/ballistica/scene/scene.h index 9f7dbf92..e9557eee 100644 --- a/src/ballistica/scene/scene.h +++ b/src/ballistica/scene/scene.h @@ -15,7 +15,6 @@ namespace ballistica { class Scene : public Object { public: - static auto Init() -> void; explicit Scene(millisecs_t starttime); ~Scene() override; auto Step() -> void; @@ -85,9 +84,6 @@ class Scene : public Object { auto set_globals_node(GlobalsNode* node) -> void { globals_node_ = node; } private: - static auto SetupNodeMessageType(const std::string& name, NodeMessageType val, - const std::string& format) -> void; - GlobalsNode* globals_node_{}; // Current globals node (if any). std::unordered_map > player_nodes_; int64_t stream_id_{-1}; diff --git a/src/ballistica/scene/v1/scene_v1.cc b/src/ballistica/scene/v1/scene_v1.cc new file mode 100644 index 00000000..ad532926 --- /dev/null +++ b/src/ballistica/scene/v1/scene_v1.cc @@ -0,0 +1,96 @@ +// Released under the MIT License. See LICENSE for details. + +#include "ballistica/scene/v1/scene_v1.h" + +#include "ballistica/app/app.h" +#include "ballistica/scene/node/anim_curve_node.h" +#include "ballistica/scene/node/bomb_node.h" +#include "ballistica/scene/node/combine_node.h" +#include "ballistica/scene/node/explosion_node.h" +#include "ballistica/scene/node/flag_node.h" +#include "ballistica/scene/node/flash_node.h" +#include "ballistica/scene/node/globals_node.h" +#include "ballistica/scene/node/image_node.h" +#include "ballistica/scene/node/light_node.h" +#include "ballistica/scene/node/locator_node.h" +#include "ballistica/scene/node/math_node.h" +#include "ballistica/scene/node/null_node.h" +#include "ballistica/scene/node/player_node.h" +#include "ballistica/scene/node/region_node.h" +#include "ballistica/scene/node/scorch_node.h" +#include "ballistica/scene/node/session_globals_node.h" +#include "ballistica/scene/node/shield_node.h" +#include "ballistica/scene/node/sound_node.h" +#include "ballistica/scene/node/spaz_node.h" +#include "ballistica/scene/node/terrain_node.h" +#include "ballistica/scene/node/text_node.h" +#include "ballistica/scene/node/texture_sequence_node.h" +#include "ballistica/scene/node/time_display_node.h" + +namespace ballistica { + +static void SetupNodeMessageType(const std::string& name, NodeMessageType val, + const std::string& format) { + assert(g_app != nullptr); + g_app->node_message_types[name] = val; + assert(static_cast(val) >= 0); + if (g_app->node_message_formats.size() <= static_cast(val)) { + g_app->node_message_formats.resize(static_cast(val) + 1); + } + g_app->node_message_formats[static_cast(val)] = format; +} + +SceneV1::SceneV1() { + NodeType* node_types[] = {NullNode::InitType(), + GlobalsNode::InitType(), + SessionGlobalsNode::InitType(), + PropNode::InitType(), + FlagNode::InitType(), + BombNode::InitType(), + ExplosionNode::InitType(), + ShieldNode::InitType(), + LightNode::InitType(), + TextNode::InitType(), + AnimCurveNode::InitType(), + ImageNode::InitType(), + TerrainNode::InitType(), + MathNode::InitType(), + LocatorNode::InitType(), + PlayerNode::InitType(), + CombineNode::InitType(), + SoundNode::InitType(), + SpazNode::InitType(), + RegionNode::InitType(), + ScorchNode::InitType(), + FlashNode::InitType(), + TextureSequenceNode::InitType(), + TimeDisplayNode::InitType()}; + + int next_type_id = 0; + assert(g_app != nullptr); + for (auto* t : node_types) { + g_app->node_types[t->name()] = t; + g_app->node_types_by_id[next_type_id] = t; + t->set_id(next_type_id++); + } + + // Types: I is 32 bit int, i is 16 bit int, c is 8 bit int, + // F is 32 bit float, f is 16 bit float, + // s is string, b is bool. + SetupNodeMessageType("flash", NodeMessageType::kFlash, ""); + SetupNodeMessageType("footing", NodeMessageType::kFooting, "c"); + SetupNodeMessageType("impulse", NodeMessageType::kImpulse, "fffffffffifff"); + SetupNodeMessageType("kick_back", NodeMessageType::kKickback, "fffffff"); + SetupNodeMessageType("celebrate", NodeMessageType::kCelebrate, "i"); + SetupNodeMessageType("celebrate_l", NodeMessageType::kCelebrateL, "i"); + SetupNodeMessageType("celebrate_r", NodeMessageType::kCelebrateR, "i"); + SetupNodeMessageType("knockout", NodeMessageType::kKnockout, "f"); + SetupNodeMessageType("hurt_sound", NodeMessageType::kHurtSound, ""); + SetupNodeMessageType("picked_up", NodeMessageType::kPickedUp, ""); + SetupNodeMessageType("jump_sound", NodeMessageType::kJumpSound, ""); + SetupNodeMessageType("attack_sound", NodeMessageType::kAttackSound, ""); + SetupNodeMessageType("scream_sound", NodeMessageType::kScreamSound, ""); + SetupNodeMessageType("stand", NodeMessageType::kStand, "ffff"); +} + +} // namespace ballistica diff --git a/src/ballistica/scene/v1/scene_v1.h b/src/ballistica/scene/v1/scene_v1.h new file mode 100644 index 00000000..ffed4963 --- /dev/null +++ b/src/ballistica/scene/v1/scene_v1.h @@ -0,0 +1,16 @@ +// Released under the MIT License. See LICENSE for details. + +#ifndef BALLISTICA_SCENE_V1_SCENE_V1_H_ +#define BALLISTICA_SCENE_V1_SCENE_V1_H_ + +namespace ballistica { + +// Overall scene subsystem. +class SceneV1 { + public: + SceneV1(); +}; + +} // namespace ballistica + +#endif // BALLISTICA_SCENE_V1_SCENE_V1_H_ From 175232037c873d13f8804ac7ff7e4ff5837a98d8 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 12 Sep 2022 15:44:59 -0700 Subject: [PATCH 14/40] yup, even more c++ tidying --- .efrocachemap | 56 +++++++-------- CHANGELOG.md | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/assets/assets_server.cc | 2 +- .../assets/data/model_renderer_data.h | 4 +- .../assets/data/texture_renderer_data.h | 4 +- src/ballistica/audio/audio_server.cc | 9 ++- src/ballistica/audio/audio_streamer.h | 4 +- src/ballistica/ballistica.cc | 69 ++++++++----------- src/ballistica/core/object.cc | 36 +++++----- src/ballistica/core/object.h | 10 +-- src/ballistica/core/thread.cc | 32 ++++----- src/ballistica/core/thread.h | 7 +- src/ballistica/core/types.h | 2 +- .../dynamics/bg/bg_dynamics_server.cc | 2 +- .../dynamics/bg/bg_dynamics_server.h | 4 +- .../dynamics/material/material_component.h | 4 +- src/ballistica/graphics/framebuffer.h | 4 +- src/ballistica/graphics/gl/renderer_gl.cc | 4 +- src/ballistica/graphics/render_target.h | 4 +- src/ballistica/logic/logic.cc | 10 +-- src/ballistica/networking/network_writer.cc | 2 +- src/ballistica/platform/stdio_console.cc | 2 +- 23 files changed, 130 insertions(+), 145 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 75ad56fa..bbdcf9ba 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/f2/08/c51a835abdfb830800214b5d4ee2", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/29/86/d7dbef8da1cbf6a2227679baab80", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/0a/a1/7fc60dfb937f3aac13386368dc56", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f3/4f/90c63ed7c3ac40a666946d83e61c", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/02/fc/63aaa0249b27e36c5e33391ac301", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d3/ad/5788ce11e94538cea04c48dc3ef0", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/69/12/9dbc452fe20c0f092cf39d50c77f", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f9/33/cf16d5d6c40efbc185a474b9a701", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/10/e6/5c8896149d987ea44b4daf8a6b30", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/2f/46/22652fbf1e6d8644381fa6907fa2", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/7a/08/d71c945cffd15214e889af6ae86d", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9c/9f/8fdc621bd6589bf85dad88cb1e7c", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b5/25/f58dd573f8fd0ed2bce92468d2eb", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a2/c8/8abb7f6cf9cca43d4341ba4a0359", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/bc/ed/796ba1a0004b208ac462e7fc022b", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/21/38/dff36d635433f885c46fed606956", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a0/e3/8a438b7be97ea9b5e3a3108014bf", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/f8/8a/33f28e4746adac552e0f65d85b06", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/d0/1b/56a99ad953586b701e238a341d51", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/5e/4c/5082c1b732784f50b30d453bbed9", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c9/9b/1988356c188605d63adfd726ae70", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/90/20/7847611202aae8f7f25f81e11798", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f1/d3/8b4f9456fde946a6f832a0a2ed56", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9c/f3/a87ed66a967361270c38501207ca", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/53/2d/f237861e70f755bd2a1bc3ff0bc9", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/1d/c0/f17e88adfa27445f56f349c08e1e", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/33/48/b87e86d797ea65f9088cebf19c41", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1d/7d/f7666c243f12b032e0473fe96c8e", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/16/ab/b98796b9f947d710cef4f69e1e54", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/28/ba/6ce4a4dd0c164173746b8890f7e9", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ba/c2/da7fc794b8d1b2a3c507acc05c74", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5c/6e/3b8ab35122b48710216c3331ed4a", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/9d/6d/9c828387ca8ce579e2eb04ac60e9", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3c/8d/7e5873dfcb1a7d7afedb4931b4ef", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/93/15/13337ede73eb44cbdf1bd3b33b30", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/28/c4/369e1ee38f63fba86bde9b62d1a8", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/8f/14/c9302e20d2959adc852dc375bdce", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/c5/cf/220527d9a07378862117ebde3bf4", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/99/4d/6db8b3fb6d3cb45154312bb59cd2", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/43/64/57681573e37a5c29801ca7e931a4", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/81/60/37044e17e52ca125c1d48af83d03", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fb/47/d505c3feea40888985dd335dc8c4", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4f/3d/20c78e744ac26a13b7418166d675", @@ -4031,14 +4031,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3b/79/592c41691e94807d23a783723861", "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/13/d9/36f4cf8527494f419db74ae6c78f", "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ee/e5/7f0677e6fb8d7cfa169930579712", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/9f/5f/8e3d43b1d7c21afc621998c549da", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/33/b5/23da6c12e960e583cb98072ad637", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/43/04/136cab4b0edf4feafae6c279c977", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/95/f7/41e8fe3e7a8ab6786ee5ed4956c2", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/b4/a1/2a5fa558d0bdcc34e6c14b819bea", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/1c/c9/aa2a975716b79c79801d61ecfb54", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/d5/8c/e96d8b68d3c217fa43ce357980df", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/0d/d2/3c11d620c85cc775d284cc9d79c1", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/77/3f/53e29b476834c1e00b1ed0934b82", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/0a/6f/612238de640a2da2501e4bd29d3d", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/bf/36/218291ca0b4fd005e76261fc2279", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/42/13/58a6b20bbe3e72ff3b055e025fb8", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/7d/a6/268f90b14807bb1740cd2ac65bd5", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/fe/78/35e0537296a08c6516a82417fba4", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/b7/5f/41d33fe421bd61e85e54a967c1b4", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/1f/b1/6897e3bb590a95dcf85316f286e1", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 07b0c8b5..234bf75a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20833, api 7, 2022-09-12) +### 1.7.7 (build 20835, api 7, 2022-09-12) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index d31e3ae2..955bc20b 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -38,7 +38,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20833 + expected_build = 20835 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/assets/assets_server.cc b/src/ballistica/assets/assets_server.cc index b905ca03..733e9b35 100644 --- a/src/ballistica/assets/assets_server.cc +++ b/src/ballistica/assets/assets_server.cc @@ -17,7 +17,7 @@ AssetsServer::AssetsServer() { assert(g_assets_server == nullptr); // Spin up our thread. - thread_ = new Thread(ThreadIdentifier::kAssets); + thread_ = new Thread(ThreadTag::kAssets); g_app->pausable_threads.push_back(thread_); } diff --git a/src/ballistica/assets/data/model_renderer_data.h b/src/ballistica/assets/data/model_renderer_data.h index d2ac255b..4128e465 100644 --- a/src/ballistica/assets/data/model_renderer_data.h +++ b/src/ballistica/assets/data/model_renderer_data.h @@ -11,8 +11,8 @@ namespace ballistica { // this is provided by the renderer class ModelRendererData : public Object { public: - auto GetDefaultOwnerThread() const -> ThreadIdentifier override { - return ThreadIdentifier::kMain; + auto GetDefaultOwnerThread() const -> ThreadTag override { + return ThreadTag::kMain; } }; diff --git a/src/ballistica/assets/data/texture_renderer_data.h b/src/ballistica/assets/data/texture_renderer_data.h index 2538132c..f3467940 100644 --- a/src/ballistica/assets/data/texture_renderer_data.h +++ b/src/ballistica/assets/data/texture_renderer_data.h @@ -9,8 +9,8 @@ namespace ballistica { // this is extended by the renderer class TextureRendererData : public Object { public: - auto GetDefaultOwnerThread() const -> ThreadIdentifier override { - return ThreadIdentifier::kMain; + auto GetDefaultOwnerThread() const -> ThreadTag override { + return ThreadTag::kMain; } // Create the renderer data but don't load it in yet. diff --git a/src/ballistica/audio/audio_server.cc b/src/ballistica/audio/audio_server.cc index 21dcee95..86d02fb8 100644 --- a/src/ballistica/audio/audio_server.cc +++ b/src/ballistica/audio/audio_server.cc @@ -87,7 +87,7 @@ class AudioServer::ThreadSource : public Object { return (play_count_ << 16u) | (static_cast(id_) & 0xFFFFu); } void UpdateAvailability(); - auto GetDefaultOwnerThread() const -> ThreadIdentifier override; + auto GetDefaultOwnerThread() const -> ThreadTag override; auto client_source() const -> AudioSource* { return client_source_.get(); } auto source_sound() const -> SoundData* { return source_sound_ ? source_sound_->get() : nullptr; @@ -326,7 +326,7 @@ AudioServer::AudioServer() : impl_{new AudioServer::Impl()} { assert(g_audio_server == nullptr); // Spin up our thread. - thread_ = new Thread(ThreadIdentifier::kAudio); + thread_ = new Thread(ThreadTag::kAudio); g_app->pausable_threads.push_back(thread_); } @@ -746,9 +746,8 @@ AudioServer::ThreadSource::~ThreadSource() { #endif // BA_ENABLE_AUDIO } -auto AudioServer::ThreadSource::GetDefaultOwnerThread() const - -> ThreadIdentifier { - return ThreadIdentifier::kAudio; +auto AudioServer::ThreadSource::GetDefaultOwnerThread() const -> ThreadTag { + return ThreadTag::kAudio; } void AudioServer::ThreadSource::UpdateAvailability() { diff --git a/src/ballistica/audio/audio_streamer.h b/src/ballistica/audio/audio_streamer.h index 82ce85f0..15eb8012 100644 --- a/src/ballistica/audio/audio_streamer.h +++ b/src/ballistica/audio/audio_streamer.h @@ -15,8 +15,8 @@ namespace ballistica { // Provider for streamed audio data. class AudioStreamer : public Object { public: - auto GetDefaultOwnerThread() const -> ThreadIdentifier override { - return ThreadIdentifier::kAudio; + auto GetDefaultOwnerThread() const -> ThreadTag override { + return ThreadTag::kAudio; } AudioStreamer(const char* file_name, ALuint source, bool loop); ~AudioStreamer() override; diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 90d12bc4..84527f93 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -31,7 +31,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20833; +const int kAppBuildNumber = 20835; const char* kAppVersion = "1.7.7"; // Our standalone globals. @@ -39,23 +39,22 @@ const char* kAppVersion = "1.7.7"; // Everything else should go into App (or more ideally into a class). int g_early_log_writes{10}; -V1Account* g_v1_account{}; -AppConfig* g_app_config{}; App* g_app{}; +AppConfig* g_app_config{}; AppInternal* g_app_internal{}; AppFlavor* g_app_flavor{}; +Assets* g_assets{}; +AssetsServer* g_assets_server{}; Audio* g_audio{}; AudioServer* g_audio_server{}; BGDynamics* g_bg_dynamics{}; BGDynamicsServer* g_bg_dynamics_server{}; Context* g_context{}; -Logic* g_logic{}; Graphics* g_graphics{}; GraphicsServer* g_graphics_server{}; Input* g_input{}; +Logic* g_logic{}; Thread* g_main_thread{}; -Assets* g_assets{}; -AssetsServer* g_assets_server{}; Networking* g_networking{}; NetworkReader* g_network_reader{}; NetworkWriter* g_network_writer{}; @@ -66,22 +65,7 @@ StdioConsole* g_stdio_console{}; TextGraphics* g_text_graphics{}; UI* g_ui{}; Utils* g_utils{}; - -// Basic overview of our bootstrapping process: -// 1: All threads and globals are created and provisioned. Everything above -// should exist at the end of this step (if it is going to exist). -// Threads should not be talking to each other yet at this point. -// 2: The system is set in motion. The logic thread is told to load/apply the -// config. This event kicks off an initial-screen-creation message sent to -// the graphics-server thread. Other systems are informed that bootstrapping -// is complete and that they are free to talk to each other. Initial -// input-devices are added, asset loads can begin (at least ones not -// dependent on the screen/renderer), etc. -// 3: The initial screen is created on the graphics-server thread in response -// to the message sent from the game thread. A completion notice is sent -// back to the game thread when done. -// 4: Back on the game thread, any renderer-dependent asset-loads/etc. can begin -// and lastly the initial game session is kicked off. +V1Account* g_v1_account{}; auto BallisticaMain(int argc, char** argv) -> int { try { @@ -94,26 +78,19 @@ auto BallisticaMain(int argc, char** argv) -> int { } // ------------------------------------------------------------------------- - // Phase 1: Create and provision all globals. + // Phase 1: "The board is set." // ------------------------------------------------------------------------- - // Absolute bare-bones basics. + // Here we instantiate all of our globals. Code here should + // avoid any logic that accesses other globals since they may + // not yet exist. + g_platform = Platform::Create(); g_app = new App(argc, argv); - - // Create a Thread wrapper around the current (main) thread. - g_main_thread = - new Thread(ThreadIdentifier::kMain, ThreadSource::kWrapMain); - - // Bootstrap our Python environment as early as we can (depends on - // g_platform for locating OS-specific paths). + g_main_thread = new Thread(ThreadTag::kMain, ThreadSource::kWrapMain); g_python = new Python(); - - // Spin up our specific app and graphics variations (VR, headless, etc.) g_app_flavor = g_platform->CreateAppFlavor(); g_graphics = g_platform->CreateGraphics(); - - // Various other subsystems. g_graphics_server = new GraphicsServer(); g_audio = new Audio(); g_audio_server = new AudioServer(); @@ -138,14 +115,19 @@ auto BallisticaMain(int argc, char** argv) -> int { if (g_buildconfig.enable_stdio_console()) { g_stdio_console = new StdioConsole(); } - - // At this point all of our globals should exist. g_app->is_bootstrapped = true; // ------------------------------------------------------------------------- - // Phase 2: Set things in motion. + // Phase 2: "The pieces are moving." // ------------------------------------------------------------------------- + // Allow our subsystems to start doing work in their own threads + // and communicating with other subsystems. Note that we may still + // want to run some things serially here and ordering may be important + // (for instance we want to give our main thread a chance to register + // all initial input devices with the logic thread before the logic + // thread applies the current config to them). + g_logic->OnAppStart(); g_audio_server->OnAppStart(); g_assets_server->OnAppStart(); @@ -154,14 +136,19 @@ auto BallisticaMain(int argc, char** argv) -> int { if (g_stdio_console) { g_stdio_console->OnAppStart(); } - // Ok; now that we're bootstrapped, tell the game thread to read and apply - // the config which should kick off the real action. + + // As the last step of this phase, tell the logic thread to apply + // the app config which will kick off screen creation and otherwise + // get the ball rolling. g_logic->PushApplyConfigCall(); // ------------------------------------------------------------------------- - // Phase 3/4: Create a screen and/or kick off game (in other threads). + // Phase 3: "We come to it at last; the great battle of our time." // ------------------------------------------------------------------------- + // At this point all threads are off and running and we simply + // feed events until things end (or return and let the OS do that). + if (g_app_flavor->ManagesEventLoop()) { // On our event-loop-managing platforms we now simply sit in our event // loop until the app is quit. diff --git a/src/ballistica/core/object.cc b/src/ballistica/core/object.cc index 26b77b8b..dc194534 100644 --- a/src/ballistica/core/object.cc +++ b/src/ballistica/core/object.cc @@ -126,8 +126,8 @@ auto Object::GetObjectDescription() const -> std::string { + ">"; } -auto Object::GetDefaultOwnerThread() const -> ThreadIdentifier { - return ThreadIdentifier::kLogic; +auto Object::GetDefaultOwnerThread() const -> ThreadTag { + return ThreadTag::kLogic; } auto Object::GetThreadOwnership() const -> Object::ThreadOwnership { @@ -141,19 +141,19 @@ auto Object::GetThreadOwnership() const -> Object::ThreadOwnership { #if BA_DEBUG_BUILD -static auto GetCurrentThreadIdentifier() -> ThreadIdentifier { +static auto GetCurrentThreadTag() -> ThreadTag { if (InMainThread()) { - return ThreadIdentifier::kMain; + return ThreadTag::kMain; } else if (InLogicThread()) { - return ThreadIdentifier::kLogic; + return ThreadTag::kLogic; } else if (InAudioThread()) { - return ThreadIdentifier::kAudio; + return ThreadTag::kAudio; } else if (InNetworkWriteThread()) { - return ThreadIdentifier::kNetworkWrite; + return ThreadTag::kNetworkWrite; } else if (InAssetsThread()) { - return ThreadIdentifier::kAssets; + return ThreadTag::kAssets; } else if (InBGDynamicsThread()) { - return ThreadIdentifier::kBGDynamics; + return ThreadTag::kBGDynamics; } else { throw Exception(std::string("unrecognized thread: ") + GetCurrentThreadName()); @@ -166,8 +166,8 @@ auto Object::ObjectUpdateForAcquire() -> void { // If we're set to use the next-referencing thread and haven't set one // yet, do so. if (thread_ownership == ThreadOwnership::kNextReferencing - && owner_thread_ == ThreadIdentifier::kInvalid) { - owner_thread_ = GetCurrentThreadIdentifier(); + && owner_thread_ == ThreadTag::kInvalid) { + owner_thread_ = GetCurrentThreadTag(); } } @@ -178,7 +178,7 @@ auto Object::ObjectThreadCheck() -> void { ThreadOwnership thread_ownership = GetThreadOwnership(); - ThreadIdentifier t; + ThreadTag t; if (thread_ownership == ThreadOwnership::kClassDefault) { t = GetDefaultOwnerThread(); } else { @@ -189,32 +189,32 @@ auto Object::ObjectThreadCheck() -> void { + "; expected " THREADNAME " thread; got " \ + GetCurrentThreadName()) switch (t) { - case ThreadIdentifier::kMain: + case ThreadTag::kMain: if (!InMainThread()) { DO_FAIL("Main"); } break; - case ThreadIdentifier::kLogic: + case ThreadTag::kLogic: if (!InLogicThread()) { DO_FAIL("Logic"); } break; - case ThreadIdentifier::kAudio: + case ThreadTag::kAudio: if (!InAudioThread()) { DO_FAIL("Audio"); } break; - case ThreadIdentifier::kNetworkWrite: + case ThreadTag::kNetworkWrite: if (!InNetworkWriteThread()) { DO_FAIL("NetworkWrite"); } break; - case ThreadIdentifier::kAssets: + case ThreadTag::kAssets: if (!InAssetsThread()) { DO_FAIL("Assets"); } break; - case ThreadIdentifier::kBGDynamics: + case ThreadTag::kBGDynamics: if (!InBGDynamicsThread()) { DO_FAIL("BGDynamics"); } diff --git a/src/ballistica/core/object.h b/src/ballistica/core/object.h index 974e5e45..6847e43b 100644 --- a/src/ballistica/core/object.h +++ b/src/ballistica/core/object.h @@ -45,7 +45,7 @@ class Object { /// it can perform sanity-tests to make sure references are not being /// added at incorrect times or from incorrect threads. /// The default implementation uses the per-object - /// ThreadOwnership/ThreadIdentifier values accessible below. NOTE: this + /// ThreadOwnership/ThreadTag values accessible below. NOTE: this /// check runs only in the debug build so don't add any logical side-effects! virtual void ObjectThreadCheck(); @@ -59,15 +59,15 @@ class Object { /// Return the exact thread to check for with ThreadOwnership::kClassDefault /// (in the default ObjectThreadCheck implementation at least). - /// Default returns ThreadIdentifier::kLogic - virtual auto GetDefaultOwnerThread() const -> ThreadIdentifier; + /// Default returns ThreadTag::kLogic + virtual auto GetDefaultOwnerThread() const -> ThreadTag; /// Set thread ownership for an individual object. void SetThreadOwnership(ThreadOwnership ownership) { #if BA_DEBUG_BUILD thread_ownership_ = ownership; if (thread_ownership_ == ThreadOwnership::kNextReferencing) { - owner_thread_ = ThreadIdentifier::kInvalid; + owner_thread_ = ThreadTag::kInvalid; } #endif } @@ -560,7 +560,7 @@ class Object { Object* object_next_{}; Object* object_prev_{}; ThreadOwnership thread_ownership_{ThreadOwnership::kClassDefault}; - ThreadIdentifier owner_thread_{ThreadIdentifier::kInvalid}; + ThreadTag owner_thread_{ThreadTag::kInvalid}; bool thread_checks_enabled_{true}; millisecs_t object_birth_time_{}; bool object_printed_warning_{}; diff --git a/src/ballistica/core/thread.cc b/src/ballistica/core/thread.cc index e7559344..805faef9 100644 --- a/src/ballistica/core/thread.cc +++ b/src/ballistica/core/thread.cc @@ -208,31 +208,31 @@ void Thread::GetThreadMessages(std::list* messages) { } } -Thread::Thread(ThreadIdentifier identifier_in, ThreadSource source) +Thread::Thread(ThreadTag identifier_in, ThreadSource source) : source_(source), identifier_(identifier_in) { switch (source_) { case ThreadSource::kCreate: { int (*func)(void*); switch (identifier_) { - case ThreadIdentifier::kLogic: + case ThreadTag::kLogic: func = RunLogicThread; break; - case ThreadIdentifier::kAssets: + case ThreadTag::kAssets: func = RunAssetsThread; break; - case ThreadIdentifier::kMain: + case ThreadTag::kMain: // Shouldn't happen; this thread gets wrapped; not launched. throw Exception(); - case ThreadIdentifier::kAudio: + case ThreadTag::kAudio: func = RunAudioThread; break; - case ThreadIdentifier::kBGDynamics: + case ThreadTag::kBGDynamics: func = RunBGDynamicThread; break; - case ThreadIdentifier::kNetworkWrite: + case ThreadTag::kNetworkWrite: func = RunNetworkWriteThread; break; - case ThreadIdentifier::kStdin: + case ThreadTag::kStdin: func = RunStdInputThread; break; default: @@ -276,35 +276,35 @@ auto Thread::ThreadMain() -> int { const char* id_string; switch (identifier_) { - case ThreadIdentifier::kLogic: + case ThreadTag::kLogic: name = "logic"; id_string = "ballistica logic"; break; - case ThreadIdentifier::kStdin: + case ThreadTag::kStdin: name = "stdin"; id_string = "ballistica stdin"; break; - case ThreadIdentifier::kAssets: + case ThreadTag::kAssets: name = "assets"; id_string = "ballistica assets"; break; - case ThreadIdentifier::kFileOut: + case ThreadTag::kFileOut: name = "fileout"; id_string = "ballistica file-out"; break; - case ThreadIdentifier::kMain: + case ThreadTag::kMain: name = "main"; id_string = "ballistica main"; break; - case ThreadIdentifier::kAudio: + case ThreadTag::kAudio: name = "audio"; id_string = "ballistica audio"; break; - case ThreadIdentifier::kBGDynamics: + case ThreadTag::kBGDynamics: name = "bgdynamics"; id_string = "ballistica bg-dynamics"; break; - case ThreadIdentifier::kNetworkWrite: + case ThreadTag::kNetworkWrite: name = "networkwrite"; id_string = "ballistica network writing"; break; diff --git a/src/ballistica/core/thread.h b/src/ballistica/core/thread.h index df24bad4..1a007e1e 100644 --- a/src/ballistica/core/thread.h +++ b/src/ballistica/core/thread.h @@ -23,8 +23,7 @@ const int kThreadMessageSafetyThreshold{500}; // A thread with a built-in event loop. class Thread { public: - explicit Thread(ThreadIdentifier id, - ThreadSource source = ThreadSource::kCreate); + explicit Thread(ThreadTag id, ThreadSource source = ThreadSource::kCreate); virtual ~Thread(); auto ClearCurrentThreadName() -> void; @@ -55,7 +54,7 @@ class Thread { void set_thread_id(std::thread::id id) { thread_id_ = id; } auto RunEventLoop(bool single_cycle = false) -> int; - auto identifier() const -> ThreadIdentifier { return identifier_; } + auto identifier() const -> ThreadTag { return identifier_; } // Register a timer to run on the thread. auto NewTimer(millisecs_t length, bool repeat, @@ -129,7 +128,7 @@ class Thread { ThreadSource source_; int listen_sd_{}; std::thread::id thread_id_{}; - ThreadIdentifier identifier_{ThreadIdentifier::kInvalid}; + ThreadTag identifier_{ThreadTag::kInvalid}; millisecs_t last_complaint_time_{}; bool acquires_python_gil_{}; diff --git a/src/ballistica/core/types.h b/src/ballistica/core/types.h index 1519352d..8792b79f 100644 --- a/src/ballistica/core/types.h +++ b/src/ballistica/core/types.h @@ -997,7 +997,7 @@ enum class ThreadSource { /// Used for module-thread identification. /// Mostly just for debugging, through a few things are affected by this /// (the Logic thread manages the python GIL, etc). -enum class ThreadIdentifier { +enum class ThreadTag { kInvalid, kLogic, kAssets, diff --git a/src/ballistica/dynamics/bg/bg_dynamics_server.cc b/src/ballistica/dynamics/bg/bg_dynamics_server.cc index c77d3369..f43b4b8d 100644 --- a/src/ballistica/dynamics/bg/bg_dynamics_server.cc +++ b/src/ballistica/dynamics/bg/bg_dynamics_server.cc @@ -667,7 +667,7 @@ BGDynamicsServer::BGDynamicsServer() BA_PRECONDITION(g_bg_dynamics_server == nullptr); // Spin up our thread. - thread_ = new Thread(ThreadIdentifier::kBGDynamics); + thread_ = new Thread(ThreadTag::kBGDynamics); g_app->pausable_threads.push_back(thread_); // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer) diff --git a/src/ballistica/dynamics/bg/bg_dynamics_server.h b/src/ballistica/dynamics/bg/bg_dynamics_server.h index 691aeba8..8e6a2e61 100644 --- a/src/ballistica/dynamics/bg/bg_dynamics_server.h +++ b/src/ballistica/dynamics/bg/bg_dynamics_server.h @@ -66,8 +66,8 @@ class BGDynamicsServer { }; class StepData : public Object { public: - auto GetDefaultOwnerThread() const -> ThreadIdentifier override { - return ThreadIdentifier::kBGDynamics; + auto GetDefaultOwnerThread() const -> ThreadTag override { + return ThreadTag::kBGDynamics; } Vector3f cam_pos{0.0f, 0.0f, 0.0f}; diff --git a/src/ballistica/dynamics/material/material_component.h b/src/ballistica/dynamics/material/material_component.h index cdc426f6..ee6870aa 100644 --- a/src/ballistica/dynamics/material/material_component.h +++ b/src/ballistica/dynamics/material/material_component.h @@ -13,8 +13,8 @@ namespace ballistica { // A component of a material - comprises one or more conditions and actions. class MaterialComponent : public Object { public: - auto GetDefaultOwnerThread() const -> ThreadIdentifier override { - return ThreadIdentifier::kLogic; + auto GetDefaultOwnerThread() const -> ThreadTag override { + return ThreadTag::kLogic; } auto GetFlattenedSize() -> size_t; diff --git a/src/ballistica/graphics/framebuffer.h b/src/ballistica/graphics/framebuffer.h index cf3d22e2..df552233 100644 --- a/src/ballistica/graphics/framebuffer.h +++ b/src/ballistica/graphics/framebuffer.h @@ -9,8 +9,8 @@ namespace ballistica { class Framebuffer : public Object { public: - auto GetDefaultOwnerThread() const -> ThreadIdentifier override { - return ThreadIdentifier::kMain; + auto GetDefaultOwnerThread() const -> ThreadTag override { + return ThreadTag::kMain; } }; diff --git a/src/ballistica/graphics/gl/renderer_gl.cc b/src/ballistica/graphics/gl/renderer_gl.cc index 9c803eee..7df0554e 100644 --- a/src/ballistica/graphics/gl/renderer_gl.cc +++ b/src/ballistica/graphics/gl/renderer_gl.cc @@ -1001,8 +1001,8 @@ class RendererGL::FramebufferObjectGL : public Framebuffer { // Base class for fragment/vertex shaders. class RendererGL::ShaderGL : public Object { public: - auto GetDefaultOwnerThread() const -> ThreadIdentifier override { - return ThreadIdentifier::kMain; + auto GetDefaultOwnerThread() const -> ThreadTag override { + return ThreadTag::kMain; } ShaderGL(GLenum type_in, const std::string& src_in) : type_(type_in) { diff --git a/src/ballistica/graphics/render_target.h b/src/ballistica/graphics/render_target.h index ef88585e..721a446e 100644 --- a/src/ballistica/graphics/render_target.h +++ b/src/ballistica/graphics/render_target.h @@ -11,8 +11,8 @@ namespace ballistica { // Encapsulates framebuffers, main windows, etc. class RenderTarget : public Object { public: - auto GetDefaultOwnerThread() const -> ThreadIdentifier override { - return ThreadIdentifier::kMain; + auto GetDefaultOwnerThread() const -> ThreadTag override { + return ThreadTag::kMain; } enum class Type { kScreen, kFramebuffer }; explicit RenderTarget(Type type); diff --git a/src/ballistica/logic/logic.cc b/src/ballistica/logic/logic.cc index ce1a5456..90a31040 100644 --- a/src/ballistica/logic/logic.cc +++ b/src/ballistica/logic/logic.cc @@ -74,7 +74,7 @@ Logic::Logic() InitSpecialChars(); // Spin up our thread. - thread_ = new Thread(ThreadIdentifier::kLogic); + thread_ = new Thread(ThreadTag::kLogic); g_app->pausable_threads.push_back(thread_); } auto Logic::OnAppStart() -> void { @@ -1241,6 +1241,10 @@ void Logic::PushOnAppResumeCall() { }); } +void Logic::PushApplyConfigCall() { + thread()->PushCall([this] { ApplyConfig(); }); +} + // Look through everything in our config dict and act on it. void Logic::ApplyConfig() { assert(InLogicThread()); @@ -1400,10 +1404,6 @@ void Logic::ApplyConfig() { g_platform->ApplyConfig(); } -void Logic::PushApplyConfigCall() { - thread()->PushCall([this] { ApplyConfig(); }); -} - void Logic::PushRemoveGraphicsServerRenderHoldCall() { thread()->PushCall([] { // This call acts as a flush of sorts; when it goes through, diff --git a/src/ballistica/networking/network_writer.cc b/src/ballistica/networking/network_writer.cc index 3177f2e7..82679ce5 100644 --- a/src/ballistica/networking/network_writer.cc +++ b/src/ballistica/networking/network_writer.cc @@ -13,7 +13,7 @@ NetworkWriter::NetworkWriter() { assert(g_network_writer == nullptr); // Spin up our thread. - thread_ = new Thread(ThreadIdentifier::kNetworkWrite); + thread_ = new Thread(ThreadTag::kNetworkWrite); g_app->pausable_threads.push_back(thread_); } diff --git a/src/ballistica/platform/stdio_console.cc b/src/ballistica/platform/stdio_console.cc index e0882e65..9e7036aa 100644 --- a/src/ballistica/platform/stdio_console.cc +++ b/src/ballistica/platform/stdio_console.cc @@ -18,7 +18,7 @@ StdioConsole::StdioConsole() { assert(g_stdio_console == nullptr); // Spin up our thread. - thread_ = new Thread(ThreadIdentifier::kAssets); + thread_ = new Thread(ThreadTag::kAssets); g_app->pausable_threads.push_back(thread_); } From b96b23e23e64f279199acb262d8f8bfec8fb4a43 Mon Sep 17 00:00:00 2001 From: itsre3 <105688454+itsre3@users.noreply.github.com> Date: Tue, 13 Sep 2022 00:32:24 +0100 Subject: [PATCH 15/40] Epic mode in Easter egg hunt --- assets/src/ba_data/python/bastd/game/easteregghunt.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/assets/src/ba_data/python/bastd/game/easteregghunt.py b/assets/src/ba_data/python/bastd/game/easteregghunt.py index 3372522d..1dc4de02 100644 --- a/assets/src/ba_data/python/bastd/game/easteregghunt.py +++ b/assets/src/ba_data/python/bastd/game/easteregghunt.py @@ -44,7 +44,10 @@ class EasterEggHuntGame(ba.TeamGameActivity[Player, Team]): name = 'Easter Egg Hunt' description = 'Gather eggs!' - available_settings = [ba.BoolSetting('Pro Mode', default=False)] + available_settings = [ + ba.BoolSetting('Pro Mode', default=False), + ba.BoolSetting('Epic Mode', default=False), + ] scoreconfig = ba.ScoreConfig(label='Score', scoretype=ba.ScoreType.POINTS) # We're currently hard-coded for one map. @@ -70,6 +73,7 @@ class EasterEggHuntGame(ba.TeamGameActivity[Player, Team]): self.egg_tex_3 = ba.gettexture('eggTex3') self._collect_sound = ba.getsound('powerup01') self._pro_mode = settings.get('Pro Mode', False) + self._epic_mode = settings.get('Epic Mode', False) self._max_eggs = 1.0 self.egg_material = ba.Material() self.egg_material.add_actions( @@ -81,7 +85,9 @@ class EasterEggHuntGame(ba.TeamGameActivity[Player, Team]): self._bots: SpazBotSet | None = None # Base class overrides - self.default_music = ba.MusicType.FORWARD_MARCH + self.slow_motion = self._epic_mode + self.default_music = (ba.MusicType.EPIC if self._epic_mode else + ba.MusicType.FORWARD_MARCH) def on_team_join(self, team: Team) -> None: if self.has_begun(): From 53ccc66ca8ce05a9cb8c754720bab1f357dafe50 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 12 Sep 2022 16:50:37 -0700 Subject: [PATCH 16/40] oops missed g_network_reader --- .efrocachemap | 56 ++++++++++----------- CHANGELOG.md | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/app/app_flavor.cc | 6 +-- src/ballistica/ballistica.cc | 4 +- src/ballistica/networking/network_reader.cc | 15 ++++-- src/ballistica/networking/network_reader.h | 3 +- 7 files changed, 48 insertions(+), 40 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index bbdcf9ba..ebd14c62 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c9/9b/1988356c188605d63adfd726ae70", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/90/20/7847611202aae8f7f25f81e11798", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f1/d3/8b4f9456fde946a6f832a0a2ed56", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9c/f3/a87ed66a967361270c38501207ca", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/53/2d/f237861e70f755bd2a1bc3ff0bc9", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/1d/c0/f17e88adfa27445f56f349c08e1e", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/33/48/b87e86d797ea65f9088cebf19c41", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1d/7d/f7666c243f12b032e0473fe96c8e", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/16/ab/b98796b9f947d710cef4f69e1e54", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/28/ba/6ce4a4dd0c164173746b8890f7e9", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ba/c2/da7fc794b8d1b2a3c507acc05c74", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5c/6e/3b8ab35122b48710216c3331ed4a", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/9d/6d/9c828387ca8ce579e2eb04ac60e9", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3c/8d/7e5873dfcb1a7d7afedb4931b4ef", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/93/15/13337ede73eb44cbdf1bd3b33b30", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/28/c4/369e1ee38f63fba86bde9b62d1a8", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/8f/14/c9302e20d2959adc852dc375bdce", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/c5/cf/220527d9a07378862117ebde3bf4", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/99/4d/6db8b3fb6d3cb45154312bb59cd2", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/43/64/57681573e37a5c29801ca7e931a4", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/4c/c8/30631d3154a8c450b105da4fba36", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/81/c8/19c1a99a50a074027e85485b48ef", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5f/5f/93f8a60c6f6d58352a83540792ba", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b5/1c/c0fe6d5570d238872bfc839b46ac", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b6/92/91c7675daecf9f2c01672f45b420", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/f5/49/7fff46b30c288ffc7e94c9fd4182", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e9/f3/99c96b36694274aab5f44f0a8c78", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/30/19/031ab0138f689d0fc7698c55f514", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/78/9b/6613bcdbd99cba2abd8994da47e9", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/85/83/8be76939bf30ad8d43d189099b4c", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a5/bc/374eaeb09819570ba9b9c30707e0", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/37/40/306b6050cc2ab7ce40b8a1935989", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/03/6b/3bdea294966f3d6b5f86ab3f15f1", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/e9/8f/86486943a8e2de808deb812cfdc6", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/33/72/b886fb6fdb0c36066da3a6d72f40", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/bb/e5/425b5f16ffaae0ade584872e6b1c", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a3/c9/44b771f906edf3d63943acd535a8", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/17/b5/95fc75d8b8ee7dc24e2897309ff1", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/93/06/3ff8db73b443613e342010b8d26f", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/60/09/d6e216de302ff8dfbb5966b08f90", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/81/60/37044e17e52ca125c1d48af83d03", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fb/47/d505c3feea40888985dd335dc8c4", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4f/3d/20c78e744ac26a13b7418166d675", @@ -4031,14 +4031,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3b/79/592c41691e94807d23a783723861", "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/13/d9/36f4cf8527494f419db74ae6c78f", "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ee/e5/7f0677e6fb8d7cfa169930579712", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/77/3f/53e29b476834c1e00b1ed0934b82", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/0a/6f/612238de640a2da2501e4bd29d3d", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/bf/36/218291ca0b4fd005e76261fc2279", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/42/13/58a6b20bbe3e72ff3b055e025fb8", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/7d/a6/268f90b14807bb1740cd2ac65bd5", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/fe/78/35e0537296a08c6516a82417fba4", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/b7/5f/41d33fe421bd61e85e54a967c1b4", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/1f/b1/6897e3bb590a95dcf85316f286e1", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/69/c1/1694e8c7f55ac1c07277a2b5d7c2", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/73/5d/e1960323b7229bf34dd88a4b7a72", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/2c/13/30518d52dfa93a303ba6033f13d4", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/dc/41/911fb9a80bbe2e8234d8610b0cf3", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/be/e0/9c48a3fc8c3a0caf8a5c2c88ddf4", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/02/bd/6e08bef172191198f82e61f714f6", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/f2/3e/5fbbe38fa5047ac11b10f214ecd9", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/4f/cf/09c154037d8f597fcac94fcf5723", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 234bf75a..1c0642d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20835, api 7, 2022-09-12) +### 1.7.7 (build 20837, api 7, 2022-09-12) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 955bc20b..f25876fd 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -38,7 +38,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20835 + expected_build = 20837 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/app/app_flavor.cc b/src/ballistica/app/app_flavor.cc index 3e085ae3..24223550 100644 --- a/src/ballistica/app/app_flavor.cc +++ b/src/ballistica/app/app_flavor.cc @@ -278,11 +278,7 @@ void AppFlavor::PushNetworkSetupCall(int port, int telnet_port, const std::string& telnet_password) { thread()->PushCall([port, telnet_port, enable_telnet, telnet_password] { assert(InMainThread()); - // Kick these off if they don't exist. - // (do we want to support changing ports on existing ones?) - if (g_network_reader == nullptr) { - new NetworkReader(port); - } + g_network_reader->SetPort(port); if (g_app->telnet_server == nullptr && enable_telnet) { new TelnetServer(telnet_port); assert(g_app->telnet_server); diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 84527f93..fd3c28b4 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -19,6 +19,7 @@ #include "ballistica/input/input.h" #include "ballistica/internal/app_internal.h" #include "ballistica/logic/v1_account.h" +#include "ballistica/networking/network_reader.h" #include "ballistica/networking/network_writer.h" #include "ballistica/networking/networking.h" #include "ballistica/platform/platform.h" @@ -31,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20835; +const int kAppBuildNumber = 20837; const char* kAppVersion = "1.7.7"; // Our standalone globals. @@ -103,6 +104,7 @@ auto BallisticaMain(int argc, char** argv) -> int { g_assets_server = new AssetsServer(); g_ui = Object::NewUnmanaged(); g_networking = new Networking(); + g_network_reader = new NetworkReader(); g_network_writer = new NetworkWriter(); g_input = new Input(); g_app_internal = CreateAppInternal(); diff --git a/src/ballistica/networking/network_reader.cc b/src/ballistica/networking/network_reader.cc index 203afb4f..15b62d2a 100644 --- a/src/ballistica/networking/network_reader.cc +++ b/src/ballistica/networking/network_reader.cc @@ -15,10 +15,19 @@ namespace ballistica { -NetworkReader::NetworkReader(int port) : port4_(port), port6_(port) { - thread_ = new std::thread(RunThreadStatic, this); +NetworkReader::NetworkReader() { + // We're a singleton; make sure we don't exist. assert(g_network_reader == nullptr); - g_network_reader = this; +} + +auto NetworkReader::SetPort(int port) -> void { + assert(InMainThread()); + // Currently can't switch once this is set. + if (port4_ != -1) { + return; + } + port4_ = port6_ = port; + thread_ = new std::thread(RunThreadStatic, this); } auto NetworkReader::Pause() -> void { diff --git a/src/ballistica/networking/network_reader.h b/src/ballistica/networking/network_reader.h index 0e70cd2f..7d86249b 100644 --- a/src/ballistica/networking/network_reader.h +++ b/src/ballistica/networking/network_reader.h @@ -21,7 +21,8 @@ namespace ballistica { // ensure the sockets exist before doing the actual write. class NetworkReader { public: - explicit NetworkReader(int port); + NetworkReader(); + auto SetPort(int port) -> void; auto Pause() -> void; auto Resume() -> void; auto port4() const { return port4_; } From d9a1ab52e521a53924bdb858f59244345195688c Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 13 Sep 2022 10:24:56 -0700 Subject: [PATCH 17/40] moved more python init to main thread and public sources --- .efrocachemap | 91 ++--- .idea/dictionaries/ericf.xml | 3 + CHANGELOG.md | 6 +- .../ba_data/python/._bainternal_sources_hash | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 16 +- .../.idea/dictionaries/ericf.xml | 3 + .../inspectionProfiles/Project_Default.xml | 1 + src/ballistica/audio/audio_server.cc | 2 +- src/ballistica/ballistica.cc | 8 +- src/ballistica/internal/app_internal.h | 2 +- src/ballistica/logic/logic.cc | 20 +- .../python/methods/python_methods_app.cc | 1 + src/ballistica/python/python.cc | 352 ++++++++++-------- src/ballistica/python/python.h | 8 +- src/ballistica/python/python_ref.cc | 5 - src/meta/.meta_manifest_public.json | 3 +- src/meta/Makefile | 9 +- src/meta/bameta/python_embedded/bootstrap.py | 4 +- .../python_embedded/bootstrap_monolithic.py | 22 ++ 19 files changed, 318 insertions(+), 240 deletions(-) create mode 100644 src/meta/bameta/python_embedded/bootstrap_monolithic.py diff --git a/.efrocachemap b/.efrocachemap index ebd14c62..82e6f6f8 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,50 +3995,51 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/4c/c8/30631d3154a8c450b105da4fba36", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/81/c8/19c1a99a50a074027e85485b48ef", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5f/5f/93f8a60c6f6d58352a83540792ba", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b5/1c/c0fe6d5570d238872bfc839b46ac", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b6/92/91c7675daecf9f2c01672f45b420", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/f5/49/7fff46b30c288ffc7e94c9fd4182", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e9/f3/99c96b36694274aab5f44f0a8c78", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/30/19/031ab0138f689d0fc7698c55f514", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/78/9b/6613bcdbd99cba2abd8994da47e9", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/85/83/8be76939bf30ad8d43d189099b4c", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a5/bc/374eaeb09819570ba9b9c30707e0", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/37/40/306b6050cc2ab7ce40b8a1935989", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/03/6b/3bdea294966f3d6b5f86ab3f15f1", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/e9/8f/86486943a8e2de808deb812cfdc6", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/33/72/b886fb6fdb0c36066da3a6d72f40", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/bb/e5/425b5f16ffaae0ade584872e6b1c", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a3/c9/44b771f906edf3d63943acd535a8", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/17/b5/95fc75d8b8ee7dc24e2897309ff1", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/93/06/3ff8db73b443613e342010b8d26f", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/60/09/d6e216de302ff8dfbb5966b08f90", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/81/60/37044e17e52ca125c1d48af83d03", - "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fb/47/d505c3feea40888985dd335dc8c4", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4f/3d/20c78e744ac26a13b7418166d675", - "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e3/77/67a1fafff2c1918b1661b71ecaa0", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9b/00/f11d8f7f79c9b692b84f6dbd54dc", - "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f8/3a/0cd5030cbe13f99bf23d05ee6cfb", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5b/2a/3be2a55cbd63f9c42618c4013c87", - "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/09/ef/8fbfc6032e6a6089215c3dc365a1", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f8/79/31ecc50de3e52c55a1569b8b9438", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8a/a0/3ef54e3c6c3c777f8a221da16c14", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ee/a8/07c5e78d027bfc1acc88a25932b4", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ec/f5/a161f6c194a64f371e35e31bbfca", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/56/45/b6b9259f447f19ef0643b972bc64", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3b/79/592c41691e94807d23a783723861", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/13/d9/36f4cf8527494f419db74ae6c78f", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ee/e5/7f0677e6fb8d7cfa169930579712", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/69/c1/1694e8c7f55ac1c07277a2b5d7c2", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/73/5d/e1960323b7229bf34dd88a4b7a72", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/2c/13/30518d52dfa93a303ba6033f13d4", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/dc/41/911fb9a80bbe2e8234d8610b0cf3", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/be/e0/9c48a3fc8c3a0caf8a5c2c88ddf4", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/02/bd/6e08bef172191198f82e61f714f6", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/f2/3e/5fbbe38fa5047ac11b10f214ecd9", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/4f/cf/09c154037d8f597fcac94fcf5723", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ca/c4/9784ffa7a202da7e851c447dc69a", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/f0/15/1ffcc9804e84eaa6a652be53cbbd", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ac/45/ff0681bcf7d1c5ac2c191d288434", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/7f/27/4a4158050c3d77a7021e12bb9d20", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/f1/c9/048c9c9267b456ff7e5610624fbd", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ad/fe/6afe3275a46a1384c348ee3917bc", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/de/e3/69d0a6f6cbfba5a6e0d74c0442ba", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/06/b6/824ee73b255e99093aeae719e2e4", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c7/0e/3dd207020a393e2fff196918e986", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/7b/d3/3698352ea276344dd12e969da09e", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ff/b3/5e9acbef286f6738de3023011556", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ab/ab/50ea4865929b418bf25dac3f475d", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/e2/9f/aae9e3204175fce33a75d486008a", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/98/89/63eec19c696e364e349b0d200e91", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5b/75/bc745b50536aade78db0150d9d9e", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/94/06/ba7c0d3e3d3e9d02594871687ec9", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a2/ea/87883b1f4063980a1a40a112f9ce", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/da/0b/16a433cafa1e2a7f87caf83409bf", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/3a/4c/8aa877e66c3a7ad25dbd0e075ef8", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/83/07/b36ff25c01d4790b4758e0c86e68", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4b/02/e1d6afd343ce32d53c134c5fc4e7", + "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ed/18/45e61446f5f7e02624fb87fb8c97", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/cf/46/393131611fa1395fd9c173d8426f", + "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2d/2e/d4a8ba6f7c46da387394f4542d02", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/df/6c/cafe5794323f445392e63114f14b", + "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/00/ba/5c85c98957ac9f0832a01ea83168", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/35/0c/c85a8d0a8b43dac24a94417297fb", + "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f1/ca/c78a414c9d6ec0ffb647585c3e33", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0f/6a/83518a680d4917e3356d21d3650d", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6a/39/2e1794bf48cbc4c67c63b9527a68", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3b/64/48be465941f4f1aa3332a1d32f6a", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/63/03/d9a332d36a337086b639c4240674", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ea/ca/533d54af50f2b5750f7c407dcbd5", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/17/d6/e9af602218f3dd14a5bedb6c7eb2", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a6/cc/2ee87bb2ead38a3bf7d8b2588f39", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e5/ef/91bb1dfff04d62899cbe363b0d23", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/a2/7a/faf4c2744e2762e58d0119dafa72", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/7d/66/d3aafe52f5d44a23aa426bc8e602", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/63/5b/a3d3b19e7583a72cbdeefbd00f7e", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/60/14/3a28abc1b1b87b14f05d86a2e900", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/6c/a3/ded8df37d31c54c4ab66e224015a", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/2b/c6/a8701e03471178983957c33026ff", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/7e/16/307bb68c0561181ba701d0bcd350", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/09/b3/2fd1934cb6f0d2454e222c60ef3b", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7", - "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d" + "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/2d/4f/f4fe67827f36cd59cd5193333a02", + "src/ballistica/generated/python_embedded/bootstrap_monolithic.inc": "https://files.ballistica.net/cache/ba1/ef/c1/aa5f1aa10af89f5c0b1e616355fd" } \ No newline at end of file diff --git a/.idea/dictionaries/ericf.xml b/.idea/dictionaries/ericf.xml index 06bafff1..6ae45394 100644 --- a/.idea/dictionaries/ericf.xml +++ b/.idea/dictionaries/ericf.xml @@ -234,6 +234,7 @@ benning bfiledir bfiles + bgdynamics bgmodel bgrn bgterrain @@ -415,6 +416,7 @@ cleanlist cleanupcheck cleanupchecks + clearsign clientid clientlist clienttobasn @@ -1648,6 +1650,7 @@ nettest nettesting netutils + networkwrite nevermind newactivity newdamage diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c0642d1..bf01925f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20837, api 7, 2022-09-12) +### 1.7.7 (build 20840, api 7, 2022-09-13) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. @@ -24,7 +24,9 @@ - Renamed C++ Media to Assets. - Removed 'scores to beat' list in coop which was only ever functional in limited cases on the Mac version. Perhaps that feature can reappear in a cross-platform way sometime. - Simplified C++ bootstrapping to allocate all globals in one place. -- Renamed C++ Game class to Logic. +- Renamed C++ Game classes to Logic. +- The app now bootstraps Python in the main thread instead of the logic thread. This will keep things more consistent later when we are able to run under an already-existing Python interpreter. +- Python and _ba are now completely initialized in public source code. Now we just need to enable the app to survive without _bainternal and it'll be possible to build a 100% open source app. ### 1.7.6 (build 20687, api 7, 2022-08-11) - Cleaned up da MetaSubsystem code. diff --git a/assets/src/ba_data/python/._bainternal_sources_hash b/assets/src/ba_data/python/._bainternal_sources_hash index 0321a786..6e9f924c 100644 --- a/assets/src/ba_data/python/._bainternal_sources_hash +++ b/assets/src/ba_data/python/._bainternal_sources_hash @@ -1 +1 @@ -304827393730630459319623179535089986346 \ No newline at end of file +222094078620857897443553282652634355523 \ No newline at end of file diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index f25876fd..8bbf492e 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -5,7 +5,6 @@ from __future__ import annotations import os import sys -import signal import threading from typing import TYPE_CHECKING @@ -38,7 +37,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20837 + expected_build = 20840 running_build: int = env['build_number'] if running_build != expected_build: print( @@ -48,16 +47,11 @@ def bootstrap() -> None: f' This might cause the app to error or misbehave.', file=sys.stderr) - # Tell Python to not handle SIGINT itself (it normally generates - # KeyboardInterrupts which make a mess; we want to intercept them - # for simple clean exit). We capture interrupts per-platform in - # the C++ layer. - # Note: I tried creating a handler in Python but it seemed to often have - # a delay of up to a second before getting called. (not a huge deal - # but I'm picky). - signal.signal(signal.SIGINT, signal.SIG_DFL) # Do default handling. + # In bootstrap_monolithic.py we told Python not to handle SIGINT itself + # (because that must be done in the main thread). Now we finish the + # job by adding our own handler to replace it. - # ..though it turns out we need to set up our C signal handling AFTER + # Note: I've found we need to set up our C signal handling AFTER # we've told Python to disable its own; otherwise (on Mac at least) it # wipes out our existing C handler. _ba.setup_sigint() diff --git a/ballisticacore-cmake/.idea/dictionaries/ericf.xml b/ballisticacore-cmake/.idea/dictionaries/ericf.xml index 597eda1d..16d6b197 100644 --- a/ballisticacore-cmake/.idea/dictionaries/ericf.xml +++ b/ballisticacore-cmake/.idea/dictionaries/ericf.xml @@ -119,6 +119,7 @@ bdea benning bezanson + bgdynamics bgra bigendian bilinear @@ -226,6 +227,7 @@ classdict classline cleanupcheck + clearsign clientid clientinfo clienttobasn @@ -849,6 +851,7 @@ netcode netplay nettest + networkwrite newactivity newchild newimg diff --git a/ballisticacore-cmake/.idea/inspectionProfiles/Project_Default.xml b/ballisticacore-cmake/.idea/inspectionProfiles/Project_Default.xml index ffa57a65..bccdbc35 100644 --- a/ballisticacore-cmake/.idea/inspectionProfiles/Project_Default.xml +++ b/ballisticacore-cmake/.idea/inspectionProfiles/Project_Default.xml @@ -58,6 +58,7 @@ + diff --git a/src/ballistica/audio/audio_server.cc b/src/ballistica/audio/audio_server.cc index 86d02fb8..a63451d7 100644 --- a/src/ballistica/audio/audio_server.cc +++ b/src/ballistica/audio/audio_server.cc @@ -86,7 +86,7 @@ class AudioServer::ThreadSource : public Object { auto play_id() const -> uint32_t { return (play_count_ << 16u) | (static_cast(id_) & 0xFFFFu); } - void UpdateAvailability(); + auto UpdateAvailability() -> void; auto GetDefaultOwnerThread() const -> ThreadTag override; auto client_source() const -> AudioSource* { return client_source_.get(); } auto source_sound() const -> SoundData* { diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index fd3c28b4..5a4c81db 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20837; +const int kAppBuildNumber = 20840; const char* kAppVersion = "1.7.7"; // Our standalone globals. @@ -88,9 +88,10 @@ auto BallisticaMain(int argc, char** argv) -> int { g_platform = Platform::Create(); g_app = new App(argc, argv); + g_app_internal = CreateAppInternal(); g_main_thread = new Thread(ThreadTag::kMain, ThreadSource::kWrapMain); - g_python = new Python(); g_app_flavor = g_platform->CreateAppFlavor(); + g_python = Python::Create(); g_graphics = g_platform->CreateGraphics(); g_graphics_server = new GraphicsServer(); g_audio = new Audio(); @@ -107,7 +108,6 @@ auto BallisticaMain(int argc, char** argv) -> int { g_network_reader = new NetworkReader(); g_network_writer = new NetworkWriter(); g_input = new Input(); - g_app_internal = CreateAppInternal(); g_logic = new Logic(); g_scene_v1 = new SceneV1(); if (!HeadlessMode()) { @@ -220,7 +220,7 @@ auto FatalError(const std::string& message) -> void { FatalError::ReportFatalError(message, false); bool exit_cleanly = !IsUnmodifiedBlessedBuild(); bool handled = FatalError::HandleFatalError(exit_cleanly, false); - assert(handled); + BA_PRECONDITION(handled); } auto GetAppInstanceUUID() -> const std::string& { diff --git a/src/ballistica/internal/app_internal.h b/src/ballistica/internal/app_internal.h index 3c26ee9b..076c246f 100644 --- a/src/ballistica/internal/app_internal.h +++ b/src/ballistica/internal/app_internal.h @@ -16,7 +16,7 @@ class AppInternal { public: virtual ~AppInternal() {} - virtual auto PyInitialize(void* pyconfig) -> void = 0; + virtual auto DefineInternalModule() -> void = 0; virtual auto PythonPostInit() -> void = 0; virtual auto HasBlessingHash() -> bool = 0; virtual auto PutLog(bool fatal) -> bool = 0; diff --git a/src/ballistica/logic/logic.cc b/src/ballistica/logic/logic.cc index 90a31040..795951ac 100644 --- a/src/ballistica/logic/logic.cc +++ b/src/ballistica/logic/logic.cc @@ -83,10 +83,20 @@ auto Logic::OnAppStart() -> void { auto Logic::OnAppStartInThread() -> void { try { - // Our thread should hold the Python GIL any time it is running. - // TODO(ericf): It could be better to have each individual Python call - // we make acquire the GIL. Then we're not holding it during long - // bits of C++ logic. + // Our thread should not be holding the GIL here at the start (and + // probably not have any Python state at all). So here we set both + // of those up. + assert(!PyGILState_Check()); + PyGILState_Ensure(); + + // Tell our thread that it should grab the Python GIL any time it + // is running something and release it when done. + // TODO(ericf): It could be good to explore the idea of having + // individual runnables grab the GIL instead of doing it here at the + // thread level. Though its a bit freeing to know that we can run + // Python code at any time in the logic thread without worry. We can + // also consider explicitly releasing the GIL in the logic thread + // during long operations where we know no Python will occur. thread_->SetAcquiresPythonGIL(); // We want to be informed when our thread is pausing. @@ -98,7 +108,7 @@ auto Logic::OnAppStartInThread() -> void { // Init python and apply our settings immediately. // This way we can get started loading stuff in the background // and it'll come in with the correct texture quality etc. - g_python->Reset(true); + g_python->InitBallisticaPython(); } catch (const std::exception& e) { // If anything went wrong, trigger a deferred error. // This way it is more likely we can show a fatal error dialog diff --git a/src/ballistica/python/methods/python_methods_app.cc b/src/ballistica/python/methods/python_methods_app.cc index 54a10daf..d8a7fc6f 100644 --- a/src/ballistica/python/methods/python_methods_app.cc +++ b/src/ballistica/python/methods/python_methods_app.cc @@ -701,6 +701,7 @@ auto PyCommitConfig(PyObject* self, PyObject* args, PyObject* keywds) auto PyEnv(PyObject* self) -> PyObject* { BA_PYTHON_TRY; + assert(g_app->is_bootstrapped); static PyObject* env_obj = nullptr; diff --git a/src/ballistica/python/python.cc b/src/ballistica/python/python.cc index 169564bd..ae8d285f 100644 --- a/src/ballistica/python/python.cc +++ b/src/ballistica/python/python.cc @@ -853,6 +853,19 @@ auto Python::GetPyVector3f(PyObject* o) -> Vector3f { Python::Python() = default; +auto Python::Create() -> Python* { + assert(InMainThread()); + + Python* python = new Python(); + python->InitCorePython(); + + // After we bootstrap Python here in the main thread we release the GIL. + // We'll explicitly reacquire it anytime we need it (mainly in the logic + // thread once that comes up later). + PyEval_SaveThread(); + return python; +} + static struct PyModuleDef ba_module_def = {PyModuleDef_HEAD_INIT}; static auto ba_exec(PyObject* module) -> int { @@ -885,161 +898,183 @@ static auto PyInit__ba() -> PyObject* { return module; } -void Python::Reset(bool do_init) { +auto Python::InitCorePython() -> void { + assert(!inited_); + assert(InMainThread()); + // Flip on some extra runtime debugging options in debug builds. + // https://docs.python.org/3/library/devmode.html#devmode + int dev_mode{g_buildconfig.debug_build()}; + + // Pre-config as isolated if we include our own Python and as standard + // otherwise. + PyPreConfig preconfig; + if (g_platform->ContainsPythonDist()) { + PyPreConfig_InitIsolatedConfig(&preconfig); + } else { + PyPreConfig_InitPythonConfig(&preconfig); + } + preconfig.dev_mode = dev_mode; + + // We want consistent utf-8 everywhere (Python used to default to + // windows-specific file encodings, etc.) + preconfig.utf8_mode = 1; + + PyStatus status = Py_PreInitialize(&preconfig); + BA_PRECONDITION(!PyStatus_Exception(status)); + + // Configure as isolated if we include our own Python and as standard + // otherwise. + PyConfig config; + if (g_platform->ContainsPythonDist()) { + PyConfig_InitIsolatedConfig(&config); + } else { + PyConfig_InitPythonConfig(&config); + } + config.dev_mode = dev_mode; + if (!g_buildconfig.debug_build()) { + config.optimization_level = 1; + } + + // In cases where we bundle Python, set up all paths explicitly. + // https://docs.python.org/3/c-api/init_config.html#path-configuration + if (g_platform->ContainsPythonDist()) { + PyConfig_SetBytesString(&config, &config.base_exec_prefix, ""); + PyConfig_SetBytesString(&config, &config.base_executable, ""); + PyConfig_SetBytesString(&config, &config.base_prefix, ""); + PyConfig_SetBytesString(&config, &config.exec_prefix, ""); + PyConfig_SetBytesString(&config, &config.executable, ""); + PyConfig_SetBytesString(&config, &config.prefix, ""); + + // Interesting note: it seems we can pass relative paths here but + // they wind up in sys.path as absolute paths (unlike entries we add + // to sys.path after things are up and running). + if (g_buildconfig.ostype_windows()) { + // Windows Python looks for Lib and DLLs dirs by default, along with + // some others, but we want to be more explicit in limiting to these. It + // also seems that windows Python's paths can be incorrect if we're in + // strange dirs such as \\wsl$\Ubuntu-18.04\ that we get with WSL build + // setups. + + // NOTE: Python for windows actually comes with 'Lib', not 'lib', but + // it seems the interpreter defaults point to ./lib (as of 3.8.5). + // Normally this doesn't matter since windows is case-insensitive but + // under WSL it does. + // So we currently bundle the dir as 'lib' and use that in our path so + // that everything is happy (both with us and with python.exe). + PyWideStringList_Append(&config.module_search_paths, + Py_DecodeLocale("lib", nullptr)); + PyWideStringList_Append(&config.module_search_paths, + Py_DecodeLocale("DLLs", nullptr)); + } else { + PyWideStringList_Append(&config.module_search_paths, + Py_DecodeLocale("pylib", nullptr)); + } + config.module_search_paths_set = 1; + } + + // Let Python know how to spin up our _ba module. + PyImport_AppendInittab("_ba", &PyInit__ba); + + // Let Python know how to spin up the _bainternal module. + g_app_internal->DefineInternalModule(); + + // Init Python. + status = Py_InitializeFromConfig(&config); + BA_PRECONDITION(!PyStatus_Exception(status)); + + // Create a dict for execing just this bootstrap code in so + // we don't pollute the __main__ namespace. + auto bootstrap_context{PythonRef(PyDict_New(), PythonRef::kSteal)}; + + // Do a bit of basic bootstrapping here in the main thread. +#include "ballistica/generated/python_embedded/bootstrap_monolithic.inc" + PyObject* result = + PyRun_String(bootstrap_monolithic_code, Py_file_input, + bootstrap_context.get(), bootstrap_context.get()); + if (result == nullptr) { + PyErr_PrintEx(0); + + // Throw a simple exception so we don't get a stack trace. + throw std::logic_error( + "Error in ba Python bootstrapping. See log for details."); + } + Py_DECREF(result); + + // Grab __main__ in case we need to use it later. + // FIXME: put this in objs_ with everything else. + PyObject* m; + BA_PRECONDITION(m = PyImport_AddModule("__main__")); + BA_PRECONDITION(main_dict_ = PyModule_GetDict(m)); + + // Make sure we're running the Python version we require. + const char* ver = Py_GetVersion(); + if (strncmp(ver, "3.10", 4) != 0) { + FatalError("We require Python 3.10.x; instead found " + std::string(ver)); + } +} + +auto Python::InitBallisticaPython() -> void { + assert(InLogicThread()); + + // Create a dict for execing just this bootstrap code in so + // we don't pollute the __main__ namespace. + auto bootstrap_context{PythonRef(PyDict_New(), PythonRef::kSteal)}; + + // Get the app up and running. + // Run a few core bootstrappy things first: + // - get stdout/stderr redirection up so we can intercept python output + // - add our user and system script dirs to python path + // - create the ba.app instance. + +#include "ballistica/generated/python_embedded/bootstrap.inc" + PyObject* result = + PyRun_String(bootstrap_code, Py_file_input, bootstrap_context.get(), + bootstrap_context.get()); + if (result == nullptr) { + PyErr_PrintEx(0); + + // Throw a simple exception so we don't get a stack trace. + throw std::logic_error( + "Error in ba Python bootstrapping. See log for details."); + } + Py_DECREF(result); + + // Import and grab all the Python stuff we use from C++. +#include "ballistica/generated/python_embedded/binding.inc" + + g_app_internal->PythonPostInit(); + + // Alright I guess let's pull ba in to main, since pretty + // much all interactive commands will be using it. + // If we ever build the game as a pure python module we should + // of course not do this. + BA_PRECONDITION(PyRun_SimpleString("import ba") == 0); + + // Read the config file and store the config dict for easy access. + obj(ObjID::kReadConfigCall).Call(); + StoreObj(ObjID::kConfig, obj(ObjID::kApp).GetAttr("config").get()); + assert(PyDict_Check(obj(ObjID::kConfig).get())); + + // Turn off fancy-pants cyclic garbage-collection. + // We run it only at explicit times to avoid random hitches and keep + // things more deterministic. + // Non-reference-looped objects will still get cleaned up + // immediately, so we should try to structure things to avoid + // reference loops (just like Swift, ObjC, etc). + // FIXME - move this to Python code. + g_python->obj(Python::ObjID::kGCDisableCall).Call(); + inited_ = true; +} + +auto Python::Reset() -> void { assert(InLogicThread()); assert(g_python); assert(g_platform); + assert(inited_); - bool was_inited = inited_; - - if (inited_) { - ReleaseGamePadInput(); - ReleaseKeyboardInput(); - g_graphics->ReleaseFadeEndCommand(); - inited_ = false; - } - - if (!was_inited && do_init) { - // Flip on some extra runtime debugging options in debug builds. - // https://docs.python.org/3.10/library/devmode.html#devmode - int dev_mode{g_buildconfig.debug_build()}; - - // Pre-config as isolated if we include our own Python and as standard - // otherwise. - PyPreConfig preconfig; - if (g_platform->ContainsPythonDist()) { - PyPreConfig_InitIsolatedConfig(&preconfig); - } else { - PyPreConfig_InitPythonConfig(&preconfig); - } - preconfig.dev_mode = dev_mode; - - // We want consistent utf-8 everywhere (Python used to default to - // windows-specific file encodings, etc.) - preconfig.utf8_mode = 1; - - PyStatus status = Py_PreInitialize(&preconfig); - BA_PRECONDITION(!PyStatus_Exception(status)); - - // Configure as isolated if we include our own Python and as standard - // otherwise. - PyConfig config; - if (g_platform->ContainsPythonDist()) { - PyConfig_InitIsolatedConfig(&config); - } else { - PyConfig_InitPythonConfig(&config); - } - config.dev_mode = dev_mode; - if (!g_buildconfig.debug_build()) { - config.optimization_level = 1; - } - - // In cases where we bundle Python, set up all paths explicitly. - // see https://docs.python.org/3.8/ - // c-api/init_config.html#path-configuration - if (g_platform->ContainsPythonDist()) { - PyConfig_SetBytesString(&config, &config.base_exec_prefix, ""); - PyConfig_SetBytesString(&config, &config.base_executable, ""); - PyConfig_SetBytesString(&config, &config.base_prefix, ""); - PyConfig_SetBytesString(&config, &config.exec_prefix, ""); - PyConfig_SetBytesString(&config, &config.executable, ""); - PyConfig_SetBytesString(&config, &config.prefix, ""); - - // Interesting note: it seems we can pass relative paths here but - // they wind up in sys.path as absolute paths (unlike entries we add - // to sys.path after things are up and running). - if (g_buildconfig.ostype_windows()) { - // Windows Python looks for Lib and DLLs dirs by default, along with - // some others, but we want to be more explicit in limiting to these. It - // also seems that windows Python's paths can be incorrect if we're in - // strange dirs such as \\wsl$\Ubuntu-18.04\ that we get with WSL build - // setups. - - // NOTE: Python for windows actually comes with 'Lib', not 'lib', but - // it seems the interpreter defaults point to ./lib (as of 3.8.5). - // Normally this doesn't matter since windows is case-insensitive but - // under WSL it does. - // So we currently bundle the dir as 'lib' and use that in our path so - // that everything is happy (both with us and with python.exe). - PyWideStringList_Append(&config.module_search_paths, - Py_DecodeLocale("lib", nullptr)); - PyWideStringList_Append(&config.module_search_paths, - Py_DecodeLocale("DLLs", nullptr)); - } else { - PyWideStringList_Append(&config.module_search_paths, - Py_DecodeLocale("pylib", nullptr)); - } - config.module_search_paths_set = 1; - } - - // Let Python know how to spin up our _ba module. - PyImport_AppendInittab("_ba", &PyInit__ba); - - // Inits our _ba module and runs Py_Initialize(). - g_app_internal->PyInitialize(&config); - - // Grab __main__ in case we need to use it later. - PyObject* m; - BA_PRECONDITION(m = PyImport_AddModule("__main__")); - BA_PRECONDITION(main_dict_ = PyModule_GetDict(m)); - - // Make sure we're running the Python version we require. - const char* ver = Py_GetVersion(); - if (strncmp(ver, "3.10", 4) != 0) { - throw Exception("We require Python 3.10.x; instead found " - + std::string(ver)); - } - - // Create a dict for execing our bootstrap code in so - // we don't pollute the __main__ namespace. - auto bootstrap_context{PythonRef(PyDict_New(), PythonRef::kSteal)}; - - // Get the app up and running. - // Run a few core bootstrappy things first: - // - get stdout/stderr redirection up so we can intercept python output - // - add our user and system script dirs to python path - // - create the ba.app instance. - -#include "ballistica/generated/python_embedded/bootstrap.inc" - PyObject* result = - PyRun_String(bootstrap_code, Py_file_input, bootstrap_context.get(), - bootstrap_context.get()); - if (result == nullptr) { - PyErr_PrintEx(0); - - // Throw a simple exception so we don't get a stack trace. - throw std::logic_error( - "Error in ba Python bootstrapping. See log for details."); - } - Py_DECREF(result); - - // Import and grab all the Python stuff we use from C++. -#include "ballistica/generated/python_embedded/binding.inc" - - g_app_internal->PythonPostInit(); - - // Alright I guess let's pull ba in to main, since pretty - // much all interactive commands will be using it. - // If we ever build the game as a pure python module we should - // of course not do this. - BA_PRECONDITION(PyRun_SimpleString("import ba") == 0); - - // Read the config file and store the config dict for easy access. - obj(ObjID::kReadConfigCall).Call(); - StoreObj(ObjID::kConfig, obj(ObjID::kApp).GetAttr("config").get()); - assert(PyDict_Check(obj(ObjID::kConfig).get())); - - // Turn off fancy-pants cyclic garbage-collection. - // We run it only at explicit times to avoid random hitches and keep - // things more deterministic. - // Non-reference-looped objects will still get cleaned up - // immediately, so we should try to structure things to avoid - // reference loops (just like Swift, ObjC, etc). - g_python->obj(Python::ObjID::kGCDisableCall).Call(); - } - if (do_init) { - inited_ = true; - } + ReleaseGamePadInput(); + ReleaseKeyboardInput(); + g_graphics->ReleaseFadeEndCommand(); } auto Python::GetModuleMethods() -> std::vector { @@ -1114,8 +1149,6 @@ void Python::PushObjCall(ObjID obj_id, const std::string& arg) { }); } -Python::~Python() { Reset(false); } - auto Python::GetResource(const char* key, const char* fallback_resource, const char* fallback_value) -> std::string { assert(HaveGIL()); @@ -2259,12 +2292,13 @@ void Python::LogContextAuto() { } void Python::AcquireGIL() { + assert(InLogicThread()); auto debug_timing{g_app->debug_timing}; millisecs_t startms{debug_timing ? Platform::GetCurrentMilliseconds() : 0}; - if (thread_state_) { - PyEval_RestoreThread(thread_state_); - thread_state_ = nullptr; + if (logic_thread_state_) { + PyEval_RestoreThread(logic_thread_state_); + logic_thread_state_ = nullptr; } if (debug_timing) { @@ -2275,9 +2309,11 @@ void Python::AcquireGIL() { } } } + void Python::ReleaseGIL() { - assert(thread_state_ == nullptr); - thread_state_ = PyEval_SaveThread(); + assert(InLogicThread()); + assert(logic_thread_state_ == nullptr); + logic_thread_state_ = PyEval_SaveThread(); } void Python::AddCleanFrameCommand(const Object::Ref& c) { diff --git a/src/ballistica/python/python.h b/src/ballistica/python/python.h index e1094129..bf451032 100644 --- a/src/ballistica/python/python.h +++ b/src/ballistica/python/python.h @@ -80,9 +80,11 @@ class Python { static auto LogContextAuto() -> void; static auto LogContextNonLogicThread() -> void; Python(); - ~Python(); + static auto Create() -> Python*; - auto Reset(bool init = true) -> void; + auto InitCorePython() -> void; + auto InitBallisticaPython() -> void; + auto Reset() -> void; /// Add classes to the newly created ba module. static auto InitModuleClasses(PyObject* module) -> void; @@ -424,7 +426,7 @@ class Python { PyObject* empty_dict_object_{}; PyObject* main_dict_{}; PyObject* env_{}; - PyThreadState* thread_state_{}; + PyThreadState* logic_thread_state_{}; }; } // namespace ballistica diff --git a/src/ballistica/python/python_ref.cc b/src/ballistica/python/python_ref.cc index a91b6ada..008213d9 100644 --- a/src/ballistica/python/python_ref.cc +++ b/src/ballistica/python/python_ref.cc @@ -13,7 +13,6 @@ namespace ballistica { #pragma ide diagnostic ignored "RedundantCast" PythonRef::PythonRef(PyObject* obj_in, ReferenceBehavior b) { - assert(g_python); assert(Python::HaveGIL()); switch (b) { case kSteal: @@ -54,7 +53,6 @@ void PythonRef::Acquire(PyObject* obj_in) { void PythonRef::Steal(PyObject* obj_in) { BA_PRECONDITION(obj_in); - assert(g_python); assert(Python::HaveGIL()); // Assign before decrementing the old @@ -67,7 +65,6 @@ void PythonRef::Steal(PyObject* obj_in) { } void PythonRef::Release() { - assert(g_python); assert(Python::HaveGIL()); // Py_CLEAR uses a temp variable and assigns o to nullptr first @@ -113,7 +110,6 @@ auto PythonRef::ValueAsInt() const -> int64_t { } auto PythonRef::GetAttr(const char* name) const -> PythonRef { - assert(g_python); assert(Python::HaveGIL()); BA_PRECONDITION(obj_); PyObject* val = PyObject_GetAttrString(get(), name); @@ -149,7 +145,6 @@ auto PythonRef::UnicodeCheck() const -> bool { auto PythonRef::Call(PyObject* args, PyObject* keywds, bool print_errors) const -> PythonRef { assert(obj_); - assert(g_python); assert(Python::HaveGIL()); assert(CallableCheck()); assert(args); diff --git a/src/meta/.meta_manifest_public.json b/src/meta/.meta_manifest_public.json index dd1d3882..a5a5e757 100644 --- a/src/meta/.meta_manifest_public.json +++ b/src/meta/.meta_manifest_public.json @@ -2,5 +2,6 @@ "assets/src/ba_data/python/ba/_generated/__init__.py", "assets/src/ba_data/python/ba/_generated/enums.py", "src/ballistica/generated/python_embedded/binding.inc", - "src/ballistica/generated/python_embedded/bootstrap.inc" + "src/ballistica/generated/python_embedded/bootstrap.inc", + "src/ballistica/generated/python_embedded/bootstrap_monolithic.inc" ] \ No newline at end of file diff --git a/src/meta/Makefile b/src/meta/Makefile index 073a4d54..ce68dfee 100644 --- a/src/meta/Makefile +++ b/src/meta/Makefile @@ -17,7 +17,8 @@ sources: \ ../../assets/src/ba_data/python/ba/_generated/__init__.py \ ../../assets/src/ba_data/python/ba/_generated/enums.py \ ../ballistica/generated/python_embedded/binding.inc \ - ../ballistica/generated/python_embedded/bootstrap.inc + ../ballistica/generated/python_embedded/bootstrap.inc \ + ../ballistica/generated/python_embedded/bootstrap_monolithic.inc ../ballistica/generated/python_embedded/binding.inc : bameta/python_embedded/binding.py @$(PCOMMAND) gen_binding_code $< $@ @@ -25,6 +26,9 @@ sources: \ ../ballistica/generated/python_embedded/bootstrap.inc : bameta/python_embedded/bootstrap.py @$(PCOMMAND) gen_flat_data_code $< $@ bootstrap_code +../ballistica/generated/python_embedded/bootstrap_monolithic.inc : bameta/python_embedded/bootstrap_monolithic.py + @$(PCOMMAND) gen_flat_data_code $< $@ bootstrap_monolithic_code + ../../assets/src/ba_data/python/ba/_generated/__init__.py : ../../tools/batools/pcommand.py @$(PCOMMAND) gen_python_init_module $@ @@ -45,7 +49,8 @@ efrocache-list: @echo "../../assets/src/ba_data/python/ba/_generated/__init__.py" \ "../../assets/src/ba_data/python/ba/_generated/enums.py" \ "../ballistica/generated/python_embedded/binding.inc" \ - "../ballistica/generated/python_embedded/bootstrap.inc" + "../ballistica/generated/python_embedded/bootstrap.inc" \ + "../ballistica/generated/python_embedded/bootstrap_monolithic.inc" efrocache-build: sources diff --git a/src/meta/bameta/python_embedded/bootstrap.py b/src/meta/bameta/python_embedded/bootstrap.py index d84cd45d..85d06b15 100644 --- a/src/meta/bameta/python_embedded/bootstrap.py +++ b/src/meta/bameta/python_embedded/bootstrap.py @@ -1,6 +1,8 @@ # Released under the MIT License. See LICENSE for details. # -"""Initial ballistica bootstrapping.""" +"""Ballistica bootstrapping.""" + +# This code runs in the logic thread to bootstrap ballistica. from __future__ import annotations diff --git a/src/meta/bameta/python_embedded/bootstrap_monolithic.py b/src/meta/bameta/python_embedded/bootstrap_monolithic.py new file mode 100644 index 00000000..d6534a1a --- /dev/null +++ b/src/meta/bameta/python_embedded/bootstrap_monolithic.py @@ -0,0 +1,22 @@ +# Released under the MIT License. See LICENSE for details. +# +"""Main thread bootstrapping for Python monolithic builds.""" + +# This code runs in the main thread just after the interpreter comes up. +# It should *ONLY* do things that must be done in the main thread and +# should not import any ballistica stuff. + +from __future__ import annotations + +import signal +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + pass + +# Tell Python to not handle SIGINT itself (it normally generates +# KeyboardInterrupts which make a mess; we want to intercept them +# for simple clean exit). We have to do this part here because it must +# run in the main thread. We add our own handler later in the logic thread +# alongside our other ba bootstrapping. +signal.signal(signal.SIGINT, signal.SIG_DFL) # Do default handling. From 9319287fcd60fb8044a297c6099cdc4ba8a4b317 Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 13 Sep 2022 11:13:32 -0700 Subject: [PATCH 18/40] c++ bootstrap hardening --- .efrocachemap | 40 +++++----- CHANGELOG.md | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/ballistica.cc | 85 +++++++++++++++------- 4 files changed, 79 insertions(+), 50 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 82e6f6f8..81c70975 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ca/c4/9784ffa7a202da7e851c447dc69a", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/f0/15/1ffcc9804e84eaa6a652be53cbbd", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ac/45/ff0681bcf7d1c5ac2c191d288434", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/7f/27/4a4158050c3d77a7021e12bb9d20", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/f1/c9/048c9c9267b456ff7e5610624fbd", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ad/fe/6afe3275a46a1384c348ee3917bc", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/de/e3/69d0a6f6cbfba5a6e0d74c0442ba", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/06/b6/824ee73b255e99093aeae719e2e4", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c7/0e/3dd207020a393e2fff196918e986", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/7b/d3/3698352ea276344dd12e969da09e", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ff/b3/5e9acbef286f6738de3023011556", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ab/ab/50ea4865929b418bf25dac3f475d", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/e2/9f/aae9e3204175fce33a75d486008a", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/98/89/63eec19c696e364e349b0d200e91", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5b/75/bc745b50536aade78db0150d9d9e", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/94/06/ba7c0d3e3d3e9d02594871687ec9", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a2/ea/87883b1f4063980a1a40a112f9ce", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/da/0b/16a433cafa1e2a7f87caf83409bf", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/3a/4c/8aa877e66c3a7ad25dbd0e075ef8", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/83/07/b36ff25c01d4790b4758e0c86e68", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/84/d0/74f2b20adc517beeb0efafb4b4de", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/60/85/8e8cbeee10bf0c4f5b38792cd972", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/84/9e/70d571aa9d9c869ae544e81ceb9c", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/61/4b/9cb4a70e2c5fd5046a2a0aa1d011", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c4/9b/24e583b9bf7bcb406a544f5d9d90", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d8/4b/b73ae2c2e711699daca03bb46fbc", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/41/d1/b665246e68c64f90819807d6d528", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a4/81/daa5716db4fe65ae8ef4700af5a1", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/47/e5/eabd47ace227af9fb05bdaeea7aa", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/69/8b/c91d3562ac890e40aafb9f35cf5e", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/16/b1/45dcdcd101c5b293f78913f62a0e", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/81/bb/3fba8cad9c1ea3d01199b32385e7", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/f3/0f/7c6074e1c2165b976e4a030d3876", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/02/9a/c31ef4286904f9970519f42f0644", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/84/62/f0fba929db90c96deac3d73a135b", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/95/72/64f86aba6b2219f49bc5f89f2189", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a8/a4/237ffde4b291ffc0cfb795863c1b", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/3f/58/877ef1ec2c1e7a4c405574ebc544", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/37/7e/bdc6a0ba2c95bfecc16911a80983", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/f5/5c/e70d827e538c18b914f9d1cc52af", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4b/02/e1d6afd343ce32d53c134c5fc4e7", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ed/18/45e61446f5f7e02624fb87fb8c97", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/cf/46/393131611fa1395fd9c173d8426f", diff --git a/CHANGELOG.md b/CHANGELOG.md index bf01925f..07af68eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20840, api 7, 2022-09-13) +### 1.7.7 (build 20842, api 7, 2022-09-13) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 8bbf492e..5dafc7f5 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -37,7 +37,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20840 + expected_build = 20842 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 5a4c81db..355a3e30 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20840; +const int kAppBuildNumber = 20842; const char* kAppVersion = "1.7.7"; // Our standalone globals. @@ -86,37 +86,66 @@ auto BallisticaMain(int argc, char** argv) -> int { // avoid any logic that accesses other globals since they may // not yet exist. + // Minimal globals we must assign immediately as they are needed + // during construction of the others. g_platform = Platform::Create(); g_app = new App(argc, argv); g_app_internal = CreateAppInternal(); g_main_thread = new Thread(ThreadTag::kMain, ThreadSource::kWrapMain); - g_app_flavor = g_platform->CreateAppFlavor(); - g_python = Python::Create(); - g_graphics = g_platform->CreateGraphics(); - g_graphics_server = new GraphicsServer(); - g_audio = new Audio(); - g_audio_server = new AudioServer(); - g_context = new Context(nullptr); - g_text_graphics = new TextGraphics(); - g_app_config = new AppConfig(); - g_v1_account = new V1Account(); - g_utils = new Utils(); - g_assets = new Assets(); - g_assets_server = new AssetsServer(); - g_ui = Object::NewUnmanaged(); - g_networking = new Networking(); - g_network_reader = new NetworkReader(); - g_network_writer = new NetworkWriter(); - g_input = new Input(); - g_logic = new Logic(); - g_scene_v1 = new SceneV1(); - if (!HeadlessMode()) { - g_bg_dynamics = new BGDynamics(); - g_bg_dynamics_server = new BGDynamicsServer(); - } - if (g_buildconfig.enable_stdio_console()) { - g_stdio_console = new StdioConsole(); - } + + // For everything else, we hold off until the end to actually assign + // them to their globals. This keeps us honest and catches any stray + // inter-global access that we might accidentally include in a + // constructor. + auto* app_flavor = g_platform->CreateAppFlavor(); + auto* python = Python::Create(); + auto* graphics = g_platform->CreateGraphics(); + auto* graphics_server = new GraphicsServer(); + auto* audio = new Audio(); + auto* audio_server = new AudioServer(); + auto* context = new Context(nullptr); + auto* text_graphics = new TextGraphics(); + auto* app_config = new AppConfig(); + auto* v1_account = new V1Account(); + auto* utils = new Utils(); + auto* assets = new Assets(); + auto* assets_server = new AssetsServer(); + auto* ui = Object::NewUnmanaged(); + auto* networking = new Networking(); + auto* network_reader = new NetworkReader(); + auto* network_writer = new NetworkWriter(); + auto* input = new Input(); + auto* logic = new Logic(); + auto* scene_v1 = new SceneV1(); + auto* bg_dynamics = HeadlessMode() ? nullptr : new BGDynamics; + auto* bg_dynamics_server = HeadlessMode() ? nullptr : new BGDynamicsServer; + auto* stdio_console = + g_buildconfig.enable_stdio_console() ? new StdioConsole() : nullptr; + + g_app_flavor = app_flavor; + g_python = python; + g_graphics = graphics; + g_graphics_server = graphics_server; + g_audio = audio; + g_audio_server = audio_server; + g_context = context; + g_text_graphics = text_graphics; + g_app_config = app_config; + g_v1_account = v1_account; + g_utils = utils; + g_assets = assets; + g_assets_server = assets_server; + g_ui = ui; + g_networking = networking; + g_network_reader = network_reader; + g_network_writer = network_writer; + g_input = input; + g_logic = logic; + g_scene_v1 = scene_v1; + g_bg_dynamics = bg_dynamics; + g_bg_dynamics_server = bg_dynamics_server; + g_stdio_console = stdio_console; + g_app->is_bootstrapped = true; // ------------------------------------------------------------------------- From cfe42b39e6f06c0674f84aedb58ae0c481d04291 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 14 Sep 2022 19:11:34 -0700 Subject: [PATCH 19/40] major logging system revamp --- .efrocachemap | 90 ++--- .idea/dictionaries/ericf.xml | 4 + CHANGELOG.md | 11 +- assets/src/ba_data/python/._ba_sources_hash | 2 +- .../ba_data/python/._bainternal_sources_hash | 2 +- assets/src/ba_data/python/_ba.py | 269 ++------------- assets/src/ba_data/python/ba/__init__.py | 13 +- assets/src/ba_data/python/ba/_app.py | 4 +- assets/src/ba_data/python/ba/_appconfig.py | 6 - assets/src/ba_data/python/ba/_apputils.py | 19 +- assets/src/ba_data/python/ba/_asyncio.py | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 120 ++----- assets/src/ba_data/python/ba/_error.py | 5 + assets/src/ba_data/python/ba/_hooks.py | 2 +- assets/src/ba_data/python/ba/_meta.py | 12 +- assets/src/ba_data/python/ba/_playlist.py | 6 +- assets/src/ba_data/python/ba/_plugin.py | 10 +- assets/src/ba_data/python/ba/_servermode.py | 7 +- .../.idea/dictionaries/ericf.xml | 4 + src/ballistica/app/app.h | 8 +- src/ballistica/app/app_config.h | 2 +- src/ballistica/assets/assets.cc | 32 +- src/ballistica/assets/assets.h | 2 +- src/ballistica/assets/assets_server.cc | 30 +- src/ballistica/assets/data/data_data.cc | 4 +- src/ballistica/assets/data/sound_data.cc | 12 +- src/ballistica/audio/al_sys.cc | 9 +- src/ballistica/audio/audio_server.cc | 35 +- src/ballistica/audio/audio_server.h | 2 +- src/ballistica/audio/audio_source.cc | 2 +- src/ballistica/audio/audio_streamer.cc | 5 +- src/ballistica/audio/ogg_stream.cc | 3 +- src/ballistica/ballistica.cc | 34 +- src/ballistica/ballistica.h | 5 +- src/ballistica/core/context.cc | 2 +- src/ballistica/core/context.h | 4 +- src/ballistica/core/fatal_error.cc | 18 +- src/ballistica/core/logging.cc | 137 ++++---- src/ballistica/core/logging.h | 32 +- src/ballistica/core/macros.cc | 34 +- src/ballistica/core/macros.h | 16 +- src/ballistica/core/object.cc | 4 +- src/ballistica/core/thread.cc | 72 +++- src/ballistica/core/thread.h | 8 +- src/ballistica/core/types.h | 2 + src/ballistica/dynamics/bg/bg_dynamics.h | 2 +- .../dynamics/bg/bg_dynamics_draw_snapshot.h | 2 +- .../dynamics/bg/bg_dynamics_server.cc | 23 +- src/ballistica/dynamics/dynamics.cc | 3 +- .../dynamics/material/material_component.cc | 5 +- src/ballistica/dynamics/part.cc | 6 +- src/ballistica/dynamics/rigid_body.cc | 2 +- src/ballistica/generic/timer_list.cc | 6 +- src/ballistica/generic/utils.cc | 12 +- .../graphics/component/render_component.h | 3 +- src/ballistica/graphics/frame_def.h | 4 +- src/ballistica/graphics/gl/gl_sys.cc | 2 +- src/ballistica/graphics/gl/renderer_gl.cc | 120 ++++--- src/ballistica/graphics/graphics.cc | 7 +- src/ballistica/graphics/graphics.h | 2 +- src/ballistica/graphics/graphics_server.cc | 35 +- src/ballistica/graphics/graphics_server.h | 2 +- .../graphics/mesh/mesh_buffer_base.h | 4 +- src/ballistica/graphics/mesh/mesh_data.h | 2 +- .../graphics/mesh/mesh_indexed_base.h | 7 +- .../mesh/mesh_indexed_static_dynamic.h | 3 +- src/ballistica/graphics/text/text_graphics.cc | 3 +- src/ballistica/graphics/text/text_graphics.h | 2 +- .../input/device/client_input_device.cc | 3 +- src/ballistica/input/device/input_device.cc | 21 +- src/ballistica/input/device/input_device.h | 4 +- src/ballistica/input/device/joystick.cc | 12 +- src/ballistica/input/device/touch_input.cc | 5 +- src/ballistica/input/input.cc | 32 +- src/ballistica/input/input.h | 6 +- src/ballistica/input/remote_app.cc | 8 +- src/ballistica/internal/app_internal.h | 6 +- src/ballistica/logic/connection/connection.cc | 30 +- .../logic/connection/connection_set.cc | 29 +- .../logic/connection/connection_to_client.cc | 45 +-- .../connection/connection_to_client_udp.cc | 2 +- .../logic/connection/connection_to_host.cc | 26 +- .../connection/connection_to_host_udp.cc | 5 +- src/ballistica/logic/host_activity.cc | 21 +- src/ballistica/logic/logic.cc | 74 +++-- src/ballistica/logic/logic.h | 7 +- src/ballistica/logic/player_spec.cc | 7 +- .../logic/session/client_session.cc | 12 +- src/ballistica/logic/session/host_session.cc | 24 +- .../logic/session/net_client_session.cc | 6 +- .../logic/session/replay_client_session.cc | 9 +- src/ballistica/logic/session/session.cc | 3 +- src/ballistica/logic/v1_account.cc | 2 +- src/ballistica/networking/network_reader.cc | 54 +-- src/ballistica/networking/network_writer.cc | 3 +- src/ballistica/networking/networking.cc | 32 +- src/ballistica/networking/networking.h | 2 +- src/ballistica/networking/telnet_server.cc | 7 +- .../platform/apple/platform_apple.h | 3 +- .../platform/linux/platform_linux.cc | 8 +- src/ballistica/platform/platform.cc | 106 +++--- src/ballistica/platform/platform.h | 17 +- src/ballistica/platform/sdl/sdl_app.cc | 23 +- src/ballistica/platform/stdio_console.cc | 4 +- .../platform/windows/platform_windows.cc | 30 +- .../platform/windows/platform_windows.h | 3 +- .../class/python_class_activity_data.cc | 4 +- .../class/python_class_collide_model.cc | 4 +- .../python/class/python_class_context.cc | 7 +- .../python/class/python_class_context_call.cc | 4 +- .../python/class/python_class_data.cc | 4 +- .../python/class/python_class_input_device.cc | 7 +- .../python/class/python_class_material.cc | 4 +- .../python/class/python_class_model.cc | 4 +- .../python/class/python_class_node.cc | 4 +- .../python/class/python_class_session_data.cc | 4 +- .../class/python_class_session_player.cc | 24 +- .../python/class/python_class_sound.cc | 4 +- .../python/class/python_class_texture.cc | 4 +- .../python/class/python_class_timer.cc | 4 +- .../python/class/python_class_widget.cc | 6 +- .../python/methods/python_methods_app.cc | 126 ++++--- .../python/methods/python_methods_gameplay.cc | 4 +- .../methods/python_methods_networking.cc | 4 +- .../python/methods/python_methods_system.cc | 28 +- src/ballistica/python/python.cc | 151 ++++++--- src/ballistica/python/python.h | 31 +- src/ballistica/python/python_command.cc | 20 +- src/ballistica/python/python_command.h | 2 +- src/ballistica/python/python_context_call.cc | 13 +- src/ballistica/python/python_context_call.h | 2 +- src/ballistica/python/python_ref.cc | 4 +- src/ballistica/python/python_sys.h | 12 +- src/ballistica/scene/node/combine_node.cc | 2 +- src/ballistica/scene/node/globals_node.cc | 3 +- src/ballistica/scene/node/node.cc | 23 +- src/ballistica/scene/node/node_attribute.cc | 6 +- .../scene/node/node_attribute_connection.cc | 13 +- src/ballistica/scene/node/prop_node.cc | 7 +- src/ballistica/scene/node/region_node.cc | 3 +- src/ballistica/scene/node/sound_node.cc | 6 +- src/ballistica/scene/node/spaz_node.cc | 36 +- src/ballistica/scene/node/text_node.cc | 7 +- src/ballistica/scene/scene.cc | 9 +- src/ballistica/scene/scene_stream.cc | 58 ++-- src/ballistica/ui/ui.cc | 8 +- src/ballistica/ui/widget/button_widget.cc | 3 +- src/ballistica/ui/widget/container_widget.cc | 26 +- src/ballistica/ui/widget/text_widget.cc | 6 +- src/ballistica/ui/widget/widget.cc | 10 +- src/meta/bameta/python_embedded/binding.py | 8 +- tools/batools/dummymodule.py | 2 +- tools/efro/log.py | 311 +++++++++++------- 153 files changed, 1622 insertions(+), 1460 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 81c70975..3817aff0 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,51 +3995,51 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/84/d0/74f2b20adc517beeb0efafb4b4de", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/60/85/8e8cbeee10bf0c4f5b38792cd972", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/84/9e/70d571aa9d9c869ae544e81ceb9c", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/61/4b/9cb4a70e2c5fd5046a2a0aa1d011", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c4/9b/24e583b9bf7bcb406a544f5d9d90", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d8/4b/b73ae2c2e711699daca03bb46fbc", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/41/d1/b665246e68c64f90819807d6d528", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a4/81/daa5716db4fe65ae8ef4700af5a1", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/47/e5/eabd47ace227af9fb05bdaeea7aa", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/69/8b/c91d3562ac890e40aafb9f35cf5e", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/16/b1/45dcdcd101c5b293f78913f62a0e", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/81/bb/3fba8cad9c1ea3d01199b32385e7", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/f3/0f/7c6074e1c2165b976e4a030d3876", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/02/9a/c31ef4286904f9970519f42f0644", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/84/62/f0fba929db90c96deac3d73a135b", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/95/72/64f86aba6b2219f49bc5f89f2189", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a8/a4/237ffde4b291ffc0cfb795863c1b", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/3f/58/877ef1ec2c1e7a4c405574ebc544", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/37/7e/bdc6a0ba2c95bfecc16911a80983", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/f5/5c/e70d827e538c18b914f9d1cc52af", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4b/02/e1d6afd343ce32d53c134c5fc4e7", - "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ed/18/45e61446f5f7e02624fb87fb8c97", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/cf/46/393131611fa1395fd9c173d8426f", - "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2d/2e/d4a8ba6f7c46da387394f4542d02", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/df/6c/cafe5794323f445392e63114f14b", - "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/00/ba/5c85c98957ac9f0832a01ea83168", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/35/0c/c85a8d0a8b43dac24a94417297fb", - "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f1/ca/c78a414c9d6ec0ffb647585c3e33", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0f/6a/83518a680d4917e3356d21d3650d", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6a/39/2e1794bf48cbc4c67c63b9527a68", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3b/64/48be465941f4f1aa3332a1d32f6a", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/63/03/d9a332d36a337086b639c4240674", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ea/ca/533d54af50f2b5750f7c407dcbd5", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/17/d6/e9af602218f3dd14a5bedb6c7eb2", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a6/cc/2ee87bb2ead38a3bf7d8b2588f39", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e5/ef/91bb1dfff04d62899cbe363b0d23", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/a2/7a/faf4c2744e2762e58d0119dafa72", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/7d/66/d3aafe52f5d44a23aa426bc8e602", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/63/5b/a3d3b19e7583a72cbdeefbd00f7e", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/60/14/3a28abc1b1b87b14f05d86a2e900", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/6c/a3/ded8df37d31c54c4ab66e224015a", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/2b/c6/a8701e03471178983957c33026ff", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/7e/16/307bb68c0561181ba701d0bcd350", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/09/b3/2fd1934cb6f0d2454e222c60ef3b", - "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/9a/b0/687077bb5518ba6297514a21cf79", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/9a/07/a28a396bd3aff9c7d8ea4425c972", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/98/86/2b057bf3acb6707ee2345ae48726", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/13/96/49d0b9a8a5a808a619318e4ed3bd", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ed/87/b71085642185d3150a3dd59ed593", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/62/9b/2b1d5dbfa88a3b71c1476940ded0", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b7/12/f1f6253a38af6278dbcc4ee13345", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c7/79/dc992d142c303287a321d22a51c9", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/8a/90/9e476b436c7f9211f2e49308a063", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a8/9c/090dbf15aeb803532b96093ffb2e", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e3/2c/0eb229b654494a9bb99a663bee34", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ff/94/996c258446bcd1587ce55814c10f", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ac/d9/8baaae8352bcd21034d5daea284c", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/7f/f3/2d78f72daebb218658f4dc010e8e", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/75/5e/a887e7a232caed9a4a0a9a0909ae", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/30/0d/f0de21829b62bf1256781df266ed", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/8d/10/a54cfe97f26717ab57477860cb43", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/14/30/350f4c8f8b17326c161a05353afa", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ab/43/79fd942d5e2f99f49726d15fbebd", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/50/fc/8ac0aa34cc5e792dd126a96deb7f", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d5/f6/d62e6e6d5e7fe1945f08ccbb9a8f", + "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/02/c5/44d0082442b06153a7d7dce4c8ce", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d0/00/61378fb26ddcbf023fd3c40e4ffb", + "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0a/e2/a01a2de0835fee06fd7b357c700f", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7a/dd/8a8f84d8ed28fec12137f632e9f7", + "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6d/b1/34d06bce1b93bcefc4896bd2700a", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/63/61/f48cc804658071c759398f9c00dd", + "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a2/b7/a28b8ed7c1f13b53dea1c878c5fc", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a5/b2/f29c2fe15f33441de94331743353", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c2/63/bf93d39adb82748decfdb980b562", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/00/6d/ac55bffd774cf75c5944b679194a", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7b/dd/af154cabc6779257a38ea6c9e833", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/54/88/2de2dfa2c0c0a1766fa0d5f26ed6", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ff/26/da4a58abecf5d9275477eaec0c17", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/62/5d/8658a206b8c9b741be2422162784", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fc/57/d59920e098d23a2d150c899cde29", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/85/19/3c25e72ea3976b7d854c21696ec4", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/50/21/6c275dad22cc2cc1f95e21652c29", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/a0/1a/f894ee82b89dcb4a43c36ab882ee", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/c3/6a/0e89ae233f6ae76351d33ed2b0e6", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/ce/ba/c5a0c9b8224dc8df02c5189e22ac", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/1d/3a/560a77a6c97f6f39b765211b1ed8", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/5b/fb/b8c70b2a72452da1af92844335b8", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/a9/6c/12e1188dc02708b0b0fee30835b9", + "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/c0/32/b7907e3859a5c5013a3d97b6b523", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/2d/4f/f4fe67827f36cd59cd5193333a02", "src/ballistica/generated/python_embedded/bootstrap_monolithic.inc": "https://files.ballistica.net/cache/ba1/ef/c1/aa5f1aa10af89f5c0b1e616355fd" } \ No newline at end of file diff --git a/.idea/dictionaries/ericf.xml b/.idea/dictionaries/ericf.xml index 6ae45394..8c4ff566 100644 --- a/.idea/dictionaries/ericf.xml +++ b/.idea/dictionaries/ericf.xml @@ -64,9 +64,11 @@ aiomain alarmsound alibaba + allerrors allpaths allsettings allteams + allwarnings aman amazonaws aname @@ -2384,6 +2386,7 @@ startscan startsplits starttime + startupmsg statestr statictest statictestfiles @@ -2412,6 +2415,7 @@ stot strftime stringified + stringifying stringprep stringptr strippable diff --git a/CHANGELOG.md b/CHANGELOG.md index 07af68eb..d719a855 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20842, api 7, 2022-09-13) +### 1.7.7 (build 20849, api 7, 2022-09-14) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. @@ -26,7 +26,16 @@ - Simplified C++ bootstrapping to allocate all globals in one place. - Renamed C++ Game classes to Logic. - The app now bootstraps Python in the main thread instead of the logic thread. This will keep things more consistent later when we are able to run under an already-existing Python interpreter. +- As a side-effect of initing Python in the main thread, it seems that Python now catches segfaults in our debug builds and prints Python stack traces. (see https://docs.python.org/3/library/faulthandler.html). We'll have to experiment and see if this is a net positive or something we want to disable or make optional. - Python and _ba are now completely initialized in public source code. Now we just need to enable the app to survive without _bainternal and it'll be possible to build a 100% open source app. +- `Logging::Log()` in the C++ layer now takes a LogLevel arg (kDebug, kWarning, kError, etc.) and simply calls the equivalent Python logging.XXX call. This unifies our C++ and Python logging to go through the same place. +- `ba.log()` is no more. Instead just use standard Python logging functions (logging.info(), logging.error(), etc.). +- `_ba.getlog()` is now `_ba.get_v1_cloud_log()`. Note that this functionality will go away eventually so you should use ba.app.log_handler and/or standard Python logging functions to get at app logs. +- Along the same lines, `_ba.get_log_file_path()` is now `_ba.get_v1_cloud_log_file_path()`. +- Added `_ba.display_log()` function which ships a log message to the in-game terminal and platform-specific places like the Android log. The engine wires up standard Python logging output to go through this. +- Added `_ba.v1_cloud_log()` which ships a message to the old v1-cloud-log (the log which is gathered and sent to the v1 master server to help me identify problems people are seeing). This is presently wired up to a subset of Python logging output to approximate how it used to work. +- Note: Previously in the C++ layer some code would mix Python print calls (such as PyErr_PrintEx()) with ballistica::Log() calls. Previously these all wound up going to the same place (Python's sys.stderr) so it worked, but now they no longer do and so this sort of mixing should be avoided. So if you see a weird combination of colored log output lines with non-colored lines that seem to go together, please holler as it means something needs to be fixed. + ### 1.7.6 (build 20687, api 7, 2022-08-11) - Cleaned up da MetaSubsystem code. diff --git a/assets/src/ba_data/python/._ba_sources_hash b/assets/src/ba_data/python/._ba_sources_hash index b56206f3..d78d9181 100644 --- a/assets/src/ba_data/python/._ba_sources_hash +++ b/assets/src/ba_data/python/._ba_sources_hash @@ -1 +1 @@ -126683827977798484003262787310231621875 \ No newline at end of file +76251027805752156826413428926087661089 \ No newline at end of file diff --git a/assets/src/ba_data/python/._bainternal_sources_hash b/assets/src/ba_data/python/._bainternal_sources_hash index 6e9f924c..3307093f 100644 --- a/assets/src/ba_data/python/._bainternal_sources_hash +++ b/assets/src/ba_data/python/._bainternal_sources_hash @@ -1 +1 @@ -222094078620857897443553282652634355523 \ No newline at end of file +139020022013133168311319486434408589898 \ No newline at end of file diff --git a/assets/src/ba_data/python/_ba.py b/assets/src/ba_data/python/_ba.py index 0705868d..34e91a0a 100644 --- a/assets/src/ba_data/python/_ba.py +++ b/assets/src/ba_data/python/_ba.py @@ -1108,12 +1108,6 @@ def add_clean_frame_callback(call: Callable) -> None: return None -def add_transaction(transaction: dict, - callback: Callable | None = None) -> None: - """(internal)""" - return None - - def android_get_external_files_dir() -> str: """(internal) @@ -1472,6 +1466,16 @@ def disconnect_from_host() -> None: return None +def display_log(name: str, level: str, message: str) -> None: + """(internal) + + Sends a log message to the in-game console and any per-platform + log destinations (Android log, etc.). This generally is not called + directly and should instead be fed Python logging output. + """ + return None + + def do_once() -> bool: """Return whether this is the first time running a line of code. @@ -1561,15 +1565,6 @@ def focus_window() -> None: return None -def game_service_has_leaderboard(game: str, config: str) -> bool: - """(internal) - - Given a game and config string, returns whether there is a leaderboard - for it on the game service. - """ - return bool() - - def get_appconfig_builtin_keys() -> list[str]: """(internal)""" return ['blah', 'blah2'] @@ -1700,29 +1695,11 @@ def get_local_active_input_devices_count() -> int: return int() -def get_log_file_path() -> str: - """(internal) - - Return the path to the app log file. - """ - return str() - - def get_low_level_config_value(key: str, default_value: int) -> int: """(internal)""" return int() -def get_master_server_address(source: int = -1, - version: int = 1, - internal: bool = False) -> str: - """(internal) - - Return the address of the master server. - """ - return str() - - def get_max_graphics_quality() -> str: """(internal) @@ -1731,11 +1708,6 @@ def get_max_graphics_quality() -> str: return str() -def get_news_show() -> str: - """(internal)""" - return str() - - def get_package_collide_model(package: ba.AssetPackage, name: str) -> ba.CollideModel: """(internal)""" @@ -1767,16 +1739,6 @@ def get_package_texture(package: ba.AssetPackage, name: str) -> ba.Texture: return ba.Texture() -def get_price(item: str) -> str | None: - """(internal)""" - return '' - - -def get_public_login_id() -> str | None: - """(internal)""" - return '' - - def get_public_party_enabled() -> bool: """(internal)""" return bool() @@ -1787,16 +1749,6 @@ def get_public_party_max_size() -> int: return int() -def get_purchased(item: str) -> bool: - """(internal)""" - return bool() - - -def get_purchases_state() -> int: - """(internal)""" - return int() - - def get_qrcode_texture(url: str) -> ba.Texture: """(internal)""" import ba # pylint: disable=cyclic-import @@ -1824,11 +1776,6 @@ def get_replays_dir() -> str: return str() -def get_scores_to_beat(level: str, config: str, callback: Callable) -> None: - """(internal)""" - return None - - def get_special_widget(name: str) -> Widget: """(internal)""" return Widget() @@ -1872,56 +1819,16 @@ def get_ui_input_device() -> ba.InputDevice: return ba.InputDevice() -def get_v1_account_display_string(full: bool = True) -> str: +def get_v1_cloud_log() -> str: """(internal)""" return str() -def get_v1_account_misc_read_val(name: str, default_value: Any) -> Any: - """(internal)""" - return _uninferrable() - - -def get_v1_account_misc_read_val_2(name: str, default_value: Any) -> Any: - """(internal)""" - return _uninferrable() - - -def get_v1_account_misc_val(name: str, default_value: Any) -> Any: - """(internal)""" - return _uninferrable() - - -def get_v1_account_name() -> str: - """(internal)""" - return str() - - -def get_v1_account_state() -> str: - """(internal)""" - return str() - - -def get_v1_account_state_num() -> int: - """(internal)""" - return int() - - -def get_v1_account_ticket_count() -> int: +def get_v1_cloud_log_file_path() -> str: """(internal) - Returns the number of tickets for the current account. + Return the path to the app log file. """ - return int() - - -def get_v1_account_type() -> str: - """(internal)""" - return str() - - -def get_v2_fleet() -> str: - """(internal)""" return str() @@ -2015,11 +1922,6 @@ def getinputdevice(name: str, unique_id: str, doraise: bool = True) -> Any: return None -def getlog() -> str: - """(internal)""" - return str() - - def getmodel(name: str) -> ba.Model: """Return a model, loading it if necessary. @@ -2129,11 +2031,6 @@ def have_incentivized_ad() -> bool: return bool() -def have_outstanding_transactions() -> bool: - """(internal)""" - return bool() - - def have_permission(permission: ba.Permission) -> bool: """(internal)""" return bool() @@ -2210,15 +2107,10 @@ def imagewidget(edit: ba.Widget | None = None, return ba.Widget() -def in_game_purchase(item: str, price: int) -> None: - """(internal)""" - return None - - def in_logic_thread() -> bool: """(internal) - Returns whether or not the current thread is the game thread. + Returns whether or not the current thread is the logic thread. """ return bool() @@ -2240,11 +2132,6 @@ def increment_analytics_counts_raw(name: str, increment: int = 1) -> None: return None -def is_blessed() -> bool: - """(internal)""" - return bool() - - def is_in_replay() -> bool: """(internal)""" return bool() @@ -2301,22 +2188,6 @@ def lock_all_input() -> None: return None -def log(message: str, to_stdout: bool = True, to_server: bool = True) -> None: - """Category: **General Utility Functions** - - Log a message. This goes to the default logging mechanism depending - on the platform (stdout on mac, android log on android, etc). - - Log messages also go to the in-game console unless 'to_console' - is False. They are also sent to the master-server for use in analyzing - issues unless to_server is False. - - Python's standard print() is wired to call this (with default values) - so in most cases you can just use that. - """ - return None - - def mac_music_app_get_library_source() -> None: """(internal)""" return None @@ -2352,14 +2223,6 @@ def mac_music_app_stop() -> None: return None -def mark_config_dirty() -> None: - """(internal) - - Category: General Utility Functions - """ - return None - - def mark_log_sent() -> None: """(internal)""" return None @@ -2488,11 +2351,6 @@ def playsound(sound: Sound, return None -def power_ranking_query(callback: Callable, season: Any = None) -> None: - """(internal)""" - return None - - def print_context() -> None: """(internal) @@ -2509,23 +2367,6 @@ def print_load_info() -> None: return None -def print_stderr(message: str) -> None: - """(internal) - - Print to system stderr. - Also forwards to the internal console, etc. - """ - return None - - -def print_stdout(message: str) -> None: - """(internal) - Print to system stdout. - Also forwards to the internal console, etc. - """ - return None - - def printnodes() -> None: """Print various info about existing nodes; useful for debugging. @@ -2545,11 +2386,6 @@ def printobjects() -> None: return None -def purchase(item: str) -> None: - """(internal)""" - return None - - def pushcall(call: Callable, from_other_thread: bool = False, suppress_other_thread_warning: bool = False) -> None: @@ -2560,12 +2396,12 @@ def pushcall(call: Callable, This can be handy for calls that are disallowed from within other callbacks, etc. - This call expects to be used in the game thread, and will automatically + This call expects to be used in the logic thread, and will automatically save and restore the ba.Context to behave seamlessly. - If you want to push a call from outside of the game thread, + If you want to push a call from outside of the logic thread, however, you can pass 'from_other_thread' as True. In this case - the call will always run in the UI context on the game thread. + the call will always run in the UI context on the logic thread. """ return None @@ -2616,21 +2452,11 @@ def reload_media() -> None: return None -def report_achievement(achievement: str, pass_to_account: bool = True) -> None: - """(internal)""" - return None - - def request_permission(permission: ba.Permission) -> None: """(internal)""" return None -def reset_achievements() -> None: - """(internal)""" - return None - - def reset_game_activity_tracking() -> None: """(internal)""" return None @@ -2646,11 +2472,6 @@ def resolve_appconfig_value(key: str) -> Any: return _uninferrable() -def restore_purchases() -> None: - """(internal)""" - return None - - def rowwidget(edit: ba.Widget | None = None, parent: ba.Widget | None = None, size: Sequence[float] | None = None, @@ -2673,11 +2494,6 @@ def rowwidget(edit: ba.Widget | None = None, return ba.Widget() -def run_transactions() -> None: - """(internal)""" - return None - - def safecolor(color: Sequence[float], target_intensity: float = 0.6) -> tuple[float, ...]: """Given a color tuple, return a color safe to display as text. @@ -2953,48 +2769,11 @@ def show_progress_bar() -> None: return None -def sign_in_v1(account_type: str) -> None: - """(internal) - - Category: General Utility Functions - """ - return None - - -def sign_out_v1(v2_embedded: bool = False) -> None: - """(internal) - - Category: General Utility Functions - """ - return None - - def submit_analytics_counts() -> None: """(internal)""" return None -def submit_score(game: str, - config: str, - name: Any, - score: int | None, - callback: Callable, - friend_callback: Callable | None, - order: str = 'increasing', - tournament_id: str | None = None, - score_type: str = 'points', - campaign: str | None = None, - level: str | None = None) -> None: - """(internal) - - Submit a score to the server; callback will be called with the results. - As a courtesy, please don't send fake scores to the server. I'd prefer - to devote my time to improving the game instead of trying to make the - score server more mischief-proof. - """ - return None - - def textwidget(edit: ba.Widget | None = None, parent: ba.Widget | None = None, size: Sequence[float] | None = None, @@ -3173,12 +2952,6 @@ def timer(time: float, return None -def tournament_query(callback: Callable[[dict | None], None], - args: dict) -> None: - """(internal)""" - return None - - def uibounds() -> tuple[float, float, float, float]: """(internal) @@ -3198,6 +2971,14 @@ def unlock_all_input() -> None: return None +def v1_cloud_log(message: str) -> None: + """(internal) + + Push messages to the old v1 cloud log. + """ + return None + + def value_test(arg: str, change: float | None = None, absolute: float | None = None) -> float: diff --git a/assets/src/ba_data/python/ba/__init__.py b/assets/src/ba_data/python/ba/__init__.py index 4b06c0ed..43d98979 100644 --- a/assets/src/ba_data/python/ba/__init__.py +++ b/assets/src/ba_data/python/ba/__init__.py @@ -13,12 +13,11 @@ from _ba import ( Node, SessionPlayer, Sound, Texture, Timer, Vec3, Widget, buttonwidget, camerashake, checkboxwidget, columnwidget, containerwidget, do_once, emitfx, getactivity, getcollidemodel, getmodel, getnodes, getsession, - getsound, gettexture, hscrollwidget, imagewidget, log, newactivity, - newnode, playsound, printnodes, printobjects, pushcall, quit, rowwidget, - safecolor, screenmessage, scrollwidget, set_analytics_screen, charstr, - textwidget, time, timer, open_url, widget, clipboard_is_supported, - clipboard_has_text, clipboard_get_text, clipboard_set_text, getdata, - in_logic_thread) + getsound, gettexture, hscrollwidget, imagewidget, newactivity, newnode, + playsound, printnodes, printobjects, pushcall, quit, rowwidget, safecolor, + screenmessage, scrollwidget, set_analytics_screen, charstr, textwidget, + time, timer, open_url, widget, clipboard_is_supported, clipboard_has_text, + clipboard_get_text, clipboard_set_text, getdata, in_logic_thread) from ba._activity import Activity from ba._plugin import PotentialPlugin, Plugin, PluginSubsystem from ba._actor import Actor @@ -103,7 +102,7 @@ __all__ = [ 'ImpactDamageMessage', 'in_logic_thread', 'InputDevice', 'InputDeviceNotFoundError', 'InputType', 'IntChoiceSetting', 'IntSetting', 'is_browser_likely_available', 'is_point_in_box', 'Keyboard', - 'LanguageSubsystem', 'Level', 'Lobby', 'log', 'Lstr', 'Map', 'Material', + 'LanguageSubsystem', 'Level', 'Lobby', 'Lstr', 'Map', 'Material', 'MetadataSubsystem', 'Model', 'MultiTeamSession', 'MusicPlayer', 'MusicPlayMode', 'MusicSubsystem', 'MusicType', 'newactivity', 'newnode', 'Node', 'NodeActor', 'NodeNotFoundError', 'normalized_color', diff --git a/assets/src/ba_data/python/ba/_app.py b/assets/src/ba_data/python/ba/_app.py index b1c012c9..b976517b 100644 --- a/assets/src/ba_data/python/ba/_app.py +++ b/assets/src/ba_data/python/ba/_app.py @@ -26,6 +26,7 @@ if TYPE_CHECKING: import asyncio from typing import Any, Callable + import efro.log import ba from ba._cloud import CloudSubsystem from bastd.actor import spazappearance @@ -49,6 +50,7 @@ class App: # Implementations for these will be filled in by internal libs. accounts_v2: AccountV2Subsystem cloud: CloudSubsystem + log_handler: efro.log.LogHandler class State(Enum): """High level state the app can be in.""" @@ -384,7 +386,7 @@ class App: # If there's a leftover log file, attempt to upload it to the # master-server and/or get rid of it. - _apputils.handle_leftover_log_file() + _apputils.handle_leftover_v1_cloud_log_file() # Only do this stuff if our config file is healthy so we don't # overwrite a broken one or whatnot and wipe out data. diff --git a/assets/src/ba_data/python/ba/_appconfig.py b/assets/src/ba_data/python/ba/_appconfig.py index 13270319..4fd28deb 100644 --- a/assets/src/ba_data/python/ba/_appconfig.py +++ b/assets/src/ba_data/python/ba/_appconfig.py @@ -128,12 +128,6 @@ def read_config() -> tuple[AppConfig, bool]: shutil.copyfile(config_file_path, config_file_path + '.broken') except Exception as exc2: print('EXC copying broken config:', exc2) - try: - _ba.log('broken config contents:\n' + - config_contents.replace('\000', ''), - to_stdout=False) - except Exception as exc2: - print('EXC logging broken config contents:', exc2) config = AppConfig() # Now attempt to read one of our 'prev' backup copies. diff --git a/assets/src/ba_data/python/ba/_apputils.py b/assets/src/ba_data/python/ba/_apputils.py index e1d5d626..d7c2cfe9 100644 --- a/assets/src/ba_data/python/ba/_apputils.py +++ b/assets/src/ba_data/python/ba/_apputils.py @@ -50,7 +50,7 @@ def should_submit_debug_info() -> bool: return _ba.app.config.get('Submit Debug Info', True) -def handle_log() -> None: +def handle_v1_cloud_log() -> None: """Called on debug log prints. When this happens, we can upload our log to the server @@ -74,7 +74,7 @@ def handle_log() -> None: activityname = 'unavailable' info = { - 'log': _ba.getlog(), + 'log': _ba.get_v1_cloud_log(), 'version': app.version, 'build': app.build_number, 'userAgentString': app.user_agent_string, @@ -108,7 +108,7 @@ def handle_log() -> None: def _reset() -> None: app.log_upload_timer_started = False if app.log_have_new: - handle_log() + handle_v1_cloud_log() if not _ba.is_log_full(): with _ba.Context('ui'): @@ -118,14 +118,15 @@ def handle_log() -> None: suppress_format_warning=True) -def handle_leftover_log_file() -> None: - """Handle an un-uploaded log from a previous run.""" +def handle_leftover_v1_cloud_log_file() -> None: + """Handle an un-uploaded v1-cloud-log from a previous run.""" try: import json from ba._net import master_server_post - if os.path.exists(_ba.get_log_file_path()): - with open(_ba.get_log_file_path(), encoding='utf-8') as infile: + if os.path.exists(_ba.get_v1_cloud_log_file_path()): + with open(_ba.get_v1_cloud_log_file_path(), + encoding='utf-8') as infile: info = json.loads(infile.read()) infile.close() do_send = should_submit_debug_info() @@ -136,7 +137,7 @@ def handle_leftover_log_file() -> None: # lets kill it. if data is not None: try: - os.remove(_ba.get_log_file_path()) + os.remove(_ba.get_v1_cloud_log_file_path()) except FileNotFoundError: # Saw this in the wild. The file just existed # a moment ago but I suppose something could have @@ -146,7 +147,7 @@ def handle_leftover_log_file() -> None: master_server_post('bsLog', info, response) else: # If they don't want logs uploaded just kill it. - os.remove(_ba.get_log_file_path()) + os.remove(_ba.get_v1_cloud_log_file_path()) except Exception: from ba import _error _error.print_exception('Error handling leftover log file.') diff --git a/assets/src/ba_data/python/ba/_asyncio.py b/assets/src/ba_data/python/ba/_asyncio.py index afb3adc4..3639d2af 100644 --- a/assets/src/ba_data/python/ba/_asyncio.py +++ b/assets/src/ba_data/python/ba/_asyncio.py @@ -18,7 +18,7 @@ import os if TYPE_CHECKING: import ba -# Our timer and event loop for the ballistica game thread. +# Our timer and event loop for the ballistica logic thread. _asyncio_timer: ba.Timer | None = None _asyncio_event_loop: asyncio.AbstractEventLoop | None = None diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 5dafc7f5..52b9bde7 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -5,13 +5,13 @@ from __future__ import annotations import os import sys -import threading from typing import TYPE_CHECKING +from efro.log import setup_logging, LogLevel import _ba if TYPE_CHECKING: - from typing import Any, TextIO, Callable + from efro.log import LogEntry _g_did_bootstrap = False # pylint: disable=invalid-name @@ -19,25 +19,31 @@ _g_did_bootstrap = False # pylint: disable=invalid-name def bootstrap() -> None: """Run bootstrapping logic. - This is the very first userland code that runs. + This is the very first ballistica code that runs (aside from imports). It sets up low level environment bits and creates the app instance. """ + global _g_did_bootstrap # pylint: disable=global-statement, invalid-name if _g_did_bootstrap: raise RuntimeError('Bootstrap has already been called.') _g_did_bootstrap = True - # The first thing we set up is capturing/redirecting Python - # stdout/stderr so we can at least debug problems on systems where - # native stdout/stderr is not easily accessible (looking at you, Android). - sys.stdout = _Redirect(sys.stdout, _ba.print_stdout) # type: ignore - sys.stderr = _Redirect(sys.stderr, _ba.print_stderr) # type: ignore + # The first thing we do is set up our logging system and feed + # Python's stdout/stderr into it. Then we can at least debug problems + # on systems where native stdout/stderr is not easily accessible + # such as Android. + log_handler = setup_logging(log_path=None, + level=LogLevel.DEBUG, + suppress_non_root_debug=True, + log_stdout_stderr=True) + + log_handler.add_callback(_on_log) env = _ba.env() # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20842 + expected_build = 20849 running_build: int = env['build_number'] if running_build != expected_build: print( @@ -85,42 +91,6 @@ def bootstrap() -> None: os.environ['SSL_CERT_FILE'] = os.environ['REQUESTS_CA_BUNDLE'] = ( certifi.where()) - # FIXME: I think we should init Python in the main thread, which should - # also avoid these issues. (and also might help us play better with - # Python debuggers?) - - # Gloriously hacky workaround here: - # Our 'main' Python thread is the game thread (not the app's main - # thread) which means it has a small stack compared to the main - # thread (at least on apple). Sadly it turns out this causes the - # debug build of Python to blow its stack immediately when doing - # some big imports. - # Normally we'd just give the game thread the same stack size as - # the main thread and that'd be the end of it. However - # we're using std::threads which it turns out have no way to set - # the stack size (as of fall '19). Grumble. - # - # However python threads *can* take custom stack sizes. - # (and it appears they might use the main thread's by default?..) - # ...so as a workaround in the debug version, we can run problematic - # heavy imports here in another thread and all is well. - # If we ever see stack overflows in our release build we'll have - # to take more drastic measures like switching from std::threads - # to pthreads. - - if debug_build: - - # noinspection PyUnresolvedReferences - def _thread_func() -> None: - # pylint: disable=unused-import - import json - import urllib.request - - testthread = threading.Thread(target=_thread_func) - testthread.start() - testthread.join() - del testthread - # Clear out the standard quit/exit messages since they don't work for us. # pylint: disable=c-extension-no-member if not TYPE_CHECKING: @@ -132,54 +102,20 @@ def bootstrap() -> None: from ba._app import App import ba _ba.app = ba.app = App() + _ba.app.log_handler = log_handler -class _Redirect: +def _on_log(entry: LogEntry) -> None: - def __init__(self, original: TextIO, call: Callable[[str], None]) -> None: - self._lock = threading.Lock() - self._linebits: list[str] = [] - self._original = original - self._call = call - self._pending_ship = False + # Just forward this along to the engine to display in the in-game console, + # in the Android log, etc. + _ba.display_log(name=entry.name, + level=entry.level.name, + message=entry.message) - def write(self, sval: Any) -> None: - """Override standard write call.""" - - self._call(sval) - - # Now do logging: - # Add it to our accumulated line. - # If the message ends in a newline, we can ship it - # immediately as a log entry. Otherwise, schedule a ship - # next cycle (if it hasn't yet at that point) so that we - # can accumulate subsequent prints. - # (so stuff like print('foo', 123, 'bar') will ship as one entry) - with self._lock: - self._linebits.append(sval) - if sval.endswith('\n'): - self._shiplog() - else: - _ba.pushcall(self._shiplog, - from_other_thread=True, - suppress_other_thread_warning=True) - - def _shiplog(self) -> None: - with self._lock: - line = ''.join(self._linebits) - if not line: - return - self._linebits = [] - - # Log messages aren't expected to have trailing newlines. - if line.endswith('\n'): - line = line[:-1] - _ba.log(line, to_stdout=False) - - def flush(self) -> None: - """Flush the file.""" - self._original.flush() - - def isatty(self) -> bool: - """Are we a terminal?""" - return self._original.isatty() + # We also want to feed some logs to the old V1-cloud-log system. + # Let's go with anything warning or higher as well as the stdout/stderr + # log messages that ba.app.log_handler creates for us. + if entry.level.value >= LogLevel.WARNING.value or entry.name in ('stdout', + 'stderr'): + _ba.v1_cloud_log(entry.message) diff --git a/assets/src/ba_data/python/ba/_error.py b/assets/src/ba_data/python/ba/_error.py index bb82a78a..5e6aba42 100644 --- a/assets/src/ba_data/python/ba/_error.py +++ b/assets/src/ba_data/python/ba/_error.py @@ -125,6 +125,11 @@ class WidgetNotFoundError(NotFoundError): """ +# TODO: Should integrate some sort of context printing into our +# log handling so we can just use logging.exception() and kill these +# two functions. + + def print_exception(*args: Any, **keywds: Any) -> None: """Print info about an exception along with pertinent context state. diff --git a/assets/src/ba_data/python/ba/_hooks.py b/assets/src/ba_data/python/ba/_hooks.py index 9d103449..ab7e36cd 100644 --- a/assets/src/ba_data/python/ba/_hooks.py +++ b/assets/src/ba_data/python/ba/_hooks.py @@ -28,7 +28,7 @@ def finish_bootstrapping() -> None: assert _ba.in_logic_thread() # Kick off our asyncio event handling, allowing us to use coroutines - # in our game thread alongside our internal event handling. + # in our logic thread alongside our internal event handling. # setup_asyncio() # Ok, bootstrapping is done; time to get the show started. diff --git a/assets/src/ba_data/python/ba/_meta.py b/assets/src/ba_data/python/ba/_meta.py index 40f75619..1faca382 100644 --- a/assets/src/ba_data/python/ba/_meta.py +++ b/assets/src/ba_data/python/ba/_meta.py @@ -192,13 +192,13 @@ class MetadataSubsystem: color=(1, 0, 0)) _ba.playsound(_ba.getsound('error')) if results.warnings: - _ba.log(textwrap.indent('\n'.join(results.warnings), - 'Warning (meta-scan): '), - to_server=False) + allwarnings = textwrap.indent('\n'.join(results.warnings), + 'Warning (meta-scan): ') + logging.warning(allwarnings) if results.errors: - _ba.log( - textwrap.indent('\n'.join(results.errors), - 'Error (meta-scan): ')) + allerrors = textwrap.indent('\n'.join(results.errors), + 'Error (meta-scan): ') + logging.error(allerrors) # Let the game know we're done. assert self._scan_complete_cb is not None diff --git a/assets/src/ba_data/python/ba/_playlist.py b/assets/src/ba_data/python/ba/_playlist.py index 1550934c..5518601a 100644 --- a/assets/src/ba_data/python/ba/_playlist.py +++ b/assets/src/ba_data/python/ba/_playlist.py @@ -5,6 +5,7 @@ from __future__ import annotations import copy +import logging from typing import Any, TYPE_CHECKING if TYPE_CHECKING: @@ -29,7 +30,6 @@ def filter_playlist(playlist: PlaylistType, # pylint: disable=too-many-locals # pylint: disable=too-many-branches # pylint: disable=too-many-statements - import _ba from ba._map import get_filtered_map_name from ba._store import get_unowned_maps, get_unowned_game_types from ba._general import getclass @@ -140,8 +140,8 @@ def filter_playlist(playlist: PlaylistType, entry['settings'][setting.name] = setting.default goodlist.append(entry) except ImportError as exc: - _ba.log(f'Import failed while scanning playlist \'{name}\': {exc}', - to_server=False) + logging.warning('Import failed while scanning playlist \'%s\': %s', + name, exc) except Exception: from ba import _error _error.print_exception() diff --git a/assets/src/ba_data/python/ba/_plugin.py b/assets/src/ba_data/python/ba/_plugin.py index c4702045..d05cdbe9 100644 --- a/assets/src/ba_data/python/ba/_plugin.py +++ b/assets/src/ba_data/python/ba/_plugin.py @@ -4,6 +4,7 @@ from __future__ import annotations +import logging from typing import TYPE_CHECKING from dataclasses import dataclass @@ -127,8 +128,7 @@ class PluginSubsystem: subs=[('${PLUGIN}', plugkey), ('${ERROR}', str(exc))]), color=(1, 0, 0)) - _ba.log(f"Error loading plugin class '{plugkey}': {exc}", - to_server=False) + logging.exception("Error loading plugin class '%s'", plugkey) continue try: plugin = cls() @@ -155,10 +155,8 @@ class PluginSubsystem: color=(1, 1, 0), ) plugnames = ', '.join(disappeared_plugs) - _ba.log( - f'{len(disappeared_plugs)} plugin(s) no longer found:' - f' {plugnames}.', - to_server=False) + logging.warning('%d plugin(s) no longer found: %s.', + len(disappeared_plugs), plugnames) for goneplug in disappeared_plugs: del _ba.app.config['Plugins'][goneplug] _ba.app.config.commit() diff --git a/assets/src/ba_data/python/ba/_servermode.py b/assets/src/ba_data/python/ba/_servermode.py index ebc7f20d..8c8ed981 100644 --- a/assets/src/ba_data/python/ba/_servermode.py +++ b/assets/src/ba_data/python/ba/_servermode.py @@ -5,6 +5,7 @@ from __future__ import annotations import sys import time +import logging from typing import TYPE_CHECKING from efro.terminal import Clr @@ -334,11 +335,11 @@ class ServerController: if self._first_run: curtimestr = time.strftime('%c') - _ba.log( + startupmsg = ( f'{Clr.BLD}{Clr.BLU}{_ba.appnameupper()} {app.version}' f' ({app.build_number})' - f' entering server-mode {curtimestr}{Clr.RST}', - to_server=False) + f' entering server-mode {curtimestr}{Clr.RST}') + logging.info(startupmsg) if sessiontype is FreeForAllSession: appcfg['Free-for-All Playlist Selection'] = self._playlist_name diff --git a/ballisticacore-cmake/.idea/dictionaries/ericf.xml b/ballisticacore-cmake/.idea/dictionaries/ericf.xml index 16d6b197..487dfc87 100644 --- a/ballisticacore-cmake/.idea/dictionaries/ericf.xml +++ b/ballisticacore-cmake/.idea/dictionaries/ericf.xml @@ -41,7 +41,9 @@ airborn alext alibaba + allerrors allocs + allwarnings alot alphaimg alphapixels @@ -1243,6 +1245,7 @@ startpos startsplits starttime + startupmsg startx starty statestr @@ -1262,6 +1265,7 @@ strdup stringi stringified + stringifying strlen strs strtof diff --git a/src/ballistica/app/app.h b/src/ballistica/app/app.h index babeecd3..754d42e1 100644 --- a/src/ballistica/app/app.h +++ b/src/ballistica/app/app.h @@ -32,10 +32,10 @@ class App { std::vector pausable_threads; TouchInput* touch_input{}; std::string console_startup_messages; - std::mutex log_mutex; - std::string log; - bool put_log{}; - bool log_full{}; + std::mutex v1_cloud_log_mutex; + std::string v1_cloud_log; + bool did_put_v1_cloud_log{}; + bool v1_cloud_log_full{}; int master_server_source{0}; int session_count{}; bool shutting_down{}; diff --git a/src/ballistica/app/app_config.h b/src/ballistica/app/app_config.h index ed45fdc9..9a970b4a 100644 --- a/src/ballistica/app/app_config.h +++ b/src/ballistica/app/app_config.h @@ -13,7 +13,7 @@ namespace ballistica { // This class wrangles user config values for the app. // The underlying config data currently lives in the Python layer, -// so at the moment these calls are only usable from the game thread, +// so at the moment these calls are only usable from the logic thread, // but that may change in the future. class AppConfig { public: diff --git a/src/ballistica/assets/assets.cc b/src/ballistica/assets/assets.cc index 9393e7a8..8bcc5ee1 100644 --- a/src/ballistica/assets/assets.cc +++ b/src/ballistica/assets/assets.cc @@ -294,7 +294,7 @@ void Assets::PrintLoadInfo() { snprintf(buffer, sizeof(buffer), " %-50s %10s %10s", "FILE", "PRELOAD_TIME", "LOAD_TIME"); s += buffer; - Log(s, true, false); + Log(LogLevel::kInfo, s); millisecs_t total_preload_time = 0; millisecs_t total_load_time = 0; assert(asset_lists_locked_); @@ -307,7 +307,7 @@ void Assets::PrintLoadInfo() { i.second->GetName().c_str(), static_cast_check_fit(preload_time), static_cast_check_fit(load_time)); - Log(buffer, true, false); + Log(LogLevel::kInfo, buffer); num++; } assert(asset_lists_locked_); @@ -320,7 +320,7 @@ void Assets::PrintLoadInfo() { i.second->GetName().c_str(), static_cast_check_fit(preload_time), static_cast_check_fit(load_time)); - Log(buffer, true, false); + Log(LogLevel::kInfo, buffer); num++; } assert(asset_lists_locked_); @@ -333,7 +333,7 @@ void Assets::PrintLoadInfo() { i.second->GetName().c_str(), static_cast_check_fit(preload_time), static_cast_check_fit(load_time)); - Log(buffer, true, false); + Log(LogLevel::kInfo, buffer); num++; } assert(asset_lists_locked_); @@ -346,7 +346,7 @@ void Assets::PrintLoadInfo() { i.second->GetName().c_str(), static_cast_check_fit(preload_time), static_cast_check_fit(load_time)); - Log(buffer, true, false); + Log(LogLevel::kInfo, buffer); num++; } assert(asset_lists_locked_); @@ -359,7 +359,7 @@ void Assets::PrintLoadInfo() { i.second->file_name_full().c_str(), static_cast_check_fit(preload_time), static_cast_check_fit(load_time)); - Log(buffer, true, false); + Log(LogLevel::kInfo, buffer); num++; } snprintf(buffer, sizeof(buffer), @@ -367,7 +367,7 @@ void Assets::PrintLoadInfo() { "(feeding data to OpenGL, etc): %i", static_cast(total_preload_time), static_cast(total_load_time)); - Log(buffer, true, false); + Log(LogLevel::kInfo, buffer); } void Assets::MarkAllAssetsForLoad() { @@ -810,8 +810,8 @@ auto Assets::RunPendingLoadList(std::vector*>* c_list) -> bool { } } - // if we dumped anything on the pending loads done list, shake the game thread - // to tell it to kill the reference.. + // if we dumped anything on the pending loads done list, shake the logic + // thread to tell it to kill the reference.. if (!l_finished.empty()) { assert(g_logic); g_logic->PushHavePendingLoadsDoneCall(); @@ -977,7 +977,7 @@ void Assets::Prune(int level) { if (current_time - collide_model_data->last_used_time() > standard_asset_prune_time && (collide_model_data->object_strong_ref_count() <= 1)) { - // we can unload it immediately since that happens in the game thread... + // we can unload it immediately since that happens in the logic thread... collide_model_data->Unload(); auto i_next = i; ++i_next; @@ -1151,10 +1151,12 @@ auto Assets::FindAssetFile(FileType type, const std::string& name) // We wanna fail gracefully for some types. if (type == FileType::kSound && name != "blank") { - Log("Unable to load audio: '" + name + "'; trying fallback..."); + Log(LogLevel::kError, + "Unable to load audio: '" + name + "'; trying fallback..."); return FindAssetFile(type, "blank"); } else if (type == FileType::kTexture && name != "white") { - Log("Unable to load texture: '" + name + "'; trying fallback..."); + Log(LogLevel::kError, + "Unable to load texture: '" + name + "'; trying fallback..."); return FindAssetFile(type, "white"); } @@ -1181,7 +1183,7 @@ void Assets::AddPendingLoad(Object::Ref* c) { break; } default: { - // Tell the game thread there's pending loads. + // Tell the logic thread there's pending loads. { std::scoped_lock lock(pending_load_list_mutex_); pending_loads_other_.push_back(c); @@ -1198,7 +1200,7 @@ void Assets::ClearPendingLoadsDoneList() { std::scoped_lock lock(pending_load_list_mutex_); // Our explicitly-allocated reference pointer has made it back to us here in - // the game thread. + // the logic thread. // We can now kill the reference knowing that it's safe for this component // to die at any time (anyone needing it to be alive now should be holding a // reference themselves). @@ -1213,7 +1215,7 @@ void Assets::AddPackage(const std::string& name, const std::string& path) { assert(InLogicThread()); #if BA_DEBUG_BUILD if (packages_.find(name) != packages_.end()) { - Log("WARNING: adding duplicate package: '" + name + "'"); + Log(LogLevel::kWarning, "adding duplicate package: '" + name + "'"); } #endif // BA_DEBUG_BUILD packages_[name] = path; diff --git a/src/ballistica/assets/assets.h b/src/ballistica/assets/assets.h index 529d4856..a23bcefe 100644 --- a/src/ballistica/assets/assets.h +++ b/src/ballistica/assets/assets.h @@ -67,7 +67,7 @@ class Assets { /// recreating/adjusting the renderer. auto UnloadRendererBits(bool textures, bool models) -> void; - /// Should be called from the game thread after UnloadRendererBits(); + /// Should be called from the logic thread after UnloadRendererBits(); /// kicks off bg loads for all existing unloaded assets. auto MarkAllAssetsForLoad() -> void; auto PrintLoadInfo() -> void; diff --git a/src/ballistica/assets/assets_server.cc b/src/ballistica/assets/assets_server.cc index 733e9b35..81168ff9 100644 --- a/src/ballistica/assets/assets_server.cc +++ b/src/ballistica/assets/assets_server.cc @@ -57,7 +57,8 @@ void AssetsServer::PushBeginWriteReplayCall() { // we only allow writing one replay at once; make sure that's actually the // case if (writing_replay_) { - Log("AssetsServer got BeginWriteReplayCall while already writing"); + Log(LogLevel::kError, + "AssetsServer got BeginWriteReplayCall while already writing"); WriteReplayMessages(); if (replay_out_file_) { fclose(replay_out_file_); @@ -76,7 +77,8 @@ void AssetsServer::PushBeginWriteReplayCall() { replay_bytes_written_ = 0; if (!replay_out_file_) { - Log("ERROR: unable to open output-stream file: '" + file_path + "'"); + Log(LogLevel::kError, + "unable to open output-stream file: '" + file_path + "'"); } else { // write file id and protocol-version // NOTE - we always write replays in our host protocol version @@ -87,8 +89,8 @@ void AssetsServer::PushBeginWriteReplayCall() { || (fwrite(&version, sizeof(version), 1, replay_out_file_) != 1)) { fclose(replay_out_file_); replay_out_file_ = nullptr; - Log("error writing replay file header: " - + g_platform->GetErrnoString()); + Log(LogLevel::kError, "error writing replay file header: " + + g_platform->GetErrnoString()); } replay_bytes_written_ = 5; } @@ -108,7 +110,8 @@ void AssetsServer::PushAddMessageToReplayCall( // sanity check.. if (!writing_replay_) { - Log("AssetsServer got AddMessageToReplayCall while not writing replay"); + Log(LogLevel::kError, + "AssetsServer got AddMessageToReplayCall while not writing replay"); replays_broken_ = true; return; } @@ -118,7 +121,8 @@ void AssetsServer::PushAddMessageToReplayCall( // if we've got too much data built up (lets go with 10 megs for now), // abort if (replay_message_bytes_ > 10000000) { - Log("replay output buffer exceeded 10 megs; aborting replay"); + Log(LogLevel::kError, + "replay output buffer exceeded 10 megs; aborting replay"); fclose(replay_out_file_); replay_out_file_ = nullptr; replay_message_bytes_ = 0; @@ -139,7 +143,7 @@ void AssetsServer::PushEndWriteReplayCall() { // sanity check.. if (!writing_replay_) { - Log("_finishWritingReplay called while not writing"); + Log(LogLevel::kError, "_finishWritingReplay called while not writing"); replays_broken_ = true; return; } @@ -176,7 +180,8 @@ void AssetsServer::WriteReplayMessages() { if (fwrite(&len8, 1, 1, replay_out_file_) != 1) { fclose(replay_out_file_); replay_out_file_ = nullptr; - Log("error writing replay file: " + g_platform->GetErrnoString()); + Log(LogLevel::kError, + "error writing replay file: " + g_platform->GetErrnoString()); return; } } @@ -187,14 +192,16 @@ void AssetsServer::WriteReplayMessages() { if (fwrite(&len16, 2, 1, replay_out_file_) != 1) { fclose(replay_out_file_); replay_out_file_ = nullptr; - Log("error writing replay file: " + g_platform->GetErrnoString()); + Log(LogLevel::kError, + "error writing replay file: " + g_platform->GetErrnoString()); return; } } else { if (fwrite(&len32, 4, 1, replay_out_file_) != 1) { fclose(replay_out_file_); replay_out_file_ = nullptr; - Log("error writing replay file: " + g_platform->GetErrnoString()); + Log(LogLevel::kError, + "error writing replay file: " + g_platform->GetErrnoString()); return; } } @@ -205,7 +212,8 @@ void AssetsServer::WriteReplayMessages() { if (result != 1) { fclose(replay_out_file_); replay_out_file_ = nullptr; - Log("error writing replay file: " + g_platform->GetErrnoString()); + Log(LogLevel::kError, + "error writing replay file: " + g_platform->GetErrnoString()); return; } replay_bytes_written_ += data_compressed.size() + 2; diff --git a/src/ballistica/assets/data/data_data.cc b/src/ballistica/assets/data/data_data.cc index 770899e6..0a509fc4 100644 --- a/src/ballistica/assets/data/data_data.cc +++ b/src/ballistica/assets/data/data_data.cc @@ -20,8 +20,8 @@ void DataData::DoPreload() { // in the following case: // - asset thread grabs payload lock for Preload() // - asset thread tries to grab GIL in Preload(); spins. - // - meanwhile, something in game thread has called Load() - // - game thread holds GIL by default and now spins waiting on payload lock. + // - meanwhile, something in logic thread has called Load() + // - logic thread holds GIL by default and now spins waiting on payload lock. // - deadlock :-( // ...so the new plan is to simply load the file into a string in Preload() diff --git a/src/ballistica/assets/data/sound_data.cc b/src/ballistica/assets/data/sound_data.cc index 804b7fb9..5b257c0d 100644 --- a/src/ballistica/assets/data/sound_data.cc +++ b/src/ballistica/assets/data/sound_data.cc @@ -56,8 +56,8 @@ static auto LoadOgg(const char* file_name, std::vector* buffer, f = g_platform->FOpen(file_name, "rb"); if (f == nullptr) { fallback = true; - Log(std::string("Error: Can't open sound file '") + file_name - + "' for reading..."); + Log(LogLevel::kError, std::string("Can't open sound file '") + file_name + + "' for reading..."); // Attempt a fallback standin; if that doesn't work, throw in the towel. file_name = "data/global/audio/blank.ogg"; @@ -77,7 +77,8 @@ static auto LoadOgg(const char* file_name, std::vector* buffer, // Try opening the given file if (ov_open_callbacks(f, &ogg_file, nullptr, 0, callbacks) != 0) { - Log(std::string("Error decoding sound file '") + file_name + "'"); + Log(LogLevel::kError, + std::string("Error decoding sound file '") + file_name + "'"); fclose(f); @@ -199,8 +200,9 @@ static void LoadCachedOgg(const char* file_name, std::vector* buffer, // with invalid formats of 0 once. Report and ignore if we see // something like that. if (*format != AL_FORMAT_MONO16 && *format != AL_FORMAT_STEREO16) { - Log(std::string("Ignoring invalid audio cache of ") + file_name - + " with format " + std::to_string(*format)); + Log(LogLevel::kError, std::string("Ignoring invalid audio cache of ") + + file_name + " with format " + + std::to_string(*format)); } else { return; // SUCCESS!!!! } diff --git a/src/ballistica/audio/al_sys.cc b/src/ballistica/audio/al_sys.cc index 11518df6..c39a14d2 100644 --- a/src/ballistica/audio/al_sys.cc +++ b/src/ballistica/audio/al_sys.cc @@ -16,13 +16,14 @@ namespace ballistica { void _check_al_error(const char* file, int line) { if (g_audio_server->paused()) { - Log(Utils::BaseName(file) + ":" + std::to_string(line) - + ": Checking OpenAL error while paused."); + Log(LogLevel::kError, Utils::BaseName(file) + ":" + std::to_string(line) + + ": Checking OpenAL error while paused."); } ALenum al_err = alGetError(); if (al_err != AL_NO_ERROR) { - Log(Utils::BaseName(file) + ":" + std::to_string(line) - + ": OpenAL Error: " + GetALErrorString(al_err) + ";"); + Log(LogLevel::kError, Utils::BaseName(file) + ":" + std::to_string(line) + + ": OpenAL Error: " + GetALErrorString(al_err) + + ";"); } } diff --git a/src/ballistica/audio/audio_server.cc b/src/ballistica/audio/audio_server.cc index a63451d7..295bb803 100644 --- a/src/ballistica/audio/audio_server.cc +++ b/src/ballistica/audio/audio_server.cc @@ -144,7 +144,7 @@ struct AudioServer::SoundFadeNode { void AudioServer::SetPaused(bool pause) { if (!paused_) { if (!pause) { - Log("Error: got audio unpause request when already unpaused."); + Log(LogLevel::kError, "Got audio unpause request when already unpaused."); } else { #if BA_OSTYPE_IOS_TVOS // apple recommends this during audio-interruptions.. @@ -163,7 +163,7 @@ void AudioServer::SetPaused(bool pause) { } else { // unpause if requested.. if (pause) { - Log("Error: Got audio pause request when already paused."); + Log(LogLevel::kError, "Got audio pause request when already paused."); } else { #if BA_OSTYPE_IOS_TVOS // apple recommends this during audio-interruptions.. @@ -357,7 +357,7 @@ auto AudioServer::OnAppStartInThread() -> void { ALboolean enumeration = alcIsExtensionPresent(nullptr, "ALC_ENUMERATE_ALL_EXT"); if (enumeration == AL_FALSE) { - Log("OpenAL enumeration extensions missing."); + Log(LogLevel::kError, "OpenAL enumeration extensions missing."); } else { const ALCchar* devices = alcGetString(nullptr, ALC_ALL_DEVICES_SPECIFIER); @@ -414,8 +414,8 @@ auto AudioServer::OnAppStartInThread() -> void { sound_source_refs_.push_back(s); sources_.push_back(&(*s)); } else { - Log("Error: Made " + std::to_string(i) + " sources; (wanted " - + std::to_string(target_source_count) + ")."); + Log(LogLevel::kError, "Made " + std::to_string(i) + " sources; (wanted " + + std::to_string(target_source_count) + ")."); break; } } @@ -473,9 +473,10 @@ void AudioServer::UpdateAvailableSources() { // that probably means somebody's grabbing a source but never // resubmitting it. if (t - i->client_source()->last_lock_time() > 10000) { - Log("Error: Client audio source has been locked for too long; " + Log(LogLevel::kError, + "Client audio source has been locked for too long; " "probably leaked. (debug id " - + std::to_string(i->client_source()->lock_debug_id()) + ")"); + + std::to_string(i->client_source()->lock_debug_id()) + ")"); } continue; } @@ -694,8 +695,8 @@ AudioServer::ThreadSource::ThreadSource(AudioServer* audio_thread_in, int id_in, ALenum err = alGetError(); valid_ = (err == AL_NO_ERROR); if (!valid_) { - Log(std::string("Error: AL Error ") + GetALErrorString(err) - + " on source creation."); + Log(LogLevel::kError, std::string("AL Error ") + GetALErrorString(err) + + " on source creation."); } else { // In vr mode we keep the microphone a bit closer to the camera // for realism purposes, so we need stuff louder in general. @@ -878,9 +879,9 @@ void AudioServer::ThreadSource::SetPosition(float x, float y, float z) { z = 500; } if (oob) { - BA_LOG_ONCE( - "Error: AudioServer::ThreadSource::SetPosition" - " got out-of-bounds value."); + BA_LOG_ONCE(LogLevel::kError, + "AudioServer::ThreadSource::SetPosition" + " got out-of-bounds value."); } ALfloat source_pos[] = {x, y, z}; alSourcefv(source_, AL_POSITION, source_pos); @@ -1098,7 +1099,7 @@ void AudioServer::PushSetSoundPitchCall(float val) { void AudioServer::PushSetPausedCall(bool pause) { thread()->PushCall([this, pause] { if (g_buildconfig.ostype_android()) { - Log("Error: Shouldn't be getting SetPausedCall on android."); + Log(LogLevel::kError, "Shouldn't be getting SetPausedCall on android."); } SetPaused(pause); }); @@ -1111,7 +1112,7 @@ void AudioServer::PushComponentUnloadCall( for (auto&& i : components) { (**i).Unload(); } - // ...and then ship these pointers back to the game thread, so it can free + // ...and then ship these pointers back to the logic thread, so it can free // the references. g_logic->PushFreeAssetComponentRefsCall(components); }); @@ -1129,7 +1130,7 @@ void AudioServer::AddSoundRefDelete(const Object::Ref* c) { std::scoped_lock lock(sound_ref_delete_list_mutex_); sound_ref_delete_list_.push_back(c); } - // Now push a call to the game thread to do the deletes. + // Now push a call to the logic thread to do the deletes. g_logic->thread()->PushCall( [] { g_audio_server->ClearSoundRefDeleteList(); }); } @@ -1154,7 +1155,7 @@ void AudioServer::BeginInterruption() { break; } if (GetRealTime() - t > 1000) { - Log("Error: Timed out waiting for audio pause."); + Log(LogLevel::kError, "Timed out waiting for audio pause."); break; } Platform::SleepMS(2); @@ -1176,7 +1177,7 @@ void AudioServer::EndInterruption() { break; } if (GetRealTime() - t > 1000) { - Log("Error: Timed out waiting for audio unpause."); + Log(LogLevel::kError, "Timed out waiting for audio unpause."); break; } Platform::SleepMS(2); diff --git a/src/ballistica/audio/audio_server.h b/src/ballistica/audio/audio_server.h index 9efb480a..e8d6720e 100644 --- a/src/ballistica/audio/audio_server.h +++ b/src/ballistica/audio/audio_server.h @@ -101,7 +101,7 @@ class AudioServer { // Some threads such as audio hold onto allocated Media-Component-Refs to keep // media components alive that they need. Media-Component-Refs, however, must - // be disposed of in the game thread, so they are passed back to it through + // be disposed of in the logic thread, so they are passed back to it through // this function. auto AddSoundRefDelete(const Object::Ref* c) -> void; diff --git a/src/ballistica/audio/audio_source.cc b/src/ballistica/audio/audio_source.cc index 492fd0ec..4e391f34 100644 --- a/src/ballistica/audio/audio_source.cc +++ b/src/ballistica/audio/audio_source.cc @@ -41,7 +41,7 @@ void AudioSource::SetPosition(float x, float y, float z) { assert(client_queue_size_ > 0); #if BA_DEBUG_BUILD if (std::isnan(x) || std::isnan(y) || std::isnan(z)) { - Log("Error: Got nan value in AudioSource::SetPosition."); + Log(LogLevel::kError, "Got nan value in AudioSource::SetPosition."); } #endif g_audio_server->PushSourceSetPositionCall(play_id_, Vector3f(x, y, z)); diff --git a/src/ballistica/audio/audio_streamer.cc b/src/ballistica/audio/audio_streamer.cc index d44a9982..9cdee4a1 100644 --- a/src/ballistica/audio/audio_streamer.cc +++ b/src/ballistica/audio/audio_streamer.cc @@ -86,8 +86,9 @@ void AudioStreamer::Update() { // A fun anomaly in the linux version; we sometimes get more // "processed" buffers than we have queued. if (queued < processed) { - Log("Error: streamer oddness: queued(" + std::to_string(queued) - + "); processed(" + std::to_string(processed) + ")"); + Log(LogLevel::kError, "Streamer oddness: queued(" + std::to_string(queued) + + "); processed(" + std::to_string(processed) + + ")"); processed = queued; } diff --git a/src/ballistica/audio/ogg_stream.cc b/src/ballistica/audio/ogg_stream.cc index 93286491..68b40ef6 100644 --- a/src/ballistica/audio/ogg_stream.cc +++ b/src/ballistica/audio/ogg_stream.cc @@ -88,7 +88,8 @@ void OggStream::DoStream(char* pcm, int* size, unsigned int* rate) { static bool reported_error = false; if (!reported_error) { reported_error = true; - Log("Error streaming ogg file: '" + file_name() + "'."); + Log(LogLevel::kError, + "Error streaming ogg file: '" + file_name() + "'."); } if (loops()) { ov_pcm_seek(&ogg_file_, 0); diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 355a3e30..4c2ea9b2 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,13 +32,13 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20842; +const int kAppBuildNumber = 20849; const char* kAppVersion = "1.7.7"; // Our standalone globals. // These are separated out for easy access. // Everything else should go into App (or more ideally into a class). -int g_early_log_writes{10}; +int g_early_v1_cloud_log_writes{10}; App* g_app{}; AppConfig* g_app_config{}; @@ -86,8 +86,8 @@ auto BallisticaMain(int argc, char** argv) -> int { // avoid any logic that accesses other globals since they may // not yet exist. - // Minimal globals we must assign immediately as they are needed - // during construction of the others. + // Minimal globals we must assign immediately as they ARE needed + // for construction of the others (would be great to eliminate this need). g_platform = Platform::Create(); g_app = new App(argc, argv); g_app_internal = CreateAppInternal(); @@ -267,49 +267,56 @@ auto GetAppInstanceUUID() -> const std::string& { } if (!have_session_id) { // As an emergency fallback simply use a single random number. - Log("WARNING: GetSessionUUID() using rand fallback."); + Log(LogLevel::kWarning, "GetSessionUUID() using rand fallback."); srand(static_cast( Platform::GetCurrentMilliseconds())); // NOLINT session_id = std::to_string(static_cast(rand())); // NOLINT have_session_id = true; } if (session_id.size() >= 100) { - Log("WARNING: session id longer than it should be."); + Log(LogLevel::kWarning, "session id longer than it should be."); } } return session_id; } +auto InMainThread() -> bool { + assert(g_main_thread); // Root out early use of this. + return (g_main_thread->IsCurrent()); +} + auto InLogicThread() -> bool { + assert(g_app && g_app->is_bootstrapped); // Root out early use of this. return (g_logic && g_logic->thread()->IsCurrent()); } -auto InMainThread() -> bool { - return (g_app && std::this_thread::get_id() == g_app->main_thread_id); -} - auto InGraphicsThread() -> bool { + assert(g_app && g_app->is_bootstrapped); // Root out early use of this. return (g_graphics_server && g_graphics_server->thread()->IsCurrent()); } auto InAudioThread() -> bool { + assert(g_app && g_app->is_bootstrapped); // Root out early use of this. return (g_audio_server && g_audio_server->thread()->IsCurrent()); } auto InBGDynamicsThread() -> bool { + assert(g_app && g_app->is_bootstrapped); // Root out early use of this. return (g_bg_dynamics_server && g_bg_dynamics_server->thread()->IsCurrent()); } auto InAssetsThread() -> bool { + assert(g_app && g_app->is_bootstrapped); // Root out early use of this. return (g_assets_server && g_assets_server->thread()->IsCurrent()); } auto InNetworkWriteThread() -> bool { + assert(g_app && g_app->is_bootstrapped); // Root out early use of this. return (g_network_writer && g_network_writer->thread()->IsCurrent()); } -auto Log(const std::string& msg, bool to_stdout, bool to_server) -> void { - Logging::Log(msg, to_stdout, to_server); +auto Log(LogLevel level, const std::string& msg) -> void { + Logging::Log(level, msg); } auto IsVRMode() -> bool { return g_app->vr_mode; } @@ -318,7 +325,8 @@ void ScreenMessage(const std::string& s, const Vector3f& color) { if (g_logic) { g_logic->PushScreenMessage(s, color); } else { - Log("ScreenMessage before g_logic init (will be lost): '" + s + "'"); + Log(LogLevel::kError, + "ScreenMessage before g_logic init (will be lost): '" + s + "'"); } } diff --git a/src/ballistica/ballistica.h b/src/ballistica/ballistica.h index eaab6d8b..33cf255a 100644 --- a/src/ballistica/ballistica.h +++ b/src/ballistica/ballistica.h @@ -102,7 +102,7 @@ const float kGameStepSeconds = (static_cast(kGameStepMilliseconds) / 1000.0f); // Globals. -extern int g_early_log_writes; +extern int g_early_v1_cloud_log_writes; extern V1Account* g_v1_account; extern AppFlavor* g_app_flavor; extern AppConfig* g_app_config; @@ -168,8 +168,7 @@ auto GetCurrentThreadName() -> std::string; /// Write a string to the log. /// This will go to stdout, windows debug log, android log, etc. /// A trailing newline will be added. -auto Log(const std::string& msg, bool to_stdout = true, bool to_server = true) - -> void; +auto Log(LogLevel level, const std::string& msg) -> void; /// Log a fatal error and kill the app. /// Can be called from any thread at any time. diff --git a/src/ballistica/core/context.cc b/src/ballistica/core/context.cc index 632f9f1b..c99d265e 100644 --- a/src/ballistica/core/context.cc +++ b/src/ballistica/core/context.cc @@ -100,7 +100,7 @@ auto ContextTarget::NewTimer(TimeType timetype, TimerMedium length, bool repeat, void ContextTarget::DeleteTimer(TimeType timetype, int timer_id) { // We throw on NewTimer; lets just ignore anything that comes // through here to avoid messing up destructors. - Log("ContextTarget::DeleteTimer() called; unexpected."); + Log(LogLevel::kError, "ContextTarget::DeleteTimer() called; unexpected."); } auto ContextTarget::GetTime(TimeType timetype) -> millisecs_t { diff --git a/src/ballistica/core/context.h b/src/ballistica/core/context.h index 68b0d101..bd96ec13 100644 --- a/src/ballistica/core/context.h +++ b/src/ballistica/core/context.h @@ -17,13 +17,13 @@ class Context { static auto current() -> const Context& { assert(g_context); - // Context can only be accessed from the game thread. + // Context can only be accessed from the logic thread. BA_PRECONDITION(InLogicThread()); return *g_context; } static void set_current(const Context& context) { - // Context can only be accessed from the game thread. + // Context can only be accessed from the logic thread. BA_PRECONDITION(InLogicThread()); *g_context = context; diff --git a/src/ballistica/core/fatal_error.cc b/src/ballistica/core/fatal_error.cc index 8459de92..7dc75d06 100644 --- a/src/ballistica/core/fatal_error.cc +++ b/src/ballistica/core/fatal_error.cc @@ -69,11 +69,15 @@ auto FatalError::ReportFatalError(const std::string& message, } } - // Prevent the early-log insta-send mechanism from firing since we do - // basically the same thing ourself here (avoid sending the same logs twice). - g_early_log_writes = 0; + // Prevent the early-v1-cloud-log insta-send mechanism from firing since + // we do basically the same thing ourself here (avoid sending the same + // logs twice). + g_early_v1_cloud_log_writes = 0; - Logging::Log(logmsg); + // Add this to our V1CloudLog which we'll be attempting to send momentarily, + // and also try to present it directly to the user. + Logging::V1CloudLog(logmsg); + Logging::DisplayLog("root", LogLevel::kCritical, logmsg); std::string prefix = "FATAL-ERROR-LOG:"; std::string suffix; @@ -83,7 +87,7 @@ auto FatalError::ReportFatalError(const std::string& message, if (g_app == nullptr) { suffix = logmsg; } - g_app_internal->DirectSendLogs(prefix, suffix, true, &result); + g_app_internal->DirectSendV1CloudLogs(prefix, suffix, true, &result); // If we're able to show a fatal-error dialog synchronously, do so. if (g_platform && g_platform->CanShowBlockingFatalErrorDialog()) { @@ -148,10 +152,10 @@ auto FatalError::HandleFatalError(bool exit_cleanly, // bring the app down ourself. if (!in_top_level_exception_handler) { if (exit_cleanly) { - Log("Calling exit(1)..."); + Logging::DisplayLog("root", LogLevel::kCritical, "Calling exit(1)..."); exit(1); } else { - Log("Calling abort()..."); + Logging::DisplayLog("root", LogLevel::kCritical, "Calling abort()..."); abort(); } } diff --git a/src/ballistica/core/logging.cc b/src/ballistica/core/logging.cc index 69a892b9..35805da9 100644 --- a/src/ballistica/core/logging.cc +++ b/src/ballistica/core/logging.cc @@ -13,98 +13,93 @@ namespace ballistica { -static void PrintCommon(const std::string& s) { +auto Logging::Log(LogLevel level, const std::string& msg) -> void { + // This is basically up to Python to handle, but its up to us + // if Python's not up yet. + if (!g_python) { + // Make an attempt to get it at least seen (and note the fact + // that its super-early). + const char* errmsg{"Logging::Log() called before g_python exists."}; + if (g_platform) { + g_platform->DisplayLog("root", LogLevel::kError, errmsg); + g_platform->DisplayLog("root", level, msg); + } + fprintf(stderr, "%s\n%s\n", errmsg, msg.c_str()); + return; + } + + // All we want to do is call Python logging.XXX. That's on Python. + g_python->LoggingCall(level, msg); +} + +auto Logging::DisplayLog(const std::string& name, LogLevel level, + const std::string& msg) -> void { // Print to in-game console. { if (g_logic != nullptr) { - g_logic->PushConsolePrintCall(s); + g_logic->PushConsolePrintCall(msg); } else { if (g_platform != nullptr) { - g_platform->HandleLog( - "Warning: Log() called before game-thread setup; " - "will not appear on in-game console.\n"); + g_platform->DisplayLog("root", LogLevel::kWarning, + "DisplayLog() called before logic-thread setup; " + "will not appear on in-game console."); } } } + // Print to any telnet clients. if (g_app && g_app->telnet_server) { - g_app->telnet_server->PushPrint(s); + g_app->telnet_server->PushPrint(msg); } + + // Ship to platform-specific display mechanisms (android log, etc). + g_platform->DisplayLog(name, level, msg); } -void Logging::PrintStdout(const std::string& s, bool flush) { - fprintf(stdout, "%s", s.c_str()); - if (flush) { - fflush(stdout); - } - PrintCommon(s); -} - -void Logging::PrintStderr(const std::string& s, bool flush) { - fprintf(stderr, "%s", s.c_str()); - if (flush) { - fflush(stderr); - } - PrintCommon(s); -} - -void Logging::Log(const std::string& msg, bool to_stdout, bool to_server) { - if (to_stdout) { - PrintStdout(msg + "\n", true); +auto Logging::V1CloudLog(const std::string& msg) -> void { + // Route through platform-specific loggers if present. + // (things like Crashlytics crash-logging) + if (g_platform) { + Platform::DebugLog(msg); } - // Ship to the platform logging mechanism (android-log, stderr, etc.) - // if that's available yet. - if (g_platform != nullptr) { - g_platform->HandleLog(msg); - } - - // Ship to master-server/etc. - if (to_server) { - // Route through platform-specific loggers if present. - // (things like Crashlytics crash-logging) - if (g_platform) { - Platform::DebugLog(msg); - } - - // Add to our complete log. - if (g_app != nullptr) { - std::scoped_lock lock(g_app->log_mutex); - if (!g_app->log_full) { - (g_app->log) += (msg + "\n"); - if ((g_app->log).size() > 10000) { - // Allow some reasonable overflow for last statement. - if ((g_app->log).size() > 100000) { - // FIXME: This could potentially chop up utf-8 chars. - (g_app->log).resize(100000); - } - g_app->log += "\n\n"; - g_app->log_full = true; + // Add to our complete v1-cloud-log. + if (g_app != nullptr) { + std::scoped_lock lock(g_app->v1_cloud_log_mutex); + if (!g_app->v1_cloud_log_full) { + (g_app->v1_cloud_log) += (msg + "\n"); + if ((g_app->v1_cloud_log).size() > 10000) { + // Allow some reasonable overflow for last statement. + if ((g_app->v1_cloud_log).size() > 100000) { + // FIXME: This could potentially chop up utf-8 chars. + (g_app->v1_cloud_log).resize(100000); } + g_app->v1_cloud_log += "\n\n"; + g_app->v1_cloud_log_full = true; } } + } - // If the game is fully bootstrapped, let the Python layer handle logs. - // It will group log messages intelligently and ship them to the - // master server with various other context info included. - if (g_app && g_app->is_bootstrapped) { - assert(g_python != nullptr); - g_python->PushObjCall(Python::ObjID::kHandleLogCall); - } else { - // For log messages during bootstrapping we ship them immediately since - // we don't know if the Python layer is (or will be) able to. - if (g_early_log_writes > 0) { - g_early_log_writes -= 1; - std::string logprefix = "EARLY-LOG:"; - std::string logsuffix; + // If the game is fully bootstrapped, let the Python layer handle logs. + // It will group log messages intelligently and ship them to the + // master server with various other context info included. + if (g_app && g_app->is_bootstrapped) { + assert(g_python != nullptr); + g_python->PushObjCall(Python::ObjID::kHandleV1CloudLogCall); + } else { + // For log messages during bootstrapping we ship them immediately since + // we don't know if the Python layer is (or will be) able to. + if (g_early_v1_cloud_log_writes > 0) { + g_early_v1_cloud_log_writes -= 1; + std::string logprefix = "EARLY-LOG:"; + std::string logsuffix; - // If we're an early enough error, our global log isn't even available, - // so include this specific message as a suffix instead. - if (g_app == nullptr) { - logsuffix = msg; - } - g_app_internal->DirectSendLogs(logprefix, logsuffix, false); + // If we're an early enough error, our global log isn't even available, + // so include this specific message as a suffix instead. + if (g_app == nullptr) { + logsuffix = msg; } + g_app_internal->DirectSendV1CloudLogs(logprefix, logsuffix, false); } } } diff --git a/src/ballistica/core/logging.h b/src/ballistica/core/logging.h index 66d41ed9..6c7fb319 100644 --- a/src/ballistica/core/logging.h +++ b/src/ballistica/core/logging.h @@ -5,23 +5,33 @@ #include +#include "ballistica/ballistica.h" + namespace ballistica { class Logging { public: - /// Print a string directly to stdout as well as the in-game console - /// and any connected telnet consoles. - static auto PrintStdout(const std::string& s, bool flush = false) -> void; + /// Write a message to the log. Intended for logging use in C++ code. + /// This is safe to call by any thread at any time. In general it simply + /// passes through to the equivalent Python log calls: logging.info, + /// logging.warning, etc. + /// Note that log messages often must go through some background + /// processing before being seen by the user, meaning they may not + /// always work well for tight debugging purposes. In cases such as these, + /// printf() type calls or calling DisplayLog() directly may work better. + /// (though both of these should be avoided in permanent code). + static auto Log(LogLevel level, const std::string& msg) -> void; - /// Print a string directly to stderr as well as the in-game console - /// and any connected telnet consoles. - static auto PrintStderr(const std::string& s, bool flush = false) -> void; + /// Immediately display a log message in the in-game console, + /// platform-specific logs, etc. This generally should not be called + /// directly but instead wired up to display messages coming from the + /// Python logging system. + static auto DisplayLog(const std::string& name, LogLevel level, + const std::string& msg) -> void; - /// Write a string to the debug log. - /// This will go to stdout, windows debug log, android log, etc. depending - /// on the platform. - static auto Log(const std::string& msg, bool to_stdout = true, - bool to_server = true) -> void; + /// Write a message to the v1 cloud log. This is considered legacy + /// and will be phased out eventually. + static auto V1CloudLog(const std::string& msg) -> void; }; } // namespace ballistica diff --git a/src/ballistica/core/macros.cc b/src/ballistica/core/macros.cc index ed4a25bb..27f436bf 100644 --- a/src/ballistica/core/macros.cc +++ b/src/ballistica/core/macros.cc @@ -18,8 +18,8 @@ void MacroFunctionTimerEnd(millisecs_t starttime, millisecs_t time, } millisecs_t endtime = g_platform->GetTicks(); if (endtime - starttime > time) { - Log("Warning: " + std::to_string(endtime - starttime) - + " milliseconds spent in " + funcname); + Log(LogLevel::kWarning, std::to_string(endtime - starttime) + + " milliseconds spent in " + funcname); } } @@ -32,9 +32,9 @@ void MacroFunctionTimerEndThread(millisecs_t starttime, millisecs_t time, } millisecs_t endtime = g_platform->GetTicks(); if (endtime - starttime > time) { - Log("Warning: " + std::to_string(endtime - starttime) - + " milliseconds spent by " + ballistica::GetCurrentThreadName() - + " thread in " + funcname); + Log(LogLevel::kWarning, + std::to_string(endtime - starttime) + " milliseconds spent by " + + ballistica::GetCurrentThreadName() + " thread in " + funcname); } } @@ -47,8 +47,9 @@ void MacroFunctionTimerEndEx(millisecs_t starttime, millisecs_t time, } millisecs_t endtime = g_platform->GetTicks(); if (endtime - starttime > time) { - Log("Warning: " + std::to_string(endtime - starttime) - + " milliseconds spent in " + funcname + " for " + what); + Log(LogLevel::kWarning, std::to_string(endtime - starttime) + + " milliseconds spent in " + funcname + " for " + + what); } } @@ -62,9 +63,10 @@ void MacroFunctionTimerEndThreadEx(millisecs_t starttime, millisecs_t time, } millisecs_t endtime = g_platform->GetTicks(); if (endtime - starttime > time) { - Log("Warning: " + std::to_string(endtime - starttime) - + " milliseconds spent by " + ballistica::GetCurrentThreadName() - + " thread in " + funcname + " for " + what); + Log(LogLevel::kWarning, std::to_string(endtime - starttime) + + " milliseconds spent by " + + ballistica::GetCurrentThreadName() + + " thread in " + funcname + " for " + what); } } @@ -77,9 +79,9 @@ void MacroTimeCheckEnd(millisecs_t starttime, millisecs_t time, } millisecs_t e = g_platform->GetTicks(); if (e - starttime > time) { - Log(std::string("Warning: ") + name + " took " - + std::to_string(e - starttime) + " milliseconds; " + file + " line " - + std::to_string(line)); + Log(LogLevel::kWarning, + std::string(name) + " took " + std::to_string(e - starttime) + + " milliseconds; " + file + " line " + std::to_string(line)); } } @@ -88,19 +90,19 @@ void MacroLogErrorTrace(const std::string& msg, const char* fname, int line) { snprintf(buffer, sizeof(buffer), "%s:%d:", fname, line); buffer[sizeof(buffer) - 1] = 0; Python::PrintStackTrace(); - Log(std::string(buffer) + " error: " + msg); + Log(LogLevel::kError, std::string(buffer) + " error: " + msg); } void MacroLogError(const std::string& msg, const char* fname, int line) { char e_buffer[2048]; snprintf(e_buffer, sizeof(e_buffer), "%s:%d:", fname, line); e_buffer[sizeof(e_buffer) - 1] = 0; - ballistica::Log(std::string(e_buffer) + " error: " + msg); + Log(LogLevel::kError, std::string(e_buffer) + " error: " + msg); } void MacroLogPythonTrace(const std::string& msg) { Python::PrintStackTrace(); - Log(msg); + Log(LogLevel::kError, msg); } } // namespace ballistica diff --git a/src/ballistica/core/macros.h b/src/ballistica/core/macros.h index 65b81043..85c70105 100644 --- a/src/ballistica/core/macros.h +++ b/src/ballistica/core/macros.h @@ -86,11 +86,11 @@ } \ ((void)0) // (see 'Trailing-semicolon note' at top) -#define BA_LOG_ONCE(msg) \ +#define BA_LOG_ONCE(lvl, msg) \ { \ static bool did_log_here = false; \ if (!did_log_here) { \ - ballistica::Log(msg); \ + ballistica::Log(lvl, msg); \ did_log_here = true; \ } \ } \ @@ -120,12 +120,12 @@ /// Test a condition and simply print a log message if it fails (on both debug /// and release builds) -#define BA_PRECONDITION_LOG(b) \ - { \ - if (!(b)) { \ - Log("Precondition failed: " #b); \ - } \ - } \ +#define BA_PRECONDITION_LOG(b) \ + { \ + if (!(b)) { \ + Log(LogLevel::kError, "Precondition failed: " #b); \ + } \ + } \ ((void)0) // (see 'Trailing-semicolon note' at top) /// Test a condition and abort the program if it fails (on both debug diff --git a/src/ballistica/core/object.cc b/src/ballistica/core/object.cc index dc194534..ee3280ee 100644 --- a/src/ballistica/core/object.cc +++ b/src/ballistica/core/object.cc @@ -54,9 +54,9 @@ void Object::PrintObjects() { assert(count == g_app->object_count); } } - Log(s); + Log(LogLevel::kInfo, s); #else - Log("PrintObjects() only functions in debug builds."); + Log(LogLevel::kInfo, "PrintObjects() only functions in debug builds."); #endif // BA_DEBUG_BUILD } diff --git a/src/ballistica/core/thread.cc b/src/ballistica/core/thread.cc index 805faef9..de2b5985 100644 --- a/src/ballistica/core/thread.cc +++ b/src/ballistica/core/thread.cc @@ -43,26 +43,54 @@ auto Thread::RunLogicThread(void* data) -> int { return static_cast(data)->ThreadMain(); } +auto Thread::RunLogicThreadP(void* data) -> void* { + static_cast(data)->ThreadMain(); + return nullptr; +} + auto Thread::RunAudioThread(void* data) -> int { return static_cast(data)->ThreadMain(); } +auto Thread::RunAudioThreadP(void* data) -> void* { + static_cast(data)->ThreadMain(); + return nullptr; +} auto Thread::RunBGDynamicThread(void* data) -> int { return static_cast(data)->ThreadMain(); } +auto Thread::RunBGDynamicThreadP(void* data) -> void* { + static_cast(data)->ThreadMain(); + return nullptr; +} + auto Thread::RunNetworkWriteThread(void* data) -> int { return static_cast(data)->ThreadMain(); } +auto Thread::RunNetworkWriteThreadP(void* data) -> void* { + static_cast(data)->ThreadMain(); + return nullptr; +} + auto Thread::RunStdInputThread(void* data) -> int { return static_cast(data)->ThreadMain(); } +auto Thread::RunStdInputThreadP(void* data) -> void* { + static_cast(data)->ThreadMain(); + return nullptr; +} auto Thread::RunAssetsThread(void* data) -> int { return static_cast(data)->ThreadMain(); } +auto Thread::RunAssetsThreadP(void* data) -> void* { + static_cast(data)->ThreadMain(); + return nullptr; +} + void Thread::SetPaused(bool paused) { // Can be toggled from the main thread only. assert(std::this_thread::get_id() == g_app->main_thread_id); @@ -213,34 +241,58 @@ Thread::Thread(ThreadTag identifier_in, ThreadSource source) switch (source_) { case ThreadSource::kCreate: { int (*func)(void*); + void* (*funcp)(void*); switch (identifier_) { case ThreadTag::kLogic: func = RunLogicThread; + funcp = RunLogicThreadP; break; case ThreadTag::kAssets: func = RunAssetsThread; + funcp = RunAssetsThreadP; break; case ThreadTag::kMain: // Shouldn't happen; this thread gets wrapped; not launched. throw Exception(); case ThreadTag::kAudio: func = RunAudioThread; + funcp = RunAudioThreadP; break; case ThreadTag::kBGDynamics: func = RunBGDynamicThread; + funcp = RunBGDynamicThreadP; break; case ThreadTag::kNetworkWrite: func = RunNetworkWriteThread; + funcp = RunNetworkWriteThreadP; break; case ThreadTag::kStdin: func = RunStdInputThread; + funcp = RunStdInputThreadP; break; default: throw Exception(); } - // Let 'er rip. - thread_ = new std::thread(func, this); + // Let 'er rip. + + // NOTE: Apple platforms have a default secondary thread stack size + // of 512k which I've found to be insufficient in cases of heavy + // Python recursion or large simulations. It sounds like Windows + // and Android might have 1mb as default; let's try to standardize + // on that across the board. Unfortunately we have to use pthreads + // to get custom stack sizes; std::thread stupidly doesn't support it. + + // FIXME - move this to platform. +#if BA_OSTYPE_MACOS || BA_OSTYPE_IOS_TVOS || BA_OSTYPE_LINUX + pthread_attr_t attr; + BA_PRECONDITION(pthread_attr_init(&attr) == 0); + BA_PRECONDITION(pthread_attr_setstacksize(&attr, 1024 * 1024) == 0); + pthread_t thread; + pthread_create(&thread, &attr, funcp, this); +#else + new std::thread(func, this); +#endif // Block until the thread is bootstrapped. // (maybe not necessary, but let's be cautious in case we'd @@ -376,8 +428,9 @@ void Thread::LogThreadMessageTally() { writing_tally_ = true; std::unordered_map tally; - Log("Thread message tally (" + std::to_string(thread_messages_.size()) - + " in list):"); + Log(LogLevel::kError, "Thread message tally (" + + std::to_string(thread_messages_.size()) + + " in list):"); for (auto&& m : thread_messages_) { std::string s; switch (m.type) { @@ -411,8 +464,8 @@ void Thread::LogThreadMessageTally() { } int entry = 1; for (auto&& i : tally) { - Log(" #" + std::to_string(entry++) + " (" + std::to_string(i.second) - + "x): " + i.first); + Log(LogLevel::kError, " #" + std::to_string(entry++) + " (" + + std::to_string(i.second) + "x): " + i.first); } writing_tally_ = false; } @@ -445,7 +498,8 @@ void Thread::PushThreadMessage(const ThreadMessage& t) { // Show count periodically. if ((std::this_thread::get_id() == g_app->main_thread_id) && foo > 100) { foo = 0; - Log("MSG COUNT " + std::to_string(thread_messages_.size())); + Log(LogLevel::kInfo, + "MSG COUNT " + std::to_string(thread_messages_.size())); } } @@ -453,8 +507,8 @@ void Thread::PushThreadMessage(const ThreadMessage& t) { static bool sent_error = false; if (!sent_error) { sent_error = true; - Log("Error: ThreadMessage list > 1000 in thread: " - + GetCurrentThreadName()); + Log(LogLevel::kError, + "ThreadMessage list > 1000 in thread: " + GetCurrentThreadName()); LogThreadMessageTally(); } } diff --git a/src/ballistica/core/thread.h b/src/ballistica/core/thread.h index 1a007e1e..d5a63d01 100644 --- a/src/ballistica/core/thread.h +++ b/src/ballistica/core/thread.h @@ -141,11 +141,17 @@ class Thread { // different thread groups makes its easy to see which thread is which // in profilers, backtraces, etc. static auto RunLogicThread(void* data) -> int; + static auto RunLogicThreadP(void* data) -> void*; static auto RunAudioThread(void* data) -> int; + static auto RunAudioThreadP(void* data) -> void*; static auto RunBGDynamicThread(void* data) -> int; + static auto RunBGDynamicThreadP(void* data) -> void*; static auto RunNetworkWriteThread(void* data) -> int; + static auto RunNetworkWriteThreadP(void* data) -> void*; static auto RunStdInputThread(void* data) -> int; + static auto RunStdInputThreadP(void* data) -> void*; static auto RunAssetsThread(void* data) -> int; + static auto RunAssetsThreadP(void* data) -> void*; auto ThreadMain() -> int; auto GetThreadMessages(std::list* messages) -> void; @@ -159,7 +165,7 @@ class Thread { std::list> runnables_; std::list pause_callbacks_; std::list resume_callbacks_; - std::thread* thread_{}; + // std::thread* thread_{}; std::condition_variable thread_message_cv_; std::mutex thread_message_mutex_; std::list thread_messages_; diff --git a/src/ballistica/core/types.h b/src/ballistica/core/types.h index 8792b79f..663d0ad9 100644 --- a/src/ballistica/core/types.h +++ b/src/ballistica/core/types.h @@ -424,6 +424,8 @@ enum class PyExcType { kWidgetNotFound }; +enum class LogLevel { kDebug, kInfo, kWarning, kError, kCritical }; + enum class SystemTextureID { kUIAtlas, kButtonSquare, diff --git a/src/ballistica/dynamics/bg/bg_dynamics.h b/src/ballistica/dynamics/bg/bg_dynamics.h index 934811ad..264b0b26 100644 --- a/src/ballistica/dynamics/bg/bg_dynamics.h +++ b/src/ballistica/dynamics/bg/bg_dynamics.h @@ -45,7 +45,7 @@ class BGDynamicsEmission { BGDynamicsTendrilType tendril_type{BGDynamicsTendrilType::kSmoke}; }; -// client (game thread) functionality for bg dynamics +// client (logic thread) functionality for bg dynamics class BGDynamics { public: BGDynamics(); diff --git a/src/ballistica/dynamics/bg/bg_dynamics_draw_snapshot.h b/src/ballistica/dynamics/bg/bg_dynamics_draw_snapshot.h index 625b8f76..777843ae 100644 --- a/src/ballistica/dynamics/bg/bg_dynamics_draw_snapshot.h +++ b/src/ballistica/dynamics/bg/bg_dynamics_draw_snapshot.h @@ -10,7 +10,7 @@ namespace ballistica { // Big chunk of data sent back from the bg-dynamics server thread -// to the game thread for drawing. +// to the logic thread for drawing. class BGDynamicsDrawSnapshot { public: struct TendrilShadow { diff --git a/src/ballistica/dynamics/bg/bg_dynamics_server.cc b/src/ballistica/dynamics/bg/bg_dynamics_server.cc index f43b4b8d..cbcd8821 100644 --- a/src/ballistica/dynamics/bg/bg_dynamics_server.cc +++ b/src/ballistica/dynamics/bg/bg_dynamics_server.cc @@ -539,12 +539,12 @@ void BGDynamicsServer::ParticleSet::UpdateAndCreateSnapshot( auto* ibuf = Object::NewDeferred(p_count * 6); - // Game thread is default owner; needs to be us until we hand it over. + // Logic thread is default owner; needs to be us until we hand it over. ibuf->SetThreadOwnership(Object::ThreadOwnership::kNextReferencing); *index_buffer = Object::MakeRefCounted(ibuf); auto* vbuf = Object::NewDeferred(p_count * 4); - // Game thread is default owner; needs to be us until we hand it over. + // Logic thread is default owner; needs to be us until we hand it over. vbuf->SetThreadOwnership(Object::ThreadOwnership::kNextReferencing); *buffer = Object::MakeRefCounted(vbuf); @@ -1359,7 +1359,8 @@ void BGDynamicsServer::Emit(const BGDynamicsEmission& def) { } default: { int t = static_cast(def.emit_type); - BA_LOG_ONCE("Invalid bg-dynamics emit type: " + std::to_string(t)); + BA_LOG_ONCE(LogLevel::kError, + "Invalid bg-dynamics emit type: " + std::to_string(t)); break; } } @@ -1596,14 +1597,14 @@ auto BGDynamicsServer::CreateDrawSnapshot() -> BGDynamicsDrawSnapshot* { if (shadow_max_count > 0) { auto* ibuf = Object::NewDeferred(shadow_max_count * 6); - // Game thread is default owner; needs to be us until we hand it over. + // Logic thread is default owner; needs to be us until we hand it over. ibuf->SetThreadOwnership(Object::ThreadOwnership::kNextReferencing); ss->shadow_indices = Object::MakeRefCounted(ibuf); s_index = &ss->shadow_indices->elements[0]; auto* vbuf = Object::NewDeferred(shadow_max_count * 4); - // Game thread is default owner; needs to be us until we hand it over. + // Logic thread is default owner; needs to be us until we hand it over. vbuf->SetThreadOwnership(Object::ThreadOwnership::kNextReferencing); ss->shadow_vertices = Object::MakeRefCounted(vbuf); s_vertex = &ss->shadow_vertices->elements[0]; @@ -1612,14 +1613,14 @@ auto BGDynamicsServer::CreateDrawSnapshot() -> BGDynamicsDrawSnapshot* { if (light_max_count > 0) { auto* ibuf = Object::NewDeferred(light_max_count * 6); - // Game thread is default owner; needs to be us until we hand it over. + // Logic thread is default owner; needs to be us until we hand it over. ibuf->SetThreadOwnership(Object::ThreadOwnership::kNextReferencing); ss->light_indices = Object::MakeRefCounted(ibuf); l_index = &ss->light_indices->elements[0]; auto* vbuf = Object::NewDeferred(light_max_count * 4); - // Game thread is default owner; needs to be us until we hand it over. + // Logic thread is default owner; needs to be us until we hand it over. vbuf->SetThreadOwnership(Object::ThreadOwnership::kNextReferencing); ss->light_vertices = Object::MakeRefCounted(vbuf); l_vertex = &ss->light_vertices->elements[0]; @@ -1968,14 +1969,14 @@ auto BGDynamicsServer::CreateDrawSnapshot() -> BGDynamicsDrawSnapshot* { if (smoke_slice_count > 0) { auto* ibuf = Object::NewDeferred(smoke_index_count); - // Game thread is default owner; needs to be us until we hand it over. + // Logic thread is default owner; needs to be us until we hand it over. ibuf->SetThreadOwnership(Object::ThreadOwnership::kNextReferencing); ss->tendril_indices = Object::MakeRefCounted(ibuf); uint16_t* index = &ss->tendril_indices->elements[0]; auto* vbuf = Object::NewDeferred(smoke_slice_count * 2); - // Game thread is default owner; needs to be us until we hand it over. + // Logic thread is default owner; needs to be us until we hand it over. vbuf->SetThreadOwnership(Object::ThreadOwnership::kNextReferencing); ss->tendril_vertices = Object::MakeRefCounted(vbuf); VertexSmokeFull* v = &ss->tendril_vertices->elements[0]; @@ -2133,13 +2134,13 @@ auto BGDynamicsServer::CreateDrawSnapshot() -> BGDynamicsDrawSnapshot* { auto* ibuf = Object::NewDeferred(index_count); - // Game thread is default owner; needs to be us until we hand it over. + // Logic thread is default owner; needs to be us until we hand it over. ibuf->SetThreadOwnership(Object::ThreadOwnership::kNextReferencing); ss->fuse_indices = Object::MakeRefCounted(ibuf); auto* vbuf = Object::NewDeferred(vertex_count); - // Game thread is default owner; needs to be us until we hand it over. + // Logic thread is default owner; needs to be us until we hand it over. vbuf->SetThreadOwnership(Object::ThreadOwnership::kNextReferencing); ss->fuse_vertices = Object::MakeRefCounted(vbuf); diff --git a/src/ballistica/dynamics/dynamics.cc b/src/ballistica/dynamics/dynamics.cc index c5e69ed9..3b9aa0b1 100644 --- a/src/ballistica/dynamics/dynamics.cc +++ b/src/ballistica/dynamics/dynamics.cc @@ -141,7 +141,8 @@ Dynamics::Dynamics(Scene* scene_in) Dynamics::~Dynamics() { if (in_process_) { - Log("Error: Dynamics going down within Process() call;" + Log(LogLevel::kError, + "Dynamics going down within Process() call;" " should not happen."); } ShutdownODE(); diff --git a/src/ballistica/dynamics/material/material_component.cc b/src/ballistica/dynamics/material/material_component.cc index e211ff15..76f4ace9 100644 --- a/src/ballistica/dynamics/material/material_component.cc +++ b/src/ballistica/dynamics/material/material_component.cc @@ -213,8 +213,9 @@ void MaterialComponent::Restore(const char** buffer, ClientSession* cs) { action = Object::New(); break; default: - Log("Error: Invalid material action: '" - + std::to_string(static_cast(type)) + "'."); + Log(LogLevel::kError, "Invalid material action: '" + + std::to_string(static_cast(type)) + + "'."); throw Exception(); } action->Restore(buffer, cs); diff --git a/src/ballistica/dynamics/part.cc b/src/ballistica/dynamics/part.cc index 2b7436b3..17263e5e 100644 --- a/src/ballistica/dynamics/part.cc +++ b/src/ballistica/dynamics/part.cc @@ -97,7 +97,8 @@ void Part::SetCollidingWith(int64_t node_id, int part, bool colliding, for (auto&& i : collisions_) { if (i.node == node_id && i.part == part) { BA_PRECONDITION(node()); - Log("Error: Got SetCollidingWith for part already colliding with."); + Log(LogLevel::kError, + "Got SetCollidingWith for part already colliding with."); return; } } @@ -117,7 +118,8 @@ void Part::SetCollidingWith(int64_t node_id, int part, bool colliding, return; } } - Log("Error: Got SetCollidingWith (separated) call for part we're " + Log(LogLevel::kError, + "Got SetCollidingWith (separated) call for part we're " "not colliding with."); } } diff --git a/src/ballistica/dynamics/rigid_body.cc b/src/ballistica/dynamics/rigid_body.cc index 2bbf37f3..2e795adb 100644 --- a/src/ballistica/dynamics/rigid_body.cc +++ b/src/ballistica/dynamics/rigid_body.cc @@ -168,7 +168,7 @@ auto RigidBody::Check() -> void { if (std::isnan(q[3])) err = true; if (err) { - Log("Error: Got error in rbd values!"); + Log(LogLevel::kError, "Got error in rbd values!"); } #if BA_DEBUG_BUILD for (int i = 0; i < 3; i++) { diff --git a/src/ballistica/generic/timer_list.cc b/src/ballistica/generic/timer_list.cc index 533b6c0b..b92b8b5d 100644 --- a/src/ballistica/generic/timer_list.cc +++ b/src/ballistica/generic/timer_list.cc @@ -20,14 +20,14 @@ TimerList::~TimerList() { if (g_buildconfig.debug_build()) { if (timer_count_active_ != 0) { - Log("Error: Invalid timerlist state on teardown."); + Log(LogLevel::kError, "Invalid timerlist state on teardown."); } if (timer_count_inactive_ != 0) { - Log("Error: Invalid timerlist state on teardown."); + Log(LogLevel::kError, "Invalid timerlist state on teardown."); } if (!((timer_count_total_ == 0) || (client_timer_ != nullptr && timer_count_total_ == 1))) { - Log("Error: Invalid timerlist state on teardown."); + Log(LogLevel::kError, "Invalid timerlist state on teardown."); } } } diff --git a/src/ballistica/generic/utils.cc b/src/ballistica/generic/utils.cc index a7f341d1..2ac25a04 100644 --- a/src/ballistica/generic/utils.cc +++ b/src/ballistica/generic/utils.cc @@ -136,9 +136,10 @@ Utils::Utils() { // it was parsed from. Use this to adjust the filtering as necessary so // the resulting type name matches what is expected. if (explicit_bool(false)) { - Log("static_type_name check; name is '" - + static_type_name() + "' debug_full is '" - + static_type_name(true) + "'"); + Log(LogLevel::kError, + "static_type_name check; name is '" + + static_type_name() + "' debug_full is '" + + static_type_name(true) + "'"); } // We now bake these in so they match across platforms... @@ -261,8 +262,9 @@ auto Utils::GetValidUTF8(const char* str, const char* loc) -> std::string { } } logged_count++; - Log("GOT INVALID UTF8 SEQUENCE: (" + log_str + "); RETURNING '" + to - + "'; LOC '" + loc + "'"); + Log(LogLevel::kError, "GOT INVALID UTF8 SEQUENCE: (" + log_str + + "); RETURNING '" + to + "'; LOC '" + loc + + "'"); } } else { diff --git a/src/ballistica/graphics/component/render_component.h b/src/ballistica/graphics/component/render_component.h index 08ac4fea..a85f9bff 100644 --- a/src/ballistica/graphics/component/render_component.h +++ b/src/ballistica/graphics/component/render_component.h @@ -15,7 +15,8 @@ class RenderComponent { : state_(State::kConfiguring), pass_(pass), cmd_buffer_(nullptr) {} ~RenderComponent() { if (state_ != State::kSubmitted) { - Log("Error: RenderComponent dying without submit() having been called."); + Log(LogLevel::kError, + "RenderComponent dying without submit() having been called."); } } void DrawModel(ModelData* model, uint32_t flags = 0) { diff --git a/src/ballistica/graphics/frame_def.h b/src/ballistica/graphics/frame_def.h index 8e794ea0..90db34ae 100644 --- a/src/ballistica/graphics/frame_def.h +++ b/src/ballistica/graphics/frame_def.h @@ -12,8 +12,8 @@ namespace ballistica { -/// A flattened representation of a frame; generated by the game thread and sent -/// to the graphics thread to render. +/// A flattened representation of a frame; generated by the logic thread and +/// sent to the graphics thread to render. class FrameDef { public: auto light_pass() -> RenderPass* { return light_pass_.get(); } diff --git a/src/ballistica/graphics/gl/gl_sys.cc b/src/ballistica/graphics/gl/gl_sys.cc index 7709f2af..221a5e35 100644 --- a/src/ballistica/graphics/gl/gl_sys.cc +++ b/src/ballistica/graphics/gl/gl_sys.cc @@ -315,7 +315,7 @@ void GLContext::SetVSync(bool enable) { GLContext::~GLContext() { if (!InMainThread()) { - Log("Error: GLContext dying in non-graphics thread"); + Log(LogLevel::kError, "GLContext dying in non-graphics thread"); } #if BA_SDL2_BUILD diff --git a/src/ballistica/graphics/gl/renderer_gl.cc b/src/ballistica/graphics/gl/renderer_gl.cc index 7df0554e..5b0ccef3 100644 --- a/src/ballistica/graphics/gl/renderer_gl.cc +++ b/src/ballistica/graphics/gl/renderer_gl.cc @@ -144,10 +144,10 @@ static void _check_gl_error(int line) { const char* version = (const char*)glGetString(GL_VERSION); const char* vendor = (const char*)glGetString(GL_VENDOR); const char* renderer = (const char*)glGetString(GL_RENDERER); - Log("Error: OpenGL Error at line " + std::to_string(line) + ": " - + GLErrorToString(err) + "\nrenderer: " + renderer - + "\nvendor: " + vendor + "\nversion: " + version - + "\ntime: " + std::to_string(GetRealTime())); + Log(LogLevel::kError, "OpenGL Error at line " + std::to_string(line) + ": " + + GLErrorToString(err) + "\nrenderer: " + renderer + + "\nvendor: " + vendor + "\nversion: " + version + + "\ntime: " + std::to_string(GetRealTime())); } } @@ -256,16 +256,16 @@ void RendererGL::CheckGLExtensions() { // if we require ES3 if (have_es3) { g_running_es3 = true; - Log(std::string("Using OpenGL ES 3 (vendor: ") + vendor - + ", renderer: " + renderer + ", version: " + version_str + ")", - false, false); + Log(LogLevel::kInfo, std::string("Using OpenGL ES 3 (vendor: ") + vendor + + ", renderer: " + renderer + + ", version: " + version_str + ")"); } else { #if !BA_USE_ES3_INCLUDES g_running_es3 = false; - Log(std::string("USING OPENGL ES2 (vendor: ") + vendor - + ", renderer: " + renderer + ", version: " + version_str + ")", - false, false); + Log(LogLevel::kInfo, std::string("USING OPENGL ES2 (vendor: ") + vendor + + ", renderer: " + renderer + + ", version: " + version_str + ")"); // Can still support some stuff like framebuffer-blit with es2 extensions. assert(glBlitFramebuffer == nullptr || !first_extension_check_); @@ -381,7 +381,7 @@ void RendererGL::CheckGLExtensions() { c_types.push_back(TextureCompressionType::kETC1); } else { #if BA_OSTYPE_ANDROID - Log("Android device missing ETC1 support"); + Log(LogLevel::kError, "Android device missing ETC1 support"); #endif } @@ -509,7 +509,7 @@ void RendererGL::CheckGLExtensions() { &samples[0]); g_msaa_max_samples_rgb565 = samples[0]; } else { - BA_LOG_ONCE("Got 0 samplecounts for RGB565"); + BA_LOG_ONCE(LogLevel::kError, "Got 0 samplecounts for RGB565"); g_msaa_max_samples_rgb565 = 0; } } @@ -525,7 +525,7 @@ void RendererGL::CheckGLExtensions() { &samples[0]); g_msaa_max_samples_rgb8 = samples[0]; } else { - BA_LOG_ONCE("Got 0 samplecounts for RGB8"); + BA_LOG_ONCE(LogLevel::kError, "Got 0 samplecounts for RGB8"); g_msaa_max_samples_rgb8 = 0; } } @@ -539,10 +539,10 @@ void RendererGL::CheckGLExtensions() { #if MSAA_ERROR_TEST if (enable_msaa_) { ScreenMessage("MSAA ENABLED"); - Log("Ballistica MSAA Test: MSAA ENABLED", false, false); + Log(LogLevel::kInfo, "Ballistica MSAA Test: MSAA ENABLED"); } else { ScreenMessage("MSAA DISABLED"); - Log("Ballistica MSAA Test: MSAA DISABLED", false, false); + Log(LogLevel::kInfo, "Ballistica MSAA Test: MSAA DISABLED"); } #endif // MSAA_ERROR_TEST @@ -1023,11 +1023,12 @@ class RendererGL::ShaderGL : public Object { const char* renderer = (const char*)glGetString(GL_RENDERER); // Let's not crash here. We have a better chance of calling home this way // and theres a chance the game will still be playable. - Log(std::string("Compile failed for ") + GetTypeName() - + " shader:\n------------SOURCE BEGIN-------------\n" + src_in - + "\n-----------SOURCE END-------------\n" + GetInfo() - + "\nrenderer: " + renderer + "\nvendor: " + vendor - + "\nversion:" + version); + Log(LogLevel::kError, + std::string("Compile failed for ") + GetTypeName() + + " shader:\n------------SOURCE BEGIN-------------\n" + src_in + + "\n-----------SOURCE END-------------\n" + GetInfo() + + "\nrenderer: " + renderer + "\nvendor: " + vendor + + "\nversion:" + version); } else { assert(compile_status == GL_TRUE); std::string info = GetInfo(); @@ -1038,10 +1039,12 @@ class RendererGL::ShaderGL : public Object { const char* version = (const char*)glGetString(GL_VERSION); const char* vendor = (const char*)glGetString(GL_VENDOR); const char* renderer = (const char*)glGetString(GL_RENDERER); - Log(std::string("WARNING: info returned for ") + GetTypeName() - + " shader:\n------------SOURCE BEGIN-------------\n" + src_in - + "\n-----------SOURCE END-------------\n" + info + "\nrenderer: " - + renderer + "\nvendor: " + vendor + "\nversion:" + version); + Log(LogLevel::kError, + std::string("WARNING: info returned for ") + GetTypeName() + + " shader:\n------------SOURCE BEGIN-------------\n" + src_in + + "\n-----------SOURCE END-------------\n" + info + + "\nrenderer: " + renderer + "\nvendor: " + vendor + + "\nversion:" + version); } } DEBUG_CHECK_GL_ERROR; @@ -1131,7 +1134,8 @@ class RendererGL::ProgramGL { GLint linkStatus; glGetProgramiv(program_, GL_LINK_STATUS, &linkStatus); if (linkStatus == GL_FALSE) { - Log("Link failed for program '" + name_ + "':\n" + GetInfo()); + Log(LogLevel::kError, + "Link failed for program '" + name_ + "':\n" + GetInfo()); } else { assert(linkStatus == GL_TRUE); @@ -1140,8 +1144,8 @@ class RendererGL::ProgramGL { && (strstr(info.c_str(), "error:") || strstr(info.c_str(), "warning:") || strstr(info.c_str(), "Error:") || strstr(info.c_str(), "Warning:"))) { - Log("WARNING: program using frag shader '" + name_ - + "' returned info:\n" + info); + Log(LogLevel::kError, "WARNING: program using frag shader '" + name_ + + "' returned info:\n" + info); } } @@ -1278,8 +1282,9 @@ class RendererGL::ProgramGL { int c = glGetUniformLocation(program_, tex_name); if (c == -1) { #if !MSAA_ERROR_TEST - Log("Error: ShaderGL: " + name_ + ": Can't set texture unit for texture '" - + tex_name + "'"); + Log(LogLevel::kError, "ShaderGL: " + name_ + + ": Can't set texture unit for texture '" + + tex_name + "'"); DEBUG_CHECK_GL_ERROR; #endif } else { @@ -1511,7 +1516,8 @@ class RendererGL::SimpleProgramGL : public RendererGL::ProgramGL { "}"; if (flags & SHD_DEBUG_PRINT) - Log("\nVertex code for shader '" + GetName(flags) + "':\n\n" + s); + Log(LogLevel::kInfo, + "\nVertex code for shader '" + GetName(flags) + "':\n\n" + s); return s; } auto GetFragmentCode(int flags) -> std::string { @@ -1613,7 +1619,8 @@ class RendererGL::SimpleProgramGL : public RendererGL::ProgramGL { s += "}"; if (flags & SHD_DEBUG_PRINT) - Log("\nFragment code for shader '" + GetName(flags) + "':\n\n" + s); + Log(LogLevel::kInfo, + "\nFragment code for shader '" + GetName(flags) + "':\n\n" + s); return s; } float r_{}, g_{}, b_{}, a_{}; @@ -1846,7 +1853,8 @@ class RendererGL::ObjectProgramGL : public RendererGL::ProgramGL { } s += "}"; if (flags & SHD_DEBUG_PRINT) - Log("\nVertex code for shader '" + GetName(flags) + "':\n\n" + s); + Log(LogLevel::kInfo, + "\nVertex code for shader '" + GetName(flags) + "':\n\n" + s); return s; } auto GetFragmentCode(int flags) -> std::string { @@ -1918,7 +1926,8 @@ class RendererGL::ObjectProgramGL : public RendererGL::ProgramGL { s += "}"; if (flags & SHD_DEBUG_PRINT) - Log("\nFragment code for shader '" + GetName(flags) + "':\n\n" + s); + Log(LogLevel::kInfo, + "\nFragment code for shader '" + GetName(flags) + "':\n\n" + s); return s; } float r_, g_, b_, a_; @@ -2035,7 +2044,8 @@ class RendererGL::SmokeProgramGL : public RendererGL::ProgramGL { s += "}"; if (flags & SHD_DEBUG_PRINT) - Log("\nVertex code for shader '" + GetName(flags) + "':\n\n" + s); + Log(LogLevel::kInfo, + "\nVertex code for shader '" + GetName(flags) + "':\n\n" + s); return s; } auto GetFragmentCode(int flags) -> std::string { @@ -2077,7 +2087,8 @@ class RendererGL::SmokeProgramGL : public RendererGL::ProgramGL { s += "}"; if (flags & SHD_DEBUG_PRINT) - Log("\nFragment code for shader '" + GetName(flags) + "':\n\n" + s); + Log(LogLevel::kInfo, + "\nFragment code for shader '" + GetName(flags) + "':\n\n" + s); return s; } float r_, g_, b_, a_; @@ -2164,7 +2175,8 @@ class RendererGL::BlurProgramGL : public RendererGL::ProgramGL { s += "}"; if (flags & SHD_DEBUG_PRINT) - Log("\nVertex code for shader '" + GetName(flags) + "':\n\n" + s); + Log(LogLevel::kInfo, + "\nVertex code for shader '" + GetName(flags) + "':\n\n" + s); return s; } auto GetFragmentCode(int flags) -> std::string { @@ -2198,7 +2210,8 @@ class RendererGL::BlurProgramGL : public RendererGL::ProgramGL { " + texture2D(colorTex,vUV8));\n" "}"; if (flags & SHD_DEBUG_PRINT) { - Log("\nFragment code for shader '" + GetName(flags) + "':\n\n" + s); + Log(LogLevel::kInfo, + "\nFragment code for shader '" + GetName(flags) + "':\n\n" + s); } return s; } @@ -2248,7 +2261,8 @@ class RendererGL::ShieldProgramGL : public RendererGL::ProgramGL { s += "}"; if (flags & SHD_DEBUG_PRINT) - Log("\nVertex code for shader '" + GetName(flags) + "':\n\n" + s); + Log(LogLevel::kInfo, + "\nVertex code for shader '" + GetName(flags) + "':\n\n" + s); return s; } auto GetFragmentCode(int flags) -> std::string { @@ -2301,7 +2315,8 @@ class RendererGL::ShieldProgramGL : public RendererGL::ProgramGL { //" gl_FragColor = vec4(vec3(depth),1);\n" if (flags & SHD_DEBUG_PRINT) - Log("\nFragment code for shader '" + GetName(flags) + "':\n\n" + s); + Log(LogLevel::kInfo, + "\nFragment code for shader '" + GetName(flags) + "':\n\n" + s); return s; } @@ -2510,7 +2525,8 @@ class RendererGL::PostProcessProgramGL : public RendererGL::ProgramGL { s += "}"; if (flags & SHD_DEBUG_PRINT) - Log("\nVertex code for shader '" + GetName(flags) + "':\n\n" + s); + Log(LogLevel::kInfo, + "\nVertex code for shader '" + GetName(flags) + "':\n\n" + s); return s; } auto GetFragmentCode(int flags) -> std::string { @@ -2636,7 +2652,8 @@ class RendererGL::PostProcessProgramGL : public RendererGL::ProgramGL { s += "}"; if (flags & SHD_DEBUG_PRINT) - Log("\nFragment code for shader '" + GetName(flags) + "':\n\n" + s); + Log(LogLevel::kInfo, + "\nFragment code for shader '" + GetName(flags) + "':\n\n" + s); return s; } #endif // msaa bug test @@ -2751,7 +2768,8 @@ class RendererGL::SpriteProgramGL : public RendererGL::ProgramGL { s += "}"; if (flags & SHD_DEBUG_PRINT) - Log("\nVertex code for shader '" + GetName(flags) + "':\n\n" + s); + Log(LogLevel::kInfo, + "\nVertex code for shader '" + GetName(flags) + "':\n\n" + s); return s; } auto GetFragmentCode(int flags) -> std::string { @@ -2787,7 +2805,8 @@ class RendererGL::SpriteProgramGL : public RendererGL::ProgramGL { } s += "}"; if (flags & SHD_DEBUG_PRINT) - Log("\nFragment code for shader '" + GetName(flags) + "':\n\n" + s); + Log(LogLevel::kInfo, + "\nFragment code for shader '" + GetName(flags) + "':\n\n" + s); return s; } float r_, g_, b_, a_; @@ -2808,7 +2827,7 @@ class RendererGL::TextureDataGL : public TextureRendererData { ~TextureDataGL() override { if (!InGraphicsThread()) { - Log("Error: TextureDataGL dying outside of graphics thread."); + Log(LogLevel::kError, "TextureDataGL dying outside of graphics thread."); } else { // if we're currently bound as anything, clear that out // (otherwise a new texture with that same ID won't be bindable) @@ -3272,6 +3291,7 @@ class RendererGL::ModelDataGL : public ModelRendererData { } case 4: { BA_LOG_ONCE( + LogLevel::kWarning, "GL WARNING - USING 32 BIT INDICES WHICH WONT WORK IN ES2!!"); elem_count_ = static_cast(model.indices32().size()); index_type_ = GL_UNSIGNED_INT; @@ -3473,7 +3493,8 @@ class RendererGL::MeshDataGL : public MeshRendererData { dynamic_draw_ ? GL_DYNAMIC_DRAW : GL_STATIC_DRAW); index_state_ = data->state; have_index_data_ = true; - BA_LOG_ONCE("GL WARNING - USING 32 BIT INDICES WHICH WONT WORK IN ES2!!"); + BA_LOG_ONCE(LogLevel::kWarning, + "GL WARNING - USING 32 BIT INDICES WHICH WONT WORK IN ES2!!"); index_type_ = GL_UNSIGNED_INT; } } @@ -3889,6 +3910,7 @@ class RendererGL::RenderTargetGL : public RenderTarget { // this needs to be on for glClear to work on depth. if (!renderer_->depth_writing_enabled_) { BA_LOG_ONCE( + LogLevel::kWarning, "RendererGL: depth-writing not enabled when clearing depth"); } clear_mask |= GL_DEPTH_BUFFER_BIT; @@ -5743,7 +5765,8 @@ void RendererGL::UpdateVignetteTex(bool force) { if (err != GL_NO_ERROR) { static bool reported = false; if (!reported) { - Log("Error: 32-bit vignette creation failed; falling back to 16."); + Log(LogLevel::kError, + "32-bit vignette creation failed; falling back to 16."); reported = true; } const int kVignetteTexWidth = 64; @@ -5800,14 +5823,15 @@ void RendererGL::UpdateVignetteTex(bool force) { auto RendererGL::GetFunkyDepthIssue() -> bool { if (!funky_depth_issue_set_) { - BA_LOG_ONCE("fetching funky depth issue but not set"); + BA_LOG_ONCE(LogLevel::kError, "fetching funky depth issue but not set"); } return funky_depth_issue_; } auto RendererGL::GetDrawsShieldsFunny() -> bool { if (!draws_shields_funny_set_) { - BA_LOG_ONCE("fetching draws-shields-funny value but not set"); + BA_LOG_ONCE(LogLevel::kError, + "fetching draws-shields-funny value but not set"); } return draws_shields_funny_; } diff --git a/src/ballistica/graphics/graphics.cc b/src/ballistica/graphics/graphics.cc index ac573e62..d2fd216d 100644 --- a/src/ballistica/graphics/graphics.cc +++ b/src/ballistica/graphics/graphics.cc @@ -877,7 +877,8 @@ void Graphics::FadeScreen(bool to, millisecs_t time, PyObject* endcall) { // (otherwise, overlapping fades can cause things to get lost) if (fade_end_call_.exists()) { if (g_buildconfig.debug_build()) { - Log("WARNING: 2 fades overlapping; running first fade-end-call early"); + Log(LogLevel::kWarning, + "2 fades overlapping; running first fade-end-call early"); } g_logic->PushPythonCall(fade_end_call_); fade_end_call_.Clear(); @@ -1070,6 +1071,7 @@ void Graphics::BuildAndPushFrameDef() { if (frame_def->GetOverlayFlatPass()->HasDrawCommands()) { if (!g_ui->IsWindowPresent()) { BA_LOG_ONCE( + LogLevel::kError, "Drawing in overlay pass in VR mode without UI; shouldn't " "happen!"); } @@ -1213,7 +1215,7 @@ void Graphics::DrawFades(FrameDef* frame_def, millisecs_t real_time) { if (fade_ <= 0.0f && fade_out_) { millisecs_t faded_time = real_time - (fade_start_ + fade_time_); if (faded_time > 15000) { - Log("FORCE-ENDING STUCK FADE"); + Log(LogLevel::kError, "FORCE-ENDING STUCK FADE"); fade_out_ = false; fade_ = 1.0f; fade_time_ = 1000; @@ -1503,6 +1505,7 @@ void Graphics::WaitForRendererToExist() { while (g_graphics_server == nullptr || g_graphics_server->renderer() == nullptr) { BA_LOG_ONCE( + LogLevel::kWarning, "BuildAndPushFrameDef() called before renderer is up; spinning..."); Platform::SleepMS(100); sleep_count++; diff --git a/src/ballistica/graphics/graphics.h b/src/ballistica/graphics/graphics.h index 4c6b02cb..8d8c309f 100644 --- a/src/ballistica/graphics/graphics.h +++ b/src/ballistica/graphics/graphics.h @@ -43,7 +43,7 @@ const float kBackingDepth1 = 0.0f; const float kShadowNeutral = 0.5f; -// Client class for graphics operations (used from the game thread). +// Client class for graphics operations (used from the logic thread). class Graphics { public: Graphics(); diff --git a/src/ballistica/graphics/graphics_server.cc b/src/ballistica/graphics/graphics_server.cc index 9cabd091..f0abe83f 100644 --- a/src/ballistica/graphics/graphics_server.cc +++ b/src/ballistica/graphics/graphics_server.cc @@ -50,7 +50,7 @@ void GraphicsServer::SetRenderHold() { void GraphicsServer::SetFrameDef(FrameDef* framedef) { // Note: we're just setting the framedef directly here - // even though this gets called from the game thread. + // even though this gets called from the logic thread. // Ideally it would seem we should push these to our thread // event list, but currently we spin-lock waiting for new // frames to appear which would prevent that from working; @@ -77,15 +77,15 @@ auto GraphicsServer::GetRenderFrameDef() -> FrameDef* { g_assets->RunPendingGraphicsLoads(); // Spin and wait for a short bit for a frame_def to appear. If it does, we - // grab it, render it, and also message the game thread to start generating + // grab it, render it, and also message the logic thread to start generating // another one. while (true) { if (frame_def_) { FrameDef* frame_def = frame_def_; frame_def_ = nullptr; - // Tell the game thread we're ready for the next frame_def so it can start - // building it while we render this one. + // Tell the logic thread we're ready for the next frame_def so it can + // start building it while we render this one. g_logic->PushFrameDefRequest(); return frame_def; } @@ -173,7 +173,7 @@ void GraphicsServer::TryRender() { FinishRenderFrameDef(frame_def); } - // Send this frame_def back to the game thread for deletion. + // Send this frame_def back to the logic thread for deletion. g_graphics->ReturnCompletedFrameDef(frame_def); } } @@ -194,7 +194,7 @@ void GraphicsServer::ReloadMedia() { assert(g_graphics_server); SetRenderHold(); - // Now tell the game thread to kick off loads for everything, flip on + // Now tell the logic thread to kick off loads for everything, flip on // progress bar drawing, and then tell the graphics thread to stop ignoring // frame-defs. g_logic->thread()->PushCall([this] { @@ -209,7 +209,7 @@ void GraphicsServer::RebuildLostContext() { assert(InGraphicsThread()); if (!renderer_) { - Log("Error: No renderer on GraphicsServer::_rebuildContext."); + Log(LogLevel::kError, "No renderer on GraphicsServer::_rebuildContext."); return; } @@ -246,8 +246,9 @@ void GraphicsServer::RebuildLostContext() { // we won't hitch if we actually render them.) SetRenderHold(); - // Now tell the game thread to kick off loads for everything, flip on progress - // bar drawing, and then tell the graphics thread to stop ignoring frame-defs. + // Now tell the logic thread to kick off loads for everything, flip on + // progress bar drawing, and then tell the graphics thread to stop ignoring + // frame-defs. g_logic->thread()->PushCall([this] { g_assets->MarkAllAssetsForLoad(); g_graphics->EnableProgressBar(false); @@ -351,7 +352,7 @@ void GraphicsServer::SetScreen(bool fullscreen, int width, int height, } // The first time we complete setting up our screen, we send a message - // back to the game thread to complete the init process.. (they can't start + // back to the logic thread to complete the init process.. (they can't start // loading graphics and things until we have our context set up so we know // what types of textures to load, etc) if (!initial_screen_created_) { @@ -402,7 +403,7 @@ void GraphicsServer::HandleFullContextScreenRebuild( UpdateVirtualScreenRes(); - // Inform the game thread of the latest values. + // Inform the logic thread of the latest values. g_logic->PushScreenResizeCall(res_x_virtual_, res_y_virtual_, res_x_, res_y_); } @@ -459,7 +460,7 @@ void GraphicsServer::HandleFullContextScreenRebuild( // so we won't hitch if we actually render them.) SetRenderHold(); - // Now tell the game thread to kick off loads for everything, flip on + // Now tell the logic thread to kick off loads for everything, flip on // progress bar drawing, and then tell the graphics thread to stop ignoring // frame-defs. g_logic->thread()->PushCall([this] { @@ -513,7 +514,7 @@ void GraphicsServer::VideoResize(float h, float v) { res_y_ = v; UpdateVirtualScreenRes(); - // Inform the game thread of the latest values. + // Inform the logic thread of the latest values. g_logic->PushScreenResizeCall(res_x_virtual_, res_y_virtual_, res_x_, res_y_); if (renderer_) { renderer_->ScreenSizeChanged(); @@ -758,7 +759,7 @@ void GraphicsServer::PushSetVSyncCall(bool sync, bool auto_sync) { gl_context_->SetVSync(v_sync_); } } else { - Log("Error: Got SetVSyncCall with no gl context."); + Log(LogLevel::kError, "Got SetVSyncCall with no gl context."); } } } @@ -773,8 +774,8 @@ void GraphicsServer::PushComponentUnloadCall( for (auto&& i : components) { (**i).Unload(); } - // ..and then ship these pointers back to the game thread so it can free the - // references. + // ..and then ship these pointers back to the logic thread so it can free + // the references. g_logic->PushFreeAssetComponentRefsCall(components); }); } @@ -784,7 +785,7 @@ void GraphicsServer::PushRemoveRenderHoldCall() { assert(render_hold_); render_hold_--; if (render_hold_ < 0) { - Log("Error: RenderHold < 0"); + Log(LogLevel::kError, "RenderHold < 0"); render_hold_ = 0; } }); diff --git a/src/ballistica/graphics/graphics_server.h b/src/ballistica/graphics/graphics_server.h index aaa590fa..061da29c 100644 --- a/src/ballistica/graphics/graphics_server.h +++ b/src/ballistica/graphics/graphics_server.h @@ -32,7 +32,7 @@ class GraphicsServer { const std::vector*>& components) -> void; auto SetRenderHold() -> void; - // Used by the game thread to pass frame-defs to the graphics server + // Used by the logic thread to pass frame-defs to the graphics server // for rendering. auto SetFrameDef(FrameDef* framedef) -> void; diff --git a/src/ballistica/graphics/mesh/mesh_buffer_base.h b/src/ballistica/graphics/mesh/mesh_buffer_base.h index 0a498f49..04f264a6 100644 --- a/src/ballistica/graphics/mesh/mesh_buffer_base.h +++ b/src/ballistica/graphics/mesh/mesh_buffer_base.h @@ -7,10 +7,10 @@ namespace ballistica { -// Buffers used by the game thread to pass indices/vertices/etc. to meshes in +// Buffers used by the logic thread to pass indices/vertices/etc. to meshes in // the graphics thread. Note that it is safe to create these in other threads; // you just need to turn off thread-checks until you pass ownership to the game -// thread. (or just avoid creating references outside of the game thread) +// thread. (or just avoid creating references outside of the logic thread) class MeshBufferBase : public Object { public: uint32_t state; // which dynamicState value on the mesh this corresponds to diff --git a/src/ballistica/graphics/mesh/mesh_data.h b/src/ballistica/graphics/mesh/mesh_data.h index 1dd956c9..016b98c1 100644 --- a/src/ballistica/graphics/mesh/mesh_data.h +++ b/src/ballistica/graphics/mesh/mesh_data.h @@ -17,7 +17,7 @@ class MeshData { : type_(type), draw_type_(draw_type) {} virtual ~MeshData() { if (renderer_data_) { - Log("Error: MeshData going down with rendererData intact!"); + Log(LogLevel::kError, "MeshData going down with rendererData intact!"); } } std::list::iterator iterator_; diff --git a/src/ballistica/graphics/mesh/mesh_indexed_base.h b/src/ballistica/graphics/mesh/mesh_indexed_base.h index e8daed0c..5b372252 100644 --- a/src/ballistica/graphics/mesh/mesh_indexed_base.h +++ b/src/ballistica/graphics/mesh/mesh_indexed_base.h @@ -76,9 +76,10 @@ class MeshIndexedBase : public Mesh { // For use by subclasses in their IsValid() overrides auto IndexSizeIsValid(size_t data_size) const -> bool { if (index_data_size() == 2 && data_size > 65535) { - BA_LOG_ONCE("ERROR: got mesh data with > 65535 elems and 16 bit indices: " - + GetObjectDescription() - + ". This case requires 32 bit indices."); + BA_LOG_ONCE(LogLevel::kError, + "Got mesh data with > 65535 elems and 16 bit indices: " + + GetObjectDescription() + + ". This case requires 32 bit indices."); return false; } return true; diff --git a/src/ballistica/graphics/mesh/mesh_indexed_static_dynamic.h b/src/ballistica/graphics/mesh/mesh_indexed_static_dynamic.h index a1aeff0a..eb792a64 100644 --- a/src/ballistica/graphics/mesh/mesh_indexed_static_dynamic.h +++ b/src/ballistica/graphics/mesh/mesh_indexed_static_dynamic.h @@ -32,7 +32,8 @@ class MeshIndexedStaticDynamic : public MeshIndexedBase { // Static and dynamic data sizes should always match, right? if (static_data_->elements.size() != dynamic_data_->elements.size()) { - BA_LOG_ONCE("ERROR: mesh static and dynamic data sizes do not match"); + BA_LOG_ONCE(LogLevel::kError, + "Mesh static and dynamic data sizes do not match"); return false; } diff --git a/src/ballistica/graphics/text/text_graphics.cc b/src/ballistica/graphics/text/text_graphics.cc index c0153431..5e045591 100644 --- a/src/ballistica/graphics/text/text_graphics.cc +++ b/src/ballistica/graphics/text/text_graphics.cc @@ -331,7 +331,7 @@ TextGraphics::TextGraphics() { if (g.tex_max_x > 1.0f || g.tex_max_x < 0.0f || g.tex_min_x > 1.0 || g.tex_min_x < 0.0f || g.tex_max_y > 1.0f || g.tex_max_y < 0.0 || g.tex_min_y > 1.0f || g.tex_min_y < 0.0f) { - BA_LOG_ONCE("Warning: glyph bounds error"); + BA_LOG_ONCE(LogLevel::kWarning, "glyph bounds error"); } } } @@ -1021,6 +1021,7 @@ void TextGraphics::GetOSTextSpanBoundsAndWidth(const std::string& s, Rect* r, g_platform->GetTextBoundsAndWidth(s, &entry->r, &entry->width); } else { BA_LOG_ONCE( + LogLevel::kError, "FIXME: GetOSTextSpanBoundsAndWidth unimplemented on this platform"); r->l = 0.0f; r->r = 1.0f; diff --git a/src/ballistica/graphics/text/text_graphics.h b/src/ballistica/graphics/text/text_graphics.h index e0ff8bda..c293da30 100644 --- a/src/ballistica/graphics/text/text_graphics.h +++ b/src/ballistica/graphics/text/text_graphics.h @@ -19,7 +19,7 @@ namespace ballistica { const int kTextMaxUnicodeVal = 999999; const float kTextRowHeight = 32.0f; -// Encapsulates text-display functionality used by the game thread. +// Encapsulates text-display functionality used by the logic thread. class TextGraphics { public: TextGraphics(); diff --git a/src/ballistica/input/device/client_input_device.cc b/src/ballistica/input/device/client_input_device.cc index 378292d0..d146c1a1 100644 --- a/src/ballistica/input/device/client_input_device.cc +++ b/src/ballistica/input/device/client_input_device.cc @@ -27,7 +27,8 @@ auto ClientInputDevice::GetClientID() const -> int { if (ConnectionToClient* c = connection_to_client_.get()) { return c->id(); } else { - Log("ClientInputDevice::get_client_id(): connection_to_client no longer " + Log(LogLevel::kError, + "ClientInputDevice::get_client_id(): connection_to_client no longer " "exists; returning -1.."); return -1; } diff --git a/src/ballistica/input/device/input_device.cc b/src/ballistica/input/device/input_device.cc index b1ff66bd..9c7f4859 100644 --- a/src/ballistica/input/device/input_device.cc +++ b/src/ballistica/input/device/input_device.cc @@ -139,13 +139,15 @@ InputDevice::~InputDevice() { // when the host-session tells us to attach to a player void InputDevice::AttachToLocalPlayer(Player* player) { if (player_.exists()) { - Log("Error: InputDevice::AttachToLocalPlayer() called with already " + Log(LogLevel::kError, + "InputDevice::AttachToLocalPlayer() called with already " "existing " "player"); return; } if (remote_player_.exists()) { - Log("Error: InputDevice::AttachToLocalPlayer() called with already " + Log(LogLevel::kError, + "InputDevice::AttachToLocalPlayer() called with already " "existing " "remote-player"); return; @@ -158,13 +160,15 @@ void InputDevice::AttachToRemotePlayer(ConnectionToHost* connection_to_host, int remote_player_id) { assert(connection_to_host); if (player_.exists()) { - Log("Error: InputDevice::AttachToRemotePlayer()" + Log(LogLevel::kError, + "InputDevice::AttachToRemotePlayer()" " called with already existing " "player"); return; } if (remote_player_.exists()) { - Log("Error: InputDevice::AttachToRemotePlayer()" + Log(LogLevel::kError, + "InputDevice::AttachToRemotePlayer()" " called with already existing " "remote-player"); return; @@ -180,7 +184,8 @@ void InputDevice::RemoveRemotePlayerFromGame() { data[1] = static_cast_check_fit(index()); connection_to_host->SendReliableMessage(data); } else { - Log("Error: RemoveRemotePlayerFromGame called without remote player"); + Log(LogLevel::kError, + "RemoveRemotePlayerFromGame called without remote player"); } } @@ -210,12 +215,14 @@ void InputDevice::RequestPlayer() { last_input_time_ = g_logic->master_time(); if (player_.exists()) { - Log("Error: InputDevice::RequestPlayer()" + Log(LogLevel::kError, + "InputDevice::RequestPlayer()" " called with already-existing player"); return; } if (remote_player_.exists()) { - Log("Error: InputDevice::RequestPlayer() called with already-existing " + Log(LogLevel::kError, + "InputDevice::RequestPlayer() called with already-existing " "remote-player"); return; } diff --git a/src/ballistica/input/device/input_device.h b/src/ballistica/input/device/input_device.h index b9559fd2..012efa0c 100644 --- a/src/ballistica/input/device/input_device.h +++ b/src/ballistica/input/device/input_device.h @@ -13,8 +13,8 @@ namespace ballistica { /// Base class for game input devices (keyboard, joystick, etc). /// InputDevices can be allocated in any thread (generally on the main /// thread in response to some system event). An AddInputDevice() call -/// should then be pushed to the game thread to inform it of the new device. -/// Deletion of the input-device is then handled by the game thread +/// should then be pushed to the logic thread to inform it of the new device. +/// Deletion of the input-device is then handled by the logic thread /// and can be triggered by pushing a RemoveInputDevice() call to it. class InputDevice : public Object { public: diff --git a/src/ballistica/input/device/joystick.cc b/src/ballistica/input/device/joystick.cc index 5ee52393..2af36549 100644 --- a/src/ballistica/input/device/joystick.cc +++ b/src/ballistica/input/device/joystick.cc @@ -288,7 +288,7 @@ auto Joystick::GetButtonName(int index) -> std::string { Joystick::~Joystick() { if (!InLogicThread()) { - Log("Error: Joystick dying in wrong thread."); + Log(LogLevel::kError, "Joystick dying in wrong thread."); } // Kill our child if need be. @@ -301,7 +301,7 @@ Joystick::~Joystick() { // Send a message back to the main thread to close this SDL Joystick. // HMMM - can we just have the main thread close the joystick immediately // before informing us its dead?.. i don't think we actually use it at all - // here in the game thread.. + // here in the logic thread.. if (sdl_joystick_) { #if BA_ENABLE_SDL_JOYSTICKS assert(g_app_flavor); @@ -310,7 +310,8 @@ Joystick::~Joystick() { [joystick] { SDL_JoystickClose(joystick); }); sdl_joystick_ = nullptr; #else - Log("sdl_joystick_ set in non-sdl-joystick build destructor."); + Log(LogLevel::kError, + "sdl_joystick_ set in non-sdl-joystick build destructor."); #endif // BA_ENABLE_SDL_JOYSTICKS } } @@ -692,8 +693,9 @@ void Joystick::HandleSDLEvent(const SDL_Event* e) { hat_held_ = true; break; default: - BA_LOG_ONCE("Error: Invalid hat value: " - + std::to_string(static_cast(e->jhat.value))); + BA_LOG_ONCE(LogLevel::kError, + "Invalid hat value: " + + std::to_string(static_cast(e->jhat.value))); break; } } diff --git a/src/ballistica/input/device/touch_input.cc b/src/ballistica/input/device/touch_input.cc index 6ecb4dc7..a76bfa0c 100644 --- a/src/ballistica/input/device/touch_input.cc +++ b/src/ballistica/input/device/touch_input.cc @@ -840,7 +840,8 @@ void TouchInput::UpdateMapping() { } else if (touch_movement_type == "joystick") { movement_control_type_ = TouchInput::MovementControlType::kJoystick; } else { - Log("Error: Invalid touch-movement-type: " + touch_movement_type); + Log(LogLevel::kError, + "Invalid touch-movement-type: " + touch_movement_type); movement_control_type_ = TouchInput::MovementControlType::kSwipe; } std::string touch_action_type = @@ -850,7 +851,7 @@ void TouchInput::UpdateMapping() { } else if (touch_action_type == "buttons") { action_control_type_ = TouchInput::ActionControlType::kButtons; } else { - Log("Error: Invalid touch-action-type: " + touch_action_type); + Log(LogLevel::kError, "Invalid touch-action-type: " + touch_action_type); action_control_type_ = TouchInput::ActionControlType::kSwipe; } diff --git a/src/ballistica/input/input.cc b/src/ballistica/input/input.cc index 4cbfd4ed..1137276b 100644 --- a/src/ballistica/input/input.cc +++ b/src/ballistica/input/input.cc @@ -20,7 +20,7 @@ namespace ballistica { -// Though it seems strange, input is actually owned by the game thread, not the +// Though it seems strange, input is actually owned by the logic thread, not the // app thread. This keeps things simple for game logic interacting with input // stuff (controller names, counts, etc) but means we need to be prudent about // properly passing stuff between the game and app thread as needed. @@ -327,7 +327,8 @@ void Input::PushCreateKeyboardInputDevices() { void Input::CreateKeyboardInputDevices() { assert(InLogicThread()); if (keyboard_input_ != nullptr || keyboard_input_2_ != nullptr) { - Log("Error: CreateKeyboardInputDevices called with existing kbs."); + Log(LogLevel::kError, + "CreateKeyboardInputDevices called with existing kbs."); return; } keyboard_input_ = Object::NewDeferred(nullptr); @@ -343,7 +344,8 @@ void Input::PushDestroyKeyboardInputDevices() { void Input::DestroyKeyboardInputDevices() { assert(InLogicThread()); if (keyboard_input_ == nullptr || keyboard_input_2_ == nullptr) { - Log("Error: DestroyKeyboardInputDevices called with null kb(s)."); + Log(LogLevel::kError, + "DestroyKeyboardInputDevices called with null kb(s)."); return; } RemoveInputDevice(keyboard_input_, false); @@ -812,7 +814,8 @@ void Input::UpdateEnabledControllerSubsystems() { ignore_mfi_controllers_ = false; ignore_sdl_controllers_ = false; } else { - BA_LOG_ONCE("Invalid mac-controller-subsystem value: '" + sys + "'"); + BA_LOG_ONCE(LogLevel::kError, + "Invalid mac-controller-subsystem value: '" + sys + "'"); } } } @@ -842,7 +845,8 @@ void Input::Update() { // If input has been locked an excessively long amount of time, unlock it. if (input_lock_count_temp_) { if (real_time - last_input_temp_lock_time_ > 10000) { - Log("Error: Input has been temp-locked for 10 seconds; unlocking."); + Log(LogLevel::kError, + "Input has been temp-locked for 10 seconds; unlocking."); input_lock_count_temp_ = 0; PrintLockLabels(); input_lock_temp_labels_.clear(); @@ -938,8 +942,9 @@ void Input::UnlockAllInput(bool permanent, const std::string& label) { input_lock_count_temp_--; input_unlock_temp_labels_.push_back(label); if (input_lock_count_temp_ < 0) { - Log("WARNING: temp input unlock at time " + std::to_string(GetRealTime()) - + " with no active lock: '" + label + "'"); + Log(LogLevel::kWarning, "temp input unlock at time " + + std::to_string(GetRealTime()) + + " with no active lock: '" + label + "'"); // This is to be expected since we can reset this to 0. input_lock_count_temp_ = 0; } @@ -991,7 +996,7 @@ void Input::PrintLockLabels() { s += "\n " + std::to_string(num++) + ": " + recent_input_locks_unlock; } - Log(s); + Log(LogLevel::kError, s); } void Input::ProcessStressTesting(int player_count) { @@ -1653,7 +1658,8 @@ void Input::HandleTouchEvent(const TouchEvent& e) { // overall multitouch gesture, it should always be winding up as our // single_touch_. if (e.type == TouchEvent::Type::kDown && single_touch_ != nullptr) { - BA_LOG_ONCE("Got touch labeled first but will not be our single."); + BA_LOG_ONCE(LogLevel::kError, + "Got touch labeled first but will not be our single."); } // Also: if the OS tells us that this is the end of an overall multi-touch @@ -1661,7 +1667,8 @@ void Input::HandleTouchEvent(const TouchEvent& e) { if ((e.type == TouchEvent::Type::kUp || e.type == TouchEvent::Type::kCanceled) && single_touch_ != nullptr && single_touch_ != e.touch) { - BA_LOG_ONCE("Last touch coming up is not single touch!"); + BA_LOG_ONCE(LogLevel::kError, + "Last touch coming up is not single touch!"); } } @@ -1792,8 +1799,9 @@ const char* GetScancodeName(SDL_Scancode scancode) { const char* name; if (static_cast(scancode) < SDL_SCANCODE_UNKNOWN || scancode >= SDL_NUM_SCANCODES) { - BA_LOG_ONCE("GetScancodeName passed invalid scancode " - + std::to_string(static_cast(scancode))); + BA_LOG_ONCE(LogLevel::kError, + "GetScancodeName passed invalid scancode " + + std::to_string(static_cast(scancode))); return ""; } diff --git a/src/ballistica/input/input.h b/src/ballistica/input/input.h index 6c02956e..8f1d7838 100644 --- a/src/ballistica/input/input.h +++ b/src/ballistica/input/input.h @@ -14,17 +14,17 @@ namespace ballistica { /// Class for managing input. -/// Should only be used in the game thread unless otherwise specified. +/// Should only be used in the logic thread unless otherwise specified. class Input { public: Input(); - // Add an input device. Must be called from the game thread; otherwise use + // Add an input device. Must be called from the logic thread; otherwise use // PushAddInputDeviceCall. auto AddInputDevice(InputDevice* input, bool standard_message) -> void; // Removes a previously-added input-device. Must be called from the - // game thread; otherwise use PushRemoveInputDeviceCall. + // logic thread; otherwise use PushRemoveInputDeviceCall. auto RemoveInputDevice(InputDevice* input, bool standard_message) -> void; // Given a device name and persistent identifier for it, returns a device or diff --git a/src/ballistica/input/remote_app.cc b/src/ballistica/input/remote_app.cc index 2bac63ec..43c3549a 100644 --- a/src/ballistica/input/remote_app.cc +++ b/src/ballistica/input/remote_app.cc @@ -75,9 +75,9 @@ void RemoteAppServer::HandleData(int socket, uint8_t* buffer, size_t amt, } case BA_PACKET_REMOTE_ID_REQUEST: { if (amt < 5 || amt > 127) { - BA_LOG_ONCE( - "Error: received invalid BA_PACKET_REMOTE_ID_REQUEST of length " - + std::to_string(amt)); + BA_LOG_ONCE(LogLevel::kError, + "Received invalid BA_PACKET_REMOTE_ID_REQUEST of length " + + std::to_string(amt)); break; } @@ -212,7 +212,7 @@ void RemoteAppServer::HandleData(int socket, uint8_t* buffer, size_t amt, // Each state is 2 bytes. So make sure our length adds up. if (amt != 4 + state_count * 3) { - BA_LOG_ONCE("Error: Invalid state packet"); + BA_LOG_ONCE(LogLevel::kError, "Invalid state packet"); return; } RemoteAppClient* client = clients_ + joystick_id; diff --git a/src/ballistica/internal/app_internal.h b/src/ballistica/internal/app_internal.h index 076c246f..6421c66d 100644 --- a/src/ballistica/internal/app_internal.h +++ b/src/ballistica/internal/app_internal.h @@ -41,9 +41,9 @@ class AppInternal { bool user_initiated) -> void = 0; virtual auto GetPublicV1AccountID() -> std::string = 0; virtual auto OnLogicThreadPause() -> void = 0; - virtual auto DirectSendLogs(const std::string& prefix, - const std::string& suffix, bool instant, - int* result = nullptr) -> void = 0; + virtual auto DirectSendV1CloudLogs(const std::string& prefix, + const std::string& suffix, bool instant, + int* result = nullptr) -> void = 0; virtual auto ClientInfoQuery(const std::string& val1, const std::string& val2, const std::string& val3, int build_number) -> void = 0; diff --git a/src/ballistica/logic/connection/connection.cc b/src/ballistica/logic/connection/connection.cc index 654602ba..ec901c52 100644 --- a/src/ballistica/logic/connection/connection.cc +++ b/src/ballistica/logic/connection/connection.cc @@ -149,7 +149,8 @@ void Connection::HandleGamePacketCompressed(const std::vector& data) { try { data_decompressed = g_utils->huffman()->decompress(data); } catch (const std::exception& e) { - Log(std::string("EXC in huffman decompression for packet: ") + e.what()); + Log(LogLevel::kError, + std::string("Error in huffman decompression for packet: ") + e.what()); // Hmmm i guess lets just ignore this packet and keep on trucking?.. or // should we kill the connection? @@ -168,7 +169,8 @@ void Connection::HandleGamePacket(const std::vector& data) { switch (data[0]) { case BA_GAMEPACKET_KEEPALIVE: { if (data.size() != 4) { - BA_LOG_ONCE("Error: got invalid BA_GAMEPACKET_KEEPALIVE packet."); + BA_LOG_ONCE(LogLevel::kError, + "Error: got invalid BA_GAMEPACKET_KEEPALIVE packet."); return; } millisecs_t real_time = GetRealTime(); @@ -181,7 +183,7 @@ void Connection::HandleGamePacket(const std::vector& data) { // Expect 1 byte type, 2 byte num, 3 byte acks, at least 1 byte payload. if (data.size() < 7) { - Log("Error: Got invalid BA_PACKET_STATE packet."); + Log(LogLevel::kError, "Got invalid BA_PACKET_STATE packet."); return; } uint16_t num; @@ -212,7 +214,7 @@ void Connection::HandleGamePacket(const std::vector& data) { // Expect 1 byte type, 2 byte num, 2 byte unreliable-num, 3 byte acks, // at least 1 byte payload. if (data.size() < 9) { - Log("Error: Got invalid BA_PACKET_STATE_UNRELIABLE packet."); + Log(LogLevel::kError, "Got invalid BA_PACKET_STATE_UNRELIABLE packet."); return; } uint16_t num, num_unreliable; @@ -233,8 +235,8 @@ void Connection::HandleGamePacket(const std::vector& data) { } default: - Log("Connection got unknown packet type: " - + std::to_string(static_cast(data[0]))); + Log(LogLevel::kError, "Connection got unknown packet type: " + + std::to_string(static_cast(data[0]))); break; } } @@ -316,8 +318,9 @@ void Connection::SendReliableMessage(const std::vector& data) { void Connection::SendUnreliableMessage(const std::vector& data) { // For now we just silently drop anything bigger than our max packet size. if (data.size() + 8 > kMaxPacketSize) { - BA_LOG_ONCE("Error: Dropping outgoing unreliable packet of size " - + std::to_string(data.size()) + "."); + BA_LOG_ONCE(LogLevel::kError, + "Error: Dropping outgoing unreliable packet of size " + + std::to_string(data.size()) + "."); return; } @@ -428,7 +431,7 @@ void Connection::HandleMessagePacket(const std::vector& buffer) { multipart_buffer_.resize(old_size + (buffer.size() - 1)); memcpy(&(multipart_buffer_[old_size]), &(buffer[1]), buffer.size() - 1); } else { - Log("got invalid BA_MESSAGE_MULTIPART"); + Log(LogLevel::kError, "got invalid BA_MESSAGE_MULTIPART"); } if (buffer[0] == BA_MESSAGE_MULTIPART_END) { HandleMessagePacket(multipart_buffer_); @@ -468,10 +471,11 @@ void Connection::SendGamePacket(const std::vector& data) { if (!can_send && data[0] != BA_GAMEPACKET_HANDSHAKE && data[0] != BA_GAMEPACKET_HANDSHAKE_RESPONSE) { if (explicit_bool(false)) { - BA_LOG_ONCE("SendGamePacket() called before can_communicate set (" - + g_platform->DemangleCXXSymbol(typeid(*this).name()) - + " ptype " + std::to_string(static_cast(data[0])) - + ")"); + BA_LOG_ONCE(LogLevel::kError, + "SendGamePacket() called before can_communicate set (" + + g_platform->DemangleCXXSymbol(typeid(*this).name()) + + " ptype " + std::to_string(static_cast(data[0])) + + ")"); } return; } diff --git a/src/ballistica/logic/connection/connection_set.cc b/src/ballistica/logic/connection/connection_set.cc index 1748a3b9..23797bf6 100644 --- a/src/ballistica/logic/connection/connection_set.cc +++ b/src/ballistica/logic/connection/connection_set.cc @@ -26,7 +26,8 @@ void ConnectionSet::RegisterClientController(ClientControllerInterface* c) { // This shouldn't happen, but if there's already a controller registered, // detach all clients from it. if (client_controller_) { - Log("RegisterClientController() called " + Log(LogLevel::kError, + "RegisterClientController() called " "but already have a controller; bad."); for (auto&& i : connections_to_clients_) { assert(i.second.exists()); @@ -206,7 +207,8 @@ auto ConnectionSet::GetConnectionsToClients() if (connections_to_client.second.exists()) { connections.push_back(connections_to_client.second.get()); } else { - Log("HAVE NONEXISTENT CONNECTION_TO_CLIENT IN LIST; UNEXPECTED"); + Log(LogLevel::kError, + "HAVE NONEXISTENT CONNECTION_TO_CLIENT IN LIST; UNEXPECTED"); } } return connections; @@ -218,6 +220,7 @@ void ConnectionSet::PushUDPConnectionPacketCall( // these are unreliable messages so its ok to just drop them. if (!g_logic->thread()->CheckPushSafety()) { BA_LOG_ONCE( + LogLevel::kError, "Ignoring excessive udp-connection input packets; (could this be a " "flood attack?)."); return; @@ -280,7 +283,8 @@ void ConnectionSet::SendScreenMessageToAll(const std::string& s, float r, auto ConnectionSet::PrepareForLaunchHostSession() -> void { // If for some reason we're still attached to a host, kill the connection. if (connection_to_host_.exists()) { - Log("Had host-connection during LaunchHostSession(); shouldn't happen."); + Log(LogLevel::kError, + "Had host-connection during LaunchHostSession(); shouldn't happen."); connection_to_host_->RequestDisconnect(); connection_to_host_.Clear(); has_connection_to_host_ = false; @@ -322,8 +326,8 @@ auto ConnectionSet::DisconnectClient(int client_id, int ban_seconds) -> bool { return false; } if (client_id > 255) { - Log("DisconnectClient got client_id > 255 (" + std::to_string(client_id) - + ")"); + Log(LogLevel::kError, "DisconnectClient got client_id > 255 (" + + std::to_string(client_id) + ")"); } else { std::vector msg_out(2); msg_out[0] = BA_MESSAGE_KICK_VOTE; @@ -404,7 +408,8 @@ auto ConnectionSet::UnregisterClientController(ClientControllerInterface* c) // This shouldn't happen. if (client_controller_ != c) { - Log("UnregisterClientController() called with a non-registered " + Log(LogLevel::kError, + "UnregisterClientController() called with a non-registered " "controller"); return; } @@ -668,7 +673,7 @@ auto ConnectionSet::UDPConnectionPacket(const std::vector& data_in, msg_out[0] = BA_PACKET_CLIENT_DENY; msg_out[1] = request_id; g_network_writer->PushSendToCall(msg_out, addr); - Log("All client slots full; really?.."); + Log(LogLevel::kError, "All client slots full; really?.."); break; } connection_to_client = Object::New( @@ -710,8 +715,9 @@ auto ConnectionSet::VerifyClientAddr(uint8_t client_id, const SockAddr& addr) if (addr == connection_to_client_udp->addr()) { return true; } - BA_LOG_ONCE("VerifyClientAddr() found mismatch for client " - + std::to_string(client_id) + "."); + BA_LOG_ONCE(LogLevel::kError, + "VerifyClientAddr() found mismatch for client " + + std::to_string(client_id) + "."); return false; } @@ -722,8 +728,9 @@ void ConnectionSet::SetClientInfoFromMasterServer( const std::string& client_token, PyObject* info_obj) { // NOLINTNEXTLINE (python doing bitwise math on signed int) if (!PyDict_Check(info_obj)) { - Log("got non-dict for master-server client info for token " + client_token - + ": " + Python::ObjToString(info_obj)); + Log(LogLevel::kError, + "got non-dict for master-server client info for token " + client_token + + ": " + Python::ObjToString(info_obj)); return; } for (ConnectionToClient* client : GetConnectionsToClients()) { diff --git a/src/ballistica/logic/connection/connection_to_client.cc b/src/ballistica/logic/connection/connection_to_client.cc index 402a7593..10d52a4c 100644 --- a/src/ballistica/logic/connection/connection_to_client.cc +++ b/src/ballistica/logic/connection/connection_to_client.cc @@ -129,14 +129,14 @@ void ConnectionToClient::HandleGamePacket(const std::vector& data) { } if (data.empty()) { - Log("Error: ConnectionToClient got data size 0."); + Log(LogLevel::kError, "ConnectionToClient got data size 0."); return; } switch (data[0]) { case BA_GAMEPACKET_HANDSHAKE_RESPONSE: { // We sent the client a handshake and they're responding. if (data.size() < 3) { - Log("got invalid BA_GAMEPACKET_HANDSHAKE_RESPONSE"); + Log(LogLevel::kError, "got invalid BA_GAMEPACKET_HANDSHAKE_RESPONSE"); return; } @@ -322,7 +322,7 @@ void ConnectionToClient::SendScreenMessage(const std::string& s, float r, void ConnectionToClient::HandleMessagePacket( const std::vector& buffer) { if (buffer.empty()) { - Log("Error: Got invalid HandleMessagePacket."); + Log(LogLevel::kError, "Got invalid HandleMessagePacket."); return; } @@ -369,7 +369,7 @@ void ConnectionToClient::HandleMessagePacket( if (b) { build_number_ = b->valueint; } else { - Log("no buildnumber in clientinfo msg"); + Log(LogLevel::kError, "no buildnumber in clientinfo msg"); } // Grab their token (we use this to ask the @@ -378,7 +378,7 @@ void ConnectionToClient::HandleMessagePacket( if (t) { token_ = t->valuestring; } else { - Log("no token in clientinfo msg"); + Log(LogLevel::kError, "no token in clientinfo msg"); } // Newer clients also pass a peer-hash, which @@ -397,8 +397,10 @@ void ConnectionToClient::HandleMessagePacket( } cJSON_Delete(info); } else { - Log("got invalid json in clientinfo message: '" - + std::string(reinterpret_cast(&(buffer[1]))) + "'"); + Log(LogLevel::kError, + "got invalid json in clientinfo message: '" + + std::string(reinterpret_cast(&(buffer[1]))) + + "'"); } } got_client_info_ = true; @@ -435,7 +437,8 @@ void ConnectionToClient::HandleMessagePacket( // we support for game streams vs client-connections. We could disallow // connections to/from these older peers while still allowing old replays // to play back. - BA_LOG_ONCE("Received old pre-json player profiles msg; ignoring."); + BA_LOG_ONCE(LogLevel::kError, + "Received old pre-json player profiles msg; ignoring."); break; } @@ -462,7 +465,8 @@ void ConnectionToClient::HandleMessagePacket( // spamming before we can verify their identities) if (g_logic->require_client_authentication() && !got_info_from_master_server_) { - Log("Ignoring chat message from peer with no client info."); + Log(LogLevel::kError, + "Ignoring chat message from peer with no client info."); SendScreenMessage(R"({"r":"loadingTryAgainText"})", 1, 0, 0); } else if (last_chat_times_.size() >= 5) { chat_block_time_ = now + next_chat_block_seconds_ * 1000; @@ -556,7 +560,7 @@ void ConnectionToClient::HandleMessagePacket( GetClientInputDevice(buffer[1])) { int count = static_cast((buffer.size() - 2) / 5); if ((buffer.size() - 2) % 5 != 0) { - Log("Error: invalid player-input-commands packet"); + Log(LogLevel::kError, "Error: invalid player-input-commands packet"); break; } int index = 2; @@ -574,7 +578,7 @@ void ConnectionToClient::HandleMessagePacket( case BA_MESSAGE_REMOVE_REMOTE_PLAYER: { last_remove_player_time_ = GetRealTime(); if (buffer.size() != 2) { - Log("Error: invalid remove-remote-player packet"); + Log(LogLevel::kError, "Error: invalid remove-remote-player packet"); break; } if (ClientInputDevice* cid = GetClientInputDevice(buffer[1])) { @@ -589,7 +593,7 @@ void ConnectionToClient::HandleMessagePacket( case BA_MESSAGE_REQUEST_REMOTE_PLAYER: { if (buffer.size() != 2) { - Log("Error: invalid remote-player-request packet"); + Log(LogLevel::kError, "Error: invalid remote-player-request packet"); break; } @@ -628,16 +632,18 @@ void ConnectionToClient::HandleMessagePacket( } else { // Either timed out or have info; let the request go through. if (still_waiting) { - Log("Allowing player-request without client\'s master-server " + Log(LogLevel::kError, + "Allowing player-request without client\'s master-server " "info (build " - + std::to_string(build_number_) + ")"); + + std::to_string(build_number_) + ")"); } hs->RequestPlayer(cid); } } } } else { - Log("Error: ConnectionToClient got remote player" + Log(LogLevel::kError, + "ConnectionToClient got remote player" " request but have no host session"); } break; @@ -650,8 +656,9 @@ void ConnectionToClient::HandleMessagePacket( if (multipart_buffer_size() > 50000) { // Its not actually unknown but shhh don't tell the hackers... SendScreenMessage(R"({"r":"errorUnknownText"})", 1, 0, 0); - Log("Client data limit exceeded by '" + peer_spec().GetShortName() - + "'; kicking."); + Log(LogLevel::kError, "Client data limit exceeded by '" + + peer_spec().GetShortName() + + "'; kicking."); g_logic->BanPlayer(peer_spec(), 1000 * 60); Error(""); return; @@ -738,8 +745,8 @@ void ConnectionToClient::HandleMasterServerClientInfo(PyObject* info_obj) { "{\"t\":[\"serverResponses\"," "\"Your account was rejected. Are you signed in?\"]}", 1, 0, 0); - Log("Master server found no valid account for '" - + peer_spec().GetShortName() + "'; kicking."); + Log(LogLevel::kError, "Master server found no valid account for '" + + peer_spec().GetShortName() + "'; kicking."); // Not benning anymore. People were exploiting this by impersonating // other players using their public ids to get them banned from diff --git a/src/ballistica/logic/connection/connection_to_client_udp.cc b/src/ballistica/logic/connection/connection_to_client_udp.cc index 09a65a34..4dbbf839 100644 --- a/src/ballistica/logic/connection/connection_to_client_udp.cc +++ b/src/ballistica/logic/connection/connection_to_client_udp.cc @@ -66,7 +66,7 @@ void ConnectionToClientUDP::HandleGamePacket( void ConnectionToClientUDP::Die() { if (did_die_) { - Log("Error: Posting multiple die messages; probably not good."); + Log(LogLevel::kError, "Posting multiple die messages; probably not good."); return; } // this will actually clear the object.. diff --git a/src/ballistica/logic/connection/connection_to_host.cc b/src/ballistica/logic/connection/connection_to_host.cc index baede471..e1500402 100644 --- a/src/ballistica/logic/connection/connection_to_host.cc +++ b/src/ballistica/logic/connection/connection_to_host.cc @@ -219,7 +219,8 @@ void ConnectionToHost::HandleGamePacket(const std::vector& data) { PyObject* profiles = g_python->GetRawConfigValue("Player Profiles"); PythonRef empty_dict; if (!profiles) { - Log("No profiles found; sending empty list to host"); + Log(LogLevel::kError, + "No profiles found; sending empty list to host"); empty_dict.Steal(PyDict_New()); profiles = empty_dict.get(); } @@ -231,7 +232,8 @@ void ConnectionToHost::HandleGamePacket(const std::vector& data) { PythonRef results = g_python->obj(Python::ObjID::kJsonDumpsCall).Call(args, keywds); if (!results.exists()) { - Log("Error getting json dump of local profiles"); + Log(LogLevel::kError, + "Error getting json dump of local profiles"); } else { try { // Pull the string as utf8 and send. @@ -241,13 +243,15 @@ void ConnectionToHost::HandleGamePacket(const std::vector& data) { memcpy(&(msg[1]), &s[0], s.size()); SendReliableMessage(msg); } catch (const std::exception& e) { - Log(std::string("exc sending player profiles to host: ") - + e.what()); + Log(LogLevel::kError, + std::string("exc sending player profiles to host: ") + + e.what()); } } } } else { - Log("Connected to old protocol; can't send player profiles"); + Log(LogLevel::kError, + "Connected to old protocol; can't send player profiles"); } } break; @@ -274,7 +278,7 @@ void ConnectionToHost::HandleMessagePacket(const std::vector& buffer) { assert(InLogicThread()); if (buffer.empty()) { - Log("Error: got invalid HandleMessagePacket"); + Log(LogLevel::kError, "Got invalid HandleMessagePacket"); return; } @@ -298,7 +302,7 @@ void ConnectionToHost::HandleMessagePacket(const std::vector& buffer) { if (b) { build_number_ = b->valueint; } else { - Log("no buildnumber in hostinfo msg"); + Log(LogLevel::kError, "no buildnumber in hostinfo msg"); } // Party name. cJSON* n = cJSON_GetObjectItem(info, "n"); @@ -307,7 +311,7 @@ void ConnectionToHost::HandleMessagePacket(const std::vector& buffer) { } cJSON_Delete(info); } else { - Log("got invalid json in hostinfo message"); + Log(LogLevel::kError, "got invalid json in hostinfo message"); } } got_host_info_ = true; @@ -399,7 +403,7 @@ void ConnectionToHost::HandleMessagePacket(const std::vector& buffer) { case BA_MESSAGE_ATTACH_REMOTE_PLAYER_2: { // New-style packet which includes a 32-bit player_id. if (buffer.size() != 6) { - Log("Error: invalid attach-remote-player-2 msg"); + Log(LogLevel::kError, "Invalid attach-remote-player-2 msg"); break; } @@ -426,7 +430,7 @@ void ConnectionToHost::HandleMessagePacket(const std::vector& buffer) { // public servers. // TODO(ericf): can remove this once back-compat-protocol > 29. if (buffer.size() != 3) { - Log("Error: Invalid attach-remote-player msg."); + Log(LogLevel::kError, "Invalid attach-remote-player msg."); break; } @@ -447,7 +451,7 @@ void ConnectionToHost::HandleMessagePacket(const std::vector& buffer) { case BA_MESSAGE_DETACH_REMOTE_PLAYER: { if (buffer.size() != 2) { - Log("Error: Invalid detach-remote-player msg"); + Log(LogLevel::kError, "Invalid detach-remote-player msg"); break; } InputDevice* input_device = g_input->GetInputDevice(buffer[1]); diff --git a/src/ballistica/logic/connection/connection_to_host_udp.cc b/src/ballistica/logic/connection/connection_to_host_udp.cc index c77a8a8d..8e332355 100644 --- a/src/ballistica/logic/connection/connection_to_host_udp.cc +++ b/src/ballistica/logic/connection/connection_to_host_udp.cc @@ -110,14 +110,15 @@ void ConnectionToHostUDP::Update() { // departure before doing this when possible. void ConnectionToHostUDP::Die() { if (did_die_) { - Log("Error: posting multiple die messages; probably not good."); + Log(LogLevel::kError, "Posting multiple die messages; probably not good."); return; } if (g_logic->connections()->connection_to_host() == this) { g_logic->connections()->PushDisconnectedFromHostCall(); did_die_ = true; } else { - Log("Error: Running update for non-current host-connection; shouldn't " + Log(LogLevel::kError, + "Running update for non-current host-connection; shouldn't " "happen."); } } diff --git a/src/ballistica/logic/host_activity.cc b/src/ballistica/logic/host_activity.cc index 9685cadd..be77634f 100644 --- a/src/ballistica/logic/host_activity.cc +++ b/src/ballistica/logic/host_activity.cc @@ -98,14 +98,14 @@ HostActivity::~HostActivity() { if (g_buildconfig.debug_build()) { PruneDeadRefs(&python_calls_); if (python_calls_.size() > 1) { - std::string s = "WARNING: " + std::to_string(python_calls_.size()) + std::string s = std::to_string(python_calls_.size()) + " live PythonContextCalls at shutdown for " + "HostActivity" + " (1 call is expected):"; int count = 1; for (auto& python_call : python_calls_) s += "\n " + std::to_string(count++) + ": " + (*python_call).GetObjectDescription(); - Log(s); + Log(LogLevel::kWarning, s); } } } @@ -153,15 +153,16 @@ void HostActivity::RegisterCall(PythonContextCall* call) { // If we're shutting down, just kill the call immediately. // (we turn all of our calls to no-ops as we shut down) if (shutting_down_) { - Log("WARNING: adding call to expired activity; call will not function: " - + call->GetObjectDescription()); + Log(LogLevel::kWarning, + "Adding call to expired activity; call will not function: " + + call->GetObjectDescription()); call->MarkDead(); } } void HostActivity::start() { if (_started) { - Log("Error: Start called twice for activity."); + Log(LogLevel::kError, "Start called twice for activity."); } _started = true; } @@ -253,7 +254,8 @@ void HostActivity::HandleOutOfBoundsNodes() { // Make sure someone's handling our out-of-bounds messages. out_of_bounds_in_a_row_++; if (out_of_bounds_in_a_row_ > 100) { - Log("Warning: 100 consecutive out-of-bounds messages sent." + Log(LogLevel::kWarning, + "100 consecutive out-of-bounds messages sent." " They are probably not being handled properly"); int j = 0; for (auto&& i : scene()->out_of_bounds_nodes()) { @@ -265,9 +267,10 @@ void HostActivity::HandleOutOfBoundsNodes() { if (delegate) { dstr = PythonRef(delegate, PythonRef::kAcquire).Str(); } - Log(" node #" + std::to_string(j) + ": type='" + n->type()->name() - + "' addr=" + Utils::PtrToString(i.get()) + " name='" + n->label() - + "' delegate=" + dstr); + Log(LogLevel::kWarning, + " node #" + std::to_string(j) + ": type='" + n->type()->name() + + "' addr=" + Utils::PtrToString(i.get()) + " name='" + + n->label() + "' delegate=" + dstr); } } out_of_bounds_in_a_row_ = 0; diff --git a/src/ballistica/logic/logic.cc b/src/ballistica/logic/logic.cc index 795951ac..a791d3f0 100644 --- a/src/ballistica/logic/logic.cc +++ b/src/ballistica/logic/logic.cc @@ -373,7 +373,8 @@ void Logic::PruneSessions() { try { i.Clear(); } catch (const std::exception& e) { - Log("Exception killing Session: " + std::string(e.what())); + Log(LogLevel::kError, + "Exception killing Session: " + std::string(e.what())); } have_dead_session = true; } @@ -663,8 +664,8 @@ void Logic::Update() { // Complain when our full update takes longer than 1/60th second. if (duration > (1000 / 60)) { - Log("Game update took too long (" + std::to_string(duration) + " ms).", - true, false); + Log(LogLevel::kInfo, + "Logic update took too long (" + std::to_string(duration) + " ms)."); // Limit these if we want (not doing so for now). next_long_update_report_time_ = real_time; @@ -686,8 +687,9 @@ void Logic::Reset() { // If all is well our sessions should all be dead. if (g_app->session_count != 0) { - Log("Error: session-count is non-zero (" - + std::to_string(g_app->session_count) + ") on Logic::Reset."); + Log(LogLevel::kError, "Session-count is non-zero (" + + std::to_string(g_app->session_count) + + ") on Logic::Reset."); } // Note: we don't clear real-time timers anymore. Should we?.. @@ -754,7 +756,7 @@ void Logic::PushBackButtonCall(InputDevice* input_device) { void Logic::PushStringEditSetCall(const std::string& value) { thread()->PushCall([value] { if (!g_ui) { - Log("Error: No ui on StringEditSetEvent."); + Log(LogLevel::kError, "No ui on StringEditSetEvent."); return; } #if BA_OSTYPE_ANDROID @@ -771,7 +773,7 @@ void Logic::PushStringEditSetCall(const std::string& value) { void Logic::PushStringEditCancelCall() { thread()->PushCall([] { if (!g_ui) { - Log("Error: No ui in PushStringEditCancelCall."); + Log(LogLevel::kError, "No ui in PushStringEditCancelCall."); return; } }); @@ -994,7 +996,7 @@ void Logic::PushAskUserForTelnetAccessCall() { } void Logic::PushPythonCall(const Object::Ref& call) { - // Since we're mucking with refs, need to limit to game thread. + // Since we're mucking with refs, need to limit to logic thread. BA_PRECONDITION(InLogicThread()); BA_PRECONDITION(call->object_strong_ref_count() > 0); thread()->PushCall([call] { @@ -1005,7 +1007,7 @@ void Logic::PushPythonCall(const Object::Ref& call) { void Logic::PushPythonCallArgs(const Object::Ref& call, const PythonRef& args) { - // Since we're mucking with refs, need to limit to game thread. + // Since we're mucking with refs, need to limit to logic thread. BA_PRECONDITION(InLogicThread()); BA_PRECONDITION(call->object_strong_ref_count() > 0); thread()->PushCall([call, args] { @@ -1015,7 +1017,7 @@ void Logic::PushPythonCallArgs(const Object::Ref& call, } void Logic::PushPythonWeakCall(const Object::WeakRef& call) { - // Since we're mucking with refs, need to limit to game thread. + // Since we're mucking with refs, need to limit to logic thread. BA_PRECONDITION(InLogicThread()); // Even though we only hold a weak ref, we expect a valid strong-reffed @@ -1032,7 +1034,7 @@ void Logic::PushPythonWeakCall(const Object::WeakRef& call) { void Logic::PushPythonWeakCallArgs( const Object::WeakRef& call, const PythonRef& args) { - // Since we're mucking with refs, need to limit to game thread. + // Since we're mucking with refs, need to limit to logic thread. BA_PRECONDITION(InLogicThread()); // Even though we only hold a weak ref, we expect a valid strong-reffed @@ -1181,7 +1183,7 @@ void Logic::PushConfirmQuitCall() { thread()->PushCall([this] { assert(InLogicThread()); if (HeadlessMode()) { - Log("PushConfirmQuitCall() unhandled on headless."); + Log(LogLevel::kError, "PushConfirmQuitCall() unhandled on headless."); } else { // If input is locked, just quit immediately.. a confirm screen wouldn't // work anyway @@ -1233,7 +1235,7 @@ void Logic::Draw() { HostActivity* ha = GetForegroundContext().GetHostActivity(); if (ha) { int64_t step = ha->scene()->stepnum(); - Log(std::to_string(step - last_step)); + Log(LogLevel::kInfo, std::to_string(step - last_step)); last_step = step; } } @@ -1278,7 +1280,8 @@ void Logic::ApplyConfig() { } else if (texqualstr == "Low") { texture_quality_requested = TextureQuality::kLow; } else { - Log("Invalid texture quality: '" + texqualstr + "'; defaulting to low."); + Log(LogLevel::kError, + "Invalid texture quality: '" + texqualstr + "'; defaulting to low."); texture_quality_requested = TextureQuality::kLow; } @@ -1298,8 +1301,8 @@ void Logic::ApplyConfig() { } else if (gqualstr == "Low") { graphics_quality_requested = GraphicsQuality::kLow; } else { - Log("Error: Invalid graphics quality: '" + gqualstr - + "'; defaulting to auto."); + Log(LogLevel::kError, + "Invalid graphics quality: '" + gqualstr + "'; defaulting to auto."); graphics_quality_requested = GraphicsQuality::kAuto; } @@ -1365,7 +1368,7 @@ void Logic::ApplyConfig() { } else { do_v_sync = false; auto_v_sync = false; - Log("Error: Invalid 'Vertical Sync' value: '" + v_sync + "'"); + Log(LogLevel::kError, "Invalid 'Vertical Sync' value: '" + v_sync + "'"); } g_graphics_server->PushSetVSyncCall(do_v_sync, auto_v_sync); @@ -1505,7 +1508,7 @@ auto Logic::RemovePlayer(Player* player) -> void { if (HostSession* host_session = player->GetHostSession()) { host_session->RemovePlayer(player); } else { - Log("Got RemovePlayer call but have no host_session"); + Log(LogLevel::kError, "Got RemovePlayer call but have no host_session"); } } @@ -1526,7 +1529,8 @@ void Logic::SetRealTimerLength(int timer_id, millisecs_t length) { if (t) { t->SetLength(length); } else { - Log("Error: Logic::SetRealTimerLength() called on nonexistent timer."); + Log(LogLevel::kError, + "Logic::SetRealTimerLength() called on nonexistent timer."); } } @@ -1577,8 +1581,9 @@ auto DoCompileResourceString(cJSON* obj) -> std::string { if (!printed) { printed = true; char* c = cJSON_Print(obj); - BA_LOG_ONCE("found long key 'resource' in raw lstr json: " - + std::string(c)); + BA_LOG_ONCE( + LogLevel::kError, + "found long key 'resource' in raw lstr json: " + std::string(c)); free(c); } } @@ -1596,8 +1601,9 @@ auto DoCompileResourceString(cJSON* obj) -> std::string { if (!printed) { printed = true; char* c = cJSON_Print(obj); - BA_LOG_ONCE("found long key 'fallback' in raw lstr json: " - + std::string(c)); + BA_LOG_ONCE( + LogLevel::kError, + "found long key 'fallback' in raw lstr json: " + std::string(c)); free(c); } } @@ -1620,8 +1626,9 @@ auto DoCompileResourceString(cJSON* obj) -> std::string { if (!printed) { printed = true; char* c = cJSON_Print(obj); - BA_LOG_ONCE("found long key 'translate' in raw lstr json: " - + std::string(c)); + BA_LOG_ONCE( + LogLevel::kError, + "found long key 'translate' in raw lstr json: " + std::string(c)); free(c); } } @@ -1658,8 +1665,9 @@ auto DoCompileResourceString(cJSON* obj) -> std::string { if (!printed) { printed = true; char* c = cJSON_Print(obj); - BA_LOG_ONCE("found long key 'value' in raw lstr json: " - + std::string(c)); + BA_LOG_ONCE( + LogLevel::kError, + "found long key 'value' in raw lstr json: " + std::string(c)); free(c); } } @@ -1689,8 +1697,8 @@ auto DoCompileResourceString(cJSON* obj) -> std::string { if (!printed) { printed = true; char* c = cJSON_Print(obj); - BA_LOG_ONCE("found long key 'subs' in raw lstr json: " - + std::string(c)); + BA_LOG_ONCE(LogLevel::kError, "found long key 'subs' in raw lstr json: " + + std::string(c)); free(c); } } @@ -1761,8 +1769,8 @@ auto Logic::CompileResourceString(const std::string& s, const std::string& loc, cJSON* root = cJSON_Parse(s.c_str()); if (root == nullptr) { - Log("CompileResourceString failed (loc " + loc + "); invalid json: '" + s - + "'"); + Log(LogLevel::kError, "CompileResourceString failed (loc " + loc + + "); invalid json: '" + s + "'"); *valid = false; return ""; } @@ -1771,8 +1779,8 @@ auto Logic::CompileResourceString(const std::string& s, const std::string& loc, result = DoCompileResourceString(root); *valid = true; } catch (const std::exception& e) { - Log("CompileResourceString failed (loc " + loc - + "): " + std::string(e.what()) + "; str='" + s + "'"); + Log(LogLevel::kError, "CompileResourceString failed (loc " + loc + "): " + + std::string(e.what()) + "; str='" + s + "'"); result = ""; *valid = false; } diff --git a/src/ballistica/logic/logic.h b/src/ballistica/logic/logic.h index 7fcd4163..57799970 100644 --- a/src/ballistica/logic/logic.h +++ b/src/ballistica/logic/logic.h @@ -44,7 +44,7 @@ class Logic { /// Push a generic 'menu press' event, optionally associated with an /// input device (nullptr to specify none). Note: caller must ensure - /// a RemoveInputDevice() call does not arrive at the game thread + /// a RemoveInputDevice() call does not arrive at the logic thread /// before this one. auto PushMainMenuPressCall(InputDevice* device) -> void; @@ -71,12 +71,13 @@ class Logic { auto PushMediaPruneCall(int level) -> void; auto PushAskUserForTelnetAccessCall() -> void; - // Push Python call and keep it alive; must be called from game thread. + // Push Python call and keep it alive; must be called from logic thread. auto PushPythonCall(const Object::Ref& call) -> void; auto PushPythonCallArgs(const Object::Ref& call, const PythonRef& args) -> void; - // Push Python call without keeping it alive; must be called from game thread. + // Push Python call without keeping it alive; must be called from logic + // thread. auto PushPythonWeakCall(const Object::WeakRef& call) -> void; auto PushPythonWeakCallArgs(const Object::WeakRef& call, diff --git a/src/ballistica/logic/player_spec.cc b/src/ballistica/logic/player_spec.cc index 71b6f515..8f8f28c9 100644 --- a/src/ballistica/logic/player_spec.cc +++ b/src/ballistica/logic/player_spec.cc @@ -33,7 +33,7 @@ PlayerSpec::PlayerSpec(const std::string& s) { cJSON_Delete(root_obj); } if (!success) { - Log("Error creating PlayerSpec from string: '" + s + "'"); + Log(LogLevel::kError, "Error creating PlayerSpec from string: '" + s + "'"); name_ = ""; short_name_ = ""; account_type_ = V1AccountType::kInvalid; @@ -95,7 +95,7 @@ auto PlayerSpec::GetAccountPlayerSpec() -> PlayerSpec { } if (spec.name_.size() > 100) { // FIXME should perhaps clamp this in unicode space - Log("account name size too long: '" + spec.name_ + "'"); + Log(LogLevel::kError, "account name size too long: '" + spec.name_ + "'"); spec.name_.resize(100); spec.name_ = Utils::GetValidUTF8(spec.name_.c_str(), "bsgaps3"); } @@ -107,7 +107,8 @@ auto PlayerSpec::GetDummyPlayerSpec(const std::string& name) -> PlayerSpec { spec.name_ = Utils::GetValidUTF8(name.c_str(), "bsgdps1"); if (spec.name_.size() > 100) { // FIXME should perhaps clamp this in unicode space - Log("dummy player spec name too long: '" + spec.name_ + "'"); + Log(LogLevel::kError, + "dummy player spec name too long: '" + spec.name_ + "'"); spec.name_.resize(100); spec.name_ = Utils::GetValidUTF8(spec.name_.c_str(), "bsgdps2"); } diff --git a/src/ballistica/logic/session/client_session.cc b/src/ballistica/logic/session/client_session.cc index d9b72a57..73e5b67a 100644 --- a/src/ballistica/logic/session/client_session.cc +++ b/src/ballistica/logic/session/client_session.cc @@ -196,10 +196,12 @@ void ClientSession::Update(int time_advance) { if (g_buildconfig.debug_build()) { if (current_cmd_ptr_ != nullptr) { if (current_cmd_ptr_ != &(current_cmd_[0]) + current_cmd_.size()) { - Log("SIZE ERROR FOR CMD " - + std::to_string(static_cast(current_cmd_[0])) - + " expected " + std::to_string(current_cmd_.size()) + " got " - + std::to_string(current_cmd_ptr_ - &(current_cmd_[0]))); + Log(LogLevel::kError, + "SIZE ERROR FOR CMD " + + std::to_string(static_cast(current_cmd_[0])) + + " expected " + std::to_string(current_cmd_.size()) + + " got " + + std::to_string(current_cmd_ptr_ - &(current_cmd_[0]))); } } assert(current_cmd_ptr_ == current_cmd_.data() + current_cmd_.size()); @@ -953,7 +955,7 @@ auto ClientSession::GetCollideModel(int id) const -> CollideModel* { } void ClientSession::Error(const std::string& description) { - Log("ERROR: client session error: " + description); + Log(LogLevel::kError, "Client session error: " + description); End(); } diff --git a/src/ballistica/logic/session/host_session.cc b/src/ballistica/logic/session/host_session.cc index 6dbbe3a1..caa5b7dc 100644 --- a/src/ballistica/logic/session/host_session.cc +++ b/src/ballistica/logic/session/host_session.cc @@ -242,7 +242,8 @@ void HostSession::RequestPlayer(InputDevice* device) { // Ignore if we have no Python session obj. if (!GetSessionPyObj()) { - Log("Error: HostSession::RequestPlayer() called w/no session_py_obj_."); + Log(LogLevel::kError, + "HostSession::RequestPlayer() called w/no session_py_obj_."); return; } @@ -325,11 +326,13 @@ void HostSession::IssuePlayerLeft(Player* player) { BA_LOG_PYTHON_TRACE_ONCE("missing player on IssuePlayerLeft"); } } else { - Log("WARNING: HostSession: IssuePlayerLeft caled with no " + Log(LogLevel::kWarning, + "HostSession: IssuePlayerLeft caled with no " "session_py_obj_"); } } catch (const std::exception& e) { - Log(std::string("Error calling on_player_leave(): ") + e.what()); + Log(LogLevel::kError, + std::string("Error calling on_player_leave(): ") + e.what()); } } @@ -347,7 +350,8 @@ void HostSession::SetForegroundHostActivity(HostActivity* a) { assert(InLogicThread()); if (shutting_down_) { - Log("WARNING: SetForegroundHostActivity called during session shutdown; " + Log(LogLevel::kWarning, + "SetForegroundHostActivity called during session shutdown; " "ignoring."); return; } @@ -603,7 +607,7 @@ HostSession::~HostSession() { if (g_buildconfig.debug_build()) { PruneDeadRefs(&python_calls_); if (python_calls_.size() > 1) { - std::string s = "WARNING: " + std::to_string(python_calls_.size()) + std::string s = std::to_string(python_calls_.size()) + " live PythonContextCalls at shutdown for " + "HostSession" + " (1 call is expected):"; int count = 1; @@ -611,11 +615,12 @@ HostSession::~HostSession() { s += ("\n " + std::to_string(count++) + ": " + i->GetObjectDescription()); } - Log(s); + Log(LogLevel::kWarning, s); } } } catch (const std::exception& e) { - Log("Exception in HostSession destructor: " + std::string(e.what())); + Log(LogLevel::kError, + "Exception in HostSession destructor: " + std::string(e.what())); } } @@ -626,8 +631,9 @@ void HostSession::RegisterCall(PythonContextCall* call) { // If we're shutting down, just kill the call immediately. // (we turn all of our calls to no-ops as we shut down). if (shutting_down_) { - Log("WARNING: adding call to expired session; call will not function: " - + call->GetObjectDescription()); + Log(LogLevel::kWarning, + "Adding call to expired session; call will not function: " + + call->GetObjectDescription()); call->MarkDead(); } } diff --git a/src/ballistica/logic/session/net_client_session.cc b/src/ballistica/logic/session/net_client_session.cc index 795bd1ee..a1f6b7b0 100644 --- a/src/ballistica/logic/session/net_client_session.cc +++ b/src/ballistica/logic/session/net_client_session.cc @@ -13,7 +13,8 @@ namespace ballistica { NetClientSession::NetClientSession() { // Sanity check: we should only ever be writing one replay at once. if (g_app->replay_open) { - Log("ERROR: g_replay_open true at netclient start; shouldn't happen."); + Log(LogLevel::kError, + "g_replay_open true at netclient start; shouldn't happen."); } assert(g_assets_server); g_assets_server->PushBeginWriteReplayCall(); @@ -25,7 +26,8 @@ NetClientSession::~NetClientSession() { if (writing_replay_) { // Sanity check: we should only ever be writing one replay at once. if (!g_app->replay_open) { - Log("ERROR: g_replay_open false at net-client close; shouldn't happen."); + Log(LogLevel::kError, + "g_replay_open false at net-client close; shouldn't happen."); } g_app->replay_open = false; assert(g_assets_server); diff --git a/src/ballistica/logic/session/replay_client_session.cc b/src/ballistica/logic/session/replay_client_session.cc index c93fb45f..d422cb4d 100644 --- a/src/ballistica/logic/session/replay_client_session.cc +++ b/src/ballistica/logic/session/replay_client_session.cc @@ -45,14 +45,16 @@ void ReplayClientSession::OnClientConnected(ConnectionToClient* c) { // sanity check - abort if its on either of our lists already for (ConnectionToClient* i : connections_to_clients_) { if (i == c) { - Log("Error: ReplayClientSession::OnClientConnected()" + Log(LogLevel::kError, + "ReplayClientSession::OnClientConnected()" " got duplicate connection"); return; } } for (ConnectionToClient* i : connections_to_clients_ignored_) { if (i == c) { - Log("Error: ReplayClientSession::OnClientConnected()" + Log(LogLevel::kError, + "ReplayClientSession::OnClientConnected()" " got duplicate connection"); return; } @@ -113,7 +115,8 @@ void ReplayClientSession::OnClientDisconnected(ConnectionToClient* c) { return; } } - Log("Error: ReplayClientSession::OnClientDisconnected()" + Log(LogLevel::kError, + "ReplayClientSession::OnClientDisconnected()" " called for connection not on lists"); } diff --git a/src/ballistica/logic/session/session.cc b/src/ballistica/logic/session/session.cc index facb0460..a785e291 100644 --- a/src/ballistica/logic/session/session.cc +++ b/src/ballistica/logic/session/session.cc @@ -31,7 +31,8 @@ void Session::GraphicsQualityChanged(GraphicsQuality q) {} void Session::DebugSpeedMultChanged() {} void Session::DumpFullState(SceneStream* out) { - Log("Session::DumpFullState() being called; shouldn't happen."); + Log(LogLevel::kError, + "Session::DumpFullState() being called; shouldn't happen."); } } // namespace ballistica diff --git a/src/ballistica/logic/v1_account.cc b/src/ballistica/logic/v1_account.cc index 23ccd39b..399211cc 100644 --- a/src/ballistica/logic/v1_account.cc +++ b/src/ballistica/logic/v1_account.cc @@ -150,7 +150,7 @@ void V1Account::SetLogin(V1AccountType account_type, V1LoginState login_state, { std::scoped_lock lock(mutex_); - // We call out to Python so need to be in game thread. + // We call out to Python so need to be in logic thread. assert(InLogicThread()); if (login_state_ != login_state || g_app->account_type != account_type || login_id_ != login_id || login_name_ != login_name) { diff --git a/src/ballistica/networking/network_reader.cc b/src/ballistica/networking/network_reader.cc index 15b62d2a..837dc644 100644 --- a/src/ballistica/networking/network_reader.cc +++ b/src/ballistica/networking/network_reader.cc @@ -43,7 +43,7 @@ auto NetworkReader::Pause() -> void { if (port4_ != -1) { PokeSelf(); } else { - Log("Error: NetworkReader port is -1 on pause"); + Log(LogLevel::kError, "NetworkReader port is -1 on pause"); } } @@ -63,8 +63,8 @@ void NetworkReader::Resume() { void NetworkReader::PokeSelf() { int sd = socket(AF_INET, SOCK_DGRAM, 0); if (sd < 0) { - Log("ERROR: unable to create sleep ping socket; errno " - + g_platform->GetSocketErrorString()); + Log(LogLevel::kError, "Unable to create sleep ping socket; errno " + + g_platform->GetSocketErrorString()); } else { struct sockaddr_in serv_addr {}; memset(&serv_addr, 0, sizeof(serv_addr)); @@ -73,8 +73,8 @@ void NetworkReader::PokeSelf() { serv_addr.sin_port = 0; // any int bresult = ::bind(sd, (struct sockaddr*)&serv_addr, sizeof(serv_addr)); if (bresult == 1) { - Log("ERROR: unable to bind sleep socket: " - + g_platform->GetSocketErrorString()); + Log(LogLevel::kError, + "Unable to bind sleep socket: " + g_platform->GetSocketErrorString()); } else { struct sockaddr_in t_addr {}; memset(&t_addr, 0, sizeof(t_addr)); @@ -85,8 +85,8 @@ void NetworkReader::PokeSelf() { ssize_t sresult = sendto(sd, b, 1, 0, (struct sockaddr*)(&t_addr), sizeof(t_addr)); if (sresult == -1) { - Log("Error on sleep self-sendto: " - + g_platform->GetSocketErrorString()); + Log(LogLevel::kError, "Error on sleep self-sendto: " + + g_platform->GetSocketErrorString()); } } g_platform->CloseSocket(sd); @@ -144,7 +144,7 @@ static auto HandleGameQuery(const char* buffer, size_t size, BA_PRECONDITION_FATAL(!usid.empty()); if (usid.size() > 100) { - Log("had to truncate session-id; shouldn't happen"); + Log(LogLevel::kError, "had to truncate session-id; shouldn't happen"); usid.resize(100); } if (usid.empty()) { @@ -170,8 +170,8 @@ static auto HandleGameQuery(const char* buffer, size_t size, g_network_writer->PushSendToCall(msg_buffer, SockAddr(*from)); } else { - Log("Error: Got invalid game-query packet of len " + std::to_string(size) - + "; expected 5."); + Log(LogLevel::kError, "Got invalid game-query packet of len " + + std::to_string(size) + "; expected 5."); } } @@ -232,7 +232,8 @@ auto NetworkReader::RunThread() -> int { // Aint no thang. } else { // Let's complain for anything else though. - Log("Error on select: " + g_platform->GetSocketErrorString()); + Log(LogLevel::kError, + "Error on select: " + g_platform->GetSocketErrorString()); } } else { // Wait for any data on either of our sockets. @@ -244,7 +245,8 @@ auto NetworkReader::RunThread() -> int { recvfrom(sd, buffer, sizeof(buffer), 0, reinterpret_cast(&from), &from_size); if (rresult == 0) { - Log("ERROR: NetworkReader Recv got length 0; this shouldn't " + Log(LogLevel::kError, + "NetworkReader Recv got length 0; this shouldn't " "happen"); } else if (rresult == -1) { // This needs to be locked during any sd changes/writes. @@ -354,7 +356,7 @@ auto NetworkReader::RunThread() -> int { case BA_PACKET_CLIENT_GAMEPACKET_COMPRESSED: case BA_PACKET_HOST_GAMEPACKET_COMPRESSED: { // These messages are associated with udp host/client - // connections.. pass them to the game thread to wrangle. + // connections.. pass them to the logic thread to wrangle. std::vector msg_buffer(rresult2); memcpy(&(msg_buffer[0]), buffer, rresult2); g_logic->connections()->PushUDPConnectionPacketCall( @@ -395,8 +397,8 @@ auto NetworkReader::OpenSockets() -> void { sd4_ = socket(AF_INET, SOCK_DGRAM, 0); if (sd4_ < 0) { - Log("ERROR: Unable to open host socket; errno " - + g_platform->GetSocketErrorString()); + Log(LogLevel::kError, "Unable to open host socket; errno " + + g_platform->GetSocketErrorString()); } else { g_platform->SetSocketNonBlocking(sd4_); @@ -413,9 +415,8 @@ auto NetworkReader::OpenSockets() -> void { // If we're headless then we abort here; we're useless if we don't get // the port we wanted. if (HeadlessMode()) { - Log("FATAL ERROR: unable to bind to requested udp port " - + std::to_string(port4_) + " (ipv4)"); - exit(1); + FatalError("Unable to bind to requested udp port " + + std::to_string(port4_) + " (ipv4)"); } // Primary ipv4 bind failed; try on any port as a backup. @@ -450,8 +451,8 @@ auto NetworkReader::OpenSockets() -> void { // available everywhere (win XP, etc) so let's do this for now. sd6_ = socket(AF_INET6, SOCK_DGRAM, 0); if (sd6_ < 0) { - Log("ERROR: Unable to open ipv6 socket: " - + g_platform->GetSocketErrorString()); + Log(LogLevel::kError, + "Unable to open ipv6 socket: " + g_platform->GetSocketErrorString()); } else { // Since we're explicitly creating both a v4 and v6 socket, tell the v6 // to *not* do both itself (not sure if this is necessary; on mac it @@ -460,7 +461,7 @@ auto NetworkReader::OpenSockets() -> void { if (setsockopt(sd6_, IPPROTO_IPV6, IPV6_V6ONLY, reinterpret_cast(&on), sizeof(on)) == -1) { - Log("error setting socket as ipv6-only"); + Log(LogLevel::kError, "Error setting socket as ipv6-only"); } g_platform->SetSocketNonBlocking(sd6_); @@ -473,9 +474,8 @@ auto NetworkReader::OpenSockets() -> void { if (result != 0) { if (HeadlessMode()) { - Log("FATAL ERROR: unable to bind to requested udp port " - + std::to_string(port6_) + " (ipv6)"); - exit(1); + FatalError("Unable to bind to requested udp port " + + std::to_string(port6_) + " (ipv6)"); } // Primary ipv6 bind failed; try backup. @@ -508,9 +508,9 @@ auto NetworkReader::OpenSockets() -> void { + std::to_string(initial_requested_port) + "; some network functionality may fail.", {1, 0.5f, 0}); - Log("Unable to bind udp port " + std::to_string(initial_requested_port) - + "; some network functionality may fail.", - true, false); + Log(LogLevel::kWarning, "Unable to bind udp port " + + std::to_string(initial_requested_port) + + "; some network functionality may fail."); } } diff --git a/src/ballistica/networking/network_writer.cc b/src/ballistica/networking/network_writer.cc index 82679ce5..3050e8b5 100644 --- a/src/ballistica/networking/network_writer.cc +++ b/src/ballistica/networking/network_writer.cc @@ -22,7 +22,8 @@ void NetworkWriter::PushSendToCall(const std::vector& msg, // Avoid buffer-full errors if something is causing us to write too often; // these are unreliable messages so its ok to just drop them. if (!thread()->CheckPushSafety()) { - BA_LOG_ONCE("Excessive send-to calls in net-write-module."); + BA_LOG_ONCE(LogLevel::kError, + "Excessive send-to calls in net-write-module."); return; } thread()->PushCall([this, msg, addr] { diff --git a/src/ballistica/networking/networking.cc b/src/ballistica/networking/networking.cc index 3aaca894..7af90cf3 100644 --- a/src/ballistica/networking/networking.cc +++ b/src/ballistica/networking/networking.cc @@ -32,14 +32,14 @@ void Networking::HostScanCycle() { scan_socket_ = socket(AF_INET, SOCK_DGRAM, 0); if (scan_socket_ == -1) { - Log("Error opening scan socket: " + g_platform->GetSocketErrorString() - + "."); + Log(LogLevel::kError, "Error opening scan socket: " + + g_platform->GetSocketErrorString() + "."); return; } // Since this guy lives in the game-thread we need it to not block. if (!g_platform->SetSocketNonBlocking(scan_socket_)) { - Log("Error setting socket non-blocking."); + Log(LogLevel::kError, "Error setting socket non-blocking."); g_platform->CloseSocket(scan_socket_); scan_socket_ = -1; return; @@ -54,7 +54,8 @@ void Networking::HostScanCycle() { int result = ::bind(scan_socket_, (struct sockaddr*)&serv_addr, sizeof(serv_addr)); if (result == 1) { - Log("Error binding socket: " + g_platform->GetSocketErrorString() + "."); + Log(LogLevel::kError, + "Error binding socket: " + g_platform->GetSocketErrorString() + "."); g_platform->CloseSocket(scan_socket_); scan_socket_ = -1; return; @@ -66,8 +67,8 @@ void Networking::HostScanCycle() { sizeof(op_val)); if (result != 0) { - Log("Error enabling broadcast for scan-socket: " - + g_platform->GetSocketErrorString() + "."); + Log(LogLevel::kError, "Error enabling broadcast for scan-socket: " + + g_platform->GetSocketErrorString() + "."); g_platform->CloseSocket(scan_socket_); scan_socket_ = -1; return; @@ -99,8 +100,8 @@ void Networking::HostScanCycle() { case ENETUNREACH: break; default: - Log("Error on scanSocket sendto: " - + g_platform->GetSocketErrorString()); + Log(LogLevel::kError, "Error on scanSocket sendto: " + + g_platform->GetSocketErrorString()); } } } @@ -122,7 +123,8 @@ void Networking::HostScanCycle() { case EWOULDBLOCK: break; default: - Log("Error: recvfrom error: " + g_platform->GetSocketErrorString()); + Log(LogLevel::kError, + "Error: recvfrom error: " + g_platform->GetSocketErrorString()); break; } break; @@ -179,10 +181,12 @@ void Networking::HostScanCycle() { PruneScanResults(); } } else { - Log("Error: Got invalid BA_PACKET_GAME_QUERY_RESPONSE packet"); + Log(LogLevel::kError, + "Got invalid BA_PACKET_GAME_QUERY_RESPONSE packet"); } } else { - Log("Error: Got invalid BA_PACKET_GAME_QUERY_RESPONSE packet"); + Log(LogLevel::kError, + "Got invalid BA_PACKET_GAME_QUERY_RESPONSE packet"); } } } @@ -228,7 +232,8 @@ void Networking::EndHostScanning() { void Networking::Pause() { if (!running_) { - Log("Networking::pause() called with running_ already false"); + Log(LogLevel::kError, + "Networking::pause() called with running_ already false"); } running_ = false; @@ -238,7 +243,8 @@ void Networking::Pause() { void Networking::Resume() { if (running_) { - Log("Networking::resume() called with running_ already true"); + Log(LogLevel::kError, + "Networking::resume() called with running_ already true"); } running_ = true; } diff --git a/src/ballistica/networking/networking.h b/src/ballistica/networking/networking.h index 76f6766e..6554d5c5 100644 --- a/src/ballistica/networking/networking.h +++ b/src/ballistica/networking/networking.h @@ -112,7 +112,7 @@ namespace ballistica { #define HUFFMAN_TRAINING_MODE 0 #endif -// Bits used by the game thread for network communication. +// Bits used by the logic thread for network communication. class Networking { public: // Send a message to an address. This may block for a brief moment, so it can diff --git a/src/ballistica/networking/telnet_server.cc b/src/ballistica/networking/telnet_server.cc index 91c430c1..7a75d1f9 100644 --- a/src/ballistica/networking/telnet_server.cc +++ b/src/ballistica/networking/telnet_server.cc @@ -69,7 +69,8 @@ auto TelnetServer::RunThread() -> int { sd_ = socket(AF_INET, SOCK_STREAM, 0); if (sd_ < 0) { - Log("Error: Unable to open host socket; errno " + std::to_string(errno)); + Log(LogLevel::kError, + "Unable to open host socket; errno " + std::to_string(errno)); return 1; } @@ -78,7 +79,7 @@ auto TelnetServer::RunThread() -> int { int status = setsockopt(sd_, SOL_SOCKET, SO_REUSEADDR, (const char*)&on, sizeof(on)); if (-1 == status) { - Log("Error setting SO_REUSEADDR on telnet server"); + Log(LogLevel::kError, "Error setting SO_REUSEADDR on telnet server"); } // Bind to local server port. @@ -221,7 +222,7 @@ void TelnetServer::PushPrint(const std::string& s) { } void TelnetServer::Print(const std::string& s) { - // Currently we make the assumption that *only* the game thread writes to our + // Currently we make the assumption that *only* the logic thread writes to our // socket. assert(InLogicThread()); if (client_sd_ != -1) { diff --git a/src/ballistica/platform/apple/platform_apple.h b/src/ballistica/platform/apple/platform_apple.h index 90055735..f9a31860 100644 --- a/src/ballistica/platform/apple/platform_apple.h +++ b/src/ballistica/platform/apple/platform_apple.h @@ -25,7 +25,8 @@ class PlatformApple : public Platform { auto DoHasTouchScreen() -> bool override; auto GetUIScale() -> UIScale override; auto IsRunningOnDesktop() -> bool override; - auto HandleLog(const std::string& msg) -> void override; + auto DisplayLog(const std::string& name, LogLevel level, + const std::string& msg) -> void override; auto SetupDataDirectory() -> void override; auto GetTextBoundsAndWidth(const std::string& text, Rect* r, float* width) -> void override; diff --git a/src/ballistica/platform/linux/platform_linux.cc b/src/ballistica/platform/linux/platform_linux.cc index de9f1ed9..58af4402 100644 --- a/src/ballistica/platform/linux/platform_linux.cc +++ b/src/ballistica/platform/linux/platform_linux.cc @@ -63,8 +63,8 @@ void PlatformLinux::OpenFileExternally(const std::string& path) { std::string cmd = std::string("xdg-open \"") + path + "\""; int result = system(cmd.c_str()); if (result != 0) { - Log("Error: Got return value " + std::to_string(result) - + " on xdg-open cmd '" + cmd + "'"); + Log(LogLevel::kError, "Got return value " + std::to_string(result) + + " on xdg-open cmd '" + cmd + "'"); } } @@ -72,8 +72,8 @@ void PlatformLinux::OpenDirExternally(const std::string& path) { std::string cmd = std::string("xdg-open \"") + path + "\""; int result = system(cmd.c_str()); if (result != 0) { - Log("Error: Got return value " + std::to_string(result) - + " on xdg-open cmd '" + cmd + "'"); + Log(LogLevel::kError, "Got return value " + std::to_string(result) + + " on xdg-open cmd '" + cmd + "'"); } } diff --git a/src/ballistica/platform/platform.cc b/src/ballistica/platform/platform.cc index 8ce6ada9..0fa607e7 100644 --- a/src/ballistica/platform/platform.cc +++ b/src/ballistica/platform/platform.cc @@ -169,10 +169,12 @@ auto Platform::GetLegacyDeviceUUID() -> const std::string& { legacy_device_uuid_ += val; if (FILE* f2 = FOpen(path.c_str(), "wb")) { size_t result = fwrite(val.c_str(), val.size(), 1, f2); - if (result != 1) Log("unable to write bsuuid file."); + if (result != 1) + Log(LogLevel::kError, "unable to write bsuuid file."); fclose(f2); } else { - Log("unable to open bsuuid file for writing: '" + path + "'"); + Log(LogLevel::kError, + "unable to open bsuuid file for writing: '" + path + "'"); } } } @@ -182,7 +184,7 @@ auto Platform::GetLegacyDeviceUUID() -> const std::string& { } auto Platform::GetDeviceV1AccountUUIDPrefix() -> std::string { - Log("GetDeviceV1AccountUUIDPrefix() unimplemented"); + Log(LogLevel::kError, "GetDeviceV1AccountUUIDPrefix() unimplemented"); return "u"; } @@ -261,10 +263,11 @@ void Platform::SetLowLevelConfigValue(const char* key, int value) { FILE* f = FOpen(path.c_str(), "w"); if (f) { size_t result = fwrite(out.c_str(), out.size(), 1, f); - if (result != 1) Log("unable to write low level config file."); + if (result != 1) + Log(LogLevel::kError, "unable to write low level config file."); fclose(f); } else { - Log("unable to open low level config file for writing."); + Log(LogLevel::kError, "unable to open low level config file for writing."); } } @@ -306,11 +309,10 @@ auto Platform::GetAppPythonDirectory() -> std::string { // Fall back to our default if that doesn't exist. if (FilePathExists(app_python_dir_)) { using_custom_app_python_dir_ = true; - Log("Using custom app Python path: '" - + (GetUserPythonDirectory() + BA_DIRSLASH + "sys" + BA_DIRSLASH - + kAppVersion) - + "'.", - true, false); + Log(LogLevel::kInfo, "Using custom app Python path: '" + + (GetUserPythonDirectory() + BA_DIRSLASH + "sys" + + BA_DIRSLASH + kAppVersion) + + "'."); } else { // Going with relative paths for cleaner tracebacks... @@ -484,7 +486,8 @@ auto Platform::GetLocale() -> std::string { return lang; } else { if (!g_buildconfig.headless_build()) { - BA_LOG_ONCE("No LANG value available; defaulting to en_US"); + BA_LOG_ONCE(LogLevel::kError, + "No LANG value available; defaulting to en_US"); } return "en_US"; } @@ -588,7 +591,7 @@ static void HandleArgs(int argc, char** argv) { exit(-1); } } else { - Log("ERROR: expected arg after -cfgdir"); + Log(LogLevel::kError, "Expected arg after -cfgdir."); exit(-1); } } @@ -672,7 +675,8 @@ auto Platform::GetUIScale() -> UIScale { return UIScale::kLarge; } -void Platform::HandleLog(const std::string& msg) { +void Platform::DisplayLog(const std::string& name, LogLevel level, + const std::string& msg) { // Do nothing by default. } @@ -848,13 +852,13 @@ auto Platform::ConvertIncomingLeaderboardScore( void Platform::GetFriendScores(const std::string& game, const std::string& game_version, void* data) { // As a default, just fail gracefully. - Log("FIXME: GetFriendScores unimplemented"); + Log(LogLevel::kError, "FIXME: GetFriendScores unimplemented"); g_logic->PushFriendScoreSetCall(FriendScoreSet(false, data)); } void Platform::SubmitScore(const std::string& game, const std::string& version, int64_t score) { - Log("FIXME: SubmitScore() unimplemented"); + Log(LogLevel::kError, "FIXME: SubmitScore() unimplemented"); } void Platform::ReportAchievement(const std::string& achievement) {} @@ -866,13 +870,13 @@ auto Platform::HaveLeaderboard(const std::string& game, void Platform::EditText(const std::string& title, const std::string& value, int max_chars) { - Log("FIXME: EditText() unimplemented"); + Log(LogLevel::kError, "FIXME: EditText() unimplemented"); } void Platform::ShowOnlineScoreUI(const std::string& show, const std::string& game, const std::string& game_version) { - Log("FIXME: ShowOnlineScoreUI() unimplemented"); + Log(LogLevel::kError, "FIXME: ShowOnlineScoreUI() unimplemented"); } void Platform::Purchase(const std::string& item) { @@ -880,7 +884,9 @@ void Platform::Purchase(const std::string& item) { g_python->PushObjCall(Python::ObjID::kUnavailableMessageCall); } -void Platform::RestorePurchases() { Log("RestorePurchases() unimplemented"); } +void Platform::RestorePurchases() { + Log(LogLevel::kError, "RestorePurchases() unimplemented"); +} void Platform::AndroidSetResString(const std::string& res) { throw Exception(); @@ -889,11 +895,11 @@ void Platform::AndroidSetResString(const std::string& res) { void Platform::ApplyConfig() {} void Platform::AndroidSynthesizeBackPress() { - Log("AndroidSynthesizeBackPress() unimplemented"); + Log(LogLevel::kError, "AndroidSynthesizeBackPress() unimplemented"); } void Platform::AndroidQuitActivity() { - Log("AndroidQuitActivity() unimplemented"); + Log(LogLevel::kError, "AndroidQuitActivity() unimplemented"); } auto Platform::GetDeviceV1AccountID() -> std::string { @@ -920,7 +926,8 @@ auto Platform::DemangleCXXSymbol(const std::string& s) -> std::string { abi::__cxa_demangle(s.c_str(), nullptr, nullptr, &demangle_status); if (demangled_name != nullptr) { if (demangle_status != 0) { - BA_LOG_ONCE("__cxa_demangle got buffer but non-zero status; unexpected"); + BA_LOG_ONCE(LogLevel::kError, + "__cxa_demangle got buffer but non-zero status; unexpected"); } std::string retval = demangled_name; free(static_cast(demangled_name)); @@ -938,7 +945,7 @@ auto Platform::NewAutoReleasePool() -> void* { throw Exception(); } void Platform::DrainAutoReleasePool(void* pool) { throw Exception(); } void Platform::OpenURL(const std::string& url) { - // Can't open URLs in VR - just tell the game thread to show the url. + // Can't open URLs in VR - just tell the logic thread to show the url. if (IsVRMode()) { g_logic->PushShowURLCall(url); return; @@ -949,16 +956,18 @@ void Platform::OpenURL(const std::string& url) { } void Platform::DoOpenURL(const std::string& url) { - Log("DoOpenURL unimplemented on this platform."); + Log(LogLevel::kError, "DoOpenURL unimplemented on this platform."); } -void Platform::ResetAchievements() { Log("ResetAchievements() unimplemented"); } +void Platform::ResetAchievements() { + Log(LogLevel::kError, "ResetAchievements() unimplemented"); +} void Platform::GameCenterLogin() { throw Exception(); } void Platform::PurchaseAck(const std::string& purchase, const std::string& order_id) { - Log("PurchaseAck() unimplemented"); + Log(LogLevel::kError, "PurchaseAck() unimplemented"); } void Platform::RunEvents() {} @@ -969,17 +978,18 @@ void Platform::OnAppPause() {} void Platform::OnAppResume() {} void Platform::MusicPlayerPlay(PyObject* target) { - Log("MusicPlayerPlay() unimplemented on this platform"); + Log(LogLevel::kError, "MusicPlayerPlay() unimplemented on this platform"); } void Platform::MusicPlayerStop() { - Log("MusicPlayerStop() unimplemented on this platform"); + Log(LogLevel::kError, "MusicPlayerStop() unimplemented on this platform"); } void Platform::MusicPlayerShutdown() { - Log("MusicPlayerShutdown() unimplemented on this platform"); + Log(LogLevel::kError, "MusicPlayerShutdown() unimplemented on this platform"); } void Platform::MusicPlayerSetVolume(float volume) { - Log("MusicPlayerSetVolume() unimplemented on this platform"); + Log(LogLevel::kError, + "MusicPlayerSetVolume() unimplemented on this platform"); } auto Platform::IsOSPlayingMusic() -> bool { return false; } @@ -987,7 +997,7 @@ auto Platform::IsOSPlayingMusic() -> bool { return false; } void Platform::AndroidShowAppInvite(const std::string& title, const std::string& message, const std::string& code) { - Log("AndroidShowAppInvite() unimplemented"); + Log(LogLevel::kError, "AndroidShowAppInvite() unimplemented"); } void Platform::IncrementAnalyticsCount(const std::string& name, int increment) { @@ -1006,11 +1016,11 @@ void Platform::SubmitAnalyticsCounts() {} void Platform::SetPlatformMiscReadVals(const std::string& vals) {} void Platform::AndroidRefreshFile(const std::string& file) { - Log("AndroidRefreshFile() unimplemented"); + Log(LogLevel::kError, "AndroidRefreshFile() unimplemented"); } void Platform::ShowAd(const std::string& purpose) { - Log("ShowAd() unimplemented"); + Log(LogLevel::kError, "ShowAd() unimplemented"); } auto Platform::GetHasAds() -> bool { return false; } @@ -1021,17 +1031,19 @@ auto Platform::GetHasVideoAds() -> bool { } void Platform::SignInV1(const std::string& account_type) { - Log("SignInV1() unimplemented"); + Log(LogLevel::kError, "SignInV1() unimplemented"); } void Platform::V1LoginDidChange() { // Default is no-op. } -void Platform::SignOutV1() { Log("SignOutV1() unimplemented"); } +void Platform::SignOutV1() { + Log(LogLevel::kError, "SignOutV1() unimplemented"); +} void Platform::AndroidShowWifiSettings() { - Log("AndroidShowWifiSettings() unimplemented"); + Log(LogLevel::kError, "AndroidShowWifiSettings() unimplemented"); } void Platform::SetHardwareCursorVisible(bool visible) { @@ -1044,40 +1056,40 @@ void Platform::SetHardwareCursorVisible(bool visible) { auto Platform::QuitApp() -> void { exit(g_app->return_value); } auto Platform::OpenFileExternally(const std::string& path) -> void { - Log("OpenFileExternally() unimplemented"); + Log(LogLevel::kError, "OpenFileExternally() unimplemented"); } auto Platform::OpenDirExternally(const std::string& path) -> void { - Log("OpenDirExternally() unimplemented"); + Log(LogLevel::kError, "OpenDirExternally() unimplemented"); } auto Platform::MacMusicAppInit() -> void { - Log("MacMusicAppInit() unimplemented"); + Log(LogLevel::kError, "MacMusicAppInit() unimplemented"); } auto Platform::MacMusicAppGetVolume() -> int { - Log("MacMusicAppGetVolume() unimplemented"); + Log(LogLevel::kError, "MacMusicAppGetVolume() unimplemented"); return 0; } auto Platform::MacMusicAppSetVolume(int volume) -> void { - Log("MacMusicAppSetVolume() unimplemented"); + Log(LogLevel::kError, "MacMusicAppSetVolume() unimplemented"); } auto Platform::MacMusicAppGetLibrarySource() -> void { - Log("MacMusicAppGetLibrarySource() unimplemented"); + Log(LogLevel::kError, "MacMusicAppGetLibrarySource() unimplemented"); } auto Platform::MacMusicAppStop() -> void { - Log("MacMusicAppStop() unimplemented"); + Log(LogLevel::kError, "MacMusicAppStop() unimplemented"); } auto Platform::MacMusicAppPlayPlaylist(const std::string& playlist) -> bool { - Log("MacMusicAppPlayPlaylist() unimplemented"); + Log(LogLevel::kError, "MacMusicAppPlayPlaylist() unimplemented"); return false; } auto Platform::MacMusicAppGetPlaylists() -> std::list { - Log("MacMusicAppGetPlaylists() unimplemented"); + Log(LogLevel::kError, "MacMusicAppGetPlaylists() unimplemented"); return {}; } @@ -1181,8 +1193,8 @@ auto Platform::SetSocketNonBlocking(int sd) -> bool { #else int result = fcntl(sd, F_SETFL, O_NONBLOCK); if (result != 0) { - Log("Error setting non-blocking socket: " - + g_platform->GetSocketErrorString()); + Log(LogLevel::kError, "Error setting non-blocking socket: " + + g_platform->GetSocketErrorString()); return false; } return true; @@ -1280,7 +1292,7 @@ static void HandleSIGINT(int s) { if (g_logic) { g_logic->PushInterruptSignalCall(); } else { - Log("SigInt handler called before g_logic exists."); + Log(LogLevel::kError, "SigInt handler called before g_logic exists."); } } #endif diff --git a/src/ballistica/platform/platform.h b/src/ballistica/platform/platform.h index e1ced644..77932c2b 100644 --- a/src/ballistica/platform/platform.h +++ b/src/ballistica/platform/platform.h @@ -126,10 +126,10 @@ class Platform { #pragma mark PRINTING/LOGGING -------------------------------------------------- - // Send a message to the default platform handler. - // IMPORTANT: No Object::Refs should be created or destroyed within this call, - // or deadlock can occur. - virtual auto HandleLog(const std::string& msg) -> void; + /// Display a message to any default log for the platform (android log, etc.) + /// Note that this can be called from any thread. + virtual auto DisplayLog(const std::string& name, LogLevel level, + const std::string& msg) -> void; #pragma mark ENVIRONMENT ------------------------------------------------------- @@ -427,11 +427,10 @@ class Platform { -> void; /// Print a log message to be included in crash logs or other debug - /// mechanisms. Standard log messages (at least with to_server=true) get - /// send here as well. It can be useful to call this directly to report - /// extra details that may help in debugging, as these calls are not - /// considered 'noteworthy' or presented to the user as standard Log() - /// calls are. + /// mechanisms (example: Crashlytics). V1-cloud-log messages get forwarded + /// to here as well. It can be useful to call this directly to report extra + /// details that may help in debugging, as these calls are not considered + /// 'noteworthy' or presented to the user as standard Log() calls are. virtual auto HandleDebugLog(const std::string& msg) -> void; static auto DebugLog(const std::string& msg) -> void { diff --git a/src/ballistica/platform/sdl/sdl_app.cc b/src/ballistica/platform/sdl/sdl_app.cc index 24801293..3f28f087 100644 --- a/src/ballistica/platform/sdl/sdl_app.cc +++ b/src/ballistica/platform/sdl/sdl_app.cc @@ -43,8 +43,8 @@ void SDLApp::HandleSDLEvent(const SDL_Event& event) { g_input->PushJoystickEvent(event, js); } } else { - Log("Error: Unable to get SDL Joystick for event type " - + std::to_string(event.type)); + Log(LogLevel::kError, "Unable to get SDL Joystick for event type " + + std::to_string(event.type)); } break; } @@ -245,8 +245,8 @@ auto FilterSDLEvent(const SDL_Event* event) -> int { return true; // sdl should keep this. } } catch (const std::exception& e) { - BA_LOG_ONCE(std::string("Exception in inline SDL-Event handling: ") - + e.what()); + BA_LOG_ONCE(LogLevel::kError, + std::string("Error in inline SDL-Event handling: ") + e.what()); throw; } } @@ -369,7 +369,7 @@ void SDLApp::DoSwap() { if (g_buildconfig.debug_build()) { millisecs_t diff = GetRealTime() - swap_start_time_; if (diff > 5) { - Log("WARNING: Swap handling delay of " + std::to_string(diff)); + Log(LogLevel::kWarning, "Swap handling delay of " + std::to_string(diff)); } } @@ -514,14 +514,15 @@ void SDLApp::SDLJoystickConnected(int device_index) { // We add all existing inputs when bootstrapping is complete; we should // never be getting these before that happens. if (g_input == nullptr || g_app_flavor == nullptr || !IsBootstrapped()) { - Log("Unexpected SDLJoystickConnected early in boot sequence."); + Log(LogLevel::kError, + "Unexpected SDLJoystickConnected early in boot sequence."); return; } // Create the joystick here in the main thread and then pass it over to the - // game thread to be added to the game. + // logic thread to be added to the game. if (g_buildconfig.ostype_ios_tvos()) { - BA_LOG_ONCE("WTF GOT SDL-JOY-CONNECTED ON IOS"); + BA_LOG_ONCE(LogLevel::kError, "WTF GOT SDL-JOY-CONNECTED ON IOS"); } else { auto* j = Object::NewDeferred(device_index); if (g_buildconfig.sdl2_build() && g_buildconfig.enable_sdl_joysticks()) { @@ -566,9 +567,9 @@ void SDLApp::RemoveSDLInputDevice(int index) { if (static_cast_check_fit(sdl_joysticks_.size()) > index) { sdl_joysticks_[index] = nullptr; } else { - Log("Error: Invalid index on RemoveSDLInputDevice: size is " - + std::to_string(sdl_joysticks_.size()) + "; index is " - + std::to_string(index)); + Log(LogLevel::kError, "Invalid index on RemoveSDLInputDevice: size is " + + std::to_string(sdl_joysticks_.size()) + + "; index is " + std::to_string(index)); } g_input->PushRemoveInputDeviceCall(j, true); } diff --git a/src/ballistica/platform/stdio_console.cc b/src/ballistica/platform/stdio_console.cc index 9e7036aa..0ef6f190 100644 --- a/src/ballistica/platform/stdio_console.cc +++ b/src/ballistica/platform/stdio_console.cc @@ -77,8 +77,8 @@ auto StdioConsole::OnAppStart() -> void { } } } else { - Log("StdioConsole got non-eof error reading stdin: " - + std::to_string(ferror(stdin))); + Log(LogLevel::kError, "StdioConsole got non-eof error reading stdin: " + + std::to_string(ferror(stdin))); } break; } diff --git a/src/ballistica/platform/windows/platform_windows.cc b/src/ballistica/platform/windows/platform_windows.cc index 9269f3ad..81376aa1 100644 --- a/src/ballistica/platform/windows/platform_windows.cc +++ b/src/ballistica/platform/windows/platform_windows.cc @@ -111,7 +111,7 @@ BOOL WINAPI CtrlHandler(DWORD fdwCtrlType) { if (g_logic) { g_logic->PushInterruptSignalCall(); } else { - Log("SigInt handler called before g_logic exists."); + Log(LogLevel::kError, "SigInt handler called before g_logic exists."); } return TRUE; @@ -123,7 +123,7 @@ BOOL WINAPI CtrlHandler(DWORD fdwCtrlType) { void PlatformWindows::SetupInterruptHandling() { // Set up Ctrl-C handling. if (!SetConsoleCtrlHandler(CtrlHandler, TRUE)) { - Log("Error on SetConsoleCtrlHandler()"); + Log(LogLevel::kError, "Error on SetConsoleCtrlHandler()"); } } @@ -719,10 +719,11 @@ std::string PlatformWindows::DoGetDeviceName() { bool PlatformWindows::DoHasTouchScreen() { return false; } -void PlatformWindows::HandleLog(const std::string& msg) { +void PlatformWindows::DisplayLog(const std::string& name, LogLevel level, + const std::string& msg) { // if (have_stdin_stdout_) { // // On headless builds we use default handler (simple stdout). - // return Platform::HandleLog(msg); + // return Platform::DisplayLog(msg); // } // Also spit this out as a debug-string for when running from msvc. @@ -822,7 +823,8 @@ void PlatformWindows::DoOpenURL(const std::string& url) { // This should return > 32 on success. if (r <= 32) { - Log("Error " + std::to_string(r) + " opening URL '" + url + "'"); + Log(LogLevel::kError, + "Error " + std::to_string(r) + " opening URL '" + url + "'"); } } @@ -831,8 +833,8 @@ void PlatformWindows::OpenFileExternally(const std::string& path) { ShellExecute(nullptr, _T("open"), _T("notepad.exe"), utf8_decode(path).c_str(), nullptr, SW_SHOWNORMAL)); if (r <= 32) { - Log("Error " + std::to_string(r) + " on open_file_externally for '" + path - + "'"); + Log(LogLevel::kError, "Error " + std::to_string(r) + + " on open_file_externally for '" + path + "'"); } } @@ -841,8 +843,8 @@ void PlatformWindows::OpenDirExternally(const std::string& path) { ShellExecute(nullptr, _T("open"), _T("explorer.exe"), utf8_decode(path).c_str(), nullptr, SW_SHOWNORMAL)); if (r <= 32) { - Log("Error " + std::to_string(r) + " on open_dir_externally for '" + path - + "'"); + Log(LogLevel::kError, "Error " + std::to_string(r) + + " on open_dir_externally for '" + path + "'"); } } @@ -873,15 +875,15 @@ std::vector PlatformWindows::GetBroadcastAddrs() { pIPAddrTable = static_cast(MALLOC(dwSize)); } if (pIPAddrTable == nullptr) { - Log("Error: Memory allocation failed for GetIpAddrTable\n"); + Log(LogLevel::kError, "Memory allocation failed for GetIpAddrTable\n"); err = true; } if (!err) { // Make a second call to GetIpAddrTable to get the actual data we want if ((dwRetVal = GetIpAddrTable(pIPAddrTable, &dwSize, 0)) != NO_ERROR) { - Log("Error: GetIpAddrTable failed with error " - + std::to_string(dwRetVal)); + Log(LogLevel::kError, + "GetIpAddrTable failed with error " + std::to_string(dwRetVal)); err = true; } } @@ -916,8 +918,8 @@ bool PlatformWindows::SetSocketNonBlocking(int sd) { unsigned long dataval = 1; // NOLINT (func signature wants long) int result = ioctlsocket(sd, FIONBIO, &dataval); if (result != 0) { - Log("Error setting non-blocking socket: " - + g_platform->GetSocketErrorString()); + Log(LogLevel::kError, "Error setting non-blocking socket: " + + g_platform->GetSocketErrorString()); return false; } return true; diff --git a/src/ballistica/platform/windows/platform_windows.h b/src/ballistica/platform/windows/platform_windows.h index ba7566a5..7857aca8 100644 --- a/src/ballistica/platform/windows/platform_windows.h +++ b/src/ballistica/platform/windows/platform_windows.h @@ -32,7 +32,8 @@ class PlatformWindows : public Platform { auto GetLocale() -> std::string override; auto DoGetDeviceName() -> std::string override; auto DoHasTouchScreen() -> bool override; - void HandleLog(const std::string& msg) override; + void DisplayLog(const std::string& name, LogLevel level, + const std::string& msg) override; void SetupDataDirectory() override; void SetEnv(const std::string& name, const std::string& value) override; auto GetIsStdinATerminal() -> bool override; diff --git a/src/ballistica/python/class/python_class_activity_data.cc b/src/ballistica/python/class/python_class_activity_data.cc index b08927f9..14bd3ffc 100644 --- a/src/ballistica/python/class/python_class_activity_data.cc +++ b/src/ballistica/python/class/python_class_activity_data.cc @@ -69,7 +69,7 @@ auto PythonClassActivityData::tp_new(PyTypeObject* type, PyObject* args, if (!InLogicThread()) { throw Exception( "ERROR: " + std::string(type_obj.tp_name) - + " objects must only be created in the game thread (current is (" + + " objects must only be created in the logic thread (current is (" + GetCurrentThreadName() + ")."); } self->host_activity_ = new Object::WeakRef(); @@ -81,7 +81,7 @@ auto PythonClassActivityData::tp_new(PyTypeObject* type, PyObject* args, void PythonClassActivityData::tp_dealloc(PythonClassActivityData* self) { BA_PYTHON_TRY; - // These have to be destructed in the game thread; send them along to + // These have to be destructed in the logic thread; send them along to // it if need be; otherwise do it immediately. if (!InLogicThread()) { Object::WeakRef* h = self->host_activity_; diff --git a/src/ballistica/python/class/python_class_collide_model.cc b/src/ballistica/python/class/python_class_collide_model.cc index 6616aadc..086c3b35 100644 --- a/src/ballistica/python/class/python_class_collide_model.cc +++ b/src/ballistica/python/class/python_class_collide_model.cc @@ -71,7 +71,7 @@ auto PythonClassCollideModel::tp_new(PyTypeObject* type, PyObject* args, if (!InLogicThread()) { throw Exception( "ERROR: " + std::string(type_obj.tp_name) - + " objects must only be created in the game thread (current is (" + + " objects must only be created in the logic thread (current is (" + GetCurrentThreadName() + ")."); } @@ -101,7 +101,7 @@ void PythonClassCollideModel::Delete(Object::Ref* ref) { void PythonClassCollideModel::tp_dealloc(PythonClassCollideModel* self) { BA_PYTHON_TRY; - // these have to be deleted in the game thread - send the ptr along if need + // these have to be deleted in the logic thread - send the ptr along if need // be; otherwise do it immediately if (!InLogicThread()) { Object::Ref* c = self->collide_model_; diff --git a/src/ballistica/python/class/python_class_context.cc b/src/ballistica/python/class/python_class_context.cc index 2b4c52ab..21915540 100644 --- a/src/ballistica/python/class/python_class_context.cc +++ b/src/ballistica/python/class/python_class_context.cc @@ -136,7 +136,7 @@ auto PythonClassContext::tp_new(PyTypeObject* type, PyObject* args, if (!InLogicThread()) { throw Exception( "ERROR: " + std::string(type_obj.tp_name) - + " objects must only be created in the game thread (current is (" + + " objects must only be created in the logic thread (current is (" + GetCurrentThreadName() + ")."); } @@ -147,7 +147,8 @@ auto PythonClassContext::tp_new(PyTypeObject* type, PyObject* args, if (source == "ui") { cs = Context(g_logic->GetUIContextTarget()); } else if (source == "UI") { - BA_LOG_ONCE("'UI' context-target option is deprecated; please use 'ui'"); + BA_LOG_ONCE(LogLevel::kError, + "'UI' context-target option is deprecated; please use 'ui'"); Python::PrintStackTrace(); cs = Context(g_logic->GetUIContextTarget()); } else if (source == "current") { @@ -183,7 +184,7 @@ auto PythonClassContext::tp_new(PyTypeObject* type, PyObject* args, void PythonClassContext::tp_dealloc(PythonClassContext* self) { BA_PYTHON_TRY; - // Contexts have to be deleted in the game thread; + // Contexts have to be deleted in the logic thread; // ship them to it for deletion if need be; otherwise do it immediately. if (!InLogicThread()) { Context* c = self->context_; diff --git a/src/ballistica/python/class/python_class_context_call.cc b/src/ballistica/python/class/python_class_context_call.cc index 2aa433dc..81cfd2cb 100644 --- a/src/ballistica/python/class/python_class_context_call.cc +++ b/src/ballistica/python/class/python_class_context_call.cc @@ -103,7 +103,7 @@ auto PythonClassContextCall::tp_new(PyTypeObject* type, PyObject* args, if (!InLogicThread()) { throw Exception( "ERROR: " + std::string(type_obj.tp_name) - + " objects must only be created in the game thread (current is (" + + " objects must only be created in the logic thread (current is (" + GetCurrentThreadName() + ")."); } self->context_call_ = new Object::Ref( @@ -115,7 +115,7 @@ auto PythonClassContextCall::tp_new(PyTypeObject* type, PyObject* args, void PythonClassContextCall::tp_dealloc(PythonClassContextCall* self) { BA_PYTHON_TRY; - // these have to be deleted in the game thread - send the ptr along if need + // these have to be deleted in the logic thread - send the ptr along if need // be; otherwise do it immediately if (!InLogicThread()) { Object::Ref* c = self->context_call_; diff --git a/src/ballistica/python/class/python_class_data.cc b/src/ballistica/python/class/python_class_data.cc index 4f6584dc..eaebd5f9 100644 --- a/src/ballistica/python/class/python_class_data.cc +++ b/src/ballistica/python/class/python_class_data.cc @@ -68,7 +68,7 @@ auto PythonClassData::tp_new(PyTypeObject* type, PyObject* args, PyObject* kwds) if (!InLogicThread()) { throw Exception( "ERROR: " + std::string(type_obj.tp_name) - + " objects must only be created in the game thread (current is (" + + " objects must only be created in the logic thread (current is (" + GetCurrentThreadName() + ")."); } @@ -98,7 +98,7 @@ void PythonClassData::Delete(Object::Ref* ref) { void PythonClassData::tp_dealloc(PythonClassData* self) { BA_PYTHON_TRY; - // these have to be deleted in the game thread - send the ptr along if need + // these have to be deleted in the logic thread - send the ptr along if need // be; otherwise do it immediately if (!InLogicThread()) { Object::Ref* s = self->data_; diff --git a/src/ballistica/python/class/python_class_input_device.cc b/src/ballistica/python/class/python_class_input_device.cc index d9b6ecd6..8f262fe3 100644 --- a/src/ballistica/python/class/python_class_input_device.cc +++ b/src/ballistica/python/class/python_class_input_device.cc @@ -126,7 +126,7 @@ auto PythonClassInputDevice::tp_new(PyTypeObject* type, PyObject* args, if (!InLogicThread()) { throw Exception( "ERROR: " + std::string(type_obj.tp_name) - + " objects must only be created in the game thread (current is (" + + " objects must only be created in the logic thread (current is (" + GetCurrentThreadName() + ")."); } self->input_device_ = new Object::WeakRef(); @@ -137,7 +137,7 @@ auto PythonClassInputDevice::tp_new(PyTypeObject* type, PyObject* args, void PythonClassInputDevice::tp_dealloc(PythonClassInputDevice* self) { BA_PYTHON_TRY; - // These have to be destructed in the game thread - send them along to it if + // These have to be destructed in the logic thread - send them along to it if // need be. // FIXME: Technically the main thread has a pointer to a dead PyObject // until the delete goes through; could that ever be a problem? @@ -391,7 +391,8 @@ auto PythonClassInputDevice::GetButtonName(PythonClassInputDevice* self, PythonRef results = g_python->obj(Python::ObjID::kLstrFromJsonCall).Call(args2); if (!results.exists()) { - Log("Error creating Lstr from raw button name: '" + bname + "'"); + Log(LogLevel::kError, + "Error creating Lstr from raw button name: '" + bname + "'"); PythonRef args3(Py_BuildValue("(s)", "?"), PythonRef::kSteal); results = g_python->obj(Python::ObjID::kLstrFromJsonCall).Call(args3); } diff --git a/src/ballistica/python/class/python_class_material.cc b/src/ballistica/python/class/python_class_material.cc index c1a049ad..a1c6cfe1 100644 --- a/src/ballistica/python/class/python_class_material.cc +++ b/src/ballistica/python/class/python_class_material.cc @@ -92,7 +92,7 @@ auto PythonClassMaterial::tp_new(PyTypeObject* type, PyObject* args, if (!InLogicThread()) { throw Exception( "ERROR: " + std::string(type_obj.tp_name) - + " objects must only be created in the game thread (current is (" + + " objects must only be created in the logic thread (current is (" + GetCurrentThreadName() + ")."); } PyObject* name_obj = Py_None; @@ -144,7 +144,7 @@ void PythonClassMaterial::Delete(Object::Ref* m) { void PythonClassMaterial::tp_dealloc(PythonClassMaterial* self) { BA_PYTHON_TRY; - // These have to be deleted in the game thread - push a call if + // These have to be deleted in the logic thread - push a call if // need be.. otherwise do it immediately. if (!InLogicThread()) { Object::Ref* ptr = self->material_; diff --git a/src/ballistica/python/class/python_class_model.cc b/src/ballistica/python/class/python_class_model.cc index 7e0d637d..6da13d4e 100644 --- a/src/ballistica/python/class/python_class_model.cc +++ b/src/ballistica/python/class/python_class_model.cc @@ -69,7 +69,7 @@ auto PythonClassModel::tp_new(PyTypeObject* type, PyObject* args, if (!InLogicThread()) { throw Exception( "ERROR: " + std::string(type_obj.tp_name) - + " objects must only be created in the game thread (current is (" + + " objects must only be created in the logic thread (current is (" + GetCurrentThreadName() + ")."); } if (!s_create_empty_) { @@ -99,7 +99,7 @@ void PythonClassModel::Delete(Object::Ref* ref) { void PythonClassModel::tp_dealloc(PythonClassModel* self) { BA_PYTHON_TRY; - // these have to be deleted in the game thread - send the ptr along if need + // these have to be deleted in the logic thread - send the ptr along if need // be; otherwise do it immediately if (!InLogicThread()) { Object::Ref* m = self->model_; diff --git a/src/ballistica/python/class/python_class_node.cc b/src/ballistica/python/class/python_class_node.cc index ef4b67ed..e8a31a32 100644 --- a/src/ballistica/python/class/python_class_node.cc +++ b/src/ballistica/python/class/python_class_node.cc @@ -87,7 +87,7 @@ auto PythonClassNode::tp_new(PyTypeObject* type, PyObject* args, if (!InLogicThread()) { throw Exception( "ERROR: " + std::string(type_obj.tp_name) - + " objects must only be created in the game thread (current is (" + + " objects must only be created in the logic thread (current is (" + GetCurrentThreadName() + ")."); } // Clion incorrectly things s_create_empty will always be false. @@ -110,7 +110,7 @@ auto PythonClassNode::tp_new(PyTypeObject* type, PyObject* args, void PythonClassNode::tp_dealloc(PythonClassNode* self) { BA_PYTHON_TRY; - // These have to be deleted in the game thread; send the ptr along if need + // These have to be deleted in the logic thread; send the ptr along if need // be; otherwise do it immediately. if (!InLogicThread()) { Object::WeakRef* n = self->node_; diff --git a/src/ballistica/python/class/python_class_session_data.cc b/src/ballistica/python/class/python_class_session_data.cc index db534145..1dc4c396 100644 --- a/src/ballistica/python/class/python_class_session_data.cc +++ b/src/ballistica/python/class/python_class_session_data.cc @@ -66,7 +66,7 @@ auto PythonClassSessionData::tp_new(PyTypeObject* type, PyObject* args, if (!InLogicThread()) { throw Exception( "ERROR: " + std::string(type_obj.tp_name) - + " objects must only be created in the game thread (current is (" + + " objects must only be created in the logic thread (current is (" + GetCurrentThreadName() + ")."); } self->session_ = new Object::WeakRef(); @@ -77,7 +77,7 @@ auto PythonClassSessionData::tp_new(PyTypeObject* type, PyObject* args, void PythonClassSessionData::tp_dealloc(PythonClassSessionData* self) { BA_PYTHON_TRY; - // These have to be deleted in the game thread; + // These have to be deleted in the logic thread; // ...send the ptr along if need be. // FIXME: technically the main thread has a pointer to a dead PyObject // until the delete goes through; could that ever be a problem? diff --git a/src/ballistica/python/class/python_class_session_player.cc b/src/ballistica/python/class/python_class_session_player.cc index 9e92af8f..66f6f36d 100644 --- a/src/ballistica/python/class/python_class_session_player.cc +++ b/src/ballistica/python/class/python_class_session_player.cc @@ -157,7 +157,7 @@ auto PythonClassSessionPlayer::tp_new(PyTypeObject* type, PyObject* args, if (!InLogicThread()) { throw Exception( "ERROR: " + std::string(type_obj.tp_name) - + " objects must only be created in the game thread (current is (" + + " objects must only be created in the logic thread (current is (" + GetCurrentThreadName() + ")."); } @@ -184,7 +184,7 @@ auto PythonClassSessionPlayer::tp_new(PyTypeObject* type, PyObject* args, void PythonClassSessionPlayer::tp_dealloc(PythonClassSessionPlayer* self) { BA_PYTHON_TRY; - // These have to be deleted in the game thread - send the ptr along if need + // These have to be deleted in the logic thread - send the ptr along if need // be; otherwise do it immediately. if (!InLogicThread()) { Object::WeakRef* p = self->player_; @@ -258,8 +258,9 @@ auto PythonClassSessionPlayer::tp_getattro(PythonClassSessionPlayer* self, throw Exception(PyExcType::kSessionPlayerNotFound); } if (!p->has_py_data()) { - BA_LOG_ONCE("Error: Calling getAttr for player attr '" + std::string(s) - + "' without data set."); + BA_LOG_ONCE(LogLevel::kError, "Calling getAttr for player attr '" + + std::string(s) + + "' without data set."); } PyObject* obj = p->GetPyCharacter(); Py_INCREF(obj); @@ -270,8 +271,9 @@ auto PythonClassSessionPlayer::tp_getattro(PythonClassSessionPlayer* self, throw Exception(PyExcType::kSessionPlayerNotFound); } if (!p->has_py_data()) { - BA_LOG_ONCE("Error: Calling getAttr for player attr '" + std::string(s) - + "' without data set."); + BA_LOG_ONCE(LogLevel::kError, "Calling getAttr for player attr '" + + std::string(s) + + "' without data set."); } PyObject* obj = p->GetPyColor(); Py_INCREF(obj); @@ -282,8 +284,9 @@ auto PythonClassSessionPlayer::tp_getattro(PythonClassSessionPlayer* self, throw Exception(PyExcType::kSessionPlayerNotFound); } if (!p->has_py_data()) { - BA_LOG_ONCE("Error: Calling getAttr for player attr '" + std::string(s) - + "' without data set."); + BA_LOG_ONCE(LogLevel::kError, "Calling getAttr for player attr '" + + std::string(s) + + "' without data set."); } PyObject* obj = p->GetPyHighlight(); Py_INCREF(obj); @@ -294,8 +297,9 @@ auto PythonClassSessionPlayer::tp_getattro(PythonClassSessionPlayer* self, throw Exception(PyExcType::kSessionPlayerNotFound); } if (!p->has_py_data()) { - BA_LOG_ONCE("Error: Calling getAttr for player attr '" + std::string(s) - + "' without data set."); + BA_LOG_ONCE(LogLevel::kError, "Calling getAttr for player attr '" + + std::string(s) + + "' without data set."); } PyObject* obj = p->GetPyActivityPlayer(); Py_INCREF(obj); diff --git a/src/ballistica/python/class/python_class_sound.cc b/src/ballistica/python/class/python_class_sound.cc index 59491749..6a76d646 100644 --- a/src/ballistica/python/class/python_class_sound.cc +++ b/src/ballistica/python/class/python_class_sound.cc @@ -68,7 +68,7 @@ auto PythonClassSound::tp_new(PyTypeObject* type, PyObject* args, if (!InLogicThread()) { throw Exception( "ERROR: " + std::string(type_obj.tp_name) - + " objects must only be created in the game thread (current is (" + + " objects must only be created in the logic thread (current is (" + GetCurrentThreadName() + ")."); } if (!s_create_empty_) { @@ -98,7 +98,7 @@ void PythonClassSound::Delete(Object::Ref* ref) { void PythonClassSound::tp_dealloc(PythonClassSound* self) { BA_PYTHON_TRY; - // these have to be deleted in the game thread - send the ptr along if need + // these have to be deleted in the logic thread - send the ptr along if need // be; otherwise do it immediately if (!InLogicThread()) { Object::Ref* s = self->sound_; diff --git a/src/ballistica/python/class/python_class_texture.cc b/src/ballistica/python/class/python_class_texture.cc index 33d13cd4..adb4b4b5 100644 --- a/src/ballistica/python/class/python_class_texture.cc +++ b/src/ballistica/python/class/python_class_texture.cc @@ -63,7 +63,7 @@ auto PythonClassTexture::tp_new(PyTypeObject* type, PyObject* args, if (!InLogicThread()) { throw Exception( "ERROR: " + std::string(type_obj.tp_name) - + " objects must only be created in the game thread (current is (" + + " objects must only be created in the logic thread (current is (" + GetCurrentThreadName() + ")."); } if (!s_create_empty_) { @@ -91,7 +91,7 @@ void PythonClassTexture::Delete(Object::Ref* ref) { void PythonClassTexture::tp_dealloc(PythonClassTexture* self) { BA_PYTHON_TRY; - // These have to be deleted in the game thread - send the ptr along if need + // These have to be deleted in the logic thread - send the ptr along if need // be; otherwise do it immediately. if (!InLogicThread()) { Object::Ref* t = self->texture_; diff --git a/src/ballistica/python/class/python_class_timer.cc b/src/ballistica/python/class/python_class_timer.cc index ac553819..1895f793 100644 --- a/src/ballistica/python/class/python_class_timer.cc +++ b/src/ballistica/python/class/python_class_timer.cc @@ -76,7 +76,7 @@ auto PythonClassTimer::tp_new(PyTypeObject* type, PyObject* args, if (!InLogicThread()) { throw Exception( "ERROR: " + std::string(type_obj.tp_name) - + " objects must only be created in the game thread (current is (" + + " objects must only be created in the logic thread (current is (" + GetCurrentThreadName() + ")."); } @@ -161,7 +161,7 @@ void PythonClassTimer::DoDelete(bool have_timer, TimeType time_type, void PythonClassTimer::tp_dealloc(PythonClassTimer* self) { BA_PYTHON_TRY; - // These have to be deleted in the game thread. + // These have to be deleted in the logic thread. if (!InLogicThread()) { auto a0 = self->have_timer_; auto a1 = self->time_type_; diff --git a/src/ballistica/python/class/python_class_widget.cc b/src/ballistica/python/class/python_class_widget.cc index 8ebf2b39..684fa4c1 100644 --- a/src/ballistica/python/class/python_class_widget.cc +++ b/src/ballistica/python/class/python_class_widget.cc @@ -78,7 +78,7 @@ auto PythonClassWidget::tp_new(PyTypeObject* type, PyObject* args, if (!InLogicThread()) { throw Exception( "ERROR: " + std::string(type_obj.tp_name) - + " objects must only be created in the game thread (current is (" + + " objects must only be created in the logic thread (current is (" + GetCurrentThreadName() + ")."); } self->widget_ = new Object::WeakRef(); @@ -89,7 +89,7 @@ auto PythonClassWidget::tp_new(PyTypeObject* type, PyObject* args, void PythonClassWidget::tp_dealloc(PythonClassWidget* self) { BA_PYTHON_TRY; - // these have to be destructed in the game thread - send them along to it if + // these have to be destructed in the logic thread - send them along to it if // need be if (!InLogicThread()) { Object::WeakRef* w = self->widget_; @@ -222,7 +222,7 @@ auto PythonClassWidget::Delete(PythonClassWidget* self, PyObject* args, if (p) { p->DeleteWidget(w); } else { - Log("Error: Can't delete widget: no parent."); + Log(LogLevel::kError, "Can't delete widget: no parent."); } } Py_RETURN_NONE; diff --git a/src/ballistica/python/methods/python_methods_app.cc b/src/ballistica/python/methods/python_methods_app.cc index d8a7fc6f..44f2e45b 100644 --- a/src/ballistica/python/methods/python_methods_app.cc +++ b/src/ballistica/python/methods/python_methods_app.cc @@ -197,7 +197,7 @@ auto PyGetForegroundHostSession(PyObject* self, PyObject* args, return nullptr; } - // Note: we return None if not in the game thread. + // Note: we return None if not in the logic thread. HostSession* s = InLogicThread() ? g_logic->GetForegroundContext().GetHostSession() : nullptr; @@ -259,7 +259,7 @@ auto PyGetActivity(PyObject* self, PyObject* args, PyObject* keywds) return nullptr; } - // Fail gracefully if called from outside the game thread. + // Fail gracefully if called from outside the logic thread. if (!InLogicThread()) { Py_RETURN_NONE; } @@ -292,7 +292,7 @@ auto PyPushCall(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { // The from-other-thread case is basically a different call. if (from_other_thread) { - // Warn the user not to use this from the game thread since it doesnt + // Warn the user not to use this from the logic thread since it doesnt // save/restore context. if (!suppress_warning && InLogicThread()) { g_python->IssueCallInLogicThreadWarning(call_obj); @@ -301,7 +301,7 @@ auto PyPushCall(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { // This gets called from other python threads so we can't construct // Objects and things here or we'll trip our thread-checks. Instead we // just increment the python object's refcount and pass it along raw; - // the game thread decrements it on the other end. + // the logic thread decrements it on the other end. Py_INCREF(call_obj); g_logic->PushPythonRawCallable(call_obj); } else { @@ -461,7 +461,7 @@ auto PyScreenMessage(PyObject* self, PyObject* args, PyObject* keywds) return nullptr; } if (log) { - Log(message); + Log(LogLevel::kInfo, message); } // Transient messages get sent to clients as high-level messages instead of @@ -552,7 +552,7 @@ auto PyScreenMessage(PyObject* self, PyObject* args, PyObject* keywds) tint_color.x, tint_color.y, tint_color.z, tint2_color.x, tint2_color.y, tint2_color.z); } else { - Log("Error: unhandled screenmessage output_stream case"); + Log(LogLevel::kError, "Unhandled screenmessage output_stream case."); } } @@ -581,7 +581,7 @@ auto PyQuit(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { if (g_buildconfig.ostype_ios_tvos()) { // This should never be called on iOS - Log("Error: Quit called."); + Log(LogLevel::kError, "Quit called."); } bool handled = false; @@ -628,7 +628,7 @@ auto PyBless(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { auto PyApplyConfig(PyObject* self, PyObject* args) -> PyObject* { BA_PYTHON_TRY; - // Hmm; python runs in the game thread; technically we could just run + // Hmm; python runs in the logic thread; technically we could just run // ApplyConfig() immediately (though pushing is probably safer). g_logic->PushApplyConfigCall(); Py_RETURN_NONE; @@ -807,42 +807,53 @@ auto PySetStressTesting(PyObject* self, PyObject* args) -> PyObject* { BA_PYTHON_CATCH; } -auto PyPrintStdout(PyObject* self, PyObject* args) -> PyObject* { +auto PyDisplayLog(PyObject* self, PyObject* args, PyObject* keywds) + -> PyObject* { BA_PYTHON_TRY; - const char* s; - if (!PyArg_ParseTuple(args, "s", &s)) { + static const char* kwlist[] = {"name", "level", "message", nullptr}; + const char* name; + const char* levelstr; + const char* message; + if (!PyArg_ParseTupleAndKeywords(args, keywds, "sss", + const_cast(kwlist), &name, &levelstr, + &message)) { return nullptr; } - Logging::PrintStdout(s); + + // Calc LogLevel enum val from their string val. + LogLevel level; + if (levelstr == std::string("DEBUG")) { + level = LogLevel::kDebug; + } else if (levelstr == std::string("INFO")) { + level = LogLevel::kInfo; + } else if (levelstr == std::string("WARNING")) { + level = LogLevel::kWarning; + } else if (levelstr == std::string("ERROR")) { + level = LogLevel::kError; + } else if (levelstr == std::string("CRITICAL")) { + level = LogLevel::kCritical; + } else { + // Assume we should avoid Log() calls here since it could infinite loop. + fprintf(stderr, "Invalid log level to display_log(): %s\n", levelstr); + level = LogLevel::kInfo; + } + Logging::DisplayLog(name, level, message); + Py_RETURN_NONE; BA_PYTHON_CATCH; } -auto PyPrintStderr(PyObject* self, PyObject* args) -> PyObject* { +auto PyV1CloudLog(PyObject* self, PyObject* args, PyObject* keywds) + -> PyObject* { BA_PYTHON_TRY; - const char* s; - if (!PyArg_ParseTuple(args, "s", &s)) { + const char* message; + static const char* kwlist[] = {"message", nullptr}; + if (!PyArg_ParseTupleAndKeywords(args, keywds, "s", + const_cast(kwlist), &message)) { return nullptr; } - Logging::PrintStderr(s); - Py_RETURN_NONE; - BA_PYTHON_CATCH; -} + Logging::V1CloudLog(message); -auto PyLog(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { - BA_PYTHON_TRY; - static const char* kwlist[] = {"message", "to_stdout", "to_server", nullptr}; - int to_server = 1; - int to_stdout = 1; - std::string message; - PyObject* message_obj; - if (!PyArg_ParseTupleAndKeywords(args, keywds, "O|pp", - const_cast(kwlist), &message_obj, - &to_stdout, &to_server)) { - return nullptr; - } - message = Python::GetPyString(message_obj); - Log(message, static_cast(to_stdout), static_cast(to_server)); Py_RETURN_NONE; BA_PYTHON_CATCH; } @@ -900,39 +911,22 @@ auto PythonMethodsApp::GetMethods() -> std::vector { "(for helping with the transition from milliseconds-based time calls\n" "to seconds-based ones)"}, - {"log", (PyCFunction)PyLog, METH_VARARGS | METH_KEYWORDS, - "log(message: str, to_stdout: bool = True,\n" - " to_server: bool = True) -> None\n" - "\n" - "Category: **General Utility Functions**\n" - "\n" - "Log a message. This goes to the default logging mechanism depending\n" - "on the platform (stdout on mac, android log on android, etc).\n" - "\n" - "Log messages also go to the in-game console unless 'to_console'\n" - "is False. They are also sent to the master-server for use in " - "analyzing\n" - "issues unless to_server is False.\n" - "\n" - "Python's standard print() is wired to call this (with default " - "values)\n" - "so in most cases you can just use that."}, - - {"print_stdout", PyPrintStdout, METH_VARARGS, - "print_stdout(message: str) -> None\n" - "\n" - "(internal)" - "\n" - "Print to system stdout.\n" - "Also forwards to the internal console, etc."}, - - {"print_stderr", PyPrintStderr, METH_VARARGS, - "print_stderr(message: str) -> None\n" + {"display_log", (PyCFunction)PyDisplayLog, METH_VARARGS | METH_KEYWORDS, + "display_log(name: str, level: str, message: str) -> None\n" "\n" "(internal)\n" "\n" - "Print to system stderr.\n" - "Also forwards to the internal console, etc."}, + "Sends a log message to the in-game console and any per-platform\n" + "log destinations (Android log, etc.). This generally is not called\n" + "directly and should instead be fed Python logging output."}, + + {"v1_cloud_log", (PyCFunction)PyV1CloudLog, + METH_VARARGS | METH_KEYWORDS, + "v1_cloud_log(message: str) -> None\n" + "\n" + "(internal)\n" + "\n" + "Push messages to the old v1 cloud log."}, {"set_stress_testing", PySetStressTesting, METH_VARARGS, "set_stress_testing(testing: bool, player_count: int) -> None\n" @@ -1120,13 +1114,13 @@ auto PythonMethodsApp::GetMethods() -> std::vector { "This can be handy for calls that are disallowed from within other\n" "callbacks, etc.\n" "\n" - "This call expects to be used in the game thread, and will " + "This call expects to be used in the logic thread, and will " "automatically\n" "save and restore the ba.Context to behave seamlessly.\n" "\n" - "If you want to push a call from outside of the game thread,\n" + "If you want to push a call from outside of the logic thread,\n" "however, you can pass 'from_other_thread' as True. In this case\n" - "the call will always run in the UI context on the game thread."}, + "the call will always run in the UI context on the logic thread."}, {"getactivity", (PyCFunction)PyGetActivity, METH_VARARGS | METH_KEYWORDS, diff --git a/src/ballistica/python/methods/python_methods_gameplay.cc b/src/ballistica/python/methods/python_methods_gameplay.cc index 4ba23115..fdc0a550 100644 --- a/src/ballistica/python/methods/python_methods_gameplay.cc +++ b/src/ballistica/python/methods/python_methods_gameplay.cc @@ -57,7 +57,7 @@ auto PyPrintNodes(PyObject* self, PyObject* args) -> PyObject* { snprintf(buffer, sizeof(buffer), "#%d: type: %-14s desc: %s", count, i->type()->name().c_str(), i->label().c_str()); s += buffer; - Log(buffer); + Log(LogLevel::kInfo, buffer); count++; } Py_RETURN_NONE; @@ -381,7 +381,7 @@ auto PyGetForegroundHostActivity(PyObject* self, PyObject* args, return nullptr; } - // Note: we return None if not in the game thread. + // Note: we return None if not in the logic thread. HostActivity* h = InLogicThread() ? g_logic->GetForegroundContext().GetHostActivity() : nullptr; diff --git a/src/ballistica/python/methods/python_methods_networking.cc b/src/ballistica/python/methods/python_methods_networking.cc index 27eb5a2d..6c5a4d6e 100644 --- a/src/ballistica/python/methods/python_methods_networking.cc +++ b/src/ballistica/python/methods/python_methods_networking.cc @@ -324,8 +324,8 @@ auto PySetMasterServerSource(PyObject* self, PyObject* args) -> PyObject* { int source; if (!PyArg_ParseTuple(args, "i", &source)) return nullptr; if (source != 0 && source != 1) { - BA_LOG_ONCE("Error: Invalid server source: " + std::to_string(source) - + "."); + BA_LOG_ONCE(LogLevel::kError, + "Invalid server source: " + std::to_string(source) + "."); source = 1; } g_app->master_server_source = source; diff --git a/src/ballistica/python/methods/python_methods_system.cc b/src/ballistica/python/methods/python_methods_system.cc index 7b593c8f..1cb80409 100644 --- a/src/ballistica/python/methods/python_methods_system.cc +++ b/src/ballistica/python/methods/python_methods_system.cc @@ -79,7 +79,7 @@ auto PySetUpSigInt(PyObject* self) -> PyObject* { if (g_app_flavor) { g_platform->SetupInterruptHandling(); } else { - Log("SigInt handler called before g_app_flavor exists."); + Log(LogLevel::kError, "SigInt handler called before g_app_flavor exists."); } Py_RETURN_NONE; BA_PYTHON_CATCH; @@ -354,7 +354,7 @@ auto PyPrintContext(PyObject* self, PyObject* args, PyObject* keywds) const_cast(kwlist))) { return nullptr; } - Python::LogContextAuto(); + Python::PrintContextAuto(); Py_RETURN_NONE; BA_PYTHON_CATCH; } @@ -521,19 +521,20 @@ auto PyGetVolatileDataDirectory(PyObject* self, PyObject* args) -> PyObject* { auto PyIsLogFull(PyObject* self, PyObject* args) -> PyObject* { BA_PYTHON_TRY; - if (g_app->log_full) { + if (g_app->v1_cloud_log_full) { Py_RETURN_TRUE; } Py_RETURN_FALSE; BA_PYTHON_CATCH; } -auto PyGetLog(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { +auto PyGetV1CloudLog(PyObject* self, PyObject* args, PyObject* keywds) + -> PyObject* { BA_PYTHON_TRY; std::string log_fin; { - std::scoped_lock lock(g_app->log_mutex); - log_fin = g_app->log; + std::scoped_lock lock(g_app->v1_cloud_log_mutex); + log_fin = g_app->v1_cloud_log; } // we want to use something with error handling here since the last // bit of this string could be truncated utf8 chars.. @@ -545,8 +546,8 @@ auto PyGetLog(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { auto PyMarkLogSent(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { BA_PYTHON_TRY; - // this way we won't try to send it at shutdown time and whatnot - g_app->put_log = true; + // This way we won't try to send it at shutdown time and whatnot + g_app->did_put_v1_cloud_log = true; Py_RETURN_NONE; BA_PYTHON_CATCH; } @@ -902,8 +903,9 @@ auto PythonMethodsSystem::GetMethods() -> std::vector { "\n" "(internal)"}, - {"getlog", (PyCFunction)PyGetLog, METH_VARARGS | METH_KEYWORDS, - "getlog() -> str\n" + {"get_v1_cloud_log", (PyCFunction)PyGetV1CloudLog, + METH_VARARGS | METH_KEYWORDS, + "get_v1_cloud_log() -> str\n" "\n" "(internal)"}, @@ -912,8 +914,8 @@ auto PythonMethodsSystem::GetMethods() -> std::vector { "\n" "(internal)"}, - {"get_log_file_path", PyGetLogFilePath, METH_VARARGS, - "get_log_file_path() -> str\n" + {"get_v1_cloud_log_file_path", PyGetLogFilePath, METH_VARARGS, + "get_v1_cloud_log_file_path() -> str\n" "\n" "(internal)\n" "\n" @@ -1055,7 +1057,7 @@ auto PythonMethodsSystem::GetMethods() -> std::vector { "\n" "(internal)\n" "\n" - "Returns whether or not the current thread is the game thread."}, + "Returns whether or not the current thread is the logic thread."}, {"request_permission", (PyCFunction)PyRequestPermission, METH_VARARGS | METH_KEYWORDS, diff --git a/src/ballistica/python/python.cc b/src/ballistica/python/python.cc index ae8d285f..3be6a998 100644 --- a/src/ballistica/python/python.cc +++ b/src/ballistica/python/python.cc @@ -68,6 +68,46 @@ namespace ballistica { #pragma ide diagnostic ignored "hicpp-signed-bitwise" #pragma ide diagnostic ignored "RedundantCast" +auto Python::LoggingCall(LogLevel loglevel, const std::string& msg) -> void { + // If we've not yet captured our Python logging calls, stash this call away. + // We'll submit all accumulated entries after we bootstrap python. + if (!objexists(ObjID::kLoggingCriticalCall)) { + std::scoped_lock lock(early_log_lock_); + early_logs_.emplace_back(std::make_pair(loglevel, msg)); + return; + } + + // Ok; seems we've got Python calls. Run the right one for our log level. + ObjID logcallobj; + switch (loglevel) { + case LogLevel::kDebug: + logcallobj = Python::ObjID::kLoggingDebugCall; + break; + case LogLevel::kInfo: + logcallobj = Python::ObjID::kLoggingInfoCall; + break; + case LogLevel::kWarning: + logcallobj = Python::ObjID::kLoggingWarningCall; + break; + case LogLevel::kError: + logcallobj = Python::ObjID::kLoggingErrorCall; + break; + case LogLevel::kCritical: + logcallobj = Python::ObjID::kLoggingCriticalCall; + break; + default: + logcallobj = Python::ObjID::kLoggingInfoCall; + fprintf(stderr, "Unexpected LogLevel %d\n", static_cast(loglevel)); + break; + } + + // Make sure we're good to go from any thread. + ScopedInterpreterLock lock; + + PythonRef args(Py_BuildValue("(s)", msg.c_str()), PythonRef::kSteal); + obj(logcallobj).Call(args); +} + void Python::SetPythonException(const Exception& exc) { PyExcType exctype{exc.python_type()}; const char* description{GetShortExceptionDescription(exc)}; @@ -130,7 +170,8 @@ void Python::PrintStackTrace() { if (g_python->objexists(objid)) { g_python->obj(objid).Call(); } else { - Log("Warning: Python::PrintStackTrace() called before bootstrap complete; " + Log(LogLevel::kWarning, + "Python::PrintStackTrace() called before bootstrap complete; " "not printing."); } } @@ -1042,6 +1083,16 @@ auto Python::InitBallisticaPython() -> void { // Import and grab all the Python stuff we use from C++. #include "ballistica/generated/python_embedded/binding.inc" + // If we've got any early log calls, it is now safe to push them along + // to Python. + assert(objexists(ObjID::kLoggingCriticalCall)); + { + std::scoped_lock lock(early_log_lock_); + for (auto&& entry : early_logs_) { + LoggingCall(entry.first, "DEFERRED-EARLY-LOG: " + entry.second); + } + early_logs_.clear(); + } g_app_internal->PythonPostInit(); // Alright I guess let's pull ba in to main, since pretty @@ -1187,14 +1238,15 @@ auto Python::GetResource(const char* key, const char* fallback_resource, try { return GetPyString(results.get()); } catch (const std::exception&) { - Log("GetResource failed for '" + std::string(key) + "'"); + Log(LogLevel::kError, + "GetResource failed for '" + std::string(key) + "'"); // Hmm; I guess let's just return the key to help identify/fix the // issue?.. return std::string(""; } } else { - Log("GetResource failed for '" + std::string(key) + "'"); + Log(LogLevel::kError, "GetResource failed for '" + std::string(key) + "'"); } // Hmm; I guess let's just return the key to help identify/fix the issue?.. @@ -1212,11 +1264,13 @@ auto Python::GetTranslation(const char* category, const char* s) try { return GetPyString(results.get()); } catch (const std::exception&) { - Log("GetTranslation failed for '" + std::string(category) + "'"); + Log(LogLevel::kError, + "GetTranslation failed for '" + std::string(category) + "'"); return ""; } } else { - Log("GetTranslation failed for category '" + std::string(category) + "'"); + Log(LogLevel::kError, + "GetTranslation failed for category '" + std::string(category) + "'"); } return ""; } @@ -1228,7 +1282,7 @@ void Python::RunDeepLink(const std::string& url) { PythonRef args(Py_BuildValue("(s)", url.c_str()), PythonRef::kSteal); obj(ObjID::kDeepLinkCall).Call(args); } else { - Log("Error on deep-link call"); + Log(LogLevel::kError, "Error on deep-link call"); } } @@ -1253,7 +1307,7 @@ void Python::ShowURL(const std::string& url) { PythonRef args(Py_BuildValue("(s)", url.c_str()), PythonRef::kSteal); obj(ObjID::kShowURLWindowCall).Call(args); } else { - Log("Error: ShowURLWindowCall nonexistent."); + Log(LogLevel::kError, "ShowURLWindowCall nonexistent."); } } @@ -1296,7 +1350,8 @@ auto Python::FilterChatMessage(std::string* message, int client_id) -> bool { try { *message = Python::GetPyString(result.get()); } catch (const std::exception& e) { - Log("Error getting string from chat filter: " + std::string(e.what())); + Log(LogLevel::kError, + "Error getting string from chat filter: " + std::string(e.what())); } return true; } @@ -1781,9 +1836,9 @@ auto Python::DoNewNode(PyObject* args, PyObject* keywds) -> Node* { attr_vals.emplace_back( t->GetAttribute(std::string(PyUnicode_AsUTF8(key))), value); } catch (const std::exception&) { - Log("ERROR: Attr not found on initial attr set: '" - + std::string(PyUnicode_AsUTF8(key)) + "' on " + type + " node '" - + name + "'"); + Log(LogLevel::kError, "Attr not found on initial attr set: '" + + std::string(PyUnicode_AsUTF8(key)) + "' on " + + type + " node '" + name + "'"); } } @@ -1793,8 +1848,9 @@ auto Python::DoNewNode(PyObject* args, PyObject* keywds) -> Node* { try { SetNodeAttr(node, i.first->name().c_str(), i.second); } catch (const std::exception& e) { - Log("ERROR: exception in initial attr set for attr '" + i.first->name() - + "' on " + type + " node '" + name + "':" + e.what()); + Log(LogLevel::kError, "Exception in initial attr set for attr '" + + i.first->name() + "' on " + type + " node '" + + name + "':" + e.what()); } } } @@ -1807,10 +1863,12 @@ auto Python::DoNewNode(PyObject* args, PyObject* keywds) -> Node* { if (PythonClassNode::Check(owner_obj)) { Node* owner_node = GetPyNode(owner_obj, true); if (owner_node == nullptr) { - Log("ERROR: empty node-ref passed for 'owner'; pass None if you want " + Log(LogLevel::kError, + "Empty node-ref passed for 'owner'; pass None if you want " "no owner."); } else if (owner_node->scene() != node->scene()) { - Log("ERROR: owner node is from a different scene; ignoring."); + Log(LogLevel::kError, + "Owner node is from a different scene; ignoring."); } else { owner_node->AddDependentNode(node); } @@ -1830,8 +1888,9 @@ auto Python::DoNewNode(PyObject* args, PyObject* keywds) -> Node* { } node->OnCreate(); } catch (const std::exception& e) { - Log("ERROR: exception in OnCreate() for node " - + ballistica::ObjToString(node) + "':" + e.what()); + Log(LogLevel::kError, "Exception in OnCreate() for node " + + ballistica::ObjToString(node) + + "':" + e.what()); } return node; @@ -2039,10 +2098,11 @@ auto Python::GetNodeAttr(Node* node, const char* attr_name) -> PyObject* { } void Python::IssueCallInLogicThreadWarning(PyObject* call_obj) { - Log("WARNING: ba.pushcall() called from the game thread with " + Log(LogLevel::kWarning, + "ba.pushcall() called from the logic thread with " "from_other_thread set to true (call " - + ObjToString(call_obj) + " at " + GetPythonFileLocation() - + "). That arg should only be used from other threads."); + + ObjToString(call_obj) + " at " + GetPythonFileLocation() + + "). That arg should only be used from other threads."); } void Python::LaunchStringEdit(TextWidget* w) { @@ -2253,41 +2313,41 @@ auto Python::GetContextBaseString() -> std::string { return s; } -void Python::LogContextForCallableLabel(const char* label) { +void Python::PrintContextForCallableLabel(const char* label) { assert(InLogicThread()); assert(label); std::string s = std::string(" root call: ") + label; s += g_python->GetContextBaseString(); - Log(s); + PySys_WriteStderr("%s\n", s.c_str()); } -void Python::LogContextNonLogicThread() { +void Python::PrintContextNonLogicThread() { std::string s = - std::string(" root call: "); - Log(s); + std::string(" root call: "); + PySys_WriteStderr("%s\n", s.c_str()); } -void Python::LogContextEmpty() { +void Python::PrintContextEmpty() { assert(InLogicThread()); std::string s = std::string(" root call: "); s += g_python->GetContextBaseString(); - Log(s); + PySys_WriteStderr("%s\n", s.c_str()); } -void Python::LogContextAuto() { +void Python::PrintContextAuto() { // Lets print whatever context info is available. // FIXME: If we have recursive calls this may not print // the context we'd expect; we'd need a unified stack. if (!InLogicThread()) { - LogContextNonLogicThread(); + PrintContextNonLogicThread(); } else if (const char* label = ScopedCallLabel::current_label()) { - LogContextForCallableLabel(label); + PrintContextForCallableLabel(label); } else if (PythonCommand* cmd = PythonCommand::current_command()) { - cmd->LogContext(); + cmd->PrintContext(); } else if (PythonContextCall* call = PythonContextCall::current_call()) { - call->LogContext(); + call->PrintContext(); } else { - LogContextEmpty(); + PrintContextEmpty(); } } @@ -2304,8 +2364,8 @@ void Python::AcquireGIL() { if (debug_timing) { auto duration{Platform::GetCurrentMilliseconds() - startms}; if (duration > (1000 / 120)) { - Log("GIL acquire took too long (" + std::to_string(duration) + " ms).", - true, false); + Log(LogLevel::kInfo, + "GIL acquire took too long (" + std::to_string(duration) + " ms)."); } } } @@ -2491,7 +2551,8 @@ auto Python::GetRawConfigValue(const char* name, float default_value) -> float { try { return GetPyFloat(value); } catch (const std::exception&) { - Log("expected a float for config value '" + std::string(name) + "'"); + Log(LogLevel::kError, + "expected a float for config value '" + std::string(name) + "'"); return default_value; } } @@ -2511,7 +2572,8 @@ auto Python::GetRawConfigValue(const char* name, } return GetPyFloat(value); } catch (const std::exception&) { - Log("expected a float for config value '" + std::string(name) + "'"); + Log(LogLevel::kError, + "expected a float for config value '" + std::string(name) + "'"); return default_value; } } @@ -2526,7 +2588,8 @@ auto Python::GetRawConfigValue(const char* name, int default_value) -> int { try { return static_cast_check_fit(GetPyInt64(value)); } catch (const std::exception&) { - Log("Expected an int value for config value '" + std::string(name) + "'."); + Log(LogLevel::kError, + "Expected an int value for config value '" + std::string(name) + "'."); return default_value; } } @@ -2541,7 +2604,8 @@ auto Python::GetRawConfigValue(const char* name, bool default_value) -> bool { try { return GetPyBool(value); } catch (const std::exception&) { - Log("Expected a bool value for config value '" + std::string(name) + "'."); + Log(LogLevel::kError, + "Expected a bool value for config value '" + std::string(name) + "'."); return default_value; } } @@ -2564,7 +2628,7 @@ void Python::TimeFormatCheck(TimeFormat time_format, PyObject* length_obj) { if (length >= 200.0) { static bool warned = false; if (!warned) { - Log("Warning: time value " + Log(LogLevel::kWarning, "Time value " +std::to_string(length)+" passed as seconds;" " did you mean milliseconds?" " (if so, pass suppress_format_warning=True to stop this warning)"); @@ -2578,7 +2642,7 @@ void Python::TimeFormatCheck(TimeFormat time_format, PyObject* length_obj) { if (length < 1.0 && length > 0.0000001) { static bool warned = false; if (!warned) { - Log("Warning: time value " + Log(LogLevel::kWarning, "Time value " + std::to_string(length) + " passed as milliseconds;" " did you mean seconds?" " (if so, pass suppress_format_warning=True to stop this warning)"); @@ -2589,8 +2653,9 @@ void Python::TimeFormatCheck(TimeFormat time_format, PyObject* length_obj) { } else { static bool warned = false; if (!warned) { - BA_LOG_ONCE("TimeFormatCheck got timeformat value: '" - + std::to_string(static_cast(time_format)) + "'"); + BA_LOG_ONCE(LogLevel::kError, + "TimeFormatCheck got timeformat value: '" + + std::to_string(static_cast(time_format)) + "'"); warned = true; } } diff --git a/src/ballistica/python/python.h b/src/ballistica/python/python.h index bf451032..a48e847b 100644 --- a/src/ballistica/python/python.h +++ b/src/ballistica/python/python.h @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -42,7 +43,7 @@ class Python { /// Use this to protect Python code that may be run in cases where we don't /// hold the Global Interpreter Lock (GIL) (basically anything outside of the - /// game thread). + /// logic thread). class ScopedInterpreterLock { public: ScopedInterpreterLock(); @@ -75,10 +76,17 @@ class Python { auto ValidatedPackageAssetName(PyObject* package, const char* name) -> std::string; - static auto LogContextForCallableLabel(const char* label) -> void; - static auto LogContextEmpty() -> void; - static auto LogContextAuto() -> void; - static auto LogContextNonLogicThread() -> void; + /// Calls Python logging function (logging.error, logging.warning, etc.) + /// Can be called from any thread at any time. If called before Python + /// logging is available, logs locally using Logging::DisplayLog() + /// (with an added warning). + auto LoggingCall(LogLevel loglevel, const std::string& msg) -> void; + + // Print various context debugging bits to Python's sys.stderr. + static auto PrintContextForCallableLabel(const char* label) -> void; + static auto PrintContextEmpty() -> void; + static auto PrintContextAuto() -> void; + static auto PrintContextNonLogicThread() -> void; Python(); static auto Create() -> Python*; @@ -295,7 +303,7 @@ class Python { kVROrientationResetCBMessageCall, kVROrientationResetMessageCall, kHandleAppResumeCall, - kHandleLogCall, + kHandleV1CloudLogCall, kLaunchMainMenuSessionCall, kLanguageTestToggleCall, kAwardInControlAchievementCall, @@ -352,6 +360,11 @@ class Python { kUUIDStrCall, kHashStringsCall, kHaveAccountV2CredentialsCall, + kLoggingDebugCall, + kLoggingInfoCall, + kLoggingWarningCall, + kLoggingErrorCall, + kLoggingCriticalCall, kLast // Sentinel; must be at end. }; @@ -379,7 +392,7 @@ class Python { /// Create a Python single-member tuple. auto SingleMemberTuple(const PythonRef& member) -> PythonRef; - /// Push a call to a preset obj to the game thread + /// Push a call to a preset obj to the logic thread /// (will be run in the UI context). auto PushObjCall(ObjID obj) -> void; @@ -420,7 +433,9 @@ class Python { std::set do_once_locations_; PythonRef objs_[static_cast(ObjID::kLast)]; bool inited_{}; - std::list > clean_frame_commands_; + std::list> clean_frame_commands_; + std::mutex early_log_lock_; + std::list> early_logs_; PythonRef game_pad_call_; PythonRef keyboard_call_; PyObject* empty_dict_object_{}; diff --git a/src/ballistica/python/python_command.cc b/src/ballistica/python/python_command.cc index 187bde06..54553315 100644 --- a/src/ballistica/python/python_command.cc +++ b/src/ballistica/python/python_command.cc @@ -85,7 +85,7 @@ auto PythonCommand::Run() -> bool { if (!g_python) { // This probably means the game is dying; let's not // throw an exception here so we don't mask the original error. - Log("PythonCommand: not running due to null g_python"); + Log(LogLevel::kError, "PythonCommand: not running due to null g_python."); return false; } assert(!dead_); @@ -99,14 +99,14 @@ auto PythonCommand::Run() -> bool { g_python->main_dict()); POP_PYCOMMAND(); - // Technically the python call could have killed us; + // Technically the Python call could have killed us; // make sure that didn't happen. assert(!dead_); if (v == nullptr) { // Save/restore error or it can mess with context print calls. BA_PYTHON_ERROR_SAVE; - Log("ERROR: exception in Python call:"); - LogContext(); + PySys_WriteStderr("Exception in Python call:\n"); + PrintContext(); BA_PYTHON_ERROR_RESTORE; // We pass zero here to avoid grabbing references to this exception @@ -158,8 +158,8 @@ auto PythonCommand::RunReturnObj(bool print_errors, PyObject* context) if (print_errors) { // Save/restore error or it can mess with context print calls. BA_PYTHON_ERROR_SAVE; - Log("ERROR: exception in Python call:"); - LogContext(); + PySys_WriteStderr("Exception in Python call:\n"); + PrintContext(); BA_PYTHON_ERROR_RESTORE; // We pass zero here to avoid grabbing references to this exception // which can cause objects to stick around and trip up our deletion checks @@ -181,8 +181,8 @@ auto PythonCommand::RunReturnObj(bool print_errors, PyObject* context) if (print_errors) { // save/restore error or it can mess with context print calls BA_PYTHON_ERROR_SAVE; - Log("ERROR: exception in Python call:"); - LogContext(); + PySys_WriteStderr("Exception in Python call:\n"); + PrintContext(); BA_PYTHON_ERROR_RESTORE; // we pass zero here to avoid grabbing references to this exception // which can cause objects to stick around and trip up our deletion checks @@ -199,11 +199,11 @@ auto PythonCommand::RunReturnObj(bool print_errors, PyObject* context) return v; } -void PythonCommand::LogContext() { +void PythonCommand::PrintContext() { assert(Python::HaveGIL()); std::string s = std::string(" call: ") + command(); s += g_python->GetContextBaseString(); - Log(s); + PySys_WriteStderr("%s\n", s.c_str()); } } // namespace ballistica diff --git a/src/ballistica/python/python_command.h b/src/ballistica/python/python_command.h index f91e729f..8926e2d5 100644 --- a/src/ballistica/python/python_command.h +++ b/src/ballistica/python/python_command.h @@ -51,7 +51,7 @@ class PythonCommand { /// Returns nullptr on errors, but Python error state will be cleared. auto RunReturnObj(bool print_errors, PyObject* context) -> PyObject*; - void LogContext(); + void PrintContext(); /// Return true if the command can be evaluated; otherwise it can only be /// executed diff --git a/src/ballistica/python/python_context_call.cc b/src/ballistica/python/python_context_call.cc index 279d58c0..3ce54a87 100644 --- a/src/ballistica/python/python_context_call.cc +++ b/src/ballistica/python/python_context_call.cc @@ -75,7 +75,7 @@ void PythonContextCall::Run(PyObject* args) { if (!g_python) { // This probably means the game is dying; let's not // throw an exception here so we don't mask the original error. - Log("PythonCommand: not running due to null g_python"); + Log(LogLevel::kError, "PythonCommand: not running due to null g_python"); return; } @@ -86,7 +86,8 @@ void PythonContextCall::Run(PyObject* args) { // Sanity test: make sure our context didn't go away. #if BA_DEBUG_BUILD if (context_.target.get() != context_target_sanity_test_) { - Log("WARNING: running Call after it's context has died: " + object_.Str()); + Log(LogLevel::kWarning, + "Running Call after it's context has died: " + object_.Str()); } #endif // BA_DEBUG_BUILD @@ -112,8 +113,8 @@ void PythonContextCall::Run(PyObject* args) { // Save/restore python error or it can mess with context print calls. BA_PYTHON_ERROR_SAVE; - Log("ERROR: exception in Python call:"); - LogContext(); + PySys_WriteStderr("Exception in Python call:\n"); + PrintContext(); BA_PYTHON_ERROR_RESTORE; // We pass zero here to avoid grabbing references to this exception @@ -124,12 +125,12 @@ void PythonContextCall::Run(PyObject* args) { } } -void PythonContextCall::LogContext() { +void PythonContextCall::PrintContext() { assert(InLogicThread()); std::string s = std::string(" root call: ") + object().Str(); s += ("\n root call origin: " + file_loc()); s += g_python->GetContextBaseString(); - Log(s); + Log(LogLevel::kError, s); } } // namespace ballistica diff --git a/src/ballistica/python/python_context_call.h b/src/ballistica/python/python_context_call.h index f91100cb..9b04ff1a 100644 --- a/src/ballistica/python/python_context_call.h +++ b/src/ballistica/python/python_context_call.h @@ -31,7 +31,7 @@ class PythonContextCall : public Object { void MarkDead(); auto object() const -> const PythonRef& { return object_; } auto file_loc() const -> const std::string& { return file_loc_; } - void LogContext(); + auto PrintContext() -> void; private: void GetTrace(); // we try to grab basic trace info diff --git a/src/ballistica/python/python_ref.cc b/src/ballistica/python/python_ref.cc index 008213d9..6121b029 100644 --- a/src/ballistica/python/python_ref.cc +++ b/src/ballistica/python/python_ref.cc @@ -155,8 +155,8 @@ auto PythonRef::Call(PyObject* args, PyObject* keywds, bool print_errors) const if (print_errors) { // Save/restore error or it can mess with context print calls. BA_PYTHON_ERROR_SAVE; - Log("ERROR: exception in Python call:"); - Python::LogContextAuto(); + PySys_WriteStderr("Exception in Python call:\n"); + Python::PrintContextAuto(); BA_PYTHON_ERROR_RESTORE; // We pass zero here to avoid grabbing references to this exception diff --git a/src/ballistica/python/python_sys.h b/src/ballistica/python/python_sys.h index 23508ae6..0e53b373 100644 --- a/src/ballistica/python/python_sys.h +++ b/src/ballistica/python/python_sys.h @@ -60,12 +60,12 @@ ((void)0) // For use in tp_dealloc; simply prints the error. -#define BA_PYTHON_DEALLOC_CATCH \ - } \ - catch (const std::exception& e) { \ - Log(std::string("Error: tp_dealloc exception: ") \ - + GetShortExceptionDescription(e)); \ - } \ +#define BA_PYTHON_DEALLOC_CATCH \ + } \ + catch (const std::exception& e) { \ + Log(LogLevel::kError, std::string("tp_dealloc exception: ") \ + + GetShortExceptionDescription(e)); \ + } \ ((void)0) // Sets Python error and returns -1. diff --git a/src/ballistica/scene/node/combine_node.cc b/src/ballistica/scene/node/combine_node.cc index e4948921..0d94572d 100644 --- a/src/ballistica/scene/node/combine_node.cc +++ b/src/ballistica/scene/node/combine_node.cc @@ -41,7 +41,7 @@ auto CombineNode::GetOutput() -> std::vector { if (dirty_) { if (do_size_unset_warning_) { do_size_unset_warning_ = false; - BA_LOG_ONCE("ERROR: CombineNode size unset for " + label()); + BA_LOG_ONCE(LogLevel::kError, "CombineNode size unset for " + label()); } int actual_size = std::min(4, std::max(0, size_)); output_.resize(static_cast(actual_size)); diff --git a/src/ballistica/scene/node/globals_node.cc b/src/ballistica/scene/node/globals_node.cc index 34772cb3..be43714b 100644 --- a/src/ballistica/scene/node/globals_node.cc +++ b/src/ballistica/scene/node/globals_node.cc @@ -106,7 +106,8 @@ GlobalsNode::GlobalsNode(Scene* scene) : Node(scene, node_type) { // FIXME: Need to update this for non-host activities at some point. if (HostActivity* ha = context().GetHostActivity()) { if (ha->globals_node()) { - Log("WARNING: more than one globals node created in HostActivity; this " + Log(LogLevel::kWarning, + "More than one globals node created in HostActivity; this " "shouldn't happen"); } ha->SetGlobalsNode(this); diff --git a/src/ballistica/scene/node/node.cc b/src/ballistica/scene/node/node.cc index e61d147c..9f369442 100644 --- a/src/ballistica/scene/node/node.cc +++ b/src/ballistica/scene/node/node.cc @@ -14,7 +14,8 @@ namespace ballistica { NodeType::~NodeType() { - Log("ERROR: SHOULD NOT BE DESTRUCTING A TYPE type=(" + name_ + ")"); + Log(LogLevel::kError, + "SHOULD NOT BE DESTRUCTING A TYPE type=(" + name_ + ")"); } Node::Node(Scene* scene_in, NodeType* node_type) @@ -260,7 +261,7 @@ void Node::DispatchOutOfBoundsMessage() { if (instance.exists()) { DispatchUserMessage(instance.get(), "Node OutOfBoundsMessage dispatch"); } else { - Log("Error creating OutOfBoundsMessage"); + Log(LogLevel::kError, "Error creating OutOfBoundsMessage"); } } @@ -275,7 +276,7 @@ void Node::DispatchPickUpMessage(Node* node) { if (instance.exists()) { DispatchUserMessage(instance.get(), "Node PickUpMessage dispatch"); } else { - Log("Error creating PickUpMessage"); + Log(LogLevel::kError, "Error creating PickUpMessage"); } } @@ -288,7 +289,7 @@ void Node::DispatchDropMessage() { if (instance.exists()) { DispatchUserMessage(instance.get(), "Node DropMessage dispatch"); } else { - Log("Error creating DropMessage"); + Log(LogLevel::kError, "Error creating DropMessage"); } } @@ -304,7 +305,7 @@ void Node::DispatchPickedUpMessage(Node* by_node) { if (instance.exists()) { DispatchUserMessage(instance.get(), "Node PickedUpMessage dispatch"); } else { - Log("Error creating PickedUpMessage"); + Log(LogLevel::kError, "Error creating PickedUpMessage"); } } @@ -320,7 +321,7 @@ void Node::DispatchDroppedMessage(Node* by_node) { if (instance.exists()) { DispatchUserMessage(instance.get(), "Node DroppedMessage dispatch"); } else { - Log("Error creating DroppedMessage"); + Log(LogLevel::kError, "Error creating DroppedMessage"); } } @@ -333,7 +334,7 @@ void Node::DispatchShouldShatterMessage() { if (instance.exists()) { DispatchUserMessage(instance.get(), "Node ShouldShatterMessage dispatch"); } else { - Log("Error creating ShouldShatterMessage"); + Log(LogLevel::kError, "Error creating ShouldShatterMessage"); } } @@ -348,7 +349,7 @@ void Node::DispatchImpactDamageMessage(float intensity) { if (instance.exists()) { DispatchUserMessage(instance.get(), "Node ImpactDamageMessage dispatch"); } else { - Log("Error creating ImpactDamageMessage"); + Log(LogLevel::kError, "Error creating ImpactDamageMessage"); } } @@ -376,8 +377,10 @@ void Node::DispatchUserMessage(PyObject* obj, const char* label) { c.Call(PythonRef(Py_BuildValue("(O)", obj), PythonRef::kSteal)); } } catch (const std::exception& e) { - Log(std::string("Error in handlemessage() with message ") - + PythonRef(obj, PythonRef::kAcquire).Str() + ": '" + e.what() + "'"); + Log(LogLevel::kError, + std::string("Error in handlemessage() with message ") + + PythonRef(obj, PythonRef::kAcquire).Str() + ": '" + e.what() + + "'"); } } } diff --git a/src/ballistica/scene/node/node_attribute.cc b/src/ballistica/scene/node/node_attribute.cc index d940857f..42c382b2 100644 --- a/src/ballistica/scene/node/node_attribute.cc +++ b/src/ballistica/scene/node/node_attribute.cc @@ -48,8 +48,8 @@ auto NodeAttributeUnbound::GetNodeAttributeTypeName(NodeAttributeType t) case NodeAttributeType::kCollideModelArray: return "collide-model-array"; default: - Log("Error: Unknown attr type name: " - + std::to_string(static_cast(t))); + Log(LogLevel::kError, + "Unknown attr type name: " + std::to_string(static_cast(t))); return "unknown"; } } @@ -98,7 +98,7 @@ void NodeAttributeUnbound::DisconnectIncoming(Node* node) { #if BA_DEBUG_BUILD if (test_ref.exists()) { - Log("Error: Attr connection still exists after ref releases!"); + Log(LogLevel::kError, "Attr connection still exists after ref releases!"); } #endif } diff --git a/src/ballistica/scene/node/node_attribute_connection.cc b/src/ballistica/scene/node/node_attribute_connection.cc index 4b27fb32..d3b308f9 100644 --- a/src/ballistica/scene/node/node_attribute_connection.cc +++ b/src/ballistica/scene/node/node_attribute_connection.cc @@ -94,12 +94,13 @@ void NodeAttributeConnection::Update() { src_node->type()->GetAttribute(src_attr_index); NodeAttributeUnbound* dst_attr = dst_node->type()->GetAttribute(dst_attr_index); - Log("ERROR: attribute connection update: " + std::string(e.what()) - + "; srcAttr='" + src_attr->name() + "', src_node='" - + src_node->type()->name() + "', srcNodeName='" + src_node->label() - + "', dstAttr='" + dst_attr->name() + "', dstNode='" - + dst_node->type()->name() + "', dstNodeName='" + dst_node->label() - + "'"); + Log(LogLevel::kError, + "Attribute connection update: " + std::string(e.what()) + + "; srcAttr='" + src_attr->name() + "', src_node='" + + src_node->type()->name() + "', srcNodeName='" + + src_node->label() + "', dstAttr='" + dst_attr->name() + + "', dstNode='" + dst_node->type()->name() + "', dstNodeName='" + + dst_node->label() + "'"); } } } diff --git a/src/ballistica/scene/node/prop_node.cc b/src/ballistica/scene/node/prop_node.cc index be16c83d..3e5b534c 100644 --- a/src/ballistica/scene/node/prop_node.cc +++ b/src/ballistica/scene/node/prop_node.cc @@ -265,7 +265,8 @@ void PropNode::SetBody(const std::string& val) { // we're ok with redundant sets, but complain/ignore if they try to switch.. if (body_.exists()) { if (body_type_ != body_type || shape_ != shape) { - Log("ERROR: body attr can not be changed from its initial value"); + Log(LogLevel::kError, + "body attr can not be changed from its initial value"); return; } } @@ -426,8 +427,8 @@ void PropNode::Step() { if (body_type_ == BodyType::UNSET) { if (!reported_unset_body_type_) { reported_unset_body_type_ = true; - Log("ERROR: prop-node " + GetObjectDescription() - + " did not have its 'body' attr set."); + Log(LogLevel::kError, "prop-node " + GetObjectDescription() + + " did not have its 'body' attr set."); return; } } diff --git a/src/ballistica/scene/node/region_node.cc b/src/ballistica/scene/node/region_node.cc index 1fc4f016..e509bdc8 100644 --- a/src/ballistica/scene/node/region_node.cc +++ b/src/ballistica/scene/node/region_node.cc @@ -90,7 +90,8 @@ void RegionNode::Step() { RigidBody::kCollideRegion, RigidBody::kCollideActive); } else { if (region_type_ != "box") { - BA_LOG_ONCE("got unexpected region type: " + region_type_); + BA_LOG_ONCE(LogLevel::kError, + "Got unexpected region type: " + region_type_); } body_ = Object::New( 0, &part_, RigidBody::Type::kGeomOnly, RigidBody::Shape::kBox, diff --git a/src/ballistica/scene/node/sound_node.cc b/src/ballistica/scene/node/sound_node.cc index a34e70b2..da6b7834 100644 --- a/src/ballistica/scene/node/sound_node.cc +++ b/src/ballistica/scene/node/sound_node.cc @@ -81,7 +81,8 @@ void SoundNode::SetLoop(bool val) { // We don't actually update looping on a playing sound. if (playing_) - BA_LOG_ONCE("Error: can't set 'loop' attr on already-playing sound."); + BA_LOG_ONCE(LogLevel::kError, + "Can't set 'loop' attr on already-playing sound."); } void SoundNode::SetSound(Sound* s) { @@ -97,7 +98,8 @@ void SoundNode::SetPositional(bool val) { if (val == positional_) return; positional_ = val; if (playing_) - BA_LOG_ONCE("Error: can't set 'positional' attr on already-playing sound"); + BA_LOG_ONCE(LogLevel::kError, + "Can't set 'positional' attr on already-playing sound"); } void SoundNode::SetMusic(bool val) { diff --git a/src/ballistica/scene/node/spaz_node.cc b/src/ballistica/scene/node/spaz_node.cc index 26ef2b15..b07cb679 100644 --- a/src/ballistica/scene/node/spaz_node.cc +++ b/src/ballistica/scene/node/spaz_node.cc @@ -5885,7 +5885,8 @@ auto SpazNode::GetRigidBody(int id) -> RigidBody* { return hair_ponytail_bottom_body_.get(); break; default: - Log("Error: Request for unknown spaz body: " + std::to_string(id)); + Log(LogLevel::kError, + "Request for unknown spaz body: " + std::to_string(id)); break; } @@ -6491,7 +6492,7 @@ void SpazNode::SetStyle(const std::string& val) { shoulder_offset_y_ = -0.05f; reflection_scale_ = 0.02f; } else { - BA_LOG_ONCE("Error: Unrecognized spaz style: '" + style_ + "'"); + BA_LOG_ONCE(LogLevel::kError, "Unrecognized spaz style: '" + style_ + "'"); } UpdateBodiesForStyle(); } @@ -6620,20 +6621,25 @@ void SpazNode::SetHoldNode(Node* val) { assert(dynamics); Collision* c = dynamics->active_collision(); if (c) { - Log("SRC NODE: " + ObjToString(dynamics->GetActiveCollideSrcNode())); - Log("OPP NODE: " + ObjToString(dynamics->GetActiveCollideDstNode())); - Log("SRC BODY " - + std::to_string(dynamics->GetCollideMessageReverseOrder() - ? c->body_id_1 - : c->body_id_2)); - Log("OPP BODY " - + std::to_string(dynamics->GetCollideMessageReverseOrder() - ? c->body_id_2 - : c->body_id_1)); - Log("REVERSE " - + std::to_string(dynamics->GetCollideMessageReverseOrder())); + Log(LogLevel::kError, + "SRC NODE: " + ObjToString(dynamics->GetActiveCollideSrcNode())); + Log(LogLevel::kError, + "OPP NODE: " + ObjToString(dynamics->GetActiveCollideDstNode())); + Log(LogLevel::kError, + "SRC BODY " + + std::to_string(dynamics->GetCollideMessageReverseOrder() + ? c->body_id_1 + : c->body_id_2)); + Log(LogLevel::kError, + "OPP BODY " + + std::to_string(dynamics->GetCollideMessageReverseOrder() + ? c->body_id_2 + : c->body_id_1)); + Log(LogLevel::kError, + "REVERSE " + + std::to_string(dynamics->GetCollideMessageReverseOrder())); } else { - Log(""); + Log(LogLevel::kError, ""); } } throw Exception("specified hold_body (" + std::to_string(hold_body_) diff --git a/src/ballistica/scene/node/text_node.cc b/src/ballistica/scene/node/text_node.cc index a6f27062..7be19570 100644 --- a/src/ballistica/scene/node/text_node.cc +++ b/src/ballistica/scene/node/text_node.cc @@ -115,11 +115,12 @@ void TextNode::SetText(const std::string& val) { bool valid; g_logic->CompileResourceString(val, "setText format check", &valid); if (!valid) { - BA_LOG_ONCE("Invalid resource string: '" + val + "' on node '" + label() - + "'"); + BA_LOG_ONCE(LogLevel::kError, "Invalid resource string: '" + val + + "' on node '" + label() + "'"); Python::PrintStackTrace(); } else if (print_false_positives) { - BA_LOG_ONCE("Got false positive for json check on '" + val + "'"); + BA_LOG_ONCE(LogLevel::kError, + "Got false positive for json check on '" + val + "'"); Python::PrintStackTrace(); } } diff --git a/src/ballistica/scene/scene.cc b/src/ballistica/scene/scene.cc index 2f1acc65..acf77a96 100644 --- a/src/ballistica/scene/scene.cc +++ b/src/ballistica/scene/scene.cc @@ -81,7 +81,7 @@ void Scene::PlaySound(Sound* sound, float volume, bool host_only) { auto Scene::IsOutOfBounds(float x, float y, float z) -> bool { if (std::isnan(x) || std::isnan(y) || std::isnan(z) || std::isinf(x) || std::isinf(y) || std::isinf(z)) - BA_LOG_ONCE("ERROR: got INF/NAN value on IsOutOfBounds() check"); + BA_LOG_ONCE(LogLevel::kError, "Got INF/NAN value on IsOutOfBounds() check"); return ((x < bounds_min_[0]) || (x > bounds_max_[0]) || (y < bounds_min_[1]) || (y > bounds_max_[1]) || (z < bounds_min_[2]) @@ -206,7 +206,7 @@ void Scene::DeleteNode(Node* node) { // Sanity test: at this point the node should be dead. #if BA_DEBUG_BUILD if (temp_weak_ref.exists()) { - Log("Error: node still exists after ref release!!"); + Log(LogLevel::kError, "Node still exists after ref release!!"); } #endif // BA_DEBUG_BUILD @@ -396,8 +396,9 @@ void Scene::DumpNodes(SceneStream* out) { break; } default: - Log("Invalid attr type for Scene::DumpNodes() attr set: " - + std::to_string(static_cast(attr.type()))); + Log(LogLevel::kError, + "Invalid attr type for Scene::DumpNodes() attr set: " + + std::to_string(static_cast(attr.type()))); break; } } diff --git a/src/ballistica/scene/scene_stream.cc b/src/ballistica/scene/scene_stream.cc index cdea88f5..ff1aff8b 100644 --- a/src/ballistica/scene/scene_stream.cc +++ b/src/ballistica/scene/scene_stream.cc @@ -35,7 +35,8 @@ SceneStream::SceneStream(HostSession* host_session, bool save_replay) if (save_replay) { // Sanity check - we should only ever be writing one replay at once. if (g_app->replay_open) { - Log("ERROR: g_replay_open true at replay start; shouldn't happen."); + Log(LogLevel::kError, + "g_replay_open true at replay start; shouldn't happen."); } assert(g_assets_server); g_assets_server->PushBeginWriteReplayCall(); @@ -57,7 +58,8 @@ SceneStream::~SceneStream() { if (writing_replay_) { // Sanity check: We should only ever be writing one replay at once. if (!g_app->replay_open) { - Log("ERROR: g_replay_open false at replay close; shouldn't happen."); + Log(LogLevel::kError, + "g_replay_open false at replay close; shouldn't happen."); } g_app->replay_open = false; assert(g_assets_server); @@ -77,38 +79,40 @@ SceneStream::~SceneStream() { size_t count; count = GetPointerCount(scenes_); if (count != 0) { - Log("ERROR: " + std::to_string(count) - + " scene graphs in output stream at shutdown"); + Log(LogLevel::kError, + std::to_string(count) + + " scene graphs in output stream at shutdown"); } count = GetPointerCount(nodes_); if (count != 0) { - Log("ERROR: " + std::to_string(count) - + " nodes in output stream at shutdown"); + Log(LogLevel::kError, + std::to_string(count) + " nodes in output stream at shutdown"); } count = GetPointerCount(materials_); if (count != 0) { - Log("ERROR: " + std::to_string(count) - + " materials in output stream at shutdown"); + Log(LogLevel::kError, + std::to_string(count) + " materials in output stream at shutdown"); } count = GetPointerCount(textures_); if (count != 0) { - Log("ERROR: " + std::to_string(count) - + " textures in output stream at shutdown"); + Log(LogLevel::kError, + std::to_string(count) + " textures in output stream at shutdown"); } count = GetPointerCount(models_); if (count != 0) { - Log("ERROR: " + std::to_string(count) - + " models in output stream at shutdown"); + Log(LogLevel::kError, + std::to_string(count) + " models in output stream at shutdown"); } count = GetPointerCount(sounds_); if (count != 0) { - Log("ERROR: " + std::to_string(count) - + " sounds in output stream at shutdown"); + Log(LogLevel::kError, + std::to_string(count) + " sounds in output stream at shutdown"); } count = GetPointerCount(collide_models_); if (count != 0) { - Log("ERROR: " + std::to_string(count) - + " collide_models in output stream at shutdown"); + Log(LogLevel::kError, + std::to_string(count) + + " collide_models in output stream at shutdown"); } } } @@ -121,7 +125,8 @@ auto SceneStream::GetOutMessage() const -> std::vector { assert(!host_session_); // this should only be getting used for // standalone temp ones.. if (!out_command_.empty()) { - Log("Error: SceneStream shutting down with non-empty outCommand"); + Log(LogLevel::kError, + "SceneStream shutting down with non-empty outCommand"); } return out_message_; } @@ -186,11 +191,12 @@ void SceneStream::Remove(T* val, std::vector* vec, } void SceneStream::Fail() { - Log("Error writing replay file"); + Log(LogLevel::kError, "Error writing replay file"); if (writing_replay_) { // Sanity check: We should only ever be writing one replay at once. if (!g_app->replay_open) { - Log("ERROR: g_replay_open false at replay close; shouldn't happen."); + Log(LogLevel::kError, + "g_replay_open false at replay close; shouldn't happen."); } assert(g_assets_server); g_assets_server->PushEndWriteReplayCall(); @@ -201,7 +207,8 @@ void SceneStream::Fail() { void SceneStream::Flush() { if (!out_command_.empty()) - Log("Error: SceneStream flushing down with non-empty outCommand"); + Log(LogLevel::kError, + "SceneStream flushing down with non-empty outCommand"); if (!out_message_.empty()) { ShipSessionCommandsMessage(); } @@ -534,7 +541,7 @@ void SceneStream::SetTime(millisecs_t t) { } millisecs_t diff = t - time_; if (diff > 255) { - Log("Error: SceneStream got time diff > 255; not expected."); + Log(LogLevel::kError, "SceneStream got time diff > 255; not expected."); diff = 255; } WriteCommandInt64(SessionCommand::kBaseTimeStep, diff); @@ -1183,13 +1190,15 @@ void SceneStream::OnClientConnected(ConnectionToClient* c) { // Sanity check - abort if its on either of our lists already. for (auto& connections_to_client : connections_to_clients_) { if (connections_to_client == c) { - Log("Error: SceneStream::OnClientConnected() got duplicate connection."); + Log(LogLevel::kError, + "SceneStream::OnClientConnected() got duplicate connection."); return; } } for (auto& i : connections_to_clients_ignored_) { if (i == c) { - Log("Error: SceneStream::OnClientConnected() got duplicate connection."); + Log(LogLevel::kError, + "SceneStream::OnClientConnected() got duplicate connection."); return; } } @@ -1242,7 +1251,8 @@ void SceneStream::OnClientDisconnected(ConnectionToClient* c) { return; } } - Log("Error: SceneStream::OnClientDisconnected() called for connection not on " + Log(LogLevel::kError, + "SceneStream::OnClientDisconnected() called for connection not on " "lists"); } diff --git a/src/ballistica/ui/ui.cc b/src/ballistica/ui/ui.cc index 7ddf8c4b..945d51fb 100644 --- a/src/ballistica/ui/ui.cc +++ b/src/ballistica/ui/ui.cc @@ -60,13 +60,13 @@ auto UI::OnAppStart() -> void { if (force_scale_) { if (scale_ == UIScale::kSmall) { ScreenMessage("FORCING SMALL UI FOR TESTING", Vector3f(1, 0, 0)); - Log("FORCING SMALL UI FOR TESTING"); + Log(LogLevel::kInfo, "FORCING SMALL UI FOR TESTING"); } else if (scale_ == UIScale::kMedium) { ScreenMessage("FORCING MEDIUM UI FOR TESTING", Vector3f(1, 0, 0)); - Log("FORCING MEDIUM UI FOR TESTING"); + Log(LogLevel::kInfo, "FORCING MEDIUM UI FOR TESTING"); } else if (scale_ == UIScale::kLarge) { ScreenMessage("FORCING LARGE UI FOR TESTING", Vector3f(1, 0, 0)); - Log("FORCING LARGE UI FOR TESTING"); + Log(LogLevel::kInfo, "FORCING LARGE UI FOR TESTING"); } else { FatalError("Unhandled scale."); } @@ -151,7 +151,7 @@ void UI::Update(millisecs_t time_advance) { if (node_warning_count_ > 3) { static bool complained = false; if (!complained) { - Log(">10 nodes in UI context!"); + Log(LogLevel::kError, ">10 nodes in UI context!"); complained = true; } } diff --git a/src/ballistica/ui/widget/button_widget.cc b/src/ballistica/ui/widget/button_widget.cc index 507d45d7..cfefdad9 100644 --- a/src/ballistica/ui/widget/button_widget.cc +++ b/src/ballistica/ui/widget/button_widget.cc @@ -554,7 +554,8 @@ void ButtonWidget::Activate() { DoActivate(); } void ButtonWidget::DoActivate(bool isRepeat) { if (!enabled_) { - Log("WARNING: ButtonWidget::DoActivate() called on disabled button"); + Log(LogLevel::kWarning, + "ButtonWidget::DoActivate() called on disabled button"); return; } diff --git a/src/ballistica/ui/widget/container_widget.cc b/src/ballistica/ui/widget/container_widget.cc index 9d1e0eeb..5d82083b 100644 --- a/src/ballistica/ui/widget/container_widget.cc +++ b/src/ballistica/ui/widget/container_widget.cc @@ -1346,7 +1346,8 @@ void ContainerWidget::SelectWidget(Widget* w, SelectionCause c) { } } else { if (root_selectable_) { - Log("Error: SelectWidget() called on a ContainerWidget which is itself " + Log(LogLevel::kError, + "SelectWidget() called on a ContainerWidget which is itself " "selectable. Ignoring."); return; } @@ -1372,8 +1373,9 @@ void ContainerWidget::SelectWidget(Widget* w, SelectionCause c) { } else { static bool printed = false; if (!printed) { - Log("Warning: SelectWidget called on unselectable widget: " - + w->GetWidgetTypeName()); + Log(LogLevel::kWarning, + "SelectWidget called on unselectable widget: " + + w->GetWidgetTypeName()); Python::PrintStackTrace(); printed = true; } @@ -1543,7 +1545,7 @@ void ContainerWidget::SelectDownWidget() { BA_DEBUG_UI_READ_LOCK; if (!g_ui || !g_ui->root_widget() || !g_ui->screen_root_widget()) { - BA_LOG_ONCE("SelectDownWidget called before UI init."); + BA_LOG_ONCE(LogLevel::kError, "SelectDownWidget called before UI init."); return; } @@ -1576,7 +1578,7 @@ void ContainerWidget::SelectDownWidget() { } if (w) { if (!w->IsSelectable()) { - Log("Error: Down_widget is not selectable."); + Log(LogLevel::kError, "Down_widget is not selectable."); } else { w->Show(); // Avoid tap sounds and whatnot if we're just re-selecting ourself. @@ -1607,7 +1609,7 @@ void ContainerWidget::SelectUpWidget() { BA_DEBUG_UI_READ_LOCK; if (!g_ui || !g_ui->root_widget() || !g_ui->screen_root_widget()) { - BA_LOG_ONCE("SelectUpWidget called before UI init."); + BA_LOG_ONCE(LogLevel::kError, "SelectUpWidget called before UI init."); return; } @@ -1640,7 +1642,7 @@ void ContainerWidget::SelectUpWidget() { } if (w) { if (!w->IsSelectable()) { - Log("Error: up_widget is not selectable."); + Log(LogLevel::kError, "up_widget is not selectable."); } else { w->Show(); // Avoid tap sounds and whatnot if we're just re-selecting ourself. @@ -1671,7 +1673,7 @@ void ContainerWidget::SelectLeftWidget() { BA_DEBUG_UI_READ_LOCK; if (!g_ui || !g_ui->root_widget() || !g_ui->screen_root_widget()) { - BA_LOG_ONCE("SelectLeftWidget called before UI init."); + BA_LOG_ONCE(LogLevel::kError, "SelectLeftWidget called before UI init."); return; } @@ -1691,7 +1693,7 @@ void ContainerWidget::SelectLeftWidget() { } if (w) { if (!w->IsSelectable()) { - Log("Error: left_widget is not selectable."); + Log(LogLevel::kError, "left_widget is not selectable."); } else { w->Show(); // Avoid tap sounds and whatnot if we're just re-selecting ourself. @@ -1721,7 +1723,7 @@ void ContainerWidget::SelectRightWidget() { BA_DEBUG_UI_READ_LOCK; if (!g_ui || !g_ui->root_widget() || !g_ui->screen_root_widget()) { - BA_LOG_ONCE("SelectRightWidget called before UI init."); + BA_LOG_ONCE(LogLevel::kError, "SelectRightWidget called before UI init."); return; } @@ -1742,7 +1744,7 @@ void ContainerWidget::SelectRightWidget() { } if (w) { if (!w->IsSelectable()) { - Log("Error: right_widget is not selectable."); + Log(LogLevel::kError, "right_widget is not selectable."); } else { w->Show(); // Avoid tap sounds and whatnot if we're just re-selecting ourself. @@ -1773,7 +1775,7 @@ void ContainerWidget::SelectNextWidget() { BA_DEBUG_UI_READ_LOCK; if (!g_ui || !g_ui->root_widget() || !g_ui->screen_root_widget()) { - BA_LOG_ONCE("SelectNextWidget called before UI init."); + BA_LOG_ONCE(LogLevel::kError, "SelectNextWidget called before UI init."); return; } diff --git a/src/ballistica/ui/widget/text_widget.cc b/src/ballistica/ui/widget/text_widget.cc index 060ea48a..c45241e9 100644 --- a/src/ballistica/ui/widget/text_widget.cc +++ b/src/ballistica/ui/widget/text_widget.cc @@ -464,10 +464,12 @@ void TextWidget::SetText(const std::string& text_in_raw) { g_logic->CompileResourceString(text_in_raw, "TextWidget::SetText format check", &valid); if (!valid) { - BA_LOG_ONCE("Invalid resource string: '" + text_in_raw + "'"); + BA_LOG_ONCE(LogLevel::kError, + "Invalid resource string: '" + text_in_raw + "'"); Python::PrintStackTrace(); } else if (explicit_bool(print_false_positives)) { - BA_LOG_ONCE("Got false positive for json check on '" + text_in_raw + "'"); + BA_LOG_ONCE(LogLevel::kError, + "Got false positive for json check on '" + text_in_raw + "'"); Python::PrintStackTrace(); } } diff --git a/src/ballistica/ui/widget/widget.cc b/src/ballistica/ui/widget/widget.cc index ea0f1bab..094c35a9 100644 --- a/src/ballistica/ui/widget/widget.cc +++ b/src/ballistica/ui/widget/widget.cc @@ -46,7 +46,8 @@ void Widget::SetDepthRange(float min_depth, float max_depth) { auto Widget::IsInMainStack() const -> bool { if (!g_ui) { - BA_LOG_ONCE("Widget::IsInMainStack() called before ui creation."); + BA_LOG_ONCE(LogLevel::kError, + "Widget::IsInMainStack() called before ui creation."); return false; } // Navigate up to the top of the hierarchy and see if the @@ -200,9 +201,10 @@ void Widget::ScreenPointToWidget(float* x, float* y) const { float y_test = *y; WidgetPointToScreen(&x_test, &y_test); if (std::abs(x_test - x_old) > 0.01f || std::abs(y_test - y_old) > 0.01f) { - Log("ScreenPointToWidget sanity check error: expected (" - + std::to_string(x_old) + "," + std::to_string(y_old) + ") got (" - + std::to_string(x_test) + "," + std::to_string(y_test) + ")"); + Log(LogLevel::kError, + "ScreenPointToWidget sanity check error: expected (" + + std::to_string(x_old) + "," + std::to_string(y_old) + ") got (" + + std::to_string(x_test) + "," + std::to_string(y_test) + ")"); } #endif // BA_DEBUG_BUILD || BA_TEST_BUILD } diff --git a/src/meta/bameta/python_embedded/binding.py b/src/meta/bameta/python_embedded/binding.py index b565fd20..9408b71d 100644 --- a/src/meta/bameta/python_embedded/binding.py +++ b/src/meta/bameta/python_embedded/binding.py @@ -8,6 +8,7 @@ from __future__ import annotations import json import copy +import logging from typing import TYPE_CHECKING import ba @@ -50,7 +51,7 @@ def get_binding_values() -> tuple[Any, ...]: _hooks.orientation_reset_cb_message, # kVROrientationResetCBMessageCall _hooks.orientation_reset_message, # kVROrientationResetMessageCall _hooks.on_app_resume, # kHandleAppResumeCall - _apputils.handle_log, # kHandleLogCall + _apputils.handle_v1_cloud_log, # kHandleV1CloudLogCall _hooks.launch_main_menu_session, # kLaunchMainMenuSessionCall _hooks.language_test_toggle, # kLanguageTestToggleCall _hooks.award_in_control_achievement, # kAwardInControlAchievementCall @@ -136,4 +137,9 @@ def get_binding_values() -> tuple[Any, ...]: _hooks.uuid_str, # kUUIDStrCall _hooks.hash_strings, # kHashStringsCall _hooks.have_account_v2_credentials, # kHaveAccountV2CredentialsCall + logging.debug, # kLoggingDebugCall + logging.info, # kLoggingInfoCall + logging.warning, # kLoggingWarningCall + logging.error, # kLoggingErrorCall + logging.critical, # kLoggingCriticalCall ) # yapf: disable diff --git a/tools/batools/dummymodule.py b/tools/batools/dummymodule.py index 3f4954a7..dc5afbbb 100755 --- a/tools/batools/dummymodule.py +++ b/tools/batools/dummymodule.py @@ -770,7 +770,7 @@ def update(projroot: str, check: bool, force: bool) -> None: for mname in ('_ba', '_bainternal'): # Skip internal module in public since it might # not exist and is read-only anyway. - if mname == '_ba' and public: + if mname == '_bainternal' and public: continue outfilename = os.path.abspath( diff --git a/tools/efro/log.py b/tools/efro/log.py index af647f56..376a2056 100644 --- a/tools/efro/log.py +++ b/tools/efro/log.py @@ -5,20 +5,22 @@ from __future__ import annotations import sys import time +import asyncio import logging import datetime -import threading from enum import Enum from dataclasses import dataclass from typing import TYPE_CHECKING, Annotated +from threading import Thread, current_thread, Lock from efro.util import utc_now +from efro.call import tpartial from efro.terminal import TerminalColor from efro.dataclassio import ioprepped, IOAttrs, dataclass_to_json if TYPE_CHECKING: from pathlib import Path - from typing import Any, Callable + from typing import Any, Callable, TextIO class LogLevel(Enum): @@ -35,6 +37,15 @@ class LogLevel(Enum): CRITICAL = 4 +LOG_NAMES_TO_LEVELS = { + 'DEBUG': LogLevel.DEBUG, + 'INFO': LogLevel.INFO, + 'WARNING': LogLevel.WARNING, + 'ERROR': LogLevel.ERROR, + 'CRITICAL': LogLevel.CRITICAL +} + + @ioprepped @dataclass class LogEntry: @@ -53,19 +64,61 @@ class LogHandler(logging.Handler): to stdout/stderr with pretty colors. """ + _event_loop: asyncio.AbstractEventLoop + + # IMPORTANT: Any debug prints we do here should ONLY go to echofile. + # Otherwise we can get infinite loops as those prints come back to us + # as new log entries. + def __init__(self, path: str | Path | None, - echofile: Any, + echofile: TextIO | None, suppress_non_root_debug: bool = False): super().__init__() # pylint: disable=consider-using-with self._file = (None if path is None else open(path, 'w', encoding='utf-8')) self._echofile = echofile + self._callbacks_lock = Lock() self._callbacks: list[Callable[[LogEntry], None]] = [] self._suppress_non_root_debug = suppress_non_root_debug + self._file_chunks: dict[str, list[str]] = {'stdout': [], 'stderr': []} + self._file_chunk_ship_task: dict[str, asyncio.Task | None] = { + 'stdout': None, + 'stderr': None + } + self._printed_callback_error = False + self._thread_bootstrapped = False + self._thread = Thread(target=self._thread_main, daemon=True) + self._thread.start() + + # Spin until our thread has set up its basic stuff; + # otherwise we could wind up trying to push stuff to our + # event loop before the loop exists. + while not self._thread_bootstrapped: + time.sleep(0.001) + + def add_callback(self, call: Callable[[LogEntry], None]) -> None: + """Add a callback to be run for each LogEntry. + + Note that this callback will always run in a background thread. + """ + with self._callbacks_lock: + self._callbacks.append(call) + + def _thread_main(self) -> None: + self._event_loop = asyncio.new_event_loop() + # NOTE: if we ever use default threadpool at all we should allow + # setting it for our loop. + asyncio.set_event_loop(self._event_loop) + self._thread_bootstrapped = True + self._event_loop.run_forever() def emit(self, record: logging.LogRecord) -> None: + # Called by logging to send us records. + # We simply package them up and ship them to our thread. + + assert current_thread() is not self._thread # Special case - filter out this common extra-chatty category. # TODO - should use a standard logging.Filter for this. @@ -73,30 +126,109 @@ class LogHandler(logging.Handler): and record.levelname == 'DEBUG'): return - # Bake down all log formatting into a simple string. + # We want to forward as much as we can along without processing it + # (better to do so in a bg thread). + # However its probably best to flatten the message string here since + # it could cause problems stringifying things in threads where they + # didn't expect to be stringified. msg = self.format(record) - # Translate Python log levels to our own. - level = { - 'DEBUG': LogLevel.DEBUG, - 'INFO': LogLevel.INFO, - 'WARNING': LogLevel.WARNING, - 'ERROR': LogLevel.ERROR, - 'CRITICAL': LogLevel.CRITICAL - }[record.levelname] + self._event_loop.call_soon_threadsafe( + tpartial(self._emit_in_loop, record.name, record.levelname, + record.created, msg)) - entry = LogEntry(message=msg, - name=record.name, - level=level, + def _emit_in_loop(self, name: str, levelname: str, created: float, + message: str) -> None: + try: + self._emit_entry( + LogEntry(name=name, + message=message, + level=LOG_NAMES_TO_LEVELS[levelname], time=datetime.datetime.fromtimestamp( - record.created, datetime.timezone.utc)) + created, datetime.timezone.utc))) + except Exception: + import traceback + traceback.print_exc(file=self._echofile) - for call in self._callbacks: - call(entry) + def file_write(self, name: str, output: str) -> None: + """Send raw stdout/stderr output to the logger to be collated.""" - # Also route log entries to the echo file (generally stdout/stderr) - # with pretty colors. - if self._echofile is not None: + self._event_loop.call_soon_threadsafe( + tpartial(self._file_write_in_loop, name, output)) + + def _file_write_in_loop(self, name: str, output: str) -> None: + try: + assert name in ('stdout', 'stderr') + + # Here we try to be somewhat smart about breaking arbitrary + # print output into discrete log entries. + + # Individual parts of a print come across as separate writes, + # and the end of a print will be a standalone '\n' by default. + # So let's ship whatever we've got when one of those comes in. + if output == '\n': + self._ship_file_chunks(name, cancel_ship_task=True) + else: + # By default just keep adding chunks. + # However we keep a timer running anytime we've got + # unshipped chunks so that we can ship what we've got + # after a short bit if we never get a newline. + self._file_chunks[name].append(output) + + ship_task = self._file_chunk_ship_task[name] + if ship_task is None: + self._file_chunk_ship_task[name] = ( + self._event_loop.create_task( + self._ship_chunks_task(name))) + + except Exception: + import traceback + traceback.print_exc(file=self._echofile) + + async def _ship_chunks_task(self, name: str) -> None: + await asyncio.sleep(0.1) + self._ship_file_chunks(name, cancel_ship_task=False) + + def _ship_file_chunks(self, name: str, cancel_ship_task: bool) -> None: + self._emit_entry( + LogEntry(name=name, + message=''.join(self._file_chunks[name]), + level=LogLevel.INFO, + time=utc_now())) + self._file_chunks[name] = [] + ship_task = self._file_chunk_ship_task[name] + if cancel_ship_task and ship_task is not None: + ship_task.cancel() + self._file_chunk_ship_task[name] = None + + def _emit_entry(self, entry: LogEntry) -> None: + # This runs in our bg event loop thread and does most of the work. + assert current_thread() is self._thread + + with self._callbacks_lock: + for call in self._callbacks: + try: + call(entry) + except Exception: + # Only print one callback error to avoid insanity. + if not self._printed_callback_error: + import traceback + traceback.print_exc(file=self._echofile) + self._printed_callback_error = True + + # Dump to our structured log file. + # TODO: set a timer for flushing; don't flush every line. + if self._file is not None: + entry_s = dataclass_to_json(entry) + assert '\n' not in entry_s # Make sure its a single line. + print(entry_s, file=self._file, flush=True) + + # Also print pretty colored output to our echo file (stdout/stderr). + # Note that we don't do this for log entries generated from + # stdout/stderr since that would result in them being printed + # twice. + if (self._echofile is not None + and entry.name not in ('stdout', 'stderr')): cbegin: str cend: str cbegin, cend = { @@ -111,101 +243,40 @@ class LogHandler(logging.Handler): (TerminalColor.STRONG_MAGENTA.value + TerminalColor.BOLD.value + TerminalColor.BG_BLACK.value, TerminalColor.RESET.value), - }[level] + }[entry.level] - self._echofile.write(f'{cbegin}{msg}{cend}\n') - - # Note to self: it sounds like logging wraps calls to us - # in a lock so we shouldn't have to worry about garbled - # json output due to multiple threads writing at once, - # but may be good to find out for sure? - if self._file is not None: - entry_s = dataclass_to_json(entry) - assert '\n' not in entry_s # make sure its a single line - print(entry_s, file=self._file, flush=True) - - def emit_custom(self, name: str, message: str, level: LogLevel) -> None: - """Custom emit call for our stdout/stderr redirection.""" - entry = LogEntry(name=name, - message=message, - level=level, - time=utc_now()) - - for call in self._callbacks: - call(entry) - - if self._file is not None: - entry_s = dataclass_to_json(entry) - assert '\n' not in entry_s # Make sure its a single line. - print(entry_s, file=self._file, flush=True) - - def add_callback(self, call: Callable[[LogEntry], None]) -> None: - """Add a callback to be run for each added entry.""" - self._callbacks.append(call) + # Should we be flushing here? + self._echofile.write(f'{cbegin}{entry.message}{cend}\n') -class LogRedirect: - """A file-like object for redirecting stdout/stderr to our log.""" +class FileLogEcho: + """A file-like object for forwarding stdout/stderr to a LogHandler.""" - def __init__(self, name: str, orig_out: Any, log_handler: LogHandler, - log_level: LogLevel): + def __init__(self, original: TextIO, name: str, + handler: LogHandler) -> None: + assert name in ('stdout', 'stderr') + self._original = original self._name = name - self._orig_out = orig_out - self._log_handler = log_handler - self._log_level = log_level - self._chunk = '' - self._chunk_start_time = 0.0 - self._lock = threading.Lock() + self._handler = handler - def write(self, s: str) -> None: - """Write something to output.""" + def write(self, output: Any) -> None: + """Override standard write call.""" + self._original.write(output) + self._handler.file_write(self._name, output) - assert isinstance(s, str) + def flush(self) -> None: + """Flush the file.""" + self._original.flush() - # First, ship it off to the original destination. - self._orig_out.write(s) - - # Now add this to our chunk and ship completed chunks - # off to the logger. - # Let's consider a chunk completed when we're passed - # a single '\n' by itself. (print() statement will do - # this at the end by default). - # We may get some false positives/negatives this way - # but it should result in *most* big multi-line print - # statements being wrapped into a single log entry. - # Also, flush with only_old=True can be called periodically - # to dump any pending chunks that don't happen to fit - # this pattern. - with self._lock: - if s == '\n': - self._log_handler.emit_custom(name=self._name, - message=self._chunk, - level=self._log_level) - self._chunk = '' - else: - if self._chunk == '': - self._chunk_start_time = time.time() - self._chunk += s - - def flush(self, only_old: bool = False) -> None: - """Flushhhhh!""" - self._orig_out.flush() - if only_old and time.time() - self._chunk_start_time < 0.5: - return - with self._lock: - if self._chunk != '': - chunk = self._chunk - if chunk.endswith('\n'): - chunk = chunk[:-1] - self._log_handler.emit_custom(name=self._name, - message=chunk, - level=self._log_level) - self._chunk = '' + def isatty(self) -> bool: + """Are we a terminal?""" + return self._original.isatty() def setup_logging(log_path: str | Path | None, level: LogLevel, - suppress_non_root_debug: bool = False) -> LogHandler: + suppress_non_root_debug: bool = False, + log_stdout_stderr: bool = False) -> LogHandler: """Set up our logging environment. Returns the custom handler which can be used to fetch information @@ -222,26 +293,32 @@ def setup_logging(log_path: str | Path | None, # Wire logger output to go to a structured log file. # Also echo it to stderr IF we're running in a terminal. + # Note: by passing in the *original* stderr here before we + # (potentially) replace it, we ensure that our log echos + # won't themselves be intercepted and sent to the logger + # which would create an infinite loop. loghandler = LogHandler( log_path, echofile=sys.stderr if sys.stderr.isatty() else None, suppress_non_root_debug=suppress_non_root_debug) + # Note: going ahead with force=True here so that we replace any + # existing logger. Though we warn if it looks like we are doing + # that so we can try to avoid creating the first one. + had_previous_handlers = bool(logging.root.handlers) logging.basicConfig(level=lmap[level], format='%(message)s', - handlers=[loghandler]) + handlers=[loghandler], + force=True) + if had_previous_handlers: + logging.warning('setup_logging: force-replacing previous handlers.') - # DISABLING THIS BIT FOR NOW - want to keep things as pure as possible. - if bool(False): - # Now wire Python stdout/stderr output to generate log entries - # in addition to its regular routing. Make sure to do this *after* we - # tell the log-handler to write to stderr, otherwise we get an infinite - # loop. - # NOTE: remember that this won't capture subcommands or other - # non-python stdout/stderr output. - sys.stdout = LogRedirect( # type: ignore - 'stdout', sys.stdout, loghandler, LogLevel.INFO) - sys.stderr = LogRedirect( # type: ignore - 'stderr', sys.stderr, loghandler, LogLevel.INFO) + # Optionally intercept Python's stdout/stderr output and generate + # log entries from it. + if log_stdout_stderr: + sys.stdout = FileLogEcho( # type: ignore + sys.stdout, 'stdout', loghandler) + sys.stderr = FileLogEcho( # type: ignore + sys.stderr, 'stderr', loghandler) return loghandler From 6cfcab8e97e548821f0c2dc8836bbf60c89bb191 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 14 Sep 2022 21:31:24 -0700 Subject: [PATCH 20/40] logging output to sys.stderr is now immediate instead of deferred in bg thread --- .efrocachemap | 40 +++++++++--------- CHANGELOG.md | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/ballistica.cc | 2 +- tools/efro/log.py | 48 +++++++++++----------- 5 files changed, 46 insertions(+), 48 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 3817aff0..e54ad038 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/9a/b0/687077bb5518ba6297514a21cf79", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/9a/07/a28a396bd3aff9c7d8ea4425c972", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/98/86/2b057bf3acb6707ee2345ae48726", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/13/96/49d0b9a8a5a808a619318e4ed3bd", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ed/87/b71085642185d3150a3dd59ed593", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/62/9b/2b1d5dbfa88a3b71c1476940ded0", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b7/12/f1f6253a38af6278dbcc4ee13345", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c7/79/dc992d142c303287a321d22a51c9", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/8a/90/9e476b436c7f9211f2e49308a063", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a8/9c/090dbf15aeb803532b96093ffb2e", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e3/2c/0eb229b654494a9bb99a663bee34", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ff/94/996c258446bcd1587ce55814c10f", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ac/d9/8baaae8352bcd21034d5daea284c", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/7f/f3/2d78f72daebb218658f4dc010e8e", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/75/5e/a887e7a232caed9a4a0a9a0909ae", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/30/0d/f0de21829b62bf1256781df266ed", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/8d/10/a54cfe97f26717ab57477860cb43", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/14/30/350f4c8f8b17326c161a05353afa", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ab/43/79fd942d5e2f99f49726d15fbebd", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/50/fc/8ac0aa34cc5e792dd126a96deb7f", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c6/ea/046da6628c165fc2f57754486fd9", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/b0/fc/a8e896f1f000b21d5cb53d402e04", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/63/8a/8d16dabe1e1cc65b79eb9193faee", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ba/48/f856c0d0a900b7342b0bdc62ae9e", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/1f/57/2e720d8a0dd11809ec104ec9ecab", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a9/d5/bd6e5ca106e8a90262bc8b9dcd60", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1a/3f/8d5e5bd44674ff7a1c1454ad098c", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/11/8b/2bab6adadbf26d312159050ba841", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/86/28/0a2a0560e7d2e756baaeeed1915a", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/dd/5e/9e50b09abfabd164468dfcdf2308", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/87/13/b5b8f50c337edb45488fce4cb1f6", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/43/52/1ad22b14b05e5d47608d90764a6e", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/68/e1/c85510e3f00de73a62fc45a6055b", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d3/60/d9d4ff50d2dc680f01ffc64f8e49", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/64/eb/5f0a49d9c18084cd364986fddadb", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/8c/be/dc1ac45e83fadb21f1e2be223808", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/dd/30/9cc3c63c1e097ce28fa26698f83d", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/84/6d/159447f3d28ccfd80e747f295c9b", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/58/07/c3250bdc3825247bb2db06f4fadf", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/8e/d9/6bafcc87a2ce6749abf5de8300aa", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d5/f6/d62e6e6d5e7fe1945f08ccbb9a8f", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/02/c5/44d0082442b06153a7d7dce4c8ce", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d0/00/61378fb26ddcbf023fd3c40e4ffb", diff --git a/CHANGELOG.md b/CHANGELOG.md index d719a855..3ca3a980 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20849, api 7, 2022-09-14) +### 1.7.7 (build 20851, api 7, 2022-09-14) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 52b9bde7..7522f1e4 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -43,7 +43,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20849 + expected_build = 20851 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 4c2ea9b2..8aff60da 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20849; +const int kAppBuildNumber = 20851; const char* kAppVersion = "1.7.7"; // Our standalone globals. diff --git a/tools/efro/log.py b/tools/efro/log.py index 376a2056..0e91d32e 100644 --- a/tools/efro/log.py +++ b/tools/efro/log.py @@ -45,6 +45,16 @@ LOG_NAMES_TO_LEVELS = { 'CRITICAL': LogLevel.CRITICAL } +LOG_LEVEL_NUMS_TO_COLOR_CODES: dict[int, tuple[str, str]] = { + logging.DEBUG: (TerminalColor.CYAN.value, TerminalColor.RESET.value), + logging.INFO: ('', ''), + logging.WARNING: (TerminalColor.YELLOW.value, TerminalColor.RESET.value), + logging.ERROR: (TerminalColor.RED.value, TerminalColor.RESET.value), + logging.CRITICAL: + (TerminalColor.STRONG_MAGENTA.value + TerminalColor.BOLD.value + + TerminalColor.BG_BLACK.value, TerminalColor.RESET.value), +} + @ioprepped @dataclass @@ -133,6 +143,19 @@ class LogHandler(logging.Handler): # didn't expect to be stringified. msg = self.format(record) + # Also print pretty colored output to our echo file (generally + # stderr). We do this part here instead of in our bg thread + # because the delay can throw off command line prompts or make + # tight debugging harder. + if self._echofile is not None: + cbegin: str + cend: str + cbegin, cend = LOG_LEVEL_NUMS_TO_COLOR_CODES.get( + record.levelno, ('', '')) + + # Should we be flushing here? + self._echofile.write(f'{cbegin}{msg}{cend}\n') + self._event_loop.call_soon_threadsafe( tpartial(self._emit_in_loop, record.name, record.levelname, record.created, msg)) @@ -223,31 +246,6 @@ class LogHandler(logging.Handler): assert '\n' not in entry_s # Make sure its a single line. print(entry_s, file=self._file, flush=True) - # Also print pretty colored output to our echo file (stdout/stderr). - # Note that we don't do this for log entries generated from - # stdout/stderr since that would result in them being printed - # twice. - if (self._echofile is not None - and entry.name not in ('stdout', 'stderr')): - cbegin: str - cend: str - cbegin, cend = { - LogLevel.DEBUG: - (TerminalColor.CYAN.value, TerminalColor.RESET.value), - LogLevel.INFO: ('', ''), - LogLevel.WARNING: - (TerminalColor.YELLOW.value, TerminalColor.RESET.value), - LogLevel.ERROR: - (TerminalColor.RED.value, TerminalColor.RESET.value), - LogLevel.CRITICAL: - (TerminalColor.STRONG_MAGENTA.value + - TerminalColor.BOLD.value + TerminalColor.BG_BLACK.value, - TerminalColor.RESET.value), - }[entry.level] - - # Should we be flushing here? - self._echofile.write(f'{cbegin}{entry.message}{cend}\n') - class FileLogEcho: """A file-like object for forwarding stdout/stderr to a LogHandler.""" From 0b3d7cf0509623722925804b8e970ea84d33f2d8 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 14 Sep 2022 21:46:16 -0700 Subject: [PATCH 21/40] hardening log-handler --- .efrocachemap | 40 +++++++++++----------- CHANGELOG.md | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/ballistica.cc | 2 +- tools/efro/log.py | 3 +- 5 files changed, 25 insertions(+), 24 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index e54ad038..ff6cfb9d 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c6/ea/046da6628c165fc2f57754486fd9", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/b0/fc/a8e896f1f000b21d5cb53d402e04", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/63/8a/8d16dabe1e1cc65b79eb9193faee", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ba/48/f856c0d0a900b7342b0bdc62ae9e", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/1f/57/2e720d8a0dd11809ec104ec9ecab", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a9/d5/bd6e5ca106e8a90262bc8b9dcd60", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1a/3f/8d5e5bd44674ff7a1c1454ad098c", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/11/8b/2bab6adadbf26d312159050ba841", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/86/28/0a2a0560e7d2e756baaeeed1915a", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/dd/5e/9e50b09abfabd164468dfcdf2308", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/87/13/b5b8f50c337edb45488fce4cb1f6", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/43/52/1ad22b14b05e5d47608d90764a6e", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/68/e1/c85510e3f00de73a62fc45a6055b", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d3/60/d9d4ff50d2dc680f01ffc64f8e49", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/64/eb/5f0a49d9c18084cd364986fddadb", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/8c/be/dc1ac45e83fadb21f1e2be223808", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/dd/30/9cc3c63c1e097ce28fa26698f83d", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/84/6d/159447f3d28ccfd80e747f295c9b", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/58/07/c3250bdc3825247bb2db06f4fadf", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/8e/d9/6bafcc87a2ce6749abf5de8300aa", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/34/36/b7e573a9a6b965704b446edaf270", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/89/e0/aa1132c8838e258b6fe7160901e6", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ee/dc/3e11cdd2e2582df97a9abe964e6e", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/28/54/05136c2cb44815be5d467092b159", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/34/c2/95a381f9e57a0dc4a4db34b26737", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/7a/ee/a17e66b1d6255b6f539fd4a1794d", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/14/ca/622aa9e27be7f2d236fae7773091", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/01/c1/7b43251bd79bdd8309c07e64aea9", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/13/54/d43d5724319f11fad667d898f862", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/11/79/6e131fb779bdf84778ba389a60f2", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/24/b6/376347babaea50ecd1186c080242", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/bf/e7/ef1bc6bde1d21020c04468843da7", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/7d/82/fced4505052ba865c054d5656f48", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/51/39/5cefbde594790b158b91dea2fa44", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/87/97/d9c0ef694aa785456c3a9a2b0136", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/33/17/13cf59c8b62af438aea026bf95af", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/84/c3/406dc31fc5f083d0bafec4d49143", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/85/5d/cb2f03fe912763ea021be6962c1e", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ff/d1/aca4359f0dfafaf47c41a7444a72", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/e1/31/ef46f2a9b3883ef32742579ff893", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d5/f6/d62e6e6d5e7fe1945f08ccbb9a8f", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/02/c5/44d0082442b06153a7d7dce4c8ce", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d0/00/61378fb26ddcbf023fd3c40e4ffb", diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ca3a980..b5de86a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20851, api 7, 2022-09-14) +### 1.7.7 (build 20853, api 7, 2022-09-14) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 7522f1e4..6bfd8e6c 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -43,7 +43,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20851 + expected_build = 20853 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 8aff60da..274761a8 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20851; +const int kAppBuildNumber = 20853; const char* kAppVersion = "1.7.7"; // Our standalone globals. diff --git a/tools/efro/log.py b/tools/efro/log.py index 0e91d32e..039481b5 100644 --- a/tools/efro/log.py +++ b/tools/efro/log.py @@ -166,7 +166,8 @@ class LogHandler(logging.Handler): self._emit_entry( LogEntry(name=name, message=message, - level=LOG_NAMES_TO_LEVELS[levelname], + level=LOG_NAMES_TO_LEVELS.get(levelname, + LogLevel.INFO), time=datetime.datetime.fromtimestamp( created, datetime.timezone.utc))) except Exception: From bc59182f806bc80ccbc578d09a574bf0e50ae260 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 14 Sep 2022 22:45:13 -0700 Subject: [PATCH 22/40] fixed newlines on in-game console and telnet server --- .efrocachemap | 40 +++++++++++----------- CHANGELOG.md | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/ballistica.cc | 2 +- src/ballistica/core/logging.cc | 6 ++-- 5 files changed, 27 insertions(+), 25 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index ff6cfb9d..5eeeb076 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/34/36/b7e573a9a6b965704b446edaf270", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/89/e0/aa1132c8838e258b6fe7160901e6", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ee/dc/3e11cdd2e2582df97a9abe964e6e", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/28/54/05136c2cb44815be5d467092b159", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/34/c2/95a381f9e57a0dc4a4db34b26737", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/7a/ee/a17e66b1d6255b6f539fd4a1794d", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/14/ca/622aa9e27be7f2d236fae7773091", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/01/c1/7b43251bd79bdd8309c07e64aea9", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/13/54/d43d5724319f11fad667d898f862", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/11/79/6e131fb779bdf84778ba389a60f2", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/24/b6/376347babaea50ecd1186c080242", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/bf/e7/ef1bc6bde1d21020c04468843da7", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/7d/82/fced4505052ba865c054d5656f48", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/51/39/5cefbde594790b158b91dea2fa44", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/87/97/d9c0ef694aa785456c3a9a2b0136", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/33/17/13cf59c8b62af438aea026bf95af", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/84/c3/406dc31fc5f083d0bafec4d49143", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/85/5d/cb2f03fe912763ea021be6962c1e", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ff/d1/aca4359f0dfafaf47c41a7444a72", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/e1/31/ef46f2a9b3883ef32742579ff893", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a5/a8/9d3491007df68a350cbde1416c19", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/cf/46/edc440b82d790bfaf6442655fb00", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/19/54/871a764ff37f2403394b64f6c67c", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5c/29/aa06b7aab528b711d6f36df7e7fe", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c0/24/d15917e364ed6d828c365146bd77", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/78/0c/3f455338341af8e01f386064f46a", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/07/a5/18ea8943f2cd24956003a966459f", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/db/09/ab3381c7f3379ce1236863bdd59d", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b1/8c/fd9dc45ba9d875f7831d071a0caf", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/16/b7/c3dc3b169eac2f903ef30ed1cad5", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/19/0a/0cc50f509eee00a19976d3729290", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d8/37/4e73e8e866c6152a0dfcb0f71ec8", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c4/3d/612c9aa69aab61b0a8422fe3b5e2", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/6c/ff/e6e882a7675d7e4466d0ba429180", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1e/d8/c29cb8b89ea52683859e72c98786", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a6/e7/02ef6d8e0a808c9f69544c25db09", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/d3/44/210d37b4577a1fd4fc4ca63913ca", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/29/d7/6cb90c1c86b2a466020e8c11d3fc", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/25/22/d3ceba9f8502a410c25665f7b0ae", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/17/4e/3c1b5f065732a4aa8d6f4bc71589", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d5/f6/d62e6e6d5e7fe1945f08ccbb9a8f", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/02/c5/44d0082442b06153a7d7dce4c8ce", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d0/00/61378fb26ddcbf023fd3c40e4ffb", diff --git a/CHANGELOG.md b/CHANGELOG.md index b5de86a6..95e82d64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20853, api 7, 2022-09-14) +### 1.7.7 (build 20855, api 7, 2022-09-14) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 6bfd8e6c..244258b2 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -43,7 +43,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20853 + expected_build = 20855 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 274761a8..a092112f 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20853; +const int kAppBuildNumber = 20855; const char* kAppVersion = "1.7.7"; // Our standalone globals. diff --git a/src/ballistica/core/logging.cc b/src/ballistica/core/logging.cc index 35805da9..50a66c90 100644 --- a/src/ballistica/core/logging.cc +++ b/src/ballistica/core/logging.cc @@ -34,10 +34,12 @@ auto Logging::Log(LogLevel level, const std::string& msg) -> void { auto Logging::DisplayLog(const std::string& name, LogLevel level, const std::string& msg) -> void { + auto msgnewline{msg + "\n"}; + // Print to in-game console. { if (g_logic != nullptr) { - g_logic->PushConsolePrintCall(msg); + g_logic->PushConsolePrintCall(msgnewline); } else { if (g_platform != nullptr) { g_platform->DisplayLog("root", LogLevel::kWarning, @@ -49,7 +51,7 @@ auto Logging::DisplayLog(const std::string& name, LogLevel level, // Print to any telnet clients. if (g_app && g_app->telnet_server) { - g_app->telnet_server->PushPrint(msg); + g_app->telnet_server->PushPrint(msgnewline); } // Ship to platform-specific display mechanisms (android log, etc). From 3816f1dcb9793c861c5cd6b89a0f3b42a4efd981 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 15 Sep 2022 09:24:57 -0700 Subject: [PATCH 23/40] a bit of logging tidying --- .efrocachemap | 56 +++++++++---------- .idea/dictionaries/ericf.xml | 1 + CHANGELOG.md | 3 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- .../.idea/dictionaries/ericf.xml | 1 + src/ballistica/audio/audio_server.cc | 6 +- src/ballistica/ballistica.cc | 2 +- src/ballistica/ballistica.h | 10 +++- src/ballistica/generic/huffman.cc | 7 ++- src/ballistica/graphics/gl/gl_sys.cc | 12 ++-- src/ballistica/graphics/gl/renderer_gl.cc | 13 +++-- src/ballistica/input/input.cc | 2 +- src/ballistica/logic/logic.cc | 2 +- src/ballistica/logic/player.cc | 4 +- src/ballistica/logic/session/host_session.cc | 2 +- tools/efro/log.py | 26 ++++----- 16 files changed, 77 insertions(+), 72 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 5eeeb076..a767e9d7 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a5/a8/9d3491007df68a350cbde1416c19", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/cf/46/edc440b82d790bfaf6442655fb00", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/19/54/871a764ff37f2403394b64f6c67c", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5c/29/aa06b7aab528b711d6f36df7e7fe", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c0/24/d15917e364ed6d828c365146bd77", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/78/0c/3f455338341af8e01f386064f46a", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/07/a5/18ea8943f2cd24956003a966459f", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/db/09/ab3381c7f3379ce1236863bdd59d", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b1/8c/fd9dc45ba9d875f7831d071a0caf", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/16/b7/c3dc3b169eac2f903ef30ed1cad5", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/19/0a/0cc50f509eee00a19976d3729290", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d8/37/4e73e8e866c6152a0dfcb0f71ec8", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c4/3d/612c9aa69aab61b0a8422fe3b5e2", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/6c/ff/e6e882a7675d7e4466d0ba429180", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1e/d8/c29cb8b89ea52683859e72c98786", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a6/e7/02ef6d8e0a808c9f69544c25db09", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/d3/44/210d37b4577a1fd4fc4ca63913ca", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/29/d7/6cb90c1c86b2a466020e8c11d3fc", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/25/22/d3ceba9f8502a410c25665f7b0ae", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/17/4e/3c1b5f065732a4aa8d6f4bc71589", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/15/b2/0744afc264f1e55a5944bf8ae964", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/8e/98/ea10bd892f89c7ba5aec76721667", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/aa/e4/7c73515c9044e051a5d07cb1e964", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ba/37/245e7c3dc79588d73a57f9f08b55", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ad/28/034d014eea6aeba4b67d51cfc262", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/77/df/c85dfe5cb062b6925da7df8e740c", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/58/6b/058b05227950f5d83f23b01617d1", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/bd/31/02ecb4d8c3bea8eb68d92befdd9d", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/aa/9d/96555101ebf8b14223b7639cea5b", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/1d/9a/16feda78b815cbed47b89983c48e", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b0/31/f60dc64681a35406595ed4836f0a", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b5/44/eb4645945794253446c55dc682bc", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/43/56/592cd419bfad9cbbb6e3f57c1007", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c6/55/0dfcc3d90a9cee9212e2e10a91b1", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/19/c6/994729e095b54e6963ac2d4bbd10", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ce/21/77cd76cd1b0307ae8cc7038152e7", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a9/e6/23835561d55b6c1d1862217fc115", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/21/3d/e0a1e20ae12dd7b5ba1d61aed074", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/be/b5/fc827900f411576b992fc15a25fc", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/6f/51/d6a0951b6ab9122dd99ef33d4427", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d5/f6/d62e6e6d5e7fe1945f08ccbb9a8f", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/02/c5/44d0082442b06153a7d7dce4c8ce", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d0/00/61378fb26ddcbf023fd3c40e4ffb", @@ -4031,14 +4031,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ff/26/da4a58abecf5d9275477eaec0c17", "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/62/5d/8658a206b8c9b741be2422162784", "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fc/57/d59920e098d23a2d150c899cde29", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/85/19/3c25e72ea3976b7d854c21696ec4", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/50/21/6c275dad22cc2cc1f95e21652c29", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/a0/1a/f894ee82b89dcb4a43c36ab882ee", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/c3/6a/0e89ae233f6ae76351d33ed2b0e6", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/ce/ba/c5a0c9b8224dc8df02c5189e22ac", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/1d/3a/560a77a6c97f6f39b765211b1ed8", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/5b/fb/b8c70b2a72452da1af92844335b8", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/a9/6c/12e1188dc02708b0b0fee30835b9", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/fb/8e/3bb1c858451a447f1a102d77c281", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/ae/ad/13ae735e45d31d2944c89e8bdcec", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/e8/3e/6c2546278ad0428965a05c9bd536", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/d4/e5/0fe217cac5837cf663c7c7f1aa92", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/ea/38/a5082d73202113900166a1ebd15f", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/ba/1c/16df69d156e23ab29e2c84465bd7", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/9e/b0/91b2e0b1dbd4541543f3f147bc06", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/c1/04/ad892d77317be76bc8fa035f9e86", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/c0/32/b7907e3859a5c5013a3d97b6b523", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/2d/4f/f4fe67827f36cd59cd5193333a02", "src/ballistica/generated/python_embedded/bootstrap_monolithic.inc": "https://files.ballistica.net/cache/ba1/ef/c1/aa5f1aa10af89f5c0b1e616355fd" diff --git a/.idea/dictionaries/ericf.xml b/.idea/dictionaries/ericf.xml index 8c4ff566..760346e2 100644 --- a/.idea/dictionaries/ericf.xml +++ b/.idea/dictionaries/ericf.xml @@ -1346,6 +1346,7 @@ levelgametype levelmodule levelname + levelno lfull lfval libballisticacore diff --git a/CHANGELOG.md b/CHANGELOG.md index 95e82d64..6479bda6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20855, api 7, 2022-09-14) +### 1.7.7 (build 20856, api 7, 2022-09-15) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. @@ -35,6 +35,7 @@ - Added `_ba.display_log()` function which ships a log message to the in-game terminal and platform-specific places like the Android log. The engine wires up standard Python logging output to go through this. - Added `_ba.v1_cloud_log()` which ships a message to the old v1-cloud-log (the log which is gathered and sent to the v1 master server to help me identify problems people are seeing). This is presently wired up to a subset of Python logging output to approximate how it used to work. - Note: Previously in the C++ layer some code would mix Python print calls (such as PyErr_PrintEx()) with ballistica::Log() calls. Previously these all wound up going to the same place (Python's sys.stderr) so it worked, but now they no longer do and so this sort of mixing should be avoided. So if you see a weird combination of colored log output lines with non-colored lines that seem to go together, please holler as it means something needs to be fixed. +- Builds for Apple devices now set a thread stack size of 1MB. The default there is 512k and I was seeing some stack overflows for heavy Physics sims or very recursive Python stuff. ### 1.7.6 (build 20687, api 7, 2022-08-11) diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 244258b2..0b54ef3c 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -43,7 +43,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20855 + expected_build = 20856 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/ballisticacore-cmake/.idea/dictionaries/ericf.xml b/ballisticacore-cmake/.idea/dictionaries/ericf.xml index 487dfc87..45474675 100644 --- a/ballisticacore-cmake/.idea/dictionaries/ericf.xml +++ b/ballisticacore-cmake/.idea/dictionaries/ericf.xml @@ -702,6 +702,7 @@ leaderboard leaderboards lenval + levelno lgui lhalf libbz diff --git a/src/ballistica/audio/audio_server.cc b/src/ballistica/audio/audio_server.cc index 295bb803..511d8a97 100644 --- a/src/ballistica/audio/audio_server.cc +++ b/src/ballistica/audio/audio_server.cc @@ -367,8 +367,8 @@ auto AudioServer::OnAppStartInThread() -> void { // If the string is blank, we weren't able to find the oculus // audio device. In that case we'll just go with default. if (g_rift_audio_device_name != "") { - // Log("AL Devices list:"); - // Log("----------"); + // Log(LogLevel::kInfo, "AL Devices list:"); + // Log(LogLevel::kInfo, "----------"); while (device && *device != '\0' && next && *next != '\0') { // These names seem to be things like "OpenAL Soft on FOO" // ..we should be able to search for FOO. @@ -379,7 +379,7 @@ auto AudioServer::OnAppStartInThread() -> void { device += (len + 1); next += (len + 2); } - // Log("----------"); + // Log(LogLevel::kInfo, "----------"); } } } diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index a092112f..568e0e6c 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20855; +const int kAppBuildNumber = 20856; const char* kAppVersion = "1.7.7"; // Our standalone globals. diff --git a/src/ballistica/ballistica.h b/src/ballistica/ballistica.h index 33cf255a..d4aef692 100644 --- a/src/ballistica/ballistica.h +++ b/src/ballistica/ballistica.h @@ -165,9 +165,13 @@ auto InNetworkWriteThread() -> bool; /// Return a human-readable name for the current thread. auto GetCurrentThreadName() -> std::string; -/// Write a string to the log. -/// This will go to stdout, windows debug log, android log, etc. -/// A trailing newline will be added. +/// Submit a log entry. +/// Can be called from any thread at any time. +/// Use either this or Python printing functionality for anything +/// that should be seen by the user, as both of those will end up +/// in the in-app console, cloud based consoles, android log, etc. +/// Regular C level prints to stdout/stderr will not and will only +/// be visible on some platforms. auto Log(LogLevel level, const std::string& msg) -> void; /// Log a fatal error and kill the app. diff --git a/src/ballistica/generic/huffman.cc b/src/ballistica/generic/huffman.cc index 6e35daba..0aec4919 100644 --- a/src/ballistica/generic/huffman.cc +++ b/src/ballistica/generic/huffman.cc @@ -407,7 +407,8 @@ void Huffman::decompress(const char* data, uint32_t length, // fixme?? if (bytes > kMaxPacketSize) { - Log("HUFFMAN DECOMPRESSING TO TOO LARGE: " + std::to_string(bytes)); + Log(LogLevel::kError, "HUFFMAN DECOMPRESSING TO TOO LARGE: " + + std::to_string(bytes)); } assert(bytes <= kMaxPacketSize); @@ -459,7 +460,7 @@ void Huffman::train(const char* buffer, int len) { len--; } if (total_length > kTrainingLength) { - Log("HUFFMAN TRAINING COMPLETE:"); + Log(LogLevel::kInfo, "HUFFMAN TRAINING COMPLETE:"); build(); @@ -470,7 +471,7 @@ void Huffman::train(const char* buffer, int len) { if (i < 255) s += ","; } s += "}"; - Log("FINAL: " + s); + Log(LogLevel::kInfo, "FINAL: " + s); } } #endif // HUFFMAN_TRAINING_MODE diff --git a/src/ballistica/graphics/gl/gl_sys.cc b/src/ballistica/graphics/gl/gl_sys.cc index 221a5e35..f804fc39 100644 --- a/src/ballistica/graphics/gl/gl_sys.cc +++ b/src/ballistica/graphics/gl/gl_sys.cc @@ -24,12 +24,12 @@ #endif #if BA_DEBUG_BUILD -#define DEBUG_CHECK_GL_ERROR \ - { \ - GLenum err = glGetError(); \ - if (err != GL_NO_ERROR) \ - Log("OPENGL ERROR AT LINE " + std::to_string(__LINE__) + ": " \ - + GLErrorToString(err)); \ +#define DEBUG_CHECK_GL_ERROR \ + { \ + GLenum err = glGetError(); \ + if (err != GL_NO_ERROR) \ + Log(LogLevel::kError, "OPENGL ERROR AT LINE " + std::to_string(__LINE__) \ + + ": " + GLErrorToString(err)); \ } #else #define DEBUG_CHECK_GL_ERROR diff --git a/src/ballistica/graphics/gl/renderer_gl.cc b/src/ballistica/graphics/gl/renderer_gl.cc index 5b0ccef3..1b6f0988 100644 --- a/src/ballistica/graphics/gl/renderer_gl.cc +++ b/src/ballistica/graphics/gl/renderer_gl.cc @@ -769,7 +769,6 @@ class RendererGL::FramebufferObjectGL : public Framebuffer { GLenum format = GL_UNSIGNED_BYTE; #endif // if (srgbTest) { - // Log("YOOOOOOO"); // glTexImage2D(GL_TEXTURE_2D, 0, alpha_?GL_SRGB8_ALPHA8:GL_SRGB8, // _width, _height, 0, alpha_?GL_RGBA:GL_RGB, format, nullptr); // } else { @@ -910,11 +909,11 @@ class RendererGL::FramebufferObjectGL : public Framebuffer { // glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, // GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, &enc); if // (enc == GL_SRGB) { - // Log("GOT SRGB!!!!!!!!!!!"); + // Log(LogLevel::kInfo, "GOT SRGB!!!!!!!!!!!"); // } else if (enc == GL_LINEAR) { - // Log("GOT LINEAR..."); + // Log(LogLevel::kInfo, "GOT LINEAR..."); // } else { - // Log("GOT OTHER.."); + // Log(LogLevel::kInfo, "GOT OTHER.."); // } loaded_ = true; } @@ -2464,7 +2463,8 @@ class RendererGL::PostProcessProgramGL : public RendererGL::ProgramGL { s += "}"; if (flags & SHD_DEBUG_PRINT) - Log("\nVertex code for shader '" + GetName(flags) + "':\n\n" + s); + Log(LogLevel::kInfo, + "\nVertex code for shader '" + GetName(flags) + "':\n\n" + s); return s; } string GetFragmentCode(int flags) { @@ -2478,7 +2478,8 @@ class RendererGL::PostProcessProgramGL : public RendererGL::ProgramGL { s += "}"; if (flags & SHD_DEBUG_PRINT) - Log("\nFragment code for shader '" + GetName(flags) + "':\n\n" + s); + Log(LogLevel::kInfo, + "\nFragment code for shader '" + GetName(flags) + "':\n\n" + s); return s; } diff --git a/src/ballistica/input/input.cc b/src/ballistica/input/input.cc index 1137276b..b0745074 100644 --- a/src/ballistica/input/input.cc +++ b/src/ballistica/input/input.cc @@ -1058,7 +1058,7 @@ void Input::HandleBackPress(bool from_toolbar) { if (g_ui == nullptr || g_ui->screen_root_widget() == nullptr || g_ui->overlay_root_widget() == nullptr || g_ui->root_widget() == nullptr) { - // Log("HandleBackPress() called without main UI"); + // Log(LogLevel::kError, "HandleBackPress() called without main UI"); return; } diff --git a/src/ballistica/logic/logic.cc b/src/ballistica/logic/logic.cc index a791d3f0..c40a3d9e 100644 --- a/src/ballistica/logic/logic.cc +++ b/src/ballistica/logic/logic.cc @@ -619,7 +619,7 @@ void Logic::Update() { } else { // If we've gone too far already, bail. if (master_time_ >= max_target_master_time) { - // Log("BAILING EARLY"); + // Log(LogLevel::kError, "BAILING EARLY"); // On rift if this is a 2-step and we bailed after 1, aim for 2 again // next time (otherwise we'll always get 3 singles in a row when this // happens). diff --git a/src/ballistica/logic/player.cc b/src/ballistica/logic/player.cc index 78589270..4571e24b 100644 --- a/src/ballistica/logic/player.cc +++ b/src/ballistica/logic/player.cc @@ -380,8 +380,8 @@ void Player::InputCommand(InputType type, float value) { RunInput(type, value); break; // case InputType::kReset: - // Log("Error: FIXME: player-input-reset command unimplemented"); - // break; + // Log(LogLevel::kError, "FIXME: player-input-reset command + // unimplemented"); break; default: RunInput(type); break; diff --git a/src/ballistica/logic/session/host_session.cc b/src/ballistica/logic/session/host_session.cc index caa5b7dc..57f4f2be 100644 --- a/src/ballistica/logic/session/host_session.cc +++ b/src/ballistica/logic/session/host_session.cc @@ -32,7 +32,7 @@ HostSession::HostSession(PyObject* session_type_obj) is_main_menu_ = static_cast(strstr(Python::ObjToString(session_type_obj).c_str(), "bastd.mainmenu.MainMenuSession")); - // Log("MAIN MENU? " + std::to_string(is_main_menu())); + // Log(LogLevel::kInfo, "MAIN MENU? " + std::to_string(is_main_menu())); kick_idle_players_ = g_logic->kick_idle_players(); diff --git a/tools/efro/log.py b/tools/efro/log.py index 039481b5..684e6a69 100644 --- a/tools/efro/log.py +++ b/tools/efro/log.py @@ -37,15 +37,15 @@ class LogLevel(Enum): CRITICAL = 4 -LOG_NAMES_TO_LEVELS = { - 'DEBUG': LogLevel.DEBUG, - 'INFO': LogLevel.INFO, - 'WARNING': LogLevel.WARNING, - 'ERROR': LogLevel.ERROR, - 'CRITICAL': LogLevel.CRITICAL +LEVELNO_LOG_LEVELS = { + logging.DEBUG: LogLevel.DEBUG, + logging.INFO: LogLevel.INFO, + logging.WARNING: LogLevel.WARNING, + logging.ERROR: LogLevel.ERROR, + logging.CRITICAL: LogLevel.CRITICAL } -LOG_LEVEL_NUMS_TO_COLOR_CODES: dict[int, tuple[str, str]] = { +LEVELNO_COLOR_CODES: dict[int, tuple[str, str]] = { logging.DEBUG: (TerminalColor.CYAN.value, TerminalColor.RESET.value), logging.INFO: ('', ''), logging.WARNING: (TerminalColor.YELLOW.value, TerminalColor.RESET.value), @@ -150,24 +150,20 @@ class LogHandler(logging.Handler): if self._echofile is not None: cbegin: str cend: str - cbegin, cend = LOG_LEVEL_NUMS_TO_COLOR_CODES.get( - record.levelno, ('', '')) - - # Should we be flushing here? + cbegin, cend = LEVELNO_COLOR_CODES.get(record.levelno, ('', '')) self._echofile.write(f'{cbegin}{msg}{cend}\n') self._event_loop.call_soon_threadsafe( - tpartial(self._emit_in_loop, record.name, record.levelname, + tpartial(self._emit_in_loop, record.name, record.levelno, record.created, msg)) - def _emit_in_loop(self, name: str, levelname: str, created: float, + def _emit_in_loop(self, name: str, levelno: int, created: float, message: str) -> None: try: self._emit_entry( LogEntry(name=name, message=message, - level=LOG_NAMES_TO_LEVELS.get(levelname, - LogLevel.INFO), + level=LEVELNO_LOG_LEVELS.get(levelno, LogLevel.INFO), time=datetime.datetime.fromtimestamp( created, datetime.timezone.utc))) except Exception: From d3f3679473aa10c74d2994a27764b7f9f0dc5a55 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 15 Sep 2022 12:40:56 -0700 Subject: [PATCH 24/40] lang updates and cache functionality for LogHandler --- .efrocachemap | 72 +++++------ CHANGELOG.md | 2 +- assets/src/ba_data/python/._ba_sources_hash | 2 +- assets/src/ba_data/python/_ba.py | 11 +- assets/src/ba_data/python/ba/_bootstrap.py | 5 +- src/ballistica/ballistica.cc | 2 +- src/ballistica/logic/logic.h | 6 +- .../python/methods/python_methods_app.cc | 14 +-- src/ballistica/python/python.cc | 2 +- tools/efro/log.py | 115 ++++++++++++++---- 10 files changed, 152 insertions(+), 79 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index a767e9d7..9a8a07d8 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -420,8 +420,8 @@ "assets/build/ba_data/audio/zoeOw.ogg": "https://files.ballistica.net/cache/ba1/60/ad/38269b7f1c7dc20cb9a506cd0681", "assets/build/ba_data/audio/zoePickup01.ogg": "https://files.ballistica.net/cache/ba1/72/85/d6fc4d16b7081d91fba2850b5b10", "assets/build/ba_data/audio/zoeScream01.ogg": "https://files.ballistica.net/cache/ba1/e9/ae/1d674d0c086eaa0bd1c3b1db0505", - "assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/e8/42/a43c158be7fa45f2c0c3d4b84a1f", - "assets/build/ba_data/data/languages/arabic.json": "https://files.ballistica.net/cache/ba1/5b/cf/4501b151257c3d8d6ee8d0497d14", + "assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/d4/64/6fff42a428e5c775795c081474e6", + "assets/build/ba_data/data/languages/arabic.json": "https://files.ballistica.net/cache/ba1/e2/24/5e7ea9ca5c9de4d3b7a28e53564d", "assets/build/ba_data/data/languages/belarussian.json": "https://files.ballistica.net/cache/ba1/61/03/89070ca765e06da3a419a579f503", "assets/build/ba_data/data/languages/chinese.json": "https://files.ballistica.net/cache/ba1/f8/15/e1a2fa38697417bcf2cf19cd34ef", "assets/build/ba_data/data/languages/chinesetraditional.json": "https://files.ballistica.net/cache/ba1/44/aa/c12568afb4558dc7f9f2fa155467", @@ -431,17 +431,17 @@ "assets/build/ba_data/data/languages/dutch.json": "https://files.ballistica.net/cache/ba1/68/93/da8e9874f41a786edf52ba4ccaad", "assets/build/ba_data/data/languages/english.json": "https://files.ballistica.net/cache/ba1/72/80/d6395c8a168558750c0d79ce769b", "assets/build/ba_data/data/languages/esperanto.json": "https://files.ballistica.net/cache/ba1/4c/c7/0184b8178869d1a3827a1bfcd5bb", - "assets/build/ba_data/data/languages/filipino.json": "https://files.ballistica.net/cache/ba1/8f/73/093120ae2241d8f4b899ccda2d75", - "assets/build/ba_data/data/languages/french.json": "https://files.ballistica.net/cache/ba1/25/65/1cb03566e73811fc6e1b841d9072", + "assets/build/ba_data/data/languages/filipino.json": "https://files.ballistica.net/cache/ba1/e9/07/b2dc862601bcd70701b083d43279", + "assets/build/ba_data/data/languages/french.json": "https://files.ballistica.net/cache/ba1/2e/48/b0a8fafc5e5436e99d9a3d697d23", "assets/build/ba_data/data/languages/german.json": "https://files.ballistica.net/cache/ba1/ef/e6/d4909f571d7473fd04055728490e", "assets/build/ba_data/data/languages/gibberish.json": "https://files.ballistica.net/cache/ba1/8a/2a/b2bc00eed0608b2199b2bc379b2e", "assets/build/ba_data/data/languages/greek.json": "https://files.ballistica.net/cache/ba1/82/eb/37ff44af76812097f9c98f05c730", - "assets/build/ba_data/data/languages/hindi.json": "https://files.ballistica.net/cache/ba1/50/e8/837be1324c8128507b3df89b689f", + "assets/build/ba_data/data/languages/hindi.json": "https://files.ballistica.net/cache/ba1/91/98/42701cd595c2f70b7484614a8f49", "assets/build/ba_data/data/languages/hungarian.json": "https://files.ballistica.net/cache/ba1/d8/f2/aa16bc336bd7660cc86c3264bfc4", - "assets/build/ba_data/data/languages/indonesian.json": "https://files.ballistica.net/cache/ba1/e3/85/14e57e3f49505e5a190daf7fe276", + "assets/build/ba_data/data/languages/indonesian.json": "https://files.ballistica.net/cache/ba1/23/3b/26e9be528460af952a11e98c3b68", "assets/build/ba_data/data/languages/italian.json": "https://files.ballistica.net/cache/ba1/1a/10/9563348e729d1e5c8ae8c9cbc1f2", "assets/build/ba_data/data/languages/korean.json": "https://files.ballistica.net/cache/ba1/a8/e9/171a904f1331fdb7b1918a0f2598", - "assets/build/ba_data/data/languages/persian.json": "https://files.ballistica.net/cache/ba1/83/4a/ec10142ac479bf8d80455b47a62b", + "assets/build/ba_data/data/languages/persian.json": "https://files.ballistica.net/cache/ba1/df/b1/b2c9ebaad5e873ebedd365726d3d", "assets/build/ba_data/data/languages/polish.json": "https://files.ballistica.net/cache/ba1/19/e9/59c891b1fb85f3ba9f19283c233d", "assets/build/ba_data/data/languages/portuguese.json": "https://files.ballistica.net/cache/ba1/da/95/36797ec53a697a04e55b225a701d", "assets/build/ba_data/data/languages/romanian.json": "https://files.ballistica.net/cache/ba1/d7/06/9d70642d0a4d1e3b1c2149d7a17c", @@ -452,7 +452,7 @@ "assets/build/ba_data/data/languages/swedish.json": "https://files.ballistica.net/cache/ba1/91/0a/35c4baf539d5951fc03a794c0e0b", "assets/build/ba_data/data/languages/tamil.json": "https://files.ballistica.net/cache/ba1/94/1a/533bc718e676191bafc25e2dc98f", "assets/build/ba_data/data/languages/thai.json": "https://files.ballistica.net/cache/ba1/f7/df/7ba5f99c5c2c4c86fc0503fcf0b7", - "assets/build/ba_data/data/languages/turkish.json": "https://files.ballistica.net/cache/ba1/14/a0/783cc6da2d122e9a7482c6a5ef8c", + "assets/build/ba_data/data/languages/turkish.json": "https://files.ballistica.net/cache/ba1/9a/90/8e2ed626def09f88c3b9ab5215a3", "assets/build/ba_data/data/languages/ukrainian.json": "https://files.ballistica.net/cache/ba1/ab/35/644e4239cfa62a597a905412b90c", "assets/build/ba_data/data/languages/venetian.json": "https://files.ballistica.net/cache/ba1/53/9e/068074156b38bab7f732977a4031", "assets/build/ba_data/data/languages/vietnamese.json": "https://files.ballistica.net/cache/ba1/25/13/b64b849fc9fedcc18d81f6e08c4d", @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/15/b2/0744afc264f1e55a5944bf8ae964", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/8e/98/ea10bd892f89c7ba5aec76721667", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/aa/e4/7c73515c9044e051a5d07cb1e964", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ba/37/245e7c3dc79588d73a57f9f08b55", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ad/28/034d014eea6aeba4b67d51cfc262", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/77/df/c85dfe5cb062b6925da7df8e740c", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/58/6b/058b05227950f5d83f23b01617d1", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/bd/31/02ecb4d8c3bea8eb68d92befdd9d", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/aa/9d/96555101ebf8b14223b7639cea5b", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/1d/9a/16feda78b815cbed47b89983c48e", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b0/31/f60dc64681a35406595ed4836f0a", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b5/44/eb4645945794253446c55dc682bc", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/43/56/592cd419bfad9cbbb6e3f57c1007", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c6/55/0dfcc3d90a9cee9212e2e10a91b1", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/19/c6/994729e095b54e6963ac2d4bbd10", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ce/21/77cd76cd1b0307ae8cc7038152e7", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a9/e6/23835561d55b6c1d1862217fc115", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/21/3d/e0a1e20ae12dd7b5ba1d61aed074", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/be/b5/fc827900f411576b992fc15a25fc", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/6f/51/d6a0951b6ab9122dd99ef33d4427", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/f3/e1/0ee9ade5e9943dc4749aa4cc2182", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/32/4e/a7c1b096c62864641a59e65e7778", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/6a/f4/8b86611cbaa7237c8a52e8fe6428", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/13/f5/fa3c97269613316994f0c2134860", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/f8/7a/87877003ee3a13ff7cbbf1ec76a2", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/81/0c/708a16fff55ee37338b2d87f7620", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4a/91/89523b8f155261e0045a6bb6e277", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a9/04/da76c8e848852fef1e58577f59e3", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/dd/ac/33aed9cc1396ccba2111dfed02f6", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/1a/5a/0f1e671137a2ec60c2df8e95e078", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/92/50/ec5fbb3f8b9f4a60934f2dacf180", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/7c/77/a430bf182d5210792716b6dbd8ee", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ef/6b/de6c811fa70bf4d5d1cdfe49eaae", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/92/e0/b9b1053231d7323d185298f8caaa", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/08/ef/c70efcd89a666758437f0736d956", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9d/94/1f0d32c943b64ff558f28ad89653", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a6/fb/a6e6a78d7b04d547c9c716ff0a8e", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/5a/b0/d0e087fcdf1756a0b9b5bf805f10", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/34/fb/e6c9fb0e20af0ba3376ca2abba29", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/b1/8b/5ba626c39ef586f3ba4bfd508181", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d5/f6/d62e6e6d5e7fe1945f08ccbb9a8f", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/02/c5/44d0082442b06153a7d7dce4c8ce", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d0/00/61378fb26ddcbf023fd3c40e4ffb", @@ -4031,14 +4031,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ff/26/da4a58abecf5d9275477eaec0c17", "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/62/5d/8658a206b8c9b741be2422162784", "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fc/57/d59920e098d23a2d150c899cde29", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/fb/8e/3bb1c858451a447f1a102d77c281", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/ae/ad/13ae735e45d31d2944c89e8bdcec", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/e8/3e/6c2546278ad0428965a05c9bd536", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/d4/e5/0fe217cac5837cf663c7c7f1aa92", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/ea/38/a5082d73202113900166a1ebd15f", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/ba/1c/16df69d156e23ab29e2c84465bd7", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/9e/b0/91b2e0b1dbd4541543f3f147bc06", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/c1/04/ad892d77317be76bc8fa035f9e86", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/39/a1/bce547622da143fcf9ea970cd3ab", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/d6/f3/8ca052a667342e316fa09655bc51", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/e0/b4/99c403ccbfd0c4b9b071e656d480", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/11/a0/e06103dae63a4648850bd089aacb", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/77/17/99eba0c7d42a9452306f7927ae4e", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/92/da/2faf9031e7c5ba5a99dd9e0c609d", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/64/2a/1b30ee7b4e8238ec2ea16bcacdeb", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/41/92/35b689da32ee45a4e7483feae8f8", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/c0/32/b7907e3859a5c5013a3d97b6b523", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/2d/4f/f4fe67827f36cd59cd5193333a02", "src/ballistica/generated/python_embedded/bootstrap_monolithic.inc": "https://files.ballistica.net/cache/ba1/ef/c1/aa5f1aa10af89f5c0b1e616355fd" diff --git a/CHANGELOG.md b/CHANGELOG.md index 6479bda6..b348d5cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20856, api 7, 2022-09-15) +### 1.7.7 (build 20857, api 7, 2022-09-15) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. diff --git a/assets/src/ba_data/python/._ba_sources_hash b/assets/src/ba_data/python/._ba_sources_hash index d78d9181..8eee74b6 100644 --- a/assets/src/ba_data/python/._ba_sources_hash +++ b/assets/src/ba_data/python/._ba_sources_hash @@ -1 +1 @@ -76251027805752156826413428926087661089 \ No newline at end of file +41453813326605937968225345803585801012 \ No newline at end of file diff --git a/assets/src/ba_data/python/_ba.py b/assets/src/ba_data/python/_ba.py index 34e91a0a..0f4b6cb3 100644 --- a/assets/src/ba_data/python/_ba.py +++ b/assets/src/ba_data/python/_ba.py @@ -2518,11 +2518,12 @@ def screenmessage(message: str | ba.Lstr, Category: **General Utility Functions** If 'top' is True, the message will go to the top message area. - For 'top' messages, 'image' can be a texture to display alongside the - message. - If 'log' is True, the message will also be printed to the output log - 'clients' can be a list of client-ids the message should be sent to, - or None to specify that everyone should receive it. + For 'top' messages, 'image' must be a dict containing 'texture' + and 'tint_texture' textures and 'tint_color' and 'tint2_color' + colors. This defines an icon to display alongside the message. + If 'log' is True, the message will also be submitted to the log. + 'clients' can be a list of client-ids the message should be sent + to, or None to specify that everyone should receive it. If 'transient' is True, the message will not be included in the game-stream and thus will not show up when viewing replays. Currently the 'clients' option only works for transient messages. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 0b54ef3c..d3089177 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -35,7 +35,8 @@ def bootstrap() -> None: log_handler = setup_logging(log_path=None, level=LogLevel.DEBUG, suppress_non_root_debug=True, - log_stdout_stderr=True) + log_stdout_stderr=True, + cache_size_limit=1024 * 1024) log_handler.add_callback(_on_log) @@ -43,7 +44,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20856 + expected_build = 20857 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 568e0e6c..676a9493 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20856; +const int kAppBuildNumber = 20857; const char* kAppVersion = "1.7.7"; // Our standalone globals. diff --git a/src/ballistica/logic/logic.h b/src/ballistica/logic/logic.h index 57799970..c1d55633 100644 --- a/src/ballistica/logic/logic.h +++ b/src/ballistica/logic/logic.h @@ -19,9 +19,9 @@ namespace ballistica { const int kMaxPartyNameCombinedSize = 25; -/// The Game Module generally runs on a dedicated thread; it manages -/// all game logic, builds frame_defs to send to the graphics-server for -/// rendering, etc. +/// The logic subsystem of the app. This runs on a dedicated thread +/// and is where high level app logic happens. Much app functionality +/// including UI calls must be run on the logic thread. class Logic { public: Logic(); diff --git a/src/ballistica/python/methods/python_methods_app.cc b/src/ballistica/python/methods/python_methods_app.cc index 44f2e45b..3ed0d566 100644 --- a/src/ballistica/python/methods/python_methods_app.cc +++ b/src/ballistica/python/methods/python_methods_app.cc @@ -988,14 +988,12 @@ auto PythonMethodsApp::GetMethods() -> std::vector { "Category: **General Utility Functions**\n" "\n" "If 'top' is True, the message will go to the top message area.\n" - "For 'top' messages, 'image' can be a texture to display alongside " - "the\n" - "message.\n" - "If 'log' is True, the message will also be printed to the output " - "log\n" - "'clients' can be a list of client-ids the message should be sent " - "to,\n" - "or None to specify that everyone should receive it.\n" + "For 'top' messages, 'image' must be a dict containing 'texture'\n" + "and 'tint_texture' textures and 'tint_color' and 'tint2_color'\n" + "colors. This defines an icon to display alongside the message.\n" + "If 'log' is True, the message will also be submitted to the log.\n" + "'clients' can be a list of client-ids the message should be sent\n" + "to, or None to specify that everyone should receive it.\n" "If 'transient' is True, the message will not be included in the\n" "game-stream and thus will not show up when viewing replays.\n" "Currently the 'clients' option only works for transient messages."}, diff --git a/src/ballistica/python/python.cc b/src/ballistica/python/python.cc index 3be6a998..56eeb33e 100644 --- a/src/ballistica/python/python.cc +++ b/src/ballistica/python/python.cc @@ -70,7 +70,7 @@ namespace ballistica { auto Python::LoggingCall(LogLevel loglevel, const std::string& msg) -> void { // If we've not yet captured our Python logging calls, stash this call away. - // We'll submit all accumulated entries after we bootstrap python. + // We'll submit all accumulated entries after we bootstrap Python. if (!objexists(ObjID::kLoggingCriticalCall)) { std::scoped_lock lock(early_log_lock_); early_logs_.emplace_back(std::make_pair(loglevel, msg)); diff --git a/tools/efro/log.py b/tools/efro/log.py index 684e6a69..339a517c 100644 --- a/tools/efro/log.py +++ b/tools/efro/log.py @@ -67,6 +67,21 @@ class LogEntry: time: Annotated[datetime.datetime, IOAttrs('t')] +@ioprepped +@dataclass +class LogArchive: + """Info and data for a log.""" + + # Total number of entries submitted to the log. + log_size: Annotated[int, IOAttrs('t')] + + # Offset for the entries contained here. + # (10 means our first entry is the 10th in the log, etc.) + start_index: Annotated[int, IOAttrs('c')] + + entries: Annotated[list[LogEntry], IOAttrs('e')] + + class LogHandler(logging.Handler): """Fancy-pants handler for logging output. @@ -83,7 +98,8 @@ class LogHandler(logging.Handler): def __init__(self, path: str | Path | None, echofile: TextIO | None, - suppress_non_root_debug: bool = False): + suppress_non_root_debug: bool = False, + cache_size_limit: int = 0): super().__init__() # pylint: disable=consider-using-with self._file = (None @@ -97,14 +113,20 @@ class LogHandler(logging.Handler): 'stdout': None, 'stderr': None } + self._cache_size = 0 + assert cache_size_limit >= 0 + self._cache_size_limit = cache_size_limit + self._cache: list[tuple[int, LogEntry]] = [] + self._cache_index_offset = 0 + self._cache_lock = Lock() self._printed_callback_error = False self._thread_bootstrapped = False self._thread = Thread(target=self._thread_main, daemon=True) self._thread.start() - # Spin until our thread has set up its basic stuff; - # otherwise we could wind up trying to push stuff to our - # event loop before the loop exists. + # Spin until our thread is up and running; otherwise we could + # wind up trying to push stuff to our event loop before the + # loop exists. while not self._thread_bootstrapped: time.sleep(0.001) @@ -124,6 +146,37 @@ class LogHandler(logging.Handler): self._thread_bootstrapped = True self._event_loop.run_forever() + def get_archive(self, + start_index: int = 0, + max_entries: int | None = None) -> LogArchive: + """Build and return an archive of log entries. + + This will only return entries that have been processed by the + background thread so may not include just-submitted logs. + Entries in the range [start_index:start_index+max_entries] that + are still in the cache will be returned. Be aware that this may + not be the full requested range. + """ + + assert start_index >= 0 + if max_entries is not None: + assert max_entries >= 0 + with self._cache_lock: + # Transform start_index to our present cache space. + start_index -= self._cache_index_offset + # Calc end-index in our present cache space. + end_index = (len(self._cache) + if max_entries is None else start_index + max_entries) + + # Clamp both indexes to both ends of our present space. + start_index = max(0, min(start_index, len(self._cache))) + end_index = max(0, min(end_index, len(self._cache))) + + return LogArchive( + log_size=self._cache_index_offset + len(self._cache), + start_index=start_index + self._cache_index_offset, + entries=[e[1] for e in self._cache[start_index:end_index]]) + def emit(self, record: logging.LogRecord) -> None: # Called by logging to send us records. # We simply package them up and ship them to our thread. @@ -143,22 +196,23 @@ class LogHandler(logging.Handler): # didn't expect to be stringified. msg = self.format(record) - # Also print pretty colored output to our echo file (generally - # stderr). We do this part here instead of in our bg thread - # because the delay can throw off command line prompts or make - # tight debugging harder. + # Also immediately print pretty colored output to our echo file + # (generally stderr). We do this part here instead of in our bg + # thread because the delay can throw off command line prompts or + # make tight debugging harder. if self._echofile is not None: - cbegin: str - cend: str - cbegin, cend = LEVELNO_COLOR_CODES.get(record.levelno, ('', '')) - self._echofile.write(f'{cbegin}{msg}{cend}\n') + ends = LEVELNO_COLOR_CODES.get(record.levelno) + if ends is not None: + self._echofile.write(f'{ends[0]}{msg}{ends[1]}\n') + else: + self._echofile.write(f'{msg}\n') self._event_loop.call_soon_threadsafe( - tpartial(self._emit_in_loop, record.name, record.levelno, + tpartial(self._emit_in_thread, record.name, record.levelno, record.created, msg)) - def _emit_in_loop(self, name: str, levelno: int, created: float, - message: str) -> None: + def _emit_in_thread(self, name: str, levelno: int, created: float, + message: str) -> None: try: self._emit_entry( LogEntry(name=name, @@ -174,9 +228,9 @@ class LogHandler(logging.Handler): """Send raw stdout/stderr output to the logger to be collated.""" self._event_loop.call_soon_threadsafe( - tpartial(self._file_write_in_loop, name, output)) + tpartial(self._file_write_in_thread, name, output)) - def _file_write_in_loop(self, name: str, output: str) -> None: + def _file_write_in_thread(self, name: str, output: str) -> None: try: assert name in ('stdout', 'stderr') @@ -222,9 +276,26 @@ class LogHandler(logging.Handler): self._file_chunk_ship_task[name] = None def _emit_entry(self, entry: LogEntry) -> None: - # This runs in our bg event loop thread and does most of the work. assert current_thread() is self._thread + # Store to our cache. + if self._cache_size_limit > 0: + with self._cache_lock: + # Do a rough calc of how many bytes this entry consumes. + entry_size = sum( + sys.getsizeof(x) + for x in (entry, entry.name, entry.message, entry.level, + entry.time)) + self._cache.append((entry_size, entry)) + self._cache_size += entry_size + + # Prune old until we are back at or under our limit. + while self._cache_size > self._cache_size_limit: + popped = self._cache.pop(0) + self._cache_size -= popped[0] + self._cache_index_offset += 1 + + # Pass to callbacks. with self._callbacks_lock: for call in self._callbacks: try: @@ -271,11 +342,12 @@ class FileLogEcho: def setup_logging(log_path: str | Path | None, level: LogLevel, suppress_non_root_debug: bool = False, - log_stdout_stderr: bool = False) -> LogHandler: + log_stdout_stderr: bool = False, + cache_size_limit: int = 0) -> LogHandler: """Set up our logging environment. Returns the custom handler which can be used to fetch information - about logs that have passed through it. (worst log-levels, etc.). + about logs that have passed through it. (worst log-levels, caches, etc.). """ lmap = { @@ -295,7 +367,8 @@ def setup_logging(log_path: str | Path | None, loghandler = LogHandler( log_path, echofile=sys.stderr if sys.stderr.isatty() else None, - suppress_non_root_debug=suppress_non_root_debug) + suppress_non_root_debug=suppress_non_root_debug, + cache_size_limit=cache_size_limit) # Note: going ahead with force=True here so that we replace any # existing logger. Though we warn if it looks like we are doing From fdeb180e9dbee51c6721a81e27aca6e35c245226 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 15 Sep 2022 12:59:36 -0700 Subject: [PATCH 25/40] tidying --- CHANGELOG.md | 1 + tools/efro/log.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b348d5cb..ce73993d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ - Added `_ba.v1_cloud_log()` which ships a message to the old v1-cloud-log (the log which is gathered and sent to the v1 master server to help me identify problems people are seeing). This is presently wired up to a subset of Python logging output to approximate how it used to work. - Note: Previously in the C++ layer some code would mix Python print calls (such as PyErr_PrintEx()) with ballistica::Log() calls. Previously these all wound up going to the same place (Python's sys.stderr) so it worked, but now they no longer do and so this sort of mixing should be avoided. So if you see a weird combination of colored log output lines with non-colored lines that seem to go together, please holler as it means something needs to be fixed. - Builds for Apple devices now set a thread stack size of 1MB. The default there is 512k and I was seeing some stack overflows for heavy Physics sims or very recursive Python stuff. +- If you want to grab recent logs, you can now use `ba.app.log_handler.get_cached()` This will give you everything that has gone through Python logging, Python stdout/stderr, and the C++ Log() call (up to the max cache size that is). ### 1.7.6 (build 20687, api 7, 2022-08-11) diff --git a/tools/efro/log.py b/tools/efro/log.py index 339a517c..2ae4a5f6 100644 --- a/tools/efro/log.py +++ b/tools/efro/log.py @@ -146,16 +146,16 @@ class LogHandler(logging.Handler): self._thread_bootstrapped = True self._event_loop.run_forever() - def get_archive(self, - start_index: int = 0, - max_entries: int | None = None) -> LogArchive: - """Build and return an archive of log entries. + def get_cached(self, + start_index: int = 0, + max_entries: int | None = None) -> LogArchive: + """Build and return an archive of cached log entries. - This will only return entries that have been processed by the - background thread so may not include just-submitted logs. - Entries in the range [start_index:start_index+max_entries] that - are still in the cache will be returned. Be aware that this may - not be the full requested range. + This will only include entries that have been processed by the + background thread, so may not include just-submitted logs or + entries for partially written stdout/stderr lines. + Entries from the range [start_index:start_index+max_entries] + which are still present in the cache will be returned. """ assert start_index >= 0 From b0f0cc63f552f1ccf7711319c81afa587e40fcfb Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 15 Sep 2022 20:02:46 -0700 Subject: [PATCH 26/40] cloud console now fully operational --- .efrocachemap | 88 +++++++++---------- CHANGELOG.md | 6 +- assets/src/ba_data/python/._ba_sources_hash | 2 +- assets/src/ba_data/python/_ba.py | 17 +++- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/app/app_flavor.cc | 15 ++-- src/ballistica/ballistica.cc | 27 +++--- src/ballistica/logic/logic.cc | 8 +- src/ballistica/logic/logic.h | 3 +- src/ballistica/networking/network_reader.cc | 2 +- src/ballistica/platform/platform.cc | 2 +- .../python/methods/python_methods_app.cc | 55 ++++++++++-- 12 files changed, 145 insertions(+), 82 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 9a8a07d8..dbedae2f 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,50 +3995,50 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/f3/e1/0ee9ade5e9943dc4749aa4cc2182", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/32/4e/a7c1b096c62864641a59e65e7778", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/6a/f4/8b86611cbaa7237c8a52e8fe6428", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/13/f5/fa3c97269613316994f0c2134860", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/f8/7a/87877003ee3a13ff7cbbf1ec76a2", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/81/0c/708a16fff55ee37338b2d87f7620", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4a/91/89523b8f155261e0045a6bb6e277", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a9/04/da76c8e848852fef1e58577f59e3", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/dd/ac/33aed9cc1396ccba2111dfed02f6", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/1a/5a/0f1e671137a2ec60c2df8e95e078", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/92/50/ec5fbb3f8b9f4a60934f2dacf180", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/7c/77/a430bf182d5210792716b6dbd8ee", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ef/6b/de6c811fa70bf4d5d1cdfe49eaae", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/92/e0/b9b1053231d7323d185298f8caaa", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/08/ef/c70efcd89a666758437f0736d956", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9d/94/1f0d32c943b64ff558f28ad89653", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a6/fb/a6e6a78d7b04d547c9c716ff0a8e", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/5a/b0/d0e087fcdf1756a0b9b5bf805f10", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/34/fb/e6c9fb0e20af0ba3376ca2abba29", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/b1/8b/5ba626c39ef586f3ba4bfd508181", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d5/f6/d62e6e6d5e7fe1945f08ccbb9a8f", - "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/02/c5/44d0082442b06153a7d7dce4c8ce", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d0/00/61378fb26ddcbf023fd3c40e4ffb", - "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0a/e2/a01a2de0835fee06fd7b357c700f", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7a/dd/8a8f84d8ed28fec12137f632e9f7", - "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6d/b1/34d06bce1b93bcefc4896bd2700a", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/63/61/f48cc804658071c759398f9c00dd", - "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a2/b7/a28b8ed7c1f13b53dea1c878c5fc", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a5/b2/f29c2fe15f33441de94331743353", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c2/63/bf93d39adb82748decfdb980b562", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/00/6d/ac55bffd774cf75c5944b679194a", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7b/dd/af154cabc6779257a38ea6c9e833", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/54/88/2de2dfa2c0c0a1766fa0d5f26ed6", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ff/26/da4a58abecf5d9275477eaec0c17", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/62/5d/8658a206b8c9b741be2422162784", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fc/57/d59920e098d23a2d150c899cde29", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/39/a1/bce547622da143fcf9ea970cd3ab", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/d6/f3/8ca052a667342e316fa09655bc51", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/e0/b4/99c403ccbfd0c4b9b071e656d480", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/11/a0/e06103dae63a4648850bd089aacb", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/77/17/99eba0c7d42a9452306f7927ae4e", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/92/da/2faf9031e7c5ba5a99dd9e0c609d", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/64/2a/1b30ee7b4e8238ec2ea16bcacdeb", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/41/92/35b689da32ee45a4e7483feae8f8", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/be/84/d4a9f2698852d47204eaf7f989f9", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/9d/07/10910a8e3de0506be787ef3ecc48", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/8d/f7/74d2f4c962b7797e05e15241deac", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ea/34/0929f2c03752ac2a4a08a09941ce", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ea/28/a19ef25c15ee6befb9ed2bac5ebc", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/38/ad/c3b76ff4f8ca715c394b3a96a68e", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f6/8a/98649959fb2bed45dcdc31e841f1", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/44/97/9d70590ffcde8df0f2f45f0d649a", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/e2/38/12cf8e7010aa0f4217b0da33786a", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c0/a4/c4d1a04cd841065bf2c7a6e8328a", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/22/f3/613572189769a6d22e00f28125ae", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ae/e1/c81f46c7b2933a4caa4e028de174", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/90/f7/c2f34b478a63e4d6a48804fec09e", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/7d/e5/df47bf427dcb312a85359e4aa15a", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/49/7d/1a911685c12684b0bb44d85d91b5", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/49/12/cb7f8ab099507df99d36447bb091", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/72/de/79b34ded132e59aa48f2c1badd3f", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/3e/91/085afe517b6e54087a746e980cab", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/f8/1b/996fb6d29251b1dd4f72da7d3cdf", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ea/f6/b68573135f10e1c22b60b4b924b7", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f2/f2/5d17e1c169a07365442920c41d5b", + "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b4/c3/d87cbbb96ae6b8d04c2e47575493", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9c/b1/63bb857c299b7df59bf8c7a839b3", + "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e5/55/152d7f63e1c7fa017fdbaf6cd01b", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7c/42/25dd5f85ac0766821786b56356dd", + "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4b/3d/cbeddd984dd7bbf651489eaf73d4", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/90/6a/93e4582a5fccca73245a6339c876", + "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/38/91/32d4dd319c6de2e1202160be1cdb", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/93/65/8de22b09531bbd52f3c248dcf479", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c0/c7/18c3deef4709d9e6dc7c02b8e957", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/dd/75/443cea54dd7011aded225197675e", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c2/ed/8683ec69a8b55c056808474388d4", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0d/ad/107f9828c8b195ab08a0a777d1b9", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/49/c3/4dd10b0ac3c1ce9cd3c565e62e4f", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2f/e6/cf0b3c061fe0428f11f19ab71cd3", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c5/63/af3ae0a72c0802afaa3fd20bc72d", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/43/bb/33be7bb757f0419a626c72a2aca5", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/35/28/94b54429a9f282007dcba702684b", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/cf/89/8d35a30a72386d6753dd5a9568cb", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/d9/1f/0924eea724878da3d60fda65a73f", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/1f/e4/2dd5f92598580490a86b1dd36443", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/ba/12/35d07a2bda668aec5d99813e1f67", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/a5/b0/f014e1bc0a352fe9402d4c879a04", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/63/ed/9565716b18e47dbb13752e68e068", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/c0/32/b7907e3859a5c5013a3d97b6b523", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/2d/4f/f4fe67827f36cd59cd5193333a02", "src/ballistica/generated/python_embedded/bootstrap_monolithic.inc": "https://files.ballistica.net/cache/ba1/ef/c1/aa5f1aa10af89f5c0b1e616355fd" diff --git a/CHANGELOG.md b/CHANGELOG.md index ce73993d..e5c5f5a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20857, api 7, 2022-09-15) +### 1.7.7 (build 20858, api 7, 2022-09-15) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. @@ -35,8 +35,8 @@ - Added `_ba.display_log()` function which ships a log message to the in-game terminal and platform-specific places like the Android log. The engine wires up standard Python logging output to go through this. - Added `_ba.v1_cloud_log()` which ships a message to the old v1-cloud-log (the log which is gathered and sent to the v1 master server to help me identify problems people are seeing). This is presently wired up to a subset of Python logging output to approximate how it used to work. - Note: Previously in the C++ layer some code would mix Python print calls (such as PyErr_PrintEx()) with ballistica::Log() calls. Previously these all wound up going to the same place (Python's sys.stderr) so it worked, but now they no longer do and so this sort of mixing should be avoided. So if you see a weird combination of colored log output lines with non-colored lines that seem to go together, please holler as it means something needs to be fixed. -- Builds for Apple devices now set a thread stack size of 1MB. The default there is 512k and I was seeing some stack overflows for heavy Physics sims or very recursive Python stuff. -- If you want to grab recent logs, you can now use `ba.app.log_handler.get_cached()` This will give you everything that has gone through Python logging, Python stdout/stderr, and the C++ Log() call (up to the max cache size that is). +- Builds for Apple devices now explicitly set a thread stack size of 1MB. The default there is 512k and I was seeing some stack overflows for heavy physics sims or very recursive Python stuff. +- If you want to grab recent logs, you can now use `ba.app.log_handler.get_cached()`. This will give you everything that has gone through Python logging, Python stdout/stderr, and the C++ Log() call (up to the max cache size that is). ### 1.7.6 (build 20687, api 7, 2022-08-11) diff --git a/assets/src/ba_data/python/._ba_sources_hash b/assets/src/ba_data/python/._ba_sources_hash index 8eee74b6..ac8e879b 100644 --- a/assets/src/ba_data/python/._ba_sources_hash +++ b/assets/src/ba_data/python/._ba_sources_hash @@ -1 +1 @@ -41453813326605937968225345803585801012 \ No newline at end of file +202727985408399627040353071391998113840 \ No newline at end of file diff --git a/assets/src/ba_data/python/_ba.py b/assets/src/ba_data/python/_ba.py index 0f4b6cb3..2f751fc3 100644 --- a/assets/src/ba_data/python/_ba.py +++ b/assets/src/ba_data/python/_ba.py @@ -1131,6 +1131,11 @@ def android_show_wifi_settings() -> None: return None +def app_instance_uuid() -> str: + """(internal)""" + return str() + + def apply_config() -> None: """(internal)""" return None @@ -2388,7 +2393,8 @@ def printobjects() -> None: def pushcall(call: Callable, from_other_thread: bool = False, - suppress_other_thread_warning: bool = False) -> None: + suppress_other_thread_warning: bool = False, + other_thread_use_fg_context: bool = False) -> None: """Pushes a call onto the event loop to be run during the next cycle. Category: **General Utility Functions** @@ -2401,7 +2407,9 @@ def pushcall(call: Callable, If you want to push a call from outside of the logic thread, however, you can pass 'from_other_thread' as True. In this case - the call will always run in the UI context on the logic thread. + the call will always run in the UI context on the logic thread + or whichever context is in the foreground if + other_thread_use_fg_context is True. """ return None @@ -2972,6 +2980,11 @@ def unlock_all_input() -> None: return None +def user_ran_commands() -> None: + """(internal)""" + return None + + def v1_cloud_log(message: str) -> None: """(internal) diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index d3089177..0b044b41 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -44,7 +44,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20857 + expected_build = 20858 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/app/app_flavor.cc b/src/ballistica/app/app_flavor.cc index 24223550..70614020 100644 --- a/src/ballistica/app/app_flavor.cc +++ b/src/ballistica/app/app_flavor.cc @@ -368,16 +368,19 @@ void AppFlavor::OnAppStart() { assert(g_input); // If we're running in a terminal, print some info. - if (g_platform->is_stdin_a_terminal()) { + // if (g_platform->is_stdin_a_terminal()) { + { + char buffer[256]; if (g_buildconfig.headless_build()) { - printf("BallisticaCore Headless %s build %d.\n", kAppVersion, - kAppBuildNumber); - fflush(stdout); + snprintf(buffer, sizeof(buffer), "BallisticaCore Headless %s build %d.", + kAppVersion, kAppBuildNumber); } else { - printf("BallisticaCore %s build %d.\n", kAppVersion, kAppBuildNumber); - fflush(stdout); + snprintf(buffer, sizeof(buffer), "BallisticaCore %s build %d.", + kAppVersion, kAppBuildNumber); } + Log(LogLevel::kInfo, buffer); } + // } // If we've got a nice themed hardware cursor, show it. // Otherwise, hide the hardware cursor; we'll draw it in software. diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 676a9493..d35e6928 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20857; +const int kAppBuildNumber = 20858; const char* kAppVersion = "1.7.7"; // Our standalone globals. @@ -252,32 +252,35 @@ auto FatalError(const std::string& message) -> void { BA_PRECONDITION(handled); } +// FIXME: move this to g_app or whatnot. auto GetAppInstanceUUID() -> const std::string& { - static std::string session_id; - static bool have_session_id = false; + static std::string app_instance_uuid; + static bool have_app_instance_uuid = false; - if (!have_session_id) { + if (!have_app_instance_uuid) { if (g_python) { Python::ScopedInterpreterLock gil; auto uuid = g_python->obj(Python::ObjID::kUUIDStrCall).Call(); if (uuid.exists()) { - session_id = uuid.ValueAsString().c_str(); - have_session_id = true; + app_instance_uuid = uuid.ValueAsString().c_str(); + have_app_instance_uuid = true; } } - if (!have_session_id) { + if (!have_app_instance_uuid) { // As an emergency fallback simply use a single random number. + // We should probably simply disallow this before Python is up. Log(LogLevel::kWarning, "GetSessionUUID() using rand fallback."); srand(static_cast( - Platform::GetCurrentMilliseconds())); // NOLINT - session_id = std::to_string(static_cast(rand())); // NOLINT - have_session_id = true; + Platform::GetCurrentMilliseconds())); // NOLINT + app_instance_uuid = + std::to_string(static_cast(rand())); // NOLINT + have_app_instance_uuid = true; } - if (session_id.size() >= 100) { + if (app_instance_uuid.size() >= 100) { Log(LogLevel::kWarning, "session id longer than it should be."); } } - return session_id; + return app_instance_uuid; } auto InMainThread() -> bool { diff --git a/src/ballistica/logic/logic.cc b/src/ballistica/logic/logic.cc index c40a3d9e..5c5acdb5 100644 --- a/src/ballistica/logic/logic.cc +++ b/src/ballistica/logic/logic.cc @@ -913,7 +913,7 @@ void Logic::PushInGameConsoleScriptCommand(const std::string& command) { thread()->PushCall([this, command] { // These are always run in whichever context is 'visible'. ScopedSetContext cp(GetForegroundContext()); - PythonCommand cmd(command, ""); + PythonCommand cmd(command, ""); if (!g_app->user_ran_commands) { g_app->user_ran_commands = true; } @@ -1046,13 +1046,13 @@ void Logic::PushPythonWeakCallArgs( }); } -void Logic::PushPythonRawCallable(PyObject* callable) { - thread()->PushCall([this, callable] { +void Logic::PushPythonRawCallable(PyObject* callable, bool fg_context) { + thread()->PushCall([this, callable, fg_context] { assert(InLogicThread()); // Lets run this in the UI context. // (can add other options if we need later) - ScopedSetContext cp(GetUIContext()); + ScopedSetContext cp(fg_context ? GetForegroundContext() : GetUIContext()); // This event contains a raw python obj with an incremented ref-count. auto call(Object::New(callable)); diff --git a/src/ballistica/logic/logic.h b/src/ballistica/logic/logic.h index c1d55633..5bf933e6 100644 --- a/src/ballistica/logic/logic.h +++ b/src/ballistica/logic/logic.h @@ -85,7 +85,8 @@ class Logic { // Push a raw Python call, decrements its refcount after running. // Can be pushed from any thread. - auto PushPythonRawCallable(PyObject* callable) -> void; + auto PushPythonRawCallable(PyObject* callable, bool fg_context = false) + -> void; auto PushScreenMessage(const std::string& message, const Vector3f& color) -> void; auto RemovePlayer(Player* player) -> void; diff --git a/src/ballistica/networking/network_reader.cc b/src/ballistica/networking/network_reader.cc index 837dc644..68097bf2 100644 --- a/src/ballistica/networking/network_reader.cc +++ b/src/ballistica/networking/network_reader.cc @@ -128,7 +128,7 @@ static auto HandleGameQuery(const char* buffer, size_t size, memcpy(&query_id, buffer + 1, 4); // Ship them a response packet containing the query id, - // our protocol version, our unique-session-id, and our + // our protocol version, our unique-app-instance-id, and our // player_spec. char msg[400]; diff --git a/src/ballistica/platform/platform.cc b/src/ballistica/platform/platform.cc index 0fa607e7..56d0c959 100644 --- a/src/ballistica/platform/platform.cc +++ b/src/ballistica/platform/platform.cc @@ -543,7 +543,7 @@ static void HandleArgs(int argc, char** argv) { // If there's just one arg and it's "--version", return the version. if (argc == 2 && !strcmp(argv[1], "--version")) { - printf("Ballistica %s build %d\n", kAppVersion, kAppBuildNumber); + printf("BallisticaCore %s build %d\n", kAppVersion, kAppBuildNumber); fflush(stdout); exit(0); } diff --git a/src/ballistica/python/methods/python_methods_app.cc b/src/ballistica/python/methods/python_methods_app.cc index 3ed0d566..d2460ea9 100644 --- a/src/ballistica/python/methods/python_methods_app.cc +++ b/src/ballistica/python/methods/python_methods_app.cc @@ -145,6 +145,31 @@ auto PyIsInReplay(PyObject* self, PyObject* args, PyObject* keywds) BA_PYTHON_CATCH; } +auto PyAppInstanceUUID(PyObject* self, PyObject* args, PyObject* keywds) + -> PyObject* { + BA_PYTHON_TRY; + static const char* kwlist[] = {nullptr}; + if (!PyArg_ParseTupleAndKeywords(args, keywds, "", + const_cast(kwlist))) { + return nullptr; + } + return PyUnicode_FromString(GetAppInstanceUUID().c_str()); + BA_PYTHON_CATCH; +} + +auto PyUserRanCommands(PyObject* self, PyObject* args, PyObject* keywds) + -> PyObject* { + BA_PYTHON_TRY; + static const char* kwlist[] = {nullptr}; + if (!PyArg_ParseTupleAndKeywords(args, keywds, "", + const_cast(kwlist))) { + return nullptr; + } + g_app->user_ran_commands = true; + Py_RETURN_NONE; + BA_PYTHON_CATCH; +} + auto PyRegisterSession(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { BA_PYTHON_TRY; @@ -282,11 +307,14 @@ auto PyPushCall(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { PyObject* call_obj; int from_other_thread{}; int suppress_warning{}; + int other_thread_use_fg_context{}; static const char* kwlist[] = {"call", "from_other_thread", - "suppress_other_thread_warning", nullptr}; - if (!PyArg_ParseTupleAndKeywords(args, keywds, "O|ip", + "suppress_other_thread_warning", + "other_thread_use_fg_context", nullptr}; + if (!PyArg_ParseTupleAndKeywords(args, keywds, "O|ppp", const_cast(kwlist), &call_obj, - &from_other_thread, &suppress_warning)) { + &from_other_thread, &suppress_warning, + &other_thread_use_fg_context)) { return nullptr; } @@ -303,7 +331,7 @@ auto PyPushCall(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { // just increment the python object's refcount and pass it along raw; // the logic thread decrements it on the other end. Py_INCREF(call_obj); - g_logic->PushPythonRawCallable(call_obj); + g_logic->PushPythonRawCallable(call_obj, other_thread_use_fg_context); } else { if (!InLogicThread()) { throw Exception("You must use from_other_thread mode."); @@ -1103,7 +1131,8 @@ auto PythonMethodsApp::GetMethods() -> std::vector { {"pushcall", (PyCFunction)PyPushCall, METH_VARARGS | METH_KEYWORDS, "pushcall(call: Callable, from_other_thread: bool = False,\n" - " suppress_other_thread_warning: bool = False ) -> None\n" + " suppress_other_thread_warning: bool = False,\n" + " other_thread_use_fg_context: bool = False) -> None\n" "\n" "Pushes a call onto the event loop to be run during the next cycle.\n" "\n" @@ -1118,7 +1147,9 @@ auto PythonMethodsApp::GetMethods() -> std::vector { "\n" "If you want to push a call from outside of the logic thread,\n" "however, you can pass 'from_other_thread' as True. In this case\n" - "the call will always run in the UI context on the logic thread."}, + "the call will always run in the UI context on the logic thread\n" + "or whichever context is in the foreground if\n" + "other_thread_use_fg_context is True."}, {"getactivity", (PyCFunction)PyGetActivity, METH_VARARGS | METH_KEYWORDS, @@ -1175,6 +1206,18 @@ auto PythonMethodsApp::GetMethods() -> std::vector { "\n" "(internal)"}, + {"app_instance_uuid", (PyCFunction)PyAppInstanceUUID, + METH_VARARGS | METH_KEYWORDS, + "app_instance_uuid() -> str\n" + "\n" + "(internal)"}, + + {"user_ran_commands", (PyCFunction)PyUserRanCommands, + METH_VARARGS | METH_KEYWORDS, + "user_ran_commands() -> None\n" + "\n" + "(internal)"}, + {"new_replay_session", (PyCFunction)PyNewReplaySession, METH_VARARGS | METH_KEYWORDS, "new_replay_session(file_name: str) -> None\n" From 084f556504056aa1cc8c781009db6e66750492da Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 16 Sep 2022 16:33:52 -0700 Subject: [PATCH 27/40] bug fixes and polishing for 1.7.7 release --- .efrocachemap | 88 ++++++++++---------- CHANGELOG.md | 4 +- assets/src/ba_data/python/._ba_sources_hash | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 15 +++- src/ballistica/ballistica.cc | 2 +- src/ballistica/python/python_context_call.cc | 2 +- tools/efro/log.py | 8 +- 7 files changed, 71 insertions(+), 50 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index dbedae2f..24d7877a 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,50 +3995,50 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/be/84/d4a9f2698852d47204eaf7f989f9", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/9d/07/10910a8e3de0506be787ef3ecc48", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/8d/f7/74d2f4c962b7797e05e15241deac", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ea/34/0929f2c03752ac2a4a08a09941ce", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ea/28/a19ef25c15ee6befb9ed2bac5ebc", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/38/ad/c3b76ff4f8ca715c394b3a96a68e", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f6/8a/98649959fb2bed45dcdc31e841f1", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/44/97/9d70590ffcde8df0f2f45f0d649a", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/e2/38/12cf8e7010aa0f4217b0da33786a", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c0/a4/c4d1a04cd841065bf2c7a6e8328a", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/22/f3/613572189769a6d22e00f28125ae", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ae/e1/c81f46c7b2933a4caa4e028de174", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/90/f7/c2f34b478a63e4d6a48804fec09e", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/7d/e5/df47bf427dcb312a85359e4aa15a", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/49/7d/1a911685c12684b0bb44d85d91b5", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/49/12/cb7f8ab099507df99d36447bb091", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/72/de/79b34ded132e59aa48f2c1badd3f", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/3e/91/085afe517b6e54087a746e980cab", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/f8/1b/996fb6d29251b1dd4f72da7d3cdf", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ea/f6/b68573135f10e1c22b60b4b924b7", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f2/f2/5d17e1c169a07365442920c41d5b", - "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b4/c3/d87cbbb96ae6b8d04c2e47575493", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9c/b1/63bb857c299b7df59bf8c7a839b3", - "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e5/55/152d7f63e1c7fa017fdbaf6cd01b", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7c/42/25dd5f85ac0766821786b56356dd", - "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4b/3d/cbeddd984dd7bbf651489eaf73d4", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/90/6a/93e4582a5fccca73245a6339c876", - "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/38/91/32d4dd319c6de2e1202160be1cdb", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/93/65/8de22b09531bbd52f3c248dcf479", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c0/c7/18c3deef4709d9e6dc7c02b8e957", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/dd/75/443cea54dd7011aded225197675e", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c2/ed/8683ec69a8b55c056808474388d4", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0d/ad/107f9828c8b195ab08a0a777d1b9", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/49/c3/4dd10b0ac3c1ce9cd3c565e62e4f", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2f/e6/cf0b3c061fe0428f11f19ab71cd3", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c5/63/af3ae0a72c0802afaa3fd20bc72d", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/43/bb/33be7bb757f0419a626c72a2aca5", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/35/28/94b54429a9f282007dcba702684b", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/cf/89/8d35a30a72386d6753dd5a9568cb", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/d9/1f/0924eea724878da3d60fda65a73f", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/1f/e4/2dd5f92598580490a86b1dd36443", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/ba/12/35d07a2bda668aec5d99813e1f67", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/a5/b0/f014e1bc0a352fe9402d4c879a04", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/63/ed/9565716b18e47dbb13752e68e068", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/0f/46/404261469afa2d2c793ce8c91c07", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/36/56/01550015ad71fb43d8ad18c7a1ed", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/90/21/227767f185f7a849ec064c1e93a1", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/48/e7/29c1cc0dd7f44dd5bd2a7535b3a2", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/de/c8/d84e6ba0cc5ecc441352f2627aa8", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/45/76/cf0e74eda12e456841ac472c836f", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c2/e9/8f46af9203b1692280ba441827dd", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/83/9f/71e9ce104918da5c56c5aa1ebb0c", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/d2/86/de0d4dd11111d75cbef782c4680b", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ed/67/3bdbac5890bc41dbe110b876f00f", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/43/42/1e77182654f2081320857e5653e7", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cb/02/7fadad054ea58a95f182e0608353", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/75/8f/ea9f42c7127af2f7b0192c79a372", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/7a/59/ed3c6d51707dd10856c085757e1a", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/83/15/1d66ebddd7533da8e7b50aa137cb", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/31/0b/309f28c9e69bc91b3e3f2050b949", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/f6/c1/b34d2e10c98ca5e6ba943527de68", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/5a/5c/5cf517225027e93c20101bf6ddff", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/bb/cf/ed6937bcb856e08e5967ec0ab6a8", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/83/da/520e55cb58ec63d9ca5eac2e5fa8", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d5/99/d4beffbba698d85837a6de0c4dd7", + "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5e/03/d50c1aa5b11ab558a86d3639fe82", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/bd/58/bcdb79ff2d6c21f9c5fbf085baba", + "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2b/da/9a4ad8188598ad05c366eebb50fc", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/cb/5b/f027e5b0ac824979928bdb17c6a2", + "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/59/0b/3c0025f11fac60fbcf734f7045cf", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/64/39/670c59a3afc880d1f26726e751e9", + "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e9/65/94442cb39682a081eaf18a3585c1", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/58/4c/f15514b22709cf1f8f79121de421", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/50/ea/33039f73bf0d2ac7225fd3d8edc9", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/14/f8/feee9a4a31c77cd3b80c084f5158", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/57/21/323a6394e2f4e8ab9a3538a0dd6c", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ac/8a/7a968caf6d386b4f36ce19bc0e50", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ce/47/4e656fddf9afa3f97e62df8b49d8", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4b/bd/86f9fd7f0af07fb908c3669e9703", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9a/fe/d77798bed240d6a6899f7d185746", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/bf/f7/dbec060fcceaa6d15001e9c5571a", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/a5/4f/799559891d9dc51aeff3378b7b60", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/24/8d/6cd60c1561b712c5b564bad308ec", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/7b/ec/513f36aa663dfd36ff78c23222ed", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/19/e9/28bea15e82430abdf2164305f319", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/2e/90/2dca6237def60fea03965a9b1fa5", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/34/de/f5de63981018ff50fccf71d472b9", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/8d/c5/aa0267943a6c51b3f1b4fb184b25", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/c0/32/b7907e3859a5c5013a3d97b6b523", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/2d/4f/f4fe67827f36cd59cd5193333a02", "src/ballistica/generated/python_embedded/bootstrap_monolithic.inc": "https://files.ballistica.net/cache/ba1/ef/c1/aa5f1aa10af89f5c0b1e616355fd" diff --git a/CHANGELOG.md b/CHANGELOG.md index e5c5f5a7..428fbd1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20858, api 7, 2022-09-15) +### 1.7.7 (build 20860, api 7, 2022-09-16) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. @@ -37,6 +37,8 @@ - Note: Previously in the C++ layer some code would mix Python print calls (such as PyErr_PrintEx()) with ballistica::Log() calls. Previously these all wound up going to the same place (Python's sys.stderr) so it worked, but now they no longer do and so this sort of mixing should be avoided. So if you see a weird combination of colored log output lines with non-colored lines that seem to go together, please holler as it means something needs to be fixed. - Builds for Apple devices now explicitly set a thread stack size of 1MB. The default there is 512k and I was seeing some stack overflows for heavy physics sims or very recursive Python stuff. - If you want to grab recent logs, you can now use `ba.app.log_handler.get_cached()`. This will give you everything that has gone through Python logging, Python stdout/stderr, and the C++ Log() call (up to the max cache size that is). +- LogHandler output now ALWAYS goes to stderr. Previously it only would if an interactive terminal was detected. This should make the binary easier to debug if run from scripts/etc. We can add a `--quiet` option if needed or whatnot. +- (build 20859) Fixed an error setting up asyncio loops under Windows related to the fact that Python is now inited in the main thread. ### 1.7.6 (build 20687, api 7, 2022-08-11) diff --git a/assets/src/ba_data/python/._ba_sources_hash b/assets/src/ba_data/python/._ba_sources_hash index ac8e879b..9d8ff3a2 100644 --- a/assets/src/ba_data/python/._ba_sources_hash +++ b/assets/src/ba_data/python/._ba_sources_hash @@ -1 +1 @@ -202727985408399627040353071391998113840 \ No newline at end of file +84155513838284412598729205538639495871 \ No newline at end of file diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 0b044b41..79daf0c4 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -44,7 +44,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20858 + expected_build = 20860 running_build: int = env['build_number'] if running_build != expected_build: print( @@ -92,6 +92,19 @@ def bootstrap() -> None: os.environ['SSL_CERT_FILE'] = os.environ['REQUESTS_CA_BUNDLE'] = ( certifi.where()) + # On Windows I'm seeing the following error creating asyncio loops in + # background threads with the default proactor setup: + # ValueError: set_wakeup_fd only works in main thread of the main + # interpreter + # So let's explicitly request selector loops. + # Interestingly this error only started showing up once I moved + # Python init to the main thread; previously the various asyncio + # bg thread loops were working fine (maybe something caused them + # to default to selector in that case?.. + if sys.platform == 'win32': + import asyncio + asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) + # Clear out the standard quit/exit messages since they don't work for us. # pylint: disable=c-extension-no-member if not TYPE_CHECKING: diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index d35e6928..2b7e9b99 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20858; +const int kAppBuildNumber = 20860; const char* kAppVersion = "1.7.7"; // Our standalone globals. diff --git a/src/ballistica/python/python_context_call.cc b/src/ballistica/python/python_context_call.cc index 3ce54a87..15fa1327 100644 --- a/src/ballistica/python/python_context_call.cc +++ b/src/ballistica/python/python_context_call.cc @@ -130,7 +130,7 @@ void PythonContextCall::PrintContext() { std::string s = std::string(" root call: ") + object().Str(); s += ("\n root call origin: " + file_loc()); s += g_python->GetContextBaseString(); - Log(LogLevel::kError, s); + PySys_WriteStderr("%s\n", s.c_str()); } } // namespace ballistica diff --git a/tools/efro/log.py b/tools/efro/log.py index 2ae4a5f6..116d0de5 100644 --- a/tools/efro/log.py +++ b/tools/efro/log.py @@ -360,13 +360,19 @@ def setup_logging(log_path: str | Path | None, # Wire logger output to go to a structured log file. # Also echo it to stderr IF we're running in a terminal. + # UPDATE: Actually gonna always go to stderr. Is there a + # reason we shouldn't? This makes debugging possible if all + # we have is access to a non-interactive terminal or file dump. + # We could add a '--quiet' arg or whatnot to change this behavior. + # Note: by passing in the *original* stderr here before we # (potentially) replace it, we ensure that our log echos # won't themselves be intercepted and sent to the logger # which would create an infinite loop. loghandler = LogHandler( log_path, - echofile=sys.stderr if sys.stderr.isatty() else None, + # echofile=sys.stderr if sys.stderr.isatty() else None, + echofile=sys.stderr, suppress_non_root_debug=suppress_non_root_debug, cache_size_limit=cache_size_limit) From 92a8ca40b34cfb75ac9fe7cba07e9bffd9565ecd Mon Sep 17 00:00:00 2001 From: Eric Date: Sat, 17 Sep 2022 23:07:58 -0700 Subject: [PATCH 28/40] tidying --- .efrocachemap | 56 +++++++++++----------- CHANGELOG.md | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/ballistica.cc | 2 +- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 24d7877a..cbcd8b2c 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/0f/46/404261469afa2d2c793ce8c91c07", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/36/56/01550015ad71fb43d8ad18c7a1ed", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/90/21/227767f185f7a849ec064c1e93a1", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/48/e7/29c1cc0dd7f44dd5bd2a7535b3a2", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/de/c8/d84e6ba0cc5ecc441352f2627aa8", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/45/76/cf0e74eda12e456841ac472c836f", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c2/e9/8f46af9203b1692280ba441827dd", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/83/9f/71e9ce104918da5c56c5aa1ebb0c", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/d2/86/de0d4dd11111d75cbef782c4680b", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ed/67/3bdbac5890bc41dbe110b876f00f", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/43/42/1e77182654f2081320857e5653e7", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cb/02/7fadad054ea58a95f182e0608353", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/75/8f/ea9f42c7127af2f7b0192c79a372", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/7a/59/ed3c6d51707dd10856c085757e1a", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/83/15/1d66ebddd7533da8e7b50aa137cb", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/31/0b/309f28c9e69bc91b3e3f2050b949", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/f6/c1/b34d2e10c98ca5e6ba943527de68", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/5a/5c/5cf517225027e93c20101bf6ddff", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/bb/cf/ed6937bcb856e08e5967ec0ab6a8", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/83/da/520e55cb58ec63d9ca5eac2e5fa8", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a4/e6/613e16590799f8d7ad8de38342b0", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/92/a0/02a38d10b71f32824c7ea5abe7af", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/81/59/56cf164dbde0ee2c0dfb22d1ca26", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cc/1f/95a0f8e12d4e28a6c60c56958cbf", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/02/ac/14552a9ba5f0aa6b9d3f83c98603", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/11/ca/99dadd93f83c4d4cb9c8ee785618", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/38/4b/a5d8389976faeba0c1f2df7141d2", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/15/6d/bd3806bc9cbe35e723979d352a5e", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/19/32/61c15a9e7e196edbf9b035a90121", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/08/50/d9ae0cf76a0eb3cc2e674a7cddf0", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/10/4f/68aa69699b43850918b2cfbfcc7d", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/54/9c/87a9a0646c38e3bfc60337aca1ac", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/7b/87/1f5ce566da89beba07e306306abe", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/fc/63/30e1794da1e1e788a432c257fa43", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a0/5a/29edeafb342fb2cb420f4de36c6c", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/90/1f/8769de697d69522e52f0e471e4a1", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/5b/65/818e9d90b93d8585f57a58898225", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/af/ff/3338fbe22a349ce20df0a0a663d6", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/05/fb/a5ea226940177886e312e8aaf8f7", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ae/fc/9e34fb7d5aa08e592ff8f840961e", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d5/99/d4beffbba698d85837a6de0c4dd7", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5e/03/d50c1aa5b11ab558a86d3639fe82", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/bd/58/bcdb79ff2d6c21f9c5fbf085baba", @@ -4031,14 +4031,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ce/47/4e656fddf9afa3f97e62df8b49d8", "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4b/bd/86f9fd7f0af07fb908c3669e9703", "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9a/fe/d77798bed240d6a6899f7d185746", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/bf/f7/dbec060fcceaa6d15001e9c5571a", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/a5/4f/799559891d9dc51aeff3378b7b60", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/24/8d/6cd60c1561b712c5b564bad308ec", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/7b/ec/513f36aa663dfd36ff78c23222ed", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/19/e9/28bea15e82430abdf2164305f319", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/2e/90/2dca6237def60fea03965a9b1fa5", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/34/de/f5de63981018ff50fccf71d472b9", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/8d/c5/aa0267943a6c51b3f1b4fb184b25", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/28/83/fe441b92d4d077bdbdf0859c49b0", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/b1/37/96e095efb2d5883bea5bf2e385e7", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/e1/71/dd5ffbb012f711af082a0253c84a", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/2d/a9/0d6730ff3524cd56f9bb7b4e7857", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/fb/12/60564c7a2a34cad309f735f68cab", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/5a/bb/a612b7883be072c7440d3209fabe", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/a9/6e/bd1f01d073bdabcf1c5a0059df6c", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/fa/e6/f6cdcff565e5ce438372e0b28ada", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/c0/32/b7907e3859a5c5013a3d97b6b523", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/2d/4f/f4fe67827f36cd59cd5193333a02", "src/ballistica/generated/python_embedded/bootstrap_monolithic.inc": "https://files.ballistica.net/cache/ba1/ef/c1/aa5f1aa10af89f5c0b1e616355fd" diff --git a/CHANGELOG.md b/CHANGELOG.md index 428fbd1d..5a8ebd26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20860, api 7, 2022-09-16) +### 1.7.7 (build 20861, api 7, 2022-09-17) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 79daf0c4..44a3016d 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -44,7 +44,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20860 + expected_build = 20861 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 2b7e9b99..0f572a9e 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20860; +const int kAppBuildNumber = 20861; const char* kAppVersion = "1.7.7"; // Our standalone globals. From 86b931dfccc3d58b1318c1a75a19c37c2b64bef4 Mon Sep 17 00:00:00 2001 From: Eric Date: Sat, 17 Sep 2022 23:15:30 -0700 Subject: [PATCH 29/40] tidying2 --- .efrocachemap | 88 +++++++++---------- .idea/dictionaries/ericf.xml | 1 + CHANGELOG.md | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- .../.idea/dictionaries/ericf.xml | 1 + src/ballistica/ballistica.cc | 2 +- tools/efro/error.py | 9 +- tools/efro/message/_protocol.py | 2 +- tools/efro/rpc.py | 2 +- 9 files changed, 59 insertions(+), 50 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index cbcd8b2c..73c67ba6 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,50 +3995,50 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a4/e6/613e16590799f8d7ad8de38342b0", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/92/a0/02a38d10b71f32824c7ea5abe7af", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/81/59/56cf164dbde0ee2c0dfb22d1ca26", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cc/1f/95a0f8e12d4e28a6c60c56958cbf", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/02/ac/14552a9ba5f0aa6b9d3f83c98603", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/11/ca/99dadd93f83c4d4cb9c8ee785618", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/38/4b/a5d8389976faeba0c1f2df7141d2", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/15/6d/bd3806bc9cbe35e723979d352a5e", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/19/32/61c15a9e7e196edbf9b035a90121", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/08/50/d9ae0cf76a0eb3cc2e674a7cddf0", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/10/4f/68aa69699b43850918b2cfbfcc7d", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/54/9c/87a9a0646c38e3bfc60337aca1ac", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/7b/87/1f5ce566da89beba07e306306abe", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/fc/63/30e1794da1e1e788a432c257fa43", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a0/5a/29edeafb342fb2cb420f4de36c6c", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/90/1f/8769de697d69522e52f0e471e4a1", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/5b/65/818e9d90b93d8585f57a58898225", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/af/ff/3338fbe22a349ce20df0a0a663d6", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/05/fb/a5ea226940177886e312e8aaf8f7", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ae/fc/9e34fb7d5aa08e592ff8f840961e", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d5/99/d4beffbba698d85837a6de0c4dd7", - "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5e/03/d50c1aa5b11ab558a86d3639fe82", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/bd/58/bcdb79ff2d6c21f9c5fbf085baba", - "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2b/da/9a4ad8188598ad05c366eebb50fc", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/cb/5b/f027e5b0ac824979928bdb17c6a2", - "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/59/0b/3c0025f11fac60fbcf734f7045cf", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/64/39/670c59a3afc880d1f26726e751e9", - "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e9/65/94442cb39682a081eaf18a3585c1", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/58/4c/f15514b22709cf1f8f79121de421", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/50/ea/33039f73bf0d2ac7225fd3d8edc9", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/14/f8/feee9a4a31c77cd3b80c084f5158", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/57/21/323a6394e2f4e8ab9a3538a0dd6c", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ac/8a/7a968caf6d386b4f36ce19bc0e50", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ce/47/4e656fddf9afa3f97e62df8b49d8", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4b/bd/86f9fd7f0af07fb908c3669e9703", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9a/fe/d77798bed240d6a6899f7d185746", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/28/83/fe441b92d4d077bdbdf0859c49b0", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/b1/37/96e095efb2d5883bea5bf2e385e7", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/e1/71/dd5ffbb012f711af082a0253c84a", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/2d/a9/0d6730ff3524cd56f9bb7b4e7857", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/fb/12/60564c7a2a34cad309f735f68cab", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/5a/bb/a612b7883be072c7440d3209fabe", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/a9/6e/bd1f01d073bdabcf1c5a0059df6c", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/fa/e6/f6cdcff565e5ce438372e0b28ada", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/bc/d7/f65513a0b3d5fa8b5f4cfe342052", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/06/03/381b1b4470868245225dd4e4bb67", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/52/b0/36011f65de64a547009bef7fe6ec", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e2/46/384efcdbfb324b63889d567e7f14", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/8b/27/7bab35742af8c101f4aab3ebbd3d", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3b/d0/c1ee5a02a09c1d676a22a20fe8a7", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e9/2e/3ae4fb2983bb36167d1fe3044358", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9e/93/12e8d5357db44c97549fe2fbd7ca", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/53/6d/06e5987cfcf47d740ead2e8c3b7f", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/1b/5b/fd0fa7104c3e2d3a22c180db47cf", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ca/98/0e12c6aa44fc9e64492b6da67b02", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e6/81/aacab39968075487c9f610e3036c", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/94/bc/7a2fb10033217cac2fc04ccd0309", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a4/da/b7095762fbdef22aff5d77c5d45d", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/8b/05/2051b310f7989aa9aa04339de2f3", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2d/6e/3befc00833dc482ef55b70a915fe", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/82/ce/77695599588b675fac1e10febeae", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/3a/c3/d042e59d36f71c885036ed0e73d4", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/87/48/b1551cd7b5cf44c06a3e3a1a66a4", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/6d/e2/3366be4f442e6ef48b5ef5babe87", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d6/9a/5e36fb51a797da74db8f366a8e6d", + "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/98/d7/e827cc644d4dde0c1bddb17121b0", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9b/e0/a1ae5fdadff116de78727e2a8d30", + "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/49/76/fd27d293fd73d324ecc433b1e253", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/1e/93/b85c7585218b5c86d766a23373c6", + "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/34/0a/4547b5a8a00a35874cfbab25fc11", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/68/5a/a4a030424d8d5900433bdb70bd83", + "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e1/4b/278433e2332245313d4fa3390aee", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/22/c1/fc9726d56ac62c757e7f7eeb56e2", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/23/4f/ee03bed8d42b8e12832efbd17968", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/dc/7a/f5bae1a284d2b51e149f12da9e18", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2e/75/254680a01a85fcdc19db275cd2ff", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/79/fb/65e1f1851f2dc663eb5d9dd27ae9", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/24/5d/33ca757aa471e81ee2efe83b5c32", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/83/3e/35613478ab4887b7f77126c1d910", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ba/a7/b925b7eb7b2da10fdc9c88e59576", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/0a/ae/daac4e04ef473d0da419ebe2ddf2", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/52/9d/d6c5366d82b56d1c79553ae3258b", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/35/db/9f6868dde4184cb3b33153981548", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/0c/e0/a869977d8ee1dcf4bcbb0853fe3c", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/31/c1/e51379d7cf51aec768855e6e7eb7", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/0f/48/52683efe93f7311f2a81a280a87e", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/7c/05/660a71d76685232d9bd91d979ef8", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/30/5a/b2e0ce3986936938c65e4bef2d0e", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/c0/32/b7907e3859a5c5013a3d97b6b523", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/2d/4f/f4fe67827f36cd59cd5193333a02", "src/ballistica/generated/python_embedded/bootstrap_monolithic.inc": "https://files.ballistica.net/cache/ba1/ef/c1/aa5f1aa10af89f5c0b1e616355fd" diff --git a/.idea/dictionaries/ericf.xml b/.idea/dictionaries/ericf.xml index 760346e2..de2b9cc5 100644 --- a/.idea/dictionaries/ericf.xml +++ b/.idea/dictionaries/ericf.xml @@ -113,6 +113,7 @@ appspot appstate appstore + apptime apputils archivepath archivepathbase diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a8ebd26..7940d360 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20861, api 7, 2022-09-17) +### 1.7.7 (build 20862, api 7, 2022-09-17) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 44a3016d..602e6e59 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -44,7 +44,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20861 + expected_build = 20862 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/ballisticacore-cmake/.idea/dictionaries/ericf.xml b/ballisticacore-cmake/.idea/dictionaries/ericf.xml index 45474675..21c6ae55 100644 --- a/ballisticacore-cmake/.idea/dictionaries/ericf.xml +++ b/ballisticacore-cmake/.idea/dictionaries/ericf.xml @@ -69,6 +69,7 @@ appnameupper appspot appstate + apptime argsjoined argstr armcap diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 0f572a9e..cdc2facb 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20861; +const int kAppBuildNumber = 20862; const char* kAppVersion = "1.7.7"; // Our standalone globals. diff --git a/tools/efro/error.py b/tools/efro/error.py index 640d0143..d33c42db 100644 --- a/tools/efro/error.py +++ b/tools/efro/error.py @@ -188,7 +188,14 @@ def is_asyncio_streams_communication_error(exc: BaseException) -> bool: # Let's still complain, however, if we get any SSL errors besides # this one. https://bugs.python.org/issue39951 if isinstance(exc, ssl.SSLError): - if 'APPLICATION_DATA_AFTER_CLOSE_NOTIFY' in str(exc): + excstr = str(exc) + if 'APPLICATION_DATA_AFTER_CLOSE_NOTIFY' in excstr: + return True + + # Also occasionally am getting WRONG_VERSION_NUMBER ssl errors; + # Assuming this just means client is attempting to connect from some + # outdated browser or whatnot. + if 'SSL: WRONG_VERSION_NUMBER' in excstr: return True return False diff --git a/tools/efro/message/_protocol.py b/tools/efro/message/_protocol.py index ae6c2df0..fc7d3d03 100644 --- a/tools/efro/message/_protocol.py +++ b/tools/efro/message/_protocol.py @@ -149,7 +149,7 @@ class MessageProtocol: # Log any errors we got during handling if so desired. if self.receiver_logs_exceptions: - logging.exception('Error handling message.') + logging.exception('Error in efro.message handling.') # If anything goes wrong, return a ErrorResponse instead. # (either CLEAN or generic REMOTE) diff --git a/tools/efro/rpc.py b/tools/efro/rpc.py index a360ca62..93c78ab5 100644 --- a/tools/efro/rpc.py +++ b/tools/efro/rpc.py @@ -559,7 +559,7 @@ class RPCEndpoint: # If that doesn't happen, make a fuss so we know to fix it. # The other end will simply never get a response to this # message. - logging.exception('Error handling message') + logging.exception('Error handling raw rpc message') return assert self._peer_info is not None From 68ffe1f2bd88cba0e250cce7d235ef85912e3cc6 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 19 Sep 2022 18:46:08 -0700 Subject: [PATCH 30/40] fixed cloud console crash error --- .efrocachemap | 88 +++++++++---------- CHANGELOG.md | 4 +- assets/src/ba_data/python/._ba_sources_hash | 2 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/ballistica.cc | 2 +- src/ballistica/core/fatal_error.cc | 8 +- src/ballistica/logic/logic.cc | 9 +- src/ballistica/logic/logic.h | 4 +- .../python/class/python_class_context_call.cc | 2 +- src/ballistica/python/python_context_call.cc | 8 +- tests/test_efro/test_message.py | 30 ++++--- tools/efro/message/__init__.py | 15 ++-- tools/efro/message/_message.py | 10 +-- tools/efro/message/_protocol.py | 68 +++++++------- tools/efro/message/_receiver.py | 15 ++-- tools/efro/message/_sender.py | 34 +++---- 16 files changed, 151 insertions(+), 150 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 73c67ba6..d4f85ea2 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,50 +3995,50 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/bc/d7/f65513a0b3d5fa8b5f4cfe342052", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/06/03/381b1b4470868245225dd4e4bb67", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/52/b0/36011f65de64a547009bef7fe6ec", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e2/46/384efcdbfb324b63889d567e7f14", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/8b/27/7bab35742af8c101f4aab3ebbd3d", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3b/d0/c1ee5a02a09c1d676a22a20fe8a7", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e9/2e/3ae4fb2983bb36167d1fe3044358", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9e/93/12e8d5357db44c97549fe2fbd7ca", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/53/6d/06e5987cfcf47d740ead2e8c3b7f", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/1b/5b/fd0fa7104c3e2d3a22c180db47cf", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ca/98/0e12c6aa44fc9e64492b6da67b02", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e6/81/aacab39968075487c9f610e3036c", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/94/bc/7a2fb10033217cac2fc04ccd0309", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a4/da/b7095762fbdef22aff5d77c5d45d", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/8b/05/2051b310f7989aa9aa04339de2f3", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2d/6e/3befc00833dc482ef55b70a915fe", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/82/ce/77695599588b675fac1e10febeae", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/3a/c3/d042e59d36f71c885036ed0e73d4", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/87/48/b1551cd7b5cf44c06a3e3a1a66a4", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/6d/e2/3366be4f442e6ef48b5ef5babe87", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d6/9a/5e36fb51a797da74db8f366a8e6d", - "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/98/d7/e827cc644d4dde0c1bddb17121b0", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9b/e0/a1ae5fdadff116de78727e2a8d30", - "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/49/76/fd27d293fd73d324ecc433b1e253", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/1e/93/b85c7585218b5c86d766a23373c6", - "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/34/0a/4547b5a8a00a35874cfbab25fc11", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/68/5a/a4a030424d8d5900433bdb70bd83", - "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e1/4b/278433e2332245313d4fa3390aee", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/22/c1/fc9726d56ac62c757e7f7eeb56e2", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/23/4f/ee03bed8d42b8e12832efbd17968", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/dc/7a/f5bae1a284d2b51e149f12da9e18", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2e/75/254680a01a85fcdc19db275cd2ff", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/79/fb/65e1f1851f2dc663eb5d9dd27ae9", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/24/5d/33ca757aa471e81ee2efe83b5c32", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/83/3e/35613478ab4887b7f77126c1d910", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ba/a7/b925b7eb7b2da10fdc9c88e59576", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/0a/ae/daac4e04ef473d0da419ebe2ddf2", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/52/9d/d6c5366d82b56d1c79553ae3258b", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/35/db/9f6868dde4184cb3b33153981548", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/0c/e0/a869977d8ee1dcf4bcbb0853fe3c", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/31/c1/e51379d7cf51aec768855e6e7eb7", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/0f/48/52683efe93f7311f2a81a280a87e", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/7c/05/660a71d76685232d9bd91d979ef8", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/30/5a/b2e0ce3986936938c65e4bef2d0e", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b3/94/954559711625a0bb6a29d41c35ff", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/44/1e/7eec4d37c0c2afb581927efbb2dc", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/92/75/2d6b53a09ce1fe7cbe3b50d832de", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cf/eb/2f2119b7c86ecbfb2a8b725b21f6", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c2/95/be04f3219b078c92a787627b42b7", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/53/f5/3bd3ba9c59b87ff7b8abc4233844", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5e/21/a913309416dde18bc4c9104c3ec5", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/28/25/54314d17a5a12be51a3b340359bd", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/07/39/13923a2f10d8e2a8d1d12007cbed", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a7/86/8cfb723071ad46355af9166ba59a", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ad/73/6013ee6879fae3c3e06b15396fb0", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/da/8b/f33a546e2342591ab84ddcf4053e", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/f8/b7/fffc4c52e906890b35c936441b60", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/27/24/2ca5005df08ea5a7a78cd20b020a", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cd/8d/c59fcc270b637990d12cd8a758e0", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/54/a9/78e4658fd4446898b11633191c01", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/53/30/cd915e748f31208239b90f5a7a2c", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a9/4e/c367a7a66eb17df7757dc85d59b6", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/5d/13/38ab5bdd9fdb0abca878d0bbfbab", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/02/62/c3a8023aa43567204407325d6c4c", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/23/17/f0d22a9a91a295ee4a9d94db2af9", + "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d5/4f/bfbcdd18679b4ba0df1b040e8c15", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/96/e9/0f4aa3d10f2d50fe670bb6d89ba0", + "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/26/ef/1b58d3c788441242ed9ca9352499", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/79/77/b35c5f93f62d92fe9cdb548f6e54", + "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c6/53/8e678b75f456378e17e4f639fe35", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ab/1d/b514c16cfda2f5840676a4c75ca3", + "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d7/c4/b797fd5365d34fcfb60d6275fb3c", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b0/6c/b8f8c1d1d8e2f772208af12e085f", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c0/e1/f57102a8da2fe0ca7787c0a7924a", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8f/16/19494ad899b3f1990dd2b5cdfa99", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a9/d5/59ba30f21d5583bdc92516c0916e", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e7/82/e29dbff494964b753a08eaa66b66", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2f/06/ec124d5bfce4d3f268b1318755b8", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3f/47/3322caea5f9a92735076c1017839", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f5/9f/ce9a27aea9a4b7056800cf68afe9", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/6c/56/6180e5d6db6868b7438751320faf", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/71/24/e873efab9c315ec907427bd22327", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/3d/d6/b1a3c97a66d3f5ad38d5f5dda476", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/5a/e9/14593b84a3035a1bd7ce3980818d", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/87/5c/38b4d59ad04f6ba89dae6ca38fa5", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/3c/0a/6b151c9054294db58cf98957a515", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/e3/fb/7be0f96c82816af61849aaf4357a", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/23/dc/91a8e0f2123a75b4d72a0d26ab25", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/c0/32/b7907e3859a5c5013a3d97b6b523", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/2d/4f/f4fe67827f36cd59cd5193333a02", "src/ballistica/generated/python_embedded/bootstrap_monolithic.inc": "https://files.ballistica.net/cache/ba1/ef/c1/aa5f1aa10af89f5c0b1e616355fd" diff --git a/CHANGELOG.md b/CHANGELOG.md index 7940d360..8f475bb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20862, api 7, 2022-09-17) +### 1.7.7 (build 20865, api 7, 2022-09-19) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. @@ -39,6 +39,8 @@ - If you want to grab recent logs, you can now use `ba.app.log_handler.get_cached()`. This will give you everything that has gone through Python logging, Python stdout/stderr, and the C++ Log() call (up to the max cache size that is). - LogHandler output now ALWAYS goes to stderr. Previously it only would if an interactive terminal was detected. This should make the binary easier to debug if run from scripts/etc. We can add a `--quiet` option if needed or whatnot. - (build 20859) Fixed an error setting up asyncio loops under Windows related to the fact that Python is now inited in the main thread. +- (build 20864) Fatal-error message/traceback now properly prints to stderr again (I think the reject logging rejiggering caused it to stop). +- (build 20864) Fixed an issue where the app could crash when connected to the cloud console while in a network game. ### 1.7.6 (build 20687, api 7, 2022-08-11) diff --git a/assets/src/ba_data/python/._ba_sources_hash b/assets/src/ba_data/python/._ba_sources_hash index 9d8ff3a2..4d3af060 100644 --- a/assets/src/ba_data/python/._ba_sources_hash +++ b/assets/src/ba_data/python/._ba_sources_hash @@ -1 +1 @@ -84155513838284412598729205538639495871 \ No newline at end of file +137071025041513581787580065580079045765 \ No newline at end of file diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 602e6e59..936ce53b 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -44,7 +44,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20862 + expected_build = 20865 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index cdc2facb..912ec63b 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20862; +const int kAppBuildNumber = 20865; const char* kAppVersion = "1.7.7"; // Our standalone globals. diff --git a/src/ballistica/core/fatal_error.cc b/src/ballistica/core/fatal_error.cc index 7dc75d06..9df548db 100644 --- a/src/ballistica/core/fatal_error.cc +++ b/src/ballistica/core/fatal_error.cc @@ -27,7 +27,7 @@ auto FatalError::ReportFatalError(const std::string& message, // error to the user and exiting the app cleanly (so we don't pollute our // crash records with results of user tinkering). - // Give the platform the opportunity to completely override our handling. + // Give the platform the opportunity to augment or override our handling. if (g_platform) { auto handled = g_platform->ReportFatalError(message, in_top_level_exception_handler); @@ -38,7 +38,8 @@ auto FatalError::ReportFatalError(const std::string& message, std::string dialog_msg = message; if (!dialog_msg.empty()) { - dialog_msg += "\n"; + // Why was this here? + // dialog_msg += "\n"; } auto starttime = time(nullptr); @@ -75,9 +76,10 @@ auto FatalError::ReportFatalError(const std::string& message, g_early_v1_cloud_log_writes = 0; // Add this to our V1CloudLog which we'll be attempting to send momentarily, - // and also try to present it directly to the user. + // and also go to platform-specific logging and good ol' stderr. Logging::V1CloudLog(logmsg); Logging::DisplayLog("root", LogLevel::kCritical, logmsg); + fprintf(stderr, "%s\n", logmsg.c_str()); std::string prefix = "FATAL-ERROR-LOG:"; std::string suffix; diff --git a/src/ballistica/logic/logic.cc b/src/ballistica/logic/logic.cc index 5c5acdb5..ab03be30 100644 --- a/src/ballistica/logic/logic.cc +++ b/src/ballistica/logic/logic.cc @@ -1050,15 +1050,10 @@ void Logic::PushPythonRawCallable(PyObject* callable, bool fg_context) { thread()->PushCall([this, callable, fg_context] { assert(InLogicThread()); - // Lets run this in the UI context. - // (can add other options if we need later) + // Run this in the UI context by default, or foreground if requested. ScopedSetContext cp(fg_context ? GetForegroundContext() : GetUIContext()); - // This event contains a raw python obj with an incremented ref-count. - auto call(Object::New(callable)); - Py_DECREF(callable); // now just held by call - - call->Run(); + PythonRef(callable, PythonRef::kSteal).Call(); }); } diff --git a/src/ballistica/logic/logic.h b/src/ballistica/logic/logic.h index 5bf933e6..4de58019 100644 --- a/src/ballistica/logic/logic.h +++ b/src/ballistica/logic/logic.h @@ -83,8 +83,8 @@ class Logic { auto PushPythonWeakCallArgs(const Object::WeakRef& call, const PythonRef& args) -> void; - // Push a raw Python call, decrements its refcount after running. - // Can be pushed from any thread. + // Push a raw Python call from any thread. Refcount should be incremented + // beforehand and will be decremented after running. auto PushPythonRawCallable(PyObject* callable, bool fg_context = false) -> void; auto PushScreenMessage(const std::string& message, const Vector3f& color) diff --git a/src/ballistica/python/class/python_class_context_call.cc b/src/ballistica/python/class/python_class_context_call.cc index 81cfd2cb..01d7c50b 100644 --- a/src/ballistica/python/class/python_class_context_call.cc +++ b/src/ballistica/python/class/python_class_context_call.cc @@ -102,7 +102,7 @@ auto PythonClassContextCall::tp_new(PyTypeObject* type, PyObject* args, if (!PyArg_ParseTuple(args, "O", &source_obj)) return nullptr; if (!InLogicThread()) { throw Exception( - "ERROR: " + std::string(type_obj.tp_name) + std::string(type_obj.tp_name) + " objects must only be created in the logic thread (current is (" + GetCurrentThreadName() + ")."); } diff --git a/src/ballistica/python/python_context_call.cc b/src/ballistica/python/python_context_call.cc index 15fa1327..938e2dd1 100644 --- a/src/ballistica/python/python_context_call.cc +++ b/src/ballistica/python/python_context_call.cc @@ -14,17 +14,17 @@ PythonContextCall* PythonContextCall::current_call_ = nullptr; PythonContextCall::PythonContextCall(PyObject* obj_in) { assert(InLogicThread()); - // as a sanity test, store the current context ptr just to make sure it - // hasn't changed when we run + // As a sanity test, store the current context ptr just to make sure it + // hasn't changed when we run. #if BA_DEBUG_BUILD context_target_sanity_test_ = context_.target.get(); #endif // BA_DEBUG_BUILD BA_PRECONDITION(PyCallable_Check(obj_in)); object_.Acquire(obj_in); GetTrace(); - // ok now we need to register this call with whatever the context is; + // Ok now we need to register this call with whatever the context is; // it can be stored in a host-activity, a host-session, or the UI context. - // whoever it is registered with will explicitly release its contents on + // Whoever it is registered with will explicitly release its contents on // shutdown and ensure that nothing gets run after that point. if (HostActivity* ha = context_.GetHostActivity()) { ha->RegisterCall(this); diff --git a/tests/test_efro/test_message.py b/tests/test_efro/test_message.py index 185ca140..3d04624b 100644 --- a/tests/test_efro/test_message.py +++ b/tests/test_efro/test_message.py @@ -18,7 +18,7 @@ from efro.dataclassio import ioprepped from efro.message import (Message, Response, MessageProtocol, MessageSender, BoundMessageSender, MessageReceiver, BoundMessageReceiver, UnregisteredMessageIDError, - EmptyResponse) + EmptySysResponse) if TYPE_CHECKING: from typing import Any, Callable, Awaitable @@ -424,8 +424,8 @@ TEST_PROTOCOL = MessageProtocol( 0: _TResp1, 1: _TResp2, }, - receiver_returns_stack_traces=True, - receiver_logs_exceptions=False, + forward_clean_errors=True, + remote_errors_include_stack_traces=True, ) # Represents an 'evolved' TEST_PROTOCOL (one extra message type added). @@ -441,8 +441,8 @@ TEST_PROTOCOL_B = MessageProtocol( 0: _TResp1, 1: _TResp2, }, - receiver_returns_stack_traces=True, - receiver_logs_exceptions=False, + forward_clean_errors=True, + remote_errors_include_stack_traces=True, ) TEST_PROTOCOL_SINGLE = MessageProtocol( @@ -452,8 +452,7 @@ TEST_PROTOCOL_SINGLE = MessageProtocol( response_types={ 0: _TResp1, }, - receiver_returns_stack_traces=True, - receiver_logs_exceptions=False, + remote_errors_include_stack_traces=True, ) @@ -463,12 +462,16 @@ def test_protocol_creation() -> None: # This should fail because _TMsg1 can return _TResp1 which # is not given an id here. with pytest.raises(ValueError): - _protocol = MessageProtocol(message_types={0: _TMsg1}, - response_types={0: _TResp2}) + _protocol = MessageProtocol( + message_types={0: _TMsg1}, + response_types={0: _TResp2}, + ) # Now it should work. - _protocol = MessageProtocol(message_types={0: _TMsg1}, - response_types={0: _TResp1}) + _protocol = MessageProtocol( + message_types={0: _TMsg1}, + response_types={0: _TResp1}, + ) def test_sender_module_single_emb() -> None: @@ -777,7 +780,7 @@ def test_full_pipeline() -> None: # Emulate forwarding unregistered messages on to some # other handler... response_dict = self.msg.protocol.response_to_dict( - EmptyResponse()) + EmptySysResponse()) return self.msg.protocol.encode_dict(response_dict) raise @@ -909,7 +912,8 @@ def test_full_pipeline() -> None: assert response3 is None assert isinstance(response4, _TResp1) - # Remote CleanErrors should come across locally as the same. + # Remote CleanErrors should come across locally as the same + # (provided our protocol has enabled support for them). try: _response5 = obj.msg.send(_TMsg1(ival=1)) except Exception as exc: diff --git a/tools/efro/message/__init__.py b/tools/efro/message/__init__.py index 11a82fd3..bce8da5b 100644 --- a/tools/efro/message/__init__.py +++ b/tools/efro/message/__init__.py @@ -11,15 +11,16 @@ from efro.message._protocol import MessageProtocol from efro.message._sender import (MessageSender, BoundMessageSender) from efro.message._receiver import (MessageReceiver, BoundMessageReceiver) from efro.message._module import (create_sender_module, create_receiver_module) -from efro.message._message import (Message, Response, EmptyResponse, - ErrorResponse, StringResponse, BoolResponse, - UnregisteredMessageIDError) +from efro.message._message import (Message, Response, EmptySysResponse, + ErrorSysResponse, StringResponse, + BoolResponse, UnregisteredMessageIDError) __all__ = [ - 'Message', 'Response', 'EmptyResponse', 'ErrorResponse', 'StringResponse', - 'BoolResponse', 'MessageProtocol', 'MessageSender', 'BoundMessageSender', - 'MessageReceiver', 'BoundMessageReceiver', 'create_sender_module', - 'create_receiver_module', 'UnregisteredMessageIDError' + 'Message', 'Response', 'EmptySysResponse', 'ErrorSysResponse', + 'StringResponse', 'BoolResponse', 'MessageProtocol', 'MessageSender', + 'BoundMessageSender', 'MessageReceiver', 'BoundMessageReceiver', + 'create_sender_module', 'create_receiver_module', + 'UnregisteredMessageIDError' ] # Have these things present themselves cleanly as 'thismodule.SomeClass' diff --git a/tools/efro/message/_message.py b/tools/efro/message/_message.py index adc2d190..c2bc8c17 100644 --- a/tools/efro/message/_message.py +++ b/tools/efro/message/_message.py @@ -27,12 +27,12 @@ class Message: def get_response_types(cls) -> list[type[Response]]: """Return all message types this Message can result in when sent. - The default implementation specifies EmptyResponse, so messages with + The default implementation specifies EmptySysResponse, so messages with no particular response needs can leave this untouched. Note that ErrorMessage is handled as a special case and does not need to be specified here. """ - return [EmptyResponse] + return [EmptySysResponse] class Response: @@ -44,7 +44,7 @@ class Response: @ioprepped @dataclass -class ErrorResponse(Response): +class ErrorSysResponse(Response): """Response saying some error has occurred for the send. This type is unique in that it is not returned to the user; it @@ -64,12 +64,12 @@ class ErrorResponse(Response): @ioprepped @dataclass -class EmptyResponse(Response): +class EmptySysResponse(Response): """The response equivalent of None.""" # TODO: could allow handlers to deal in raw values for these -# types similar to how we allow None in place of EmptyResponse. +# types similar to how we allow None in place of EmptySysResponse. # Though not sure if they are widely used enough to warrant the # extra code complexity. @ioprepped diff --git a/tools/efro/message/_protocol.py b/tools/efro/message/_protocol.py index fc7d3d03..5f3b0d80 100644 --- a/tools/efro/message/_protocol.py +++ b/tools/efro/message/_protocol.py @@ -14,8 +14,9 @@ import json from efro.error import CleanError from efro.dataclassio import (is_ioprepped_dataclass, dataclass_to_dict, dataclass_from_dict) -from efro.message._message import (Message, Response, ErrorResponse, - EmptyResponse, UnregisteredMessageIDError) +from efro.message._message import (Message, Response, ErrorSysResponse, + EmptySysResponse, + UnregisteredMessageIDError) if TYPE_CHECKING: from typing import Any, Literal @@ -33,29 +34,20 @@ class MessageProtocol: def __init__(self, message_types: dict[int, type[Message]], response_types: dict[int, type[Response]], - preserve_clean_errors: bool = True, - receiver_logs_exceptions: bool = True, - receiver_returns_stack_traces: bool = False) -> None: + forward_clean_errors: bool = False, + remote_errors_include_stack_traces: bool = False) -> None: """Create a protocol with a given configuration. Note that common response types are automatically registered with (unchanging negative ids) so they don't need to be passed explicitly (but can be if a different id is desired). - If 'preserve_clean_errors' is True, efro.error.CleanError + If 'forward_clean_errors' is True, efro.error.CleanError exceptions raised on the receiver end will result in a matching CleanError raised back on the sender. All other Exception types come across as efro.error.RemoteError. - When 'receiver_logs_exceptions' is True, any uncaught Exceptions - on the receiver end will be logged there via logging.exception() - (in addition to the usual behavior of returning an ErrorResponse - to the sender). This is good to leave enabled if your - intention is to never return ErrorResponses. Looser setups - making routine use of CleanErrors or whatnot may want to - disable this, however. - - If 'receiver_returns_stack_traces' is True, stringified stack + If 'remote_errors_include_stack_traces' is True, stringified stack traces will be returned to the sender for exceptions occurring on the receiver end. This can make debugging easier but should only be used when the client is trusted to see such info. @@ -88,15 +80,20 @@ class MessageProtocol: # Go ahead and auto-register a few common response types # if the user has not done so explicitly. Use unique negative # IDs which will never change or overlap with user ids. - def _reg_if_not(reg_tp: type[Response], reg_id: int) -> None: + def _reg_sys(reg_tp: type[Response], reg_id: int) -> None: + + # If we have a positive id registered already, we still point + # negative sys id at this type but not the opposite. if reg_tp in self.response_ids_by_type: + self.response_types_by_id[reg_id] = reg_tp return + assert self.response_types_by_id.get(reg_id) is None self.response_types_by_id[reg_id] = reg_tp self.response_ids_by_type[reg_tp] = reg_id - _reg_if_not(ErrorResponse, -1) - _reg_if_not(EmptyResponse, -2) + _reg_sys(ErrorSysResponse, -1) + _reg_sys(EmptySysResponse, -2) # Some extra-thorough validation in debug mode. if __debug__: @@ -127,9 +124,9 @@ class MessageProtocol: 'message_types contains duplicate __name__s;' ' all types are required to have unique names.') - self.preserve_clean_errors = preserve_clean_errors - self.receiver_logs_exceptions = receiver_logs_exceptions - self.receiver_returns_stack_traces = receiver_returns_stack_traces + self.forward_clean_errors = forward_clean_errors + self.remote_errors_include_stack_traces = ( + remote_errors_include_stack_traces) @staticmethod def encode_dict(obj: dict) -> str: @@ -147,21 +144,20 @@ class MessageProtocol: def error_to_response(self, exc: Exception) -> Response: """Translate an error to a response.""" - # Log any errors we got during handling if so desired. - if self.receiver_logs_exceptions: - logging.exception('Error in efro.message handling.') + # Log any errors we got during handling. + logging.exception('Error in efro.message handling.') - # If anything goes wrong, return a ErrorResponse instead. + # If anything goes wrong, return a ErrorSysResponse instead. # (either CLEAN or generic REMOTE) - if isinstance(exc, CleanError) and self.preserve_clean_errors: - return ErrorResponse( + if isinstance(exc, CleanError) and self.forward_clean_errors: + return ErrorSysResponse( error_message=str(exc), - error_type=ErrorResponse.ErrorType.REMOTE_CLEAN) - return ErrorResponse( + error_type=ErrorSysResponse.ErrorType.REMOTE_CLEAN) + return ErrorSysResponse( error_message=(traceback.format_exc() - if self.receiver_returns_stack_traces else + if self.remote_errors_include_stack_traces else 'An internal error has occurred.'), - error_type=ErrorResponse.ErrorType.REMOTE) + error_type=ErrorSysResponse.ErrorType.REMOTE) def _to_dict(self, message: Any, ids_by_type: dict[type, int], opname: str) -> dict: @@ -236,7 +232,7 @@ class MessageProtocol: rsptypes.append(Response) for rsp_tp in rsptypes: # Skip these as they don't actually show up in code. - if rsp_tp is EmptyResponse or rsp_tp is ErrorResponse: + if rsp_tp is EmptySysResponse or rsp_tp is ErrorSysResponse: continue if (single_message_type and part == 'sender' and rsp_tp is not Response): @@ -344,9 +340,9 @@ class MessageProtocol: f' """Protocol-specific bound sender."""\n') def _filt_tp_name(rtype: type[Response]) -> str: - # We accept None to equal EmptyResponse so reflect that + # We accept None to equal EmptySysResponse so reflect that # in the type annotation. - return 'None' if rtype is EmptyResponse else rtype.__name__ + return 'None' if rtype is EmptySysResponse else rtype.__name__ # Define handler() overloads for all registered message types. if msgtypes: @@ -441,9 +437,9 @@ class MessageProtocol: # Define handler() overloads for all registered message types. def _filt_tp_name(rtype: type[Response]) -> str: - # We accept None to equal EmptyResponse so reflect that + # We accept None to equal EmptySysResponse so reflect that # in the type annotation. - return 'None' if rtype is EmptyResponse else rtype.__name__ + return 'None' if rtype is EmptySysResponse else rtype.__name__ if msgtypes: cbgn = 'Awaitable[' if is_async else '' diff --git a/tools/efro/message/_receiver.py b/tools/efro/message/_receiver.py index f45b2556..b277ff4c 100644 --- a/tools/efro/message/_receiver.py +++ b/tools/efro/message/_receiver.py @@ -11,8 +11,9 @@ import inspect import logging from typing import TYPE_CHECKING -from efro.message._message import (Message, Response, EmptyResponse, - ErrorResponse, UnregisteredMessageIDError) +from efro.message._message import (Message, Response, EmptySysResponse, + ErrorSysResponse, + UnregisteredMessageIDError) if TYPE_CHECKING: from typing import Any, Callable, Awaitable @@ -123,8 +124,8 @@ class MessageReceiver: # types.UnionType above. responsetypes = (ret, ) # type: ignore - # Return type of None translates to EmptyResponse. - responsetypes = tuple(EmptyResponse if r is type(None) else r + # Return type of None translates to EmptySysResponse. + responsetypes = tuple(EmptySysResponse if r is type(None) else r for r in responsetypes) # noqa # Make sure our protocol has this message type registered and our @@ -236,13 +237,13 @@ class MessageReceiver: response: Response | None) -> str: """Encode a response provided by the user for sending.""" - # A return value of None equals EmptyResponse. + # A return value of None equals EmptySysResponse. if response is None: - response = EmptyResponse() + response = EmptySysResponse() assert isinstance(response, Response) # (user should never explicitly return error-responses) - assert not isinstance(response, ErrorResponse) + assert not isinstance(response, ErrorSysResponse) assert type(response) in message.get_response_types() response_dict = self.protocol.response_to_dict(response) if self._encode_filter_call is not None: diff --git a/tools/efro/message/_sender.py b/tools/efro/message/_sender.py index c9d343d2..b176f7f7 100644 --- a/tools/efro/message/_sender.py +++ b/tools/efro/message/_sender.py @@ -10,7 +10,7 @@ import logging from typing import TYPE_CHECKING from efro.error import CleanError, RemoteError, CommunicationError -from efro.message._message import EmptyResponse, ErrorResponse +from efro.message._message import EmptySysResponse, ErrorSysResponse if TYPE_CHECKING: from typing import Any, Callable, Awaitable @@ -139,12 +139,12 @@ class MessageSender: except Exception as exc: # Any error in the raw send call gets recorded as either # a local or communication error. - return ErrorResponse( + return ErrorSysResponse( error_message= f'Error in MessageSender @send_method ({type(exc)}): {exc}', - error_type=(ErrorResponse.ErrorType.COMMUNICATION + error_type=(ErrorSysResponse.ErrorType.COMMUNICATION if isinstance(exc, CommunicationError) else - ErrorResponse.ErrorType.LOCAL)) + ErrorSysResponse.ErrorType.LOCAL)) return self._decode_raw_response(bound_obj, message, response_encoded) async def send_split_part_1_async(self, bound_obj: Any, @@ -166,13 +166,13 @@ class MessageSender: except Exception as exc: # Any error in the raw send call gets recorded as either # a local or communication error. - return ErrorResponse( + return ErrorSysResponse( error_message= f'Error in MessageSender @send_async_method ({type(exc)}):' f' {exc}', - error_type=(ErrorResponse.ErrorType.COMMUNICATION + error_type=(ErrorSysResponse.ErrorType.COMMUNICATION if isinstance(exc, CommunicationError) else - ErrorResponse.ErrorType.LOCAL)) + ErrorSysResponse.ErrorType.LOCAL)) return self._decode_raw_response(bound_obj, message, response_encoded) def send_split_part_2(self, message: Message, @@ -214,13 +214,13 @@ class MessageSender: # If we got to this point, we successfully communicated # with the other end so errors represent protocol mismatches # or other invalid data. For now let's just log it but perhaps - # we'd want to somehow embed it in the ErrorResponse to be + # we'd want to somehow embed it in the ErrorSysResponse to be # available directly to the user later. logging.exception('Error decoding raw response') - response = ErrorResponse( + response = ErrorSysResponse( error_message= 'Error decoding raw response; see log for details.', - error_type=ErrorResponse.ErrorType.LOCAL) + error_type=ErrorSysResponse.ErrorType.LOCAL) return response def _unpack_raw_response(self, raw_response: Response) -> Response | None: @@ -232,25 +232,25 @@ class MessageSender: run such that any raised Exception is active when the callback fires; not on the thread where the message was sent. """ - # EmptyResponse translates to None - if isinstance(raw_response, EmptyResponse): + # EmptySysResponse translates to None + if isinstance(raw_response, EmptySysResponse): return None # Some error occurred. Raise a local Exception for it. - if isinstance(raw_response, ErrorResponse): + if isinstance(raw_response, ErrorSysResponse): if (raw_response.error_type is - ErrorResponse.ErrorType.COMMUNICATION): + ErrorSysResponse.ErrorType.COMMUNICATION): raise CommunicationError(raw_response.error_message) # If something went wrong on *our* end of the connection, # don't say it was a remote error. - if raw_response.error_type is ErrorResponse.ErrorType.LOCAL: + if raw_response.error_type is ErrorSysResponse.ErrorType.LOCAL: raise RuntimeError(raw_response.error_message) # If they want to support clean errors, do those. - if (self.protocol.preserve_clean_errors and raw_response.error_type - is ErrorResponse.ErrorType.REMOTE_CLEAN): + if (self.protocol.forward_clean_errors and raw_response.error_type + is ErrorSysResponse.ErrorType.REMOTE_CLEAN): raise CleanError(raw_response.error_message) # Everything else gets lumped in as a remote error. From c81ba28620a60ce1517186a119d002ec3953004d Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 19 Sep 2022 22:05:42 -0700 Subject: [PATCH 31/40] added custom Python help() which behaves under in-game console or cloud-console --- .efrocachemap | 56 +++++++++++----------- CHANGELOG.md | 3 +- assets/src/ba_data/python/ba/_bootstrap.py | 30 +++++++++++- src/ballistica/ballistica.cc | 2 +- 4 files changed, 59 insertions(+), 32 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index d4f85ea2..f5399fd7 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b3/94/954559711625a0bb6a29d41c35ff", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/44/1e/7eec4d37c0c2afb581927efbb2dc", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/92/75/2d6b53a09ce1fe7cbe3b50d832de", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cf/eb/2f2119b7c86ecbfb2a8b725b21f6", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c2/95/be04f3219b078c92a787627b42b7", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/53/f5/3bd3ba9c59b87ff7b8abc4233844", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5e/21/a913309416dde18bc4c9104c3ec5", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/28/25/54314d17a5a12be51a3b340359bd", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/07/39/13923a2f10d8e2a8d1d12007cbed", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a7/86/8cfb723071ad46355af9166ba59a", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ad/73/6013ee6879fae3c3e06b15396fb0", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/da/8b/f33a546e2342591ab84ddcf4053e", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/f8/b7/fffc4c52e906890b35c936441b60", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/27/24/2ca5005df08ea5a7a78cd20b020a", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cd/8d/c59fcc270b637990d12cd8a758e0", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/54/a9/78e4658fd4446898b11633191c01", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/53/30/cd915e748f31208239b90f5a7a2c", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a9/4e/c367a7a66eb17df7757dc85d59b6", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/5d/13/38ab5bdd9fdb0abca878d0bbfbab", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/02/62/c3a8023aa43567204407325d6c4c", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/18/b5/fdb800eba3e560e1e6b892d639a6", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/4d/ff/a05c193e6d1324551f40c92b7b61", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/68/b1/409e956704f4d019e8fe5ffce1dc", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/66/44/0a37f6394999644e2da10356d9e6", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/6e/b6/c999544c7354b2d264e550a40851", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a1/df/94e1bd43783d4b95404bca30d1ee", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/86/85/637ebdfd6f4dbd5f0b7c0788bcc7", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/62/60/fd9c38903be9656c0eba0666cc52", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/88/4e/6718a6097277b8403bc0e22e987a", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/fb/69/1a73d2f13f5a6d125e40c6446db4", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cf/cf/349a54fb60273d5e87bba5943b4e", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4d/bf/d0088e558d27e308b4e0e1d976da", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a1/59/0d7b240a7a5dfd01891465cda63f", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/89/f2/121681f63a15009d4dbb847fa285", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1c/10/81a9c096bc4b06a10602e9bf554f", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e2/72/c6ea79d94342a0d4f512a16bd82f", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/2c/5f/47e3bc81bb71823e6c7e9ce7b385", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/e3/c7/fd9f0eafb404b672b6fe065e5728", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/0c/bb/9e8aa3497dd3557146cd7396c363", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/67/77/b9695816c6e7d38286cf5ca6f6ed", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/23/17/f0d22a9a91a295ee4a9d94db2af9", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d5/4f/bfbcdd18679b4ba0df1b040e8c15", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/96/e9/0f4aa3d10f2d50fe670bb6d89ba0", @@ -4031,14 +4031,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2f/06/ec124d5bfce4d3f268b1318755b8", "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3f/47/3322caea5f9a92735076c1017839", "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f5/9f/ce9a27aea9a4b7056800cf68afe9", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/6c/56/6180e5d6db6868b7438751320faf", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/71/24/e873efab9c315ec907427bd22327", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/3d/d6/b1a3c97a66d3f5ad38d5f5dda476", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/5a/e9/14593b84a3035a1bd7ce3980818d", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/87/5c/38b4d59ad04f6ba89dae6ca38fa5", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/3c/0a/6b151c9054294db58cf98957a515", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/e3/fb/7be0f96c82816af61849aaf4357a", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/23/dc/91a8e0f2123a75b4d72a0d26ab25", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/ac/91/58112f039b7ad67af761ba988698", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/d4/b7/9bba9f1e630f5c1691b1483682f1", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/a6/0f/2fbf2e656b3e8d0041c04cdc0c45", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/4b/f1/1afbb7997808a9aa22154f1ba97c", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/e6/b5/7f1e577e568f55324de3cccd877d", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/6f/df/ff6619da29ce2ba222ea9f7918a3", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/67/3f/4be4522ae75ab5ce73124a93db83", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/e9/e0/2687b6a41c92b8098d5115804d7f", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/c0/32/b7907e3859a5c5013a3d97b6b523", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/2d/4f/f4fe67827f36cd59cd5193333a02", "src/ballistica/generated/python_embedded/bootstrap_monolithic.inc": "https://files.ballistica.net/cache/ba1/ef/c1/aa5f1aa10af89f5c0b1e616355fd" diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f475bb0..48c0fff0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20865, api 7, 2022-09-19) +### 1.7.7 (build 20866, api 7, 2022-09-19) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. @@ -41,6 +41,7 @@ - (build 20859) Fixed an error setting up asyncio loops under Windows related to the fact that Python is now inited in the main thread. - (build 20864) Fatal-error message/traceback now properly prints to stderr again (I think the reject logging rejiggering caused it to stop). - (build 20864) Fixed an issue where the app could crash when connected to the cloud console while in a network game. +- Added a simplified help() command which behaves reasonably under the in-game console or cloud console. ### 1.7.6 (build 20687, api 7, 2022-08-11) diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 936ce53b..58135d01 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -11,6 +11,7 @@ from efro.log import setup_logging, LogLevel import _ba if TYPE_CHECKING: + from typing import Any from efro.log import LogEntry _g_did_bootstrap = False # pylint: disable=invalid-name @@ -44,7 +45,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20865 + expected_build = 20866 running_build: int = env['build_number'] if running_build != expected_build: print( @@ -105,13 +106,19 @@ def bootstrap() -> None: import asyncio asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) - # Clear out the standard quit/exit messages since they don't work for us. # pylint: disable=c-extension-no-member if not TYPE_CHECKING: import __main__ + + # Clear out the standard quit/exit messages since they don't + # work for us. del __main__.__builtins__.quit del __main__.__builtins__.exit + # Also replace standard interactive help with our simplified + # one which is more friendly to cloud/in-game console situations. + __main__.__builtins__.help = _CustomHelper() + # Now spin up our App instance and store it on both _ba and ba. from ba._app import App import ba @@ -119,6 +126,25 @@ def bootstrap() -> None: _ba.app.log_handler = log_handler +class _CustomHelper: + """Replacement 'help' that behaves better for our setup.""" + + def __repr__(self) -> str: + return 'Type help(object) for help about object.' + + def __call__(self, *args: Any, **kwds: Any) -> Any: + import pydoc + # Disable pager and interactive help since neither works well + # with our funky multi-threaded setup or in-game/cloud consoles. + # Let's just do simple text dumps. + pydoc.pager = pydoc.plainpager + if not args and not kwds: + print('Interactive help is not available in this environment.\n' + 'Type help(object) for help about object.') + return None + return pydoc.help(*args, **kwds) + + def _on_log(entry: LogEntry) -> None: # Just forward this along to the engine to display in the in-game console, diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 912ec63b..df49fab6 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20865; +const int kAppBuildNumber = 20866; const char* kAppVersion = "1.7.7"; // Our standalone globals. From e8bd426adbfbc4109d91e0ddf7e01cfcac6a03e4 Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 20 Sep 2022 13:24:28 -0700 Subject: [PATCH 32/40] v1.7.7 --- .efrocachemap | 62 +++++++++++----------- CHANGELOG.md | 4 +- assets/src/ba_data/python/ba/_bootstrap.py | 22 ++++++-- src/ballistica/ballistica.cc | 2 +- tools/efro/log.py | 17 ++++-- 5 files changed, 66 insertions(+), 41 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index f5399fd7..694934dc 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -944,10 +944,10 @@ "assets/build/ba_data/models/zoeUpperArm.bob": "https://files.ballistica.net/cache/ba1/99/38/b7694cae0804260eeb337aa1676a", "assets/build/ba_data/models/zoeUpperLeg.bob": "https://files.ballistica.net/cache/ba1/83/4f/28b2202d0109fa93272c0b09fa2d", "assets/build/ba_data/python-site-packages/_yaml/__init__.py": "https://files.ballistica.net/cache/ba1/0d/45/65ba92f51d411dcffac8835b6130", - "assets/build/ba_data/python-site-packages/certifi/__init__.py": "https://files.ballistica.net/cache/ba1/ca/90/4cf111df6bafc9735f6d2a05d6f2", + "assets/build/ba_data/python-site-packages/certifi/__init__.py": "https://files.ballistica.net/cache/ba1/f0/50/dbe7d0065006ac12adf2eaa239fc", "assets/build/ba_data/python-site-packages/certifi/__main__.py": "https://files.ballistica.net/cache/ba1/b2/bb/d7d8216212bcf66cdc3067700fb7", - "assets/build/ba_data/python-site-packages/certifi/cacert.pem": "https://files.ballistica.net/cache/ba1/c9/f9/e2d0dd61a7f4e36a3309a3981d07", - "assets/build/ba_data/python-site-packages/certifi/core.py": "https://files.ballistica.net/cache/ba1/8a/01/33e774b2ed89a56756f32d2f3bef", + "assets/build/ba_data/python-site-packages/certifi/cacert.pem": "https://files.ballistica.net/cache/ba1/eb/1c/18ef584961785d002a2550d389e0", + "assets/build/ba_data/python-site-packages/certifi/core.py": "https://files.ballistica.net/cache/ba1/ac/28/37f05b52df3806856bce2c0b9772", "assets/build/ba_data/python-site-packages/typing_extensions.py": "https://files.ballistica.net/cache/ba1/a5/c3/66c408bfad73af8644f507d8ee17", "assets/build/ba_data/python-site-packages/yaml/__init__.py": "https://files.ballistica.net/cache/ba1/e5/47/17715ca7620f3b9749558b9dcb2d", "assets/build/ba_data/python-site-packages/yaml/composer.py": "https://files.ballistica.net/cache/ba1/3e/aa/d7fcfc4707ad19a6964d72654b82", @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/18/b5/fdb800eba3e560e1e6b892d639a6", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/4d/ff/a05c193e6d1324551f40c92b7b61", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/68/b1/409e956704f4d019e8fe5ffce1dc", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/66/44/0a37f6394999644e2da10356d9e6", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/6e/b6/c999544c7354b2d264e550a40851", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a1/df/94e1bd43783d4b95404bca30d1ee", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/86/85/637ebdfd6f4dbd5f0b7c0788bcc7", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/62/60/fd9c38903be9656c0eba0666cc52", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/88/4e/6718a6097277b8403bc0e22e987a", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/fb/69/1a73d2f13f5a6d125e40c6446db4", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cf/cf/349a54fb60273d5e87bba5943b4e", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4d/bf/d0088e558d27e308b4e0e1d976da", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a1/59/0d7b240a7a5dfd01891465cda63f", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/89/f2/121681f63a15009d4dbb847fa285", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1c/10/81a9c096bc4b06a10602e9bf554f", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e2/72/c6ea79d94342a0d4f512a16bd82f", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/2c/5f/47e3bc81bb71823e6c7e9ce7b385", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/e3/c7/fd9f0eafb404b672b6fe065e5728", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/0c/bb/9e8aa3497dd3557146cd7396c363", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/67/77/b9695816c6e7d38286cf5ca6f6ed", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c6/a8/c64dd132890deee940ce6831725b", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3e/d6/869c9edf19032183504df20c7157", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/12/f7/1e088f53cde513f12d9dced02e06", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/91/3d/ab4c0beb21104b43f570061a41f9", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/fd/0d/c9cc68e293873548a5789fed5a13", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/0d/6c/d48fcad2794d48d8dd453ccb21fb", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ff/89/6944dc05561230801d79777a7900", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4e/0a/00104605199b8ece7680dffd9d26", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c8/a3/01704b3b283c60728a87846169d4", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/45/e8/6b0538e38f718b162f5752179e7f", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/18/2d/db7270ba82084e1e75e2a6a7e996", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/14/c1/680b3c3148416160b68ac48c20e1", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/0b/f2/123fd4622a920af7db6da433b745", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/7c/5b/bb7af29eacadbe580b60d42249de", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2a/30/ceb422a91047bfed7165614eb37a", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/62/0a/eb6a1543f81e02496ea4e09926de", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/89/8f/26d2ae170ccbaa765c8bcf7a4064", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/59/fd/90bc586dcd1386ae26e57a9c6cb4", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/48/85/bd7a7ad72f22b363136a6ab38d0c", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/47/6b/20ddf06be6ffcb9206d073f0e007", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/23/17/f0d22a9a91a295ee4a9d94db2af9", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d5/4f/bfbcdd18679b4ba0df1b040e8c15", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/96/e9/0f4aa3d10f2d50fe670bb6d89ba0", @@ -4031,14 +4031,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2f/06/ec124d5bfce4d3f268b1318755b8", "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3f/47/3322caea5f9a92735076c1017839", "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f5/9f/ce9a27aea9a4b7056800cf68afe9", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/ac/91/58112f039b7ad67af761ba988698", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/d4/b7/9bba9f1e630f5c1691b1483682f1", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/a6/0f/2fbf2e656b3e8d0041c04cdc0c45", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/4b/f1/1afbb7997808a9aa22154f1ba97c", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/e6/b5/7f1e577e568f55324de3cccd877d", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/6f/df/ff6619da29ce2ba222ea9f7918a3", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/67/3f/4be4522ae75ab5ce73124a93db83", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/e9/e0/2687b6a41c92b8098d5115804d7f", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/cd/c3/ef2a3645542161cb0dda7228d82f", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/76/33/2d95e621043e7a6c724e83dc6ba1", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/44/57/5fe7e94f357486bb4c9bcaca9f03", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/00/0f/049dcd75e76c0050b227cc7e765c", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/e9/3a/d02e1a197ba1732b8ed42f41a650", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/d0/8f/135a92cf6bce3035cdb2b91ffcea", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/d4/41/9932701d3f9da34fb64728ff9ca8", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/70/97/19a63e1f1b0796d94b50cef7562b", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/c0/32/b7907e3859a5c5013a3d97b6b523", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/2d/4f/f4fe67827f36cd59cd5193333a02", "src/ballistica/generated/python_embedded/bootstrap_monolithic.inc": "https://files.ballistica.net/cache/ba1/ef/c1/aa5f1aa10af89f5c0b1e616355fd" diff --git a/CHANGELOG.md b/CHANGELOG.md index 48c0fff0..2735c724 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20866, api 7, 2022-09-19) +### 1.7.7 (build 20868, api 7, 2022-09-20) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. @@ -41,7 +41,7 @@ - (build 20859) Fixed an error setting up asyncio loops under Windows related to the fact that Python is now inited in the main thread. - (build 20864) Fatal-error message/traceback now properly prints to stderr again (I think the reject logging rejiggering caused it to stop). - (build 20864) Fixed an issue where the app could crash when connected to the cloud console while in a network game. -- Added a simplified help() command which behaves reasonably under the in-game console or cloud console. +- Added a simplified help() command which behaves reasonably under the in-game console or cloud-console. ### 1.7.6 (build 20687, api 7, 2022-08-11) diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 58135d01..d2ce5d36 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -45,7 +45,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20866 + expected_build = 20868 running_build: int = env['build_number'] if running_build != expected_build: print( @@ -133,6 +133,18 @@ class _CustomHelper: return 'Type help(object) for help about object.' def __call__(self, *args: Any, **kwds: Any) -> Any: + # We get an ugly error importing pydoc on our embedded + # platforms due to _sysconfigdata_xxx.py not being present + # (but then things mostly work). Let's get the ugly error out + # of the way explicitly. + import sysconfig + try: + # This errors once but seems to run cleanly after, so let's + # get the error out of the way. + sysconfig.get_path('stdlib') + except ModuleNotFoundError: + pass + import pydoc # Disable pager and interactive help since neither works well # with our funky multi-threaded setup or in-game/cloud consoles. @@ -149,9 +161,11 @@ def _on_log(entry: LogEntry) -> None: # Just forward this along to the engine to display in the in-game console, # in the Android log, etc. - _ba.display_log(name=entry.name, - level=entry.level.name, - message=entry.message) + _ba.display_log( + name=entry.name, + level=entry.level.name, + message=entry.message, + ) # We also want to feed some logs to the old V1-cloud-log system. # Let's go with anything warning or higher as well as the stdout/stderr diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index df49fab6..200903e6 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20866; +const int kAppBuildNumber = 20868; const char* kAppVersion = "1.7.7"; // Our standalone globals. diff --git a/tools/efro/log.py b/tools/efro/log.py index 116d0de5..b313c37b 100644 --- a/tools/efro/log.py +++ b/tools/efro/log.py @@ -144,7 +144,16 @@ class LogHandler(logging.Handler): # setting it for our loop. asyncio.set_event_loop(self._event_loop) self._thread_bootstrapped = True - self._event_loop.run_forever() + try: + self._event_loop.run_forever() + except BaseException: + # If this ever goes down we're in trouble. + # We won't be able to log about it though... + # Try to make some noise however we can. + print('LogHandler died!!!', file=sys.stderr) + import traceback + traceback.print_exc() + raise def get_cached(self, start_index: int = 0, @@ -180,8 +189,10 @@ class LogHandler(logging.Handler): def emit(self, record: logging.LogRecord) -> None: # Called by logging to send us records. # We simply package them up and ship them to our thread. - - assert current_thread() is not self._thread + # UPDATE: turns out we CAN get log messages from this thread + # (the C++ layer can spit out some performance metrics when + # calls take too long/etc.) + # assert current_thread() is not self._thread # Special case - filter out this common extra-chatty category. # TODO - should use a standard logging.Filter for this. From 48e4cd16d3749aae80c0eb08d9d3457d8b150511 Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 20 Sep 2022 13:45:59 -0700 Subject: [PATCH 33/40] version bump --- .efrocachemap | 40 +++++++++++----------- CHANGELOG.md | 2 ++ assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/ballistica.cc | 4 +-- 4 files changed, 25 insertions(+), 23 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 694934dc..92480b38 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c6/a8/c64dd132890deee940ce6831725b", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3e/d6/869c9edf19032183504df20c7157", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/12/f7/1e088f53cde513f12d9dced02e06", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/91/3d/ab4c0beb21104b43f570061a41f9", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/fd/0d/c9cc68e293873548a5789fed5a13", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/0d/6c/d48fcad2794d48d8dd453ccb21fb", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ff/89/6944dc05561230801d79777a7900", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4e/0a/00104605199b8ece7680dffd9d26", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c8/a3/01704b3b283c60728a87846169d4", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/45/e8/6b0538e38f718b162f5752179e7f", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/18/2d/db7270ba82084e1e75e2a6a7e996", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/14/c1/680b3c3148416160b68ac48c20e1", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/0b/f2/123fd4622a920af7db6da433b745", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/7c/5b/bb7af29eacadbe580b60d42249de", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2a/30/ceb422a91047bfed7165614eb37a", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/62/0a/eb6a1543f81e02496ea4e09926de", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/89/8f/26d2ae170ccbaa765c8bcf7a4064", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/59/fd/90bc586dcd1386ae26e57a9c6cb4", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/48/85/bd7a7ad72f22b363136a6ab38d0c", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/47/6b/20ddf06be6ffcb9206d073f0e007", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ca/28/c319e196a4bc385b40f1dd74f97e", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/8f/bf/2bdf86c21024da731555148cc53e", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/37/55/e1512372d93ada85e3ffe928088f", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/98/0c/d0efb208245f071abcb252105794", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/2c/c6/6a60eac1cae1f743ef3126fe5922", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/e2/fd/d1cd0e639ebd20c1ccfd277d2396", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/51/db/bf3f4441dfe249250374b09c6f9a", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/75/6e/ac8f9ba07d485097a29052f1db2d", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/02/7e/0c808cf133686725e63103cf0129", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/b9/81/3d8ec7805d341691146d9c454110", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/6e/ef/c93dd75b57564706f21768397d61", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e3/92/24a1c497f854d0c5e106ff6b06cc", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/51/57/62a9f0cfd7e816d155ea653fb2c3", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/97/9c/ac08f94b8d4cf4189da8fcac97a6", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/29/30/006b9b084bf4289b11c995cbf9f2", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9f/a5/a895754e65d327738562d0ac5f9a", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/b0/2c/f91e25b5c29d90173b5f230bcbfc", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/53/9c/6781217e9588fc117f4f87ee5218", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ca/13/06127cd5c0729009fa5e5fd1300c", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/5a/e4/70f76aec7aecf98ac35125adaae5", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/23/17/f0d22a9a91a295ee4a9d94db2af9", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d5/4f/bfbcdd18679b4ba0df1b040e8c15", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/96/e9/0f4aa3d10f2d50fe670bb6d89ba0", diff --git a/CHANGELOG.md b/CHANGELOG.md index 2735c724..8a9c2084 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +### 1.7.8 (build 20870, api 7, 2022-09-20) + ### 1.7.7 (build 20868, api 7, 2022-09-20) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index d2ce5d36..00dbf71e 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -45,7 +45,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20868 + expected_build = 20870 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 200903e6..b651660b 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,8 +32,8 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20868; -const char* kAppVersion = "1.7.7"; +const int kAppBuildNumber = 20870; +const char* kAppVersion = "1.7.8"; // Our standalone globals. // These are separated out for easy access. From 15a9eccfdb1c484a7fa98b1e39396084154aea3f Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 21 Sep 2022 17:19:51 -0700 Subject: [PATCH 34/40] v1.7.8 --- .efrocachemap | 88 +++++++++++----------- CHANGELOG.md | 4 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/ballistica.cc | 2 +- src/ballistica/platform/stdio_console.cc | 17 +++++ tools/efro/message/_protocol.py | 7 -- 6 files changed, 66 insertions(+), 54 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 92480b38..931d963c 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,50 +3995,50 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ca/28/c319e196a4bc385b40f1dd74f97e", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/8f/bf/2bdf86c21024da731555148cc53e", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/37/55/e1512372d93ada85e3ffe928088f", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/98/0c/d0efb208245f071abcb252105794", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/2c/c6/6a60eac1cae1f743ef3126fe5922", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/e2/fd/d1cd0e639ebd20c1ccfd277d2396", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/51/db/bf3f4441dfe249250374b09c6f9a", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/75/6e/ac8f9ba07d485097a29052f1db2d", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/02/7e/0c808cf133686725e63103cf0129", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/b9/81/3d8ec7805d341691146d9c454110", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/6e/ef/c93dd75b57564706f21768397d61", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e3/92/24a1c497f854d0c5e106ff6b06cc", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/51/57/62a9f0cfd7e816d155ea653fb2c3", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/97/9c/ac08f94b8d4cf4189da8fcac97a6", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/29/30/006b9b084bf4289b11c995cbf9f2", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9f/a5/a895754e65d327738562d0ac5f9a", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/b0/2c/f91e25b5c29d90173b5f230bcbfc", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/53/9c/6781217e9588fc117f4f87ee5218", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ca/13/06127cd5c0729009fa5e5fd1300c", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/5a/e4/70f76aec7aecf98ac35125adaae5", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/23/17/f0d22a9a91a295ee4a9d94db2af9", - "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d5/4f/bfbcdd18679b4ba0df1b040e8c15", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/96/e9/0f4aa3d10f2d50fe670bb6d89ba0", - "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/26/ef/1b58d3c788441242ed9ca9352499", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/79/77/b35c5f93f62d92fe9cdb548f6e54", - "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c6/53/8e678b75f456378e17e4f639fe35", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ab/1d/b514c16cfda2f5840676a4c75ca3", - "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d7/c4/b797fd5365d34fcfb60d6275fb3c", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b0/6c/b8f8c1d1d8e2f772208af12e085f", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c0/e1/f57102a8da2fe0ca7787c0a7924a", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8f/16/19494ad899b3f1990dd2b5cdfa99", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a9/d5/59ba30f21d5583bdc92516c0916e", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e7/82/e29dbff494964b753a08eaa66b66", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2f/06/ec124d5bfce4d3f268b1318755b8", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3f/47/3322caea5f9a92735076c1017839", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f5/9f/ce9a27aea9a4b7056800cf68afe9", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/cd/c3/ef2a3645542161cb0dda7228d82f", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/76/33/2d95e621043e7a6c724e83dc6ba1", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/44/57/5fe7e94f357486bb4c9bcaca9f03", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/00/0f/049dcd75e76c0050b227cc7e765c", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/e9/3a/d02e1a197ba1732b8ed42f41a650", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/d0/8f/135a92cf6bce3035cdb2b91ffcea", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/d4/41/9932701d3f9da34fb64728ff9ca8", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/70/97/19a63e1f1b0796d94b50cef7562b", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/80/08/0cd5b1007faa60f571116a46468c", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/91/37/9a30386da0a15166032659968e34", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/7a/e2/82a25d37fde6967fab816ae39389", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/80/18/b51d819203c45c7f81f4da0a4451", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/8c/97/c6e79937b7b7a08c680d71dc961f", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/6a/dd/9a715d5bacc2dbda5db0dd4b1d13", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/73/2b/5591fde4f1ceb7fd715f55f515b5", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/91/25/35323d4c9763cff67d2758c4a267", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/1e/3d/7212fd35bd76826283e0d51209b1", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/da/cd/b77e6d4bf0b47101171903fe34eb", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1b/99/b6f0315c95550b65c1ae80b2777e", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c6/ea/e8435d88766cdab5b4a4ba7f8091", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/d1/1a/36f14af0152ce836eeea7a87d7a7", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/38/1b/6db1a5d7278f50531420c62af71d", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/62/f4/37cc601ecf7448d67261e55212fd", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2d/aa/dea533f208876b19b2be14366046", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/80/78/14bb4c69df7ce7b05cd74a3262e9", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/87/3a/b8ec47d983c0269949ee7c4d45b0", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ef/a6/ef104866fa59aac218886e9e8c6a", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/03/67/5bb14d45bcfd766f2717eb261ca0", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e4/52/87fe024c4770f8fcf1781263dde0", + "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/74/c0/4c7bbd9444abdf80b0a9c4488601", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4d/ae/b4ae14f9a81de19df7c9bfcb4681", + "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/52/4b/8a2e69af63cdb8b0c163f2d5d5fa", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f5/a8/7db7184cff719671094aa773982f", + "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/cf/13/3ec025d1c71b72da334f1654a998", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/57/8e/9036ee37957fb9f78c4da33d2528", + "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/1f/b4/4cc655bd0d010205f87f2df38408", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/02/f3/722eecf8b043bd3e6446867977e7", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/04/36/41f5026b51077e2238c498bc0f4b", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b4/c8/6438c59b7ab41ae49149510c34fe", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ec/14/89e1f6829341d2fdf0564b426312", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d6/1a/fc37ff6a34b19948374fd527cf66", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3f/bb/99b4e9a9907cd40788ca957d9d4d", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e9/34/ebabccae377eee2cc8aadf557e7f", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b5/d2/5a8f9c751486ecf75c47d93ae8cd", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/79/3e/c51bc16d2329d5589d1e618e5c71", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/4f/aa/a29074431ef7e8ee41647a0081ef", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/cd/81/eb4a9bda7b13f3533b4101266871", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/28/18/042e311d7709771c68297bf4ef5a", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/b6/1b/8f597eb70959a800dd77d0ebc8ed", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/43/a5/45d00cff78ad7edceea76492923d", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/6e/74/654cfd6c4a0f213225405c029855", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/ef/62/b2d30a83a57880ab6e4805f21c51", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/c0/32/b7907e3859a5c5013a3d97b6b523", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/2d/4f/f4fe67827f36cd59cd5193333a02", "src/ballistica/generated/python_embedded/bootstrap_monolithic.inc": "https://files.ballistica.net/cache/ba1/ef/c1/aa5f1aa10af89f5c0b1e616355fd" diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a9c2084..16dc7767 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ -### 1.7.8 (build 20870, api 7, 2022-09-20) +### 1.7.8 (build 20871, api 7, 2022-09-21) +- Fixed tournament scores submits which were broken in 1.7.7 (oops). +- Added @clear command to stdin command reader. ### 1.7.7 (build 20868, api 7, 2022-09-20) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 00dbf71e..60b83a49 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -45,7 +45,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20870 + expected_build = 20871 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index b651660b..0a8e2913 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20870; +const int kAppBuildNumber = 20871; const char* kAppVersion = "1.7.8"; // Our standalone globals. diff --git a/src/ballistica/platform/stdio_console.cc b/src/ballistica/platform/stdio_console.cc index 0ef6f190..fb1d9196 100644 --- a/src/ballistica/platform/stdio_console.cc +++ b/src/ballistica/platform/stdio_console.cc @@ -47,6 +47,23 @@ auto StdioConsole::OnAppStart() -> void { char buffer[4096]; char* val = fgets(buffer, sizeof(buffer), stdin); if (val) { + if (val == std::string("@clear\n")) { + int retval{-1}; +#if BA_OSTYPE_MACOS || BA_OSTYPE_LINUX + // Attempt to run actual clear command on unix-y systems to + // plop our prompt back at the top of the screen. + retval = system("clear"); +#endif + // As a fallback, just spit out a bunch of newlines. + if (retval != 0) { + std::string space; + for (int i = 0; i < 100; ++i) { + space += "\n"; + } + printf("%s", space.c_str()); + } + continue; + } pending_input_ += val; if (!pending_input_.empty() diff --git a/tools/efro/message/_protocol.py b/tools/efro/message/_protocol.py index 5f3b0d80..b37f4284 100644 --- a/tools/efro/message/_protocol.py +++ b/tools/efro/message/_protocol.py @@ -81,13 +81,6 @@ class MessageProtocol: # if the user has not done so explicitly. Use unique negative # IDs which will never change or overlap with user ids. def _reg_sys(reg_tp: type[Response], reg_id: int) -> None: - - # If we have a positive id registered already, we still point - # negative sys id at this type but not the opposite. - if reg_tp in self.response_ids_by_type: - self.response_types_by_id[reg_id] = reg_tp - return - assert self.response_types_by_id.get(reg_id) is None self.response_types_by_id[reg_id] = reg_tp self.response_ids_by_type[reg_tp] = reg_id From a8232f3d63dc014429d3a67621e3d9b34b827f4e Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 21 Sep 2022 17:27:31 -0700 Subject: [PATCH 35/40] version bump --- .efrocachemap | 40 +++++++++++----------- CHANGELOG.md | 2 ++ assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/ballistica.cc | 4 +-- 4 files changed, 25 insertions(+), 23 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 931d963c..595a636e 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/80/08/0cd5b1007faa60f571116a46468c", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/91/37/9a30386da0a15166032659968e34", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/7a/e2/82a25d37fde6967fab816ae39389", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/80/18/b51d819203c45c7f81f4da0a4451", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/8c/97/c6e79937b7b7a08c680d71dc961f", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/6a/dd/9a715d5bacc2dbda5db0dd4b1d13", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/73/2b/5591fde4f1ceb7fd715f55f515b5", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/91/25/35323d4c9763cff67d2758c4a267", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/1e/3d/7212fd35bd76826283e0d51209b1", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/da/cd/b77e6d4bf0b47101171903fe34eb", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1b/99/b6f0315c95550b65c1ae80b2777e", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c6/ea/e8435d88766cdab5b4a4ba7f8091", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/d1/1a/36f14af0152ce836eeea7a87d7a7", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/38/1b/6db1a5d7278f50531420c62af71d", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/62/f4/37cc601ecf7448d67261e55212fd", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2d/aa/dea533f208876b19b2be14366046", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/80/78/14bb4c69df7ce7b05cd74a3262e9", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/87/3a/b8ec47d983c0269949ee7c4d45b0", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ef/a6/ef104866fa59aac218886e9e8c6a", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/03/67/5bb14d45bcfd766f2717eb261ca0", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/51/59/cc39973010b0acd529c15c2dd45f", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ea/d0/67462139da48d00f1aa2019f922f", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/12/55/8fa04f69caad9c0a599d8930cebb", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ae/ec/9915b895baf73e1c4b611ae29124", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/42/90/5a24c7916556b0e172d40988c374", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c9/f0/1699b86f1c9e7644df46e1743aeb", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/01/59/8e456a69cb9cf215fe2767e095ca", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/09/ee/ae52581f16b3b1a5d8033afd08d3", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/15/22/9e2fa220b4aac26ee74f6ce1d1dc", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/42/16/5ecb5eeaf2229530dcd5fa7a8b30", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f6/af/3ee6ead1ac4db2c8d610215a25c0", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/74/bb/bfd9f53b8e9efa5fa1a3ecbc95e3", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/e5/de/4c1d5e100f8cab1bde6564d0e98b", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a6/29/9a8e1a0e70888563a7721b4acb92", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/00/e8/341aa12a06b2acbb9725d3d34dfc", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9e/cd/dec598eec665c634e1bdd253c6b4", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/6d/bd/e8a96659500d6114205b95283b0f", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/cf/d6/00fb3da261066c9aae7daa97b6a1", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/14/ab/9953746fc7301c2696193e7f33c5", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/b7/e8/90ff3dd46f6c6cca356f135c9221", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e4/52/87fe024c4770f8fcf1781263dde0", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/74/c0/4c7bbd9444abdf80b0a9c4488601", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4d/ae/b4ae14f9a81de19df7c9bfcb4681", diff --git a/CHANGELOG.md b/CHANGELOG.md index 16dc7767..eea1d06f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +### 1.7.9 (build 20873, api 7, 2022-09-21) + ### 1.7.8 (build 20871, api 7, 2022-09-21) - Fixed tournament scores submits which were broken in 1.7.7 (oops). - Added @clear command to stdin command reader. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 60b83a49..44daa02d 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -45,7 +45,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20871 + expected_build = 20873 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 0a8e2913..a8adeef0 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,8 +32,8 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20871; -const char* kAppVersion = "1.7.8"; +const int kAppBuildNumber = 20873; +const char* kAppVersion = "1.7.9"; // Our standalone globals. // These are separated out for easy access. From cf27d6ac6f24bbe6cfcabc5be7c7d9508e6aefc2 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 21 Sep 2022 19:27:19 -0700 Subject: [PATCH 36/40] efro.message cleanup to clarify internal vs user response types --- .efrocachemap | 88 +++++++++++----------- CHANGELOG.md | 6 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/ballistica.cc | 2 +- tests/test_efro/test_message.py | 11 ++- tools/bacommon/cloud.py | 10 +-- tools/efro/message/__init__.py | 15 ++-- tools/efro/message/_message.py | 16 +++- tools/efro/message/_protocol.py | 37 +++++---- tools/efro/message/_receiver.py | 52 ++++++++----- tools/efro/message/_sender.py | 39 ++++++---- 11 files changed, 158 insertions(+), 120 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 595a636e..2ecdd6d8 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,50 +3995,50 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/51/59/cc39973010b0acd529c15c2dd45f", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ea/d0/67462139da48d00f1aa2019f922f", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/12/55/8fa04f69caad9c0a599d8930cebb", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ae/ec/9915b895baf73e1c4b611ae29124", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/42/90/5a24c7916556b0e172d40988c374", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c9/f0/1699b86f1c9e7644df46e1743aeb", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/01/59/8e456a69cb9cf215fe2767e095ca", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/09/ee/ae52581f16b3b1a5d8033afd08d3", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/15/22/9e2fa220b4aac26ee74f6ce1d1dc", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/42/16/5ecb5eeaf2229530dcd5fa7a8b30", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f6/af/3ee6ead1ac4db2c8d610215a25c0", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/74/bb/bfd9f53b8e9efa5fa1a3ecbc95e3", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/e5/de/4c1d5e100f8cab1bde6564d0e98b", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a6/29/9a8e1a0e70888563a7721b4acb92", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/00/e8/341aa12a06b2acbb9725d3d34dfc", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9e/cd/dec598eec665c634e1bdd253c6b4", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/6d/bd/e8a96659500d6114205b95283b0f", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/cf/d6/00fb3da261066c9aae7daa97b6a1", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/14/ab/9953746fc7301c2696193e7f33c5", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/b7/e8/90ff3dd46f6c6cca356f135c9221", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e4/52/87fe024c4770f8fcf1781263dde0", - "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/74/c0/4c7bbd9444abdf80b0a9c4488601", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4d/ae/b4ae14f9a81de19df7c9bfcb4681", - "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/52/4b/8a2e69af63cdb8b0c163f2d5d5fa", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f5/a8/7db7184cff719671094aa773982f", - "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/cf/13/3ec025d1c71b72da334f1654a998", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/57/8e/9036ee37957fb9f78c4da33d2528", - "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/1f/b4/4cc655bd0d010205f87f2df38408", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/02/f3/722eecf8b043bd3e6446867977e7", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/04/36/41f5026b51077e2238c498bc0f4b", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b4/c8/6438c59b7ab41ae49149510c34fe", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ec/14/89e1f6829341d2fdf0564b426312", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d6/1a/fc37ff6a34b19948374fd527cf66", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3f/bb/99b4e9a9907cd40788ca957d9d4d", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e9/34/ebabccae377eee2cc8aadf557e7f", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b5/d2/5a8f9c751486ecf75c47d93ae8cd", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/79/3e/c51bc16d2329d5589d1e618e5c71", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/4f/aa/a29074431ef7e8ee41647a0081ef", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/cd/81/eb4a9bda7b13f3533b4101266871", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/28/18/042e311d7709771c68297bf4ef5a", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/b6/1b/8f597eb70959a800dd77d0ebc8ed", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/43/a5/45d00cff78ad7edceea76492923d", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/6e/74/654cfd6c4a0f213225405c029855", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/ef/62/b2d30a83a57880ab6e4805f21c51", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/06/a9/6af2420bb4c2472e9ee8eb4adbbb", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/5a/1a/06cb8a31b90d5f6b4687f0dd900e", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ec/5a/228a7a4533f47476d7feb66eb753", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/34/db/161b4aff5dce8ce73dc4a4124ea6", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/d8/71/572c6ae3b24dab621444cb9cb4b9", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/82/ea/742386e234f74bd27618341c8b1c", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3d/3c/f41c01c6d97baad1a2b0a5c8fe34", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/59/ad/360fb7b46011c5bb22015e8d88e7", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/7c/1d/807ae39cd64308fb2cc4ee3821f0", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/e9/f3/ec8376ed0c6f53f009dd6f9c14ab", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c4/d9/bd6d53b98c90e8ea9ba9a38390ba", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c1/22/e76cf27c846b4bbf630d0058d244", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/f2/ed/59aa13c1dbd45f574d50903d7b84", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d0/85/e527ac19480e8a168e0d4da742a4", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e8/9b/c35aa8a2690173004954345c879a", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/56/8d/25475ac95c66ab90193bd835a5d1", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/7f/f4/460bff13d91b0d61f41ecc9f9128", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/53/84/0439b2c18a02c33e71027d18f853", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/a4/c0/7cf3abfa3224860e96c4d4c44184", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/5b/e5/f2858d831cad4162dc4d6529f28e", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/41/b3/5a5813294b9281ca6bbb1f5caebe", + "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/28/05/b6cc01e7b6762a3c8d47851cd30c", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f7/8c/36acf6d02d7c322aed086cc4ec3f", + "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ca/65/de52706de6aa624f01c5907e5367", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2d/3d/3e3e65846f42810c032cb5efd997", + "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/da/bf/c4a1f6e6d2495723acbd93e1b22c", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ac/34/6605f152207515d50174eca420e7", + "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8c/b6/770c3d26d70edec763335c38de73", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/33/10/a753a671240f243b2351b5730917", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/1c/e4/05dc037f8669fc5ddc993dc8defc", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7c/c9/879778a21f2403346adf8db17318", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/86/36/6d77a933a8126df4fde064fe881f", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/80/e8/1c9c69d9fd5e47d0fd6e3c9b1134", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ac/e2/4208f2fc902ed0526bf4cb5bbc54", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e2/95/5fd6cede6b0e88753bb50b437110", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/87/0b/442839bc7a21c12ed6e173abf7ca", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/b6/aa/0666c00d1751f934cc1b0907fa40", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/aa/22/3afc115395a7909eac78d98cf856", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/9f/e6/5097b01991ce22e1d3fd594808b2", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/d9/4f/7f2a34294f53378990487655f4ab", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/18/d3/50bbe34de1862d8224dafa8792e7", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/82/93/f80194878bfed43f58809a7e9823", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/73/54/88f193633990884b61719a481dec", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/f4/23/2a4e21dc99e6135c1cb102f6ca37", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/c0/32/b7907e3859a5c5013a3d97b6b523", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/2d/4f/f4fe67827f36cd59cd5193333a02", "src/ballistica/generated/python_embedded/bootstrap_monolithic.inc": "https://files.ballistica.net/cache/ba1/ef/c1/aa5f1aa10af89f5c0b1e616355fd" diff --git a/CHANGELOG.md b/CHANGELOG.md index eea1d06f..42740e8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.9 (build 20873, api 7, 2022-09-21) +### 1.7.9 (build 20875, api 7, 2022-09-21) ### 1.7.8 (build 20871, api 7, 2022-09-21) - Fixed tournament scores submits which were broken in 1.7.7 (oops). @@ -45,13 +45,13 @@ - If you want to grab recent logs, you can now use `ba.app.log_handler.get_cached()`. This will give you everything that has gone through Python logging, Python stdout/stderr, and the C++ Log() call (up to the max cache size that is). - LogHandler output now ALWAYS goes to stderr. Previously it only would if an interactive terminal was detected. This should make the binary easier to debug if run from scripts/etc. We can add a `--quiet` option if needed or whatnot. - (build 20859) Fixed an error setting up asyncio loops under Windows related to the fact that Python is now inited in the main thread. -- (build 20864) Fatal-error message/traceback now properly prints to stderr again (I think the reject logging rejiggering caused it to stop). +- (build 20864) Fatal-error message/traceback now properly prints to stderr again (I think the recent logging rejiggering caused it to stop). - (build 20864) Fixed an issue where the app could crash when connected to the cloud console while in a network game. - Added a simplified help() command which behaves reasonably under the in-game console or cloud-console. ### 1.7.6 (build 20687, api 7, 2022-08-11) -- Cleaned up da MetaSubsystem code. +- Cleaned up the MetaSubsystem code. - It is now possible to tell the meta system about arbitrary classes (ba_meta export foo.bar.Class) instead of just the preset types 'plugin', 'game', etc. - Newly discovered plugins are now activated immediately instead of requiring a restart. diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 44daa02d..6ec84868 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -45,7 +45,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20873 + expected_build = 20875 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index a8adeef0..c9f39df7 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20873; +const int kAppBuildNumber = 20875; const char* kAppVersion = "1.7.9"; // Our standalone globals. diff --git a/tests/test_efro/test_message.py b/tests/test_efro/test_message.py index 3d04624b..a88e90bb 100644 --- a/tests/test_efro/test_message.py +++ b/tests/test_efro/test_message.py @@ -23,6 +23,8 @@ from efro.message import (Message, Response, MessageProtocol, MessageSender, if TYPE_CHECKING: from typing import Any, Callable, Awaitable + from efro.message import SysResponse + @ioprepped @dataclass @@ -31,7 +33,7 @@ class _TMsg1(Message): ival: int @classmethod - def get_response_types(cls) -> list[type[Response]]: + def get_response_types(cls) -> list[type[Response] | None]: return [_TResp1] @@ -42,7 +44,7 @@ class _TMsg2(Message): sval: str @classmethod - def get_response_types(cls) -> list[type[Response]]: + def get_response_types(cls) -> list[type[Response] | None]: return [_TResp1, _TResp2] @@ -808,7 +810,7 @@ def test_full_pipeline() -> None: @msg.decode_filter_method def _decode_filter(self, message: Message, indata: dict, - response: Response) -> None: + response: Response | SysResponse) -> None: """Filter our incoming responses.""" del message # Unused. if self.test_sidecar: @@ -852,7 +854,8 @@ def test_full_pipeline() -> None: setattr(message, '_sidecar_data', indata['_sidecar_data']) @receiver.encode_filter_method - def _encode_filter(self, message: Message | None, response: Response, + def _encode_filter(self, message: Message | None, + response: Response | SysResponse, outdict: dict) -> None: """Filter our outgoing responses.""" del message # Unused. diff --git a/tools/bacommon/cloud.py b/tools/bacommon/cloud.py index 34e9ccaa..91512f92 100644 --- a/tools/bacommon/cloud.py +++ b/tools/bacommon/cloud.py @@ -21,7 +21,7 @@ class LoginProxyRequestMessage(Message): """Request send to the cloud to ask for a login-proxy.""" @classmethod - def get_response_types(cls) -> list[type[Response]]: + def get_response_types(cls) -> list[type[Response] | None]: return [LoginProxyRequestResponse] @@ -48,7 +48,7 @@ class LoginProxyStateQueryMessage(Message): proxykey: Annotated[str, IOAttrs('k')] @classmethod - def get_response_types(cls) -> list[type[Response]]: + def get_response_types(cls) -> list[type[Response] | None]: return [LoginProxyStateQueryResponse] @@ -82,7 +82,7 @@ class PingMessage(Message): """Standard ping.""" @classmethod - def get_response_types(cls) -> list[type[Response]]: + def get_response_types(cls) -> list[type[Response] | None]: return [PingResponse] @@ -99,7 +99,7 @@ class TestMessage(Message): testfoo: Annotated[int, IOAttrs('f')] @classmethod - def get_response_types(cls) -> list[type[Response]]: + def get_response_types(cls) -> list[type[Response] | None]: return [TestResponse] @@ -130,7 +130,7 @@ class WorkspaceFetchMessage(Message): state: Annotated[WorkspaceFetchState, IOAttrs('s')] @classmethod - def get_response_types(cls) -> list[type[Response]]: + def get_response_types(cls) -> list[type[Response] | None]: return [WorkspaceFetchResponse] diff --git a/tools/efro/message/__init__.py b/tools/efro/message/__init__.py index bce8da5b..326ba025 100644 --- a/tools/efro/message/__init__.py +++ b/tools/efro/message/__init__.py @@ -11,15 +11,16 @@ from efro.message._protocol import MessageProtocol from efro.message._sender import (MessageSender, BoundMessageSender) from efro.message._receiver import (MessageReceiver, BoundMessageReceiver) from efro.message._module import (create_sender_module, create_receiver_module) -from efro.message._message import (Message, Response, EmptySysResponse, - ErrorSysResponse, StringResponse, - BoolResponse, UnregisteredMessageIDError) +from efro.message._message import (Message, Response, SysResponse, + EmptySysResponse, ErrorSysResponse, + StringResponse, BoolResponse, + UnregisteredMessageIDError) __all__ = [ - 'Message', 'Response', 'EmptySysResponse', 'ErrorSysResponse', - 'StringResponse', 'BoolResponse', 'MessageProtocol', 'MessageSender', - 'BoundMessageSender', 'MessageReceiver', 'BoundMessageReceiver', - 'create_sender_module', 'create_receiver_module', + 'Message', 'Response', 'SysResponse', 'EmptySysResponse', + 'ErrorSysResponse', 'StringResponse', 'BoolResponse', 'MessageProtocol', + 'MessageSender', 'BoundMessageSender', 'MessageReceiver', + 'BoundMessageReceiver', 'create_sender_module', 'create_receiver_module', 'UnregisteredMessageIDError' ] diff --git a/tools/efro/message/_message.py b/tools/efro/message/_message.py index c2bc8c17..f74794eb 100644 --- a/tools/efro/message/_message.py +++ b/tools/efro/message/_message.py @@ -24,7 +24,7 @@ class Message: """Base class for messages.""" @classmethod - def get_response_types(cls) -> list[type[Response]]: + def get_response_types(cls) -> list[type[Response] | None]: """Return all message types this Message can result in when sent. The default implementation specifies EmptySysResponse, so messages with @@ -32,19 +32,27 @@ class Message: Note that ErrorMessage is handled as a special case and does not need to be specified here. """ - return [EmptySysResponse] + return [None] class Response: """Base class for responses to messages.""" +class SysResponse: + """Base class for system-responses to messages. + + These are only sent/handled by the messaging system itself; + users of the api never see them. + """ + + # Some standard response types: @ioprepped @dataclass -class ErrorSysResponse(Response): +class ErrorSysResponse(SysResponse): """Response saying some error has occurred for the send. This type is unique in that it is not returned to the user; it @@ -64,7 +72,7 @@ class ErrorSysResponse(Response): @ioprepped @dataclass -class EmptySysResponse(Response): +class EmptySysResponse(SysResponse): """The response equivalent of None.""" diff --git a/tools/efro/message/_protocol.py b/tools/efro/message/_protocol.py index b37f4284..7d7e572e 100644 --- a/tools/efro/message/_protocol.py +++ b/tools/efro/message/_protocol.py @@ -14,8 +14,8 @@ import json from efro.error import CleanError from efro.dataclassio import (is_ioprepped_dataclass, dataclass_to_dict, dataclass_from_dict) -from efro.message._message import (Message, Response, ErrorSysResponse, - EmptySysResponse, +from efro.message._message import (Message, Response, SysResponse, + ErrorSysResponse, EmptySysResponse, UnregisteredMessageIDError) if TYPE_CHECKING: @@ -54,8 +54,10 @@ class MessageProtocol: """ self.message_types_by_id: dict[int, type[Message]] = {} self.message_ids_by_type: dict[type[Message], int] = {} - self.response_types_by_id: dict[int, type[Response]] = {} - self.response_ids_by_type: dict[type[Response], int] = {} + self.response_types_by_id: dict[int, type[Response] + | type[SysResponse]] = {} + self.response_ids_by_type: dict[type[Response] | type[SysResponse], + int] = {} for m_id, m_type in message_types.items(): # Make sure only valid message types were passed and each @@ -80,7 +82,7 @@ class MessageProtocol: # Go ahead and auto-register a few common response types # if the user has not done so explicitly. Use unique negative # IDs which will never change or overlap with user ids. - def _reg_sys(reg_tp: type[Response], reg_id: int) -> None: + def _reg_sys(reg_tp: type[SysResponse], reg_id: int) -> None: assert self.response_types_by_id.get(reg_id) is None self.response_types_by_id[reg_id] = reg_tp self.response_ids_by_type[reg_tp] = reg_id @@ -92,15 +94,19 @@ class MessageProtocol: if __debug__: # Make sure all Message types' return types are valid # and have been assigned an ID as well. - all_response_types: set[type[Response]] = set() + all_response_types: set[type[Response] | None] = set() for m_id, m_type in message_types.items(): m_rtypes = m_type.get_response_types() + assert isinstance(m_rtypes, list) assert m_rtypes, ( f'Message type {m_type} specifies no return types.') assert len(set(m_rtypes)) == len(m_rtypes) # check dups - all_response_types.update(m_rtypes) + for m_rtype in m_rtypes: + all_response_types.add(m_rtype) for cls in all_response_types: + if cls is None: + continue assert is_ioprepped_dataclass(cls) assert issubclass(cls, Response) if cls not in self.response_ids_by_type: @@ -130,11 +136,11 @@ class MessageProtocol: """Encode a message to a json ready dict.""" return self._to_dict(message, self.message_ids_by_type, 'message') - def response_to_dict(self, response: Response) -> dict: + def response_to_dict(self, response: Response | SysResponse) -> dict: """Encode a response to a json ready dict.""" return self._to_dict(response, self.response_ids_by_type, 'response') - def error_to_response(self, exc: Exception) -> Response: + def error_to_response(self, exc: Exception) -> SysResponse: """Translate an error to a response.""" # Log any errors we got during handling. @@ -176,10 +182,10 @@ class MessageProtocol: assert isinstance(out, Message) return out - def response_from_dict(self, data: dict) -> Response: + def response_from_dict(self, data: dict) -> Response | SysResponse: """Decode a response from a json string.""" out = self._from_dict(data, self.response_types_by_id, 'response') - assert isinstance(out, Response) + assert isinstance(out, Response | SysResponse) return out # Weeeird; we get mypy errors returning dict[int, type] but @@ -332,10 +338,10 @@ class MessageProtocol: f'class {ppre}Bound{basename}(BoundMessageSender):\n' f' """Protocol-specific bound sender."""\n') - def _filt_tp_name(rtype: type[Response]) -> str: + def _filt_tp_name(rtype: type[Response] | None) -> str: # We accept None to equal EmptySysResponse so reflect that # in the type annotation. - return 'None' if rtype is EmptySysResponse else rtype.__name__ + return 'None' if rtype is None else rtype.__name__ # Define handler() overloads for all registered message types. if msgtypes: @@ -372,6 +378,7 @@ class MessageProtocol: for msgtype in msgtypes: msgtypevar = msgtype.__name__ + # rtypes = msgtype.get_response_types() rtypes = msgtype.get_response_types() if len(rtypes) > 1: rtypevar = ' | '.join( @@ -429,10 +436,10 @@ class MessageProtocol: # Define handler() overloads for all registered message types. - def _filt_tp_name(rtype: type[Response]) -> str: + def _filt_tp_name(rtype: type[Response] | None) -> str: # We accept None to equal EmptySysResponse so reflect that # in the type annotation. - return 'None' if rtype is EmptySysResponse else rtype.__name__ + return 'None' if rtype is None else rtype.__name__ if msgtypes: cbgn = 'Awaitable[' if is_async else '' diff --git a/tools/efro/message/_receiver.py b/tools/efro/message/_receiver.py index b277ff4c..5bf5d869 100644 --- a/tools/efro/message/_receiver.py +++ b/tools/efro/message/_receiver.py @@ -12,13 +12,13 @@ import logging from typing import TYPE_CHECKING from efro.message._message import (Message, Response, EmptySysResponse, - ErrorSysResponse, UnregisteredMessageIDError) if TYPE_CHECKING: from typing import Any, Callable, Awaitable from efro.message._protocol import MessageProtocol + from efro.message._message import SysResponse class MessageReceiver: @@ -54,7 +54,8 @@ class MessageReceiver: self._decode_filter_call: Callable[[Any, dict, Message], None] | None = None self._encode_filter_call: Callable[ - [Any, Message | None, Response, dict], None] | None = None + [Any, Message | None, Response | SysResponse, dict], + None] | None = None # TODO: don't currently have async encode equivalent # or either for sender; can add as needed. @@ -107,26 +108,31 @@ class MessageReceiver: assert issubclass(msgtype, Message) ret = anns.get('return') - responsetypes: tuple[type[Any] | type[None], ...] + responsetypes: tuple[type[Any] | None, ...] # Return types can be a single type or a union of types. if isinstance(ret, (_GenericAlias, types.UnionType)): targs = get_args(ret) - if not all(isinstance(a, type) for a in targs): + if not all(isinstance(a, (type, type(None))) for a in targs): raise TypeError(f'expected only types for "return" annotation;' f' got {targs}.') responsetypes = targs else: - if not isinstance(ret, type): + if not isinstance(ret, (type, type(None))): raise TypeError(f'expected one or more types for' f' "return" annotation; got a {type(ret)}.') # This seems like maybe a mypy bug. Appeared after adding # types.UnionType above. - responsetypes = (ret, ) # type: ignore + responsetypes = (ret, ) + + # This will contain NoneType for empty return cases, but + # we expect it to be None. + responsetypes = tuple(None if r is type(None) else r + for r in responsetypes) # Return type of None translates to EmptySysResponse. - responsetypes = tuple(EmptySysResponse if r is type(None) else r - for r in responsetypes) # noqa + # responsetypes = tuple(EmptySysResponse if r is type(None) else r + # for r in responsetypes) # noqa # Make sure our protocol has this message type registered and our # return types exactly match. (Technically we could return a subset @@ -179,7 +185,9 @@ class MessageReceiver: return call def encode_filter_method( - self, call: Callable[[Any, Message | None, Response, dict], None] + self, + call: Callable[[Any, Message | None, Response | SysResponse, dict], + None] ) -> Callable[[Any, Message | None, Response, dict], None]: """Function decorator for defining an encode filter. @@ -237,17 +245,21 @@ class MessageReceiver: response: Response | None) -> str: """Encode a response provided by the user for sending.""" - # A return value of None equals EmptySysResponse. - if response is None: - response = EmptySysResponse() - - assert isinstance(response, Response) + assert isinstance(response, Response | None) # (user should never explicitly return error-responses) - assert not isinstance(response, ErrorSysResponse) - assert type(response) in message.get_response_types() - response_dict = self.protocol.response_to_dict(response) + assert (response is None + or type(response) in message.get_response_types()) + + # A return value of None equals EmptySysResponse. + out_response: Response | SysResponse + if response is None: + out_response = EmptySysResponse() + else: + out_response = response + + response_dict = self.protocol.response_to_dict(out_response) if self._encode_filter_call is not None: - self._encode_filter_call(bound_obj, message, response, + self._encode_filter_call(bound_obj, message, out_response, response_dict) return self.protocol.encode_dict(response_dict) @@ -281,7 +293,7 @@ class MessageReceiver: if handler is None: raise RuntimeError(f'Got unhandled message type: {msgtype}.') response = handler(bound_obj, msg_decoded) - assert isinstance(response, (Response, type(None))) + assert isinstance(response, Response | None) return self.encode_user_response(bound_obj, msg_decoded, response) except Exception as exc: @@ -309,7 +321,7 @@ class MessageReceiver: if handler is None: raise RuntimeError(f'Got unhandled message type: {msgtype}.') response = await handler(bound_obj, msg_decoded) - assert isinstance(response, (Response, type(None))) + assert isinstance(response, Response | None) return self.encode_user_response(bound_obj, msg_decoded, response) except Exception as exc: diff --git a/tools/efro/message/_sender.py b/tools/efro/message/_sender.py index b176f7f7..48a32e9f 100644 --- a/tools/efro/message/_sender.py +++ b/tools/efro/message/_sender.py @@ -10,12 +10,12 @@ import logging from typing import TYPE_CHECKING from efro.error import CleanError, RemoteError, CommunicationError -from efro.message._message import EmptySysResponse, ErrorSysResponse +from efro.message._message import EmptySysResponse, ErrorSysResponse, Response if TYPE_CHECKING: from typing import Any, Callable, Awaitable - from efro.message._message import Message, Response + from efro.message._message import Message, SysResponse from efro.message._protocol import MessageProtocol @@ -46,8 +46,8 @@ class MessageSender: [Any, str], Awaitable[str]] | None = None self._encode_filter_call: Callable[[Any, Message, dict], None] | None = None - self._decode_filter_call: Callable[[Any, Message, dict, Response], - None] | None = None + self._decode_filter_call: Callable[ + [Any, Message, dict, Response | SysResponse], None] | None = None def send_method( self, call: Callable[[Any, str], @@ -90,7 +90,8 @@ class MessageSender: return call def decode_filter_method( - self, call: Callable[[Any, Message, dict, Response], None] + self, call: Callable[[Any, Message, dict, Response | SysResponse], + None] ) -> Callable[[Any, Message, dict, Response], None]: """Function decorator for defining a decode filter. @@ -122,7 +123,8 @@ class MessageSender: ), ) - def send_split_part_1(self, bound_obj: Any, message: Message) -> Response: + def send_split_part_1(self, bound_obj: Any, + message: Message) -> Response | SysResponse: """Send a message synchronously. Generally you can just call send(); these split versions are @@ -147,8 +149,8 @@ class MessageSender: ErrorSysResponse.ErrorType.LOCAL)) return self._decode_raw_response(bound_obj, message, response_encoded) - async def send_split_part_1_async(self, bound_obj: Any, - message: Message) -> Response: + async def send_split_part_1_async( + self, bound_obj: Any, message: Message) -> Response | SysResponse: """Send a message asynchronously. Generally you can just call send(); these split versions are @@ -175,8 +177,9 @@ class MessageSender: ErrorSysResponse.ErrorType.LOCAL)) return self._decode_raw_response(bound_obj, message, response_encoded) - def send_split_part_2(self, message: Message, - raw_response: Response) -> Response | None: + def send_split_part_2( + self, message: Message, + raw_response: Response | SysResponse) -> Response | None: """Complete message sending (both sync and async). Generally you can just call send(); these split versions are @@ -196,7 +199,7 @@ class MessageSender: return self.protocol.encode_dict(msg_dict) def _decode_raw_response(self, bound_obj: Any, message: Message, - response_encoded: str) -> Response: + response_encoded: str) -> Response | SysResponse: """Create a Response from returned data. These Responses may encapsulate things like remote errors and @@ -204,6 +207,7 @@ class MessageSender: should be used to translate to special values like None or raise Exceptions. This function itself should never raise Exceptions. """ + response: Response | SysResponse try: response_dict = self.protocol.decode_dict(response_encoded) response = self.protocol.response_from_dict(response_dict) @@ -223,7 +227,8 @@ class MessageSender: error_type=ErrorSysResponse.ErrorType.LOCAL) return response - def _unpack_raw_response(self, raw_response: Response) -> Response | None: + def _unpack_raw_response( + self, raw_response: Response | SysResponse) -> Response | None: """Given a raw Response, unpacks to special values or Exceptions. The result of this call is what should be passed to users. @@ -256,6 +261,7 @@ class MessageSender: # Everything else gets lumped in as a remote error. raise RemoteError(raw_response.error_message) + assert isinstance(raw_response, Response) return raw_response @@ -292,15 +298,16 @@ class BoundMessageSender: return await self._sender.send_async(bound_obj=self._obj, message=message) - async def send_split_part_1_async_untyped(self, - message: Message) -> Response: + async def send_split_part_1_async_untyped( + self, message: Message) -> Response | SysResponse: """Split send (part 1 of 2).""" assert self._obj is not None return await self._sender.send_split_part_1_async(bound_obj=self._obj, message=message) - def send_split_part_2_untyped(self, message: Message, - raw_response: Response) -> Response | None: + def send_split_part_2_untyped( + self, message: Message, + raw_response: Response | SysResponse) -> Response | None: """Split send (part 2 of 2).""" return self._sender.send_split_part_2(message=message, raw_response=raw_response) From 3197caaff42338529d74645648808832f82762c3 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 21 Sep 2022 21:56:54 -0700 Subject: [PATCH 37/40] langs and tidying --- .efrocachemap | 48 +++++++++++----------- CHANGELOG.md | 3 +- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/ballistica.cc | 2 +- tools/efro/message/_message.py | 12 ++---- tools/efro/message/_protocol.py | 9 +--- tools/efro/message/_receiver.py | 4 -- 7 files changed, 34 insertions(+), 46 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 2ecdd6d8..39cc8568 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -420,7 +420,7 @@ "assets/build/ba_data/audio/zoeOw.ogg": "https://files.ballistica.net/cache/ba1/60/ad/38269b7f1c7dc20cb9a506cd0681", "assets/build/ba_data/audio/zoePickup01.ogg": "https://files.ballistica.net/cache/ba1/72/85/d6fc4d16b7081d91fba2850b5b10", "assets/build/ba_data/audio/zoeScream01.ogg": "https://files.ballistica.net/cache/ba1/e9/ae/1d674d0c086eaa0bd1c3b1db0505", - "assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/d4/64/6fff42a428e5c775795c081474e6", + "assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/5a/10/dae249cdd589b795fd341ebbec42", "assets/build/ba_data/data/languages/arabic.json": "https://files.ballistica.net/cache/ba1/e2/24/5e7ea9ca5c9de4d3b7a28e53564d", "assets/build/ba_data/data/languages/belarussian.json": "https://files.ballistica.net/cache/ba1/61/03/89070ca765e06da3a419a579f503", "assets/build/ba_data/data/languages/chinese.json": "https://files.ballistica.net/cache/ba1/f8/15/e1a2fa38697417bcf2cf19cd34ef", @@ -433,12 +433,12 @@ "assets/build/ba_data/data/languages/esperanto.json": "https://files.ballistica.net/cache/ba1/4c/c7/0184b8178869d1a3827a1bfcd5bb", "assets/build/ba_data/data/languages/filipino.json": "https://files.ballistica.net/cache/ba1/e9/07/b2dc862601bcd70701b083d43279", "assets/build/ba_data/data/languages/french.json": "https://files.ballistica.net/cache/ba1/2e/48/b0a8fafc5e5436e99d9a3d697d23", - "assets/build/ba_data/data/languages/german.json": "https://files.ballistica.net/cache/ba1/ef/e6/d4909f571d7473fd04055728490e", + "assets/build/ba_data/data/languages/german.json": "https://files.ballistica.net/cache/ba1/8a/09/3e0fa9e44913b53f4dab195d3fae", "assets/build/ba_data/data/languages/gibberish.json": "https://files.ballistica.net/cache/ba1/8a/2a/b2bc00eed0608b2199b2bc379b2e", - "assets/build/ba_data/data/languages/greek.json": "https://files.ballistica.net/cache/ba1/82/eb/37ff44af76812097f9c98f05c730", + "assets/build/ba_data/data/languages/greek.json": "https://files.ballistica.net/cache/ba1/e0/04/6be14bff785255719756e0906ea9", "assets/build/ba_data/data/languages/hindi.json": "https://files.ballistica.net/cache/ba1/91/98/42701cd595c2f70b7484614a8f49", "assets/build/ba_data/data/languages/hungarian.json": "https://files.ballistica.net/cache/ba1/d8/f2/aa16bc336bd7660cc86c3264bfc4", - "assets/build/ba_data/data/languages/indonesian.json": "https://files.ballistica.net/cache/ba1/23/3b/26e9be528460af952a11e98c3b68", + "assets/build/ba_data/data/languages/indonesian.json": "https://files.ballistica.net/cache/ba1/7f/a9/db86d4c8b70f06fd8a1fe0c0511b", "assets/build/ba_data/data/languages/italian.json": "https://files.ballistica.net/cache/ba1/1a/10/9563348e729d1e5c8ae8c9cbc1f2", "assets/build/ba_data/data/languages/korean.json": "https://files.ballistica.net/cache/ba1/a8/e9/171a904f1331fdb7b1918a0f2598", "assets/build/ba_data/data/languages/persian.json": "https://files.ballistica.net/cache/ba1/df/b1/b2c9ebaad5e873ebedd365726d3d", @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/06/a9/6af2420bb4c2472e9ee8eb4adbbb", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/5a/1a/06cb8a31b90d5f6b4687f0dd900e", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ec/5a/228a7a4533f47476d7feb66eb753", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/34/db/161b4aff5dce8ce73dc4a4124ea6", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/d8/71/572c6ae3b24dab621444cb9cb4b9", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/82/ea/742386e234f74bd27618341c8b1c", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3d/3c/f41c01c6d97baad1a2b0a5c8fe34", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/59/ad/360fb7b46011c5bb22015e8d88e7", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/7c/1d/807ae39cd64308fb2cc4ee3821f0", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/e9/f3/ec8376ed0c6f53f009dd6f9c14ab", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c4/d9/bd6d53b98c90e8ea9ba9a38390ba", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c1/22/e76cf27c846b4bbf630d0058d244", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/f2/ed/59aa13c1dbd45f574d50903d7b84", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d0/85/e527ac19480e8a168e0d4da742a4", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e8/9b/c35aa8a2690173004954345c879a", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/56/8d/25475ac95c66ab90193bd835a5d1", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/7f/f4/460bff13d91b0d61f41ecc9f9128", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/53/84/0439b2c18a02c33e71027d18f853", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/a4/c0/7cf3abfa3224860e96c4d4c44184", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/5b/e5/f2858d831cad4162dc4d6529f28e", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/65/20/4018efcdc22d8513850a4e1b3d10", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/b7/89/d0ca6d018e542fbaca470e927922", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/88/77/faac6cf856b2e6162ca4db71ad17", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/75/a2/d480618d4ac6771cd5064859538d", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/82/53/8dcb2d83da87b82e5cc10cb6d0f2", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/b3/7f/9c207efc2274b9ea5f8f285c3d21", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/33/78/a29574c81dce7d5c5884696349dd", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4b/4d/854b0d6cd43b4a8237b3fa8b570d", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/52/f8/27d9fd3e145686d7fb2c70e9296d", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/2b/26/882108b33ceba3bc65523a3721e4", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/27/a8/124e50e5016c07860ec1a937d509", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/7d/51/b0c298b5a5a5fe27e1fcfa73f074", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/10/ea/588fb3f6884eaedf09fdc158ca71", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/1a/75/270911692d8c3739571b379ab60d", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/01/ff/e214812b759342bff1b7ebea610e", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/09/39/8efc28f1afa0ab986bd8f97589c5", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/08/d9/9c909e295fc208b7c6b6a44450ea", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/c0/04/feb674158bd8b2cbea99cf1d777c", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/bb/61/fc42fd653728036ac3574e74ff64", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/0a/33/17419665893ca5e9e7a134975e51", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/41/b3/5a5813294b9281ca6bbb1f5caebe", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/28/05/b6cc01e7b6762a3c8d47851cd30c", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f7/8c/36acf6d02d7c322aed086cc4ec3f", diff --git a/CHANGELOG.md b/CHANGELOG.md index 42740e8f..3f3bc965 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ -### 1.7.9 (build 20875, api 7, 2022-09-21) +### 1.7.9 (build 20877, api 7, 2022-09-21) +- Cleaned up the efro.message system to isolate response types that are used purely internally (via a new SysResponse type). ### 1.7.8 (build 20871, api 7, 2022-09-21) - Fixed tournament scores submits which were broken in 1.7.7 (oops). diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 6ec84868..325e4b70 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -45,7 +45,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20875 + expected_build = 20877 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index c9f39df7..578bebac 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20875; +const int kAppBuildNumber = 20877; const char* kAppVersion = "1.7.9"; // Our standalone globals. diff --git a/tools/efro/message/_message.py b/tools/efro/message/_message.py index f74794eb..7a00070c 100644 --- a/tools/efro/message/_message.py +++ b/tools/efro/message/_message.py @@ -25,12 +25,9 @@ class Message: @classmethod def get_response_types(cls) -> list[type[Response] | None]: - """Return all message types this Message can result in when sent. + """Return all Response types this Message can return when sent. - The default implementation specifies EmptySysResponse, so messages with - no particular response needs can leave this untouched. - Note that ErrorMessage is handled as a special case and does not - need to be specified here. + The default implementation specifies a None return type. """ return [None] @@ -53,10 +50,9 @@ class SysResponse: @ioprepped @dataclass class ErrorSysResponse(SysResponse): - """Response saying some error has occurred for the send. + """SysResponse saying some error has occurred for the send. - This type is unique in that it is not returned to the user; it - instead results in a local exception being raised. + This generally results in an Exception being raised for the caller. """ class ErrorType(Enum): diff --git a/tools/efro/message/_protocol.py b/tools/efro/message/_protocol.py index 7d7e572e..86387deb 100644 --- a/tools/efro/message/_protocol.py +++ b/tools/efro/message/_protocol.py @@ -79,9 +79,8 @@ class MessageProtocol: self.response_types_by_id[r_id] = r_type self.response_ids_by_type[r_type] = r_id - # Go ahead and auto-register a few common response types - # if the user has not done so explicitly. Use unique negative - # IDs which will never change or overlap with user ids. + # Register our SysResponse types. These use negative + # IDs so as to never overlap with user Response types. def _reg_sys(reg_tp: type[SysResponse], reg_id: int) -> None: assert self.response_types_by_id.get(reg_id) is None self.response_types_by_id[reg_id] = reg_tp @@ -339,8 +338,6 @@ class MessageProtocol: f' """Protocol-specific bound sender."""\n') def _filt_tp_name(rtype: type[Response] | None) -> str: - # We accept None to equal EmptySysResponse so reflect that - # in the type annotation. return 'None' if rtype is None else rtype.__name__ # Define handler() overloads for all registered message types. @@ -437,8 +434,6 @@ class MessageProtocol: # Define handler() overloads for all registered message types. def _filt_tp_name(rtype: type[Response] | None) -> str: - # We accept None to equal EmptySysResponse so reflect that - # in the type annotation. return 'None' if rtype is None else rtype.__name__ if msgtypes: diff --git a/tools/efro/message/_receiver.py b/tools/efro/message/_receiver.py index 5bf5d869..5b23a80c 100644 --- a/tools/efro/message/_receiver.py +++ b/tools/efro/message/_receiver.py @@ -130,10 +130,6 @@ class MessageReceiver: responsetypes = tuple(None if r is type(None) else r for r in responsetypes) - # Return type of None translates to EmptySysResponse. - # responsetypes = tuple(EmptySysResponse if r is type(None) else r - # for r in responsetypes) # noqa - # Make sure our protocol has this message type registered and our # return types exactly match. (Technically we could return a subset # of the supported types; can allow this in the future if it makes From 16f83ead1de8fb778245ea8c23c7d9cc2caa3d3e Mon Sep 17 00:00:00 2001 From: Roman Trapeznikov Date: Thu, 22 Sep 2022 18:34:45 +0300 Subject: [PATCH 38/40] fixed 'Disable Camera Shake' option --- CHANGELOG.md | 15 ++++++++------- src/ballistica/graphics/camera.cc | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f3bc965..b685a014 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### 1.7.9 (build 20877, api 7, 2022-09-21) - Cleaned up the efro.message system to isolate response types that are used purely internally (via a new SysResponse type). +- Fixed bug with 'Disable Camera Shake' option. (GitHub #511) ### 1.7.8 (build 20871, api 7, 2022-09-21) - Fixed tournament scores submits which were broken in 1.7.7 (oops). @@ -15,7 +16,7 @@ - Added support for the console tool in the new devices section on ballistica.net. - Increased timeouts in net-testing gui and a few other places to be able to better diagnose/handle places with very poor connectivity. - Removed `Platform::SetLastPyCall()` which was just for debugging and which has not been useful in a while. -- Moved some app bootstrapping from the C++ layer to the ba._bootstrap module. +- Moved some app bootstrapping from the C++ layer to the `ba._bootstrap` module. - The game will now properly return to the stress-test window after a stress test finishes (thanks vishal332008!) - Continue window will now pause the game to avoid running up times in the background (thanks vishal332008!) - Keepaway and KingOfTheHill now have epic options (thanks FAL-Guys!) @@ -23,9 +24,9 @@ - Starting to rename the 'game' thread to the 'logic' thread. This is the thread where most high level app logic happen, not only game logic. - `_ba.in_game_thread()` is now `_ba.in_logic_thread()`. - Misc C++ layer tidying/refactoring. -- Split out the `_ba` binary module into `_ba` and `_bainternal`. This will eventually allow running without the closed-source parts (_bainternal) present at all. +- Split out the `_ba` binary module into `_ba` and `_bainternal`. This will eventually allow running without the closed-source parts (`_bainternal`) present at all. - There is now a `_bainternal.py` dummy-module alongside the existing `_ba.py` one. Be sure to exclude it from any script collections used by the game (the same as `_ba.py`). -- Added checks to make sure _ba or _bainternal arent used outside of ba. Any 'internal' functionality needed outside of ba should be exposed through ba.internal. _ba and _bainternal are internal implementation details. +- Added checks to make sure `_ba` or `_bainternal` arent used outside of ba. Any 'internal' functionality needed outside of ba should be exposed through ba.internal. `_ba` and `_bainternal` are internal implementation details. - Removed C++ Module class and simplified Thread class. The Module class was an old relic of long ago before C++ had lambdas and its existence was pretty pointless and confusing these days. - Renamed C++ App to AppFlavor and AppGlobals to App. - Renamed C++ Media to Assets. @@ -34,14 +35,14 @@ - Renamed C++ Game classes to Logic. - The app now bootstraps Python in the main thread instead of the logic thread. This will keep things more consistent later when we are able to run under an already-existing Python interpreter. - As a side-effect of initing Python in the main thread, it seems that Python now catches segfaults in our debug builds and prints Python stack traces. (see https://docs.python.org/3/library/faulthandler.html). We'll have to experiment and see if this is a net positive or something we want to disable or make optional. -- Python and _ba are now completely initialized in public source code. Now we just need to enable the app to survive without _bainternal and it'll be possible to build a 100% open source app. +- Python and `_ba` are now completely initialized in public source code. Now we just need to enable the app to survive without `_bainternal` and it'll be possible to build a 100% open source app. - `Logging::Log()` in the C++ layer now takes a LogLevel arg (kDebug, kWarning, kError, etc.) and simply calls the equivalent Python logging.XXX call. This unifies our C++ and Python logging to go through the same place. - `ba.log()` is no more. Instead just use standard Python logging functions (logging.info(), logging.error(), etc.). -- `_ba.getlog()` is now `_ba.get_v1_cloud_log()`. Note that this functionality will go away eventually so you should use ba.app.log_handler and/or standard Python logging functions to get at app logs. +- `_ba.getlog()` is now `_ba.get_v1_cloud_log()`. Note that this functionality will go away eventually so you should use `ba.app.log_handler` and/or standard Python logging functions to get at app logs. - Along the same lines, `_ba.get_log_file_path()` is now `_ba.get_v1_cloud_log_file_path()`. - Added `_ba.display_log()` function which ships a log message to the in-game terminal and platform-specific places like the Android log. The engine wires up standard Python logging output to go through this. - Added `_ba.v1_cloud_log()` which ships a message to the old v1-cloud-log (the log which is gathered and sent to the v1 master server to help me identify problems people are seeing). This is presently wired up to a subset of Python logging output to approximate how it used to work. -- Note: Previously in the C++ layer some code would mix Python print calls (such as PyErr_PrintEx()) with ballistica::Log() calls. Previously these all wound up going to the same place (Python's sys.stderr) so it worked, but now they no longer do and so this sort of mixing should be avoided. So if you see a weird combination of colored log output lines with non-colored lines that seem to go together, please holler as it means something needs to be fixed. +- Note: Previously in the C++ layer some code would mix Python print calls (such as `PyErr_PrintEx()`) with ballistica::Log() calls. Previously these all wound up going to the same place (Python's sys.stderr) so it worked, but now they no longer do and so this sort of mixing should be avoided. So if you see a weird combination of colored log output lines with non-colored lines that seem to go together, please holler as it means something needs to be fixed. - Builds for Apple devices now explicitly set a thread stack size of 1MB. The default there is 512k and I was seeing some stack overflows for heavy physics sims or very recursive Python stuff. - If you want to grab recent logs, you can now use `ba.app.log_handler.get_cached()`. This will give you everything that has gone through Python logging, Python stdout/stderr, and the C++ Log() call (up to the max cache size that is). - LogHandler output now ALWAYS goes to stderr. Previously it only would if an interactive terminal was detected. This should make the binary easier to debug if run from scripts/etc. We can add a `--quiet` option if needed or whatnot. @@ -53,7 +54,7 @@ ### 1.7.6 (build 20687, api 7, 2022-08-11) - Cleaned up the MetaSubsystem code. -- It is now possible to tell the meta system about arbitrary classes (ba_meta export foo.bar.Class) instead of just the preset types 'plugin', 'game', etc. +- It is now possible to tell the meta system about arbitrary classes (ba\_meta export foo.bar.Class) instead of just the preset types 'plugin', 'game', etc. - Newly discovered plugins are now activated immediately instead of requiring a restart. ### 1.7.5 (build 20672, api 7, 2022-07-25) diff --git a/src/ballistica/graphics/camera.cc b/src/ballistica/graphics/camera.cc index 29cfef26..c22d1e06 100644 --- a/src/ballistica/graphics/camera.cc +++ b/src/ballistica/graphics/camera.cc @@ -727,7 +727,7 @@ void Camera::Update(millisecs_t elapsed) { } if (g_graphics->camera_shake_disabled()) { - shake_vel_ = {0, 0, 0}; + shake_pos_ = {0, 0, 0}; } } From dfee54e76db44a9a9a23c78ac96cd6cbe957b32f Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 22 Sep 2022 13:40:31 -0700 Subject: [PATCH 39/40] fixed football music --- CHANGELOG.md | 1 + assets/src/ba_data/python/bastd/game/football.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f3bc965..088c4751 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### 1.7.9 (build 20877, api 7, 2022-09-21) - Cleaned up the efro.message system to isolate response types that are used purely internally (via a new SysResponse type). +- Fixed an issue where Co-op football would play no music. ### 1.7.8 (build 20871, api 7, 2022-09-21) - Fixed tournament scores submits which were broken in 1.7.7 (oops). diff --git a/assets/src/ba_data/python/bastd/game/football.py b/assets/src/ba_data/python/bastd/game/football.py index 263f8e3e..2faed91f 100644 --- a/assets/src/ba_data/python/bastd/game/football.py +++ b/assets/src/ba_data/python/bastd/game/football.py @@ -335,6 +335,8 @@ class FootballCoopGame(ba.CoopGameActivity[Player, Team]): scoreconfig = ba.ScoreConfig(scoretype=ba.ScoreType.MILLISECONDS, version='B') + default_music = ba.MusicType.FOOTBALL + # FIXME: Need to update co-op games to use getscoreconfig. def get_score_type(self) -> str: return 'time' From c3c6d0fe567ec7b0366b548b986d26d07b0415c7 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 22 Sep 2022 13:48:22 -0700 Subject: [PATCH 40/40] Latest public/internal sync. --- .efrocachemap | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 39cc8568..a1bce6d4 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/65/20/4018efcdc22d8513850a4e1b3d10", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/b7/89/d0ca6d018e542fbaca470e927922", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/88/77/faac6cf856b2e6162ca4db71ad17", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/75/a2/d480618d4ac6771cd5064859538d", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/82/53/8dcb2d83da87b82e5cc10cb6d0f2", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/b3/7f/9c207efc2274b9ea5f8f285c3d21", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/33/78/a29574c81dce7d5c5884696349dd", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4b/4d/854b0d6cd43b4a8237b3fa8b570d", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/52/f8/27d9fd3e145686d7fb2c70e9296d", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/2b/26/882108b33ceba3bc65523a3721e4", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/27/a8/124e50e5016c07860ec1a937d509", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/7d/51/b0c298b5a5a5fe27e1fcfa73f074", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/10/ea/588fb3f6884eaedf09fdc158ca71", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/1a/75/270911692d8c3739571b379ab60d", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/01/ff/e214812b759342bff1b7ebea610e", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/09/39/8efc28f1afa0ab986bd8f97589c5", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/08/d9/9c909e295fc208b7c6b6a44450ea", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/c0/04/feb674158bd8b2cbea99cf1d777c", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/bb/61/fc42fd653728036ac3574e74ff64", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/0a/33/17419665893ca5e9e7a134975e51", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/2a/10/01cc7af239cfca6d9abeb6e6deb5", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/fd/49/6da409797f98e3834cdd2ba9a1e5", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cd/ba/2e17df1379cd7f60708f1ec3aecb", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/72/0d/d953d2cda66ea47552c6a3f5dfee", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/12/44/fac079140811eaf6b3dd1f1d0fe0", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/00/74/a671dd7047610d8d555c4b0a303c", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/23/4a/40c6eb2af25a0a8f29530f8e63b0", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b3/ff/ced34572d1502e3ce393338810a9", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/cd/73/54f48f6cb05f5dab5e32532b831a", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/26/ca/b667ad8ba524618e62ffc5a58c45", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c9/f1/f92e2fd877e32f2364eb1656052b", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/14/dc/d61b2e43131283a6049f203943bc", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b3/8b/84937c08100c035641764b95fe1d", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d0/59/e84165efa3367582461128db885a", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/26/3f/da203a1eb557318e9abc5f76aac1", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/07/db/5d04f8f0736732cdba70bb85fb19", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/ad/79/b6fcb72c6ff1ac3d507dd938ce14", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/46/5a/582ca64edfc416e140f4b5b1827d", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/5b/b5/ca8b600f49d4c28108f4e16c2f00", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/48/3f/8327430b9c194c14974bed19ea16", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/41/b3/5a5813294b9281ca6bbb1f5caebe", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/28/05/b6cc01e7b6762a3c8d47851cd30c", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f7/8c/36acf6d02d7c322aed086cc4ec3f",