From: Côme BERNIGAUD Date: Tue, 10 May 2011 19:41:02 +0000 (+0200) Subject: some more cleans thanks to cppcheck X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=fded1ab789fa36b9f207dfe33d99dec4c9241522;p=lugaru.git some more cleans thanks to cppcheck --- diff --git a/Source/Account.cpp b/Source/Account.cpp index b17d8e5..56aaf9c 100644 --- a/Source/Account.cpp +++ b/Source/Account.cpp @@ -167,7 +167,6 @@ Account* Account::loadFile(string filename) { void Account::saveFile(string filename, Account* accountactive) { FILE *tfile; - int numaccounts; int j; tfile=fopen(ConvertFileName(filename.c_str(), "wb"), "wb" ); diff --git a/Source/GameDraw.cpp b/Source/GameDraw.cpp index 74abd02..42200ae 100644 --- a/Source/GameDraw.cpp +++ b/Source/GameDraw.cpp @@ -129,8 +129,6 @@ int Game::DrawGLScene(StereoSide side) static float texviewwidth, texviewheight; static int i,j,k,l; static GLubyte color; - static float newbrightness; - static float changespeed; static XYZ checkpoint; static float tempmult; float tutorialopac; @@ -2589,7 +2587,6 @@ void Game::DrawMenu() movey[2]=0; } if(mainmenu==9){ - int tempncl; nummenuitems=2+numchallengelevels; char temp[255]; diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 1d40027..c15ea3f 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -1413,10 +1413,8 @@ void Game::Loadlevel(int which){ } void Game::Loadlevel(const char *name){ - static int oldlevel; int templength; float lamefloat; - int lameint; static const char *pfx = ":Data:Maps:"; char *buf; @@ -1448,8 +1446,6 @@ void Game::Loadlevel(const char *name){ tutorialmaxtime=1; } loadingstuff=1; - if(!firstload) - oldlevel=50; pause_sound(whooshsound); pause_sound(stream_firesound); @@ -1638,8 +1634,6 @@ void Game::Loadlevel(const char *name){ funpackf(tfile, "Bf", &dialogueboxcolor[k][l][2]); funpackf(tfile, "Bi", &dialogueboxsound[k][l]); - bool doneread; - funpackf(tfile, "Bi",&templength); if(templength>128||templength<=0) templength=128; @@ -1719,11 +1713,11 @@ void Game::Loadlevel(const char *name){ float maxdistance=0; float tempdist; - int whichclosest; + //~ int whichclosest; for(int i=0;imaxdistance){ - whichclosest=i; + //~ whichclosest=i; maxdistance=tempdist; } } @@ -1875,9 +1869,6 @@ void Game::Loadlevel(const char *name){ fclose(tfile); - oldlevel=whichlevel; - - if(numplayers>maxplayers-1) numplayers=maxplayers-1; for(int i=0;i