Added/Fixed support for Mac OS X.

Added/Fixed support for 64 bits platforms.
This commit is contained in:
spartanj@gmail.com
2011-07-11 02:39:21 -03:00
parent 5c80592528
commit 7b6a6ee817
66 changed files with 178 additions and 182 deletions

View File

@@ -1,5 +1,6 @@
STRLOWERCASE = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1))))))))))))))))))))))))))
OS = $(strip $(call STRLOWERCASE, $(shell uname) ) )
SDLVERSION = $(shell sdl-config --version)
export CFLAGS = -Wall -Wno-unknown-pragmas $(FINALFLAGS) $(BUILDFLAGS) $(BACKENDFLAGS)
@@ -71,7 +72,12 @@ ifeq ($(BACKEND_SDL), yes)
SDL_BACKEND_LINK = libs/$(OS)/libSDL.a
SDL_BACKEND_SRC = $(wildcard ./src/window/backend/SDL13/*.cpp)
else
ifeq ($(OS), darwin)
SDL_BACKEND_LINK = -framework Cocoa -lSDL -lSDLmain
else
SDL_BACKEND_LINK = -lSDL
endif
SDL_BACKEND_SRC = $(wildcard ./src/window/backend/SDL/*.cpp)
endif
@@ -83,7 +89,13 @@ else
endif
ifeq ($(BACKEND_ALLEGRO), yes)
ifeq ($(OS), darwin)
ALLEGRO_BACKEND_LINK = -lallegro -lallegro_main
else
ALLEGRO_BACKEND_LINK = -lallegro
endif
ALLEGRO_BACKEND_SRC = $(wildcard ./src/window/backend/allegro5/*.cpp)
ALLEGRO_DEFINE = -DEE_BACKEND_ALLEGRO_ACTIVE
else
@@ -121,8 +133,8 @@ PLATFORMSRC = $(wildcard ./src/window/platform/x11/*.cpp)
else
ifeq ($(OS), darwin)
LIBS = -lfreetype -lSDL -lSDLmain -framework OpenGL -framework OpenAL -framework Cocoa -framework CoreFoundation -framework AGL $(LIBSNDFILE)
OTHERINC = -I/usr/include/freetype2
LIBS = -lfreetype -framework OpenGL -framework OpenAL -framework CoreFoundation -framework AGL $(LIBSNDFILE) $(SDL_BACKEND_LINK) $(ALLEGRO_BACKEND_LINK)
OTHERINC = -I/usr/include/freetype2 -I/usr/local/include/freetype2
PLATFORMSRC = $(wildcard ./src/window/platform/osx/*.cpp)
else

View File

@@ -2,7 +2,7 @@
namespace EE { namespace Gaming {
cIsoMap::cIsoMap( cWindow * window ) :
cIsoMap::cIsoMap( Window::cWindow * window ) :
mWindow( window ),
mOffsetX(0),
mOffsetY(0),

View File

@@ -31,7 +31,7 @@ class EE_API cIsoTile {
class EE_API cIsoMap {
public:
cIsoMap( cWindow * window = NULL );
cIsoMap( Window::cWindow * window = NULL );
~cIsoMap();
@@ -81,7 +81,7 @@ class EE_API cIsoMap {
protected:
std::vector<cIsoTile> Map;
cWindow * mWindow;
Window::cWindow * mWindow;
eeColor mMapAmbientColor;
eeUint mMapWidth;
eeUint mMapHeight;

View File

@@ -47,7 +47,7 @@ void cMap::DeleteLayers() {
mLayerCount = 0;
}
void cMap::Create( eeSize Size, Uint32 MaxLayers, eeSize TileSize, Uint32 Flags, eeSize viewSize, cWindow * Window ) {
void cMap::Create( eeSize Size, Uint32 MaxLayers, eeSize TileSize, Uint32 Flags, eeSize viewSize, Window::cWindow * Window ) {
Reset();
mWindow = Window;

View File

@@ -26,7 +26,7 @@ class cMap {
virtual ~cMap();
virtual void Create( eeSize Size, Uint32 MaxLayers, eeSize TileSize, Uint32 Flags = 0, eeSize viewSize = eeSize( 800, 600 ), cWindow * Window = NULL );
virtual void Create( eeSize Size, Uint32 MaxLayers, eeSize TileSize, Uint32 Flags = 0, eeSize viewSize = eeSize( 800, 600 ), Window::cWindow * Window = NULL );
virtual cLayer * AddLayer( Uint32 Type, Uint32 flags, std::string name );
@@ -122,7 +122,7 @@ class cMap {
void SetCreateGameObjectCallback( const CreateGOCb& Cb );
protected:
cWindow * mWindow;
Window::cWindow * mWindow;
cLayer** mLayers;
Uint32 mFlags;
Uint32 mMaxLayers;

View File

@@ -3,6 +3,12 @@
#include "../base.hpp"
#ifdef EE_64BIT
#define GL_FP GL_DOUBLE
#else
#define GL_FP GL_FLOAT
#endif
#if ( defined( EE_GLES2 ) || defined( EE_GLES1 ) ) && !defined( EE_GLES )
#define EE_GLES
#endif

View File

@@ -120,12 +120,12 @@ void cBatchRenderer::Flush() {
Uint32 alloc = sizeof(eeVertex) * NumVertex;
GLi->VertexPointer ( 2, GL_FLOAT , sizeof(eeVertex), reinterpret_cast<char*> ( &mVertex[0] ) , alloc );
GLi->VertexPointer ( 2, GL_FP , sizeof(eeVertex), reinterpret_cast<char*> ( &mVertex[0] ) , alloc );
GLi->ColorPointer ( 4, GL_UNSIGNED_BYTE , sizeof(eeVertex), reinterpret_cast<char*> ( &mVertex[0] ) + sizeof(eeVector2f) + sizeof(eeTexCoord) , alloc );
if ( NULL != mTexture ) {
cTextureFactory::instance()->Bind( mTexture );
GLi->TexCoordPointer( 2, GL_FLOAT , sizeof(eeVertex), reinterpret_cast<char*> ( &mVertex[0] ) + sizeof(eeVector2f) , alloc );
GLi->TexCoordPointer( 2, GL_FP , sizeof(eeVertex), reinterpret_cast<char*> ( &mVertex[0] ) + sizeof(eeVector2f) , alloc );
} else {
GLi->Disable( GL_TEXTURE_2D );
GLi->DisableClientState( GL_TEXTURE_COORD_ARRAY );

View File

@@ -9,7 +9,7 @@ using namespace EE::Window;
namespace EE { namespace Graphics {
cConsole::cConsole( cWindow * window ) :
cConsole::cConsole( Window::cWindow * window ) :
mWindow( window ),
mConColor(35, 47, 73, 230),
mConLineColor(55, 67, 93, 230),

View File

@@ -16,7 +16,7 @@ class EE_API cConsole{
//! The Console Callback return a vector of parameters ( String )
typedef cb::Callback1<void, const std::vector < String >& > ConsoleCallback;
cConsole( cWindow * window = NULL );
cConsole( Window::cWindow * window = NULL );
~cConsole();
@@ -123,7 +123,7 @@ class EE_API cConsole{
std::deque < String > mCmdLog;
std::deque < String > mLastCommands;
cWindow * mWindow;
Window::cWindow * mWindow;
eeColorA mConColor;
eeColorA mConLineColor;

View File

@@ -293,8 +293,8 @@ void cFont::Draw( cTextCache& TextCache, const eeFloat& X, const eeFloat& Y, con
Uint32 alloc = numvert * sizeof(eeVertexCoords);
GLi->ColorPointer ( 4, GL_UNSIGNED_BYTE , 0 , reinterpret_cast<char*>( &Colors[0] ) , alloc );
GLi->TexCoordPointer( 2, GL_FLOAT , sizeof(eeVertexCoords), reinterpret_cast<char*>( &RenderCoords[0] ) , alloc );
GLi->VertexPointer ( 2, GL_FLOAT , sizeof(eeVertexCoords), reinterpret_cast<char*>( &RenderCoords[0] ) + sizeof(eeFloat) * 2 , alloc );
GLi->TexCoordPointer( 2, GL_FP , sizeof(eeVertexCoords), reinterpret_cast<char*>( &RenderCoords[0] ) , alloc );
GLi->VertexPointer ( 2, GL_FP , sizeof(eeVertexCoords), reinterpret_cast<char*>( &RenderCoords[0] ) + sizeof(eeFloat) * 2 , alloc );
#ifndef EE_GLES
GLi->DrawArrays( GL_QUADS, 0, numvert );
@@ -464,8 +464,8 @@ void cFont::SubDraw( const String& Text, const eeFloat& X, const eeFloat& Y, con
Uint32 alloc = numvert * sizeof(eeVertexCoords);
GLi->ColorPointer ( 4, GL_UNSIGNED_BYTE , 0 , reinterpret_cast<char*>( &mColors[0] ) , alloc );
GLi->TexCoordPointer ( 2, GL_FLOAT , sizeof(eeVertexCoords), reinterpret_cast<char*>( &mRenderCoords[0] ) , alloc );
GLi->VertexPointer ( 2, GL_FLOAT , sizeof(eeVertexCoords), reinterpret_cast<char*>( &mRenderCoords[0] ) + sizeof(eeFloat) * 2 , alloc );
GLi->TexCoordPointer ( 2, GL_FP , sizeof(eeVertexCoords), reinterpret_cast<char*>( &mRenderCoords[0] ) , alloc );
GLi->VertexPointer ( 2, GL_FP , sizeof(eeVertexCoords), reinterpret_cast<char*>( &mRenderCoords[0] ) + sizeof(eeFloat) * 2 , alloc );
#ifndef EE_GLES
GLi->DrawArrays( GL_QUADS, 0, numvert );

View File

@@ -9,7 +9,7 @@ using namespace EE::Graphics::Private;
namespace EE { namespace Graphics {
cFrameBuffer * cFrameBuffer::CreateNew( const Uint32& Width, const Uint32& Height, bool DepthBuffer, cWindow * window ) {
cFrameBuffer * cFrameBuffer::CreateNew( const Uint32& Width, const Uint32& Height, bool DepthBuffer, Window::cWindow * window ) {
if ( cFrameBufferFBO::IsSupported() )
return eeNew( cFrameBufferFBO, ( Width, Height, DepthBuffer, window ) );
@@ -19,7 +19,7 @@ cFrameBuffer * cFrameBuffer::CreateNew( const Uint32& Width, const Uint32& Heigh
return NULL;
}
cFrameBuffer::cFrameBuffer( cWindow * window ) :
cFrameBuffer::cFrameBuffer( Window::cWindow * window ) :
mWindow( window ),
mWidth(0),
mHeight(0),

View File

@@ -12,9 +12,9 @@ namespace EE { namespace Graphics {
class EE_API cFrameBuffer {
public:
static cFrameBuffer * CreateNew( const Uint32& Width, const Uint32& Height, bool DepthBuffer = false, cWindow * window = NULL );
static cFrameBuffer * CreateNew( const Uint32& Width, const Uint32& Height, bool DepthBuffer = false, Window::cWindow * window = NULL );
cFrameBuffer( cWindow * window );
cFrameBuffer( Window::cWindow * window );
virtual ~cFrameBuffer();
@@ -40,7 +40,7 @@ class EE_API cFrameBuffer {
const bool& HasDepthBuffer() const;
protected:
cWindow * mWindow;
Window::cWindow * mWindow;
Int32 mWidth;
Int32 mHeight;
bool mHasDepthBuffer;

View File

@@ -9,13 +9,13 @@ bool cFrameBufferFBO::IsSupported() {
return 0 != GLi->IsExtension( EEGL_EXT_framebuffer_object );
}
cFrameBufferFBO::cFrameBufferFBO( cWindow * window ) :
cFrameBufferFBO::cFrameBufferFBO( Window::cWindow * window ) :
cFrameBuffer( window ),
mFrameBuffer(0),
mDepthBuffer(0)
{}
cFrameBufferFBO::cFrameBufferFBO( const Uint32& Width, const Uint32& Height, bool DepthBuffer, cWindow * window ) :
cFrameBufferFBO::cFrameBufferFBO( const Uint32& Width, const Uint32& Height, bool DepthBuffer, Window::cWindow * window ) :
cFrameBuffer( window ),
mFrameBuffer(0),
mDepthBuffer(0)

View File

@@ -9,11 +9,11 @@ namespace EE { namespace Graphics {
class EE_API cFrameBufferFBO : public cFrameBuffer {
public:
cFrameBufferFBO( cWindow * window = NULL );
cFrameBufferFBO( Window::cWindow * window = NULL );
~cFrameBufferFBO();
cFrameBufferFBO( const Uint32& Width, const Uint32& Height, bool DepthBuffer = false, cWindow * window = NULL );
cFrameBufferFBO( const Uint32& Width, const Uint32& Height, bool DepthBuffer = false, Window::cWindow * window = NULL );
bool Create( const Uint32& Width, const Uint32& Height );

View File

@@ -4,7 +4,7 @@
namespace EE { namespace Graphics {
cFrameBufferPBuffer::cFrameBufferPBuffer( cWindow * window )
cFrameBufferPBuffer::cFrameBufferPBuffer( Window::cWindow * window )
#if EE_PLATFORM == EE_PLATFORM_WIN
: cFrameBuffer( window ),
mDeviceContext( NULL ),
@@ -24,7 +24,7 @@ cFrameBufferPBuffer::cFrameBufferPBuffer( cWindow * window )
#endif
}
cFrameBufferPBuffer::cFrameBufferPBuffer( const Uint32& Width, const Uint32& Height, bool DepthBuffer, cWindow * window )
cFrameBufferPBuffer::cFrameBufferPBuffer( const Uint32& Width, const Uint32& Height, bool DepthBuffer, Window::cWindow * window )
#if EE_PLATFORM == EE_PLATFORM_WIN
: cFrameBuffer( window ),
mDeviceContext( NULL ),

View File

@@ -38,7 +38,7 @@
#include <X11/Xlib.h>
#elif EE_PLATFORM == EE_PLATFORM_MACOSX
//#include <AGL/agl.h>
#warning No PBuffer implemented on MAC
//#warning No PBuffer implemented on MAC
#else
#warning No PBuffer implemented on this platform
#endif
@@ -49,11 +49,11 @@ namespace EE { namespace Graphics {
class EE_API cFrameBufferPBuffer : public cFrameBuffer {
public:
cFrameBufferPBuffer( cWindow * window = NULL );
cFrameBufferPBuffer( Window::cWindow * window = NULL );
~cFrameBufferPBuffer();
cFrameBufferPBuffer( const Uint32& Width, const Uint32& Height, bool DepthBuffer = false, cWindow * window = NULL );
cFrameBufferPBuffer( const Uint32& Width, const Uint32& Height, bool DepthBuffer = false, Window::cWindow * window = NULL );
bool Create( const Uint32& Width, const Uint32& Height );

View File

@@ -271,8 +271,8 @@ void cParticleSystem::Draw() {
Uint32 alloc = mPCount * sizeof(cParticle);
GLi->ColorPointer ( 4, GL_FLOAT, sizeof(cParticle), reinterpret_cast<char*>( &mParticle[0] ) + sizeof(eeFloat) * 2 , alloc );
GLi->VertexPointer ( 2, GL_FLOAT, sizeof(cParticle), reinterpret_cast<char*>( &mParticle[0] ) , alloc );
GLi->ColorPointer ( 4, GL_FP, sizeof(cParticle), reinterpret_cast<char*>( &mParticle[0] ) + sizeof(eeFloat) * 2 , alloc );
GLi->VertexPointer ( 2, GL_FP, sizeof(cParticle), reinterpret_cast<char*>( &mParticle[0] ) , alloc );
GLi->DrawArrays( GL_POINTS, 0, (GLsizei)mPCount );

View File

@@ -81,7 +81,7 @@ const eeVector2f& cScrollParallax::Position() const {
void cScrollParallax::Draw() {
if ( NULL != mShape && mAABB.Left != mAABB.Right && mAABB.Top != mAABB.Bottom && 0 != mColor.Alpha ) {
mPos += ( ( mSpeed * (eeFloat)mElapsed.Elapsed() ) / 1000.f );
mPos += ( ( mSpeed * (eeFloat)mElapsed.Elapsed() ) / (eeFloat)1000 );
if ( mPos.x > mAABB.Left + mRealSize.Width() || mPos.x < mAABB.Left - mRealSize.Width() )
mPos.x = mAABB.Left;

View File

@@ -39,7 +39,7 @@ void cVertexBufferOGL::SetVertexStates() {
/// POSITION
if( VERTEX_FLAG_QUERY( mVertexFlags, VERTEX_FLAG_POSITION ) ) {
GLi->EnableClientState( GL_VERTEX_ARRAY );
GLi->VertexPointer( eeVertexElements[ VERTEX_FLAG_POSITION ], GL_FLOAT, sizeof(float) * eeVertexElements[ VERTEX_FLAG_POSITION ], &mVertexArray[ VERTEX_FLAG_POSITION ][0], alloc );
GLi->VertexPointer( eeVertexElements[ VERTEX_FLAG_POSITION ], GL_FP, sizeof(eeFloat) * eeVertexElements[ VERTEX_FLAG_POSITION ], &mVertexArray[ VERTEX_FLAG_POSITION ][0], alloc );
} else {
GLi->DisableClientState( GL_VERTEX_ARRAY );
}
@@ -59,7 +59,7 @@ void cVertexBufferOGL::SetVertexStates() {
GLi->ClientActiveTexture( GL_TEXTURE0 + i );
GLi->EnableClientState( GL_TEXTURE_COORD_ARRAY );
GLi->TexCoordPointer( eeVertexElements[ VERTEX_FLAG_TEXTURE0 + i ], GL_FLOAT, sizeof(float) * eeVertexElements[ VERTEX_FLAG_TEXTURE0 + i ], &mVertexArray[ VERTEX_FLAG_TEXTURE0 + i ][0], alloc );
GLi->TexCoordPointer( eeVertexElements[ VERTEX_FLAG_TEXTURE0 + i ], GL_FP, sizeof(eeFloat) * eeVertexElements[ VERTEX_FLAG_TEXTURE0 + i ], &mVertexArray[ VERTEX_FLAG_TEXTURE0 + i ][0], alloc );
} else {
GLi->Disable( GL_TEXTURE_2D );
GLi->DisableClientState( GL_TEXTURE_COORD_ARRAY );
@@ -68,7 +68,7 @@ void cVertexBufferOGL::SetVertexStates() {
} else {
if ( VERTEX_FLAG_QUERY( mVertexFlags, VERTEX_FLAG_TEXTURE0 ) ) {
GLi->EnableClientState( GL_TEXTURE_COORD_ARRAY );
GLi->TexCoordPointer( eeVertexElements[ VERTEX_FLAG_TEXTURE0 ], GL_FLOAT, sizeof(float) * eeVertexElements[ VERTEX_FLAG_TEXTURE0 ], &mVertexArray[ VERTEX_FLAG_TEXTURE0 ][0], alloc );
GLi->TexCoordPointer( eeVertexElements[ VERTEX_FLAG_TEXTURE0 ], GL_FP, sizeof(eeFloat) * eeVertexElements[ VERTEX_FLAG_TEXTURE0 ], &mVertexArray[ VERTEX_FLAG_TEXTURE0 ][0], alloc );
} else {
GLi->Disable( GL_TEXTURE_2D );
GLi->DisableClientState( GL_TEXTURE_COORD_ARRAY );

View File

@@ -153,13 +153,13 @@ void cVertexBufferVBO::SetVertexStates() {
index = GLi->GetRendererGL3()->GetStateIndex( EEGL_VERTEX_ARRAY );
if ( -1 != index ) {
glVertexAttribPointerARB( index, eeVertexElements[ VERTEX_FLAG_POSITION ], GL_FLOAT, GL_FALSE, 0, 0 );
glVertexAttribPointerARB( index, eeVertexElements[ VERTEX_FLAG_POSITION ], GL_FP, GL_FALSE, 0, 0 );
}
}
else
#endif
{
GLi->VertexPointer( eeVertexElements[ VERTEX_FLAG_POSITION ], GL_FLOAT, 0, (char*)NULL, 0 );
GLi->VertexPointer( eeVertexElements[ VERTEX_FLAG_POSITION ], GL_FP, 0, (char*)NULL, 0 );
}
} else {
GLi->DisableClientState( GL_VERTEX_ARRAY );
@@ -200,12 +200,12 @@ void cVertexBufferVBO::SetVertexStates() {
index = GLi->GetRendererGL3()->GetStateIndex( EEGL_TEXTURE_COORD_ARRAY );
if ( -1 != index && 0 == i )
glVertexAttribPointerARB( index, eeVertexElements[ VERTEX_FLAG_TEXTURE0 + i ], GL_FLOAT, GL_FALSE, 0, 0 );
glVertexAttribPointerARB( index, eeVertexElements[ VERTEX_FLAG_TEXTURE0 + i ], GL_FP, GL_FALSE, 0, 0 );
}
else
#endif
{
GLi->TexCoordPointer( eeVertexElements[ VERTEX_FLAG_TEXTURE0 + i ], GL_FLOAT, 0, (char*)NULL, 0 );
GLi->TexCoordPointer( eeVertexElements[ VERTEX_FLAG_TEXTURE0 + i ], GL_FP, 0, (char*)NULL, 0 );
}
mTextured = true;
@@ -228,12 +228,12 @@ void cVertexBufferVBO::SetVertexStates() {
index = GLi->GetRendererGL3()->GetStateIndex( EEGL_TEXTURE_COORD_ARRAY );
if ( -1 != index )
glVertexAttribPointerARB( index, eeVertexElements[ VERTEX_FLAG_TEXTURE0 ], GL_FLOAT, GL_FALSE, 0, 0 );
glVertexAttribPointerARB( index, eeVertexElements[ VERTEX_FLAG_TEXTURE0 ], GL_FP, GL_FALSE, 0, 0 );
}
else
#endif
{
GLi->TexCoordPointer( eeVertexElements[ VERTEX_FLAG_TEXTURE0 ], GL_FLOAT, 0, (char*)NULL, 0 );
GLi->TexCoordPointer( eeVertexElements[ VERTEX_FLAG_TEXTURE0 ], GL_FP, 0, (char*)NULL, 0 );
}
mTextured = true;

View File

@@ -130,7 +130,12 @@ cpflerpconst(cpFloat f1, cpFloat f2, cpFloat d)
}
/// Hash value type.
typedef unsigned int cpHashValue;
#include "../sophist/sophist.h"
#if 1 == SOPHIST_pointer64
typedef SOPHIST_uint64 cpHashValue;
#else
typedef SOPHIST_uint32 cpHashValue;
#endif
/// Chipmunk's boolean type.
/// Oh C, how we love to define our own boolean types to get compiler compatibility

View File

@@ -16,9 +16,11 @@ eeInt eeRandi( const eeInt& fMin, const eeInt& fMax ) {
return (eeInt)(fMin + (fMax - fMin + 1) * ( rand() / ( (eeFloat) RAND_MAX + 1) ) );
}
#ifndef EE_64BIT
eeDouble eeRound( eeDouble r ) {
return (r > 0.0) ? floor(r + 0.5) : ceil(r - 0.5);
}
#endif
eeFloat eeRound( eeFloat r ) {
return (r > 0.0f) ? floor(r + 0.5f) : ceil(r - 0.5f);

View File

@@ -57,7 +57,9 @@ T LineAngle( const T& X1, const T& Y1, const T& X2, const T& Y2 ) {
return eeatan2( (eeFloat)(Y2 - Y1), (eeFloat)(X2 - X1) ) * EE_180_PI;
}
#ifndef EE_64BIT
eeDouble EE_API eeRound( eeDouble r );
#endif
eeFloat EE_API eeRound( eeFloat r );

View File

@@ -27,6 +27,7 @@ void cEETest::Init() {
mAxisX = 0;
mAxisY = 0;
mCurDemo = 0xFFFFFF;
MyPath = GetProcessPath();
@@ -125,7 +126,7 @@ void cEETest::Init() {
if ( NULL != mFBO )
mFBO->ClearColor( eeColorAf( 0, 0, 0, 0.5f ) );
eePolygon2f Poly = CreateRoundedPolygon( 0.f, 0.f, 256.f, 50.f );
eePolygon2f Poly = CreateRoundedPolygon<eeFloat>( 0, 0, 256, 50 );
mVBO = cVertexBuffer::Create( VERTEX_FLAG_GET( VERTEX_FLAG_POSITION ) | VERTEX_FLAG_GET( VERTEX_FLAG_COLOR ), DM_POLYGON );
@@ -852,24 +853,6 @@ void cEETest::LoadTextures() {
CreateTiling(Wireframe);
Log->Writef( "Map creation time: %f", te.Elapsed() );
cMTRand Rand( 0xFF00FF00 );
/*mMap = eeNew( cMap, () );
mMap->Create( eeSize(25,25), 8, eeSize(32,32), MAP_FLAG_CLAMP_BODERS | MAP_FLAG_CLIP_AREA );
mMap->AddLayer( MAP_LAYER_TILED, 0, "ground" );
mMap->Position( eeVector2i( mWindow->GetWidth() / 2 - mMap->ViewSize().Width() / 2, mWindow->GetHeight() / 2 - mMap->ViewSize().Height() / 2 ) );
cTileLayer * TLayer = reinterpret_cast<cTileLayer*> ( mMap->GetLayer(0) );
for ( x = 0; x < mMap->Size().Width(); x++ ) {
for ( y = 0; y < mMap->Size().Height(); y++ ) {
TLayer->AddGameObject(
eeNew(
cGameObjectShape, ( GObjFlags::GAMEOBJECT_STATIC, Tiles[ Rand.RandRange( 0, 5 ) ] )
), eeVector2i( x, y )
);
}
}*/
}
void cEETest::RandomizeHeights() {
@@ -999,7 +982,7 @@ void cEETest::Screen2() {
if ( mUseShaders ) {
mBlurFactor = ( 1.5f * 0.01f ) - ( scale * 0.01f );
mShaderProgram->Bind();
mShaderProgram->SetUniform( "blurfactor" , mBlurFactor );
mShaderProgram->SetUniform( "blurfactor" , (float)mBlurFactor );
}
TNP[6]->DrawFast( PlanetX, PlanetY, ang, scale);
@@ -1135,11 +1118,6 @@ void cEETest::Screen4() {
}
void cEETest::Screen5() {
/*mMap->Update();
mMap->Draw();
cPrimitives p;
p.DrawRectangle( mMap->Position().x, mMap->Position().y, mMap->ViewSize().Width(), mMap->ViewSize().Height(), 0, 1, EE_DRAW_LINE );*/
}
void cEETest::Render() {
@@ -1471,24 +1449,6 @@ void cEETest::Input() {
ShowParticles = !ShowParticles;
}
break;
case 5:
if ( KM->IsKeyDown(KEY_LEFT) ) {
mMap->Move( mWindow->Elapsed() * 0.2f, 0 );
}
if ( KM->IsKeyDown(KEY_RIGHT) ) {
mMap->Move( -mWindow->Elapsed() * 0.2f, 0 );
}
if ( KM->IsKeyDown(KEY_UP) ) {
mMap->Move( 0, mWindow->Elapsed() * 0.2f );
}
if ( KM->IsKeyDown(KEY_DOWN) ) {
mMap->Move( 0, -mWindow->Elapsed() * 0.2f );
}
break;
}
}
@@ -1527,7 +1487,6 @@ void cEETest::End() {
eeSAFE_DELETE( mVBO );
eeSAFE_DELETE( mBoxSprite );
eeSAFE_DELETE( mCircleSprite );
eeSAFE_DELETE( mMap );
cLog::instance()->Save();
@@ -1739,7 +1698,8 @@ void cEETest::Demo2Destroy() {
void cEETest::ChangeDemo( Uint32 num ) {
if ( num < mDemo.size() ) {
mDemo[ mCurDemo ].destroy();
if ( 0xFFFFFF != mCurDemo )
mDemo[ mCurDemo ].destroy();
mCurDemo = num;
@@ -1810,6 +1770,11 @@ void cEETest::PhysicsDestroy() {
mDemo[ mCurDemo ].destroy();
}
#if EE_PLATFORM == EE_PLATFORM_MACOSX
#include <SDL/SDL_main.h>
#include <allegro5/allegro.h>
#endif
int main (int argc, char * argv []) {
cEETest * Test = eeNew( cEETest, () );
@@ -1818,7 +1783,8 @@ int main (int argc, char * argv []) {
eeDelete( Test );
EE::MemoryManager::LogResults();
/*
/**
cTexturePacker tp( 512, 512, true, 2 );
tp.AddTexturesPath( GetProcessPath() + "data/tetg" );
tp.PackTextures();

View File

@@ -87,7 +87,7 @@ class cEETest : private cThread {
eeFloat PSElapsed;
private:
cEngine * EE;
cWindow * mWindow;
Window::cWindow * mWindow;
cTextureFactory* TF;
cLog* Log;
cInput* KM;
@@ -271,7 +271,6 @@ class cEETest : private cThread {
cSprite * mBoxSprite;
cSprite * mCircleSprite;
cMap * mMap;
cUITheme * mTheme;
};

View File

@@ -24,7 +24,7 @@ cUIManager::~cUIManager() {
Shutdown();
}
void cUIManager::Init( Uint32 Flags, cWindow * window ) {
void cUIManager::Init( Uint32 Flags, Window::cWindow * window ) {
if ( mInit )
Shutdown();
@@ -305,7 +305,7 @@ void cUIManager::SendMouseDown( cUIControl * ToCtrl, const eeVector2i& Pos, cons
ToCtrl->OnMouseDown( Pos, Flags );
}
cWindow * cUIManager::GetWindow() const {
Window::cWindow * cUIManager::GetWindow() const {
return mWindow;
}

View File

@@ -25,7 +25,7 @@ class EE_API cUIManager : public tSingleton<cUIManager> {
void OverControl( cUIControl * Ctrl );
void Init( Uint32 Flags = 0, cWindow * window = NULL );
void Init( Uint32 Flags = 0, Window::cWindow * window = NULL );
void Shutdown();
@@ -69,14 +69,14 @@ class EE_API cUIManager : public tSingleton<cUIManager> {
void SendMouseDown( cUIControl * ToCtrl, const eeVector2i& Pos, const Uint32 Flags );
cWindow * GetWindow() const;
Window::cWindow * GetWindow() const;
/** Control where the mouse click started to be down */
cUIControl * DownControl() const;
cUIControl * LossFocusControl() const;
protected:
cWindow * mWindow;
Window::cWindow * mWindow;
cInput * mKM;
cUIWindow * mControl;
cUIControl * mFocusControl;

View File

@@ -185,7 +185,7 @@ static LARGE_INTEGER hires_ticks_per_second;
#endif
#if EE_PLATFORM == EE_PLATFORM_LINUX || EE_PLATFORM == EE_PLATFORM_MACOSX || EE_PLATFORM == EE_PLATFORM_BSD
#if EE_PLATFORM == EE_PLATFORM_LINUX || EE_PLATFORM == EE_PLATFORM_BSD
#define HAVE_CLOCK_GETTIME
#endif
@@ -249,7 +249,6 @@ static void eeStartTicks() {
clock_gettime(CLOCK_MONOTONIC, &start);
#else
gettimeofday(&start, NULL);
#warning eeStartTicks implemented with gettimeofday. Probably the platform is not fully supported.
#endif
#endif
@@ -603,9 +602,13 @@ bool IsDirectory( const String& path ) {
bool IsDirectory( const std::string& path ) {
#ifndef EE_COMPILER_MSVC
DIR *dp;
DIR *dp = NULL;
bool isdir = !( ( dp = opendir( path.c_str() ) ) == NULL);
closedir(dp);
if ( NULL != dp )
closedir(dp);
return isdir;
#else
return GetFileAttributes( (LPCTSTR) path.c_str() ) != INVALID_FILE_ATTRIBUTES;

View File

@@ -27,7 +27,7 @@ class EE_API cClipboardSDL : public cClipboard {
protected:
friend class cWindowSDL;
cClipboardSDL( cWindow * window );
cClipboardSDL( Window::cWindow * window );
void Init();

View File

@@ -13,7 +13,7 @@ namespace EE { namespace Window { namespace Backend { namespace SDL {
class cCursorManagerSDL : public cCursorManager {
public:
cCursorManagerSDL( cWindow * window );
cCursorManagerSDL( Window::cWindow * window );
cCursor * Create( cTexture * tex, const eeVector2i& hotspot, const std::string& name );
@@ -29,8 +29,8 @@ class cCursorManagerSDL : public cCursorManager {
void Hide();
void Visible( bool visible );
void Visible( bool visible );
void Remove( cCursor * cursor, bool Delete = false );
void Reload();

View File

@@ -4,17 +4,17 @@
namespace EE { namespace Window { namespace Backend { namespace SDL {
cCursorSDL::cCursorSDL( cTexture * tex, const eeVector2i& hotspot, const std::string& name, cWindow * window ) :
cCursorSDL::cCursorSDL( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
cCursor( tex, hotspot, name, window )
{
}
cCursorSDL::cCursorSDL( cImage * img, const eeVector2i& hotspot, const std::string& name, cWindow * window ) :
cCursorSDL::cCursorSDL( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
cCursor( img, hotspot, name, window )
{
}
cCursorSDL::cCursorSDL( const std::string& path, const eeVector2i& hotspot, const std::string& name, cWindow * window ) :
cCursorSDL::cCursorSDL( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
cCursor( path, hotspot, name, window )
{
}

View File

@@ -13,11 +13,11 @@ class cCursorSDL : public cCursor {
protected:
friend class cCursorManagerSDL;
cCursorSDL( cTexture * tex, const eeVector2i& hotspot, const std::string& name, cWindow * window );
cCursorSDL( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window );
cCursorSDL( cImage * img, const eeVector2i& hotspot, const std::string& name, cWindow * window );
cCursorSDL( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window );
cCursorSDL( const std::string& path, const eeVector2i& hotspot, const std::string& name, cWindow * window );
cCursorSDL( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window );
void Create();
};

View File

@@ -27,7 +27,7 @@ class EE_API cInputSDL : public cInput {
protected:
friend class cWindowSDL;
cInputSDL( cWindow * window );
cInputSDL( Window::cWindow * window );
virtual void Init();
};

View File

@@ -357,9 +357,9 @@ std::vector< std::pair<unsigned int, unsigned int> > cWindowSDL::GetPossibleReso
}
void cWindowSDL::SetGamma( eeFloat Red, eeFloat Green, eeFloat Blue ) {
eeclamp( &Red , 0.1f, 10.0f );
eeclamp( &Green , 0.1f, 10.0f );
eeclamp( &Blue , 0.1f, 10.0f );
eeclamp<eeFloat>( &Red , 0.1f, 10.0f );
eeclamp<eeFloat>( &Green , 0.1f, 10.0f );
eeclamp<eeFloat>( &Blue , 0.1f, 10.0f );
SDL_SetGamma( Red, Green, Blue );
}
@@ -369,7 +369,8 @@ eeWindowHandler cWindowSDL::GetWindowHandler() {
#elif defined( EE_X11_PLATFORM )
return mWMinfo.info.x11.display;
#elif EE_PLATFORM == EE_PLATFORM_MACOSX
return mWMinfo.cocoa.window;
//return mWMinfo.cocoa.window;
return mWMinfo.info.x11.display;
#else
return 0;
#endif

View File

@@ -23,7 +23,7 @@ class EE_API cClipboardSDL : public cClipboard {
protected:
friend class cWindowSDL;
cClipboardSDL( cWindow * window );
cClipboardSDL( Window::cWindow * window );
void Init();
};

View File

@@ -12,7 +12,7 @@ namespace EE { namespace Window { namespace Backend { namespace SDL13 {
class cCursorManagerSDL : public cCursorManager {
public:
cCursorManagerSDL( cWindow * window );
cCursorManagerSDL( Window::cWindow * window );
cCursor * Create( cTexture * tex, const eeVector2i& hotspot, const std::string& name );

View File

@@ -4,21 +4,21 @@
namespace EE { namespace Window { namespace Backend { namespace SDL13 {
cCursorSDL::cCursorSDL( cTexture * tex, const eeVector2i& hotspot, const std::string& name, cWindow * window ) :
cCursorSDL::cCursorSDL( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
cCursor( tex, hotspot, name, window ),
mCursor( NULL )
{
Create();
}
cCursorSDL::cCursorSDL( cImage * img, const eeVector2i& hotspot, const std::string& name, cWindow * window ) :
cCursorSDL::cCursorSDL( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
cCursor( img, hotspot, name, window ),
mCursor( NULL )
{
Create();
}
cCursorSDL::cCursorSDL( const std::string& path, const eeVector2i& hotspot, const std::string& name, cWindow * window ) :
cCursorSDL::cCursorSDL( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
cCursor( path, hotspot, name, window ),
mCursor( NULL )
{

View File

@@ -18,11 +18,11 @@ class cCursorSDL : public cCursor {
SDL_Cursor * mCursor;
cCursorSDL( cTexture * tex, const eeVector2i& hotspot, const std::string& name, cWindow * window );
cCursorSDL( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window );
cCursorSDL( cImage * img, const eeVector2i& hotspot, const std::string& name, cWindow * window );
cCursorSDL( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window );
cCursorSDL( const std::string& path, const eeVector2i& hotspot, const std::string& name, cWindow * window );
cCursorSDL( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window );
virtual ~cCursorSDL();

View File

@@ -24,7 +24,7 @@ class EE_API cInputSDL : public cInput {
protected:
friend class cWindowSDL;
cInputSDL( cWindow * window );
cInputSDL( Window::cWindow * window );
virtual void Init();

View File

@@ -22,7 +22,7 @@ class EE_API cClipboardAl : public cClipboard {
protected:
friend class cWindowAl;
cClipboardAl( cWindow * window );
cClipboardAl( Window::cWindow * window );
void Init();
};

View File

@@ -5,21 +5,21 @@
namespace EE { namespace Window { namespace Backend { namespace Al {
cCursorAl::cCursorAl( cTexture * tex, const eeVector2i& hotspot, const std::string& name, cWindow * window ) :
cCursorAl::cCursorAl( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
cCursor( tex, hotspot, name, window ),
mCursor( NULL )
{
Create();
}
cCursorAl::cCursorAl( cImage * img, const eeVector2i& hotspot, const std::string& name, cWindow * window ) :
cCursorAl::cCursorAl( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
cCursor( img, hotspot, name, window ),
mCursor( NULL )
{
Create();
}
cCursorAl::cCursorAl( const std::string& path, const eeVector2i& hotspot, const std::string& name, cWindow * window ) :
cCursorAl::cCursorAl( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
cCursor( path, hotspot, name, window ),
mCursor( NULL )
{

View File

@@ -19,11 +19,11 @@ class cCursorAl : public cCursor {
ALLEGRO_MOUSE_CURSOR * mCursor;
cCursorAl( cTexture * tex, const eeVector2i& hotspot, const std::string& name, cWindow * window );
cCursorAl( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window );
cCursorAl( cImage * img, const eeVector2i& hotspot, const std::string& name, cWindow * window );
cCursorAl( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window );
cCursorAl( const std::string& path, const eeVector2i& hotspot, const std::string& name, cWindow * window );
cCursorAl( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window );
~cCursorAl();

View File

@@ -11,7 +11,7 @@ namespace EE { namespace Window { namespace Backend { namespace Al {
class cCursorManagerAl : public cCursorManager {
public:
cCursorManagerAl( cWindow * window );
cCursorManagerAl( Window::cWindow * window );
cCursor * Create( cTexture * tex, const eeVector2i& hotspot, const std::string& name );
@@ -27,8 +27,8 @@ class cCursorManagerAl : public cCursorManager {
void Hide();
void Visible( bool visible );
void Visible( bool visible );
void Remove( cCursor * cursor, bool Delete = false );
void Reload();

View File

@@ -217,7 +217,7 @@ void cInputAl::GrabInput( const bool& Grab ) {
}
void cInputAl::InjectMousePos( const Uint16& x, const Uint16& y ) {
if ( x >= 0 && x <= GetWindowAl()->GetWidth() && y >= 0 && y <= GetWindowAl()->GetHeight() ) {
if ( x <= GetWindowAl()->GetWidth() && y <= GetWindowAl()->GetHeight() ) {
al_set_mouse_xy( GetDisplay(), x, y );
mMousePos.x = x;
mMousePos.y = y;

View File

@@ -29,7 +29,7 @@ class EE_API cInputAl : public cInput {
ALLEGRO_EVENT_QUEUE * mQueue;
bool mGrab;
cInputAl( cWindow * window );
cInputAl( Window::cWindow * window );
virtual void Init();

View File

@@ -18,7 +18,7 @@ class EE_API cClipboardNull : public cClipboard {
protected:
friend class cWindowNull;
cClipboardNull( cWindow * window );
cClipboardNull( Window::cWindow * window );
void Init();
};

View File

@@ -9,7 +9,7 @@ namespace EE { namespace Window { namespace Backend { namespace Null {
class cCursorManagerNull : public cCursorManager {
public:
cCursorManagerNull( cWindow * window );
cCursorManagerNull( Window::cWindow * window );
cCursor * Create( cTexture * tex, const eeVector2i& hotspot, const std::string& name );
@@ -25,8 +25,8 @@ class cCursorManagerNull : public cCursorManager {
void Hide();
void Visible( bool visible );
void Visible( bool visible );
void Remove( cCursor * cursor, bool Delete = false );
void Reload();

View File

@@ -2,17 +2,17 @@
namespace EE { namespace Window { namespace Backend { namespace Null {
cCursorNull::cCursorNull( cTexture * tex, const eeVector2i& hotspot, const std::string& name, cWindow * window ) :
cCursorNull::cCursorNull( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
cCursor( tex, hotspot, name, window )
{
}
cCursorNull::cCursorNull( cImage * img, const eeVector2i& hotspot, const std::string& name, cWindow * window ) :
cCursorNull::cCursorNull( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
cCursor( img, hotspot, name, window )
{
}
cCursorNull::cCursorNull( const std::string& path, const eeVector2i& hotspot, const std::string& name, cWindow * window ) :
cCursorNull::cCursorNull( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
cCursor( path, hotspot, name, window )
{
}

View File

@@ -11,11 +11,11 @@ class cCursorNull : public cCursor {
protected:
friend class cCursorManagerNull;
cCursorNull( cTexture * tex, const eeVector2i& hotspot, const std::string& name, cWindow * window );
cCursorNull( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window );
cCursorNull( cImage * img, const eeVector2i& hotspot, const std::string& name, cWindow * window );
cCursorNull( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window );
cCursorNull( const std::string& path, const eeVector2i& hotspot, const std::string& name, cWindow * window );
cCursorNull( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window );
void Create();
};

View File

@@ -19,7 +19,7 @@ class EE_API cInputNull : public cInput {
protected:
friend class cWindowNull;
cInputNull( cWindow * window );
cInputNull( Window::cWindow * window );
virtual void Init();
};

View File

@@ -18,16 +18,16 @@ class cClipboard {
/** Set the current clipboard text */
virtual void SetText( const std::string& Text ) = 0;
cWindow * GetWindow() const;
Window::cWindow * GetWindow() const;
protected:
friend class cWindow;
cClipboard( cWindow * window );
cClipboard( Window::cWindow * window );
/** Initialize the clipboard manager. This is needed because the backends first create the instance of the clipboard and then initialize the window context. */
virtual void Init() = 0;
cWindow * mWindow;
Window::cWindow * mWindow;
};
}}

View File

@@ -2,7 +2,7 @@
namespace EE { namespace Window {
cCursor::cCursor( cTexture * tex, const eeVector2i& hotspot, const std::string& name, cWindow * window ) :
cCursor::cCursor( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
mId( MakeHash( name ) ),
mName( name ),
mImage( NULL ),
@@ -18,7 +18,7 @@ cCursor::cCursor( cTexture * tex, const eeVector2i& hotspot, const std::string&
}
}
cCursor::cCursor( cImage * img, const eeVector2i& hotspot, const std::string& name, cWindow * window ) :
cCursor::cCursor( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
mId( MakeHash( name ) ),
mName( name ),
mImage( NULL ),
@@ -32,7 +32,7 @@ cCursor::cCursor( cImage * img, const eeVector2i& hotspot, const std::string& na
}
}
cCursor::cCursor( const std::string& path, const eeVector2i& hotspot, const std::string& name, cWindow * window ) :
cCursor::cCursor( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
mId( MakeHash( name ) ),
mName( name ),
mImage( NULL ),

View File

@@ -31,11 +31,11 @@ class EE_API cCursor {
eeVector2i mHotSpot;
cWindow * mWindow;
cCursor( cTexture * tex, const eeVector2i& hotspot, const std::string& name, cWindow * window );
cCursor( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window );
cCursor( cImage * img, const eeVector2i& hotspot, const std::string& name, cWindow * window );
cCursor( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window );
cCursor( const std::string& path, const eeVector2i& hotspot, const std::string& name, cWindow * window );
cCursor( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window );
virtual void Create() = 0;
};

View File

@@ -16,7 +16,7 @@ namespace EE { namespace Window {
class EE_API cCursorManager {
public:
cCursorManager( cWindow * window );
cCursorManager( Window::cWindow * window );
virtual ~cCursorManager();

View File

@@ -19,7 +19,7 @@
#define BACKEND_SDL 1
#define BACKEND_ALLEGRO 2
#define DEFAULT_BACKEND BACKEND_SDL
//#define DEFAULT_BACKEND BACKEND_ALLEGRO
#ifndef DEFAULT_BACKEND

View File

@@ -16,18 +16,18 @@ class EE_API cEngine : public tSingleton<cEngine> {
/** Creates a new window.
* Allegro 5 backend support more than one window creation, SDL backend only 1 window.
*/
cWindow * CreateWindow( WindowSettings Settings, ContextSettings Context );
Window::cWindow * CreateWindow( WindowSettings Settings, ContextSettings Context );
/** Destroy the window instance, and set as current other window running ( if any ).
* This function is only usefull for multi-window environment. Avoid using it with one window context.
*/
void DestroyWindow( cWindow * window );
void DestroyWindow( Window::cWindow * window );
/** @return The current Window context. */
cWindow * GetCurrentWindow() const;
Window::cWindow * GetCurrentWindow() const;
/** Set the window as the current. */
void SetCurrentWindow( cWindow * window );
void SetCurrentWindow( Window::cWindow * window );
/** @return The number of windows created. */
Uint32 GetWindowCount() const;
@@ -45,7 +45,7 @@ class EE_API cEngine : public tSingleton<cEngine> {
const Uint32& GetHeight() const;
/** @return If the window instance is inside the window list. */
bool ExistsWindow( cWindow * window );
bool ExistsWindow( Window::cWindow * window );
protected:
friend class cWindow;

View File

@@ -154,7 +154,7 @@ class EE_API cInput {
protected:
friend class cWindow;
cInput( cWindow * window, cJoystickManager * joystickmanager );
cInput( Window::cWindow * window, cJoystickManager * joystickmanager );
virtual void Init() = 0;

View File

@@ -4,7 +4,7 @@
namespace EE { namespace Window {
cInputTextBuffer::cInputTextBuffer( const bool& active, const bool& supportNewLine, const bool& supportFreeEditing, cWindow * window, const Uint32& maxLenght ) :
cInputTextBuffer::cInputTextBuffer( const bool& active, const bool& supportNewLine, const bool& supportFreeEditing, Window::cWindow * window, const Uint32& maxLenght ) :
mWindow( window ),
mFlags(0),
mCallback(0),
@@ -151,7 +151,7 @@ void cInputTextBuffer::Update( InputEvent* Event ) {
String txt = mWindow->GetClipboard()->GetWideText();
if ( !SupportNewLine() ) {
Uint32 pos = txt.find_first_of( '\n' );
size_t pos = txt.find_first_of( '\n' );
if ( pos != std::string::npos )
txt = txt.substr( 0, pos );

View File

@@ -22,9 +22,9 @@ class EE_API cInputTextBuffer {
public:
typedef cb::Callback0<void> EnterCallback;
cInputTextBuffer( const bool& active, const bool& supportNewLine, const bool& supportFreeEditing, cWindow * window = NULL, const Uint32& maxLenght = 0xFFFFFFFF );
cInputTextBuffer( const bool& active, const bool& supportNewLine, const bool& supportFreeEditing, Window::cWindow * window = NULL, const Uint32& maxLenght = 0xFFFFFFFF );
cInputTextBuffer( cWindow * window = NULL );
cInputTextBuffer( Window::cWindow * window = NULL );
~cInputTextBuffer();

View File

@@ -24,7 +24,7 @@ using namespace EE::Window;
class cPlatformImpl {
public:
cPlatformImpl( cWindow * window );
cPlatformImpl( Window::cWindow * window );
virtual ~cPlatformImpl();

View File

@@ -10,7 +10,7 @@ using namespace EE::Window;
class cNullImpl : public cPlatformImpl {
public:
cNullImpl( cWindow * window );
cNullImpl( Window::cWindow * window );
~cNullImpl();

View File

@@ -12,7 +12,7 @@ using namespace EE::Window;
class cOSXImpl : public cPlatformImpl {
public:
cOSXImpl( cWindow * window );
cOSXImpl( Window::cWindow * window );
~cOSXImpl();

View File

@@ -12,7 +12,7 @@ using namespace EE::Window;
class cWinImpl : public cPlatformImpl {
public:
cWinImpl( cWindow * window, eeWindowHandler handler );
cWinImpl( Window::cWindow * window, eeWindowHandler handler );
~cWinImpl();
@@ -46,8 +46,8 @@ class cWinImpl : public cPlatformImpl {
void SetSystemMouseCursor( Cursor::EE_SYSTEM_CURSOR syscursor );
void RestoreCursor();
void RestoreCursor();
eeWindowHandler GetHandler() const;
protected:
eeWindowHandler mHandler;

View File

@@ -5,21 +5,21 @@
namespace EE { namespace Window { namespace Platform {
cCursorX11::cCursorX11( cTexture * tex, const eeVector2i& hotspot, const std::string& name, cWindow * window ) :
cCursorX11::cCursorX11( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
cCursor( tex, hotspot, name, window ),
mCursor( None )
{
Create();
}
cCursorX11::cCursorX11( cImage * img, const eeVector2i& hotspot, const std::string& name, cWindow * window ) :
cCursorX11::cCursorX11( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
cCursor( img, hotspot, name, window ),
mCursor( None )
{
Create();
}
cCursorX11::cCursorX11( const std::string& path, const eeVector2i& hotspot, const std::string& name, cWindow * window ) :
cCursorX11::cCursorX11( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
cCursor( path, hotspot, name, window ),
mCursor( None )
{

View File

@@ -19,11 +19,11 @@ class cCursorX11 : public cCursor {
X11Cursor mCursor;
cCursorX11( cTexture * tex, const eeVector2i& hotspot, const std::string& name, cWindow * window );
cCursorX11( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window );
cCursorX11( cImage * img, const eeVector2i& hotspot, const std::string& name, cWindow * window );
cCursorX11( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window );
cCursorX11( const std::string& path, const eeVector2i& hotspot, const std::string& name, cWindow * window );
cCursorX11( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window );
~cCursorX11();

View File

@@ -15,7 +15,7 @@ class cX11Impl : public cPlatformImpl {
typedef void (*LockFunc)(void);
typedef void (*UnlockFunc)(void);
cX11Impl( cWindow * window, eeWindowHandler display, X11Window xwindow, X11Window mainwindow, LockFunc lock, UnlockFunc unlock );
cX11Impl( Window::cWindow * window, eeWindowHandler display, X11Window xwindow, X11Window mainwindow, LockFunc lock, UnlockFunc unlock );
~cX11Impl();