diff options
Diffstat (limited to 'Source/Asura.Engine')
29 files changed, 245 insertions, 339 deletions
diff --git a/Source/Asura.Engine/Factory.h b/Source/Asura.Engine/Factory.h index bc536d7..0ffaccf 100644 --- a/Source/Asura.Engine/Factory.h +++ b/Source/Asura.Engine/Factory.h @@ -4,11 +4,11 @@ namespace AsuraEngine { - class Factory - { + class Factory + { - }; + }; } - + #endif
\ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/Canvas.h b/Source/Asura.Engine/Graphics/Canvas.h index fab9cba..ca745ab 100644 --- a/Source/Asura.Engine/Graphics/Canvas.h +++ b/Source/Asura.Engine/Graphics/Canvas.h @@ -10,15 +10,15 @@ namespace AsuraEngine class Canvas : public Texture { - public: + public: - private: + private: - LUAX_DECL_FACTORY(SimCanvas); // AsuraEngine.SimCanvas + LUAX_DECL_FACTORY(SimCanvas); // AsuraEngine.SimCanvas - }; + }; } } diff --git a/Source/Asura.Engine/Graphics/Color.h b/Source/Asura.Engine/Graphics/Color.h index f07919c..f62f9b8 100644 --- a/Source/Asura.Engine/Graphics/Color.h +++ b/Source/Asura.Engine/Graphics/Color.h @@ -5,44 +5,44 @@ namespace AsuraEngine { - namespace Graphics - { + namespace Graphics + { - class Color; + class Color; - /// - /// 32bitsɫ - /// - class Color32 - { - public: + /// + /// 32bitsɫ + /// + class Color32 + { + public: - Color32(Color c); - Color32(byte r, byte g, byte b, byte a); + Color32(Color c); + Color32(byte r, byte g, byte b, byte a); - byte r, g, b, a; + byte r, g, b, a; - private: + private: - LUAX_DECL_FACTORY(Color32); + LUAX_DECL_FACTORY(Color32); - }; + }; - class Color - { - public: + class Color + { + public: - Color(Color32 c32); + Color(Color32 c32); - float r, g, b, a; + float r, g, b, a; - private: + private: - LUAX_DECL_FACTORY(Color); + LUAX_DECL_FACTORY(Color); - }; + }; - } + } } #endif
\ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/Image.h b/Source/Asura.Engine/Graphics/Image.h index e84dd6c..553df21 100644 --- a/Source/Asura.Engine/Graphics/Image.h +++ b/Source/Asura.Engine/Graphics/Image.h @@ -12,52 +12,52 @@ namespace AsuraEngine { - namespace Graphics - { + namespace Graphics + { - class ImageFactory; + class ImageFactory; - /// - /// ImageͼƬڴȡϷĽһImageڴ桢ԴֻᱣһݣҪ - /// imageêλãźתǶȣʹspriteһֻࡣ - /// - class Image final : public Texture - { - public: + /// + /// ImageͼƬڴȡϷĽһImageڴ桢ԴֻᱣһݣҪ + /// imageêλãźתǶȣʹspriteһֻࡣ + /// + class Image final : public Texture + { + public: - uint GetWidth(); - uint GetHeight(); + uint GetWidth(); + uint GetHeight(); - /// - /// ijһλõ - /// - Color GetPixel(uint x, uint y); + /// + /// ijһλõ + /// + Color GetPixel(uint x, uint y); - private: + private: - friend class ImageFactory; + friend class ImageFactory; - Image(Color* pixels, int width, int height); - ~Image(); + Image(Color* pixels, int width, int height); + ~Image(); - /// - /// СΪλ - /// - uint mWidth, mHeight; - Color* mPixels; + /// + /// СΪλ + /// + uint mWidth, mHeight; + Color* mPixels; /// /// ID /// uint mID; - //---------------------------------------------------------------------------------------------------- + //---------------------------------------------------------------------------------------------------- - LUAX_DECL_FACTORY(SimImage); //AsuraEngine.SimImage + LUAX_DECL_FACTORY(SimImage); //AsuraEngine.SimImage - }; + }; - } + } } #endif
\ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/Mesh2D.h b/Source/Asura.Engine/Graphics/Mesh2D.h index cff66c4..0d5113a 100644 --- a/Source/Asura.Engine/Graphics/Mesh2D.h +++ b/Source/Asura.Engine/Graphics/Mesh2D.h @@ -3,18 +3,18 @@ namespace AsuraEngine { - namespace Graphics - { + namespace Graphics + { - /// - /// 2D meshһЩ㶯 - /// - class Mesh2D - { + /// + /// 2D meshһЩ㶯 + /// + class Mesh2D + { - }; + }; - } + } } #endif
\ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/OpenGL.cpp b/Source/Asura.Engine/Graphics/OpenGL.cpp index ec23f52..dac2ea4 100644 --- a/Source/Asura.Engine/Graphics/OpenGL.cpp +++ b/Source/Asura.Engine/Graphics/OpenGL.cpp @@ -2,10 +2,10 @@ namespace AsuraEngine { - namespace Graphics - { + namespace Graphics + { - } + } }
\ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/OpenGL.h b/Source/Asura.Engine/Graphics/OpenGL.h index 34d662b..315c09b 100644 --- a/Source/Asura.Engine/Graphics/OpenGL.h +++ b/Source/Asura.Engine/Graphics/OpenGL.h @@ -3,15 +3,15 @@ namespace AsuraEngine { - namespace Graphics - { + namespace Graphics + { - class OpenGL - { + class OpenGL + { - }; + }; - } + } } #endif
\ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/Shader.h b/Source/Asura.Engine/Graphics/Shader.h index e15c6e0..e22fc66 100644 --- a/Source/Asura.Engine/Graphics/Shader.h +++ b/Source/Asura.Engine/Graphics/Shader.h @@ -11,56 +11,56 @@ namespace AsuraEngine { - namespace Graphics - { + namespace Graphics + { - class Material; + class Material; - /// - /// һshaderһڲʼ乲ijShaderuniformsͶݣֻuniforms location - /// - class Shader - { - public: + /// + /// һshaderһڲʼ乲ijShaderuniformsͶݣֻuniforms location + /// + class Shader + { + public: - Shader(); - ~Shader(); + Shader(); + ~Shader(); - private: + private: - friend class Material; + friend class Material; - /// - /// shaderuniformsIDӳ䡣 - /// - static StringMap<int> sUniformsID; + /// + /// shaderuniformsIDӳ䡣 + /// + static StringMap<int> sUniformsID; - /// - /// uniformID - /// - static int GetUniformID(const String& name); + /// + /// uniformID + /// + static int GetUniformID(const String& name); - /// - /// ñ - /// vec2 Asura_Time xֵΪ뵱ǰʼʱ䣬yֵΪһ֡ʱ - /// vec2 Asura_RenderTargetSize RTĴСΪλ - /// Texture Asura_MainTexture - /// - void SetBuiltInUniforms(); + /// + /// ñ + /// vec2 Asura_Time xֵΪ뵱ǰʼʱ䣬yֵΪһ֡ʱ + /// vec2 Asura_RenderTargetSize RTĴСΪλ + /// Texture Asura_MainTexture + /// + void SetBuiltInUniforms(); - /// - /// ӳuniforms IDlocation - /// - Map<int, int> mLocations; + /// + /// ӳuniforms IDlocation + /// + Map<int, int> mLocations; - }; + }; - class ShaderManager final : public Manager - { + class ShaderManager final : public Manager + { - }; + }; - } + } } #endif
\ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/SpriteBatch.h b/Source/Asura.Engine/Graphics/SpriteBatch.h index e69de29..17d5e75 100644 --- a/Source/Asura.Engine/Graphics/SpriteBatch.h +++ b/Source/Asura.Engine/Graphics/SpriteBatch.h @@ -0,0 +1,20 @@ +#ifndef __ASURA_ENGINE_SPRITE_BATCH_H__ +#define __ASURA_ENGINE_SPRITE_BATCH_H__ + +namespace AsuraEngine +{ + namespace Graphics + { + + /// + /// Sprite batchȾͼƬĵطϵͳ + /// + class SpriteBatch + { + + }; + + } +} + +#endif
\ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/Texture.h b/Source/Asura.Engine/Graphics/Texture.h index b50467a..db5c72e 100644 --- a/Source/Asura.Engine/Graphics/Texture.h +++ b/Source/Asura.Engine/Graphics/Texture.h @@ -6,18 +6,18 @@ namespace AsuraEngine { - namespace Graphics - { + namespace Graphics + { - /// - /// 2Dࣩ2d meshrender targetбʹ - /// - class Texture : public Object - { + /// + /// 2Dࣩ2d meshrender targetбʹ + /// + class Texture : public Object + { - }; + }; - } + } } #endif
\ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/Window.h b/Source/Asura.Engine/Graphics/Window.h index 0f6ca92..3a09266 100644 --- a/Source/Asura.Engine/Graphics/Window.h +++ b/Source/Asura.Engine/Graphics/Window.h @@ -3,23 +3,23 @@ namespace AsuraEngine { - namespace Graphics - { + namespace Graphics + { - /// - /// ڣֶ֧രڡڱ༭Ҫ֧֣runnerֻҪһڡ - /// - class Window - { - public: + /// + /// ڣֶ֧രڡڱ༭Ҫ֧֣runnerֻҪһڡ + /// + class Window + { + public: - private: + private: - }; + }; - } + } } #endif
\ No newline at end of file diff --git a/Source/Asura.Engine/Manager.hpp b/Source/Asura.Engine/Manager.hpp index fb32491..7b4e272 100644 --- a/Source/Asura.Engine/Manager.hpp +++ b/Source/Asura.Engine/Manager.hpp @@ -4,10 +4,10 @@ namespace AsuraEngine { - class Manager - { + class Manager + { - }; + }; } diff --git a/Source/Asura.Engine/Map.cpp b/Source/Asura.Engine/Map.cpp deleted file mode 100644 index e69de29..0000000 --- a/Source/Asura.Engine/Map.cpp +++ /dev/null diff --git a/Source/Asura.Engine/Map.h b/Source/Asura.Engine/Map.h deleted file mode 100644 index 3c538d4..0000000 --- a/Source/Asura.Engine/Map.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __ASURA_ENGINE_MAP_H__ -#define __ASURA_ENGINE_MAP_H__ - -#include <map> - -namespace AsuraEngine -{ - - template<typename key_type, typename value_type> - using Map = std::map<key_type, value_type>; - -} - -#endif
\ No newline at end of file diff --git a/Source/Asura.Engine/Math/Matrix44.h b/Source/Asura.Engine/Math/Matrix44.h index 2741430..4ab3c0b 100644 --- a/Source/Asura.Engine/Math/Matrix44.h +++ b/Source/Asura.Engine/Math/Matrix44.h @@ -3,22 +3,22 @@ namespace AsuraEngine { - namespace Math - { + namespace Math + { - /// - /// 4x4 - /// - class Matrix44 - { - public: + /// + /// 4x4 + /// + class Matrix44 + { + public: - private: - + private: + - }; + }; - } + } } #endif
\ No newline at end of file diff --git a/Source/Asura.Engine/Math/Vector2.h b/Source/Asura.Engine/Math/Vector2.h index 99fe71b..875cef3 100644 --- a/Source/Asura.Engine/Math/Vector2.h +++ b/Source/Asura.Engine/Math/Vector2.h @@ -3,15 +3,15 @@ namespace AsuraEngine { - namespace Math - { + namespace Math + { - class Vector2 - { + class Vector2 + { - }; + }; - } + } } #endif
\ No newline at end of file diff --git a/Source/Asura.Engine/Math/Vector3.h b/Source/Asura.Engine/Math/Vector3.h index f450527..f0e48e4 100644 --- a/Source/Asura.Engine/Math/Vector3.h +++ b/Source/Asura.Engine/Math/Vector3.h @@ -3,15 +3,15 @@ namespace AsuraEngine { - namespace Math - { + namespace Math + { - class Vector3 - { + class Vector3 + { - }; + }; - } + } } #endif
\ No newline at end of file diff --git a/Source/Asura.Engine/Math/Vector4.h b/Source/Asura.Engine/Math/Vector4.h index 818274e..3739f83 100644 --- a/Source/Asura.Engine/Math/Vector4.h +++ b/Source/Asura.Engine/Math/Vector4.h @@ -3,15 +3,15 @@ namespace AsuraEngine { - namespace Math - { + namespace Math + { - class Vector4 - { + class Vector4 + { - }; + }; - } + } } #endif
\ No newline at end of file diff --git a/Source/Asura.Engine/Object.cpp b/Source/Asura.Engine/Object.cpp index 587dca7..56fc164 100644 --- a/Source/Asura.Engine/Object.cpp +++ b/Source/Asura.Engine/Object.cpp @@ -3,21 +3,21 @@ namespace AsuraEngine { - Object::Object() - : mRC(0) - { + Object::Object() + : mRC(0) + { - } + } - void Object::Retain(Object* obj) - { - ++obj->mRC; - } + void Object::Retain(Object* obj) + { + ++obj->mRC; + } - void Object::Release(Object* obj) - { - if (--obj->mRC == 0) - delete obj; - } + void Object::Release(Object* obj) + { + if (--obj->mRC == 0) + delete obj; + } }
\ No newline at end of file diff --git a/Source/Asura.Engine/Object.h b/Source/Asura.Engine/Object.h index 7efe74b..40ea7fe 100644 --- a/Source/Asura.Engine/Object.h +++ b/Source/Asura.Engine/Object.h @@ -6,26 +6,26 @@ namespace AsuraEngine { - /// - /// - /// + /// + /// + /// class Object { - public: + public: - Object(); + Object(); - virtual ~Object(); + virtual ~Object(); - static void Retain(Object* obj); + static void Retain(Object* obj); - static void Release(Object* obj); + static void Release(Object* obj); - private: + private: - int mRC; // + int mRC; // - }; + }; } diff --git a/Source/Asura.Engine/Physics/World.h b/Source/Asura.Engine/Physics/World.h index 36b55a8..71984f5 100644 --- a/Source/Asura.Engine/Physics/World.h +++ b/Source/Asura.Engine/Physics/World.h @@ -6,20 +6,20 @@ namespace AsuraEngine { - namespace Physics - { + namespace Physics + { - class World - { - public: + class World + { + public: - private: + private: - LUAX_DECL_FACTORY(SimWorld); //AsuraEngine.SimWorld + LUAX_DECL_FACTORY(SimWorld); //AsuraEngine.SimWorld - }; + }; - } + } } #endif
\ No newline at end of file diff --git a/Source/Asura.Engine/Stack.cpp b/Source/Asura.Engine/Stack.cpp deleted file mode 100644 index e69de29..0000000 --- a/Source/Asura.Engine/Stack.cpp +++ /dev/null diff --git a/Source/Asura.Engine/Stack.h b/Source/Asura.Engine/Stack.h deleted file mode 100644 index f51017f..0000000 --- a/Source/Asura.Engine/Stack.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef __ASURA_ENGINE_STACK_H__ -#define __ASURA_ENGINE_STACK_H__ - -namespace AsuraEngine -{ - - - -} - -#endif
\ No newline at end of file diff --git a/Source/Asura.Engine/String.cpp b/Source/Asura.Engine/String.cpp deleted file mode 100644 index e69de29..0000000 --- a/Source/Asura.Engine/String.cpp +++ /dev/null diff --git a/Source/Asura.Engine/String.h b/Source/Asura.Engine/String.h deleted file mode 100644 index 6d0ec3a..0000000 --- a/Source/Asura.Engine/String.h +++ /dev/null @@ -1,75 +0,0 @@ -#ifndef __ASURA_ENGINE_STRING_H__ -#define __ASURA_ENGINE_STRING_H__ - -#include <string> - -namespace AsuraEngine -{ - - /// - /// װstd::string - /// - class String : public std::string - { - public: - inline String() - : std::string() - { - } - - inline String(const std::string& str) - : std::string(str) - { - } - - inline String(const String& str) - : std::string(str) - { - } - - inline String(const char* str) - : std::string(str) - { - } - - inline String& operator = (const String& str) - { - std::string::operator=(str); - return *this; - } - - inline operator const char* () const - { - return this->c_str(); - } - - inline const char* str() const - { - return this->c_str(); - } - - inline String(const String& s2, size_type pos2, size_type len2) - : std::string(s2, pos2, len2) - { - } - - inline String(const char* buf, size_type bufsize) - : std::string(buf, bufsize) - { - } - - inline String(size_type repetitions, char c) - : std::string(repetitions, c) - { - } - - inline int length() const - { - return size(); - } - - }; - -} - -#endif
\ No newline at end of file diff --git a/Source/Asura.Engine/StringMap.hpp b/Source/Asura.Engine/StringMap.hpp index 92a157f..971a890 100644 --- a/Source/Asura.Engine/StringMap.hpp +++ b/Source/Asura.Engine/StringMap.hpp @@ -6,23 +6,23 @@ namespace AsuraEngine { - /// - /// һ˫һһӦӳ䣬shader uniformsstatemathine state parameterID - /// - template<typename key_type> - class StringMap - { - public: + /// + /// һ˫һһӦӳ䣬shader uniformsstatemathine state parameterID + /// + template<typename key_type> + class StringMap + { + public: - bool ContainsKey(const key_type& key); + bool ContainsKey(const key_type& key); - bool ContainsString(const String& str); + bool ContainsString(const String& str); - String GetStringByKey(const key_type& key); + String GetStringByKey(const key_type& key); - key_type GetKeyByString(const String& str); + key_type GetKeyByString(const String& str); - }; + }; } diff --git a/Source/Asura.Engine/Type.h b/Source/Asura.Engine/Type.h index 36ee9e7..5159ee2 100644 --- a/Source/Asura.Engine/Type.h +++ b/Source/Asura.Engine/Type.h @@ -6,18 +6,18 @@ namespace AsuraEngine { - typedef int8_t int8; - typedef uint8_t uint8; - typedef uint8 byte; - typedef int16_t int16; - typedef uint16_t uint16; - typedef int32_t int32; - typedef uint32_t uint32; - typedef int64_t int64; - typedef uint64_t uint64; + typedef int8_t int8; + typedef uint8_t uint8; + typedef uint8 byte; + typedef int16_t int16; + typedef uint16_t uint16; + typedef int32_t int32; + typedef uint32_t uint32; + typedef int64_t int64; + typedef uint64_t uint64; - typedef uint32_t uint; - typedef int32_t sint; + typedef uint32_t uint; + typedef int32_t sint; } diff --git a/Source/Asura.Engine/UnorderedMap.hpp b/Source/Asura.Engine/UnorderedMap.hpp deleted file mode 100644 index e69de29..0000000 --- a/Source/Asura.Engine/UnorderedMap.hpp +++ /dev/null diff --git a/Source/Asura.Engine/Vector.hpp b/Source/Asura.Engine/Vector.hpp deleted file mode 100644 index 5e35312..0000000 --- a/Source/Asura.Engine/Vector.hpp +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __ASURA_ENGINE_VECTOR_HPP__ -#define __ASURA_ENGINE_VECTOR_HPP__ - -#include <vector> - -namespace AsuraEngine -{ - - template<typename T> - using Vector = std::vector<T>; - -} - -#endif
\ No newline at end of file |