]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameDraw.cpp
Some refactor about Person class.
[lugaru.git] / Source / GameDraw.cpp
index 522681bc781434e18e23a23e21d4274ebc963956..43e2f431860dd250afaef0384ee7e34d8cea6080 100644 (file)
@@ -93,7 +93,6 @@ extern float damagedealt;
 extern bool invertmouse;
 
 extern int numhotspots;
-extern int winhotspot;
 extern int killhotspot;
 extern XYZ hotspot[40];
 extern int hotspottype[40];
@@ -549,7 +548,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 +1321,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 +1357,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 +1369,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;j<displaychars[i];j++){
+                                       for(j=0;j<displaychars[i];j++) {
                                                glColor4f(1,1,1,4-displaytime[i]);
-                                               if(j<displaychars[i]){
+                                               if(j<displaychars[i]) {
                                                        sprintf (string, "%c",displaytext[i][j]);
                                                        text.glPrint(30+j*10,30+i*20+(screenheight-330),string,0,1,screenwidth,screenheight);
                                                }
@@ -2278,10 +2277,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: {