sources hash update and auto-formatting

This commit is contained in:
Eric Froemling 2021-11-04 15:30:04 -05:00
parent 197eca46ce
commit 67d65fa039
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
5 changed files with 23 additions and 19 deletions

View File

@ -1 +1 @@
206834682288822241335693999070871022992
320686119307869972803010339077202626108

View File

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

View File

@ -214,8 +214,8 @@ void ImageNode::Draw(FrameDef* frame_def) {
}
RenderPass& pass(*(vr_use_fixed ? frame_def->GetOverlayFixedPass()
: front_ ? frame_def->overlay_front_pass()
: frame_def->overlay_pass()));
: front_ ? frame_def->overlay_front_pass()
: frame_def->overlay_pass()));
// If the pass we're drawing into changes dimensions, recalc.
// Otherwise we break if a window is resized.

View File

@ -219,9 +219,9 @@ void TerrainNode::Draw(FrameDef* frame_def) {
if (vr_only_ && !IsVRMode()) {
return;
}
ObjectComponent c(overlay_ ? frame_def->overlay_3d_pass()
: background_ ? frame_def->beauty_pass_bg()
: frame_def->beauty_pass());
ObjectComponent c(overlay_ ? frame_def->overlay_3d_pass()
: background_ ? frame_def->beauty_pass_bg()
: frame_def->beauty_pass());
c.SetWorldSpace(true);
c.SetTexture(color_texture_);
if (lighting_) {

View File

@ -379,11 +379,11 @@ void TextNode::Draw(FrameDef* frame_def) {
// make sure we're up to date
Update();
RenderPass& pass(
*(in_world_ ? frame_def->overlay_3d_pass()
: (vr_use_fixed ? frame_def->GetOverlayFixedPass()
: front_ ? frame_def->overlay_front_pass()
: frame_def->overlay_pass())));
RenderPass& pass(*(in_world_
? frame_def->overlay_3d_pass()
: (vr_use_fixed ? frame_def->GetOverlayFixedPass()
: front_ ? frame_def->overlay_front_pass()
: frame_def->overlay_pass())));
if (big_) {
if (text_group_dirty_) {
TextMesh::HAlign h_align;