From f620af29cdc18ab7924055092e8f75cbe37aae2c Mon Sep 17 00:00:00 2001 From: mfranz Date: Sat, 22 Jul 2006 11:48:22 +0000 Subject: [PATCH] don't be afraid of the comma operator! --- src/Instrumentation/HUD/HUD.cxx | 8 ++++---- src/Instrumentation/HUD/HUD_runway.cxx | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Instrumentation/HUD/HUD.cxx b/src/Instrumentation/HUD/HUD.cxx index aeed80e11..743e07488 100644 --- a/src/Instrumentation/HUD/HUD.cxx +++ b/src/Instrumentation/HUD/HUD.cxx @@ -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 diff --git a/src/Instrumentation/HUD/HUD_runway.cxx b/src/Instrumentation/HUD/HUD_runway.cxx index 0f12f2952..f4b645d01 100644 --- a/src/Instrumentation/HUD/HUD_runway.cxx +++ b/src/Instrumentation/HUD/HUD_runway.cxx @@ -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