diff options
author | chai <chaifix@163.com> | 2019-08-06 09:14:11 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-06 09:14:11 +0800 |
commit | 9686368e58e25cbd6dc37d686bdd2be3f80486d6 (patch) | |
tree | b4887373c33f29a0e837420042a8c84d98bdba49 | |
parent | 7638df1ed1f0f314d78bd42e0aba084ba14ade0a (diff) |
*misc
35 files changed, 591 insertions, 227 deletions
diff --git a/Build/Asura.Editor/Asura.Editor.vcxproj b/Build/Asura.Editor/Asura.Editor.vcxproj index b2168db..17f9a04 100644 --- a/Build/Asura.Editor/Asura.Editor.vcxproj +++ b/Build/Asura.Editor/Asura.Editor.vcxproj @@ -78,6 +78,10 @@ <ConformanceMode>true</ConformanceMode> <AdditionalIncludeDirectories>$(SolutionDir)..\source\external;$(SolutionDir)..\source\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ClCompile> + <PreBuildEvent> + <Command> + </Command> + </PreBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> @@ -115,6 +119,10 @@ <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> </Link> + <PreBuildEvent> + <Command> + </Command> + </PreBuildEvent> </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="..\..\source\Asura.Editor\Controls\GUIButton.cpp" /> @@ -135,10 +143,11 @@ <ClCompile Include="..\..\source\Asura.Editor\Main.cpp" /> <ClCompile Include="..\..\source\Asura.Editor\System\ContainerWindow.cpp" /> <ClCompile Include="..\..\source\Asura.Editor\System\FileWatcher.cpp" /> + <ClCompile Include="..\..\source\Asura.Editor\System\Input.cpp" /> <ClCompile Include="..\..\source\Asura.Editor\System\MenuController.cpp" /> </ItemGroup> <ItemGroup> - <ClInclude Include="..\..\source\Asura.Editor\Config.h" /> + <ClInclude Include="..\..\source\Asura.Editor\Configure\BuildConfigure.h" /> <ClInclude Include="..\..\source\Asura.Editor\Controls\GUIButton.h" /> <ClInclude Include="..\..\source\Asura.Editor\Controls\GUIContent.h" /> <ClInclude Include="..\..\source\Asura.Editor\Controls\GUILabel.h" /> @@ -160,9 +169,18 @@ <ClInclude Include="..\..\source\Asura.Editor\Layout\VerticalLayout.h" /> <ClInclude Include="..\..\source\Asura.Editor\System\ContainerWindow.h" /> <ClInclude Include="..\..\source\Asura.Editor\System\FileWatcher.h" /> + <ClInclude Include="..\..\source\Asura.Editor\System\Input.h" /> <ClInclude Include="..\..\source\Asura.Editor\System\MenuController.h" /> <ClInclude Include="..\..\source\Asura.Editor\Type.h" /> </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\configure\EditorConfigure\EditorConfigure.vcxproj"> + <Project>{93cfefab-3922-4d81-91fd-8a80e9785fc6}</Project> + </ProjectReference> + <ProjectReference Include="..\modules\asura-core\asura-core.vcxproj"> + <Project>{29a6837a-67fa-403f-83fd-e7975649404f}</Project> + </ProjectReference> + </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> diff --git a/Build/Asura.Editor/Asura.Editor.vcxproj.filters b/Build/Asura.Editor/Asura.Editor.vcxproj.filters index a535cb8..429b902 100644 --- a/Build/Asura.Editor/Asura.Editor.vcxproj.filters +++ b/Build/Asura.Editor/Asura.Editor.vcxproj.filters @@ -22,6 +22,9 @@ <Filter Include="Controls\Binding"> <UniqueIdentifier>{1e378398-d7f0-4616-a986-b6a86faeaa8c}</UniqueIdentifier> </Filter> + <Filter Include="Configure"> + <UniqueIdentifier>{799e7ea2-8870-4d1e-b278-b3a0dd912632}</UniqueIdentifier> + </Filter> </ItemGroup> <ItemGroup> <ClCompile Include="..\..\source\Asura.Editor\Controls\GUIButton.cpp"> @@ -77,6 +80,9 @@ <ClCompile Include="..\..\source\Asura.Editor\Controls\TextUtil.cpp"> <Filter>Controls</Filter> </ClCompile> + <ClCompile Include="..\..\source\Asura.Editor\System\Input.cpp"> + <Filter>System</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\source\Asura.Editor\graphics\shaders\image.shader.h"> @@ -130,7 +136,6 @@ <ClInclude Include="..\..\source\Asura.Editor\System\FileWatcher.h"> <Filter>System</Filter> </ClInclude> - <ClInclude Include="..\..\source\Asura.Editor\Config.h" /> <ClInclude Include="..\..\source\Asura.Editor\Editor.h" /> <ClInclude Include="..\..\source\Asura.Editor\Type.h" /> <ClInclude Include="..\..\source\Asura.Editor\Controls\GUISlider.h"> @@ -145,5 +150,11 @@ <ClInclude Include="..\..\source\Asura.Editor\Controls\TextUtil.h"> <Filter>Controls</Filter> </ClInclude> + <ClInclude Include="..\..\source\Asura.Editor\System\Input.h"> + <Filter>System</Filter> + </ClInclude> + <ClInclude Include="..\..\source\Asura.Editor\Configure\BuildConfigure.h"> + <Filter>Configure</Filter> + </ClInclude> </ItemGroup> </Project>
\ No newline at end of file diff --git a/Build/Asura.sln b/Build/Asura.sln index a25b5d5..b41cd9c 100644 --- a/Build/Asura.sln +++ b/Build/Asura.sln @@ -115,6 +115,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asura-fmod", "modules\asura EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asura-base", "modules\asura-base\asura-base.vcxproj", "{E10B78AA-B90E-4BB7-BAAD-0E2E4C4B9BD1}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "configure", "configure", "{1C5D0C23-C0A9-4200-BD67-B5B8F6DDE41C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EditorConfigure", "configure\EditorConfigure\EditorConfigure.vcxproj", "{93CFEFAB-3922-4D81-91FD-8A80E9785FC6}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -637,6 +641,16 @@ Global {E10B78AA-B90E-4BB7-BAAD-0E2E4C4B9BD1}.Release|x64.Build.0 = Release|x64 {E10B78AA-B90E-4BB7-BAAD-0E2E4C4B9BD1}.Release|x86.ActiveCfg = Release|Win32 {E10B78AA-B90E-4BB7-BAAD-0E2E4C4B9BD1}.Release|x86.Build.0 = Release|Win32 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Debug|x64.ActiveCfg = Debug|x64 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Debug|x64.Build.0 = Debug|x64 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Debug|x86.ActiveCfg = Debug|Win32 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Debug|x86.Build.0 = Debug|Win32 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Release|Any CPU.ActiveCfg = Release|Win32 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Release|x64.ActiveCfg = Release|x64 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Release|x64.Build.0 = Release|x64 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Release|x86.ActiveCfg = Release|Win32 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -688,6 +702,7 @@ Global {61BF82F8-2802-4852-BF70-21D6F9F44EBB} = {64D4E4B2-4A60-46F4-A500-370EFED4524F} {CC451230-39E1-403A-8E1F-C3E7982049E5} = {CD115016-E377-4AC1-8595-DB2836CEFE7E} {E10B78AA-B90E-4BB7-BAAD-0E2E4C4B9BD1} = {CD115016-E377-4AC1-8595-DB2836CEFE7E} + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6} = {1C5D0C23-C0A9-4200-BD67-B5B8F6DDE41C} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {331032D8-F7CC-43E3-A03B-67108767F96B} diff --git a/Source/Asura.Editor/main.cpp b/Source/Asura.Editor/main.cpp index 207474b..87207f0 100644 --- a/Source/Asura.Editor/main.cpp +++ b/Source/Asura.Editor/main.cpp @@ -1,30 +1,33 @@ -/** - * Copyright (c) 2018-2019 AsuraEngine Team - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software m_ust not be m_isrepresented; you m_ust not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions m_ust be plainly m_arked as such, and m_ust not be - * m_isrepresented as being the original software. - * 3. This notice m_ay not be removed or altered from any source distribution. - **/ +#include <windows.h> -/// -/// ༭ĽͨdirectUIʵ֣Ⱦasura-libϣ¼Ӧͨwin32APIʵ֡ -/// -int main(int argn, char* args[]) -{ +int main(int argn, char* args[]) +{ + bool gotMsg; + MSG msg; + msg.message = WM_NULL; + PeekMessage(&msg, NULL, 0U, 0U, PM_NOREMOVE); + HANDLE hevent = (HANDLE)CreateEvent(NULL, FALSE, FALSE, NULL); + while (WM_QUIT != msg.message) + { + // Use PeekMessage() if the app is active, so we can use idle time to + // render the scene. Else, use GetMessage() to avoid eating CPU time. + //bool dontWaitForMessages = gAppActive || (!gAlreadyClosing && GetPlayerRunInBackground()) || (kPlayerPausing == GetPlayerPause()); + bool dontWaitForMessages = false; + if (dontWaitForMessages) + gotMsg = (PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE) != 0); + else + gotMsg = (GetMessage(&msg, NULL, 0U, 0U) != 0); + if (gotMsg) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + else { + // perform main loop + //PerformMainLoop(); + } + } }
\ No newline at end of file diff --git a/bin/win64/01-window.exe b/bin/win64/01-window.exe Binary files differindex 7abc18a..190a0a7 100644 --- a/bin/win64/01-window.exe +++ b/bin/win64/01-window.exe diff --git a/build/Asura.Editor/Asura.Editor.vcxproj b/build/Asura.Editor/Asura.Editor.vcxproj index b2168db..17f9a04 100644 --- a/build/Asura.Editor/Asura.Editor.vcxproj +++ b/build/Asura.Editor/Asura.Editor.vcxproj @@ -78,6 +78,10 @@ <ConformanceMode>true</ConformanceMode> <AdditionalIncludeDirectories>$(SolutionDir)..\source\external;$(SolutionDir)..\source\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ClCompile> + <PreBuildEvent> + <Command> + </Command> + </PreBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> @@ -115,6 +119,10 @@ <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> </Link> + <PreBuildEvent> + <Command> + </Command> + </PreBuildEvent> </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="..\..\source\Asura.Editor\Controls\GUIButton.cpp" /> @@ -135,10 +143,11 @@ <ClCompile Include="..\..\source\Asura.Editor\Main.cpp" /> <ClCompile Include="..\..\source\Asura.Editor\System\ContainerWindow.cpp" /> <ClCompile Include="..\..\source\Asura.Editor\System\FileWatcher.cpp" /> + <ClCompile Include="..\..\source\Asura.Editor\System\Input.cpp" /> <ClCompile Include="..\..\source\Asura.Editor\System\MenuController.cpp" /> </ItemGroup> <ItemGroup> - <ClInclude Include="..\..\source\Asura.Editor\Config.h" /> + <ClInclude Include="..\..\source\Asura.Editor\Configure\BuildConfigure.h" /> <ClInclude Include="..\..\source\Asura.Editor\Controls\GUIButton.h" /> <ClInclude Include="..\..\source\Asura.Editor\Controls\GUIContent.h" /> <ClInclude Include="..\..\source\Asura.Editor\Controls\GUILabel.h" /> @@ -160,9 +169,18 @@ <ClInclude Include="..\..\source\Asura.Editor\Layout\VerticalLayout.h" /> <ClInclude Include="..\..\source\Asura.Editor\System\ContainerWindow.h" /> <ClInclude Include="..\..\source\Asura.Editor\System\FileWatcher.h" /> + <ClInclude Include="..\..\source\Asura.Editor\System\Input.h" /> <ClInclude Include="..\..\source\Asura.Editor\System\MenuController.h" /> <ClInclude Include="..\..\source\Asura.Editor\Type.h" /> </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\configure\EditorConfigure\EditorConfigure.vcxproj"> + <Project>{93cfefab-3922-4d81-91fd-8a80e9785fc6}</Project> + </ProjectReference> + <ProjectReference Include="..\modules\asura-core\asura-core.vcxproj"> + <Project>{29a6837a-67fa-403f-83fd-e7975649404f}</Project> + </ProjectReference> + </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> diff --git a/build/Asura.Editor/Asura.Editor.vcxproj.filters b/build/Asura.Editor/Asura.Editor.vcxproj.filters index a535cb8..429b902 100644 --- a/build/Asura.Editor/Asura.Editor.vcxproj.filters +++ b/build/Asura.Editor/Asura.Editor.vcxproj.filters @@ -22,6 +22,9 @@ <Filter Include="Controls\Binding"> <UniqueIdentifier>{1e378398-d7f0-4616-a986-b6a86faeaa8c}</UniqueIdentifier> </Filter> + <Filter Include="Configure"> + <UniqueIdentifier>{799e7ea2-8870-4d1e-b278-b3a0dd912632}</UniqueIdentifier> + </Filter> </ItemGroup> <ItemGroup> <ClCompile Include="..\..\source\Asura.Editor\Controls\GUIButton.cpp"> @@ -77,6 +80,9 @@ <ClCompile Include="..\..\source\Asura.Editor\Controls\TextUtil.cpp"> <Filter>Controls</Filter> </ClCompile> + <ClCompile Include="..\..\source\Asura.Editor\System\Input.cpp"> + <Filter>System</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\source\Asura.Editor\graphics\shaders\image.shader.h"> @@ -130,7 +136,6 @@ <ClInclude Include="..\..\source\Asura.Editor\System\FileWatcher.h"> <Filter>System</Filter> </ClInclude> - <ClInclude Include="..\..\source\Asura.Editor\Config.h" /> <ClInclude Include="..\..\source\Asura.Editor\Editor.h" /> <ClInclude Include="..\..\source\Asura.Editor\Type.h" /> <ClInclude Include="..\..\source\Asura.Editor\Controls\GUISlider.h"> @@ -145,5 +150,11 @@ <ClInclude Include="..\..\source\Asura.Editor\Controls\TextUtil.h"> <Filter>Controls</Filter> </ClInclude> + <ClInclude Include="..\..\source\Asura.Editor\System\Input.h"> + <Filter>System</Filter> + </ClInclude> + <ClInclude Include="..\..\source\Asura.Editor\Configure\BuildConfigure.h"> + <Filter>Configure</Filter> + </ClInclude> </ItemGroup> </Project>
\ No newline at end of file diff --git a/build/Asura.sln b/build/Asura.sln index a25b5d5..b41cd9c 100644 --- a/build/Asura.sln +++ b/build/Asura.sln @@ -115,6 +115,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asura-fmod", "modules\asura EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asura-base", "modules\asura-base\asura-base.vcxproj", "{E10B78AA-B90E-4BB7-BAAD-0E2E4C4B9BD1}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "configure", "configure", "{1C5D0C23-C0A9-4200-BD67-B5B8F6DDE41C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EditorConfigure", "configure\EditorConfigure\EditorConfigure.vcxproj", "{93CFEFAB-3922-4D81-91FD-8A80E9785FC6}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -637,6 +641,16 @@ Global {E10B78AA-B90E-4BB7-BAAD-0E2E4C4B9BD1}.Release|x64.Build.0 = Release|x64 {E10B78AA-B90E-4BB7-BAAD-0E2E4C4B9BD1}.Release|x86.ActiveCfg = Release|Win32 {E10B78AA-B90E-4BB7-BAAD-0E2E4C4B9BD1}.Release|x86.Build.0 = Release|Win32 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Debug|x64.ActiveCfg = Debug|x64 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Debug|x64.Build.0 = Debug|x64 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Debug|x86.ActiveCfg = Debug|Win32 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Debug|x86.Build.0 = Debug|Win32 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Release|Any CPU.ActiveCfg = Release|Win32 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Release|x64.ActiveCfg = Release|x64 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Release|x64.Build.0 = Release|x64 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Release|x86.ActiveCfg = Release|Win32 + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -688,6 +702,7 @@ Global {61BF82F8-2802-4852-BF70-21D6F9F44EBB} = {64D4E4B2-4A60-46F4-A500-370EFED4524F} {CC451230-39E1-403A-8E1F-C3E7982049E5} = {CD115016-E377-4AC1-8595-DB2836CEFE7E} {E10B78AA-B90E-4BB7-BAAD-0E2E4C4B9BD1} = {CD115016-E377-4AC1-8595-DB2836CEFE7E} + {93CFEFAB-3922-4D81-91FD-8A80E9785FC6} = {1C5D0C23-C0A9-4200-BD67-B5B8F6DDE41C} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {331032D8-F7CC-43E3-A03B-67108767F96B} diff --git a/build/configure/EditorConfigure/EditorConfigure.vcxproj b/build/configure/EditorConfigure/EditorConfigure.vcxproj new file mode 100644 index 0000000..429ca2d --- /dev/null +++ b/build/configure/EditorConfigure/EditorConfigure.vcxproj @@ -0,0 +1,136 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <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"> + <VCProjectVersion>15.0</VCProjectVersion> + <ProjectGuid>{93CFEFAB-3922-4D81-91FD-8A80E9785FC6}</ProjectGuid> + <RootNamespace>EditorConfigure</RootNamespace> + <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v141</PlatformToolset> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v141</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Utility</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v141</PlatformToolset> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Utility</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v141</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>MultiByte</CharacterSet> + </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 /> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <SDLCheck>true</SDLCheck> + <ConformanceMode>true</ConformanceMode> + </ClCompile> + <PreBuildEvent> + <Command>copy $(SolutionDir)..\source\Asura.Editor\Configure\BuildConfigure.h $(SolutionDir)..\source\modules\asura-base\BuildConfigure.h</Command> + </PreBuildEvent> + <CustomBuildStep> + <Command> + </Command> + </CustomBuildStep> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <SDLCheck>true</SDLCheck> + <ConformanceMode>true</ConformanceMode> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <SDLCheck>true</SDLCheck> + <ConformanceMode>true</ConformanceMode> + </ClCompile> + <Link> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <SDLCheck>true</SDLCheck> + <ConformanceMode>true</ConformanceMode> + </ClCompile> + <Link> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + <PreBuildEvent> + <Command>copy $(SolutionDir)..\source\Asura.Editor\Configure\BuildConfigure.h $(SolutionDir)..\source\modules\asura-base\BuildConfigure.h</Command> + </PreBuildEvent> + <CustomBuildStep> + <Command> + </Command> + </CustomBuildStep> + </ItemDefinitionGroup> + <ItemGroup> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/build/configure/EditorConfigure/EditorConfigure.vcxproj.filters b/build/configure/EditorConfigure/EditorConfigure.vcxproj.filters new file mode 100644 index 0000000..9cd8510 --- /dev/null +++ b/build/configure/EditorConfigure/EditorConfigure.vcxproj.filters @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
\ No newline at end of file diff --git a/build/configure/EditorConfigure/EditorConfigure.vcxproj.user b/build/configure/EditorConfigure/EditorConfigure.vcxproj.user new file mode 100644 index 0000000..be25078 --- /dev/null +++ b/build/configure/EditorConfigure/EditorConfigure.vcxproj.user @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup /> +</Project>
\ No newline at end of file diff --git a/build/modules/asura-base/asura-base.vcxproj b/build/modules/asura-base/asura-base.vcxproj index f49fccb..df4d426 100644 --- a/build/modules/asura-base/asura-base.vcxproj +++ b/build/modules/asura-base/asura-base.vcxproj @@ -19,7 +19,8 @@ </ProjectConfiguration> </ItemGroup> <ItemGroup> - <ClInclude Include="..\..\..\source\modules\asura-base\Config.h" /> + <ClInclude Include="..\..\..\source\modules\asura-base\Configure.h" /> + <ClInclude Include="..\..\..\source\modules\asura-base\BuildConfigure.h" /> </ItemGroup> <PropertyGroup Label="Globals"> <VCProjectVersion>15.0</VCProjectVersion> diff --git a/build/modules/asura-base/asura-base.vcxproj.filters b/build/modules/asura-base/asura-base.vcxproj.filters index cae08e9..d1db8b3 100644 --- a/build/modules/asura-base/asura-base.vcxproj.filters +++ b/build/modules/asura-base/asura-base.vcxproj.filters @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> - <ClInclude Include="..\..\..\source\modules\asura-base\Config.h" /> + <ClInclude Include="..\..\..\source\modules\asura-base\BuildConfigure.h" /> + <ClInclude Include="..\..\..\source\modules\asura-base\Configure.h" /> </ItemGroup> </Project>
\ No newline at end of file diff --git a/build/tests/win32/01-window/01-window.vcxproj b/build/tests/win32/01-window/01-window.vcxproj index 8206184..c3c4a67 100644 --- a/build/tests/win32/01-window/01-window.vcxproj +++ b/build/tests/win32/01-window/01-window.vcxproj @@ -100,6 +100,9 @@ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies> <SubSystem>Windows</SubSystem> </Link> + <PreBuildEvent> + <Command>echo "===========build"</Command> + </PreBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> @@ -145,6 +148,9 @@ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies> <SubSystem>Windows</SubSystem> </Link> + <PreBuildEvent> + <Command>echo "===========build"</Command> + </PreBuildEvent> </ItemDefinitionGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> diff --git a/source/Asura.Editor/Config.h b/source/Asura.Editor/Config.h deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/Config.h +++ /dev/null diff --git a/source/Asura.Editor/Configure/BuildConfigure.h b/source/Asura.Editor/Configure/BuildConfigure.h new file mode 100644 index 0000000..6fd3aad --- /dev/null +++ b/source/Asura.Editor/Configure/BuildConfigure.h @@ -0,0 +1,8 @@ +// Copy to asura-configure folder + +#ifndef _ASURA_EDITOR_CONFIGURE_H_ +#define _ASURA_EDITOR_CONFIGURE_H_ + +#define ASURA_EDITOR 1 + +#endif
\ No newline at end of file diff --git a/source/Asura.Editor/Controls/GUILabel.cpp b/source/Asura.Editor/Controls/GUILabel.cpp index c5741c1..90b277b 100644 --- a/source/Asura.Editor/Controls/GUILabel.cpp +++ b/source/Asura.Editor/Controls/GUILabel.cpp @@ -1,4 +1,4 @@ -#include "gui_button.h" +#include "GUIButton.h" namespace_begin(AsuraEditor) diff --git a/source/Asura.Editor/Core/GUIState.h b/source/Asura.Editor/Core/GUIState.h index 88c9891..0abaf58 100644 --- a/source/Asura.Editor/Core/GUIState.h +++ b/source/Asura.Editor/Core/GUIState.h @@ -19,9 +19,9 @@ private: }; +extern GUIState g_GUIState; namespace_end -#endif - +#endif
\ No newline at end of file diff --git a/source/Asura.Editor/Editor.cpp b/source/Asura.Editor/Editor.cpp index 38e7c26..6ffd789 100644 --- a/source/Asura.Editor/Editor.cpp +++ b/source/Asura.Editor/Editor.cpp @@ -1,5 +1,51 @@ +#include "Editor.h" -int main(int argc, char *argv[]) +#include <vector> + +namespace_begin(AsuraEditor) + +void TranslateAndDispatch(MSG& msg) +{ + //if (g_BatchMode || !TranslateAccelerator(gMainWindow, GetMainMenuAccelerators(), &msg)) + //{ + // ResetGfxDeviceIfNeeded(); + // TranslateMessage(&msg); + // DispatchMessage(&msg); + //} +} + +int MainMessageLoop() { - -}
\ No newline at end of file + MSG msg, lastMsg; + msg.message = WM_NULL; + std::vector<MSG> messages; + PeekMessage(&msg, NULL, 0U, 0U, PM_NOREMOVE); + bool isQuit = msg.message == WM_QUIT; + while (!isQuit) + { + messages.clear(); + while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { + if (msg.message == WM_INPUT || msg.message == WM_PAINT) + { + + } + + if (msg.message == WM_QUIT) + isQuit = true; + + messages.push_back(msg); + + if (messages.size() > 100) + break; + } + + for (unsigned i = 0; i < messages.size(); ++i) + { + msg = messages[i]; + } + } +} + + +namespace_end
\ No newline at end of file diff --git a/source/Asura.Editor/Editor.h b/source/Asura.Editor/Editor.h index 2f5f8ca..ab91ab7 100644 --- a/source/Asura.Editor/Editor.h +++ b/source/Asura.Editor/Editor.h @@ -2,36 +2,15 @@ #define _ASURA_EDITOR_H_ #include <asura-utils/Scripting/Portable.hpp> +#include <asura-utils/Classes.h> -namespace AsuraEditor -{ - - /// - /// ༭ʵ - /// - class Editor - { - public: +#include <windows.h> - /// - /// ýlua State - /// - Luax::LuaxState& GetLuaxState(); +namespace_begin(AsuraEditor) - private: +int MainMessageLoop(); +void TranslateAndDispatch(MSG& msg); - /// - /// е - /// - Luax::LuaxVM* mEditorVM; - - /// - /// Ϸʱ - /// - Luax::LuaxVM* mRunnerVM; - - }; - -} +namespace_end #endif
\ No newline at end of file diff --git a/source/Asura.Editor/Main.cpp b/source/Asura.Editor/Main.cpp index 207474b..87207f0 100644 --- a/source/Asura.Editor/Main.cpp +++ b/source/Asura.Editor/Main.cpp @@ -1,30 +1,33 @@ -/** - * Copyright (c) 2018-2019 AsuraEngine Team - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software m_ust not be m_isrepresented; you m_ust not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions m_ust be plainly m_arked as such, and m_ust not be - * m_isrepresented as being the original software. - * 3. This notice m_ay not be removed or altered from any source distribution. - **/ +#include <windows.h> -/// -/// ༭ĽͨdirectUIʵ֣Ⱦasura-libϣ¼Ӧͨwin32APIʵ֡ -/// -int main(int argn, char* args[]) -{ +int main(int argn, char* args[]) +{ + bool gotMsg; + MSG msg; + msg.message = WM_NULL; + PeekMessage(&msg, NULL, 0U, 0U, PM_NOREMOVE); + HANDLE hevent = (HANDLE)CreateEvent(NULL, FALSE, FALSE, NULL); + while (WM_QUIT != msg.message) + { + // Use PeekMessage() if the app is active, so we can use idle time to + // render the scene. Else, use GetMessage() to avoid eating CPU time. + //bool dontWaitForMessages = gAppActive || (!gAlreadyClosing && GetPlayerRunInBackground()) || (kPlayerPausing == GetPlayerPause()); + bool dontWaitForMessages = false; + if (dontWaitForMessages) + gotMsg = (PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE) != 0); + else + gotMsg = (GetMessage(&msg, NULL, 0U, 0U) != 0); + if (gotMsg) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + else { + // perform main loop + //PerformMainLoop(); + } + } }
\ No newline at end of file diff --git a/source/Asura.Editor/System/Input.cpp b/source/Asura.Editor/System/Input.cpp index e69de29..c10eb3b 100644 --- a/source/Asura.Editor/System/Input.cpp +++ b/source/Asura.Editor/System/Input.cpp @@ -0,0 +1,61 @@ +#include "Input.h" + +namespace_begin(AsuraEditor) + + +Input::Input() +{ +} + +Input::~Input() +{ +} + +bool Input::Open(HWND window) +{ +} + +void Input::Close(void) +{ +} + +bool Input::GetJoystickNames(std::vector<std::string> &names) +{ +} + + +bool Input::Activate(bool active) +{ +} + +bool Input::ToggleFullscreen(bool fullscreen, HWND window) +{ +} + + +bool Input::Process(bool discard) +{ +} + +LRESULT Input::OnKey(HWND window, UINT message, WPARAM wParam, LPARAM lParam) +{ +} + +LRESULT Input::OnInput(HWND window, UINT message, WPARAM wParam, LPARAM lParam) +{ +} + +LRESULT Input::OnDeviceChange(LPCWSTR name, bool add) +{ +} + +bool Input::ConvertPositionToClientAreaCoord(HWND activeWindow, POINT position, AEMath::Vector2f& newPos) +{ +} + +bool Input::UpdateState() +{ + +} + +namespace_end diff --git a/source/Asura.Editor/config.h b/source/Asura.Editor/config.h deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/config.h +++ /dev/null diff --git a/source/Asura.Editor/editor.cpp b/source/Asura.Editor/editor.cpp index 38e7c26..6ffd789 100644 --- a/source/Asura.Editor/editor.cpp +++ b/source/Asura.Editor/editor.cpp @@ -1,5 +1,51 @@ +#include "Editor.h" -int main(int argc, char *argv[]) +#include <vector> + +namespace_begin(AsuraEditor) + +void TranslateAndDispatch(MSG& msg) +{ + //if (g_BatchMode || !TranslateAccelerator(gMainWindow, GetMainMenuAccelerators(), &msg)) + //{ + // ResetGfxDeviceIfNeeded(); + // TranslateMessage(&msg); + // DispatchMessage(&msg); + //} +} + +int MainMessageLoop() { - -}
\ No newline at end of file + MSG msg, lastMsg; + msg.message = WM_NULL; + std::vector<MSG> messages; + PeekMessage(&msg, NULL, 0U, 0U, PM_NOREMOVE); + bool isQuit = msg.message == WM_QUIT; + while (!isQuit) + { + messages.clear(); + while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { + if (msg.message == WM_INPUT || msg.message == WM_PAINT) + { + + } + + if (msg.message == WM_QUIT) + isQuit = true; + + messages.push_back(msg); + + if (messages.size() > 100) + break; + } + + for (unsigned i = 0; i < messages.size(); ++i) + { + msg = messages[i]; + } + } +} + + +namespace_end
\ No newline at end of file diff --git a/source/Asura.Editor/editor.h b/source/Asura.Editor/editor.h index 2f5f8ca..ab91ab7 100644 --- a/source/Asura.Editor/editor.h +++ b/source/Asura.Editor/editor.h @@ -2,36 +2,15 @@ #define _ASURA_EDITOR_H_ #include <asura-utils/Scripting/Portable.hpp> +#include <asura-utils/Classes.h> -namespace AsuraEditor -{ - - /// - /// ༭ʵ - /// - class Editor - { - public: +#include <windows.h> - /// - /// ýlua State - /// - Luax::LuaxState& GetLuaxState(); +namespace_begin(AsuraEditor) - private: +int MainMessageLoop(); +void TranslateAndDispatch(MSG& msg); - /// - /// е - /// - Luax::LuaxVM* mEditorVM; - - /// - /// Ϸʱ - /// - Luax::LuaxVM* mRunnerVM; - - }; - -} +namespace_end #endif
\ No newline at end of file diff --git a/source/Asura.Editor/main.cpp b/source/Asura.Editor/main.cpp index 207474b..87207f0 100644 --- a/source/Asura.Editor/main.cpp +++ b/source/Asura.Editor/main.cpp @@ -1,30 +1,33 @@ -/** - * Copyright (c) 2018-2019 AsuraEngine Team - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software m_ust not be m_isrepresented; you m_ust not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions m_ust be plainly m_arked as such, and m_ust not be - * m_isrepresented as being the original software. - * 3. This notice m_ay not be removed or altered from any source distribution. - **/ +#include <windows.h> -/// -/// ༭ĽͨdirectUIʵ֣Ⱦasura-libϣ¼Ӧͨwin32APIʵ֡ -/// -int main(int argn, char* args[]) -{ +int main(int argn, char* args[]) +{ + bool gotMsg; + MSG msg; + msg.message = WM_NULL; + PeekMessage(&msg, NULL, 0U, 0U, PM_NOREMOVE); + HANDLE hevent = (HANDLE)CreateEvent(NULL, FALSE, FALSE, NULL); + while (WM_QUIT != msg.message) + { + // Use PeekMessage() if the app is active, so we can use idle time to + // render the scene. Else, use GetMessage() to avoid eating CPU time. + //bool dontWaitForMessages = gAppActive || (!gAlreadyClosing && GetPlayerRunInBackground()) || (kPlayerPausing == GetPlayerPause()); + bool dontWaitForMessages = false; + if (dontWaitForMessages) + gotMsg = (PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE) != 0); + else + gotMsg = (GetMessage(&msg, NULL, 0U, 0U) != 0); + if (gotMsg) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + else { + // perform main loop + //PerformMainLoop(); + } + } }
\ No newline at end of file diff --git a/source/modules/asura-base/BuildConfigure.h b/source/modules/asura-base/BuildConfigure.h new file mode 100644 index 0000000..6fd3aad --- /dev/null +++ b/source/modules/asura-base/BuildConfigure.h @@ -0,0 +1,8 @@ +// Copy to asura-configure folder + +#ifndef _ASURA_EDITOR_CONFIGURE_H_ +#define _ASURA_EDITOR_CONFIGURE_H_ + +#define ASURA_EDITOR 1 + +#endif
\ No newline at end of file diff --git a/source/modules/asura-base/Config.h b/source/modules/asura-base/Configure.h index 024ac79..07926d0 100644 --- a/source/modules/asura-base/Config.h +++ b/source/modules/asura-base/Configure.h @@ -1,13 +1,7 @@ -#ifndef __ASURA_BASE_CONFIG_H__ -#define __ASURA_BASE_CONFIG_H__ +#ifndef _ASURA_BASE_CONFIG_H_ +#define _ASURA_BASE_CONFIG_H_ -// ڱ༭»Ĵ -#define ASURA_EDITOR 1 - -// ʱеĴ -#define ASURA_RUNTIME 1 - -//--------------------------------------------------------------------------------// +#include "BuildConfigure.h" #ifndef ASSERT #ifdef NDEBUG @@ -22,8 +16,6 @@ #endif #endif -//--------------------------------------------------------------------------------// - #ifdef _WIN32 #define ASURA_FINAL final #define ASURA_EXPORT __declspec(dllexport) @@ -52,13 +44,10 @@ #define ASURA_DEBUG 0 -//--------------------------------------------------------------------------------// - #define ASURA_SDL_HOST 1 #define ASURA_LITTLE_ENDIAN 1 -//--------------------------------------------------------------------------------// // չؼ #define ASURA_THROW(ex) throw(ex) // ʾ׳쳣 diff --git a/source/modules/asura-base/config.h b/source/modules/asura-base/config.h deleted file mode 100644 index 024ac79..0000000 --- a/source/modules/asura-base/config.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef __ASURA_BASE_CONFIG_H__ -#define __ASURA_BASE_CONFIG_H__ - -// ڱ༭»Ĵ -#define ASURA_EDITOR 1 - -// ʱеĴ -#define ASURA_RUNTIME 1 - -//--------------------------------------------------------------------------------// - -#ifndef ASSERT -#ifdef NDEBUG -#define ASSERT(x) { false ? (void)(x) : (void)0; } -#else -#ifdef _WIN32 -#define ASURA_DEBUG_BREAK() __debugbreak() -#else -#define ASURA_DEBUG_BREAK() raise(SIGTRAP) -#endif -#define ASSERT(x) do { const volatile bool asura_assert_b____ = !(x); if(asura_assert_b____) ASURA_DEBUG_BREAK(); } while (false) -#endif -#endif - -//--------------------------------------------------------------------------------// - -#ifdef _WIN32 - #define ASURA_FINAL final - #define ASURA_EXPORT __declspec(dllexport) - #define ASURA_IMPORT __declspec(dllimport) - #define ASURA_FORCE_INLINE __forceinline - #define ASURA_RESTRICT __restrict - #define ASURA_API ASURA_EXPORT - #define ASURA_ATTRIBUTE_USED - #define ASURA_ABSTRACT - #define ASURA_WINDOWS 1 -#else - #define ASURA_FINAL final - #define ASURA_EXPORT __attribute__((visibility("default"))) - #define ASURA_IMPORT - #define ASURA_FORCE_INLINE __attribute__((always_inline)) inline - #define ASURA_RESTRICT __restrict__ - #define ASURA_ATTRIBUTE_USED __attribute__((used)) - #define ASURA_ABSTRACT - #define ASURA_API ASURA_EXPORT -#endif - -/// -/// ƶָȨ -/// -#define ASURA_MOVE - -#define ASURA_DEBUG 0 - -//--------------------------------------------------------------------------------// - -#define ASURA_SDL_HOST 1 - -#define ASURA_LITTLE_ENDIAN 1 - -//--------------------------------------------------------------------------------// -// չؼ - -#define ASURA_THROW(ex) throw(ex) // ʾ׳쳣 - -#define ASURA_OUT -#define ASURA_REF - -#endif
\ No newline at end of file diff --git a/source/modules/asura-core/Input/InputEvent.h b/source/modules/asura-core/Input/InputEvent.h index 2c5b84b..d7643b6 100644 --- a/source/modules/asura-core/Input/InputEvent.h +++ b/source/modules/asura-core/Input/InputEvent.h @@ -1,16 +1,50 @@ #ifndef _ASURA_ENGINE_INPUT_EVENT_H_ #define _ASURA_ENGINE_INPUT_EVENT_H_ +#include <asura-base/Configure.h> #include <asura-utils/Classes.h> +#include <asura-utils/Math/Vector2.hpp> + +#include <windows.h> +#include <vector> namespace_begin(AsuraEngine) namespace_begin(Input) +// еĿͻ¼̡ػ桢 struct InputEvent { InputEvent(); ~InputEvent(); +#if ASURA_EDITOR + + bool Open(HWND window); + void Close(void); + + bool GetJoystickNames(std::vector<std::string> &names); + + bool Activate(bool active); + bool ToggleFullscreen(bool fullscreen, HWND window); + + bool Process(bool discard); + LRESULT OnKey(HWND window, UINT message, WPARAM wParam, LPARAM lParam); + LRESULT OnInput(HWND window, UINT message, WPARAM wParam, LPARAM lParam); + LRESULT OnDeviceChange(LPCWSTR name, bool add); + + static bool ConvertPositionToClientAreaCoord(HWND activeWindow, POINT position, AEMath::Vector2f& newPos); + +#elif ASURA_RUNNER + + bool Open(); + +#endif + + enum + { + + }; + }; //InputEvent ConvertInputEvent(); diff --git a/source/modules/asura-openal/Audio/Audio.h b/source/modules/asura-openal/Audio/Audio.h index e69de29..b9f718f 100644 --- a/source/modules/asura-openal/Audio/Audio.h +++ b/source/modules/asura-openal/Audio/Audio.h @@ -0,0 +1,18 @@ +#ifndef _ASURA_AUDIO_H_ +#define _ASURA_AUDIO_H_ + +#include <asura-utils/Classes.h> + +namespace_begin(AsuraEngine) +namespace_begin(Audio) + +class Audio +{ + +}; + + +namespace_end +namespace_end + +#endif
\ No newline at end of file diff --git a/source/modules/asura-openal/audio/audio.h b/source/modules/asura-openal/audio/audio.h index e69de29..b9f718f 100644 --- a/source/modules/asura-openal/audio/audio.h +++ b/source/modules/asura-openal/audio/audio.h @@ -0,0 +1,18 @@ +#ifndef _ASURA_AUDIO_H_ +#define _ASURA_AUDIO_H_ + +#include <asura-utils/Classes.h> + +namespace_begin(AsuraEngine) +namespace_begin(Audio) + +class Audio +{ + +}; + + +namespace_end +namespace_end + +#endif
\ No newline at end of file diff --git a/source/modules/asura-utils/Type.h b/source/modules/asura-utils/Type.h index 318145b..5100fa3 100644 --- a/source/modules/asura-utils/Type.h +++ b/source/modules/asura-utils/Type.h @@ -5,7 +5,7 @@ #include <cstdlib> #include <stdint.h> -#include "asura-base/Config.h" +#include "asura-base/Configure.h" namespace AsuraEngine { diff --git a/source/modules/asura-utils/UtilsConfig.h b/source/modules/asura-utils/UtilsConfig.h index 89a605d..df52b13 100644 --- a/source/modules/asura-utils/UtilsConfig.h +++ b/source/modules/asura-utils/UtilsConfig.h @@ -2,7 +2,7 @@ #define _ASURA_UTILS_CONFIG_H_ // ı -#include "asura-base/Config.h" +#include "asura-base/Configure.h" #define ASURA_THREAD_WIN32 1 #define ASURA_THREAD_STD 1 diff --git a/source/modules/asura-utils/type.h b/source/modules/asura-utils/type.h index 318145b..5100fa3 100644 --- a/source/modules/asura-utils/type.h +++ b/source/modules/asura-utils/type.h @@ -5,7 +5,7 @@ #include <cstdlib> #include <stdint.h> -#include "asura-base/Config.h" +#include "asura-base/Configure.h" namespace AsuraEngine { |