refactoring
This commit is contained in:
parent
27babf3c13
commit
57ceb53f68
|
|
@ -2,37 +2,55 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.28729.10
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kiwano", "kiwano.vcxproj", "{FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kiwano", "kiwano\kiwano.vcxproj", "{FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kiwano-audio", "kiwano-audio.vcxproj", "{1B97937D-8184-426C-BE71-29A163DC76C9}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kiwano-audio", "kiwano-audio\kiwano-audio.vcxproj", "{1B97937D-8184-426C-BE71-29A163DC76C9}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kiwano-network", "kiwano-network.vcxproj", "{69DFBE92-C06F-4CF8-9495-CA9BF2E3BAF2}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kiwano-network", "kiwano-network\kiwano-network.vcxproj", "{69DFBE92-C06F-4CF8-9495-CA9BF2E3BAF2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kiwano-imgui", "kiwano-imgui.vcxproj", "{A7062ED8-8910-48A5-A3BC-C1612672571F}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kiwano-imgui", "kiwano-imgui\kiwano-imgui.vcxproj", "{A7062ED8-8910-48A5-A3BC-C1612672571F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.Debug|Win32.Deploy.0 = Debug|Win32
|
||||
{FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.Debug|x64.Build.0 = Debug|x64
|
||||
{FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.Release|Win32.Build.0 = Release|Win32
|
||||
{FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.Release|x64.ActiveCfg = Release|x64
|
||||
{FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.Release|x64.Build.0 = Release|x64
|
||||
{1B97937D-8184-426C-BE71-29A163DC76C9}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1B97937D-8184-426C-BE71-29A163DC76C9}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1B97937D-8184-426C-BE71-29A163DC76C9}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{1B97937D-8184-426C-BE71-29A163DC76C9}.Debug|x64.Build.0 = Debug|x64
|
||||
{1B97937D-8184-426C-BE71-29A163DC76C9}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1B97937D-8184-426C-BE71-29A163DC76C9}.Release|Win32.Build.0 = Release|Win32
|
||||
{1B97937D-8184-426C-BE71-29A163DC76C9}.Release|x64.ActiveCfg = Release|x64
|
||||
{1B97937D-8184-426C-BE71-29A163DC76C9}.Release|x64.Build.0 = Release|x64
|
||||
{69DFBE92-C06F-4CF8-9495-CA9BF2E3BAF2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{69DFBE92-C06F-4CF8-9495-CA9BF2E3BAF2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{69DFBE92-C06F-4CF8-9495-CA9BF2E3BAF2}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{69DFBE92-C06F-4CF8-9495-CA9BF2E3BAF2}.Debug|x64.Build.0 = Debug|x64
|
||||
{69DFBE92-C06F-4CF8-9495-CA9BF2E3BAF2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{69DFBE92-C06F-4CF8-9495-CA9BF2E3BAF2}.Release|Win32.Build.0 = Release|Win32
|
||||
{69DFBE92-C06F-4CF8-9495-CA9BF2E3BAF2}.Release|x64.ActiveCfg = Release|x64
|
||||
{69DFBE92-C06F-4CF8-9495-CA9BF2E3BAF2}.Release|x64.Build.0 = Release|x64
|
||||
{A7062ED8-8910-48A5-A3BC-C1612672571F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{A7062ED8-8910-48A5-A3BC-C1612672571F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{A7062ED8-8910-48A5-A3BC-C1612672571F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A7062ED8-8910-48A5-A3BC-C1612672571F}.Debug|x64.Build.0 = Debug|x64
|
||||
{A7062ED8-8910-48A5-A3BC-C1612672571F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{A7062ED8-8910-48A5-A3BC-C1612672571F}.Release|Win32.Build.0 = Release|Win32
|
||||
{A7062ED8-8910-48A5-A3BC-C1612672571F}.Release|x64.ActiveCfg = Release|x64
|
||||
{A7062ED8-8910-48A5-A3BC-C1612672571F}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
|||
|
|
@ -1,111 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\kiwano-audio\kiwano-audio.h" />
|
||||
<ClInclude Include="..\src\kiwano-audio\src\audio-modules.h" />
|
||||
<ClInclude Include="..\src\kiwano-audio\src\audio.h" />
|
||||
<ClInclude Include="..\src\kiwano-audio\src\SoundPlayer.h" />
|
||||
<ClInclude Include="..\src\kiwano-audio\src\Sound.h" />
|
||||
<ClInclude Include="..\src\kiwano-audio\src\Transcoder.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\kiwano-audio\src\audio-modules.cpp" />
|
||||
<ClCompile Include="..\src\kiwano-audio\src\audio.cpp" />
|
||||
<ClCompile Include="..\src\kiwano-audio\src\SoundPlayer.cpp" />
|
||||
<ClCompile Include="..\src\kiwano-audio\src\Sound.cpp" />
|
||||
<ClCompile Include="..\src\kiwano-audio\src\Transcoder.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="kiwano.vcxproj">
|
||||
<Project>{ff7f943d-a89c-4e6c-97cf-84f7d8ff8edf}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{1B97937D-8184-426C-BE71-29A163DC76C9}</ProjectGuid>
|
||||
<RootNamespace>kiwano-audio</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalIncludeDirectories>../src/</AdditionalIncludeDirectories>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalIncludeDirectories>../src/</AdditionalIncludeDirectories>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,183 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\kiwano-audio\kiwano-audio.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-audio\src\audio-modules.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-audio\src\audio.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-audio\src\SoundPlayer.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-audio\src\Sound.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-audio\src\Transcoder.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\kiwano-audio\src\audio-modules.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano-audio\src\audio.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano-audio\src\SoundPlayer.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano-audio\src\Sound.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano-audio\src\Transcoder.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\kiwano\kiwano.vcxproj">
|
||||
<Project>{ff7f943d-a89c-4e6c-97cf-84f7d8ff8edf}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{1B97937D-8184-426C-BE71-29A163DC76C9}</ProjectGuid>
|
||||
<RootNamespace>kiwano-audio</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalIncludeDirectories>../../src/</AdditionalIncludeDirectories>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalIncludeDirectories>../../src/</AdditionalIncludeDirectories>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalIncludeDirectories>../../src/</AdditionalIncludeDirectories>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalIncludeDirectories>../../src/</AdditionalIncludeDirectories>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
|
|
@ -1,37 +1,37 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\kiwano-audio\kiwano-audio.h" />
|
||||
<ClInclude Include="..\src\kiwano-audio\src\audio.h">
|
||||
<ClInclude Include="..\..\src\kiwano-audio\kiwano-audio.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-audio\src\audio.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano-audio\src\audio-modules.h">
|
||||
<ClInclude Include="..\..\src\kiwano-audio\src\audio-modules.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano-audio\src\Sound.h">
|
||||
<ClInclude Include="..\..\src\kiwano-audio\src\Sound.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano-audio\src\Transcoder.h">
|
||||
<ClInclude Include="..\..\src\kiwano-audio\src\Transcoder.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano-audio\src\SoundPlayer.h">
|
||||
<ClInclude Include="..\..\src\kiwano-audio\src\SoundPlayer.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\kiwano-audio\src\audio.cpp">
|
||||
<ClCompile Include="..\..\src\kiwano-audio\src\audio.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano-audio\src\audio-modules.cpp">
|
||||
<ClCompile Include="..\..\src\kiwano-audio\src\audio-modules.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano-audio\src\Sound.cpp">
|
||||
<ClCompile Include="..\..\src\kiwano-audio\src\Sound.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano-audio\src\Transcoder.cpp">
|
||||
<ClCompile Include="..\..\src\kiwano-audio\src\Transcoder.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano-audio\src\SoundPlayer.cpp">
|
||||
<ClCompile Include="..\..\src\kiwano-audio\src\SoundPlayer.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\kiwano-imgui\kiwano-imgui.h" />
|
||||
<ClInclude Include="..\src\kiwano-imgui\src\ImGuiLayer.h" />
|
||||
<ClInclude Include="..\src\kiwano-imgui\src\ImGuiModule.h" />
|
||||
<ClInclude Include="..\src\kiwano-imgui\src\imgui_impl.h" />
|
||||
<ClInclude Include="..\src\kiwano-imgui\src\imgui_impl_dx10.h" />
|
||||
<ClInclude Include="..\src\kiwano-imgui\src\imgui_impl_dx11.h" />
|
||||
<ClInclude Include="..\src\kiwano-imgui\third-party\ImGui\imconfig.h" />
|
||||
<ClInclude Include="..\src\kiwano-imgui\third-party\ImGui\imgui.h" />
|
||||
<ClInclude Include="..\src\kiwano-imgui\third-party\ImGui\imgui_internal.h" />
|
||||
<ClInclude Include="..\src\kiwano-imgui\third-party\ImGui\imstb_rectpack.h" />
|
||||
<ClInclude Include="..\src\kiwano-imgui\third-party\ImGui\imstb_textedit.h" />
|
||||
<ClInclude Include="..\src\kiwano-imgui\third-party\ImGui\imstb_truetype.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\kiwano-imgui\src\ImGuiLayer.cpp" />
|
||||
<ClCompile Include="..\src\kiwano-imgui\src\ImGuiModule.cpp" />
|
||||
<ClCompile Include="..\src\kiwano-imgui\src\imgui_impl_dx10.cpp" />
|
||||
<ClCompile Include="..\src\kiwano-imgui\src\imgui_impl_dx11.cpp" />
|
||||
<ClCompile Include="..\src\kiwano-imgui\third-party\ImGui\imgui.cpp" />
|
||||
<ClCompile Include="..\src\kiwano-imgui\third-party\ImGui\imgui_demo.cpp" />
|
||||
<ClCompile Include="..\src\kiwano-imgui\third-party\ImGui\imgui_draw.cpp" />
|
||||
<ClCompile Include="..\src\kiwano-imgui\third-party\ImGui\imgui_widgets.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="kiwano.vcxproj">
|
||||
<Project>{ff7f943d-a89c-4e6c-97cf-84f7d8ff8edf}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{A7062ED8-8910-48A5-A3BC-C1612672571F}</ProjectGuid>
|
||||
<RootNamespace>kiwano-imgui</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalIncludeDirectories>../src/</AdditionalIncludeDirectories>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalIncludeDirectories>../src/</AdditionalIncludeDirectories>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,192 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\kiwano-imgui.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\src\ImGuiLayer.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\src\ImGuiModule.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\src\imgui_impl.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\src\imgui_impl_dx10.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\src\imgui_impl_dx11.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\third-party\ImGui\imconfig.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\third-party\ImGui\imgui.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\third-party\ImGui\imgui_internal.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\third-party\ImGui\imstb_rectpack.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\third-party\ImGui\imstb_textedit.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\third-party\ImGui\imstb_truetype.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\kiwano-imgui\src\ImGuiLayer.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano-imgui\src\ImGuiModule.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano-imgui\src\imgui_impl_dx10.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano-imgui\src\imgui_impl_dx11.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano-imgui\third-party\ImGui\imgui.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano-imgui\third-party\ImGui\imgui_demo.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano-imgui\third-party\ImGui\imgui_draw.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano-imgui\third-party\ImGui\imgui_widgets.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\kiwano\kiwano.vcxproj">
|
||||
<Project>{ff7f943d-a89c-4e6c-97cf-84f7d8ff8edf}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{A7062ED8-8910-48A5-A3BC-C1612672571F}</ProjectGuid>
|
||||
<RootNamespace>kiwano-imgui</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalIncludeDirectories>../../src/</AdditionalIncludeDirectories>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalIncludeDirectories>../../src/</AdditionalIncludeDirectories>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalIncludeDirectories>../../src/</AdditionalIncludeDirectories>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalIncludeDirectories>../../src/</AdditionalIncludeDirectories>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
|
|
@ -12,64 +12,64 @@
|
|||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\kiwano-imgui\src\imgui_impl_dx10.h">
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\src\imgui_impl_dx10.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano-imgui\src\imgui_impl_dx11.h">
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\src\imgui_impl_dx11.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano-imgui\src\ImGuiLayer.h">
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\src\ImGuiLayer.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano-imgui\third-party\ImGui\imconfig.h">
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\third-party\ImGui\imconfig.h">
|
||||
<Filter>third-party\ImGui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano-imgui\third-party\ImGui\imgui.h">
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\third-party\ImGui\imgui.h">
|
||||
<Filter>third-party\ImGui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano-imgui\third-party\ImGui\imgui_internal.h">
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\third-party\ImGui\imgui_internal.h">
|
||||
<Filter>third-party\ImGui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano-imgui\third-party\ImGui\imstb_rectpack.h">
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\third-party\ImGui\imstb_rectpack.h">
|
||||
<Filter>third-party\ImGui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano-imgui\third-party\ImGui\imstb_textedit.h">
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\third-party\ImGui\imstb_textedit.h">
|
||||
<Filter>third-party\ImGui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano-imgui\third-party\ImGui\imstb_truetype.h">
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\third-party\ImGui\imstb_truetype.h">
|
||||
<Filter>third-party\ImGui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano-imgui\kiwano-imgui.h" />
|
||||
<ClInclude Include="..\src\kiwano-imgui\src\imgui_impl.h">
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\kiwano-imgui.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\src\imgui_impl.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano-imgui\src\ImGuiModule.h">
|
||||
<ClInclude Include="..\..\src\kiwano-imgui\src\ImGuiModule.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\kiwano-imgui\src\imgui_impl_dx10.cpp">
|
||||
<ClCompile Include="..\..\src\kiwano-imgui\src\imgui_impl_dx10.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano-imgui\src\imgui_impl_dx11.cpp">
|
||||
<ClCompile Include="..\..\src\kiwano-imgui\src\imgui_impl_dx11.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano-imgui\src\ImGuiLayer.cpp">
|
||||
<ClCompile Include="..\..\src\kiwano-imgui\src\ImGuiLayer.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano-imgui\third-party\ImGui\imgui.cpp">
|
||||
<ClCompile Include="..\..\src\kiwano-imgui\third-party\ImGui\imgui.cpp">
|
||||
<Filter>third-party\ImGui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano-imgui\third-party\ImGui\imgui_demo.cpp">
|
||||
<ClCompile Include="..\..\src\kiwano-imgui\third-party\ImGui\imgui_demo.cpp">
|
||||
<Filter>third-party\ImGui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano-imgui\third-party\ImGui\imgui_draw.cpp">
|
||||
<ClCompile Include="..\..\src\kiwano-imgui\third-party\ImGui\imgui_draw.cpp">
|
||||
<Filter>third-party\ImGui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano-imgui\third-party\ImGui\imgui_widgets.cpp">
|
||||
<ClCompile Include="..\..\src\kiwano-imgui\third-party\ImGui\imgui_widgets.cpp">
|
||||
<Filter>third-party\ImGui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano-imgui\src\ImGuiModule.cpp">
|
||||
<ClCompile Include="..\..\src\kiwano-imgui\src\ImGuiModule.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\kiwano-network\kiwano-network.h" />
|
||||
<ClInclude Include="..\src\kiwano-network\src\helper.h" />
|
||||
<ClInclude Include="..\src\kiwano-network\src\HttpClient.h" />
|
||||
<ClInclude Include="..\src\kiwano-network\src\HttpRequest.hpp" />
|
||||
<ClInclude Include="..\src\kiwano-network\src\HttpResponse.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano-network\kiwano-network.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-network\src\helper.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-network\src\HttpClient.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-network\src\HttpRequest.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano-network\src\HttpResponse.hpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\kiwano-network\src\HttpClient.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano-network\src\HttpClient.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
|
|
@ -19,12 +19,20 @@
|
|||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Library Include="..\src\kiwano-network\third-party\libs\libcurl.lib" />
|
||||
<Library Include="..\..\src\kiwano-network\third-party\libs\libcurl.lib" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="kiwano.vcxproj">
|
||||
<ProjectReference Include="..\kiwano\kiwano.vcxproj">
|
||||
<Project>{ff7f943d-a89c-4e6c-97cf-84f7d8ff8edf}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
|
|
@ -46,6 +54,19 @@
|
|||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
|
|
@ -57,6 +78,12 @@
|
|||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
|
|
@ -66,7 +93,17 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
|
|
@ -75,7 +112,7 @@
|
|||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalIncludeDirectories>../src/</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../src/</AdditionalIncludeDirectories>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
|
@ -93,7 +130,42 @@
|
|||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalIncludeDirectories>../src/</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../src/</AdditionalIncludeDirectories>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalIncludeDirectories>../../src/</AdditionalIncludeDirectories>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalIncludeDirectories>../../src/</AdditionalIncludeDirectories>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
|
@ -1,17 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\kiwano-network\kiwano-network.h" />
|
||||
<ClInclude Include="..\src\kiwano-network\src\helper.h">
|
||||
<ClInclude Include="..\..\src\kiwano-network\kiwano-network.h" />
|
||||
<ClInclude Include="..\..\src\kiwano-network\src\helper.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano-network\src\HttpClient.h">
|
||||
<ClInclude Include="..\..\src\kiwano-network\src\HttpClient.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano-network\src\HttpRequest.hpp">
|
||||
<ClInclude Include="..\..\src\kiwano-network\src\HttpRequest.hpp">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano-network\src\HttpResponse.hpp">
|
||||
<ClInclude Include="..\..\src\kiwano-network\src\HttpResponse.hpp">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
|
|
@ -24,12 +24,12 @@
|
|||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\kiwano-network\src\HttpClient.cpp">
|
||||
<ClCompile Include="..\..\src\kiwano-network\src\HttpClient.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Library Include="..\src\kiwano-network\third-party\libs\libcurl.lib">
|
||||
<Library Include="..\..\src\kiwano-network\third-party\libs\libcurl.lib">
|
||||
<Filter>libs</Filter>
|
||||
</Library>
|
||||
</ItemGroup>
|
||||
|
|
@ -1,242 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\kiwano\2d\action\Action.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\action\ActionDelay.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\action\ActionGroup.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\action\ActionHelper.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\action\ActionManager.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\action\ActionWalk.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\action\ActionTween.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\action\Animation.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\Frame.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\GifSprite.h" />
|
||||
<ClInclude Include="..\src\kiwano\base\Director.h" />
|
||||
<ClInclude Include="..\src\kiwano\base\win32\ComPtr.hpp" />
|
||||
<ClInclude Include="..\src\kiwano\core\basic_json.hpp" />
|
||||
<ClInclude Include="..\src\kiwano\core\function.hpp" />
|
||||
<ClInclude Include="..\src\kiwano\core\core.h" />
|
||||
<ClInclude Include="..\src\kiwano\core\intrusive_list.hpp" />
|
||||
<ClInclude Include="..\src\kiwano\core\intrusive_ptr.hpp" />
|
||||
<ClInclude Include="..\src\kiwano\core\noncopyable.hpp" />
|
||||
<ClInclude Include="..\src\kiwano\core\singleton.hpp" />
|
||||
<ClInclude Include="..\src\kiwano\core\string.hpp" />
|
||||
<ClInclude Include="..\src\kiwano\core\types.h" />
|
||||
<ClInclude Include="..\src\kiwano\core\vector.hpp" />
|
||||
<ClInclude Include="..\src\kiwano\kiwano.h" />
|
||||
<ClInclude Include="..\src\kiwano\config.h" />
|
||||
<ClInclude Include="..\src\kiwano\macros.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\include-forwards.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\Canvas.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\DebugActor.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\FrameSequence.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\ShapeActor.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\Layer.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\Actor.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\Stage.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\Sprite.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\Text.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\TextStyle.hpp" />
|
||||
<ClInclude Include="..\src\kiwano\2d\Transform.h" />
|
||||
<ClInclude Include="..\src\kiwano\2d\Transition.h" />
|
||||
<ClInclude Include="..\src\kiwano\base\AsyncTask.h" />
|
||||
<ClInclude Include="..\src\kiwano\base\Component.h" />
|
||||
<ClInclude Include="..\src\kiwano\base\Event.hpp" />
|
||||
<ClInclude Include="..\src\kiwano\base\EventDispatcher.h" />
|
||||
<ClInclude Include="..\src\kiwano\base\EventListener.h" />
|
||||
<ClInclude Include="..\src\kiwano\base\Input.h" />
|
||||
<ClInclude Include="..\src\kiwano\base\keys.hpp" />
|
||||
<ClInclude Include="..\src\kiwano\base\Logger.h" />
|
||||
<ClInclude Include="..\src\kiwano\base\ObjectBase.h" />
|
||||
<ClInclude Include="..\src\kiwano\base\RefCounter.hpp" />
|
||||
<ClInclude Include="..\src\kiwano\base\Resource.h" />
|
||||
<ClInclude Include="..\src\kiwano\base\SmartPtr.hpp" />
|
||||
<ClInclude Include="..\src\kiwano\base\Timer.h" />
|
||||
<ClInclude Include="..\src\kiwano\base\TimerManager.h" />
|
||||
<ClInclude Include="..\src\kiwano\base\time.h" />
|
||||
<ClInclude Include="..\src\kiwano\base\Window.h" />
|
||||
<ClInclude Include="..\src\kiwano\math\constants.h" />
|
||||
<ClInclude Include="..\src\kiwano\math\ease.h" />
|
||||
<ClInclude Include="..\src\kiwano\math\math.h" />
|
||||
<ClInclude Include="..\src\kiwano\math\Matrix.hpp" />
|
||||
<ClInclude Include="..\src\kiwano\math\rand.h" />
|
||||
<ClInclude Include="..\src\kiwano\math\Rect.hpp" />
|
||||
<ClInclude Include="..\src\kiwano\math\scalar.h" />
|
||||
<ClInclude Include="..\src\kiwano\math\Vec2.hpp" />
|
||||
<ClInclude Include="..\src\kiwano\platform\Application.h" />
|
||||
<ClInclude Include="..\src\kiwano\platform\modules.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\Brush.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\Color.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\Font.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\FontCollection.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\Geometry.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\GifImage.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\StrokeStyle.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\Texture.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\TextureCache.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\LayerArea.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\Renderer.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\RenderTarget.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\TextLayout.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\win32\D2DDeviceResources.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\win32\D3D10DeviceResources.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\win32\D3D11DeviceResources.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\win32\D3DDeviceResourcesBase.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\win32\FontCollectionLoader.h" />
|
||||
<ClInclude Include="..\src\kiwano\renderer\win32\TextRenderer.h" />
|
||||
<ClInclude Include="..\src\kiwano\third-party\StackWalker\StackWalker.h" />
|
||||
<ClInclude Include="..\src\kiwano\third-party\tinyxml2\tinyxml2.h" />
|
||||
<ClInclude Include="..\src\kiwano\ui\Button.h" />
|
||||
<ClInclude Include="..\src\kiwano\ui\Menu.h" />
|
||||
<ClInclude Include="..\src\kiwano\utils\DataUtil.h" />
|
||||
<ClInclude Include="..\src\kiwano\utils\FileUtil.h" />
|
||||
<ClInclude Include="..\src\kiwano\utils\Path.h" />
|
||||
<ClInclude Include="..\src\kiwano\utils\ResourceCache.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\kiwano\2d\action\Action.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\action\ActionDelay.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\action\ActionGroup.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\action\ActionManager.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\action\ActionWalk.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\action\ActionTween.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\action\Animation.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\Canvas.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\DebugActor.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\Frame.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\FrameSequence.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\ShapeActor.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\GifSprite.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\Layer.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\Actor.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\Stage.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\Sprite.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\Text.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\Transform.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\2d\Transition.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\base\AsyncTask.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\base\Component.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\base\EventDispatcher.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\base\EventListener.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\base\Input.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\base\Logger.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\base\ObjectBase.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\base\Resource.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\base\Director.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\base\Timer.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\base\TimerManager.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\base\time.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\base\Window.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\platform\Application.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\platform\modules.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\renderer\Brush.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\renderer\Color.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\renderer\Font.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\renderer\FontCollection.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\renderer\Geometry.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\renderer\GifImage.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\renderer\Texture.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\renderer\TextureCache.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\renderer\LayerArea.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\renderer\Renderer.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\renderer\RenderTarget.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\renderer\TextLayout.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\renderer\win32\D2DDeviceResources.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\renderer\win32\D3D10DeviceResources.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\renderer\win32\D3D11DeviceResources.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\renderer\win32\FontCollectionLoader.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\renderer\win32\TextRenderer.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\third-party\StackWalker\StackWalker.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\third-party\tinyxml2\tinyxml2.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\ui\Button.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\ui\Menu.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\utils\DataUtil.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\utils\FileUtil.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\utils\Path.cpp" />
|
||||
<ClCompile Include="..\src\kiwano\utils\ResourceCache.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}</ProjectGuid>
|
||||
<RootNamespace>kiwano</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
|
|
@ -1,498 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="math">
|
||||
<UniqueIdentifier>{80bc6386-2b70-4bae-993c-649a55163a1b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="utils">
|
||||
<UniqueIdentifier>{68eac919-ee87-4030-a033-c251731928f5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ui">
|
||||
<UniqueIdentifier>{07b6d541-4a1b-472a-aae0-daf9d082fe84}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="platform">
|
||||
<UniqueIdentifier>{c2654ccc-59f6-4c17-bb6b-99b07fc78702}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="2d">
|
||||
<UniqueIdentifier>{896bdedf-6e82-449b-9b6e-0bc69f3699b1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="base">
|
||||
<UniqueIdentifier>{2e18d99a-e906-499a-9e29-4e0783202644}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="renderer">
|
||||
<UniqueIdentifier>{7897afce-24cb-42b4-9443-56508e4ec89c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="third-party">
|
||||
<UniqueIdentifier>{91029e1e-40c2-40d9-bfc4-a51d9df02b80}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="third-party\StackWalker">
|
||||
<UniqueIdentifier>{1fec4835-63a1-4612-80b5-828dadf0ac63}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="third-party\tinyxml2">
|
||||
<UniqueIdentifier>{0cae76f7-7016-4a45-bb26-a130fbce8024}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="2d\action">
|
||||
<UniqueIdentifier>{9314f30d-5742-48b6-94e5-e3b4284106f6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="core">
|
||||
<UniqueIdentifier>{86e2d0f2-a9d0-4456-b6a5-d480228bbf82}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="renderer\win32">
|
||||
<UniqueIdentifier>{30333461-e9bc-4709-84bd-ce6e0e1a3079}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="base\win32">
|
||||
<UniqueIdentifier>{192a47a9-9df6-4f40-a7d3-888eb00c53ac}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\kiwano\ui\Button.h">
|
||||
<Filter>ui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\ui\Menu.h">
|
||||
<Filter>ui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\Canvas.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\include-forwards.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\Layer.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\Sprite.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\Text.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\TextStyle.hpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\Transition.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\base\Component.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\base\Event.hpp">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\base\EventDispatcher.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\base\EventListener.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\base\keys.hpp">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\base\RefCounter.hpp">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\base\Resource.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\base\time.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\math\Matrix.hpp">
|
||||
<Filter>math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\math\rand.h">
|
||||
<Filter>math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\math\Rect.hpp">
|
||||
<Filter>math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\platform\Application.h">
|
||||
<Filter>platform</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\platform\modules.h">
|
||||
<Filter>platform</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\utils\Path.h">
|
||||
<Filter>utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\config.h" />
|
||||
<ClInclude Include="..\src\kiwano\macros.h" />
|
||||
<ClInclude Include="..\src\kiwano\math\Vec2.hpp">
|
||||
<Filter>math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\base\Input.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\base\SmartPtr.hpp">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\kiwano.h" />
|
||||
<ClInclude Include="..\src\kiwano\utils\DataUtil.h">
|
||||
<Filter>utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\base\Timer.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\base\TimerManager.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\base\AsyncTask.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\third-party\StackWalker\StackWalker.h">
|
||||
<Filter>third-party\StackWalker</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\utils\FileUtil.h">
|
||||
<Filter>utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\GifSprite.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\third-party\tinyxml2\tinyxml2.h">
|
||||
<Filter>third-party\tinyxml2</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\base\Director.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\Actor.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\Stage.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\Frame.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\action\Action.h">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\action\ActionGroup.h">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\action\ActionHelper.h">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\action\ActionTween.h">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\action\ActionManager.h">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\action\Animation.h">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\utils\ResourceCache.h">
|
||||
<Filter>utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\FrameSequence.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\core\basic_json.hpp">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\core\function.hpp">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\core\intrusive_list.hpp">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\core\intrusive_ptr.hpp">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\core\noncopyable.hpp">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\core\singleton.hpp">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\core\string.hpp">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\core\vector.hpp">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\core\core.h">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\DebugActor.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\ShapeActor.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\action\ActionDelay.h">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\action\ActionWalk.h">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\base\Logger.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\base\Window.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\math\math.h">
|
||||
<Filter>math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\base\ObjectBase.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\Color.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\Font.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\Geometry.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\GifImage.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\LayerArea.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\Renderer.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\TextLayout.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\win32\D2DDeviceResources.h">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\win32\D3D10DeviceResources.h">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\win32\D3D11DeviceResources.h">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\win32\D3DDeviceResourcesBase.h">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\win32\FontCollectionLoader.h">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\win32\TextRenderer.h">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\RenderTarget.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\FontCollection.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\core\types.h">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\2d\Transform.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\Texture.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\TextureCache.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\StrokeStyle.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\renderer\Brush.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\math\constants.h">
|
||||
<Filter>math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\math\ease.h">
|
||||
<Filter>math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\math\scalar.h">
|
||||
<Filter>math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\kiwano\base\win32\ComPtr.hpp">
|
||||
<Filter>base\win32</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\kiwano\ui\Button.cpp">
|
||||
<Filter>ui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\ui\Menu.cpp">
|
||||
<Filter>ui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\Canvas.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\Layer.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\Sprite.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\Text.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\Transition.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\base\EventDispatcher.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\base\EventListener.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\base\Resource.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\base\time.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\platform\Application.cpp">
|
||||
<Filter>platform</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\platform\modules.cpp">
|
||||
<Filter>platform</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\utils\Path.cpp">
|
||||
<Filter>utils</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\base\Input.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\utils\DataUtil.cpp">
|
||||
<Filter>utils</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\base\Timer.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\base\TimerManager.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\base\AsyncTask.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\third-party\StackWalker\StackWalker.cpp">
|
||||
<Filter>third-party\StackWalker</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\utils\FileUtil.cpp">
|
||||
<Filter>utils</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\GifSprite.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\third-party\tinyxml2\tinyxml2.cpp">
|
||||
<Filter>third-party\tinyxml2</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\base\Director.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\Actor.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\Stage.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\Frame.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\action\Action.cpp">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\action\ActionGroup.cpp">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\action\ActionTween.cpp">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\action\ActionManager.cpp">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\action\Animation.cpp">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\utils\ResourceCache.cpp">
|
||||
<Filter>utils</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\FrameSequence.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\DebugActor.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\ShapeActor.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\action\ActionDelay.cpp">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\action\ActionWalk.cpp">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\base\Logger.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\base\Window.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\base\ObjectBase.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\renderer\Color.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\renderer\Font.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\renderer\Geometry.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\renderer\GifImage.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\renderer\LayerArea.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\renderer\Renderer.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\renderer\TextLayout.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\renderer\win32\D2DDeviceResources.cpp">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\renderer\win32\D3D10DeviceResources.cpp">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\renderer\win32\D3D11DeviceResources.cpp">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\renderer\win32\FontCollectionLoader.cpp">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\renderer\win32\TextRenderer.cpp">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\renderer\RenderTarget.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\renderer\FontCollection.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\2d\Transform.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\renderer\Texture.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\renderer\TextureCache.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\renderer\Brush.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\kiwano\base\Component.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,311 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\action\Action.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\action\ActionDelay.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\action\ActionGroup.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\action\ActionHelper.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\action\ActionManager.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\action\ActionWalk.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\action\ActionTween.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\action\Animation.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\Frame.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\GifSprite.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\base\Director.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\base\win32\ComPtr.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano\core\basic_json.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano\core\function.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano\core\core.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\core\intrusive_list.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano\core\intrusive_ptr.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano\core\noncopyable.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano\core\singleton.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano\core\string.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano\core\vector.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano\kiwano.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\config.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\macros.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\include-forwards.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\Canvas.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\DebugActor.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\FrameSequence.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\ShapeActor.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\Layer.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\Actor.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\Stage.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\Sprite.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\Text.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\TextStyle.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\Transform.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\2d\Transition.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\base\AsyncTask.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\base\Component.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\base\Event.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano\base\EventDispatcher.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\base\EventListener.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\base\Input.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\base\keys.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano\base\Logger.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\base\ObjectBase.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\base\RefCounter.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano\base\Resource.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\base\SmartPtr.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano\base\Timer.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\base\TimerManager.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\base\time.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\base\Window.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\math\constants.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\math\ease.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\math\math.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\math\Matrix.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano\math\rand.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\math\Rect.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano\math\scalar.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\math\Vec2.hpp" />
|
||||
<ClInclude Include="..\..\src\kiwano\platform\Application.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\platform\modules.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\Brush.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\Color.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\Font.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\FontCollection.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\Geometry.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\GifImage.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\StrokeStyle.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\Texture.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\TextureCache.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\LayerArea.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\Renderer.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\RenderTarget.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\TextLayout.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\win32\D2DDeviceResources.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\win32\D3D10DeviceResources.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\win32\D3D11DeviceResources.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\win32\D3DDeviceResourcesBase.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\win32\FontCollectionLoader.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\win32\TextRenderer.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\third-party\StackWalker\StackWalker.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\third-party\tinyxml2\tinyxml2.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\ui\Button.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\ui\Menu.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\utils\DataUtil.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\utils\FileUtil.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\utils\Path.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\utils\ResourceCache.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\action\Action.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\action\ActionDelay.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\action\ActionGroup.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\action\ActionManager.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\action\ActionWalk.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\action\ActionTween.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\action\Animation.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\Canvas.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\DebugActor.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\Frame.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\FrameSequence.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\ShapeActor.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\GifSprite.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\Layer.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\Actor.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\Stage.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\Sprite.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\Text.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\Transform.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\2d\Transition.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\base\AsyncTask.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\base\Component.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\base\EventDispatcher.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\base\EventListener.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\base\Input.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\base\Logger.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\base\ObjectBase.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\base\Resource.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\base\Director.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\base\Timer.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\base\TimerManager.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\base\time.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\base\Window.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\platform\Application.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\platform\modules.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\Brush.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\Color.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\Font.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\FontCollection.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\Geometry.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\GifImage.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\Texture.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\TextureCache.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\LayerArea.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\Renderer.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\RenderTarget.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\TextLayout.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\win32\D2DDeviceResources.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\win32\D3D10DeviceResources.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\win32\D3D11DeviceResources.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\win32\FontCollectionLoader.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\win32\TextRenderer.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\third-party\StackWalker\StackWalker.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\third-party\tinyxml2\tinyxml2.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\ui\Button.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\ui\Menu.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\utils\DataUtil.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\utils\FileUtil.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\utils\Path.cpp" />
|
||||
<ClCompile Include="..\..\src\kiwano\utils\ResourceCache.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}</ProjectGuid>
|
||||
<RootNamespace>kiwano</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)\output\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)\build\$(PlatformToolset)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,495 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="math">
|
||||
<UniqueIdentifier>{80bc6386-2b70-4bae-993c-649a55163a1b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="utils">
|
||||
<UniqueIdentifier>{68eac919-ee87-4030-a033-c251731928f5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ui">
|
||||
<UniqueIdentifier>{07b6d541-4a1b-472a-aae0-daf9d082fe84}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="platform">
|
||||
<UniqueIdentifier>{c2654ccc-59f6-4c17-bb6b-99b07fc78702}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="2d">
|
||||
<UniqueIdentifier>{896bdedf-6e82-449b-9b6e-0bc69f3699b1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="base">
|
||||
<UniqueIdentifier>{2e18d99a-e906-499a-9e29-4e0783202644}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="renderer">
|
||||
<UniqueIdentifier>{7897afce-24cb-42b4-9443-56508e4ec89c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="third-party">
|
||||
<UniqueIdentifier>{91029e1e-40c2-40d9-bfc4-a51d9df02b80}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="third-party\StackWalker">
|
||||
<UniqueIdentifier>{1fec4835-63a1-4612-80b5-828dadf0ac63}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="third-party\tinyxml2">
|
||||
<UniqueIdentifier>{0cae76f7-7016-4a45-bb26-a130fbce8024}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="2d\action">
|
||||
<UniqueIdentifier>{9314f30d-5742-48b6-94e5-e3b4284106f6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="core">
|
||||
<UniqueIdentifier>{86e2d0f2-a9d0-4456-b6a5-d480228bbf82}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="renderer\win32">
|
||||
<UniqueIdentifier>{30333461-e9bc-4709-84bd-ce6e0e1a3079}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="base\win32">
|
||||
<UniqueIdentifier>{192a47a9-9df6-4f40-a7d3-888eb00c53ac}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\kiwano\ui\Button.h">
|
||||
<Filter>ui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\ui\Menu.h">
|
||||
<Filter>ui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\Canvas.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\include-forwards.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\Layer.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\Sprite.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\Text.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\TextStyle.hpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\Transition.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\base\Component.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\base\Event.hpp">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\base\EventDispatcher.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\base\EventListener.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\base\keys.hpp">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\base\RefCounter.hpp">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\base\Resource.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\base\time.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\math\Matrix.hpp">
|
||||
<Filter>math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\math\rand.h">
|
||||
<Filter>math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\math\Rect.hpp">
|
||||
<Filter>math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\platform\Application.h">
|
||||
<Filter>platform</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\platform\modules.h">
|
||||
<Filter>platform</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\utils\Path.h">
|
||||
<Filter>utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\config.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\macros.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\math\Vec2.hpp">
|
||||
<Filter>math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\base\Input.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\base\SmartPtr.hpp">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\kiwano.h" />
|
||||
<ClInclude Include="..\..\src\kiwano\utils\DataUtil.h">
|
||||
<Filter>utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\base\Timer.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\base\TimerManager.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\base\AsyncTask.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\third-party\StackWalker\StackWalker.h">
|
||||
<Filter>third-party\StackWalker</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\utils\FileUtil.h">
|
||||
<Filter>utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\GifSprite.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\third-party\tinyxml2\tinyxml2.h">
|
||||
<Filter>third-party\tinyxml2</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\base\Director.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\Actor.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\Stage.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\Frame.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\action\Action.h">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\action\ActionGroup.h">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\action\ActionHelper.h">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\action\ActionTween.h">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\action\ActionManager.h">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\action\Animation.h">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\utils\ResourceCache.h">
|
||||
<Filter>utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\FrameSequence.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\core\basic_json.hpp">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\core\function.hpp">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\core\intrusive_list.hpp">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\core\intrusive_ptr.hpp">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\core\noncopyable.hpp">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\core\singleton.hpp">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\core\string.hpp">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\core\vector.hpp">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\core\core.h">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\DebugActor.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\ShapeActor.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\action\ActionDelay.h">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\action\ActionWalk.h">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\base\Logger.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\base\Window.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\math\math.h">
|
||||
<Filter>math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\base\ObjectBase.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\Color.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\Font.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\Geometry.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\GifImage.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\LayerArea.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\Renderer.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\TextLayout.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\win32\D2DDeviceResources.h">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\win32\D3D10DeviceResources.h">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\win32\D3D11DeviceResources.h">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\win32\D3DDeviceResourcesBase.h">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\win32\FontCollectionLoader.h">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\win32\TextRenderer.h">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\RenderTarget.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\FontCollection.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\2d\Transform.h">
|
||||
<Filter>2d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\Texture.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\TextureCache.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\StrokeStyle.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\renderer\Brush.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\math\constants.h">
|
||||
<Filter>math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\math\ease.h">
|
||||
<Filter>math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\math\scalar.h">
|
||||
<Filter>math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\kiwano\base\win32\ComPtr.hpp">
|
||||
<Filter>base\win32</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\kiwano\ui\Button.cpp">
|
||||
<Filter>ui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\ui\Menu.cpp">
|
||||
<Filter>ui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\Canvas.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\Layer.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\Sprite.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\Text.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\Transition.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\base\EventDispatcher.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\base\EventListener.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\base\Resource.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\base\time.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\platform\Application.cpp">
|
||||
<Filter>platform</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\platform\modules.cpp">
|
||||
<Filter>platform</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\utils\Path.cpp">
|
||||
<Filter>utils</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\base\Input.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\utils\DataUtil.cpp">
|
||||
<Filter>utils</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\base\Timer.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\base\TimerManager.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\base\AsyncTask.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\third-party\StackWalker\StackWalker.cpp">
|
||||
<Filter>third-party\StackWalker</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\utils\FileUtil.cpp">
|
||||
<Filter>utils</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\GifSprite.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\third-party\tinyxml2\tinyxml2.cpp">
|
||||
<Filter>third-party\tinyxml2</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\base\Director.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\Actor.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\Stage.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\Frame.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\action\Action.cpp">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\action\ActionGroup.cpp">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\action\ActionTween.cpp">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\action\ActionManager.cpp">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\action\Animation.cpp">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\utils\ResourceCache.cpp">
|
||||
<Filter>utils</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\FrameSequence.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\DebugActor.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\ShapeActor.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\action\ActionDelay.cpp">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\action\ActionWalk.cpp">
|
||||
<Filter>2d\action</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\base\Logger.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\base\Window.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\base\ObjectBase.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\Color.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\Font.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\Geometry.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\GifImage.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\LayerArea.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\Renderer.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\TextLayout.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\win32\D2DDeviceResources.cpp">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\win32\D3D10DeviceResources.cpp">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\win32\D3D11DeviceResources.cpp">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\win32\FontCollectionLoader.cpp">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\win32\TextRenderer.cpp">
|
||||
<Filter>renderer\win32</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\RenderTarget.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\FontCollection.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\2d\Transform.cpp">
|
||||
<Filter>2d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\Texture.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\TextureCache.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\renderer\Brush.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\kiwano\base\Component.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -114,7 +114,7 @@ namespace kiwano
|
|||
return true;
|
||||
}
|
||||
|
||||
void Sound::Play(Int32 loop_count)
|
||||
void Sound::Play(int loop_count)
|
||||
{
|
||||
if (!opened_)
|
||||
{
|
||||
|
|
@ -139,7 +139,7 @@ namespace kiwano
|
|||
buffer.pAudioData = wave_buffer.data;
|
||||
buffer.Flags = XAUDIO2_END_OF_STREAM;
|
||||
buffer.AudioBytes = wave_buffer.size;
|
||||
buffer.LoopCount = static_cast<UInt32>(loop_count);
|
||||
buffer.LoopCount = static_cast<std::uint32_t>(loop_count);
|
||||
|
||||
HRESULT hr = voice_->SubmitSourceBuffer(&buffer);
|
||||
if (SUCCEEDED(hr))
|
||||
|
|
@ -212,7 +212,7 @@ namespace kiwano
|
|||
|
||||
XAUDIO2_VOICE_STATE state;
|
||||
voice_->GetState(&state);
|
||||
UInt32 buffers_queued = state.BuffersQueued;
|
||||
std::uint32_t buffers_queued = state.BuffersQueued;
|
||||
|
||||
if (buffers_queued && playing_)
|
||||
return true;
|
||||
|
|
@ -220,16 +220,16 @@ namespace kiwano
|
|||
return false;
|
||||
}
|
||||
|
||||
Float32 Sound::GetVolume() const
|
||||
float Sound::GetVolume() const
|
||||
{
|
||||
KGE_ASSERT(voice_ != nullptr && "IXAudio2SourceVoice* is NULL");
|
||||
|
||||
Float32 volume = 0.0f;
|
||||
float volume = 0.0f;
|
||||
voice_->GetVolume(&volume);
|
||||
return volume;
|
||||
}
|
||||
|
||||
void Sound::SetVolume(Float32 volume)
|
||||
void Sound::SetVolume(float volume)
|
||||
{
|
||||
KGE_ASSERT(voice_ != nullptr && "IXAudio2SourceVoice* is NULL");
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ namespace kiwano
|
|||
|
||||
// ²¥·Å
|
||||
void Play(
|
||||
Int32 loop_count = 0 /* 播放循环次数 (-1 为循环播放) */
|
||||
int loop_count = 0 /* 播放循环次数 (-1 为循环播放) */
|
||||
);
|
||||
|
||||
// ÔÝÍ£
|
||||
|
|
@ -78,11 +78,11 @@ namespace kiwano
|
|||
bool IsPlaying() const;
|
||||
|
||||
// »ñÈ¡ÒôÁ¿
|
||||
Float32 GetVolume() const;
|
||||
float GetVolume() const;
|
||||
|
||||
// ÉèÖÃÒôÁ¿
|
||||
void SetVolume(
|
||||
Float32 volume /* 1 为原始音量, 大于 1 为放大音量, 0 为最小音量 */
|
||||
float volume /* 1 为原始音量, 大于 1 为放大音量, 0 为最小音量 */
|
||||
);
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ namespace kiwano
|
|||
ClearCache();
|
||||
}
|
||||
|
||||
UInt32 SoundPlayer::Load(String const& file_path)
|
||||
std::size_t SoundPlayer::Load(String const& file_path)
|
||||
{
|
||||
UInt32 hash_code = file_path.hash();
|
||||
int hash_code = static_cast<int>(file_path.hash());
|
||||
if (sound_cache_.end() != sound_cache_.find(hash_code))
|
||||
return hash_code;
|
||||
|
||||
|
|
@ -54,9 +54,9 @@ namespace kiwano
|
|||
return 0;
|
||||
}
|
||||
|
||||
UInt32 SoundPlayer::Load(Resource const& res)
|
||||
std::size_t SoundPlayer::Load(Resource const& res)
|
||||
{
|
||||
UInt32 hash_code = res.GetId();
|
||||
std::size_t hash_code = static_cast<std::size_t>(res.GetId());
|
||||
if (sound_cache_.end() != sound_cache_.find(hash_code))
|
||||
return hash_code;
|
||||
|
||||
|
|
@ -74,35 +74,35 @@ namespace kiwano
|
|||
return 0;
|
||||
}
|
||||
|
||||
void SoundPlayer::Play(UInt32 id, Int32 loop_count)
|
||||
void SoundPlayer::Play(std::size_t id, int loop_count)
|
||||
{
|
||||
auto iter = sound_cache_.find(id);
|
||||
if (sound_cache_.end() != iter)
|
||||
iter->second->Play(loop_count);
|
||||
}
|
||||
|
||||
void SoundPlayer::Pause(UInt32 id)
|
||||
void SoundPlayer::Pause(std::size_t id)
|
||||
{
|
||||
auto iter = sound_cache_.find(id);
|
||||
if (sound_cache_.end() != iter)
|
||||
iter->second->Pause();
|
||||
}
|
||||
|
||||
void SoundPlayer::Resume(UInt32 id)
|
||||
void SoundPlayer::Resume(std::size_t id)
|
||||
{
|
||||
auto iter = sound_cache_.find(id);
|
||||
if (sound_cache_.end() != iter)
|
||||
iter->second->Resume();
|
||||
}
|
||||
|
||||
void SoundPlayer::Stop(UInt32 id)
|
||||
void SoundPlayer::Stop(std::size_t id)
|
||||
{
|
||||
auto iter = sound_cache_.find(id);
|
||||
if (sound_cache_.end() != iter)
|
||||
iter->second->Stop();
|
||||
}
|
||||
|
||||
bool SoundPlayer::IsPlaying(UInt32 id)
|
||||
bool SoundPlayer::IsPlaying(std::size_t id)
|
||||
{
|
||||
auto iter = sound_cache_.find(id);
|
||||
if (sound_cache_.end() != iter)
|
||||
|
|
@ -110,12 +110,12 @@ namespace kiwano
|
|||
return false;
|
||||
}
|
||||
|
||||
Float32 SoundPlayer::GetVolume() const
|
||||
float SoundPlayer::GetVolume() const
|
||||
{
|
||||
return volume_;
|
||||
}
|
||||
|
||||
void SoundPlayer::SetVolume(Float32 volume)
|
||||
void SoundPlayer::SetVolume(float volume)
|
||||
{
|
||||
volume_ = std::min(std::max(volume, -224.f), 224.f);
|
||||
for (const auto& pair : sound_cache_)
|
||||
|
|
|
|||
|
|
@ -39,47 +39,47 @@ namespace kiwano
|
|||
~SoundPlayer();
|
||||
|
||||
// 속潼굶뒈稜틉匡숭, 럿쀼맡栗都돨깃街륜
|
||||
UInt32 Load(
|
||||
std::size_t Load(
|
||||
String const& file_path
|
||||
);
|
||||
|
||||
// 속潼稜있栗都, 럿쀼맡栗都돨깃街륜
|
||||
UInt32 Load(
|
||||
Resource const& res /* 音乐资源 */
|
||||
std::size_t Load(
|
||||
Resource const& res /* 音乐资源 */
|
||||
);
|
||||
|
||||
// 꺄렴稜있
|
||||
void Play(
|
||||
UInt32 id, /* 标识符 */
|
||||
Int32 loop_count = 0 /* 播放循环次数 (-1 为循环播放) */
|
||||
std::size_t id, /* 标识符 */
|
||||
int loop_count = 0 /* 播放循环次数 (-1 为循环播放) */
|
||||
);
|
||||
|
||||
// 董界稜있
|
||||
void Pause(
|
||||
UInt32 id /* 标识符 */
|
||||
std::size_t id /* 标识符 */
|
||||
);
|
||||
|
||||
// 셨崎꺄렴稜있
|
||||
void Resume(
|
||||
UInt32 id /* 标识符 */
|
||||
std::size_t id /* 标识符 */
|
||||
);
|
||||
|
||||
// 界岺稜있
|
||||
void Stop(
|
||||
UInt32 id /* 标识符 */
|
||||
std::size_t id /* 标识符 */
|
||||
);
|
||||
|
||||
// 삿혤稜있꺄렴榴檄
|
||||
bool IsPlaying(
|
||||
UInt32 id /* 标识符 */
|
||||
std::size_t id /* 标识符 */
|
||||
);
|
||||
|
||||
// 삿혤稜좆
|
||||
Float32 GetVolume() const;
|
||||
float GetVolume() const;
|
||||
|
||||
// <20>零稜좆
|
||||
void SetVolume(
|
||||
Float32 volume /* 1.0 为原始音量 */
|
||||
float volume /* 1.0 为原始音量 */
|
||||
);
|
||||
|
||||
// 董界杰唐稜있
|
||||
|
|
@ -95,9 +95,9 @@ namespace kiwano
|
|||
void ClearCache();
|
||||
|
||||
protected:
|
||||
Float32 volume_;
|
||||
float volume_;
|
||||
|
||||
using SoundMap = Map<UInt32, SoundPtr>;
|
||||
using SoundMap = Map<std::size_t, SoundPtr>;
|
||||
SoundMap sound_cache_;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,8 +102,8 @@ namespace kiwano
|
|||
if (!data) { return E_FAIL; }
|
||||
|
||||
stream = kiwano::modules::Shlwapi::Get().SHCreateMemStream(
|
||||
static_cast<const Byte*>(data.buffer),
|
||||
static_cast<UInt32>(data.size)
|
||||
static_cast<const BYTE*>(data.buffer),
|
||||
static_cast<std::uint32_t>(data.size)
|
||||
);
|
||||
|
||||
if (stream == nullptr)
|
||||
|
|
@ -185,7 +185,7 @@ namespace kiwano
|
|||
// »ñÈ¡ WAVEFORMAT Êý¾Ý
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
UInt32 size = 0;
|
||||
std::uint32_t size = 0;
|
||||
hr = modules::MediaFoundation::Get().MFCreateWaveFormatExFromMFMediaType(
|
||||
uncompressed_type.get(),
|
||||
&wave_format_,
|
||||
|
|
@ -218,7 +218,7 @@ namespace kiwano
|
|||
{
|
||||
DWORD flags = 0;
|
||||
DWORD position = 0;
|
||||
Byte* data = new (std::nothrow) Byte[max_stream_size];
|
||||
BYTE* data = new (std::nothrow) BYTE[max_stream_size];
|
||||
|
||||
ComPtr<IMFSample> sample;
|
||||
ComPtr<IMFMediaBuffer> buffer;
|
||||
|
|
@ -251,7 +251,7 @@ namespace kiwano
|
|||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
Byte* audio_data = nullptr;
|
||||
BYTE* audio_data = nullptr;
|
||||
DWORD sample_buffer_length = 0;
|
||||
|
||||
hr = buffer->Lock(
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ namespace kiwano
|
|||
public:
|
||||
struct Buffer
|
||||
{
|
||||
Byte* data;
|
||||
UInt32 size;
|
||||
BYTE* data;
|
||||
std::uint32_t size;
|
||||
const WAVEFORMATEX* format;
|
||||
};
|
||||
|
||||
|
|
@ -60,8 +60,8 @@ namespace kiwano
|
|||
);
|
||||
|
||||
private:
|
||||
Byte* wave_data_;
|
||||
UInt32 wave_size_;
|
||||
BYTE* wave_data_;
|
||||
std::uint32_t wave_size_;
|
||||
WAVEFORMATEX* wave_format_;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ namespace kiwano
|
|||
HMODULE xaudio2;
|
||||
|
||||
// XAudio2 functions
|
||||
typedef HRESULT(WINAPI* PFN_XAudio2Create)(IXAudio2**, UInt32, XAUDIO2_PROCESSOR);
|
||||
typedef HRESULT(WINAPI* PFN_XAudio2Create)(IXAudio2**, UINT32, XAUDIO2_PROCESSOR);
|
||||
|
||||
public:
|
||||
static inline XAudio2& Get()
|
||||
|
|
@ -61,7 +61,7 @@ namespace kiwano
|
|||
typedef HRESULT(WINAPI* PFN_MFStartup)(ULONG, DWORD);
|
||||
typedef HRESULT(WINAPI* PFN_MFShutdown)();
|
||||
typedef HRESULT(WINAPI* PFN_MFCreateMediaType)(IMFMediaType**);
|
||||
typedef HRESULT(WINAPI* PFN_MFCreateWaveFormatExFromMFMediaType)(IMFMediaType*, WAVEFORMATEX**, UInt32*, UInt32);
|
||||
typedef HRESULT(WINAPI* PFN_MFCreateWaveFormatExFromMFMediaType)(IMFMediaType*, WAVEFORMATEX**, UINT32*, UINT32);
|
||||
typedef HRESULT(WINAPI* PFN_MFCreateSourceReaderFromURL)(LPCWSTR, IMFAttributes*, IMFSourceReader**);
|
||||
typedef HRESULT(WINAPI* PFN_MFCreateSourceReaderFromByteStream)(IMFByteStream*, IMFAttributes*, IMFSourceReader**);
|
||||
typedef HRESULT(WINAPI* PFN_MFCreateMFByteStreamOnStream)(IStream*, IMFByteStream**);
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ namespace kiwano
|
|||
Render();
|
||||
}
|
||||
|
||||
void ImGuiModule::HandleMessage(HWND hwnd, UInt32 msg, WPARAM wparam, LPARAM lparam)
|
||||
void ImGuiModule::HandleMessage(HWND hwnd, std::uint32_t msg, WPARAM wparam, LPARAM lparam)
|
||||
{
|
||||
if (ImGui::GetCurrentContext() == NULL)
|
||||
return;
|
||||
|
|
@ -132,7 +132,7 @@ namespace kiwano
|
|||
case WM_MBUTTONDOWN: case WM_MBUTTONDBLCLK:
|
||||
case WM_XBUTTONDOWN: case WM_XBUTTONDBLCLK:
|
||||
{
|
||||
Int32 button = 0;
|
||||
int button = 0;
|
||||
if (msg == WM_LBUTTONDOWN || msg == WM_LBUTTONDBLCLK) { button = 0; }
|
||||
if (msg == WM_RBUTTONDOWN || msg == WM_RBUTTONDBLCLK) { button = 1; }
|
||||
if (msg == WM_MBUTTONDOWN || msg == WM_MBUTTONDBLCLK) { button = 2; }
|
||||
|
|
@ -148,7 +148,7 @@ namespace kiwano
|
|||
case WM_MBUTTONUP:
|
||||
case WM_XBUTTONUP:
|
||||
{
|
||||
Int32 button = 0;
|
||||
int button = 0;
|
||||
if (msg == WM_LBUTTONUP) { button = 0; }
|
||||
if (msg == WM_RBUTTONUP) { button = 1; }
|
||||
if (msg == WM_MBUTTONUP) { button = 2; }
|
||||
|
|
@ -160,12 +160,12 @@ namespace kiwano
|
|||
}
|
||||
case WM_MOUSEWHEEL:
|
||||
{
|
||||
io.MouseWheel += (Float32)GET_WHEEL_DELTA_WPARAM(wparam) / (Float32)WHEEL_DELTA;
|
||||
io.MouseWheel += (float)GET_WHEEL_DELTA_WPARAM(wparam) / (float)WHEEL_DELTA;
|
||||
break;
|
||||
}
|
||||
case WM_MOUSEHWHEEL:
|
||||
{
|
||||
io.MouseWheelH += (Float32)GET_WHEEL_DELTA_WPARAM(wparam) / (Float32)WHEEL_DELTA;
|
||||
io.MouseWheelH += (float)GET_WHEEL_DELTA_WPARAM(wparam) / (float)WHEEL_DELTA;
|
||||
break;
|
||||
}
|
||||
case WM_KEYDOWN:
|
||||
|
|
@ -185,7 +185,7 @@ namespace kiwano
|
|||
case WM_CHAR:
|
||||
{
|
||||
// You can also use ToAscii()+GetKeyboardState() to retrieve characters.
|
||||
io.AddInputCharacter((UInt32)wparam);
|
||||
io.AddInputCharacter((std::uint32_t)wparam);
|
||||
break;
|
||||
}
|
||||
case WM_SETCURSOR:
|
||||
|
|
@ -198,7 +198,7 @@ namespace kiwano
|
|||
}
|
||||
case WM_DEVICECHANGE:
|
||||
{
|
||||
if ((UInt32)wparam == DBT_DEVNODES_CHANGED)
|
||||
if ((std::uint32_t)wparam == DBT_DEVNODES_CHANGED)
|
||||
want_update_has_gamepad_ = true;
|
||||
break;
|
||||
}
|
||||
|
|
@ -233,7 +233,7 @@ namespace kiwano
|
|||
// Set OS mouse position if requested (rarely used, only when ImGuiConfigFlags_NavEnableSetMousePos is enabled by user)
|
||||
if (io.WantSetMousePos)
|
||||
{
|
||||
POINT pos = { (Int32)io.MousePos.x, (Int32)io.MousePos.y };
|
||||
POINT pos = { (int)io.MousePos.x, (int)io.MousePos.y };
|
||||
::ClientToScreen(target_window_, &pos);
|
||||
::SetCursorPos(pos.x, pos.y);
|
||||
}
|
||||
|
|
@ -286,7 +286,7 @@ namespace kiwano
|
|||
io.BackendFlags |= ImGuiBackendFlags_HasGamepad;
|
||||
|
||||
#define MAP_BUTTON(NAV_NO, BUTTON_ENUM) { io.NavInputs[NAV_NO] = (gamepad.wButtons & BUTTON_ENUM) ? 1.0f : 0.0f; }
|
||||
#define MAP_ANALOG(NAV_NO, VALUE, V0, V1) { Float32 vn = (Float32)(VALUE - V0) / (Float32)(V1 - V0); if (vn > 1.0f) vn = 1.0f; if (vn > 0.0f && io.NavInputs[NAV_NO] < vn) io.NavInputs[NAV_NO] = vn; }
|
||||
#define MAP_ANALOG(NAV_NO, VALUE, V0, V1) { float vn = (float)(VALUE - V0) / (float)(V1 - V0); if (vn > 1.0f) vn = 1.0f; if (vn > 0.0f && io.NavInputs[NAV_NO] < vn) io.NavInputs[NAV_NO] = vn; }
|
||||
MAP_BUTTON(ImGuiNavInput_Activate, XINPUT_GAMEPAD_A); // Cross / A
|
||||
MAP_BUTTON(ImGuiNavInput_Cancel, XINPUT_GAMEPAD_B); // Circle / B
|
||||
MAP_BUTTON(ImGuiNavInput_Menu, XINPUT_GAMEPAD_X); // Square / X
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace kiwano
|
|||
|
||||
void AfterRender() override;
|
||||
|
||||
void HandleMessage(HWND hwnd, UInt32 msg, WPARAM wparam, LPARAM lparam) override;
|
||||
void HandleMessage(HWND hwnd, std::uint32_t msg, WPARAM wparam, LPARAM lparam) override;
|
||||
|
||||
void UpdateMousePos();
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,3 @@
|
|||
#include "src/HttpRequest.hpp"
|
||||
#include "src/HttpResponse.hpp"
|
||||
#include "src/HttpClient.h"
|
||||
|
||||
// CURL
|
||||
#include "third-party/curl/curl.h"
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@ namespace
|
|||
using namespace kiwano;
|
||||
using namespace kiwano::network;
|
||||
|
||||
UInt32 write_data(void* buffer, UInt32 size, UInt32 nmemb, void* userp)
|
||||
std::uint32_t write_data(void* buffer, std::uint32_t size, std::uint32_t nmemb, void* userp)
|
||||
{
|
||||
kiwano::string* recv_buffer = (kiwano::string*)userp;
|
||||
UInt32 total = size * nmemb;
|
||||
std::uint32_t total = size * nmemb;
|
||||
|
||||
// add data to the end of recv_buffer
|
||||
// write data maybe called more than once in a single request
|
||||
|
|
@ -49,7 +49,7 @@ namespace
|
|||
|
||||
kiwano::string convert_to_utf8(kiwano::wstring const& str)
|
||||
{
|
||||
std::wstring_convert<std::codecvt_utf8<WChar>> utf8_conv;
|
||||
std::wstring_convert<std::codecvt_utf8<wchar_t>> utf8_conv;
|
||||
kiwano::string result;
|
||||
|
||||
try
|
||||
|
|
@ -66,7 +66,7 @@ namespace
|
|||
|
||||
kiwano::wstring convert_from_utf8(kiwano::string const& str)
|
||||
{
|
||||
kiwano::string_convert<std::codecvt_utf8<WChar>> utf8_conv;
|
||||
kiwano::string_convert<std::codecvt_utf8<wchar_t>> utf8_conv;
|
||||
kiwano::wstring result;
|
||||
|
||||
try
|
||||
|
|
|
|||
|
|
@ -27,11 +27,11 @@ namespace kiwano
|
|||
{
|
||||
namespace
|
||||
{
|
||||
Float32 default_anchor_x = 0.f;
|
||||
Float32 default_anchor_y = 0.f;
|
||||
float default_anchor_x = 0.f;
|
||||
float default_anchor_y = 0.f;
|
||||
}
|
||||
|
||||
void Actor::SetDefaultAnchor(Float32 anchor_x, Float32 anchor_y)
|
||||
void Actor::SetDefaultAnchor(float anchor_x, float anchor_y)
|
||||
{
|
||||
default_anchor_x = anchor_x;
|
||||
default_anchor_y = anchor_y;
|
||||
|
|
@ -325,7 +325,7 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void Actor::SetZOrder(Int32 zorder)
|
||||
void Actor::SetZOrder(int zorder)
|
||||
{
|
||||
if (z_order_ != zorder)
|
||||
{
|
||||
|
|
@ -334,7 +334,7 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void Actor::SetOpacity(Float32 opacity)
|
||||
void Actor::SetOpacity(float opacity)
|
||||
{
|
||||
if (opacity_ == opacity)
|
||||
return;
|
||||
|
|
@ -361,12 +361,12 @@ namespace kiwano
|
|||
dirty_transform_ = true;
|
||||
}
|
||||
|
||||
void Actor::SetWidth(Float32 width)
|
||||
void Actor::SetWidth(float width)
|
||||
{
|
||||
SetSize(Size{ width, size_.y });
|
||||
}
|
||||
|
||||
void Actor::SetHeight(Float32 height)
|
||||
void Actor::SetHeight(float height)
|
||||
{
|
||||
SetSize(Size{ size_.x, height });
|
||||
}
|
||||
|
|
@ -410,12 +410,12 @@ namespace kiwano
|
|||
dirty_transform_ = true;
|
||||
}
|
||||
|
||||
void Actor::SetPositionX(Float32 x)
|
||||
void Actor::SetPositionX(float x)
|
||||
{
|
||||
SetPosition(Point{ x, transform_.position.y });
|
||||
}
|
||||
|
||||
void Actor::SetPositionY(Float32 y)
|
||||
void Actor::SetPositionY(float y)
|
||||
{
|
||||
SetPosition(Point{ transform_.position.x, y });
|
||||
}
|
||||
|
|
@ -445,7 +445,7 @@ namespace kiwano
|
|||
is_fast_transform_ = false;
|
||||
}
|
||||
|
||||
void Actor::SetRotation(Float32 angle)
|
||||
void Actor::SetRotation(float angle)
|
||||
{
|
||||
if (transform_.rotation == angle)
|
||||
return;
|
||||
|
|
@ -502,7 +502,7 @@ namespace kiwano
|
|||
Vector<ActorPtr> Actor::GetChildren(String const& name) const
|
||||
{
|
||||
Vector<ActorPtr> children;
|
||||
UInt32 hash_code = std::hash<String>{}(name);
|
||||
std::size_t hash_code = std::hash<String>{}(name);
|
||||
|
||||
for (Actor* child = children_.first_item().get(); child; child = child->next_item().get())
|
||||
{
|
||||
|
|
@ -516,7 +516,7 @@ namespace kiwano
|
|||
|
||||
ActorPtr Actor::GetChild(String const& name) const
|
||||
{
|
||||
UInt32 hash_code = std::hash<String>{}(name);
|
||||
std::size_t hash_code = std::hash<String>{}(name);
|
||||
|
||||
for (Actor* child = children_.first_item().get(); child; child = child->next_item().get())
|
||||
{
|
||||
|
|
@ -568,7 +568,7 @@ namespace kiwano
|
|||
return;
|
||||
}
|
||||
|
||||
UInt32 hash_code = std::hash<String>{}(child_name);
|
||||
std::size_t hash_code = std::hash<String>{}(child_name);
|
||||
|
||||
Actor* next;
|
||||
for (Actor* child = children_.first_item().get(); child; child = next)
|
||||
|
|
|
|||
|
|
@ -49,109 +49,109 @@ namespace kiwano
|
|||
Actor();
|
||||
|
||||
// 更新角色
|
||||
virtual void OnUpdate(Duration dt) { KGE_UNUSED(dt); }
|
||||
virtual void OnUpdate(Duration dt) { KGE_UNUSED(dt); }
|
||||
|
||||
// 渲染角色
|
||||
virtual void OnRender(RenderTarget* rt) { KGE_UNUSED(rt); }
|
||||
virtual void OnRender(RenderTarget* rt) { KGE_UNUSED(rt); }
|
||||
|
||||
// 获取显示状态
|
||||
bool IsVisible() const { return visible_; }
|
||||
bool IsVisible() const { return visible_; }
|
||||
|
||||
// 获取响应状态
|
||||
bool IsResponsible() const { return responsible_; }
|
||||
bool IsResponsible() const { return responsible_; }
|
||||
|
||||
// 是否启用级联透明度
|
||||
bool IsCascadeOpacityEnabled() const { return cascade_opacity_; }
|
||||
bool IsCascadeOpacityEnabled() const { return cascade_opacity_; }
|
||||
|
||||
// 获取名称的 Hash 值
|
||||
UInt32 GetHashName() const { return hash_name_; }
|
||||
std::size_t GetHashName() const { return hash_name_; }
|
||||
|
||||
// 获取 Z 轴顺序
|
||||
Int32 GetZOrder() const { return z_order_; }
|
||||
int GetZOrder() const { return z_order_; }
|
||||
|
||||
// 获取坐标
|
||||
Point GetPosition() const { return transform_.position; }
|
||||
Point GetPosition() const { return transform_.position; }
|
||||
|
||||
// 获取 x 坐标
|
||||
Float32 GetPositionX() const { return transform_.position.x; }
|
||||
float GetPositionX() const { return transform_.position.x; }
|
||||
|
||||
// 获取 y 坐标
|
||||
Float32 GetPositionY() const { return transform_.position.y; }
|
||||
float GetPositionY() const { return transform_.position.y; }
|
||||
|
||||
// 获取缩放比例
|
||||
Point GetScale() const { return transform_.scale; }
|
||||
Point GetScale() const { return transform_.scale; }
|
||||
|
||||
// 获取横向缩放比例
|
||||
Float32 GetScaleX() const { return transform_.scale.x; }
|
||||
float GetScaleX() const { return transform_.scale.x; }
|
||||
|
||||
// 获取纵向缩放比例
|
||||
Float32 GetScaleY() const { return transform_.scale.y; }
|
||||
float GetScaleY() const { return transform_.scale.y; }
|
||||
|
||||
// 获取错切角度
|
||||
Point GetSkew() const { return transform_.skew; }
|
||||
Point GetSkew() const { return transform_.skew; }
|
||||
|
||||
// 获取横向错切角度
|
||||
Float32 GetSkewX() const { return transform_.skew.x; }
|
||||
float GetSkewX() const { return transform_.skew.x; }
|
||||
|
||||
// 获取纵向错切角度
|
||||
Float32 GetSkewY() const { return transform_.skew.y; }
|
||||
float GetSkewY() const { return transform_.skew.y; }
|
||||
|
||||
// 获取旋转角度
|
||||
Float32 GetRotation() const { return transform_.rotation; }
|
||||
float GetRotation() const { return transform_.rotation; }
|
||||
|
||||
// 获取宽度
|
||||
Float32 GetWidth() const { return size_.x; }
|
||||
float GetWidth() const { return size_.x; }
|
||||
|
||||
// 获取高度
|
||||
Float32 GetHeight() const { return size_.y; }
|
||||
float GetHeight() const { return size_.y; }
|
||||
|
||||
// 获取大小
|
||||
Size GetSize() const { return size_; }
|
||||
Size GetSize() const { return size_; }
|
||||
|
||||
// 获取缩放后的宽度
|
||||
Float32 GetScaledWidth() const { return size_.x * transform_.scale.x; }
|
||||
float GetScaledWidth() const { return size_.x * transform_.scale.x; }
|
||||
|
||||
// 获取缩放后的高度
|
||||
Float32 GetScaledHeight() const { return size_.y * transform_.scale.y; }
|
||||
float GetScaledHeight() const { return size_.y * transform_.scale.y; }
|
||||
|
||||
// 获取缩放后的大小
|
||||
Size GetScaledSize() const { return Size{ GetScaledWidth(), GetScaledHeight() }; }
|
||||
Size GetScaledSize() const { return Size{ GetScaledWidth(), GetScaledHeight() }; }
|
||||
|
||||
// 获取锚点
|
||||
Point GetAnchor() const { return anchor_; }
|
||||
Point GetAnchor() const { return anchor_; }
|
||||
|
||||
// 获取 x 方向锚点
|
||||
Float32 GetAnchorX() const { return anchor_.x; }
|
||||
float GetAnchorX() const { return anchor_.x; }
|
||||
|
||||
// 获取 y 方向锚点
|
||||
Float32 GetAnchorY() const { return anchor_.y; }
|
||||
float GetAnchorY() const { return anchor_.y; }
|
||||
|
||||
// 获取透明度
|
||||
Float32 GetOpacity() const { return opacity_; }
|
||||
float GetOpacity() const { return opacity_; }
|
||||
|
||||
// 获取显示透明度
|
||||
Float32 GetDisplayedOpacity() const { return displayed_opacity_; }
|
||||
float GetDisplayedOpacity() const { return displayed_opacity_; }
|
||||
|
||||
// 获取变换
|
||||
Transform GetTransform() const { return transform_; }
|
||||
|
||||
// 获取边框
|
||||
virtual Rect GetBounds() const;
|
||||
|
||||
// 获取外切包围盒
|
||||
virtual Rect GetBoundingBox() const;
|
||||
|
||||
// 获取二维变换矩阵
|
||||
Matrix3x2 const& GetTransformMatrix() const;
|
||||
|
||||
// 获取二维变换的逆矩阵
|
||||
Matrix3x2 const& GetTransformInverseMatrix() const;
|
||||
Transform GetTransform() const { return transform_; }
|
||||
|
||||
// 获取父角色
|
||||
inline Actor* GetParent() const { return parent_; }
|
||||
inline Actor* GetParent() const { return parent_; }
|
||||
|
||||
// 获取所在舞台
|
||||
inline Stage* GetStage() const { return stage_; }
|
||||
inline Stage* GetStage() const { return stage_; }
|
||||
|
||||
// 获取边框
|
||||
virtual Rect GetBounds() const;
|
||||
|
||||
// 获取外切包围盒
|
||||
virtual Rect GetBoundingBox() const;
|
||||
|
||||
// 获取二维变换矩阵
|
||||
Matrix3x2 const& GetTransformMatrix() const;
|
||||
|
||||
// 获取二维变换的逆矩阵
|
||||
Matrix3x2 const& GetTransformInverseMatrix() const;
|
||||
|
||||
// 设置是否显示
|
||||
void SetVisible(
|
||||
|
|
@ -170,8 +170,8 @@ namespace kiwano
|
|||
|
||||
// 设置坐标
|
||||
inline void SetPosition(
|
||||
Float32 x,
|
||||
Float32 y
|
||||
float x,
|
||||
float y
|
||||
)
|
||||
{
|
||||
SetPosition(Point{ x, y });
|
||||
|
|
@ -179,12 +179,12 @@ namespace kiwano
|
|||
|
||||
// 设置横坐标
|
||||
void SetPositionX(
|
||||
Float32 x
|
||||
float x
|
||||
);
|
||||
|
||||
// 设置纵坐标
|
||||
void SetPositionY(
|
||||
Float32 y
|
||||
float y
|
||||
);
|
||||
|
||||
// 移动坐标
|
||||
|
|
@ -194,8 +194,8 @@ namespace kiwano
|
|||
|
||||
// 移动坐标
|
||||
inline void Move(
|
||||
Float32 vx,
|
||||
Float32 vy
|
||||
float vx,
|
||||
float vy
|
||||
)
|
||||
{
|
||||
Move(Vec2{ vx, vy });
|
||||
|
|
@ -210,8 +210,8 @@ namespace kiwano
|
|||
// 设置缩放比例
|
||||
// 默认为 (1.0, 1.0)
|
||||
inline void SetScale(
|
||||
Float32 scalex,
|
||||
Float32 scaley
|
||||
float scalex,
|
||||
float scaley
|
||||
)
|
||||
{
|
||||
SetScale(Vec2{ scalex, scaley });
|
||||
|
|
@ -226,8 +226,8 @@ namespace kiwano
|
|||
// 设置错切角度
|
||||
// 默认为 (0, 0)
|
||||
inline void SetSkew(
|
||||
Float32 skewx,
|
||||
Float32 skewy
|
||||
float skewx,
|
||||
float skewy
|
||||
)
|
||||
{
|
||||
SetSkew(Vec2{ skewx, skewy });
|
||||
|
|
@ -236,7 +236,7 @@ namespace kiwano
|
|||
// 设置旋转角度
|
||||
// 默认为 0
|
||||
virtual void SetRotation(
|
||||
Float32 rotation
|
||||
float rotation
|
||||
);
|
||||
|
||||
// 设置锚点位置
|
||||
|
|
@ -248,8 +248,8 @@ namespace kiwano
|
|||
// 设置锚点位置
|
||||
// 默认为 (0, 0), 范围 [0, 1]
|
||||
inline void SetAnchor(
|
||||
Float32 anchorx,
|
||||
Float32 anchory
|
||||
float anchorx,
|
||||
float anchory
|
||||
)
|
||||
{
|
||||
SetAnchor(Vec2{ anchorx, anchory });
|
||||
|
|
@ -257,12 +257,12 @@ namespace kiwano
|
|||
|
||||
// 修改宽度
|
||||
virtual void SetWidth(
|
||||
Float32 width
|
||||
float width
|
||||
);
|
||||
|
||||
// 修改高度
|
||||
virtual void SetHeight(
|
||||
Float32 height
|
||||
float height
|
||||
);
|
||||
|
||||
// 修改大小
|
||||
|
|
@ -272,8 +272,8 @@ namespace kiwano
|
|||
|
||||
// 修改大小
|
||||
inline void SetSize(
|
||||
Float32 width,
|
||||
Float32 height
|
||||
float width,
|
||||
float height
|
||||
)
|
||||
{
|
||||
SetSize(Size{ width, height });
|
||||
|
|
@ -282,7 +282,7 @@ namespace kiwano
|
|||
// 设置透明度
|
||||
// 默认为 1.0, 范围 [0, 1]
|
||||
virtual void SetOpacity(
|
||||
Float32 opacity
|
||||
float opacity
|
||||
);
|
||||
|
||||
// 启用或禁用级联透明度
|
||||
|
|
@ -298,7 +298,7 @@ namespace kiwano
|
|||
// 设置 Z 轴顺序
|
||||
// 默认为 0
|
||||
void SetZOrder(
|
||||
Int32 zorder
|
||||
int zorder
|
||||
);
|
||||
|
||||
// 是否可响应 (鼠标 Hover | Out | Click 消息)
|
||||
|
|
@ -354,33 +354,33 @@ namespace kiwano
|
|||
// 判断点是否在角色内
|
||||
virtual bool ContainsPoint(const Point& point) const;
|
||||
|
||||
// 暂停角色更新
|
||||
inline void PauseUpdating() { update_pausing_ = true; }
|
||||
|
||||
// 继续角色更新
|
||||
inline void ResumeUpdating() { update_pausing_ = false; }
|
||||
|
||||
// 角色更新是否暂停
|
||||
inline bool IsUpdatePausing() const { return update_pausing_; }
|
||||
|
||||
// 设置更新时的回调函数
|
||||
inline void SetCallbackOnUpdate(UpdateCallback const& cb) { cb_update_ = cb; }
|
||||
|
||||
// 获取更新时的回调函数
|
||||
inline UpdateCallback GetCallbackOnUpdate() const { return cb_update_; }
|
||||
|
||||
// 渲染角色边界
|
||||
inline void ShowBorder(bool show) { show_border_ = show; }
|
||||
|
||||
// 事件分发
|
||||
void Dispatch(Event& evt) override;
|
||||
|
||||
// 设置默认锚点
|
||||
static void SetDefaultAnchor(
|
||||
Float32 anchor_x,
|
||||
Float32 anchor_y
|
||||
float anchor_x,
|
||||
float anchor_y
|
||||
);
|
||||
|
||||
// 暂停角色更新
|
||||
inline void PauseUpdating() { update_pausing_ = true; }
|
||||
|
||||
// 继续角色更新
|
||||
inline void ResumeUpdating() { update_pausing_ = false; }
|
||||
|
||||
// 角色更新是否暂停
|
||||
inline bool IsUpdatePausing() const { return update_pausing_; }
|
||||
|
||||
// 设置更新时的回调函数
|
||||
inline void SetCallbackOnUpdate(UpdateCallback const& cb) { cb_update_ = cb; }
|
||||
|
||||
// 获取更新时的回调函数
|
||||
inline UpdateCallback GetCallbackOnUpdate() const { return cb_update_; }
|
||||
|
||||
// 渲染角色边界
|
||||
inline void ShowBorder(bool show) { show_border_ = show; }
|
||||
|
||||
protected:
|
||||
virtual void Update(Duration dt);
|
||||
|
||||
|
|
@ -408,12 +408,12 @@ namespace kiwano
|
|||
bool hover_;
|
||||
bool pressed_;
|
||||
bool responsible_;
|
||||
Int32 z_order_;
|
||||
Float32 opacity_;
|
||||
Float32 displayed_opacity_;
|
||||
int z_order_;
|
||||
float opacity_;
|
||||
float displayed_opacity_;
|
||||
Actor* parent_;
|
||||
Stage* stage_;
|
||||
UInt32 hash_name_;
|
||||
std::size_t hash_name_;
|
||||
Point anchor_;
|
||||
Size size_;
|
||||
Children children_;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ namespace kiwano
|
|||
fill_color_ = color;
|
||||
}
|
||||
|
||||
void Canvas::SetStrokeWidth(Float32 width)
|
||||
void Canvas::SetStrokeWidth(float width)
|
||||
{
|
||||
stroke_width_ = std::max(width, 0.f);
|
||||
}
|
||||
|
|
@ -92,7 +92,7 @@ namespace kiwano
|
|||
text_style_ = text_style;
|
||||
}
|
||||
|
||||
void Canvas::SetBrushOpacity(Float32 opacity)
|
||||
void Canvas::SetBrushOpacity(float opacity)
|
||||
{
|
||||
rt_.SetOpacity(opacity);
|
||||
}
|
||||
|
|
@ -107,12 +107,12 @@ namespace kiwano
|
|||
return fill_color_;
|
||||
}
|
||||
|
||||
Float32 Canvas::GetStrokeWidth() const
|
||||
float Canvas::GetStrokeWidth() const
|
||||
{
|
||||
return stroke_width_;
|
||||
}
|
||||
|
||||
Float32 Canvas::GetBrushOpacity() const
|
||||
float Canvas::GetBrushOpacity() const
|
||||
{
|
||||
return rt_.GetOpacity();
|
||||
}
|
||||
|
|
@ -159,7 +159,7 @@ namespace kiwano
|
|||
cache_expired_ = true;
|
||||
}
|
||||
|
||||
void Canvas::DrawCircle(Point const& center, Float32 radius)
|
||||
void Canvas::DrawCircle(Point const& center, float radius)
|
||||
{
|
||||
rt_.SetDefaultBrushColor(stroke_color_);
|
||||
rt_.DrawEllipse(
|
||||
|
|
@ -206,7 +206,7 @@ namespace kiwano
|
|||
cache_expired_ = true;
|
||||
}
|
||||
|
||||
void Canvas::FillCircle(Point const& center, Float32 radius)
|
||||
void Canvas::FillCircle(Point const& center, float radius)
|
||||
{
|
||||
rt_.SetDefaultBrushColor(fill_color_);
|
||||
rt_.FillEllipse(
|
||||
|
|
@ -289,7 +289,7 @@ namespace kiwano
|
|||
geo_sink_.AddBezier(point1, point2, point3);
|
||||
}
|
||||
|
||||
void Canvas::AddArc(Point const & point, Point const & radius, Float32 rotation, bool clockwise, bool is_small)
|
||||
void Canvas::AddArc(Point const & point, Point const & radius, float rotation, bool clockwise, bool is_small)
|
||||
{
|
||||
geo_sink_.AddArc(point, radius, rotation, clockwise, is_small);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ namespace kiwano
|
|||
// 画圆形边框
|
||||
void DrawCircle(
|
||||
Point const& center,
|
||||
Float32 radius
|
||||
float radius
|
||||
);
|
||||
|
||||
// 画椭圆形边框
|
||||
|
|
@ -75,7 +75,7 @@ namespace kiwano
|
|||
// 填充圆形
|
||||
void FillCircle(
|
||||
Point const& center,
|
||||
Float32 radius
|
||||
float radius
|
||||
);
|
||||
|
||||
// 填充椭圆形
|
||||
|
|
@ -139,7 +139,7 @@ namespace kiwano
|
|||
void AddArc(
|
||||
Point const& point, /* 终点 */
|
||||
Point const& radius, /* 椭圆半径 */
|
||||
Float32 rotation, /* ÍÖÔ²Ðýת½Ç¶È */
|
||||
float rotation, /* ÍÖÔ²Ðýת½Ç¶È */
|
||||
bool clockwise = true, /* 顺时针 or 逆时针 */
|
||||
bool is_small = true /* 是否取小于 180° 的弧 */
|
||||
);
|
||||
|
|
@ -170,7 +170,7 @@ namespace kiwano
|
|||
|
||||
// 设置轮廓宽度
|
||||
void SetStrokeWidth(
|
||||
Float32 width
|
||||
float width
|
||||
);
|
||||
|
||||
// 设置轮廓样式
|
||||
|
|
@ -190,7 +190,7 @@ namespace kiwano
|
|||
|
||||
// 设置画笔透明度
|
||||
void SetBrushOpacity(
|
||||
Float32 opacity
|
||||
float opacity
|
||||
);
|
||||
|
||||
// 画笔二维变换
|
||||
|
|
@ -226,10 +226,10 @@ namespace kiwano
|
|||
Color GetStrokeColor() const;
|
||||
|
||||
// 获取轮廓宽度
|
||||
Float32 GetStrokeWidth() const;
|
||||
float GetStrokeWidth() const;
|
||||
|
||||
// 获取画笔透明度
|
||||
Float32 GetBrushOpacity() const;
|
||||
float GetBrushOpacity() const;
|
||||
|
||||
// 导出为图片
|
||||
Texture ExportToTexture() const;
|
||||
|
|
@ -240,7 +240,7 @@ namespace kiwano
|
|||
void UpdateCache() const;
|
||||
|
||||
protected:
|
||||
Float32 stroke_width_;
|
||||
float stroke_width_;
|
||||
Color fill_color_;
|
||||
Color stroke_color_;
|
||||
Font text_font_;
|
||||
|
|
|
|||
|
|
@ -62,22 +62,22 @@ namespace kiwano
|
|||
);
|
||||
|
||||
// 获取宽度
|
||||
Float32 GetWidth() const { return crop_rect_.GetWidth(); }
|
||||
float GetWidth() const { return crop_rect_.GetWidth(); }
|
||||
|
||||
// 获取高度
|
||||
Float32 GetHeight() const { return crop_rect_.GetHeight(); }
|
||||
float GetHeight() const { return crop_rect_.GetHeight(); }
|
||||
|
||||
// 获取大小
|
||||
Size GetSize() const { return crop_rect_.GetSize(); }
|
||||
Size GetSize() const { return crop_rect_.GetSize(); }
|
||||
|
||||
// 获取裁剪位置
|
||||
Point GetCropPoint() const { return crop_rect_.GetLeftTop(); }
|
||||
Point GetCropPoint() const { return crop_rect_.GetLeftTop(); }
|
||||
|
||||
// 获取裁剪矩形
|
||||
inline Rect const& GetCropRect() const { return crop_rect_; }
|
||||
inline Rect const& GetCropRect() const { return crop_rect_; }
|
||||
|
||||
// 获取纹理
|
||||
inline Texture const& GetTexture() const { return texture_; }
|
||||
inline Texture const& GetTexture() const { return texture_; }
|
||||
|
||||
protected:
|
||||
Texture texture_;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
FramePtr FrameSequence::GetFrame(UInt32 index) const
|
||||
FramePtr FrameSequence::GetFrame(std::size_t index) const
|
||||
{
|
||||
KGE_ASSERT(index < frames_.size());
|
||||
return frames_[index];
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ namespace kiwano
|
|||
);
|
||||
|
||||
// 获取关键帧
|
||||
FramePtr GetFrame(UInt32 index) const;
|
||||
FramePtr GetFrame(std::size_t index) const;
|
||||
|
||||
// 获取关键帧
|
||||
Vector<FramePtr> const& GetFrames() const;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ namespace kiwano
|
|||
loop_count_ = 0;
|
||||
frame_.disposal_type = GifImage::DisposalType::None;
|
||||
|
||||
SetSize(Size{ static_cast<Float32>(gif_.GetWidthInPixels()), static_cast<Float32>(gif_.GetHeightInPixels()) });
|
||||
SetSize(Size{ static_cast<float>(gif_.GetWidthInPixels()), static_cast<float>(gif_.GetHeightInPixels()) });
|
||||
|
||||
if (!frame_rt_.IsValid())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace kiwano
|
|||
: public Actor
|
||||
{
|
||||
public:
|
||||
using LoopDoneCallback = Function<void(Int32)>;
|
||||
using LoopDoneCallback = Function<void(int)>;
|
||||
using DoneCallback = Function<void()>;
|
||||
|
||||
GifSprite();
|
||||
|
|
@ -61,7 +61,7 @@ namespace kiwano
|
|||
);
|
||||
|
||||
// 设置 GIF 动画循环次数
|
||||
inline void SetLoopCount(Int32 loops) { total_loop_count_ = loops; }
|
||||
inline void SetLoopCount(int loops) { total_loop_count_ = loops; }
|
||||
|
||||
// 设置 GIF 动画每次循环结束回调函数
|
||||
inline void SetLoopDoneCallback(LoopDoneCallback const& cb) { loop_cb_ = cb; }
|
||||
|
|
@ -104,9 +104,9 @@ namespace kiwano
|
|||
|
||||
protected:
|
||||
bool animating_;
|
||||
Int32 total_loop_count_;
|
||||
Int32 loop_count_;
|
||||
UInt32 next_index_;
|
||||
int total_loop_count_;
|
||||
int loop_count_;
|
||||
std::size_t next_index_;
|
||||
Duration frame_elapsed_;
|
||||
LoopDoneCallback loop_cb_;
|
||||
DoneCallback done_cb_;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace kiwano
|
|||
area_.SetAreaRect(clip_rect);
|
||||
}
|
||||
|
||||
void Layer::SetOpacity(Float32 opacity)
|
||||
void Layer::SetOpacity(float opacity)
|
||||
{
|
||||
// Actor::SetOpacity(opacity);
|
||||
area_.SetOpacity(opacity);
|
||||
|
|
|
|||
|
|
@ -34,12 +34,12 @@ namespace kiwano
|
|||
virtual ~Layer();
|
||||
|
||||
// 重载下列函数以获取图层事件
|
||||
virtual void OnMouseButtonDown(Int32 btn, Point const& p) {}
|
||||
virtual void OnMouseButtonUp(Int32 btn, Point const& p) {}
|
||||
virtual void OnMouseButtonDown(int btn, Point const& p) {}
|
||||
virtual void OnMouseButtonUp(int btn, Point const& p) {}
|
||||
virtual void OnMouseMoved(Point const& p) {}
|
||||
virtual void OnMouseWheel(Float32 wheel) {}
|
||||
virtual void OnKeyDown(Int32 key) {}
|
||||
virtual void OnKeyUp(Int32 key) {}
|
||||
virtual void OnMouseWheel(float wheel) {}
|
||||
virtual void OnKeyDown(int key) {}
|
||||
virtual void OnKeyUp(int key) {}
|
||||
virtual void OnChar(char c) {}
|
||||
|
||||
// 是否开启消息吞没
|
||||
|
|
@ -52,7 +52,7 @@ namespace kiwano
|
|||
void SetClipRect(Rect const& clip_rect);
|
||||
|
||||
// 设置图层透明度
|
||||
void SetOpacity(Float32 opacity) override;
|
||||
void SetOpacity(float opacity) override;
|
||||
|
||||
// 设置几何蒙层
|
||||
void SetMaskGeometry(Geometry const& mask);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ namespace kiwano
|
|||
stroke_color_ = color;
|
||||
}
|
||||
|
||||
void ShapeActor::SetStrokeWidth(Float32 width)
|
||||
void ShapeActor::SetStrokeWidth(float width)
|
||||
{
|
||||
stroke_width_ = std::max(width, 0.f);
|
||||
}
|
||||
|
|
@ -217,7 +217,7 @@ namespace kiwano
|
|||
{
|
||||
}
|
||||
|
||||
CircleActor::CircleActor(Float32 radius)
|
||||
CircleActor::CircleActor(float radius)
|
||||
{
|
||||
SetRadius(radius);
|
||||
}
|
||||
|
|
@ -226,7 +226,7 @@ namespace kiwano
|
|||
{
|
||||
}
|
||||
|
||||
void CircleActor::SetRadius(Float32 radius)
|
||||
void CircleActor::SetRadius(float radius)
|
||||
{
|
||||
if (radius_ != radius)
|
||||
{
|
||||
|
|
@ -338,7 +338,7 @@ namespace kiwano
|
|||
sink_.AddBezier(point1, point2, point3);
|
||||
}
|
||||
|
||||
void PathActor::AddArc(Point const& point, Size const& radius, Float32 rotation, bool clockwise, bool is_small)
|
||||
void PathActor::AddArc(Point const& point, Size const& radius, float rotation, bool clockwise, bool is_small)
|
||||
{
|
||||
sink_.AddArc(point, radius, rotation, clockwise, is_small);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace kiwano
|
|||
inline Color GetStrokeColor() const { return stroke_color_; }
|
||||
|
||||
// 获取线条宽度
|
||||
inline Float32 GetStrokeWidth() const { return stroke_width_; }
|
||||
inline float GetStrokeWidth() const { return stroke_width_; }
|
||||
|
||||
// 获取线条样式
|
||||
inline StrokeStyle SetStrokeStyle() const { return stroke_style_; }
|
||||
|
|
@ -69,7 +69,7 @@ namespace kiwano
|
|||
void SetStrokeColor(const Color& color);
|
||||
|
||||
// 设置线条宽度
|
||||
void SetStrokeWidth(Float32 width);
|
||||
void SetStrokeWidth(float width);
|
||||
|
||||
// 设置线条样式
|
||||
void SetStrokeStyle(StrokeStyle stroke_style);
|
||||
|
|
@ -82,7 +82,7 @@ namespace kiwano
|
|||
protected:
|
||||
Color fill_color_;
|
||||
Color stroke_color_;
|
||||
Float32 stroke_width_;
|
||||
float stroke_width_;
|
||||
StrokeStyle stroke_style_;
|
||||
Rect bounds_;
|
||||
Geometry geo_;
|
||||
|
|
@ -195,17 +195,17 @@ namespace kiwano
|
|||
CircleActor();
|
||||
|
||||
CircleActor(
|
||||
Float32 radius
|
||||
float radius
|
||||
);
|
||||
|
||||
virtual ~CircleActor();
|
||||
|
||||
inline Float32 GetRadius() const { return radius_; }
|
||||
inline float GetRadius() const { return radius_; }
|
||||
|
||||
void SetRadius(Float32 radius);
|
||||
void SetRadius(float radius);
|
||||
|
||||
protected:
|
||||
Float32 radius_;
|
||||
float radius_;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -292,7 +292,7 @@ namespace kiwano
|
|||
void AddArc(
|
||||
Point const& point, /* 终点 */
|
||||
Size const& radius, /* 椭圆半径 */
|
||||
Float32 rotation, /* ÍÖÔ²Ðýת½Ç¶È */
|
||||
float rotation, /* ÍÖÔ²Ðýת½Ç¶È */
|
||||
bool clockwise = true, /* 顺时针 or 逆时针 */
|
||||
bool is_small = true /* 是否取小于 180° 的弧 */
|
||||
);
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void Text::SetFontSize(Float32 size)
|
||||
void Text::SetFontSize(float size)
|
||||
{
|
||||
if (font_.size != size)
|
||||
{
|
||||
|
|
@ -112,7 +112,7 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void Text::SetFontWeight(UInt32 weight)
|
||||
void Text::SetFontWeight(std::uint32_t weight)
|
||||
{
|
||||
if (font_.weight != weight)
|
||||
{
|
||||
|
|
@ -135,7 +135,7 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void Text::SetWrapWidth(Float32 wrap_width)
|
||||
void Text::SetWrapWidth(float wrap_width)
|
||||
{
|
||||
if (style_.wrap_width != wrap_width)
|
||||
{
|
||||
|
|
@ -144,7 +144,7 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void Text::SetLineSpacing(Float32 line_spacing)
|
||||
void Text::SetLineSpacing(float line_spacing)
|
||||
{
|
||||
if (style_.line_spacing != line_spacing)
|
||||
{
|
||||
|
|
@ -190,7 +190,7 @@ namespace kiwano
|
|||
style_.outline_color = outline_color;
|
||||
}
|
||||
|
||||
void Text::SetOutlineWidth(Float32 outline_width)
|
||||
void Text::SetOutlineWidth(float outline_width)
|
||||
{
|
||||
style_.outline_width = outline_width;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,12 +87,12 @@ namespace kiwano
|
|||
|
||||
// 设置字号(默认值为 18)
|
||||
void SetFontSize(
|
||||
Float32 size
|
||||
float size
|
||||
);
|
||||
|
||||
// 设置字体粗细值(默认值为 FontWeight::Normal)
|
||||
void SetFontWeight(
|
||||
UInt32 weight
|
||||
std::uint32_t weight
|
||||
);
|
||||
|
||||
// 设置文字颜色(默认值为 Color::White)
|
||||
|
|
@ -107,12 +107,12 @@ namespace kiwano
|
|||
|
||||
// 设置文本自动换行的宽度(默认为 0)
|
||||
void SetWrapWidth(
|
||||
Float32 wrap_width
|
||||
float wrap_width
|
||||
);
|
||||
|
||||
// 设置行间距(默认为 0)
|
||||
void SetLineSpacing(
|
||||
Float32 line_spacing
|
||||
float line_spacing
|
||||
);
|
||||
|
||||
// 设置对齐方式(默认为 TextAlign::Left)
|
||||
|
|
@ -142,7 +142,7 @@ namespace kiwano
|
|||
|
||||
// 设置描边线宽
|
||||
void SetOutlineWidth(
|
||||
Float32 outline_width
|
||||
float outline_width
|
||||
);
|
||||
|
||||
// 设置描边线相交样式
|
||||
|
|
|
|||
|
|
@ -38,26 +38,26 @@ namespace kiwano
|
|||
public:
|
||||
Color color; // 颜色
|
||||
TextAlign alignment; // 对齐方式
|
||||
Float32 wrap_width; // 自动换行宽度
|
||||
Float32 line_spacing; // 行间距
|
||||
float wrap_width; // 自动换行宽度
|
||||
float line_spacing; // 行间距
|
||||
bool underline; // 下划线
|
||||
bool strikethrough; // 删除线
|
||||
bool outline; // 显示描边
|
||||
Color outline_color; // 描边颜色
|
||||
Float32 outline_width; // 描边线宽
|
||||
float outline_width; // 描边线宽
|
||||
StrokeStyle outline_stroke; // 描边线相交样式
|
||||
|
||||
public:
|
||||
TextStyle(
|
||||
Color color = Color::White,
|
||||
TextAlign alignment = TextAlign::Left,
|
||||
Float32 wrap_width = 0.f,
|
||||
Float32 line_spacing = 0.f,
|
||||
float wrap_width = 0.f,
|
||||
float line_spacing = 0.f,
|
||||
bool underline = false,
|
||||
bool strikethrough = false,
|
||||
bool outline = false,
|
||||
Color outline_color = Color(Color::Black, 0.5),
|
||||
Float32 outline_width = 1.f,
|
||||
float outline_width = 1.f,
|
||||
StrokeStyle outline_stroke = StrokeStyle::Round
|
||||
)
|
||||
: color(color)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace kiwano
|
|||
class Transform
|
||||
{
|
||||
public:
|
||||
Float32 rotation; // Ðýת
|
||||
float rotation; // Ðýת
|
||||
Point position; // ×ø±ê
|
||||
Point scale; // Ëõ·Å
|
||||
Point skew; // ´íÇнǶÈ
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@ namespace kiwano
|
|||
// RotationTransition
|
||||
//-------------------------------------------------------
|
||||
|
||||
RotationTransition::RotationTransition(Duration duration, Float32 rotation)
|
||||
RotationTransition::RotationTransition(Duration duration, float rotation)
|
||||
: Transition(duration)
|
||||
, rotation_(rotation)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ namespace kiwano
|
|||
|
||||
protected:
|
||||
bool done_;
|
||||
Float32 process_;
|
||||
float process_;
|
||||
Duration duration_;
|
||||
Duration delta_;
|
||||
Size window_size_;
|
||||
|
|
@ -132,7 +132,7 @@ namespace kiwano
|
|||
: public Transition
|
||||
{
|
||||
public:
|
||||
enum class Type : Int32
|
||||
enum class Type : int
|
||||
{
|
||||
Up, /* 上移 */
|
||||
Down, /* 下移 */
|
||||
|
|
@ -169,7 +169,7 @@ namespace kiwano
|
|||
public:
|
||||
explicit RotationTransition(
|
||||
Duration duration, /* 动画持续时长 */
|
||||
Float32 rotation = 360 /* 旋转度数 */
|
||||
float rotation = 360 /* 旋转度数 */
|
||||
);
|
||||
|
||||
protected:
|
||||
|
|
@ -183,6 +183,6 @@ namespace kiwano
|
|||
void Reset() override;
|
||||
|
||||
protected:
|
||||
Float32 rotation_;
|
||||
float rotation_;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ namespace kiwano
|
|||
inline void SetDelay(Duration delay) { delay_ = delay; }
|
||||
|
||||
// 设置循环次数 (-1 为永久循环)
|
||||
inline void SetLoops(Int32 loops) { loops_ = loops; }
|
||||
inline void SetLoops(int loops) { loops_ = loops; }
|
||||
|
||||
// 动作结束时移除目标角色
|
||||
inline void RemoveTargetWhenDone() { detach_target_ = true; }
|
||||
|
|
@ -89,7 +89,7 @@ namespace kiwano
|
|||
|
||||
inline bool IsRemoveable() const { return status_ == Status::Removeable; }
|
||||
|
||||
inline Int32 GetLoops() const { return loops_; }
|
||||
inline int GetLoops() const { return loops_; }
|
||||
|
||||
inline Duration GetDelay() const { return delay_; }
|
||||
|
||||
|
|
@ -114,8 +114,8 @@ namespace kiwano
|
|||
Status status_;
|
||||
bool running_;
|
||||
bool detach_target_;
|
||||
Int32 loops_;
|
||||
Int32 loops_done_;
|
||||
int loops_;
|
||||
int loops_done_;
|
||||
Duration delay_;
|
||||
Duration elapsed_;
|
||||
ActionCallback cb_done_;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace kiwano
|
|||
struct ActionHelper
|
||||
{
|
||||
// 设置循环次数
|
||||
inline ActionHelper& SetLoops(Int32 loops) { base->SetLoops(loops); return (*this); }
|
||||
inline ActionHelper& SetLoops(int loops) { base->SetLoops(loops); return (*this); }
|
||||
|
||||
// 设置动作延迟
|
||||
inline ActionHelper& SetDelay(Duration delay) { base->SetDelay(delay); return (*this); }
|
||||
|
|
@ -64,7 +64,7 @@ namespace kiwano
|
|||
inline TweenHelper& SetDuration(Duration dur) { base->SetDuration(dur); return (*this); }
|
||||
|
||||
// 设置循环次数
|
||||
inline TweenHelper& SetLoops(Int32 loops) { base->SetLoops(loops); return (*this); }
|
||||
inline TweenHelper& SetLoops(int loops) { base->SetLoops(loops); return (*this); }
|
||||
|
||||
// 设置缓动函数
|
||||
inline TweenHelper& SetEaseFunc(EaseFunc ease) { base->SetEaseFunc(ease); return (*this); }
|
||||
|
|
@ -117,8 +117,8 @@ namespace kiwano
|
|||
JumpBy(
|
||||
Duration dur,
|
||||
Point const& pos, /* 目的坐标 */
|
||||
Float32 height, /* 跳跃高度 */
|
||||
Int32 jumps = 1) /* 跳跃次数 */
|
||||
float height, /* 跳跃高度 */
|
||||
int jumps = 1) /* 跳跃次数 */
|
||||
{
|
||||
return TweenHelper(new kiwano::ActionJumpBy(dur, pos, height, jumps));
|
||||
}
|
||||
|
|
@ -127,38 +127,38 @@ namespace kiwano
|
|||
JumpTo(
|
||||
Duration dur,
|
||||
Point const& pos, /* 目的坐标 */
|
||||
Float32 height, /* 跳跃高度 */
|
||||
Int32 jumps = 1) /* 跳跃次数 */
|
||||
float height, /* 跳跃高度 */
|
||||
int jumps = 1) /* 跳跃次数 */
|
||||
{
|
||||
return TweenHelper(new kiwano::ActionJumpTo(dur, pos, height, jumps));
|
||||
}
|
||||
|
||||
static inline TweenHelper
|
||||
ScaleBy(Duration dur, Float32 scale)
|
||||
ScaleBy(Duration dur, float scale)
|
||||
{
|
||||
return TweenHelper(new kiwano::ActionScaleBy(dur, scale));
|
||||
}
|
||||
|
||||
static inline TweenHelper
|
||||
ScaleBy(Duration dur, Float32 scale_x, Float32 scale_y)
|
||||
ScaleBy(Duration dur, float scale_x, float scale_y)
|
||||
{
|
||||
return TweenHelper(new kiwano::ActionScaleBy(dur, scale_x, scale_y));
|
||||
}
|
||||
|
||||
static inline TweenHelper
|
||||
ScaleTo(Duration dur, Float32 scale)
|
||||
ScaleTo(Duration dur, float scale)
|
||||
{
|
||||
return TweenHelper(new kiwano::ActionScaleTo(dur, scale));
|
||||
}
|
||||
|
||||
static inline TweenHelper
|
||||
ScaleTo(Duration dur, Float32 scale_x, Float32 scale_y)
|
||||
ScaleTo(Duration dur, float scale_x, float scale_y)
|
||||
{
|
||||
return TweenHelper(new kiwano::ActionScaleTo(dur, scale_x, scale_y));
|
||||
}
|
||||
|
||||
static inline TweenHelper
|
||||
FadeTo(Duration dur, Float32 opacity)
|
||||
FadeTo(Duration dur, float opacity)
|
||||
{
|
||||
return TweenHelper(new kiwano::ActionFadeTo(dur, opacity));
|
||||
}
|
||||
|
|
@ -176,13 +176,13 @@ namespace kiwano
|
|||
}
|
||||
|
||||
static inline TweenHelper
|
||||
RotateBy(Duration dur, Float32 rotation)
|
||||
RotateBy(Duration dur, float rotation)
|
||||
{
|
||||
return TweenHelper(new kiwano::ActionRotateBy(dur, rotation));
|
||||
}
|
||||
|
||||
static inline TweenHelper
|
||||
RotateTo(Duration dur, Float32 rotation)
|
||||
RotateTo(Duration dur, float rotation)
|
||||
{
|
||||
return TweenHelper(new kiwano::ActionRotateTo(dur, rotation));
|
||||
}
|
||||
|
|
@ -192,8 +192,8 @@ namespace kiwano
|
|||
Duration duration, /* 持续时长 */
|
||||
Geometry const& geo, /* 路线 */
|
||||
bool rotating = false, /* 沿路线切线方向旋转 */
|
||||
Float32 start = 0.f, /* 起点 */
|
||||
Float32 end = 1.f, /* 终点 */
|
||||
float start = 0.f, /* 起点 */
|
||||
float end = 1.f, /* 终点 */
|
||||
EaseFunc func = nullptr /* 速度变化 */
|
||||
)
|
||||
{
|
||||
|
|
@ -205,8 +205,8 @@ namespace kiwano
|
|||
Duration duration, /* 持续时长 */
|
||||
GeometrySink& sink, /* 路线生成器 */
|
||||
bool rotating = false, /* 沿路线切线方向旋转 */
|
||||
Float32 start = 0.f, /* 起点 */
|
||||
Float32 end = 1.f, /* 终点 */
|
||||
float start = 0.f, /* 起点 */
|
||||
float end = 1.f, /* 终点 */
|
||||
EaseFunc func = nullptr /* 速度变化 */
|
||||
)
|
||||
{
|
||||
|
|
@ -248,7 +248,7 @@ namespace kiwano
|
|||
|
||||
KGE_DEPRECATED("Tween::OpacityBy has been removed, use Tween::FadeTo instead")
|
||||
static inline TweenHelper
|
||||
OpacityBy(Float32 opacity)
|
||||
OpacityBy(float opacity)
|
||||
{
|
||||
KGE_ASSERT("Tween::OpacityBy has been removed, use Tween::FadeTo instead");
|
||||
return TweenHelper(nullptr);
|
||||
|
|
@ -256,7 +256,7 @@ namespace kiwano
|
|||
|
||||
KGE_DEPRECATED("Tween::OpacityTo is deprecated, use Tween::FadeTo instead")
|
||||
static inline TweenHelper
|
||||
OpacityTo(Duration dur, Float32 opacity)
|
||||
OpacityTo(Duration dur, float opacity)
|
||||
{
|
||||
return TweenHelper(new kiwano::ActionFadeTo(dur, opacity));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@ namespace kiwano
|
|||
// Ease Functions
|
||||
//-------------------------------------------------------
|
||||
|
||||
inline EaseFunc MakeEaseIn(Float32 rate) { return std::bind(math::EaseIn, std::placeholders::_1, rate); }
|
||||
inline EaseFunc MakeEaseOut(Float32 rate) { return std::bind(math::EaseOut, std::placeholders::_1, rate); }
|
||||
inline EaseFunc MakeEaseInOut(Float32 rate) { return std::bind(math::EaseInOut, std::placeholders::_1, rate); }
|
||||
inline EaseFunc MakeEaseElasticIn(Float32 period) { return std::bind(math::EaseElasticIn, std::placeholders::_1, period); }
|
||||
inline EaseFunc MakeEaseElasticOut(Float32 period) { return std::bind(math::EaseElasticOut, std::placeholders::_1, period); }
|
||||
inline EaseFunc MakeEaseElasticInOut(Float32 period) { return std::bind(math::EaseElasticInOut, std::placeholders::_1, period); }
|
||||
inline EaseFunc MakeEaseIn(float rate) { return std::bind(math::EaseIn, std::placeholders::_1, rate); }
|
||||
inline EaseFunc MakeEaseOut(float rate) { return std::bind(math::EaseOut, std::placeholders::_1, rate); }
|
||||
inline EaseFunc MakeEaseInOut(float rate) { return std::bind(math::EaseInOut, std::placeholders::_1, rate); }
|
||||
inline EaseFunc MakeEaseElasticIn(float period) { return std::bind(math::EaseElasticIn, std::placeholders::_1, period); }
|
||||
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); }
|
||||
|
||||
KGE_API EaseFunc Ease::Linear = math::Linear;
|
||||
KGE_API EaseFunc Ease::EaseIn = MakeEaseIn(2.f);
|
||||
|
|
@ -99,7 +99,7 @@ namespace kiwano
|
|||
|
||||
void ActionTween::Update(ActorPtr target, Duration dt)
|
||||
{
|
||||
Float32 percent;
|
||||
float percent;
|
||||
|
||||
if (dur_.IsZero())
|
||||
{
|
||||
|
|
@ -109,14 +109,14 @@ namespace kiwano
|
|||
else
|
||||
{
|
||||
Duration elapsed = elapsed_ - delay_;
|
||||
Float32 loops_done = elapsed / dur_;
|
||||
float loops_done = elapsed / dur_;
|
||||
|
||||
while (loops_done_ < static_cast<Int32>(loops_done))
|
||||
while (loops_done_ < static_cast<int>(loops_done))
|
||||
{
|
||||
Complete(target); // loops_done_++
|
||||
}
|
||||
|
||||
percent = (status_ == Status::Done) ? 1.f : (loops_done - static_cast<Float32>(loops_done_));
|
||||
percent = (status_ == Status::Done) ? 1.f : (loops_done - static_cast<float>(loops_done_));
|
||||
}
|
||||
|
||||
if (ease_func_)
|
||||
|
|
@ -149,7 +149,7 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void ActionMoveBy::UpdateTween(ActorPtr target, Float32 percent)
|
||||
void ActionMoveBy::UpdateTween(ActorPtr target, float percent)
|
||||
{
|
||||
Point diff = target->GetPosition() - prev_pos_;
|
||||
start_pos_ = start_pos_ + diff;
|
||||
|
|
@ -192,7 +192,7 @@ namespace kiwano
|
|||
// Jump Action
|
||||
//-------------------------------------------------------
|
||||
|
||||
ActionJumpBy::ActionJumpBy(Duration duration, Point const& vec, Float32 height, Int32 jumps, EaseFunc func)
|
||||
ActionJumpBy::ActionJumpBy(Duration duration, Point const& vec, float height, int jumps, EaseFunc func)
|
||||
: ActionTween(duration, func)
|
||||
, delta_pos_(vec)
|
||||
, height_(height)
|
||||
|
|
@ -218,11 +218,11 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void ActionJumpBy::UpdateTween(ActorPtr target, Float32 percent)
|
||||
void ActionJumpBy::UpdateTween(ActorPtr target, float percent)
|
||||
{
|
||||
Float32 frac = fmod(percent * jumps_, 1.f);
|
||||
Float32 x = delta_pos_.x * percent;
|
||||
Float32 y = height_ * 4 * frac * (1 - frac);
|
||||
float frac = fmod(percent * jumps_, 1.f);
|
||||
float x = delta_pos_.x * percent;
|
||||
float y = height_ * 4 * frac * (1 - frac);
|
||||
y += delta_pos_.y * percent;
|
||||
|
||||
Point diff = target->GetPosition() - prev_pos_;
|
||||
|
|
@ -234,7 +234,7 @@ namespace kiwano
|
|||
prev_pos_ = new_pos;
|
||||
}
|
||||
|
||||
ActionJumpTo::ActionJumpTo(Duration duration, Point const& pos, Float32 height, Int32 jumps, EaseFunc func)
|
||||
ActionJumpTo::ActionJumpTo(Duration duration, Point const& pos, float height, int jumps, EaseFunc func)
|
||||
: ActionJumpBy(duration, Point(), height, jumps, func)
|
||||
, end_pos_(pos)
|
||||
{
|
||||
|
|
@ -256,12 +256,12 @@ namespace kiwano
|
|||
// Scale Action
|
||||
//-------------------------------------------------------
|
||||
|
||||
ActionScaleBy::ActionScaleBy(Duration duration, Float32 scale, EaseFunc func)
|
||||
ActionScaleBy::ActionScaleBy(Duration duration, float scale, EaseFunc func)
|
||||
: ActionScaleBy(duration, scale, scale, func)
|
||||
{
|
||||
}
|
||||
|
||||
ActionScaleBy::ActionScaleBy(Duration duration, Float32 scale_x, Float32 scale_y, EaseFunc func)
|
||||
ActionScaleBy::ActionScaleBy(Duration duration, float scale_x, float scale_y, EaseFunc func)
|
||||
: ActionTween(duration, func)
|
||||
, delta_x_(scale_x)
|
||||
, delta_y_(scale_y)
|
||||
|
|
@ -279,7 +279,7 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void ActionScaleBy::UpdateTween(ActorPtr target, Float32 percent)
|
||||
void ActionScaleBy::UpdateTween(ActorPtr target, float percent)
|
||||
{
|
||||
target->SetScale(Vec2{ start_scale_x_ + delta_x_ * percent, start_scale_y_ + delta_y_ * percent });
|
||||
}
|
||||
|
|
@ -294,14 +294,14 @@ namespace kiwano
|
|||
return new (std::nothrow) ActionScaleBy(dur_, -delta_x_, -delta_y_, ease_func_);
|
||||
}
|
||||
|
||||
ActionScaleTo::ActionScaleTo(Duration duration, Float32 scale, EaseFunc func)
|
||||
ActionScaleTo::ActionScaleTo(Duration duration, float scale, EaseFunc func)
|
||||
: ActionScaleBy(duration, 0, 0, func)
|
||||
{
|
||||
end_scale_x_ = scale;
|
||||
end_scale_y_ = scale;
|
||||
}
|
||||
|
||||
ActionScaleTo::ActionScaleTo(Duration duration, Float32 scale_x, Float32 scale_y, EaseFunc func)
|
||||
ActionScaleTo::ActionScaleTo(Duration duration, float scale_x, float scale_y, EaseFunc func)
|
||||
: ActionScaleBy(duration, 0, 0, func)
|
||||
{
|
||||
end_scale_x_ = scale_x;
|
||||
|
|
@ -325,7 +325,7 @@ namespace kiwano
|
|||
// Opacity Action
|
||||
//-------------------------------------------------------
|
||||
|
||||
ActionFadeTo::ActionFadeTo(Duration duration, Float32 opacity, EaseFunc func)
|
||||
ActionFadeTo::ActionFadeTo(Duration duration, float opacity, EaseFunc func)
|
||||
: ActionTween(duration, func)
|
||||
, delta_val_(0.f)
|
||||
, start_val_(0.f)
|
||||
|
|
@ -342,7 +342,7 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void ActionFadeTo::UpdateTween(ActorPtr target, Float32 percent)
|
||||
void ActionFadeTo::UpdateTween(ActorPtr target, float percent)
|
||||
{
|
||||
target->SetOpacity(start_val_ + delta_val_ * percent);
|
||||
}
|
||||
|
|
@ -367,7 +367,7 @@ namespace kiwano
|
|||
// Rotate Action
|
||||
//-------------------------------------------------------
|
||||
|
||||
ActionRotateBy::ActionRotateBy(Duration duration, Float32 rotation, EaseFunc func)
|
||||
ActionRotateBy::ActionRotateBy(Duration duration, float rotation, EaseFunc func)
|
||||
: ActionTween(duration, func)
|
||||
, start_val_()
|
||||
, delta_val_(rotation)
|
||||
|
|
@ -382,9 +382,9 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void ActionRotateBy::UpdateTween(ActorPtr target, Float32 percent)
|
||||
void ActionRotateBy::UpdateTween(ActorPtr target, float percent)
|
||||
{
|
||||
Float32 rotation = start_val_ + delta_val_ * percent;
|
||||
float rotation = start_val_ + delta_val_ * percent;
|
||||
if (rotation > 360.f)
|
||||
rotation -= 360.f;
|
||||
|
||||
|
|
@ -401,7 +401,7 @@ namespace kiwano
|
|||
return new (std::nothrow) ActionRotateBy(dur_, -delta_val_, ease_func_);
|
||||
}
|
||||
|
||||
ActionRotateTo::ActionRotateTo(Duration duration, Float32 rotation, EaseFunc func)
|
||||
ActionRotateTo::ActionRotateTo(Duration duration, float rotation, EaseFunc func)
|
||||
: ActionRotateBy(duration, 0, func)
|
||||
{
|
||||
end_val_ = rotation;
|
||||
|
|
@ -440,7 +440,7 @@ namespace kiwano
|
|||
this->Done();
|
||||
}
|
||||
|
||||
void ActionCustom::UpdateTween(ActorPtr target, Float32 percent)
|
||||
void ActionCustom::UpdateTween(ActorPtr target, float percent)
|
||||
{
|
||||
if (tween_func_)
|
||||
tween_func_(target, percent);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
namespace kiwano
|
||||
{
|
||||
// 缓动函数
|
||||
using EaseFunc = Function<Float32(Float32)>;
|
||||
using EaseFunc = Function<float(float)>;
|
||||
|
||||
// 缓动函数枚举
|
||||
// See https://easings.net for more information
|
||||
|
|
@ -91,7 +91,7 @@ namespace kiwano
|
|||
protected:
|
||||
void Update(ActorPtr target, Duration dt) override;
|
||||
|
||||
virtual void UpdateTween(ActorPtr target, Float32 percent) = 0;
|
||||
virtual void UpdateTween(ActorPtr target, float percent) = 0;
|
||||
|
||||
protected:
|
||||
Duration dur_;
|
||||
|
|
@ -119,7 +119,7 @@ namespace kiwano
|
|||
protected:
|
||||
void Init(ActorPtr target) override;
|
||||
|
||||
void UpdateTween(ActorPtr target, Float32 percent) override;
|
||||
void UpdateTween(ActorPtr target, float percent) override;
|
||||
|
||||
protected:
|
||||
Point start_pos_;
|
||||
|
|
@ -165,8 +165,8 @@ namespace kiwano
|
|||
ActionJumpBy(
|
||||
Duration duration, /* 持续时长 */
|
||||
Point const& vec, /* 跳跃距离 */
|
||||
Float32 height, /* 跳跃高度 */
|
||||
Int32 jumps = 1, /* 跳跃次数 */
|
||||
float height, /* 跳跃高度 */
|
||||
int jumps = 1, /* 跳跃次数 */
|
||||
EaseFunc func = nullptr /* 速度变化 */
|
||||
);
|
||||
|
||||
|
|
@ -179,13 +179,13 @@ namespace kiwano
|
|||
protected:
|
||||
void Init(ActorPtr target) override;
|
||||
|
||||
void UpdateTween(ActorPtr target, Float32 percent) override;
|
||||
void UpdateTween(ActorPtr target, float percent) override;
|
||||
|
||||
protected:
|
||||
Point start_pos_;
|
||||
Point delta_pos_;
|
||||
Float32 height_;
|
||||
Int32 jumps_;
|
||||
float height_;
|
||||
int jumps_;
|
||||
Point prev_pos_;
|
||||
};
|
||||
|
||||
|
|
@ -198,8 +198,8 @@ namespace kiwano
|
|||
ActionJumpTo(
|
||||
Duration duration, /* 持续时长 */
|
||||
Point const& pos, /* 目的坐标 */
|
||||
Float32 height, /* 跳跃高度 */
|
||||
Int32 jumps = 1, /* 跳跃次数 */
|
||||
float height, /* 跳跃高度 */
|
||||
int jumps = 1, /* 跳跃次数 */
|
||||
EaseFunc func = nullptr /* 速度变化 */
|
||||
);
|
||||
|
||||
|
|
@ -228,14 +228,14 @@ namespace kiwano
|
|||
public:
|
||||
ActionScaleBy(
|
||||
Duration duration, /* 持续时长 */
|
||||
Float32 scale, /* 相对变化值 */
|
||||
float scale, /* 相对变化值 */
|
||||
EaseFunc func = nullptr /* 速度变化 */
|
||||
);
|
||||
|
||||
ActionScaleBy(
|
||||
Duration duration, /* 持续时长 */
|
||||
Float32 scale_x, /* 横向缩放相对变化值 */
|
||||
Float32 scale_y, /* 纵向缩放相对变化值 */
|
||||
float scale_x, /* 横向缩放相对变化值 */
|
||||
float scale_y, /* 纵向缩放相对变化值 */
|
||||
EaseFunc func = nullptr /* 速度变化 */
|
||||
);
|
||||
|
||||
|
|
@ -248,13 +248,13 @@ namespace kiwano
|
|||
protected:
|
||||
void Init(ActorPtr target) override;
|
||||
|
||||
void UpdateTween(ActorPtr target, Float32 percent) override;
|
||||
void UpdateTween(ActorPtr target, float percent) override;
|
||||
|
||||
protected:
|
||||
Float32 start_scale_x_;
|
||||
Float32 start_scale_y_;
|
||||
Float32 delta_x_;
|
||||
Float32 delta_y_;
|
||||
float start_scale_x_;
|
||||
float start_scale_y_;
|
||||
float delta_x_;
|
||||
float delta_y_;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -265,14 +265,14 @@ namespace kiwano
|
|||
public:
|
||||
ActionScaleTo(
|
||||
Duration duration, /* 持续时长 */
|
||||
Float32 scale, /* 目标值 */
|
||||
float scale, /* 目标值 */
|
||||
EaseFunc func = nullptr /* 速度变化 */
|
||||
);
|
||||
|
||||
ActionScaleTo(
|
||||
Duration duration, /* 持续时长 */
|
||||
Float32 scale_x, /* 横向缩放目标值 */
|
||||
Float32 scale_y, /* 纵向缩放目标值 */
|
||||
float scale_x, /* 横向缩放目标值 */
|
||||
float scale_y, /* 纵向缩放目标值 */
|
||||
EaseFunc func = nullptr /* 速度变化 */
|
||||
);
|
||||
|
||||
|
|
@ -290,8 +290,8 @@ namespace kiwano
|
|||
void Init(ActorPtr target) override;
|
||||
|
||||
protected:
|
||||
Float32 end_scale_x_;
|
||||
Float32 end_scale_y_;
|
||||
float end_scale_x_;
|
||||
float end_scale_y_;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -302,7 +302,7 @@ namespace kiwano
|
|||
public:
|
||||
ActionFadeTo(
|
||||
Duration duration, /* 持续时长 */
|
||||
Float32 opacity, /* 目标值 */
|
||||
float opacity, /* 目标值 */
|
||||
EaseFunc func = nullptr /* 速度变化 */
|
||||
);
|
||||
|
||||
|
|
@ -319,12 +319,12 @@ namespace kiwano
|
|||
protected:
|
||||
void Init(ActorPtr target) override;
|
||||
|
||||
void UpdateTween(ActorPtr target, Float32 percent) override;
|
||||
void UpdateTween(ActorPtr target, float percent) override;
|
||||
|
||||
protected:
|
||||
Float32 start_val_;
|
||||
Float32 delta_val_;
|
||||
Float32 end_val_;
|
||||
float start_val_;
|
||||
float delta_val_;
|
||||
float end_val_;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -361,7 +361,7 @@ namespace kiwano
|
|||
public:
|
||||
ActionRotateBy(
|
||||
Duration duration, /* 持续时长 */
|
||||
Float32 rotation, /* 相对变化值 */
|
||||
float rotation, /* 相对变化值 */
|
||||
EaseFunc func = nullptr /* 速度变化 */
|
||||
);
|
||||
|
||||
|
|
@ -374,11 +374,11 @@ namespace kiwano
|
|||
protected:
|
||||
void Init(ActorPtr target) override;
|
||||
|
||||
void UpdateTween(ActorPtr target, Float32 percent) override;
|
||||
void UpdateTween(ActorPtr target, float percent) override;
|
||||
|
||||
protected:
|
||||
Float32 start_val_;
|
||||
Float32 delta_val_;
|
||||
float start_val_;
|
||||
float delta_val_;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -389,7 +389,7 @@ namespace kiwano
|
|||
public:
|
||||
ActionRotateTo(
|
||||
Duration duration, /* 持续时长 */
|
||||
Float32 rotation, /* 目标值 */
|
||||
float rotation, /* 目标值 */
|
||||
EaseFunc func = nullptr /* 速度变化 */
|
||||
);
|
||||
|
||||
|
|
@ -407,7 +407,7 @@ namespace kiwano
|
|||
void Init(ActorPtr target) override;
|
||||
|
||||
protected:
|
||||
Float32 end_val_;
|
||||
float end_val_;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -416,7 +416,7 @@ namespace kiwano
|
|||
: public ActionTween
|
||||
{
|
||||
public:
|
||||
using TweenFunc = Function<void(ActorPtr, Float32)>;
|
||||
using TweenFunc = Function<void(ActorPtr, float)>;
|
||||
|
||||
ActionCustom(
|
||||
Duration duration, /* 持续时长 */
|
||||
|
|
@ -437,7 +437,7 @@ namespace kiwano
|
|||
protected:
|
||||
void Init(ActorPtr target) override;
|
||||
|
||||
void UpdateTween(ActorPtr target, Float32 percent) override;
|
||||
void UpdateTween(ActorPtr target, float percent) override;
|
||||
|
||||
protected:
|
||||
TweenFunc tween_func_;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
namespace kiwano
|
||||
{
|
||||
ActionWalk::ActionWalk(Duration duration, bool rotating, Float32 start, Float32 end, EaseFunc func)
|
||||
ActionWalk::ActionWalk(Duration duration, bool rotating, float start, float end, EaseFunc func)
|
||||
: ActionTween(duration, func)
|
||||
, start_(start)
|
||||
, end_(end)
|
||||
|
|
@ -32,7 +32,7 @@ namespace kiwano
|
|||
{
|
||||
}
|
||||
|
||||
ActionWalk::ActionWalk(Duration duration, Geometry const& path, bool rotating, Float32 start, Float32 end, EaseFunc func)
|
||||
ActionWalk::ActionWalk(Duration duration, Geometry const& path, bool rotating, float start, float end, EaseFunc func)
|
||||
: ActionWalk(duration, rotating, start, end, func)
|
||||
{
|
||||
path_ = path;
|
||||
|
|
@ -70,9 +70,9 @@ namespace kiwano
|
|||
length_ = path_.GetLength();
|
||||
}
|
||||
|
||||
void ActionWalk::UpdateTween(ActorPtr target, Float32 percent)
|
||||
void ActionWalk::UpdateTween(ActorPtr target, float percent)
|
||||
{
|
||||
Float32 distance = length_ * std::min(std::max((end_ - start_) * percent + start_, 0.f), 1.f);
|
||||
float distance = length_ * std::min(std::max((end_ - start_) * percent + start_, 0.f), 1.f);
|
||||
|
||||
Point point, tangent;
|
||||
if (path_.ComputePointAtLength(distance, point, tangent))
|
||||
|
|
@ -81,8 +81,8 @@ namespace kiwano
|
|||
|
||||
if (rotating_)
|
||||
{
|
||||
Float32 ac = math::Acos(tangent.x);
|
||||
Float32 rotation = (tangent.y < 0.f) ? 360.f - ac : ac;
|
||||
float ac = math::Acos(tangent.x);
|
||||
float rotation = (tangent.y < 0.f) ? 360.f - ac : ac;
|
||||
target->SetRotation(rotation);
|
||||
}
|
||||
}
|
||||
|
|
@ -114,7 +114,7 @@ namespace kiwano
|
|||
sink_.AddBezier(point1, point2, point3);
|
||||
}
|
||||
|
||||
void ActionWalk::AddArc(Point const& point, Size const& radius, Float32 rotation, bool clockwise, bool is_small)
|
||||
void ActionWalk::AddArc(Point const& point, Size const& radius, float rotation, bool clockwise, bool is_small)
|
||||
{
|
||||
sink_.AddArc(point, radius, rotation, clockwise, is_small);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ namespace kiwano
|
|||
ActionWalk(
|
||||
Duration duration, /* 持续时长 */
|
||||
bool rotating = false, /* 沿路线切线方向旋转 */
|
||||
Float32 start = 0.f, /* 起点 */
|
||||
Float32 end = 1.f, /* 终点 */
|
||||
float start = 0.f, /* 起点 */
|
||||
float end = 1.f, /* 终点 */
|
||||
EaseFunc func = nullptr /* 速度变化 */
|
||||
);
|
||||
|
||||
|
|
@ -41,8 +41,8 @@ namespace kiwano
|
|||
Duration duration, /* 持续时长 */
|
||||
Geometry const& path, /* 路线 */
|
||||
bool rotating = false, /* 沿路线切线方向旋转 */
|
||||
Float32 start = 0.f, /* 起点 */
|
||||
Float32 end = 1.f, /* 终点 */
|
||||
float start = 0.f, /* 起点 */
|
||||
float end = 1.f, /* 终点 */
|
||||
EaseFunc func = nullptr /* 速度变化 */
|
||||
);
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ namespace kiwano
|
|||
void AddArc(
|
||||
Point const& point, /* 终点 */
|
||||
Size const& radius, /* 椭圆半径 */
|
||||
Float32 rotation, /* 椭圆旋转角度 */
|
||||
float rotation, /* 椭圆旋转角度 */
|
||||
bool clockwise = true, /* 顺时针 or 逆时针 */
|
||||
bool is_small = true /* 是否取小于 180° 的弧 */
|
||||
);
|
||||
|
|
@ -98,13 +98,13 @@ namespace kiwano
|
|||
protected:
|
||||
void Init(ActorPtr target) override;
|
||||
|
||||
void UpdateTween(ActorPtr target, Float32 percent) override;
|
||||
void UpdateTween(ActorPtr target, float percent) override;
|
||||
|
||||
protected:
|
||||
bool rotating_;
|
||||
Float32 start_;
|
||||
Float32 end_;
|
||||
Float32 length_;
|
||||
float start_;
|
||||
float end_;
|
||||
float length_;
|
||||
Point start_pos_;
|
||||
Geometry path_;
|
||||
GeometrySink sink_;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void Animation::UpdateTween(ActorPtr target, Float32 percent)
|
||||
void Animation::UpdateTween(ActorPtr target, float percent)
|
||||
{
|
||||
auto sprite_target = dynamic_cast<Sprite*>(target.get());
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ namespace kiwano
|
|||
{
|
||||
const auto& frames = frame_seq_->GetFrames();
|
||||
auto size = frames.size();
|
||||
auto index = std::min(static_cast<UInt32>(math::Floor(size * percent)), size - 1);
|
||||
auto index = std::min(static_cast<std::size_t>(math::Floor(size * percent)), size - 1);
|
||||
|
||||
sprite_target->SetFrame(frames[index]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace kiwano
|
|||
protected:
|
||||
void Init(ActorPtr target) override;
|
||||
|
||||
void UpdateTween(ActorPtr target, Float32 percent) override;
|
||||
void UpdateTween(ActorPtr target, float percent) override;
|
||||
|
||||
protected:
|
||||
FrameSequencePtr frame_seq_;
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@
|
|||
|
||||
namespace kiwano
|
||||
{
|
||||
const Int32 RenderComponent::flag = KGE_DEFINE_COMPONENT_FLAG(0);
|
||||
const Int32 UpdateComponent::flag = KGE_DEFINE_COMPONENT_FLAG(1);
|
||||
const Int32 EventComponent::flag = KGE_DEFINE_COMPONENT_FLAG(2);
|
||||
const int RenderComponent::flag = KGE_DEFINE_COMPONENT_FLAG(0);
|
||||
const int UpdateComponent::flag = KGE_DEFINE_COMPONENT_FLAG(1);
|
||||
const int EventComponent::flag = KGE_DEFINE_COMPONENT_FLAG(2);
|
||||
|
||||
ComponentBase::ComponentBase()
|
||||
: flag_(0)
|
||||
{
|
||||
}
|
||||
|
||||
bool ComponentBase::Check(const Int32 flag)
|
||||
bool ComponentBase::Check(const int flag)
|
||||
{
|
||||
return !!(flag_ & flag);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,13 +32,13 @@ namespace kiwano
|
|||
virtual void SetupComponent() = 0;
|
||||
virtual void DestroyComponent() = 0;
|
||||
|
||||
bool Check(const Int32 flag);
|
||||
bool Check(const int flag);
|
||||
|
||||
protected:
|
||||
ComponentBase();
|
||||
|
||||
protected:
|
||||
Int32 flag_;
|
||||
int flag_;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ namespace kiwano
|
|||
virtual void AfterRender() {}
|
||||
|
||||
public:
|
||||
static const Int32 flag;
|
||||
static const int flag;
|
||||
|
||||
RenderComponent();
|
||||
};
|
||||
|
|
@ -74,7 +74,7 @@ namespace kiwano
|
|||
virtual void AfterUpdate() {}
|
||||
|
||||
public:
|
||||
static const Int32 flag;
|
||||
static const int flag;
|
||||
|
||||
UpdateComponent();
|
||||
};
|
||||
|
|
@ -87,10 +87,10 @@ namespace kiwano
|
|||
public:
|
||||
virtual void HandleEvent(Event&) {}
|
||||
|
||||
virtual void HandleMessage(HWND, UInt32, WPARAM, LPARAM) {}
|
||||
virtual void HandleMessage(HWND, UINT32, WPARAM, LPARAM) {}
|
||||
|
||||
public:
|
||||
static const Int32 flag;
|
||||
static const int flag;
|
||||
|
||||
EventComponent();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ namespace kiwano
|
|||
// 鼠标事件
|
||||
struct MouseEvent
|
||||
{
|
||||
Float32 x;
|
||||
Float32 y;
|
||||
float x;
|
||||
float y;
|
||||
bool left_btn_down; // 左键是否按下
|
||||
bool right_btn_down; // 右键是否按下
|
||||
|
||||
|
|
@ -36,27 +36,27 @@ namespace kiwano
|
|||
{
|
||||
struct // Events::MouseDown | Events::MouseUp | Events::MouseClick
|
||||
{
|
||||
Int32 button;
|
||||
int button;
|
||||
};
|
||||
|
||||
struct // Events::MouseWheel
|
||||
{
|
||||
Float32 wheel;
|
||||
float wheel;
|
||||
};
|
||||
};
|
||||
|
||||
static bool Check(Int32 type);
|
||||
static bool Check(int type);
|
||||
};
|
||||
|
||||
// 键盘事件
|
||||
struct KeyboardEvent
|
||||
{
|
||||
Int32 count;
|
||||
int count;
|
||||
union
|
||||
{
|
||||
struct // Events::KeyDown | Events::KeyUp
|
||||
{
|
||||
Int32 code; // enum KeyCode
|
||||
int code; // enum KeyCode
|
||||
};
|
||||
|
||||
struct // Events::Char
|
||||
|
|
@ -65,7 +65,7 @@ namespace kiwano
|
|||
};
|
||||
};
|
||||
|
||||
static bool Check(Int32 type);
|
||||
static bool Check(int type);
|
||||
};
|
||||
|
||||
// 窗口事件
|
||||
|
|
@ -75,14 +75,14 @@ namespace kiwano
|
|||
{
|
||||
struct // Events::WindowMoved
|
||||
{
|
||||
Int32 x;
|
||||
Int32 y;
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
|
||||
struct // Events::WindowResized
|
||||
{
|
||||
Int32 width;
|
||||
Int32 height;
|
||||
int width;
|
||||
int height;
|
||||
};
|
||||
|
||||
struct // Events::WindowFocusChanged
|
||||
|
|
@ -92,11 +92,11 @@ namespace kiwano
|
|||
|
||||
struct // Events::WindowTitleChanged
|
||||
{
|
||||
const WChar* title;
|
||||
const wchar_t* title;
|
||||
};
|
||||
};
|
||||
|
||||
static bool Check(Int32 type);
|
||||
static bool Check(int type);
|
||||
};
|
||||
|
||||
// 自定义事件
|
||||
|
|
@ -110,7 +110,7 @@ namespace kiwano
|
|||
// 事件
|
||||
struct KGE_API Event
|
||||
{
|
||||
enum Type : Int32
|
||||
enum Type : int
|
||||
{
|
||||
First,
|
||||
|
||||
|
|
@ -144,7 +144,7 @@ namespace kiwano
|
|||
Last
|
||||
};
|
||||
|
||||
Int32 type;
|
||||
int type;
|
||||
Actor* target;
|
||||
|
||||
union
|
||||
|
|
@ -155,23 +155,23 @@ namespace kiwano
|
|||
CustomEvent custom;
|
||||
};
|
||||
|
||||
Event(Int32 type = Type::First) : type(type), target(nullptr) {}
|
||||
Event(int type = Type::First) : type(type), target(nullptr) {}
|
||||
};
|
||||
|
||||
|
||||
// Check-functions
|
||||
|
||||
inline bool MouseEvent::Check(Int32 type)
|
||||
inline bool MouseEvent::Check(int type)
|
||||
{
|
||||
return type > Event::MouseFirst && type < Event::MouseLast;
|
||||
}
|
||||
|
||||
inline bool KeyboardEvent::Check(Int32 type)
|
||||
inline bool KeyboardEvent::Check(int type)
|
||||
{
|
||||
return type > Event::KeyFirst && type < Event::KeyLast;
|
||||
}
|
||||
|
||||
inline bool WindowEvent::Check(Int32 type)
|
||||
inline bool WindowEvent::Check(int type)
|
||||
{
|
||||
return type > Event::WindowFirst && type < Event::WindowLast;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ namespace kiwano
|
|||
return listener.get();
|
||||
}
|
||||
|
||||
EventListener* EventDispatcher::AddListener(UInt32 type, EventCallback callback, String const& name)
|
||||
EventListener* EventDispatcher::AddListener(std::uint32_t type, EventCallback callback, String const& name)
|
||||
{
|
||||
EventListenerPtr listener = new EventListener(type, callback, name);
|
||||
return AddListener(listener);
|
||||
|
|
@ -93,7 +93,7 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void EventDispatcher::StartListeners(UInt32 type)
|
||||
void EventDispatcher::StartListeners(std::uint32_t type)
|
||||
{
|
||||
for (auto listener = listeners_.first_item(); listener; listener = listener->next_item())
|
||||
{
|
||||
|
|
@ -104,7 +104,7 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void EventDispatcher::StopListeners(UInt32 type)
|
||||
void EventDispatcher::StopListeners(std::uint32_t type)
|
||||
{
|
||||
for (auto listener = listeners_.first_item(); listener; listener = listener->next_item())
|
||||
{
|
||||
|
|
@ -115,7 +115,7 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void EventDispatcher::RemoveListeners(UInt32 type)
|
||||
void EventDispatcher::RemoveListeners(std::uint32_t type)
|
||||
{
|
||||
EventListenerPtr next;
|
||||
for (auto listener = listeners_.first_item(); listener; listener = next)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ namespace kiwano
|
|||
|
||||
// 添加监听器
|
||||
EventListener* AddListener(
|
||||
UInt32 type,
|
||||
std::uint32_t type,
|
||||
EventCallback callback,
|
||||
String const& name = L""
|
||||
);
|
||||
|
|
@ -57,17 +57,17 @@ namespace kiwano
|
|||
|
||||
// 启动监听器
|
||||
void StartListeners(
|
||||
UInt32 type
|
||||
std::uint32_t type
|
||||
);
|
||||
|
||||
// 停止监听器
|
||||
void StopListeners(
|
||||
UInt32 type
|
||||
std::uint32_t type
|
||||
);
|
||||
|
||||
// 移除监听器
|
||||
void RemoveListeners(
|
||||
UInt32 type
|
||||
std::uint32_t type
|
||||
);
|
||||
|
||||
virtual void Dispatch(Event& evt);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
namespace kiwano
|
||||
{
|
||||
EventListener::EventListener(UInt32 type, EventCallback const & callback, String const & name)
|
||||
EventListener::EventListener(std::uint32_t type, EventCallback const & callback, String const & name)
|
||||
: type_(type)
|
||||
, callback_(callback)
|
||||
, running_(true)
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace kiwano
|
|||
|
||||
public:
|
||||
EventListener(
|
||||
UInt32 type,
|
||||
std::uint32_t type,
|
||||
EventCallback const& callback,
|
||||
String const& name = L""
|
||||
);
|
||||
|
|
@ -57,7 +57,7 @@ namespace kiwano
|
|||
|
||||
protected:
|
||||
bool running_;
|
||||
UInt32 type_;
|
||||
std::uint32_t type_;
|
||||
EventCallback callback_;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace kiwano
|
|||
{
|
||||
}
|
||||
|
||||
void Input::UpdateKey(Int32 key, bool down)
|
||||
void Input::UpdateKey(int key, bool down)
|
||||
{
|
||||
if (down && !keys_[key])
|
||||
keys_pressed_[key] = true;
|
||||
|
|
@ -50,7 +50,7 @@ namespace kiwano
|
|||
want_update_ = true;
|
||||
}
|
||||
|
||||
void Input::UpdateMousePos(Float32 x, Float32 y)
|
||||
void Input::UpdateMousePos(float x, float y)
|
||||
{
|
||||
mouse_pos_x_ = x;
|
||||
mouse_pos_y_ = y;
|
||||
|
|
@ -67,7 +67,7 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void Input::HandleMessage(HWND hwnd, UInt32 msg, WPARAM wparam, LPARAM lparam)
|
||||
void Input::HandleMessage(HWND hwnd, UINT32 msg, WPARAM wparam, LPARAM lparam)
|
||||
{
|
||||
switch (msg)
|
||||
{
|
||||
|
|
@ -86,7 +86,7 @@ namespace kiwano
|
|||
if (msg == WM_LBUTTONDOWN || msg == WM_LBUTTONUP) { UpdateKey(VK_LBUTTON, (msg == WM_LBUTTONDOWN) ? true : false); }
|
||||
else if (msg == WM_RBUTTONDOWN || msg == WM_RBUTTONUP) { UpdateKey(VK_RBUTTON, (msg == WM_RBUTTONDOWN) ? true : false); }
|
||||
else if (msg == WM_MBUTTONDOWN || msg == WM_MBUTTONUP) { UpdateKey(VK_MBUTTON, (msg == WM_MBUTTONDOWN) ? true : false); }
|
||||
else if (msg == WM_MOUSEMOVE) { UpdateMousePos(static_cast<Float32>(GET_X_LPARAM(lparam)), static_cast<Float32>(GET_Y_LPARAM(lparam))); }
|
||||
else if (msg == WM_MOUSEMOVE) { UpdateMousePos(static_cast<float>(GET_X_LPARAM(lparam)), static_cast<float>(GET_Y_LPARAM(lparam))); }
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -97,12 +97,12 @@ namespace kiwano
|
|||
case WM_SYSKEYUP:
|
||||
{
|
||||
bool down = msg == WM_KEYDOWN || msg == WM_SYSKEYDOWN;
|
||||
UpdateKey((Int32)wparam, down);
|
||||
UpdateKey((int)wparam, down);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool Input::IsDown(Int32 key_or_btn)
|
||||
bool Input::IsDown(int key_or_btn)
|
||||
{
|
||||
KGE_ASSERT(key_or_btn >= 0 && key_or_btn < KEY_NUM);
|
||||
if (key_or_btn >= 0 && key_or_btn < KEY_NUM)
|
||||
|
|
@ -110,7 +110,7 @@ namespace kiwano
|
|||
return false;
|
||||
}
|
||||
|
||||
bool Input::WasPressed(Int32 key_or_btn)
|
||||
bool Input::WasPressed(int key_or_btn)
|
||||
{
|
||||
KGE_ASSERT(key_or_btn >= 0 && key_or_btn < KEY_NUM);
|
||||
if (key_or_btn >= 0 && key_or_btn < KEY_NUM)
|
||||
|
|
@ -118,7 +118,7 @@ namespace kiwano
|
|||
return false;
|
||||
}
|
||||
|
||||
bool Input::WasReleased(Int32 key_or_btn)
|
||||
bool Input::WasReleased(int key_or_btn)
|
||||
{
|
||||
KGE_ASSERT(key_or_btn >= 0 && key_or_btn < KEY_NUM);
|
||||
if (key_or_btn >= 0 && key_or_btn < KEY_NUM)
|
||||
|
|
@ -126,12 +126,12 @@ namespace kiwano
|
|||
return false;
|
||||
}
|
||||
|
||||
Float32 Input::GetMouseX()
|
||||
float Input::GetMouseX()
|
||||
{
|
||||
return mouse_pos_x_;
|
||||
}
|
||||
|
||||
Float32 Input::GetMouseY()
|
||||
float Input::GetMouseY()
|
||||
{
|
||||
return mouse_pos_y_;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,24 +37,24 @@ namespace kiwano
|
|||
public:
|
||||
// 检测键盘或鼠标按键是否正被按下
|
||||
bool IsDown(
|
||||
Int32 key_or_btn
|
||||
int key_or_btn
|
||||
);
|
||||
|
||||
// 检测键盘或鼠标按键是否刚被点击
|
||||
bool WasPressed(
|
||||
Int32 key_or_btn
|
||||
int key_or_btn
|
||||
);
|
||||
|
||||
// 检测键盘或鼠标按键是否刚抬起
|
||||
bool WasReleased(
|
||||
Int32 key_or_btn
|
||||
int key_or_btn
|
||||
);
|
||||
|
||||
// 获得鼠标 x 坐标
|
||||
Float32 GetMouseX();
|
||||
float GetMouseX();
|
||||
|
||||
// 获得鼠标 y 坐标
|
||||
Float32 GetMouseY();
|
||||
float GetMouseY();
|
||||
|
||||
// 获得鼠标坐标
|
||||
Point GetMousePos();
|
||||
|
|
@ -66,11 +66,11 @@ namespace kiwano
|
|||
|
||||
void AfterUpdate() override;
|
||||
|
||||
void HandleMessage(HWND hwnd, UInt32 msg, WPARAM wparam, LPARAM lparam) override;
|
||||
void HandleMessage(HWND hwnd, UINT32 msg, WPARAM wparam, LPARAM lparam) override;
|
||||
|
||||
void UpdateKey(Int32, bool);
|
||||
void UpdateKey(int, bool);
|
||||
|
||||
void UpdateMousePos(Float32, Float32);
|
||||
void UpdateMousePos(float, float);
|
||||
|
||||
protected:
|
||||
Input();
|
||||
|
|
@ -78,13 +78,13 @@ namespace kiwano
|
|||
~Input();
|
||||
|
||||
protected:
|
||||
static const Int32 KEY_NUM = 256;
|
||||
static const int KEY_NUM = 256;
|
||||
|
||||
bool want_update_;
|
||||
bool keys_[KEY_NUM];
|
||||
bool keys_pressed_[KEY_NUM];
|
||||
bool keys_released_[KEY_NUM];
|
||||
Float32 mouse_pos_x_;
|
||||
Float32 mouse_pos_y_;
|
||||
float mouse_pos_x_;
|
||||
float mouse_pos_y_;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ namespace kiwano
|
|||
return error_stream_.rdbuf(buf);
|
||||
}
|
||||
|
||||
void Logger::Printf(const WChar* format, ...)
|
||||
void Logger::Printf(const wchar_t* format, ...)
|
||||
{
|
||||
va_list args = nullptr;
|
||||
va_start(args, format);
|
||||
|
|
@ -226,7 +226,7 @@ namespace kiwano
|
|||
va_end(args);
|
||||
}
|
||||
|
||||
void Logger::Messagef(const WChar* format, ...)
|
||||
void Logger::Messagef(const wchar_t* format, ...)
|
||||
{
|
||||
using namespace __console_colors;
|
||||
|
||||
|
|
@ -238,7 +238,7 @@ namespace kiwano
|
|||
va_end(args);
|
||||
}
|
||||
|
||||
void Logger::Warningf(const WChar* format, ...)
|
||||
void Logger::Warningf(const wchar_t* format, ...)
|
||||
{
|
||||
using namespace __console_colors;
|
||||
|
||||
|
|
@ -250,7 +250,7 @@ namespace kiwano
|
|||
va_end(args);
|
||||
}
|
||||
|
||||
void Logger::Errorf(const WChar* format, ...)
|
||||
void Logger::Errorf(const wchar_t* format, ...)
|
||||
{
|
||||
using namespace __console_colors;
|
||||
|
||||
|
|
@ -262,7 +262,7 @@ namespace kiwano
|
|||
va_end(args);
|
||||
}
|
||||
|
||||
void Logger::Outputf(std::wostream& os, std::wostream& (*color)(std::wostream&), const WChar* prompt, const WChar* format, va_list args) const
|
||||
void Logger::Outputf(std::wostream& os, std::wostream& (*color)(std::wostream&), const wchar_t* prompt, const wchar_t* format, va_list args) const
|
||||
{
|
||||
if (enabled_)
|
||||
{
|
||||
|
|
@ -275,9 +275,9 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
std::wstring Logger::MakeOutputStringf(const WChar* prompt, const WChar* format, va_list args) const
|
||||
std::wstring Logger::MakeOutputStringf(const wchar_t* prompt, const wchar_t* format, va_list args) const
|
||||
{
|
||||
static WChar temp_buffer[1024 * 3 + 1];
|
||||
static wchar_t temp_buffer[1024 * 3 + 1];
|
||||
|
||||
StringStream ss;
|
||||
ss << Logger::OutPrefix;
|
||||
|
|
|
|||
|
|
@ -66,13 +66,13 @@ namespace kiwano
|
|||
// ½ûÓÃ Logger
|
||||
void Disable();
|
||||
|
||||
void Printf(const WChar* format, ...);
|
||||
void Printf(const wchar_t* format, ...);
|
||||
|
||||
void Messagef(const WChar * format, ...);
|
||||
void Messagef(const wchar_t * format, ...);
|
||||
|
||||
void Warningf(const WChar* format, ...);
|
||||
void Warningf(const wchar_t* format, ...);
|
||||
|
||||
void Errorf(const WChar* format, ...);
|
||||
void Errorf(const wchar_t* format, ...);
|
||||
|
||||
template <typename ..._Args>
|
||||
void Print(_Args&& ... args);
|
||||
|
|
@ -109,25 +109,34 @@ namespace kiwano
|
|||
|
||||
~Logger();
|
||||
|
||||
void Outputf(std::wostream& os, std::wostream&(*color)(std::wostream&), const WChar* prompt, const WChar* format, va_list args) const;
|
||||
|
||||
std::wstring MakeOutputStringf(const WChar* prompt, const WChar* format, va_list args) const;
|
||||
//
|
||||
// output functions
|
||||
//
|
||||
void Outputf(std::wostream& os, std::wostream&(*color)(std::wostream&), const wchar_t* prompt, const wchar_t* format, va_list args) const;
|
||||
|
||||
template <typename ..._Args>
|
||||
void OutputLine(std::wostream& os, std::wostream& (*color)(std::wostream&), const WChar* prompt, _Args&& ... args) const;
|
||||
void OutputLine(std::wostream& os, std::wostream& (*color)(std::wostream&), const wchar_t* prompt, _Args&& ... args) const;
|
||||
|
||||
template <typename ..._Args>
|
||||
void Output(std::wostream& os, std::wostream& (*color)(std::wostream&), const WChar* prompt, _Args&& ... args) const;
|
||||
void Output(std::wostream& os, std::wostream& (*color)(std::wostream&), const wchar_t* prompt, _Args&& ... args) const;
|
||||
|
||||
static std::wostream& OutPrefix(std::wostream& out);
|
||||
|
||||
//
|
||||
// make string
|
||||
//
|
||||
std::wstring MakeOutputStringf(const wchar_t* prompt, const wchar_t* format, va_list args) const;
|
||||
|
||||
template <typename ..._Args>
|
||||
std::wstring MakeOutputString(const WChar* prompt, _Args&& ... args) const;
|
||||
std::wstring MakeOutputString(const wchar_t* prompt, _Args&& ... args) const;
|
||||
|
||||
//
|
||||
// reset functions
|
||||
//
|
||||
void ResetConsoleColor() const;
|
||||
|
||||
static std::wostream& DefaultOutputColor(std::wostream& out);
|
||||
|
||||
static std::wostream& OutPrefix(std::wostream& out);
|
||||
|
||||
private:
|
||||
bool enabled_;
|
||||
WORD default_stdout_color_;
|
||||
|
|
@ -235,7 +244,7 @@ namespace kiwano
|
|||
}
|
||||
|
||||
template <typename ..._Args>
|
||||
void Logger::OutputLine(std::wostream& os, std::wostream& (*color)(std::wostream&), const WChar* prompt, _Args&& ... args) const
|
||||
void Logger::OutputLine(std::wostream& os, std::wostream& (*color)(std::wostream&), const wchar_t* prompt, _Args&& ... args) const
|
||||
{
|
||||
if (enabled_)
|
||||
{
|
||||
|
|
@ -247,7 +256,7 @@ namespace kiwano
|
|||
}
|
||||
|
||||
template <typename ..._Args>
|
||||
void Logger::Output(std::wostream& os, std::wostream& (*color)(std::wostream&), const WChar* prompt, _Args&& ... args) const
|
||||
void Logger::Output(std::wostream& os, std::wostream& (*color)(std::wostream&), const wchar_t* prompt, _Args&& ... args) const
|
||||
{
|
||||
if (enabled_)
|
||||
{
|
||||
|
|
@ -261,7 +270,7 @@ namespace kiwano
|
|||
}
|
||||
|
||||
template <typename ..._Args>
|
||||
std::wstring Logger::MakeOutputString(const WChar* prompt, _Args&& ... args) const
|
||||
std::wstring Logger::MakeOutputString(const wchar_t* prompt, _Args&& ... args) const
|
||||
{
|
||||
StringStream ss;
|
||||
ss << Logger::OutPrefix;
|
||||
|
|
@ -269,7 +278,7 @@ namespace kiwano
|
|||
if (prompt)
|
||||
ss << prompt;
|
||||
|
||||
(void)std::initializer_list<Int32>{((ss << ' ' << args), 0)...};
|
||||
(void)std::initializer_list<int>{((ss << ' ' << args), 0)...};
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace kiwano
|
|||
Vector<ObjectBase*> tracing_objects;
|
||||
}
|
||||
|
||||
UInt32 ObjectBase::last_object_id = 0;
|
||||
std::uint32_t ObjectBase::last_object_id = 0;
|
||||
|
||||
ObjectBase::ObjectBase()
|
||||
: tracing_leak_(false)
|
||||
|
|
|
|||
|
|
@ -42,14 +42,14 @@ namespace kiwano
|
|||
|
||||
void SetName(String const& name);
|
||||
|
||||
inline String GetName() const { if (name_) return *name_; return String(); }
|
||||
|
||||
inline bool IsName(String const& name) const { return name_ ? (*name_ == name) : name.empty(); }
|
||||
|
||||
inline UInt32 GetObjectID() const { return id_; }
|
||||
|
||||
String DumpObject();
|
||||
|
||||
inline String GetName() const { if (name_) return *name_; return String(); }
|
||||
|
||||
inline bool IsName(String const& name) const { return name_ ? (*name_ == name) : name.empty(); }
|
||||
|
||||
inline std::uint32_t GetObjectID() const { return id_; }
|
||||
|
||||
public:
|
||||
static bool IsTracingLeaks();
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ namespace kiwano
|
|||
void* user_data_;
|
||||
String* name_;
|
||||
|
||||
const UInt32 id_;
|
||||
static UInt32 last_object_id;
|
||||
const std::uint32_t id_;
|
||||
static std::uint32_t last_object_id;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace kiwano
|
|||
|
||||
}
|
||||
|
||||
Resource::Resource(UInt32 id, const WChar* type)
|
||||
Resource::Resource(std::uint32_t id, const wchar_t* type)
|
||||
: id_(id)
|
||||
, type_(type)
|
||||
{
|
||||
|
|
@ -75,7 +75,7 @@ namespace kiwano
|
|||
}
|
||||
|
||||
data_.buffer = static_cast<void*>(buffer);
|
||||
data_.size = static_cast<UInt32>(size);
|
||||
data_.size = static_cast<std::uint32_t>(size);
|
||||
} while (0);
|
||||
|
||||
return data_;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ namespace kiwano
|
|||
struct Data
|
||||
{
|
||||
void* buffer;
|
||||
UInt32 size;
|
||||
std::uint32_t size;
|
||||
|
||||
inline Data() : buffer(nullptr), size(0) {}
|
||||
|
||||
|
|
@ -49,20 +49,20 @@ namespace kiwano
|
|||
Resource();
|
||||
|
||||
Resource(
|
||||
UInt32 id, /* ×ÊÔ´ ID */
|
||||
const WChar* type /* ×ÊÔ´ÀàÐÍ */
|
||||
std::uint32_t id, /* ×ÊÔ´ ID */
|
||||
const wchar_t* type /* ×ÊÔ´ÀàÐÍ */
|
||||
);
|
||||
|
||||
// 获取二进制数据
|
||||
Resource::Data GetData() const;
|
||||
Resource::Data GetData() const;
|
||||
|
||||
inline UInt32 GetId() const { return id_; }
|
||||
inline std::uint32_t GetId() const { return id_; }
|
||||
|
||||
inline const WChar* GetType() const { return type_; }
|
||||
inline const wchar_t* GetType() const { return type_; }
|
||||
|
||||
private:
|
||||
UInt32 id_;
|
||||
const WChar* type_;
|
||||
std::uint32_t id_;
|
||||
const wchar_t* type_;
|
||||
|
||||
mutable Resource::Data data_;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
namespace kiwano
|
||||
{
|
||||
Timer::Timer(Callback const& func, Duration delay, Int32 times, String const& name)
|
||||
Timer::Timer(Callback const& func, Duration delay, int times, String const& name)
|
||||
: running_(true)
|
||||
, run_times_(0)
|
||||
, total_times_(times)
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ namespace kiwano
|
|||
Timer(
|
||||
Callback const& func, /* 执行函数 */
|
||||
Duration delay, /* 时间间隔(秒) */
|
||||
Int32 times = -1, /* 执行次数(设 -1 为永久执行) */
|
||||
int times = -1, /* 执行次数(设 -1 为永久执行) */
|
||||
String const& name = L"" /* 任务名称 */
|
||||
);
|
||||
|
||||
|
|
@ -63,8 +63,8 @@ namespace kiwano
|
|||
|
||||
protected:
|
||||
bool running_;
|
||||
Int32 run_times_;
|
||||
Int32 total_times_;
|
||||
int run_times_;
|
||||
int total_times_;
|
||||
Duration delay_;
|
||||
Duration delta_;
|
||||
Callback callback_;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
Timer* TimerManager::AddTimer(Timer::Callback const& func, Duration delay, Int32 times, String const& name)
|
||||
Timer* TimerManager::AddTimer(Timer::Callback const& func, Duration delay, int times, String const& name)
|
||||
{
|
||||
TimerPtr timer = new Timer(func, delay, times, name);
|
||||
return AddTimer(timer);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace kiwano
|
|||
Timer* AddTimer(
|
||||
Timer::Callback const& func, /* 执行函数 */
|
||||
Duration delay, /* 时间间隔(秒) */
|
||||
Int32 times = -1, /* 执行次数(设 -1 为永久执行) */
|
||||
int times = -1, /* 执行次数(设 -1 为永久执行) */
|
||||
String const& name = L"" /* 任务名称 */
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -33,14 +33,14 @@ namespace kiwano
|
|||
{
|
||||
MONITORINFOEX GetMoniterInfoEx(HWND hwnd);
|
||||
|
||||
void AdjustWindow(UInt32 width, UInt32 height, DWORD style, UInt32* win_width, UInt32* win_height);
|
||||
void AdjustWindow(std::uint32_t width, std::uint32_t height, DWORD style, std::uint32_t* win_width, std::uint32_t* win_height);
|
||||
|
||||
void ChangeFullScreenResolution(Int32 width, Int32 height, WCHAR* device_name);
|
||||
void ChangeFullScreenResolution(int width, int height, WCHAR* device_name);
|
||||
|
||||
void RestoreResolution(WCHAR* device_name);
|
||||
}
|
||||
|
||||
WindowConfig::WindowConfig(String const& title, UInt32 width, UInt32 height, UInt32 icon, bool resizable, bool fullscreen)
|
||||
WindowConfig::WindowConfig(String const& title, std::uint32_t width, std::uint32_t height, std::uint32_t icon, bool resizable, bool fullscreen)
|
||||
: title(title)
|
||||
, width(width)
|
||||
, height(height)
|
||||
|
|
@ -113,14 +113,14 @@ namespace kiwano
|
|||
::GetMonitorInfoW(monitor, &monitor_info_ex);
|
||||
|
||||
// Save the device name
|
||||
Int32 len = lstrlenW(monitor_info_ex.szDevice);
|
||||
int len = lstrlenW(monitor_info_ex.szDevice);
|
||||
device_name_ = new WCHAR[len + 1];
|
||||
lstrcpyW(device_name_, monitor_info_ex.szDevice);
|
||||
|
||||
UInt32 width = config.width;
|
||||
UInt32 height = config.height;
|
||||
Int32 left = -1;
|
||||
Int32 top = -1;
|
||||
std::uint32_t width = config.width;
|
||||
std::uint32_t height = config.height;
|
||||
int left = -1;
|
||||
int top = -1;
|
||||
|
||||
resizable_ = config.resizable;
|
||||
is_fullscreen_ = config.fullscreen;
|
||||
|
|
@ -130,18 +130,18 @@ namespace kiwano
|
|||
top = monitor_info_ex.rcMonitor.top;
|
||||
left = monitor_info_ex.rcMonitor.left;
|
||||
|
||||
if (width > static_cast<UInt32>(monitor_info_ex.rcWork.right - left))
|
||||
width = static_cast<UInt32>(monitor_info_ex.rcWork.right - left);
|
||||
if (width > static_cast<std::uint32_t>(monitor_info_ex.rcWork.right - left))
|
||||
width = static_cast<std::uint32_t>(monitor_info_ex.rcWork.right - left);
|
||||
|
||||
if (height > static_cast<UInt32>(monitor_info_ex.rcWork.bottom - top))
|
||||
height = static_cast<UInt32>(monitor_info_ex.rcWork.bottom - top);
|
||||
if (height > static_cast<std::uint32_t>(monitor_info_ex.rcWork.bottom - top))
|
||||
height = static_cast<std::uint32_t>(monitor_info_ex.rcWork.bottom - top);
|
||||
}
|
||||
else
|
||||
{
|
||||
UInt32 screenw = monitor_info_ex.rcWork.right - monitor_info_ex.rcWork.left;
|
||||
UInt32 screenh = monitor_info_ex.rcWork.bottom - monitor_info_ex.rcWork.top;
|
||||
std::uint32_t screenw = monitor_info_ex.rcWork.right - monitor_info_ex.rcWork.left;
|
||||
std::uint32_t screenh = monitor_info_ex.rcWork.bottom - monitor_info_ex.rcWork.top;
|
||||
|
||||
UInt32 win_width, win_height;
|
||||
std::uint32_t win_width, win_height;
|
||||
AdjustWindow(
|
||||
width,
|
||||
height,
|
||||
|
|
@ -200,7 +200,7 @@ namespace kiwano
|
|||
{
|
||||
if (handle_)
|
||||
{
|
||||
WChar title[256];
|
||||
wchar_t title[256];
|
||||
::GetWindowTextW(handle_, title, 256);
|
||||
return title;
|
||||
}
|
||||
|
|
@ -216,22 +216,22 @@ namespace kiwano
|
|||
Size Window::GetSize() const
|
||||
{
|
||||
return Size{
|
||||
static_cast<Float32>(width_),
|
||||
static_cast<Float32>(height_)
|
||||
static_cast<float>(width_),
|
||||
static_cast<float>(height_)
|
||||
};
|
||||
}
|
||||
|
||||
Float32 Window::GetWidth() const
|
||||
float Window::GetWidth() const
|
||||
{
|
||||
return static_cast<Float32>(width_);
|
||||
return static_cast<float>(width_);
|
||||
}
|
||||
|
||||
Float32 Window::GetHeight() const
|
||||
float Window::GetHeight() const
|
||||
{
|
||||
return static_cast<Float32>(height_);
|
||||
return static_cast<float>(height_);
|
||||
}
|
||||
|
||||
void Window::SetIcon(UInt32 icon_resource)
|
||||
void Window::SetIcon(std::uint32_t icon_resource)
|
||||
{
|
||||
if (handle_)
|
||||
{
|
||||
|
|
@ -250,11 +250,11 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void Window::Resize(Int32 width, Int32 height)
|
||||
void Window::Resize(int width, int height)
|
||||
{
|
||||
if (handle_ && !is_fullscreen_)
|
||||
{
|
||||
RECT rc = { 0, 0, Int32(width), Int32(height) };
|
||||
RECT rc = { 0, 0, int(width), int(height) };
|
||||
::AdjustWindowRect(&rc, GetWindowStyle(), false);
|
||||
|
||||
width = rc.right - rc.left;
|
||||
|
|
@ -263,7 +263,7 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void Window::SetFullscreen(bool fullscreen, Int32 width, Int32 height)
|
||||
void Window::SetFullscreen(bool fullscreen, int width, int height)
|
||||
{
|
||||
if (is_fullscreen_ != fullscreen || width != width_ || height != height_)
|
||||
{
|
||||
|
|
@ -290,14 +290,14 @@ namespace kiwano
|
|||
|
||||
MONITORINFOEX info = GetMoniterInfoEx(handle_);
|
||||
|
||||
UInt32 screenw = info.rcWork.right - info.rcWork.left;
|
||||
UInt32 screenh = info.rcWork.bottom - info.rcWork.top;
|
||||
std::uint32_t screenw = info.rcWork.right - info.rcWork.left;
|
||||
std::uint32_t screenh = info.rcWork.bottom - info.rcWork.top;
|
||||
|
||||
UInt32 win_width, win_height;
|
||||
std::uint32_t win_width, win_height;
|
||||
AdjustWindow(width, height, GetWindowStyle(), &win_width, &win_height);
|
||||
|
||||
Int32 left = screenw > win_width ? ((screenw - win_width) / 2) : 0;
|
||||
Int32 top = screenh > win_height ? ((screenh - win_height) / 2) : 0;
|
||||
int left = screenw > win_width ? ((screenw - win_width) / 2) : 0;
|
||||
int top = screenh > win_height ? ((screenh - win_height) / 2) : 0;
|
||||
|
||||
::SetWindowLongPtr(handle_, GWL_STYLE, GetWindowStyle());
|
||||
::SetWindowPos(handle_, HWND_NOTOPMOST, left, top, win_width, win_height, SWP_DRAWFRAME | SWP_FRAMECHANGED);
|
||||
|
|
@ -391,10 +391,10 @@ namespace kiwano
|
|||
return monitor_info;
|
||||
}
|
||||
|
||||
void AdjustWindow(UInt32 width, UInt32 height, DWORD style, UInt32* win_width, UInt32* win_height)
|
||||
void AdjustWindow(std::uint32_t width, std::uint32_t height, DWORD style, std::uint32_t* win_width, std::uint32_t* win_height)
|
||||
{
|
||||
RECT rc;
|
||||
::SetRect(&rc, 0, 0, (Int32)width, (Int32)height);
|
||||
::SetRect(&rc, 0, 0, (int)width, (int)height);
|
||||
::AdjustWindowRect(&rc, style, false);
|
||||
|
||||
*win_width = rc.right - rc.left;
|
||||
|
|
@ -402,8 +402,8 @@ namespace kiwano
|
|||
|
||||
MONITORINFOEX info = GetMoniterInfoEx(NULL);
|
||||
|
||||
UInt32 screenw = info.rcWork.right - info.rcWork.left;
|
||||
UInt32 screenh = info.rcWork.bottom - info.rcWork.top;
|
||||
std::uint32_t screenw = info.rcWork.right - info.rcWork.left;
|
||||
std::uint32_t screenh = info.rcWork.bottom - info.rcWork.top;
|
||||
|
||||
if (*win_width > screenw)
|
||||
*win_width = screenw;
|
||||
|
|
@ -411,7 +411,7 @@ namespace kiwano
|
|||
*win_height = screenh;
|
||||
}
|
||||
|
||||
void ChangeFullScreenResolution(Int32 width, Int32 height, WCHAR* device_name)
|
||||
void ChangeFullScreenResolution(int width, int height, WCHAR* device_name)
|
||||
{
|
||||
DEVMODE mode;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,18 +41,18 @@ namespace kiwano
|
|||
// 窗口设置
|
||||
struct WindowConfig
|
||||
{
|
||||
String title; // 标题
|
||||
UInt32 width; // 宽度
|
||||
UInt32 height; // 高度
|
||||
UInt32 icon; // 图标资源 ID
|
||||
bool resizable; // 窗口大小可拉伸
|
||||
bool fullscreen; // 全屏模式
|
||||
String title; // 标题
|
||||
std::uint32_t width; // 宽度
|
||||
std::uint32_t height; // 高度
|
||||
std::uint32_t icon; // 图标资源 ID
|
||||
bool resizable; // 窗口大小可拉伸
|
||||
bool fullscreen; // 全屏模式
|
||||
|
||||
WindowConfig(
|
||||
String const& title = L"Kiwano Game",
|
||||
UInt32 width = 640,
|
||||
UInt32 height = 480,
|
||||
UInt32 icon = 0,
|
||||
std::uint32_t width = 640,
|
||||
std::uint32_t height = 480,
|
||||
std::uint32_t icon = 0,
|
||||
bool resizable = false,
|
||||
bool fullscreen = false
|
||||
);
|
||||
|
|
@ -73,22 +73,22 @@ namespace kiwano
|
|||
Size GetSize() const;
|
||||
|
||||
// 获取窗口宽度
|
||||
Float32 GetWidth() const;
|
||||
float GetWidth() const;
|
||||
|
||||
// 获取窗口高度
|
||||
Float32 GetHeight() const;
|
||||
float GetHeight() const;
|
||||
|
||||
// 设置标题
|
||||
void SetTitle(String const& title);
|
||||
|
||||
// 设置窗口图标
|
||||
void SetIcon(UInt32 icon_resource);
|
||||
void SetIcon(std::uint32_t icon_resource);
|
||||
|
||||
// 重设窗口大小
|
||||
void Resize(Int32 width, Int32 height);
|
||||
void Resize(int width, int height);
|
||||
|
||||
// 设置全屏模式
|
||||
void SetFullscreen(bool fullscreen, Int32 width, Int32 height);
|
||||
void SetFullscreen(bool fullscreen, int width, int height);
|
||||
|
||||
// 设置鼠标指针类型
|
||||
void SetCursor(CursorType cursor);
|
||||
|
|
@ -117,8 +117,8 @@ namespace kiwano
|
|||
bool resizable_;
|
||||
bool is_fullscreen_;
|
||||
HWND handle_;
|
||||
Int32 width_;
|
||||
Int32 height_;
|
||||
int width_;
|
||||
int height_;
|
||||
WCHAR* device_name_;
|
||||
CursorType mouse_cursor_;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace kiwano
|
|||
// 報炎梓囚
|
||||
struct MouseButton
|
||||
{
|
||||
typedef Int32 Value;
|
||||
typedef int Value;
|
||||
|
||||
enum : Value
|
||||
{
|
||||
|
|
@ -40,7 +40,7 @@ namespace kiwano
|
|||
// 梓囚囚峙
|
||||
struct KeyCode
|
||||
{
|
||||
typedef Int32 Value;
|
||||
typedef int Value;
|
||||
|
||||
enum : Value
|
||||
{
|
||||
|
|
|
|||
|
|
@ -119,25 +119,25 @@ namespace kiwano
|
|||
{
|
||||
}
|
||||
|
||||
Float32 Duration::Seconds() const
|
||||
float Duration::Seconds() const
|
||||
{
|
||||
long sec = milliseconds_ / Sec.milliseconds_;
|
||||
long ms = milliseconds_ % Sec.milliseconds_;
|
||||
return static_cast<Float32>(sec) + static_cast<Float32>(ms) / 1000.f;
|
||||
return static_cast<float>(sec) + static_cast<float>(ms) / 1000.f;
|
||||
}
|
||||
|
||||
Float32 Duration::Minutes() const
|
||||
float Duration::Minutes() const
|
||||
{
|
||||
long min = milliseconds_ / Min.milliseconds_;
|
||||
long ms = milliseconds_ % Min.milliseconds_;
|
||||
return static_cast<Float32>(min) + static_cast<Float32>(ms) / (60 * 1000.f);
|
||||
return static_cast<float>(min) + static_cast<float>(ms) / (60 * 1000.f);
|
||||
}
|
||||
|
||||
Float32 Duration::Hours() const
|
||||
float Duration::Hours() const
|
||||
{
|
||||
long hour = milliseconds_ / Hour.milliseconds_;
|
||||
long ms = milliseconds_ % Hour.milliseconds_;
|
||||
return static_cast<Float32>(hour) + static_cast<Float32>(ms) / (60 * 60 * 1000.f);
|
||||
return static_cast<float>(hour) + static_cast<float>(ms) / (60 * 60 * 1000.f);
|
||||
}
|
||||
|
||||
String kiwano::time::Duration::ToString() const
|
||||
|
|
@ -172,7 +172,7 @@ namespace kiwano
|
|||
|
||||
if (ms != 0)
|
||||
{
|
||||
result.append(String::parse(static_cast<Float32>(sec) + static_cast<Float32>(ms) / 1000.f))
|
||||
result.append(String::parse(static_cast<float>(sec) + static_cast<float>(ms) / 1000.f))
|
||||
.append(L"s");
|
||||
}
|
||||
else if (sec != 0)
|
||||
|
|
@ -212,9 +212,9 @@ namespace kiwano
|
|||
return milliseconds_ <= other.milliseconds_;
|
||||
}
|
||||
|
||||
Float32 kiwano::time::Duration::operator/(const Duration & other) const
|
||||
float kiwano::time::Duration::operator/(const Duration & other) const
|
||||
{
|
||||
return static_cast<Float32>(milliseconds_) / other.milliseconds_;
|
||||
return static_cast<float>(milliseconds_) / other.milliseconds_;
|
||||
}
|
||||
|
||||
const Duration Duration::operator+(const Duration & other) const
|
||||
|
|
@ -232,7 +232,7 @@ namespace kiwano
|
|||
return Duration(-milliseconds_);
|
||||
}
|
||||
|
||||
const Duration Duration::operator*(Int32 val) const
|
||||
const Duration Duration::operator*(int val) const
|
||||
{
|
||||
return Duration(milliseconds_ * val);
|
||||
}
|
||||
|
|
@ -242,12 +242,12 @@ namespace kiwano
|
|||
return Duration(static_cast<long>(milliseconds_ * val));
|
||||
}
|
||||
|
||||
const Duration Duration::operator*(Float32 val) const
|
||||
const Duration Duration::operator*(float val) const
|
||||
{
|
||||
return Duration(static_cast<long>(milliseconds_ * val));
|
||||
}
|
||||
|
||||
const Duration Duration::operator*(Float64 val) const
|
||||
const Duration Duration::operator*(double val) const
|
||||
{
|
||||
return Duration(static_cast<long>(milliseconds_ * val));
|
||||
}
|
||||
|
|
@ -257,17 +257,17 @@ namespace kiwano
|
|||
return Duration(static_cast<long>(milliseconds_ * val));
|
||||
}
|
||||
|
||||
const Duration Duration::operator/(Int32 val) const
|
||||
const Duration Duration::operator/(int val) const
|
||||
{
|
||||
return Duration(milliseconds_ / val);
|
||||
}
|
||||
|
||||
const Duration Duration::operator/(Float32 val) const
|
||||
const Duration Duration::operator/(float val) const
|
||||
{
|
||||
return Duration(static_cast<long>(milliseconds_ / val));
|
||||
}
|
||||
|
||||
const Duration Duration::operator/(Float64 val) const
|
||||
const Duration Duration::operator/(double val) const
|
||||
{
|
||||
return Duration(static_cast<long>(milliseconds_ / val));
|
||||
}
|
||||
|
|
@ -284,68 +284,68 @@ namespace kiwano
|
|||
return (*this);
|
||||
}
|
||||
|
||||
Duration & Duration::operator*=(Int32 val)
|
||||
Duration & Duration::operator*=(int val)
|
||||
{
|
||||
milliseconds_ *= val;
|
||||
return (*this);
|
||||
}
|
||||
|
||||
Duration & Duration::operator/=(Int32 val)
|
||||
Duration & Duration::operator/=(int val)
|
||||
{
|
||||
milliseconds_ = static_cast<long>(milliseconds_ / val);
|
||||
return (*this);
|
||||
}
|
||||
|
||||
Duration & Duration::operator*=(Float32 val)
|
||||
Duration & Duration::operator*=(float val)
|
||||
{
|
||||
milliseconds_ = static_cast<long>(milliseconds_ * val);
|
||||
return (*this);
|
||||
}
|
||||
|
||||
Duration & Duration::operator/=(Float32 val)
|
||||
Duration & Duration::operator/=(float val)
|
||||
{
|
||||
milliseconds_ = static_cast<long>(milliseconds_ / val);
|
||||
return (*this);
|
||||
}
|
||||
|
||||
Duration & Duration::operator*=(Float64 val)
|
||||
Duration & Duration::operator*=(double val)
|
||||
{
|
||||
milliseconds_ = static_cast<long>(milliseconds_ * val);
|
||||
return (*this);
|
||||
}
|
||||
|
||||
Duration & Duration::operator/=(Float64 val)
|
||||
Duration & Duration::operator/=(double val)
|
||||
{
|
||||
milliseconds_ = static_cast<long>(milliseconds_ / val);
|
||||
return (*this);
|
||||
}
|
||||
|
||||
const Duration kiwano::time::operator*(Int32 val, const Duration & dur)
|
||||
const Duration kiwano::time::operator*(int val, const Duration & dur)
|
||||
{
|
||||
return dur * val;
|
||||
}
|
||||
|
||||
const Duration kiwano::time::operator/(Int32 val, const Duration & dur)
|
||||
const Duration kiwano::time::operator/(int val, const Duration & dur)
|
||||
{
|
||||
return dur / val;
|
||||
}
|
||||
|
||||
const Duration kiwano::time::operator*(Float32 val, const Duration & dur)
|
||||
const Duration kiwano::time::operator*(float val, const Duration & dur)
|
||||
{
|
||||
return dur * val;
|
||||
}
|
||||
|
||||
const Duration kiwano::time::operator/(Float32 val, const Duration & dur)
|
||||
const Duration kiwano::time::operator/(float val, const Duration & dur)
|
||||
{
|
||||
return dur / val;
|
||||
}
|
||||
|
||||
const Duration kiwano::time::operator*(Float64 val, const Duration & dur)
|
||||
const Duration kiwano::time::operator*(double val, const Duration & dur)
|
||||
{
|
||||
return dur * val;
|
||||
}
|
||||
|
||||
const Duration kiwano::time::operator/(Float64 val, const Duration & dur)
|
||||
const Duration kiwano::time::operator/(double val, const Duration & dur)
|
||||
{
|
||||
return dur / val;
|
||||
}
|
||||
|
|
@ -357,18 +357,18 @@ namespace kiwano
|
|||
|
||||
Duration Duration::Parse(const String& str)
|
||||
{
|
||||
UInt32 len = str.length();
|
||||
UInt32 pos = 0;
|
||||
bool negative = false;
|
||||
Duration d;
|
||||
bool negative = false;
|
||||
std::size_t len = str.length();
|
||||
std::size_t pos = 0;
|
||||
Duration ret;
|
||||
|
||||
if (!std::regex_match(str.c_str(), duration_regex))
|
||||
{
|
||||
KGE_ERROR_LOG(L"Duration::Parse failed, invalid duration");
|
||||
return Duration();
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (str.empty() || str == L"0") { return d; }
|
||||
if (str.empty() || str == L"0") { return ret; }
|
||||
|
||||
// ·ûºÅλ
|
||||
if (str[0] == L'-' || str[0] == L'+')
|
||||
|
|
@ -380,10 +380,10 @@ namespace kiwano
|
|||
while (pos < len)
|
||||
{
|
||||
// ÊýÖµ
|
||||
UInt32 i = pos;
|
||||
std::size_t i = pos;
|
||||
for (; i < len; ++i)
|
||||
{
|
||||
WChar ch = str[i];
|
||||
wchar_t ch = str[i];
|
||||
if (!(ch == L'.' || L'0' <= ch && ch <= L'9'))
|
||||
{
|
||||
break;
|
||||
|
|
@ -398,7 +398,7 @@ namespace kiwano
|
|||
// µ¥Î»
|
||||
for (; i < len; ++i)
|
||||
{
|
||||
WChar ch = str[i];
|
||||
wchar_t ch = str[i];
|
||||
if (ch == L'.' || L'0' <= ch && ch <= L'9')
|
||||
{
|
||||
break;
|
||||
|
|
@ -410,16 +410,16 @@ namespace kiwano
|
|||
|
||||
KGE_ASSERT(unit_map.find(unit_str) != unit_map.end() && "Duration::Parse failed, invalid duration");
|
||||
|
||||
Float64 num = std::wcstod(num_str.c_str(), nullptr);
|
||||
double num = std::wcstod(num_str.c_str(), nullptr);
|
||||
Duration unit = unit_map.at(unit_str);
|
||||
d += unit * num;
|
||||
ret += unit * num;
|
||||
}
|
||||
|
||||
if (negative)
|
||||
{
|
||||
d = -d;
|
||||
ret = -ret;
|
||||
}
|
||||
return d;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,24 +51,24 @@ namespace kiwano
|
|||
inline long Milliseconds() const { return milliseconds_; }
|
||||
|
||||
// 转化为秒
|
||||
Float32 Seconds() const;
|
||||
float Seconds() const;
|
||||
|
||||
// 转化为分钟
|
||||
Float32 Minutes() const;
|
||||
float Minutes() const;
|
||||
|
||||
// 转化为小时
|
||||
Float32 Hours() const;
|
||||
float Hours() const;
|
||||
|
||||
// 时长是否是零
|
||||
inline bool IsZero() const { return milliseconds_ == 0LL; }
|
||||
|
||||
inline void SetMilliseconds(long ms) { milliseconds_ = ms; }
|
||||
|
||||
inline void SetSeconds(Float32 seconds) { milliseconds_ = static_cast<long>(seconds * 1000.f); }
|
||||
inline void SetSeconds(float seconds) { milliseconds_ = static_cast<long>(seconds * 1000.f); }
|
||||
|
||||
inline void SetMinutes(Float32 minutes) { milliseconds_ = static_cast<long>(minutes * 60 * 1000.f); }
|
||||
inline void SetMinutes(float minutes) { milliseconds_ = static_cast<long>(minutes * 60 * 1000.f); }
|
||||
|
||||
inline void SetHours(Float32 hours) { milliseconds_ = static_cast<long>(hours * 60 * 60 * 1000.f); }
|
||||
inline void SetHours(float hours) { milliseconds_ = static_cast<long>(hours * 60 * 60 * 1000.f); }
|
||||
|
||||
// 转为字符串
|
||||
String ToString() const;
|
||||
|
|
@ -82,36 +82,36 @@ namespace kiwano
|
|||
bool operator< (const Duration &) const;
|
||||
bool operator<= (const Duration &) const;
|
||||
|
||||
Float32 operator / (const Duration &) const;
|
||||
float operator / (const Duration &) const;
|
||||
|
||||
const Duration operator + (const Duration &) const;
|
||||
const Duration operator - (const Duration &) const;
|
||||
const Duration operator - () const;
|
||||
const Duration operator * (Int32) const;
|
||||
const Duration operator * (int) const;
|
||||
const Duration operator * (unsigned long long) const;
|
||||
const Duration operator * (Float32) const;
|
||||
const Duration operator * (Float64) const;
|
||||
const Duration operator * (float) const;
|
||||
const Duration operator * (double) const;
|
||||
const Duration operator * (long double) const;
|
||||
const Duration operator / (Int32) const;
|
||||
const Duration operator / (Float32) const;
|
||||
const Duration operator / (Float64) const;
|
||||
const Duration operator / (int) const;
|
||||
const Duration operator / (float) const;
|
||||
const Duration operator / (double) const;
|
||||
|
||||
Duration& operator += (const Duration &);
|
||||
Duration& operator -= (const Duration &);
|
||||
Duration& operator *= (Int32);
|
||||
Duration& operator *= (Float32);
|
||||
Duration& operator *= (Float64);
|
||||
Duration& operator /= (Int32);
|
||||
Duration& operator /= (Float32);
|
||||
Duration& operator /= (Float64);
|
||||
Duration& operator *= (int);
|
||||
Duration& operator *= (float);
|
||||
Duration& operator *= (double);
|
||||
Duration& operator /= (int);
|
||||
Duration& operator /= (float);
|
||||
Duration& operator /= (double);
|
||||
|
||||
friend const Duration operator* (Int32, const Duration &);
|
||||
friend const Duration operator* (Float32, const Duration &);
|
||||
friend const Duration operator* (Float64, const Duration &);
|
||||
friend const Duration operator* (int, const Duration &);
|
||||
friend const Duration operator* (float, const Duration &);
|
||||
friend const Duration operator* (double, const Duration &);
|
||||
friend const Duration operator* (long double, const Duration &);
|
||||
friend const Duration operator/ (Int32, const Duration &);
|
||||
friend const Duration operator/ (Float32, const Duration &);
|
||||
friend const Duration operator/ (Float64, const Duration &);
|
||||
friend const Duration operator/ (int, const Duration &);
|
||||
friend const Duration operator/ (float, const Duration &);
|
||||
friend const Duration operator/ (double, const Duration &);
|
||||
|
||||
public:
|
||||
// 时间段格式化
|
||||
|
|
@ -154,7 +154,7 @@ namespace kiwano
|
|||
// 获取当前时间: Time now = Time::Now();
|
||||
// 两时间相减, 得到一个 Duration 对象, 例如:
|
||||
// Time t1, t2;
|
||||
// Int32 ms = (t2 - t1).Milliseconds(); // 获取两时间相差的毫秒数
|
||||
// int ms = (t2 - t1).Milliseconds(); // 获取两时间相差的毫秒数
|
||||
//
|
||||
struct KGE_API Time
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace kiwano
|
|||
// ComPtr<> is a smart pointer for COM
|
||||
template<
|
||||
typename _Ty,
|
||||
typename = typename std::enable_if<std::is_base_of<IUnknown, _Ty>::value, Int32>::type>
|
||||
typename = typename std::enable_if<std::is_base_of<IUnknown, _Ty>::value, int>::type>
|
||||
using ComPtr = intrusive_ptr<_Ty, ComPtrManager>;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
// THE SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
#include "types.h"
|
||||
#include <cctype>
|
||||
#include <memory>
|
||||
#include <array>
|
||||
|
|
@ -75,13 +74,13 @@ enum class JsonType
|
|||
|
||||
template <typename>
|
||||
struct is_basic_json
|
||||
: ::std::false_type
|
||||
: std::false_type
|
||||
{
|
||||
};
|
||||
|
||||
KGE_DECLARE_BASIC_JSON_TEMPLATE
|
||||
struct is_basic_json< basic_json<KGE_DECLARE_BASIC_JSON_TPL_ARGS> >
|
||||
: ::std::true_type
|
||||
: std::true_type
|
||||
{
|
||||
};
|
||||
|
||||
|
|
@ -90,11 +89,11 @@ struct is_basic_json< basic_json<KGE_DECLARE_BASIC_JSON_TPL_ARGS> >
|
|||
//
|
||||
|
||||
class json_exception
|
||||
: public ::std::runtime_error
|
||||
: public std::runtime_error
|
||||
{
|
||||
public:
|
||||
json_exception(const char* message)
|
||||
: ::std::runtime_error(message)
|
||||
: std::runtime_error(message)
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
@ -161,7 +160,7 @@ namespace __json_detail
|
|||
data.object = nullptr;
|
||||
}
|
||||
|
||||
json_value(::std::nullptr_t)
|
||||
json_value(std::nullptr_t)
|
||||
{
|
||||
type = JsonType::Null;
|
||||
data.object = nullptr;
|
||||
|
|
@ -284,8 +283,8 @@ namespace __json_detail
|
|||
|
||||
void swap(json_value& other)
|
||||
{
|
||||
::std::swap(type, other.type);
|
||||
::std::swap(data, other.data);
|
||||
std::swap(type, other.type);
|
||||
std::swap(data, other.data);
|
||||
}
|
||||
|
||||
void clear()
|
||||
|
|
@ -310,11 +309,11 @@ namespace __json_detail
|
|||
inline _Ty* create(_Args&&... args)
|
||||
{
|
||||
using allocator_type = typename _BasicJsonTy::template allocator_type<_Ty>;
|
||||
using allocator_traits = ::std::allocator_traits<allocator_type>;
|
||||
using allocator_traits = std::allocator_traits<allocator_type>;
|
||||
|
||||
allocator_type allocator;
|
||||
_Ty* ptr = allocator_traits::allocate(allocator, 1);
|
||||
allocator_traits::construct(allocator, ptr, ::std::forward<_Args>(args)...);
|
||||
allocator_traits::construct(allocator, ptr, std::forward<_Args>(args)...);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
|
@ -322,7 +321,7 @@ namespace __json_detail
|
|||
inline void destroy(_Ty* ptr)
|
||||
{
|
||||
using allocator_type = typename _BasicJsonTy::template allocator_type<_Ty>;
|
||||
using allocator_traits = ::std::allocator_traits<allocator_type>;
|
||||
using allocator_traits = std::allocator_traits<allocator_type>;
|
||||
|
||||
allocator_type allocator;
|
||||
allocator_traits::destroy(allocator, ptr);
|
||||
|
|
@ -339,7 +338,7 @@ namespace __json_detail
|
|||
{
|
||||
clear();
|
||||
type = other.type;
|
||||
data = ::std::move(other.data);
|
||||
data = std::move(other.data);
|
||||
// invalidate payload
|
||||
other.type = JsonType::Null;
|
||||
other.data.object = nullptr;
|
||||
|
|
@ -356,7 +355,7 @@ namespace __json_detail
|
|||
|
||||
struct primitive_iterator
|
||||
{
|
||||
using difference_type = ::std::ptrdiff_t;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
|
||||
inline primitive_iterator(difference_type it = 0) : it_(it) {}
|
||||
|
||||
|
|
@ -365,10 +364,10 @@ namespace __json_detail
|
|||
|
||||
inline primitive_iterator& operator++() { ++it_; return *this; }
|
||||
|
||||
inline primitive_iterator operator++(Int32) { primitive_iterator old(it_); ++(*this); return old; }
|
||||
inline primitive_iterator operator++(int) { primitive_iterator old(it_); ++(*this); return old; }
|
||||
|
||||
inline primitive_iterator& operator--() { --it_; return (*this); }
|
||||
inline primitive_iterator operator--(Int32) { primitive_iterator old = (*this); --(*this); return old; }
|
||||
inline primitive_iterator operator--(int) { primitive_iterator old = (*this); --(*this); return old; }
|
||||
|
||||
inline bool operator==(primitive_iterator const& other) const { return it_ == other.it_; }
|
||||
inline bool operator!=(primitive_iterator const& other) const { return !(*this == other); }
|
||||
|
|
@ -404,8 +403,8 @@ namespace __json_detail
|
|||
using object_type = typename _BasicJsonTy::object_type;
|
||||
|
||||
using value_type = _BasicJsonTy;
|
||||
using difference_type = ::std::ptrdiff_t;
|
||||
using iterator_category = ::std::bidirectional_iterator_tag;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using iterator_category = std::bidirectional_iterator_tag;
|
||||
using pointer = value_type*;
|
||||
using reference = value_type&;
|
||||
|
||||
|
|
@ -534,7 +533,7 @@ namespace __json_detail
|
|||
}
|
||||
}
|
||||
|
||||
inline iterator_impl operator++(Int32) { iterator_impl old = (*this); ++(*this); return old; }
|
||||
inline iterator_impl operator++(int) { iterator_impl old = (*this); ++(*this); return old; }
|
||||
inline iterator_impl& operator++()
|
||||
{
|
||||
check_data();
|
||||
|
|
@ -543,12 +542,12 @@ namespace __json_detail
|
|||
{
|
||||
case JsonType::Object:
|
||||
{
|
||||
::std::advance(object_iter, 1);
|
||||
std::advance(object_iter, 1);
|
||||
break;
|
||||
}
|
||||
case JsonType::Vector:
|
||||
{
|
||||
::std::advance(array_iter, 1);
|
||||
std::advance(array_iter, 1);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
@ -560,7 +559,7 @@ namespace __json_detail
|
|||
return *this;
|
||||
}
|
||||
|
||||
inline iterator_impl operator--(Int32) { iterator_impl old = (*this); --(*this); return old; }
|
||||
inline iterator_impl operator--(int) { iterator_impl old = (*this); --(*this); return old; }
|
||||
inline iterator_impl& operator--()
|
||||
{
|
||||
check_data();
|
||||
|
|
@ -569,12 +568,12 @@ namespace __json_detail
|
|||
{
|
||||
case JsonType::Object:
|
||||
{
|
||||
::std::advance(object_iter, -1);
|
||||
std::advance(object_iter, -1);
|
||||
break;
|
||||
}
|
||||
case JsonType::Vector:
|
||||
{
|
||||
::std::advance(array_iter, -1);
|
||||
std::advance(array_iter, -1);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
@ -602,7 +601,7 @@ namespace __json_detail
|
|||
}
|
||||
case JsonType::Vector:
|
||||
{
|
||||
::std::advance(array_iter, off);
|
||||
std::advance(array_iter, off);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
@ -678,19 +677,19 @@ namespace __json_detail
|
|||
case JsonType::Object:
|
||||
if (object_iter == data_->value_.data.object->end())
|
||||
{
|
||||
throw ::std::out_of_range("iterator out of range");
|
||||
throw std::out_of_range("iterator out of range");
|
||||
}
|
||||
break;
|
||||
case JsonType::Vector:
|
||||
if (array_iter == data_->value_.data.vector->end())
|
||||
{
|
||||
throw ::std::out_of_range("iterator out of range");
|
||||
throw std::out_of_range("iterator out of range");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (primitive_iter == 1)
|
||||
{
|
||||
throw ::std::out_of_range("iterator out of range");
|
||||
throw std::out_of_range("iterator out of range");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -729,14 +728,14 @@ namespace __json_detail
|
|||
struct output_adapter
|
||||
{
|
||||
using char_type = _CharTy;
|
||||
using char_traits = ::std::char_traits<char_type>;
|
||||
using char_traits = std::char_traits<char_type>;
|
||||
|
||||
virtual void write(const _CharTy ch) = 0;
|
||||
virtual void write(const _CharTy* str, UInt32 size) = 0;
|
||||
virtual void write(const _CharTy* str, std::uint32_t size) = 0;
|
||||
virtual void write(const _CharTy* str)
|
||||
{
|
||||
const auto size = char_traits::length(str);
|
||||
write(str, static_cast<UInt32>(size));
|
||||
write(str, static_cast<std::uint32_t>(size));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -746,7 +745,7 @@ namespace __json_detail
|
|||
{
|
||||
using char_type = typename _StringTy::value_type;
|
||||
using size_type = typename _StringTy::size_type;
|
||||
using char_traits = ::std::char_traits<char_type>;
|
||||
using char_traits = std::char_traits<char_type>;
|
||||
|
||||
string_output_adapter(_StringTy& str) : str_(str) {}
|
||||
|
||||
|
|
@ -755,7 +754,7 @@ namespace __json_detail
|
|||
str_.push_back(ch);
|
||||
}
|
||||
|
||||
virtual void write(const char_type* str, UInt32 size) override
|
||||
virtual void write(const char_type* str, std::uint32_t size) override
|
||||
{
|
||||
str_.append(str, static_cast<size_type>(size));
|
||||
}
|
||||
|
|
@ -769,23 +768,23 @@ namespace __json_detail
|
|||
: public output_adapter<_CharTy>
|
||||
{
|
||||
using char_type = _CharTy;
|
||||
using size_type = typename ::std::streamsize;
|
||||
using char_traits = ::std::char_traits<char_type>;
|
||||
using size_type = typename std::streamsize;
|
||||
using char_traits = std::char_traits<char_type>;
|
||||
|
||||
stream_output_adapter(::std::basic_ostream<char_type>& stream) : stream_(stream) {}
|
||||
stream_output_adapter(std::basic_ostream<char_type>& stream) : stream_(stream) {}
|
||||
|
||||
virtual void write(const char_type ch) override
|
||||
{
|
||||
stream_.put(ch);
|
||||
}
|
||||
|
||||
virtual void write(const char_type* str, UInt32 size) override
|
||||
virtual void write(const char_type* str, std::uint32_t size) override
|
||||
{
|
||||
stream_.write(str, static_cast<size_type>(size));
|
||||
}
|
||||
|
||||
private:
|
||||
::std::basic_ostream<char_type>& stream_;
|
||||
std::basic_ostream<char_type>& stream_;
|
||||
};
|
||||
} // end of namespace __json_detail
|
||||
|
||||
|
|
@ -806,7 +805,7 @@ namespace __json_detail
|
|||
using array_type = typename _BasicJsonTy::array_type;
|
||||
using object_type = typename _BasicJsonTy::object_type;
|
||||
|
||||
json_serializer(output_adapter<char_type>* out, const WChar indent_char)
|
||||
json_serializer(output_adapter<char_type>* out, const char_type indent_char)
|
||||
: out(out)
|
||||
, indent_char(indent_char)
|
||||
, indent_string(32, indent_char)
|
||||
|
|
@ -816,8 +815,8 @@ namespace __json_detail
|
|||
void dump(
|
||||
const _BasicJsonTy& json,
|
||||
const bool pretty_print,
|
||||
const UInt32 indent_step,
|
||||
const UInt32 current_indent = 0)
|
||||
const std::uint32_t indent_step,
|
||||
const std::uint32_t current_indent = 0)
|
||||
{
|
||||
switch (json.type())
|
||||
{
|
||||
|
|
@ -843,7 +842,7 @@ namespace __json_detail
|
|||
|
||||
auto iter = object.cbegin();
|
||||
const auto size = object.size();
|
||||
for (UInt32 i = 0; i < size; ++i, ++iter)
|
||||
for (std::uint32_t i = 0; i < size; ++i, ++iter)
|
||||
{
|
||||
out->write(indent_string.c_str(), new_indent);
|
||||
out->write('\"');
|
||||
|
|
@ -866,7 +865,7 @@ namespace __json_detail
|
|||
|
||||
auto iter = object.cbegin();
|
||||
const auto size = object.size();
|
||||
for (UInt32 i = 0; i < size; ++i, ++iter)
|
||||
for (std::uint32_t i = 0; i < size; ++i, ++iter)
|
||||
{
|
||||
out->write('\"');
|
||||
out->write(iter->first.c_str());
|
||||
|
|
@ -906,7 +905,7 @@ namespace __json_detail
|
|||
|
||||
auto iter = vector.cbegin();
|
||||
const auto size = vector.size();
|
||||
for (UInt32 i = 0; i < size; ++i, ++iter)
|
||||
for (std::uint32_t i = 0; i < size; ++i, ++iter)
|
||||
{
|
||||
out->write(indent_string.c_str(), new_indent);
|
||||
dump(*iter, true, indent_step, new_indent);
|
||||
|
|
@ -926,7 +925,7 @@ namespace __json_detail
|
|||
|
||||
auto iter = vector.cbegin();
|
||||
const auto size = vector.size();
|
||||
for (UInt32 i = 0; i < size; ++i, ++iter)
|
||||
for (std::uint32_t i = 0; i < size; ++i, ++iter)
|
||||
{
|
||||
dump(*iter, false, indent_step, current_indent);
|
||||
// not last element
|
||||
|
|
@ -989,7 +988,7 @@ namespace __json_detail
|
|||
return;
|
||||
}
|
||||
|
||||
auto uval = static_cast<::std::make_unsigned_t<integer_type>>(val);
|
||||
auto uval = static_cast<std::make_unsigned_t<integer_type>>(val);
|
||||
|
||||
if (val < 0)
|
||||
uval = 0 - uval;
|
||||
|
|
@ -999,7 +998,7 @@ namespace __json_detail
|
|||
|
||||
do
|
||||
{
|
||||
*(++next) = static_cast<WChar>('0' + uval % 10);
|
||||
*(++next) = static_cast<char_type>('0' + uval % 10);
|
||||
uval /= 10;
|
||||
} while (uval != 0);
|
||||
|
||||
|
|
@ -1011,12 +1010,12 @@ namespace __json_detail
|
|||
|
||||
void dump_float(float_type val)
|
||||
{
|
||||
const auto digits = ::std::numeric_limits<float_type>::max_digits10;
|
||||
const auto digits = std::numeric_limits<float_type>::max_digits10;
|
||||
const auto len = ::_scwprintf(L"%.*g", digits, val);
|
||||
if (len)
|
||||
{
|
||||
number_buffer[0] = '\0';
|
||||
::swprintf_s(&number_buffer[0], len + 1, L"%.*g", digits, val);
|
||||
::swprintf_s(&number_buffer[0], std::size_t(len) + 1, L"%.*g", digits, val);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1085,7 +1084,7 @@ namespace __json_detail
|
|||
}
|
||||
else
|
||||
{
|
||||
WChar escaped[7] = { 0 };
|
||||
char_type escaped[7] = { 0 };
|
||||
::swprintf_s(escaped, 7, L"\\u%04x", char_byte);
|
||||
out->write(escaped);
|
||||
}
|
||||
|
|
@ -1099,7 +1098,7 @@ namespace __json_detail
|
|||
output_adapter<char_type>* out;
|
||||
char_type indent_char;
|
||||
string_type indent_string;
|
||||
::std::array<char_type, 21> number_buffer;
|
||||
std::array<char_type, 21> number_buffer;
|
||||
};
|
||||
} // end of namespace __json_detail
|
||||
|
||||
|
|
@ -1113,7 +1112,7 @@ namespace __json_detail
|
|||
struct input_adapter
|
||||
{
|
||||
using char_type = _CharTy;
|
||||
using char_traits = ::std::char_traits<char_type>;
|
||||
using char_traits = std::char_traits<char_type>;
|
||||
|
||||
virtual typename char_traits::int_type get_char() = 0;
|
||||
virtual ~input_adapter() = default;
|
||||
|
|
@ -1126,15 +1125,15 @@ namespace __json_detail
|
|||
using char_type = typename input_adapter<_CharTy>::char_type;
|
||||
using char_traits = typename input_adapter<_CharTy>::char_traits;
|
||||
|
||||
file_input_adapter(::std::FILE* file) : file(file) {}
|
||||
file_input_adapter(std::FILE* file) : file(file) {}
|
||||
|
||||
virtual typename char_traits::int_type get_char() override
|
||||
{
|
||||
return ::std::fgetc(file);
|
||||
return std::fgetc(file);
|
||||
}
|
||||
|
||||
private:
|
||||
::std::FILE* file;
|
||||
std::FILE* file;
|
||||
};
|
||||
|
||||
template <typename _CharTy>
|
||||
|
|
@ -1144,26 +1143,26 @@ namespace __json_detail
|
|||
using char_type = typename input_adapter<_CharTy>::char_type;
|
||||
using char_traits = typename input_adapter<_CharTy>::char_traits;
|
||||
|
||||
stream_input_adapter(::std::basic_istream<char_type>& stream) : stream(stream), streambuf(*stream.rdbuf()) {}
|
||||
stream_input_adapter(std::basic_istream<char_type>& stream) : stream(stream), streambuf(*stream.rdbuf()) {}
|
||||
|
||||
virtual typename char_traits::int_type get_char() override
|
||||
{
|
||||
auto ch = streambuf.sbumpc();
|
||||
if (ch == EOF)
|
||||
{
|
||||
stream.clear(stream.rdstate() | ::std::ios::eofbit);
|
||||
stream.clear(stream.rdstate() | std::ios::eofbit);
|
||||
}
|
||||
return ch;
|
||||
}
|
||||
|
||||
virtual ~stream_input_adapter()
|
||||
{
|
||||
stream.clear(stream.rdstate() & ::std::ios::eofbit);
|
||||
stream.clear(stream.rdstate() & std::ios::eofbit);
|
||||
}
|
||||
|
||||
private:
|
||||
::std::basic_istream<char_type>& stream;
|
||||
::std::basic_streambuf<char_type>& streambuf;
|
||||
std::basic_istream<char_type>& stream;
|
||||
std::basic_streambuf<char_type>& streambuf;
|
||||
};
|
||||
|
||||
template <typename _StringTy>
|
||||
|
|
@ -1205,7 +1204,7 @@ namespace __json_detail
|
|||
|
||||
private:
|
||||
const char_type* str;
|
||||
UInt32 index;
|
||||
std::uint32_t index;
|
||||
};
|
||||
} // end of namespace __json_detail
|
||||
|
||||
|
|
@ -1251,7 +1250,7 @@ namespace __json_detail
|
|||
using boolean_type = typename _BasicJsonTy::boolean_type;
|
||||
using array_type = typename _BasicJsonTy::array_type;
|
||||
using object_type = typename _BasicJsonTy::object_type;
|
||||
using char_traits = ::std::char_traits<char_type>;
|
||||
using char_traits = std::char_traits<char_type>;
|
||||
|
||||
json_lexer(input_adapter<char_type>* adapter) : adapter(adapter)
|
||||
{
|
||||
|
|
@ -1339,7 +1338,7 @@ namespace __json_detail
|
|||
|
||||
token_type scan_literal(const char_type* text, token_type result)
|
||||
{
|
||||
for (UInt32 i = 0; text[i] != '\0'; ++i)
|
||||
for (std::uint32_t i = 0; text[i] != '\0'; ++i)
|
||||
{
|
||||
if (text[i] != char_traits::to_char_type(current))
|
||||
{
|
||||
|
|
@ -1541,7 +1540,7 @@ namespace __json_detail
|
|||
|
||||
token_type scan_integer()
|
||||
{
|
||||
if (::std::isdigit(current))
|
||||
if (std::isdigit(current))
|
||||
{
|
||||
number_value = static_cast<float_type>(current - '0');
|
||||
|
||||
|
|
@ -1554,7 +1553,7 @@ namespace __json_detail
|
|||
if (ch == 'e' || ch == 'E')
|
||||
return scan_exponent();
|
||||
|
||||
if (::std::isdigit(ch))
|
||||
if (std::isdigit(ch))
|
||||
number_value = number_value * 10 + (ch - '0');
|
||||
else
|
||||
break;
|
||||
|
|
@ -1569,7 +1568,7 @@ namespace __json_detail
|
|||
if (current != '.')
|
||||
return token_type::parse_error;
|
||||
|
||||
if (::std::isdigit(read_next()))
|
||||
if (std::isdigit(read_next()))
|
||||
{
|
||||
float_type fraction = static_cast<float_type>(0.1);
|
||||
number_value += static_cast<float_type>(current - '0') * fraction;
|
||||
|
|
@ -1580,7 +1579,7 @@ namespace __json_detail
|
|||
if (ch == 'e' || ch == 'E')
|
||||
return scan_exponent();
|
||||
|
||||
if (::std::isdigit(ch))
|
||||
if (std::isdigit(ch))
|
||||
{
|
||||
fraction *= static_cast<float_type>(0.1);
|
||||
number_value += static_cast<float_type>(ch - '0') * fraction;
|
||||
|
|
@ -1601,7 +1600,7 @@ namespace __json_detail
|
|||
// skip current char
|
||||
read_next();
|
||||
|
||||
if ((::std::isdigit(current) && current != '0') || (current == '-') || (current == '+'))
|
||||
if ((std::isdigit(current) && current != '0') || (current == '-') || (current == '+'))
|
||||
{
|
||||
float_type base = 10;
|
||||
if (current == '+')
|
||||
|
|
@ -1614,10 +1613,10 @@ namespace __json_detail
|
|||
read_next();
|
||||
}
|
||||
|
||||
UInt32 exponent = static_cast<UInt32>(current - '0');
|
||||
while (::std::isdigit(read_next()))
|
||||
std::uint32_t exponent = static_cast<std::uint32_t>(current - '0');
|
||||
while (std::isdigit(read_next()))
|
||||
{
|
||||
exponent = (exponent * 10) + static_cast<UInt32>(current - '0');
|
||||
exponent = (exponent * 10) + static_cast<std::uint32_t>(current - '0');
|
||||
}
|
||||
|
||||
float_type power = 1;
|
||||
|
|
@ -1667,7 +1666,7 @@ namespace __json_detail
|
|||
using boolean_type = typename _BasicJsonTy::boolean_type;
|
||||
using array_type = typename _BasicJsonTy::array_type;
|
||||
using object_type = typename _BasicJsonTy::object_type;
|
||||
using char_traits = ::std::char_traits<char_type>;
|
||||
using char_traits = std::char_traits<char_type>;
|
||||
|
||||
json_parser(input_adapter<char_type>* adapter)
|
||||
: lexer(adapter)
|
||||
|
|
@ -1747,7 +1746,7 @@ namespace __json_detail
|
|||
|
||||
_BasicJsonTy object;
|
||||
parse_value(object);
|
||||
json.value_.data.object->insert(::std::make_pair(key, object));
|
||||
json.value_.data.object->insert(std::make_pair(key, object));
|
||||
|
||||
// read ','
|
||||
if (get_token() != token_type::value_separator)
|
||||
|
|
@ -1819,7 +1818,7 @@ namespace __json_detail
|
|||
|
||||
template <
|
||||
typename _IntegerTy,
|
||||
typename ::std::enable_if<::std::is_integral<_IntegerTy>::value, Int32>::type = 0>
|
||||
typename std::enable_if<std::is_integral<_IntegerTy>::value, int>::type = 0>
|
||||
static inline void assign(const _BasicJsonTy& json, _IntegerTy& value)
|
||||
{
|
||||
if (!json.is_integer()) throw json_type_error("json value type must be integer");
|
||||
|
|
@ -1828,16 +1827,16 @@ namespace __json_detail
|
|||
|
||||
static inline void assign(const _BasicJsonTy& json, float_type& value)
|
||||
{
|
||||
if (!json.is_float()) throw json_type_error("json value type must be Float32");
|
||||
if (!json.is_float()) throw json_type_error("json value type must be float");
|
||||
value = json.value_.data.number_float;
|
||||
}
|
||||
|
||||
template <
|
||||
typename _FloatingTy,
|
||||
typename ::std::enable_if<::std::is_floating_point<_FloatingTy>::value, Int32>::type = 0>
|
||||
typename std::enable_if<std::is_floating_point<_FloatingTy>::value, int>::type = 0>
|
||||
static inline void assign(const _BasicJsonTy& json, _FloatingTy& value)
|
||||
{
|
||||
if (!json.is_float()) throw json_type_error("json value type must be Float32");
|
||||
if (!json.is_float()) throw json_type_error("json value type must be float");
|
||||
value = static_cast<_FloatingTy>(json.value_.data.number_float);
|
||||
}
|
||||
};
|
||||
|
|
@ -1859,32 +1858,32 @@ class basic_json
|
|||
public:
|
||||
template <typename _Ty>
|
||||
using allocator_type = _Allocator<_Ty>;
|
||||
using size_type = UInt32;
|
||||
using difference_type = ::std::ptrdiff_t;
|
||||
using size_type = std::size_t;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using string_type = _StringTy;
|
||||
using char_type = typename _StringTy::value_type;
|
||||
using integer_type = _IntegerTy;
|
||||
using float_type = _FloatTy;
|
||||
using boolean_type = _BooleanTy;
|
||||
using array_type = typename _ArrayTy<basic_json, allocator_type<basic_json>>;
|
||||
using object_type = typename _ObjectTy<string_type, basic_json, ::std::less<string_type>, allocator_type<::std::pair<const string_type, basic_json>>>;
|
||||
using initializer_list = ::std::initializer_list<basic_json>;
|
||||
using object_type = typename _ObjectTy<string_type, basic_json, std::less<string_type>, allocator_type<std::pair<const string_type, basic_json>>>;
|
||||
using initializer_list = std::initializer_list<basic_json>;
|
||||
|
||||
using iterator = __json_detail::iterator_impl<basic_json>;
|
||||
using const_iterator = __json_detail::iterator_impl<const basic_json>;
|
||||
using reverse_iterator = ::std::reverse_iterator<iterator>;
|
||||
using const_reverse_iterator = ::std::reverse_iterator<const_iterator>;
|
||||
using reverse_iterator = std::reverse_iterator<iterator>;
|
||||
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
|
||||
|
||||
public:
|
||||
basic_json() {}
|
||||
|
||||
basic_json(::std::nullptr_t) {}
|
||||
basic_json(std::nullptr_t) {}
|
||||
|
||||
basic_json(const JsonType type) : value_(type) {}
|
||||
|
||||
basic_json(basic_json const& other) : value_(other.value_) {}
|
||||
|
||||
basic_json(basic_json&& other) noexcept : value_(::std::move(other.value_))
|
||||
basic_json(basic_json&& other) noexcept : value_(std::move(other.value_))
|
||||
{
|
||||
// invalidate payload
|
||||
other.value_.type = JsonType::Null;
|
||||
|
|
@ -1895,7 +1894,7 @@ public:
|
|||
|
||||
template <
|
||||
typename _CompatibleTy,
|
||||
typename ::std::enable_if<::std::is_constructible<string_type, _CompatibleTy>::value, Int32>::type = 0>
|
||||
typename std::enable_if<std::is_constructible<string_type, _CompatibleTy>::value, int>::type = 0>
|
||||
basic_json(const _CompatibleTy& value)
|
||||
{
|
||||
value_.type = JsonType::String;
|
||||
|
|
@ -1919,7 +1918,7 @@ public:
|
|||
|
||||
template <
|
||||
typename _IntegerTy,
|
||||
typename ::std::enable_if<::std::is_integral<_IntegerTy>::value, Int32>::type = 0>
|
||||
typename std::enable_if<std::is_integral<_IntegerTy>::value, int>::type = 0>
|
||||
basic_json(_IntegerTy value)
|
||||
: value_(static_cast<integer_type>(value))
|
||||
{
|
||||
|
|
@ -1932,7 +1931,7 @@ public:
|
|||
|
||||
template <
|
||||
typename _FloatingTy,
|
||||
typename ::std::enable_if<::std::is_floating_point<_FloatingTy>::value, Int32>::type = 0>
|
||||
typename std::enable_if<std::is_floating_point<_FloatingTy>::value, int>::type = 0>
|
||||
basic_json(_FloatingTy value)
|
||||
: value_(static_cast<float_type>(value))
|
||||
{
|
||||
|
|
@ -1945,7 +1944,7 @@ public:
|
|||
|
||||
basic_json(initializer_list const& init_list)
|
||||
{
|
||||
bool is_an_object = ::std::all_of(init_list.begin(), init_list.end(), [](const basic_json& json)
|
||||
bool is_an_object = std::all_of(init_list.begin(), init_list.end(), [](const basic_json& json)
|
||||
{
|
||||
return (json.is_array() && json.size() == 2 && json[0].is_string());
|
||||
});
|
||||
|
|
@ -1954,7 +1953,7 @@ public:
|
|||
{
|
||||
value_ = JsonType::Object;
|
||||
|
||||
::std::for_each(init_list.begin(), init_list.end(), [this](const basic_json& json)
|
||||
std::for_each(init_list.begin(), init_list.end(), [this](const basic_json& json)
|
||||
{
|
||||
value_.data.object->emplace(
|
||||
*((*json.value_.data.vector)[0].value_.data.string),
|
||||
|
|
@ -2027,7 +2026,7 @@ public:
|
|||
case JsonType::Integer:
|
||||
return string_type(L"integer");
|
||||
case JsonType::Float:
|
||||
return string_type(L"Float32");
|
||||
return string_type(L"float");
|
||||
case JsonType::Boolean:
|
||||
return string_type(L"boolean");
|
||||
case JsonType::Null:
|
||||
|
|
@ -2089,7 +2088,7 @@ public:
|
|||
if (is_object())
|
||||
{
|
||||
const_iterator iter;
|
||||
iter.object_iter = value_.data.object->find(::std::forward<_Kty>(key));
|
||||
iter.object_iter = value_.data.object->find(std::forward<_Kty>(key));
|
||||
return iter;
|
||||
}
|
||||
return cend();
|
||||
|
|
@ -2098,7 +2097,7 @@ public:
|
|||
template <typename _Kty>
|
||||
inline size_type count(_Kty && key) const
|
||||
{
|
||||
return is_object() ? value_.data.object->count(::std::forward<_Kty>(key)) : 0;
|
||||
return is_object() ? value_.data.object->count(std::forward<_Kty>(key)) : 0;
|
||||
}
|
||||
|
||||
inline size_type erase(const typename object_type::key_type& key)
|
||||
|
|
@ -2121,9 +2120,9 @@ public:
|
|||
|
||||
template<
|
||||
class _IteratorTy,
|
||||
typename ::std::enable_if<
|
||||
::std::is_same<_IteratorTy, iterator>::value ||
|
||||
::std::is_same<_IteratorTy, const_iterator>::value, Int32
|
||||
typename std::enable_if<
|
||||
std::is_same<_IteratorTy, iterator>::value ||
|
||||
std::is_same<_IteratorTy, const_iterator>::value, int
|
||||
>::type = 0>
|
||||
inline _IteratorTy erase(_IteratorTy pos)
|
||||
{
|
||||
|
|
@ -2152,9 +2151,9 @@ public:
|
|||
|
||||
template<
|
||||
class _IteratorTy,
|
||||
typename ::std::enable_if<
|
||||
::std::is_same<_IteratorTy, iterator>::value ||
|
||||
::std::is_same<_IteratorTy, const_iterator>::value, Int32
|
||||
typename std::enable_if<
|
||||
std::is_same<_IteratorTy, iterator>::value ||
|
||||
std::is_same<_IteratorTy, const_iterator>::value, int
|
||||
>::type = 0>
|
||||
inline _IteratorTy erase(_IteratorTy first, _IteratorTy last)
|
||||
{
|
||||
|
|
@ -2193,12 +2192,12 @@ public:
|
|||
value_ = JsonType::Vector;
|
||||
}
|
||||
|
||||
value_.data.vector->push_back(::std::move(json));
|
||||
value_.data.vector->push_back(std::move(json));
|
||||
}
|
||||
|
||||
inline basic_json& operator+=(basic_json&& json)
|
||||
{
|
||||
push_back(::std::move(json));
|
||||
push_back(std::move(json));
|
||||
return (*this);
|
||||
}
|
||||
|
||||
|
|
@ -2282,7 +2281,7 @@ public:
|
|||
|
||||
template <
|
||||
typename _IntegerTy,
|
||||
typename ::std::enable_if<::std::is_integral<_IntegerTy>::value, Int32>::type = 0>
|
||||
typename std::enable_if<std::is_integral<_IntegerTy>::value, int>::type = 0>
|
||||
inline bool get_value(_IntegerTy& val) const
|
||||
{
|
||||
if (is_integer())
|
||||
|
|
@ -2295,7 +2294,7 @@ public:
|
|||
|
||||
template <
|
||||
typename _FloatingTy,
|
||||
typename ::std::enable_if<::std::is_floating_point<_FloatingTy>::value, Int32>::type = 0>
|
||||
typename std::enable_if<std::is_floating_point<_FloatingTy>::value, int>::type = 0>
|
||||
inline bool get_value(_FloatingTy& val) const
|
||||
{
|
||||
if (is_float())
|
||||
|
|
@ -2350,7 +2349,7 @@ public:
|
|||
|
||||
float_type as_float() const
|
||||
{
|
||||
if (!is_float()) throw json_type_error("json value must be Float32");
|
||||
if (!is_float()) throw json_type_error("json value must be float");
|
||||
return value_.data.number_float;
|
||||
}
|
||||
|
||||
|
|
@ -2391,11 +2390,11 @@ public:
|
|||
|
||||
inline basic_json& operator=(basic_json&& other) noexcept
|
||||
{
|
||||
value_ = ::std::move(other.value_);
|
||||
value_ = std::move(other.value_);
|
||||
return (*this);
|
||||
}
|
||||
|
||||
inline basic_json& operator=(::std::nullptr_t)
|
||||
inline basic_json& operator=(std::nullptr_t)
|
||||
{
|
||||
value_ = nullptr;
|
||||
return (*this);
|
||||
|
|
@ -2435,7 +2434,7 @@ public:
|
|||
|
||||
if (index >= value_.data.vector->size())
|
||||
{
|
||||
throw ::std::out_of_range("operator[] index out of range");
|
||||
throw std::out_of_range("operator[] index out of range");
|
||||
}
|
||||
return (*value_.data.vector)[index];
|
||||
}
|
||||
|
|
@ -2464,7 +2463,7 @@ public:
|
|||
auto iter = value_.data.object->find(key);
|
||||
if (iter == value_.data.object->end())
|
||||
{
|
||||
throw ::std::out_of_range("operator[] key out of range");
|
||||
throw std::out_of_range("operator[] key out of range");
|
||||
}
|
||||
return iter->second;
|
||||
}
|
||||
|
|
@ -2495,7 +2494,7 @@ public:
|
|||
auto iter = value_.data.object->find(key);
|
||||
if (iter == value_.data.object->end())
|
||||
{
|
||||
throw ::std::out_of_range("operator[] key out of range");
|
||||
throw std::out_of_range("operator[] key out of range");
|
||||
}
|
||||
return iter->second;
|
||||
}
|
||||
|
|
@ -2536,21 +2535,21 @@ public:
|
|||
public:
|
||||
// dumps functions
|
||||
|
||||
friend ::std::basic_ostream<char_type>& operator<<(::std::basic_ostream<char_type>& out, const basic_json& json)
|
||||
friend std::basic_ostream<char_type>& operator<<(std::basic_ostream<char_type>& out, const basic_json& json)
|
||||
{
|
||||
using char_type = typename ::std::basic_ostream<char_type>::char_type;
|
||||
using char_type = typename std::basic_ostream<char_type>::char_type;
|
||||
|
||||
const bool pretty_print = (out.width() > 0);
|
||||
const auto indentation = (pretty_print ? out.width() : 0);
|
||||
out.width(0);
|
||||
|
||||
__json_detail::stream_output_adapter<char_type> adapter(out);
|
||||
__json_detail::json_serializer<basic_json>(&adapter, out.fill()).dump(json, pretty_print, static_cast<UInt32>(indentation));
|
||||
__json_detail::json_serializer<basic_json>(&adapter, out.fill()).dump(json, pretty_print, static_cast<std::uint32_t>(indentation));
|
||||
return out;
|
||||
}
|
||||
|
||||
string_type dump(
|
||||
const Int32 indent = -1,
|
||||
const int indent = -1,
|
||||
const char_type indent_char = ' ') const
|
||||
{
|
||||
string_type result;
|
||||
|
|
@ -2561,12 +2560,12 @@ public:
|
|||
|
||||
void dump(
|
||||
__json_detail::output_adapter<char_type>* adapter,
|
||||
const Int32 indent = -1,
|
||||
const int indent = -1,
|
||||
const char_type indent_char = ' ') const
|
||||
{
|
||||
if (indent >= 0)
|
||||
{
|
||||
__json_detail::json_serializer<basic_json>(adapter, indent_char).dump(*this, true, static_cast<UInt32>(indent));
|
||||
__json_detail::json_serializer<basic_json>(adapter, indent_char).dump(*this, true, static_cast<std::uint32_t>(indent));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2577,8 +2576,8 @@ public:
|
|||
public:
|
||||
// parse functions
|
||||
|
||||
friend ::std::basic_istream<char_type>&
|
||||
operator>>(::std::basic_istream<char_type>& in, basic_json& json)
|
||||
friend std::basic_istream<char_type>&
|
||||
operator>>(std::basic_istream<char_type>& in, basic_json& json)
|
||||
{
|
||||
__json_detail::stream_input_adapter<char_type> adapter(in);
|
||||
__json_detail::json_parser<basic_json>(&adapter).parse(json);
|
||||
|
|
@ -2597,7 +2596,7 @@ public:
|
|||
return parse(&adapter);
|
||||
}
|
||||
|
||||
static inline basic_json parse(::std::FILE* file)
|
||||
static inline basic_json parse(std::FILE* file)
|
||||
{
|
||||
__json_detail::file_input_adapter<char_type> adapter(file);
|
||||
return parse(&adapter);
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ namespace kiwano
|
|||
using Function = kiwano::core::function<_FuncTy>;
|
||||
|
||||
using Json = kiwano::core::basic_json<kiwano::Map, kiwano::Vector, kiwano::String,
|
||||
Int32, Float64, bool, std::allocator>;
|
||||
int, double, bool, std::allocator>;
|
||||
}
|
||||
|
||||
namespace std
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace __function_detail
|
|||
template <typename _Ty, typename _Ret, typename... _Args>
|
||||
struct helper
|
||||
{
|
||||
template <typename _Uty> static Int32 test(...);
|
||||
template <typename _Uty> static int test(...);
|
||||
|
||||
template <typename _Uty, _Ret(_Uty::*)(_Args...)> struct class_mem;
|
||||
template <typename _Uty> static char test(class_mem<_Uty, &_Uty::operator()>*);
|
||||
|
|
@ -54,7 +54,7 @@ namespace __function_detail
|
|||
typename _Uty,
|
||||
typename _Uret = typename ::std::decay<decltype(::std::declval<_Uty>().operator()(::std::declval<_Args>()...))>::type,
|
||||
typename = typename ::std::enable_if<::std::is_convertible<_Ret, _Uret>::value>::type>
|
||||
static char test(Int32);
|
||||
static char test(int);
|
||||
|
||||
static constexpr bool value = sizeof(test<_Ty>(0)) == sizeof(char);
|
||||
};
|
||||
|
|
@ -103,7 +103,7 @@ namespace __function_detail
|
|||
}
|
||||
|
||||
private:
|
||||
Int32 ref_count_;
|
||||
int ref_count_;
|
||||
};
|
||||
|
||||
template<typename _Ty, typename _Ret, typename... _Args>
|
||||
|
|
@ -244,7 +244,7 @@ public:
|
|||
|
||||
template<
|
||||
typename _Ty,
|
||||
typename = typename ::std::enable_if<__function_detail::is_callable<_Ty, _Ret, _Args...>::value, Int32>::type>
|
||||
typename = typename ::std::enable_if<__function_detail::is_callable<_Ty, _Ret, _Args...>::value, int>::type>
|
||||
function(_Ty val)
|
||||
{
|
||||
callable_ = __function_detail::proxy_callable<_Ty, _Ret, _Args...>::make(::std::move(val));
|
||||
|
|
@ -253,7 +253,7 @@ public:
|
|||
|
||||
template<typename _Ty,
|
||||
typename _Uty,
|
||||
typename = typename ::std::enable_if<::std::is_same<_Ty, _Uty>::value || ::std::is_base_of<_Ty, _Uty>::value, Int32>::type>
|
||||
typename = typename ::std::enable_if<::std::is_same<_Ty, _Uty>::value || ::std::is_base_of<_Ty, _Uty>::value, int>::type>
|
||||
function(_Uty* ptr, _Ret(_Ty::* func)(_Args...))
|
||||
{
|
||||
callable_ = __function_detail::proxy_mem_callable<_Ty, _Ret, _Args...>::make(ptr, func);
|
||||
|
|
@ -262,7 +262,7 @@ public:
|
|||
|
||||
template<typename _Ty,
|
||||
typename _Uty,
|
||||
typename = typename ::std::enable_if<::std::is_same<_Ty, _Uty>::value || ::std::is_base_of<_Ty, _Uty>::value, Int32>::type>
|
||||
typename = typename ::std::enable_if<::std::is_same<_Ty, _Uty>::value || ::std::is_base_of<_Ty, _Uty>::value, int>::type>
|
||||
function(_Uty* ptr, _Ret(_Ty::* func)(_Args...) const)
|
||||
{
|
||||
callable_ = __function_detail::proxy_const_mem_callable<_Ty, _Ret, _Args...>::make(ptr, func);
|
||||
|
|
@ -330,7 +330,7 @@ namespace kiwano
|
|||
template<typename _Ty,
|
||||
typename _Uty,
|
||||
typename = typename std::enable_if<
|
||||
std::is_same<_Ty, _Uty>::value || std::is_base_of<_Ty, _Uty>::value, Int32
|
||||
std::is_same<_Ty, _Uty>::value || std::is_base_of<_Ty, _Uty>::value, int
|
||||
>::type,
|
||||
typename _Ret,
|
||||
typename... _Args>
|
||||
|
|
@ -342,7 +342,7 @@ namespace kiwano
|
|||
template<typename _Ty,
|
||||
typename _Uty,
|
||||
typename = typename std::enable_if<
|
||||
std::is_same<_Ty, _Uty>::value || std::is_base_of<_Ty, _Uty>::value, Int32
|
||||
std::is_same<_Ty, _Uty>::value || std::is_base_of<_Ty, _Uty>::value, int
|
||||
>::type,
|
||||
typename _Ret,
|
||||
typename... _Args>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#pragma once
|
||||
#include "../macros.h"
|
||||
#include "types.h"
|
||||
|
||||
// #define KGE_DEBUG_ENABLE_LIST_CHECK
|
||||
|
||||
|
|
@ -36,56 +35,56 @@ namespace kiwano
|
|||
inline namespace core
|
||||
{
|
||||
|
||||
template <typename T> class intrusive_list;
|
||||
template <typename _Ty> class intrusive_list;
|
||||
|
||||
template <typename T>
|
||||
template <typename _Ty>
|
||||
class intrusive_list_item
|
||||
{
|
||||
T prev_;
|
||||
T next_;
|
||||
_Ty prev_;
|
||||
_Ty next_;
|
||||
|
||||
template <typename U>
|
||||
friend class intrusive_list;
|
||||
|
||||
public:
|
||||
using ItemType = T;
|
||||
using value_type = _Ty;
|
||||
|
||||
intrusive_list_item() : prev_(), next_() {}
|
||||
|
||||
T const& prev_item() const { return prev_; }
|
||||
_Ty const& prev_item() const { return prev_; }
|
||||
|
||||
T& prev_item() { return prev_; }
|
||||
_Ty& prev_item() { return prev_; }
|
||||
|
||||
T const& next_item() const { return next_; }
|
||||
_Ty const& next_item() const { return next_; }
|
||||
|
||||
T& next_item() { return next_; }
|
||||
_Ty& next_item() { return next_; }
|
||||
};
|
||||
|
||||
|
||||
template <typename T>
|
||||
template <typename _Ty>
|
||||
class intrusive_list
|
||||
{
|
||||
T first_;
|
||||
T last_;
|
||||
_Ty first_;
|
||||
_Ty last_;
|
||||
|
||||
public:
|
||||
using ItemType = T;
|
||||
using value_type = _Ty;
|
||||
|
||||
intrusive_list() : first_(), last_() {}
|
||||
|
||||
~intrusive_list() { clear(); }
|
||||
|
||||
T const& first_item() const { return first_; }
|
||||
_Ty const& first_item() const { return first_; }
|
||||
|
||||
T& first_item() { return first_; }
|
||||
_Ty& first_item() { return first_; }
|
||||
|
||||
T const& last_item() const { return last_; }
|
||||
_Ty const& last_item() const { return last_; }
|
||||
|
||||
T& last_item() { return last_; }
|
||||
_Ty& last_item() { return last_; }
|
||||
|
||||
bool empty() const { return !first_; }
|
||||
|
||||
void push_back(T const& child)
|
||||
void push_back(_Ty const& child)
|
||||
{
|
||||
if (child->prev_)
|
||||
child->prev_->next_ = child->next_;
|
||||
|
|
@ -109,7 +108,7 @@ public:
|
|||
KGE_DEBUG_CHECK_LIST(this);
|
||||
}
|
||||
|
||||
void push_front(T const& child)
|
||||
void push_front(_Ty const& child)
|
||||
{
|
||||
if (child->prev_)
|
||||
child->prev_->next_ = child->next_;
|
||||
|
|
@ -133,7 +132,7 @@ public:
|
|||
KGE_DEBUG_CHECK_LIST(this);
|
||||
}
|
||||
|
||||
void insert_before(T const& child, T const& before)
|
||||
void insert_before(_Ty const& child, _Ty const& before)
|
||||
{
|
||||
if (child->prev_)
|
||||
child->prev_->next_ = child->next_;
|
||||
|
|
@ -152,7 +151,7 @@ public:
|
|||
KGE_DEBUG_CHECK_LIST(this);
|
||||
}
|
||||
|
||||
void insert_after(T const& child, T const& after)
|
||||
void insert_after(_Ty const& child, _Ty const& after)
|
||||
{
|
||||
if (child->prev_)
|
||||
child->prev_->next_ = child->next_;
|
||||
|
|
@ -171,10 +170,10 @@ public:
|
|||
KGE_DEBUG_CHECK_LIST(this);
|
||||
}
|
||||
|
||||
void remove(T const& child)
|
||||
void remove(_Ty const& child)
|
||||
{
|
||||
#ifdef KGE_DEBUG_ENABLE_LIST_CHECK
|
||||
T tmp = first_;
|
||||
_Ty tmp = first_;
|
||||
while (tmp != child)
|
||||
{
|
||||
KGE_ASSERT((tmp != last_) && "The actor to be removed is not in this list");
|
||||
|
|
@ -208,10 +207,10 @@ public:
|
|||
|
||||
void clear()
|
||||
{
|
||||
T p = first_;
|
||||
_Ty p = first_;
|
||||
while (p)
|
||||
{
|
||||
T tmp = p;
|
||||
_Ty tmp = p;
|
||||
p = p->next_;
|
||||
if (tmp)
|
||||
{
|
||||
|
|
@ -231,9 +230,9 @@ private:
|
|||
if (!first_)
|
||||
return;
|
||||
|
||||
Int32 pos = 0;
|
||||
T p = first_;
|
||||
T tmp = p;
|
||||
int pos = 0;
|
||||
_Ty p = first_;
|
||||
_Ty tmp = p;
|
||||
do
|
||||
{
|
||||
tmp = p;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
// THE SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
#include "types.h"
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
#include <codecvt>
|
||||
|
|
@ -63,10 +62,10 @@ public:
|
|||
inline pointer base() const { return base_; }
|
||||
|
||||
inline iterator_impl& operator++() { ++base_; return (*this); }
|
||||
inline iterator_impl operator++(Int32) { iterator_impl old = (*this); ++(*this); return old; }
|
||||
inline iterator_impl operator++(int) { iterator_impl old = (*this); ++(*this); return old; }
|
||||
|
||||
inline iterator_impl& operator--() { --base_; return (*this); }
|
||||
inline iterator_impl operator--(Int32) { iterator_impl old = (*this); --(*this); return old; }
|
||||
inline iterator_impl operator--(int) { iterator_impl old = (*this); --(*this); return old; }
|
||||
|
||||
inline const iterator_impl operator+(difference_type off) const { return iterator_impl(base_ + off); }
|
||||
inline const iterator_impl operator-(difference_type off) const { return iterator_impl(base_ - off); }
|
||||
|
|
@ -96,7 +95,7 @@ public:
|
|||
public:
|
||||
using value_type = _CharTy;
|
||||
using char_type = value_type;
|
||||
using size_type = UInt32;
|
||||
using size_type = std::size_t;
|
||||
using reference = value_type &;
|
||||
using const_reference = const value_type &;
|
||||
using iterator = iterator_impl<value_type>;
|
||||
|
|
@ -121,7 +120,7 @@ public:
|
|||
|
||||
inline const char_type* c_str() const { return empty() ? empty_cstr : const_str_; }
|
||||
inline const char_type* data() const { return empty() ? empty_cstr : const_str_; }
|
||||
inline char_type at(UInt32 i) const { return (*this)[i]; }
|
||||
inline char_type at(size_type i) const { return (*this)[i]; }
|
||||
inline size_type size() const { return size_; }
|
||||
inline size_type length() const { return size(); }
|
||||
inline size_type capacity() const { return capacity_; }
|
||||
|
|
@ -132,8 +131,8 @@ public:
|
|||
void reserve(const size_type new_cap = 0);
|
||||
inline void resize(const size_type new_size, const char_type ch = value_type()) { check_operability(); if (new_size < size_) str_[size_ = new_size] = value_type(); else append(new_size - size_, ch); }
|
||||
|
||||
Int32 compare(const char_type* const str) const;
|
||||
inline Int32 compare(basic_string const& str) const { return compare(str.c_str()); }
|
||||
int compare(const char_type* const str) const;
|
||||
inline int compare(basic_string const& str) const { return compare(str.c_str()); }
|
||||
|
||||
basic_string& append(size_type count, char_type ch);
|
||||
basic_string& append(const char_type* cstr, size_type count);
|
||||
|
|
@ -196,17 +195,17 @@ public:
|
|||
size_type copy(char_type* cstr, size_type count, size_type pos = 0) const;
|
||||
|
||||
void swap(basic_string& rhs) noexcept;
|
||||
UInt32 hash() const;
|
||||
size_type hash() const;
|
||||
|
||||
public:
|
||||
static basic_string parse(Int32 val);
|
||||
static basic_string parse(UInt32 val);
|
||||
static basic_string parse(int val);
|
||||
static basic_string parse(unsigned int val);
|
||||
static basic_string parse(long val);
|
||||
static basic_string parse(unsigned long val);
|
||||
static basic_string parse(long long val);
|
||||
static basic_string parse(unsigned long long val);
|
||||
static basic_string parse(Float32 val);
|
||||
static basic_string parse(Float64 val);
|
||||
static basic_string parse(float val);
|
||||
static basic_string parse(double val);
|
||||
static basic_string parse(long double val);
|
||||
|
||||
template <typename ..._Args>
|
||||
|
|
@ -386,10 +385,10 @@ std::basic_istream<typename basic_string<_CharTy>::char_type>& operator>>(std::b
|
|||
//
|
||||
|
||||
template <typename _CharTy>
|
||||
basic_string<_CharTy> to_basic_string(Int32 val);
|
||||
basic_string<_CharTy> to_basic_string(int val);
|
||||
|
||||
template <typename _CharTy>
|
||||
basic_string<_CharTy> to_basic_string(UInt32 val);
|
||||
basic_string<_CharTy> to_basic_string(unsigned int val);
|
||||
|
||||
template <typename _CharTy>
|
||||
basic_string<_CharTy> to_basic_string(long val);
|
||||
|
|
@ -404,10 +403,10 @@ template <typename _CharTy>
|
|||
basic_string<_CharTy> to_basic_string(unsigned long long val);
|
||||
|
||||
template <typename _CharTy>
|
||||
basic_string<_CharTy> to_basic_string(Float32 val);
|
||||
basic_string<_CharTy> to_basic_string(float val);
|
||||
|
||||
template <typename _CharTy>
|
||||
basic_string<_CharTy> to_basic_string(Float64 val);
|
||||
basic_string<_CharTy> to_basic_string(double val);
|
||||
|
||||
template <typename _CharTy>
|
||||
basic_string<_CharTy> to_basic_string(long double val);
|
||||
|
|
@ -420,35 +419,35 @@ template <typename ..._Args>
|
|||
basic_string<char> format_string(const char* const fmt, _Args&& ... args);
|
||||
|
||||
template <typename ..._Args>
|
||||
basic_string<WChar> format_string(const WChar* const fmt, _Args&& ... args);
|
||||
basic_string<wchar_t> format_string(const wchar_t* const fmt, _Args&& ... args);
|
||||
|
||||
|
||||
//
|
||||
// string && wstring
|
||||
//
|
||||
using string = ::kiwano::core::basic_string<char>;
|
||||
using wstring = ::kiwano::core::basic_string<WChar>;
|
||||
using wstring = ::kiwano::core::basic_string<wchar_t>;
|
||||
|
||||
|
||||
inline string to_string(Int32 val) { return to_basic_string<char>(val); }
|
||||
inline string to_string(UInt32 val) { return to_basic_string<char>(val); }
|
||||
inline string to_string(int val) { return to_basic_string<char>(val); }
|
||||
inline string to_string(unsigned int val) { return to_basic_string<char>(val); }
|
||||
inline string to_string(long val) { return to_basic_string<char>(val); }
|
||||
inline string to_string(unsigned long val) { return to_basic_string<char>(val); }
|
||||
inline string to_string(long long val) { return to_basic_string<char>(val); }
|
||||
inline string to_string(unsigned long long val) { return to_basic_string<char>(val); }
|
||||
inline string to_string(Float32 val) { return to_basic_string<char>(val); }
|
||||
inline string to_string(Float64 val) { return to_basic_string<char>(val); }
|
||||
inline string to_string(float val) { return to_basic_string<char>(val); }
|
||||
inline string to_string(double val) { return to_basic_string<char>(val); }
|
||||
inline string to_string(long double val) { return to_basic_string<char>(val); }
|
||||
|
||||
inline wstring to_wstring(Int32 val) { return to_basic_string<WChar>(val); }
|
||||
inline wstring to_wstring(UInt32 val) { return to_basic_string<WChar>(val); }
|
||||
inline wstring to_wstring(long val) { return to_basic_string<WChar>(val); }
|
||||
inline wstring to_wstring(unsigned long val) { return to_basic_string<WChar>(val); }
|
||||
inline wstring to_wstring(long long val) { return to_basic_string<WChar>(val); }
|
||||
inline wstring to_wstring(unsigned long long val) { return to_basic_string<WChar>(val); }
|
||||
inline wstring to_wstring(Float32 val) { return to_basic_string<WChar>(val); }
|
||||
inline wstring to_wstring(Float64 val) { return to_basic_string<WChar>(val); }
|
||||
inline wstring to_wstring(long double val) { return to_basic_string<WChar>(val); }
|
||||
inline wstring to_wstring(int val) { return to_basic_string<wchar_t>(val); }
|
||||
inline wstring to_wstring(unsigned int val) { return to_basic_string<wchar_t>(val); }
|
||||
inline wstring to_wstring(long val) { return to_basic_string<wchar_t>(val); }
|
||||
inline wstring to_wstring(unsigned long val) { return to_basic_string<wchar_t>(val); }
|
||||
inline wstring to_wstring(long long val) { return to_basic_string<wchar_t>(val); }
|
||||
inline wstring to_wstring(unsigned long long val) { return to_basic_string<wchar_t>(val); }
|
||||
inline wstring to_wstring(float val) { return to_basic_string<wchar_t>(val); }
|
||||
inline wstring to_wstring(double val) { return to_basic_string<wchar_t>(val); }
|
||||
inline wstring to_wstring(long double val) { return to_basic_string<wchar_t>(val); }
|
||||
|
||||
|
||||
} // inline namespace core
|
||||
|
|
@ -462,14 +461,14 @@ namespace kiwano
|
|||
//
|
||||
namespace __string_details
|
||||
{
|
||||
template<class _Traits>
|
||||
UInt32 TraitsFind(
|
||||
const typename _Traits::char_type* first, UInt32 first_size, UInt32 offset,
|
||||
const typename _Traits::char_type* second, UInt32 count)
|
||||
template <typename _Traits, typename _SizeTy>
|
||||
_SizeTy TraitsFind(
|
||||
const typename _Traits::char_type* first, _SizeTy first_size, _SizeTy offset,
|
||||
const typename _Traits::char_type* second, _SizeTy count)
|
||||
{
|
||||
if (count > first_size || offset > first_size - count)
|
||||
{
|
||||
return static_cast<UInt32>(-1);
|
||||
return static_cast<_SizeTy>(-1);
|
||||
}
|
||||
|
||||
if (count == 0)
|
||||
|
|
@ -480,23 +479,23 @@ namespace __string_details
|
|||
const auto matches_end = first + (first_size - count) + 1;
|
||||
for (auto iter = first + offset; ; ++iter)
|
||||
{
|
||||
iter = typename _Traits::find(iter, static_cast<UInt32>(matches_end - iter), *second);
|
||||
iter = typename _Traits::find(iter, static_cast<_SizeTy>(matches_end - iter), *second);
|
||||
if (!iter)
|
||||
{
|
||||
return static_cast<UInt32>(-1);
|
||||
return static_cast<_SizeTy>(-1);
|
||||
}
|
||||
|
||||
if (typename _Traits::compare(iter, second, count) == 0)
|
||||
{
|
||||
return static_cast<UInt32>(iter - first);
|
||||
return static_cast<_SizeTy>(iter - first);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<class _Traits>
|
||||
UInt32 TraitsFindLastOf(
|
||||
const typename _Traits::char_type* first, const UInt32 first_size, const UInt32 pos,
|
||||
const typename _Traits::char_type* second, const UInt32 count)
|
||||
template <typename _Traits, typename _SizeTy>
|
||||
_SizeTy TraitsFindLastOf(
|
||||
const typename _Traits::char_type* first, const _SizeTy first_size, const _SizeTy pos,
|
||||
const typename _Traits::char_type* second, const _SizeTy count)
|
||||
{
|
||||
if (count != 0 && first_size != 0)
|
||||
{
|
||||
|
|
@ -504,7 +503,7 @@ namespace __string_details
|
|||
{
|
||||
if (typename _Traits::find(second, count, *iter))
|
||||
{
|
||||
return static_cast<UInt32>(iter - first);
|
||||
return static_cast<_SizeTy>(iter - first);
|
||||
}
|
||||
if (iter == first)
|
||||
{
|
||||
|
|
@ -512,7 +511,7 @@ namespace __string_details
|
|||
}
|
||||
}
|
||||
}
|
||||
return static_cast<UInt32>(-1);
|
||||
return static_cast<_SizeTy>(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -829,8 +828,8 @@ inline namespace core
|
|||
{
|
||||
check_operability();
|
||||
|
||||
UInt32 new_size = size_ + count;
|
||||
UInt32 new_cap = new_size + 1;
|
||||
size_type new_size = size_ + count;
|
||||
size_type new_cap = new_size + 1;
|
||||
char_type* new_str = allocate(new_cap);
|
||||
|
||||
traits_type::move(new_str, str_, size_);
|
||||
|
|
@ -850,8 +849,8 @@ inline namespace core
|
|||
{
|
||||
check_operability();
|
||||
|
||||
UInt32 new_size = size_ + count;
|
||||
UInt32 new_cap = new_size + 1;
|
||||
size_type new_size = size_ + count;
|
||||
size_type new_cap = new_size + 1;
|
||||
char_type* new_str = allocate(new_cap);
|
||||
|
||||
traits_type::move(new_str, str_, size_);
|
||||
|
|
@ -876,8 +875,8 @@ inline namespace core
|
|||
|
||||
count = other.clamp_suffix_size(pos, count);
|
||||
|
||||
UInt32 new_size = size_ + count;
|
||||
UInt32 new_cap = new_size + 1;
|
||||
size_type new_size = size_ + count;
|
||||
size_type new_cap = new_size + 1;
|
||||
char_type* new_str = allocate(new_cap);
|
||||
|
||||
traits_type::move(new_str, str_, size_);
|
||||
|
|
@ -910,27 +909,27 @@ inline namespace core
|
|||
}
|
||||
|
||||
template <typename _CharTy>
|
||||
inline UInt32 basic_string<_CharTy>::hash() const
|
||||
inline typename basic_string<_CharTy>::size_type basic_string<_CharTy>::hash() const
|
||||
{
|
||||
static UInt32 fnv_prime = 16777619U;
|
||||
UInt32 fnv_offset_basis = 2166136261U;
|
||||
static size_type fnv_prime = 16777619U;
|
||||
size_type fnv_offset_basis = 2166136261U;
|
||||
|
||||
for (UInt32 index = 0; index < size_; ++index)
|
||||
for (size_type index = 0; index < size_; ++index)
|
||||
{
|
||||
fnv_offset_basis ^= static_cast<UInt32>(const_str_[index]);
|
||||
fnv_offset_basis ^= static_cast<size_type>(const_str_[index]);
|
||||
fnv_offset_basis *= fnv_prime;
|
||||
}
|
||||
return fnv_offset_basis;
|
||||
}
|
||||
|
||||
template <typename _CharTy>
|
||||
inline Int32 basic_string<_CharTy>::compare(const char_type* const str) const
|
||||
inline int basic_string<_CharTy>::compare(const char_type* const str) const
|
||||
{
|
||||
size_type count1 = size();
|
||||
size_type count2 = traits_type::length(str);
|
||||
size_type rlen = std::min(count1, count2);
|
||||
|
||||
Int32 ret = traits_type::compare(const_str_, str, rlen);
|
||||
int ret = traits_type::compare(const_str_, str, rlen);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
|
|
@ -958,7 +957,7 @@ inline namespace core
|
|||
{
|
||||
if (offset >= size_)
|
||||
return basic_string<_CharTy>::npos;
|
||||
return __string_details::TraitsFind<typename basic_string<_CharTy>::traits_type>(const_str_, size_, offset, str, count);
|
||||
return __string_details::TraitsFind<traits_type, size_type>(const_str_, size_, offset, str, count);
|
||||
}
|
||||
|
||||
template <typename _CharTy>
|
||||
|
|
@ -987,7 +986,7 @@ inline namespace core
|
|||
if (pos == 0 || pos > size_ || pos == npos)
|
||||
return npos;
|
||||
|
||||
return __string_details::TraitsFindLastOf<typename basic_string<_CharTy>::traits_type>(const_str_, size_, pos, str, count);
|
||||
return __string_details::TraitsFindLastOf<traits_type, size_type>(const_str_, size_, pos, str, count);
|
||||
}
|
||||
|
||||
template <typename _CharTy>
|
||||
|
|
@ -1160,31 +1159,31 @@ inline namespace core
|
|||
//
|
||||
|
||||
template <typename _CharTy>
|
||||
inline basic_string<_CharTy> basic_string<_CharTy>::parse(Int32 val) { return ::kiwano::to_basic_string<char_type>(val); }
|
||||
inline basic_string<_CharTy> basic_string<_CharTy>::parse(int val) { return ::kiwano::to_basic_string<char_type>(val); }
|
||||
|
||||
template <typename _CharTy>
|
||||
inline basic_string<_CharTy> basic_string<_CharTy>::parse(UInt32 val) { return ::kiwano::to_basic_string<char_type>(val); }
|
||||
inline basic_string<_CharTy> basic_string<_CharTy>::parse(unsigned int val) { return ::kiwano::to_basic_string<char_type>(val); }
|
||||
|
||||
template <typename _CharTy>
|
||||
inline basic_string<_CharTy> basic_string<_CharTy>::parse(long val) { return ::kiwano::to_basic_string<char_type>(val); }
|
||||
inline basic_string<_CharTy> basic_string<_CharTy>::parse(long val) { return ::kiwano::to_basic_string<char_type>(val); }
|
||||
|
||||
template <typename _CharTy>
|
||||
inline basic_string<_CharTy> basic_string<_CharTy>::parse(unsigned long val) { return ::kiwano::to_basic_string<char_type>(val); }
|
||||
inline basic_string<_CharTy> basic_string<_CharTy>::parse(unsigned long val) { return ::kiwano::to_basic_string<char_type>(val); }
|
||||
|
||||
template <typename _CharTy>
|
||||
inline basic_string<_CharTy> basic_string<_CharTy>::parse(long long val) { return ::kiwano::to_basic_string<char_type>(val); }
|
||||
inline basic_string<_CharTy> basic_string<_CharTy>::parse(long long val) { return ::kiwano::to_basic_string<char_type>(val); }
|
||||
|
||||
template <typename _CharTy>
|
||||
inline basic_string<_CharTy> basic_string<_CharTy>::parse(unsigned long long val) { return ::kiwano::to_basic_string<char_type>(val); }
|
||||
inline basic_string<_CharTy> basic_string<_CharTy>::parse(unsigned long long val) { return ::kiwano::to_basic_string<char_type>(val); }
|
||||
|
||||
template <typename _CharTy>
|
||||
inline basic_string<_CharTy> basic_string<_CharTy>::parse(Float32 val) { return ::kiwano::to_basic_string<char_type>(val); }
|
||||
inline basic_string<_CharTy> basic_string<_CharTy>::parse(float val) { return ::kiwano::to_basic_string<char_type>(val); }
|
||||
|
||||
template <typename _CharTy>
|
||||
inline basic_string<_CharTy> basic_string<_CharTy>::parse(Float64 val) { return ::kiwano::to_basic_string<char_type>(val); }
|
||||
inline basic_string<_CharTy> basic_string<_CharTy>::parse(double val) { return ::kiwano::to_basic_string<char_type>(val); }
|
||||
|
||||
template <typename _CharTy>
|
||||
inline basic_string<_CharTy> basic_string<_CharTy>::parse(long double val) { return ::kiwano::to_basic_string<char_type>(val); }
|
||||
inline basic_string<_CharTy> basic_string<_CharTy>::parse(long double val) { return ::kiwano::to_basic_string<char_type>(val); }
|
||||
|
||||
//
|
||||
// details of basic_string::format
|
||||
|
|
@ -1336,13 +1335,13 @@ inline namespace core
|
|||
}
|
||||
|
||||
template <typename _CharTy>
|
||||
inline basic_string<_CharTy> to_basic_string(Int32 val)
|
||||
inline basic_string<_CharTy> to_basic_string(int val)
|
||||
{
|
||||
return (__to_string_detail::IntegralToString<_CharTy>::convert(val));
|
||||
}
|
||||
|
||||
template <typename _CharTy>
|
||||
inline basic_string<_CharTy> to_basic_string(UInt32 val)
|
||||
inline basic_string<_CharTy> to_basic_string(unsigned int val)
|
||||
{
|
||||
return (__to_string_detail::IntegralToString<_CharTy>::convert(val));
|
||||
}
|
||||
|
|
@ -1372,13 +1371,13 @@ inline namespace core
|
|||
}
|
||||
|
||||
template <typename _CharTy>
|
||||
inline basic_string<_CharTy> to_basic_string(Float32 val)
|
||||
inline basic_string<_CharTy> to_basic_string(float val)
|
||||
{
|
||||
return (__to_string_detail::FloatingToString<_CharTy>::convert(val));
|
||||
}
|
||||
|
||||
template <typename _CharTy>
|
||||
inline basic_string<_CharTy> to_basic_string(Float64 val)
|
||||
inline basic_string<_CharTy> to_basic_string(double val)
|
||||
{
|
||||
return (__to_string_detail::FloatingToString<_CharTy>::convert(val));
|
||||
}
|
||||
|
|
@ -1404,9 +1403,9 @@ inline namespace core
|
|||
}
|
||||
|
||||
template <typename ..._Args>
|
||||
inline basic_string<WChar> format_string(const WChar* const fmt, _Args&& ... args)
|
||||
inline basic_string<wchar_t> format_string(const wchar_t* const fmt, _Args&& ... args)
|
||||
{
|
||||
using string_type = basic_string<WChar>;
|
||||
using string_type = basic_string<wchar_t>;
|
||||
const auto len = static_cast<typename string_type::size_type>(::_scwprintf(fmt, std::forward<_Args>(args)...));
|
||||
if (len)
|
||||
{
|
||||
|
|
@ -1461,37 +1460,37 @@ inline namespace core
|
|||
};
|
||||
|
||||
template <>
|
||||
struct IntegralToString<WChar>
|
||||
struct IntegralToString<wchar_t>
|
||||
{
|
||||
template <typename _Ty>
|
||||
static basic_string<WChar> convert(const _Ty val)
|
||||
static basic_string<wchar_t> convert(const _Ty val)
|
||||
{
|
||||
static_assert(std::is_integral<_Ty>::value, "_Ty must be integral");
|
||||
|
||||
using _Elem = typename basic_string<WChar>::traits_type::char_type;
|
||||
using _Elem = typename basic_string<wchar_t>::traits_type::char_type;
|
||||
|
||||
_Elem buffer[21];
|
||||
_Elem* const buffer_end = std::end(buffer);
|
||||
_Elem* buffer_begin = __IntegerToStringBufferEnd(val, buffer_end);
|
||||
|
||||
return basic_string<WChar>(buffer_begin, buffer_end);
|
||||
return basic_string<wchar_t>(buffer_begin, buffer_end);
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct FloatingToString<WChar>
|
||||
struct FloatingToString<wchar_t>
|
||||
{
|
||||
static inline basic_string<WChar> convert(const Float32 val)
|
||||
static inline basic_string<wchar_t> convert(const float val)
|
||||
{
|
||||
return format_string(L"%g", val);
|
||||
}
|
||||
|
||||
static inline basic_string<WChar> convert(const Float64 val)
|
||||
static inline basic_string<wchar_t> convert(const double val)
|
||||
{
|
||||
return format_string(L"%g", val);
|
||||
}
|
||||
|
||||
static inline basic_string<WChar> convert(const long double val)
|
||||
static inline basic_string<wchar_t> convert(const long double val)
|
||||
{
|
||||
return format_string(L"%Lg", val);
|
||||
}
|
||||
|
|
@ -1500,12 +1499,12 @@ inline namespace core
|
|||
template<>
|
||||
struct FloatingToString<char>
|
||||
{
|
||||
static inline basic_string<char> convert(const Float32 val)
|
||||
static inline basic_string<char> convert(const float val)
|
||||
{
|
||||
return format_string("%g", val);
|
||||
}
|
||||
|
||||
static inline basic_string<char> convert(const Float64 val)
|
||||
static inline basic_string<char> convert(const double val)
|
||||
{
|
||||
return format_string("%g", val);
|
||||
}
|
||||
|
|
@ -1522,10 +1521,10 @@ inline namespace core
|
|||
namespace kiwano
|
||||
{
|
||||
|
||||
template <typename _Codecvt, typename _Elem = WChar>
|
||||
template <typename _Codecvt, typename _Elem = wchar_t>
|
||||
class string_convert
|
||||
{
|
||||
enum { BUFFER_INCREASE = 8, BUFFER_MAX = 16 };
|
||||
enum : std::size_t { BUFFER_INCREASE = 8, BUFFER_MAX = 16 };
|
||||
|
||||
public:
|
||||
using byte_string = ::kiwano::core::basic_string<char>;
|
||||
|
|
@ -1550,7 +1549,7 @@ public:
|
|||
|
||||
virtual ~string_convert() { }
|
||||
|
||||
UInt32 converted() const noexcept { return conv_num_; }
|
||||
std::size_t converted() const noexcept { return conv_num_; }
|
||||
|
||||
state_type state() const { return state_; }
|
||||
|
||||
|
|
@ -1577,8 +1576,8 @@ public:
|
|||
|
||||
state_ = state_type{};
|
||||
|
||||
wbuf.append((UInt32) BUFFER_INCREASE, (_Elem) '\0');
|
||||
for (conv_num_ = 0; first != last; conv_num_ = static_cast<UInt32>(first - first_save))
|
||||
wbuf.append(BUFFER_INCREASE, (_Elem) '\0');
|
||||
for (conv_num_ = 0; first != last; conv_num_ = static_cast<std::size_t>(first - first_save))
|
||||
{
|
||||
_Elem* dest = &*wbuf.begin();
|
||||
_Elem* dnext;
|
||||
|
|
@ -1590,15 +1589,15 @@ public:
|
|||
{
|
||||
if (dest < dnext)
|
||||
{
|
||||
wstr.append(dest, static_cast<UInt32>(dnext - dest));
|
||||
wstr.append(dest, static_cast<std::size_t>(dnext - dest));
|
||||
}
|
||||
else if (wbuf.size() < BUFFER_MAX)
|
||||
{
|
||||
wbuf.append(static_cast<UInt32>(BUFFER_INCREASE), '\0');
|
||||
wbuf.append(BUFFER_INCREASE, '\0');
|
||||
}
|
||||
else
|
||||
{
|
||||
throw (std::range_error("bad conversion"));
|
||||
throw std::range_error("bad conversion");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -1607,13 +1606,13 @@ public:
|
|||
{
|
||||
// no conversion, just copy code values
|
||||
for (; first != last; ++first) {
|
||||
wstr.push_back((_Elem)(UChar)* first);
|
||||
wstr.push_back(static_cast<_Elem>(*first));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
throw (std::range_error("bad conversion"));
|
||||
throw std::range_error("bad conversion");
|
||||
}
|
||||
}
|
||||
return wstr;
|
||||
|
|
@ -1645,8 +1644,8 @@ public:
|
|||
|
||||
state_ = state_type{};
|
||||
|
||||
bbuf.append((UInt32) BUFFER_INCREASE, '\0');
|
||||
for (conv_num_ = 0; first != last; conv_num_ = static_cast<UInt32>(first - first_save))
|
||||
bbuf.append(BUFFER_INCREASE, '\0');
|
||||
for (conv_num_ = 0; first != last; conv_num_ = static_cast<std::size_t>(first - first_save))
|
||||
{
|
||||
char* dest = &*bbuf.begin();
|
||||
char* dnext;
|
||||
|
|
@ -1658,11 +1657,11 @@ public:
|
|||
{
|
||||
if (dest < dnext)
|
||||
{
|
||||
bstr.append(dest, (UInt32)(dnext - dest));
|
||||
bstr.append(dest, (std::size_t)(dnext - dest));
|
||||
}
|
||||
else if (bbuf.size() < BUFFER_MAX)
|
||||
{
|
||||
bbuf.append((UInt32) BUFFER_INCREASE, '\0');
|
||||
bbuf.append(BUFFER_INCREASE, '\0');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1691,14 +1690,14 @@ public:
|
|||
string_convert& operator=(const string_convert&) = delete;
|
||||
|
||||
private:
|
||||
const codecvt_type* cvt_;
|
||||
std::locale loc_;
|
||||
state_type state_;
|
||||
UInt32 conv_num_;
|
||||
const codecvt_type* cvt_;
|
||||
std::locale loc_;
|
||||
state_type state_;
|
||||
std::size_t conv_num_;
|
||||
};
|
||||
|
||||
class chs_codecvt
|
||||
: public std::codecvt_byname<WChar, char, std::mbstate_t>
|
||||
: public std::codecvt_byname<wchar_t, char, std::mbstate_t>
|
||||
{
|
||||
public:
|
||||
chs_codecvt() : codecvt_byname("chs") {}
|
||||
|
|
|
|||
|
|
@ -1,46 +0,0 @@
|
|||
// Copyright (c) 2016-2018 Kiwano - Nomango
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
|
||||
#define KGE_DEFINE_NUMERIC_TYPE(TYPE, OLD_TYPE) using TYPE = OLD_TYPE;
|
||||
|
||||
namespace kiwano
|
||||
{
|
||||
KGE_DEFINE_NUMERIC_TYPE(Char, signed char);
|
||||
KGE_DEFINE_NUMERIC_TYPE(UChar, unsigned char);
|
||||
KGE_DEFINE_NUMERIC_TYPE(WChar, wchar_t);
|
||||
KGE_DEFINE_NUMERIC_TYPE(Byte, UChar);
|
||||
|
||||
KGE_DEFINE_NUMERIC_TYPE(Int8, std::int8_t);
|
||||
KGE_DEFINE_NUMERIC_TYPE(Int16, std::int16_t);
|
||||
KGE_DEFINE_NUMERIC_TYPE(Int32, std::int32_t);
|
||||
KGE_DEFINE_NUMERIC_TYPE(Int64, std::int64_t);
|
||||
|
||||
KGE_DEFINE_NUMERIC_TYPE(UInt8, std::uint8_t);
|
||||
KGE_DEFINE_NUMERIC_TYPE(UInt16, std::uint16_t);
|
||||
KGE_DEFINE_NUMERIC_TYPE(UInt32, std::uint32_t);
|
||||
KGE_DEFINE_NUMERIC_TYPE(UInt64, std::uint64_t);
|
||||
|
||||
KGE_DEFINE_NUMERIC_TYPE(Float32, float);
|
||||
KGE_DEFINE_NUMERIC_TYPE(Float64, double);
|
||||
|
||||
}
|
||||
|
|
@ -19,7 +19,6 @@
|
|||
// THE SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
#include "types.h"
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
#include <exception>
|
||||
|
|
@ -52,7 +51,7 @@ class vector
|
|||
{
|
||||
public:
|
||||
using value_type = _Ty;
|
||||
using size_type = UInt32;
|
||||
using size_type = std::size_t;
|
||||
using iterator = value_type * ;
|
||||
using const_iterator = const value_type*;
|
||||
using reference = value_type & ;
|
||||
|
|
@ -212,18 +211,18 @@ typename vector<_Ty, _Alloc, _Manager>::iterator
|
|||
namespace __vector_details
|
||||
{
|
||||
//
|
||||
// ArrayManager for core type
|
||||
// vector_memory_manager for common type
|
||||
//
|
||||
template<typename _Ty, typename _Alloc>
|
||||
struct vector_memory_manager<_Ty, _Alloc, false>
|
||||
{
|
||||
using value_type = _Ty;
|
||||
using size_type = UInt32;
|
||||
using size_type = std::size_t;
|
||||
using allocator_type = typename _Alloc;
|
||||
|
||||
static void copy_data(value_type* dest, const value_type* src, size_type count) { if (src == dest) return; ::memcpy(dest, src, (UInt32)count * sizeof(value_type)); }
|
||||
static void copy_data(value_type* dest, size_type count, const value_type& val) { ::memset(dest, (Int32)val, (UInt32)count * sizeof(value_type)); }
|
||||
static void move_data(value_type* dest, const value_type* src, size_type count) { if (src == dest) return; ::memmove(dest, src, (UInt32)count * sizeof(value_type)); }
|
||||
static void copy_data(value_type* dest, const value_type* src, size_type count) { if (src == dest) return; ::memcpy(dest, src, size_type(count) * sizeof(value_type)); }
|
||||
static void copy_data(value_type* dest, size_type count, const value_type& val) { ::memset(dest, int(val), size_type(count) * sizeof(value_type)); }
|
||||
static void move_data(value_type* dest, const value_type* src, size_type count) { if (src == dest) return; ::memmove(dest, src, size_type(count) * sizeof(value_type)); }
|
||||
|
||||
static value_type* allocate(size_type count) { return get_allocator().allocate(count); }
|
||||
static void deallocate(value_type*& ptr, size_type count) { if (ptr) { get_allocator().deallocate(ptr, count); ptr = nullptr; } }
|
||||
|
|
@ -241,13 +240,13 @@ namespace __vector_details
|
|||
};
|
||||
|
||||
//
|
||||
// ArrayManager for class
|
||||
// vector_memory_manager for classes
|
||||
//
|
||||
template<typename _Ty, typename _Alloc>
|
||||
struct vector_memory_manager<_Ty, _Alloc, true>
|
||||
{
|
||||
using value_type = _Ty;
|
||||
using size_type = UInt32;
|
||||
using size_type = std::size_t;
|
||||
using allocator_type = typename _Alloc;
|
||||
|
||||
static void copy_data(value_type* dest, const value_type* src, size_type count) { if (src == dest) return; while (count--) (*dest++) = (*src++); }
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ namespace kiwano
|
|||
|
||||
explicit Matrix3x2T(const value_type* p)
|
||||
{
|
||||
for (Int32 i = 0; i < 6; i++)
|
||||
for (int i = 0; i < 6; i++)
|
||||
m[i] = p[i];
|
||||
}
|
||||
|
||||
|
|
@ -84,25 +84,25 @@ namespace kiwano
|
|||
template <typename _MTy>
|
||||
Matrix3x2T(_MTy const& other)
|
||||
{
|
||||
for (Int32 i = 0; i < 6; i++)
|
||||
for (int i = 0; i < 6; i++)
|
||||
m[i] = other[i];
|
||||
}
|
||||
|
||||
#pragma warning (pop)
|
||||
|
||||
inline value_type operator [](UInt32 index) const
|
||||
inline value_type operator [](std::uint32_t index) const
|
||||
{
|
||||
return m[index];
|
||||
}
|
||||
|
||||
inline value_type& operator [](UInt32 index)
|
||||
inline value_type& operator [](std::uint32_t index)
|
||||
{
|
||||
return m[index];
|
||||
}
|
||||
|
||||
inline Matrix3x2T& operator= (Matrix3x2T const& other)
|
||||
{
|
||||
for (Int32 i = 0; i < 6; i++)
|
||||
for (int i = 0; i < 6; i++)
|
||||
m[i] = other[i];
|
||||
return (*this);
|
||||
}
|
||||
|
|
@ -290,7 +290,7 @@ namespace kiwano
|
|||
, rhs(rhs)
|
||||
{}
|
||||
|
||||
inline _Ty operator [](UInt32 index) const
|
||||
inline _Ty operator [](std::uint32_t index) const
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace kiwano
|
|||
|
||||
inline value_type Length() const
|
||||
{
|
||||
return static_cast<value_type>(math::Sqrt(static_cast<Float32>(x * x + y * y)));
|
||||
return static_cast<value_type>(math::Sqrt(static_cast<float>(x * x + y * y)));
|
||||
}
|
||||
|
||||
inline bool IsOrigin() const
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ namespace kiwano
|
|||
{
|
||||
namespace math
|
||||
{
|
||||
inline Float32 Linear(Float32 step)
|
||||
inline float Linear(float step)
|
||||
{
|
||||
return step;
|
||||
}
|
||||
|
|
@ -33,17 +33,17 @@ namespace kiwano
|
|||
|
||||
// Ease
|
||||
|
||||
inline Float32 EaseIn(Float32 step, Float32 rate)
|
||||
inline float EaseIn(float step, float rate)
|
||||
{
|
||||
return math::Pow(step, rate);
|
||||
}
|
||||
|
||||
inline Float32 EaseOut(Float32 step, Float32 rate)
|
||||
inline float EaseOut(float step, float rate)
|
||||
{
|
||||
return math::Pow(step, 1.f / rate);
|
||||
}
|
||||
|
||||
inline Float32 EaseInOut(Float32 step, Float32 rate)
|
||||
inline float EaseInOut(float step, float rate)
|
||||
{
|
||||
if (step < .5f)
|
||||
return .5f * math::Pow(2 * step, rate);
|
||||
|
|
@ -53,17 +53,17 @@ namespace kiwano
|
|||
|
||||
// Exponential Ease
|
||||
|
||||
inline Float32 EaseExponentialIn(Float32 step)
|
||||
inline float EaseExponentialIn(float step)
|
||||
{
|
||||
return math::Pow(2.f, 10 * (step - 1));
|
||||
}
|
||||
|
||||
inline Float32 EaseExponentialOut(Float32 step)
|
||||
inline float EaseExponentialOut(float step)
|
||||
{
|
||||
return 1.f - math::Pow(2.f, -10 * step);
|
||||
}
|
||||
|
||||
inline Float32 EaseExponentialInOut(Float32 step)
|
||||
inline float EaseExponentialInOut(float step)
|
||||
{
|
||||
if (step < .5f)
|
||||
return .5f * math::Pow(2.f, 10 * (2 * step - 1));
|
||||
|
|
@ -73,7 +73,7 @@ namespace kiwano
|
|||
|
||||
// Bounce Ease
|
||||
|
||||
inline Float32 EaseBounceOut(Float32 step)
|
||||
inline float EaseBounceOut(float step)
|
||||
{
|
||||
if (step < 1 / 2.75f)
|
||||
{
|
||||
|
|
@ -94,12 +94,12 @@ namespace kiwano
|
|||
return 7.5625f * step * step + 0.984375f;
|
||||
}
|
||||
|
||||
inline Float32 EaseBounceIn(Float32 step)
|
||||
inline float EaseBounceIn(float step)
|
||||
{
|
||||
return 1 - EaseBounceOut(1 - step);
|
||||
}
|
||||
|
||||
inline Float32 EaseBounceInOut(Float32 step)
|
||||
inline float EaseBounceInOut(float step)
|
||||
{
|
||||
if (step < 0.5f)
|
||||
{
|
||||
|
|
@ -114,7 +114,7 @@ namespace kiwano
|
|||
|
||||
// Elastic Ease
|
||||
|
||||
inline Float32 EaseElasticIn(Float32 step, Float32 period)
|
||||
inline float EaseElasticIn(float step, float period)
|
||||
{
|
||||
if (step == 0 || step == 1)
|
||||
return step;
|
||||
|
|
@ -123,7 +123,7 @@ namespace kiwano
|
|||
return -math::Pow(2, 10 * step) * math::Sin((step - period / 4) * 360.f / period);
|
||||
}
|
||||
|
||||
inline Float32 EaseElasticOut(Float32 step, Float32 period)
|
||||
inline float EaseElasticOut(float step, float period)
|
||||
{
|
||||
if (step == 0 || step == 1)
|
||||
return step;
|
||||
|
|
@ -131,7 +131,7 @@ namespace kiwano
|
|||
return math::Pow(2, -10 * step) * math::Sin((step - period / 4) * 360.f / period) + 1;
|
||||
}
|
||||
|
||||
inline Float32 EaseElasticInOut(Float32 step, Float32 period)
|
||||
inline float EaseElasticInOut(float step, float period)
|
||||
{
|
||||
if (step == 0 || step == 1)
|
||||
return step;
|
||||
|
|
@ -147,22 +147,22 @@ namespace kiwano
|
|||
|
||||
// Back Ease
|
||||
|
||||
inline Float32 EaseBackIn(Float32 step)
|
||||
inline float EaseBackIn(float step)
|
||||
{
|
||||
const Float32 overshoot = 1.70158f;
|
||||
const float overshoot = 1.70158f;
|
||||
return step * step * ((overshoot + 1) * step - overshoot);
|
||||
}
|
||||
|
||||
inline Float32 EaseBackOut(Float32 step)
|
||||
inline float EaseBackOut(float step)
|
||||
{
|
||||
const Float32 overshoot = 1.70158f;
|
||||
const float overshoot = 1.70158f;
|
||||
step = step - 1;
|
||||
return step * step * ((overshoot + 1) * step + overshoot) + 1;
|
||||
}
|
||||
|
||||
inline Float32 EaseBackInOut(Float32 step)
|
||||
inline float EaseBackInOut(float step)
|
||||
{
|
||||
const Float32 overshoot = 1.70158f * 1.525f;
|
||||
const float overshoot = 1.70158f * 1.525f;
|
||||
|
||||
step = step * 2;
|
||||
if (step < 1)
|
||||
|
|
@ -177,17 +177,17 @@ namespace kiwano
|
|||
|
||||
// Sine Ease
|
||||
|
||||
inline Float32 EaseSineIn(Float32 step)
|
||||
inline float EaseSineIn(float step)
|
||||
{
|
||||
return 1.f - math::Cos(step * 90);
|
||||
}
|
||||
|
||||
inline Float32 EaseSineOut(Float32 step)
|
||||
inline float EaseSineOut(float step)
|
||||
{
|
||||
return math::Sin(step * 90);
|
||||
}
|
||||
|
||||
inline Float32 EaseSineInOut(Float32 step)
|
||||
inline float EaseSineInOut(float step)
|
||||
{
|
||||
return -0.5f * (math::Cos(step * 180) - 1);
|
||||
}
|
||||
|
|
@ -195,17 +195,17 @@ namespace kiwano
|
|||
|
||||
// Quad Ease
|
||||
|
||||
inline Float32 EaseQuadIn(Float32 step)
|
||||
inline float EaseQuadIn(float step)
|
||||
{
|
||||
return step * step;
|
||||
}
|
||||
|
||||
inline Float32 EaseQuadOut(Float32 step)
|
||||
inline float EaseQuadOut(float step)
|
||||
{
|
||||
return -1 * step * (step - 2);
|
||||
}
|
||||
|
||||
inline Float32 EaseQuadInOut(Float32 step)
|
||||
inline float EaseQuadInOut(float step)
|
||||
{
|
||||
step = step * 2;
|
||||
if (step < 1)
|
||||
|
|
@ -217,18 +217,18 @@ namespace kiwano
|
|||
|
||||
// Cubic Ease
|
||||
|
||||
inline Float32 EaseCubicIn(Float32 step)
|
||||
inline float EaseCubicIn(float step)
|
||||
{
|
||||
return step * step * step;
|
||||
}
|
||||
|
||||
inline Float32 EaseCubicOut(Float32 step)
|
||||
inline float EaseCubicOut(float step)
|
||||
{
|
||||
step -= 1;
|
||||
return (step * step * step + 1);
|
||||
}
|
||||
|
||||
inline Float32 EaseCubicInOut(Float32 step)
|
||||
inline float EaseCubicInOut(float step)
|
||||
{
|
||||
step = step * 2;
|
||||
if (step < 1)
|
||||
|
|
@ -240,18 +240,18 @@ namespace kiwano
|
|||
|
||||
// Quart Ease
|
||||
|
||||
inline Float32 EaseQuartIn(Float32 step)
|
||||
inline float EaseQuartIn(float step)
|
||||
{
|
||||
return step * step * step * step;
|
||||
}
|
||||
|
||||
inline Float32 EaseQuartOut(Float32 step)
|
||||
inline float EaseQuartOut(float step)
|
||||
{
|
||||
step -= 1;
|
||||
return -(step * step * step * step - 1);
|
||||
}
|
||||
|
||||
inline Float32 EaseQuartInOut(Float32 step)
|
||||
inline float EaseQuartInOut(float step)
|
||||
{
|
||||
step = step * 2;
|
||||
if (step < 1)
|
||||
|
|
@ -263,18 +263,18 @@ namespace kiwano
|
|||
|
||||
// Quint Ease
|
||||
|
||||
inline Float32 EaseQuintIn(Float32 step)
|
||||
inline float EaseQuintIn(float step)
|
||||
{
|
||||
return step * step * step * step * step;
|
||||
}
|
||||
|
||||
inline Float32 EaseQuintOut(Float32 step)
|
||||
inline float EaseQuintOut(float step)
|
||||
{
|
||||
step -= 1;
|
||||
return (step * step * step * step * step + 1);
|
||||
}
|
||||
|
||||
inline Float32 EaseQuintInOut(Float32 step)
|
||||
inline float EaseQuintInOut(float step)
|
||||
{
|
||||
step = step * 2;
|
||||
if (step < 1)
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@
|
|||
|
||||
namespace kiwano
|
||||
{
|
||||
using Vec2 = kiwano::math::Vec2T<Float32>;
|
||||
using Rect = kiwano::math::RectT<Float32>;
|
||||
using Matrix3x2 = kiwano::math::Matrix3x2T<Float32>;
|
||||
using Vec2 = kiwano::math::Vec2T<float>;
|
||||
using Rect = kiwano::math::RectT<float>;
|
||||
using Matrix3x2 = kiwano::math::Matrix3x2T<float>;
|
||||
|
||||
using Point = Vec2;
|
||||
using Size = Vec2;
|
||||
|
|
|
|||
|
|
@ -29,26 +29,24 @@ namespace kiwano
|
|||
// 随机数
|
||||
//
|
||||
// 获取指定范围内的一个随机数, 如:
|
||||
// Int32 n = math::Rand(1, 5); // 获取 1~5 内的随机整数, 包含 1 和 5
|
||||
// int n = math::Random(1, 5); // 获取 1~5 内的随机整数, 包含 1 和 5
|
||||
// 产生的随机数类型取决于参数的类型, 如获取随机浮点数:
|
||||
// Float64 d = math::Rand(1.2, 1.5);
|
||||
// float d = math::Random(1.2f, 1.5f);
|
||||
//
|
||||
|
||||
Int32 Rand(Int32 min, Int32 max);
|
||||
int Random(int min, int max);
|
||||
|
||||
UInt32 Rand(UInt32 min, UInt32 max);
|
||||
unsigned int Random(unsigned int min, unsigned int max);
|
||||
|
||||
long Rand(long min, long max);
|
||||
long Random(long min, long max);
|
||||
|
||||
unsigned long Rand(unsigned long min, unsigned long max);
|
||||
unsigned long Random(unsigned long min, unsigned long max);
|
||||
|
||||
char Rand(char min, char max);
|
||||
char Random(char min, char max);
|
||||
|
||||
UChar Rand(UChar min, UChar max);
|
||||
float Random(float min, float max);
|
||||
|
||||
Float32 Rand(Float32 min, Float32 max);
|
||||
|
||||
Float64 Rand(Float64 min, Float64 max);
|
||||
double Random(double min, double max);
|
||||
|
||||
|
||||
//
|
||||
|
|
@ -79,48 +77,41 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
inline Int32 Rand(Int32 min, Int32 max)
|
||||
inline int Random(int min, int max)
|
||||
{
|
||||
return __rand_detail::RandomInt(min, max);
|
||||
}
|
||||
|
||||
inline UInt32 Rand(UInt32 min, UInt32 max)
|
||||
inline unsigned int Random(unsigned int min, unsigned int max)
|
||||
{
|
||||
return __rand_detail::RandomInt(min, max);
|
||||
}
|
||||
|
||||
inline long Rand(long min, long max)
|
||||
inline long Random(long min, long max)
|
||||
{
|
||||
return __rand_detail::RandomInt(min, max);
|
||||
}
|
||||
|
||||
inline unsigned long Rand(unsigned long min, unsigned long max)
|
||||
inline unsigned long Random(unsigned long min, unsigned long max)
|
||||
{
|
||||
return __rand_detail::RandomInt(min, max);
|
||||
}
|
||||
|
||||
inline char Rand(char min, char max)
|
||||
inline char Random(char min, char max)
|
||||
{
|
||||
return static_cast<char>(
|
||||
__rand_detail::RandomInt(static_cast<Int32>(min), static_cast<Int32>(max))
|
||||
__rand_detail::RandomInt(static_cast<int>(min), static_cast<int>(max))
|
||||
);
|
||||
}
|
||||
|
||||
inline UChar Rand(UChar min, UChar max)
|
||||
{
|
||||
return static_cast<UChar>(
|
||||
__rand_detail::RandomInt(static_cast<UInt32>(min), static_cast<UInt32>(max))
|
||||
);
|
||||
}
|
||||
|
||||
inline Float32 Rand(Float32 min, Float32 max)
|
||||
inline float Random(float min, float max)
|
||||
{
|
||||
return __rand_detail::RandomReal(min, max);
|
||||
}
|
||||
|
||||
inline Float64 Rand(Float64 min, Float64 max)
|
||||
inline double Random(double min, double max)
|
||||
{
|
||||
return __rand_detail::RandomReal(min, max);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,56 +26,56 @@ namespace kiwano
|
|||
{
|
||||
namespace math
|
||||
{
|
||||
inline Int32 Abs(Int32 val) { return ::abs(val); }
|
||||
inline int Abs(int val) { return ::abs(val); }
|
||||
|
||||
inline Float32 Abs(Float32 val) { return ::fabsf(val); }
|
||||
inline float Abs(float val) { return ::fabsf(val); }
|
||||
|
||||
inline Float64 Abs(Float64 val) { return ::fabs(val); }
|
||||
inline double Abs(double val) { return ::fabs(val); }
|
||||
|
||||
inline Float32 Sqrt(Float32 val) { return ::sqrtf(val); }
|
||||
inline float Sqrt(float val) { return ::sqrtf(val); }
|
||||
|
||||
inline Float64 Sqrt(Float64 val) { return ::sqrt(val); }
|
||||
inline double Sqrt(double val) { return ::sqrt(val); }
|
||||
|
||||
inline Float32 Pow(Float32 base, Float32 exponent) { return ::powf(base, exponent); }
|
||||
inline float Pow(float base, float exponent) { return ::powf(base, exponent); }
|
||||
|
||||
inline Float64 Pow(Float64 base, Float64 exponent) { return ::pow(base, exponent); }
|
||||
inline double Pow(double base, double exponent) { return ::pow(base, exponent); }
|
||||
|
||||
inline Int32 Sign(Int32 val) { return val < 0 ? -1 : 1; }
|
||||
inline int Sign(int val) { return val < 0 ? -1 : 1; }
|
||||
|
||||
inline Float32 Sign(Float32 val) { return val < 0 ? -1.f : 1.f; }
|
||||
inline float Sign(float val) { return val < 0 ? -1.f : 1.f; }
|
||||
|
||||
inline Float64 Sign(Float64 val) { return val < 0 ? -1.0 : 1.0; }
|
||||
inline double Sign(double val) { return val < 0 ? -1.0 : 1.0; }
|
||||
|
||||
inline Float32 Sin(Float32 val) { return ::sinf(val * constants::PI_F / 180.f); }
|
||||
inline float Sin(float val) { return ::sinf(val * constants::PI_F / 180.f); }
|
||||
|
||||
inline Float64 Sin(Float64 val) { return ::sin(val * constants::PI_D / 180.0); }
|
||||
inline double Sin(double val) { return ::sin(val * constants::PI_D / 180.0); }
|
||||
|
||||
inline Float32 Cos(Float32 val) { return ::cosf(val * constants::PI_F / 180.f); }
|
||||
inline float Cos(float val) { return ::cosf(val * constants::PI_F / 180.f); }
|
||||
|
||||
inline Float64 Cos(Float64 val) { return ::cos(val * constants::PI_D / 180.0); }
|
||||
inline double Cos(double val) { return ::cos(val * constants::PI_D / 180.0); }
|
||||
|
||||
inline Float32 Tan(Float32 val) { return ::tanf(val * constants::PI_F / 180.f); }
|
||||
inline float Tan(float val) { return ::tanf(val * constants::PI_F / 180.f); }
|
||||
|
||||
inline Float64 Tan(Float64 val) { return ::tan(val * constants::PI_D / 180.0); }
|
||||
inline double Tan(double val) { return ::tan(val * constants::PI_D / 180.0); }
|
||||
|
||||
inline Float32 Asin(Float32 val) { return ::asinf(val) * 180.f / constants::PI_F; }
|
||||
inline float Asin(float val) { return ::asinf(val) * 180.f / constants::PI_F; }
|
||||
|
||||
inline Float64 Asin(Float64 val) { return ::asin(val) * 180.f / constants::PI_F; }
|
||||
inline double Asin(double val) { return ::asin(val) * 180.f / constants::PI_F; }
|
||||
|
||||
inline Float32 Acos(Float32 val) { return ::acosf(val) * 180.f / constants::PI_F; }
|
||||
inline float Acos(float val) { return ::acosf(val) * 180.f / constants::PI_F; }
|
||||
|
||||
inline Float64 Acos(Float64 val) { return ::acos(val) * 180.f / constants::PI_F; }
|
||||
inline double Acos(double val) { return ::acos(val) * 180.f / constants::PI_F; }
|
||||
|
||||
inline Float32 Atan(Float32 val) { return ::atanf(val) * 180.f / constants::PI_F; }
|
||||
inline float Atan(float val) { return ::atanf(val) * 180.f / constants::PI_F; }
|
||||
|
||||
inline Float64 Atan(Float64 val) { return ::atan(val) * 180.f / constants::PI_F; }
|
||||
inline double Atan(double val) { return ::atan(val) * 180.f / constants::PI_F; }
|
||||
|
||||
inline Float32 Ceil(Float32 val) { return ::ceil(val); }
|
||||
inline float Ceil(float val) { return ::ceil(val); }
|
||||
|
||||
inline Float64 Ceil(Float64 val) { return ::ceil(val); }
|
||||
inline double Ceil(double val) { return ::ceil(val); }
|
||||
|
||||
inline Float32 Floor(Float32 val) { return ::floor(val); }
|
||||
inline float Floor(float val) { return ::floor(val); }
|
||||
|
||||
inline Float64 Floor(Float64 val) { return ::floor(val); }
|
||||
inline double Floor(double val) { return ::floor(val); }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace kiwano
|
|||
Queue<FunctionToPerform> functions_to_perform_;
|
||||
}
|
||||
|
||||
Config::Config(String const& title, UInt32 width, UInt32 height, UInt32 icon)
|
||||
Config::Config(String const& title, std::uint32_t width, std::uint32_t height, std::uint32_t icon)
|
||||
: debug(false)
|
||||
{
|
||||
window.title = title;
|
||||
|
|
@ -192,7 +192,7 @@ namespace kiwano
|
|||
}
|
||||
}
|
||||
|
||||
void Application::SetTimeScale(Float32 scale_factor)
|
||||
void Application::SetTimeScale(float scale_factor)
|
||||
{
|
||||
time_scale_ = scale_factor;
|
||||
}
|
||||
|
|
@ -282,7 +282,7 @@ namespace kiwano
|
|||
functions_to_perform_.push(Function);
|
||||
}
|
||||
|
||||
LRESULT CALLBACK Application::WndProc(HWND hwnd, UInt32 msg, WPARAM wparam, LPARAM lparam)
|
||||
LRESULT CALLBACK Application::WndProc(HWND hwnd, UINT32 msg, WPARAM wparam, LPARAM lparam)
|
||||
{
|
||||
Application* app = reinterpret_cast<Application*>(static_cast<LONG_PTR>(::GetWindowLongPtrW(hwnd, GWLP_USERDATA)));
|
||||
if (app == nullptr)
|
||||
|
|
@ -315,8 +315,8 @@ namespace kiwano
|
|||
{
|
||||
bool down = msg == WM_KEYDOWN || msg == WM_SYSKEYDOWN;
|
||||
Event evt(down ? Event::KeyDown : Event::KeyUp);
|
||||
evt.key.code = static_cast<Int32>(wparam);
|
||||
evt.key.count = static_cast<Int32>(lparam & 0xFF);
|
||||
evt.key.code = static_cast<int>(wparam);
|
||||
evt.key.count = static_cast<int>(lparam & 0xFF);
|
||||
|
||||
app->DispatchEvent(evt);
|
||||
}
|
||||
|
|
@ -326,7 +326,7 @@ namespace kiwano
|
|||
{
|
||||
Event evt(Event::Char);
|
||||
evt.key.c = static_cast<char>(wparam);
|
||||
evt.key.count = static_cast<Int32>(lparam & 0xFF);
|
||||
evt.key.count = static_cast<int>(lparam & 0xFF);
|
||||
|
||||
app->DispatchEvent(evt);
|
||||
}
|
||||
|
|
@ -346,15 +346,15 @@ namespace kiwano
|
|||
{
|
||||
Event evt;
|
||||
|
||||
evt.mouse.x = static_cast<Float32>(GET_X_LPARAM(lparam));
|
||||
evt.mouse.y = static_cast<Float32>(GET_Y_LPARAM(lparam));
|
||||
evt.mouse.x = static_cast<float>(GET_X_LPARAM(lparam));
|
||||
evt.mouse.y = static_cast<float>(GET_Y_LPARAM(lparam));
|
||||
evt.mouse.left_btn_down = !!(wparam & MK_LBUTTON);
|
||||
evt.mouse.left_btn_down = !!(wparam & MK_RBUTTON);
|
||||
|
||||
if (msg == WM_MOUSEMOVE) { evt.type = Event::MouseMove; }
|
||||
else if (msg == WM_LBUTTONDOWN || msg == WM_RBUTTONDOWN || msg == WM_MBUTTONDOWN) { evt.type = Event::MouseBtnDown; }
|
||||
else if (msg == WM_LBUTTONUP || msg == WM_RBUTTONUP || msg == WM_MBUTTONUP) { evt.type = Event::MouseBtnUp; }
|
||||
else if (msg == WM_MOUSEWHEEL) { evt.type = Event::MouseWheel; evt.mouse.wheel = GET_WHEEL_DELTA_WPARAM(wparam) / (Float32)WHEEL_DELTA; }
|
||||
else if (msg == WM_MOUSEWHEEL) { evt.type = Event::MouseWheel; evt.mouse.wheel = GET_WHEEL_DELTA_WPARAM(wparam) / (float)WHEEL_DELTA; }
|
||||
|
||||
if (msg == WM_LBUTTONDOWN || msg == WM_LBUTTONUP) { evt.mouse.button = MouseButton::Left; }
|
||||
else if (msg == WM_RBUTTONDOWN || msg == WM_RBUTTONUP) { evt.mouse.button = MouseButton::Right; }
|
||||
|
|
@ -386,8 +386,8 @@ namespace kiwano
|
|||
|
||||
case WM_MOVE:
|
||||
{
|
||||
Int32 x = (Int32)(short)LOWORD(lparam);
|
||||
Int32 y = (Int32)(short)HIWORD(lparam);
|
||||
int x = (int)(short)LOWORD(lparam);
|
||||
int y = (int)(short)HIWORD(lparam);
|
||||
|
||||
Event evt(Event::WindowMoved);
|
||||
evt.window.x = x;
|
||||
|
|
@ -413,7 +413,7 @@ namespace kiwano
|
|||
// KGE_LOG(L"Window title changed");
|
||||
|
||||
Event evt(Event::WindowTitleChanged);
|
||||
evt.window.title = reinterpret_cast<const WChar*>(lparam);
|
||||
evt.window.title = reinterpret_cast<const wchar_t*>(lparam);
|
||||
app->DispatchEvent(evt);
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@ namespace kiwano
|
|||
bool debug; // 调试模式
|
||||
|
||||
Config(
|
||||
String const& title = L"Kiwano Game",
|
||||
UInt32 width = 640,
|
||||
UInt32 height = 480,
|
||||
UInt32 icon = 0
|
||||
String const& title = L"Kiwano Game",
|
||||
std::uint32_t width = 640,
|
||||
std::uint32_t height = 480,
|
||||
std::uint32_t icon = 0
|
||||
);
|
||||
|
||||
Config(
|
||||
|
|
@ -87,7 +87,7 @@ namespace kiwano
|
|||
|
||||
// 设置时间缩放因子
|
||||
void SetTimeScale(
|
||||
Float32 scale_factor
|
||||
float scale_factor
|
||||
);
|
||||
|
||||
// 分发事件
|
||||
|
|
@ -104,12 +104,12 @@ namespace kiwano
|
|||
|
||||
void Update();
|
||||
|
||||
static LRESULT CALLBACK WndProc(HWND, UInt32, WPARAM, LPARAM);
|
||||
static LRESULT CALLBACK WndProc(HWND, UINT32, WPARAM, LPARAM);
|
||||
|
||||
protected:
|
||||
bool end_;
|
||||
bool inited_;
|
||||
Float32 time_scale_;
|
||||
float time_scale_;
|
||||
|
||||
Vector<ComponentBase*> comps_;
|
||||
Vector<RenderComponent*> render_comps_;
|
||||
|
|
|
|||
|
|
@ -87,12 +87,12 @@ namespace kiwano
|
|||
SetBrush(brush);
|
||||
}
|
||||
|
||||
Float32 Brush::GetOpacity() const
|
||||
float Brush::GetOpacity() const
|
||||
{
|
||||
return opacity_;
|
||||
}
|
||||
|
||||
void Brush::SetOpacity(Float32 opacity)
|
||||
void Brush::SetOpacity(float opacity)
|
||||
{
|
||||
opacity_ = opacity;
|
||||
if (raw_)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,12 @@ namespace kiwano
|
|||
// 渐变转换点
|
||||
struct GradientStop
|
||||
{
|
||||
Float32 offset;
|
||||
float offset;
|
||||
Color color;
|
||||
|
||||
GradientStop() : offset(0.f), color() {}
|
||||
|
||||
GradientStop(Float32 offset, Color color) : offset(offset), color(color) {}
|
||||
GradientStop(float offset, Color color) : offset(offset), color(color) {}
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -133,9 +133,9 @@ namespace kiwano
|
|||
RadialGradientStyle const& style
|
||||
);
|
||||
|
||||
Float32 GetOpacity() const;
|
||||
float GetOpacity() const;
|
||||
|
||||
void SetOpacity(Float32 opacity);
|
||||
void SetOpacity(float opacity);
|
||||
|
||||
public:
|
||||
enum class Type
|
||||
|
|
@ -159,7 +159,7 @@ namespace kiwano
|
|||
|
||||
protected:
|
||||
Type type_;
|
||||
Float32 opacity_;
|
||||
float opacity_;
|
||||
ComPtr<ID2D1Brush> raw_;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ namespace kiwano
|
|||
{
|
||||
namespace
|
||||
{
|
||||
const UInt32 RED_SHIFT = 16;
|
||||
const UInt32 GREEN_SHIFT = 8;
|
||||
const UInt32 BLUE_SHIFT = 0;
|
||||
const std::uint32_t RED_SHIFT = 16;
|
||||
const std::uint32_t GREEN_SHIFT = 8;
|
||||
const std::uint32_t BLUE_SHIFT = 0;
|
||||
|
||||
const UInt32 RED_MASK = 0xff << RED_SHIFT;
|
||||
const UInt32 GREEN_MASK = 0xff << GREEN_SHIFT;
|
||||
const UInt32 BLUE_MASK = 0xff << BLUE_SHIFT;
|
||||
const std::uint32_t RED_MASK = 0xff << RED_SHIFT;
|
||||
const std::uint32_t GREEN_MASK = 0xff << GREEN_SHIFT;
|
||||
const std::uint32_t BLUE_MASK = 0xff << BLUE_SHIFT;
|
||||
}
|
||||
|
||||
Color::Color()
|
||||
|
|
@ -41,7 +41,7 @@ namespace kiwano
|
|||
{
|
||||
}
|
||||
|
||||
Color::Color(Float32 r, Float32 g, Float32 b)
|
||||
Color::Color(float r, float g, float b)
|
||||
: r(r)
|
||||
, g(g)
|
||||
, b(b)
|
||||
|
|
@ -49,7 +49,7 @@ namespace kiwano
|
|||
{
|
||||
}
|
||||
|
||||
Color::Color(Float32 r, Float32 g, Float32 b, Float32 alpha)
|
||||
Color::Color(float r, float g, float b, float alpha)
|
||||
: r(r)
|
||||
, g(g)
|
||||
, b(b)
|
||||
|
|
@ -57,7 +57,7 @@ namespace kiwano
|
|||
{
|
||||
}
|
||||
|
||||
Color::Color(UInt32 rgb)
|
||||
Color::Color(std::uint32_t rgb)
|
||||
: r(((rgb & RED_MASK) >> RED_SHIFT) / 255.f)
|
||||
, g(((rgb & GREEN_MASK) >> GREEN_SHIFT) / 255.f)
|
||||
, b(((rgb & BLUE_MASK) >> BLUE_SHIFT) / 255.f)
|
||||
|
|
@ -65,7 +65,7 @@ namespace kiwano
|
|||
{
|
||||
}
|
||||
|
||||
Color::Color(UInt32 rgb, Float32 alpha)
|
||||
Color::Color(std::uint32_t rgb, float alpha)
|
||||
: r(((rgb & RED_MASK) >> RED_SHIFT) / 255.f)
|
||||
, g(((rgb & GREEN_MASK) >> GREEN_SHIFT) / 255.f)
|
||||
, b(((rgb & BLUE_MASK) >> BLUE_SHIFT) / 255.f)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace kiwano
|
|||
// 使用枚举表示颜色: Color blue = Color::Blue;
|
||||
// 使用 RGB 表示一个颜色: Color red(1.0f, 0.0f, 0.0f);
|
||||
// 使用 RGBA 表示一个带透明度的颜色: Color not_black(1.0f, 1.0f, 1.0f, 0.5f);
|
||||
// 使用一个 UInt32 类型的值表示 RGB: Color black(0x000000);
|
||||
// 使用一个 std::uint32_t 类型的值表示 RGB: Color black(0x000000);
|
||||
//
|
||||
class KGE_API Color
|
||||
{
|
||||
|
|
@ -37,25 +37,25 @@ namespace kiwano
|
|||
Color();
|
||||
|
||||
Color(
|
||||
Float32 r,
|
||||
Float32 g,
|
||||
Float32 b
|
||||
float r,
|
||||
float g,
|
||||
float b
|
||||
);
|
||||
|
||||
Color(
|
||||
Float32 r,
|
||||
Float32 g,
|
||||
Float32 b,
|
||||
Float32 alpha
|
||||
float r,
|
||||
float g,
|
||||
float b,
|
||||
float alpha
|
||||
);
|
||||
|
||||
Color(
|
||||
UInt32 rgb
|
||||
std::uint32_t rgb
|
||||
);
|
||||
|
||||
Color(
|
||||
UInt32 rgb,
|
||||
Float32 alpha
|
||||
std::uint32_t rgb,
|
||||
float alpha
|
||||
);
|
||||
|
||||
inline bool operator== (const Color& rhs) const
|
||||
|
|
@ -69,7 +69,7 @@ namespace kiwano
|
|||
}
|
||||
|
||||
public:
|
||||
enum Value : UInt32
|
||||
enum Value : std::uint32_t
|
||||
{
|
||||
Black = 0x000000,
|
||||
Blue = 0x0000FF,
|
||||
|
|
@ -113,9 +113,9 @@ namespace kiwano
|
|||
};
|
||||
|
||||
public:
|
||||
Float32 r;
|
||||
Float32 g;
|
||||
Float32 b;
|
||||
Float32 a;
|
||||
float r;
|
||||
float g;
|
||||
float b;
|
||||
float a;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
namespace kiwano
|
||||
{
|
||||
Font::Font(String const& family, Float32 size, UInt32 weight, bool italic)
|
||||
Font::Font(String const& family, float size, std::uint32_t weight, bool italic)
|
||||
: family(family)
|
||||
, size(size)
|
||||
, weight(weight)
|
||||
|
|
@ -31,7 +31,7 @@ namespace kiwano
|
|||
{
|
||||
}
|
||||
|
||||
Font::Font(FontCollection collection, String const& family, Float32 size, UInt32 weight, bool italic)
|
||||
Font::Font(FontCollection collection, String const& family, float size, std::uint32_t weight, bool italic)
|
||||
: family(family)
|
||||
, size(size)
|
||||
, weight(weight)
|
||||
|
|
|
|||
|
|
@ -24,17 +24,20 @@
|
|||
namespace kiwano
|
||||
{
|
||||
// 字体粗细值
|
||||
enum FontWeight : UInt32
|
||||
struct FontWeight
|
||||
{
|
||||
Thin = 100,
|
||||
ExtraLight = 200,
|
||||
Light = 300,
|
||||
Normal = 400,
|
||||
Medium = 500,
|
||||
Bold = 700,
|
||||
ExtraBold = 800,
|
||||
Black = 900,
|
||||
ExtraBlack = 950
|
||||
enum Value : std::uint32_t
|
||||
{
|
||||
Thin = 100U,
|
||||
ExtraLight = 200U,
|
||||
Light = 300U,
|
||||
Normal = 400U,
|
||||
Medium = 500U,
|
||||
Bold = 700U,
|
||||
ExtraBold = 800U,
|
||||
Black = 900U,
|
||||
ExtraBlack = 950U
|
||||
};
|
||||
};
|
||||
|
||||
// 字体
|
||||
|
|
@ -42,24 +45,24 @@ namespace kiwano
|
|||
{
|
||||
public:
|
||||
String family; // 字体族
|
||||
Float32 size; // ×ÖºÅ
|
||||
UInt32 weight; // ´Öϸֵ
|
||||
float size; // ×ÖºÅ
|
||||
std::uint32_t weight; // ´Öϸֵ
|
||||
bool italic; // 是否斜体
|
||||
FontCollection collection; // 字体集
|
||||
|
||||
public:
|
||||
Font(
|
||||
String const& family = L"",
|
||||
Float32 size = 18,
|
||||
UInt32 weight = FontWeight::Normal,
|
||||
float size = 18,
|
||||
std::uint32_t weight = FontWeight::Normal,
|
||||
bool italic = false
|
||||
);
|
||||
|
||||
Font(
|
||||
FontCollection collection,
|
||||
String const& family = L"",
|
||||
Float32 size = 18,
|
||||
UInt32 weight = FontWeight::Normal,
|
||||
float size = 18,
|
||||
std::uint32_t weight = FontWeight::Normal,
|
||||
bool italic = false
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -65,9 +65,9 @@ namespace kiwano
|
|||
return bounds;
|
||||
}
|
||||
|
||||
Float32 Geometry::GetLength() const
|
||||
float Geometry::GetLength() const
|
||||
{
|
||||
Float32 length = 0.f;
|
||||
float length = 0.f;
|
||||
if (geo_)
|
||||
{
|
||||
// no matter it failed or not
|
||||
|
|
@ -76,7 +76,7 @@ namespace kiwano
|
|||
return length;
|
||||
}
|
||||
|
||||
bool Geometry::ComputePointAtLength(Float32 length, Point& point, Vec2& tangent) const
|
||||
bool Geometry::ComputePointAtLength(float length, Point& point, Vec2& tangent) const
|
||||
{
|
||||
if (geo_)
|
||||
{
|
||||
|
|
@ -124,7 +124,7 @@ namespace kiwano
|
|||
sink.Init();
|
||||
sink.OpenSink();
|
||||
|
||||
for (UInt32 i = 0; i < geos.size() - 1; i++)
|
||||
for (std::size_t i = 0; i < geos.size() - 1; i++)
|
||||
{
|
||||
CombineMode mode = (modes.size() == 1) ? modes[0] : modes[i];
|
||||
const Matrix3x2& matrix = (matrixs.size() == 1) ? matrixs[0] : matrixs[i];
|
||||
|
|
@ -145,12 +145,12 @@ namespace kiwano
|
|||
return Geometry();
|
||||
}
|
||||
|
||||
Float32 Geometry::ComputeArea() const
|
||||
float Geometry::ComputeArea() const
|
||||
{
|
||||
if (!geo_)
|
||||
return 0.f;
|
||||
|
||||
Float32 area = 0.f;
|
||||
float area = 0.f;
|
||||
// no matter it failed or not
|
||||
geo_->ComputeArea(D2D1::Matrix3x2F::Identity(), &area);
|
||||
return area;
|
||||
|
|
@ -192,7 +192,7 @@ namespace kiwano
|
|||
return output;
|
||||
}
|
||||
|
||||
Geometry Geometry::CreateCircle(Point const& center, Float32 radius)
|
||||
Geometry Geometry::CreateCircle(Point const& center, float radius)
|
||||
{
|
||||
Geometry output;
|
||||
Renderer::GetInstance()->CreateEllipseGeometry(output, center, Vec2{ radius, radius });
|
||||
|
|
@ -252,16 +252,16 @@ namespace kiwano
|
|||
|
||||
sink_->AddLines(
|
||||
reinterpret_cast<const D2D_POINT_2F*>(&points[0]),
|
||||
static_cast<UInt32>(points.size())
|
||||
static_cast<std::uint32_t>(points.size())
|
||||
);
|
||||
return (*this);
|
||||
}
|
||||
|
||||
GeometrySink& kiwano::GeometrySink::AddLines(const Point* points, UInt32 count)
|
||||
GeometrySink& kiwano::GeometrySink::AddLines(const Point* points, std::size_t count)
|
||||
{
|
||||
if (!sink_) BeginPath();
|
||||
|
||||
sink_->AddLines(reinterpret_cast<const D2D_POINT_2F*>(points), count);
|
||||
sink_->AddLines(reinterpret_cast<const D2D_POINT_2F*>(points), UINT32(count));
|
||||
return (*this);
|
||||
}
|
||||
|
||||
|
|
@ -279,7 +279,7 @@ namespace kiwano
|
|||
return (*this);
|
||||
}
|
||||
|
||||
GeometrySink& GeometrySink::AddArc(Point const& point, Size const& radius, Float32 rotation, bool clockwise, bool is_small)
|
||||
GeometrySink& GeometrySink::AddArc(Point const& point, Size const& radius, float rotation, bool clockwise, bool is_small)
|
||||
{
|
||||
if (!sink_) BeginPath();
|
||||
|
||||
|
|
|
|||
|
|
@ -59,14 +59,14 @@ namespace kiwano
|
|||
) const;
|
||||
|
||||
// 获取图形展开成一条直线的长度
|
||||
Float32 GetLength() const;
|
||||
float GetLength() const;
|
||||
|
||||
// 计算面积
|
||||
Float32 ComputeArea() const;
|
||||
float ComputeArea() const;
|
||||
|
||||
// 计算图形路径上点的位置和切线向量
|
||||
bool ComputePointAtLength(
|
||||
Float32 length,
|
||||
float length,
|
||||
Point& point,
|
||||
Vec2& tangent
|
||||
) const;
|
||||
|
|
@ -106,7 +106,7 @@ namespace kiwano
|
|||
// 创建圆形
|
||||
static Geometry CreateCircle(
|
||||
Point const& center,
|
||||
Float32 radius
|
||||
float radius
|
||||
);
|
||||
|
||||
// 创建椭圆形
|
||||
|
|
@ -157,7 +157,7 @@ namespace kiwano
|
|||
// 添加多条线段
|
||||
GeometrySink& AddLines(
|
||||
const Point* points,
|
||||
UInt32 count
|
||||
std::size_t count
|
||||
);
|
||||
|
||||
// 添加一条三次方贝塞尔曲线
|
||||
|
|
@ -171,7 +171,7 @@ namespace kiwano
|
|||
GeometrySink& AddArc(
|
||||
Point const& point, /* 终点 */
|
||||
Size const& radius, /* 椭圆半径 */
|
||||
Float32 rotation, /* ÍÖÔ²Ðýת½Ç¶È */
|
||||
float rotation, /* ÍÖÔ²Ðýת½Ç¶È */
|
||||
bool clockwise = true, /* 顺时针 or 逆时针 */
|
||||
bool is_small = true /* 是否取小于 180° 的弧 */
|
||||
);
|
||||
|
|
|
|||
|
|
@ -95,8 +95,8 @@ namespace kiwano
|
|||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
UInt32 width = 0;
|
||||
UInt32 height = 0;
|
||||
std::uint32_t width = 0;
|
||||
std::uint32_t height = 0;
|
||||
|
||||
PROPVARIANT prop_val;
|
||||
::PropVariantInit(&prop_val);
|
||||
|
|
@ -148,17 +148,17 @@ namespace kiwano
|
|||
{
|
||||
// 需要计算比率
|
||||
// 最高像素 1:4,最宽像素 4:1,增量为 1/64
|
||||
Float32 pixel_asp_ratio = (prop_val.bVal + 15.f) / 64.f;
|
||||
float pixel_asp_ratio = (prop_val.bVal + 15.f) / 64.f;
|
||||
|
||||
// 根据像素长宽比计算像素中的图像宽度和高度,只缩小图像
|
||||
if (pixel_asp_ratio > 1.f)
|
||||
{
|
||||
width_in_pixels_ = width;
|
||||
height_in_pixels_ = static_cast<UInt32>(height / pixel_asp_ratio);
|
||||
height_in_pixels_ = static_cast<std::uint32_t>(height / pixel_asp_ratio);
|
||||
}
|
||||
else
|
||||
{
|
||||
width_in_pixels_ = static_cast<UInt32>(width * pixel_asp_ratio);
|
||||
width_in_pixels_ = static_cast<std::uint32_t>(width * pixel_asp_ratio);
|
||||
height_in_pixels_ = height;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue