From 72bad342ad75294ae85aac8b2e2e7bea54193c15 Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 31 Mar 2019 19:59:58 +0800 Subject: *misc --- source/modules/asura-core/application.cpp | 3 --- .../asura-core/graphics/binding/_color32.cpp | 27 ++-------------------- .../modules/asura-core/graphics/binding/_image.cpp | 2 +- source/modules/asura-core/graphics/image.h | 2 +- source/modules/asura-core/graphics/shader.h | 2 +- source/modules/asura-core/wnd/window.h | 4 ++-- source/modules/asura-core/wnd/window_impl_sdl.cpp | 8 ++++++- source/modules/asura-core/wnd/window_impl_sdl.h | 18 ++++++++++----- 8 files changed, 26 insertions(+), 40 deletions(-) (limited to 'source/modules/asura-core') 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 #include #include -#include +#include #include #include 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 #include -#include +#include #include #include #include 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 #include @@ -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 #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 -- cgit v1.1-26-g67d0