summaryrefslogtreecommitdiff
path: root/source/modules
diff options
context:
space:
mode:
Diffstat (limited to 'source/modules')
-rw-r--r--source/modules/asura-core/application.cpp3
-rw-r--r--source/modules/asura-core/graphics/binding/_color32.cpp27
-rw-r--r--source/modules/asura-core/graphics/binding/_image.cpp2
-rw-r--r--source/modules/asura-core/graphics/image.h2
-rw-r--r--source/modules/asura-core/graphics/shader.h2
-rw-r--r--source/modules/asura-core/wnd/window.h4
-rw-r--r--source/modules/asura-core/wnd/window_impl_sdl.cpp8
-rw-r--r--source/modules/asura-core/wnd/window_impl_sdl.h18
-rw-r--r--source/modules/asura-utils/io/renewable.h (renamed from source/modules/asura-utils/io/reloadable.h)5
-rw-r--r--source/modules/asura-utils/threading/mutex.h5
10 files changed, 35 insertions, 41 deletions
diff --git a/source/modules/asura-core/application.cpp b/source/modules/asura-core/application.cpp
index 0a1c1ef..1ef9414 100644
--- a/source/modules/asura-core/application.cpp
+++ b/source/modules/asura-core/application.cpp
@@ -1,6 +1,3 @@
-#include "Sdl2/SDL.h"
-#include "Exceptions/Exception.h"
-#include "Scripting/Luax.hpp"
#include "Application.h"
using namespace Luax;
diff --git a/source/modules/asura-core/graphics/binding/_color32.cpp b/source/modules/asura-core/graphics/binding/_color32.cpp
index 7095866..ad7dad5 100644
--- a/source/modules/asura-core/graphics/binding/_color32.cpp
+++ b/source/modules/asura-core/graphics/binding/_color32.cpp
@@ -14,10 +14,7 @@ namespace AsuraEngine
{ "GetRed", _GetRed },
{ "GetGreen", _GetGreen },
{ "GetBlue", _GetBlue },
- { "GetAlpha", _GetAlpha },
- { "Multiply", _Multiply },
- { "Index", _Index },
- { "NewIndex", _NewIndex }
+ { "GetAlpha", _GetAlpha }
);
}
@@ -61,26 +58,6 @@ namespace AsuraEngine
}
- // color32:Multiply()
- LUAX_IMPL_METHOD(Color32, _Multiply)
- {
- LUAX_PREPARE(L, Color32);
-
- }
-
- // color32:Index()
- LUAX_IMPL_METHOD(Color32, _Index)
- {
- LUAX_PREPARE(L, Color32);
-
- }
-
- // color32:NewIndex()
- LUAX_IMPL_METHOD(Color32, _NewIndex)
- {
- LUAX_PREPARE(L, Color32);
-
- }
-
}
}
+ \ No newline at end of file
diff --git a/source/modules/asura-core/graphics/binding/_image.cpp b/source/modules/asura-core/graphics/binding/_image.cpp
index cc9a669..407ada7 100644
--- a/source/modules/asura-core/graphics/binding/_image.cpp
+++ b/source/modules/asura-core/graphics/binding/_image.cpp
@@ -54,7 +54,7 @@ namespace AsuraEngine
state.Push(self->GetWidth());
return 1;
}
-
+
// height = image:GetHeight()
LUAX_IMPL_METHOD(Image, _GetHeight)
{
diff --git a/source/modules/asura-core/graphics/image.h b/source/modules/asura-core/graphics/image.h
index 06108ed..2424ebb 100644
--- a/source/modules/asura-core/graphics/image.h
+++ b/source/modules/asura-core/graphics/image.h
@@ -4,7 +4,7 @@
#include <asura-utils/math/rect.hpp>
#include <asura-utils/math/vector2.hpp>
#include <asura-utils/scripting/portable.hpp>
-#include <asura-utils/io/reloadable.h>
+#include <asura-utils/io/renewable.h>
#include <asura-utils/stringmap.hpp>
#include <asura-utils/manager.hpp>
diff --git a/source/modules/asura-core/graphics/shader.h b/source/modules/asura-core/graphics/shader.h
index df0fcca..ae24548 100644
--- a/source/modules/asura-core/graphics/shader.h
+++ b/source/modules/asura-core/graphics/shader.h
@@ -5,7 +5,7 @@
#include <string>
#include <asura-utils/scripting/portable.hpp>
-#include <asura-utils/io/reloadable.h>
+#include <asura-utils/io/renewable.h>
#include <asura-utils/math/vector2.hpp>
#include <asura-utils/math/vector3.hpp>
#include <asura-utils/math/vector4.h>
diff --git a/source/modules/asura-core/wnd/window.h b/source/modules/asura-core/wnd/window.h
index 1ecb934..eb8a574 100644
--- a/source/modules/asura-core/wnd/window.h
+++ b/source/modules/asura-core/wnd/window.h
@@ -134,8 +134,8 @@ namespace AsuraEngine
virtual void SetPosition(int x, int y) = 0;
virtual void SetTitils(const std::string& title) = 0;
- virtual void Show();
- virtual void Hide();
+ virtual void Show() = 0;
+ virtual void Hide() = 0;
virtual void SwapRenderBuffer() = 0;
diff --git a/source/modules/asura-core/wnd/window_impl_sdl.cpp b/source/modules/asura-core/wnd/window_impl_sdl.cpp
index bbbef9a..e608b8b 100644
--- a/source/modules/asura-core/wnd/window_impl_sdl.cpp
+++ b/source/modules/asura-core/wnd/window_impl_sdl.cpp
@@ -1,3 +1,7 @@
+#include "../core_config.h"
+
+#if ASURA_WINDOW_SDL
+
#include <SDL2/SDL.h>
#include <asura-utils/exceptions/exception.h>
@@ -138,4 +142,6 @@ namespace AsuraEngine
}
}
-} \ No newline at end of file
+}
+
+#endif // ASURA_WINDOW_SDL \ No newline at end of file
diff --git a/source/modules/asura-core/wnd/window_impl_sdl.h b/source/modules/asura-core/wnd/window_impl_sdl.h
index 03e6579..0e81c0a 100644
--- a/source/modules/asura-core/wnd/window_impl_sdl.h
+++ b/source/modules/asura-core/wnd/window_impl_sdl.h
@@ -1,6 +1,10 @@
#ifndef __ASURA_WINDOW_SDL_H_
#define __ASURA_WINDOW_SDL_H_
+#include "../core_config.h"
+
+#if ASURA_WINDOW_SDL
+
#include <SDL2/SDL.h>
#include "window.h"
@@ -17,14 +21,14 @@ namespace AsuraEngine
WindowImplSDL(const WindowConfig& config);
~WindowImplSDL();
- void SetSize(uint width, uint height);
- void SetPosition(int x, int y);
- void SetTitils(const std::string& title);
+ void SetSize(uint width, uint height) override;
+ void SetPosition(int x, int y) override;
+ void SetTitils(const std::string& title) override;
- void Show();
- void Hide();
+ void Show() override;
+ void Hide() override;
- void SwapRenderBuffer();
+ void SwapRenderBuffer() override;
private:
@@ -36,4 +40,6 @@ namespace AsuraEngine
}
}
+#endif // ASURA_WINDOW_SDL
+
#endif \ No newline at end of file
diff --git a/source/modules/asura-utils/io/reloadable.h b/source/modules/asura-utils/io/renewable.h
index c3b89ac..769bdf6 100644
--- a/source/modules/asura-utils/io/reloadable.h
+++ b/source/modules/asura-utils/io/renewable.h
@@ -3,6 +3,8 @@
#include "../scripting/portable.hpp"
+#include "decoded_data.h"
+
namespace AsuraEngine
{
namespace IO
@@ -20,6 +22,9 @@ namespace AsuraEngine
///
/// ̳RenewableҪṩһRefresh
+ ///
+ /// Effective C++09.Ӧýֹڹ캯еvirtualRefresh
+ /// ӹ캯г룬ҪֶRefresh
///
virtual bool Refresh(AEIO::DecodedData* decode_data) = 0;
diff --git a/source/modules/asura-utils/threading/mutex.h b/source/modules/asura-utils/threading/mutex.h
index 7afbe35..5d33be1 100644
--- a/source/modules/asura-utils/threading/mutex.h
+++ b/source/modules/asura-utils/threading/mutex.h
@@ -30,6 +30,10 @@ namespace AsuraEngine
private:
+ // ֹ
+ Mutex(const Mutex&);
+ Mutex& operator=(const Mutex&);
+
MutexImpl* mImpl;
};
@@ -52,7 +56,6 @@ namespace AsuraEngine
Mutex& m;
};
-// ڵջӴλÿʼջΪٽ
#define lock(m) \
if(_mutex_locker _asura_mutex_locker = m){} else