X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameDraw.cpp;h=522681bc781434e18e23a23e21d4274ebc963956;hb=e4c69ab5c1d15cdb4a909de8ba8f2057fe6f095d;hp=6342683c169f6a95c80e17330305e185e87260a9;hpb=113f1ee41edede8836361cc29119ea5f97104bd2;p=lugaru.git diff --git a/Source/GameDraw.cpp b/Source/GameDraw.cpp index 6342683..522681b 100644 --- a/Source/GameDraw.cpp +++ b/Source/GameDraw.cpp @@ -2034,13 +2034,11 @@ void Game::LoadCampaign() { } ipstream.close(); - if(!Mainmenuitems[7]) { - ifstream test(ConvertFileName((":Data:Textures:"+accountactive->getCurrentCampaign()+":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) { @@ -2058,27 +2056,12 @@ void Game::DrawMenu() { glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ); ReSizeGLScene(90,.1f); - int temptexdetail; - temptexdetail=texdetail; - if(texdetail>2)texdetail=2; - //~ if(mainmenu!=oldmainmenu&&oldmainmenu!=0){ - //~ if(mainmenu==1){ - //~ LoadTexture(":Data:Textures:Newgame.png",&Mainmenuitems[1],0,0); - //~ LoadTexture(":Data:Textures:Quit.png",&Mainmenuitems[3],0,0); - //~ } - //~ if(mainmenu==2){ - //~ LoadTexture(":Data:Textures:Resume.png",&Mainmenuitems[1],0,0); - //~ LoadTexture(":Data:Textures:Endgame.png",&Mainmenuitems[3],0,0); - //~ } - //~ } if(oldmainmenu!=mainmenu){ if(mainmenu==5){ LoadCampaign(); } } - texdetail=temptexdetail; - oldmainmenu=mainmenu; glClear(GL_DEPTH_BUFFER_BIT); @@ -2185,41 +2168,41 @@ void Game::DrawMenu() { startx[0]=10+20; starty[0]=440; - if(newdetail==2)sprintf (menustring[1], "Detail: High"); - else if(newdetail==1)sprintf (menustring[1], "Detail: Medium"); - else sprintf (menustring[1], "Detail: Low"); + if(newdetail==2) sprintf (menustring[1], "Detail: High"); + else if(newdetail==1) sprintf (menustring[1], "Detail: Medium"); + else sprintf (menustring[1], "Detail: Low"); startx[1]=10+60; starty[1]=405; - if(bloodtoggle==2)sprintf (menustring[2], "Blood: On, high detail (slower)"); - if(bloodtoggle==1)sprintf (menustring[2], "Blood: On, low detail"); - if(bloodtoggle==0)sprintf (menustring[2], "Blood: Off"); + if(bloodtoggle==2) sprintf (menustring[2], "Blood: On, high detail (slower)"); + if(bloodtoggle==1) sprintf (menustring[2], "Blood: On, low detail"); + if(bloodtoggle==0) sprintf (menustring[2], "Blood: Off"); startx[2]=10+70; starty[2]=370; - if(difficulty==2)sprintf (menustring[3], "Difficulty: Insane"); - if(difficulty==1)sprintf (menustring[3], "Difficulty: Difficult"); - if(difficulty==0)sprintf (menustring[3], "Difficulty: Easier"); + if(difficulty==2) sprintf (menustring[3], "Difficulty: Insane"); + if(difficulty==1) sprintf (menustring[3], "Difficulty: Difficult"); + if(difficulty==0) sprintf (menustring[3], "Difficulty: Easier"); startx[3]=10+20-1000; starty[3]=335-1000; - if(ismotionblur==1)sprintf (menustring[4], "Blur Effects: Enabled (less compatible)"); - if(ismotionblur==0)sprintf (menustring[4], "Blur Effects: Disabled (more compatible)"); + if(ismotionblur==1) sprintf (menustring[4], "Blur Effects: Enabled (less compatible)"); + if(ismotionblur==0) sprintf (menustring[4], "Blur Effects: Disabled (more compatible)"); startx[4]=10; starty[4]=335; - if(decals==1)sprintf (menustring[5], "Decals: Enabled (slower)"); - if(decals==0)sprintf (menustring[5], "Decals: Disabled"); + if(decals==1) sprintf (menustring[5], "Decals: Enabled (slower)"); + if(decals==0) sprintf (menustring[5], "Decals: Disabled"); startx[5]=10+60; starty[5]=300; - if(musictoggle==1)sprintf (menustring[6], "Music: Enabled"); - if(musictoggle==0)sprintf (menustring[6], "Music: Disabled"); + if(musictoggle==1) sprintf (menustring[6], "Music: Enabled"); + if(musictoggle==0) sprintf (menustring[6], "Music: Disabled"); startx[6]=10+70; starty[6]=265; - if(invertmouse==1)sprintf (menustring[9], "Invert mouse: Yes"); - if(invertmouse==0)sprintf (menustring[9], "Invert mouse: No"); + if(invertmouse==1) sprintf (menustring[9], "Invert mouse: Yes"); + if(invertmouse==0) sprintf (menustring[9], "Invert mouse: No"); startx[9]=10; starty[9]=230; @@ -2347,18 +2330,6 @@ void Game::DrawMenu() { sprintf (menustring[2], "No"); startx[2]=10; starty[2]=320; - - sprintf (menustring[3], "Extra 4"); - startx[3]=10; - starty[3]=280; - - sprintf (menustring[4], "Extra 5"); - startx[4]=10; - starty[4]=240; - - sprintf (menustring[5], "Back"); - startx[5]=10; - starty[5]=10; } break; case 7: { @@ -2567,7 +2538,11 @@ void Game::DrawMenu() { { glColor4f(1,1,1,1); glBlendFunc(GL_SRC_ALPHA,GL_ONE); - glBindTexture( GL_TEXTURE_2D, Mainmenuitems[j]); + if(mainmenu==2 && (j==1 || j == 3)) { + glBindTexture( GL_TEXTURE_2D, Mainmenuitems[(j==1?5:6)]); + } else { + glBindTexture( GL_TEXTURE_2D, Mainmenuitems[j]); + } glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix @@ -2871,13 +2846,13 @@ void Game::DrawMenu() { //glScalef(.25,.25,.25); glBegin(GL_QUADS); glTexCoord2f(0,0); - glVertex3f(-1, -1, 0.0f); + glVertex3f(-1, -1, 0.0f); glTexCoord2f(1,0); - glVertex3f(1, -1, 0.0f); + glVertex3f(1, -1, 0.0f); glTexCoord2f(1,1); - glVertex3f(1, 1, 0.0f); + glVertex3f(1, 1, 0.0f); glTexCoord2f(0,1); - glVertex3f(-1, 1, 0.0f); + glVertex3f(-1, 1, 0.0f); glEnd(); glPopMatrix(); glPopMatrix();