diff --git a/.editorconfig b/.editorconfig
index c2b8e9f0..433e5b04 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -5,7 +5,7 @@ root = true
# Unix-style newlines with a newline ending every file
[*]
-end_of_line = lf
+end_of_line = crlf
insert_final_newline = true
# Matches multiple files with brace expansion notation
@@ -14,7 +14,7 @@ insert_final_newline = true
charset = gb2312
# 4 space indentation
-indent_style = space
+indent_style = tab
indent_size = 4
# Matches the exact files
diff --git a/kiwano-audio/kiwano-audio.h b/kiwano-audio/kiwano-audio.h
index 5f287560..8f6e027a 100644
--- a/kiwano-audio/kiwano-audio.h
+++ b/kiwano-audio/kiwano-audio.h
@@ -19,7 +19,6 @@
// THE SOFTWARE.
#pragma once
-#include "kiwano/kiwano.h"
#include "src/audio.h"
#include "src/Sound.h"
diff --git a/kiwano-audio/kiwano-audio.vcxproj b/kiwano-audio/kiwano-audio.vcxproj
index c0ff43c9..13ea72f2 100644
--- a/kiwano-audio/kiwano-audio.vcxproj
+++ b/kiwano-audio/kiwano-audio.vcxproj
@@ -25,6 +25,11 @@
Win32
+
+
+ {ff7f943d-a89c-4e6c-97cf-84f7d8ff8edf}
+
+
{1B97937D-8184-426C-BE71-29A163DC76C9}
kiwano-audio
@@ -44,7 +49,7 @@
StaticLibrary
false
- true
+ false
Unicode
v100
v110
@@ -66,13 +71,13 @@
- $(ProjectDir)\output\$(Configuration).$(Platform).$(PlatformToolset)\
- $(ProjectDir)\build\$(Configuration).$(Platform).$(PlatformToolset)\
+ $(SolutionDir)\output\$(Platform)\$(Configuration).$(PlatformToolset)\
+ $(SolutionDir)\build\$(Platform)\$(Configuration).$(PlatformToolset)\$(ProjectName)\
true
- $(ProjectDir)\output\$(Configuration).$(Platform).$(PlatformToolset)\
- $(ProjectDir)\build\$(Configuration).$(Platform).$(PlatformToolset)\
+ $(SolutionDir)\output\$(Platform)\$(Configuration).$(PlatformToolset)\
+ $(SolutionDir)\build\$(Platform)\$(Configuration).$(PlatformToolset)\$(ProjectName)\
false
@@ -80,6 +85,7 @@
Level3
Disabled
true
+ None
../
@@ -99,7 +105,7 @@
Windows
- true
+ false
true
true
diff --git a/kiwano-audio/src/Player.cpp b/kiwano-audio/src/Player.cpp
index 1c2f8506..f460a2c5 100644
--- a/kiwano-audio/src/Player.cpp
+++ b/kiwano-audio/src/Player.cpp
@@ -18,7 +18,6 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#include "../kiwano-audio.h"
#include "Player.h"
namespace kiwano
@@ -137,4 +136,4 @@ namespace kiwano
sound_cache_.clear();
}
}
-}
\ No newline at end of file
+}
diff --git a/kiwano-audio/src/Player.h b/kiwano-audio/src/Player.h
index 3b4dc078..42286b8b 100644
--- a/kiwano-audio/src/Player.h
+++ b/kiwano-audio/src/Player.h
@@ -19,6 +19,9 @@
// THE SOFTWARE.
#pragma once
+#include
+#include
+#include "Sound.h"
namespace kiwano
{
diff --git a/kiwano-audio/src/Sound.cpp b/kiwano-audio/src/Sound.cpp
index 96f9d02d..653f7f7d 100644
--- a/kiwano-audio/src/Sound.cpp
+++ b/kiwano-audio/src/Sound.cpp
@@ -18,8 +18,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#include "../kiwano-audio.h"
+#include
+#include
#include "Sound.h"
+#include "audio.h"
#include "Transcoder.h"
namespace kiwano
@@ -220,4 +222,4 @@ namespace kiwano
voice_->SetVolume(volume);
}
}
-}
\ No newline at end of file
+}
diff --git a/kiwano-audio/src/Sound.h b/kiwano-audio/src/Sound.h
index cc9c3043..2f982c2e 100644
--- a/kiwano-audio/src/Sound.h
+++ b/kiwano-audio/src/Sound.h
@@ -19,6 +19,9 @@
// THE SOFTWARE.
#pragma once
+#include
+#include
+#include
#include
namespace kiwano
diff --git a/kiwano-audio/src/Transcoder.cpp b/kiwano-audio/src/Transcoder.cpp
index 142b174b..c1b676ec 100644
--- a/kiwano-audio/src/Transcoder.cpp
+++ b/kiwano-audio/src/Transcoder.cpp
@@ -22,9 +22,14 @@
# define INITGUID // MFAudioFormat_PCM, MF_MT_MAJOR_TYPE, MF_MT_SUBTYPE, MFMediaType_Audio
#endif
-#include "../kiwano-audio.h"
-#include "Transcoder.h"
+#include
+#include
+#include
+#include
+#include
+#include
#include "audio-modules.h"
+#include "Transcoder.h"
namespace kiwano
{
diff --git a/kiwano-audio/src/audio-modules.cpp b/kiwano-audio/src/audio-modules.cpp
index 48bb7729..7993ea69 100644
--- a/kiwano-audio/src/audio-modules.cpp
+++ b/kiwano-audio/src/audio-modules.cpp
@@ -18,7 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#include "../kiwano-audio.h"
+#include
#include "audio-modules.h"
namespace kiwano
diff --git a/kiwano-audio/src/audio.cpp b/kiwano-audio/src/audio.cpp
index 45669ed2..66b04904 100644
--- a/kiwano-audio/src/audio.cpp
+++ b/kiwano-audio/src/audio.cpp
@@ -18,9 +18,9 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#include "../kiwano-audio.h"
-#include "audio.h"
+#include
#include "audio-modules.h"
+#include "audio.h"
namespace kiwano
{
@@ -95,4 +95,4 @@ namespace kiwano
x_audio2_->StopEngine();
}
}
-}
\ No newline at end of file
+}
diff --git a/kiwano-audio/src/audio.h b/kiwano-audio/src/audio.h
index 89e718b6..42259e09 100644
--- a/kiwano-audio/src/audio.h
+++ b/kiwano-audio/src/audio.h
@@ -19,6 +19,8 @@
// THE SOFTWARE.
#pragma once
+#include
+#include
namespace kiwano
{
diff --git a/kiwano-imgui/kiwano-imgui.h b/kiwano-imgui/kiwano-imgui.h
index 75111546..191df124 100644
--- a/kiwano-imgui/kiwano-imgui.h
+++ b/kiwano-imgui/kiwano-imgui.h
@@ -19,7 +19,6 @@
// THE SOFTWARE.
#pragma once
-#include "kiwano/kiwano.h"
#include "src/ImGuiLayer.h"
#include "src/ImGuiModule.h"
diff --git a/kiwano-imgui/kiwano-imgui.vcxproj b/kiwano-imgui/kiwano-imgui.vcxproj
index a334d7fd..ddf59a82 100644
--- a/kiwano-imgui/kiwano-imgui.vcxproj
+++ b/kiwano-imgui/kiwano-imgui.vcxproj
@@ -34,6 +34,11 @@
Win32
+
+
+ {ff7f943d-a89c-4e6c-97cf-84f7d8ff8edf}
+
+
{A7062ED8-8910-48A5-A3BC-C1612672571F}
kiwano-imgui
@@ -53,7 +58,7 @@
StaticLibrary
false
- true
+ false
Unicode
v100
v110
@@ -75,13 +80,13 @@
- $(ProjectDir)\output\$(Configuration).$(Platform).$(PlatformToolset)\
- $(ProjectDir)\build\$(Configuration).$(Platform).$(PlatformToolset)\
+ $(SolutionDir)\output\$(Platform)\$(Configuration).$(PlatformToolset)\
+ $(SolutionDir)\build\$(Platform)\$(Configuration).$(PlatformToolset)\$(ProjectName)\
false
- $(ProjectDir)\output\$(Configuration).$(Platform).$(PlatformToolset)\
- $(ProjectDir)\build\$(Configuration).$(Platform).$(PlatformToolset)\
+ $(SolutionDir)\output\$(Platform)\$(Configuration).$(PlatformToolset)\
+ $(SolutionDir)\build\$(Platform)\$(Configuration).$(PlatformToolset)\$(ProjectName)\
true
@@ -89,6 +94,7 @@
Level3
Disabled
true
+ None
../
@@ -104,11 +110,12 @@
true
false
true
+ None
../
Windows
- true
+ false
true
true
diff --git a/kiwano-imgui/src/ImGuiLayer.cpp b/kiwano-imgui/src/ImGuiLayer.cpp
index 8c5744fc..32029175 100644
--- a/kiwano-imgui/src/ImGuiLayer.cpp
+++ b/kiwano-imgui/src/ImGuiLayer.cpp
@@ -18,7 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#include "../kiwano-imgui.h"
+#include "ImGuiLayer.h"
namespace kiwano
{
@@ -60,4 +60,4 @@ namespace kiwano
pipelines_.clear();
}
}
-}
\ No newline at end of file
+}
diff --git a/kiwano-imgui/src/ImGuiLayer.h b/kiwano-imgui/src/ImGuiLayer.h
index 761f666b..ea84f668 100644
--- a/kiwano-imgui/src/ImGuiLayer.h
+++ b/kiwano-imgui/src/ImGuiLayer.h
@@ -19,6 +19,7 @@
// THE SOFTWARE.
#pragma once
+#include
namespace kiwano
{
diff --git a/kiwano-imgui/src/ImGuiModule.cpp b/kiwano-imgui/src/ImGuiModule.cpp
index d74b96d4..3575b65a 100644
--- a/kiwano-imgui/src/ImGuiModule.cpp
+++ b/kiwano-imgui/src/ImGuiModule.cpp
@@ -1,6 +1,12 @@
// Copyright (C) 2019 Nomango
-#include "../kiwano-imgui.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include "ImGuiModule.h"
#include "imgui_impl.h"
#include
@@ -302,4 +308,4 @@ namespace kiwano
}
}
}
-}
\ No newline at end of file
+}
diff --git a/kiwano-imgui/src/ImGuiModule.h b/kiwano-imgui/src/ImGuiModule.h
index 977ba357..4ae214db 100644
--- a/kiwano-imgui/src/ImGuiModule.h
+++ b/kiwano-imgui/src/ImGuiModule.h
@@ -19,6 +19,8 @@
// THE SOFTWARE.
#pragma once
+#include
+#include
namespace kiwano
{
diff --git a/kiwano-imgui/src/imgui_impl_dx10.cpp b/kiwano-imgui/src/imgui_impl_dx10.cpp
index 0c5f000b..ed6fa680 100644
--- a/kiwano-imgui/src/imgui_impl_dx10.cpp
+++ b/kiwano-imgui/src/imgui_impl_dx10.cpp
@@ -1,6 +1,5 @@
// dear imgui: Renderer for Kiwano (DirectX10)
-#include "../kiwano-imgui.h"
#include "imgui_impl_dx10.h"
// DirectX
diff --git a/kiwano-imgui/src/imgui_impl_dx10.h b/kiwano-imgui/src/imgui_impl_dx10.h
index cf129d61..82f9fec4 100644
--- a/kiwano-imgui/src/imgui_impl_dx10.h
+++ b/kiwano-imgui/src/imgui_impl_dx10.h
@@ -1,6 +1,7 @@
// dear imgui: Renderer for Kiwano (DirectX10)
#pragma once
+#include "../third-party/ImGui/imgui.h"
struct ID3D10Device;
diff --git a/kiwano-imgui/src/imgui_impl_dx11.cpp b/kiwano-imgui/src/imgui_impl_dx11.cpp
index 1b7b6f02..f09218da 100644
--- a/kiwano-imgui/src/imgui_impl_dx11.cpp
+++ b/kiwano-imgui/src/imgui_impl_dx11.cpp
@@ -1,6 +1,6 @@
// dear imgui: Renderer for Kiwano (DirectX11)
-#include "../kiwano-imgui.h"
+#include
#include "imgui_impl_dx11.h"
// DirectX
diff --git a/kiwano-imgui/src/imgui_impl_dx11.h b/kiwano-imgui/src/imgui_impl_dx11.h
index 15a92fcf..cfc7046b 100644
--- a/kiwano-imgui/src/imgui_impl_dx11.h
+++ b/kiwano-imgui/src/imgui_impl_dx11.h
@@ -1,6 +1,7 @@
// dear imgui: Renderer for Kiwano (DirectX11)
#pragma once
+#include "../third-party/ImGui/imgui.h"
struct ID3D11Device;
struct ID3D11DeviceContext;
diff --git a/kiwano-network/kiwano-network.h b/kiwano-network/kiwano-network.h
index 2a588e93..fc72afec 100644
--- a/kiwano-network/kiwano-network.h
+++ b/kiwano-network/kiwano-network.h
@@ -19,7 +19,6 @@
// THE SOFTWARE.
#pragma once
-#include "kiwano/kiwano.h"
#include "src/helper.h"
#include "src/HttpRequest.h"
diff --git a/kiwano-network/kiwano-network.vcxproj b/kiwano-network/kiwano-network.vcxproj
index b78c5be9..e46724e7 100644
--- a/kiwano-network/kiwano-network.vcxproj
+++ b/kiwano-network/kiwano-network.vcxproj
@@ -23,6 +23,11 @@
+
+
+ {ff7f943d-a89c-4e6c-97cf-84f7d8ff8edf}
+
+
{69DFBE92-C06F-4CF8-9495-CA9BF2E3BAF2}
kiwano-network
@@ -42,7 +47,7 @@
StaticLibrary
false
- true
+ false
Unicode
v100
v110
@@ -64,13 +69,13 @@
- $(ProjectDir)\output\$(Configuration).$(Platform).$(PlatformToolset)\
- $(ProjectDir)\build\$(Configuration).$(Platform).$(PlatformToolset)\
+ $(SolutionDir)\output\$(Platform)\$(Configuration).$(PlatformToolset)\
+ $(SolutionDir)\build\$(Platform)\$(Configuration).$(PlatformToolset)\$(ProjectName)\
true
- $(ProjectDir)\output\$(Configuration).$(Platform).$(PlatformToolset)\
- $(ProjectDir)\build\$(Configuration).$(Platform).$(PlatformToolset)\
+ $(SolutionDir)\output\$(Platform)\$(Configuration).$(PlatformToolset)\
+ $(SolutionDir)\build\$(Platform)\$(Configuration).$(PlatformToolset)\$(ProjectName)\
false
@@ -78,6 +83,7 @@
Level3
Disabled
true
+ None
../
@@ -93,11 +99,12 @@
true
false
true
+ None
../
Windows
- true
+ false
true
true
diff --git a/kiwano-network/src/HttpClient.cpp b/kiwano-network/src/HttpClient.cpp
index b14cac9d..9a2b5a73 100644
--- a/kiwano-network/src/HttpClient.cpp
+++ b/kiwano-network/src/HttpClient.cpp
@@ -18,6 +18,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#include
+#include
#include "../kiwano-network.h"
#include
#include
diff --git a/kiwano-network/src/HttpClient.h b/kiwano-network/src/HttpClient.h
index ba0c3c59..a61ee343 100644
--- a/kiwano-network/src/HttpClient.h
+++ b/kiwano-network/src/HttpClient.h
@@ -19,6 +19,9 @@
// THE SOFTWARE.
#pragma once
+#include
+#include
+#include
#include
#include
diff --git a/kiwano-network/src/HttpRequest.h b/kiwano-network/src/HttpRequest.h
index 47885ca3..a7be4ed9 100644
--- a/kiwano-network/src/HttpRequest.h
+++ b/kiwano-network/src/HttpRequest.h
@@ -19,6 +19,9 @@
// THE SOFTWARE.
#pragma once
+#include
+#include
+#include
namespace kiwano
{
diff --git a/kiwano-network/src/HttpResponse.h b/kiwano-network/src/HttpResponse.h
index 635fed71..da51c093 100644
--- a/kiwano-network/src/HttpResponse.h
+++ b/kiwano-network/src/HttpResponse.h
@@ -19,6 +19,9 @@
// THE SOFTWARE.
#pragma once
+#include
+#include
+#include
namespace kiwano
{
diff --git a/kiwano-network/src/helper.h b/kiwano-network/src/helper.h
index 33a45a85..8367e577 100644
--- a/kiwano-network/src/helper.h
+++ b/kiwano-network/src/helper.h
@@ -19,6 +19,7 @@
// THE SOFTWARE.
#pragma once
+#include
namespace kiwano
{
diff --git a/kiwano/2d/ActionTween.cpp b/kiwano/2d/ActionTween.cpp
index 68a18139..d01bc369 100644
--- a/kiwano/2d/ActionTween.cpp
+++ b/kiwano/2d/ActionTween.cpp
@@ -35,37 +35,37 @@ namespace kiwano
inline EaseFunc MakeEaseElasticOut(float period) { return std::bind(math::EaseElasticOut, std::placeholders::_1, period); }
inline EaseFunc MakeEaseElasticInOut(float period) { return std::bind(math::EaseElasticInOut, std::placeholders::_1, period); }
- EaseFunc Ease::Linear = math::Linear;
- EaseFunc Ease::EaseIn = MakeEaseIn(2.f);
- EaseFunc Ease::EaseOut = MakeEaseOut(2.f);
- EaseFunc Ease::EaseInOut = MakeEaseInOut(2.f);
- EaseFunc Ease::ExpoIn = math::EaseExponentialIn;
- EaseFunc Ease::ExpoOut = math::EaseExponentialOut;
- EaseFunc Ease::ExpoInOut = math::EaseExponentialInOut;
- EaseFunc Ease::BounceIn = math::EaseBounceIn;
- EaseFunc Ease::BounceOut = math::EaseBounceOut;
- EaseFunc Ease::BounceInOut = math::EaseBounceInOut;
- EaseFunc Ease::ElasticIn = MakeEaseElasticIn(0.3f);
- EaseFunc Ease::ElasticOut = MakeEaseElasticOut(0.3f);
- EaseFunc Ease::ElasticInOut = MakeEaseElasticInOut(0.3f);
- EaseFunc Ease::SineIn = math::EaseSineIn;
- EaseFunc Ease::SineOut = math::EaseSineOut;
- EaseFunc Ease::SineInOut = math::EaseSineInOut;
- EaseFunc Ease::BackIn = math::EaseBackIn;
- EaseFunc Ease::BackOut = math::EaseBackOut;
- EaseFunc Ease::BackInOut = math::EaseBackInOut;
- EaseFunc Ease::QuadIn = math::EaseQuadIn;
- EaseFunc Ease::QuadOut = math::EaseQuadOut;
- EaseFunc Ease::QuadInOut = math::EaseQuadInOut;
- EaseFunc Ease::CubicIn = math::EaseCubicIn;
- EaseFunc Ease::CubicOut = math::EaseCubicOut;
- EaseFunc Ease::CubicInOut = math::EaseCubicInOut;
- EaseFunc Ease::QuartIn = math::EaseQuartIn;
- EaseFunc Ease::QuartOut = math::EaseQuartOut;
- EaseFunc Ease::QuartInOut = math::EaseQuartInOut;
- EaseFunc Ease::QuintIn = math::EaseQuintIn;
- EaseFunc Ease::QuintOut = math::EaseQuintOut;
- EaseFunc Ease::QuintInOut = math::EaseQuintInOut;
+ KGE_API EaseFunc Ease::Linear = math::Linear;
+ KGE_API EaseFunc Ease::EaseIn = MakeEaseIn(2.f);
+ KGE_API EaseFunc Ease::EaseOut = MakeEaseOut(2.f);
+ KGE_API EaseFunc Ease::EaseInOut = MakeEaseInOut(2.f);
+ KGE_API EaseFunc Ease::ExpoIn = math::EaseExponentialIn;
+ KGE_API EaseFunc Ease::ExpoOut = math::EaseExponentialOut;
+ KGE_API EaseFunc Ease::ExpoInOut = math::EaseExponentialInOut;
+ KGE_API EaseFunc Ease::BounceIn = math::EaseBounceIn;
+ KGE_API EaseFunc Ease::BounceOut = math::EaseBounceOut;
+ KGE_API EaseFunc Ease::BounceInOut = math::EaseBounceInOut;
+ KGE_API EaseFunc Ease::ElasticIn = MakeEaseElasticIn(0.3f);
+ KGE_API EaseFunc Ease::ElasticOut = MakeEaseElasticOut(0.3f);
+ KGE_API EaseFunc Ease::ElasticInOut = MakeEaseElasticInOut(0.3f);
+ KGE_API EaseFunc Ease::SineIn = math::EaseSineIn;
+ KGE_API EaseFunc Ease::SineOut = math::EaseSineOut;
+ KGE_API EaseFunc Ease::SineInOut = math::EaseSineInOut;
+ KGE_API EaseFunc Ease::BackIn = math::EaseBackIn;
+ KGE_API EaseFunc Ease::BackOut = math::EaseBackOut;
+ KGE_API EaseFunc Ease::BackInOut = math::EaseBackInOut;
+ KGE_API EaseFunc Ease::QuadIn = math::EaseQuadIn;
+ KGE_API EaseFunc Ease::QuadOut = math::EaseQuadOut;
+ KGE_API EaseFunc Ease::QuadInOut = math::EaseQuadInOut;
+ KGE_API EaseFunc Ease::CubicIn = math::EaseCubicIn;
+ KGE_API EaseFunc Ease::CubicOut = math::EaseCubicOut;
+ KGE_API EaseFunc Ease::CubicInOut = math::EaseCubicInOut;
+ KGE_API EaseFunc Ease::QuartIn = math::EaseQuartIn;
+ KGE_API EaseFunc Ease::QuartOut = math::EaseQuartOut;
+ KGE_API EaseFunc Ease::QuartInOut = math::EaseQuartInOut;
+ KGE_API EaseFunc Ease::QuintIn = math::EaseQuintIn;
+ KGE_API EaseFunc Ease::QuintOut = math::EaseQuintOut;
+ KGE_API EaseFunc Ease::QuintInOut = math::EaseQuintInOut;
//-------------------------------------------------------
// ActionTween
diff --git a/kiwano/Kiwano.vcxproj b/kiwano/Kiwano.vcxproj
index a2fefe66..c43b2b97 100644
--- a/kiwano/Kiwano.vcxproj
+++ b/kiwano/Kiwano.vcxproj
@@ -159,7 +159,7 @@
StaticLibrary
false
- true
+ false
Unicode
v100
v110
@@ -179,13 +179,13 @@
- $(ProjectDir)\output\$(Configuration).$(Platform).$(PlatformToolset)\
- $(ProjectDir)\build\$(Configuration).$(Platform).$(PlatformToolset)\
+ $(SolutionDir)\output\$(Platform)\$(Configuration).$(PlatformToolset)\
+ $(SolutionDir)\build\$(Platform)\$(Configuration).$(PlatformToolset)\$(ProjectName)\
true
- $(ProjectDir)\output\$(Configuration).$(Platform).$(PlatformToolset)\
- $(ProjectDir)\build\$(Configuration).$(Platform).$(PlatformToolset)\
+ $(SolutionDir)\output\$(Platform)\$(Configuration).$(PlatformToolset)\
+ $(SolutionDir)\build\$(Platform)\$(Configuration).$(PlatformToolset)\$(ProjectName)\
false
@@ -193,6 +193,7 @@
Level3
Disabled
true
+ None
Windows
@@ -207,10 +208,11 @@
true
false
true
+ None
Windows
- true
+ false
true
true
diff --git a/kiwano/base/Component.h b/kiwano/base/Component.h
index 7759351f..f0e4c64f 100644
--- a/kiwano/base/Component.h
+++ b/kiwano/base/Component.h
@@ -19,12 +19,13 @@
// THE SOFTWARE.
#pragma once
+#include "../macros.h"
namespace kiwano
{
class Application;
- class Component
+ class KGE_API Component
{
public:
virtual void SetupComponent(Application*) = 0;
diff --git a/kiwano/config.h b/kiwano/config.h
index f77db60c..c93cd824 100644
--- a/kiwano/config.h
+++ b/kiwano/config.h
@@ -14,8 +14,8 @@
//#define KGE_ERROR_LOG(FORMAT, ...) wprintf(FORMAT L"\n", __VA_ARGS__)
//---- Define attributes of all API symbols declarations for DLL
-//#define KGE_API __declspec( dllexport )
-//#define KGE_API __declspec( dllimport )
+//#define KGE_USE_DLL
+//#define KGE_EXPORT_DLL
//---- Define DirectX version. Defaults to using Direct3D11
//#define KGE_USE_DIRECTX10
diff --git a/kiwano/macros.h b/kiwano/macros.h
index ac13650e..b09ac76d 100644
--- a/kiwano/macros.h
+++ b/kiwano/macros.h
@@ -93,6 +93,16 @@
# endif
#endif
+
+#ifndef KGE_API
+# if defined(KGE_USE_DLL)
+# define KGE_API __declspec( dllimport )
+# elif defined(KGE_EXPORT_DLL)
+# define KGE_API __declspec( dllexport )
+# endif
+#endif
+
+
#ifndef KGE_API
/* Building or calling Kiwano as a static library */
# define KGE_API
diff --git a/kiwano/renderer/D3D11DeviceResources.cpp b/kiwano/renderer/D3D11DeviceResources.cpp
index c9cfe29e..338095db 100644
--- a/kiwano/renderer/D3D11DeviceResources.cpp
+++ b/kiwano/renderer/D3D11DeviceResources.cpp
@@ -22,9 +22,11 @@
#include "../2d/Image.h"
#include "../base/logs.h"
+#include // IsWindows10OrGreater
#pragma comment(lib, "d3d11.lib")
+
namespace kiwano
{
#if defined(KGE_DEBUG)
@@ -305,12 +307,24 @@ namespace kiwano
swap_chain_desc.Windowed = TRUE;
#if defined(_WIN32_WINNT_WIN10)
- swap_chain_desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD;
-#elif defined(_WIN32_WINNT_WINBLUE)
- swap_chain_desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
-#else
- swap_chain_desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
+ // DXGI_SWAP_EFFECT_FLIP_DISCARD is supported starting with Windows 10.
+ if (IsWindows10OrGreater())
+ {
+ swap_chain_desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD;
+ }
+ else
#endif
+#if defined(_WIN32_WINNT_WIN10) || defined(_WIN32_WINNT_WINBLUE)
+ // DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL is supported starting with Windows 8.
+ if (IsWindows8OrGreater())
+ {
+ swap_chain_desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
+ }
+ else
+#endif
+ {
+ swap_chain_desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
+ }
ComPtr dxgi_device;
if (SUCCEEDED(hr))
diff --git a/kiwano/third-party/StackWalker/StackWalker.h b/kiwano/third-party/StackWalker/StackWalker.h
index b956e3b1..096d63bc 100644
--- a/kiwano/third-party/StackWalker/StackWalker.h
+++ b/kiwano/third-party/StackWalker/StackWalker.h
@@ -12,7 +12,7 @@
// so we need not to check the version (because we only support _MSC_VER >= 1100)!
#pragma once
-#include
+#include "../../macros.h"
// special defines for VC5/6 (if no actual PSDK is installed):
#if _MSC_VER < 1300
@@ -25,7 +25,7 @@ typedef unsigned long SIZE_T, *PSIZE_T;
#endif // _MSC_VER < 1300
class StackWalkerInternal; // forward
-class StackWalker
+class KGE_API StackWalker
{
public:
typedef enum StackWalkOptions
diff --git a/samples/Box2DSample/Box2DSample.vcxproj b/samples/Box2DSample/Box2DSample.vcxproj
index 2f5bfa92..bcc63051 100644
--- a/samples/Box2DSample/Box2DSample.vcxproj
+++ b/samples/Box2DSample/Box2DSample.vcxproj
@@ -29,7 +29,7 @@
Application
false
- true
+ false
Unicode
v100
v110
@@ -51,13 +51,13 @@
- $(ProjectDir)\output\$(Configuration).$(Platform).$(PlatformToolset)\
- $(ProjectDir)\build\$(Configuration).$(Platform).$(PlatformToolset)\
+ $(SolutionDir)\output\$(Platform)\$(Configuration).$(PlatformToolset)\
+ $(SolutionDir)\build\$(Platform)\$(Configuration).$(PlatformToolset)\$(ProjectName)\
true
- $(ProjectDir)\output\$(Configuration).$(Platform).$(PlatformToolset)\
- $(ProjectDir)\build\$(Configuration).$(Platform).$(PlatformToolset)\
+ $(SolutionDir)\output\$(Platform)\$(Configuration).$(PlatformToolset)\
+ $(SolutionDir)\build\$(Platform)\$(Configuration).$(PlatformToolset)\$(ProjectName)\
false
diff --git a/samples/HelloWorld/HelloWorld.vcxproj b/samples/HelloWorld/HelloWorld.vcxproj
index c77125e5..919213aa 100644
--- a/samples/HelloWorld/HelloWorld.vcxproj
+++ b/samples/HelloWorld/HelloWorld.vcxproj
@@ -29,7 +29,7 @@
Application
false
- true
+ false
Unicode
v100
v110
@@ -51,13 +51,13 @@
- $(ProjectDir)\output\$(Configuration).$(Platform).$(PlatformToolset)\
- $(ProjectDir)\build\$(Configuration).$(Platform).$(PlatformToolset)\
+ $(SolutionDir)\output\$(Platform)\$(Configuration).$(PlatformToolset)\
+ $(SolutionDir)\build\$(Platform)\$(Configuration).$(PlatformToolset)\$(ProjectName)\
true
- $(ProjectDir)\output\$(Configuration).$(Platform).$(PlatformToolset)\
- $(ProjectDir)\build\$(Configuration).$(Platform).$(PlatformToolset)\
+ $(SolutionDir)\output\$(Platform)\$(Configuration).$(PlatformToolset)\
+ $(SolutionDir)\build\$(Platform)\$(Configuration).$(PlatformToolset)\$(ProjectName)\
false
diff --git a/samples/ImGuiSample/ImGuiSample.vcxproj b/samples/ImGuiSample/ImGuiSample.vcxproj
index 8eb1716b..d1fd88e7 100644
--- a/samples/ImGuiSample/ImGuiSample.vcxproj
+++ b/samples/ImGuiSample/ImGuiSample.vcxproj
@@ -29,7 +29,7 @@
Application
false
- true
+ false
Unicode
v100
v110
@@ -51,13 +51,13 @@
- $(ProjectDir)\output\$(Configuration).$(Platform).$(PlatformToolset)\
- $(ProjectDir)\build\$(Configuration).$(Platform).$(PlatformToolset)\
+ $(SolutionDir)\output\$(Platform)\$(Configuration).$(PlatformToolset)\
+ $(SolutionDir)\build\$(Platform)\$(Configuration).$(PlatformToolset)\$(ProjectName)\
true
- $(ProjectDir)\output\$(Configuration).$(Platform).$(PlatformToolset)\
- $(ProjectDir)\build\$(Configuration).$(Platform).$(PlatformToolset)\
+ $(SolutionDir)\output\$(Platform)\$(Configuration).$(PlatformToolset)\
+ $(SolutionDir)\build\$(Platform)\$(Configuration).$(PlatformToolset)\$(ProjectName)\
false
diff --git a/samples/Samples/Samples.vcxproj b/samples/Samples/Samples.vcxproj
index 66a1d59b..29f7af65 100644
--- a/samples/Samples/Samples.vcxproj
+++ b/samples/Samples/Samples.vcxproj
@@ -29,7 +29,7 @@
Application
false
- true
+ false
Unicode
v100
v110
@@ -51,13 +51,13 @@
- $(ProjectDir)\output\$(Configuration).$(Platform).$(PlatformToolset)\
- $(ProjectDir)\build\$(Configuration).$(Platform).$(PlatformToolset)\
+ $(SolutionDir)\output\$(Platform)\$(Configuration).$(PlatformToolset)\
+ $(SolutionDir)\build\$(Platform)\$(Configuration).$(PlatformToolset)\$(ProjectName)\
true
- $(ProjectDir)\output\$(Configuration).$(Platform).$(PlatformToolset)\
- $(ProjectDir)\build\$(Configuration).$(Platform).$(PlatformToolset)\
+ $(SolutionDir)\output\$(Platform)\$(Configuration).$(PlatformToolset)\
+ $(SolutionDir)\build\$(Platform)\$(Configuration).$(PlatformToolset)\$(ProjectName)\
false