Merged in dev-functional (pull request #8)

Dev functional

--HG--
branch : dev
This commit is contained in:
Martín Lucas Golini
2018-11-26 14:13:53 +00:00
61 changed files with 450 additions and 349 deletions

View File

@@ -1,6 +1,8 @@
#ifndef EE_BASE_HPP
#define EE_BASE_HPP
#include <functional>
#include <eepp/thirdparty/PlusCallback/callback.hpp>
#include <eepp/config.hpp>

View File

@@ -17,7 +17,7 @@ namespace EE { namespace Graphics {
class EE_API Console : protected LogReaderInterface {
public:
//! The Console Callback return a vector of parameters ( String )
typedef cb::Callback1<void, const std::vector < String >& > ConsoleCallback;
typedef std::function<void( const std::vector < String >& )> ConsoleCallback;
/** Instances the console but doesn't create it, you must call Create to initialize the console. */
Console( EE::Window::Window * window = NULL );

View File

@@ -30,7 +30,7 @@ class EE_API ShaderProgram {
/** Creates the vertex and fragment shader from an array of strings */
static ShaderProgram * New( const char ** VertexShaderData, const Uint32& NumLinesVS, const char ** FragmentShaderData, const Uint32& NumLinesFS, const std::string& Name = "" );
typedef cb::Callback1<void, ShaderProgram*> ShaderProgramReloadCb;
typedef std::function<void( ShaderProgram* )> ShaderProgramReloadCb;
virtual ~ShaderProgram();

View File

@@ -15,7 +15,7 @@ namespace EE { namespace Graphics {
class EE_API Sprite : public Drawable {
public:
/// Event ID - Sprite - User Data
typedef cb::Callback3< void, Uint32, Sprite *, void * > SpriteCallback;
typedef std::function<void( Uint32, Sprite *, void * )> SpriteCallback;
/** @brief SpriteEvents The events that can be reported by the Sprite */
enum SpriteEvents {

View File

@@ -17,7 +17,7 @@ class TextureAtlas;
/** @brief The Texture Atlas Loader loads any previously created Texture Atlas. */
class EE_API TextureAtlasLoader {
public:
typedef cb::Callback1<void, TextureAtlasLoader *> GLLoadCallback;
typedef std::function<void( TextureAtlasLoader * )> GLLoadCallback;
/** Creates an empty loader. The texture atlas can be loaded callin any Load* function. */
TextureAtlasLoader();

View File

@@ -35,7 +35,7 @@ class UIMap;
class EE_API MapEditor {
public:
typedef cb::Callback0<void> MapEditorCloseCb;
typedef std::function<void()> MapEditorCloseCb;
static MapEditor * New( UIWindow * AttatchTo = NULL, const MapEditorCloseCb& callback = MapEditorCloseCb() );

View File

@@ -28,9 +28,9 @@ class EE_API TileMap {
public:
typedef std::map<std::string, std::string> PropertiesMap;
typedef std::list<std::string> GOTypesList; //! Special object types used in this map
typedef cb::Callback4< GameObject *, const Uint32&, const Uint32&, MapLayer *, const Uint32&> CreateGOCb;
typedef cb::Callback0<void> MapDrawCb;
typedef cb::Callback0<void> MapUpdateCb;
typedef std::function< GameObject *( const Uint32&, const Uint32&, MapLayer *, const Uint32& )> CreateGOCb;
typedef std::function<void()> MapDrawCb;
typedef std::function<void()> MapUpdateCb;
TileMap();

View File

@@ -29,9 +29,9 @@ class EE_API Interpolation1d {
~Interpolation1d();
typedef cb::Callback1<void,Interpolation1d&> OnPathEndCallback;
typedef std::function<void(Interpolation1d&)> OnPathEndCallback;
typedef cb::Callback1<void,Interpolation1d&> OnStepCallback;
typedef std::function<void(Interpolation1d&)> OnStepCallback;
/** Add a new point */
Interpolation1d& add( const Float& pos, const Time& Time = Time::Zero );

View File

@@ -30,9 +30,9 @@ class EE_API Interpolation2d {
~Interpolation2d();
typedef cb::Callback1<void,Interpolation2d&> OnPathEndCallback;
typedef std::function<void(Interpolation2d&)> OnPathEndCallback;
typedef cb::Callback1<void,Interpolation2d&> OnStepCallback;
typedef std::function<void(Interpolation2d&)> OnStepCallback;
/** Add a new waypoint */
Interpolation2d& add(const Vector2f& pos, const Time& time = Time::Zero );

View File

@@ -307,7 +307,7 @@ class EE_API Http : NonCopyable {
Response downloadRequest(const Request& request, std::string writePath, Time timeout = Time::Zero);
/** Definition of the async callback response */
typedef cb::Callback3<void, const Http&, Http::Request&, Http::Response&> AsyncResponseCallback;
typedef std::function<void( const Http&, Http::Request&, Http::Response& )> AsyncResponseCallback;
/** @brief Sends the request and creates a new thread, when got the response informs the result to the callback.
** This function does not lock the caller thread.

View File

@@ -11,11 +11,11 @@ class Arbiter;
class CP_API Body {
public:
typedef cb::Callback3<void, Body *, Shape *, void * > ShapeIteratorFunc;
typedef cb::Callback3<void, Body *, Constraint *, void *> ConstraintIteratorFunc;
typedef cb::Callback3<void, Body *, Arbiter *, void *> ArbiterIteratorFunc;
typedef cb::Callback4<void, Body *, cVect, cpFloat, cpFloat> BodyVelocityFunc;
typedef cb::Callback2<void, Body *, cpFloat> BodyPositionFunc;
typedef std::function<void( Body *, Shape *, void * )> ShapeIteratorFunc;
typedef std::function<void( Body *, Constraint *, void *)> ConstraintIteratorFunc;
typedef std::function<void( Body *, Arbiter *, void *)> ArbiterIteratorFunc;
typedef std::function<void( Body *, cVect, cpFloat, cpFloat)> BodyVelocityFunc;
typedef std::function<void( Body *, cpFloat )> BodyPositionFunc;
class ShapeIterator {
public:

View File

@@ -12,16 +12,16 @@ CP_NAMESPACE_BEGIN
class CP_API Space {
public:
typedef cb::Callback3<int , Arbiter *, Space * , void * > CollisionBeginFunc;
typedef cb::Callback3<int , Arbiter *, Space * , void * > CollisionPreSolveFunc;
typedef cb::Callback3<void , Arbiter *, Space * , void * > CollisionPostSolveFunc;
typedef cb::Callback3<void , Arbiter *, Space * , void * > CollisionSeparateFunc;
typedef cb::Callback3<void , Space * , void * , void * > PostStepCallback;
typedef cb::Callback2<void , Shape * , void * > BBQueryFunc;
typedef cb::Callback4<void , Shape * , cpFloat , cVect , void * > SegmentQueryFunc;
typedef cb::Callback2<void , Shape * , void * > PointQueryFunc;
typedef cb::Callback3<void , Space * , Body * , void * > BodyIteratorFunc;
typedef cb::Callback3<void , Space * , Shape * , void * > ShapeIteratorFunc;
typedef std::function<int ( Arbiter *, Space * , void * )> CollisionBeginFunc;
typedef std::function<int ( Arbiter *, Space * , void * )> CollisionPreSolveFunc;
typedef std::function<void ( Arbiter *, Space * , void * )> CollisionPostSolveFunc;
typedef std::function<void ( Arbiter *, Space * , void * )> CollisionSeparateFunc;
typedef std::function<void ( Space * , void * , void * )> PostStepCallback;
typedef std::function<void ( Shape * , void * )> BBQueryFunc;
typedef std::function<void ( Shape * , cpFloat , cVect , void * )> SegmentQueryFunc;
typedef std::function<void ( Shape * , void * )> PointQueryFunc;
typedef std::function<void ( Space * , Body * , void * )> BodyIteratorFunc;
typedef std::function<void ( Space * , Shape * , void * )> ShapeIteratorFunc;
class CollisionHandler {
public:
@@ -32,7 +32,7 @@ class CP_API Space {
{
}
inline void Reset() {
inline void reset() {
a = 0;
b = 0;
data = NULL;

View File

@@ -20,7 +20,7 @@ class EE_API Action {
OnStep
};
typedef cb::Callback2<void,Action*,const ActionType&> ActionCallback;
typedef std::function<void(Action*,const ActionType&)> ActionCallback;
Action();

View File

@@ -65,7 +65,7 @@ class EE_API Node : public Transformable {
public:
static Node * New();
typedef cb::Callback1<void, const Event*> EventCallback;
typedef std::function<void( const Event* )> EventCallback;
Node();

View File

@@ -10,7 +10,7 @@ namespace EE { namespace System {
/** @brief Base class that defines resources to be loaded in synchronous or asynchronous mode. */
class EE_API ObjectLoader : protected Thread {
public:
typedef cb::Callback1<void, ObjectLoader *> ObjLoadCallback;
typedef std::function<void( ObjectLoader * )> ObjLoadCallback;
/** @brief LoaderType Definition of the Object Loaders implemented by the engine. */
enum ObjLoaderType {

View File

@@ -10,7 +10,7 @@ namespace EE { namespace System {
/** @brief A simple resource loader that can load a batch of resources synchronously or asynchronously */
class EE_API ResourceLoader {
public:
typedef cb::Callback1<void, ResourceLoader *> ResLoadCallback;
typedef std::function<void( ResourceLoader * )> ResLoadCallback;
/** @param MaxThreads Set the maximun simultaneous threads to load resources, THREADS_AUTO will use the cpu number of cores. */
ResourceLoader( const Uint32& MaxThreads = THREADS_AUTO );

View File

@@ -29,7 +29,7 @@ class EE_API VirtualFileSystem : protected Container<Pack> {
vfsFile() {}
vfsFile( std::string path, Pack * pack ) :
vfsFile( const std::string& path, Pack * pack ) :
path( path ),
pack( pack )
{}

View File

@@ -18,7 +18,7 @@ class TextureAtlasTextureRegionEditor;
class EE_API TextureAtlasEditor {
public:
typedef cb::Callback0<void> TGEditorCloseCb;
typedef std::function<void()> TGEditorCloseCb;
static TextureAtlasEditor * New( UIWindow * AttatchTo = NULL, const TGEditorCloseCb& callback = TGEditorCloseCb() );

View File

@@ -22,7 +22,7 @@ class EE_API UINode : public Node {
public:
static UINode * New();
typedef cb::Callback1<void, const Event*> EventCallback;
typedef std::function<void( const Event* )> EventCallback;
UINode();

View File

@@ -8,8 +8,8 @@ namespace EE { namespace UI {
class EE_API UIWidgetCreator {
public:
typedef cb::Callback1<UIWidget*, std::string> CustomWidgetCb;
typedef cb::Callback0<UIWidget*> RegisterWidgetCb;
typedef std::function<UIWidget*( std::string )> CustomWidgetCb;
typedef std::function<UIWidget*()> RegisterWidgetCb;
static UIWidget * createFromName( std::string widgetName );

View File

@@ -17,7 +17,7 @@ namespace EE { namespace Window {
/** @brief The basic input class. For mouse and keyboard. */
class EE_API Input {
public:
typedef cb::Callback1<void, InputEvent*> InputCallback;
typedef std::function<void( InputEvent* )> InputCallback;
virtual ~Input();

View File

@@ -24,7 +24,7 @@ enum INPUT_TEXTBUFFER_FLAGS {
/** @brief A class to keep a buffer of the user writed text */
class EE_API InputTextBuffer {
public:
typedef cb::Callback0<void> EnterCallback;
typedef std::function<void()> EnterCallback;
InputTextBuffer( const bool& active, const bool& newLineEnabled, const bool& freeEditing, EE::Window::Window * window = NULL, const Uint32& maxLength = INPUT_LENGHT_MAX );

View File

@@ -151,8 +151,8 @@ class DisplayMode {
class EE_API Window {
public:
typedef cb::Callback1<void, Window*> WindowResizeCallback;
typedef cb::Callback1<bool, Window*> WindowRequestCloseCallback;
typedef std::function<void( Window* )> WindowResizeCallback;
typedef std::function<bool( Window* )> WindowRequestCloseCallback;
Window( WindowSettings Settings, ContextSettings Context, Clipboard * Clipboard, Input * Input, CursorManager * CursorManager );

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.5.0, 2018-03-17T18:27:20. -->
<!-- Written by QtCreator 4.7.82, 2018-11-25T02:07:25. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
@@ -61,6 +61,8 @@
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap">
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey"/>
<value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
<valuelist type="QVariantList" key="ClangStaticAnalyzer.SuppressedDiagnostics"/>
</valuemap>
</data>
@@ -72,7 +74,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{6d057187-158a-4883-8d5b-d470a6b6b025}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">10</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">2</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">../../make/linux</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
@@ -88,8 +90,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` eepp-test</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">eepp-test</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand">make</value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
@@ -128,8 +131,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` -e config=release eepp-test</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-e config=release eepp-test</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand"></value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
@@ -177,8 +181,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j8</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments"></value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand">make</value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
@@ -226,8 +231,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` -e config=release</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-e config=release</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand">make</value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
@@ -266,8 +272,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc`</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments"></value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand">make.sh</value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
@@ -306,8 +313,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` -e config=release</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-e config=release</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand">make.sh</value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
@@ -346,8 +354,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` eepp-sound</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">eepp-sound</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand">make</value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
@@ -386,8 +395,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` eepp-sprites</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">eepp-sprites</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand">make</value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
@@ -426,8 +436,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` eepp-fonts</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">eepp-fonts</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand">make</value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
@@ -466,8 +477,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` eepp-vbo-fbo-batch</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">eepp-vbo-fbo-batch</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand">make</value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
@@ -506,8 +518,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` eepp-physics</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">eepp-physics</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand">make</value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
@@ -546,8 +559,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` eepp-http-request</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">eepp-http-request</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand">make</value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
@@ -586,8 +600,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` eepp-static</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">eepp-static</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand"></value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
@@ -635,8 +650,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` eeiv</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">eeiv</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand">make</value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
@@ -675,8 +691,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` -e config=release eepp-static</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-e config=release eepp-static</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand"></value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
@@ -715,8 +732,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` eepp-shared</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">eepp-shared</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand"></value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
@@ -755,8 +773,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` -e config=release eepp-shared</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-e config=release eepp-shared</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand"></value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
@@ -804,8 +823,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` eepp-ew</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">eepp-ew</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand"></value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clone of </value>
@@ -844,8 +864,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` -e config=release eepp-ew</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-e config=release eepp-ew</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand"></value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clone of Make</value>
@@ -884,8 +905,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` eepp-es</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">eepp-es</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand"></value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clone of </value>
@@ -924,8 +946,9 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j`nproc` -e config=release eepp-es</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-e config=release eepp-es</value>
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand"></value>
<value type="bool" key="GenericProjectManager.GenericMakeStep.OverrideMakeflags">false</value>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clone of Make</value>
@@ -1015,19 +1038,20 @@
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">%{buildDir}../../../bin/eetest-debug</value>
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run %{buildDir}../../../bin/eetest-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">eetest-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseTerminal">false</value>
<value type="QString" key="RunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
@@ -1071,19 +1095,20 @@
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">%{buildDir}../../../bin/eetest</value>
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run %{buildDir}../../../bin/eetest</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">eetest-release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseTerminal">false</value>
<value type="QString" key="RunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.10">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
@@ -1127,19 +1152,20 @@
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">%{buildDir}../../../bin/eephysics-debug</value>
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run %{buildDir}../../../bin/eephysics-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">eephysics-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseTerminal">false</value>
<value type="QString" key="RunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.11">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
@@ -1183,19 +1209,20 @@
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">%{buildDir}../../../bin/eehttp-request-debug</value>
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run %{buildDir}../../../bin/eehttp-request-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">eehttp-request-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseTerminal">false</value>
<value type="QString" key="RunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.12">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
@@ -1239,19 +1266,20 @@
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">%{buildDir}../../../bin/eeiv-debug</value>
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run %{buildDir}../../../bin/eeiv-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">eeiv-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseTerminal">false</value>
<value type="QString" key="RunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.13">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
@@ -1295,19 +1323,20 @@
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">%{buildDir}../../../bin/eepp-TextureAtlasEditor-debug</value>
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run %{buildDir}../../../bin/eepp-TextureAtlasEditor-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">eepp-TextureAtlasEditor-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseTerminal">false</value>
<value type="QString" key="RunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.14">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
@@ -1351,19 +1380,20 @@
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">%{buildDir}../../../bin/eepp-MapEditor-debug</value>
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run %{buildDir}../../../bin/eepp-MapEditor-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">eepp-MapEditor-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseTerminal">false</value>
<value type="QString" key="RunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.15">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
@@ -1407,19 +1437,20 @@
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">%{buildDir}../../../bin/eepp-UIEditor-debug</value>
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run %{buildDir}../../../bin/eepp-UIEditor-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">eepp-UIEditor-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseTerminal">false</value>
<value type="QString" key="RunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.2">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
@@ -1463,19 +1494,20 @@
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">%{buildDir}../../../bin/eeew-debug</value>
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run %{buildDir}../../../bin/eeew-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">eeew-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseTerminal">false</value>
<value type="QString" key="RunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.3">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
@@ -1519,19 +1551,20 @@
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">%{buildDir}../../../bin/eeew</value>
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run %{buildDir}../../../bin/eeew</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">eeew-release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseTerminal">false</value>
<value type="QString" key="RunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.4">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
@@ -1575,19 +1608,20 @@
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">%{buildDir}../../../bin/eees-debug</value>
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run %{buildDir}../../../bin/eees-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">eees-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseTerminal">false</value>
<value type="QString" key="RunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.5">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
@@ -1631,19 +1665,20 @@
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">%{buildDir}../../../bin/eees</value>
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run %{buildDir}../../../bin/eees</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">eees-release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseTerminal">false</value>
<value type="QString" key="RunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.6">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
@@ -1687,19 +1722,20 @@
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">%{buildDir}../../../bin/eesound-debug</value>
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">true</value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run %{buildDir}../../../bin/eesound-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">eesound-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseTerminal">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.7">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
@@ -1743,19 +1779,20 @@
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">%{buildDir}../../../bin/eesprites-debug</value>
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run %{buildDir}../../../bin/eesprites-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">eesprites-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseTerminal">false</value>
<value type="QString" key="RunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.8">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
@@ -1799,19 +1836,20 @@
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">%{buildDir}../../../bin/eefonts-debug</value>
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run %{buildDir}../../../bin/eefonts-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">eefonts-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseTerminal">false</value>
<value type="QString" key="RunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.9">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
@@ -1855,19 +1893,20 @@
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">%{buildDir}../../../bin/eevbo-fbo-batch-debug</value>
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run %{buildDir}../../../bin/eevbo-fbo-batch-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">eevbo-fbo-batch-debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseTerminal">false</value>
<value type="QString" key="RunConfiguration.WorkingDirectory">%{buildDir}../../../bin/</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">16</value>
</valuemap>
@@ -1878,10 +1917,10 @@
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">18</value>
<value type="int">20</value>
</data>
<data>
<variable>Version</variable>
<value type="int">18</value>
<value type="int">20</value>
</data>
</qtcreator>

View File

@@ -197,7 +197,7 @@ void ShaderProgram::reload() {
link();
if ( mReloadCb.IsSet() ) {
if ( mReloadCb ) {
mReloadCb( this );
}
}

View File

@@ -27,7 +27,6 @@ Sprite::Sprite() :
mAnimTo( 0 ),
mUserData( NULL )
{
mCb.Reset();
}
Sprite::Sprite( const std::string& name, const std::string& extension, TextureAtlas * SearchInTextureAtlas ) :
@@ -47,7 +46,6 @@ Sprite::Sprite( const std::string& name, const std::string& extension, TextureAt
mAnimTo( 0 ),
mUserData( NULL )
{
mCb.Reset();
addFramesByPattern( name, extension, SearchInTextureAtlas );
}
@@ -68,7 +66,6 @@ Sprite::Sprite( TextureRegion * TextureRegion ) :
mAnimTo( 0 ),
mUserData( NULL )
{
mCb.Reset();
createStatic( TextureRegion );
}
@@ -89,7 +86,6 @@ Sprite::Sprite( const Uint32& TexId, const Sizef &DestSize, const Vector2i &Offs
mAnimTo( 0 ),
mUserData( NULL )
{
mCb.Reset();
createStatic( TexId, DestSize, Offset, TexSector );
}
@@ -835,11 +831,11 @@ void Sprite::setEventsCallback(const SpriteCallback& Cb , void * UserData ) {
}
void Sprite::clearCallback() {
mCb.Reset();
mCb = nullptr;
}
void Sprite::fireEvent( const Uint32& Event ) {
if ( SPR_FGET( SPRITE_FLAG_EVENTS_ENABLED ) && mCb.IsSet() ) {
if ( SPR_FGET( SPRITE_FLAG_EVENTS_ENABLED ) && mCb ) {
mCb( Event, this, mUserData );
}
}

View File

@@ -273,7 +273,7 @@ void TextureAtlasLoader::createTextureRegions() {
mLoaded = true;
if ( mLoadCallback.IsSet() ) {
if ( mLoadCallback ) {
mLoadCallback( this );
}
}

View File

@@ -1229,7 +1229,7 @@ void MapEditor::onLayerSelect( const Event * Event ) {
}
void MapEditor::windowClose( const Event * Event ) {
if ( mCloseCb.IsSet() )
if ( mCloseCb )
mCloseCb();
eeDelete( this );

View File

@@ -143,7 +143,7 @@ void MapLayerProperties::onOKClick( const Event * Event ) {
mLayer->setName( mUIInput->getText().toUtf8() );
if ( mRefreshCb.IsSet() ) {
if ( mRefreshCb ) {
mRefreshCb();
}

View File

@@ -16,7 +16,7 @@ class MapEditor;
class EE_API MapLayerProperties {
public:
typedef cb::Callback0<void> RefreshLayerListCb;
typedef std::function<void()> RefreshLayerListCb;
MapLayerProperties( MapLayer * Map, RefreshLayerListCb Cb = RefreshLayerListCb() );

View File

@@ -3,7 +3,7 @@
namespace EE { namespace Maps { namespace Private {
UIGOTypeNew::UIGOTypeNew( cb::Callback2<void, std::string, Uint32> Cb ) :
UIGOTypeNew::UIGOTypeNew( std::function<void( std::string, Uint32 )> Cb ) :
mUITheme( NULL ),
mUIWindow( NULL ),
mUIInput( NULL ),
@@ -57,7 +57,7 @@ UIGOTypeNew::~UIGOTypeNew() {
void UIGOTypeNew::onOKClick( const Event * Event ) {
if ( mUIInput->getText().size() ) {
if ( mCb.IsSet() )
if ( mCb )
mCb( mUIInput->getText().toUtf8(), String::hash( mUIInput->getText().toUtf8() ) );
}

View File

@@ -11,14 +11,14 @@ namespace EE { namespace Maps { namespace Private {
class EE_API UIGOTypeNew {
public:
UIGOTypeNew( cb::Callback2<void, std::string, Uint32> Cb );
UIGOTypeNew(std::function<void(std::string, Uint32)> Cb );
virtual ~UIGOTypeNew();
protected:
UITheme * mUITheme;
UIWindow * mUIWindow;
UITextInput * mUIInput;
cb::Callback2<void, std::string, Uint32> mCb;
std::function<void( std::string, Uint32 )> mCb;
void onWindowClose( const Event * Event );

View File

@@ -66,7 +66,7 @@ Uint32 UIMap::onDrag( const Vector2f& Pos ) {
mDragPoint = Pos;
if ( mUpdateScrollCb.IsSet() ) {
if ( mUpdateScrollCb ) {
mUpdateScrollCb();
}
@@ -120,7 +120,7 @@ void UIMap::update( const Time& time ) {
mSelLight->setRadius( mSelLight->getRadius() - 10 );
}
if ( mLightRadiusChangeCb.IsSet() )
if ( mLightRadiusChangeCb )
mLightRadiusChangeCb( mSelLight );
} else if ( Flags & EE_BUTTON_RMASK ) {
if ( mSelLight == mAddLight ) {
@@ -192,7 +192,7 @@ void UIMap::selectPolyObj() {
}
}
} else {
if ( mAlertCb.IsSet() ) {
if ( mAlertCb ) {
mAlertCb( "No layer found", "An Object Layer must be selected first." )->setFocus();
}
}
@@ -321,7 +321,7 @@ void UIMap::tryToSelectLight() {
mSelLight = mMap->getLightManager()->getLightOver( mMap->getMouseMapPosf(), mSelLight );
if ( NULL != mSelLight && mSelLight != tLight ) {
if ( mLightSelCb.IsSet() )
if ( mLightSelCb )
mLightSelCb( mSelLight );
}
}
@@ -368,7 +368,7 @@ void UIMap::addLight( MapLight * Light ) {
mMap->getLightManager()->addLight( Light );
if ( mLightSelCb.IsSet() )
if ( mLightSelCb )
mLightSelCb( mSelLight );
}
}

View File

@@ -30,12 +30,12 @@ class EE_API UIMap : public UIWindow {
INSERT_POLYLINE
};
typedef cb::Callback1<void, MapLight *> LightSelectCb;
typedef cb::Callback1<void, MapLight *> LightRadiusChangeCb;
typedef cb::Callback2<void, Uint32, Polygon2f> ObjAddCb;
typedef cb::Callback2<UIMessageBox*, const String&, const String&> AlertCb;
typedef cb::Callback0<void> OnMapLoadCb;
typedef cb::Callback0<void> UpdateScrollCb;
typedef std::function<void( MapLight * )> LightSelectCb;
typedef std::function<void( MapLight * )> LightRadiusChangeCb;
typedef std::function<void( Uint32, Polygon2f )> ObjAddCb;
typedef std::function<UIMessageBox*( const String&, const String& )> AlertCb;
typedef std::function<void()> OnMapLoadCb;
typedef std::function<void()> UpdateScrollCb;
UIMap( UITheme * Theme, TileMap * Map = NULL );

View File

@@ -76,7 +76,7 @@ void UIMapLayerNew::onOKClick( const Event * event ) {
if ( mUILayerName->getText().size() ) {
mLayer = mUIMap->Map()->addLayer( mType, LAYER_FLAG_VISIBLE | LAYER_FLAG_LIGHTS_ENABLED, mUILayerName->getText() );
if ( mNewLayerCb.IsSet() )
if ( mNewLayerCb )
mNewLayerCb( this );
}

View File

@@ -12,7 +12,7 @@ namespace EE { namespace Maps { namespace Private {
class EE_API UIMapLayerNew {
public:
typedef cb::Callback1<void, UIMapLayerNew*> NewLayerCb;
typedef std::function<void( UIMapLayerNew* )> NewLayerCb;
UIMapLayerNew( UIMap * Map, EE_LAYER_TYPE Type, NewLayerCb newLayerCb = NewLayerCb() );

View File

@@ -11,7 +11,7 @@ static UITextView * createTextBox( const String& Text = "", Node * Parent = NULL
return Ctrl;
}
UIMapNew::UIMapNew( UIMap * Map, cb::Callback0<void> NewMapCb, bool ResizeMap ) :
UIMapNew::UIMapNew( UIMap * Map, std::function<void()> NewMapCb, bool ResizeMap ) :
mTheme( NULL ),
mUIWindow( NULL ),
mUIMap( Map ),
@@ -265,7 +265,7 @@ void UIMapNew::onOKClick( const Event * Event ) {
FileSystem::fileRemove( mapPath );
}
if ( mNewMapCb.IsSet() )
if ( mNewMapCb )
mNewMapCb();
}

View File

@@ -14,7 +14,7 @@ namespace EE { namespace Maps { namespace Private {
class EE_API UIMapNew {
public:
UIMapNew( UIMap * Map, cb::Callback0<void> NewMapCb = cb::Callback0<void>(), bool ResizeMap = false );
UIMapNew( UIMap * Map, std::function<void()> NewMapCb = cb::Callback0<void>(), bool ResizeMap = false );
virtual ~UIMapNew();
protected:
@@ -38,7 +38,7 @@ class EE_API UIMapNew {
UITextView * mUIGreenTxt;
UITextView * mUIBlueTxt;
cb::Callback0<void> mNewMapCb;
std::function<void()> mNewMapCb;
Sizei mNewSize;
bool mResizeMap;

View File

@@ -241,7 +241,7 @@ void TileMap::draw() {
mouseOverDraw();
if ( mDrawCb.IsSet() )
if ( mDrawCb )
mDrawCb();
GlobalBatchRenderer::instance()->draw();
@@ -448,7 +448,7 @@ void TileMap::update() {
for ( Uint32 i = 0; i < mLayerCount; i++ )
mLayers[i]->update( mWindow->getElapsed() );
if ( mUpdateCb.IsSet() )
if ( mUpdateCb )
mUpdateCb();
}
@@ -656,7 +656,7 @@ GameObject * TileMap::createGameObject( const Uint32& Type, const Uint32& Flags,
}
default:
{
if ( mCreateGOCb.IsSet() ) {
if ( mCreateGOCb ) {
return mCreateGOCb( Type, Flags, Layer, DataId );
} else {
GameObjectVirtual * tVirtual;

View File

@@ -180,26 +180,26 @@ void Interpolation1d::update( const Time& Elapsed ) {
if ( mCurPoint + 1 < mPoints.size() ) {
mNexP = &mPoints[ mCurPoint + 1 ];
if ( mOnStepCallback.IsSet() )
if ( mOnStepCallback )
mOnStepCallback(*this);
} else {
if ( mOnStepCallback.IsSet() )
if ( mOnStepCallback )
mOnStepCallback(*this);
if ( mLoop ) {
mNexP = &mPoints[ 0 ];
if ( mOnPathEndCallback.IsSet() )
if ( mOnPathEndCallback )
mOnPathEndCallback(*this);
} else {
mEnable = false;
mEnded = true;
if ( mOnPathEndCallback.IsSet() ) {
if ( mOnPathEndCallback ) {
mOnPathEndCallback(*this);
if ( !mEnable )
mOnPathEndCallback.Reset();
mOnPathEndCallback = nullptr;
}
return;
}

View File

@@ -201,26 +201,26 @@ void Interpolation2d::update( const Time& Elapsed ) {
if ( mCurPoint + 1 < mPoints.size() ) {
mNexP = &mPoints[ mCurPoint + 1 ];
if ( mOnStepCallback.IsSet() )
if ( mOnStepCallback )
mOnStepCallback(*this);
} else {
if ( mOnStepCallback.IsSet() )
if ( mOnStepCallback )
mOnStepCallback(*this);
if ( mLoop ) {
mNexP = &mPoints[ 0 ];
if ( mOnPathEndCallback.IsSet() )
if ( mOnPathEndCallback )
mOnPathEndCallback(*this);
} else {
mEnable = false;
mEnded = true;
if ( mOnPathEndCallback.IsSet() ) {
if ( mOnPathEndCallback ) {
mOnPathEndCallback(*this);
if ( !mEnable )
mOnPathEndCallback.Reset();
mOnPathEndCallback = nullptr;
}
return;
}

View File

@@ -191,7 +191,7 @@ void Body::updatePosition( cpFloat dt ) {
void Body::bodyVelocityFuncWrapper( cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt ) {
Body * tBody = reinterpret_cast<Body*>( body->data );
if ( tBody->mVelocityFunc.IsSet() ) {
if ( tBody->mVelocityFunc ) {
tBody->mVelocityFunc( reinterpret_cast<Body*>( body->data ), tovect( gravity ), damping, dt );
}
}
@@ -205,7 +205,7 @@ void Body::velocityFunc( BodyVelocityFunc func ) {
void Body::bodyPositionFuncWrapper( cpBody* body, cpFloat dt ) {
Body * tBody = reinterpret_cast<Body*>( body->data );
if ( tBody->mPositionFunc.IsSet() ) {
if ( tBody->mPositionFunc ) {
tBody->mPositionFunc( reinterpret_cast<Body*>( body->data ), dt );
}
}
@@ -259,7 +259,7 @@ void Body::eachShape( ShapeIteratorFunc Func, void * data ) {
}
void Body::onEachShape( Shape * Shape, ShapeIterator * it ) {
if ( it->Func.IsSet() ) {
if ( it->Func ) {
it->Func( it->Body, Shape, it->Data );
}
}
@@ -275,7 +275,7 @@ void Body::eachConstraint( ConstraintIteratorFunc Func, void * data ) {
}
void Body::onEachConstraint( Constraint * Constraint, ConstraintIterator * it ) {
if ( it->Func.IsSet() ) {
if ( it->Func ) {
it->Func( this, Constraint, it->Data );
}
}
@@ -292,7 +292,7 @@ void Body::eachArbiter( ArbiterIteratorFunc Func, void * data ) {
}
void Body::onEachArbiter( Arbiter * Arbiter, ArbiterIterator * it ) {
if ( it->Func.IsSet() ) {
if ( it->Func ) {
it->Func( this, Arbiter, it->Data );
}
}

View File

@@ -423,12 +423,12 @@ cpBool Space::onCollisionBegin( Arbiter * arb, void * data ) {
std::map< cpHashValue, CollisionHandler >::iterator it = mCollisions.find( hash );
CollisionHandler handler = static_cast<CollisionHandler>( it->second );
if ( it != mCollisions.end() && handler.begin.IsSet() ) {
if ( it != mCollisions.end() && handler.begin ) {
return handler.begin( arb, this, handler.data );
}
//}
if ( mCollisionsDefault.begin.IsSet() ) {
if ( mCollisionsDefault.begin ) {
return mCollisionsDefault.begin( arb, this, mCollisionsDefault.data );
}
@@ -442,12 +442,12 @@ cpBool Space::onCollisionPreSolve( Arbiter * arb, void * data ) {
std::map< cpHashValue, CollisionHandler >::iterator it = mCollisions.find( hash );
CollisionHandler handler = static_cast<CollisionHandler>( it->second );
if ( it != mCollisions.end() && handler.preSolve.IsSet() ) {
if ( it != mCollisions.end() && handler.preSolve ) {
return handler.preSolve( arb, this, handler.data );
}
//}
if ( mCollisionsDefault.preSolve.IsSet() ) {
if ( mCollisionsDefault.preSolve ) {
return mCollisionsDefault.preSolve( arb, this, mCollisionsDefault.data );
}
@@ -461,13 +461,13 @@ void Space::onCollisionPostSolve( Arbiter * arb, void * data ) {
std::map< cpHashValue, CollisionHandler >::iterator it = mCollisions.find( hash );
CollisionHandler handler = static_cast<CollisionHandler>( it->second );
if ( it != mCollisions.end() && handler.postSolve.IsSet() ) {
if ( it != mCollisions.end() && handler.postSolve ) {
handler.postSolve( arb, this, handler.data );
return;
}
//}
if ( mCollisionsDefault.begin.IsSet() ) {
if ( mCollisionsDefault.begin ) {
mCollisionsDefault.postSolve( arb, this, mCollisionsDefault.data );
}
}
@@ -479,13 +479,13 @@ void Space::onCollisionSeparate( Arbiter * arb, void * data ) {
std::map< cpHashValue, CollisionHandler >::iterator it = mCollisions.find( hash );
CollisionHandler handler = static_cast<CollisionHandler>( it->second );
if ( it != mCollisions.end() && handler.separate.IsSet() ) {
if ( it != mCollisions.end() && handler.separate ) {
handler.separate( arb, this, handler.data );
return;
}
//}
if ( mCollisionsDefault.begin.IsSet() ) {
if ( mCollisionsDefault.begin ) {
mCollisionsDefault.separate( arb, this, mCollisionsDefault.data );
}
}
@@ -493,7 +493,7 @@ void Space::onCollisionSeparate( Arbiter * arb, void * data ) {
void Space::onPostStepCallback( void * obj, void * data ) {
PostStepCallbackCont * Cb = reinterpret_cast<PostStepCallbackCont *> ( data );
if ( Cb->Callback.IsSet() ) {
if ( Cb->Callback ) {
Cb->Callback( this, obj, Cb->Data );
}
@@ -502,19 +502,19 @@ void Space::onPostStepCallback( void * obj, void * data ) {
}
void Space::onBBQuery( Shape * shape, BBQuery * query ) {
if ( query->Func.IsSet() ) {
if ( query->Func ) {
query->Func( shape, query->Data );
}
}
void Space::onSegmentQuery( Shape * shape, cpFloat t, cVect n , SegmentQuery * query ) {
if ( query->Func.IsSet() ) {
if ( query->Func ) {
query->Func( shape, t, n, query->Data );
}
}
void Space::onPointQuery( Shape * shape, PointQuery * query ) {
if ( query->Func.IsSet() ) {
if ( query->Func ) {
query->Func( shape, query->Data );
}
}
@@ -522,10 +522,10 @@ void Space::onPointQuery( Shape * shape, PointQuery * query ) {
void Space::addCollisionHandler( const CollisionHandler& handler ) {
cpHashValue hash = CP_HASH_PAIR( handler.a, handler.b );
cpCollisionBeginFunc f1 = ( handler.begin.IsSet() ) ? &RecieverCollisionBeginFunc : NULL;
cpCollisionPreSolveFunc f2 = ( handler.preSolve.IsSet() ) ? &RecieverCollisionPreSolveFunc : NULL;
cpCollisionPostSolveFunc f3 = ( handler.postSolve.IsSet() ) ? &RecieverCollisionPostSolve : NULL;
cpCollisionSeparateFunc f4 = ( handler.separate.IsSet() ) ? &RecieverCollisionSeparateFunc : NULL;
cpCollisionBeginFunc f1 = ( handler.begin ) ? &RecieverCollisionBeginFunc : NULL;
cpCollisionPreSolveFunc f2 = ( handler.preSolve ) ? &RecieverCollisionPreSolveFunc : NULL;
cpCollisionPostSolveFunc f3 = ( handler.postSolve ) ? &RecieverCollisionPostSolve : NULL;
cpCollisionSeparateFunc f4 = ( handler.separate ) ? &RecieverCollisionSeparateFunc : NULL;
cpSpaceAddCollisionHandler( mSpace, handler.a, handler.b, f1, f2, f3, f4, (void*)hash );
@@ -540,10 +540,10 @@ void Space::removeCollisionHandler( cpCollisionType a, cpCollisionType b ) {
}
void Space::setDefaultCollisionHandler( const CollisionHandler& handler ) {
cpCollisionBeginFunc f1 = ( handler.begin.IsSet() ) ? &RecieverCollisionBeginFunc : NULL;
cpCollisionPreSolveFunc f2 = ( handler.preSolve.IsSet() ) ? &RecieverCollisionPreSolveFunc : NULL;
cpCollisionPostSolveFunc f3 = ( handler.postSolve.IsSet() ) ? &RecieverCollisionPostSolve : NULL;
cpCollisionSeparateFunc f4 = ( handler.separate.IsSet() ) ? &RecieverCollisionSeparateFunc : NULL;
cpCollisionBeginFunc f1 = ( handler.begin ) ? &RecieverCollisionBeginFunc : NULL;
cpCollisionPreSolveFunc f2 = ( handler.preSolve ) ? &RecieverCollisionPreSolveFunc : NULL;
cpCollisionPostSolveFunc f3 = ( handler.postSolve ) ? &RecieverCollisionPostSolve : NULL;
cpCollisionSeparateFunc f4 = ( handler.separate ) ? &RecieverCollisionSeparateFunc : NULL;
cpSpaceSetDefaultCollisionHandler( mSpace, f1, f2, f3, f4, NULL );
@@ -614,7 +614,7 @@ void Space::eachBody( BodyIteratorFunc Func, void * data ) {
}
void Space::onEachBody( Body * Body, BodyIterator * it ) {
if ( it->Func.IsSet() ) {
if ( it->Func ) {
it->Func( it->Space, Body, it->Data );
}
}
@@ -630,7 +630,7 @@ void Space::eachShape( ShapeIteratorFunc Func, void * data ) {
}
void Space::onEachShape( Shape * Shape, ShapeIterator * it ) {
if ( it->Func.IsSet() ) {
if ( it->Func ) {
it->Func( it->Space, Shape, it->Data );
}
}

View File

@@ -212,9 +212,7 @@ std::string FileSystem::removeLastFolderFromPath( std::string path ) {
if ( pos2 != pos ) {
sstr = path.substr(0,pos) + getOSSlash();
} else {
if ( pos == pos2 ) {
sstr = path.substr(0,pos2+1);
}
sstr = path.substr(0,pos2+1);
}
if ( sstr.size() ) {
@@ -527,7 +525,7 @@ std::string FileSystem::sizeToString( const Int64& Size ) {
}
bool FileSystem::changeWorkingDirectory( const std::string & path ) {
int res = -1;
int res;
#ifdef EE_COMPILER_MSVC
#ifdef UNICODE
res = _wchdir( String::fromUtf8( path.c_str() ).toWideString().c_str() );

View File

@@ -23,7 +23,7 @@ void ObjectLoader::load() {
}
void ObjectLoader::load( ObjLoadCallback Cb ) {
if ( Cb.IsSet() ) {
if ( Cb ) {
mLoadCbs.push_back( Cb );
}

View File

@@ -302,7 +302,6 @@ bool Pak::eraseFiles( const std::vector<std::string>& paths ) {
Uint32 total_offset = 0, i = 0;
pakFile nPf;
std::vector<pakEntry> uEntry;
bool Remove;
for ( i = 0; i < paths.size(); i++ ) {
Ex = exists( paths[i] );
@@ -317,7 +316,7 @@ bool Pak::eraseFiles( const std::vector<std::string>& paths ) {
nPf.fs = eeNew( IOStreamFile, ( nPf.pakPath.c_str() , "wb" ) );
for ( i = 0; i < mPakFiles.size(); i++ ) {
Remove = false;
bool Remove = false;
for ( Uint32 u = 0; u < files.size(); u++ ) {
if ( files[u] == static_cast<Int32>(i) )

View File

@@ -70,7 +70,7 @@ bool ResourceLoader::clear( const bool& ClearObjectsLoaded ) {
}
void ResourceLoader::load( ResLoadCallback Cb ) {
if ( Cb.IsSet() )
if ( Cb )
mLoadCbs.push_back( Cb );
load();

View File

@@ -173,7 +173,7 @@ String Translator::getStringf( const char * key, ... ) {
const char * format = str.c_str();
int n, size = 256;
int size = 256;
std::string tstr( size, '\0' );
va_list args;
@@ -181,7 +181,7 @@ String Translator::getStringf( const char * key, ... ) {
while (1) {
va_start( args, key );
n = vsnprintf( &tstr[0], size, format, args );
int n = vsnprintf( &tstr[0], size, format, args );
if ( n > -1 && n < size ) {
tstr.resize( n );

View File

@@ -20,9 +20,10 @@ std::vector<std::string> VirtualFileSystem::filesGetInPath( std::string path ) {
std::vector<std::string> files;
std::vector<std::string> paths = vfsSplitPath( path );
vfsDirectory * curDir = &mRoot;
size_t pos = 0;
if ( paths.size() >= 1 ) {
size_t pos = 0;
do {
if ( pos < paths.size() ) {
if ( curDir->directories.find( paths[pos] ) == curDir->directories.end() ) {
@@ -47,9 +48,10 @@ std::vector<std::string> VirtualFileSystem::filesGetInPath( std::string path ) {
Pack * VirtualFileSystem::getPackFromFile( std::string path ) {
std::vector<std::string> paths = vfsSplitPath( path );
vfsDirectory * curDir = &mRoot;
size_t pos = 0;
if ( paths.size() >= 1 ) {
size_t pos = 0;
do {
if ( pos == paths.size() - 1 ) {
if ( curDir->files.find( paths[pos] ) != curDir->files.end() ) {
@@ -97,9 +99,10 @@ void VirtualFileSystem::onResourceRemove( Pack * resource ) {
void VirtualFileSystem::addFile( std::string path , Pack * pack ) {
std::vector<std::string> paths = vfsSplitPath( path );
vfsDirectory * curDir = &mRoot;
size_t pos = 0;
if ( paths.size() >= 1 ) {
size_t pos = 0;
do {
if ( pos == paths.size() - 1 ) {
curDir->files[ paths[pos] ] = vfsFile( path, pack );

View File

@@ -142,7 +142,7 @@ bool Zip::eraseFiles( const std::vector<std::string>& paths ) {
bool Zip::extractFile( const std::string& path , const std::string& dest ) {
lock();
bool Ret = false;
bool Ret;
SafeDataPointer data;
@@ -161,9 +161,9 @@ bool Zip::extractFileToMemory( const std::string& path, std::vector<Uint8>& data
bool Ret = false;
Int32 Pos = exists( path );
int Result = 0;
if ( 0 == checkPack() && -1 != Pos ) {
data.clear();
struct zip_stat zs;
@@ -175,7 +175,7 @@ bool Zip::extractFileToMemory( const std::string& path, std::vector<Uint8>& data
if ( NULL != zf ) {
data.resize( zs.size );
Result = (Int32)zip_fread( zf, reinterpret_cast<void*> (&data[0]), data.size() );
int Result = (Int32)zip_fread( zf, reinterpret_cast<void*> (&data[0]), data.size() );
zip_fclose(zf);

View File

@@ -242,7 +242,7 @@ void TextureAtlasEditor::onDestHChange( const Event * Event ) {
}
void TextureAtlasEditor::windowClose( const Event * Event ) {
if ( mCloseCb.IsSet() )
if ( mCloseCb )
mCloseCb();
eeDelete( this );

View File

@@ -179,7 +179,7 @@ void TextureAtlasNew::textureAtlasSave( const Event * Event ) {
texturePacker->save( FPath, static_cast<Image::SaveType> ( mSaveFileType->getListBox()->getItemSelectedIndex() ) );
if ( mNewTGCb.IsSet() )
if ( mNewTGCb )
mNewTGCb( texturePacker );
mUIWindow->closeWindow();

View File

@@ -12,7 +12,7 @@ namespace EE { namespace UI { namespace Tools {
class EE_API TextureAtlasNew {
public:
typedef cb::Callback1<void, TexturePacker *> TGCreateCb;
typedef std::function<void( TexturePacker * )> TGCreateCb;
TextureAtlasNew( TGCreateCb NewTGCb = TGCreateCb() );

View File

@@ -74,11 +74,11 @@ UIWidget * UIWidgetCreator::createFromName( std::string widgetName ) {
else if ( widgetName == "layout" ) return UILayout::New();
if ( registeredWidget.find( widgetName ) != registeredWidget.end() ) {
return registeredWidget[ widgetName ].Call();
return registeredWidget[ widgetName ]();
}
if ( widgetCallback.find( widgetName ) != widgetCallback.end() ) {
return widgetCallback[ widgetName ].Call( widgetName );
return widgetCallback[ widgetName ]( widgetName );
}
return NULL;

View File

@@ -385,7 +385,7 @@ void InputTextBuffer::update( InputEvent* Event ) {
setChangedSinceLastUpdate( true );
}
if ( mEnterCall.IsSet() )
if ( mEnterCall )
mEnterCall();
} else if ( c == KEY_LEFT ) {
@@ -489,7 +489,7 @@ void InputTextBuffer::update( InputEvent* Event ) {
if ( setSupportNewLine() && canAdd() )
mText += '\n';
if ( mEnterCall.IsSet() )
if ( mEnterCall )
mEnterCall();
}
}

View File

@@ -440,7 +440,7 @@ void Window::logFailureInit( const std::string& ClassName, const std::string& Ba
}
void Window::onCloseRequest() {
if ( mCloseRequestCallback.IsSet() && !mCloseRequestCallback.Call( this ) ) {
if ( mCloseRequestCallback && !mCloseRequestCallback( this ) ) {
return;
}

View File

@@ -6,7 +6,7 @@ To understand the conceptos of space, body, shapes, etc you can read the
Chipmunk documentation:
http://chipmunk-physics.net/release/ChipmunkLatest-Docs/
*/
typedef cb::Callback0<void> SceneCb;
typedef std::function<void()> SceneCb;
struct physicDemo {
SceneCb init;
@@ -327,7 +327,7 @@ void demo3Create() {
handler.separate = cb::Make3( &blockerSeparate );
mSpace->addCollisionHandler( handler );
handler.Reset(); // Reset all the values and the callbacks ( set the callbacks as !IsSet()
handler.reset(); // Reset all the values and the callbacks ( set the callbacks as !IsSet()
handler.a = CATCH_SENSOR_TYPE;
handler.b = BALL_TYPE;

View File

@@ -491,15 +491,18 @@ void EETest::createBaseUI() {
w->setParent( C )->setSize( 20, 20 )->setPosition( 260, 130 );
w->setBackgroundFillEnabled( true )->setColor( Color::Green );
w->setRotation( 45 );
w->addEventListener( Event::MouseEnter, cb::Make1<void, const Event*>( [] ( const Event* event ) {
w->addEventListener( Event::MouseEnter, [] ( const Event* event ) {
static_cast<UIWidget*>( event->getNode() )->getBackground()->setColor( Color::Yellow );
} ) );
w->addEventListener( Event::MouseExit, cb::Make1<void, const Event*>( [] ( const Event* event ) {
} );
w->addEventListener( Event::MouseExit, [] ( const Event* event ) {
static_cast<UIWidget*>( event->getNode() )->getBackground()->setColor( Color::Green );
} ) );
w->addEventListener( Event::MouseClick, cb::Make1<void, const Event*>( [] ( const Event* event ) {
} );
w->addEventListener( Event::MouseClick, [] ( const Event* event ) {
static_cast<UIWidget*>( event->getNode() )->getBackground()->setColor( Color::Red );
} ) );
} );
C = reinterpret_cast<UINode*> ( C->getParent() );
@@ -2199,7 +2202,7 @@ void EETest::demo2Create() {
handler.separate = cb::Make3( this, &EETest::blockerSeparate );
mSpace->addCollisionHandler( handler );
handler.Reset(); // Reset all the values and the callbacks ( set the callbacks as !IsSet()
handler.reset(); // Reset all the values and the callbacks ( set the callbacks as !IsSet()
handler.a = CATCH_SENSOR_TYPE;
handler.b = BALL_TYPE;

View File

@@ -19,7 +19,7 @@ struct Emitter {
class EETest : private Thread {
public:
typedef cb::Callback0<void> SceneCb;
typedef std::function<void()> SceneCb;
void init();
void update();

View File

@@ -1,5 +1,5 @@
// FLAC audio decoder. Public domain. See "unlicense" statement at the end of this file.
// dr_flac - v0.9.4 - 2018-06-14
// dr_flac - v0.9.10 - 2018-08-07
//
// David Reid - mackron@gmail.com
@@ -111,7 +111,7 @@
// - This has not been tested on big-endian architectures.
// - Rice codes in unencoded binary form (see https://xiph.org/flac/format.html#rice_partition) has not been tested. If anybody
// knows where I can find some test files for this, let me know.
// - dr_flac is not thread-safe, but it's APIs can be called from any thread so long as you do your own synchronization.
// - dr_flac is not thread-safe, but its APIs can be called from any thread so long as you do your own synchronization.
// - When using Ogg encapsulation, a corrupted metadata block will result in drflac_open_with_metadata() and drflac_open()
// returning inconsistent samples.
@@ -157,16 +157,10 @@ extern "C" {
#endif
// Check if we can enable 64-bit optimizations.
#if defined(_WIN64)
#if defined(_WIN64) || defined(_LP64) || defined(__LP64__)
#define DRFLAC_64BIT
#endif
#if defined(__GNUC__)
#if defined(__x86_64__) || defined(__ppc64__)
#define DRFLAC_64BIT
#endif
#endif
#ifdef DRFLAC_64BIT
typedef drflac_uint64 drflac_cache_t;
#else
@@ -467,7 +461,7 @@ typedef struct
// value specified in the STREAMINFO block.
drflac_uint8 channels;
// The bits per sample. Will be set to somthing like 16, 24, etc.
// The bits per sample. Will be set to something like 16, 24, etc.
drflac_uint8 bitsPerSample;
// The maximum block size, in samples. This number represents the number of samples in each channel (not combined).
@@ -579,7 +573,7 @@ drflac* drflac_open_relaxed(drflac_read_proc onRead, drflac_seek_proc onSeek, dr
// See also: drflac_open_file_with_metadata(), drflac_open_memory_with_metadata(), drflac_open(), drflac_close()
drflac* drflac_open_with_metadata(drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_meta_proc onMeta, void* pUserData);
// The same as drflac_open_with_metadata(), except attemps to open the stream even when a header block is not present.
// The same as drflac_open_with_metadata(), except attempts to open the stream even when a header block is not present.
//
// See also: drflac_open_with_metadata(), drflac_open_relaxed()
drflac* drflac_open_with_metadata_relaxed(drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_meta_proc onMeta, drflac_container container, void* pUserData);
@@ -754,6 +748,16 @@ const char* drflac_next_vorbis_comment(drflac_vorbis_comment_iterator* pIter, dr
//
///////////////////////////////////////////////////////////////////////////////
#ifdef DR_FLAC_IMPLEMENTATION
#ifdef __linux__
#ifndef _BSD_SOURCE
#define _BSD_SOURCE
#endif
#ifndef __USE_BSD
#define __USE_BSD
#endif
#include <endian.h>
#endif
#include <stdlib.h>
#include <string.h>
@@ -776,18 +780,32 @@ const char* drflac_next_vorbis_comment(drflac_vorbis_comment_iterator* pIter, dr
__cpuid(info, fid);
}
#else
#define DRFLAC_NO_CPUID
#define DRFLAC_NO_CPUID
#endif
#else
#if defined(__GNUC__) || defined(__clang__)
static void drflac__cpuid(int info[4], int fid)
{
__asm__ __volatile__ (
"cpuid" : "=a"(info[0]), "=b"(info[1]), "=c"(info[2]), "=d"(info[3]) : "a"(fid), "c"(0)
);
// It looks like the -fPIC option uses the ebx register which GCC complains about. We can work around this by just using a different register, the
// specific register of which I'm letting the compiler decide on. The "k" prefix is used to specify a 32-bit register. The {...} syntax is for
// supporting different assembly dialects.
//
// What's basically happening is that we're saving and restoring the ebx register manually.
#if defined(DRFLAC_X86) && defined(__PIC__)
__asm__ __volatile__ (
"xchg{l} {%%}ebx, %k1;"
"cpuid;"
"xchg{l} {%%}ebx, %k1;"
: "=a"(info[0]), "=&r"(info[1]), "=c"(info[2]), "=d"(info[3]) : "a"(fid), "c"(0)
);
#else
__asm__ __volatile__ (
"cpuid" : "=a"(info[0]), "=b"(info[1]), "=c"(info[2]), "=d"(info[3]) : "a"(fid), "c"(0)
);
#endif
}
#else
#define DRFLAC_NO_CPUID
#define DRFLAC_NO_CPUID
#endif
#endif
#else
@@ -795,28 +813,37 @@ const char* drflac_next_vorbis_comment(drflac_vorbis_comment_iterator* pIter, dr
#endif
#ifdef __linux__
#define _BSD_SOURCE
#include <endian.h>
#endif
#if defined(_MSC_VER) && _MSC_VER >= 1500 && (defined(DRFLAC_X86) || defined(DRFLAC_X64))
#define DRFLAC_HAS_LZCNT_INTRINSIC
#define DRFLAC_HAS_LZCNT_INTRINSIC
#elif (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)))
#define DRFLAC_HAS_LZCNT_INTRINSIC
#define DRFLAC_HAS_LZCNT_INTRINSIC
#elif defined(__clang__)
#if __has_builtin(__builtin_clzll) || __has_builtin(__builtin_clzl)
#define DRFLAC_HAS_LZCNT_INTRINSIC
#define DRFLAC_HAS_LZCNT_INTRINSIC
#endif
#endif
#if defined(_MSC_VER) && _MSC_VER >= 1300
#define DRFLAC_HAS_BYTESWAP_INTRINSIC
#elif defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
#define DRFLAC_HAS_BYTESWAP_INTRINSIC
#define DRFLAC_HAS_BYTESWAP16_INTRINSIC
#define DRFLAC_HAS_BYTESWAP32_INTRINSIC
#define DRFLAC_HAS_BYTESWAP64_INTRINSIC
#elif defined(__clang__)
#if __has_builtin(__builtin_bswap16) && __has_builtin(__builtin_bswap32) && __has_builtin(__builtin_bswap64)
#define DRFLAC_HAS_BYTESWAP_INTRINSIC
#if __has_builtin(__builtin_bswap16)
#define DRFLAC_HAS_BYTESWAP16_INTRINSIC
#endif
#if __has_builtin(__builtin_bswap32)
#define DRFLAC_HAS_BYTESWAP32_INTRINSIC
#endif
#if __has_builtin(__builtin_bswap64)
#define DRFLAC_HAS_BYTESWAP64_INTRINSIC
#endif
#elif defined(__GNUC__)
#if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
#define DRFLAC_HAS_BYTESWAP32_INTRINSIC
#define DRFLAC_HAS_BYTESWAP64_INTRINSIC
#endif
#if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
#define DRFLAC_HAS_BYTESWAP16_INTRINSIC
#endif
#endif
@@ -914,7 +941,7 @@ static DRFLAC_INLINE drflac_bool32 drflac__is_little_endian()
static DRFLAC_INLINE drflac_uint16 drflac__swap_endian_uint16(drflac_uint16 n)
{
#ifdef DRFLAC_HAS_BYTESWAP_INTRINSIC
#ifdef DRFLAC_HAS_BYTESWAP16_INTRINSIC
#if defined(_MSC_VER)
return _byteswap_ushort(n);
#elif defined(__GNUC__) || defined(__clang__)
@@ -930,7 +957,7 @@ static DRFLAC_INLINE drflac_uint16 drflac__swap_endian_uint16(drflac_uint16 n)
static DRFLAC_INLINE drflac_uint32 drflac__swap_endian_uint32(drflac_uint32 n)
{
#ifdef DRFLAC_HAS_BYTESWAP_INTRINSIC
#ifdef DRFLAC_HAS_BYTESWAP32_INTRINSIC
#if defined(_MSC_VER)
return _byteswap_ulong(n);
#elif defined(__GNUC__) || defined(__clang__)
@@ -948,7 +975,7 @@ static DRFLAC_INLINE drflac_uint32 drflac__swap_endian_uint32(drflac_uint32 n)
static DRFLAC_INLINE drflac_uint64 drflac__swap_endian_uint64(drflac_uint64 n)
{
#ifdef DRFLAC_HAS_BYTESWAP_INTRINSIC
#ifdef DRFLAC_HAS_BYTESWAP64_INTRINSIC
#if defined(_MSC_VER)
return _byteswap_uint64(n);
#elif defined(__GNUC__) || defined(__clang__)
@@ -1438,7 +1465,7 @@ static DRFLAC_INLINE drflac_bool32 drflac__read_uint32(drflac_bs* bs, unsigned i
if (bitCount <= DRFLAC_CACHE_L1_BITS_REMAINING(bs)) {
if (bitCount < DRFLAC_CACHE_L1_SIZE_BITS(bs)) {
*pResultOut = DRFLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCount);
*pResultOut = (drflac_uint32)DRFLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCount);
bs->consumedBits += bitCount;
bs->cache <<= bitCount;
} else {
@@ -1451,13 +1478,13 @@ static DRFLAC_INLINE drflac_bool32 drflac__read_uint32(drflac_bs* bs, unsigned i
// It straddles the cached data. It will never cover more than the next chunk. We just read the number in two parts and combine them.
drflac_uint32 bitCountHi = DRFLAC_CACHE_L1_BITS_REMAINING(bs);
drflac_uint32 bitCountLo = bitCount - bitCountHi;
drflac_uint32 resultHi = DRFLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCountHi);
drflac_uint32 resultHi = (drflac_uint32)DRFLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCountHi);
if (!drflac__reload_cache(bs)) {
return DRFLAC_FALSE;
}
*pResultOut = (resultHi << bitCountLo) | DRFLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCountLo);
*pResultOut = (resultHi << bitCountLo) | (drflac_uint32)DRFLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCountLo);
bs->consumedBits += bitCountLo;
bs->cache <<= bitCountLo;
return DRFLAC_TRUE;
@@ -1483,6 +1510,7 @@ static drflac_bool32 drflac__read_int32(drflac_bs* bs, unsigned int bitCount, dr
return DRFLAC_TRUE;
}
#ifdef DRFLAC_64BIT
static drflac_bool32 drflac__read_uint64(drflac_bs* bs, unsigned int bitCount, drflac_uint64* pResultOut)
{
drflac_assert(bitCount <= 64);
@@ -1501,6 +1529,7 @@ static drflac_bool32 drflac__read_uint64(drflac_bs* bs, unsigned int bitCount, d
*pResultOut = (((drflac_uint64)resultHi) << 32) | ((drflac_uint64)resultLo);
return DRFLAC_TRUE;
}
#endif
// Function below is unused, but leaving it here in case I need to quickly add it again.
#if 0
@@ -3175,10 +3204,10 @@ static drflac_bool32 drflac__seek_to_sample__brute_force(drflac* pFlac, drflac_u
drflac_bool32 isMidFrame = DRFLAC_FALSE;
// If we are seeking foward we start from the current position. Otherwise we need to start all the way from the start of the file.
// If we are seeking forward we start from the current position. Otherwise we need to start all the way from the start of the file.
drflac_uint64 runningSampleCount;
if (sampleIndex >= pFlac->currentSample) {
// Seeking foward. Need to seek from the current position.
// Seeking forward. Need to seek from the current position.
runningSampleCount = pFlac->currentSample;
// The frame header for the first frame may not yet have been read. We need to do that if necessary.
@@ -3204,7 +3233,7 @@ static drflac_bool32 drflac__seek_to_sample__brute_force(drflac* pFlac, drflac_u
}
}
// We need to as quickly as possible find the frame that contains the target sample. To do this, we iterate over each frame and inspect it's
// We need to as quickly as possible find the frame that contains the target sample. To do this, we iterate over each frame and inspect its
// header. If based on the header we can determine that the frame contains the sample, we do a full decode of that frame.
for (;;) {
drflac_uint64 firstSampleInFrame = 0;
@@ -3657,7 +3686,7 @@ drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, drflac_s
// Padding doesn't have anything meaningful in it, so just skip over it, but make sure the caller is aware of it by firing the callback.
if (!onSeek(pUserData, blockSize, drflac_seek_origin_current)) {
isLastBlock = DRFLAC_TRUE; // An error occured while seeking. Attempt to recover by treating this as the last block which will in turn terminate the loop.
isLastBlock = DRFLAC_TRUE; // An error occurred while seeking. Attempt to recover by treating this as the last block which will in turn terminate the loop.
} else {
onMeta(pUserDataMD, &metadata);
}
@@ -3669,7 +3698,7 @@ drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, drflac_s
// Invalid chunk. Just skip over this one.
if (onMeta) {
if (!onSeek(pUserData, blockSize, drflac_seek_origin_current)) {
isLastBlock = DRFLAC_TRUE; // An error occured while seeking. Attempt to recover by treating this as the last block which will in turn terminate the loop.
isLastBlock = DRFLAC_TRUE; // An error occurred while seeking. Attempt to recover by treating this as the last block which will in turn terminate the loop.
}
}
} break;
@@ -4003,7 +4032,7 @@ drflac_result drflac_ogg__read_page_header(drflac_read_proc onRead, void* pUserD
// The main part of the Ogg encapsulation is the conversion from the physical Ogg bitstream to the native FLAC bitstream. It works
// in three general stages: Ogg Physical Bitstream -> Ogg/FLAC Logical Bitstream -> FLAC Native Bitstream. dr_flac is architecured
// in three general stages: Ogg Physical Bitstream -> Ogg/FLAC Logical Bitstream -> FLAC Native Bitstream. dr_flac is designed
// in such a way that the core sections assume everything is delivered in native format. Therefore, for each encapsulation type
// dr_flac is supporting there needs to be a layer sitting on top of the onRead and onSeek callbacks that ensures the bits read from
// the physical Ogg bitstream are converted and delivered in native FLAC format.
@@ -4351,13 +4380,13 @@ drflac_bool32 drflac_ogg__seek_to_sample(drflac* pFlac, drflac_uint64 sampleInde
//
// Another thing to consider is that using the Ogg framing system will perform direct seeking of the physical Ogg
// bitstream. This is important to consider because it means we cannot read data from the drflac_bs object using the
// standard drflac__*() APIs because that will read in extra data for it's own internal caching which in turn breaks
// standard drflac__*() APIs because that will read in extra data for its own internal caching which in turn breaks
// the positioning of the read pointer of the physical Ogg bitstream. Therefore, anything that would normally be read
// using the native FLAC decoding APIs, such as drflac__read_next_frame_header(), need to be re-implemented so as to
// avoid the use of the drflac_bs object.
//
// Considering these issues, I have decided to use the slower native FLAC decoding method for the following reasons:
// 1) Seeking is already partially accellerated using Ogg's paging system in the code block above.
// 1) Seeking is already partially accelerated using Ogg's paging system in the code block above.
// 2) Seeking in an Ogg encapsulated FLAC stream is probably quite uncommon.
// 3) Simplicity.
if (!drflac__read_next_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFrame.header)) {
@@ -4550,7 +4579,7 @@ drflac_bool32 drflac__init_private__ogg(drflac_init_info* pInit, drflac_read_pro
// If we get here it means we found a FLAC audio stream. We should be sitting on the first byte of the header of the next page. The next
// packets in the FLAC logical stream contain the metadata. The only thing left to do in the initialiation phase for Ogg is to create the
// packets in the FLAC logical stream contain the metadata. The only thing left to do in the initialization phase for Ogg is to create the
// Ogg bistream object.
pInit->hasMetadataBlocks = DRFLAC_TRUE; // <-- Always have at least VORBIS_COMMENT metadata block.
return DRFLAC_TRUE;
@@ -4699,8 +4728,8 @@ drflac* drflac_open_with_metadata_private(drflac_read_proc onRead, drflac_seek_p
}
drflac_oggbs oggbs;
drflac_zero_memory(&oggbs, sizeof(oggbs));
if (init.container == drflac_container_ogg) {
drflac_zero_memory(&oggbs, sizeof(oggbs));
oggbs.onRead = onRead;
oggbs.onSeek = onSeek;
oggbs.pUserData = pUserData;
@@ -4758,7 +4787,7 @@ drflac* drflac_open_with_metadata_private(drflac_read_proc onRead, drflac_seek_p
pFlac->firstFramePos = firstFramePos;
// NOTE: Seektables are not currently compatible with Ogg encapsulation (Ogg has it's own accelerated seeking system). I may change this later, so I'm leaving this here for now.
// NOTE: Seektables are not currently compatible with Ogg encapsulation (Ogg has its own accelerated seeking system). I may change this later, so I'm leaving this here for now.
#ifndef DR_FLAC_NO_OGG
if (init.container == drflac_container_ogg)
{
@@ -5469,15 +5498,17 @@ drflac_bool32 drflac_seek_to_sample(drflac* pFlac, drflac_uint64 sampleIndex)
//// High Level APIs ////
// I couldn't figure out where SIZE_MAX was defined for VC6. If anybody knows, let me know.
#if defined(_MSC_VER) && _MSC_VER <= 1200
#ifdef DRFLAC_64BIT
#define SIZE_MAX ((drflac_uint64)0xFFFFFFFFFFFFFFFF)
#if defined(SIZE_MAX)
#define DRFLAC_SIZE_MAX SIZE_MAX
#else
#define SIZE_MAX 0xFFFFFFFF
#endif
#if defined(DRFLAC_64BIT)
#define DRFLAC_SIZE_MAX ((drflac_uint64)0xFFFFFFFFFFFFFFFF)
#else
#define DRFLAC_SIZE_MAX 0xFFFFFFFF
#endif
#endif
// Using a macro as the definition of the drflac__full_decode_and_close_*() API family. Sue me.
#define DRFLAC_DEFINE_FULL_DECODE_AND_CLOSE(extension, type) \
static type* drflac__full_decode_and_close_ ## extension (drflac* pFlac, unsigned int* channelsOut, unsigned int* sampleRateOut, drflac_uint64* totalSampleCountOut)\
@@ -5518,7 +5549,7 @@ static type* drflac__full_decode_and_close_ ## extension (drflac* pFlac, unsigne
drflac_zero_memory(pSampleData + totalSampleCount, (size_t)(sampleDataBufferSize - totalSampleCount*sizeof(type))); \
} else { \
drflac_uint64 dataSize = totalSampleCount * sizeof(type); \
if (dataSize > SIZE_MAX) { \
if (dataSize > DRFLAC_SIZE_MAX) { \
goto on_error; /* The decoded data is too big. */ \
} \
\
@@ -5719,6 +5750,24 @@ const char* drflac_next_vorbis_comment(drflac_vorbis_comment_iterator* pIter, dr
// REVISION HISTORY
//
// v0.9.10 - 2018-08-07
// - Improve 64-bit detection.
//
// v0.9.9 - 2018-08-05
// - Fix C++ build on older versions of GCC.
//
// v0.9.8 - 2018-07-24
// - Fix compilation errors.
//
// v0.9.7 - 2018-07-05
// - Fix a warning.
//
// v0.9.6 - 2018-06-29
// - Fix some typos.
//
// v0.9.5 - 2018-06-23
// - Fix some warnings.
//
// v0.9.4 - 2018-06-14
// - Optimizations to seeking.
// - Clean up.

View File

@@ -1,5 +1,5 @@
// MP3 audio decoder. Public domain. See "unlicense" statement at the end of this file.
// dr_mp3 - v0.2.4 - 2018-05-12
// dr_mp3 - v0.2.11 - 2018-08-08
//
// David Reid - mackron@gmail.com
//
@@ -99,21 +99,14 @@ typedef drmp3_uint32 drmp3_bool32;
// ==================
typedef struct
{
int frame_bytes;
int channels;
int hz;
int layer;
int bitrate_kbps;
int frame_bytes, channels, hz, layer, bitrate_kbps;
} drmp3dec_frame_info;
typedef struct
{
float mdct_overlap[2][9*32];
float qmf_state[15*2*32];
int reserv;
int free_format_bytes;
unsigned char header[4];
unsigned char reserv_buf[511];
float mdct_overlap[2][9*32], qmf_state[15*2*32];
int reserv, free_format_bytes;
unsigned char header[4], reserv_buf[511];
} drmp3dec;
// Initializes a low level decoder.
@@ -361,7 +354,7 @@ void drmp3_free(void* p);
#if defined(_MSC_VER)
#include <intrin.h>
#endif
#include <immintrin.h>
#include <emmintrin.h>
#define DRMP3_HAVE_SSE 1
#define DRMP3_HAVE_SIMD 1
#define DRMP3_VSTORE _mm_storeu_ps
@@ -412,10 +405,10 @@ static int drmp3_have_simd()
#ifdef MINIMP3_TEST
static int g_counter;
if (g_counter++ > 100)
goto test_nosimd;
return 0;
#endif
if (g_have_simd)
return g_have_simd - 1;
goto end;
drmp3_cpuid(CPUInfo, 0);
if (CPUInfo[0] > 0)
{
@@ -423,11 +416,9 @@ static int drmp3_have_simd()
g_have_simd = (CPUInfo[3] & (1 << 26)) + 1; /* SSE2 */
return g_have_simd - 1;
}
#ifdef MINIMP3_TEST
test_nosimd:
#endif
g_have_simd = 1;
return 0;
end:
return g_have_simd - 1;
#endif
}
#elif defined(__ARM_NEON) || defined(__aarch64__)
@@ -464,44 +455,27 @@ static int drmp3_have_simd()
typedef struct
{
const drmp3_uint8 *buf;
int pos;
int limit;
int pos, limit;
} drmp3_bs;
typedef struct
{
drmp3_uint8 total_bands;
drmp3_uint8 stereo_bands;
drmp3_uint8 bitalloc[64];
drmp3_uint8 scfcod[64];
float scf[3*64];
drmp3_uint8 total_bands, stereo_bands, bitalloc[64], scfcod[64];
} drmp3_L12_scale_info;
typedef struct
{
drmp3_uint8 tab_offset;
drmp3_uint8 code_tab_width;
drmp3_uint8 band_count;
drmp3_uint8 tab_offset, code_tab_width, band_count;
} drmp3_L12_subband_alloc;
typedef struct
{
const drmp3_uint8 *sfbtab;
drmp3_uint16 part_23_length;
drmp3_uint16 big_values;
drmp3_uint16 scalefac_compress;
drmp3_uint8 global_gain;
drmp3_uint8 block_type;
drmp3_uint8 mixed_block_flag;
drmp3_uint8 n_long_sfb;
drmp3_uint8 n_short_sfb;
drmp3_uint8 table_select[3];
drmp3_uint8 region_count[3];
drmp3_uint8 subblock_gain[3];
drmp3_uint8 preflag;
drmp3_uint8 scalefac_scale;
drmp3_uint8 count1_table;
drmp3_uint8 scfsi;
drmp3_uint16 part_23_length, big_values, scalefac_compress;
drmp3_uint8 global_gain, block_type, mixed_block_flag, n_long_sfb, n_short_sfb;
drmp3_uint8 table_select[3], region_count[3], subblock_gain[3];
drmp3_uint8 preflag, scalefac_scale, count1_table, scfsi;
} drmp3_L3_gr_info;
typedef struct
@@ -509,10 +483,8 @@ typedef struct
drmp3_bs bs;
drmp3_uint8 maindata[DRMP3_MAX_BITRESERVOIR_BYTES + DRMP3_MAX_L3_FRAME_PAYLOAD_BYTES];
drmp3_L3_gr_info gr_info[4];
float grbuf[2][576];
float scf[40];
float grbuf[2][576], scf[40], syn[18 + 15][2*32];
drmp3_uint8 ist_pos[2][39];
float syn[18 + 15][2*32];
} drmp3dec_scratch;
static void drmp3_bs_init(drmp3_bs *bs, const drmp3_uint8 *data, int bytes)
@@ -990,17 +962,19 @@ static void drmp3_L3_decode_scalefactors(const drmp3_uint8 *hdr, drmp3_uint8 *is
}
}
static const float g_drmp3_pow43[129 + 16] = {
0,-1,-2.519842f,-4.326749f,-6.349604f,-8.549880f,-10.902724f,-13.390518f,-16.000000f,-18.720754f,-21.544347f,-24.463781f,-27.473142f,-30.567351f,-33.741992f,-36.993181f,
0,1,2.519842f,4.326749f,6.349604f,8.549880f,10.902724f,13.390518f,16.000000f,18.720754f,21.544347f,24.463781f,27.473142f,30.567351f,33.741992f,36.993181f,40.317474f,43.711787f,47.173345f,50.699631f,54.288352f,57.937408f,61.644865f,65.408941f,69.227979f,73.100443f,77.024898f,81.000000f,85.024491f,89.097188f,93.216975f,97.382800f,101.593667f,105.848633f,110.146801f,114.487321f,118.869381f,123.292209f,127.755065f,132.257246f,136.798076f,141.376907f,145.993119f,150.646117f,155.335327f,160.060199f,164.820202f,169.614826f,174.443577f,179.305980f,184.201575f,189.129918f,194.090580f,199.083145f,204.107210f,209.162385f,214.248292f,219.364564f,224.510845f,229.686789f,234.892058f,240.126328f,245.389280f,250.680604f,256.000000f,261.347174f,266.721841f,272.123723f,277.552547f,283.008049f,288.489971f,293.998060f,299.532071f,305.091761f,310.676898f,316.287249f,321.922592f,327.582707f,333.267377f,338.976394f,344.709550f,350.466646f,356.247482f,362.051866f,367.879608f,373.730522f,379.604427f,385.501143f,391.420496f,397.362314f,403.326427f,409.312672f,415.320884f,421.350905f,427.402579f,433.475750f,439.570269f,445.685987f,451.822757f,457.980436f,464.158883f,470.357960f,476.577530f,482.817459f,489.077615f,495.357868f,501.658090f,507.978156f,514.317941f,520.677324f,527.056184f,533.454404f,539.871867f,546.308458f,552.764065f,559.238575f,565.731879f,572.243870f,578.774440f,585.323483f,591.890898f,598.476581f,605.080431f,611.702349f,618.342238f,625.000000f,631.675540f,638.368763f,645.079578f
};
static float drmp3_L3_pow_43(int x)
{
static const float g_pow43[129] = {
0,1,2.519842f,4.326749f,6.349604f,8.549880f,10.902724f,13.390518f,16.000000f,18.720754f,21.544347f,24.463781f,27.473142f,30.567351f,33.741992f,36.993181f,40.317474f,43.711787f,47.173345f,50.699631f,54.288352f,57.937408f,61.644865f,65.408941f,69.227979f,73.100443f,77.024898f,81.000000f,85.024491f,89.097188f,93.216975f,97.382800f,101.593667f,105.848633f,110.146801f,114.487321f,118.869381f,123.292209f,127.755065f,132.257246f,136.798076f,141.376907f,145.993119f,150.646117f,155.335327f,160.060199f,164.820202f,169.614826f,174.443577f,179.305980f,184.201575f,189.129918f,194.090580f,199.083145f,204.107210f,209.162385f,214.248292f,219.364564f,224.510845f,229.686789f,234.892058f,240.126328f,245.389280f,250.680604f,256.000000f,261.347174f,266.721841f,272.123723f,277.552547f,283.008049f,288.489971f,293.998060f,299.532071f,305.091761f,310.676898f,316.287249f,321.922592f,327.582707f,333.267377f,338.976394f,344.709550f,350.466646f,356.247482f,362.051866f,367.879608f,373.730522f,379.604427f,385.501143f,391.420496f,397.362314f,403.326427f,409.312672f,415.320884f,421.350905f,427.402579f,433.475750f,439.570269f,445.685987f,451.822757f,457.980436f,464.158883f,470.357960f,476.577530f,482.817459f,489.077615f,495.357868f,501.658090f,507.978156f,514.317941f,520.677324f,527.056184f,533.454404f,539.871867f,546.308458f,552.764065f,559.238575f,565.731879f,572.243870f,578.774440f,585.323483f,591.890898f,598.476581f,605.080431f,611.702349f,618.342238f,625.000000f,631.675540f,638.368763f,645.079578f
};
float frac;
int sign, mult = 256;
if (x < 129)
{
return g_pow43[x];
return g_drmp3_pow43[16 + x];
}
if (x < 1024)
@@ -1011,31 +985,30 @@ static float drmp3_L3_pow_43(int x)
sign = 2*x & 64;
frac = (float)((x & 63) - sign) / ((x & ~63) + sign);
return g_pow43[(x + sign) >> 6]*(1.f + frac*((4.f/3) + frac*(2.f/9)))*mult;
return g_drmp3_pow43[16 + ((x + sign) >> 6)]*(1.f + frac*((4.f/3) + frac*(2.f/9)))*mult;
}
static void drmp3_L3_huffman(float *dst, drmp3_bs *bs, const drmp3_L3_gr_info *gr_info, const float *scf, int layer3gr_limit)
{
static const float g_pow43_signed[32] = { 0,0,1,-1,2.519842f,-2.519842f,4.326749f,-4.326749f,6.349604f,-6.349604f,8.549880f,-8.549880f,10.902724f,-10.902724f,13.390518f,-13.390518f,16.000000f,-16.000000f,18.720754f,-18.720754f,21.544347f,-21.544347f,24.463781f,-24.463781f,27.473142f,-27.473142f,30.567351f,-30.567351f,33.741992f,-33.741992f,36.993181f,-36.993181f };
static const drmp3_int16 tab0[32] = { 0, };
static const drmp3_int16 tab1[] = { 785,785,785,785,784,784,784,784,513,513,513,513,513,513,513,513,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256 };
static const drmp3_int16 tab2[] = { -255,1313,1298,1282,785,785,785,785,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,290,288 };
static const drmp3_int16 tab3[] = { -255,1313,1298,1282,769,769,769,769,529,529,529,529,529,529,529,529,528,528,528,528,528,528,528,528,512,512,512,512,512,512,512,512,290,288 };
static const drmp3_int16 tab5[] = { -253,-318,-351,-367,785,785,785,785,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,819,818,547,547,275,275,275,275,561,560,515,546,289,274,288,258 };
static const drmp3_int16 tab6[] = { -254,-287,1329,1299,1314,1312,1057,1057,1042,1042,1026,1026,784,784,784,784,529,529,529,529,529,529,529,529,769,769,769,769,768,768,768,768,563,560,306,306,291,259 };
static const drmp3_int16 tab7[] = { -252,-413,-477,-542,1298,-575,1041,1041,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-383,-399,1107,1092,1106,1061,849,849,789,789,1104,1091,773,773,1076,1075,341,340,325,309,834,804,577,577,532,532,516,516,832,818,803,816,561,561,531,531,515,546,289,289,288,258 };
static const drmp3_int16 tab8[] = { -252,-429,-493,-559,1057,1057,1042,1042,529,529,529,529,529,529,529,529,784,784,784,784,769,769,769,769,512,512,512,512,512,512,512,512,-382,1077,-415,1106,1061,1104,849,849,789,789,1091,1076,1029,1075,834,834,597,581,340,340,339,324,804,833,532,532,832,772,818,803,817,787,816,771,290,290,290,290,288,258 };
static const drmp3_int16 tab9[] = { -253,-349,-414,-447,-463,1329,1299,-479,1314,1312,1057,1057,1042,1042,1026,1026,785,785,785,785,784,784,784,784,769,769,769,769,768,768,768,768,-319,851,821,-335,836,850,805,849,341,340,325,336,533,533,579,579,564,564,773,832,578,548,563,516,321,276,306,291,304,259 };
static const drmp3_int16 tab10[] = { -251,-572,-733,-830,-863,-879,1041,1041,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-511,-527,-543,1396,1351,1381,1366,1395,1335,1380,-559,1334,1138,1138,1063,1063,1350,1392,1031,1031,1062,1062,1364,1363,1120,1120,1333,1348,881,881,881,881,375,374,359,373,343,358,341,325,791,791,1123,1122,-703,1105,1045,-719,865,865,790,790,774,774,1104,1029,338,293,323,308,-799,-815,833,788,772,818,803,816,322,292,307,320,561,531,515,546,289,274,288,258 };
static const drmp3_int16 tab11[] = { -251,-525,-605,-685,-765,-831,-846,1298,1057,1057,1312,1282,785,785,785,785,784,784,784,784,769,769,769,769,512,512,512,512,512,512,512,512,1399,1398,1383,1367,1382,1396,1351,-511,1381,1366,1139,1139,1079,1079,1124,1124,1364,1349,1363,1333,882,882,882,882,807,807,807,807,1094,1094,1136,1136,373,341,535,535,881,775,867,822,774,-591,324,338,-671,849,550,550,866,864,609,609,293,336,534,534,789,835,773,-751,834,804,308,307,833,788,832,772,562,562,547,547,305,275,560,515,290,290 };
static const drmp3_int16 tab12[] = { -252,-397,-477,-557,-622,-653,-719,-735,-750,1329,1299,1314,1057,1057,1042,1042,1312,1282,1024,1024,785,785,785,785,784,784,784,784,769,769,769,769,-383,1127,1141,1111,1126,1140,1095,1110,869,869,883,883,1079,1109,882,882,375,374,807,868,838,881,791,-463,867,822,368,263,852,837,836,-543,610,610,550,550,352,336,534,534,865,774,851,821,850,805,593,533,579,564,773,832,578,578,548,548,577,577,307,276,306,291,516,560,259,259 };
static const drmp3_int16 tab13[] = { -250,-2107,-2507,-2764,-2909,-2974,-3007,-3023,1041,1041,1040,1040,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-767,-1052,-1213,-1277,-1358,-1405,-1469,-1535,-1550,-1582,-1614,-1647,-1662,-1694,-1726,-1759,-1774,-1807,-1822,-1854,-1886,1565,-1919,-1935,-1951,-1967,1731,1730,1580,1717,-1983,1729,1564,-1999,1548,-2015,-2031,1715,1595,-2047,1714,-2063,1610,-2079,1609,-2095,1323,1323,1457,1457,1307,1307,1712,1547,1641,1700,1699,1594,1685,1625,1442,1442,1322,1322,-780,-973,-910,1279,1278,1277,1262,1276,1261,1275,1215,1260,1229,-959,974,974,989,989,-943,735,478,478,495,463,506,414,-1039,1003,958,1017,927,942,987,957,431,476,1272,1167,1228,-1183,1256,-1199,895,895,941,941,1242,1227,1212,1135,1014,1014,490,489,503,487,910,1013,985,925,863,894,970,955,1012,847,-1343,831,755,755,984,909,428,366,754,559,-1391,752,486,457,924,997,698,698,983,893,740,740,908,877,739,739,667,667,953,938,497,287,271,271,683,606,590,712,726,574,302,302,738,736,481,286,526,725,605,711,636,724,696,651,589,681,666,710,364,467,573,695,466,466,301,465,379,379,709,604,665,679,316,316,634,633,436,436,464,269,424,394,452,332,438,363,347,408,393,448,331,422,362,407,392,421,346,406,391,376,375,359,1441,1306,-2367,1290,-2383,1337,-2399,-2415,1426,1321,-2431,1411,1336,-2447,-2463,-2479,1169,1169,1049,1049,1424,1289,1412,1352,1319,-2495,1154,1154,1064,1064,1153,1153,416,390,360,404,403,389,344,374,373,343,358,372,327,357,342,311,356,326,1395,1394,1137,1137,1047,1047,1365,1392,1287,1379,1334,1364,1349,1378,1318,1363,792,792,792,792,1152,1152,1032,1032,1121,1121,1046,1046,1120,1120,1030,1030,-2895,1106,1061,1104,849,849,789,789,1091,1076,1029,1090,1060,1075,833,833,309,324,532,532,832,772,818,803,561,561,531,560,515,546,289,274,288,258 };
static const drmp3_int16 tab15[] = { -250,-1179,-1579,-1836,-1996,-2124,-2253,-2333,-2413,-2477,-2542,-2574,-2607,-2622,-2655,1314,1313,1298,1312,1282,785,785,785,785,1040,1040,1025,1025,768,768,768,768,-766,-798,-830,-862,-895,-911,-927,-943,-959,-975,-991,-1007,-1023,-1039,-1055,-1070,1724,1647,-1103,-1119,1631,1767,1662,1738,1708,1723,-1135,1780,1615,1779,1599,1677,1646,1778,1583,-1151,1777,1567,1737,1692,1765,1722,1707,1630,1751,1661,1764,1614,1736,1676,1763,1750,1645,1598,1721,1691,1762,1706,1582,1761,1566,-1167,1749,1629,767,766,751,765,494,494,735,764,719,749,734,763,447,447,748,718,477,506,431,491,446,476,461,505,415,430,475,445,504,399,460,489,414,503,383,474,429,459,502,502,746,752,488,398,501,473,413,472,486,271,480,270,-1439,-1455,1357,-1471,-1487,-1503,1341,1325,-1519,1489,1463,1403,1309,-1535,1372,1448,1418,1476,1356,1462,1387,-1551,1475,1340,1447,1402,1386,-1567,1068,1068,1474,1461,455,380,468,440,395,425,410,454,364,467,466,464,453,269,409,448,268,432,1371,1473,1432,1417,1308,1460,1355,1446,1459,1431,1083,1083,1401,1416,1458,1445,1067,1067,1370,1457,1051,1051,1291,1430,1385,1444,1354,1415,1400,1443,1082,1082,1173,1113,1186,1066,1185,1050,-1967,1158,1128,1172,1097,1171,1081,-1983,1157,1112,416,266,375,400,1170,1142,1127,1065,793,793,1169,1033,1156,1096,1141,1111,1155,1080,1126,1140,898,898,808,808,897,897,792,792,1095,1152,1032,1125,1110,1139,1079,1124,882,807,838,881,853,791,-2319,867,368,263,822,852,837,866,806,865,-2399,851,352,262,534,534,821,836,594,594,549,549,593,593,533,533,848,773,579,579,564,578,548,563,276,276,577,576,306,291,516,560,305,305,275,259 };
static const drmp3_int16 tab16[] = { -251,-892,-2058,-2620,-2828,-2957,-3023,-3039,1041,1041,1040,1040,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-511,-527,-543,-559,1530,-575,-591,1528,1527,1407,1526,1391,1023,1023,1023,1023,1525,1375,1268,1268,1103,1103,1087,1087,1039,1039,1523,-604,815,815,815,815,510,495,509,479,508,463,507,447,431,505,415,399,-734,-782,1262,-815,1259,1244,-831,1258,1228,-847,-863,1196,-879,1253,987,987,748,-767,493,493,462,477,414,414,686,669,478,446,461,445,474,429,487,458,412,471,1266,1264,1009,1009,799,799,-1019,-1276,-1452,-1581,-1677,-1757,-1821,-1886,-1933,-1997,1257,1257,1483,1468,1512,1422,1497,1406,1467,1496,1421,1510,1134,1134,1225,1225,1466,1451,1374,1405,1252,1252,1358,1480,1164,1164,1251,1251,1238,1238,1389,1465,-1407,1054,1101,-1423,1207,-1439,830,830,1248,1038,1237,1117,1223,1148,1236,1208,411,426,395,410,379,269,1193,1222,1132,1235,1221,1116,976,976,1192,1162,1177,1220,1131,1191,963,963,-1647,961,780,-1663,558,558,994,993,437,408,393,407,829,978,813,797,947,-1743,721,721,377,392,844,950,828,890,706,706,812,859,796,960,948,843,934,874,571,571,-1919,690,555,689,421,346,539,539,944,779,918,873,932,842,903,888,570,570,931,917,674,674,-2575,1562,-2591,1609,-2607,1654,1322,1322,1441,1441,1696,1546,1683,1593,1669,1624,1426,1426,1321,1321,1639,1680,1425,1425,1305,1305,1545,1668,1608,1623,1667,1592,1638,1666,1320,1320,1652,1607,1409,1409,1304,1304,1288,1288,1664,1637,1395,1395,1335,1335,1622,1636,1394,1394,1319,1319,1606,1621,1392,1392,1137,1137,1137,1137,345,390,360,375,404,373,1047,-2751,-2767,-2783,1062,1121,1046,-2799,1077,-2815,1106,1061,789,789,1105,1104,263,355,310,340,325,354,352,262,339,324,1091,1076,1029,1090,1060,1075,833,833,788,788,1088,1028,818,818,803,803,561,561,531,531,816,771,546,546,289,274,288,258 };
static const drmp3_int16 tab24[] = { -253,-317,-381,-446,-478,-509,1279,1279,-811,-1179,-1451,-1756,-1900,-2028,-2189,-2253,-2333,-2414,-2445,-2511,-2526,1313,1298,-2559,1041,1041,1040,1040,1025,1025,1024,1024,1022,1007,1021,991,1020,975,1019,959,687,687,1018,1017,671,671,655,655,1016,1015,639,639,758,758,623,623,757,607,756,591,755,575,754,559,543,543,1009,783,-575,-621,-685,-749,496,-590,750,749,734,748,974,989,1003,958,988,973,1002,942,987,957,972,1001,926,986,941,971,956,1000,910,985,925,999,894,970,-1071,-1087,-1102,1390,-1135,1436,1509,1451,1374,-1151,1405,1358,1480,1420,-1167,1507,1494,1389,1342,1465,1435,1450,1326,1505,1310,1493,1373,1479,1404,1492,1464,1419,428,443,472,397,736,526,464,464,486,457,442,471,484,482,1357,1449,1434,1478,1388,1491,1341,1490,1325,1489,1463,1403,1309,1477,1372,1448,1418,1433,1476,1356,1462,1387,-1439,1475,1340,1447,1402,1474,1324,1461,1371,1473,269,448,1432,1417,1308,1460,-1711,1459,-1727,1441,1099,1099,1446,1386,1431,1401,-1743,1289,1083,1083,1160,1160,1458,1445,1067,1067,1370,1457,1307,1430,1129,1129,1098,1098,268,432,267,416,266,400,-1887,1144,1187,1082,1173,1113,1186,1066,1050,1158,1128,1143,1172,1097,1171,1081,420,391,1157,1112,1170,1142,1127,1065,1169,1049,1156,1096,1141,1111,1155,1080,1126,1154,1064,1153,1140,1095,1048,-2159,1125,1110,1137,-2175,823,823,1139,1138,807,807,384,264,368,263,868,838,853,791,867,822,852,837,866,806,865,790,-2319,851,821,836,352,262,850,805,849,-2399,533,533,835,820,336,261,578,548,563,577,532,532,832,772,562,562,547,547,305,275,560,515,290,290,288,258 };
static const drmp3_int16 tabs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
785,785,785,785,784,784,784,784,513,513,513,513,513,513,513,513,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-255,1313,1298,1282,785,785,785,785,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,290,288,
-255,1313,1298,1282,769,769,769,769,529,529,529,529,529,529,529,529,528,528,528,528,528,528,528,528,512,512,512,512,512,512,512,512,290,288,
-253,-318,-351,-367,785,785,785,785,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,819,818,547,547,275,275,275,275,561,560,515,546,289,274,288,258,
-254,-287,1329,1299,1314,1312,1057,1057,1042,1042,1026,1026,784,784,784,784,529,529,529,529,529,529,529,529,769,769,769,769,768,768,768,768,563,560,306,306,291,259,
-252,-413,-477,-542,1298,-575,1041,1041,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-383,-399,1107,1092,1106,1061,849,849,789,789,1104,1091,773,773,1076,1075,341,340,325,309,834,804,577,577,532,532,516,516,832,818,803,816,561,561,531,531,515,546,289,289,288,258,
-252,-429,-493,-559,1057,1057,1042,1042,529,529,529,529,529,529,529,529,784,784,784,784,769,769,769,769,512,512,512,512,512,512,512,512,-382,1077,-415,1106,1061,1104,849,849,789,789,1091,1076,1029,1075,834,834,597,581,340,340,339,324,804,833,532,532,832,772,818,803,817,787,816,771,290,290,290,290,288,258,
-253,-349,-414,-447,-463,1329,1299,-479,1314,1312,1057,1057,1042,1042,1026,1026,785,785,785,785,784,784,784,784,769,769,769,769,768,768,768,768,-319,851,821,-335,836,850,805,849,341,340,325,336,533,533,579,579,564,564,773,832,578,548,563,516,321,276,306,291,304,259,
-251,-572,-733,-830,-863,-879,1041,1041,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-511,-527,-543,1396,1351,1381,1366,1395,1335,1380,-559,1334,1138,1138,1063,1063,1350,1392,1031,1031,1062,1062,1364,1363,1120,1120,1333,1348,881,881,881,881,375,374,359,373,343,358,341,325,791,791,1123,1122,-703,1105,1045,-719,865,865,790,790,774,774,1104,1029,338,293,323,308,-799,-815,833,788,772,818,803,816,322,292,307,320,561,531,515,546,289,274,288,258,
-251,-525,-605,-685,-765,-831,-846,1298,1057,1057,1312,1282,785,785,785,785,784,784,784,784,769,769,769,769,512,512,512,512,512,512,512,512,1399,1398,1383,1367,1382,1396,1351,-511,1381,1366,1139,1139,1079,1079,1124,1124,1364,1349,1363,1333,882,882,882,882,807,807,807,807,1094,1094,1136,1136,373,341,535,535,881,775,867,822,774,-591,324,338,-671,849,550,550,866,864,609,609,293,336,534,534,789,835,773,-751,834,804,308,307,833,788,832,772,562,562,547,547,305,275,560,515,290,290,
-252,-397,-477,-557,-622,-653,-719,-735,-750,1329,1299,1314,1057,1057,1042,1042,1312,1282,1024,1024,785,785,785,785,784,784,784,784,769,769,769,769,-383,1127,1141,1111,1126,1140,1095,1110,869,869,883,883,1079,1109,882,882,375,374,807,868,838,881,791,-463,867,822,368,263,852,837,836,-543,610,610,550,550,352,336,534,534,865,774,851,821,850,805,593,533,579,564,773,832,578,578,548,548,577,577,307,276,306,291,516,560,259,259,
-250,-2107,-2507,-2764,-2909,-2974,-3007,-3023,1041,1041,1040,1040,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-767,-1052,-1213,-1277,-1358,-1405,-1469,-1535,-1550,-1582,-1614,-1647,-1662,-1694,-1726,-1759,-1774,-1807,-1822,-1854,-1886,1565,-1919,-1935,-1951,-1967,1731,1730,1580,1717,-1983,1729,1564,-1999,1548,-2015,-2031,1715,1595,-2047,1714,-2063,1610,-2079,1609,-2095,1323,1323,1457,1457,1307,1307,1712,1547,1641,1700,1699,1594,1685,1625,1442,1442,1322,1322,-780,-973,-910,1279,1278,1277,1262,1276,1261,1275,1215,1260,1229,-959,974,974,989,989,-943,735,478,478,495,463,506,414,-1039,1003,958,1017,927,942,987,957,431,476,1272,1167,1228,-1183,1256,-1199,895,895,941,941,1242,1227,1212,1135,1014,1014,490,489,503,487,910,1013,985,925,863,894,970,955,1012,847,-1343,831,755,755,984,909,428,366,754,559,-1391,752,486,457,924,997,698,698,983,893,740,740,908,877,739,739,667,667,953,938,497,287,271,271,683,606,590,712,726,574,302,302,738,736,481,286,526,725,605,711,636,724,696,651,589,681,666,710,364,467,573,695,466,466,301,465,379,379,709,604,665,679,316,316,634,633,436,436,464,269,424,394,452,332,438,363,347,408,393,448,331,422,362,407,392,421,346,406,391,376,375,359,1441,1306,-2367,1290,-2383,1337,-2399,-2415,1426,1321,-2431,1411,1336,-2447,-2463,-2479,1169,1169,1049,1049,1424,1289,1412,1352,1319,-2495,1154,1154,1064,1064,1153,1153,416,390,360,404,403,389,344,374,373,343,358,372,327,357,342,311,356,326,1395,1394,1137,1137,1047,1047,1365,1392,1287,1379,1334,1364,1349,1378,1318,1363,792,792,792,792,1152,1152,1032,1032,1121,1121,1046,1046,1120,1120,1030,1030,-2895,1106,1061,1104,849,849,789,789,1091,1076,1029,1090,1060,1075,833,833,309,324,532,532,832,772,818,803,561,561,531,560,515,546,289,274,288,258,
-250,-1179,-1579,-1836,-1996,-2124,-2253,-2333,-2413,-2477,-2542,-2574,-2607,-2622,-2655,1314,1313,1298,1312,1282,785,785,785,785,1040,1040,1025,1025,768,768,768,768,-766,-798,-830,-862,-895,-911,-927,-943,-959,-975,-991,-1007,-1023,-1039,-1055,-1070,1724,1647,-1103,-1119,1631,1767,1662,1738,1708,1723,-1135,1780,1615,1779,1599,1677,1646,1778,1583,-1151,1777,1567,1737,1692,1765,1722,1707,1630,1751,1661,1764,1614,1736,1676,1763,1750,1645,1598,1721,1691,1762,1706,1582,1761,1566,-1167,1749,1629,767,766,751,765,494,494,735,764,719,749,734,763,447,447,748,718,477,506,431,491,446,476,461,505,415,430,475,445,504,399,460,489,414,503,383,474,429,459,502,502,746,752,488,398,501,473,413,472,486,271,480,270,-1439,-1455,1357,-1471,-1487,-1503,1341,1325,-1519,1489,1463,1403,1309,-1535,1372,1448,1418,1476,1356,1462,1387,-1551,1475,1340,1447,1402,1386,-1567,1068,1068,1474,1461,455,380,468,440,395,425,410,454,364,467,466,464,453,269,409,448,268,432,1371,1473,1432,1417,1308,1460,1355,1446,1459,1431,1083,1083,1401,1416,1458,1445,1067,1067,1370,1457,1051,1051,1291,1430,1385,1444,1354,1415,1400,1443,1082,1082,1173,1113,1186,1066,1185,1050,-1967,1158,1128,1172,1097,1171,1081,-1983,1157,1112,416,266,375,400,1170,1142,1127,1065,793,793,1169,1033,1156,1096,1141,1111,1155,1080,1126,1140,898,898,808,808,897,897,792,792,1095,1152,1032,1125,1110,1139,1079,1124,882,807,838,881,853,791,-2319,867,368,263,822,852,837,866,806,865,-2399,851,352,262,534,534,821,836,594,594,549,549,593,593,533,533,848,773,579,579,564,578,548,563,276,276,577,576,306,291,516,560,305,305,275,259,
-251,-892,-2058,-2620,-2828,-2957,-3023,-3039,1041,1041,1040,1040,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-511,-527,-543,-559,1530,-575,-591,1528,1527,1407,1526,1391,1023,1023,1023,1023,1525,1375,1268,1268,1103,1103,1087,1087,1039,1039,1523,-604,815,815,815,815,510,495,509,479,508,463,507,447,431,505,415,399,-734,-782,1262,-815,1259,1244,-831,1258,1228,-847,-863,1196,-879,1253,987,987,748,-767,493,493,462,477,414,414,686,669,478,446,461,445,474,429,487,458,412,471,1266,1264,1009,1009,799,799,-1019,-1276,-1452,-1581,-1677,-1757,-1821,-1886,-1933,-1997,1257,1257,1483,1468,1512,1422,1497,1406,1467,1496,1421,1510,1134,1134,1225,1225,1466,1451,1374,1405,1252,1252,1358,1480,1164,1164,1251,1251,1238,1238,1389,1465,-1407,1054,1101,-1423,1207,-1439,830,830,1248,1038,1237,1117,1223,1148,1236,1208,411,426,395,410,379,269,1193,1222,1132,1235,1221,1116,976,976,1192,1162,1177,1220,1131,1191,963,963,-1647,961,780,-1663,558,558,994,993,437,408,393,407,829,978,813,797,947,-1743,721,721,377,392,844,950,828,890,706,706,812,859,796,960,948,843,934,874,571,571,-1919,690,555,689,421,346,539,539,944,779,918,873,932,842,903,888,570,570,931,917,674,674,-2575,1562,-2591,1609,-2607,1654,1322,1322,1441,1441,1696,1546,1683,1593,1669,1624,1426,1426,1321,1321,1639,1680,1425,1425,1305,1305,1545,1668,1608,1623,1667,1592,1638,1666,1320,1320,1652,1607,1409,1409,1304,1304,1288,1288,1664,1637,1395,1395,1335,1335,1622,1636,1394,1394,1319,1319,1606,1621,1392,1392,1137,1137,1137,1137,345,390,360,375,404,373,1047,-2751,-2767,-2783,1062,1121,1046,-2799,1077,-2815,1106,1061,789,789,1105,1104,263,355,310,340,325,354,352,262,339,324,1091,1076,1029,1090,1060,1075,833,833,788,788,1088,1028,818,818,803,803,561,561,531,531,816,771,546,546,289,274,288,258,
-253,-317,-381,-446,-478,-509,1279,1279,-811,-1179,-1451,-1756,-1900,-2028,-2189,-2253,-2333,-2414,-2445,-2511,-2526,1313,1298,-2559,1041,1041,1040,1040,1025,1025,1024,1024,1022,1007,1021,991,1020,975,1019,959,687,687,1018,1017,671,671,655,655,1016,1015,639,639,758,758,623,623,757,607,756,591,755,575,754,559,543,543,1009,783,-575,-621,-685,-749,496,-590,750,749,734,748,974,989,1003,958,988,973,1002,942,987,957,972,1001,926,986,941,971,956,1000,910,985,925,999,894,970,-1071,-1087,-1102,1390,-1135,1436,1509,1451,1374,-1151,1405,1358,1480,1420,-1167,1507,1494,1389,1342,1465,1435,1450,1326,1505,1310,1493,1373,1479,1404,1492,1464,1419,428,443,472,397,736,526,464,464,486,457,442,471,484,482,1357,1449,1434,1478,1388,1491,1341,1490,1325,1489,1463,1403,1309,1477,1372,1448,1418,1433,1476,1356,1462,1387,-1439,1475,1340,1447,1402,1474,1324,1461,1371,1473,269,448,1432,1417,1308,1460,-1711,1459,-1727,1441,1099,1099,1446,1386,1431,1401,-1743,1289,1083,1083,1160,1160,1458,1445,1067,1067,1370,1457,1307,1430,1129,1129,1098,1098,268,432,267,416,266,400,-1887,1144,1187,1082,1173,1113,1186,1066,1050,1158,1128,1143,1172,1097,1171,1081,420,391,1157,1112,1170,1142,1127,1065,1169,1049,1156,1096,1141,1111,1155,1080,1126,1154,1064,1153,1140,1095,1048,-2159,1125,1110,1137,-2175,823,823,1139,1138,807,807,384,264,368,263,868,838,853,791,867,822,852,837,866,806,865,790,-2319,851,821,836,352,262,850,805,849,-2399,533,533,835,820,336,261,578,548,563,577,532,532,832,772,562,562,547,547,305,275,560,515,290,290,288,258 };
static const drmp3_uint8 tab32[] = { 130,162,193,209,44,28,76,140,9,9,9,9,9,9,9,9,190,254,222,238,126,94,157,157,109,61,173,205};
static const drmp3_uint8 tab33[] = { 252,236,220,204,188,172,156,140,124,108,92,76,60,44,28,12 };
static const drmp3_int16 * const tabindex[2*16] = { tab0,tab1,tab2,tab3,tab0,tab5,tab6,tab7,tab8,tab9,tab10,tab11,tab12,tab13,tab0,tab15,tab16,tab16,tab16,tab16,tab16,tab16,tab16,tab16,tab24,tab24,tab24,tab24,tab24,tab24,tab24,tab24 };
static const drmp3_int16 tabindex[2*16] = { 0,32,64,98,0,132,180,218,292,364,426,538,648,746,0,1126,1460,1460,1460,1460,1460,1460,1460,1460,1842,1842,1842,1842,1842,1842,1842,1842 };
static const drmp3_uint8 g_linbits[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,6,8,10,13,4,5,6,7,8,9,11,13 };
#define DRMP3_PEEK_BITS(n) (bs_cache >> (32 - n))
@@ -1055,7 +1028,7 @@ static void drmp3_L3_huffman(float *dst, drmp3_bs *bs, const drmp3_L3_gr_info *g
{
int tab_num = gr_info->table_select[ireg];
int sfb_cnt = gr_info->region_count[ireg++];
const short *codebook = tabindex[tab_num];
const short *codebook = tabs + tabindex[tab_num];
int linbits = g_linbits[tab_num];
do
{
@@ -1085,7 +1058,7 @@ static void drmp3_L3_huffman(float *dst, drmp3_bs *bs, const drmp3_L3_gr_info *g
*dst = one*drmp3_L3_pow_43(lsb)*((int32_t)bs_cache < 0 ? -1: 1);
} else
{
*dst = g_pow43_signed[lsb*2 + (bs_cache >> 31)]*one;
*dst = g_drmp3_pow43[16 + lsb - 16*(bs_cache >> 31)]*one;
}
DRMP3_FLUSH_BITS(lsb ? 1 : 0);
}
@@ -1942,6 +1915,11 @@ int drmp3dec_decode_frame(drmp3dec *dec, const unsigned char *mp3, int mp3_bytes
info->layer = 4 - DRMP3_HDR_GET_LAYER(hdr);
info->bitrate_kbps = drmp3_hdr_bitrate_kbps(hdr);
if (!pcm)
{
return drmp3_hdr_frame_samples(hdr);
}
drmp3_bs_init(bs_frame, hdr + DRMP3_HDR_SIZE, frame_size - DRMP3_HDR_SIZE);
if (DRMP3_HDR_IS_CRC(hdr))
{
@@ -2006,6 +1984,16 @@ int drmp3dec_decode_frame(drmp3dec *dec, const unsigned char *mp3, int mp3_bytes
//
///////////////////////////////////////////////////////////////////////////////
#if defined(SIZE_MAX)
#define DRMP3_SIZE_MAX SIZE_MAX
#else
#if defined(_WIN64) || defined(_LP64) || defined(__LP64__)
#define DRMP3_SIZE_MAX ((drmp3_uint64)0xFFFFFFFFFFFFFFFF)
#else
#define DRMP3_SIZE_MAX 0xFFFFFFFF
#endif
#endif
// Options.
#ifndef DR_MP3_DEFAULT_CHANNELS
#define DR_MP3_DEFAULT_CHANNELS 2
@@ -2313,8 +2301,10 @@ static drmp3_bool32 drmp3_decode_next_frame(drmp3* pMP3)
size_t bytesRead = pMP3->onRead(pMP3->pUserData, pMP3->pData + pMP3->dataSize, (pMP3->dataCapacity - pMP3->dataSize));
if (bytesRead == 0) {
pMP3->atEnd = DRMP3_TRUE;
return DRMP3_FALSE; // No data.
if (pMP3->dataSize == 0) {
pMP3->atEnd = DRMP3_TRUE;
return DRMP3_FALSE; // No data.
}
}
pMP3->dataSize += bytesRead;
@@ -2683,7 +2673,7 @@ float* drmp3__full_decode_and_close_f32(drmp3* pMP3, drmp3_config* pConfig, drmp
}
drmp3_uint64 newFramesBufferSize = framesCapacity*pMP3->channels*sizeof(float);
if (newFramesBufferSize > SIZE_MAX) {
if (newFramesBufferSize > DRMP3_SIZE_MAX) {
break;
}
@@ -2773,6 +2763,28 @@ void drmp3_free(void* p)
// REVISION HISTORY
// ===============
//
// v0.2.11 - 2018-08-08
// - Fix a bug where the last part of a file is not read.
//
// v0.2.10 - 2018-08-07
// - Improve 64-bit detection.
//
// v0.2.9 - 2018-08-05
// - Fix C++ build on older versions of GCC.
// - Bring up to date with minimp3.
//
// v0.2.8 - 2018-08-02
// - Fix compilation errors with older versions of GCC.
//
// v0.2.7 - 2018-07-13
// - Bring up to date with minimp3.
//
// v0.2.6 - 2018-07-12
// - Bring up to date with minimp3.
//
// v0.2.5 - 2018-06-22
// - Bring up to date with minimp3.
//
// v0.2.4 - 2018-05-12
// - Bring up to date with minimp3.
//