From: Côme BERNIGAUD Date: Sat, 5 Jun 2010 20:51:18 +0000 (+0400) Subject: Adjust source code formatting X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=0941fb2cb76a06a316d8a488c1504f84b66e4b4f;p=lugaru.git Adjust source code formatting --- Source/GameDraw.cpp | 4 ++-- Source/GameTick.cpp | 24 ++++++++++-------------- Source/Globals.cpp | 2 +- Source/OpenGL_Windows.cpp | 6 +++--- 4 files changed, 16 insertions(+), 20 deletions(-) --- diff --git a/Source/GameDraw.cpp b/Source/GameDraw.cpp index 58142f3..349492e 100644 --- a/Source/GameDraw.cpp +++ b/Source/GameDraw.cpp @@ -3575,7 +3575,8 @@ int Game::DrawGLScene(StereoSide side) //if(1-((float)i)/10-(1-selectedlong[j])>0){ glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix glPushMatrix(); - if(mainmenu!=7||j!=0||!entername)text.glPrint(startx[j],starty[j],menustring[j],0,1,640,480); + if(mainmenu!=7||j!=0||!entername) + text.glPrint(startx[j],starty[j],menustring[j],0,1,640,480); else { if(displayblink){ @@ -3914,7 +3915,6 @@ int Game::DrawGLScene(StereoSide side) multiplier=0; } - //glFlush(); if ( side == stereoRight || side == stereoCenter ) { if(drawmode!=motionblurmode||mainmenu){ diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 155ee8a..909c503 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -46,7 +46,7 @@ extern XYZ viewer; extern int environment; extern float texscale; extern Terrain terrain; -extern OPENAL_SAMPLE *samp[100]; +extern OPENAL_SAMPLE *samp[100]; extern int channels[100]; extern Sprites sprites; extern int kTextureSize; @@ -829,23 +829,21 @@ static void ch_notindemo(Game *game, const char *args) static void ch_type(Game *game, const char *args) { int i, n = sizeof(editortypenames) / sizeof(editortypenames[0]); - for (i = 0; i < n; i++) - if (stripfx(args, editortypenames[i])) - { - editoractive = i; - break; - } + for (i = 0; i < n; i++) + if (stripfx(args, editortypenames[i])) { + editoractive = i; + break; + } } static void ch_path(Game *game, const char *args) { int i, n = sizeof(pathtypenames) / sizeof(pathtypenames[0]); for (i = 0; i < n; i++) - if (stripfx(args, pathtypenames[i])) - { - editorpathtype = i; - break; - } + if (stripfx(args, pathtypenames[i])) { + editorpathtype = i; + break; + } } static void ch_hs(Game *game, const char *args) @@ -1195,8 +1193,6 @@ static void cmd_dispatch(Game *game, const char *cmd) } } - - /********************> Tick() <*****/ extern void ScreenShot(const char * fname); void Screenshot (void) diff --git a/Source/Globals.cpp b/Source/Globals.cpp index eae0bd0..6c59eb2 100644 --- a/Source/Globals.cpp +++ b/Source/Globals.cpp @@ -272,4 +272,4 @@ bool gamestarted = 0; StereoMode stereomode = stereoNone; StereoMode newstereomode = stereoNone; float stereoseparation = 0.05; -bool stereoreverse = false; \ No newline at end of file +bool stereoreverse = false; diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index 618ef47..84e9812 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -796,9 +796,9 @@ void DoFrameRate (int update) deltaTime /= 1000.0; multiplier=deltaTime; - if(multiplier<.001)multiplier=.001; - if(multiplier>10)multiplier=10; - if(update)frametime = currTime; // reset for next time interval + if(multiplier<.001) multiplier=.001; + if(multiplier>10) multiplier=10; + if(update) frametime = currTime; // reset for next time interval deltaTime = (float) AbsoluteDeltaToDuration (currTime, time);