X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FOpenGL_Windows.cpp;h=37520284c8900ef45464d0fa6b24e74924c9e98f;hb=eecffd77acac5500bad32cde2c56e18ee00f6cf7;hp=3a508adf06f02f099e76279e19f3f0705f32587b;hpb=9b02e6c2c1987b983584afc69e60ae2efa5dccc7;p=lugaru.git diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index 3a508ad..3752028 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -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); @@ -110,12 +117,12 @@ extern float volume; #include "gamegl.h" #include "MacCompatibility.h" + #ifdef WIN32 #include +#include "win-res/resource.h" #endif -#include "res/resource.h" - using namespace std; @@ -568,7 +575,7 @@ Boolean SetUp (Game & game) randSeed = UpTime().lo; osx = 0; - ifstream ipstream(ConvertFileName("/Data/config.txt"), std::ios::in /*| std::ios::nocreate*/); + ifstream ipstream(ConvertFileName(":Data:config.txt"), std::ios::in /*| std::ios::nocreate*/); detail=1; ismotionblur=0; usermousesensitivity=1; @@ -618,7 +625,7 @@ Boolean SetUp (Game & game) selectDetail(kContextWidth, kContextHeight, kBitsPerPixel, detail); if(!ipstream) { - ofstream opstream(ConvertFileName("/Data/config.txt", "w")); + ofstream opstream(ConvertFileName(":Data:config.txt", "w")); opstream << "Screenwidth:\n"; opstream << kContextWidth; opstream << "\nScreenheight:\n"; @@ -1499,6 +1506,7 @@ int main(int argc, char **argv) } } + bool LoadImage(const char * fname, TGAImageRec & tex) { bool res = true;