mirror of
https://github.com/DrBeef/QuakeQuest.git
synced 2025-01-22 00:31:26 +00:00
Multiple Improvements
- Method for typing in using the controllers - means console can be used and multiplayer games can be started - Increased the FOV - Updated command line text so that super sampling is applied correctly - Yaw turn speed can now be changed in the menu - Menu appearance is easier to read
This commit is contained in:
parent
9d66fdf468
commit
349187075f
8 changed files with 435 additions and 227 deletions
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.drbeef.quakequest"
|
||||
android:versionCode="2"
|
||||
android:versionName="1.0.0" android:installLocation="auto" >
|
||||
android:versionCode="3"
|
||||
android:versionName="1.1.0" android:installLocation="auto" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="25" />
|
||||
<!-- Tell the system this app requires OpenGL ES 3.1. -->
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
#include "snd_main.h"
|
||||
|
||||
cvar_t scr_viewsize = {CVAR_SAVE, "viewsize","100", "how large the view should be, 110 disables inventory bar, 120 disables status bar"};
|
||||
cvar_t scr_fov = {CVAR_SAVE, "fov","100", "field of vision, 1-170 degrees, default 110, some players use 110-130"};
|
||||
cvar_t scr_fov = {CVAR_SAVE, "fov","112", "field of vision, 1-170 degrees, default 110, some players use 110-130"};
|
||||
cvar_t scr_conalpha = {CVAR_SAVE, "scr_conalpha", "0.85", "opacity of console background gfx/conback"};
|
||||
cvar_t scr_conalphafactor = {CVAR_SAVE, "scr_conalphafactor", "1", "opacity of console background gfx/conback relative to scr_conalpha; when 0, gfx/conback is not drawn"};
|
||||
cvar_t scr_conalpha2factor = {CVAR_SAVE, "scr_conalpha2factor", "0", "opacity of console background gfx/conback2 relative to scr_conalpha; when 0, gfx/conback2 is not drawn"};
|
||||
cvar_t scr_conalpha3factor = {CVAR_SAVE, "scr_conalpha3factor", "0", "opacity of console background gfx/conback3 relative to scr_conalpha; when 0, gfx/conback3 is not drawn"};
|
||||
cvar_t scr_conbrightness = {CVAR_SAVE, "scr_conbrightness", "1", "brightness of console background (0 = black, 1 = image)"};
|
||||
cvar_t scr_conbrightness = {CVAR_SAVE, "scr_conbrightness", "0", "brightness of console background (0 = black, 1 = image)"};
|
||||
cvar_t scr_conforcewhiledisconnected = {0, "scr_conforcewhiledisconnected", "1", "forces fullscreen console while disconnected"};
|
||||
cvar_t scr_conscroll_x = {CVAR_SAVE, "scr_conscroll_x", "0", "scroll speed of gfx/conback in x direction"};
|
||||
cvar_t scr_conscroll_y = {CVAR_SAVE, "scr_conscroll_y", "0", "scroll speed of gfx/conback in y direction"};
|
||||
|
|
|
@ -53,7 +53,7 @@ cvar_t con_chatrect = {CVAR_SAVE, "con_chatrect","0", "use con_chatrect_x and _y
|
|||
cvar_t con_chatrect_x = {CVAR_SAVE, "con_chatrect_x","", "where to put chat, relative x coordinate of left edge on screen (use con_chatwidth for width)"};
|
||||
cvar_t con_chatrect_y = {CVAR_SAVE, "con_chatrect_y","", "where to put chat, relative y coordinate of top edge on screen (use con_chat for line count)"};
|
||||
cvar_t con_chatwidth = {CVAR_SAVE, "con_chatwidth","1.0", "relative chat window width"};
|
||||
cvar_t con_textsize = {CVAR_SAVE, "con_textsize","8", "console text size in virtual 2D pixels"};
|
||||
cvar_t con_textsize = {CVAR_SAVE, "con_textsize","12", "console text size in virtual 2D pixels"};
|
||||
cvar_t con_notifysize = {CVAR_SAVE, "con_notifysize","8", "notify text size in virtual 2D pixels"};
|
||||
cvar_t con_chatsize = {CVAR_SAVE, "con_chatsize","8", "chat text size in virtual 2D pixels (if con_chat is enabled)"};
|
||||
cvar_t con_chatsound = {CVAR_SAVE, "con_chatsound","1", "enables chat sound to play on message"};
|
||||
|
|
|
@ -31,8 +31,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
dp_fonts_t dp_fonts;
|
||||
static mempool_t *fonts_mempool = NULL;
|
||||
|
||||
cvar_t r_textshadow = {CVAR_SAVE, "r_textshadow", "0", "draws a shadow on all text to improve readability (note: value controls offset, 1 = 1 pixel, 1.5 = 1.5 pixels, etc)"};
|
||||
cvar_t r_textbrightness = {CVAR_SAVE, "r_textbrightness", "0", "additional brightness for text color codes (0 keeps colors as is, 1 makes them all white)"};
|
||||
cvar_t r_textshadow = {CVAR_SAVE, "r_textshadow", "3", "draws a shadow on all text to improve readability (note: value controls offset, 1 = 1 pixel, 1.5 = 1.5 pixels, etc)"};
|
||||
cvar_t r_textbrightness = {CVAR_SAVE, "r_textbrightness", "1", "additional brightness for text color codes (0 keeps colors as is, 1 makes them all white)"};
|
||||
cvar_t r_textcontrast = {CVAR_SAVE, "r_textcontrast", "1", "additional contrast for text color codes (1 keeps colors as is, 0 makes them all black)"};
|
||||
|
||||
cvar_t r_font_postprocess_blur = {CVAR_SAVE, "r_font_postprocess_blur", "0", "font blur amount"};
|
||||
|
|
|
@ -2989,7 +2989,7 @@ static void M_Reset_Draw (void)
|
|||
M_Print(8 + 4 * (linelength - 11), 16, "Press y / n");
|
||||
}
|
||||
|
||||
#define YAWCONTROL_ITEMS 4
|
||||
#define YAWCONTROL_ITEMS 5
|
||||
|
||||
static int controllermode_cursor;
|
||||
|
||||
|
@ -3582,7 +3582,7 @@ static void M_Credits_Draw (void)
|
|||
" QQQQQQQQ QQQQQQQQ ",
|
||||
" QQQ QQQ ",
|
||||
" Q Q ",
|
||||
" Q Q v1.0.0");
|
||||
" Q Q v1.1.0 ");
|
||||
|
||||
int i, l, linelength, firstline, lastline, lines;
|
||||
for (i = 0, linelength = 0, firstline = 9999, lastline = -1;m_credits_message[i];i++)
|
||||
|
|
|
@ -964,10 +964,10 @@ static float uvs[8] = {
|
|||
};
|
||||
|
||||
static float SCREEN_COORDS[12] = {
|
||||
-3.0f, 2.0f, 0.0f,
|
||||
-3.0f, -2.0f, 0.0f,
|
||||
3.0f, -2.0f, 0.0f,
|
||||
3.0f, 2.0f, 0.0f
|
||||
-3.0f, 2.6f, 0.0f,
|
||||
-3.0f, -2.6f, 0.0f,
|
||||
3.0f, -2.6f, 0.0f,
|
||||
3.0f, 2.6f, 0.0f
|
||||
};
|
||||
|
||||
int vignetteTexture = 0;
|
||||
|
@ -1149,7 +1149,7 @@ static ovrLayerProjection2 ovrRenderer_RenderFrame( ovrRenderer * renderer, cons
|
|||
0.0f, 0.0f, 0.1f,
|
||||
0.0f);
|
||||
} else{
|
||||
projectionMatrix = ovrMatrix4f_CreateProjectionFov(90, 96,
|
||||
projectionMatrix = ovrMatrix4f_CreateProjectionFov(horizFOV, vertFOV+4.0f,
|
||||
0.0f, 0.0f, 0.1f,
|
||||
0.0f);
|
||||
}
|
||||
|
@ -1458,6 +1458,104 @@ ovrInputStateTrackedRemote rightTrackedRemoteState_old;
|
|||
ovrInputStateTrackedRemote rightTrackedRemoteState_new;
|
||||
ovrTracking rightRemoteTracking;
|
||||
|
||||
//Text Input stuff
|
||||
bool textInput = false;
|
||||
int shift = 0;
|
||||
int left_grid = 0;
|
||||
char left_lower[3][10] = {"bcfihgdae", "klorqpmjn", "tuwzyxvs "};
|
||||
char left_shift[3][10] = {"BCFIHGDAE", "KLORQPMJN", "TUWZYXVS "};
|
||||
int right_grid = 0;
|
||||
char right_lower[2][10] = {"236987415", "+-)]&[(?#"};
|
||||
char right_shift[2][10] = {"\"*:|.~_/0", "%^}>,<{\\@"};
|
||||
|
||||
char left_grid_map[2][3][3][8] = {
|
||||
{
|
||||
{
|
||||
"a b c", "j k l", "s t u"
|
||||
},
|
||||
{
|
||||
"d e f", "m n o", "v w"
|
||||
},
|
||||
{
|
||||
"g h i", "p q r", "x y z"
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
"A B C", "J K L", "S T U"
|
||||
},
|
||||
{
|
||||
"D E F", "M N O", "V W"
|
||||
},
|
||||
{
|
||||
"G H I", "P Q R", "X Y Z"
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
char right_grid_map[2][3][2][8] = {
|
||||
{
|
||||
{
|
||||
"1 2 3", "? + -"
|
||||
},
|
||||
{
|
||||
"4 5 6", "( # )"
|
||||
},
|
||||
{
|
||||
"7 8 9", "[ & ]"
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
"/ \" *", "\\ % ^"
|
||||
},
|
||||
{
|
||||
"_ 0 :", "{ @ }"
|
||||
},
|
||||
{
|
||||
"~ . |", "< , >"
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
static int getCharacter(float x, float y)
|
||||
{
|
||||
int c = 8;
|
||||
if (x < -0.3f || x > 0.3f || y < -0.3f || y > 0.3f)
|
||||
{
|
||||
if (x == 0.0f)
|
||||
{
|
||||
if (y > 0.0f)
|
||||
{
|
||||
c = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
c = 4;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
float angle = atanf(y / x) / ((float)M_PI / 180.0f);
|
||||
if (x > 0.0f)
|
||||
{
|
||||
c = (int)(((90.0f - angle) + 22.5f) / 45.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
c = (int)(((90.0f - angle) + 22.5f) / 45.0f) + 4;
|
||||
if (c == 8)
|
||||
c = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
static void ovrApp_HandleInput( ovrApp * app )
|
||||
{
|
||||
float remote_movementSideways = 0.0f;
|
||||
|
@ -1508,13 +1606,102 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
ovrInputStateTrackedRemote *offHandTrackedRemoteStateOld = !cl_righthanded.integer ? &rightTrackedRemoteState_old : &leftTrackedRemoteState_old;
|
||||
ovrTracking *offHandRemoteTracking = !cl_righthanded.integer ? &rightRemoteTracking : &leftRemoteTracking;
|
||||
|
||||
if (textInput)
|
||||
{
|
||||
//Toggle text input
|
||||
if ((leftTrackedRemoteState_new.Buttons & ovrButton_Y) &&
|
||||
(leftTrackedRemoteState_new.Buttons & ovrButton_Y) !=
|
||||
(leftTrackedRemoteState_old.Buttons & ovrButton_Y)) {
|
||||
textInput = !textInput;
|
||||
SCR_CenterPrint("Text Input: Disabled");
|
||||
}
|
||||
|
||||
int left_char_index = getCharacter(leftTrackedRemoteState_new.Joystick.x, leftTrackedRemoteState_new.Joystick.y);
|
||||
int right_char_index = getCharacter(rightTrackedRemoteState_new.Joystick.x, rightTrackedRemoteState_new.Joystick.y);
|
||||
|
||||
//Toggle Shift
|
||||
if ((leftTrackedRemoteState_new.Buttons & ovrButton_X) &&
|
||||
(leftTrackedRemoteState_new.Buttons & ovrButton_X) !=
|
||||
(leftTrackedRemoteState_old.Buttons & ovrButton_X)) {
|
||||
shift = 1 - shift;
|
||||
}
|
||||
|
||||
//Cycle Left Grid
|
||||
if ((leftTrackedRemoteState_new.Buttons & ovrButton_GripTrigger) &&
|
||||
(leftTrackedRemoteState_new.Buttons & ovrButton_GripTrigger) !=
|
||||
(leftTrackedRemoteState_old.Buttons & ovrButton_GripTrigger)) {
|
||||
left_grid = (++left_grid) % 3;
|
||||
}
|
||||
|
||||
//Cycle Right Grid
|
||||
if ((rightTrackedRemoteState_new.Buttons & ovrButton_GripTrigger) &&
|
||||
(rightTrackedRemoteState_new.Buttons & ovrButton_GripTrigger) !=
|
||||
(rightTrackedRemoteState_old.Buttons & ovrButton_GripTrigger)) {
|
||||
right_grid = (++right_grid) % 2;
|
||||
}
|
||||
|
||||
char left_char;
|
||||
char right_char;
|
||||
if (shift)
|
||||
{
|
||||
left_char = left_shift[left_grid][left_char_index];
|
||||
right_char = right_shift[right_grid][right_char_index];
|
||||
} else{
|
||||
left_char = left_lower[left_grid][left_char_index];
|
||||
right_char = right_lower[right_grid][right_char_index];
|
||||
}
|
||||
|
||||
//Enter
|
||||
if ((rightTrackedRemoteState_new.Buttons & ovrButton_A) !=
|
||||
(rightTrackedRemoteState_old.Buttons & ovrButton_A)) {
|
||||
QC_KeyEvent((rightTrackedRemoteState_new.Buttons & ovrButton_A) > 0 ? 1 : 0, K_ENTER, 0);
|
||||
}
|
||||
|
||||
//Delete
|
||||
if ((rightTrackedRemoteState_new.Buttons & ovrButton_B) !=
|
||||
(rightTrackedRemoteState_old.Buttons & ovrButton_B)) {
|
||||
QC_KeyEvent((rightTrackedRemoteState_new.Buttons & ovrButton_B) > 0 ? 1 : 0, K_BACKSPACE, 0);
|
||||
}
|
||||
|
||||
//Use Left Character
|
||||
if ((leftTrackedRemoteState_new.Buttons & ovrButton_Trigger) !=
|
||||
(leftTrackedRemoteState_old.Buttons & ovrButton_Trigger)) {
|
||||
QC_KeyEvent((leftTrackedRemoteState_new.Buttons & ovrButton_Trigger) > 0 ? 1 : 0, 0, left_char);
|
||||
}
|
||||
|
||||
//Use Right Character
|
||||
if ((rightTrackedRemoteState_new.Buttons & ovrButton_Trigger) !=
|
||||
(rightTrackedRemoteState_old.Buttons & ovrButton_Trigger)) {
|
||||
QC_KeyEvent((rightTrackedRemoteState_new.Buttons & ovrButton_Trigger) > 0 ? 1 : 0, 0, right_char);
|
||||
}
|
||||
|
||||
if (textInput) {
|
||||
|
||||
//Draw grid maps to screen
|
||||
char buffer[256];
|
||||
|
||||
//Give the user an idea of what the buttons are
|
||||
dpsnprintf(buffer, 256, " %s %s\n %s %s\n %s %s\n\nText Input: %c %c", left_grid_map[shift][0][left_grid], right_grid_map[shift][0][right_grid],
|
||||
left_grid_map[shift][1][left_grid], right_grid_map[shift][1][right_grid],
|
||||
left_grid_map[shift][2][left_grid], right_grid_map[shift][2][right_grid],
|
||||
left_char, right_char);
|
||||
SCR_CenterPrint(buffer);
|
||||
}
|
||||
|
||||
//Save state
|
||||
leftTrackedRemoteState_old = leftTrackedRemoteState_new;
|
||||
rightTrackedRemoteState_old = rightTrackedRemoteState_new;
|
||||
|
||||
} else {
|
||||
//dominant hand stuff first
|
||||
{
|
||||
weaponOffset[0] = dominantRemoteTracking->HeadPose.Pose.Position.x - hmdPosition[0];
|
||||
weaponOffset[1] = dominantRemoteTracking->HeadPose.Pose.Position.y - hmdPosition[1];
|
||||
weaponOffset[2] = dominantRemoteTracking->HeadPose.Pose.Position.z - hmdPosition[2];
|
||||
|
||||
setWorldPosition(dominantRemoteTracking->HeadPose.Pose.Position.x, dominantRemoteTracking->HeadPose.Pose.Position.y, dominantRemoteTracking->HeadPose.Pose.Position.z);
|
||||
setWorldPosition(dominantRemoteTracking->HeadPose.Pose.Position.x,
|
||||
dominantRemoteTracking->HeadPose.Pose.Position.y,
|
||||
dominantRemoteTracking->HeadPose.Pose.Position.z);
|
||||
|
||||
///Weapon location relative to view
|
||||
vec2_t v;
|
||||
|
@ -1527,7 +1714,7 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
QuatToYawPitchRoll(quatRemote, gunangles);
|
||||
|
||||
//TODO: THIS NEEDS WORK!! - can't get it working and it is doing my head in!!
|
||||
/* // Adjust right (+ve), adjust Back (+ve), up (+ve)
|
||||
/* // Adjust right (+ve), adjust Back (+ve), up (+ve)
|
||||
vec3_t adjustment;
|
||||
//VectorSet(adjustment, cl_weapon_offset_lr.value, cl_weapon_offset_ud.value, cl_weapon_offset_fb.value);
|
||||
VectorSet(adjustment, 0.0f, 0.2f, 0.2f);
|
||||
|
@ -1540,9 +1727,9 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
|
||||
//Change laser sight on joystick click
|
||||
if ((dominantTrackedRemoteState->Buttons & ovrButton_Joystick) &&
|
||||
(dominantTrackedRemoteState->Buttons & ovrButton_Joystick) != (dominantTrackedRemoteStateOld->Buttons & ovrButton_Joystick))
|
||||
{
|
||||
Cvar_SetValueQuick (&r_lasersight, (r_lasersight.integer+1) % 3);
|
||||
(dominantTrackedRemoteState->Buttons & ovrButton_Joystick) !=
|
||||
(dominantTrackedRemoteStateOld->Buttons & ovrButton_Joystick)) {
|
||||
Cvar_SetValueQuick(&r_lasersight, (r_lasersight.integer + 1) % 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1559,12 +1746,12 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
#ifndef NDEBUG
|
||||
//Change heading mode on click of off=hand joystick
|
||||
if ((offHandTrackedRemoteState->Buttons & ovrButton_Joystick) && bigScreen == 0 &&
|
||||
(offHandTrackedRemoteState->Buttons & ovrButton_Joystick) != (offHandTrackedRemoteStateOld->Buttons & ovrButton_Joystick))
|
||||
{
|
||||
Cvar_SetValueQuick (&cl_walkdirection, 1 - cl_walkdirection.integer);
|
||||
(offHandTrackedRemoteState->Buttons & ovrButton_Joystick) !=
|
||||
(offHandTrackedRemoteStateOld->Buttons & ovrButton_Joystick)) {
|
||||
Cvar_SetValueQuick(&cl_walkdirection, 1 - cl_walkdirection.integer);
|
||||
if (cl_walkdirection.integer == 1) {
|
||||
SCR_CenterPrint("Heading Mode: Direction of HMD");
|
||||
} else{
|
||||
} else {
|
||||
SCR_CenterPrint("Heading Mode: Direction of off-hand controller");
|
||||
}
|
||||
}
|
||||
|
@ -1573,7 +1760,10 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
|
||||
//Right-hand specific stuff
|
||||
{
|
||||
ALOGE(" Right-Controller-Position: %f, %f, %f", rightRemoteTracking.HeadPose.Pose.Position.x, rightRemoteTracking.HeadPose.Pose.Position.y, rightRemoteTracking.HeadPose.Pose.Position.z);
|
||||
ALOGE(" Right-Controller-Position: %f, %f, %f",
|
||||
rightRemoteTracking.HeadPose.Pose.Position.x,
|
||||
rightRemoteTracking.HeadPose.Pose.Position.y,
|
||||
rightRemoteTracking.HeadPose.Pose.Position.z);
|
||||
|
||||
//This section corrects for the fact that the controller actually controls direction of movement, but we want to move relative to the direction the
|
||||
//player is facing for positional tracking
|
||||
|
@ -1581,7 +1771,8 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
(2200.0f * cl_postrackmultiplier.value) / cl_forwardspeed.value;
|
||||
|
||||
vec2_t v;
|
||||
rotateAboutOrigin(-positionDeltaThisFrame[0] * multiplier, positionDeltaThisFrame[2] * multiplier, -hmdorientation[YAW], v);
|
||||
rotateAboutOrigin(-positionDeltaThisFrame[0] * multiplier,
|
||||
positionDeltaThisFrame[2] * multiplier, -hmdorientation[YAW], v);
|
||||
positional_movementSideways = v[0];
|
||||
positional_movementForward = v[1];
|
||||
|
||||
|
@ -1591,7 +1782,8 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
oldtime = t;
|
||||
if (delta > 1000)
|
||||
delta = 1000;
|
||||
QC_MotionEvent(delta, rightTrackedRemoteState_new.Joystick.x, rightTrackedRemoteState_new.Joystick.y);
|
||||
QC_MotionEvent(delta, rightTrackedRemoteState_new.Joystick.x,
|
||||
rightTrackedRemoteState_new.Joystick.y);
|
||||
|
||||
if (bigScreen != 0) {
|
||||
|
||||
|
@ -1613,13 +1805,16 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
}
|
||||
|
||||
//Click an option
|
||||
handleTrackedControllerButton(&rightTrackedRemoteState_new, &rightTrackedRemoteState_old, ovrButton_A, K_ENTER);
|
||||
handleTrackedControllerButton(&rightTrackedRemoteState_new,
|
||||
&rightTrackedRemoteState_old, ovrButton_A, K_ENTER);
|
||||
|
||||
//Back button
|
||||
handleTrackedControllerButton(&rightTrackedRemoteState_new, &rightTrackedRemoteState_old, ovrButton_B, K_ESCAPE);
|
||||
handleTrackedControllerButton(&rightTrackedRemoteState_new,
|
||||
&rightTrackedRemoteState_old, ovrButton_B, K_ESCAPE);
|
||||
} else {
|
||||
//Jump
|
||||
handleTrackedControllerButton(&rightTrackedRemoteState_new, &rightTrackedRemoteState_old, ovrButton_A, K_SPACE);
|
||||
handleTrackedControllerButton(&rightTrackedRemoteState_new,
|
||||
&rightTrackedRemoteState_old, ovrButton_A, K_SPACE);
|
||||
}
|
||||
|
||||
if (cl_righthanded.integer) {
|
||||
|
@ -1627,7 +1822,7 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
handleTrackedControllerButton(&rightTrackedRemoteState_new,
|
||||
&rightTrackedRemoteState_old,
|
||||
ovrButton_Trigger, K_MOUSE1);
|
||||
} else{
|
||||
} else {
|
||||
//Run
|
||||
handleTrackedControllerButton(&rightTrackedRemoteState_new,
|
||||
&rightTrackedRemoteState_old,
|
||||
|
@ -1635,19 +1830,20 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
}
|
||||
|
||||
//Next Weapon
|
||||
handleTrackedControllerButton(&rightTrackedRemoteState_new, &rightTrackedRemoteState_old, ovrButton_GripTrigger, '/');
|
||||
handleTrackedControllerButton(&rightTrackedRemoteState_new,
|
||||
&rightTrackedRemoteState_old, ovrButton_GripTrigger, '/');
|
||||
|
||||
//Adjust weapon aim pitch
|
||||
if ((rightTrackedRemoteState_new.Buttons & ovrButton_B) &&
|
||||
(rightTrackedRemoteState_new.Buttons & ovrButton_B) != (rightTrackedRemoteState_old.Buttons & ovrButton_B)) {
|
||||
(rightTrackedRemoteState_new.Buttons & ovrButton_B) !=
|
||||
(rightTrackedRemoteState_old.Buttons & ovrButton_B)) {
|
||||
float newPitchAdjust = cl_weaponpitchadjust.value + 1.0f;
|
||||
if (newPitchAdjust > 23.0f)
|
||||
{
|
||||
if (newPitchAdjust > 23.0f) {
|
||||
newPitchAdjust = -7.0f;
|
||||
}
|
||||
|
||||
Cvar_SetValueQuick(&cl_weaponpitchadjust, newPitchAdjust);
|
||||
ALOGV("Pitch Adjust: %f", newPitchAdjust );
|
||||
ALOGV("Pitch Adjust: %f", newPitchAdjust);
|
||||
}
|
||||
|
||||
rightTrackedRemoteState_old = rightTrackedRemoteState_new;
|
||||
|
@ -1656,10 +1852,14 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
|
||||
//Left-hand specific stuff
|
||||
{
|
||||
ALOGE(" Left-Controller-Position: %f, %f, %f", leftRemoteTracking.HeadPose.Pose.Position.x, leftRemoteTracking.HeadPose.Pose.Position.y, leftRemoteTracking.HeadPose.Pose.Position.z);
|
||||
ALOGE(" Left-Controller-Position: %f, %f, %f",
|
||||
leftRemoteTracking.HeadPose.Pose.Position.x,
|
||||
leftRemoteTracking.HeadPose.Pose.Position.y,
|
||||
leftRemoteTracking.HeadPose.Pose.Position.z);
|
||||
|
||||
//Menu button
|
||||
handleTrackedControllerButton(&leftTrackedRemoteState_new, &leftTrackedRemoteState_old, ovrButton_Enter, K_ESCAPE);
|
||||
handleTrackedControllerButton(&leftTrackedRemoteState_new, &leftTrackedRemoteState_old,
|
||||
ovrButton_Enter, K_ESCAPE);
|
||||
|
||||
if (bigScreen != 0) {
|
||||
int leftJoyState = (leftTrackedRemoteState_new.Joystick.x > 0.7f ? 1 : 0);
|
||||
|
@ -1683,7 +1883,10 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
|
||||
//Adjust to be off-hand controller oriented
|
||||
vec2_t v;
|
||||
rotateAboutOrigin(leftTrackedRemoteState_new.Joystick.x, leftTrackedRemoteState_new.Joystick.y, cl_walkdirection.integer == 1 ? hmdYawHeading : controllerYawHeading, v);
|
||||
rotateAboutOrigin(leftTrackedRemoteState_new.Joystick.x,
|
||||
leftTrackedRemoteState_new.Joystick.y,
|
||||
cl_walkdirection.integer == 1 ? hmdYawHeading : controllerYawHeading,
|
||||
v);
|
||||
remote_movementSideways = v[0];
|
||||
remote_movementForward = v[1];
|
||||
|
||||
|
@ -1692,7 +1895,7 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
handleTrackedControllerButton(&leftTrackedRemoteState_new,
|
||||
&leftTrackedRemoteState_old,
|
||||
ovrButton_Trigger, K_SHIFT);
|
||||
} else{
|
||||
} else {
|
||||
//Fire
|
||||
handleTrackedControllerButton(&leftTrackedRemoteState_new,
|
||||
&leftTrackedRemoteState_old,
|
||||
|
@ -1700,29 +1903,34 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
}
|
||||
|
||||
//Prev Weapon
|
||||
handleTrackedControllerButton(&leftTrackedRemoteState_new, &leftTrackedRemoteState_old, ovrButton_GripTrigger, '#');
|
||||
handleTrackedControllerButton(&leftTrackedRemoteState_new, &leftTrackedRemoteState_old,
|
||||
ovrButton_GripTrigger, '#');
|
||||
|
||||
#ifndef NDEBUG
|
||||
//Give all weapons and all ammo and god mode
|
||||
if ((leftTrackedRemoteState_new.Buttons & ovrButton_X) &&
|
||||
(leftTrackedRemoteState_new.Buttons & ovrButton_X) != (leftTrackedRemoteState_old.Buttons & ovrButton_X)) {
|
||||
(leftTrackedRemoteState_new.Buttons & ovrButton_X) !=
|
||||
(leftTrackedRemoteState_old.Buttons & ovrButton_X)) {
|
||||
Cbuf_InsertText("God\n");
|
||||
Cbuf_InsertText("Impulse 9\n");
|
||||
}
|
||||
|
||||
//Change handedness - temporary for testing
|
||||
if ((leftTrackedRemoteState_new.Buttons & ovrButton_Y) &&
|
||||
(leftTrackedRemoteState_new.Buttons & ovrButton_Y) != (leftTrackedRemoteState_old.Buttons & ovrButton_Y))
|
||||
{
|
||||
Cvar_SetValueQuick (&cl_righthanded, 1 - cl_righthanded.integer);
|
||||
}
|
||||
#endif
|
||||
|
||||
//Toggle text input
|
||||
if ((leftTrackedRemoteState_new.Buttons & ovrButton_Y) &&
|
||||
(leftTrackedRemoteState_new.Buttons & ovrButton_Y) !=
|
||||
(leftTrackedRemoteState_old.Buttons & ovrButton_Y)) {
|
||||
textInput = !textInput;
|
||||
SCR_CenterPrint("Text Input: Enabled");
|
||||
}
|
||||
|
||||
|
||||
leftTrackedRemoteState_old = leftTrackedRemoteState_new;
|
||||
}
|
||||
|
||||
QC_Analog(true, remote_movementSideways + positional_movementSideways, remote_movementForward + positional_movementForward);
|
||||
QC_Analog(true, remote_movementSideways + positional_movementSideways,
|
||||
remote_movementForward + positional_movementForward);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2238,9 +2446,9 @@ JNIEXPORT jlong JNICALL Java_com_drbeef_quakequest_GLES3JNILib_onCreate( JNIEnv
|
|||
|
||||
(*env)->ReleaseStringUTFChars(env, commandLineParams, arg);
|
||||
|
||||
ALOGV("Command line %s", arg);
|
||||
ALOGV("Command line %s", cmdLine);
|
||||
argv = malloc(sizeof(char*) * 255);
|
||||
argc = ParseCommandLine(strdup(arg), argv);
|
||||
argc = ParseCommandLine(strdup(cmdLine), argv);
|
||||
|
||||
/* verify the argtable[] entries were allocated sucessfully */
|
||||
if (arg_nullcheck(argtable) == 0) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
quake -supersampling 1.3
|
||||
quake --supersampling 1.3
|
|
@ -53,7 +53,7 @@ bind MOUSE2 "+forward"
|
|||
bind MOUSE3 "+mlook"
|
||||
"cl_particles_quality" "2"
|
||||
"cl_stainmaps" "1"
|
||||
"fov" "100"
|
||||
"fov" "112"
|
||||
"sensitivity" "4"
|
||||
"snd_speed" "44100"
|
||||
"cl_weapon_offset_ud" "0.1"
|
||||
|
|
Loading…
Reference in a new issue