X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;ds=sidebyside;f=Source%2FGameDraw.cpp;h=c92755ba192407e41dec8a8ac8f55b935d935c93;hb=9f74842b2c68ce6c62ddf9374252ac99e31879ca;hp=0f3dd8cd07e277e8473b41ddd5bbcdd9d82c78bd;hpb=2f6f7fe7b9562156a966b6cfd62afb2dc69734f7;p=lugaru.git diff --git a/Source/GameDraw.cpp b/Source/GameDraw.cpp index 0f3dd8c..c92755b 100644 --- a/Source/GameDraw.cpp +++ b/Source/GameDraw.cpp @@ -549,7 +549,7 @@ int Game::DrawGLScene(StereoSide side) glEnable(GL_TEXTURE_2D); glColor4f(.5,.5,.5,1); - if(!console){ + if(!console) { sprintf (string, " ",(int)(fps)); text.glPrint(10,30,string,0,.8,screenwidth,screenheight); @@ -1322,7 +1322,7 @@ int Game::DrawGLScene(StereoSide side) glDepthMask(1); } - if(flashamount>0&&damageeffects){ + if(flashamount>0&&damageeffects) { if(flashamount>1)flashamount=1; if(flashdelay<=0)flashamount-=multiplier; flashdelay--; @@ -1358,7 +1358,7 @@ int Game::DrawGLScene(StereoSide side) glDepthMask(1); } - if(!console){ + if(!console) { displaytime[0]=0; glEnable(GL_TEXTURE_2D); glColor4f(1,1,1,1); @@ -1370,11 +1370,11 @@ int Game::DrawGLScene(StereoSide side) text.glPrint(30+(float)(displayselected)*10,30+(screenheight-330),string,0,1,screenwidth,screenheight); } } - for(i=0;i<15;i++){ + for(i=0;i<15;i++) { if((i!=0||chatting)&&displaytime[i]<4) - for(j=0;jgetCurrentCampaign()+":World.png").c_str())); - if(test.good()) { - LoadTextureData((":Data:Textures:"+accountactive->getCurrentCampaign()+":World.png").c_str(),&Mainmenuitems[7],0,0); - } else { - LoadTextureData(":Data:Textures:World.png",&Mainmenuitems[7],0,0); - } + ifstream test(ConvertFileName((":Data:Textures:"+accountactive->getCurrentCampaign()+":World.png").c_str())); + if(test.good()) { + LoadTexture((":Data:Textures:"+accountactive->getCurrentCampaign()+":World.png").c_str(),&Mainmenuitems[7],0,0); + } else { + LoadTexture(":Data:Textures:World.png",&Mainmenuitems[7],0,0); } if(accountactive->getCampaignChoicesMade()==0) { @@ -2280,10 +2278,18 @@ void Game::DrawMenu() { else sprintf (menustring[8], "Attack: _"); startx[8]=10+20; starty[8]=80; - - sprintf (menustring[9], "Back"); - startx[9]=10; - starty[9]=10; + + if(debugmode) { + if(keyselect!=9)sprintf (menustring[9], "Console: %s",Input::keyToChar(consolekey)); + else sprintf (menustring[9], "Console: _"); + startx[9]=10+10; + starty[9]=40; + nummenuitems++; + } + + sprintf (menustring[nummenuitems-1], "Back"); + startx[nummenuitems-1]=10; + starty[nummenuitems-1]=10; } break; case 5: {