Skip to content
Browse files

Merge branch 'master' of vds:/home/nick/git/lander

  • Loading branch information...
2 parents 8d26890 + eb8ea04 commit c2ebb8830d1b7bbc909ae4f14a6ffd86c77d302e @nickg committed Jun 6, 2009
View
BIN msvc9/Lander/Lander.suo
Binary file not shown.
View
7 msvc9/Lander/Lander/Lander.vcproj
@@ -42,12 +42,13 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""C:\Documents and Settings\Nick\My Documents\SDL-1.2.13\include";"C:\Documents and Settings\Nick\My Documents\SDL_image-1.2.7\include";"C:\Documents and Settings\Nick\My Documents\SDL_mixer-1.2.8\include";"C:\Program Files\GnuWin32\include\freetype2";"C:\Program Files\GnuWin32\include""
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;VERSION=\"0.5.3\""
+ PreprocessorDefinitions="WIN32;_DEBUG;VERSION=\"0.5.3\""
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
/>
<Tool
@@ -61,7 +62,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="opengl32.lib glu32.lib SDL.lib freetype.lib SDL_mixer.lib SDL_image.lib SDLmain.lib"
+ AdditionalDependencies="opengl32.lib glu32.lib SDL.lib freetype.lib SDL_mixer.lib SDL_image.lib SDLmain.lib libboost_filesystem-vc90-mt-gd-1_37.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;C:\Documents and Settings\Nick\My Documents\SDL-1.2.13\lib&quot;;&quot;C:\Documents and Settings\Nick\My Documents\SDL_image-1.2.7\lib&quot;;&quot;C:\Documents and Settings\Nick\My Documents\SDL_mixer-1.2.8\lib&quot;;&quot;C:\Program Files\GnuWin32\lib&quot;"
GenerateDebugInformation="true"
@@ -118,7 +119,7 @@
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="&quot;C:\Documents and Settings\Nick\My Documents\SDL-1.2.13\include&quot;;&quot;C:\Documents and Settings\Nick\My Documents\SDL_image-1.2.7\include&quot;;&quot;C:\Documents and Settings\Nick\My Documents\SDL_mixer-1.2.8\include&quot;;&quot;C:\Program Files\GnuWin32\include\freetype2&quot;;&quot;C:\Program Files\GnuWin32\include&quot;"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;VERSION=\&quot;0.5.3\&quot;"
+ PreprocessorDefinitions="WIN32;NDEBUG;VERSION=\&quot;0.5.3\&quot;"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
View
4 src/Asteroid.hpp
@@ -24,10 +24,6 @@
#include "Surface.hpp"
#include "ObjectGrid.hpp"
-#include <tr1/memory>
-
-using namespace std::tr1;
-
class Asteroid : public StaticObject {
public:
Asteroid(int x, int y, int width, int surftex);
View
2 src/GraphicsFwd.hpp
@@ -20,7 +20,7 @@
#define INC_GRAPHICSFWD_HPP
class Image;
-class TextureQuad;
+struct TextureQuad;
class Texture;
#endif
View
4 src/HighScores.cpp
@@ -292,9 +292,9 @@ string ScoreFile::GetHighScoreFile()
return GetConfigDir() + ".lander.scores";
}
-bool operator<(const ScoreFile::ScoreEntry& a, const ScoreFile::ScoreEntry& b)
+bool ScoreFile::ScoreEntry::operator<(const ScoreFile::ScoreEntry& rhs) const
{
- return a.GetScore() > b.GetScore();
+ return this->GetScore() > rhs.GetScore();
}
void ScoreFile::Sort()
View
2 src/HighScores.hpp
@@ -49,6 +49,8 @@ class ScoreFile {
void WriteOnStream(ostream& os);
void ReadFromStream(istream& is);
+ bool operator<(const ScoreFile::ScoreEntry& rhs) const;
+
private:
char name[MAX_NAME];
int score;
View
9 src/Main.cpp
@@ -17,6 +17,7 @@
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
+#include "Platform.hpp"
#include "Game.hpp"
#include "Menu.hpp"
#include "HighScores.hpp"
@@ -195,7 +196,13 @@ string GetConfigDir()
return string(getenv("HOME")) + "/";
#else
#ifdef WIN32
- return string(getenv("UserProfile")) + "\\";
+ using namespace boost::filesystem;
+
+ path appdata(getenv("APPDATA"));
+ appdata /= "doof.me.uk";
+ appdata /= "Lander";
+ create_directories(appdata);
+ return appdata.file_string() + "\\";
#else
#error "Need to port GetConfigDir to this platform"
#endif
View
7 src/OpenGL.cpp
@@ -189,8 +189,8 @@ void OpenGL::DrawGLScene()
// Check for OpenGL errors
GLenum error = glGetError();
if (error != GL_NO_ERROR) {
- throw runtime_error
- ("OpenGL error: " + boost::lexical_cast<string>(gluErrorString(error)));
+ //throw runtime_error
+ // ("OpenGL error: " + boost::lexical_cast<string>(gluErrorString(error)));
}
SDL_GL_SwapBuffers();
@@ -350,6 +350,9 @@ bool OpenGL::IsTextureSizeSupported(int width, int height, int ncols, GLenum for
bool OpenGL::InitGL()
{
+ // Clear any error bit (this seems to be required on Windows??)
+ glGetError();
+
// Set options
glShadeModel(GL_SMOOTH); // Enable smooth shading
glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // Black background
View
7 src/Platform.hpp
@@ -32,8 +32,6 @@
#include <algorithm>
#include <cmath>
-using namespace std;
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#else
@@ -55,6 +53,8 @@ using namespace std;
#define M_PI 3.1415926535897932384626433832795
#endif
+#include <boost/tr1/memory.hpp>
+
#define msleep(n) Sleep(n)
#define i18n(x) x
@@ -133,6 +133,9 @@ using namespace std;
#endif /* #ifdef LINUX */
+using namespace std;
+using namespace std::tr1;
+
void RecreateScreens();
string LocateResource(const string& file);
string GetConfigDir();

0 comments on commit c2ebb88

Please sign in to comment.
Something went wrong with that request. Please try again.