]> git.jsancho.org Git - lugaru.git/commitdiff
The damage bar now appear in the option menu
authorCôme BERNIGAUD <come.bernigaud@gmail.com>
Mon, 24 May 2010 20:46:17 +0000 (22:46 +0200)
committerCôme BERNIGAUD <come.bernigaud@gmail.com>
Mon, 24 May 2010 20:46:17 +0000 (22:46 +0200)
Source/GameDraw.cpp
Source/GameTick.cpp

index c3b087de033646d6b605735ed70ef03bb254fe71..039df019d220a28189bd057da65770d8f6873e30 100644 (file)
@@ -2522,7 +2522,7 @@ int Game::DrawGLScene(StereoSide side)
                        glMatrixMode(GL_MODELVIEW);                                                     // Select The Modelview Matrix
 
                        if(mainmenu==3){                        
-                               nummenuitems=13;
+                               nummenuitems=14;
                                if((float)newscreenwidth>(float)newscreenheight*1.61||(float)newscreenwidth<(float)newscreenheight*1.59)sprintf (menustring[0], "Resolution: %d*%d",(int)newscreenwidth,(int)newscreenheight);
                                else sprintf (menustring[0], "Resolution: %d*%d (widescreen)",(int)newscreenwidth,(int)newscreenheight);
                                startx[0]=10+20;
@@ -2608,15 +2608,23 @@ int Game::DrawGLScene(StereoSide side)
                                
                                sprintf (menustring[11], "Volume: %d%%", (int)(volume*100));
                                startx[11]=10+60;
-                               starty[11]=155;
+                               starty[11]=160;
                                endx[11]=startx[11]+strlen(menustring[11])*10;
                                endy[11]=starty[11]+20;
                                movex[11]=0;
                                movey[11]=0;
                                
+                               sprintf (menustring[13], "Damage Bar: %s",(showdamagebar?"on":"off"));
+                               startx[13]=30;
+                               starty[13]=125;
+                               endx[13]=startx[13]+strlen(menustring[13])*10;
+                               endy[13]=starty[13]+20;
+                               movex[13]=0;
+                               movey[13]=0;
+                               
                                sprintf (menustring[7], "-Configure Controls-");
                                startx[7]=10+15;
-                               starty[7]=100;
+                               starty[7]=90;
                                endx[7]=startx[7]+strlen(menustring[7])*10;
                                endy[7]=starty[7]+20;
                                movex[7]=0;
@@ -2624,7 +2632,7 @@ int Game::DrawGLScene(StereoSide side)
 
                                sprintf (menustring[12], "-Configure Stereo -");
                                startx[12]=10+15;
-                               starty[12]=60;
+                               starty[12]=55;
                                endx[12]=startx[12]+strlen(menustring[7])*10;
                                endy[12]=starty[12]+20;
                                movex[12]=0;
index 00bcdc400cc1d9c6f288cf00091cbc95f8fbcf09..2328eb8f0ce50367d660c7126c2b856466d8ab2a 100644 (file)
@@ -3110,6 +3110,9 @@ void      Game::Tick()
                                mainmenu=18;
                                keyselect = -1;
                        }
+                       if(Button() && !oldbutton && selected == 13) {
+                               showdamagebar=!showdamagebar;
+                       }
                        if(Button()&&!oldbutton&&selected==8){
                                float gLoc[3]={0,0,0};
                                float vel[3]={0,0,0};