mirror of
https://github.com/mitch030504/Wiicompiled_VR_Frame.git
synced 2026-10-06 10:00:27 +02:00
Add placeholder steering wheel option for VR driving
This commit is contained in:
1 parent
ebc97ef9ce
commit
85fab2fa09
10 files changed
+101
-22
No files matched your search
@@ -26,6 +26,11 @@ int main() {
|
||||
Require(Parse("[vr]\ncockpit_item_throw = false\n").vrCockpitItemThrow == false);
|
||||
Require(Parse("[vr]\ncockpit_item_throw = true\n").vrCockpitItemThrow == true);
|
||||
Require(!Parse("[vr]\n").vrCockpitItemThrow.has_value());
|
||||
// [vr] placeholder_steering_wheel: the separate VR wheel or handlebar is opt-in.
|
||||
Require(!RuntimeConfigFile::kVrPlaceholderSteeringWheelDefault);
|
||||
Require(Parse("[vr]\nplaceholder_steering_wheel = true\n").vrPlaceholderSteeringWheel == true);
|
||||
Require(Parse("[vr]\nplaceholder_steering_wheel = false\n").vrPlaceholderSteeringWheel == false);
|
||||
Require(!Parse("[vr]\n").vrPlaceholderSteeringWheel.has_value());
|
||||
// [vr] foveation: the Quest's foveated rendering level, index-matched to
|
||||
// aurora_set_stereo_foveation.
|
||||
for (std::string_view level : RuntimeConfigFile::kVrFoveationLevels) {
|
||||
|
||||
@@ -108,6 +108,21 @@ void TestSeatFrame() {
|
||||
CheckNear(m[11], -1.0f, "lean turns up into forward", 1e-5f);
|
||||
}
|
||||
|
||||
void TestPlaceholderControl() {
|
||||
// Arguments: steering_wheel, native_steering_wheel, native_mesh_prepared, placeholder.
|
||||
Check(!driving::DrawsPlaceholderControl(true, true, false, false),
|
||||
"no placeholder while the vehicle's own is not animated, unless asked for");
|
||||
Check(!driving::DrawsPlaceholderControl(true, false, false, false),
|
||||
"no placeholder with the vehicle's own wheel off, unless asked for");
|
||||
Check(driving::DrawsPlaceholderControl(true, true, false, true),
|
||||
"the placeholder stands in while the vehicle's own is not animated");
|
||||
Check(driving::DrawsPlaceholderControl(true, false, true, true),
|
||||
"the placeholder replaces the vehicle's own wheel when that is off");
|
||||
Check(!driving::DrawsPlaceholderControl(true, true, true, true),
|
||||
"no placeholder while the vehicle's own is the one turning");
|
||||
Check(!driving::DrawsPlaceholderControl(false, false, false, true), "no wheel turns at all");
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
int main() {
|
||||
@@ -115,6 +130,7 @@ int main() {
|
||||
TestMaxAngle();
|
||||
TestVisual();
|
||||
TestSeatFrame();
|
||||
TestPlaceholderControl();
|
||||
if (g_failures != 0) {
|
||||
std::cerr << g_failures << " check(s) failed\n";
|
||||
return 1;
|
||||
|
||||
Reference in new issue
Block a user