use C++0x, change prerequisites headers
This commit is contained in:
parent
7ef92bb0ac
commit
d29b139321
|
@ -14,8 +14,8 @@ Fonts::~Fonts()
|
|||
bool Fonts::load()
|
||||
{
|
||||
std::list<std::string> files = g_resources.getDirectoryFiles("fonts");
|
||||
foreach(const std::string& file, files) {
|
||||
notice("File: %s", file.c_str());
|
||||
for(auto it = files.begin(); it != files.end(); ++it) {
|
||||
notice("File: %s", (*it).c_str());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
#include "platform.h"
|
||||
#include "graphics.h"
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
PFNGLGENFRAMEBUFFERSPROC oglGenFramebuffers = 0;
|
||||
PFNGLBINDFRAMEBUFFERPROC oglBindFramebuffer = 0;
|
||||
PFNGLFRAMEBUFFERTEXTURE2DPROC oglFramebufferTexture2D = 0;
|
||||
|
|
|
@ -43,8 +43,8 @@ public:
|
|||
void draw(int x, int y, int width, int height);
|
||||
|
||||
private:
|
||||
GLuint m_fboTexture;
|
||||
GLuint m_fbo;
|
||||
unsigned int m_fboTexture;
|
||||
unsigned int m_fbo;
|
||||
bool m_fallbackOldImp;
|
||||
int m_width;
|
||||
int m_height;
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
#include "logger.h"
|
||||
#include "texture.h"
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
Graphics g_graphics;
|
||||
|
||||
Graphics::Graphics()
|
||||
|
|
|
@ -27,12 +27,10 @@
|
|||
|
||||
// easy typing
|
||||
#include <stdint.h>
|
||||
|
||||
typedef unsigned char uchar;
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned int uint;
|
||||
typedef unsigned long ulong;
|
||||
|
||||
typedef uint32_t uint32;
|
||||
typedef uint16_t uint16;
|
||||
typedef uint8_t uint8;
|
||||
|
@ -60,30 +58,16 @@ typedef int8_t int8;
|
|||
#include <map>
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include <tr1/cinttypes>
|
||||
#include <memory>
|
||||
|
||||
// additional string algorithms
|
||||
// boost utilities
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
// easy casting
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
// smart pointers
|
||||
#include <boost/smart_ptr.hpp>
|
||||
|
||||
// foreach
|
||||
#include <boost/foreach.hpp>
|
||||
#define foreach BOOST_FOREACH
|
||||
|
||||
// GL stuff
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
// internal logger
|
||||
#include "logger.h"
|
||||
|
||||
// additional utilities
|
||||
#include "util.h"
|
||||
|
||||
#endif // PREREQUISITES_H
|
||||
#endif // PREREQUISITES_H
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
|
||||
#include "texture.h"
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
Texture::Texture(int width, int height, int components, unsigned char *pixels)
|
||||
{
|
||||
m_size.setWidth(width);
|
||||
|
|
|
@ -41,13 +41,13 @@ public:
|
|||
void enableBilinearFilter();
|
||||
|
||||
const Size& getSize() const { return m_size; }
|
||||
GLuint getTextureId() const { return m_textureId; }
|
||||
unsigned int getTextureId() const { return m_textureId; }
|
||||
|
||||
private:
|
||||
GLuint m_textureId;
|
||||
unsigned int m_textureId;
|
||||
Size m_size;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<Texture> TexturePtr;
|
||||
typedef std::shared_ptr<Texture> TexturePtr;
|
||||
|
||||
#endif // TEXTURE_H
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "prerequisites.h"
|
||||
#include "texture.h"
|
||||
|
||||
typedef boost::weak_ptr<Texture> TextureWeakPtr;
|
||||
typedef std::weak_ptr<Texture> TextureWeakPtr;
|
||||
|
||||
class TextureManager
|
||||
{
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
#include <physfs.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
struct Win32PlatformPrivate {
|
||||
|
|
|
@ -108,7 +108,7 @@ int main(int argc, const char *argv[])
|
|||
|
||||
// state scope
|
||||
{
|
||||
boost::scoped_ptr<MenuState> menuState(new MenuState);
|
||||
std::unique_ptr<MenuState> menuState(new MenuState);
|
||||
g_engine.changeState(menuState.get());
|
||||
|
||||
Platform::showWindow();
|
||||
|
|
Loading…
Reference in New Issue