Skip to content

Commit a3b76c5

Browse files
committed
eliminated or renamed last of the glvr variables
1 parent 3f844ab commit a3b76c5

File tree

8 files changed

+29
-78
lines changed

8 files changed

+29
-78
lines changed

Quake-iOS/GameViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ class GameViewController: GLKViewController, GLKViewControllerDelegate
194194
return
195195
}
196196

197-
glvr_eyetranslation = (1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0)
198-
glvr_projection = (0.839099705, 0.0, 0.0, 0.0, 0.0, 1.49173284, 0.0, 0.0, 0.0, 0.0, -1.00195503, -1.0, 0.0, 0.0, -8.00782013, 0.0)
197+
gl_translation = (1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0)
198+
gl_projection = (0.839099705, 0.0, 0.0, 0.0, 0.0, 1.49173284, 0.0, 0.0, 0.0, 0.0, -1.00195503, -1.0, 0.0, 0.0, -8.00782013, 0.0)
199199

200200
frame_lapse = Float(controller.timeSinceLastUpdate)
201201

Quake-iOS/gl_vidios.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,8 @@ GLfloat gl_projection_matrix[16];
143143

144144
qboolean tiltaim_enabled;
145145

146-
qboolean glvr_enabled;
147-
148-
GLfloat glvr_eyetranslation[16];
149-
GLfloat glvr_projection[16];
146+
GLfloat gl_translation[16];
147+
GLfloat gl_projection[16];
150148

151149
unsigned short d_8to16table[256];
152150
unsigned* d_8to24table;
@@ -436,8 +434,6 @@ void GL_Init (void)
436434

437435
GL_Use (0);
438436

439-
glvr_enabled = true;
440-
441437
glClearColor (1,0,0,0);
442438
glEnable(GL_DEPTH_TEST);
443439
// glEnable(GL_SCISSOR_TEST);
Binary file not shown.

Quake.xcodeproj/xcuserdata/tomkidd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,11 @@
250250
ignoreCount = "0"
251251
continueAfterRunningActions = "No"
252252
filePath = "Quake/menu.c"
253-
timestampString = "552704958.513726"
253+
timestampString = "553494955.131204"
254254
startingColumnNumber = "9223372036854775807"
255255
endingColumnNumber = "9223372036854775807"
256-
startingLineNumber = "1124"
257-
endingLineNumber = "1124"
256+
startingLineNumber = "1116"
257+
endingLineNumber = "1116"
258258
landmarkName = "M_AdjustSliders"
259259
landmarkType = "9">
260260
</BreakpointContent>
@@ -266,7 +266,7 @@
266266
ignoreCount = "0"
267267
continueAfterRunningActions = "No"
268268
filePath = "Quake-iOS/GameControllerSetup.swift"
269-
timestampString = "553494562.996824"
269+
timestampString = "553494955.131265"
270270
startingColumnNumber = "9223372036854775807"
271271
endingColumnNumber = "9223372036854775807"
272272
startingLineNumber = "29"
@@ -282,7 +282,7 @@
282282
ignoreCount = "0"
283283
continueAfterRunningActions = "No"
284284
filePath = "Quake/keys.c"
285-
timestampString = "553494562.996895"
285+
timestampString = "553494955.131322"
286286
startingColumnNumber = "9223372036854775807"
287287
endingColumnNumber = "9223372036854775807"
288288
startingLineNumber = "637"
@@ -330,7 +330,7 @@
330330
ignoreCount = "0"
331331
continueAfterRunningActions = "No"
332332
filePath = "Quake-iOS/sys_ios.c"
333-
timestampString = "553494562.996994"
333+
timestampString = "553494955.131415"
334334
startingColumnNumber = "9223372036854775807"
335335
endingColumnNumber = "9223372036854775807"
336336
startingLineNumber = "302"
@@ -346,7 +346,7 @@
346346
ignoreCount = "0"
347347
continueAfterRunningActions = "No"
348348
filePath = "Quake-iOS/GameControllerSetup.swift"
349-
timestampString = "553494562.997043"
349+
timestampString = "553494955.131461"
350350
startingColumnNumber = "9223372036854775807"
351351
endingColumnNumber = "9223372036854775807"
352352
startingLineNumber = "62"
@@ -362,7 +362,7 @@
362362
ignoreCount = "0"
363363
continueAfterRunningActions = "No"
364364
filePath = "Quake-iOS/GameViewController.swift"
365-
timestampString = "553494562.9970959"
365+
timestampString = "553494955.131514"
366366
startingColumnNumber = "9223372036854775807"
367367
endingColumnNumber = "9223372036854775807"
368368
startingLineNumber = "423"
@@ -378,7 +378,7 @@
378378
ignoreCount = "0"
379379
continueAfterRunningActions = "No"
380380
filePath = "Quake-iOS/GameControllerSetup.swift"
381-
timestampString = "553494562.9971499"
381+
timestampString = "553494955.131568"
382382
startingColumnNumber = "9223372036854775807"
383383
endingColumnNumber = "9223372036854775807"
384384
startingLineNumber = "86"

Quake/gl_draw.c

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,10 +1394,7 @@ Draw_FadeScreen
13941394
*/
13951395
void Draw_FadeScreen (void)
13961396
{
1397-
if (glvr_enabled)
1398-
{
1399-
return;
1400-
}
1397+
// note: glvr_enabled exited this function immediately. Don't know why. -tkidd
14011398

14021399
glEnable(GL_BLEND);
14031400

@@ -1476,23 +1473,14 @@ Setup as if the screen was 320*200
14761473
*/
14771474
void GL_Set2D (void)
14781475
{
1479-
if (glvr_enabled)
1480-
{
1481-
GL_Identity (gl_textandfill_matrix);
1482-
1483-
GL_Translate (gl_textandfill_matrix, -2.0, 1.2, 0.0);
1484-
GL_Scale (gl_textandfill_matrix, 4.0 / vid.width, -4.0 / vid.height, 1.0);
1485-
1486-
GL_MultiplyLeft (gl_textandfill_matrix, glvr_eyetranslation);
1487-
1488-
GL_MultiplyRight (glvr_projection, gl_textandfill_matrix);
1489-
}
1490-
else
1491-
{
1492-
glViewport (glx, gly, glwidth, glheight);
1493-
1494-
GL_Ortho(gl_textandfill_matrix, 0.0, vid.width, vid.height, 0.0, -99999.0, 99999.0);
1495-
}
1476+
GL_Identity (gl_textandfill_matrix);
1477+
1478+
GL_Translate (gl_textandfill_matrix, -2.0, 1.2, 0.0);
1479+
GL_Scale (gl_textandfill_matrix, 4.0 / vid.width, -4.0 / vid.height, 1.0);
1480+
1481+
GL_MultiplyLeft (gl_textandfill_matrix, gl_translation);
1482+
1483+
GL_MultiplyRight (gl_projection, gl_textandfill_matrix);
14961484

14971485
glDisable (GL_DEPTH_TEST);
14981486
glDisable (GL_CULL_FACE);

Quake/gl_rmain.c

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,7 @@ void R_ApplyWorld (void)
128128

129129
GL_MultiplyLeft (gl_polygon_matrix, r_world_translate_matrix);
130130

131-
if (glvr_enabled)
132-
{
133-
GL_MultiplyLeft (gl_polygon_matrix, glvr_eyetranslation);
134-
}
131+
GL_MultiplyLeft (gl_polygon_matrix, gl_translation);
135132
}
136133

137134
void R_RotateForEntity (entity_t *e)
@@ -147,15 +144,7 @@ void R_RotateForEntity (entity_t *e)
147144

148145
void R_ApplyProjection (void)
149146
{
150-
// *** THIS ONE BREAKS SHIT
151-
if (glvr_enabled)
152-
{
153-
GL_MultiplyRight (glvr_projection, gl_polygon_matrix);
154-
}
155-
else
156-
{
157-
GL_MultiplyRight (gl_projection_matrix, gl_polygon_matrix);
158-
}
147+
GL_MultiplyRight (gl_projection, gl_polygon_matrix);
159148
}
160149

161150
/*
@@ -1001,14 +990,7 @@ void R_PolyBlend (void)
1001990
GL_Rotate (transform, -90.0, 1.0, 0.0, 0.0); // put Z going up
1002991
GL_Rotate (transform, 90.0, 0.0, 0.0, 1.0); // put Z going up
1003992

1004-
if (glvr_enabled)
1005-
{
1006-
GL_MultiplyRight (glvr_projection, transform);
1007-
}
1008-
else
1009-
{
1010-
GL_MultiplyRight (gl_projection_matrix, transform);
1011-
}
993+
GL_MultiplyRight (gl_projection, transform);
1012994

1013995
glUniformMatrix4fv(gl_polygonnotextureprogram_transform, 1, 0, transform);
1014996

@@ -1221,11 +1203,6 @@ void R_SetupGL (void)
12211203
w = h = 256;
12221204
}
12231205

1224-
if (!glvr_enabled)
1225-
{
1226-
glViewport (glx + x, gly + y2, w, h);
1227-
}
1228-
12291206
screenaspect = (float)r_refdef.vrect.width/r_refdef.vrect.height;
12301207
// yfov = 2*atan((float)r_refdef.vrect.height/r_refdef.vrect.width)*180/M_PI;
12311208
MYgluPerspective (r_refdef.fov_y, screenaspect, 4, 4096);

Quake/glquake.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,8 @@ extern GLfloat gl_projection_matrix[16];
370370

371371
extern qboolean tiltaim_enabled;
372372

373-
extern qboolean glvr_enabled;
374-
375-
extern GLfloat glvr_eyetranslation[16];
376-
extern GLfloat glvr_projection[16];
373+
extern GLfloat gl_translation[16];
374+
extern GLfloat gl_projection[16];
377375

378376
void GL_Use (GLuint program);
379377

Quake/menu.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -360,16 +360,8 @@ void M_Main_Key (int key)
360360
Host_Quit_f();
361361
#else
362362
#ifdef GLQUAKE
363-
// In VR mode, just plainly exit the game.
364-
if (glvr_enabled)
365-
{
366-
key_dest = key_console;
367-
Host_Quit_f();
368-
}
369-
else
370-
{
371-
M_Menu_Quit_f ();
372-
}
363+
key_dest = key_console;
364+
Host_Quit_f();
373365
#else
374366
M_Menu_Quit_f ();
375367
#endif

0 commit comments

Comments
 (0)