From 91e589d1678a8187c307e09b98b67ec4133092ff Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 19 Jan 2019 01:44:05 +0800 Subject: =?UTF-8?q?*=E6=B8=B8=E6=88=8F=E6=A1=86=E6=9E=B6=E6=94=B9=E7=94=A8?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/Asura.Editor/main.cpp | 0 Source/Asura.Engine/AI/BehaviorTree.cpp | 0 Source/Asura.Engine/AI/BehaviorTree.h | 0 Source/Asura.Engine/AI/StateMachine.cpp | 0 Source/Asura.Engine/AI/StateMachine.h | 33 ++++ Source/Asura.Engine/AI/StateMap.cpp | 0 Source/Asura.Engine/AI/StateMap.h | 25 +++ Source/Asura.Engine/Asura.h | 6 + Source/Asura.Engine/Audio/Sound.cpp | 0 Source/Asura.Engine/Audio/Sound.h | 0 Source/Asura.Engine/Audio/Source.cpp | 0 Source/Asura.Engine/Audio/Source.h | 0 Source/Asura.Engine/Component.cpp | 0 Source/Asura.Engine/Component.h | 43 +++++ Source/Asura.Engine/Containers/Map.cpp | 0 Source/Asura.Engine/Containers/Map.h | 17 ++ Source/Asura.Engine/Containers/Stack.cpp | 0 Source/Asura.Engine/Containers/Stack.h | 0 Source/Asura.Engine/Containers/String.cpp | 0 Source/Asura.Engine/Containers/String.h | 78 +++++++++ Source/Asura.Engine/Containers/StringMap.cpp | 0 Source/Asura.Engine/Containers/StringMap.hpp | 32 ++++ Source/Asura.Engine/Containers/UnorderedMap.hpp | 0 Source/Asura.Engine/Containers/Vector.hpp | 16 ++ Source/Asura.Engine/Exceptions/Exception.cpp | 0 Source/Asura.Engine/Exceptions/Exception.h | 0 Source/Asura.Engine/Factory.h | 14 ++ Source/Asura.Engine/FileSystem/AnimationImpoter.h | 20 +++ Source/Asura.Engine/FileSystem/Asset.cpp | 0 Source/Asura.Engine/FileSystem/Asset.h | 22 +++ Source/Asura.Engine/FileSystem/ImageImpoter.h | 20 +++ Source/Asura.Engine/FileSystem/Importer.h | 17 ++ .../FileSystem/ParticleSystemImpoter.h | 20 +++ Source/Asura.Engine/FileSystem/SpriteImpoter.h | 20 +++ Source/Asura.Engine/Font/TrueTypeFont.cpp | 0 Source/Asura.Engine/Font/TrueTypeFont.h | 0 Source/Asura.Engine/GUI/Button.cpp | 0 Source/Asura.Engine/GUI/README.md | 1 + Source/Asura.Engine/GameObject.cpp | 11 ++ Source/Asura.Engine/GameObject.h | 56 ++++++ Source/Asura.Engine/Graphics/Animation.cpp | 21 +++ Source/Asura.Engine/Graphics/Animation.h | 128 ++++++++++++++ Source/Asura.Engine/Graphics/Animator.cpp | 0 Source/Asura.Engine/Graphics/Animator.h | 96 +++++++++++ Source/Asura.Engine/Graphics/Camera.cpp | 0 Source/Asura.Engine/Graphics/Camera.h | 42 +++++ Source/Asura.Engine/Graphics/Canvas.cpp | 0 Source/Asura.Engine/Graphics/Canvas.h | 20 +++ Source/Asura.Engine/Graphics/CanvasRenderer.cpp | 0 Source/Asura.Engine/Graphics/CanvasRenderer.h | 30 ++++ Source/Asura.Engine/Graphics/Color.cpp | 0 Source/Asura.Engine/Graphics/Color.h | 30 ++++ Source/Asura.Engine/Graphics/Image.cpp | 0 Source/Asura.Engine/Graphics/Image.h | 119 +++++++++++++ Source/Asura.Engine/Graphics/Material.cpp | 18 ++ Source/Asura.Engine/Graphics/Material.h | 189 +++++++++++++++++++++ Source/Asura.Engine/Graphics/Mesh2D.cpp | 0 Source/Asura.Engine/Graphics/Mesh2D.h | 20 +++ Source/Asura.Engine/Graphics/Mesh2DRenderer.cpp | 0 Source/Asura.Engine/Graphics/Mesh2DRenderer.h | 19 +++ Source/Asura.Engine/Graphics/OpenGL.cpp | 11 ++ Source/Asura.Engine/Graphics/OpenGL.h | 17 ++ Source/Asura.Engine/Graphics/ParticleSystem.cpp | 0 Source/Asura.Engine/Graphics/ParticleSystem.h | 22 +++ Source/Asura.Engine/Graphics/Prefab.cpp | 0 Source/Asura.Engine/Graphics/Prefab.h | 30 ++++ Source/Asura.Engine/Graphics/Renderer.cpp | 0 Source/Asura.Engine/Graphics/Renderer.h | 39 +++++ Source/Asura.Engine/Graphics/Shader.cpp | 0 Source/Asura.Engine/Graphics/Shader.h | 67 ++++++++ Source/Asura.Engine/Graphics/ShapeRenderer.cpp | 0 Source/Asura.Engine/Graphics/ShapeRenderer.h | 0 Source/Asura.Engine/Graphics/Sprite.cpp | 0 Source/Asura.Engine/Graphics/Sprite.h | 71 ++++++++ Source/Asura.Engine/Graphics/SpriteBatch.cpp | 0 Source/Asura.Engine/Graphics/SpriteBatch.h | 0 Source/Asura.Engine/Graphics/SpriteRenderer.cpp | 0 Source/Asura.Engine/Graphics/SpriteRenderer.h | 32 ++++ Source/Asura.Engine/Graphics/Texture.cpp | 0 Source/Asura.Engine/Graphics/Texture.h | 22 +++ Source/Asura.Engine/Input/Keyboard.cpp | 0 Source/Asura.Engine/Input/Keyboard.h | 0 Source/Asura.Engine/Layer.cpp | 0 Source/Asura.Engine/Layer.h | 0 Source/Asura.Engine/Manager.hpp | 14 ++ Source/Asura.Engine/Math/Curve.cpp | 0 Source/Asura.Engine/Math/Curve.h | 0 Source/Asura.Engine/Math/Functions.cpp | 0 Source/Asura.Engine/Math/Functions.h | 0 Source/Asura.Engine/Math/Matrix44.cpp | 0 Source/Asura.Engine/Math/Matrix44.h | 24 +++ Source/Asura.Engine/Math/RangedValue.cpp | 0 Source/Asura.Engine/Math/RangedValue.h | 0 Source/Asura.Engine/Math/Vector2.cpp | 0 Source/Asura.Engine/Math/Vector2.h | 17 ++ Source/Asura.Engine/Math/Vector3.cpp | 0 Source/Asura.Engine/Math/Vector3.h | 17 ++ Source/Asura.Engine/Math/Vector4.cpp | 0 Source/Asura.Engine/Math/Vector4.h | 17 ++ Source/Asura.Engine/Object.cpp | 23 +++ Source/Asura.Engine/Object.h | 32 ++++ Source/Asura.Engine/ObjectPool.cpp | 0 Source/Asura.Engine/ObjectPool.h | 14 ++ Source/Asura.Engine/Physics/World.h | 14 ++ Source/Asura.Engine/Profiler/Stats.cpp | 0 Source/Asura.Engine/Profiler/Stats.h | 0 Source/Asura.Engine/Scene.cpp | 0 Source/Asura.Engine/Scene.h | 28 +++ Source/Asura.Engine/Scripting/Luax.hpp | 8 + Source/Asura.Engine/Time/Timer.cpp | 0 Source/Asura.Engine/Time/Timer.h | 0 Source/Asura.Engine/Transform.cpp | 0 Source/Asura.Engine/Transform.h | 24 +++ Source/Asura.Engine/Type.h | 24 +++ Source/Asura.Framework/Component.lua | 9 + Source/Asura.Framework/GameObject.lua | 0 Source/Asura.Framework/Graphics/Animator.lua | 7 + Source/Asura.Framework/Graphics/Camera.lua | 9 + Source/Asura.Framework/Graphics/CanvasRenderer.lua | 0 Source/Asura.Framework/Graphics/Mesh2DRenderer.lua | 0 Source/Asura.Framework/Graphics/ParticleSystem.lua | 0 Source/Asura.Framework/Graphics/Renderer.lua | 0 Source/Asura.Framework/Graphics/ShapeRenderer.lua | 0 .../Graphics/SpriteBatchRenderer.lua | 0 Source/Asura.Framework/Graphics/SpriteRenderer.lua | 0 Source/Asura.Framework/Object.lua | 0 Source/Asura.Framework/README.md | 3 + Source/Asura.Framework/Scene.lua | 0 Source/Asura.Framework/Transform.lua | 0 Source/Asura.Runner/AE_Compressor.cpp | 17 ++ Source/Asura.Runner/Scripts/main.lua | 0 Source/Asura.Runner/main.cpp | 6 + Source/Asura/AI/BehaviorTree.cpp | 0 Source/Asura/AI/BehaviorTree.h | 0 Source/Asura/AI/StateMachine.cpp | 0 Source/Asura/AI/StateMachine.h | 33 ---- Source/Asura/AI/StateMap.cpp | 0 Source/Asura/AI/StateMap.h | 25 --- Source/Asura/Asura.h | 6 - Source/Asura/Audio/Sound.cpp | 0 Source/Asura/Audio/Sound.h | 0 Source/Asura/Audio/Source.cpp | 0 Source/Asura/Audio/Source.h | 0 Source/Asura/Component.cpp | 0 Source/Asura/Component.h | 43 ----- Source/Asura/Containers/Map.cpp | 0 Source/Asura/Containers/Map.h | 17 -- Source/Asura/Containers/Stack.cpp | 0 Source/Asura/Containers/Stack.h | 0 Source/Asura/Containers/String.cpp | 0 Source/Asura/Containers/String.h | 78 --------- Source/Asura/Containers/StringMap.cpp | 0 Source/Asura/Containers/StringMap.hpp | 32 ---- Source/Asura/Containers/UnorderedMap.hpp | 0 Source/Asura/Containers/Vector.hpp | 16 -- Source/Asura/Exceptions/Exception.cpp | 0 Source/Asura/Exceptions/Exception.h | 0 Source/Asura/Factory.h | 14 -- Source/Asura/FileSystem/AnimationImpoter.h | 20 --- Source/Asura/FileSystem/Asset.cpp | 0 Source/Asura/FileSystem/Asset.h | 22 --- Source/Asura/FileSystem/ImageImpoter.h | 20 --- Source/Asura/FileSystem/Importer.h | 17 -- Source/Asura/FileSystem/ParticleSystemImpoter.h | 20 --- Source/Asura/FileSystem/SpriteImpoter.h | 20 --- Source/Asura/Font/TrueTypeFont.cpp | 0 Source/Asura/Font/TrueTypeFont.h | 0 Source/Asura/GUI/Button.cpp | 0 Source/Asura/GUI/README.md | 1 - Source/Asura/GameObject.cpp | 11 -- Source/Asura/GameObject.h | 56 ------ Source/Asura/Graphics/Animation.cpp | 21 --- Source/Asura/Graphics/Animation.h | 128 -------------- Source/Asura/Graphics/Animator.cpp | 0 Source/Asura/Graphics/Animator.h | 96 ----------- Source/Asura/Graphics/Camera.cpp | 0 Source/Asura/Graphics/Camera.h | 42 ----- Source/Asura/Graphics/Canvas.cpp | 0 Source/Asura/Graphics/Canvas.h | 20 --- Source/Asura/Graphics/CanvasRenderer.cpp | 0 Source/Asura/Graphics/CanvasRenderer.h | 30 ---- Source/Asura/Graphics/Color.cpp | 0 Source/Asura/Graphics/Color.h | 30 ---- Source/Asura/Graphics/Image.cpp | 0 Source/Asura/Graphics/Image.h | 119 ------------- Source/Asura/Graphics/Material.cpp | 18 -- Source/Asura/Graphics/Material.h | 189 --------------------- Source/Asura/Graphics/Mesh2D.cpp | 0 Source/Asura/Graphics/Mesh2D.h | 20 --- Source/Asura/Graphics/Mesh2DRenderer.cpp | 0 Source/Asura/Graphics/Mesh2DRenderer.h | 19 --- Source/Asura/Graphics/OpenGL.cpp | 11 -- Source/Asura/Graphics/OpenGL.h | 17 -- Source/Asura/Graphics/ParticleSystem.cpp | 0 Source/Asura/Graphics/ParticleSystem.h | 22 --- Source/Asura/Graphics/Prefab.cpp | 0 Source/Asura/Graphics/Prefab.h | 30 ---- Source/Asura/Graphics/Renderer.cpp | 0 Source/Asura/Graphics/Renderer.h | 39 ----- Source/Asura/Graphics/Shader.cpp | 0 Source/Asura/Graphics/Shader.h | 67 -------- Source/Asura/Graphics/ShapeRenderer.cpp | 0 Source/Asura/Graphics/ShapeRenderer.h | 0 Source/Asura/Graphics/Sprite.cpp | 0 Source/Asura/Graphics/Sprite.h | 71 -------- Source/Asura/Graphics/SpriteBatch.cpp | 0 Source/Asura/Graphics/SpriteBatch.h | 0 Source/Asura/Graphics/SpriteRenderer.cpp | 0 Source/Asura/Graphics/SpriteRenderer.h | 32 ---- Source/Asura/Graphics/Texture.cpp | 0 Source/Asura/Graphics/Texture.h | 22 --- Source/Asura/Input/Keyboard.cpp | 0 Source/Asura/Input/Keyboard.h | 0 Source/Asura/Layer.cpp | 0 Source/Asura/Layer.h | 0 Source/Asura/Manager.hpp | 14 -- Source/Asura/Math/Curve.cpp | 0 Source/Asura/Math/Curve.h | 0 Source/Asura/Math/Functions.cpp | 0 Source/Asura/Math/Functions.h | 0 Source/Asura/Math/Matrix44.cpp | 0 Source/Asura/Math/Matrix44.h | 24 --- Source/Asura/Math/RangedValue.cpp | 0 Source/Asura/Math/RangedValue.h | 0 Source/Asura/Math/Vector2.cpp | 0 Source/Asura/Math/Vector2.h | 17 -- Source/Asura/Math/Vector3.cpp | 0 Source/Asura/Math/Vector3.h | 17 -- Source/Asura/Math/Vector4.cpp | 0 Source/Asura/Math/Vector4.h | 17 -- Source/Asura/Object.cpp | 23 --- Source/Asura/Object.h | 32 ---- Source/Asura/ObjectPool.cpp | 0 Source/Asura/ObjectPool.h | 14 -- Source/Asura/Physics/World.h | 14 -- Source/Asura/Profiler/Stats.cpp | 0 Source/Asura/Profiler/Stats.h | 0 Source/Asura/Scene.cpp | 0 Source/Asura/Scene.h | 28 --- Source/Asura/Scripting/Luax.hpp | 8 - Source/Asura/Time/Timer.cpp | 0 Source/Asura/Time/Timer.h | 0 Source/Asura/Transform.cpp | 0 Source/Asura/Transform.h | 24 --- Source/Asura/Type.h | 24 --- Source/Editor/main.cpp | 0 Source/Runner/AE_Compressor.cpp | 17 -- Source/Runner/Scripts/main.lua | 0 Source/Runner/main.cpp | 6 - 249 files changed, 1801 insertions(+), 1773 deletions(-) create mode 100644 Source/Asura.Editor/main.cpp create mode 100644 Source/Asura.Engine/AI/BehaviorTree.cpp create mode 100644 Source/Asura.Engine/AI/BehaviorTree.h create mode 100644 Source/Asura.Engine/AI/StateMachine.cpp create mode 100644 Source/Asura.Engine/AI/StateMachine.h create mode 100644 Source/Asura.Engine/AI/StateMap.cpp create mode 100644 Source/Asura.Engine/AI/StateMap.h create mode 100644 Source/Asura.Engine/Asura.h create mode 100644 Source/Asura.Engine/Audio/Sound.cpp create mode 100644 Source/Asura.Engine/Audio/Sound.h create mode 100644 Source/Asura.Engine/Audio/Source.cpp create mode 100644 Source/Asura.Engine/Audio/Source.h create mode 100644 Source/Asura.Engine/Component.cpp create mode 100644 Source/Asura.Engine/Component.h create mode 100644 Source/Asura.Engine/Containers/Map.cpp create mode 100644 Source/Asura.Engine/Containers/Map.h create mode 100644 Source/Asura.Engine/Containers/Stack.cpp create mode 100644 Source/Asura.Engine/Containers/Stack.h create mode 100644 Source/Asura.Engine/Containers/String.cpp create mode 100644 Source/Asura.Engine/Containers/String.h create mode 100644 Source/Asura.Engine/Containers/StringMap.cpp create mode 100644 Source/Asura.Engine/Containers/StringMap.hpp create mode 100644 Source/Asura.Engine/Containers/UnorderedMap.hpp create mode 100644 Source/Asura.Engine/Containers/Vector.hpp create mode 100644 Source/Asura.Engine/Exceptions/Exception.cpp create mode 100644 Source/Asura.Engine/Exceptions/Exception.h create mode 100644 Source/Asura.Engine/Factory.h create mode 100644 Source/Asura.Engine/FileSystem/AnimationImpoter.h create mode 100644 Source/Asura.Engine/FileSystem/Asset.cpp create mode 100644 Source/Asura.Engine/FileSystem/Asset.h create mode 100644 Source/Asura.Engine/FileSystem/ImageImpoter.h create mode 100644 Source/Asura.Engine/FileSystem/Importer.h create mode 100644 Source/Asura.Engine/FileSystem/ParticleSystemImpoter.h create mode 100644 Source/Asura.Engine/FileSystem/SpriteImpoter.h create mode 100644 Source/Asura.Engine/Font/TrueTypeFont.cpp create mode 100644 Source/Asura.Engine/Font/TrueTypeFont.h create mode 100644 Source/Asura.Engine/GUI/Button.cpp create mode 100644 Source/Asura.Engine/GUI/README.md create mode 100644 Source/Asura.Engine/GameObject.cpp create mode 100644 Source/Asura.Engine/GameObject.h create mode 100644 Source/Asura.Engine/Graphics/Animation.cpp create mode 100644 Source/Asura.Engine/Graphics/Animation.h create mode 100644 Source/Asura.Engine/Graphics/Animator.cpp create mode 100644 Source/Asura.Engine/Graphics/Animator.h create mode 100644 Source/Asura.Engine/Graphics/Camera.cpp create mode 100644 Source/Asura.Engine/Graphics/Camera.h create mode 100644 Source/Asura.Engine/Graphics/Canvas.cpp create mode 100644 Source/Asura.Engine/Graphics/Canvas.h create mode 100644 Source/Asura.Engine/Graphics/CanvasRenderer.cpp create mode 100644 Source/Asura.Engine/Graphics/CanvasRenderer.h create mode 100644 Source/Asura.Engine/Graphics/Color.cpp create mode 100644 Source/Asura.Engine/Graphics/Color.h create mode 100644 Source/Asura.Engine/Graphics/Image.cpp create mode 100644 Source/Asura.Engine/Graphics/Image.h create mode 100644 Source/Asura.Engine/Graphics/Material.cpp create mode 100644 Source/Asura.Engine/Graphics/Material.h create mode 100644 Source/Asura.Engine/Graphics/Mesh2D.cpp create mode 100644 Source/Asura.Engine/Graphics/Mesh2D.h create mode 100644 Source/Asura.Engine/Graphics/Mesh2DRenderer.cpp create mode 100644 Source/Asura.Engine/Graphics/Mesh2DRenderer.h create mode 100644 Source/Asura.Engine/Graphics/OpenGL.cpp create mode 100644 Source/Asura.Engine/Graphics/OpenGL.h create mode 100644 Source/Asura.Engine/Graphics/ParticleSystem.cpp create mode 100644 Source/Asura.Engine/Graphics/ParticleSystem.h create mode 100644 Source/Asura.Engine/Graphics/Prefab.cpp create mode 100644 Source/Asura.Engine/Graphics/Prefab.h create mode 100644 Source/Asura.Engine/Graphics/Renderer.cpp create mode 100644 Source/Asura.Engine/Graphics/Renderer.h create mode 100644 Source/Asura.Engine/Graphics/Shader.cpp create mode 100644 Source/Asura.Engine/Graphics/Shader.h create mode 100644 Source/Asura.Engine/Graphics/ShapeRenderer.cpp create mode 100644 Source/Asura.Engine/Graphics/ShapeRenderer.h create mode 100644 Source/Asura.Engine/Graphics/Sprite.cpp create mode 100644 Source/Asura.Engine/Graphics/Sprite.h create mode 100644 Source/Asura.Engine/Graphics/SpriteBatch.cpp create mode 100644 Source/Asura.Engine/Graphics/SpriteBatch.h create mode 100644 Source/Asura.Engine/Graphics/SpriteRenderer.cpp create mode 100644 Source/Asura.Engine/Graphics/SpriteRenderer.h create mode 100644 Source/Asura.Engine/Graphics/Texture.cpp create mode 100644 Source/Asura.Engine/Graphics/Texture.h create mode 100644 Source/Asura.Engine/Input/Keyboard.cpp create mode 100644 Source/Asura.Engine/Input/Keyboard.h create mode 100644 Source/Asura.Engine/Layer.cpp create mode 100644 Source/Asura.Engine/Layer.h create mode 100644 Source/Asura.Engine/Manager.hpp create mode 100644 Source/Asura.Engine/Math/Curve.cpp create mode 100644 Source/Asura.Engine/Math/Curve.h create mode 100644 Source/Asura.Engine/Math/Functions.cpp create mode 100644 Source/Asura.Engine/Math/Functions.h create mode 100644 Source/Asura.Engine/Math/Matrix44.cpp create mode 100644 Source/Asura.Engine/Math/Matrix44.h create mode 100644 Source/Asura.Engine/Math/RangedValue.cpp create mode 100644 Source/Asura.Engine/Math/RangedValue.h create mode 100644 Source/Asura.Engine/Math/Vector2.cpp create mode 100644 Source/Asura.Engine/Math/Vector2.h create mode 100644 Source/Asura.Engine/Math/Vector3.cpp create mode 100644 Source/Asura.Engine/Math/Vector3.h create mode 100644 Source/Asura.Engine/Math/Vector4.cpp create mode 100644 Source/Asura.Engine/Math/Vector4.h create mode 100644 Source/Asura.Engine/Object.cpp create mode 100644 Source/Asura.Engine/Object.h create mode 100644 Source/Asura.Engine/ObjectPool.cpp create mode 100644 Source/Asura.Engine/ObjectPool.h create mode 100644 Source/Asura.Engine/Physics/World.h create mode 100644 Source/Asura.Engine/Profiler/Stats.cpp create mode 100644 Source/Asura.Engine/Profiler/Stats.h create mode 100644 Source/Asura.Engine/Scene.cpp create mode 100644 Source/Asura.Engine/Scene.h create mode 100644 Source/Asura.Engine/Scripting/Luax.hpp create mode 100644 Source/Asura.Engine/Time/Timer.cpp create mode 100644 Source/Asura.Engine/Time/Timer.h create mode 100644 Source/Asura.Engine/Transform.cpp create mode 100644 Source/Asura.Engine/Transform.h create mode 100644 Source/Asura.Engine/Type.h create mode 100644 Source/Asura.Framework/Component.lua create mode 100644 Source/Asura.Framework/GameObject.lua create mode 100644 Source/Asura.Framework/Graphics/Animator.lua create mode 100644 Source/Asura.Framework/Graphics/Camera.lua create mode 100644 Source/Asura.Framework/Graphics/CanvasRenderer.lua create mode 100644 Source/Asura.Framework/Graphics/Mesh2DRenderer.lua create mode 100644 Source/Asura.Framework/Graphics/ParticleSystem.lua create mode 100644 Source/Asura.Framework/Graphics/Renderer.lua create mode 100644 Source/Asura.Framework/Graphics/ShapeRenderer.lua create mode 100644 Source/Asura.Framework/Graphics/SpriteBatchRenderer.lua create mode 100644 Source/Asura.Framework/Graphics/SpriteRenderer.lua create mode 100644 Source/Asura.Framework/Object.lua create mode 100644 Source/Asura.Framework/README.md create mode 100644 Source/Asura.Framework/Scene.lua create mode 100644 Source/Asura.Framework/Transform.lua create mode 100644 Source/Asura.Runner/AE_Compressor.cpp create mode 100644 Source/Asura.Runner/Scripts/main.lua create mode 100644 Source/Asura.Runner/main.cpp delete mode 100644 Source/Asura/AI/BehaviorTree.cpp delete mode 100644 Source/Asura/AI/BehaviorTree.h delete mode 100644 Source/Asura/AI/StateMachine.cpp delete mode 100644 Source/Asura/AI/StateMachine.h delete mode 100644 Source/Asura/AI/StateMap.cpp delete mode 100644 Source/Asura/AI/StateMap.h delete mode 100644 Source/Asura/Asura.h delete mode 100644 Source/Asura/Audio/Sound.cpp delete mode 100644 Source/Asura/Audio/Sound.h delete mode 100644 Source/Asura/Audio/Source.cpp delete mode 100644 Source/Asura/Audio/Source.h delete mode 100644 Source/Asura/Component.cpp delete mode 100644 Source/Asura/Component.h delete mode 100644 Source/Asura/Containers/Map.cpp delete mode 100644 Source/Asura/Containers/Map.h delete mode 100644 Source/Asura/Containers/Stack.cpp delete mode 100644 Source/Asura/Containers/Stack.h delete mode 100644 Source/Asura/Containers/String.cpp delete mode 100644 Source/Asura/Containers/String.h delete mode 100644 Source/Asura/Containers/StringMap.cpp delete mode 100644 Source/Asura/Containers/StringMap.hpp delete mode 100644 Source/Asura/Containers/UnorderedMap.hpp delete mode 100644 Source/Asura/Containers/Vector.hpp delete mode 100644 Source/Asura/Exceptions/Exception.cpp delete mode 100644 Source/Asura/Exceptions/Exception.h delete mode 100644 Source/Asura/Factory.h delete mode 100644 Source/Asura/FileSystem/AnimationImpoter.h delete mode 100644 Source/Asura/FileSystem/Asset.cpp delete mode 100644 Source/Asura/FileSystem/Asset.h delete mode 100644 Source/Asura/FileSystem/ImageImpoter.h delete mode 100644 Source/Asura/FileSystem/Importer.h delete mode 100644 Source/Asura/FileSystem/ParticleSystemImpoter.h delete mode 100644 Source/Asura/FileSystem/SpriteImpoter.h delete mode 100644 Source/Asura/Font/TrueTypeFont.cpp delete mode 100644 Source/Asura/Font/TrueTypeFont.h delete mode 100644 Source/Asura/GUI/Button.cpp delete mode 100644 Source/Asura/GUI/README.md delete mode 100644 Source/Asura/GameObject.cpp delete mode 100644 Source/Asura/GameObject.h delete mode 100644 Source/Asura/Graphics/Animation.cpp delete mode 100644 Source/Asura/Graphics/Animation.h delete mode 100644 Source/Asura/Graphics/Animator.cpp delete mode 100644 Source/Asura/Graphics/Animator.h delete mode 100644 Source/Asura/Graphics/Camera.cpp delete mode 100644 Source/Asura/Graphics/Camera.h delete mode 100644 Source/Asura/Graphics/Canvas.cpp delete mode 100644 Source/Asura/Graphics/Canvas.h delete mode 100644 Source/Asura/Graphics/CanvasRenderer.cpp delete mode 100644 Source/Asura/Graphics/CanvasRenderer.h delete mode 100644 Source/Asura/Graphics/Color.cpp delete mode 100644 Source/Asura/Graphics/Color.h delete mode 100644 Source/Asura/Graphics/Image.cpp delete mode 100644 Source/Asura/Graphics/Image.h delete mode 100644 Source/Asura/Graphics/Material.cpp delete mode 100644 Source/Asura/Graphics/Material.h delete mode 100644 Source/Asura/Graphics/Mesh2D.cpp delete mode 100644 Source/Asura/Graphics/Mesh2D.h delete mode 100644 Source/Asura/Graphics/Mesh2DRenderer.cpp delete mode 100644 Source/Asura/Graphics/Mesh2DRenderer.h delete mode 100644 Source/Asura/Graphics/OpenGL.cpp delete mode 100644 Source/Asura/Graphics/OpenGL.h delete mode 100644 Source/Asura/Graphics/ParticleSystem.cpp delete mode 100644 Source/Asura/Graphics/ParticleSystem.h delete mode 100644 Source/Asura/Graphics/Prefab.cpp delete mode 100644 Source/Asura/Graphics/Prefab.h delete mode 100644 Source/Asura/Graphics/Renderer.cpp delete mode 100644 Source/Asura/Graphics/Renderer.h delete mode 100644 Source/Asura/Graphics/Shader.cpp delete mode 100644 Source/Asura/Graphics/Shader.h delete mode 100644 Source/Asura/Graphics/ShapeRenderer.cpp delete mode 100644 Source/Asura/Graphics/ShapeRenderer.h delete mode 100644 Source/Asura/Graphics/Sprite.cpp delete mode 100644 Source/Asura/Graphics/Sprite.h delete mode 100644 Source/Asura/Graphics/SpriteBatch.cpp delete mode 100644 Source/Asura/Graphics/SpriteBatch.h delete mode 100644 Source/Asura/Graphics/SpriteRenderer.cpp delete mode 100644 Source/Asura/Graphics/SpriteRenderer.h delete mode 100644 Source/Asura/Graphics/Texture.cpp delete mode 100644 Source/Asura/Graphics/Texture.h delete mode 100644 Source/Asura/Input/Keyboard.cpp delete mode 100644 Source/Asura/Input/Keyboard.h delete mode 100644 Source/Asura/Layer.cpp delete mode 100644 Source/Asura/Layer.h delete mode 100644 Source/Asura/Manager.hpp delete mode 100644 Source/Asura/Math/Curve.cpp delete mode 100644 Source/Asura/Math/Curve.h delete mode 100644 Source/Asura/Math/Functions.cpp delete mode 100644 Source/Asura/Math/Functions.h delete mode 100644 Source/Asura/Math/Matrix44.cpp delete mode 100644 Source/Asura/Math/Matrix44.h delete mode 100644 Source/Asura/Math/RangedValue.cpp delete mode 100644 Source/Asura/Math/RangedValue.h delete mode 100644 Source/Asura/Math/Vector2.cpp delete mode 100644 Source/Asura/Math/Vector2.h delete mode 100644 Source/Asura/Math/Vector3.cpp delete mode 100644 Source/Asura/Math/Vector3.h delete mode 100644 Source/Asura/Math/Vector4.cpp delete mode 100644 Source/Asura/Math/Vector4.h delete mode 100644 Source/Asura/Object.cpp delete mode 100644 Source/Asura/Object.h delete mode 100644 Source/Asura/ObjectPool.cpp delete mode 100644 Source/Asura/ObjectPool.h delete mode 100644 Source/Asura/Physics/World.h delete mode 100644 Source/Asura/Profiler/Stats.cpp delete mode 100644 Source/Asura/Profiler/Stats.h delete mode 100644 Source/Asura/Scene.cpp delete mode 100644 Source/Asura/Scene.h delete mode 100644 Source/Asura/Scripting/Luax.hpp delete mode 100644 Source/Asura/Time/Timer.cpp delete mode 100644 Source/Asura/Time/Timer.h delete mode 100644 Source/Asura/Transform.cpp delete mode 100644 Source/Asura/Transform.h delete mode 100644 Source/Asura/Type.h delete mode 100644 Source/Editor/main.cpp delete mode 100644 Source/Runner/AE_Compressor.cpp delete mode 100644 Source/Runner/Scripts/main.lua delete mode 100644 Source/Runner/main.cpp (limited to 'Source') diff --git a/Source/Asura.Editor/main.cpp b/Source/Asura.Editor/main.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/AI/BehaviorTree.cpp b/Source/Asura.Engine/AI/BehaviorTree.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/AI/BehaviorTree.h b/Source/Asura.Engine/AI/BehaviorTree.h new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/AI/StateMachine.cpp b/Source/Asura.Engine/AI/StateMachine.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/AI/StateMachine.h b/Source/Asura.Engine/AI/StateMachine.h new file mode 100644 index 0000000..17f8945 --- /dev/null +++ b/Source/Asura.Engine/AI/StateMachine.h @@ -0,0 +1,33 @@ +#ifndef __AE_STATEMACHINE_H__ +#define __AE_STATEMACHINE_H__ + +#include "StateMap.h" +#include "Component.h" + +namespace AsuraEngine +{ + namespace AI + { + + /// + /// 作为state map的代理 + /// + class StateMachine : public Component + { + public: + + + + private: + + /// + /// Statemachine 所使用的state图 + /// + StateMap* mStateMap; + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/AI/StateMap.cpp b/Source/Asura.Engine/AI/StateMap.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/AI/StateMap.h b/Source/Asura.Engine/AI/StateMap.h new file mode 100644 index 0000000..873e1d9 --- /dev/null +++ b/Source/Asura.Engine/AI/StateMap.h @@ -0,0 +1,25 @@ +#ifndef __AE_STATEMAP_H__ +#define __AE_STATEMAP_H__ + +#include "Filesystem/Asset.h" + +namespace AsuraEngine +{ + namespace AI + { + + class StateMap : public Filesystem::Asset + { + public: + + + private: + + + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Asura.h b/Source/Asura.Engine/Asura.h new file mode 100644 index 0000000..dfa0fa5 --- /dev/null +++ b/Source/Asura.Engine/Asura.h @@ -0,0 +1,6 @@ +#ifndef __AE_H__ +#define __AE_H__ + + + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Audio/Sound.cpp b/Source/Asura.Engine/Audio/Sound.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Audio/Sound.h b/Source/Asura.Engine/Audio/Sound.h new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Audio/Source.cpp b/Source/Asura.Engine/Audio/Source.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Audio/Source.h b/Source/Asura.Engine/Audio/Source.h new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Component.cpp b/Source/Asura.Engine/Component.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Component.h b/Source/Asura.Engine/Component.h new file mode 100644 index 0000000..807bbba --- /dev/null +++ b/Source/Asura.Engine/Component.h @@ -0,0 +1,43 @@ +#ifndef __AE_COMPONENT_H__ +#define __AE_COMPONENT_H__ + +#include "GameObject.h" + +namespace AsuraEngine +{ + + class GameObject; + + /// + /// Component通过代码或者prefab附加在GameObject上。 + /// + class Component : public Object + { + public: + + virtual void OnEnable(); + virtual void OnEvent(); + virtual void OnUpdate(uint32 milliseconds); + virtual void OnRender(); + virtual void OnDisable(); + + protected: + + enum class EnableCallback + { + OnEnable = 1, + OnEvent = 1 << 1, + OnUpdate = 1 << 2, + OnRender = 1 << 3, + OnDisable = 1 << 4, + }; + + EnableCallback mEnabledCallbacks; + + GameObject* mGameObject; + + }; + +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Containers/Map.cpp b/Source/Asura.Engine/Containers/Map.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Containers/Map.h b/Source/Asura.Engine/Containers/Map.h new file mode 100644 index 0000000..2caedef --- /dev/null +++ b/Source/Asura.Engine/Containers/Map.h @@ -0,0 +1,17 @@ +#ifndef __AE_MAP_H__ +#define __AE_MAP_H__ + +#include + +namespace AsuraEngine +{ + namespace Containers + { + + template + using Map = std::map; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Containers/Stack.cpp b/Source/Asura.Engine/Containers/Stack.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Containers/Stack.h b/Source/Asura.Engine/Containers/Stack.h new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Containers/String.cpp b/Source/Asura.Engine/Containers/String.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Containers/String.h b/Source/Asura.Engine/Containers/String.h new file mode 100644 index 0000000..3c806fb --- /dev/null +++ b/Source/Asura.Engine/Containers/String.h @@ -0,0 +1,78 @@ +#ifndef __AE_STRING_H__ +#define __AE_STRING_H__ + +#include + +namespace AsuraEngine +{ + namespace Containers + { + + /// + /// 封装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/Containers/StringMap.cpp b/Source/Asura.Engine/Containers/StringMap.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Containers/StringMap.hpp b/Source/Asura.Engine/Containers/StringMap.hpp new file mode 100644 index 0000000..94858a7 --- /dev/null +++ b/Source/Asura.Engine/Containers/StringMap.hpp @@ -0,0 +1,32 @@ +#ifndef __AE_STRINGMAP_H__ +#define __AE_STRINGMAP_H__ + +#include "String.h" + +namespace AsuraEngine +{ + namespace Containers + { + + /// + /// 一个双向一一对应的映射,用来储存shader uniforms、statemathine state parameter的ID。 + /// + template + class StringMap + { + public: + + bool ContainsKey(const key_type& key); + + bool ContainsString(const String& str); + + String GetStringByKey(const key_type& key); + + key_type GetKeyByString(const String& str); + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Containers/UnorderedMap.hpp b/Source/Asura.Engine/Containers/UnorderedMap.hpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Containers/Vector.hpp b/Source/Asura.Engine/Containers/Vector.hpp new file mode 100644 index 0000000..9fbd52a --- /dev/null +++ b/Source/Asura.Engine/Containers/Vector.hpp @@ -0,0 +1,16 @@ +#ifndef __AE_VECTOR_HPP__ +#define __AE_VECTOR_HPP__ + +#include + +namespace AsuraEngine +{ + namespace Containers + { + template + using Vector = std::vector; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Exceptions/Exception.cpp b/Source/Asura.Engine/Exceptions/Exception.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Exceptions/Exception.h b/Source/Asura.Engine/Exceptions/Exception.h new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Factory.h b/Source/Asura.Engine/Factory.h new file mode 100644 index 0000000..0cccab2 --- /dev/null +++ b/Source/Asura.Engine/Factory.h @@ -0,0 +1,14 @@ +#ifndef __AE_FACTORY_H__ +#define __AE_FACTORY_H__ + +namespace AsuraEngine +{ + + class Factory + { + + }; + +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/FileSystem/AnimationImpoter.h b/Source/Asura.Engine/FileSystem/AnimationImpoter.h new file mode 100644 index 0000000..57fdfdb --- /dev/null +++ b/Source/Asura.Engine/FileSystem/AnimationImpoter.h @@ -0,0 +1,20 @@ +#ifndef __AE_IMAGE_IMPORTER_H__ +#define __AE_IMAGE_IMPORTER_H___ + +namespace AsuraEngine +{ + namespace Filesystem + { + + /// + /// 从.asr导入animation + /// + class AnimationImporter + { + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/FileSystem/Asset.cpp b/Source/Asura.Engine/FileSystem/Asset.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/FileSystem/Asset.h b/Source/Asura.Engine/FileSystem/Asset.h new file mode 100644 index 0000000..9fc6607 --- /dev/null +++ b/Source/Asura.Engine/FileSystem/Asset.h @@ -0,0 +1,22 @@ +#ifndef __AE_ASSET_H__ +#define __AE_ASSET_H__ + +#include "Object.h" + +namespace AsuraEngine +{ + namespace Filesystem + { + + /// + /// Asset不会作为组件。 + /// + class Asset : public Object + { + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/FileSystem/ImageImpoter.h b/Source/Asura.Engine/FileSystem/ImageImpoter.h new file mode 100644 index 0000000..ca7cb9a --- /dev/null +++ b/Source/Asura.Engine/FileSystem/ImageImpoter.h @@ -0,0 +1,20 @@ +#ifndef __AE_IMAGE_IMPORTER_H__ +#define __AE_IMAGE_IMPORTER_H___ + +namespace AsuraEngine +{ + namespace Filesystem + { + + /// + /// 从.asr导入image + /// + class ImageImporter + { + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/FileSystem/Importer.h b/Source/Asura.Engine/FileSystem/Importer.h new file mode 100644 index 0000000..b343a92 --- /dev/null +++ b/Source/Asura.Engine/FileSystem/Importer.h @@ -0,0 +1,17 @@ +#ifndef __AE_IMPORTER_H__ +#define __AE_IMPORTER_H__ + +namespace AsuraEngine +{ + namespace Filesystem + { + + class Importer + { + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/FileSystem/ParticleSystemImpoter.h b/Source/Asura.Engine/FileSystem/ParticleSystemImpoter.h new file mode 100644 index 0000000..92796f3 --- /dev/null +++ b/Source/Asura.Engine/FileSystem/ParticleSystemImpoter.h @@ -0,0 +1,20 @@ +#ifndef __AE_IMAGE_IMPORTER_H__ +#define __AE_IMAGE_IMPORTER_H___ + +namespace AsuraEngine +{ + namespace Filesystem + { + + /// + /// 从.asr导入particle system + /// + class ParticleSystemImporter + { + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/FileSystem/SpriteImpoter.h b/Source/Asura.Engine/FileSystem/SpriteImpoter.h new file mode 100644 index 0000000..0e157c1 --- /dev/null +++ b/Source/Asura.Engine/FileSystem/SpriteImpoter.h @@ -0,0 +1,20 @@ +#ifndef __AE_IMAGE_IMPORTER_H__ +#define __AE_IMAGE_IMPORTER_H___ + +namespace AsuraEngine +{ + namespace Filesystem + { + + /// + /// 从.asr导入sprite + /// + class SpriteImporter + { + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Font/TrueTypeFont.cpp b/Source/Asura.Engine/Font/TrueTypeFont.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Font/TrueTypeFont.h b/Source/Asura.Engine/Font/TrueTypeFont.h new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/GUI/Button.cpp b/Source/Asura.Engine/GUI/Button.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/GUI/README.md b/Source/Asura.Engine/GUI/README.md new file mode 100644 index 0000000..3e367c7 --- /dev/null +++ b/Source/Asura.Engine/GUI/README.md @@ -0,0 +1 @@ +immediate mode game gui \ No newline at end of file diff --git a/Source/Asura.Engine/GameObject.cpp b/Source/Asura.Engine/GameObject.cpp new file mode 100644 index 0000000..322f798 --- /dev/null +++ b/Source/Asura.Engine/GameObject.cpp @@ -0,0 +1,11 @@ +#include "GameObject.h" + +namespace AsuraEngine +{ + + void GameObject::OnUpdate(uint32 milliseconds) + { + + } + +} diff --git a/Source/Asura.Engine/GameObject.h b/Source/Asura.Engine/GameObject.h new file mode 100644 index 0000000..85dc87f --- /dev/null +++ b/Source/Asura.Engine/GameObject.h @@ -0,0 +1,56 @@ +#ifndef __AE_GAMEOBJECT_H__ +#define __AE_GAMEOBJECT_H__ + +#include "./Containers/Vector.hpp" +#include "./Math/Vector2.h" + +#include "Object.h" +#include "Component.h" +#include "Transform.h" +#include "Manager.hpp" + +namespace AsuraEngine +{ + + /// + /// 游戏实体,由引擎管理。 + /// + class GameObject final : public Object + { + public: + + // 场景的回调函数 + + void OnEnable(); + void OnEvent(); + void OnUpdate(uint32 milliseconds); + void OnRender(); + void OnDisable(); + + // 设置transform,组件可以通过下列函数修改GameObject的位置、缩放和旋转 + + const Transform& GetTransform(); + const Math::Vector2& GetPosition(); + const Math::Vector2& GetScale(); + const Math::Vector2& GetRotation(); + void SetTransform(const Transform& transform); + void SetPosition(const Math::Vector2& position); + void SetScale(const Math::Vector2& scale); + void SetRotation(const Math::Vector2& rotation); + + template + inline T GetComponent() + { + return NULL; + } + + private: + + Transform mTransform; + Containers::Vector mComponents; + + }; + +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/Animation.cpp b/Source/Asura.Engine/Graphics/Animation.cpp new file mode 100644 index 0000000..47643aa --- /dev/null +++ b/Source/Asura.Engine/Graphics/Animation.cpp @@ -0,0 +1,21 @@ +#include "Animation.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + void Animation::OnEnable() + { + mSpriteRenderer = mGameObject->GetComponent(); + } + + void Animation::OnUpdate(uint32 milliseconds) + { + if (!mSpriteRenderer) + return; + mSpriteRenderer->SetSprite(NULL); + } + + } +} diff --git a/Source/Asura.Engine/Graphics/Animation.h b/Source/Asura.Engine/Graphics/Animation.h new file mode 100644 index 0000000..391da22 --- /dev/null +++ b/Source/Asura.Engine/Graphics/Animation.h @@ -0,0 +1,128 @@ +#ifndef __AE_ANIMATION_H__ +#define __AE_ANIMATION_H__ + +#include "Sprite.h" +#include "Component.h" +#include "Manager.hpp" +#include "SpriteRenderer.h" +#include "Containers/Map.h" +#include "Containers/Vector.hpp" +#include "Containers/StringMap.hpp" +#include "Filesystem/Asset.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + /// + /// 关键帧 + /// + struct Frame + { + uint mask; // + float time; + Sprite* sprite; + }; + + /// + /// Sprite动画,可以改变的有sprite的大小、旋转、缩放、image。Animation通过animator修改。 + /// + class Animation final : public Filesystem::Asset + { + public: + + enum UpdateMask + { + Scale = 1, + Position = 1 << 1, + Rotation = 1 << 2, + Sprite = 1 << 3 + }; + + struct Definition + { + + }; + + /// + /// 根据时间获得一帧 + /// + Frame GetFrame(float t); + + /// + /// 获得关键帧数量 + /// + uint GetKeyFrameCount(); + + /// + /// 是否循环 + /// + uint GetLoop(); + + /// + /// 获取总时间 + /// + uint GetDuration(); + + private: + + /// + /// 关键帧 + /// + Containers::Vector mFrames; + + /// + /// 总时长 + /// + float mDuration; + + /// + /// 是否循环 + /// + bool mLoop; + + /// + /// ID + /// + uint mID; + + UpdateMask mUpdateMask; + + }; + + class AnimationManager : public Manager + { + public: + + Containers::String GetAnimationName(uint ID); + + uint GetAnimationID(const Containers::String& name); + + Animation* GetAnimation(uint ID); + + Animation* GetAnimation(const Containers::String& name); + + /// + /// 添加动画并返回ID + /// + uint AddAnimation(Animation* animation); + + private: + + /// + /// 映射ID到animation + /// + Containers::StringMap mAnimationIDs; + + /// + /// 映射key到animation + /// + Containers::Map mAnimations; + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/Animator.cpp b/Source/Asura.Engine/Graphics/Animator.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/Animator.h b/Source/Asura.Engine/Graphics/Animator.h new file mode 100644 index 0000000..4d3d269 --- /dev/null +++ b/Source/Asura.Engine/Graphics/Animator.h @@ -0,0 +1,96 @@ +#ifndef __AE_ANIMATOR_H__ +#define __AE_ANIMATOR_H__ + +#include "Component.h" +#include "Animation.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + /// + /// 控制animation的组件,主要是作为animation的代理 + /// + class Animator final : public Component + { + public: + + void OnEnable() override; + void OnUpdate(uint32 milliseconds) override; + + /// + /// 设置animation + /// + void SetAnimation(uint ID); + + /// + /// 设置animation + /// + void SetAnimation(Animation* animation); + + /// + /// 根据设置animation状态 + /// + void SetTime(float time); + + /// + /// 修改播放速度 + /// + void SetSpeed(float speed); + + /// + /// 设置是否循环 + /// + void SetLoop(bool isloop); + + /// + /// 根据关键帧修改animation + /// + void SetKeyFrame(uint keyFrame); + + /// + /// 设置到结束 + /// + void SetToBegin(); + + /// + /// 设置到开始 + /// + void SetToEnd(); + + /// + /// 暂停 + /// + void Pause(); + + private: + + /// + /// 当前的animation + /// + Animation* mAnimation; + + /// + /// Animation要求物体必须有一个sprite renderer组件 + /// + SpriteRenderer* mSpriteRenderer; + + /// + /// 播放速度,默认为1,dt = mSpeed * DELTA_TIME + /// + float mSpeed; + + /// + /// 当前执行的时间 + /// + float mTime; + + bool mLoop; + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/Camera.cpp b/Source/Asura.Engine/Graphics/Camera.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/Camera.h b/Source/Asura.Engine/Graphics/Camera.h new file mode 100644 index 0000000..699d342 --- /dev/null +++ b/Source/Asura.Engine/Graphics/Camera.h @@ -0,0 +1,42 @@ +#ifndef __AE_CAMERA_H__ +#define __AE_CAMERA_H__ + +#include "RenderTarget.h" +#include "Component.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + /// + /// Orthographic Camera. + /// + class Camera : public Component + { + public: + + + private: + + /// + /// 渲染的目标 + /// + RenderTarget* mRenderTarget; + + /// + /// 是否渲染到屏幕上 + /// + bool mIsOnScreen; + + /// + /// 裁剪 + /// + bool mIsCulling; + + }; + + } +} + +#endif diff --git a/Source/Asura.Engine/Graphics/Canvas.cpp b/Source/Asura.Engine/Graphics/Canvas.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/Canvas.h b/Source/Asura.Engine/Graphics/Canvas.h new file mode 100644 index 0000000..cd78194 --- /dev/null +++ b/Source/Asura.Engine/Graphics/Canvas.h @@ -0,0 +1,20 @@ +#ifndef __AE_Canvas_H__ +#define __AE_Canvas_H__ + +#include "Component.h" +#include "Texture.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + class Canvas : public Texture, public Component + { + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/CanvasRenderer.cpp b/Source/Asura.Engine/Graphics/CanvasRenderer.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/CanvasRenderer.h b/Source/Asura.Engine/Graphics/CanvasRenderer.h new file mode 100644 index 0000000..ef188a5 --- /dev/null +++ b/Source/Asura.Engine/Graphics/CanvasRenderer.h @@ -0,0 +1,30 @@ +#ifndef __AE_CANVAS_RENDERER_H__ +#define __AE_CANVAS_RENDERER_H__ + +#include "Canvas.h" +#include "Renderer.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + class CanvasRenderer : public Renderer + { + public: + + void SetCanvas(Canvas* canvas); + Canvas* GetCanvas(); + + void SetBlendMode(); + + private: + + Canvas * mCanvas; + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/Color.cpp b/Source/Asura.Engine/Graphics/Color.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/Color.h b/Source/Asura.Engine/Graphics/Color.h new file mode 100644 index 0000000..f172156 --- /dev/null +++ b/Source/Asura.Engine/Graphics/Color.h @@ -0,0 +1,30 @@ +#ifndef __AE_COLOR_H__ +#define __AE_COLOR_H__ + +#include "Type.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + /// + /// 32bits颜色 + /// + class Color + { + public: + + Color(byte r, byte g, byte b, byte a); + ~Color(); + + private: + + byte mR, mG, mB, mA; + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/Image.cpp b/Source/Asura.Engine/Graphics/Image.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/Image.h b/Source/Asura.Engine/Graphics/Image.h new file mode 100644 index 0000000..5b27079 --- /dev/null +++ b/Source/Asura.Engine/Graphics/Image.h @@ -0,0 +1,119 @@ +#ifndef __AE_IMAGE_H__ +#define __AE_IMAGE_H__ + +#include "Math/Vector2.h" +#include "Manager.hpp" +#include "Texture.h" +#include "Color.h" +#include "Factory.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + class ImageFactory; + + /// + /// Image是图片从内存中载入后,读取进游戏后保存的结果。一个Image在内存、显存中只会保存一份,不会产生副本。需要特征 + /// 化的区别image,如锚点位置,缩放和旋转角度,使用sprite。基本是一个只读类。 + /// + class Image final : public Texture, public Filesystem::Asset + { + public: + + uint GetWidth(); + uint GetHeight(); + + /// + /// 获得某一个位置的像素 + /// + Color GetPixel(uint x, uint y); + + private: + + friend class ImageFactory; + + Image(Color* pixels, int width, int height); + ~Image(); + + /// + /// 大小(以像素为单位) + /// + uint mWidth, mHeight; + Color* mPixels; + + /// + /// ID + /// + uint mID; + + }; + + /// + /// + /// + class ImageManager : public Manager + { + public: + + /// + /// 通过ID获取路径,如果是程序创建的图片,返回String::Null + /// + Containers::String GetImagePath(uint ID); + + /// + /// 通过ID路径获取ID,如果没找到,返回0 + /// + uint GetImageID(const Containers::String& path); + + Image* GetImage(const Containers::String& path); + + Image* GetImage(const Containers::String& ID); + + uint AddImage(const Containers::String& path, Image* image); + + uint AddImage(Image* image); + + bool RemoveImage(uint ID); + + bool RemoveImage(Image* image); + + private: + + /// + /// 所有的image + /// + Containers::Map mImages; + + /// + /// image,路径和ID的映射。针对从.asr导入的image,通过路径可以拿到image。所以并不是所有的image都在此map中。 + /// 由程序创建的image只能通过ID来获取,所以程序中需要保留ID。 + /// + Containers::StringMap mImageIDs; + + }; + + /// + /// + /// + class ImageFactory : public Factory + { + public: + + /// + /// 从image pixel数据中构建image + /// + Image* ReadBuffer(Color* pixels, int width, int height); + + /// + /// 从image extern数据并返回 + /// + Image* Decode(); + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/Material.cpp b/Source/Asura.Engine/Graphics/Material.cpp new file mode 100644 index 0000000..eaf9742 --- /dev/null +++ b/Source/Asura.Engine/Graphics/Material.cpp @@ -0,0 +1,18 @@ +#include "Material.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + + + //-------------------------------------------------------------------------------------------------------- + + int Material::l_SetColor(lua_State* L) + { + + } + + } +} diff --git a/Source/Asura.Engine/Graphics/Material.h b/Source/Asura.Engine/Graphics/Material.h new file mode 100644 index 0000000..1cb3c88 --- /dev/null +++ b/Source/Asura.Engine/Graphics/Material.h @@ -0,0 +1,189 @@ +#ifndef __AE_MATERIAL_H__ +#define __AE_MATERIAL_H__ + +#include "Containers/Vector.hpp" +#include "Containers/String.h" +#include "Math/Vector2.h" +#include "Math/Vector3.h" +#include "Math/Vector4.h" +#include "Math/Matrix44.h" +#include "Scripting/Luax.hpp" + +#include "Shader.h" +#include "Texture.h" +#include "Manager.hpp" + +namespace AsuraEngine +{ + namespace Graphics + { + + class MaterialFactory; + + /// + /// 通过材质调整Shader中的uniforms变量。Shader将可以修改的变量暴露给material,每个材质可以差异化配置相同着色器的 + /// 不同参数,通过数据文件(.mat)实现,而不是在代码里配置。所以在Asura中,Shader无法直接应用到渲染流程而必须和一个 + /// 材质关联,由材质修改shader的uniforms,material充当了shader的代理。 + /// + class Material final : public Filesystem::Asset + { + public: + + enum class UniformsType + { + None = 0, + Float, + Int, + Vector2, + Vector3, + Vector4, + Matrix44, + Texture, + Color, + }; + + struct UniformsInfo + { + uint ID; // uniform变量的ID + UniformsType type; // uniform变量的类型 + union + { + float f; + int i; + Math::Vector2 v2; + Math::Vector3 v3; + Math::Vector4 v4; + Math::Matrix44 m44; + Texture* tex; + Color col; + }value; // uniform变量的值 + }; + + void SetShader(Shader* shader); + + // 设置Uniform变量,保存在材质中,渲染时上传到GPU + + /// + /// 获得uniform变量的ID,ID和name的map在shader间共享。设置uniform变量的值时,通过ID查询uniform变量名,在 + /// shader中找到uniform location并对这个location赋值。 + /// + static int GetUniformID(const Containers::String& name); + + void SetTexture(uint ID, Texture* texture); + void SetVector2(uint ID, Math::Vector2* vector2); + void SetVector3(uint ID, Math::Vector3* vector3); + void SetVector4(uint ID, Math::Vector4* vector4); + void SetMatrix44(uint ID, Math::Matrix44* matrix44); + void SetFloat(uint ID, float value); + void SetInteger(uint ID, int value); + void SetColor(uint ID, Color color); + + UniformsInfo GetUniformInfo(uint ID); + float GetUniformInfof(uint ID); + int GetUniformInfoi(uint ID); + Math::Vector2 GetUniformInfov2(uint ID); + Math::Vector3 GetUniformInfov3(uint ID); + Math::Vector4 GetUniformInfov4(uint ID); + Math::Matrix44 GetUniformInfom44(uint ID); + Texture* GetUniformInfotex(uint ID); + Color GetUniformInfocol(uint ID); + + // 上传顶点数据 + + void SetVertexAttributes(); + + private: + + friend class MaterialFactory; + + Material(); + Material(const Material& src); + ~Material(); + + /// + /// + /// + uint mID; + + /// + /// + /// + Shader* mShader; + + /// + /// Uniforms变量的值,映射ID到值 + /// + Containers::Map mUniforms; + + /// + /// 是否是共享的材质 + /// + bool mIsShared; + + //---------------------------------------------------------------------------------------------------- + + LUAX_DECL_FACTORY(Material); + + LUAX_DECL_METHOD(l_Clone); + + LUAX_DECL_METHOD(l_SetShader); + + LUAX_DECL_METHOD(l_SetTexture); + LUAX_DECL_METHOD(l_SetVector2); + LUAX_DECL_METHOD(l_SetVector3); + LUAX_DECL_METHOD(l_SetVector4); + LUAX_DECL_METHOD(l_SetMatrix44); + LUAX_DECL_METHOD(l_SetFloat); + LUAX_DECL_METHOD(l_SetInteger); + LUAX_DECL_METHOD(l_SetColor); + + LUAX_DECL_METHOD(l_GetUniformInfo); + LUAX_DECL_METHOD(l_GetUniformInfof); + LUAX_DECL_METHOD(l_GetUniformInfoi); + LUAX_DECL_METHOD(l_GetUniformInfov2); + LUAX_DECL_METHOD(l_GetUniformInfov3); + LUAX_DECL_METHOD(l_GetUniformInfov4); + LUAX_DECL_METHOD(l_GetUniformInfom44); + LUAX_DECL_METHOD(l_GetUniformInfotex); + LUAX_DECL_METHOD(l_GetUniformInfocol); + + LUAX_DECL_METHOD(l_SetVertexAttributes); + + }; + + class MaterialManager : public Manager + { + public: + + private: + + /// + /// 所有的image + /// + Containers::Map mImages; + + /// + /// image,路径和ID的映射。针对从.asr导入的image,通过路径可以拿到image。所以并不是所有的image都在此map中。 + /// 由程序创建的image只能通过ID来获取,所以程序中需要保留ID。 + /// + Containers::StringMap mImageIDs; + + }; + + class MaterialFactory : public Factory + { + public: + + /// + /// 拷贝一个material + /// + Material* Clone(Material* src); + + Material* Create(); + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/Mesh2D.cpp b/Source/Asura.Engine/Graphics/Mesh2D.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/Mesh2D.h b/Source/Asura.Engine/Graphics/Mesh2D.h new file mode 100644 index 0000000..a113f4c --- /dev/null +++ b/Source/Asura.Engine/Graphics/Mesh2D.h @@ -0,0 +1,20 @@ +#ifndef __AE_MESH2D_H__ +#define __AE_MESH2D_H__ + +namespace AsuraEngine +{ + namespace Graphics + { + + /// + /// 2D mesh,用于做一些UV动画 + /// + class Mesh2D + { + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/Mesh2DRenderer.cpp b/Source/Asura.Engine/Graphics/Mesh2DRenderer.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/Mesh2DRenderer.h b/Source/Asura.Engine/Graphics/Mesh2DRenderer.h new file mode 100644 index 0000000..fcbfd2c --- /dev/null +++ b/Source/Asura.Engine/Graphics/Mesh2DRenderer.h @@ -0,0 +1,19 @@ +#ifndef __AE_MESH2D_H__ +#define __AE_MESH2D_H__ + +#include "FileSystem/Asset.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + class Mesh2D : public Filesystem::Asset + { + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/OpenGL.cpp b/Source/Asura.Engine/Graphics/OpenGL.cpp new file mode 100644 index 0000000..ec23f52 --- /dev/null +++ b/Source/Asura.Engine/Graphics/OpenGL.cpp @@ -0,0 +1,11 @@ +#include "OpenGL.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + + + } +} \ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/OpenGL.h b/Source/Asura.Engine/Graphics/OpenGL.h new file mode 100644 index 0000000..f46497b --- /dev/null +++ b/Source/Asura.Engine/Graphics/OpenGL.h @@ -0,0 +1,17 @@ +#ifndef __AE_OPENGL_H__ +#define __AE_OPENGL_H__ + +namespace AsuraEngine +{ + namespace Graphics + { + + class OpenGL + { + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/ParticleSystem.cpp b/Source/Asura.Engine/Graphics/ParticleSystem.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/ParticleSystem.h b/Source/Asura.Engine/Graphics/ParticleSystem.h new file mode 100644 index 0000000..078427a --- /dev/null +++ b/Source/Asura.Engine/Graphics/ParticleSystem.h @@ -0,0 +1,22 @@ +#ifndef __AE_PARTICLESYSTEM_H__ +#define __AE_PARTICLESYSTEM_H__ + +#include "Component.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + /// + /// 粒子系统 + /// + class ParticleSystem final : public Component + { + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/Prefab.cpp b/Source/Asura.Engine/Graphics/Prefab.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/Prefab.h b/Source/Asura.Engine/Graphics/Prefab.h new file mode 100644 index 0000000..82a8da2 --- /dev/null +++ b/Source/Asura.Engine/Graphics/Prefab.h @@ -0,0 +1,30 @@ +#ifndef __AE_PREFAB_H__ +#define __AE_PREFAB_H__ + +#include "Manager.hpp" +#include "FileSystem/Asset.h" + +namespace AsuraEngine +{ + + /// + /// Prefab用来构建GameObject + /// + class Prefab : public Filesystem::Asset + { + + }; + + class PrefabManager : public Manager + { + + }; + + class PrefabFactory + { + + }; + +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/Renderer.cpp b/Source/Asura.Engine/Graphics/Renderer.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/Renderer.h b/Source/Asura.Engine/Graphics/Renderer.h new file mode 100644 index 0000000..c3677a7 --- /dev/null +++ b/Source/Asura.Engine/Graphics/Renderer.h @@ -0,0 +1,39 @@ +#ifndef __AE_RENDERER_H__ +#define __AE_RENDERER_H__ + +#include "Component.h" +#include "Material.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + /// + /// 抽象基类,渲染由Renderer类处理,每个Renderer必须具备一个材质。 + /// + class Renderer : public Component + { + public: + + /// + /// 一旦调用此方法,就会拷贝shared material,调用此方法意味着要对material的配置进行修改,如果此时使用的材质是 + /// shared material,则需要拷贝一份,避免影响其他共享的renderer。 + /// + Material* GetMaterial(); + + /// + /// 渲染回调函数 + /// + virtual void OnRender() = 0; + + protected: + + Material* mMaterial; + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/Shader.cpp b/Source/Asura.Engine/Graphics/Shader.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/Shader.h b/Source/Asura.Engine/Graphics/Shader.h new file mode 100644 index 0000000..c3c67ad --- /dev/null +++ b/Source/Asura.Engine/Graphics/Shader.h @@ -0,0 +1,67 @@ +#ifndef __AE_SHADER_H__ +#define __AE_SHADER_H__ + +#include "luax/luax.h" + +#include "FileSystem/Asset.h" +#include "Containers/Map.h" +#include "Containers/StringMap.hpp" +#include "Object.h" +#include "Color.h" +#include "Manager.hpp" + +namespace AsuraEngine +{ + namespace Graphics + { + + class Material; + + /// + /// 一个shader是一个在材质间共享的程序。Shader本身不保存uniforms和顶点数据,只保存uniforms location。 + /// + class Shader final : public Filesystem::Asset + { + public: + + Shader(); + ~Shader(); + + private: + + friend class Material; + + /// + /// 保存了所有shader的uniforms变量的ID映射。 + /// + static Containers::StringMap sUniformsID; + + /// + /// 获得uniform变量的ID。 + /// + static int GetUniformID(const Containers::String& name); + + /// + /// 设置内置变量: + /// vec2 Asura_Time x值为进入当前场景开始的时间,y值为上一帧的时间间隔 + /// vec2 Asura_RenderTargetSize RT的大小,以像素为单位 + /// Texture Asura_MainTexture 主纹理 + /// + void SetBuiltInUniforms(); + + /// + /// 映射uniforms ID到location。 + /// + Containers::Map mLocations; + + }; + + class ShaderManager final : public Manager + { + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/ShapeRenderer.cpp b/Source/Asura.Engine/Graphics/ShapeRenderer.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/ShapeRenderer.h b/Source/Asura.Engine/Graphics/ShapeRenderer.h new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/Sprite.cpp b/Source/Asura.Engine/Graphics/Sprite.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/Sprite.h b/Source/Asura.Engine/Graphics/Sprite.h new file mode 100644 index 0000000..b621f1b --- /dev/null +++ b/Source/Asura.Engine/Graphics/Sprite.h @@ -0,0 +1,71 @@ +#ifndef __AE_SPRITE_H__ +#define __AE_SPRITE_H__ + +#include "Math/Vector2.h" +#include "Transform.h" +#include "Component.h" +#include "Image.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + /// + /// Sprite是控制image的代理,image是在sprite间共享的数据,sprite可以区别化处理image的属性,如旋转,缩放等。 + /// + class Sprite final : public Filesystem::Asset + { + public: + + enum Type + { + + }; + + /// + /// 对齐方式 + /// + enum Align + { + + }; + + struct SpriteDef + { + Image* image; + Align align; + Math::Vector2 anchor; + Math::Vector2 size; + }; + + Sprite(SpriteDef definition); + ~Sprite(); + + private: + + /// + /// 锚点坐标 + /// + Math::Vector2 mAnchor; + + /// + /// 大小 + /// + Math::Vector2 mSize; + + /// + /// 绑定的image + /// + Image* mImage; + + //---------------------------------------------------------------------------------------------------- + + + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/SpriteBatch.cpp b/Source/Asura.Engine/Graphics/SpriteBatch.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/SpriteBatch.h b/Source/Asura.Engine/Graphics/SpriteBatch.h new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/SpriteRenderer.cpp b/Source/Asura.Engine/Graphics/SpriteRenderer.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/SpriteRenderer.h b/Source/Asura.Engine/Graphics/SpriteRenderer.h new file mode 100644 index 0000000..bd81509 --- /dev/null +++ b/Source/Asura.Engine/Graphics/SpriteRenderer.h @@ -0,0 +1,32 @@ +#ifndef __AE_SPRITE_RENDERER_H__ +#define __AE_SPRITE_RENDERER_H__ + +#include "Renderer.h" +#include "Sprite.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + class SpriteRenderer final : public Renderer + { + public: + + void SetSprite(Sprite* sprite); + + void OnRender() override; + + private: + + /// + /// 用来渲染的sprite + /// + Sprite* mSprite; + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Graphics/Texture.cpp b/Source/Asura.Engine/Graphics/Texture.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Graphics/Texture.h b/Source/Asura.Engine/Graphics/Texture.h new file mode 100644 index 0000000..8195fc9 --- /dev/null +++ b/Source/Asura.Engine/Graphics/Texture.h @@ -0,0 +1,22 @@ +#ifndef __AE_TEXTURE_H__ +#define __AE_TEXTURE_H__ + +#include "Object.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + /// + /// 2D纹理(抽象类),在2d mesh和render target中被使用 + /// + class Texture : public Object + { + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Input/Keyboard.cpp b/Source/Asura.Engine/Input/Keyboard.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Input/Keyboard.h b/Source/Asura.Engine/Input/Keyboard.h new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Layer.cpp b/Source/Asura.Engine/Layer.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Layer.h b/Source/Asura.Engine/Layer.h new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Manager.hpp b/Source/Asura.Engine/Manager.hpp new file mode 100644 index 0000000..5a94889 --- /dev/null +++ b/Source/Asura.Engine/Manager.hpp @@ -0,0 +1,14 @@ +#ifndef __AE_MANAGER_H__ +#define __AE_MANAGER_H__ + +namespace AsuraEngine +{ + + class Manager + { + + }; + +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Math/Curve.cpp b/Source/Asura.Engine/Math/Curve.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Math/Curve.h b/Source/Asura.Engine/Math/Curve.h new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Math/Functions.cpp b/Source/Asura.Engine/Math/Functions.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Math/Functions.h b/Source/Asura.Engine/Math/Functions.h new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Math/Matrix44.cpp b/Source/Asura.Engine/Math/Matrix44.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Math/Matrix44.h b/Source/Asura.Engine/Math/Matrix44.h new file mode 100644 index 0000000..5bc44e7 --- /dev/null +++ b/Source/Asura.Engine/Math/Matrix44.h @@ -0,0 +1,24 @@ +#ifndef __AE_MATRIX44_H__ +#define __AE_MATRIX44_H__ + +namespace AsuraEngine +{ + namespace Math + { + + /// + /// 4x4矩阵 + /// + class Matrix44 + { + public: + + private: + + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Math/RangedValue.cpp b/Source/Asura.Engine/Math/RangedValue.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Math/RangedValue.h b/Source/Asura.Engine/Math/RangedValue.h new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Math/Vector2.cpp b/Source/Asura.Engine/Math/Vector2.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Math/Vector2.h b/Source/Asura.Engine/Math/Vector2.h new file mode 100644 index 0000000..d5f8739 --- /dev/null +++ b/Source/Asura.Engine/Math/Vector2.h @@ -0,0 +1,17 @@ +#ifndef __AE_VECTOR2_H__ +#define __AE_VECTOR2_H__ + +namespace AsuraEngine +{ + namespace Math + { + + class Vector2 + { + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Math/Vector3.cpp b/Source/Asura.Engine/Math/Vector3.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Math/Vector3.h b/Source/Asura.Engine/Math/Vector3.h new file mode 100644 index 0000000..14fdd88 --- /dev/null +++ b/Source/Asura.Engine/Math/Vector3.h @@ -0,0 +1,17 @@ +#ifndef __AE_VECTOR3_H__ +#define __AE_VECTOR3_H__ + +namespace AsuraEngine +{ + namespace Math + { + + class Vector3 + { + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Math/Vector4.cpp b/Source/Asura.Engine/Math/Vector4.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Math/Vector4.h b/Source/Asura.Engine/Math/Vector4.h new file mode 100644 index 0000000..a6e8b38 --- /dev/null +++ b/Source/Asura.Engine/Math/Vector4.h @@ -0,0 +1,17 @@ +#ifndef __AE_VECTOR4_H__ +#define __AE_VECTOR4_H__ + +namespace AsuraEngine +{ + namespace Math + { + + class Vector4 + { + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Object.cpp b/Source/Asura.Engine/Object.cpp new file mode 100644 index 0000000..587dca7 --- /dev/null +++ b/Source/Asura.Engine/Object.cpp @@ -0,0 +1,23 @@ +#include "Object.h" + +namespace AsuraEngine +{ + + Object::Object() + : mRC(0) + { + + } + + void Object::Retain(Object* obj) + { + ++obj->mRC; + } + + 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 new file mode 100644 index 0000000..3dace26 --- /dev/null +++ b/Source/Asura.Engine/Object.h @@ -0,0 +1,32 @@ +#ifndef __AE_OBJECT_H__ +#define __AE_OBJECT_H__ + +#include "Type.h" + +namespace AsuraEngine +{ + + /// + /// 基类 + /// + class Object + { + public: + + Object(); + + virtual ~Object(); + + static void Retain(Object* obj); + + static void Release(Object* obj); + + private: + + int mRC; // 引用数 + + }; + +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/ObjectPool.cpp b/Source/Asura.Engine/ObjectPool.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/ObjectPool.h b/Source/Asura.Engine/ObjectPool.h new file mode 100644 index 0000000..bf97858 --- /dev/null +++ b/Source/Asura.Engine/ObjectPool.h @@ -0,0 +1,14 @@ +#ifndef __AE_OBJECT_POOL_H__ +#define __AE_OBJECT_POOL_H__ + +namespace AsuraEngine +{ + + class ObjectPool + { + + }; + +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Physics/World.h b/Source/Asura.Engine/Physics/World.h new file mode 100644 index 0000000..7000351 --- /dev/null +++ b/Source/Asura.Engine/Physics/World.h @@ -0,0 +1,14 @@ +#ifndef __AE_WORLD_H__ +#define __AE_WORLD_H__ + +namespace AsuraEngine +{ + namespace Physics + { + + + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Profiler/Stats.cpp b/Source/Asura.Engine/Profiler/Stats.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Profiler/Stats.h b/Source/Asura.Engine/Profiler/Stats.h new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Scene.cpp b/Source/Asura.Engine/Scene.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Scene.h b/Source/Asura.Engine/Scene.h new file mode 100644 index 0000000..742d872 --- /dev/null +++ b/Source/Asura.Engine/Scene.h @@ -0,0 +1,28 @@ +#ifndef __AE_SCENE_H__ +#define __AE_SCENE_H__ + +#include "FileSystem/Asset.h" +#include "Containers/Vector.hpp" +#include "GameObject.h" + +namespace AsuraEngine +{ + + /// + /// 游戏场景 + /// + class Scene final : public Filesystem::Asset + { + public: + + // + + private: + + Containers::Vector mGameObjects; + + }; + +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Scripting/Luax.hpp b/Source/Asura.Engine/Scripting/Luax.hpp new file mode 100644 index 0000000..b371166 --- /dev/null +++ b/Source/Asura.Engine/Scripting/Luax.hpp @@ -0,0 +1,8 @@ +#ifndef __AE_LUAX_H__ +#define __AE_LUAX_H__ + +#include "Lua51/lua.h" +#include "Lua51/lauxlib.h" +#include "Luax/luax.h" + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Time/Timer.cpp b/Source/Asura.Engine/Time/Timer.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Time/Timer.h b/Source/Asura.Engine/Time/Timer.h new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Transform.cpp b/Source/Asura.Engine/Transform.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Engine/Transform.h b/Source/Asura.Engine/Transform.h new file mode 100644 index 0000000..cca7575 --- /dev/null +++ b/Source/Asura.Engine/Transform.h @@ -0,0 +1,24 @@ +#ifndef __AE_TRANSFORM_H__ +#define __AE_TRANSFORM_H__ + +#include "Object.h" +#include "Math/Vector2.h" + +namespace AsuraEngine +{ + + /// + /// Transform作为基本属性,不作为组件处理 + /// + class Transform final : public Object + { + private: + Math::Vector2 position; + Math::Vector2 rotation; + Math::Vector2 scale; + + }; + +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Engine/Type.h b/Source/Asura.Engine/Type.h new file mode 100644 index 0000000..2a2bc70 --- /dev/null +++ b/Source/Asura.Engine/Type.h @@ -0,0 +1,24 @@ +#ifndef __AE_TYPE_H__ +#define __AE_TYPE_H__ + +#include + +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 uint32_t uint; + typedef int32_t sint; + +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Framework/Component.lua b/Source/Asura.Framework/Component.lua new file mode 100644 index 0000000..54bd3c7 --- /dev/null +++ b/Source/Asura.Framework/Component.lua @@ -0,0 +1,9 @@ + +local Component = Class(function() + self.gameobject = nil + +end) + +Component.gameobject = AsuraEngine.Type.GameObject + +return Component diff --git a/Source/Asura.Framework/GameObject.lua b/Source/Asura.Framework/GameObject.lua new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Framework/Graphics/Animator.lua b/Source/Asura.Framework/Graphics/Animator.lua new file mode 100644 index 0000000..0f37c8b --- /dev/null +++ b/Source/Asura.Framework/Graphics/Animator.lua @@ -0,0 +1,7 @@ +local Animator = Class() + +Animator.animation = AsuraEngine.Type.Animation + + + +return Animator \ No newline at end of file diff --git a/Source/Asura.Framework/Graphics/Camera.lua b/Source/Asura.Framework/Graphics/Camera.lua new file mode 100644 index 0000000..4c18f96 --- /dev/null +++ b/Source/Asura.Framework/Graphics/Camera.lua @@ -0,0 +1,9 @@ +local Camera = Class() + +Camera.mIsOnScreen = false + +Camera.mIsCulling = false + + + +return Camera \ No newline at end of file diff --git a/Source/Asura.Framework/Graphics/CanvasRenderer.lua b/Source/Asura.Framework/Graphics/CanvasRenderer.lua new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Framework/Graphics/Mesh2DRenderer.lua b/Source/Asura.Framework/Graphics/Mesh2DRenderer.lua new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Framework/Graphics/ParticleSystem.lua b/Source/Asura.Framework/Graphics/ParticleSystem.lua new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Framework/Graphics/Renderer.lua b/Source/Asura.Framework/Graphics/Renderer.lua new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Framework/Graphics/ShapeRenderer.lua b/Source/Asura.Framework/Graphics/ShapeRenderer.lua new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Framework/Graphics/SpriteBatchRenderer.lua b/Source/Asura.Framework/Graphics/SpriteBatchRenderer.lua new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Framework/Graphics/SpriteRenderer.lua b/Source/Asura.Framework/Graphics/SpriteRenderer.lua new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Framework/Object.lua b/Source/Asura.Framework/Object.lua new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Framework/README.md b/Source/Asura.Framework/README.md new file mode 100644 index 0000000..10a5290 --- /dev/null +++ b/Source/Asura.Framework/README.md @@ -0,0 +1,3 @@ + +AsuraFramework是框架,使用ECS模式。 + diff --git a/Source/Asura.Framework/Scene.lua b/Source/Asura.Framework/Scene.lua new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Framework/Transform.lua b/Source/Asura.Framework/Transform.lua new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Runner/AE_Compressor.cpp b/Source/Asura.Runner/AE_Compressor.cpp new file mode 100644 index 0000000..71fb839 --- /dev/null +++ b/Source/Asura.Runner/AE_Compressor.cpp @@ -0,0 +1,17 @@ +#ifndef __AE_COMPRESSOR_H__ +#define __AE_COMPRESSOR_H__ + +namespace AsuraEngine +{ + namespace Runner + { + + class Compressor + { + + }; + + } +} + +#endif \ No newline at end of file diff --git a/Source/Asura.Runner/Scripts/main.lua b/Source/Asura.Runner/Scripts/main.lua new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Runner/main.cpp b/Source/Asura.Runner/main.cpp new file mode 100644 index 0000000..08b4c0b --- /dev/null +++ b/Source/Asura.Runner/main.cpp @@ -0,0 +1,6 @@ +// 游戏会被打包成一个文件名为game.asu,runner读取并解析game.asu内容,运行游戏 + +int main() +{ + +} diff --git a/Source/Asura/AI/BehaviorTree.cpp b/Source/Asura/AI/BehaviorTree.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/AI/BehaviorTree.h b/Source/Asura/AI/BehaviorTree.h deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/AI/StateMachine.cpp b/Source/Asura/AI/StateMachine.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/AI/StateMachine.h b/Source/Asura/AI/StateMachine.h deleted file mode 100644 index 17f8945..0000000 --- a/Source/Asura/AI/StateMachine.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef __AE_STATEMACHINE_H__ -#define __AE_STATEMACHINE_H__ - -#include "StateMap.h" -#include "Component.h" - -namespace AsuraEngine -{ - namespace AI - { - - /// - /// 作为state map的代理 - /// - class StateMachine : public Component - { - public: - - - - private: - - /// - /// Statemachine 所使用的state图 - /// - StateMap* mStateMap; - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/AI/StateMap.cpp b/Source/Asura/AI/StateMap.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/AI/StateMap.h b/Source/Asura/AI/StateMap.h deleted file mode 100644 index 873e1d9..0000000 --- a/Source/Asura/AI/StateMap.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __AE_STATEMAP_H__ -#define __AE_STATEMAP_H__ - -#include "Filesystem/Asset.h" - -namespace AsuraEngine -{ - namespace AI - { - - class StateMap : public Filesystem::Asset - { - public: - - - private: - - - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Asura.h b/Source/Asura/Asura.h deleted file mode 100644 index dfa0fa5..0000000 --- a/Source/Asura/Asura.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __AE_H__ -#define __AE_H__ - - - -#endif \ No newline at end of file diff --git a/Source/Asura/Audio/Sound.cpp b/Source/Asura/Audio/Sound.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Audio/Sound.h b/Source/Asura/Audio/Sound.h deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Audio/Source.cpp b/Source/Asura/Audio/Source.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Audio/Source.h b/Source/Asura/Audio/Source.h deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Component.cpp b/Source/Asura/Component.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Component.h b/Source/Asura/Component.h deleted file mode 100644 index 807bbba..0000000 --- a/Source/Asura/Component.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef __AE_COMPONENT_H__ -#define __AE_COMPONENT_H__ - -#include "GameObject.h" - -namespace AsuraEngine -{ - - class GameObject; - - /// - /// Component通过代码或者prefab附加在GameObject上。 - /// - class Component : public Object - { - public: - - virtual void OnEnable(); - virtual void OnEvent(); - virtual void OnUpdate(uint32 milliseconds); - virtual void OnRender(); - virtual void OnDisable(); - - protected: - - enum class EnableCallback - { - OnEnable = 1, - OnEvent = 1 << 1, - OnUpdate = 1 << 2, - OnRender = 1 << 3, - OnDisable = 1 << 4, - }; - - EnableCallback mEnabledCallbacks; - - GameObject* mGameObject; - - }; - -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Containers/Map.cpp b/Source/Asura/Containers/Map.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Containers/Map.h b/Source/Asura/Containers/Map.h deleted file mode 100644 index 2caedef..0000000 --- a/Source/Asura/Containers/Map.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __AE_MAP_H__ -#define __AE_MAP_H__ - -#include - -namespace AsuraEngine -{ - namespace Containers - { - - template - using Map = std::map; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Containers/Stack.cpp b/Source/Asura/Containers/Stack.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Containers/Stack.h b/Source/Asura/Containers/Stack.h deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Containers/String.cpp b/Source/Asura/Containers/String.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Containers/String.h b/Source/Asura/Containers/String.h deleted file mode 100644 index 3c806fb..0000000 --- a/Source/Asura/Containers/String.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef __AE_STRING_H__ -#define __AE_STRING_H__ - -#include - -namespace AsuraEngine -{ - namespace Containers - { - - /// - /// 封装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/Containers/StringMap.cpp b/Source/Asura/Containers/StringMap.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Containers/StringMap.hpp b/Source/Asura/Containers/StringMap.hpp deleted file mode 100644 index 94858a7..0000000 --- a/Source/Asura/Containers/StringMap.hpp +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef __AE_STRINGMAP_H__ -#define __AE_STRINGMAP_H__ - -#include "String.h" - -namespace AsuraEngine -{ - namespace Containers - { - - /// - /// 一个双向一一对应的映射,用来储存shader uniforms、statemathine state parameter的ID。 - /// - template - class StringMap - { - public: - - bool ContainsKey(const key_type& key); - - bool ContainsString(const String& str); - - String GetStringByKey(const key_type& key); - - key_type GetKeyByString(const String& str); - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Containers/UnorderedMap.hpp b/Source/Asura/Containers/UnorderedMap.hpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Containers/Vector.hpp b/Source/Asura/Containers/Vector.hpp deleted file mode 100644 index 9fbd52a..0000000 --- a/Source/Asura/Containers/Vector.hpp +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef __AE_VECTOR_HPP__ -#define __AE_VECTOR_HPP__ - -#include - -namespace AsuraEngine -{ - namespace Containers - { - template - using Vector = std::vector; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Exceptions/Exception.cpp b/Source/Asura/Exceptions/Exception.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Exceptions/Exception.h b/Source/Asura/Exceptions/Exception.h deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Factory.h b/Source/Asura/Factory.h deleted file mode 100644 index 0cccab2..0000000 --- a/Source/Asura/Factory.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __AE_FACTORY_H__ -#define __AE_FACTORY_H__ - -namespace AsuraEngine -{ - - class Factory - { - - }; - -} - -#endif \ No newline at end of file diff --git a/Source/Asura/FileSystem/AnimationImpoter.h b/Source/Asura/FileSystem/AnimationImpoter.h deleted file mode 100644 index 57fdfdb..0000000 --- a/Source/Asura/FileSystem/AnimationImpoter.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __AE_IMAGE_IMPORTER_H__ -#define __AE_IMAGE_IMPORTER_H___ - -namespace AsuraEngine -{ - namespace Filesystem - { - - /// - /// 从.asr导入animation - /// - class AnimationImporter - { - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/FileSystem/Asset.cpp b/Source/Asura/FileSystem/Asset.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/FileSystem/Asset.h b/Source/Asura/FileSystem/Asset.h deleted file mode 100644 index 9fc6607..0000000 --- a/Source/Asura/FileSystem/Asset.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __AE_ASSET_H__ -#define __AE_ASSET_H__ - -#include "Object.h" - -namespace AsuraEngine -{ - namespace Filesystem - { - - /// - /// Asset不会作为组件。 - /// - class Asset : public Object - { - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/FileSystem/ImageImpoter.h b/Source/Asura/FileSystem/ImageImpoter.h deleted file mode 100644 index ca7cb9a..0000000 --- a/Source/Asura/FileSystem/ImageImpoter.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __AE_IMAGE_IMPORTER_H__ -#define __AE_IMAGE_IMPORTER_H___ - -namespace AsuraEngine -{ - namespace Filesystem - { - - /// - /// 从.asr导入image - /// - class ImageImporter - { - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/FileSystem/Importer.h b/Source/Asura/FileSystem/Importer.h deleted file mode 100644 index b343a92..0000000 --- a/Source/Asura/FileSystem/Importer.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __AE_IMPORTER_H__ -#define __AE_IMPORTER_H__ - -namespace AsuraEngine -{ - namespace Filesystem - { - - class Importer - { - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/FileSystem/ParticleSystemImpoter.h b/Source/Asura/FileSystem/ParticleSystemImpoter.h deleted file mode 100644 index 92796f3..0000000 --- a/Source/Asura/FileSystem/ParticleSystemImpoter.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __AE_IMAGE_IMPORTER_H__ -#define __AE_IMAGE_IMPORTER_H___ - -namespace AsuraEngine -{ - namespace Filesystem - { - - /// - /// 从.asr导入particle system - /// - class ParticleSystemImporter - { - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/FileSystem/SpriteImpoter.h b/Source/Asura/FileSystem/SpriteImpoter.h deleted file mode 100644 index 0e157c1..0000000 --- a/Source/Asura/FileSystem/SpriteImpoter.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __AE_IMAGE_IMPORTER_H__ -#define __AE_IMAGE_IMPORTER_H___ - -namespace AsuraEngine -{ - namespace Filesystem - { - - /// - /// 从.asr导入sprite - /// - class SpriteImporter - { - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Font/TrueTypeFont.cpp b/Source/Asura/Font/TrueTypeFont.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Font/TrueTypeFont.h b/Source/Asura/Font/TrueTypeFont.h deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/GUI/Button.cpp b/Source/Asura/GUI/Button.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/GUI/README.md b/Source/Asura/GUI/README.md deleted file mode 100644 index 3e367c7..0000000 --- a/Source/Asura/GUI/README.md +++ /dev/null @@ -1 +0,0 @@ -immediate mode game gui \ No newline at end of file diff --git a/Source/Asura/GameObject.cpp b/Source/Asura/GameObject.cpp deleted file mode 100644 index 322f798..0000000 --- a/Source/Asura/GameObject.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "GameObject.h" - -namespace AsuraEngine -{ - - void GameObject::OnUpdate(uint32 milliseconds) - { - - } - -} diff --git a/Source/Asura/GameObject.h b/Source/Asura/GameObject.h deleted file mode 100644 index 85dc87f..0000000 --- a/Source/Asura/GameObject.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef __AE_GAMEOBJECT_H__ -#define __AE_GAMEOBJECT_H__ - -#include "./Containers/Vector.hpp" -#include "./Math/Vector2.h" - -#include "Object.h" -#include "Component.h" -#include "Transform.h" -#include "Manager.hpp" - -namespace AsuraEngine -{ - - /// - /// 游戏实体,由引擎管理。 - /// - class GameObject final : public Object - { - public: - - // 场景的回调函数 - - void OnEnable(); - void OnEvent(); - void OnUpdate(uint32 milliseconds); - void OnRender(); - void OnDisable(); - - // 设置transform,组件可以通过下列函数修改GameObject的位置、缩放和旋转 - - const Transform& GetTransform(); - const Math::Vector2& GetPosition(); - const Math::Vector2& GetScale(); - const Math::Vector2& GetRotation(); - void SetTransform(const Transform& transform); - void SetPosition(const Math::Vector2& position); - void SetScale(const Math::Vector2& scale); - void SetRotation(const Math::Vector2& rotation); - - template - inline T GetComponent() - { - return NULL; - } - - private: - - Transform mTransform; - Containers::Vector mComponents; - - }; - -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Graphics/Animation.cpp b/Source/Asura/Graphics/Animation.cpp deleted file mode 100644 index 47643aa..0000000 --- a/Source/Asura/Graphics/Animation.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "Animation.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - void Animation::OnEnable() - { - mSpriteRenderer = mGameObject->GetComponent(); - } - - void Animation::OnUpdate(uint32 milliseconds) - { - if (!mSpriteRenderer) - return; - mSpriteRenderer->SetSprite(NULL); - } - - } -} diff --git a/Source/Asura/Graphics/Animation.h b/Source/Asura/Graphics/Animation.h deleted file mode 100644 index 391da22..0000000 --- a/Source/Asura/Graphics/Animation.h +++ /dev/null @@ -1,128 +0,0 @@ -#ifndef __AE_ANIMATION_H__ -#define __AE_ANIMATION_H__ - -#include "Sprite.h" -#include "Component.h" -#include "Manager.hpp" -#include "SpriteRenderer.h" -#include "Containers/Map.h" -#include "Containers/Vector.hpp" -#include "Containers/StringMap.hpp" -#include "Filesystem/Asset.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - /// - /// 关键帧 - /// - struct Frame - { - uint mask; // - float time; - Sprite* sprite; - }; - - /// - /// Sprite动画,可以改变的有sprite的大小、旋转、缩放、image。Animation通过animator修改。 - /// - class Animation final : public Filesystem::Asset - { - public: - - enum UpdateMask - { - Scale = 1, - Position = 1 << 1, - Rotation = 1 << 2, - Sprite = 1 << 3 - }; - - struct Definition - { - - }; - - /// - /// 根据时间获得一帧 - /// - Frame GetFrame(float t); - - /// - /// 获得关键帧数量 - /// - uint GetKeyFrameCount(); - - /// - /// 是否循环 - /// - uint GetLoop(); - - /// - /// 获取总时间 - /// - uint GetDuration(); - - private: - - /// - /// 关键帧 - /// - Containers::Vector mFrames; - - /// - /// 总时长 - /// - float mDuration; - - /// - /// 是否循环 - /// - bool mLoop; - - /// - /// ID - /// - uint mID; - - UpdateMask mUpdateMask; - - }; - - class AnimationManager : public Manager - { - public: - - Containers::String GetAnimationName(uint ID); - - uint GetAnimationID(const Containers::String& name); - - Animation* GetAnimation(uint ID); - - Animation* GetAnimation(const Containers::String& name); - - /// - /// 添加动画并返回ID - /// - uint AddAnimation(Animation* animation); - - private: - - /// - /// 映射ID到animation - /// - Containers::StringMap mAnimationIDs; - - /// - /// 映射key到animation - /// - Containers::Map mAnimations; - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Graphics/Animator.cpp b/Source/Asura/Graphics/Animator.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/Animator.h b/Source/Asura/Graphics/Animator.h deleted file mode 100644 index 4d3d269..0000000 --- a/Source/Asura/Graphics/Animator.h +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef __AE_ANIMATOR_H__ -#define __AE_ANIMATOR_H__ - -#include "Component.h" -#include "Animation.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - /// - /// 控制animation的组件,主要是作为animation的代理 - /// - class Animator final : public Component - { - public: - - void OnEnable() override; - void OnUpdate(uint32 milliseconds) override; - - /// - /// 设置animation - /// - void SetAnimation(uint ID); - - /// - /// 设置animation - /// - void SetAnimation(Animation* animation); - - /// - /// 根据设置animation状态 - /// - void SetTime(float time); - - /// - /// 修改播放速度 - /// - void SetSpeed(float speed); - - /// - /// 设置是否循环 - /// - void SetLoop(bool isloop); - - /// - /// 根据关键帧修改animation - /// - void SetKeyFrame(uint keyFrame); - - /// - /// 设置到结束 - /// - void SetToBegin(); - - /// - /// 设置到开始 - /// - void SetToEnd(); - - /// - /// 暂停 - /// - void Pause(); - - private: - - /// - /// 当前的animation - /// - Animation* mAnimation; - - /// - /// Animation要求物体必须有一个sprite renderer组件 - /// - SpriteRenderer* mSpriteRenderer; - - /// - /// 播放速度,默认为1,dt = mSpeed * DELTA_TIME - /// - float mSpeed; - - /// - /// 当前执行的时间 - /// - float mTime; - - bool mLoop; - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Graphics/Camera.cpp b/Source/Asura/Graphics/Camera.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/Camera.h b/Source/Asura/Graphics/Camera.h deleted file mode 100644 index 699d342..0000000 --- a/Source/Asura/Graphics/Camera.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef __AE_CAMERA_H__ -#define __AE_CAMERA_H__ - -#include "RenderTarget.h" -#include "Component.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - /// - /// Orthographic Camera. - /// - class Camera : public Component - { - public: - - - private: - - /// - /// 渲染的目标 - /// - RenderTarget* mRenderTarget; - - /// - /// 是否渲染到屏幕上 - /// - bool mIsOnScreen; - - /// - /// 裁剪 - /// - bool mIsCulling; - - }; - - } -} - -#endif diff --git a/Source/Asura/Graphics/Canvas.cpp b/Source/Asura/Graphics/Canvas.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/Canvas.h b/Source/Asura/Graphics/Canvas.h deleted file mode 100644 index cd78194..0000000 --- a/Source/Asura/Graphics/Canvas.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __AE_Canvas_H__ -#define __AE_Canvas_H__ - -#include "Component.h" -#include "Texture.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - class Canvas : public Texture, public Component - { - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Graphics/CanvasRenderer.cpp b/Source/Asura/Graphics/CanvasRenderer.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/CanvasRenderer.h b/Source/Asura/Graphics/CanvasRenderer.h deleted file mode 100644 index ef188a5..0000000 --- a/Source/Asura/Graphics/CanvasRenderer.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __AE_CANVAS_RENDERER_H__ -#define __AE_CANVAS_RENDERER_H__ - -#include "Canvas.h" -#include "Renderer.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - class CanvasRenderer : public Renderer - { - public: - - void SetCanvas(Canvas* canvas); - Canvas* GetCanvas(); - - void SetBlendMode(); - - private: - - Canvas * mCanvas; - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Graphics/Color.cpp b/Source/Asura/Graphics/Color.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/Color.h b/Source/Asura/Graphics/Color.h deleted file mode 100644 index f172156..0000000 --- a/Source/Asura/Graphics/Color.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __AE_COLOR_H__ -#define __AE_COLOR_H__ - -#include "Type.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - /// - /// 32bits颜色 - /// - class Color - { - public: - - Color(byte r, byte g, byte b, byte a); - ~Color(); - - private: - - byte mR, mG, mB, mA; - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Graphics/Image.cpp b/Source/Asura/Graphics/Image.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/Image.h b/Source/Asura/Graphics/Image.h deleted file mode 100644 index 5b27079..0000000 --- a/Source/Asura/Graphics/Image.h +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef __AE_IMAGE_H__ -#define __AE_IMAGE_H__ - -#include "Math/Vector2.h" -#include "Manager.hpp" -#include "Texture.h" -#include "Color.h" -#include "Factory.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - class ImageFactory; - - /// - /// Image是图片从内存中载入后,读取进游戏后保存的结果。一个Image在内存、显存中只会保存一份,不会产生副本。需要特征 - /// 化的区别image,如锚点位置,缩放和旋转角度,使用sprite。基本是一个只读类。 - /// - class Image final : public Texture, public Filesystem::Asset - { - public: - - uint GetWidth(); - uint GetHeight(); - - /// - /// 获得某一个位置的像素 - /// - Color GetPixel(uint x, uint y); - - private: - - friend class ImageFactory; - - Image(Color* pixels, int width, int height); - ~Image(); - - /// - /// 大小(以像素为单位) - /// - uint mWidth, mHeight; - Color* mPixels; - - /// - /// ID - /// - uint mID; - - }; - - /// - /// - /// - class ImageManager : public Manager - { - public: - - /// - /// 通过ID获取路径,如果是程序创建的图片,返回String::Null - /// - Containers::String GetImagePath(uint ID); - - /// - /// 通过ID路径获取ID,如果没找到,返回0 - /// - uint GetImageID(const Containers::String& path); - - Image* GetImage(const Containers::String& path); - - Image* GetImage(const Containers::String& ID); - - uint AddImage(const Containers::String& path, Image* image); - - uint AddImage(Image* image); - - bool RemoveImage(uint ID); - - bool RemoveImage(Image* image); - - private: - - /// - /// 所有的image - /// - Containers::Map mImages; - - /// - /// image,路径和ID的映射。针对从.asr导入的image,通过路径可以拿到image。所以并不是所有的image都在此map中。 - /// 由程序创建的image只能通过ID来获取,所以程序中需要保留ID。 - /// - Containers::StringMap mImageIDs; - - }; - - /// - /// - /// - class ImageFactory : public Factory - { - public: - - /// - /// 从image pixel数据中构建image - /// - Image* ReadBuffer(Color* pixels, int width, int height); - - /// - /// 从image extern数据并返回 - /// - Image* Decode(); - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Graphics/Material.cpp b/Source/Asura/Graphics/Material.cpp deleted file mode 100644 index eaf9742..0000000 --- a/Source/Asura/Graphics/Material.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "Material.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - - - //-------------------------------------------------------------------------------------------------------- - - int Material::l_SetColor(lua_State* L) - { - - } - - } -} diff --git a/Source/Asura/Graphics/Material.h b/Source/Asura/Graphics/Material.h deleted file mode 100644 index 1cb3c88..0000000 --- a/Source/Asura/Graphics/Material.h +++ /dev/null @@ -1,189 +0,0 @@ -#ifndef __AE_MATERIAL_H__ -#define __AE_MATERIAL_H__ - -#include "Containers/Vector.hpp" -#include "Containers/String.h" -#include "Math/Vector2.h" -#include "Math/Vector3.h" -#include "Math/Vector4.h" -#include "Math/Matrix44.h" -#include "Scripting/Luax.hpp" - -#include "Shader.h" -#include "Texture.h" -#include "Manager.hpp" - -namespace AsuraEngine -{ - namespace Graphics - { - - class MaterialFactory; - - /// - /// 通过材质调整Shader中的uniforms变量。Shader将可以修改的变量暴露给material,每个材质可以差异化配置相同着色器的 - /// 不同参数,通过数据文件(.mat)实现,而不是在代码里配置。所以在Asura中,Shader无法直接应用到渲染流程而必须和一个 - /// 材质关联,由材质修改shader的uniforms,material充当了shader的代理。 - /// - class Material final : public Filesystem::Asset - { - public: - - enum class UniformsType - { - None = 0, - Float, - Int, - Vector2, - Vector3, - Vector4, - Matrix44, - Texture, - Color, - }; - - struct UniformsInfo - { - uint ID; // uniform变量的ID - UniformsType type; // uniform变量的类型 - union - { - float f; - int i; - Math::Vector2 v2; - Math::Vector3 v3; - Math::Vector4 v4; - Math::Matrix44 m44; - Texture* tex; - Color col; - }value; // uniform变量的值 - }; - - void SetShader(Shader* shader); - - // 设置Uniform变量,保存在材质中,渲染时上传到GPU - - /// - /// 获得uniform变量的ID,ID和name的map在shader间共享。设置uniform变量的值时,通过ID查询uniform变量名,在 - /// shader中找到uniform location并对这个location赋值。 - /// - static int GetUniformID(const Containers::String& name); - - void SetTexture(uint ID, Texture* texture); - void SetVector2(uint ID, Math::Vector2* vector2); - void SetVector3(uint ID, Math::Vector3* vector3); - void SetVector4(uint ID, Math::Vector4* vector4); - void SetMatrix44(uint ID, Math::Matrix44* matrix44); - void SetFloat(uint ID, float value); - void SetInteger(uint ID, int value); - void SetColor(uint ID, Color color); - - UniformsInfo GetUniformInfo(uint ID); - float GetUniformInfof(uint ID); - int GetUniformInfoi(uint ID); - Math::Vector2 GetUniformInfov2(uint ID); - Math::Vector3 GetUniformInfov3(uint ID); - Math::Vector4 GetUniformInfov4(uint ID); - Math::Matrix44 GetUniformInfom44(uint ID); - Texture* GetUniformInfotex(uint ID); - Color GetUniformInfocol(uint ID); - - // 上传顶点数据 - - void SetVertexAttributes(); - - private: - - friend class MaterialFactory; - - Material(); - Material(const Material& src); - ~Material(); - - /// - /// - /// - uint mID; - - /// - /// - /// - Shader* mShader; - - /// - /// Uniforms变量的值,映射ID到值 - /// - Containers::Map mUniforms; - - /// - /// 是否是共享的材质 - /// - bool mIsShared; - - //---------------------------------------------------------------------------------------------------- - - LUAX_DECL_FACTORY(Material); - - LUAX_DECL_METHOD(l_Clone); - - LUAX_DECL_METHOD(l_SetShader); - - LUAX_DECL_METHOD(l_SetTexture); - LUAX_DECL_METHOD(l_SetVector2); - LUAX_DECL_METHOD(l_SetVector3); - LUAX_DECL_METHOD(l_SetVector4); - LUAX_DECL_METHOD(l_SetMatrix44); - LUAX_DECL_METHOD(l_SetFloat); - LUAX_DECL_METHOD(l_SetInteger); - LUAX_DECL_METHOD(l_SetColor); - - LUAX_DECL_METHOD(l_GetUniformInfo); - LUAX_DECL_METHOD(l_GetUniformInfof); - LUAX_DECL_METHOD(l_GetUniformInfoi); - LUAX_DECL_METHOD(l_GetUniformInfov2); - LUAX_DECL_METHOD(l_GetUniformInfov3); - LUAX_DECL_METHOD(l_GetUniformInfov4); - LUAX_DECL_METHOD(l_GetUniformInfom44); - LUAX_DECL_METHOD(l_GetUniformInfotex); - LUAX_DECL_METHOD(l_GetUniformInfocol); - - LUAX_DECL_METHOD(l_SetVertexAttributes); - - }; - - class MaterialManager : public Manager - { - public: - - private: - - /// - /// 所有的image - /// - Containers::Map mImages; - - /// - /// image,路径和ID的映射。针对从.asr导入的image,通过路径可以拿到image。所以并不是所有的image都在此map中。 - /// 由程序创建的image只能通过ID来获取,所以程序中需要保留ID。 - /// - Containers::StringMap mImageIDs; - - }; - - class MaterialFactory : public Factory - { - public: - - /// - /// 拷贝一个material - /// - Material* Clone(Material* src); - - Material* Create(); - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Graphics/Mesh2D.cpp b/Source/Asura/Graphics/Mesh2D.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/Mesh2D.h b/Source/Asura/Graphics/Mesh2D.h deleted file mode 100644 index a113f4c..0000000 --- a/Source/Asura/Graphics/Mesh2D.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __AE_MESH2D_H__ -#define __AE_MESH2D_H__ - -namespace AsuraEngine -{ - namespace Graphics - { - - /// - /// 2D mesh,用于做一些UV动画 - /// - class Mesh2D - { - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Graphics/Mesh2DRenderer.cpp b/Source/Asura/Graphics/Mesh2DRenderer.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/Mesh2DRenderer.h b/Source/Asura/Graphics/Mesh2DRenderer.h deleted file mode 100644 index fcbfd2c..0000000 --- a/Source/Asura/Graphics/Mesh2DRenderer.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef __AE_MESH2D_H__ -#define __AE_MESH2D_H__ - -#include "FileSystem/Asset.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - class Mesh2D : public Filesystem::Asset - { - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Graphics/OpenGL.cpp b/Source/Asura/Graphics/OpenGL.cpp deleted file mode 100644 index ec23f52..0000000 --- a/Source/Asura/Graphics/OpenGL.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "OpenGL.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - - - } -} \ No newline at end of file diff --git a/Source/Asura/Graphics/OpenGL.h b/Source/Asura/Graphics/OpenGL.h deleted file mode 100644 index f46497b..0000000 --- a/Source/Asura/Graphics/OpenGL.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __AE_OPENGL_H__ -#define __AE_OPENGL_H__ - -namespace AsuraEngine -{ - namespace Graphics - { - - class OpenGL - { - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Graphics/ParticleSystem.cpp b/Source/Asura/Graphics/ParticleSystem.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/ParticleSystem.h b/Source/Asura/Graphics/ParticleSystem.h deleted file mode 100644 index 078427a..0000000 --- a/Source/Asura/Graphics/ParticleSystem.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __AE_PARTICLESYSTEM_H__ -#define __AE_PARTICLESYSTEM_H__ - -#include "Component.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - /// - /// 粒子系统 - /// - class ParticleSystem final : public Component - { - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Graphics/Prefab.cpp b/Source/Asura/Graphics/Prefab.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/Prefab.h b/Source/Asura/Graphics/Prefab.h deleted file mode 100644 index 82a8da2..0000000 --- a/Source/Asura/Graphics/Prefab.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __AE_PREFAB_H__ -#define __AE_PREFAB_H__ - -#include "Manager.hpp" -#include "FileSystem/Asset.h" - -namespace AsuraEngine -{ - - /// - /// Prefab用来构建GameObject - /// - class Prefab : public Filesystem::Asset - { - - }; - - class PrefabManager : public Manager - { - - }; - - class PrefabFactory - { - - }; - -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Graphics/Renderer.cpp b/Source/Asura/Graphics/Renderer.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/Renderer.h b/Source/Asura/Graphics/Renderer.h deleted file mode 100644 index c3677a7..0000000 --- a/Source/Asura/Graphics/Renderer.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef __AE_RENDERER_H__ -#define __AE_RENDERER_H__ - -#include "Component.h" -#include "Material.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - /// - /// 抽象基类,渲染由Renderer类处理,每个Renderer必须具备一个材质。 - /// - class Renderer : public Component - { - public: - - /// - /// 一旦调用此方法,就会拷贝shared material,调用此方法意味着要对material的配置进行修改,如果此时使用的材质是 - /// shared material,则需要拷贝一份,避免影响其他共享的renderer。 - /// - Material* GetMaterial(); - - /// - /// 渲染回调函数 - /// - virtual void OnRender() = 0; - - protected: - - Material* mMaterial; - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Graphics/Shader.cpp b/Source/Asura/Graphics/Shader.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/Shader.h b/Source/Asura/Graphics/Shader.h deleted file mode 100644 index c3c67ad..0000000 --- a/Source/Asura/Graphics/Shader.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef __AE_SHADER_H__ -#define __AE_SHADER_H__ - -#include "luax/luax.h" - -#include "FileSystem/Asset.h" -#include "Containers/Map.h" -#include "Containers/StringMap.hpp" -#include "Object.h" -#include "Color.h" -#include "Manager.hpp" - -namespace AsuraEngine -{ - namespace Graphics - { - - class Material; - - /// - /// 一个shader是一个在材质间共享的程序。Shader本身不保存uniforms和顶点数据,只保存uniforms location。 - /// - class Shader final : public Filesystem::Asset - { - public: - - Shader(); - ~Shader(); - - private: - - friend class Material; - - /// - /// 保存了所有shader的uniforms变量的ID映射。 - /// - static Containers::StringMap sUniformsID; - - /// - /// 获得uniform变量的ID。 - /// - static int GetUniformID(const Containers::String& name); - - /// - /// 设置内置变量: - /// vec2 Asura_Time x值为进入当前场景开始的时间,y值为上一帧的时间间隔 - /// vec2 Asura_RenderTargetSize RT的大小,以像素为单位 - /// Texture Asura_MainTexture 主纹理 - /// - void SetBuiltInUniforms(); - - /// - /// 映射uniforms ID到location。 - /// - Containers::Map mLocations; - - }; - - class ShaderManager final : public Manager - { - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Graphics/ShapeRenderer.cpp b/Source/Asura/Graphics/ShapeRenderer.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/ShapeRenderer.h b/Source/Asura/Graphics/ShapeRenderer.h deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/Sprite.cpp b/Source/Asura/Graphics/Sprite.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/Sprite.h b/Source/Asura/Graphics/Sprite.h deleted file mode 100644 index b621f1b..0000000 --- a/Source/Asura/Graphics/Sprite.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef __AE_SPRITE_H__ -#define __AE_SPRITE_H__ - -#include "Math/Vector2.h" -#include "Transform.h" -#include "Component.h" -#include "Image.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - /// - /// Sprite是控制image的代理,image是在sprite间共享的数据,sprite可以区别化处理image的属性,如旋转,缩放等。 - /// - class Sprite final : public Filesystem::Asset - { - public: - - enum Type - { - - }; - - /// - /// 对齐方式 - /// - enum Align - { - - }; - - struct SpriteDef - { - Image* image; - Align align; - Math::Vector2 anchor; - Math::Vector2 size; - }; - - Sprite(SpriteDef definition); - ~Sprite(); - - private: - - /// - /// 锚点坐标 - /// - Math::Vector2 mAnchor; - - /// - /// 大小 - /// - Math::Vector2 mSize; - - /// - /// 绑定的image - /// - Image* mImage; - - //---------------------------------------------------------------------------------------------------- - - - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Graphics/SpriteBatch.cpp b/Source/Asura/Graphics/SpriteBatch.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/SpriteBatch.h b/Source/Asura/Graphics/SpriteBatch.h deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/SpriteRenderer.cpp b/Source/Asura/Graphics/SpriteRenderer.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/SpriteRenderer.h b/Source/Asura/Graphics/SpriteRenderer.h deleted file mode 100644 index bd81509..0000000 --- a/Source/Asura/Graphics/SpriteRenderer.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef __AE_SPRITE_RENDERER_H__ -#define __AE_SPRITE_RENDERER_H__ - -#include "Renderer.h" -#include "Sprite.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - class SpriteRenderer final : public Renderer - { - public: - - void SetSprite(Sprite* sprite); - - void OnRender() override; - - private: - - /// - /// 用来渲染的sprite - /// - Sprite* mSprite; - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Graphics/Texture.cpp b/Source/Asura/Graphics/Texture.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Graphics/Texture.h b/Source/Asura/Graphics/Texture.h deleted file mode 100644 index 8195fc9..0000000 --- a/Source/Asura/Graphics/Texture.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __AE_TEXTURE_H__ -#define __AE_TEXTURE_H__ - -#include "Object.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - /// - /// 2D纹理(抽象类),在2d mesh和render target中被使用 - /// - class Texture : public Object - { - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Input/Keyboard.cpp b/Source/Asura/Input/Keyboard.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Input/Keyboard.h b/Source/Asura/Input/Keyboard.h deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Layer.cpp b/Source/Asura/Layer.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Layer.h b/Source/Asura/Layer.h deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Manager.hpp b/Source/Asura/Manager.hpp deleted file mode 100644 index 5a94889..0000000 --- a/Source/Asura/Manager.hpp +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __AE_MANAGER_H__ -#define __AE_MANAGER_H__ - -namespace AsuraEngine -{ - - class Manager - { - - }; - -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Math/Curve.cpp b/Source/Asura/Math/Curve.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Math/Curve.h b/Source/Asura/Math/Curve.h deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Math/Functions.cpp b/Source/Asura/Math/Functions.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Math/Functions.h b/Source/Asura/Math/Functions.h deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Math/Matrix44.cpp b/Source/Asura/Math/Matrix44.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Math/Matrix44.h b/Source/Asura/Math/Matrix44.h deleted file mode 100644 index 5bc44e7..0000000 --- a/Source/Asura/Math/Matrix44.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __AE_MATRIX44_H__ -#define __AE_MATRIX44_H__ - -namespace AsuraEngine -{ - namespace Math - { - - /// - /// 4x4矩阵 - /// - class Matrix44 - { - public: - - private: - - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Math/RangedValue.cpp b/Source/Asura/Math/RangedValue.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Math/RangedValue.h b/Source/Asura/Math/RangedValue.h deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Math/Vector2.cpp b/Source/Asura/Math/Vector2.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Math/Vector2.h b/Source/Asura/Math/Vector2.h deleted file mode 100644 index d5f8739..0000000 --- a/Source/Asura/Math/Vector2.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __AE_VECTOR2_H__ -#define __AE_VECTOR2_H__ - -namespace AsuraEngine -{ - namespace Math - { - - class Vector2 - { - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Math/Vector3.cpp b/Source/Asura/Math/Vector3.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Math/Vector3.h b/Source/Asura/Math/Vector3.h deleted file mode 100644 index 14fdd88..0000000 --- a/Source/Asura/Math/Vector3.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __AE_VECTOR3_H__ -#define __AE_VECTOR3_H__ - -namespace AsuraEngine -{ - namespace Math - { - - class Vector3 - { - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Math/Vector4.cpp b/Source/Asura/Math/Vector4.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Math/Vector4.h b/Source/Asura/Math/Vector4.h deleted file mode 100644 index a6e8b38..0000000 --- a/Source/Asura/Math/Vector4.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __AE_VECTOR4_H__ -#define __AE_VECTOR4_H__ - -namespace AsuraEngine -{ - namespace Math - { - - class Vector4 - { - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Object.cpp b/Source/Asura/Object.cpp deleted file mode 100644 index 587dca7..0000000 --- a/Source/Asura/Object.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "Object.h" - -namespace AsuraEngine -{ - - Object::Object() - : mRC(0) - { - - } - - void Object::Retain(Object* obj) - { - ++obj->mRC; - } - - void Object::Release(Object* obj) - { - if (--obj->mRC == 0) - delete obj; - } - -} \ No newline at end of file diff --git a/Source/Asura/Object.h b/Source/Asura/Object.h deleted file mode 100644 index 3dace26..0000000 --- a/Source/Asura/Object.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef __AE_OBJECT_H__ -#define __AE_OBJECT_H__ - -#include "Type.h" - -namespace AsuraEngine -{ - - /// - /// 基类 - /// - class Object - { - public: - - Object(); - - virtual ~Object(); - - static void Retain(Object* obj); - - static void Release(Object* obj); - - private: - - int mRC; // 引用数 - - }; - -} - -#endif \ No newline at end of file diff --git a/Source/Asura/ObjectPool.cpp b/Source/Asura/ObjectPool.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/ObjectPool.h b/Source/Asura/ObjectPool.h deleted file mode 100644 index bf97858..0000000 --- a/Source/Asura/ObjectPool.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __AE_OBJECT_POOL_H__ -#define __AE_OBJECT_POOL_H__ - -namespace AsuraEngine -{ - - class ObjectPool - { - - }; - -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Physics/World.h b/Source/Asura/Physics/World.h deleted file mode 100644 index 7000351..0000000 --- a/Source/Asura/Physics/World.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __AE_WORLD_H__ -#define __AE_WORLD_H__ - -namespace AsuraEngine -{ - namespace Physics - { - - - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Profiler/Stats.cpp b/Source/Asura/Profiler/Stats.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Profiler/Stats.h b/Source/Asura/Profiler/Stats.h deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Scene.cpp b/Source/Asura/Scene.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Scene.h b/Source/Asura/Scene.h deleted file mode 100644 index 742d872..0000000 --- a/Source/Asura/Scene.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef __AE_SCENE_H__ -#define __AE_SCENE_H__ - -#include "FileSystem/Asset.h" -#include "Containers/Vector.hpp" -#include "GameObject.h" - -namespace AsuraEngine -{ - - /// - /// 游戏场景 - /// - class Scene final : public Filesystem::Asset - { - public: - - // - - private: - - Containers::Vector mGameObjects; - - }; - -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Scripting/Luax.hpp b/Source/Asura/Scripting/Luax.hpp deleted file mode 100644 index b371166..0000000 --- a/Source/Asura/Scripting/Luax.hpp +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef __AE_LUAX_H__ -#define __AE_LUAX_H__ - -#include "Lua51/lua.h" -#include "Lua51/lauxlib.h" -#include "Luax/luax.h" - -#endif \ No newline at end of file diff --git a/Source/Asura/Time/Timer.cpp b/Source/Asura/Time/Timer.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Time/Timer.h b/Source/Asura/Time/Timer.h deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Transform.cpp b/Source/Asura/Transform.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura/Transform.h b/Source/Asura/Transform.h deleted file mode 100644 index cca7575..0000000 --- a/Source/Asura/Transform.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __AE_TRANSFORM_H__ -#define __AE_TRANSFORM_H__ - -#include "Object.h" -#include "Math/Vector2.h" - -namespace AsuraEngine -{ - - /// - /// Transform作为基本属性,不作为组件处理 - /// - class Transform final : public Object - { - private: - Math::Vector2 position; - Math::Vector2 rotation; - Math::Vector2 scale; - - }; - -} - -#endif \ No newline at end of file diff --git a/Source/Asura/Type.h b/Source/Asura/Type.h deleted file mode 100644 index 2a2bc70..0000000 --- a/Source/Asura/Type.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __AE_TYPE_H__ -#define __AE_TYPE_H__ - -#include - -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 uint32_t uint; - typedef int32_t sint; - -} - -#endif \ No newline at end of file diff --git a/Source/Editor/main.cpp b/Source/Editor/main.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Runner/AE_Compressor.cpp b/Source/Runner/AE_Compressor.cpp deleted file mode 100644 index 71fb839..0000000 --- a/Source/Runner/AE_Compressor.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __AE_COMPRESSOR_H__ -#define __AE_COMPRESSOR_H__ - -namespace AsuraEngine -{ - namespace Runner - { - - class Compressor - { - - }; - - } -} - -#endif \ No newline at end of file diff --git a/Source/Runner/Scripts/main.lua b/Source/Runner/Scripts/main.lua deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Runner/main.cpp b/Source/Runner/main.cpp deleted file mode 100644 index 08b4c0b..0000000 --- a/Source/Runner/main.cpp +++ /dev/null @@ -1,6 +0,0 @@ -// 游戏会被打包成一个文件名为game.asu,runner读取并解析game.asu内容,运行游戏 - -int main() -{ - -} -- cgit v1.1-26-g67d0