mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-13 04:42:12 +03:00
Fixed compilation on windows.
Fixed shaders reload ( after context lost ). Fixed some compiler warnings on gcc (mingw32). Added Windows Code::Blocks Project file.
This commit is contained in:
260
ee.win.cbp
Normal file
260
ee.win.cbp
Normal file
@@ -0,0 +1,260 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="ee" />
|
||||
<Option pch_mode="2" />
|
||||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Debug">
|
||||
<Option output="eetest" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="." />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-g" />
|
||||
</Compiler>
|
||||
</Target>
|
||||
<Target title="Release">
|
||||
<Option output="eetest" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="." />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-O2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-s" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="opengl32" />
|
||||
<Add library="glu32" />
|
||||
<Add library="freetype" />
|
||||
<Add library="SDL" />
|
||||
<Add library="libsndfile-1" />
|
||||
<Add library="OpenAL32" />
|
||||
</Linker>
|
||||
<Unit filename="src\audio\base.hpp" />
|
||||
<Unit filename="src\audio\caudiodevice.cpp" />
|
||||
<Unit filename="src\audio\caudiodevice.hpp" />
|
||||
<Unit filename="src\audio\caudiolistener.cpp" />
|
||||
<Unit filename="src\audio\caudiolistener.hpp" />
|
||||
<Unit filename="src\audio\caudioresource.cpp" />
|
||||
<Unit filename="src\audio\caudioresource.hpp" />
|
||||
<Unit filename="src\audio\cmusic.cpp" />
|
||||
<Unit filename="src\audio\cmusic.hpp" />
|
||||
<Unit filename="src\audio\csound.cpp" />
|
||||
<Unit filename="src\audio\csound.hpp" />
|
||||
<Unit filename="src\audio\csoundbuffer.cpp" />
|
||||
<Unit filename="src\audio\csoundbuffer.hpp" />
|
||||
<Unit filename="src\audio\csoundfile.cpp" />
|
||||
<Unit filename="src\audio\csoundfile.hpp" />
|
||||
<Unit filename="src\audio\csoundfiledefault.cpp" />
|
||||
<Unit filename="src\audio\csoundfiledefault.hpp" />
|
||||
<Unit filename="src\audio\csoundfileogg.cpp" />
|
||||
<Unit filename="src\audio\csoundfileogg.hpp" />
|
||||
<Unit filename="src\audio\csoundstream.cpp" />
|
||||
<Unit filename="src\audio\csoundstream.hpp" />
|
||||
<Unit filename="src\audio\openal.hpp" />
|
||||
<Unit filename="src\audio\tsoundmanager.hpp" />
|
||||
<Unit filename="src\base.hpp" />
|
||||
<Unit filename="src\ee.h" />
|
||||
<Unit filename="src\test\ee.cpp" />
|
||||
<Unit filename="src\gaming\base.hpp" />
|
||||
<Unit filename="src\gaming\cisomap.cpp" />
|
||||
<Unit filename="src\gaming\cisomap.hpp" />
|
||||
<Unit filename="src\gaming\clight.cpp" />
|
||||
<Unit filename="src\gaming\clight.hpp" />
|
||||
<Unit filename="src\graphics\base.hpp" />
|
||||
<Unit filename="src\graphics\cbatchrenderer.cpp" />
|
||||
<Unit filename="src\graphics\cbatchrenderer.hpp" />
|
||||
<Unit filename="src\graphics\cconsole.cpp" />
|
||||
<Unit filename="src\graphics\cconsole.hpp" />
|
||||
<Unit filename="src\graphics\cfont.cpp" />
|
||||
<Unit filename="src\graphics\cfont.hpp" />
|
||||
<Unit filename="src\graphics\cglobalbatchrenderer.cpp" />
|
||||
<Unit filename="src\graphics\cglobalbatchrenderer.hpp" />
|
||||
<Unit filename="src\graphics\cparticle.cpp" />
|
||||
<Unit filename="src\graphics\cparticle.hpp" />
|
||||
<Unit filename="src\graphics\cparticlesystem.cpp" />
|
||||
<Unit filename="src\graphics\cparticlesystem.hpp" />
|
||||
<Unit filename="src\graphics\cprimitives.cpp" />
|
||||
<Unit filename="src\graphics\cprimitives.hpp" />
|
||||
<Unit filename="src\graphics\cscrollparallax.cpp" />
|
||||
<Unit filename="src\graphics\cscrollparallax.hpp" />
|
||||
<Unit filename="src\graphics\cshader.cpp" />
|
||||
<Unit filename="src\graphics\cshader.hpp" />
|
||||
<Unit filename="src\graphics\cshaderprogram.cpp" />
|
||||
<Unit filename="src\graphics\cshaderprogram.hpp" />
|
||||
<Unit filename="src\graphics\cshaderprogrammanager.cpp" />
|
||||
<Unit filename="src\graphics\cshaderprogrammanager.hpp" />
|
||||
<Unit filename="src\graphics\cshape.cpp" />
|
||||
<Unit filename="src\graphics\cshape.hpp" />
|
||||
<Unit filename="src\graphics\cshapemanager.cpp" />
|
||||
<Unit filename="src\graphics\cshapemanager.hpp" />
|
||||
<Unit filename="src\graphics\csprite.cpp" />
|
||||
<Unit filename="src\graphics\csprite.hpp" />
|
||||
<Unit filename="src\graphics\ctextcache.cpp" />
|
||||
<Unit filename="src\graphics\ctextcache.hpp" />
|
||||
<Unit filename="src\graphics\ctexture.cpp" />
|
||||
<Unit filename="src\graphics\ctexture.hpp" />
|
||||
<Unit filename="src\graphics\ctexturefactory.cpp" />
|
||||
<Unit filename="src\graphics\ctexturefactory.hpp" />
|
||||
<Unit filename="src\graphics\ctexturefont.cpp" />
|
||||
<Unit filename="src\graphics\ctexturefont.hpp" />
|
||||
<Unit filename="src\graphics\ctextureloader.cpp" />
|
||||
<Unit filename="src\graphics\ctextureloader.hpp" />
|
||||
<Unit filename="src\graphics\cttffont.cpp" />
|
||||
<Unit filename="src\graphics\cttffont.hpp" />
|
||||
<Unit filename="src\graphics\fonthelper.hpp" />
|
||||
<Unit filename="src\graphics\pixelperfect.cpp" />
|
||||
<Unit filename="src\graphics\pixelperfect.hpp" />
|
||||
<Unit filename="src\graphics\renders.hpp" />
|
||||
<Unit filename="src\helper\SOIL\SOIL.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src\helper\SOIL\SOIL.h" />
|
||||
<Unit filename="src\helper\SOIL\image_DXT.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src\helper\SOIL\image_DXT.h" />
|
||||
<Unit filename="src\helper\SOIL\image_helper.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src\helper\SOIL\image_helper.h" />
|
||||
<Unit filename="src\helper\SOIL\stb_image.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src\helper\SOIL\stb_image.h" />
|
||||
<Unit filename="src\helper\SOIL\stb_image_write.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src\helper\SOIL\stb_image_write.h" />
|
||||
<Unit filename="src\helper\SOIL\stbi_DDS.h" />
|
||||
<Unit filename="src\helper\SOIL\stbi_DDS_c.h" />
|
||||
<Unit filename="src\helper\glew\glew.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src\helper\glew\glew.h" />
|
||||
<Unit filename="src\helper\glew\glxew.h" />
|
||||
<Unit filename="src\helper\glew\wglew.h" />
|
||||
<Unit filename="src\helper\haikuttf\haikuttf.hpp" />
|
||||
<Unit filename="src\helper\haikuttf\hkbase.hpp" />
|
||||
<Unit filename="src\helper\haikuttf\hkfont.cpp" />
|
||||
<Unit filename="src\helper\haikuttf\hkfont.hpp" />
|
||||
<Unit filename="src\helper\haikuttf\hkfontmanager.cpp" />
|
||||
<Unit filename="src\helper\haikuttf\hkfontmanager.hpp" />
|
||||
<Unit filename="src\helper\haikuttf\hkglyph.cpp" />
|
||||
<Unit filename="src\helper\haikuttf\hkglyph.hpp" />
|
||||
<Unit filename="src\helper\haikuttf\stdint.h" />
|
||||
<Unit filename="src\helper\stb_vorbis\stb_vorbis.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src\helper\stb_vorbis\stb_vorbis.h" />
|
||||
<Unit filename="src\helper\zip_utils\unzip.cpp" />
|
||||
<Unit filename="src\helper\zip_utils\unzip.h" />
|
||||
<Unit filename="src\helper\zip_utils\zip.cpp" />
|
||||
<Unit filename="src\helper\zip_utils\zip.h" />
|
||||
<Unit filename="src\math\base.hpp" />
|
||||
<Unit filename="src\math\math.cpp" />
|
||||
<Unit filename="src\math\math.hpp" />
|
||||
<Unit filename="src\system\base.hpp" />
|
||||
<Unit filename="src\system\cinifile.cpp" />
|
||||
<Unit filename="src\system\cinifile.hpp" />
|
||||
<Unit filename="src\system\clog.cpp" />
|
||||
<Unit filename="src\system\clog.hpp" />
|
||||
<Unit filename="src\system\cmutex.cpp" />
|
||||
<Unit filename="src\system\cmutex.hpp" />
|
||||
<Unit filename="src\system\cobjectloader.cpp" />
|
||||
<Unit filename="src\system\cobjectloader.hpp" />
|
||||
<Unit filename="src\system\cpack.cpp" />
|
||||
<Unit filename="src\system\cpack.hpp" />
|
||||
<Unit filename="src\system\cpak.cpp" />
|
||||
<Unit filename="src\system\cpak.hpp" />
|
||||
<Unit filename="src\system\crc4.cpp" />
|
||||
<Unit filename="src\system\crc4.hpp" />
|
||||
<Unit filename="src\system\cresourceloader.cpp" />
|
||||
<Unit filename="src\system\cresourceloader.hpp" />
|
||||
<Unit filename="src\system\cthread.cpp" />
|
||||
<Unit filename="src\system\cthread.hpp" />
|
||||
<Unit filename="src\system\ctimeelapsed.cpp" />
|
||||
<Unit filename="src\system\ctimeelapsed.hpp" />
|
||||
<Unit filename="src\system\ctimer.cpp" />
|
||||
<Unit filename="src\system\ctimer.hpp" />
|
||||
<Unit filename="src\system\czip.cpp" />
|
||||
<Unit filename="src\system\czip.hpp" />
|
||||
<Unit filename="src\system\singleton.hpp" />
|
||||
<Unit filename="src\ui\base.hpp" />
|
||||
<Unit filename="src\ui\cuibackground.cpp" />
|
||||
<Unit filename="src\ui\cuibackground.hpp" />
|
||||
<Unit filename="src\ui\cuiborder.cpp" />
|
||||
<Unit filename="src\ui\cuiborder.hpp" />
|
||||
<Unit filename="src\ui\cuicontrol.cpp" />
|
||||
<Unit filename="src\ui\cuicontrol.hpp" />
|
||||
<Unit filename="src\ui\cuicontrolanim.cpp" />
|
||||
<Unit filename="src\ui\cuicontrolanim.hpp" />
|
||||
<Unit filename="src\ui\cuidragable.cpp" />
|
||||
<Unit filename="src\ui\cuidragable.hpp" />
|
||||
<Unit filename="src\ui\cuievent.cpp" />
|
||||
<Unit filename="src\ui\cuievent.hpp" />
|
||||
<Unit filename="src\ui\cuieventkey.cpp" />
|
||||
<Unit filename="src\ui\cuieventkey.hpp" />
|
||||
<Unit filename="src\ui\cuieventmouse.cpp" />
|
||||
<Unit filename="src\ui\cuieventmouse.hpp" />
|
||||
<Unit filename="src\ui\cuigfx.cpp" />
|
||||
<Unit filename="src\ui\cuigfx.hpp" />
|
||||
<Unit filename="src\ui\cuimanager.cpp" />
|
||||
<Unit filename="src\ui\cuimanager.hpp" />
|
||||
<Unit filename="src\ui\cuimessage.cpp" />
|
||||
<Unit filename="src\ui\cuimessage.hpp" />
|
||||
<Unit filename="src\ui\cuitextbox.cpp" />
|
||||
<Unit filename="src\ui\cuitextbox.hpp" />
|
||||
<Unit filename="src\ui\cuitextinput.cpp" />
|
||||
<Unit filename="src\ui\cuitextinput.hpp" />
|
||||
<Unit filename="src\ui\uihelper.cpp" />
|
||||
<Unit filename="src\ui\uihelper.hpp" />
|
||||
<Unit filename="src\utils\base.hpp" />
|
||||
<Unit filename="src\utils\cinterpolation.cpp" />
|
||||
<Unit filename="src\utils\cinterpolation.hpp" />
|
||||
<Unit filename="src\utils\colors.hpp" />
|
||||
<Unit filename="src\utils\cperlinnoise.cpp" />
|
||||
<Unit filename="src\utils\cperlinnoise.hpp" />
|
||||
<Unit filename="src\utils\cwaypoints.cpp" />
|
||||
<Unit filename="src\utils\cwaypoints.hpp" />
|
||||
<Unit filename="src\utils\easing.cpp" />
|
||||
<Unit filename="src\utils\easing.hpp" />
|
||||
<Unit filename="src\utils\helper.hpp" />
|
||||
<Unit filename="src\utils\line2.hpp" />
|
||||
<Unit filename="src\utils\polygon2.hpp" />
|
||||
<Unit filename="src\utils\quad2.hpp" />
|
||||
<Unit filename="src\utils\rect.hpp" />
|
||||
<Unit filename="src\utils\size.hpp" />
|
||||
<Unit filename="src\utils\string.cpp" />
|
||||
<Unit filename="src\utils\string.hpp" />
|
||||
<Unit filename="src\utils\triangle2.hpp" />
|
||||
<Unit filename="src\utils\utils.cpp" />
|
||||
<Unit filename="src\utils\utils.hpp" />
|
||||
<Unit filename="src\utils\vector2.hpp" />
|
||||
<Unit filename="src\utils\vector3.hpp" />
|
||||
<Unit filename="src\window\base.hpp" />
|
||||
<Unit filename="src\window\cengine.cpp" />
|
||||
<Unit filename="src\window\cengine.hpp" />
|
||||
<Unit filename="src\window\cinput.cpp" />
|
||||
<Unit filename="src\window\cinput.hpp" />
|
||||
<Unit filename="src\window\cinputtextbuffer.cpp" />
|
||||
<Unit filename="src\window\cinputtextbuffer.hpp" />
|
||||
<Unit filename="src\window\cview.cpp" />
|
||||
<Unit filename="src\window\cview.hpp" />
|
||||
<Extensions>
|
||||
<envvars />
|
||||
<code_completion />
|
||||
<debugger />
|
||||
<lib_finder disable_auto="1" />
|
||||
</Extensions>
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#define GLEW_STATIC
|
||||
#include "helper/glew/glew.h"
|
||||
#include <GL/gl.h>
|
||||
|
||||
|
||||
@@ -37,6 +37,16 @@ void cShader::Init( const Uint32& Type ) {
|
||||
mValid = false;
|
||||
mCompiled = false;
|
||||
mGLId = glCreateShader( mType );
|
||||
}
|
||||
|
||||
void cShader::Reload() {
|
||||
mValid = false;
|
||||
mCompiled = false;
|
||||
mGLId = glCreateShader( mType );
|
||||
|
||||
SetSource( mSource );
|
||||
|
||||
Compile();
|
||||
}
|
||||
|
||||
void cShader::SetSource( const std::string& Source ) {
|
||||
@@ -54,6 +64,8 @@ void cShader::SetSource( const std::vector<char>& Source ) {
|
||||
cLog::instance()->Write( "Can't set source for compiled shaders" );
|
||||
return;
|
||||
}
|
||||
|
||||
mSource = Source;
|
||||
|
||||
const char* src = &Source[0];
|
||||
|
||||
|
||||
@@ -10,42 +10,46 @@ class EE_API cShader {
|
||||
public:
|
||||
/** Constructor with type of shader, next you'll need to set the source and compile it. */
|
||||
cShader( const Uint32& Type );
|
||||
|
||||
|
||||
/** Create a type of shader and load the shader from a file, and compile it. */
|
||||
cShader( const Uint32& Type, const std::string& Filename );
|
||||
|
||||
|
||||
virtual ~cShader();
|
||||
|
||||
|
||||
/** Set the shader source */
|
||||
void SetSource( const std::string& Source );
|
||||
|
||||
|
||||
/** Set the shader source */
|
||||
void SetSource( const std::vector<char>& Source );
|
||||
|
||||
|
||||
/** Compile the shader */
|
||||
bool Compile();
|
||||
|
||||
|
||||
/** @return If the shader is valid */
|
||||
bool IsValid() const { return mValid; }
|
||||
|
||||
|
||||
/** @return If the shader is compiled */
|
||||
bool IsCompiled() const { return mCompiled; }
|
||||
|
||||
|
||||
/** @return The log of the compilation */
|
||||
std::string CompileLog() const { return mCompileLog; }
|
||||
|
||||
|
||||
/** @return The Shader Type */
|
||||
Uint32 GetType() const { return mType; }
|
||||
|
||||
|
||||
/** @return The Shader Id */
|
||||
Uint32 GetId() const { return mGLId; }
|
||||
Uint32 GetId() const { return mGLId; }
|
||||
|
||||
/** Reloads the Shader. */
|
||||
void Reload();
|
||||
protected:
|
||||
GLuint mGLId;
|
||||
GLenum mType;
|
||||
bool mValid;
|
||||
bool mCompiled;
|
||||
std::string mCompileLog;
|
||||
|
||||
std::vector<char> mSource;
|
||||
|
||||
void Init( const Uint32& Type );
|
||||
};
|
||||
|
||||
|
||||
@@ -76,16 +76,18 @@ void cShaderProgram::Init() {
|
||||
}
|
||||
|
||||
void cShaderProgram::Reload() {
|
||||
mGLId = 0;
|
||||
mGLId = 0;
|
||||
|
||||
Init();
|
||||
|
||||
std::vector<cShader*> tmpShader = mShaders;
|
||||
std::vector<cShader*> tmpShader = mShaders;
|
||||
|
||||
mShaders.clear();
|
||||
|
||||
for ( eeUint i = 0; i < tmpShader.size(); i++ )
|
||||
for ( eeUint i = 0; i < tmpShader.size(); i++ ) {
|
||||
tmpShader[i]->Reload();
|
||||
AddShader( tmpShader[i] );
|
||||
}
|
||||
|
||||
Link();
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ bool cTTFFont::iLoad(const eeUint& Size, EE_TTF_FONTSTYLE Style, const bool& Ver
|
||||
mTexWidth = (eeFloat)NextPowOfTwo( mSize * 16 );
|
||||
mTexHeight = mTexWidth;
|
||||
|
||||
TexSize = mTexWidth * mTexHeight;
|
||||
TexSize = (Uint32)mTexWidth * (Uint32)mTexHeight;
|
||||
|
||||
if ( ( mSize >= 60 && mNumChars > 256 ) || ( OutlineSize > 2 && mNumChars >= 512 && mSize >= 24 ) )
|
||||
mTexHeight *= 2;
|
||||
@@ -117,8 +117,8 @@ bool cTTFFont::iLoad(const eeUint& Size, EE_TTF_FONTSTYLE Style, const bool& Ver
|
||||
//Blit the glyph onto the glyph sheet
|
||||
Uint32 * TexGlyph = reinterpret_cast<Uint32 *> ( TempGlyphSurface );
|
||||
Uint32 Alpha;
|
||||
Uint32 w = mTexWidth;
|
||||
Uint32 h = mTexHeight;
|
||||
Uint32 w = (Uint32)mTexWidth;
|
||||
Uint32 h = (Uint32)mTexHeight;
|
||||
Uint32 px, py;
|
||||
|
||||
for (int y = 0; y < GlyphRect.y; ++y ) {
|
||||
@@ -190,7 +190,7 @@ bool cTTFFont::iLoad(const eeUint& Size, EE_TTF_FONTSTYLE Style, const bool& Ver
|
||||
// Fill the TexO ( the default font alpha channels ) and the TexN ( the new outline )
|
||||
for ( Int32 y = 0; y < mTexHeight; y++ ) {
|
||||
for( Int32 x = 0; x < mTexWidth; x++) {
|
||||
Pos = x + y * mTexWidth;
|
||||
Pos = x + y * (Uint32)mTexWidth;
|
||||
TexO[ Pos ] = mPixels[ Pos ].A();
|
||||
TexN[ Pos ] = TexO[ Pos ];
|
||||
}
|
||||
@@ -210,7 +210,7 @@ bool cTTFFont::iLoad(const eeUint& Size, EE_TTF_FONTSTYLE Style, const bool& Ver
|
||||
|
||||
for ( Int32 y = 0; y < mTexHeight; y++ ) {
|
||||
for( Int32 x = 0; x < mTexWidth; x++) {
|
||||
Pos = x + y * mTexWidth;
|
||||
Pos = x + y * (Uint32)mTexWidth;
|
||||
|
||||
// Fill the outline color
|
||||
mPixels[ Pos ] = eeColorA( OutlineColor.R(), OutlineColor.G(), OutlineColor.B(), alpha[ Pos ] );
|
||||
@@ -224,7 +224,7 @@ bool cTTFFont::iLoad(const eeUint& Size, EE_TTF_FONTSTYLE Style, const bool& Ver
|
||||
|
||||
hkFontManager::instance()->CloseFont( mFont );
|
||||
|
||||
mTexId = TF->LoadFromPixels( reinterpret_cast<unsigned char *> ( &mPixels[0] ), mTexWidth, mTexHeight, 4 );
|
||||
mTexId = TF->LoadFromPixels( reinterpret_cast<unsigned char *> ( &mPixels[0] ), (Uint32)mTexWidth, (Uint32)mTexHeight, 4 );
|
||||
|
||||
eeSAFE_DELETE_ARRAY( mPixels );
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef EE_GRAPHICS_PIXELPERFECT_H
|
||||
#ifndef EE_GRAPHICS_PIXELPERFECT_H
|
||||
#define EE_GRAPHICS_PIXELPERFECT_H
|
||||
|
||||
#include "ctexturefactory.hpp"
|
||||
@@ -32,4 +32,4 @@ bool EE_API PixelPerfectCollide( const Uint32& TexId_1, const Uint16& x1, const
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -4,24 +4,24 @@
|
||||
** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
** Copyright (C) 2002, Lev Povalahev
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are met:
|
||||
**
|
||||
** * Redistributions of source code must retain the above copyright notice,
|
||||
**
|
||||
** * Redistributions of source code must retain the above copyright notice,
|
||||
** this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright notice,
|
||||
** this list of conditions and the following disclaimer in the documentation
|
||||
** * Redistributions in binary form must reproduce the above copyright notice,
|
||||
** this list of conditions and the following disclaimer in the documentation
|
||||
** and/or other materials provided with the distribution.
|
||||
** * The name of the author may be used to endorse or promote products
|
||||
** * The name of the author may be used to endorse or promote products
|
||||
** derived from this software without specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
@@ -72,12 +72,12 @@
|
||||
|
||||
#ifdef MAC_OS_X_VERSION_10_3
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
void* NSGLGetProcAddress (const GLubyte *name)
|
||||
{
|
||||
static void* image = NULL;
|
||||
if (NULL == image)
|
||||
if (NULL == image)
|
||||
{
|
||||
image = dlopen("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", RTLD_LAZY);
|
||||
}
|
||||
@@ -7562,14 +7562,14 @@ static GLboolean _glewInit_GL_WIN_swap_hint (GLEW_CONTEXT_ARG_DEF_INIT)
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
/*
|
||||
* Search for name in the extensions string. Use of strstr()
|
||||
* is not sufficient because extension names can be prefixes of
|
||||
* other extension names. Could use strtok() but the constant
|
||||
* string returned by glGetString might be in read-only memory.
|
||||
*/
|
||||
GLboolean glewGetExtension (const char* name)
|
||||
{
|
||||
{
|
||||
GLubyte* p;
|
||||
GLubyte* end;
|
||||
GLuint len = _glewStrLen((const GLubyte*)name);
|
||||
@@ -7600,7 +7600,7 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
|
||||
dot = _glewStrCLen(s, '.');
|
||||
if (dot == 0)
|
||||
return GLEW_ERROR_NO_GL_VERSION;
|
||||
|
||||
|
||||
major = s[dot-1]-'0';
|
||||
minor = s[dot+1]-'0';
|
||||
|
||||
@@ -7608,7 +7608,7 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
|
||||
minor = 0;
|
||||
if (major<0 || major>9)
|
||||
return GLEW_ERROR_NO_GL_VERSION;
|
||||
|
||||
|
||||
|
||||
if (major == 1 && minor == 0)
|
||||
{
|
||||
@@ -7621,7 +7621,7 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
|
||||
CONST_CAST(GLEW_VERSION_3_2) = GLEW_VERSION_3_3 == GL_TRUE || ( major == 3 && minor >= 2 ) ? GL_TRUE : GL_FALSE;
|
||||
CONST_CAST(GLEW_VERSION_3_1) = GLEW_VERSION_3_2 == GL_TRUE || ( major == 3 && minor >= 1 ) ? GL_TRUE : GL_FALSE;
|
||||
CONST_CAST(GLEW_VERSION_3_0) = GLEW_VERSION_3_1 == GL_TRUE || ( major == 3 ) ? GL_TRUE : GL_FALSE;
|
||||
CONST_CAST(GLEW_VERSION_2_1) = GLEW_VERSION_3_0 == GL_TRUE || ( major == 2 && minor >= 1 ) ? GL_TRUE : GL_FALSE;
|
||||
CONST_CAST(GLEW_VERSION_2_1) = GLEW_VERSION_3_0 == GL_TRUE || ( major == 2 && minor >= 1 ) ? GL_TRUE : GL_FALSE;
|
||||
CONST_CAST(GLEW_VERSION_2_0) = GLEW_VERSION_2_1 == GL_TRUE || ( major == 2 ) ? GL_TRUE : GL_FALSE;
|
||||
CONST_CAST(GLEW_VERSION_1_5) = GLEW_VERSION_2_0 == GL_TRUE || ( major == 1 && minor >= 5 ) ? GL_TRUE : GL_FALSE;
|
||||
CONST_CAST(GLEW_VERSION_1_4) = GLEW_VERSION_1_5 == GL_TRUE || ( major == 1 && minor >= 4 ) ? GL_TRUE : GL_FALSE;
|
||||
@@ -9695,7 +9695,7 @@ static PFNWGLGETEXTENSIONSSTRINGARBPROC _wglewGetExtensionsStringARB = NULL;
|
||||
static PFNWGLGETEXTENSIONSSTRINGEXTPROC _wglewGetExtensionsStringEXT = NULL;
|
||||
|
||||
GLboolean wglewGetExtension (const char* name)
|
||||
{
|
||||
{
|
||||
GLubyte* p;
|
||||
GLubyte* end;
|
||||
GLuint len = _glewStrLen((const GLubyte*)name);
|
||||
@@ -10627,7 +10627,7 @@ static GLboolean _glewInit_GLX_SUN_video_resize (GLXEW_CONTEXT_ARG_DEF_INIT)
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
GLboolean glxewGetExtension (const char* name)
|
||||
{
|
||||
{
|
||||
GLubyte* p;
|
||||
GLubyte* end;
|
||||
GLuint len;
|
||||
@@ -10899,7 +10899,7 @@ const GLubyte* glewGetString (GLenum name)
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
GLboolean glewExperimental = GL_FALSE;
|
||||
GLboolean glewExperimental = GL_FALSE;
|
||||
|
||||
#if !defined(GLEW_MX)
|
||||
|
||||
|
||||
@@ -4,24 +4,24 @@
|
||||
** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
** Copyright (C) 2002, Lev Povalahev
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are met:
|
||||
**
|
||||
** * Redistributions of source code must retain the above copyright notice,
|
||||
**
|
||||
** * Redistributions of source code must retain the above copyright notice,
|
||||
** this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright notice,
|
||||
** this list of conditions and the following disclaimer in the documentation
|
||||
** * Redistributions in binary form must reproduce the above copyright notice,
|
||||
** this list of conditions and the following disclaimer in the documentation
|
||||
** and/or other materials provided with the distribution.
|
||||
** * The name of the author may be used to endorse or promote products
|
||||
** * The name of the author may be used to endorse or promote products
|
||||
** derived from this software without specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
/*
|
||||
** Copyright (c) 2007 The Khronos Group Inc.
|
||||
**
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
@@ -63,10 +63,10 @@
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
@@ -174,7 +174,8 @@ typedef _W64 int ptrdiff_t;
|
||||
/*
|
||||
* GLEW_STATIC needs to be set when using the static version.
|
||||
* GLEW_BUILD is set when building the DLL version.
|
||||
*/
|
||||
*/
|
||||
#define GLEW_STATIC
|
||||
#ifdef GLEW_STATIC
|
||||
# define GLEWAPI extern
|
||||
#else
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#define ZIP_STD
|
||||
#ifdef ZIP_STD
|
||||
#include <time.h>
|
||||
#define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
|
||||
#define ZIP_DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH 1024
|
||||
#endif
|
||||
@@ -26,7 +26,7 @@ typedef FILETIME ZIPFILETIME;
|
||||
|
||||
|
||||
#ifndef _zip_H
|
||||
DECLARE_HANDLE(HZIP);
|
||||
ZIP_DECLARE_HANDLE(HZIP);
|
||||
#endif
|
||||
// An HZIP identifies a zip file that has been opened
|
||||
|
||||
@@ -138,7 +138,7 @@ unsigned int FormatZipMessage(ZRESULT code, TCHAR *buf,unsigned int len);
|
||||
#define ZR_ENDED 0x00050000 // the zip creation has already been closed
|
||||
#define ZR_MISSIZE 0x00060000 // the indicated input file size turned out mistaken
|
||||
#define ZR_PARTIALUNZ 0x00070000 // the file had already been partially unzipped
|
||||
#define ZR_ZMODE 0x00080000 // tried to mix creating/opening a zip
|
||||
#define ZR_ZMODE 0x00080000 // tried to mix creating/opening a zip
|
||||
// The following come from bugs within the zip library itself
|
||||
#define ZR_BUGMASK 0xFF000000
|
||||
#define ZR_NOTINITED 0x01000000 // initialisation didn't work
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#define ZIP_STD
|
||||
#ifdef ZIP_STD
|
||||
#include <time.h>
|
||||
#define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
|
||||
#define ZIP_DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH 1024
|
||||
#endif
|
||||
@@ -22,7 +22,7 @@ typedef time_t ZIPFILETIME;
|
||||
|
||||
|
||||
#ifndef _unzip_H
|
||||
DECLARE_HANDLE(HZIP);
|
||||
ZIP_DECLARE_HANDLE(HZIP);
|
||||
#endif
|
||||
// An HZIP identifies a zip file that is being created
|
||||
|
||||
@@ -122,7 +122,7 @@ unsigned int FormatZipMessage(ZRESULT code, TCHAR *buf,unsigned int len);
|
||||
#define ZR_ENDED 0x00050000 // the zip creation has already been closed
|
||||
#define ZR_MISSIZE 0x00060000 // the indicated input file size turned out mistaken
|
||||
#define ZR_PARTIALUNZ 0x00070000 // the file had already been partially unzipped
|
||||
#define ZR_ZMODE 0x00080000 // tried to mix creating/opening a zip
|
||||
#define ZR_ZMODE 0x00080000 // tried to mix creating/opening a zip
|
||||
// The following come from bugs within the zip library itself
|
||||
#define ZR_BUGMASK 0xFF000000
|
||||
#define ZR_NOTINITED 0x01000000 // initialisation didn't work
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
#include "../utils/vector2.hpp"
|
||||
using namespace EE::Utils;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -38,7 +38,7 @@ void cLog::Write(const std::string& Text, const bool& newLine) {
|
||||
|
||||
void cLog::Write( const char* format, ... ) {
|
||||
int n, size = 256;
|
||||
std::string tstr( size, NULL );
|
||||
std::string tstr( size, '\0' );
|
||||
|
||||
va_list args;
|
||||
|
||||
@@ -66,7 +66,7 @@ void cLog::Write( const char* format, ... ) {
|
||||
else // glibc 2.0
|
||||
size *= 2; // twice the old size
|
||||
|
||||
tstr.resize( size, NULL );
|
||||
tstr.resize( size, '\0' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class cResourceLoader {
|
||||
/** @param MaxThreads Set the maximun simultaneous threads to load resources, if not value is seted it will use Num Cores - 1 or 1 thread if single core. */
|
||||
cResourceLoader( const Uint32& MaxThreads = THREADS_AUTO );
|
||||
|
||||
~cResourceLoader();
|
||||
virtual ~cResourceLoader();
|
||||
|
||||
void Add( cObjectLoader * Object );
|
||||
|
||||
@@ -49,6 +49,3 @@ class cResourceLoader {
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -274,7 +274,7 @@ void cEETest::Init() {
|
||||
|
||||
cUIControl::CreateParams Params( cUIManager::instance()->MainControl(), eeVector2i(0,0), eeSize( 320, 240 ), UI_FILL_BACKGROUND | UI_CLIP_ENABLE | UI_BORDER );
|
||||
|
||||
Params.Border.Width( 2.f );
|
||||
Params.Border.Width( 2 );
|
||||
Params.Border.Color( 0xFF979797 );
|
||||
//Params.Background.Corners(5);
|
||||
Params.Background.Colors( eeColorA( 0x66FAFAFA ), eeColorA( 0xCCFAFAFA ), eeColorA( 0xCCFAFAFA ), eeColorA( 0x66FAFAFA ) );
|
||||
|
||||
@@ -28,4 +28,4 @@ using namespace EE::Window;
|
||||
#include "../graphics/cprimitives.hpp"
|
||||
using namespace EE::Graphics;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -21,4 +21,4 @@ void cUIBorder::Width( const eeUint& width ) {
|
||||
mWidth = width;
|
||||
}
|
||||
|
||||
}}
|
||||
}}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
namespace EE { namespace UI {
|
||||
|
||||
cUIMessage::cUIMessage( cUIControl * Ctrl, const Uint32& Msg ) :
|
||||
mCtrl( Ctrl ),
|
||||
cUIMessage::cUIMessage( cUIControl * Ctrl, const Uint32& Msg ) :
|
||||
mCtrl( Ctrl ),
|
||||
mMsg( Msg )
|
||||
{
|
||||
}
|
||||
@@ -21,4 +21,4 @@ Uint32 cUIMessage::Msg( void ) const {
|
||||
return mMsg;
|
||||
}
|
||||
|
||||
}}
|
||||
}}
|
||||
|
||||
@@ -36,4 +36,4 @@ typedef Line2<eeFloat> eeLine2f;
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -101,8 +101,8 @@ Quad2<T>::Quad2( const Vector2<T>& v1, const Vector2<T>& v2, const Vector2<T>& v
|
||||
V[3] = v4;
|
||||
}
|
||||
|
||||
typedef Quad2<eeFloat> eeQuad2f;
|
||||
typedef Quad2<eeFloat> eeQuad2f;
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -62,8 +62,8 @@ void tSize<T>::Height( const T& height ) {
|
||||
this->y = height;
|
||||
}
|
||||
|
||||
typedef tSize<eeInt> eeSize;
|
||||
typedef tSize<eeInt> eeSize;
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -70,7 +70,7 @@ std::vector < std::wstring > SplitString ( const std::wstring& str, const Uint32
|
||||
std::wstring tmpstr;
|
||||
|
||||
for ( eeUint i = 0; i < str.size(); i++ ) {
|
||||
if ( str[i] == (eeInt)splitchar ) {
|
||||
if ( str[i] == splitchar ) {
|
||||
tmp.push_back(tmpstr);
|
||||
tmpstr = L"";
|
||||
} else {
|
||||
@@ -112,7 +112,7 @@ void StrFormat( char * Buffer, int BufferSize, const char * format, ... ) {
|
||||
|
||||
std::string StrFormated( const char * format, ... ) {
|
||||
int n, size = 256;
|
||||
std::string tstr( size, NULL );
|
||||
std::string tstr( size, '\0' );
|
||||
|
||||
va_list args;
|
||||
|
||||
@@ -137,7 +137,7 @@ std::string StrFormated( const char * format, ... ) {
|
||||
else // glibc 2.0
|
||||
size *= 2; // twice the old size
|
||||
|
||||
tstr.resize( size, NULL );
|
||||
tstr.resize( size, '\0' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,4 +29,4 @@ typedef Triangle2<eeFloat> eeTriangle2f;
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user