aboutsummaryrefslogtreecommitdiff
path: root/games/mars/mars.patch
blob: 9cbce2d32ecb6eb4cd8aaa4022c1c8f549e1c178 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
--- mars-game/src/System/window.original.cpp	2014-04-25 21:17:55.251256504 +0300
+++ mars-game/src/System/window.cpp	2014-04-25 21:27:53.395778669 +0300
@@ -33,11 +33,11 @@
 # include <SFML/OpenGL.hpp>
 # include <sstream>
 # include <time.h>
-# include <sys/stat.h>
-
-# ifdef __WIN32__
-    # include <windows.h>
-# endif
+# include <sys/stat.h>
+
+# ifdef __WIN32__
+    # include <windows.h>
+# endif
 
 
 namespace window {
@@ -308,12 +308,12 @@
         glEnable(GL_TEXTURE_2D);
 
         if (shader)
-            shader->bind();
+            shader->bind(NULL);
 
         window_.draw(toBeDrawn, states);
 
         if (shader)
-            shader->unbind();
+            shader->bind(NULL);
 
         window_.popGLStates();
         glPopMatrix();
@@ -361,7 +361,7 @@
 
         std::stringstream filename;
         filename << "ScreenShot_" << timeinfo->tm_year << timeinfo->tm_mon << timeinfo->tm_mday << timeinfo->tm_hour << timeinfo->tm_min << timeinfo->tm_sec << "." << settings::C_screenShotFormat;
-
+
         # ifdef __linux__
             mkdir((settings::C_configPath + "screenshots/").c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
             if (shot.saveToFile(settings::C_configPath + "screenshots/" + filename.str())) {
@@ -369,7 +369,7 @@
                 hud::displayMessage(*locales::getLocale(locales::SavedScreenshot));
             } else {
                 std::cout << "Failed saving screenshot to " << settings::C_configPath << "screenshots/" << filename.str() << "." << std::endl;
-            }
+            }
         # endif
 
         # ifdef __APPLE__
@@ -379,17 +379,17 @@
                 hud::displayMessage(*locales::getLocale(locales::SavedScreenshot));
             } else {
                 std::cout << "Failed saving screenshot to " << settings::C_configPath << "screenshots/" << filename.str() << "." << std::endl;
-            }
-        # endif
-
-        # ifdef __WIN32__
-            CreateDirectory((settings::C_configPath + "screenshots/").c_str(), NULL);
+            }
+        # endif
+
+        # ifdef __WIN32__
+            CreateDirectory((settings::C_configPath + "screenshots/").c_str(), NULL);
             if (shot.SaveToFile(settings::C_configPath + "screenshots/" + filename.str())) {
                 std::cout << "Saved screenshot to " << settings::C_configPath << "screenshots/" << filename.str() << "." << std::endl;
                 hud::displayMessage(*locales::getLocale(locales::SavedScreenshot));
             } else {
                 std::cout << "Failed saving screenshot to " << settings::C_configPath << "screenshots/" << filename.str() << "." << std::endl;
-            }
+            }
         # endif
     }
 
--- mars-game/src/CMakeLists.original.txt	2014-04-25 21:38:37.122730974 +0300
+++ mars-game/src/CMakeLists.txt	2014-04-25 21:41:51.413302008 +0300
@@ -68,7 +68,7 @@
 		TARGETS 
 			mars
 		RUNTIME DESTINATION
-			${CMAKE_INSTALL_PREFIX}/games
+			${CMAKE_INSTALL_PREFIX}/bin
 	)
 	install(
 		FILES