mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-28 17:16:29 +03:00
Various fixes
This commit is contained in:
19
Makefile
19
Makefile
@@ -60,7 +60,6 @@ ifeq ($(OS), ios)
|
||||
PLATNAME = Simulator
|
||||
else
|
||||
ARCH = armv7
|
||||
PARCHFLAGS = -marm
|
||||
PLATNAME = OS
|
||||
endif
|
||||
|
||||
@@ -79,22 +78,17 @@ ifeq ($(OS), ios)
|
||||
export CPLUS_INCLUDE_PATH = $(SYSROOTPATH)/usr/include
|
||||
export LIBRARY_PATH = $(FRAMEWORKPATH)/usr/lib
|
||||
|
||||
PLATFORMFLAGS = $(PARCHFLAGS) -miphoneos-version-min=$(IOSVERSION) -isysroot $(SYSROOTPATH)
|
||||
FRAMEWORKFLAGS += -F$(FRAMEWORKPATH) -L$(SYSROOTPATH)/usr/lib -isysroot $(SYSROOTPATH)
|
||||
PLATFORMFLAGS = $(PARCHFLAGS) -miphoneos-version-min=$(IOSVERSION) -isysroot $(SYSROOTPATH) -arch ${ARCH} -I${C_INCLUDE_PATH}
|
||||
FRAMEWORKFLAGS += -F$(FRAMEWORKPATH) -L$(SYSROOTPATH)/usr/lib -isysroot $(SYSROOTPATH) -arch ${$ARCH}
|
||||
endif
|
||||
endif
|
||||
|
||||
export AR = $(TOOLCHAINPATH)ar
|
||||
|
||||
ifeq ($(LLVM_BUILD), yes)
|
||||
|
||||
export CC = $(TOOLCHAINPATH)clang
|
||||
export CPP = $(TOOLCHAINPATH)clang++
|
||||
else
|
||||
|
||||
ifneq (,$(findstring arm,$(ARCH)))
|
||||
|
||||
export CC = $(TOOLCHAINPATH)arm-apple-darwin10-llvm-gcc-4.2
|
||||
export CPP = $(TOOLCHAINPATH)arm-apple-darwin10-llvm-g++-4.2
|
||||
|
||||
else
|
||||
|
||||
@@ -103,8 +97,6 @@ export CPP = $(TOOLCHAINPATH)g++
|
||||
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
OSLIBEXTENSION = so
|
||||
SDLCONFIGPATH =
|
||||
|
||||
@@ -388,6 +380,11 @@ ifeq ($(OS), ios)
|
||||
|
||||
LIBS = -static-libgcc -static-libstdc++ -framework OpenGLES -framework OpenAL -framework AudioToolbox -framework CoreAudio -framework Foundation -framework CoreFoundation -framework UIKit -framework QuartzCore -framework CoreGraphics $(SDL_BACKEND_LINK) $(ALLEGRO_BACKEND_LINK)
|
||||
OTHERINC = $(INCFREETYPE2)
|
||||
|
||||
ifeq ($(ARCH),armv7)
|
||||
OTHERINC += -DU_HAVE_GCC_ATOMICS=0
|
||||
endif
|
||||
|
||||
PLATFORMSRC = $(wildcard ./src/system/platform/posix/*.cpp)
|
||||
|
||||
endif
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace EE { namespace Audio {
|
||||
class EE_API cMusic : public cSoundStream {
|
||||
public :
|
||||
/** Construct the music with a buffer size */
|
||||
cMusic( std::size_t BufferSize = 44100 );
|
||||
cMusic( std::size_t BufferSize = 48000 );
|
||||
|
||||
~cMusic();
|
||||
|
||||
|
||||
@@ -75,10 +75,32 @@
|
||||
#define EE_ARM
|
||||
#endif
|
||||
|
||||
#if EE_PLATFORM == EE_PLATFORM_ANDROID
|
||||
#define EE_NO_WIDECHAR
|
||||
/// Activate at least one backend for the compilation
|
||||
#if !defined( EE_BACKEND_SDL_ACTIVE ) && !defined( EE_BACKEND_ALLEGRO_ACTIVE )
|
||||
#define EE_BACKEND_SDL_ACTIVE
|
||||
#endif
|
||||
|
||||
#define main SDL_main
|
||||
#if EE_PLATFORM == EE_PLATFORM_ANDROID || EE_PLATFORM == EE_PLATFORM_IOS
|
||||
#if EE_PLATFORM == EE_PLATFORM_ANDROID
|
||||
#define EE_NO_WIDECHAR
|
||||
#endif
|
||||
|
||||
#ifdef EE_BACKEND_SDL_ACTIVE
|
||||
#define main SDL_main
|
||||
#endif
|
||||
|
||||
#ifdef EE_BACKEND_ALLEGRO_ACTIVE
|
||||
#if EE_PLATFORM == EE_PLATFORM_IOS
|
||||
#define ALLEGRO_MAGIC_MAIN
|
||||
#define main _al_mangled_main
|
||||
#elif EE_PLATFORM == EE_PLATFORM_ANDROID
|
||||
#ifdef __cplusplus
|
||||
extern "C" int main(int argc, char ** argv);
|
||||
#else
|
||||
extern int main(int argc, char ** argv);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef EE_MAIN_FUNC
|
||||
#ifdef __cplusplus
|
||||
@@ -169,11 +191,6 @@
|
||||
#define EE_GLES
|
||||
#endif
|
||||
|
||||
/// Activate at least one backend for the compilation
|
||||
#if !defined( EE_BACKEND_SDL_ACTIVE ) && !defined( EE_BACKEND_ALLEGRO_ACTIVE )
|
||||
#define EE_BACKEND_SDL_ACTIVE
|
||||
#endif
|
||||
|
||||
#define eeCOMMA ,
|
||||
#define eeARRAY_SIZE(__array) ( sizeof(__array) / sizeof(__array[0]) )
|
||||
#define eeSAFE_DELETE(p) { if(p) { eeDelete (p); (p)=NULL; } }
|
||||
|
||||
@@ -183,7 +183,12 @@
|
||||
#define GL_DYNAMIC_READ 0x88E9
|
||||
#define GL_DYNAMIC_COPY 0x88EA
|
||||
|
||||
#ifdef GL_DEPTH_COMPONENT32_OES
|
||||
#define GL_DEPTH_COMPONENT GL_DEPTH_COMPONENT32_OES
|
||||
#else
|
||||
#define GL_DEPTH_COMPONENT GL_DEPTH_COMPONENT16_OES
|
||||
#endif
|
||||
|
||||
#define GL_DEPTH_ATTACHMENT GL_DEPTH_ATTACHMENT_OES
|
||||
#define GL_COLOR_ATTACHMENT0 GL_COLOR_ATTACHMENT0_OES
|
||||
|
||||
|
||||
@@ -175,22 +175,18 @@ bool cShader::Compile() {
|
||||
mValid = 0 != Compiled;
|
||||
|
||||
if ( !mValid ) {
|
||||
GLsizei logsize, logarraysize;
|
||||
GLsizei logsize = 0, logarraysize = 0;
|
||||
glGetShaderiv( GetId(), GL_INFO_LOG_LENGTH, &logarraysize );
|
||||
|
||||
mCompileLog.resize( logarraysize - 1 );
|
||||
if ( logarraysize > 0 ) {
|
||||
mCompileLog.resize( logarraysize - 1 );
|
||||
|
||||
glGetShaderInfoLog( GetId(), logarraysize, &logsize, reinterpret_cast<GLchar*>( &mCompileLog[0] ) );
|
||||
glGetShaderInfoLog( GetId(), logarraysize, &logsize, reinterpret_cast<GLchar*>( &mCompileLog[0] ) );
|
||||
}
|
||||
|
||||
cLog::instance()->Write( "Couldn't compile shader. Log follows:" );
|
||||
cLog::instance()->Write( mCompileLog );
|
||||
cLog::instance()->Write( mSource );
|
||||
|
||||
#ifdef EE_DEBUG
|
||||
std::cout << "Couldn't compile shader. Log follows:" << std::endl;
|
||||
std::cout << mCompileLog << std::endl;
|
||||
std::cout << mSource << std::endl;
|
||||
#endif
|
||||
} else {
|
||||
cLog::instance()->Write( "Shader Loaded Succesfully" );
|
||||
}
|
||||
|
||||
@@ -200,12 +200,14 @@ bool cShaderProgram::Link() {
|
||||
glGetProgramiv( Handler(), GL_LINK_STATUS, &linked );
|
||||
mValid = 0 != linked;
|
||||
|
||||
GLsizei logsize, logarraysize;
|
||||
GLsizei logsize = 0, logarraysize = 0;
|
||||
glGetProgramiv( Handler(), GL_INFO_LOG_LENGTH, &logarraysize );
|
||||
mLinkLog.resize(logarraysize);
|
||||
|
||||
glGetProgramInfoLog( Handler(), logarraysize, &logsize, reinterpret_cast<GLchar*>( &mLinkLog[0] ) );
|
||||
if ( logarraysize > 0 ) {
|
||||
mLinkLog.resize( logarraysize );
|
||||
|
||||
glGetProgramInfoLog( Handler(), logarraysize, &logsize, reinterpret_cast<GLchar*>( &mLinkLog[0] ) );
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( !mValid ) {
|
||||
|
||||
@@ -14,11 +14,11 @@ class cCursorManager;
|
||||
namespace WindowStyle {
|
||||
enum
|
||||
{
|
||||
NoBorder = ( 0 << 0 ),
|
||||
Titlebar = ( 1 << 0 ),
|
||||
Resize = ( 1 << 1 ),
|
||||
Fullscreen = ( 1 << 2 ),
|
||||
UseDesktopResolution = ( 1 << 3 ),
|
||||
NoBorder = ( 1 << 0 ),
|
||||
Titlebar = ( 1 << 1 ),
|
||||
Resize = ( 1 << 2 ),
|
||||
Fullscreen = ( 1 << 3 ),
|
||||
UseDesktopResolution = ( 1 << 4 ),
|
||||
Default = Titlebar | Resize
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user