mirror of
https://github.com/DrBeef/RTCWQuest.git
synced 2025-04-22 23:11:02 +00:00
Now running...
..and almost playable in some sort of rubbish way!
This commit is contained in:
parent
8ec8eb9adb
commit
1f5a068b27
25 changed files with 665 additions and 629 deletions
|
@ -16,7 +16,7 @@ GL4ES_PATH := $(SUPPORT_LIBS)/gl4es
|
|||
|
||||
APP_ALLOW_MISSING_DEPS=true
|
||||
|
||||
APP_MODULES := gl4es qagamearm rtcw_client uiarm cgamearm
|
||||
APP_MODULES := gl4es qagamearm uiarm cgamearm rtcw_client
|
||||
APP_STL := c++_shared
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -31,6 +31,8 @@ float playerYaw;
|
|||
qboolean showingScreenLayer;
|
||||
float vrFOV;
|
||||
|
||||
ovrTracking2 tracking;
|
||||
|
||||
vec3_t worldPosition;
|
||||
|
||||
vec3_t hmdPosition;
|
||||
|
@ -59,8 +61,26 @@ float length(float x, float y);
|
|||
float nonLinearFilter(float in);
|
||||
qboolean between(float min, float val, float max);
|
||||
void rotateAboutOrigin(float v1, float v2, float rotation, vec2_t out);
|
||||
void QuatToYawPitchRoll(ovrQuatf q, float pitchAdjust, vec3_t out);
|
||||
qboolean useScreenLayer();
|
||||
void QuatToYawPitchRoll(ovrQuatf q, vec3_t rotation, vec3_t out);
|
||||
void handleTrackedControllerButton(ovrInputStateTrackedRemote * trackedRemoteState, ovrInputStateTrackedRemote * prevTrackedRemoteState, uint32_t button, int key);
|
||||
void interactWithTouchScreen(ovrTracking *tracking, ovrInputStateTrackedRemote *newState, ovrInputStateTrackedRemote *oldState);
|
||||
|
||||
|
||||
//Called from engine code
|
||||
qboolean RTCWVR_useScreenLayer();
|
||||
void RTCWVR_GetScreenRes(uint32_t *width, uint32_t *height);
|
||||
void RTCWVR_Vibrate(float duration, int channel, float intensity );
|
||||
qboolean RTCWVR_processMessageQueue();
|
||||
void RTCWVR_FrameSetup();
|
||||
void RTCWVR_setUseScreenLayer(qboolean use);
|
||||
void RTCWVR_processHaptics();
|
||||
void RTCWVR_getHMDOrientation();
|
||||
void RTCWVR_getTrackedRemotesOrientation();
|
||||
|
||||
void RTCWVR_incrementFrameIndex();
|
||||
|
||||
void RTCWVR_prepareEyeBuffer(int eye );
|
||||
void RTCWVR_finishEyeBuffer(int eye );
|
||||
void RTCWVR_submitFrame();
|
||||
|
||||
#endif //vrcommon_h
|
|
@ -456,64 +456,6 @@ ovrRenderer
|
|||
================================================================================
|
||||
*/
|
||||
|
||||
ovrLayerProjection2 ovrRenderer_RenderGroundPlaneToEyeBuffer( ovrRenderer * renderer, const ovrJava * java,
|
||||
const ovrScene * scene, const ovrTracking2 * tracking )
|
||||
{
|
||||
ovrLayerProjection2 layer = vrapi_DefaultLayerProjection2();
|
||||
layer.HeadPose = tracking->HeadPose;
|
||||
for ( int eye = 0; eye < VRAPI_FRAME_LAYER_EYE_MAX; eye++ )
|
||||
{
|
||||
ovrFramebuffer * frameBuffer = &renderer->FrameBuffer[eye];
|
||||
layer.Textures[eye].ColorSwapChain = frameBuffer->ColorTextureSwapChain;
|
||||
layer.Textures[eye].SwapChainIndex = frameBuffer->TextureSwapChainIndex;
|
||||
layer.Textures[eye].TexCoordsFromTanAngles = ovrMatrix4f_TanAngleMatrixFromProjection( &tracking->Eye[eye].ProjectionMatrix );
|
||||
}
|
||||
layer.Header.Flags |= VRAPI_FRAME_LAYER_FLAG_CHROMATIC_ABERRATION_CORRECTION;
|
||||
|
||||
for ( int eye = 0; eye < VRAPI_FRAME_LAYER_EYE_MAX; eye++ )
|
||||
{
|
||||
ovrFramebuffer * frameBuffer = &renderer->FrameBuffer[eye];
|
||||
ovrFramebuffer_SetCurrent( frameBuffer );
|
||||
|
||||
renderState state;
|
||||
getCurrentRenderState(&state);
|
||||
|
||||
GL( glUseProgram( scene->Program.Program ) );
|
||||
|
||||
ovrMatrix4f viewProjMatrix = ovrMatrix4f_Multiply( &tracking->Eye[eye].ProjectionMatrix, &tracking->Eye[eye].ViewMatrix );
|
||||
glUniformMatrix4fv( scene->Program.UniformLocation[UNIFORM_VIEW_PROJ_MATRIX], 1, GL_TRUE, &viewProjMatrix.M[0][0] );
|
||||
|
||||
GL( glEnable( GL_SCISSOR_TEST ) );
|
||||
GL( glDepthMask( GL_TRUE ) );
|
||||
GL( glEnable( GL_DEPTH_TEST ) );
|
||||
GL( glDepthFunc( GL_LEQUAL ) );
|
||||
GL( glEnable( GL_CULL_FACE ) );
|
||||
GL( glCullFace( GL_BACK ) );
|
||||
GL( glViewport( 0, 0, frameBuffer->Width, frameBuffer->Height ) );
|
||||
GL( glScissor( 0, 0, frameBuffer->Width, frameBuffer->Height ) );
|
||||
GL( glClearColor( 0.0f, 0.0f, 0.0f, 1.0f ) );
|
||||
GL( glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) );
|
||||
|
||||
//bind buffers
|
||||
GL( glBindBuffer( GL_ARRAY_BUFFER, scene->GroundPlane.VertexBuffer ) );
|
||||
GL( glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, scene->GroundPlane.IndexBuffer ) );
|
||||
GL( glBindVertexArray( scene->GroundPlane.VertexArrayObject ) );
|
||||
|
||||
GL( glDrawElements( GL_TRIANGLES, scene->GroundPlane.IndexCount, GL_UNSIGNED_SHORT, NULL ) );
|
||||
|
||||
restoreRenderState(&state);
|
||||
|
||||
// Explicitly clear the border texels to black when GL_CLAMP_TO_BORDER is not available.
|
||||
ovrFramebuffer_ClearEdgeTexels( frameBuffer );
|
||||
|
||||
ovrFramebuffer_Resolve( frameBuffer );
|
||||
ovrFramebuffer_Advance( frameBuffer );
|
||||
}
|
||||
|
||||
ovrFramebuffer_SetNone();
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
||||
// Assumes landscape cylinder shape.
|
||||
static ovrMatrix4f CylinderModelMatrix( const int texWidth, const int texHeight,
|
||||
|
@ -572,7 +514,7 @@ ovrLayerCylinder2 BuildCylinderLayer( ovrRenderer * cylinderRenderer,
|
|||
ovrMatrix4f modelViewMatrix = ovrMatrix4f_Multiply( &tracking->Eye[eye].ViewMatrix, &cylinderTransform );
|
||||
layer.Textures[eye].TexCoordsFromTanAngles = ovrMatrix4f_Inverse( &modelViewMatrix );
|
||||
layer.Textures[eye].ColorSwapChain = cylinderFrameBuffer->ColorTextureSwapChain;
|
||||
layer.Textures[eye].SwapChainIndex = cylinderFrameBuffer->TextureSwapChainIndex;
|
||||
layer.Textures[eye].SwapChainIndex = cylinderFrameBuffer->ReadyTextureSwapChainIndex;
|
||||
|
||||
// Texcoord scale and bias is just a representation of the aspect ratio. The positioning
|
||||
// of the cylinder is handled entirely by the TexCoordsFromTanAngles matrix.
|
||||
|
|
|
@ -59,7 +59,8 @@ typedef struct
|
|||
int Height;
|
||||
int Multisamples;
|
||||
int TextureSwapChainLength;
|
||||
int TextureSwapChainIndex;
|
||||
int ProcessingTextureSwapChainIndex;
|
||||
int ReadyTextureSwapChainIndex;
|
||||
ovrTextureSwapChain * ColorTextureSwapChain;
|
||||
GLuint * DepthBuffers;
|
||||
GLuint * FrameBuffers;
|
||||
|
|
|
@ -15,13 +15,15 @@ Authors : Simon Brown
|
|||
|
||||
#include "VrInput.h"
|
||||
|
||||
//keys.h
|
||||
void Key_Event (int key, qboolean down, unsigned time);
|
||||
#include <src/qcommon/qcommon.h>
|
||||
|
||||
//keys.h
|
||||
void Sys_QueEvent( int time, sysEventType_t type, int value, int value2, int ptrLength, void *ptr );
|
||||
void handleTrackedControllerButton(ovrInputStateTrackedRemote * trackedRemoteState, ovrInputStateTrackedRemote * prevTrackedRemoteState, uint32_t button, int key)
|
||||
{
|
||||
if ((trackedRemoteState->Buttons & button) != (prevTrackedRemoteState->Buttons & button))
|
||||
{
|
||||
Sys_QueEvent( 0, SE_KEY, key, (trackedRemoteState->Buttons & button) != 0, 0, NULL );
|
||||
// Key_Event(key, (trackedRemoteState->Buttons & button) != 0, global_time);
|
||||
}
|
||||
}
|
||||
|
@ -86,7 +88,7 @@ void sendButtonActionSimple(const char* action)
|
|||
{
|
||||
char command[256];
|
||||
snprintf( command, sizeof( command ), "%s\n", action );
|
||||
// Cbuf_AddText( command );
|
||||
Cbuf_AddText( command );
|
||||
}
|
||||
|
||||
qboolean between(float min, float val, float max)
|
||||
|
@ -102,7 +104,7 @@ void sendButtonAction(const char* action, long buttonDown)
|
|||
{
|
||||
command[0] = '-';
|
||||
}
|
||||
// Cbuf_AddText( command );
|
||||
Cbuf_AddText( command );
|
||||
}
|
||||
|
||||
void acquireTrackedRemotesData(const ovrMobile *Ovr, double displayTime) {//The amount of yaw changed by controller
|
||||
|
@ -140,3 +142,32 @@ void acquireTrackedRemotesData(const ovrMobile *Ovr, double displayTime) {//The
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
float initialTouchX, initialTouchY;
|
||||
void PortableMouseAbs(float x,float y);
|
||||
|
||||
void interactWithTouchScreen(ovrTracking *tracking, ovrInputStateTrackedRemote *newState, ovrInputStateTrackedRemote *oldState) {
|
||||
float remoteAngles[3];
|
||||
vec3_t rotation = {0};
|
||||
QuatToYawPitchRoll(tracking->HeadPose.Pose.Orientation, rotation, remoteAngles);
|
||||
float yaw = remoteAngles[YAW] - playerYaw;
|
||||
|
||||
//Adjust for maximum yaw values
|
||||
if (yaw >= 180.0f) yaw -= 180.0f;
|
||||
if (yaw <= -180.0f) yaw += 180.0f;
|
||||
|
||||
if (yaw > -40.0f && yaw < 40.0f &&
|
||||
remoteAngles[PITCH] > -22.5f && remoteAngles[PITCH] < 22.5f) {
|
||||
|
||||
int newRemoteTrigState = (newState->Buttons & ovrButton_Trigger) != 0;
|
||||
int prevRemoteTrigState = (oldState->Buttons & ovrButton_Trigger) != 0;
|
||||
|
||||
float touchX = (-yaw + 40.0f) / 80.0f;
|
||||
float touchY = (remoteAngles[PITCH] + 22.5f) / 45.0f;
|
||||
if (newRemoteTrigState != prevRemoteTrigState)
|
||||
{
|
||||
}
|
||||
|
||||
PortableMouseAbs(touchX, touchY);
|
||||
}
|
||||
}
|
|
@ -18,11 +18,11 @@ Authors : Simon Brown
|
|||
|
||||
#include "../rtcw/src/client/client.h"
|
||||
|
||||
extern cvar_t *cl_forwardspeed;
|
||||
cvar_t *sv_cheats;
|
||||
extern cvar_t *vr_weapon_stabilised;
|
||||
|
||||
|
||||
|
||||
void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew, ovrInputStateTrackedRemote *pDominantTrackedRemoteOld, ovrTracking* pDominantTracking,
|
||||
ovrInputStateTrackedRemote *pOffTrackedRemoteNew, ovrInputStateTrackedRemote *pOffTrackedRemoteOld, ovrTracking* pOffTracking,
|
||||
int domButton1, int domButton2, int offButton1, int offButton2 )
|
||||
|
@ -38,46 +38,18 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
static float dominantGripPushTime = 0.0f;
|
||||
static qboolean inventoryManagementMode = false;
|
||||
|
||||
//Show screen view (if in multiplayer toggle scoreboard)
|
||||
if (((pOffTrackedRemoteNew->Buttons & offButton2) !=
|
||||
(pOffTrackedRemoteOld->Buttons & offButton2)) &&
|
||||
(pOffTrackedRemoteNew->Buttons & offButton2)) {
|
||||
|
||||
showingScreenLayer = !showingScreenLayer;
|
||||
|
||||
//Check we are in multiplayer
|
||||
if (isMultiplayer()) {
|
||||
sendButtonActionSimple("score");
|
||||
}
|
||||
}
|
||||
|
||||
//Menu button
|
||||
handleTrackedControllerButton(&leftTrackedRemoteState_new, &leftTrackedRemoteState_old, ovrButton_Enter, K_ESCAPE);
|
||||
|
||||
/* if (cls.key_dest == key_menu)
|
||||
if ( Key_GetCatcher( ) & KEYCATCH_UI )
|
||||
{
|
||||
int leftJoyState = (pOffTrackedRemoteNew->Joystick.x > 0.7f ? 1 : 0);
|
||||
if (leftJoyState != (pOffTrackedRemoteOld->Joystick.x > 0.7f ? 1 : 0)) {
|
||||
Key_Event(K_RIGHTARROW, leftJoyState, global_time);
|
||||
}
|
||||
leftJoyState = (pOffTrackedRemoteNew->Joystick.x < -0.7f ? 1 : 0);
|
||||
if (leftJoyState != (pOffTrackedRemoteOld->Joystick.x < -0.7f ? 1 : 0)) {
|
||||
Key_Event(K_LEFTARROW, leftJoyState, global_time);
|
||||
}
|
||||
leftJoyState = (pOffTrackedRemoteNew->Joystick.y < -0.7f ? 1 : 0);
|
||||
if (leftJoyState != (pOffTrackedRemoteOld->Joystick.y < -0.7f ? 1 : 0)) {
|
||||
Key_Event(K_DOWNARROW, leftJoyState, global_time);
|
||||
}
|
||||
leftJoyState = (pOffTrackedRemoteNew->Joystick.y > 0.7f ? 1 : 0);
|
||||
if (leftJoyState != (pOffTrackedRemoteOld->Joystick.y > 0.7f ? 1 : 0)) {
|
||||
Key_Event(K_UPARROW, leftJoyState, global_time);
|
||||
}
|
||||
interactWithTouchScreen(pDominantTracking, pDominantTrackedRemoteNew, pDominantTrackedRemoteOld);
|
||||
|
||||
handleTrackedControllerButton(pDominantTrackedRemoteNew, pDominantTrackedRemoteOld, domButton1, K_ENTER);
|
||||
handleTrackedControllerButton(pDominantTrackedRemoteNew, pDominantTrackedRemoteOld, ovrButton_Trigger, K_ENTER);
|
||||
handleTrackedControllerButton(pDominantTrackedRemoteNew, pDominantTrackedRemoteOld, domButton1, K_MOUSE1);
|
||||
handleTrackedControllerButton(pDominantTrackedRemoteNew, pDominantTrackedRemoteOld, ovrButton_Trigger, K_MOUSE1);
|
||||
handleTrackedControllerButton(pDominantTrackedRemoteNew, pDominantTrackedRemoteOld, domButton2, K_ESCAPE);
|
||||
}
|
||||
else */
|
||||
else
|
||||
{
|
||||
float distance = sqrtf(powf(pOffTracking->HeadPose.Pose.Position.x - pDominantTracking->HeadPose.Pose.Position.x, 2) +
|
||||
powf(pOffTracking->HeadPose.Pose.Position.y - pDominantTracking->HeadPose.Pose.Position.y, 2) +
|
||||
|
@ -91,12 +63,12 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
{
|
||||
if (distance < 0.50f)
|
||||
{
|
||||
// Cvar_ForceSet("vr_weapon_stabilised", "1.0");
|
||||
Cvar_Set("vr_weapon_stabilised", "1.0");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Cvar_ForceSet("vr_weapon_stabilised", "0.0");
|
||||
Cvar_Set("vr_weapon_stabilised", "0.0");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -116,7 +88,9 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
|
||||
//Set gun angles - We need to calculate all those we might need (including adjustments) for the client to then take its pick
|
||||
const ovrQuatf quatRemote = pDominantTracking->HeadPose.Pose.Orientation;
|
||||
QuatToYawPitchRoll(quatRemote, vr_weapon_pitchadjust->value, weaponangles);
|
||||
vec3_t rotation = {0};
|
||||
rotation[PITCH] = vr_weapon_pitchadjust->value;
|
||||
QuatToYawPitchRoll(quatRemote, rotation, weaponangles);
|
||||
weaponangles[YAW] += (cl.viewangles[YAW] - hmdorientation[YAW]);
|
||||
weaponangles[ROLL] *= -1.0f;
|
||||
|
||||
|
@ -153,7 +127,8 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
flashlightoffset[0] = v[0];
|
||||
flashlightoffset[2] = v[1];
|
||||
|
||||
QuatToYawPitchRoll(pOffTracking->HeadPose.Pose.Orientation, 15.0f, flashlightangles);
|
||||
vec3_t rotation = {0};
|
||||
QuatToYawPitchRoll(pOffTracking->HeadPose.Pose.Orientation, rotation, flashlightangles);
|
||||
|
||||
flashlightangles[YAW] += (cl.viewangles[YAW] - hmdorientation[YAW]);
|
||||
|
||||
|
@ -175,8 +150,8 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
|
||||
//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
|
||||
float multiplier = (vr_positional_factor->value) / (cl_forwardspeed->value *
|
||||
((pOffTrackedRemoteNew->Buttons & ovrButton_Trigger) ? 1.5f : 1.0f));
|
||||
float multiplier = 1.0;//(vr_positional_factor->value) /
|
||||
//((pOffTrackedRemoteNew->Buttons & ovrButton_Trigger) ? 1.5f : 1.0f);
|
||||
|
||||
vec2_t v;
|
||||
rotateAboutOrigin(-positionDeltaThisFrame[0] * multiplier,
|
||||
|
@ -197,8 +172,7 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
static bool firingPrimary = false;
|
||||
|
||||
{
|
||||
//Fire Primary
|
||||
if ((pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger) !=
|
||||
if ((pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger) !=
|
||||
(pDominantTrackedRemoteOld->Buttons & ovrButton_Trigger)) {
|
||||
|
||||
firingPrimary = (pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger);
|
||||
|
@ -210,7 +184,7 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
}
|
||||
else
|
||||
{
|
||||
sendButtonAction("+attack", firingPrimary);
|
||||
sendButtonAction("+attack", firingPrimary ? 1 : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -192,9 +192,9 @@ SERVER_FILES = \
|
|||
src/android/android_snd.c \
|
||||
src/game/q_shared.c \
|
||||
src/game/q_math.c \
|
||||
src/android/android_main.c
|
||||
src/android/android_main.c \
|
||||
src/android/in_android.c
|
||||
# src/android/android-jni.cpp \
|
||||
# src/android/in_android.c \
|
||||
|
||||
|
||||
RTCWVR_SRC_FILES := ../RTCWVR/RTCWVR_SurfaceView.c \
|
||||
|
@ -212,8 +212,8 @@ LOCAL_LDLIBS := -lGLESv3 -landroid -lEGL -ldl -llog -lOpenSLES -lz -lm
|
|||
|
||||
LOCAL_LDLIBS += -fuse-ld=bfd
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libjpeg libpng
|
||||
LOCAL_SHARED_LIBRARIES := vrapi qagamearm gl4es cgamearm
|
||||
# LOCAL_STATIC_LIBRARIES := libjpeg libpng
|
||||
LOCAL_SHARED_LIBRARIES := vrapi gl4es
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
|
|
|
@ -569,8 +569,9 @@ void GLimp_Init( void ) {
|
|||
return;
|
||||
}
|
||||
|
||||
void RTCWVR_submitFrame();
|
||||
|
||||
int androidSwapped = 1; //If loading, then draw frame does not return, so detect this
|
||||
//int androidSwapped = 1; //If loading, then draw frame does not return, so detect this
|
||||
/*
|
||||
** GLimp_EndFrame
|
||||
**
|
||||
|
@ -582,11 +583,11 @@ void GLimp_EndFrame( void ) {
|
|||
|
||||
// check logging
|
||||
//QGL_EnableLogging( (qboolean)r_logFile->integer ); // bk001205 - was ->value
|
||||
if (!androidSwapped)
|
||||
eglSwapBuffers( eglGetCurrentDisplay(), eglGetCurrentSurface( EGL_DRAW ) );
|
||||
|
||||
androidSwapped = 0;
|
||||
// if (!androidSwapped)
|
||||
// eglSwapBuffers( eglGetCurrentDisplay(), eglGetCurrentSurface( EGL_DRAW ) );
|
||||
|
||||
//androidSwapped = 0;
|
||||
RTCWVR_submitFrame();
|
||||
}
|
||||
|
||||
#ifdef SMP
|
||||
|
|
|
@ -700,7 +700,7 @@ void *Sys_LoadDll( const char *name,
|
|||
|
||||
#ifdef __ANDROID__
|
||||
char path[500];
|
||||
char *libdir = (char*)getenv("YQUAKE2_GAMELIBDIR");
|
||||
char *libdir = (char*)getenv("RTCW_GAMELIBDIR");
|
||||
|
||||
#ifdef WOLF_SP_DEMO
|
||||
snprintf( path, sizeof( path ), "%s/lib%sarm_d.so", getLibPath(), name );
|
||||
|
@ -1111,7 +1111,7 @@ sysEvent_t Sys_GetEvent( void ) {
|
|||
}
|
||||
*/
|
||||
// check for other input devices
|
||||
//IN_Frame();
|
||||
IN_Frame();
|
||||
|
||||
// check for network packets
|
||||
MSG_Init( &netmsg, sys_packetReceived, sizeof( sys_packetReceived ) );
|
||||
|
@ -1328,8 +1328,9 @@ void Sys_ParseArgs( int argc, char* argv[] ) {
|
|||
|
||||
#include "../client/client.h"
|
||||
extern clientStatic_t cls;
|
||||
void VR_Init();
|
||||
|
||||
int main( int argc, char* argv[] ) {
|
||||
int VR_main( int argc, char* argv[] ) {
|
||||
// int oldtime, newtime; // bk001204 - unused
|
||||
int len, i;
|
||||
char *cmdline;
|
||||
|
@ -1363,9 +1364,11 @@ int main( int argc, char* argv[] ) {
|
|||
|
||||
Com_Init( cmdline );
|
||||
NET_Init();
|
||||
VR_Init();
|
||||
|
||||
Sys_ConsoleInputInit();
|
||||
|
||||
|
||||
// fcntl( 0, F_SETFL, fcntl( 0, F_GETFL, 0 ) | FNDELAY );
|
||||
|
||||
while ( 1 )
|
||||
|
|
|
@ -98,7 +98,7 @@ extern kbutton_t in_strafe, in_speed;
|
|||
extern kbutton_t in_up, in_down;
|
||||
extern kbutton_t in_buttons[16];
|
||||
*/
|
||||
|
||||
/*
|
||||
void PortableAction(int state, int action)
|
||||
{
|
||||
LOGI("PortableAction %d %d",state,action);
|
||||
|
@ -208,7 +208,7 @@ void PortableAction(int state, int action)
|
|||
if (key != -1)
|
||||
(state)?KeyDownPort(key):KeyUpPort(key);
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
int mdx=0,mdy=0;
|
||||
void PortableMouse(float dx,float dy)
|
||||
|
@ -225,10 +225,14 @@ void PortableMouse(float dx,float dy)
|
|||
}
|
||||
|
||||
int absx=0,absy=0;
|
||||
Android_GetScreenRes(int *width, int *height);
|
||||
void PortableMouseAbs(float x,float y)
|
||||
{
|
||||
absx = x;
|
||||
absy = y;
|
||||
int width;
|
||||
int height;
|
||||
Android_GetScreenRes(&width, &height);
|
||||
absx = x * width;
|
||||
absy = y * height;
|
||||
}
|
||||
|
||||
|
||||
|
@ -267,6 +271,7 @@ void PortableMove(float fwd, float strafe)
|
|||
//Look up and down
|
||||
int look_pitch_mode;
|
||||
float look_pitch_mouse,look_pitch_abs,look_pitch_joy;
|
||||
/*
|
||||
void PortableLookPitch(int mode, float pitch)
|
||||
{
|
||||
look_pitch_mode = mode;
|
||||
|
@ -283,10 +288,11 @@ void PortableLookPitch(int mode, float pitch)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
//left right
|
||||
int look_yaw_mode;
|
||||
float look_yaw_mouse,look_yaw_joy;
|
||||
/*
|
||||
void PortableLookYaw(int mode, float yaw)
|
||||
{
|
||||
look_yaw_mode = mode;
|
||||
|
@ -301,7 +307,7 @@ void PortableLookYaw(int mode, float yaw)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
|
||||
void PortableCommand(const char * cmd){
|
||||
postCommand(cmd);
|
||||
|
@ -385,6 +391,7 @@ void pumpEvents(void)
|
|||
|
||||
}
|
||||
|
||||
/*
|
||||
void CL_AndroidMove( usercmd_t *cmd )
|
||||
{
|
||||
|
||||
|
@ -420,7 +427,7 @@ void CL_AndroidMove( usercmd_t *cmd )
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
void IN_Frame( void ) {
|
||||
pumpEvents();
|
||||
|
|
|
@ -301,7 +301,7 @@ cvarTable_t cvarTable[] = {
|
|||
{ &cg_zoomStepSniper, "cg_zoomStepSniper", "2", CVAR_ARCHIVE },
|
||||
{ &cg_zoomStepSnooper, "cg_zoomStepSnooper", "5", CVAR_ARCHIVE },
|
||||
{ &cg_zoomStepFG, "cg_zoomStepFG", "10", CVAR_ARCHIVE }, //----(SA) added
|
||||
{ &cg_fov, "cg_fov", "90", CVAR_ARCHIVE | CVAR_CHEAT }, // JPW NERVE added cheat protect NOTE: there is already a dmflag (DF_FIXED_FOV) to allow server control of this cheat
|
||||
{ &cg_fov, "cg_fov", "104", CVAR_ARCHIVE | CVAR_CHEAT }, // JPW NERVE added cheat protect NOTE: there is already a dmflag (DF_FIXED_FOV) to allow server control of this cheat
|
||||
{ &cg_viewsize, "cg_viewsize", "100", CVAR_ARCHIVE },
|
||||
{ &cg_letterbox, "cg_letterbox", "0", CVAR_TEMP }, //----(SA) added
|
||||
{ &cg_stereoSeparation, "cg_stereoSeparation", "0.4", CVAR_ARCHIVE },
|
||||
|
@ -312,13 +312,13 @@ cvarTable_t cvarTable[] = {
|
|||
{ &cg_drawFrags, "cg_drawFrags", "1", CVAR_ARCHIVE },
|
||||
{ &cg_drawStatus, "cg_drawStatus", "1", CVAR_ARCHIVE },
|
||||
{ &cg_drawTimer, "cg_drawTimer", "0", CVAR_ARCHIVE },
|
||||
{ &cg_drawFPS, "cg_drawFPS", "0", CVAR_ARCHIVE },
|
||||
{ &cg_drawFPS, "cg_drawFPS", "1", CVAR_ARCHIVE },
|
||||
{ &cg_drawSnapshot, "cg_drawSnapshot", "0", CVAR_ARCHIVE },
|
||||
{ &cg_draw3dIcons, "cg_draw3dIcons", "1", CVAR_ARCHIVE },
|
||||
{ &cg_drawIcons, "cg_drawIcons", "1", CVAR_ARCHIVE },
|
||||
{ &cg_drawAmmoWarning, "cg_drawAmmoWarning", "1", CVAR_ARCHIVE },
|
||||
{ &cg_drawAttacker, "cg_drawAttacker", "1", CVAR_ARCHIVE },
|
||||
{ &cg_drawCrosshair, "cg_drawCrosshair", "4", CVAR_ARCHIVE },
|
||||
{ &cg_drawCrosshair, "cg_drawCrosshair", "0", CVAR_ARCHIVE },
|
||||
{ &cg_drawCrosshairNames, "cg_drawCrosshairNames", "1", CVAR_ARCHIVE },
|
||||
{ &cg_drawCrosshairPickups, "cg_drawCrosshairPickups", "1", CVAR_ARCHIVE },
|
||||
{ &cg_drawRewards, "cg_drawRewards", "1", CVAR_ARCHIVE },
|
||||
|
@ -343,11 +343,11 @@ cvarTable_t cvarTable[] = {
|
|||
{ &cg_gun_y, "cg_gunY", "0", CVAR_CHEAT },
|
||||
{ &cg_gun_z, "cg_gunZ", "0", CVAR_CHEAT },
|
||||
{ &cg_centertime, "cg_centertime", "3", CVAR_CHEAT },
|
||||
{ &cg_runpitch, "cg_runpitch", "0.002", CVAR_ARCHIVE},
|
||||
{ &cg_runroll, "cg_runroll", "0.005", CVAR_ARCHIVE },
|
||||
{ &cg_bobup, "cg_bobup", "0.005", CVAR_ARCHIVE },
|
||||
{ &cg_bobpitch, "cg_bobpitch", "0.002", CVAR_ARCHIVE },
|
||||
{ &cg_bobroll, "cg_bobroll", "0.002", CVAR_ARCHIVE },
|
||||
{ &cg_runpitch, "cg_runpitch", "0.0", CVAR_ARCHIVE},
|
||||
{ &cg_runroll, "cg_runroll", "0.0", CVAR_ARCHIVE },
|
||||
{ &cg_bobup, "cg_bobup", "0.0", CVAR_ARCHIVE },
|
||||
{ &cg_bobpitch, "cg_bobpitch", "0.0", CVAR_ARCHIVE },
|
||||
{ &cg_bobroll, "cg_bobroll", "0.0", CVAR_ARCHIVE },
|
||||
|
||||
// JOSEPH 10-27-99
|
||||
{ &cg_autoactivate, "cg_autoactivate", "1", CVAR_ARCHIVE },
|
||||
|
|
|
@ -803,7 +803,7 @@ Fixed fov at intermissions, otherwise account for fov variable and zooms.
|
|||
#define WAVE_FREQUENCY 0.4
|
||||
|
||||
static int CG_CalcFov( void ) {
|
||||
static float lastfov = 90; // for transitions back from zoomed in modes
|
||||
static float lastfov = 104; // for transitions back from zoomed in modes
|
||||
float x;
|
||||
float phase;
|
||||
float v;
|
||||
|
|
|
@ -437,7 +437,8 @@ CL_CgameSystemCalls
|
|||
The cgame module is making a system call
|
||||
====================
|
||||
*/
|
||||
#define VMA( x ) VM_ArgPtr( args[x] )
|
||||
//#define VMA( x ) VM_ArgPtr( args[x] )
|
||||
#define VMA( x ) ( (void *) args[x] )
|
||||
#define VMF( x ) ( (float *)args )[x]
|
||||
int CL_CgameSystemCalls( int *args ) {
|
||||
switch ( args[0] ) {
|
||||
|
|
|
@ -384,6 +384,27 @@ cvar_t *cl_anglespeedkey;
|
|||
|
||||
cvar_t *cl_recoilPitch;
|
||||
|
||||
#ifdef __ANDROID__
|
||||
|
||||
void VR_GetMove( float *forward, float *side, float *pos_forward, float *pos_side, float *up, float *yaw, float *pitch, float *roll );
|
||||
|
||||
typedef struct {
|
||||
float forward;
|
||||
float pos_forward;
|
||||
float side;
|
||||
float pos_side;
|
||||
float up;
|
||||
float yaw;
|
||||
float pitch;
|
||||
float roll;
|
||||
} vr_move;
|
||||
|
||||
vr_move new_move;
|
||||
vr_move old_move;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
================
|
||||
CL_AdjustAngles
|
||||
|
@ -392,7 +413,7 @@ Moves the local angle positions
|
|||
================
|
||||
*/
|
||||
void CL_AdjustAngles( void ) {
|
||||
float speed;
|
||||
/* float speed;
|
||||
|
||||
if ( kb[KB_SPEED].active ) {
|
||||
speed = 0.001 * cls.frametime * cl_anglespeedkey->value;
|
||||
|
@ -407,6 +428,22 @@ void CL_AdjustAngles( void ) {
|
|||
|
||||
cl.viewangles[PITCH] -= speed * cl_pitchspeed->value * CL_KeyState( &kb[KB_LOOKUP] );
|
||||
cl.viewangles[PITCH] += speed * cl_pitchspeed->value * CL_KeyState( &kb[KB_LOOKDOWN] );
|
||||
*/
|
||||
|
||||
|
||||
|
||||
cl.viewangles[YAW] -= old_move.yaw;
|
||||
cl.viewangles[YAW] += new_move.yaw;
|
||||
|
||||
//Make angles good
|
||||
while (cl.viewangles[YAW] > 180.0f)
|
||||
cl.viewangles[YAW] -= 360.0f;
|
||||
while (cl.viewangles[YAW] < -180.0f)
|
||||
cl.viewangles[YAW] += 360.0f;
|
||||
|
||||
cl.viewangles[PITCH] = new_move.pitch;
|
||||
|
||||
cl.viewangles[ROLL] = new_move.roll;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -532,7 +569,7 @@ void CL_JoystickMove( usercmd_t *cmd ) {
|
|||
} else {
|
||||
anglespeed = 0.001 * cls.frametime;
|
||||
}
|
||||
|
||||
/*
|
||||
#ifdef __MACOS__
|
||||
cmd->rightmove = ClampChar( cmd->rightmove + cl.joystickAxis[AXIS_SIDE] );
|
||||
#else
|
||||
|
@ -553,6 +590,10 @@ void CL_JoystickMove( usercmd_t *cmd ) {
|
|||
}
|
||||
|
||||
cmd->upmove = ClampChar( cmd->upmove + cl.joystickAxis[AXIS_UP] );
|
||||
*/
|
||||
|
||||
cmd->forwardmove = ClampChar( cmd->forwardmove + (new_move.forward * 127) + (new_move.pos_forward * 127));
|
||||
cmd->rightmove = ClampChar( cmd->rightmove + (new_move.side * 127) + (new_move.pos_side * 127));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -760,9 +801,6 @@ void CL_FinishMove( usercmd_t *cmd ) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef __ANDROID__
|
||||
void CL_AndroidMove( usercmd_t *cmd );
|
||||
#endif
|
||||
/*
|
||||
=================
|
||||
CL_CreateCmd
|
||||
|
@ -775,6 +813,12 @@ usercmd_t CL_CreateCmd( void ) {
|
|||
|
||||
VectorCopy( cl.viewangles, oldAngles );
|
||||
|
||||
#ifdef __ANDROID__
|
||||
|
||||
VR_GetMove(&new_move.forward, &new_move.side, &new_move.pos_forward, &new_move.pos_side, &new_move.up, &new_move.yaw, &new_move.pitch, &new_move.roll);
|
||||
|
||||
#endif
|
||||
|
||||
// keyboard angle adjustment
|
||||
CL_AdjustAngles();
|
||||
|
||||
|
@ -791,12 +835,6 @@ usercmd_t CL_CreateCmd( void ) {
|
|||
// get basic movement from joystick
|
||||
CL_JoystickMove( &cmd );
|
||||
|
||||
#ifdef __ANDROID__
|
||||
|
||||
//NEED TO DO OUR OWN THING HERE
|
||||
|
||||
// CL_AndroidMove ( &cmd );
|
||||
#endif
|
||||
|
||||
// check to make sure the angles haven't wrapped
|
||||
if ( cl.viewangles[PITCH] - oldAngles[PITCH] > 90 ) {
|
||||
|
@ -828,6 +866,9 @@ usercmd_t CL_CreateCmd( void ) {
|
|||
|
||||
cmd.cld = cl.cgameCld; // NERVE - SMF
|
||||
|
||||
//retain the move from this
|
||||
old_move = new_move;
|
||||
|
||||
return cmd;
|
||||
}
|
||||
|
||||
|
|
|
@ -532,6 +532,15 @@ This is called every frame, and can also be called explicitly to flush
|
|||
text to the screen.
|
||||
==================
|
||||
*/
|
||||
|
||||
void RTCWVR_FrameSetup();
|
||||
void RTCWVR_finishEyeBuffer(int eye );
|
||||
void RTCWVR_setUseScreenLayer(qboolean use);
|
||||
void RTCWVR_processHaptics();
|
||||
void RTCWVR_getHMDOrientation();
|
||||
qboolean RTCWVR_processMessageQueue();
|
||||
void RTCWVR_getTrackedRemotesOrientation();
|
||||
|
||||
void SCR_UpdateScreen( void ) {
|
||||
static int recursive;
|
||||
|
||||
|
@ -543,6 +552,32 @@ void SCR_UpdateScreen( void ) {
|
|||
Com_Error( ERR_FATAL, "SCR_UpdateScreen: recursively called" );
|
||||
}
|
||||
recursive = 1;
|
||||
|
||||
RTCWVR_FrameSetup();
|
||||
|
||||
RTCWVR_processMessageQueue();
|
||||
|
||||
/* if (gamestate == GS_LEVEL && !getMenuState()) {
|
||||
RTCWVR_setUseScreenLayer(false);
|
||||
}
|
||||
else {
|
||||
//Ensure we are drawing on virtual screen
|
||||
RTCWVR_setUseScreenLayer(true);
|
||||
}*/
|
||||
|
||||
//Get controller state here
|
||||
RTCWVR_getHMDOrientation();
|
||||
RTCWVR_getTrackedRemotesOrientation();
|
||||
|
||||
RTCWVR_processHaptics();
|
||||
|
||||
//Draw twice for Quest
|
||||
SCR_DrawScreenField( STEREO_LEFT );
|
||||
RTCWVR_finishEyeBuffer(0);
|
||||
SCR_DrawScreenField( STEREO_RIGHT );
|
||||
RTCWVR_finishEyeBuffer(1);
|
||||
|
||||
/*
|
||||
#ifndef HAVE_GLES
|
||||
// if running in stereo, we need to draw the frame twice
|
||||
if ( cls.glconfig.stereoEnabled ) {
|
||||
|
@ -552,7 +587,7 @@ void SCR_UpdateScreen( void ) {
|
|||
#endif
|
||||
{
|
||||
SCR_DrawScreenField( STEREO_CENTER );
|
||||
}
|
||||
}*/
|
||||
|
||||
if ( com_speeds->integer ) {
|
||||
re.EndFrame( &time_frontend, &time_backend );
|
||||
|
|
|
@ -780,7 +780,8 @@ static int FloatAsInt( float f ) {
|
|||
}
|
||||
|
||||
void *VM_ArgPtr( int intValue );
|
||||
#define VMA( x ) VM_ArgPtr( args[x] )
|
||||
//#define VMA( x ) VM_ArgPtr( args[x] )
|
||||
#define VMA( x ) ( (void *) args[x] )
|
||||
#define VMF( x ) ( (float *)args )[x]
|
||||
|
||||
|
||||
|
|
|
@ -2890,7 +2890,7 @@ FS_Startup
|
|||
*/
|
||||
static void FS_Startup( const char *gameName ) {
|
||||
const char *homePath;
|
||||
cvar_t *fs;
|
||||
cvar_t *fs = NULL;
|
||||
|
||||
Com_Printf( "----- FS_Startup -----\n" );
|
||||
|
||||
|
@ -2948,9 +2948,9 @@ static void FS_Startup( const char *gameName ) {
|
|||
|
||||
Com_ReadCDKey( BASEGAME );
|
||||
fs = Cvar_Get( "fs_game", "", CVAR_INIT | CVAR_SYSTEMINFO );
|
||||
if ( fs && fs->string[0] != 0 ) {
|
||||
Com_AppendCDKey( fs->string );
|
||||
}
|
||||
// if ( fs && fs->string && fs->string[0] != 0 ) {
|
||||
// Com_AppendCDKey( fs->string );
|
||||
// }
|
||||
|
||||
// add our commands
|
||||
Cmd_AddCommand( "path", FS_Path_f );
|
||||
|
|
|
@ -332,7 +332,7 @@ Dlls will call this directly
|
|||
============
|
||||
*/
|
||||
int QDECL VM_DllSyscall( int arg, ... ) {
|
||||
#if ( ( defined __linux__ ) && ( defined __powerpc__ ) )
|
||||
//#if ( ( defined __linux__ ) && ( defined __powerpc__ ) )
|
||||
// rcg010206 - see commentary above
|
||||
int args[16];
|
||||
int i;
|
||||
|
@ -346,9 +346,9 @@ int QDECL VM_DllSyscall( int arg, ... ) {
|
|||
va_end( ap );
|
||||
|
||||
return currentVM->systemCall( args );
|
||||
#else // original id code
|
||||
return currentVM->systemCall( &arg );
|
||||
#endif
|
||||
//#else // original id code
|
||||
// return currentVM->systemCall( &arg );
|
||||
//#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -707,7 +707,10 @@ int QDECL VM_Call( vm_t *vm, int callnum, ... ) {
|
|||
// if we have a dll loaded, call it directly
|
||||
if ( vm->entryPoint ) {
|
||||
//rcg010207 - see dissertation at top of VM_DllSyscall() in this file.
|
||||
#if ( ( defined __linux__ ) && ( defined __powerpc__ ) )
|
||||
//#if ( ( defined __linux__ ) && ( defined __powerpc__ ) )
|
||||
int args[16];
|
||||
int i;
|
||||
va_list ap;
|
||||
va_start( ap, callnum );
|
||||
for ( i = 0; i < sizeof( args ) / sizeof( args[i] ); i++ )
|
||||
args[i] = va_arg( ap, int );
|
||||
|
@ -717,11 +720,11 @@ int QDECL VM_Call( vm_t *vm, int callnum, ... ) {
|
|||
args[4], args[5], args[6], args[7],
|
||||
args[8], args[9], args[10], args[11],
|
||||
args[12], args[13], args[14], args[15] );
|
||||
#else // PPC above, original id code below
|
||||
r = vm->entryPoint( ( &callnum )[0], ( &callnum )[1], ( &callnum )[2], ( &callnum )[3],
|
||||
( &callnum )[4], ( &callnum )[5], ( &callnum )[6], ( &callnum )[7],
|
||||
( &callnum )[8], ( &callnum )[9], ( &callnum )[10], ( &callnum )[11], ( &callnum )[12] );
|
||||
#endif
|
||||
//#else // PPC above, original id code below
|
||||
// r = vm->entryPoint( ( &callnum )[0], ( &callnum )[1], ( &callnum )[2], ( &callnum )[3],
|
||||
// ( &callnum )[4], ( &callnum )[5], ( &callnum )[6], ( &callnum )[7],
|
||||
// ( &callnum )[8], ( &callnum )[9], ( &callnum )[10], ( &callnum )[11], ( &callnum )[12] );
|
||||
//#endif
|
||||
} else if ( vm->compiled ) {
|
||||
r = VM_CallCompiled( vm, &callnum );
|
||||
} else {
|
||||
|
|
|
@ -1468,6 +1468,7 @@ const void *RB_DrawSurfs( const void *data ) {
|
|||
return (const void *)( cmd + 1 );
|
||||
}
|
||||
|
||||
void RTCWVR_prepareEyeBuffer(int eye );
|
||||
|
||||
/*
|
||||
=============
|
||||
|
@ -1479,14 +1480,16 @@ const void *RB_DrawBuffer( const void *data ) {
|
|||
const drawBufferCommand_t *cmd;
|
||||
|
||||
cmd = (const drawBufferCommand_t *)data;
|
||||
|
||||
/*
|
||||
#ifndef HAVE_GLES
|
||||
qglDrawBuffer( cmd->buffer );
|
||||
#endif
|
||||
*/
|
||||
RTCWVR_prepareEyeBuffer(cmd->buffer);
|
||||
|
||||
// clear screen for debugging
|
||||
if ( r_clear->integer ) {
|
||||
qglClearColor( 1, 0, 0.5, 1 );
|
||||
qglClearColor( 0, 0, 0, 1 );
|
||||
qglClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
||||
}
|
||||
|
||||
|
|
|
@ -499,6 +499,18 @@ void RE_BeginFrame( stereoFrame_t stereoFrame ) {
|
|||
return;
|
||||
}
|
||||
cmd->commandId = RC_DRAW_BUFFER;
|
||||
|
||||
{
|
||||
if ( stereoFrame == STEREO_LEFT ) {
|
||||
cmd->buffer = (int)0;
|
||||
} else if ( stereoFrame == STEREO_RIGHT ) {
|
||||
cmd->buffer = (int)1;
|
||||
} else {
|
||||
ri.Error( ERR_FATAL, "RE_BeginFrame: Stereo is enabled, but stereoFrame was %i", stereoFrame );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
#ifndef HAVE_GLES
|
||||
if ( glConfig.stereoEnabled ) {
|
||||
if ( stereoFrame == STEREO_LEFT ) {
|
||||
|
@ -521,6 +533,7 @@ void RE_BeginFrame( stereoFrame_t stereoFrame ) {
|
|||
}
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -311,11 +311,11 @@ The module is making a system call
|
|||
====================
|
||||
*/
|
||||
//rcg010207 - see my comments in VM_DllSyscall(), in qcommon/vm.c ...
|
||||
#if ( ( defined __linux__ ) && ( defined __powerpc__ ) )
|
||||
//#if ( ( defined __linux__ ) && ( defined __powerpc__ ) )
|
||||
#define VMA( x ) ( (void *) args[x] )
|
||||
#else
|
||||
#define VMA( x ) VM_ArgPtr( args[x] )
|
||||
#endif
|
||||
//#else
|
||||
//#define VMA( x ) VM_ArgPtr( args[x] )
|
||||
//#endif
|
||||
|
||||
#define VMF( x ) ( (float *)args )[x]
|
||||
|
||||
|
|
|
@ -728,7 +728,7 @@ public:
|
|||
idCameraFOV() {
|
||||
time = 0;
|
||||
length = 0;
|
||||
fov = 90;
|
||||
fov = 104;
|
||||
}
|
||||
|
||||
idCameraFOV( int v ) {
|
||||
|
@ -882,7 +882,7 @@ void clear() {
|
|||
baseTime = 30;
|
||||
activeTarget = 0;
|
||||
name = "camera01";
|
||||
fov.setFOV( 90 );
|
||||
fov.setFOV( 104 );
|
||||
int i;
|
||||
for ( i = 0; i < targetPositions.Num(); i++ ) {
|
||||
delete targetPositions[i];
|
||||
|
|
|
@ -71,6 +71,10 @@ import static android.system.Os.setenv;
|
|||
mAudioRecord = null;
|
||||
}
|
||||
|
||||
public void shutdown() {
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
@Override protected void onCreate( Bundle icicle )
|
||||
{
|
||||
Log.v( TAG, "----------------------------------------------------------------" );
|
||||
|
@ -249,7 +253,7 @@ import static android.system.Os.setenv;
|
|||
Log.v( TAG, "GLES3JNIActivity::onStart()" );
|
||||
super.onStart();
|
||||
|
||||
GLES3JNILib.onStart( mNativeHandle );
|
||||
GLES3JNILib.onStart( mNativeHandle, this );
|
||||
}
|
||||
|
||||
@Override protected void onResume()
|
||||
|
|
|
@ -12,7 +12,7 @@ public class GLES3JNILib
|
|||
{
|
||||
// Activity lifecycle
|
||||
public static native long onCreate( Activity obj, String commandLineParams );
|
||||
public static native void onStart( long handle );
|
||||
public static native void onStart( long handle, Object obj );
|
||||
public static native void onResume( long handle );
|
||||
public static native void onPause( long handle );
|
||||
public static native void onStop( long handle );
|
||||
|
|
Loading…
Reference in a new issue