diff --git a/appveyor.yml b/appveyor.yml
index 9f7cf1bd..49c87f43 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -54,7 +54,8 @@ for:
- master
only_commits:
message: /\[build\]/
- matrix:
+ environment:
+ matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
VS_PLATFORM_TOOLSET: v142
diff --git a/projects/kiwano.vcxproj b/projects/kiwano.vcxproj
index a1b790a9..070d909b 100644
--- a/projects/kiwano.vcxproj
+++ b/projects/kiwano.vcxproj
@@ -11,7 +11,6 @@
-
@@ -48,7 +47,7 @@
-
+
@@ -58,7 +57,7 @@
-
+
@@ -67,21 +66,22 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -116,7 +116,7 @@
-
+
@@ -126,9 +126,6 @@
-
-
-
@@ -138,7 +135,11 @@
-
+
+
+
+
+
@@ -201,7 +202,7 @@
Level3
Disabled
true
- None
+ EditAndContinue
true
false
@@ -218,7 +219,7 @@
true
false
true
- None
+ EditAndContinue
true
false
diff --git a/projects/kiwano.vcxproj.filters b/projects/kiwano.vcxproj.filters
index 586733bf..e3db99d4 100644
--- a/projects/kiwano.vcxproj.filters
+++ b/projects/kiwano.vcxproj.filters
@@ -37,6 +37,9 @@
{86e2d0f2-a9d0-4456-b6a5-d480228bbf82}
+
+ {30333461-e9bc-4709-84bd-ce6e0e1a3079}
+
@@ -96,21 +99,6 @@
base
-
- renderer
-
-
- renderer
-
-
- renderer
-
-
- renderer
-
-
- renderer
-
math
@@ -140,9 +128,6 @@
-
- math
-
math
@@ -152,9 +137,6 @@
base
-
- base
-
utils
@@ -174,9 +156,6 @@
utils
-
- renderer
-
base
@@ -198,12 +177,6 @@
2d
-
- renderer
-
-
- renderer
-
2d\action
@@ -222,9 +195,6 @@
2d\action
-
- renderer
-
utils
@@ -255,9 +225,6 @@
core
-
- base
-
core
@@ -267,9 +234,6 @@
2d
-
- renderer
-
2d\action
@@ -282,14 +246,11 @@
base
-
- renderer
+
+ math
-
- renderer
-
-
- renderer
+
+ base
renderer
@@ -297,9 +258,51 @@
renderer
+
+ renderer
+
+
+ renderer
+
+
+ renderer
+
+
+ renderer
+
renderer
+
+ renderer
+
+
+ renderer
+
+
+ renderer\win32
+
+
+ renderer\win32
+
+
+ renderer\win32
+
+
+ renderer\win32
+
+
+ renderer\win32
+
+
+ renderer\win32
+
+
+ renderer\win32
+
+
+ renderer
+
@@ -335,18 +338,6 @@
base
-
- renderer
-
-
- renderer
-
-
- renderer
-
-
- renderer
-
platform
@@ -359,9 +350,6 @@
base
-
- base
-
utils
@@ -398,12 +386,6 @@
2d
-
- renderer
-
-
- renderer
-
2d\action
@@ -419,9 +401,6 @@
2d\action
-
- renderer
-
utils
@@ -434,9 +413,6 @@
2d
-
- renderer
-
2d\action
@@ -449,14 +425,8 @@
base
-
- renderer
-
-
- renderer
-
-
- renderer
+
+ base
renderer
@@ -464,8 +434,44 @@
renderer
+
+ renderer
+
+
+ renderer
+
+
+ renderer
+
+
+ renderer
+
renderer
+
+ renderer
+
+
+ renderer
+
+
+ renderer\win32
+
+
+ renderer\win32
+
+
+ renderer\win32
+
+
+ renderer\win32
+
+
+ renderer\win32
+
+
+ renderer
+
\ No newline at end of file
diff --git a/src/kiwano-audio/src/Player.h b/src/kiwano-audio/src/Player.h
index 290c7de7..cb9da0a0 100644
--- a/src/kiwano-audio/src/Player.h
+++ b/src/kiwano-audio/src/Player.h
@@ -20,7 +20,7 @@
#pragma once
#include
-#include
+#include
#include "Sound.h"
namespace kiwano
@@ -31,7 +31,7 @@ namespace kiwano
// 音乐播放器
class KGE_API Player
- : protected Object
+ : protected ObjectBase
{
using MusicMap = Map;
diff --git a/src/kiwano-audio/src/Sound.h b/src/kiwano-audio/src/Sound.h
index fa505676..9cf9e71f 100644
--- a/src/kiwano-audio/src/Sound.h
+++ b/src/kiwano-audio/src/Sound.h
@@ -20,7 +20,7 @@
#pragma once
#include
-#include
+#include
#include
#include
@@ -32,7 +32,7 @@ namespace kiwano
// 音乐对象
class KGE_API Sound
- : public Object
+ : public ObjectBase
{
public:
Sound();
diff --git a/src/kiwano-audio/src/Transcoder.cpp b/src/kiwano-audio/src/Transcoder.cpp
index 4d2d7baf..7189690c 100644
--- a/src/kiwano-audio/src/Transcoder.cpp
+++ b/src/kiwano-audio/src/Transcoder.cpp
@@ -24,9 +24,9 @@
#include
#include
-#include
#include
#include
+#include
#include
#include "audio-modules.h"
#include "Transcoder.h"
diff --git a/src/kiwano-network/src/HttpRequest.hpp b/src/kiwano-network/src/HttpRequest.hpp
index 79335b4f..5f147e57 100644
--- a/src/kiwano-network/src/HttpRequest.hpp
+++ b/src/kiwano-network/src/HttpRequest.hpp
@@ -21,7 +21,7 @@
#pragma once
#include
#include
-#include
+#include
namespace kiwano
{
@@ -30,7 +30,7 @@ namespace kiwano
typedef Function ResponseCallback;
class KGE_API HttpRequest
- : public Object
+ : public ObjectBase
{
public:
enum class Type
diff --git a/src/kiwano-network/src/HttpResponse.hpp b/src/kiwano-network/src/HttpResponse.hpp
index 094361b4..c5d35ffe 100644
--- a/src/kiwano-network/src/HttpResponse.hpp
+++ b/src/kiwano-network/src/HttpResponse.hpp
@@ -21,14 +21,14 @@
#pragma once
#include
#include
-#include
+#include
namespace kiwano
{
namespace network
{
class KGE_API HttpResponse
- : public Object
+ : public ObjectBase
{
public:
inline HttpResponse(HttpRequestPtr request)
diff --git a/src/kiwano/2d/Actor.cpp b/src/kiwano/2d/Actor.cpp
index 0d2b740d..8ef488f5 100644
--- a/src/kiwano/2d/Actor.cpp
+++ b/src/kiwano/2d/Actor.cpp
@@ -71,7 +71,7 @@ namespace kiwano
OnUpdate(dt);
}
- if (!children_.is_empty())
+ if (!children_.item_empty())
{
ActorPtr next;
for (auto child = children_.first_item(); child; child = next)
@@ -89,7 +89,7 @@ namespace kiwano
UpdateTransform();
- if (children_.is_empty())
+ if (children_.item_empty())
{
OnRender(renderer);
}
@@ -407,7 +407,7 @@ namespace kiwano
{
if (!IsName(name))
{
- Object::SetName(name);
+ ObjectBase::SetName(name);
hash_name_ = std::hash{}(name);
}
}
@@ -609,7 +609,7 @@ namespace kiwano
{
KGE_ASSERT(child && "Actor::RemoveChild failed, NULL pointer exception");
- if (children_.is_empty())
+ if (children_.item_empty())
return;
if (child)
@@ -622,7 +622,7 @@ namespace kiwano
void Actor::RemoveChildren(String const& child_name)
{
- if (children_.is_empty())
+ if (children_.item_empty())
{
return;
}
diff --git a/src/kiwano/2d/Actor.h b/src/kiwano/2d/Actor.h
index 55f8f105..e8764689 100644
--- a/src/kiwano/2d/Actor.h
+++ b/src/kiwano/2d/Actor.h
@@ -32,7 +32,7 @@ namespace kiwano
// 角色
class KGE_API Actor
- : public Object
+ : public ObjectBase
, public TimerManager
, public ActionManager
, public EventDispatcher
diff --git a/src/kiwano/2d/DebugActor.cpp b/src/kiwano/2d/DebugActor.cpp
index 0dbe72d3..a2242f93 100644
--- a/src/kiwano/2d/DebugActor.cpp
+++ b/src/kiwano/2d/DebugActor.cpp
@@ -82,9 +82,9 @@ namespace kiwano
ss << "Fps: " << frame_time_.size() << std::endl;
#if defined(KGE_DEBUG)
- if (Object::IsTracingLeaks())
+ if (ObjectBase::IsTracingLeaks())
{
- ss << "Objects: " << Object::__GetTracingObjects().size() << std::endl;
+ ss << "Objects: " << ObjectBase::__GetTracingObjects().size() << std::endl;
}
#endif
diff --git a/src/kiwano/2d/Frame.h b/src/kiwano/2d/Frame.h
index 93569ee9..3ee92fb3 100644
--- a/src/kiwano/2d/Frame.h
+++ b/src/kiwano/2d/Frame.h
@@ -25,7 +25,7 @@ namespace kiwano
{
// 帧图像
class KGE_API Frame
- : public Object
+ : public ObjectBase
{
public:
Frame();
diff --git a/src/kiwano/2d/FrameSequence.h b/src/kiwano/2d/FrameSequence.h
index 863fa38e..09c0ccde 100644
--- a/src/kiwano/2d/FrameSequence.h
+++ b/src/kiwano/2d/FrameSequence.h
@@ -25,7 +25,7 @@ namespace kiwano
{
// 序列帧
class KGE_API FrameSequence
- : public Object
+ : public ObjectBase
{
public:
FrameSequence();
diff --git a/src/kiwano/2d/Transition.h b/src/kiwano/2d/Transition.h
index 67dc8900..a70b89cd 100644
--- a/src/kiwano/2d/Transition.h
+++ b/src/kiwano/2d/Transition.h
@@ -29,7 +29,7 @@ namespace kiwano
// 舞台过渡
class KGE_API Transition
- : public Object
+ : public ObjectBase
{
friend class Director;
diff --git a/src/kiwano/2d/action/Action.h b/src/kiwano/2d/action/Action.h
index 427bb215..ce7eb0c2 100644
--- a/src/kiwano/2d/action/Action.h
+++ b/src/kiwano/2d/action/Action.h
@@ -28,7 +28,7 @@ namespace kiwano
class ActionManager;
class KGE_API Action
- : public Object
+ : public ObjectBase
, protected intrusive_list_item
{
friend class ActionManager;
diff --git a/src/kiwano/2d/action/ActionGroup.cpp b/src/kiwano/2d/action/ActionGroup.cpp
index fd1a646a..0cd36d40 100644
--- a/src/kiwano/2d/action/ActionGroup.cpp
+++ b/src/kiwano/2d/action/ActionGroup.cpp
@@ -45,7 +45,7 @@ namespace kiwano
void ActionGroup::Init(ActorPtr target)
{
- if (actions_.is_empty())
+ if (actions_.item_empty())
{
Done();
return;
@@ -135,7 +135,7 @@ namespace kiwano
ActionPtr ActionGroup::Reverse() const
{
auto group = new (std::nothrow) ActionGroup();
- if (group && !actions_.is_empty())
+ if (group && !actions_.item_empty())
{
for (auto action = actions_.last_item(); action; action = action->prev_item())
{
diff --git a/src/kiwano/2d/action/ActionManager.cpp b/src/kiwano/2d/action/ActionManager.cpp
index 3428bd8a..2a0c5ac5 100644
--- a/src/kiwano/2d/action/ActionManager.cpp
+++ b/src/kiwano/2d/action/ActionManager.cpp
@@ -26,7 +26,7 @@ namespace kiwano
{
void ActionManager::UpdateActions(ActorPtr target, Duration dt)
{
- if (actions_.is_empty() || !target)
+ if (actions_.item_empty() || !target)
return;
ActionPtr next;
@@ -55,7 +55,7 @@ namespace kiwano
ActionPtr ActionManager::GetAction(String const & name)
{
- if (actions_.is_empty())
+ if (actions_.item_empty())
return nullptr;
for (auto action = actions_.first_item().get(); action; action = action->next_item().get())
@@ -66,7 +66,7 @@ namespace kiwano
void ActionManager::ResumeAllActions()
{
- if (actions_.is_empty())
+ if (actions_.item_empty())
return;
for (auto action = actions_.first_item().get(); action; action = action->next_item().get())
@@ -77,7 +77,7 @@ namespace kiwano
void ActionManager::PauseAllActions()
{
- if (actions_.is_empty())
+ if (actions_.item_empty())
return;
for (auto action = actions_.first_item().get(); action; action = action->next_item().get())
@@ -88,7 +88,7 @@ namespace kiwano
void ActionManager::StopAllActions()
{
- if (actions_.is_empty())
+ if (actions_.item_empty())
return;
for (auto action = actions_.first_item().get(); action; action = action->next_item().get())
diff --git a/src/kiwano/2d/include-forwards.h b/src/kiwano/2d/include-forwards.h
index 97473233..edbbf0ae 100644
--- a/src/kiwano/2d/include-forwards.h
+++ b/src/kiwano/2d/include-forwards.h
@@ -23,10 +23,9 @@
#include "../base/time.h"
#include "../base/RefCounter.hpp"
#include "../base/SmartPtr.hpp"
-#include "../base/ComPtr.hpp"
-#include "../base/Object.h"
+#include "../base/ObjectBase.h"
#include "../base/types.h"
-#include "../math/helper.h"
+#include "../math/math.h"
#include "../renderer/Color.h"
namespace kiwano
diff --git a/src/kiwano/base/AsyncTask.h b/src/kiwano/base/AsyncTask.h
index f1d31efa..15551475 100644
--- a/src/kiwano/base/AsyncTask.h
+++ b/src/kiwano/base/AsyncTask.h
@@ -19,7 +19,7 @@
// THE SOFTWARE.
#pragma once
-#include "Object.h"
+#include "ObjectBase.h"
#include
#include
@@ -31,7 +31,7 @@ namespace kiwano
typedef Function AsyncTaskCallback;
class AsyncTask
- : public Object
+ : public ObjectBase
{
public:
AsyncTask();
diff --git a/src/kiwano/base/EventDispatcher.cpp b/src/kiwano/base/EventDispatcher.cpp
index 8dc93e26..d46fbb3b 100644
--- a/src/kiwano/base/EventDispatcher.cpp
+++ b/src/kiwano/base/EventDispatcher.cpp
@@ -25,7 +25,7 @@ namespace kiwano
{
void EventDispatcher::Dispatch(Event& evt)
{
- if (listeners_.is_empty())
+ if (listeners_.item_empty())
return;
EventListenerPtr next;
diff --git a/src/kiwano/base/EventListener.h b/src/kiwano/base/EventListener.h
index 40ed7aa0..f07e83f3 100644
--- a/src/kiwano/base/EventListener.h
+++ b/src/kiwano/base/EventListener.h
@@ -21,7 +21,7 @@
#pragma once
#include "../core/core.h"
#include "../base/SmartPtr.hpp"
-#include "Object.h"
+#include "ObjectBase.h"
#include "Event.hpp"
namespace kiwano
@@ -34,7 +34,7 @@ namespace kiwano
// 事件监听器
class KGE_API EventListener
- : public Object
+ : public ObjectBase
, protected intrusive_list_item
{
friend class EventDispatcher;
diff --git a/src/kiwano/base/Input.h b/src/kiwano/base/Input.h
index e23b3796..2cbc24bc 100644
--- a/src/kiwano/base/Input.h
+++ b/src/kiwano/base/Input.h
@@ -21,7 +21,7 @@
#pragma once
#include "../macros.h"
#include "../core/core.h"
-#include "../math/helper.h"
+#include "../math/math.h"
#include "keys.hpp"
#include "Component.h"
diff --git a/src/kiwano/base/Object.cpp b/src/kiwano/base/ObjectBase.cpp
similarity index 78%
rename from src/kiwano/base/Object.cpp
rename to src/kiwano/base/ObjectBase.cpp
index 888e9108..b3020125 100644
--- a/src/kiwano/base/Object.cpp
+++ b/src/kiwano/base/ObjectBase.cpp
@@ -18,7 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#include "Object.h"
+#include "ObjectBase.h"
#include "Logger.h"
#include
@@ -27,12 +27,12 @@ namespace kiwano
namespace
{
bool tracing_leaks = false;
- Vector