Replace override and noexcept with macros
parent
f52650edb5
commit
3dce58c0fa
|
@ -120,18 +120,36 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||||
if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)
|
if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)
|
||||||
message(STATUS "Detected GCC version 4.7+")
|
message(STATUS "Detected GCC version 4.7+")
|
||||||
set(CXX11_FLAGS "-std=gnu++11")
|
set(CXX11_FLAGS "-std=gnu++11")
|
||||||
|
add_definitions(-DOVERRIDE=override)
|
||||||
elseif (GCC_VERSION VERSION_GREATER 4.6 OR GCC_VERSION VERSION_EQUAL 4.6)
|
elseif (GCC_VERSION VERSION_GREATER 4.6 OR GCC_VERSION VERSION_EQUAL 4.6)
|
||||||
message(STATUS "Detected GCC version 4.6+")
|
message(STATUS "Detected GCC version 4.6+")
|
||||||
set(CXX11_FLAGS "-std=c++0x -Doverride=")
|
set(CXX11_FLAGS "-std=c++0x")
|
||||||
|
add_definitions(-DOVERRIDE=)
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "${PROJECT_NAME} requires GCC 4.6 or greater.")
|
message(FATAL_ERROR "${PROJECT_NAME} requires GCC 4.6 or greater.")
|
||||||
endif()
|
endif()
|
||||||
|
set(NORMAL_CXX_FLAGS "-Wall -Wold-style-cast")
|
||||||
|
set(RELEASE_CXX_FLAGS "-O2")
|
||||||
|
set(DEBUG_CXX_FLAGS "-g -O0")
|
||||||
|
set(TEST_CXX_FLAGS "-pthread")
|
||||||
|
add_definitions(-DNOEXCEPT=noexcept)
|
||||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
message(STATUS "Detected Clang compiler")
|
message(STATUS "Detected Clang compiler")
|
||||||
set(CXX11_FLAGS "-std=c++11")
|
set(CXX11_FLAGS "-std=c++11")
|
||||||
|
set(NORMAL_CXX_FLAGS "-Wall -Wold-style-cast")
|
||||||
|
set(RELEASE_CXX_FLAGS "-O2")
|
||||||
|
set(DEBUG_CXX_FLAGS "-g -O0")
|
||||||
|
set(TEST_CXX_FLAGS "-pthread")
|
||||||
|
add_definitions(-DNOEXCEPT=noexcept)
|
||||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||||
message(STATUS "Detected MSVC compiler")
|
message(STATUS "Detected MSVC compiler")
|
||||||
set(CXX11_FLAGS "")
|
set(CXX11_FLAGS "")
|
||||||
|
set(NORMAL_CXX_FLAGS "")
|
||||||
|
set(RELEASE_CXX_FLAGS "")
|
||||||
|
set(DEBUG_CXX_FLAGS "")
|
||||||
|
set(TEST_CXX_FLAGS "")
|
||||||
|
add_definitions(-DNOEXCEPT=)
|
||||||
|
add_definitions(-DOVERRIDE=override)
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Your C++ compiler doesn't seem to be supported.")
|
message(FATAL_ERROR "Your C++ compiler doesn't seem to be supported.")
|
||||||
endif()
|
endif()
|
||||||
|
@ -142,14 +160,14 @@ endif()
|
||||||
# The flags are used throughout src/ and test/ subdirs
|
# The flags are used throughout src/ and test/ subdirs
|
||||||
|
|
||||||
# Special flags for boost
|
# Special flags for boost
|
||||||
set(Boost_FLAGS "-DBOOST_NO_SCOPED_ENUMS -DBOOST_NO_CXX11_SCOPED_ENUMS")
|
add_definitions(-DBOOST_NO_SCOPED_ENUMS -DBOOST_NO_CXX11_SCOPED_ENUMS)
|
||||||
|
|
||||||
set(COLOBOT_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wold-style-cast ${CXX11_FLAGS} ${Boost_FLAGS}")
|
set(COLOBOT_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NORMAL_CXX_FLAGS} ${CXX11_FLAGS}")
|
||||||
set(COLOBOT_CXX_FLAGS_RELEASE "-O2")
|
set(COLOBOT_CXX_FLAGS_RELEASE "${RELEASE_CXX_FLAGS}")
|
||||||
set(COLOBOT_CXX_FLAGS_DEBUG "-g -O0")
|
set(COLOBOT_CXX_FLAGS_DEBUG "${DEBUG_CXX_FLAGS}")
|
||||||
|
|
||||||
# Flags for gtest
|
# Flags for gtest
|
||||||
set(COLOBOT_GTEST_CXX_FLAGS "-pthread")
|
set(COLOBOT_GTEST_CXX_FLAGS "${TEST_CXX_FLAGS}")
|
||||||
|
|
||||||
|
|
||||||
# Asserts can be enabled/disabled regardless of build type
|
# Asserts can be enabled/disabled regardless of build type
|
||||||
|
@ -179,7 +197,7 @@ option(INSTALL_DOCS "Install Doxygen-generated documentation" OFF)
|
||||||
# Build OpenAL sound support
|
# Build OpenAL sound support
|
||||||
option(OPENAL_SOUND "Build OpenAL sound support" ON)
|
option(OPENAL_SOUND "Build OpenAL sound support" ON)
|
||||||
|
|
||||||
# Change to false in case static boost libraries are not available
|
# This is useful in case you want to use static boost libraries
|
||||||
option(BOOST_STATIC "Link with static boost libraries" OFF)
|
option(BOOST_STATIC "Link with static boost libraries" OFF)
|
||||||
|
|
||||||
# This is useful on Windows, if linking against standard GLEW dll fails
|
# This is useful on Windows, if linking against standard GLEW dll fails
|
||||||
|
|
|
@ -40,15 +40,15 @@ struct SystemTimeStamp
|
||||||
class CSystemUtilsLinux : public CSystemUtils
|
class CSystemUtilsLinux : public CSystemUtils
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void Init() override;
|
virtual void Init() OVERRIDE;
|
||||||
|
|
||||||
virtual SystemDialogResult SystemDialog(SystemDialogType type, const std::string& title, const std::string& message) override;
|
virtual SystemDialogResult SystemDialog(SystemDialogType type, const std::string& title, const std::string& message) OVERRIDE;
|
||||||
|
|
||||||
virtual void GetCurrentTimeStamp(SystemTimeStamp *stamp) override;
|
virtual void GetCurrentTimeStamp(SystemTimeStamp *stamp) OVERRIDE;
|
||||||
virtual long long GetTimeStampExactResolution() override;
|
virtual long long GetTimeStampExactResolution() OVERRIDE;
|
||||||
virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) override;
|
virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) OVERRIDE;
|
||||||
|
|
||||||
virtual std::string GetSaveDir() override;
|
virtual std::string GetSaveDir() OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_zenityAvailable;
|
bool m_zenityAvailable;
|
||||||
|
|
|
@ -28,11 +28,11 @@
|
||||||
class CSystemUtilsMacOSX : public CSystemUtilsOther
|
class CSystemUtilsMacOSX : public CSystemUtilsOther
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void Init() override;
|
virtual void Init() OVERRIDE;
|
||||||
|
|
||||||
virtual std::string GetDataPath() override;
|
virtual std::string GetDataPath() OVERRIDE;
|
||||||
virtual std::string GetLangPath() override;
|
virtual std::string GetLangPath() OVERRIDE;
|
||||||
virtual std::string GetSaveDir() override;
|
virtual std::string GetSaveDir() OVERRIDE;
|
||||||
private:
|
private:
|
||||||
std::string m_ASPath;
|
std::string m_ASPath;
|
||||||
std::string m_dataPath;
|
std::string m_dataPath;
|
||||||
|
|
|
@ -43,10 +43,10 @@ class CSystemUtilsOther : public CSystemUtils
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void Init() {};
|
virtual void Init() {};
|
||||||
virtual SystemDialogResult SystemDialog(SystemDialogType type, const std::string& title, const std::string& message) override;
|
virtual SystemDialogResult SystemDialog(SystemDialogType type, const std::string& title, const std::string& message) OVERRIDE;
|
||||||
|
|
||||||
virtual void GetCurrentTimeStamp(SystemTimeStamp *stamp) override;
|
virtual void GetCurrentTimeStamp(SystemTimeStamp *stamp) OVERRIDE;
|
||||||
virtual long long int GetTimeStampExactResolution() override;
|
virtual long long int GetTimeStampExactResolution() OVERRIDE;
|
||||||
virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) override;
|
virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) OVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -38,15 +38,15 @@ struct SystemTimeStamp
|
||||||
class CSystemUtilsWindows : public CSystemUtils
|
class CSystemUtilsWindows : public CSystemUtils
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void Init() override;
|
virtual void Init() OVERRIDE;
|
||||||
|
|
||||||
virtual SystemDialogResult SystemDialog(SystemDialogType type, const std::string& title, const std::string& message) override;
|
virtual SystemDialogResult SystemDialog(SystemDialogType type, const std::string& title, const std::string& message) OVERRIDE;
|
||||||
|
|
||||||
virtual void GetCurrentTimeStamp(SystemTimeStamp *stamp) override;
|
virtual void GetCurrentTimeStamp(SystemTimeStamp *stamp) OVERRIDE;
|
||||||
virtual long long GetTimeStampExactResolution() override;
|
virtual long long GetTimeStampExactResolution() OVERRIDE;
|
||||||
virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) override;
|
virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) OVERRIDE;
|
||||||
|
|
||||||
virtual std::string GetSaveDir() override;
|
virtual std::string GetSaveDir() OVERRIDE;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static std::string UTF8_Encode(const std::wstring &wstr);
|
static std::string UTF8_Encode(const std::wstring &wstr);
|
||||||
|
|
|
@ -106,84 +106,84 @@ public:
|
||||||
CGLDevice(const GLDeviceConfig &config);
|
CGLDevice(const GLDeviceConfig &config);
|
||||||
virtual ~CGLDevice();
|
virtual ~CGLDevice();
|
||||||
|
|
||||||
virtual void DebugHook() override;
|
virtual void DebugHook() OVERRIDE;
|
||||||
virtual void DebugLights() override;
|
virtual void DebugLights() OVERRIDE;
|
||||||
|
|
||||||
virtual bool Create() override;
|
virtual bool Create() OVERRIDE;
|
||||||
virtual void Destroy() override;
|
virtual void Destroy() OVERRIDE;
|
||||||
|
|
||||||
void ConfigChanged(const GLDeviceConfig &newConfig);
|
void ConfigChanged(const GLDeviceConfig &newConfig);
|
||||||
|
|
||||||
void SetUseVbo(bool useVbo);
|
void SetUseVbo(bool useVbo);
|
||||||
void SetVertexBufferType(VertexBufferType type);
|
void SetVertexBufferType(VertexBufferType type);
|
||||||
|
|
||||||
virtual void BeginScene() override;
|
virtual void BeginScene() OVERRIDE;
|
||||||
virtual void EndScene() override;
|
virtual void EndScene() OVERRIDE;
|
||||||
|
|
||||||
virtual void Clear() override;
|
virtual void Clear() OVERRIDE;
|
||||||
|
|
||||||
virtual void SetTransform(TransformType type, const Math::Matrix &matrix) override;
|
virtual void SetTransform(TransformType type, const Math::Matrix &matrix) OVERRIDE;
|
||||||
|
|
||||||
virtual void SetMaterial(const Material &material) override;
|
virtual void SetMaterial(const Material &material) OVERRIDE;
|
||||||
|
|
||||||
virtual int GetMaxLightCount() override;
|
virtual int GetMaxLightCount() OVERRIDE;
|
||||||
virtual void SetLight(int index, const Light &light) override;
|
virtual void SetLight(int index, const Light &light) OVERRIDE;
|
||||||
virtual void SetLightEnabled(int index, bool enabled) override;
|
virtual void SetLightEnabled(int index, bool enabled) OVERRIDE;
|
||||||
|
|
||||||
virtual Texture CreateTexture(CImage *image, const TextureCreateParams ¶ms) override;
|
virtual Texture CreateTexture(CImage *image, const TextureCreateParams ¶ms) OVERRIDE;
|
||||||
virtual Texture CreateTexture(ImageData *data, const TextureCreateParams ¶ms) override;
|
virtual Texture CreateTexture(ImageData *data, const TextureCreateParams ¶ms) OVERRIDE;
|
||||||
virtual void DestroyTexture(const Texture &texture) override;
|
virtual void DestroyTexture(const Texture &texture) OVERRIDE;
|
||||||
virtual void DestroyAllTextures() override;
|
virtual void DestroyAllTextures() OVERRIDE;
|
||||||
|
|
||||||
virtual int GetMaxTextureStageCount() override;
|
virtual int GetMaxTextureStageCount() OVERRIDE;
|
||||||
virtual void SetTexture(int index, const Texture &texture) override;
|
virtual void SetTexture(int index, const Texture &texture) OVERRIDE;
|
||||||
virtual void SetTexture(int index, unsigned int textureId) override;
|
virtual void SetTexture(int index, unsigned int textureId) OVERRIDE;
|
||||||
virtual void SetTextureEnabled(int index, bool enabled) override;
|
virtual void SetTextureEnabled(int index, bool enabled) OVERRIDE;
|
||||||
|
|
||||||
virtual void SetTextureStageParams(int index, const TextureStageParams ¶ms) override;
|
virtual void SetTextureStageParams(int index, const TextureStageParams ¶ms) OVERRIDE;
|
||||||
|
|
||||||
virtual void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, Gfx::TexWrapMode wrapT) override;
|
virtual void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, Gfx::TexWrapMode wrapT) OVERRIDE;
|
||||||
|
|
||||||
virtual void DrawPrimitive(PrimitiveType type, const Vertex *vertices , int vertexCount,
|
virtual void DrawPrimitive(PrimitiveType type, const Vertex *vertices , int vertexCount,
|
||||||
Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override;
|
Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) OVERRIDE;
|
||||||
virtual void DrawPrimitive(PrimitiveType type, const VertexTex2 *vertices, int vertexCount,
|
virtual void DrawPrimitive(PrimitiveType type, const VertexTex2 *vertices, int vertexCount,
|
||||||
Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override;
|
Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) OVERRIDE;
|
||||||
virtual void DrawPrimitive(PrimitiveType type, const VertexCol *vertices , int vertexCount) override;
|
virtual void DrawPrimitive(PrimitiveType type, const VertexCol *vertices , int vertexCount) OVERRIDE;
|
||||||
|
|
||||||
virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override;
|
virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) OVERRIDE;
|
||||||
virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override;
|
virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) OVERRIDE;
|
||||||
virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override;
|
virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) OVERRIDE;
|
||||||
virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override;
|
virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) OVERRIDE;
|
||||||
virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override;
|
virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) OVERRIDE;
|
||||||
virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override;
|
virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) OVERRIDE;
|
||||||
virtual void DrawStaticBuffer(unsigned int bufferId) override;
|
virtual void DrawStaticBuffer(unsigned int bufferId) OVERRIDE;
|
||||||
virtual void DestroyStaticBuffer(unsigned int bufferId) override;
|
virtual void DestroyStaticBuffer(unsigned int bufferId) OVERRIDE;
|
||||||
|
|
||||||
virtual int ComputeSphereVisibility(const Math::Vector ¢er, float radius) override;
|
virtual int ComputeSphereVisibility(const Math::Vector ¢er, float radius) OVERRIDE;
|
||||||
|
|
||||||
virtual void SetRenderState(RenderState state, bool enabled) override;
|
virtual void SetRenderState(RenderState state, bool enabled) OVERRIDE;
|
||||||
|
|
||||||
virtual void SetDepthTestFunc(CompFunc func) override;
|
virtual void SetDepthTestFunc(CompFunc func) OVERRIDE;
|
||||||
|
|
||||||
virtual void SetDepthBias(float factor) override;
|
virtual void SetDepthBias(float factor) OVERRIDE;
|
||||||
|
|
||||||
virtual void SetAlphaTestFunc(CompFunc func, float refValue) override;
|
virtual void SetAlphaTestFunc(CompFunc func, float refValue) OVERRIDE;
|
||||||
|
|
||||||
virtual void SetBlendFunc(BlendFunc srcBlend, BlendFunc dstBlend) override;
|
virtual void SetBlendFunc(BlendFunc srcBlend, BlendFunc dstBlend) OVERRIDE;
|
||||||
|
|
||||||
virtual void SetClearColor(const Color &color) override;
|
virtual void SetClearColor(const Color &color) OVERRIDE;
|
||||||
|
|
||||||
virtual void SetGlobalAmbient(const Color &color) override;
|
virtual void SetGlobalAmbient(const Color &color) OVERRIDE;
|
||||||
|
|
||||||
virtual void SetFogParams(FogMode mode, const Color &color, float start, float end, float density) override;
|
virtual void SetFogParams(FogMode mode, const Color &color, float start, float end, float density) OVERRIDE;
|
||||||
|
|
||||||
virtual void SetCullMode(CullMode mode) override;
|
virtual void SetCullMode(CullMode mode) OVERRIDE;
|
||||||
|
|
||||||
virtual void SetShadeModel(ShadeModel model) override;
|
virtual void SetShadeModel(ShadeModel model) OVERRIDE;
|
||||||
|
|
||||||
virtual void SetFillMode(FillMode mode) override;
|
virtual void SetFillMode(FillMode mode) OVERRIDE;
|
||||||
|
|
||||||
virtual void* GetFrameBufferPixels() const override;
|
virtual void* GetFrameBufferPixels() const OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//! Updates internal modelview matrix
|
//! Updates internal modelview matrix
|
||||||
|
|
|
@ -41,7 +41,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Overriden to avoid warning about hiding virtual function
|
// Overriden to avoid warning about hiding virtual function
|
||||||
virtual void Start(int param) override;
|
virtual void Start(int param) OVERRIDE;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
float m_force;
|
float m_force;
|
||||||
|
|
|
@ -24,22 +24,22 @@
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
#include <boost/lexical_cast.hpp>
|
||||||
|
|
||||||
CLevelParserException::CLevelParserException(std::string message) noexcept
|
CLevelParserException::CLevelParserException(std::string message) NOEXCEPT
|
||||||
{
|
{
|
||||||
m_message = message;
|
m_message = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* CLevelParserException::what() const noexcept
|
const char* CLevelParserException::what() const NOEXCEPT
|
||||||
{
|
{
|
||||||
return m_message.c_str();
|
return m_message.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
CLevelParserExceptionMissingParam::CLevelParserExceptionMissingParam(CLevelParserParam* thisParam) noexcept
|
CLevelParserExceptionMissingParam::CLevelParserExceptionMissingParam(CLevelParserParam* thisParam) NOEXCEPT
|
||||||
: CLevelParserException("Missing required param "+thisParam->GetName()+" (in "+thisParam->GetLine()->GetLevel()->GetFilename()+":"+boost::lexical_cast<std::string>(thisParam->GetLine()->GetLineNumber())+")")
|
: CLevelParserException("Missing required param "+thisParam->GetName()+" (in "+thisParam->GetLine()->GetLevel()->GetFilename()+":"+boost::lexical_cast<std::string>(thisParam->GetLine()->GetLineNumber())+")")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
CLevelParserExceptionBadParam::CLevelParserExceptionBadParam(CLevelParserParam* thisParam, std::string requestedType) noexcept
|
CLevelParserExceptionBadParam::CLevelParserExceptionBadParam(CLevelParserParam* thisParam, std::string requestedType) NOEXCEPT
|
||||||
: CLevelParserException("Unable to parse '"+thisParam->GetValue()+"' as "+requestedType+" (param '"+thisParam->GetName()+"' in "+thisParam->GetLine()->GetLevel()->GetFilename()+":"+boost::lexical_cast<std::string>(thisParam->GetLine()->GetLineNumber())+")")
|
: CLevelParserException("Unable to parse '"+thisParam->GetValue()+"' as "+requestedType+" (param '"+thisParam->GetName()+"' in "+thisParam->GetLine()->GetLevel()->GetFilename()+":"+boost::lexical_cast<std::string>(thisParam->GetLine()->GetLineNumber())+")")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,9 +32,9 @@ class CLevelParserParam;
|
||||||
class CLevelParserException : public std::exception
|
class CLevelParserException : public std::exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CLevelParserException(std::string message) noexcept;
|
CLevelParserException(std::string message) NOEXCEPT;
|
||||||
virtual ~CLevelParserException() noexcept {}
|
virtual ~CLevelParserException() NOEXCEPT {}
|
||||||
const char* what() const noexcept;
|
const char* what() const NOEXCEPT;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string m_message;
|
std::string m_message;
|
||||||
|
@ -43,13 +43,13 @@ protected:
|
||||||
class CLevelParserExceptionMissingParam : public CLevelParserException
|
class CLevelParserExceptionMissingParam : public CLevelParserException
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CLevelParserExceptionMissingParam(CLevelParserParam* thisParam) noexcept;
|
CLevelParserExceptionMissingParam(CLevelParserParam* thisParam) NOEXCEPT;
|
||||||
virtual ~CLevelParserExceptionMissingParam() noexcept {}
|
virtual ~CLevelParserExceptionMissingParam() NOEXCEPT {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class CLevelParserExceptionBadParam : public CLevelParserException
|
class CLevelParserExceptionBadParam : public CLevelParserException
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CLevelParserExceptionBadParam(CLevelParserParam* thisParam, std::string requestedType) noexcept;
|
CLevelParserExceptionBadParam(CLevelParserParam* thisParam, std::string requestedType) NOEXCEPT;
|
||||||
virtual ~CLevelParserExceptionBadParam() noexcept {}
|
virtual ~CLevelParserExceptionBadParam() NOEXCEPT {}
|
||||||
};
|
};
|
|
@ -50,40 +50,40 @@ public:
|
||||||
ALSound();
|
ALSound();
|
||||||
~ALSound();
|
~ALSound();
|
||||||
|
|
||||||
bool Create() override;
|
bool Create() OVERRIDE;
|
||||||
bool Cache(Sound, const std::string &) override;
|
bool Cache(Sound, const std::string &) OVERRIDE;
|
||||||
bool CacheMusic(const std::string &) override;
|
bool CacheMusic(const std::string &) OVERRIDE;
|
||||||
bool IsCached(Sound) override;
|
bool IsCached(Sound) OVERRIDE;
|
||||||
bool IsCachedMusic(const std::string &) override;
|
bool IsCachedMusic(const std::string &) OVERRIDE;
|
||||||
|
|
||||||
bool GetEnable() override;
|
bool GetEnable() OVERRIDE;
|
||||||
|
|
||||||
void SetAudioVolume(int volume) override;
|
void SetAudioVolume(int volume) OVERRIDE;
|
||||||
int GetAudioVolume() override;
|
int GetAudioVolume() OVERRIDE;
|
||||||
void SetMusicVolume(int volume) override;
|
void SetMusicVolume(int volume) OVERRIDE;
|
||||||
int GetMusicVolume() override;
|
int GetMusicVolume() OVERRIDE;
|
||||||
|
|
||||||
void SetListener(const Math::Vector &eye, const Math::Vector &lookat) override;
|
void SetListener(const Math::Vector &eye, const Math::Vector &lookat) OVERRIDE;
|
||||||
void FrameMove(float rTime) override;
|
void FrameMove(float rTime) OVERRIDE;
|
||||||
|
|
||||||
int Play(Sound sound, float amplitude=1.0f, float frequency=1.0f, bool bLoop = false) override;
|
int Play(Sound sound, float amplitude=1.0f, float frequency=1.0f, bool bLoop = false) OVERRIDE;
|
||||||
int Play(Sound sound, const Math::Vector &pos, float amplitude=1.0f, float frequency=1.0f, bool bLoop = false) override;
|
int Play(Sound sound, const Math::Vector &pos, float amplitude=1.0f, float frequency=1.0f, bool bLoop = false) OVERRIDE;
|
||||||
bool FlushEnvelope(int channel) override;
|
bool FlushEnvelope(int channel) OVERRIDE;
|
||||||
bool AddEnvelope(int channel, float amplitude, float frequency, float time, SoundNext oper) override;
|
bool AddEnvelope(int channel, float amplitude, float frequency, float time, SoundNext oper) OVERRIDE;
|
||||||
bool Position(int channel, const Math::Vector &pos) override;
|
bool Position(int channel, const Math::Vector &pos) OVERRIDE;
|
||||||
bool Frequency(int channel, float frequency) override;
|
bool Frequency(int channel, float frequency) OVERRIDE;
|
||||||
bool Stop(int channel) override;
|
bool Stop(int channel) OVERRIDE;
|
||||||
bool StopAll() override;
|
bool StopAll() OVERRIDE;
|
||||||
bool MuteAll(bool bMute) override;
|
bool MuteAll(bool bMute) OVERRIDE;
|
||||||
|
|
||||||
bool PlayMusic(int rank, bool bRepeat, float fadeTime=2.0f) override;
|
bool PlayMusic(int rank, bool bRepeat, float fadeTime=2.0f) OVERRIDE;
|
||||||
bool PlayMusic(const std::string &filename, bool bRepeat, float fadeTime=2.0f) override;
|
bool PlayMusic(const std::string &filename, bool bRepeat, float fadeTime=2.0f) OVERRIDE;
|
||||||
bool RestartMusic() override;
|
bool RestartMusic() OVERRIDE;
|
||||||
void SuspendMusic() override;
|
void SuspendMusic() OVERRIDE;
|
||||||
void StopMusic(float fadeTime=2.0f) override;
|
void StopMusic(float fadeTime=2.0f) OVERRIDE;
|
||||||
bool IsPlayingMusic() override;
|
bool IsPlayingMusic() OVERRIDE;
|
||||||
bool PlayPauseMusic(const std::string &filename, bool repeat) override;
|
bool PlayPauseMusic(const std::string &filename, bool repeat) OVERRIDE;
|
||||||
void StopPauseMusic() override;
|
void StopPauseMusic() OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CleanUp();
|
void CleanUp();
|
||||||
|
|
|
@ -97,7 +97,7 @@ class CList : public CControl
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Overridden to avoid warning about hiding the virtual function
|
// Overridden to avoid warning about hiding the virtual function
|
||||||
virtual bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) override;
|
virtual bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) OVERRIDE;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CButton* m_button[LISTMAXDISPLAY];
|
CButton* m_button[LISTMAXDISPLAY];
|
||||||
|
|
|
@ -85,7 +85,7 @@ public:
|
||||||
EventType GetEventTypeFull();
|
EventType GetEventTypeFull();
|
||||||
EventType GetEventTypeClose();
|
EventType GetEventTypeClose();
|
||||||
|
|
||||||
virtual void SetName(std::string name, bool tooltip = true) override;
|
virtual void SetName(std::string name, bool tooltip = true) OVERRIDE;
|
||||||
|
|
||||||
void SetTrashEvent(bool bTrash);
|
void SetTrashEvent(bool bTrash);
|
||||||
bool GetTrashEvent();
|
bool GetTrashEvent();
|
||||||
|
|
Loading…
Reference in New Issue