]> git.mxchange.org Git - flightgear.git/commitdiff
don't be afraid of the comma operator!
authormfranz <mfranz>
Sat, 22 Jul 2006 11:48:22 +0000 (11:48 +0000)
committermfranz <mfranz>
Sat, 22 Jul 2006 11:48:22 +0000 (11:48 +0000)
src/Instrumentation/HUD/HUD.cxx
src/Instrumentation/HUD/HUD_runway.cxx

index aeed80e1191e0ac4d8341443e1b6ca11484e9c98..743e074887f9940f78c686413d68f47dd968eac5 100644 (file)
@@ -205,10 +205,10 @@ void HUD::draw3D()
     float dx = 0.52056705; // tan(55/2)
     float dy = dx * 0.75;  // assumes 4:3 aspect ratio
     float m[16];
-    m[0] = dx; m[4] =  0; m[ 8] = 0; m[12] = 0;
-    m[1] =  0; m[5] = dy; m[ 9] = 0; m[13] = 0;
-    m[2] =  0; m[6] =  0; m[10] = 1; m[14] = 0;
-    m[3] =  0; m[7] =  0; m[11] = 0; m[15] = 1;
+    m[0] = dx, m[4] =  0, m[ 8] = 0, m[12] = 0;
+    m[1] =  0, m[5] = dy, m[ 9] = 0, m[13] = 0;
+    m[2] =  0, m[6] =  0, m[10] = 1, m[14] = 0;
+    m[3] =  0, m[7] =  0, m[11] = 0, m[15] = 1;
     glMultMatrixf(m);
 
     // Convert the 640x480 "HUD standard" coordinate space to a square
index 0f12f2952a7f38c1f87b4b7f26d41c1fb81d24e5..f4b645d01a33bdcdee2d933b29040fd511d32ee6 100644 (file)
@@ -107,10 +107,10 @@ void HUD::Runway::draw()
     ssgGetModelviewMatrix(modelView);
     //Create a rotation matrix to correct for any offsets (other than default offsets) to the model view matrix
     sgMat4 xy; //rotation about the Rxy, negate the sin's on Ry
-    xy[0][0] = cYaw;         xy[1][0] = 0.0f;   xy[2][0] = -sYaw;        xy[3][0] = 0.0f;
-    xy[0][1] = sPitch*-sYaw; xy[1][1] = cPitch; xy[2][1] = -sPitch*cYaw; xy[3][1] = 0.0f;
-    xy[0][2] = cPitch*sYaw;  xy[1][2] = sPitch; xy[2][2] = cPitch*cYaw;  xy[3][2] = 0.0f;
-    xy[0][3] = 0.0f;         xy[1][3] = 0.0f;   xy[2][3] = 0.0f;         xy[3][3] = 1.0f;
+    xy[0][0] = cYaw,         xy[1][0] = 0.0f,   xy[2][0] = -sYaw,        xy[3][0] = 0.0f;
+    xy[0][1] = sPitch*-sYaw, xy[1][1] = cPitch, xy[2][1] = -sPitch*cYaw, xy[3][1] = 0.0f;
+    xy[0][2] = cPitch*sYaw,  xy[1][2] = sPitch, xy[2][2] = cPitch*cYaw,  xy[3][2] = 0.0f;
+    xy[0][3] = 0.0f,         xy[1][3] = 0.0f,   xy[2][3] = 0.0f,         xy[3][3] = 1.0f;
     //Re-center the model view
     sgPostMultMat4(modelView,xy);
     //copy float matrices to double