mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-08 00:30:22 +08:00
sources hash update and auto-formatting
This commit is contained in:
parent
197eca46ce
commit
67d65fa039
@ -1 +1 @@
|
|||||||
206834682288822241335693999070871022992
|
320686119307869972803010339077202626108
|
||||||
@ -672,8 +672,9 @@ void Joystick::HandleSDLEvent(const SDL_Event* e) {
|
|||||||
e2.jaxis.axis = static_cast_check_fit<uint8_t>(analog_lr_);
|
e2.jaxis.axis = static_cast_check_fit<uint8_t>(analog_lr_);
|
||||||
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,8 +682,9 @@ void Joystick::HandleSDLEvent(const SDL_Event* e) {
|
|||||||
e2.jaxis.axis = static_cast_check_fit<uint8_t>(analog_lr_);
|
e2.jaxis.axis = static_cast_check_fit<uint8_t>(analog_lr_);
|
||||||
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,8 +692,9 @@ void Joystick::HandleSDLEvent(const SDL_Event* e) {
|
|||||||
e2.jaxis.axis = static_cast_check_fit<uint8_t>(analog_ud_);
|
e2.jaxis.axis = static_cast_check_fit<uint8_t>(analog_ud_);
|
||||||
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,8 +702,9 @@ void Joystick::HandleSDLEvent(const SDL_Event* e) {
|
|||||||
e2.jaxis.axis = static_cast_check_fit<uint8_t>(analog_ud_);
|
e2.jaxis.axis = static_cast_check_fit<uint8_t>(analog_ud_);
|
||||||
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;
|
||||||
|
|||||||
@ -214,8 +214,8 @@ void ImageNode::Draw(FrameDef* frame_def) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RenderPass& pass(*(vr_use_fixed ? frame_def->GetOverlayFixedPass()
|
RenderPass& pass(*(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()));
|
||||||
|
|
||||||
// If the pass we're drawing into changes dimensions, recalc.
|
// If the pass we're drawing into changes dimensions, recalc.
|
||||||
// Otherwise we break if a window is resized.
|
// Otherwise we break if a window is resized.
|
||||||
|
|||||||
@ -219,9 +219,9 @@ void TerrainNode::Draw(FrameDef* frame_def) {
|
|||||||
if (vr_only_ && !IsVRMode()) {
|
if (vr_only_ && !IsVRMode()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ObjectComponent c(overlay_ ? frame_def->overlay_3d_pass()
|
ObjectComponent c(overlay_ ? frame_def->overlay_3d_pass()
|
||||||
: background_ ? frame_def->beauty_pass_bg()
|
: background_ ? frame_def->beauty_pass_bg()
|
||||||
: frame_def->beauty_pass());
|
: frame_def->beauty_pass());
|
||||||
c.SetWorldSpace(true);
|
c.SetWorldSpace(true);
|
||||||
c.SetTexture(color_texture_);
|
c.SetTexture(color_texture_);
|
||||||
if (lighting_) {
|
if (lighting_) {
|
||||||
|
|||||||
@ -379,11 +379,11 @@ 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())));
|
||||||
if (big_) {
|
if (big_) {
|
||||||
if (text_group_dirty_) {
|
if (text_group_dirty_) {
|
||||||
TextMesh::HAlign h_align;
|
TextMesh::HAlign h_align;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user