C++ formatting updates

This commit is contained in:
Eric Froemling 2020-10-27 11:36:22 -05:00
parent 752999da85
commit 82c739f727
18 changed files with 67 additions and 54 deletions

View File

@ -3932,24 +3932,24 @@
"assets/build/windows/Win32/ucrtbased.dll": "https://files.ballistica.net/cache/ba1/b5/85/f8b6d0558ddb87267f34254b1450", "assets/build/windows/Win32/ucrtbased.dll": "https://files.ballistica.net/cache/ba1/b5/85/f8b6d0558ddb87267f34254b1450",
"assets/build/windows/Win32/vc_redist.x86.exe": "https://files.ballistica.net/cache/ba1/1c/e1/4a1a2eddda2f4aebd5f8b64ab08e", "assets/build/windows/Win32/vc_redist.x86.exe": "https://files.ballistica.net/cache/ba1/1c/e1/4a1a2eddda2f4aebd5f8b64ab08e",
"assets/build/windows/Win32/vcruntime140d.dll": "https://files.ballistica.net/cache/ba1/50/8d/bc2600ac9491f1b14d659709451f", "assets/build/windows/Win32/vcruntime140d.dll": "https://files.ballistica.net/cache/ba1/50/8d/bc2600ac9491f1b14d659709451f",
"build/prefab/full/linux_x86_64/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/5d/5f/7e353ad61a992fd31b1c27918e89", "build/prefab/full/linux_x86_64/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/57/c4/65b46cdf99edf156347ed3381223",
"build/prefab/full/linux_x86_64/release/ballisticacore": "https://files.ballistica.net/cache/ba1/61/77/65d2fd041d9f8fea8d7e4733a5ec", "build/prefab/full/linux_x86_64/release/ballisticacore": "https://files.ballistica.net/cache/ba1/24/06/49b1e54e764a57c0c925cd48d71e",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/70/6c/a1111ede41bda66b5c4dda4162cb", "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b1/e9/12e2965cd54d3cbc02f795222441",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f6/24/3d45f90a537c7f19496b8dd8101c", "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/94/e8/4b12bc80273d1527e2a8210cf090",
"build/prefab/full/mac_x86_64/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/01/b9/a4862fd7ac4b9bc46109bf0f3fb5", "build/prefab/full/mac_x86_64/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b3/f2/25d7adfb561752522269fe0677e7",
"build/prefab/full/mac_x86_64/release/ballisticacore": "https://files.ballistica.net/cache/ba1/70/58/4b5840cd26a0853197fa63c39f26", "build/prefab/full/mac_x86_64/release/ballisticacore": "https://files.ballistica.net/cache/ba1/e4/37/aa7613de3f87a18a5f981f73786a",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/93/de/4dc052ed052de5353044adaf3b56", "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/de/7a/54548afb27b6027ff7c10c41838f",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f9/5c/69ff3f14bb37bd82956088c16872", "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/6b/f3/8e66e8bfdc5ca8fbe5b61838c7b8",
"build/prefab/full/windows_x86/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/5c/4d/acecaaafada62747b7beb884348b", "build/prefab/full/windows_x86/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a0/af/d65a065f6da183970c71c2f479d7",
"build/prefab/full/windows_x86/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/08/81/f3cfc8bb76bc05b0ee53ccd47b67", "build/prefab/full/windows_x86/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/38/bc/dc1d1354f9a81f9e0120a3de63a7",
"build/prefab/full/windows_x86_server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/45/9b/635f9392ba5c0561949e519ec8c3", "build/prefab/full/windows_x86_server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/da/9a/0c9617ad9d98f912db70b91dfd20",
"build/prefab/full/windows_x86_server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/5f/f2/4136816295eca8ffefabc60a8b6e", "build/prefab/full/windows_x86_server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/53/28/8e4c340f2accc1cf3dfb600a2981",
"build/prefab/lib/linux_x86_64/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/80/d2/d1c6766cf07f4c4828bbd5899f79", "build/prefab/lib/linux_x86_64/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/80/d2/d1c6766cf07f4c4828bbd5899f79",
"build/prefab/lib/linux_x86_64/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/de/49/2cfc34ac856737d903954db5571b", "build/prefab/lib/linux_x86_64/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/de/49/2cfc34ac856737d903954db5571b",
"build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/17/9a/fa66aafdf31fc9bdd92ce382c619", "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/17/9a/fa66aafdf31fc9bdd92ce382c619",
"build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/86/de/7d9c9a2b7bba34c630130ed759c9", "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/86/de/7d9c9a2b7bba34c630130ed759c9",
"build/prefab/lib/mac_x86_64/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/43/1d/ee9ee9bf897787f0b469853bb426", "build/prefab/lib/mac_x86_64/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7c/71/59aa912540741d36fca95baf0cdf",
"build/prefab/lib/mac_x86_64/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/98/d2/7a106e580aa03db5c9f91ccd8bc8", "build/prefab/lib/mac_x86_64/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f7/0e/da229849278095b6dcf26432909a",
"build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/38/28/2cbd3a1eeec91e71ff8f4a048d73", "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/58/e2/e78c6993c58dae2a94aa1c36139b",
"build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/25/4d/c9b30b84774de5ee5eed1927d6b1" "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8b/28/742e9c33d64ceeb5e1ff87da5577"
} }

View File

@ -1,5 +1,5 @@
<!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND --> <!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND -->
<h4><em>last updated on 2020-10-26 for Ballistica version 1.5.27 build 20227</em></h4> <h4><em>last updated on 2020-10-27 for Ballistica version 1.5.27 build 20228</em></h4>
<p>This page documents the Python classes and functions in the 'ba' module, <p>This page documents the Python classes and functions in the 'ba' module,
which are the ones most relevant to modding in Ballistica. If you come across something you feel should be included here or could be better explained, please <a href="mailto:support@froemling.net">let me know</a>. Happy modding!</p> which are the ones most relevant to modding in Ballistica. If you come across something you feel should be included here or could be better explained, please <a href="mailto:support@froemling.net">let me know</a>. Happy modding!</p>
<hr> <hr>

View File

@ -21,7 +21,7 @@
namespace ballistica { namespace ballistica {
// These are set automatically via script; don't change here. // These are set automatically via script; don't change here.
const int kAppBuildNumber = 20228; const int kAppBuildNumber = 20229;
const char* kAppVersion = "1.5.27"; const char* kAppVersion = "1.5.27";
// Our standalone globals. // Our standalone globals.

View File

@ -672,7 +672,8 @@ void Joystick::HandleSDLEvent(const SDL_Event* e) {
dpad_right_held_ = (e->type == SDL_JOYBUTTONDOWN); dpad_right_held_ = (e->type == SDL_JOYBUTTONDOWN);
e2.jaxis.value = static_cast_check_fit<int16_t>( e2.jaxis.value = static_cast_check_fit<int16_t>(
dpad_right_held_ ? (dpad_left_held_ ? 0 : 32767) dpad_right_held_ ? (dpad_left_held_ ? 0 : 32767)
: dpad_left_held_ ? -32767 : 0); : dpad_left_held_ ? -32767
: 0);
e = &e2; e = &e2;
} else if (e->jbutton.button == left_button_ } else if (e->jbutton.button == left_button_
|| e->jbutton.button == left_button2_) { || e->jbutton.button == left_button2_) {
@ -681,7 +682,8 @@ void Joystick::HandleSDLEvent(const SDL_Event* e) {
dpad_left_held_ = (e->type == SDL_JOYBUTTONDOWN); dpad_left_held_ = (e->type == SDL_JOYBUTTONDOWN);
e2.jaxis.value = static_cast_check_fit<int16_t>( e2.jaxis.value = static_cast_check_fit<int16_t>(
dpad_right_held_ ? (dpad_left_held_ ? 0 : 32767) dpad_right_held_ ? (dpad_left_held_ ? 0 : 32767)
: dpad_left_held_ ? -32767 : 0); : dpad_left_held_ ? -32767
: 0);
e = &e2; e = &e2;
} else if (e->jbutton.button == up_button_ } else if (e->jbutton.button == up_button_
|| e->jbutton.button == up_button2_) { || e->jbutton.button == up_button2_) {
@ -690,7 +692,8 @@ void Joystick::HandleSDLEvent(const SDL_Event* e) {
dpad_up_held_ = (e->type == SDL_JOYBUTTONDOWN); dpad_up_held_ = (e->type == SDL_JOYBUTTONDOWN);
e2.jaxis.value = static_cast_check_fit<int16_t>( e2.jaxis.value = static_cast_check_fit<int16_t>(
dpad_up_held_ ? (dpad_down_held_ ? 0 : -32767) dpad_up_held_ ? (dpad_down_held_ ? 0 : -32767)
: dpad_down_held_ ? 32767 : 0); : dpad_down_held_ ? 32767
: 0);
e = &e2; e = &e2;
} else if (e->jbutton.button == down_button_ } else if (e->jbutton.button == down_button_
|| e->jbutton.button == down_button2_) { || e->jbutton.button == down_button2_) {
@ -699,7 +702,8 @@ void Joystick::HandleSDLEvent(const SDL_Event* e) {
dpad_down_held_ = (e->type == SDL_JOYBUTTONDOWN); dpad_down_held_ = (e->type == SDL_JOYBUTTONDOWN);
e2.jaxis.value = static_cast_check_fit<int16_t>( e2.jaxis.value = static_cast_check_fit<int16_t>(
dpad_up_held_ ? (dpad_down_held_ ? 0 : -32767) dpad_up_held_ ? (dpad_down_held_ ? 0 : -32767)
: dpad_down_held_ ? 32767 : 0); : dpad_down_held_ ? 32767
: 0);
e = &e2; e = &e2;
} }
break; break;

View File

@ -359,8 +359,8 @@ void TextNode::Draw(FrameDef* frame_def) {
// make sure we're up to date // make sure we're up to date
Update(); Update();
RenderPass& pass( RenderPass& pass(*(in_world_
*(in_world_ ? frame_def->overlay_3d_pass() ? frame_def->overlay_3d_pass()
: (vr_use_fixed ? frame_def->GetOverlayFixedPass() : (vr_use_fixed ? frame_def->GetOverlayFixedPass()
: front_ ? frame_def->overlay_front_pass() : front_ ? frame_def->overlay_front_pass()
: frame_def->overlay_pass()))); : frame_def->overlay_pass())));

View File

@ -493,12 +493,21 @@ def checkenv() -> None:
# Make sure they've got curl. # Make sure they've got curl.
if subprocess.run(['which', 'curl'], check=False, if subprocess.run(['which', 'curl'], check=False,
capture_output=True).returncode != 0: capture_output=True).returncode != 0:
raise CleanError('curl is required; please install it.') raise CleanError('curl is required; please install it via apt,'
' brew, etc.')
# Make sure they've got our target python version. # Make sure they've got our target python version.
if subprocess.run(['which', PYTHON_BIN], check=False, if subprocess.run(['which', PYTHON_BIN], check=False,
capture_output=True).returncode != 0: capture_output=True).returncode != 0:
raise CleanError(f'{PYTHON_BIN} is required; please install it.') raise CleanError(f'{PYTHON_BIN} is required; please install it'
'via apt, brew, etc.')
# Make sure they've got clang-format.
if subprocess.run(['which', 'clang-format'],
check=False,
capture_output=True).returncode != 0:
raise CleanError('clang-format is required; please install '
'it via apt, brew, etc.')
# Make sure they've got pip for that python version. # Make sure they've got pip for that python version.
if subprocess.run(f'{PYTHON_BIN} -m pip --version', if subprocess.run(f'{PYTHON_BIN} -m pip --version',