From 48f65ac54d384e22e3b7f447b0dee57ef77635bc Mon Sep 17 00:00:00 2001 From: rkrolib Date: Tue, 11 Nov 2003 11:18:16 +0000 Subject: [PATCH] Style normalizations: Removed CRs and hard TABs mostly. git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@337 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/progs/demos/One/one.c | 50 +++++++++++++------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/freeglut/freeglut/progs/demos/One/one.c b/freeglut/freeglut/progs/demos/One/one.c index 696a6e0..20349df 100644 --- a/freeglut/freeglut/progs/demos/One/one.c +++ b/freeglut/freeglut/progs/demos/One/one.c @@ -44,8 +44,8 @@ void PrintText( int nX, int nY, char* pszText ) * Have an orthogonal projection matrix set */ glOrtho( 0, glutGet( GLUT_WINDOW_WIDTH ), - 0, glutGet( GLUT_WINDOW_HEIGHT ), - -1, +1 + 0, glutGet( GLUT_WINDOW_HEIGHT ), + -1, +1 ); /* @@ -63,13 +63,13 @@ void PrintText( int nX, int nY, char* pszText ) for( p=pszText, lines=0; *p; p++ ) { - if( *p == '\n' ) - { - lines++; - glRasterPos2i( nX, nY-(lines*18) ); - } - - glutBitmapCharacter( GLUT_BITMAP_HELVETICA_18, *p ); + if( *p == '\n' ) + { + lines++; + glRasterPos2i( nX, nY-(lines*18) ); + } + + glutBitmapCharacter( GLUT_BITMAP_HELVETICA_18, *p ); } /* @@ -115,8 +115,8 @@ void SampleDisplay( void ) * And then drawn... */ glColor3f( 1, 1, 0 ); - //glutWireCube( 20.0 ); - glutWireTeapot( 20.0 ); + //glutWireCube( 20.0 ); + glutWireTeapot( 20.0 ); //glutWireSpher( 15.0, 15, 15 ); //glColor3f( 0, 1, 0 ); //glutWireCube( 30.0 ); @@ -125,20 +125,20 @@ void SampleDisplay( void ) /* * Don't forget about the model-view matrix */ - glPopMatrix(); + glPopMatrix( ); /* * Draw a silly text */ if( g_InGameMode == 0 ) - PrintText( 20, 20, "Hello there cruel world!" ); + PrintText( 20, 20, "Hello there cruel world!" ); else - PrintText( 20, 20, "Press ESC to leave the game mode!" ); + PrintText( 20, 20, "Press ESC to leave the game mode!" ); /* * And swap this context's buffers */ - glutSwapBuffers(); + glutSwapBuffers( ); } /* @@ -150,9 +150,9 @@ void SampleIdle( void ) if( g_LeaveGameMode == 1 ) { - glutLeaveGameMode(); + glutLeaveGameMode( ); g_LeaveGameMode = 0; - g_InGameMode = 0; + g_InGameMode = 0; } } @@ -181,7 +181,7 @@ void SampleReshape( int nWidth, int nHeight ) * Move back the camera a bit */ glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); + glLoadIdentity( ); glTranslatef( 0.0, 0.0, -40.0f ); /* @@ -209,7 +209,8 @@ void SampleReshape( int nWidth, int nHeight ) */ void SampleKeyboard( unsigned char cChar, int nMouseX, int nMouseY ) { - printf( "SampleKeyboard(): keypress '%c' at (%i,%i)\n", cChar, nMouseX, nMouseY ); + printf( "SampleKeyboard(): keypress '%c' at (%i,%i)\n", + cChar, nMouseX, nMouseY ); } /* @@ -218,7 +219,7 @@ void SampleKeyboard( unsigned char cChar, int nMouseX, int nMouseY ) void SampleGameModeKeyboard( unsigned char cChar, int nMouseX, int nMouseY ) { if( cChar == 27 ) - g_LeaveGameMode = 1; + g_LeaveGameMode = 1; } @@ -227,7 +228,8 @@ void SampleGameModeKeyboard( unsigned char cChar, int nMouseX, int nMouseY ) */ void SampleSpecial( int nSpecial, int nMouseX, int nMouseY ) { - printf( "SampleSpecial(): special keypress %i at (%i,%i)\n", nSpecial, nMouseX, nMouseY ); + printf( "SampleSpecial(): special keypress %i at (%i,%i)\n", + nSpecial, nMouseX, nMouseY ); } /* @@ -307,8 +309,8 @@ int main( int argc, char** argv ) glutAttachMenu( GLUT_LEFT_BUTTON ); printf( "current window is %ix%i+%i+%i", - glutGet( GLUT_WINDOW_X ), glutGet( GLUT_WINDOW_Y ), - glutGet( GLUT_WINDOW_WIDTH ), glutGet( GLUT_WINDOW_HEIGHT ) + glutGet( GLUT_WINDOW_X ), glutGet( GLUT_WINDOW_Y ), + glutGet( GLUT_WINDOW_WIDTH ), glutGet( GLUT_WINDOW_HEIGHT ) ); /* @@ -321,7 +323,7 @@ int main( int argc, char** argv ) /* * This is never reached in FreeGLUT. Is that good? */ - return( EXIT_SUCCESS ); + return EXIT_SUCCESS; } /*** END OF FILE ***/