]> git.jsancho.org Git - lugaru.git/blobdiff - Source/OpenGL_Windows.cpp
activate the damage bar in the config file
[lugaru.git] / Source / OpenGL_Windows.cpp
index f8f180c6aa38b3c7a8f7ce889355f12250869b69..24284725e5605a24f0f17a585c04b11b4ae73332 100644 (file)
@@ -19,6 +19,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
 
+
 #ifdef WIN32
 #define UINT8 WIN32API_UINT8
 #define UINT16 WIN32API_UINT16
@@ -35,7 +36,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 extern "C" {
        #include "zlib.h"
        #include "png.h"
-       #include "jpeglib.h"
+   #ifdef WIN32
+               #define INT32 INT32_jpeg
+               #include "jpeglib.h"
+               #undef INT32
+       #else
+               #include "jpeglib.h"
+       #endif
 }
 
 static bool load_image(const char * fname, TGAImageRec & tex);
@@ -90,6 +97,7 @@ extern Person player[maxplayers];
 extern bool vblsync;
 extern bool stillloading;
 extern bool showpoints;
+extern bool showdamagebar;
 extern bool alwaysblur;
 extern bool immediate;
 extern bool velocityblur;
@@ -110,6 +118,7 @@ extern float volume;
 #include "gamegl.h"
 #include "MacCompatibility.h"
 
+
 #ifdef WIN32
 #include <shellapi.h>
 #endif
@@ -592,6 +601,7 @@ Boolean SetUp (Game & game)
        texttoggle=1;
        alwaysblur=0;
        showpoints=0;
+       showdamagebar=0;
        immediate=0;
        velocityblur=0;
 
@@ -691,6 +701,8 @@ Boolean SetUp (Game & game)
                opstream << KeyToChar(game.attackkey);
                opstream << "\nChat key:\n";
                opstream << KeyToChar(game.chatkey);
+               opstream << "\nDamage bar:\n";
+               opstream << showdamagebar;
                opstream.close();
        }
        if(ipstream){
@@ -837,6 +849,10 @@ Boolean SetUp (Game & game)
                ipstream.ignore(256,'\n');
                ipstream >> string;
                game.chatkey=CharToKey(string);
+               ipstream.ignore(256,'\n');
+               ipstream.ignore(256,'\n');
+               ipstream >> i;
+               showdamagebar = (i != 0);
                ipstream.close();
 
                if(detail>2)detail=2;
@@ -1499,6 +1515,7 @@ int main(int argc, char **argv)
                }
        }
 
+
        bool LoadImage(const char * fname, TGAImageRec & tex)
        {
                bool res = true;