Fixes for VS windows build.

--HG--
branch : dev
This commit is contained in:
Martín Lucas Golini
2017-03-22 01:57:39 -03:00
parent ca9950b282
commit c7735d75fe
10 changed files with 610 additions and 528 deletions

View File

@@ -13,4 +13,4 @@ JoystickEnabled = 0
ParticlesNum = 1000
UseShaders = 1
Music = 0
PixelDensity = 2
PixelDensity = 1

View File

@@ -1,5 +1,15 @@
#define EE_BACKEND_SDL_ACTIVE
#define EE_BACKEND_ALLEGRO_ACTIVE
#define EE_BACKEND_SDL2
#define EE_BACKEND_SDL_1_2
#define EE_SDL_VERSION_2
#define EE_X11_PLATFORM
#define EE_DEBUG
#define EE_LIBSNDFILE_ENABLED
#define EE_MEMORY_MANAGER
#define EE_GL3_ENABLED 1
#define EE_SHADERS_SUPPORTED
#define EE_GLEW_AVAILABLE
#define EE_SSL_SUPPORT
#define EE_OPENSSL
#define EE_BACKEND_SFML_ACTIVE
#define EE_BACKEND_SDL2
#define EE_GL3_ENABLED
#define EE_SHADERS_SUPPORTED
#define EE_BACKEND_SDL_ACTIVE

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +1,14 @@
../../src/
../../include/
../../src/examples/strobe
../../../eeiv/src
.
../../include/eepp/graphics
../../src/eepp/graphics
../../include/eepp/ui
../../src/eepp/ui
../../src/eepp/helper/freetype2/include/
../../include/eepp/system
../../src/eepp/system
../../src/eepp/graphics/renderer
../../include/eepp/graphics/renderer

View File

@@ -42,7 +42,7 @@ void GameObject::clearFlag( const Uint32& Flag ) {
}
bool GameObject::isBlocked() const {
return mFlags & GObjFlags::GAMEOBJECT_BLOCKED;
return 0 != ( mFlags & GObjFlags::GAMEOBJECT_BLOCKED );
}
void GameObject::setBlocked( bool blocked ) {
@@ -50,7 +50,7 @@ void GameObject::setBlocked( bool blocked ) {
}
bool GameObject::isRotated() const {
return mFlags & GObjFlags::GAMEOBJECT_ROTATE_90DEG;
return 0 != ( mFlags & GObjFlags::GAMEOBJECT_ROTATE_90DEG );
}
void GameObject::setRotated( bool rotated ) {
@@ -58,7 +58,7 @@ void GameObject::setRotated( bool rotated ) {
}
bool GameObject::isMirrored() const {
return mFlags & GObjFlags::GAMEOBJECT_MIRRORED;
return 0 != ( mFlags & GObjFlags::GAMEOBJECT_MIRRORED );
}
void GameObject::setMirrored( bool mirrored ) {
@@ -66,7 +66,7 @@ void GameObject::setMirrored( bool mirrored ) {
}
bool GameObject::isFliped() const {
return mFlags & GObjFlags::GAMEOBJECT_FLIPED;
return 0 != ( mFlags & GObjFlags::GAMEOBJECT_FLIPED );
}
void GameObject::setFliped( bool fliped ) {

View File

@@ -4,6 +4,7 @@
#include <eepp/graphics/renderer/opengl.hpp>
#include <eepp/graphics/globalbatchrenderer.hpp>
#include <eepp/graphics/texturefactory.hpp>
#include <algorithm>
#include <cmath>
namespace EE { namespace Graphics {
@@ -484,6 +485,9 @@ void Text::draw(const Float & X, const Float & Y, const Vector2f & Scale, const
numvert = mVertices.size();
if ( 0 == numvert )
return;
Uint32 alloc = numvert * sizeof(VertexCoords);
Uint32 allocC = numvert * GLi->quadVertexs();

View File

@@ -8,6 +8,10 @@
#include <eepp/network/ssl/backend/openssl/curl_hostcheck.h>
#include <eepp/system/filesystem.hpp>
#ifndef CRYPTO_malloc_init
#define CRYPTO_malloc_init OPENSSL_malloc_init
#endif
namespace EE { namespace Network { namespace SSL {
static std::vector<X509*> sCerts;
@@ -91,7 +95,7 @@ int OpenSSLSocket::certVerifyCb( X509_STORE_CTX * x509_ctx, void * arg ) {
/* This is the function that OpenSSL would call if we hadn't called
* SSL_CTX_set_cert_verify_callback(). Therefore, we are "wrapping"
* the default functionality, rather than replacing it. */
bool base_cert_valid = X509_verify_cert( x509_ctx );
bool base_cert_valid = 0 != X509_verify_cert( x509_ctx );
if ( !base_cert_valid ) {
eePRINTL( "Cause: %s", X509_verify_cert_error_string( X509_STORE_CTX_get_error( x509_ctx ) ) );

View File

@@ -206,13 +206,18 @@ void Translator::setLanguageFromLocale( std::locale locale ) {
std::string name = locale.name();
if ( "C" == name ) {
#if EE_PLATFORM != EE_PLATFORM_WIN
locale = std::locale( setlocale( LC_ALL, "" ) );
#ifdef EE_SUPPORT_EXCEPTIONS
try {
const char * loc = setlocale( LC_ALL, "" );
locale = std::locale( loc );
name = locale.name();
} catch( ... ) {}
#endif
if ( "C" == locale.name() ) {
if ( "C" == name ) {
mCurrentLanguage = "en";
} else {
mCurrentLanguage = locale.name().substr(0,2);
mCurrentLanguage = name.substr(0,2);
}
} else {
mCurrentLanguage = name.substr(0,2);

View File

@@ -159,7 +159,7 @@ void UISprite::setDeallocSprite( const bool& dealloc ) {
}
bool UISprite::getDeallocSprite() {
return mControlFlags & UI_CTRL_FLAG_FREE_USE;
return 0 != ( mControlFlags & UI_CTRL_FLAG_FREE_USE );
}
void UISprite::onSizeChange() {

View File

@@ -258,9 +258,9 @@ EE_MAIN_FUNC int main (int argc, char * argv [])
for (i = 0; i < ParticlesNum; i++ )
{
vertices[i] = Vector3ff( 0, 0, 1.83 );
velocities[i] = Vector3ff( (Math::randf() * 2 - 1)*.05, (Math::randf() * 2 - 1)*.05, .93 + Math::randf()*.02 );
colors[i] = ColorAf( Math::randf() * 0.5, 0.1, 0.8, 0.5 );
vertices[i] = Vector3ff( 0, 0, 1.83f );
velocities[i] = Vector3ff( (Math::randf() * 2 - 1)*.05f, (Math::randf() * 2 - 1)*.05f, .93f + Math::randf()*.02f );
colors[i] = ColorAf( Math::randf() * 0.5f, 0.1f, 0.8f, 0.5f );
}
/** Optimized for ARM ( pre-cache sqrt ) */