diff --git a/.efrocachemap b/.efrocachemap index cb814059..0a39a318 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/e6/fa/a6d850360d1a7cbf35ceb764ad32", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/58/f9/1c7086b632a9ebdb5ba19dfab3cf", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/05/53/9039866ebcd2dd69645fcd872cd9", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/62/b5/79f78facfdd4cd86dc1d4767cc15", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/3f/d4/e6c1a8f06f1d23eee27fb7164839", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/42/d1/268f4cebbbab626f668e22d08689", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/29/9f/cd098d7d87936893eafcd1cd52c0", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/35/32/0e9e8d112b8aa02e787fd72ca2e6", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/da/92/be9c4085ed3fe8cb8aeb6dd4b6b8", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/6a/65/3a80fd6a0594d157b8ab92883b2f", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ba/39/be2b8f7b86feebde32147640de7a", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/92/ad/ba0c7c1286337c1837d018fe9320", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a5/09/f4d4da0f458f26fb551f97a321c4", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/b4/26/a6bc39c9413bc1d12d0d4c6a14d8", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/be/f0/b0864fb2909027994f99862af75c", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/25/0b/10f2197f805915c0124dd0948975", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/d5/fc/bd1594788c70e4a1c217247c1fbb", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/98/b2/b549c884954266dad836090d53ca", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/33/b3/9ea1255d8a81a20b7cc400f0b9c0", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/15/f1/bc11435032c10e5d4f60bb6cb951", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ae/65/9f762ac4a1c07bbc85714f4ff487", - "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/60/12/7d0d2c7fa57705f26f9ee25f5eb7", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/88/89/8afc89527d34b8b32d792b1768cc", - "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/00/3b/26438d3e877a2a5b30ff0622d1d9", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/54/37/ed1a28f6d2f8801939c3af3f2cbe", - "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/84/c0/33d97960b9bbb74f3764ddfb5510", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8b/2f/dd23665f6b590f0d1392634d58fc", - "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/54/5d/2a9fbe5f0011bfc45e560f56376e", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/85/08/152e657b8ed6917233ecabd88813", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fa/5c/16405030ec49d878d8b6de06c665", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ec/8e/e320531f0d1f280afdb841c85667", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4c/14/536c47d64624acdb36ccc393ecf4", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fe/db/cf274ff81ccc70090fac58bdbdda", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d0/cc/dd5234f21a502657aeb042440f49", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8e/69/d9407dd92b1397548cd274c16b5f", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/df/83/0a461388cf1b14a7e5b8356af40f", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/42/b4/3456304a0c61e7ea54de0c714b64", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/00/cf/15cff772100169a8e17eb1e9420f", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/08/0a/3c1628d8387d54ac1afc3b946662", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/3f/d3/e6faece149393d0933f4bdc01989", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/f8/3e/266e72c426e172f39f7808931850", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/20/e5/cf23928643af4440a129b6b05ce0", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/d8/a1/ce2de181c40cad598c6f41ee50e9", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/6f/74/a733036d25bf2a4ca529b37c4dce", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/96/3f/37701d98f6fe178b6f89a8b2fb8b", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/77/93/ac338b1194ac1f67575ec5e6ae1c", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/82/6d/938e831ac3eba7129148cd383aa0", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4a/9a/39bd6327021300fff3171941c6a5", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/1a/78/e90972b880c259b39d79286cb802", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/b1/dd/d569b53533cca0e778663f9e7c08", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1d/44/41d1018c6c45ac76627805543c8e", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2d/e3/80a9a7641fe2f9d75c30b2ddf80d", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ab/bf/0e961b0d1392d2515a5e3401cf01", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/29/9b/2a0cbdfec96786c3ce1def4252eb", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/82/fd/feef4ba6ef02cd46a478e923c0a5", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/98/96/5dbc51c710bea2f533750935ccc8", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a9/26/f0a5ec1017a7f06d5e289ac00189", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/4b/96/fb3209202be6647b30bc240f7cf2", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/72/2d/443099b95f8c17801df53c9f4033", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d1/4c/9f2bcd8052b8333384de7c560fd8", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/e9/32/244adc43265fd1627c3b3bc9bd15", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/7b/5a/82619a3a9855c04dffe8abdbae6a", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/0c/9e/aa44a345c3be645f245216e27a9e", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/22/f6/99a02c69ef2d4065847ece339e9a", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ed/ab/bb1936d686208edc8c4730949632", + "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0b/88/beb016a2d7ff70fcf7016d8187ae", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/12/be/b10ca74c866bf5d6783672805037", + "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/af/f2/5acd4d29a8b1991c1e09737195f9", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0f/19/279502db6206f11c8e4b5422bc34", + "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a1/f2/99be86d804b841689a49f484d35d", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/00/44/dd1e2251e0215546803c9fbac444", + "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/16/81/25d134cc4a2bd4bf47fd176f0700", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2a/a1/546dae6c198c49ff56ef5fad1187", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/01/60/bb0aae698489aefb789ad78a9340", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/df/fb/4f5eef097e21d2bef9c89d6fe8f0", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/76/d8/adc5e75eee89d891802c13b27cb0", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/cd/d7/d96b6c39bce663f33f736f879342", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/92/aa/398f81c2cc39c37185034c62af39", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/88/b1/3a1e67fab19230eb82ef229a1729", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/03/32/ec1822a2b5eb602885762e6fa886", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/8a/c6/59b6b07b0539d4f7430137d7ac9a", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/c9/fd/b1809da3a5d616237b549fcfa939", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/98/a9/7312d26177d831c2ba74de16db6a", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/4a/7f/99ef6b4b1443c25e19cada13e2dc", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/db/63/24f8d94eb31ea68b6e76d4224aee", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/43/01/7386ee5ed0213b10b223f37a8756", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/c1/67/8a848c47bab2063f656f6ca54294", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/7d/23/b78b2cbe0a37ec2819e281e57917", "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 2304e60c..518febf4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20746, api 7, 2022-09-03) +### 1.7.7 (build 20754, api 7, 2022-09-03) - 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 c14ba9b2..80b3d16b 100644 --- a/assets/src/ba_data/python/._ba_sources_hash +++ b/assets/src/ba_data/python/._ba_sources_hash @@ -1 +1 @@ -58669269684775875412740144262313315598 \ No newline at end of file +70054840476702184810018356968995584648 \ 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 870d36bf..8b6b39c7 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -32,7 +32,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20746 + expected_build = 20754 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 c360dfc9..e2732f5e 100644 --- a/ballisticacore-cmake/CMakeLists.txt +++ b/ballisticacore-cmake/CMakeLists.txt @@ -457,7 +457,7 @@ add_executable(ballisticacore ${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/internal.h + ${BA_SRC_ROOT}/ballistica/internal/app_internal.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 b3321fa3..d5eb5a98 100644 --- a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj +++ b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj @@ -448,7 +448,7 @@ - + diff --git a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters index 238bfeae..7f4a0667 100644 --- a/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters +++ b/ballisticacore-windows/Generic/BallisticaCoreGeneric.vcxproj.filters @@ -778,7 +778,7 @@ ballistica\input - + ballistica\internal diff --git a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj index 7be524c3..d17d70c4 100644 --- a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj +++ b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj @@ -443,7 +443,7 @@ - + diff --git a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters index 238bfeae..7f4a0667 100644 --- a/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters +++ b/ballisticacore-windows/Headless/BallisticaCoreHeadless.vcxproj.filters @@ -778,7 +778,7 @@ ballistica\input - + ballistica\internal diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 1ecd65cf..93598ce6 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -12,6 +12,7 @@ #include "ballistica/dynamics/bg/bg_dynamics_server.h" #include "ballistica/game/account.h" #include "ballistica/graphics/graphics_server.h" +#include "ballistica/internal/app_internal.h" #include "ballistica/media/media_server.h" #include "ballistica/networking/network_write_module.h" #include "ballistica/platform/platform.h" @@ -22,7 +23,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20746; +const int kAppBuildNumber = 20754; const char* kAppVersion = "1.7.7"; // Our standalone globals. diff --git a/src/ballistica/ballistica.h b/src/ballistica/ballistica.h index 5f2f3323..f6ab51bd 100644 --- a/src/ballistica/ballistica.h +++ b/src/ballistica/ballistica.h @@ -154,44 +154,6 @@ auto GetAppInstanceUUID() -> const std::string&; /// Have our main threads/modules all been inited yet? auto IsBootstrapped() -> bool; -/// Internal bits. -auto CreateAppInternal() -> AppInternal*; -auto AppInternalPyInitialize(void* pyconfig) -> void; -auto AppInternalPythonPostInit() -> void; -auto AppInternalHasBlessingHash() -> bool; -auto AppInternalPutLog(bool fatal) -> bool; -auto AppInternalAAT() -> void; -auto AppInternalAATE() -> void; -auto AppInternalV1LoginDidChange() -> void; -auto AppInternalSetAdCompletionCall(PyObject* obj, bool pass_actually_showed) - -> void; -auto AppInternalPushAdViewComplete(const std::string& purpose, - bool actually_showed) -> void; -auto AppInternalPushPublicPartyState() -> void; -auto AppInternalPushSetFriendListCall(const std::vector& friends) - -> void; -auto AppInternalDispatchRemoteAchievementList(const std::set& achs) - -> void; -auto AppInternalPushAnalyticsCall(const std::string& type, int increment) - -> void; -auto AppInternalPushPurchaseTransactionCall(const std::string& item, - const std::string& receipt, - const std::string& signature, - const std::string& order_id, - bool user_initiated) -> void; -auto AppInternalGetPublicAccountID() -> std::string; -auto AppInternalOnLogicThreadPause() -> void; -auto AppInternalDirectSendLogs(const std::string& prefix, - const std::string& suffix, bool instant, - int* result = nullptr) -> void; -auto AppInternalClientInfoQuery(const std::string& val1, - const std::string& val2, - const std::string& val3, int build_number) - -> void; -auto AppInternalCalcV1PeerHash(const std::string& peer_hash_input) - -> std::string; -auto AppInternalV1SetClientInfo(JsonDict* dict) -> void; - /// Does it appear that we are a blessed build with no known user-modifications? auto IsUnmodifiedBlessedBuild() -> bool; diff --git a/src/ballistica/core/fatal_error.cc b/src/ballistica/core/fatal_error.cc index 0d600eb8..e04b78c4 100644 --- a/src/ballistica/core/fatal_error.cc +++ b/src/ballistica/core/fatal_error.cc @@ -4,6 +4,7 @@ #include "ballistica/app/app.h" #include "ballistica/core/logging.h" +#include "ballistica/internal/app_internal.h" #include "ballistica/platform/platform.h" namespace ballistica { @@ -81,7 +82,7 @@ auto FatalError::ReportFatalError(const std::string& message, if (g_app_globals == nullptr) { suffix = logmsg; } - AppInternalDirectSendLogs(prefix, suffix, true, &result); + g_app_internal->DirectSendLogs(prefix, suffix, true, &result); // If we're able to show a fatal-error dialog synchronously, do so. if (g_platform && g_platform->CanShowBlockingFatalErrorDialog()) { diff --git a/src/ballistica/core/logging.cc b/src/ballistica/core/logging.cc index b44bd122..523691d7 100644 --- a/src/ballistica/core/logging.cc +++ b/src/ballistica/core/logging.cc @@ -6,6 +6,7 @@ #include "ballistica/app/app_globals.h" #include "ballistica/game/game.h" +#include "ballistica/internal/app_internal.h" #include "ballistica/networking/telnet_server.h" #include "ballistica/platform/platform.h" #include "ballistica/python/python.h" @@ -102,7 +103,7 @@ void Logging::Log(const std::string& msg, bool to_stdout, bool to_server) { if (g_app_globals == nullptr) { logsuffix = msg; } - AppInternalDirectSendLogs(logprefix, logsuffix, false); + g_app_internal->DirectSendLogs(logprefix, logsuffix, false); } } } diff --git a/src/ballistica/game/account.cc b/src/ballistica/game/account.cc index 9881d096..a154844c 100644 --- a/src/ballistica/game/account.cc +++ b/src/ballistica/game/account.cc @@ -5,6 +5,7 @@ #include "ballistica/app/app_globals.h" #include "ballistica/game/game.h" #include "ballistica/generic/utils.h" +#include "ballistica/internal/app_internal.h" #include "ballistica/platform/platform.h" namespace ballistica { @@ -176,7 +177,7 @@ void Account::SetLogin(V1AccountType account_type, V1LoginState login_state, } if (call_login_did_change) { // Inform a few subsystems of the change. - AppInternalV1LoginDidChange(); + g_app_internal->V1LoginDidChange(); g_platform->V1LoginDidChange(); } } diff --git a/src/ballistica/game/connection/connection_to_client.cc b/src/ballistica/game/connection/connection_to_client.cc index c67a7325..05fb2b42 100644 --- a/src/ballistica/game/connection/connection_to_client.cc +++ b/src/ballistica/game/connection/connection_to_client.cc @@ -10,6 +10,7 @@ #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/media/media.h" #include "ballistica/networking/networking.h" #include "ballistica/python/python.h" @@ -390,7 +391,7 @@ void ConnectionToClient::HandleMessagePacket( if (!token_.empty()) { // Kick off a query to the master-server for this client's info. // FIXME: we need to add retries for this in case of failure. - AppInternalClientInfoQuery( + g_app_internal->ClientInfoQuery( token_, our_handshake_player_spec_str_ + our_handshake_salt_, peer_hash_, build_number_); } diff --git a/src/ballistica/game/connection/connection_to_host.cc b/src/ballistica/game/connection/connection_to_host.cc index 0f88906e..ac401990 100644 --- a/src/ballistica/game/connection/connection_to_host.cc +++ b/src/ballistica/game/connection/connection_to_host.cc @@ -8,6 +8,7 @@ #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/math/vector3f.h" #include "ballistica/media/media.h" #include "ballistica/networking/networking.h" @@ -171,7 +172,7 @@ void ConnectionToHost::HandleGamePacket(const std::vector& data) { set_peer_spec(PlayerSpec(string_buffer.data())); } - peer_hash_ = AppInternalCalcV1PeerHash(peer_hash_input_); + peer_hash_ = g_app_internal->CalcV1PeerHash(peer_hash_input_); set_can_communicate(true); g_game->LaunchClientSession(); @@ -196,7 +197,7 @@ void ConnectionToHost::HandleGamePacket(const std::vector& data) { JsonDict dict; dict.AddNumber("b", kAppBuildNumber); - AppInternalV1SetClientInfo(&dict); + g_app_internal->V1SetClientInfo(&dict); // Pass the hash we generated from their handshake; they can use // this to make sure we're who we say we are. diff --git a/src/ballistica/game/game.cc b/src/ballistica/game/game.cc index 69754636..a728c72b 100644 --- a/src/ballistica/game/game.cc +++ b/src/ballistica/game/game.cc @@ -27,6 +27,7 @@ #include "ballistica/input/device/client_input_device.h" #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/sockaddr.h" #include "ballistica/networking/telnet_server.h" @@ -992,7 +993,7 @@ void Game::HandleThreadPause() { // Let Python and internal layers do their thing. g_python->obj(Python::ObjID::kOnAppPauseCall).Call(); - AppInternalOnLogicThreadPause(); + g_app_internal->OnLogicThreadPause(); } void Game::PushPythonCall(const Object::Ref& call) { @@ -1164,7 +1165,7 @@ void Game::GameServiceAchievementList( const std::set& achievements) { assert(g_python); assert(InLogicThread()); - AppInternalDispatchRemoteAchievementList(achievements); + g_app_internal->DispatchRemoteAchievementList(achievements); } void Game::PushScoresToBeatResponseCall(bool success, @@ -1501,7 +1502,7 @@ void Game::Shutdown(bool soft) { HandleThreadPause(); // Attempt to report/store outstanding log stuff. - AppInternalPutLog(false); + g_app_internal->PutLog(false); // Ideally we'd want to give some of the above stuff // a few seconds to complete, but just calling it done for now. @@ -2138,7 +2139,7 @@ void Game::SetPublicPartyEnabled(bool val) { return; } public_party_enabled_ = val; - AppInternalPushPublicPartyState(); + g_app_internal->PushPublicPartyState(); } void Game::SetPublicPartySize(int count) { @@ -2151,7 +2152,7 @@ void Game::SetPublicPartySize(int count) { // Push our new state to the server *ONLY* if public-party is turned on // (wasteful otherwise). if (public_party_enabled_) { - AppInternalPushPublicPartyState(); + g_app_internal->PushPublicPartyState(); } } @@ -2165,7 +2166,7 @@ void Game::SetPublicPartyMaxSize(int count) { // Push our new state to the server *ONLY* if public-party is turned on // (wasteful otherwise). if (public_party_enabled_) { - AppInternalPushPublicPartyState(); + g_app_internal->PushPublicPartyState(); } } @@ -2179,7 +2180,7 @@ void Game::SetPublicPartyName(const std::string& name) { // Push our new state to the server *ONLY* if public-party is turned on // (wasteful otherwise). if (public_party_enabled_) { - AppInternalPushPublicPartyState(); + g_app_internal->PushPublicPartyState(); } } @@ -2193,7 +2194,7 @@ void Game::SetPublicPartyStatsURL(const std::string& url) { // Push our new state to the server *ONLY* if public-party is turned on // (wasteful otherwise). if (public_party_enabled_) { - AppInternalPushPublicPartyState(); + g_app_internal->PushPublicPartyState(); } } @@ -2207,7 +2208,7 @@ void Game::SetPublicPartyPlayerCount(int count) { // Push our new state to the server *ONLY* if public-party is turned on // (wasteful otherwise). if (public_party_enabled_) { - AppInternalPushPublicPartyState(); + g_app_internal->PushPublicPartyState(); } } diff --git a/src/ballistica/game/player.cc b/src/ballistica/game/player.cc index 874bb5d8..198d4ad1 100644 --- a/src/ballistica/game/player.cc +++ b/src/ballistica/game/player.cc @@ -392,10 +392,10 @@ void Player::SetInputDevice(InputDevice* input_device) { input_device_ = input_device; } -auto Player::GetPublicAccountID() const -> std::string { +auto Player::GetPublicV1AccountID() const -> std::string { assert(InLogicThread()); if (input_device_.exists()) { - return input_device_->GetPublicAccountID(); + return input_device_->GetPublicV1AccountID(); } return ""; } diff --git a/src/ballistica/game/player.h b/src/ballistica/game/player.h index 5264b6dc..1d416764 100644 --- a/src/ballistica/game/player.h +++ b/src/ballistica/game/player.h @@ -77,7 +77,7 @@ class Player : public Object { // If an public account-id can be determined with relative // certainty for this player, returns it. Otherwise returns // an empty string. - auto GetPublicAccountID() const -> std::string; + auto GetPublicV1AccountID() const -> std::string; auto SetHostActivity(HostActivity* host_activity) -> void; auto GetHostActivity() const -> HostActivity*; diff --git a/src/ballistica/input/device/client_input_device.cc b/src/ballistica/input/device/client_input_device.cc index 2b806303..7cd9de43 100644 --- a/src/ballistica/input/device/client_input_device.cc +++ b/src/ballistica/input/device/client_input_device.cc @@ -52,7 +52,7 @@ auto ClientInputDevice::GetAccountName(bool full) const -> std::string { return "???"; } -auto ClientInputDevice::GetPublicAccountID() const -> std::string { +auto ClientInputDevice::GetPublicV1AccountID() const -> std::string { assert(InLogicThread()); if (connection_to_client_.exists()) { return connection_to_client_->peer_public_account_id(); diff --git a/src/ballistica/input/device/client_input_device.h b/src/ballistica/input/device/client_input_device.h index b24edbdd..526164e3 100644 --- a/src/ballistica/input/device/client_input_device.h +++ b/src/ballistica/input/device/client_input_device.h @@ -24,7 +24,7 @@ class ClientInputDevice : public InputDevice { // Return player-profiles dict if available; otherwise nullptr. auto GetPlayerProfiles() const -> PyObject* override; auto GetAccountName(bool full) const -> std::string override; - auto GetPublicAccountID() const -> std::string override; + auto GetPublicV1AccountID() const -> std::string override; void AttachToLocalPlayer(Player* player) override; void DetachFromPlayer() override; void PassInputCommand(InputType type, float value) { diff --git a/src/ballistica/input/device/input_device.cc b/src/ballistica/input/device/input_device.cc index 27b903fb..ef05b9f4 100644 --- a/src/ballistica/input/device/input_device.cc +++ b/src/ballistica/input/device/input_device.cc @@ -10,6 +10,7 @@ #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/networking/networking.h" #include "ballistica/python/class/python_class_input_device.h" #include "ballistica/python/python.h" @@ -74,13 +75,13 @@ static auto GetRandomName(const std::string& full_name) -> std::string { auto InputDevice::GetPlayerProfiles() const -> PyObject* { return nullptr; } -auto InputDevice::GetPublicAccountID() const -> std::string { +auto InputDevice::GetPublicV1AccountID() const -> std::string { assert(InLogicThread()); // This default implementation assumes the device is local // so just returns the locally signed in account's public id. - return AppInternalGetPublicAccountID(); + return g_app_internal->GetPublicV1AccountID(); } auto InputDevice::GetAccountName(bool full) const -> std::string { diff --git a/src/ballistica/input/device/input_device.h b/src/ballistica/input/device/input_device.h index 9b97d18e..b9559fd2 100644 --- a/src/ballistica/input/device/input_device.h +++ b/src/ballistica/input/device/input_device.h @@ -42,12 +42,12 @@ class InputDevice : public Object { /// (for remote players, returns their account). virtual auto GetAccountName(bool full) const -> std::string; - /// Return the public Account ID of the signed-in account associated + /// Return the public V1 Account ID of the signed-in account associated /// with this device, or an empty string if not (yet) available. /// Note that in some cases there may be a delay before this value /// is available. (remote player account IDs are verified with the /// master server before becoming available, etc) - virtual auto GetPublicAccountID() const -> std::string; + virtual auto GetPublicV1AccountID() const -> std::string; /// Returns player-profiles dict if available; otherwise nullptr. virtual auto GetPlayerProfiles() const -> PyObject*; diff --git a/src/ballistica/internal/app_internal.h b/src/ballistica/internal/app_internal.h new file mode 100644 index 00000000..4d2c20be --- /dev/null +++ b/src/ballistica/internal/app_internal.h @@ -0,0 +1,61 @@ +// Released under the MIT License. See LICENSE for details. + +#ifndef BALLISTICA_INTERNAL_APP_INTERNAL_H_ +#define BALLISTICA_INTERNAL_APP_INTERNAL_H_ + +#include +#include + +#include "ballistica/core/types.h" + +namespace ballistica { + +/// Internal bits. +auto CreateAppInternal() -> AppInternal*; + +/// Our high level app interface module. +/// It runs in the main thread and is what platform wrappers +/// should primarily interact with. +class AppInternal { + public: + virtual ~AppInternal() {} + + virtual auto PyInitialize(void* pyconfig) -> void = 0; + virtual auto PythonPostInit() -> void = 0; + virtual auto HasBlessingHash() -> bool = 0; + virtual auto PutLog(bool fatal) -> bool = 0; + virtual auto AAT() -> void = 0; + virtual auto AATE() -> void = 0; + virtual auto V1LoginDidChange() -> void = 0; + virtual auto SetAdCompletionCall(PyObject* obj, bool pass_actually_showed) + -> void = 0; + virtual auto PushAdViewComplete(const std::string& purpose, + bool actually_showed) -> void = 0; + virtual auto PushPublicPartyState() -> void = 0; + virtual auto PushSetFriendListCall(const std::vector& friends) + -> void = 0; + virtual auto DispatchRemoteAchievementList(const std::set& achs) + -> void = 0; + virtual auto PushAnalyticsCall(const std::string& type, int increment) + -> void = 0; + virtual auto PushPurchaseTransactionCall(const std::string& item, + const std::string& receipt, + const std::string& signature, + const std::string& order_id, + 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 ClientInfoQuery(const std::string& val1, const std::string& val2, + const std::string& val3, int build_number) + -> void = 0; + virtual auto CalcV1PeerHash(const std::string& peer_hash_input) + -> std::string = 0; + virtual auto V1SetClientInfo(JsonDict* dict) -> void = 0; +}; + +} // namespace ballistica + +#endif // BALLISTICA_INTERNAL_APP_INTERNAL_H_ diff --git a/src/ballistica/internal/internal.h b/src/ballistica/internal/internal.h deleted file mode 100644 index 2b9661bb..00000000 --- a/src/ballistica/internal/internal.h +++ /dev/null @@ -1,18 +0,0 @@ -// Released under the MIT License. See LICENSE for details. - -#ifndef BALLISTICA_INTERNAL_INTERNAL_H_ -#define BALLISTICA_INTERNAL_INTERNAL_H_ - -namespace ballistica { - -/// Our high level app interface module. -/// It runs in the main thread and is what platform wrappers -/// should primarily interact with. -class AppInternalBase { - public: - virtual ~AppInternalBase() {} -}; - -} // namespace ballistica - -#endif // BALLISTICA_INTERNAL_INTERNAL_H_ diff --git a/src/ballistica/python/class/python_class_session_player.cc b/src/ballistica/python/class/python_class_session_player.cc index ee6378d1..7220a09d 100644 --- a/src/ballistica/python/class/python_class_session_player.cc +++ b/src/ballistica/python/class/python_class_session_player.cc @@ -489,7 +489,7 @@ auto PythonClassSessionPlayer::GetV1AccountID(PythonClassSessionPlayer* self) if (!p) { throw Exception(PyExcType::kSessionPlayerNotFound); } - std::string account_id = p->GetPublicAccountID(); + std::string account_id = p->GetPublicV1AccountID(); if (account_id.empty()) { Py_RETURN_NONE; } diff --git a/src/ballistica/python/methods/python_methods_gameplay.cc b/src/ballistica/python/methods/python_methods_gameplay.cc index 56dbb556..9786c7e4 100644 --- a/src/ballistica/python/methods/python_methods_gameplay.cc +++ b/src/ballistica/python/methods/python_methods_gameplay.cc @@ -16,6 +16,7 @@ #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/media/component/sound.h" #include "ballistica/platform/platform.h" #include "ballistica/python/python.h" @@ -454,7 +455,7 @@ auto PyGetGameRoster(PyObject* self, PyObject* args, PyObject* keywds) // Let's also include a public account-id if we have one. std::string account_id; if (clientid == -1) { - account_id = AppInternalGetPublicAccountID(); + account_id = g_app_internal->GetPublicV1AccountID(); } else { auto client2 = g_game->connections()->connections_to_clients().find(clientid); diff --git a/src/ballistica/python/methods/python_methods_ui.cc b/src/ballistica/python/methods/python_methods_ui.cc index aec64232..4196edb6 100644 --- a/src/ballistica/python/methods/python_methods_ui.cc +++ b/src/ballistica/python/methods/python_methods_ui.cc @@ -8,6 +8,7 @@ #include "ballistica/game/connection/connection_set.h" #include "ballistica/game/game.h" #include "ballistica/input/input.h" +#include "ballistica/internal/app_internal.h" #include "ballistica/python/python.h" #include "ballistica/python/python_sys.h" #include "ballistica/ui/root_ui.h" @@ -1908,8 +1909,8 @@ auto PyShowAd(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { &on_completion_call_obj, &pass_actually_showed)) { return nullptr; } - AppInternalSetAdCompletionCall(on_completion_call_obj, - static_cast(pass_actually_showed)); + g_app_internal->SetAdCompletionCall(on_completion_call_obj, + static_cast(pass_actually_showed)); // In cases where we support ads, store our callback and kick one off. // We'll then fire our callback once its done. @@ -1918,7 +1919,7 @@ auto PyShowAd(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { if (g_platform->GetHasAds()) { g_platform->ShowAd(purpose); } else { - AppInternalPushAdViewComplete(purpose, false); + g_app_internal->PushAdViewComplete(purpose, false); } Py_RETURN_NONE; BA_PYTHON_CATCH; @@ -1938,8 +1939,8 @@ auto PyShowAd2(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { &on_completion_call_obj, &pass_actually_showed)) { return nullptr; } - AppInternalSetAdCompletionCall(on_completion_call_obj, - static_cast(pass_actually_showed)); + g_app_internal->SetAdCompletionCall(on_completion_call_obj, + static_cast(pass_actually_showed)); // In cases where we support ads, store our callback and kick one off. // We'll then fire our callback once its done. @@ -1948,7 +1949,7 @@ auto PyShowAd2(PyObject* self, PyObject* args, PyObject* keywds) -> PyObject* { if (g_platform->GetHasAds()) { g_platform->ShowAd(purpose); } else { - AppInternalPushAdViewComplete(purpose, false); + g_app_internal->PushAdViewComplete(purpose, false); } Py_RETURN_NONE; BA_PYTHON_CATCH; diff --git a/src/ballistica/python/python.cc b/src/ballistica/python/python.cc index 2d73f28a..b224b41a 100644 --- a/src/ballistica/python/python.cc +++ b/src/ballistica/python/python.cc @@ -14,6 +14,7 @@ #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/media/component/collide_model.h" #include "ballistica/media/component/model.h" #include "ballistica/media/component/sound.h" @@ -939,7 +940,7 @@ void Python::Reset(bool do_init) { } // Inits our _ba module and runs Py_Initialize(). - AppInternalPyInitialize(&config); + g_app_internal->PyInitialize(&config); // Grab __main__ in case we need to use it later. PyObject* m; @@ -979,7 +980,7 @@ void Python::Reset(bool do_init) { // Import and grab all the Python stuff we use from C++. #include "ballistica/generated/python_embedded/binding.inc" - AppInternalPythonPostInit(); + g_app_internal->PythonPostInit(); // Alright I guess let's pull ba in to main, since pretty // much all interactive commands will be using it.