]> git.jsancho.org Git - lugaru.git/commitdiff
Fixed 'OpenGL_Windows.cpp' to work on Linux and Windows; Fixed 'Sources/CMakeLists...
authorNeal Gompa <ngompa13@gmail.com>
Thu, 13 May 2010 07:35:07 +0000 (02:35 -0500)
committerNeal Gompa <ngompa13@gmail.com>
Thu, 13 May 2010 07:35:07 +0000 (02:35 -0500)
Source/CMakeLists.txt
Source/OpenGL_Windows.cpp

index b159c58c6e747cc731f29f61663f60966547ace6..3aba8d7b0ac47575d4b6106c9a520cfd8385ba85 100644 (file)
@@ -52,7 +52,6 @@ set(LUGARU_SRCS
        unpack.c
        unpack_private.c
        Weapons.cpp
-       MacCompatibility.cpp
        OpenGL_Windows.cpp
        openal_wrapper.cpp
        WinInput.cpp)
@@ -63,7 +62,6 @@ set(LUGARU_H
        Game.h
        Lights.h
        LinkedList.h
-       MacCompatibility.h
        Models.h
        Objects.h
        Person.h
@@ -102,6 +100,7 @@ if(CMAKE_HOST_APPLE)
        set(LUGARU_H
                ${LUGARU_H}
                "Carbon Include.h"
+               MacCompatibility.h
                CarbonStdCLib.h)
 endif(CMAKE_HOST_APPLE)
 
index 15a71f327276818069a4cdaa280385533152c5d9..ddf9408a26c370822a0dc4c005c21812275de534 100644 (file)
@@ -276,6 +276,21 @@ static int _argc = 0;
 static char **_argv = NULL;
 #endif
 
+#ifdef _WIN32
+bool cmdline(const char *cmd)
+{
+    for (int i = 1; i < _argc; i++)
+    {
+        char *arg = _argv[i];
+        while (*arg == '-')
+            arg++;
+        if (strcasecmp(arg, cmd) == 0)
+            return true;
+    }
+
+    return false;
+}
+#else
 bool cmdline(const char *cmd)
 {
     for (int i = 1; i < _argc; i++)
@@ -289,6 +304,7 @@ bool cmdline(const char *cmd)
 
     return false;
 }
+#endif
 
 
 // --------------------------------------------------------------------------