]> git.jsancho.org Git - lugaru.git/commitdiff
some more unused variables cleanup
authorCôme BERNIGAUD <come.bernigaud@gmail.com>
Tue, 10 May 2011 21:27:04 +0000 (23:27 +0200)
committerCôme BERNIGAUD <come.bernigaud@gmail.com>
Tue, 10 May 2011 21:27:04 +0000 (23:27 +0200)
Source/GameDraw.cpp
Source/GameInitDispose.cpp
Source/Quaternions.h

index 23692b30bac3096fb0d9ce5b3f34f0be5e82a2c7..855c87eb794e408e556bc6ad454952947318eed9 100644 (file)
@@ -1433,11 +1433,11 @@ int Game::DrawGLScene(StereoSide side)
 
                        float maxdistance=0;
                        float tempdist;
-                       int whichclosest;
+                       //~ int whichclosest;
                        for(i=0;i<objects.numobjects;i++){
                                tempdist=findDistancefast(&center,&objects.position[i]);
                                if(tempdist>maxdistance){
-                                       whichclosest=i;
+                                       //~ whichclosest=i;
                                        maxdistance=tempdist;
                                }
                        }
@@ -1445,7 +1445,7 @@ int Game::DrawGLScene(StereoSide side)
                                if(!player[i].dead){
                                        tempdist=findDistancefast(&center,&player[i].coords);
                                        if(tempdist>maxdistance){
-                                               whichclosest=i;
+                                               //~ whichclosest=i;
                                                maxdistance=tempdist;
                                        }
                                }
index 1b8699ee479b18d31e0ce2b9488013d23a2151d1..a0f164ad2bde461e6907cd4131e7d5aed820de6e 100644 (file)
@@ -101,8 +101,6 @@ void LOG(const std::string &fmt, ...)
 
 void Game::Dispose()
 {
-       int i,j;
-
        LOGFUNC;
 
        if(endgame==2){
@@ -122,7 +120,7 @@ void Game::Dispose()
 //  later in the shutdown process.  --ryan.
 #if !PLATFORM_LINUX
 
-       for (i=0; i < sounds_count; ++i)
+       for (int i=0; i < sounds_count; ++i)
        {
                OPENAL_Sample_Free(samp[i]);
        }
@@ -366,7 +364,7 @@ GLvoid Game::ReSizeGLScene(float fov, float pnear)
 
 void Game::LoadingScreen()
 {
-       static float loadprogress,minprogress,maxprogress;
+       static float loadprogress;
        static AbsoluteTime time = {0,0};
        static AbsoluteTime frametime = {0,0};
        AbsoluteTime currTime = UpTime ();
@@ -383,7 +381,6 @@ void Game::LoadingScreen()
        if(multiplier>.05){
                frametime = currTime;   // reset for next time interval
 
-               float size=1;
                glLoadIdentity();
                //Clear to black
                glClearColor(0,0,0,1);
@@ -538,15 +535,6 @@ void Game::LoadingScreen()
                glDepthMask(1);
 
                //Text
-               /*
-               glEnable(GL_TEXTURE_2D);
-               static char string[256]="";
-               sprintf (string, "LOADING... %d%",(int)loadprogress);
-               glColor4f(1,1,1,.2);
-               text.glPrint(280-280*loadprogress/100/2/4,125-125*loadprogress/100/2/4,string,1,1+loadprogress/100,640,480);
-               glColor4f(1.2-loadprogress/100,1.2-loadprogress/100,1.2-loadprogress/100,1);
-               text.glPrint(280,125,string,1,1,640,480);
-               */
 
                if(flashamount>0){
                        if(flashamount>1)flashamount=1;
@@ -591,9 +579,8 @@ void Game::LoadingScreen()
 
 void Game::FadeLoadingScreen(float howmuch)
 {
-       static float loadprogress,minprogress,maxprogress;
+       static float loadprogress;
 
-       float size=1;
        glLoadIdentity();
        //Clear to black
        glClearColor(0,0,0,1);
@@ -647,15 +634,6 @@ void Game::FadeLoadingScreen(float howmuch)
        glDisable(GL_BLEND);
        glDepthMask(1);
        //Text
-       /*
-       glEnable(GL_TEXTURE_2D);
-       static char string[256]="";
-       sprintf (string, "LOADING... %d%",(int)loadprogress);
-       glColor4f(1,1,1,.2);
-       text.glPrint(280-280*loadprogress/100/2/4,125-125*loadprogress/100/2/4,string,1,1+loadprogress/100,640,480);
-       glColor4f(1.2-loadprogress/100,1.2-loadprogress/100,1.2-loadprogress/100,1);
-       text.glPrint(280,125,string,1,1,640,480);
-       */
        swap_gl_buffers();
 }
 
@@ -686,8 +664,6 @@ void Game::InitGame()
 
        autocam=0;
 
-       int i,j;
-
        numchallengelevels=14;
 
        accountactive=Account::loadFile(":Data:Users");
@@ -894,7 +870,7 @@ void Game::LoadStuff()
 {
        static float temptexdetail;
        static float viewdistdetail;
-       static int i,j,texsize;
+       static int i,j;
        float megascale =1;
 
        LOGFUNC;
@@ -1189,13 +1165,7 @@ void Game::LoadStuff()
                        animation[swordsneakattackedanim].position[i][j]+=moveamount;
                }
        }
-       /*
-       for(i=0;i<player[0].skeleton.num_joints;i++){
-       for(j=0;j<animation[sleepanim].numframes;j++){
-       animation[sleepanim].position[i][j]=DoRotation(animation[sleepanim].position[i][j],0,180,0);
-       }
-       }
-       */
+       
        LoadingScreen();
        temptexdetail=texdetail;
        texdetail=1;
index 6104044aada9b8a6e412fe10b68913f274b14f8b..39037b5f2638ca9fc9392f4bcf67eb162ca32ae7 100644 (file)
@@ -370,8 +370,8 @@ inline bool sphere_line_intersection (
        // This function returns a pointer array which first index indicates
        // the number of intersection point, followed by coordinate pairs.
 
-       static float x , y , z;
-       static float a, b, c, mu, i ;
+       //~ static float x , y , z;
+       static float a, b, c, /*mu,*/ i ;
 
        if(x1>x3+r&&x2>x3+r)return(0);
        if(x1<x3-r&&x2<x3-r)return(0);
@@ -409,8 +409,8 @@ inline bool sphere_line_intersection (
        // This function returns a pointer array which first index indicates
        // the number of intersection point, followed by coordinate pairs.
 
-       static float x , y , z;
-       static float a, b, c, mu, i ;
+       //~ static float x , y , z;
+       static float a, b, c, /*mu,*/ i ;
 
        if(p1->x>p3->x+*r&&p2->x>p3->x+*r)return(0);
        if(p1->x<p3->x-*r&&p2->x<p3->x-*r)return(0);