diff --git a/.efrocachemap b/.efrocachemap index e4cdbfb4..a946928e 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3971,50 +3971,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/9a/74/282ba4731114c2d7caf25ecf7906", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/4d/8a/99168a6e43fbe1396891de359d71", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f2/08/0662177c11669e6533cff41ca505", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b3/34/a5ec0c985c54fb9cd715008bc326", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/e2/83/13a4b554ee947460454e81d70e3f", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/38/b4/68bb2704cfa6a061341571ae00a8", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/83/a5/8b267696cf929ad1e6d7e5e49f8b", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f2/12/205008f75fa65c0a715198e0942c", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/28/2f/edcf3adbd3097299475e87e32084", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3e/f5/748d921986a48c7aaf3b14569751", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/67/b5/1c678edd3720d83fa64c2ab0d83d", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a9/d0/f81e3398dd298e2b674f2036a23e", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/82/36/aeb2d725778a4ebaf7afd71f8750", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/f2/92/e5d485610ee43060e7845d0e249e", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4b/07/e67992e54bee413fe030589b12c2", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c1/bf/966057408787088a3e821d4795b1", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/fd/22/c43657b3bbe2f430c6de10aac8e6", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/9b/55/06822d9cc2c656736d54817be996", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/d1/26/06c368355613f179e9d6c52a1efb", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/85/0e/3f3320a08003e40633ccf772da9d", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b9/df/bf2e825628494d81e78d4c51e5ec", - "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b4/8b/bcce0396452ed6fea409a6c3f1d2", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/32/76/0c9686d9a11091fb436938d83a4c", - "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5c/83/55b33e7ccbb7e63807005f3e9da5", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c7/32/55b8a340b05da164d8d29f702915", - "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/21/17/1a896a26cc9e4a5fb092a6419933", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e8/9f/382298830c87ed692c41259da3c6", - "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/21/69/67236ce45bcecc2a13e8d2ffa210", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/39/85/2512bb6fdb5d7aefb3a2e54200f9", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7e/24/90c7ab793925086d951f16bc4b82", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8e/52/edf00d7fc606b5fd28c1360c9928", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/82/57/54a1fc8de56c8f1fefe6947bc355", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4a/1e/8d6cd2d0d2bb4c19713f16b7b303", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9b/da/97ef92e8f6d7a834ab521eba3f1e", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ab/81/3af07f1a43103d611774cc3600c9", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d1/63/6a1b2d695a667df137094e13b3f8", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/63/3e/a571557b816d27f6483c6b576e9a", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/b5/fe/0270830ee87bab9e37defbe6e552", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/ee/db/dae2c2054701de01132a326299c6", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/14/bb/c35a583881212c553429f6957e0e", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/cf/d5/ace461574dad8a3ec7e06ad47cdf", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/2c/5c/bc8451a1c605130859cc08a2abe2", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/53/43/bec9c8419dbdc4caf76230d57569", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/cf/5f/a2be3b925b4b877aa86a5bd043e4", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/98/2f/f245ca837216adafc57f73590417", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/53/80/9226a08789623ac4e92773013c0e", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/57/3c/42b22b7f8110373fb7fe925b3c6e", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/8e/fd/47a64cc5ac45d9b6c7d8ed1a4a8c", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/46/45/60bb90c1a4ff3af0b0520a8c596d", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/60/b9/80b9c70fefddcef59fe14cb9880f", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/62/86/2c0f8a1315dd47558d71021e7812", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/0d/3d/03ad59faba2500472c4ee194b4f1", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/06/c0/4b86b8925554b175ba47689d4109", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/b9/34/4c18135716ea6dc64356d711c447", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d8/81/09a74b457e06375ad0025beacbcc", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9f/4a/11620613da3826ecc3a810e9358e", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/0a/9f/02bbc44b82b5c1b5be4d071399fa", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/29/98/4f5121faca906f93f773050c47aa", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/72/38/c1134dfe610fa211a4a529b2e56e", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/40/cb/37495c393215358dff748e9b482c", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/1d/00/992fd43dafba8b620d7b720c40f2", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/01/4b/fce1407f3c9a1dbc491b9534b363", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/0a/9a/e3a0e67edbbeed685b386ec4ac20", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/1a/20/91960677a38484ac4ac7759345c2", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/47/82/77ec49a1d1d5b2ea617c2cc04685", + "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/21/b4/f005c9ca382f6fa93ae3a2b55901", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/21/b0/04a40d5692c48b4d688429fe56ba", + "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c4/f3/145c5841e94c4c3d98587ab181f8", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/03/c3/4f1ec44c17ce63f718185b51dd1d", + "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0c/1d/49f30685edbf73fe166574692129", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/48/05/59458308186e259ec1b73fcd09fe", + "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f0/f1/d5b78aac73a26c2a91473a3c7c30", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a7/92/fd2224576bc4404ce7ab55f5dcfd", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9d/e1/5a270c9315e7b9ba639380e1cce0", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a5/0d/dc99916313b77360404fb8dd43ab", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/64/c7/b8f5454fe17557eb0fce63e8bc88", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/74/3e/304742abfbaacd54bf9f3e18c365", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6b/d6/4ca4a7b8d4e39a4bae9cc0d53521", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f1/f7/16acbb515fb5475af0bd27aa2892", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/93/94/8bc6d04efae6cd32add3c215f694", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/38/de/eb05e64d4d384f9b62cffc385614", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/04/1b/365aa5ccad6261a4e0d811bf0a0e", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/27/79/70c9affabe2e779a3b89850eeac7", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/bf/b7/0fa7b6fc2028f7c506aeabb89a4b", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/b5/fc/ef6ac4ceb33ffb3b303ffa021b18", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/0d/c5/87eba7cfb210cb96ce5c35c2c83a", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/5f/86/9f97fba09d749414243197e4a81a", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/f6/2e/5ae987804637e08ca3a160dae167", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/6e/6f/004b696e9a13b083069374e4bb6a", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/d3/db/e73d4dcf1280d5f677c3cf8b47c3" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 1096815f..17eed0fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.0 (20580, 2022-05-30) +### 1.7.0 (20582, 2022-05-31) - V2 accounts are now available (woohoo!). These are called 'BombSquad Accounts' in the account section. V2 accounts communicate with a completely new server and will be the foundation for lots of new functionality in the future. However they also function as a V1 account so existing functionality should still work. Note that the new 'workspaces' feature for V2-accounts is not yet enabled in this build, but it will be in the next few builds. Also note that account types such as GameCenter and Google-Play will be 'upgraded' to V2 accounts in the future so there is no need to try this out if you use one of those. But if you use device-accounts you might want to create yourself a V2 account, since device-accounts will remain V1-only (though you can link an old device-account to a v2-enabled account if you want to keep your progress). Getting a V2 account now also gives you a chance to reserve a nice account-tag before all the good ones are taken. - Legacy account subsystem has been renamed from `ba.app.accounts` to `ba.app.accounts_v1` - Added `ba.app.accounts_v2` subsystem for working with V2 accounts. diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index e45c8d64..97d0bcb7 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -21,7 +21,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20580; +const int kAppBuildNumber = 20582; const char* kAppVersion = "1.7.0"; // Our standalone globals. diff --git a/src/ballistica/core/inline.h b/src/ballistica/core/inline.h index 944b8587..b41a22c8 100644 --- a/src/ballistica/core/inline.h +++ b/src/ballistica/core/inline.h @@ -89,44 +89,49 @@ auto static_cast_check_type(IN_TYPE in) -> OUT_TYPE { return out_static; } -// This call hijacks compile-type pretty-function-printing functionality +// This stuff hijacks compile-type pretty-function-printing functionality // to give human-readable strings for arbitrary types. Note that these // will not be consistent across platforms and should only be used for -// logging/debugging. Also note that this code is dependent on very specific +// logging/debugging. Also note that this code is dependent on specific // compiler output which could change at any time; to watch out for this // it is recommended to add static_assert()s somewhere to ensure that -// output for a few given types matches expected result(s). +// output for a few given types matches expected results. +// For reference, see this topic: +// https://stackoverflow.com/questions/81870 +template +constexpr std::string_view wrapped_type_name() { +#ifdef __clang__ + return __PRETTY_FUNCTION__; +#elif defined(__GNUC__) + return __PRETTY_FUNCTION__; +#elif defined(_MSC_VER) + return __FUNCSIG__; +#else +#error "Unsupported compiler" +#endif +} + +// To see what our particular compiler has at the beginning of one of +// these strings, let's generate one for 'void' and look for 'void'. +constexpr std::size_t wrapped_type_name_prefix_length() { + return wrapped_type_name().find("void"); +} + +// Similar deal for the end. Subtract the prefix length and length of 'void' +// and what's left is our suffix. +constexpr std::size_t wrapped_type_name_suffix_length() { + return wrapped_type_name().length() - wrapped_type_name_prefix_length() + - std::string_view("void").length(); +} + template constexpr auto static_type_name_constexpr(bool debug_full = false) -> std::string_view { - std::string_view name, prefix, suffix; -#ifdef __clang__ - name = __PRETTY_FUNCTION__; - prefix = - "std::string_view ballistica::" - "static_type_name_constexpr(bool) [T = "; - suffix = "]"; -#elif defined(__GNUC__) - name = __PRETTY_FUNCTION__; - prefix = - "constexpr std::string_view " - "ballistica::static_type_name_constexpr(bool) " - "[with T = "; - suffix = "; std::string_view = std::basic_string_view]"; -#elif defined(_MSC_VER) - name = __FUNCSIG__; - prefix = - "class std::basic_string_view > " - "__cdecl ballistica::static_type_name_constexpr<"; - suffix = ">(bool)"; -#else -#error unimplemented -#endif - if (debug_full) { - return name; + auto name{wrapped_type_name()}; + if (!debug_full) { + name.remove_prefix(wrapped_type_name_prefix_length()); + name.remove_suffix(wrapped_type_name_suffix_length()); } - name.remove_prefix(prefix.size()); - name.remove_suffix(suffix.size()); return name; } diff --git a/src/ballistica/generic/utils.cc b/src/ballistica/generic/utils.cc index 2e9be5b7..d3cc3c53 100644 --- a/src/ballistica/generic/utils.cc +++ b/src/ballistica/generic/utils.cc @@ -3,6 +3,7 @@ #include "ballistica/generic/utils.h" #include +#include #include #include "ballistica/app/app_globals.h" @@ -112,19 +113,23 @@ Utils::Utils() { // Here we add some compile-time checks to alert us if that happens. // Remember that results can vary per compiler; make sure we match - // one of the expected formats. + // any one of the expected formats. static_assert(static_type_name_constexpr() == "ballistica::AppGlobals *" || static_type_name_constexpr() == "ballistica::AppGlobals*" || static_type_name_constexpr() - == "class ballistica::AppGlobals*"); + == "class ballistica::AppGlobals*" + || static_type_name_constexpr() + == "AppGlobals*"); Object::Ref testnode{}; static_assert( static_type_name_constexpr() == "ballistica::Object::Ref" || static_type_name_constexpr() - == "class ballistica::Object::Ref"); + == "class ballistica::Object::Ref" + || static_type_name_constexpr() + == "Object::Ref"); // int testint{}; // static_assert(static_type_name_constexpr() == "int");