]> git.jsancho.org Git - lugaru.git/commitdiff
Made initial fixes towards building in MinGW for 32-bit Windows
authorNeal Gompa <ngompa13@gmail.com>
Wed, 12 May 2010 22:43:19 +0000 (17:43 -0500)
committerNeal Gompa <ngompa13@gmail.com>
Wed, 12 May 2010 22:43:19 +0000 (17:43 -0500)
Source/Game.h
Source/GameInitDispose.cpp
Source/GameTick.cpp
Source/Globals.cpp
Source/Models.cpp
Source/Skeleton.cpp
Source/Terrain.cpp

index cbd70906449774cd5e7b5b5fa9b6ea72a18290da..b915f81b0b3bbf3720c11829f0d8ecee62e449a8 100644 (file)
@@ -22,6 +22,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #ifndef _GAME_H_
 #define _GAME_H_
 
+#if USE_SDL
+#include "SDL.h"
+#endif
+
 #if (defined(__APPLE__) && defined(__MACH__))
 #  ifdef PLATFORM_MACOSX
 #    error Do not define PLATFORM_MACOSX for new builds. It is for the old Carbonized build.
@@ -38,10 +42,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "TGALoader.h"
 
-#if USE_SDL
-#include "SDL.h"
-#endif
-
 #if !PLATFORM_MACOSX
 #include "WinInput.h"
 #else
index 118a7b5f2006829bd23fdc09d458843b6e567ef3..476a854e90ecf0966d75f35f55024f63fb8f1762 100644 (file)
@@ -1031,7 +1031,7 @@ void Game::InitGame()
                                char tempstring[256];
                                #if defined(__APPLE__)
                                sprintf (tempstring, "%s", registrationname);
-                               #elif defined(_MSC_VER) || defined(__linux__)
+                               #elif defined(_WIN32) || defined(__linux__)
                                sprintf (tempstring, "%s-windows", registrationname);
                                #else
                                #error Please make sure you have the right registration key stuff here!
index 691fa5622542a1c583692461d5e56f4a5c5e06fa..1212558afa37c9454ef105934f354653b8592872 100644 (file)
@@ -236,7 +236,12 @@ void Screenshot    (void)
        struct  tm *tme = localtime(&t);
        sprintf(temp, "Screenshots\\Screenshot_%04d_%02d_%02d--%02d_%02d_%02d.png", tme->tm_year + 1900, tme->tm_mon + 1, tme->tm_mday, tme->tm_hour, tme->tm_min, tme->tm_sec);
 
+       #if defined(_WIN32)
+       mkdir("Screenshots");
+       #else
        mkdir("Screenshots", S_IRWXU);
+       #endif
+
        ScreenShot(temp/*"Screenshots\\Screenshot.png"*/);
 
        /*FSSpec                                MAC_file;
@@ -3250,7 +3255,7 @@ void      Game::Tick()
                                                                char tempstring[256];
                                                                #if defined(__APPLE__)
                                                                sprintf (tempstring, "%s", registrationname);
-                                                               #elif defined(_MSC_VER) || defined(__linux__)
+                                                               #elif defined(_WIN32) || defined(__linux__)
                                                                sprintf (tempstring, "%s-windows", registrationname);
                                                                #else
                                                                #error Please make sure you have the right registration key stuff here!
index b40ace082575574246169dc92e858500b1cd0e6c..b7b4fc9fb993adb7a822c78d13d819961ed0b79d 100644 (file)
@@ -19,6 +19,10 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
 
+#if USE_SDL
+#include "SDL.h"
+#endif
+
 #include "gamegl.h"
 #include "Quaternions.h"
 #include "Lights.h"
@@ -35,10 +39,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "Constants.h"
 
-#if USE_SDL
-#include "SDL.h"
-#endif
-
 bool visibleloading = 0;
 FSOUND_SAMPLE  *samp[100] = {0};
 FSOUND_STREAM * strm[20] = {0};
index b006c6db2dbe398d108e9e4049d1a65cd1fa8138..1eae46867c265e011890d9eef60c136ce571f0fc 100644 (file)
@@ -19,9 +19,9 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
 
+#include "Game.h"
 #include "Models.h"
 //#include "altivec.h"
-#include "Game.h"
 
 extern float multiplier;
 extern float viewdistance;
@@ -31,7 +31,6 @@ extern float texdetail;
 extern bool decals;
 extern int loadscreencolor;
 
-#include "Game.h"
 extern Game * pgame;
 extern bool visibleloading;
 //Functions
index fd44de1cc519e0cad443ba26e135f5c4dffd671c..057ea9d046af22afd0fb41361571acd1f16eddb9 100644 (file)
@@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
 
 /**> HEADER FILES <**/
+#include "Game.h"
 #include "Skeleton.h"
 
 extern float multiplier;
@@ -46,7 +47,6 @@ extern int tutoriallevel;
 extern int whichjointstartarray[26];
 extern int whichjointendarray[26];
 
-#include "Game.h"
 extern Game * pgame;
 extern bool visibleloading;
 extern "C"     void PlaySoundEx(int channel, FSOUND_SAMPLE *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused);
index 7a78d7b0409d3d39e6d10a6a090d4ac2d37a2335..e56f681f8190c9359c5741941855fd4ab1777ebb 100644 (file)
@@ -19,9 +19,9 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
 
+#include "Game.h"
 #include "Terrain.h"
 #include "Objects.h"
-#include "Game.h"
 extern XYZ viewer;
 extern float viewdistance;
 extern float lightambient[3],lightbrightness[3];