]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameDraw.cpp
Moved Weapon model and texture loading in Weapon class
[lugaru.git] / Source / GameDraw.cpp
index 7ab8565522fffe34d3455b536ae8d97300f9091a..8bbeb349c208acb93d22bf39ea01ce5c813508d7 100644 (file)
@@ -67,7 +67,7 @@ extern bool devtools;
 extern int mainmenu;
 extern int bloodtoggle;
 extern int difficulty;
-extern bool decals;
+extern bool decalstoggle;
 extern float texdetail;
 extern bool musictoggle;
 extern float smoketex;
@@ -119,8 +119,6 @@ int Game::DrawGLScene(StereoSide side)
     static float tempmult;
     float tutorialopac;
     std::string string;
-    std::string string2;
-    std::string string3;
     static int drawmode = 0;
 
     if ( stereomode == stereoAnaglyph ) {
@@ -137,7 +135,8 @@ int Game::DrawGLScene(StereoSide side)
     } else {
         glColorMask( 1.0, 1.0, 1.0, 1.0 );
 
-        if ( stereomode == stereoHorizontalInterlaced || stereomode == stereoVerticalInterlaced ) {
+        if ( stereomode == stereoHorizontalInterlaced ||
+            stereomode == stereoVerticalInterlaced ) {
             glStencilFunc(side == stereoLeft ? GL_NOTEQUAL : GL_EQUAL, 0x01, 0x01);
         }
     }
@@ -577,16 +576,15 @@ int Game::DrawGLScene(StereoSide side)
                 }
 
             if (Tutorial::active) {
-                Tutorial::DrawText();
+                Tutorial::DrawTextInfo();
             }
 
             //Hot spots
             if (Hotspot::hotspots.size() && (bonustime >= 1 || bonus <= 0 || bonustime < 0) && !Tutorial::active) {
                 float closestdist = -1;
-                float distance = 0;
                 int closest = Hotspot::current;
                 for (unsigned i = 0; i < Hotspot::hotspots.size(); i++) {
-                    distance = distsq(&Person::players[0]->coords, &Hotspot::hotspots[i].position);
+                    float distance = distsq(&Person::players[0]->coords, &Hotspot::hotspots[i].position);
                     if (closestdist == -1 || distance < closestdist) {
                         if (distsq(&Person::players[0]->coords, &Hotspot::hotspots[i].position) < Hotspot::hotspots[i].size && ((Hotspot::hotspots[i].type <= 10 && Hotspot::hotspots[i].type >= 0) || (Hotspot::hotspots[i].type <= 40 && Hotspot::hotspots[i].type >= 20))) {
                             closestdist = distance;
@@ -1074,7 +1072,7 @@ int Game::DrawGLScene(StereoSide side)
             glPopMatrix();
             glRotatef(Person::players[0]->lookyaw * -1 + 180, 0, 0, 1);
             glTranslatef(-(center.x / terrain.scale / 256 * -2 + 1), (center.z / terrain.scale / 256 * -2 + 1), 0);
-            for (int i = 0; i < Object::objects.size(); i++) {
+            for (unsigned int i = 0; i < Object::objects.size(); i++) {
                 if (Object::objects[i]->type == treetrunktype) {
                     distcheck = distsq(&Person::players[0]->coords, &Object::objects[i]->position);
                     if (distcheck < mapviewdist) {
@@ -1555,12 +1553,12 @@ int Game::DrawGLScene(StereoSide side)
             int offset = 0;
             if (consoleselected >= 60)
                 offset = consoleselected - 60;
-            text->glPrint(10, 30, " ]", 0, 1, 1024, 768);
+            textmono->glPrint(10, 30, " ]", 0, 1, 1024, 768);
             if (consoleblink) {
-                text->glPrint(30 + (float)(consoleselected) * 10 - offset * 10, 30, "_", 0, 1, 1024, 768);
+                textmono->glPrint(30 + (float)(consoleselected) * 10 - offset * 10, 30, "_", 0, 1, 1024, 768);
             }
             for (unsigned i = 0; i < 15; i++) {
-                text->glPrint(30 - offset * 10, 30 + i * 20, consoletext[i], 0, 1, 1024, 768);
+                textmono->glPrint(30 - offset * 10, 30 + i * 20, consoletext[i], 0, 1, 1024, 768);
             }
         }
     }