diff options
| author | chai <chaifix@163.com> | 2019-03-20 22:43:25 +0800 | 
|---|---|---|
| committer | chai <chaifix@163.com> | 2019-03-20 22:43:25 +0800 | 
| commit | 82956beb1fe17e1226327638c8ab22b5f5adfc1d (patch) | |
| tree | b47464697174d5f9db4c8c9ab4a25cc384927d97 /source/libs | |
| parent | 1497dccd63a84b7ee2b229b1ad9c5c02718f2a78 (diff) | |
*misc
Diffstat (limited to 'source/libs')
25 files changed, 259 insertions, 170 deletions
diff --git a/source/libs/asura-lib-core/application.cpp b/source/libs/asura-lib-core/application.cpp index 598bca8..0a1c1ef 100644 --- a/source/libs/asura-lib-core/application.cpp +++ b/source/libs/asura-lib-core/application.cpp @@ -20,40 +20,7 @@ namespace AsuraEngine  	bool Application::InitSubModules(uint flag)  	{ -		// ʼģ -	#define TryInitSubModule(module_name, func_name) \ -		if((flag&ASURA_MODULE_##module_name) && !Application::Init##func_name()) \ -			throw Exception("Asura init submodule %s failed.", #module_name); - -		TryInitSubModule(GRAPHICS, Graphics); -		TryInitSubModule(AUDIO,    Audio); -		TryInitSubModule(FONT,     Font); -		TryInitSubModule(INPUT,    Input); -		TryInitSubModule(MATH,     Math); -		TryInitSubModule(PHYSICS,  Physics); -		TryInitSubModule(TIME,     Time); -		TryInitSubModule(WINDOW,   Window);  	} -	void Application::PortToLua() -	{ -		LuaxState state(mLuaState); - -#define RegisterLuaFactory(T) state.RegisterFactory<T>(); - -		state.SetToGlobalNamespace(); -		state.PushNamespace("AsuraEngine"); - -		RegisterLuaFactory(AEGraphics::Image>); - -#ifdef ASURA_AUTHOR -		state.PushNamespace("Version"); - -		state.PopNamespace(); // AsuraEngine.Version -#endif - -		state.PopNamespace(); // AsuraEngine -	} -  }
\ No newline at end of file diff --git a/source/libs/asura-lib-core/application.h b/source/libs/asura-lib-core/application.h index 6ae3218..983dbce 100644 --- a/source/libs/asura-lib-core/application.h +++ b/source/libs/asura-lib-core/application.h @@ -5,7 +5,7 @@  #include <asura-lib-utils/module.h>  #include <queue> -#include "config.h" +#include "core_config.h"  namespace AsuraEngine  { @@ -65,18 +65,6 @@ namespace AsuraEngine  	private:  		/// -		/// ģʼڸģļʵ֡ -		/// -		bool InitGraphics(); -		bool InitAudio(); -		bool InitFont(); -		bool InitInput(); -		bool InitMath(); -		bool InitPhysics(); -		bool InitTime(); -		bool InitWindow(); - -		///  		/// Lua state.  		///  		lua_State* mLuaState; diff --git a/source/libs/asura-lib-core/asura.h b/source/libs/asura-lib-core/asura.h deleted file mode 100644 index 5ca56f3..0000000 --- a/source/libs/asura-lib-core/asura.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef __ASURA_ENGINE_H__ -#define __ASURA_ENGINE_H__ - -#include "Application.h" - -#include "Graphics/Shader.h" - -//namespace AEGraphics = AsuraEngine::Graphics; -//namespace AEMath = AsuraEngine::Math; -//namespace AETime = AsuraEngine::Time;  -//namespace AEInput = AsuraEngine::Input;  -//namespace AEProfiler = AsuraEngine::Profiler; -//namespace AEFont = AsuraEngine::Font; - -#endif
\ No newline at end of file diff --git a/source/libs/asura-lib-core/client/client.h b/source/libs/asura-lib-core/client/client.h index f2464a5..8df30fe 100644 --- a/source/libs/asura-lib-core/client/client.h +++ b/source/libs/asura-lib-core/client/client.h @@ -1,16 +1,23 @@  #ifndef __ASURA_ENGINE_HOST_H__  #define __ASURA_ENGINE_HOST_H__ -/** -* ʹڿйص -*/ +#include <asura-lib-utils/type.h> +/// +/// ʹйصʵ֣ǵϷĿƽ̨ʹüֱʵ֡༭벻ڿƽ̨ڿ⣬Ŀǰʹwin32APIʵϢѭ +///  namespace AsuraEngine  { -	namespace Host +	namespace Client  	{ +		/// +		/// ࡣ +		/// +		ASURA_ABSTRACT class Client +		{ +		};  	}  } diff --git a/source/libs/asura-lib-utils/scripting/portable.inl b/source/libs/asura-lib-core/client/sdl/sdl_thread.cpp index e69de29..e69de29 100644 --- a/source/libs/asura-lib-utils/scripting/portable.inl +++ b/source/libs/asura-lib-core/client/sdl/sdl_thread.cpp diff --git a/source/libs/asura-lib-core/client/sdl/sdl_thread.h b/source/libs/asura-lib-core/client/sdl/sdl_thread.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/source/libs/asura-lib-core/client/sdl/sdl_thread.h diff --git a/source/libs/asura-lib-core/client/sdl/sdl_window.h b/source/libs/asura-lib-core/client/sdl/sdl_window.h index 1fdef1e..040c23e 100644 --- a/source/libs/asura-lib-core/client/sdl/sdl_window.h +++ b/source/libs/asura-lib-core/client/sdl/sdl_window.h @@ -1,14 +1,29 @@  #ifndef __ASURA_SDL_WINDOW_H__  #define __ASURA_SDL_WINDOW_H__ +#include "../../core_config.h" +#if ASURA_CORE_SDL + +#include <asura-lib-utils/scripting/portable.hpp> +#include "../../graphics/window.h" +  namespace AsuraEngine  {  	namespace SDL  	{ +		class SDLWindow ASURA_FINAL  +			: public Graphics::Window +			, public Scripting::Portable<SDLWindow> +		{ +		public: +			 +		};  	}  } -#endif
\ No newline at end of file +#endif // ASURA_CORE_SDL + +#endif // __ASURA_SDL_WINDOW_H__
\ No newline at end of file diff --git a/source/libs/asura-lib-core/config.h b/source/libs/asura-lib-core/config.h deleted file mode 100644 index df7ad99..0000000 --- a/source/libs/asura-lib-core/config.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef __ASURA_CORE_CONFIG_H__ -#define __ASURA_CORE_CONFIG_H__ - -#endif
\ No newline at end of file diff --git a/source/libs/asura-lib-core/core_config.h b/source/libs/asura-lib-core/core_config.h new file mode 100644 index 0000000..06eecc7 --- /dev/null +++ b/source/libs/asura-lib-core/core_config.h @@ -0,0 +1,8 @@ +#ifndef __ASURA_CORE_CONFIG_H__ +#define __ASURA_CORE_CONFIG_H__ + +#define ASURA_CORE_SDL  1 +#define ASURA_CORE_GLUT 0 +#define ASURA_CORE_GLFW 0 + +#endif
\ No newline at end of file diff --git a/source/libs/asura-lib-core/graphics/binding/image_data.binding.cpp b/source/libs/asura-lib-core/graphics/binding/image_data.binding.cpp index 0d68c11..72e33da 100644 --- a/source/libs/asura-lib-core/graphics/binding/image_data.binding.cpp +++ b/source/libs/asura-lib-core/graphics/binding/image_data.binding.cpp @@ -1,4 +1,4 @@ -#include "../image.h" +#include "../image_data.h"  using namespace Luax; @@ -7,23 +7,55 @@ namespace AsuraEngine  	namespace Graphics  	{ -		void Image::RegisterLuaxClass(LuaxState& state) +		LUAX_REGISTRY(ImageData)  		{  		} -		void Image::RegisterLuaxPostprocess(LuaxState& state) +		LUAX_POSTPROCESS(ImageData) +		{ +			LUAX_REGISTER_ENUM(state, "EBlendMode", +				{ "Additive", 1 } +			); +			LUAX_REGISTER_ENUM(state, "EPixelFormat", +				{ "RGBA32", 1 } +			); +		} + +		// imagedata = ImageData.New(databuffer) +		LUAX_IMPL_METHOD(ImageData, _New) +		{ +			LUAX_STATE(L); + +			Filesystem::DataBuffer* db = state.CheckUserdata<Filesystem::DataBuffer>(1); +			ImageData* image = new ImageData(*db); +			image->PushLuaxUserdata(state); +			return 1; +		} + +		LUAX_IMPL_METHOD(ImageData, _GetPixel) +		{ + +		} + +		LUAX_IMPL_METHOD(ImageData, _GetSize) +		{ + +		} + +		LUAX_IMPL_METHOD(ImageData, _GetWidth) +		{ + +		} + +		LUAX_IMPL_METHOD(ImageData, _GetHeight) +		{ + +		} + +		LUAX_IMPL_METHOD(ImageData, _GetPixelFormat)  		{ -			// blendö٣AsuraEngine.EBlendMode -			LuaxEnum EBlendMode[] = { -				{ "Additive", 1 }, -				{ "PreBlend", 2 }, -				{ "Substruction", 3 }, -				{ "Multiplied", 4 }, -				{0, 0} -			}; -			state.RegisterEnum("EBlendMode", EBlendMode);  		}  	} diff --git a/source/libs/asura-lib-core/graphics/canvas.h b/source/libs/asura-lib-core/graphics/canvas.h index c4e0f65..6b8b630 100644 --- a/source/libs/asura-lib-core/graphics/canvas.h +++ b/source/libs/asura-lib-core/graphics/canvas.h @@ -1,12 +1,14 @@  #ifndef __ASURA_ENGINE_CANVAS_H__  #define __ASURA_ENGINE_CANVAS_H__ -#include <Scripting/Luax.hpp> +#include <asura-lib-utils/scripting/portable.hpp> +#include <asura-lib-utils/math/rect.hpp> +#include <asura-lib-utils/math/vector2.hpp> -#include "Math/Rect.hpp" -#include "GL.h" -#include "Texture.h" -#include "RenderTarget.h" +#include "gl.h" +#include "texture.h" +#include "render_target.h" +#include "render_state.h"  namespace AsuraEngine  { @@ -19,7 +21,7 @@ namespace AsuraEngine  		class Canvas ASURA_FINAL  			: public Drawable  			, public RenderTarget -			, public Scripting::Portable +			, public Scripting::Portable<Canvas>  		{  		public: diff --git a/source/libs/asura-lib-core/graphics/color.h b/source/libs/asura-lib-core/graphics/color.h index a18c682..74cf8f3 100644 --- a/source/libs/asura-lib-core/graphics/color.h +++ b/source/libs/asura-lib-core/graphics/color.h @@ -1,8 +1,9 @@  #ifndef __ASURA_ENGINE_COLOR_H__  #define __ASURA_ENGINE_COLOR_H__ -#include "config.h" -#include "scripting/portable.hpp" +#include <asura-lib-utils/scripting/portable.hpp> + +#include "../core_config.h"  namespace AsuraEngine  { diff --git a/source/libs/asura-lib-core/graphics/gl.cpp b/source/libs/asura-lib-core/graphics/gl.cpp index 01c90de..7c68c8f 100644 --- a/source/libs/asura-lib-core/graphics/gl.cpp +++ b/source/libs/asura-lib-core/graphics/gl.cpp @@ -1,4 +1,4 @@ -#include "config.h" +#include "../core_config.h"  #include "gl.h"  namespace AsuraEngine diff --git a/source/libs/asura-lib-core/graphics/image_data.cpp b/source/libs/asura-lib-core/graphics/image_data.cpp index 821bfd6..28c706a 100644 --- a/source/libs/asura-lib-core/graphics/image_data.cpp +++ b/source/libs/asura-lib-core/graphics/image_data.cpp @@ -1,6 +1,7 @@  #include "image_data.h"  #include "png_decoder.h"  #include "stb_decoder.h" +#include "image_decoder.h"  namespace AsuraEngine  { @@ -35,7 +36,7 @@ namespace AsuraEngine  			{  				if (decoder->CanDecode(buffer))  				{ -					decoder->Decode(buffer, this); +					decoder->Decode(buffer, *this);  					return;  				}  			} diff --git a/source/libs/asura-lib-core/graphics/image_data.h b/source/libs/asura-lib-core/graphics/image_data.h index 1e711a8..53a9e85 100644 --- a/source/libs/asura-lib-core/graphics/image_data.h +++ b/source/libs/asura-lib-core/graphics/image_data.h @@ -3,9 +3,10 @@  #include <list> -#include "scripting/luax.hpp" -#include "filesystem/decoded_data.h" -#include "image_decoder.h" +#include <asura-lib-utils/scripting/portable.hpp> +#include <asura-lib-utils/filesystem/decoded_data.h> +#include <asura-lib-utils/filesystem/data_buffer.h> +  #include "pixel_format.h"  #include "color.h" @@ -14,9 +15,11 @@ namespace AsuraEngine  	namespace Graphics  	{ +		class ImageDecoder; +  		class ImageData ASURA_FINAL  			: public Filesystem::DecodedData -			, public Scripting::Portable +			, public Scripting::Portable<ImageData>  		{  		public: @@ -24,7 +27,6 @@ namespace AsuraEngine  			/// ͼƬļϢʧܣ׳쳣  			///  			ImageData(const Filesystem::DataBuffer& buffer); -  			~ImageData();  			Color GetPixel(uint x, uint y); @@ -45,14 +47,14 @@ namespace AsuraEngine  		public: -			//---------------------------------------------------------------------------------------------------------- -  			LUAX_DECL_FACTORY(ImageData); -			LUAX_DECL_METHOD(l_GetPixel); -			LUAX_DECL_METHOD(l_GetSize); - -			//---------------------------------------------------------------------------------------------------------- +			LUAX_DECL_METHOD(_New); +			LUAX_DECL_METHOD(_GetPixel); +			LUAX_DECL_METHOD(_GetSize); +			LUAX_DECL_METHOD(_GetWidth); +			LUAX_DECL_METHOD(_GetHeight); +			LUAX_DECL_METHOD(_GetPixelFormat);  		}; diff --git a/source/libs/asura-lib-core/graphics/image_decoder.h b/source/libs/asura-lib-core/graphics/image_decoder.h index 2c73fd1..921d129 100644 --- a/source/libs/asura-lib-core/graphics/image_decoder.h +++ b/source/libs/asura-lib-core/graphics/image_decoder.h @@ -1,9 +1,9 @@  #ifndef __ASURA_ENGINE_IMAGE_DECODER_H__  #define __ASURA_ENGINE_IMAGE_DECODER_H__ -#include "FileSystem/DataBuffer.h" +#include <asura-lib-utils/filesystem/data_buffer.h> -#include "ImageData.h" +#include "image_data.h"  namespace AsuraEngine  { diff --git a/source/libs/asura-lib-utils/filesystem/binding/data_buffer.binding.cpp b/source/libs/asura-lib-utils/filesystem/binding/data_buffer.binding.cpp index a9113a7..8e92eee 100644 --- a/source/libs/asura-lib-utils/filesystem/binding/data_buffer.binding.cpp +++ b/source/libs/asura-lib-utils/filesystem/binding/data_buffer.binding.cpp @@ -9,59 +9,101 @@ namespace AsuraEngine  		LUAX_REGISTRY(DataBuffer)  		{ -			luaL_Reg f[] = { +			LUAX_REGISTER_METHODS(state,   				{ "New", _New }, -				{ "SetContent", _SetContent }, -				{ "GetContent", _GetContent }, -				{ "GetContentLength", _GetContentLength }, -				{0, 0} -			}; - -			state.RegisterMethods(f); +				{ "GetBuffer", _GetBuffer }, +				{ "GetSize", _GetSize }, +				{ "Load", _Load }, +				{ "Clear", _Clear } +			);  		}  		LUAX_POSTPROCESS(DataBuffer)  		{ -  		} +		// databuffer = DataBuffer.New(lstring) +		// databuffer = DataBuffer.New(size)  		LUAX_IMPL_METHOD(DataBuffer, _New)  		{ +			LUAX_STATE(L); +			if (state.IsType(1, LUA_TSTRING)) +			{ +				byte* bytes; +				size_t size; +				lua_tolstring(L, 1, &size); +				DataBuffer* buffer = new DataBuffer(bytes, size); +				buffer->PushLuaxUserdata(state); +				return 1; +			} +			else if (state.IsType(1, LUA_TNUMBER)) +			{ +				size_t size = lua_tonumber(L, 1); +				DataBuffer* buffer = new DataBuffer(size); +				buffer->PushLuaxUserdata(state); +			} +			else +			{ +				return state.ErrorType(1, "number or string"); +			}  		} -		// SetContent(dataBuffer, lString) -		LUAX_IMPL_METHOD(DataBuffer, _SetContent) +		// lsting, len = databuffer:GetBuffer() +		LUAX_IMPL_METHOD(DataBuffer, _GetBuffer)  		{ -			LUAX_SETUP(L, "US"); -			// params:  -			// 1: data buffer  -			// 2: lstring  +			LUAX_SETUP(L, "U"); -			DataBuffer* self = state.GetLuaUserdata<DataBuffer>(1); -			size_t size = 0; -			const char* str = lua_tolstring(L, 2, &size); -			void* data = new char[size]; -			memcpy(data, str, size); -			self->SetContent(data, size); -			return 0; +			DataBuffer* self = state.GetUserdata<DataBuffer>(1); +			lua_pushlstring(L, self->GetBuffer(), self->GetSize()); +			return 2;  		} -		LUAX_IMPL_METHOD(DataBuffer, _GetContent) +		// length = databuffer:GetSize() +		LUAX_IMPL_METHOD(DataBuffer, _GetSize)  		{  			LUAX_SETUP(L, "U"); -			DataBuffer* self = state.GetLuaUserdata<DataBuffer>(1); -			lua_pushlstring(L, (const char*)self->data, self->size); +			DataBuffer* self = state.GetUserdata<DataBuffer>(1); +			lua_pushinteger(L, self->GetSize());  			return 1;  		} -		LUAX_IMPL_METHOD(DataBuffer, _GetContentLength) +		// databuffer:Load(lstring) +		// databuffer:Load(src) +		LUAX_IMPL_METHOD(DataBuffer, _Load) +		{ +			LUAX_STATE(L); + +			DataBuffer* buffer = state.GetUserdata<DataBuffer>(1);  +			const byte* data; +			size_t size; +			if (state.IsType(2, LUA_TSTRING)) +			{ +				data = lua_tolstring(L, 2, &size); +				buffer->Load(data, size); +				return 0; +			} +			else if(state.IsType(2, LUA_TUSERDATA)) +			{ +				DataBuffer* src = state.CheckUserdata<DataBuffer>(2); +				buffer->Load(*src); +				return 0; +			} +			else +			{ +				return state.ErrorType(1, "lstring or DataBuffer"); +			} +		} + +		// databuffer:Clear() +		LUAX_IMPL_METHOD(DataBuffer, _Clear)  		{  			LUAX_SETUP(L, "U"); -			DataBuffer* self = state.GetLuaUserdata<DataBuffer>(1); -			lua_pushinteger(L, self->size); -			return 1; + +			DataBuffer* self = state.GetUserdata<DataBuffer>(1); +			self->Clear();  +			return 0;  		}  	} diff --git a/source/libs/asura-lib-utils/filesystem/data_buffer.cpp b/source/libs/asura-lib-utils/filesystem/data_buffer.cpp index 629dc92..32a123f 100644 --- a/source/libs/asura-lib-utils/filesystem/data_buffer.cpp +++ b/source/libs/asura-lib-utils/filesystem/data_buffer.cpp @@ -1,3 +1,5 @@ +#include <cstdlib> +#include <cstring>  #include "data_buffer.h"  namespace AsuraEngine @@ -5,24 +7,60 @@ namespace AsuraEngine  	namespace Filesystem  	{ +		DataBuffer::DataBuffer(DataBuffer& src) +		{ +			Load(src); +		} + +		DataBuffer::DataBuffer(std::size_t size) +			: mSize(size) +			, mBytes(nullptr) +		{ +			mBytes = new byte[size]; +			memset(mBytes, 0, size); +		} +  		DataBuffer::DataBuffer(const void* data, std::size_t size) +			: mSize(size) +			, mBytes(nullptr)  		{ -			this->data = (const byte*)data; -			this->size = size;  +			Load(data, size);  		}  		DataBuffer::~DataBuffer()  		{ -			delete[] data; +			delete[] mBytes;  		} -		void DataBuffer::SetContent(const void* data, std::size_t siez) +		void DataBuffer::Load(DataBuffer& db)  		{ -			if (this->data != nullptr) -				delete[] this->data;  +			Load(db.GetBuffer(), db.GetSize()); +		} -			this->data = (const byte*)data; -			this->size = size;  +		void DataBuffer::Load(const void* data, std::size_t size) +		{ +			if (!mBytes || mSize != size) +			{ +				delete[] mBytes; +				mBytes = new byte[size]; +			} +			memcpy(mBytes, data, size); +		} + +		byte* DataBuffer::GetBuffer() +		{ +			return mBytes; +		} + +		void DataBuffer::Clear() +		{ +			if (mBytes) +				memset(mBytes, 0, mSize); +		} + +		std::size_t DataBuffer::GetSize() +		{ +			return mSize;  		}  	} diff --git a/source/libs/asura-lib-utils/filesystem/data_buffer.h b/source/libs/asura-lib-utils/filesystem/data_buffer.h index 4b013ed..5c80efb 100644 --- a/source/libs/asura-lib-utils/filesystem/data_buffer.h +++ b/source/libs/asura-lib-utils/filesystem/data_buffer.h @@ -3,7 +3,6 @@  #include <cstdlib> -#include "../scripting/Luax.hpp"  #include "../scripting/portable.hpp"  namespace AsuraEngine @@ -19,23 +18,34 @@ namespace AsuraEngine  		{  		public: -			DataBuffer(const void* data, std::size_t size); - +			DataBuffer(DataBuffer& src); +			DataBuffer(std::size_t size); +			DataBuffer(const void* bytes, std::size_t size);  			~DataBuffer(); -			void SetContent(const void* data, std::size_t siez); +			byte* GetBuffer(); +			size_t GetSize(); + +			void Load(DataBuffer& db); +			void Load(const void* bytes, std::size_t size); +			void Clear(); -			const byte* data; -			size_t size; +		private: -			//---------------------------------------------------------------------------------------------------------- +			byte* mBytes; +			size_t mSize; +			 +		//------------------------------------------------------------------------------------------------------------ + +		public:  			LUAX_DECL_FACTORY(DataBuffer);  			LUAX_DECL_METHOD(_New); -			LUAX_DECL_METHOD(_SetContent); -			LUAX_DECL_METHOD(_GetContent); -			LUAX_DECL_METHOD(_GetContentLength); +			LUAX_DECL_METHOD(_GetBuffer); +			LUAX_DECL_METHOD(_GetSize); +			LUAX_DECL_METHOD(_Load); +			LUAX_DECL_METHOD(_Clear);  		}; diff --git a/source/libs/asura-lib-utils/filesystem/resource_manager.h b/source/libs/asura-lib-utils/filesystem/resource_manager.h index c5d8f06..36d46cf 100644 --- a/source/libs/asura-lib-utils/filesystem/resource_manager.h +++ b/source/libs/asura-lib-utils/filesystem/resource_manager.h @@ -36,6 +36,10 @@ namespace AsuraEngine  			///  			void SaveFile(const std::string& path, const DataBuffer* buffer); +			//---------------------------------------------------------------------------------------------------------- + +			LUAX_DECL_SINGLETON(ResourceManager); +  		};  	} diff --git a/source/libs/asura-lib-utils/scripting/luax.hpp b/source/libs/asura-lib-utils/scripting/luax.hpp deleted file mode 100644 index cca26e2..0000000 --- a/source/libs/asura-lib-utils/scripting/luax.hpp +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __ASURA_ENGINE_LUAX_H__ -#define __ASURA_ENGINE_LUAX_H__ - -/// -/// Scripting with Lua. -/// -extern "C" { -#include <Lua51/lua.h> -#include <Lua51/lauxlib.h> -} -#include <Luax/luax.h> - -#endif
\ No newline at end of file diff --git a/source/libs/asura-lib-utils/scripting/portable.hpp b/source/libs/asura-lib-utils/scripting/portable.hpp index 7f780d1..00ede90 100644 --- a/source/libs/asura-lib-utils/scripting/portable.hpp +++ b/source/libs/asura-lib-utils/scripting/portable.hpp @@ -3,7 +3,12 @@  #include "../type.h" -#include "Luax.hpp" +extern "C"  +{ +	#include <Lua51/lua.h> +	#include <Lua51/lauxlib.h> +} +#include <Luax/luax.h>  namespace AsuraEngine  { diff --git a/source/libs/asura-lib-utils/type.h b/source/libs/asura-lib-utils/type.h index 25b52fe..72ed8cc 100644 --- a/source/libs/asura-lib-utils/type.h +++ b/source/libs/asura-lib-utils/type.h @@ -11,7 +11,8 @@ namespace AsuraEngine  	typedef int8_t   int8;  	typedef uint8_t  uint8; -	typedef uint8	   byte; +	//typedef uint8	   byte; +	typedef char	   byte;  	typedef int16_t  int16;  	typedef uint16_t uint16;  	typedef int32_t  int32; diff --git a/source/libs/asura-lib-utils/utils_module.cpp b/source/libs/asura-lib-utils/utils_module.cpp index 7fe3612..f025cac 100644 --- a/source/libs/asura-lib-utils/utils_module.cpp +++ b/source/libs/asura-lib-utils/utils_module.cpp @@ -9,12 +9,10 @@ namespace AsuraEngine  	void UtilsModule::Initialize(Luax::LuaxState& state)  	{  		LUAX_REGISTER_FACTORY(state, DataBuffer); -  	}  	void UtilsModule::Finalize(Luax::LuaxState& state)  	{ -  	}  }
\ No newline at end of file diff --git a/source/libs/asura-lib-utils/utils_module.h b/source/libs/asura-lib-utils/utils_module.h index 0b5d076..c4b046b 100644 --- a/source/libs/asura-lib-utils/utils_module.h +++ b/source/libs/asura-lib-utils/utils_module.h @@ -9,7 +9,7 @@ namespace AsuraEngine  	///  	/// Asuraģ  	/// -	class UtilsModule : public Module +	class UtilsModule ASURA_FINAL : public Module  	{  	public:  | 
