winrt works

This commit is contained in:
BADIM-PC\Vadim 2018-02-14 16:09:48 +03:00
parent a850d64444
commit 670c650120
8 changed files with 395 additions and 101 deletions

4
.gitignore vendored
View File

@ -105,3 +105,7 @@ build/windows/studio/Debug/
build/windows/studio/Debug Pro/
build/windows/studio/Release/
build/windows/studio/Release Pro/
build/uwp/studio/Debug/
build/uwp/studio/Debug Pro/
build/uwp/studio/Release/
build/uwp/studio/Release Pro/

View File

@ -0,0 +1,247 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\code.c" />
<ClCompile Include="..\..\..\src\config.c" />
<ClCompile Include="..\..\..\src\console.c" />
<ClCompile Include="..\..\..\src\dialog.c" />
<ClCompile Include="..\..\..\src\ext\gif.c" />
<ClCompile Include="..\..\..\src\ext\md5.c" />
<ClCompile Include="..\..\..\src\fs.c" />
<ClCompile Include="..\..\..\src\history.c" />
<ClCompile Include="..\..\..\src\html.c" />
<ClCompile Include="..\..\..\src\map.c" />
<ClCompile Include="..\..\..\src\menu.c" />
<ClCompile Include="..\..\..\src\music.c" />
<ClCompile Include="..\..\..\src\run.c" />
<ClCompile Include="..\..\..\src\sfx.c" />
<ClCompile Include="..\..\..\src\sprite.c" />
<ClCompile Include="..\..\..\src\start.c" />
<ClCompile Include="..\..\..\src\studio.c" />
<ClCompile Include="..\..\..\src\surf.c" />
<ClCompile Include="..\..\..\src\tools.c" />
<ClCompile Include="..\..\..\src\world.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\3rd-party\zlib-1.2.8\winrt\zlib-uwp\zlib-uwp.vcxproj">
<Project>{978f53db-f959-4cb4-84a7-463af29949be}</Project>
</ProjectReference>
<ProjectReference Include="..\gif\gif.vcxproj">
<Project>{bc1084df-210a-48d6-a077-761d8c16947b}</Project>
</ProjectReference>
<ProjectReference Include="..\lua\lua.vcxproj">
<Project>{53802f21-41da-4ac1-8b62-0dac2ccb8af8}</Project>
</ProjectReference>
<ProjectReference Include="..\tic80\tic80.vcxproj">
<Project>{9c39acf1-5f52-4a2b-a467-9f2805d6174b}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{6a22403a-6cf5-49f2-a012-ec04c9496306}</ProjectGuid>
<Keyword>DynamicLibrary</Keyword>
<RootNamespace>studio</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<AppContainerApplication>true</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.14393.0</WindowsTargetPlatformMinVersion>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</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|ARM'">
<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|ARM'">
<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 />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<PreprocessorDefinitions>TIC80_SHARED;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\include;..\..\..\include;..\..\..\3rd-party\lua-5.3.1\src;..\..\..\3rd-party\giflib-5.1.4\lib;..\..\..\3rd-party\zlib-1.2.8;$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<SDLCheck>false</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<PreprocessorDefinitions>TIC80_SHARED;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\include;..\..\..\include;..\..\..\3rd-party\lua-5.3.1\src;..\..\..\3rd-party\giflib-5.1.4\lib;..\..\..\3rd-party\zlib-1.2.8;$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<SDLCheck>false</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<PreprocessorDefinitions>TIC80_SHARED;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\include;..\..\..\include;..\..\..\3rd-party\lua-5.3.1\src;..\..\..\3rd-party\giflib-5.1.4\lib;..\..\..\3rd-party\zlib-1.2.8;$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<SDLCheck>false</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<PreprocessorDefinitions>TIC80_SHARED;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\include;..\..\..\include;..\..\..\3rd-party\lua-5.3.1\src;..\..\..\3rd-party\giflib-5.1.4\lib;..\..\..\3rd-party\zlib-1.2.8;$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<SDLCheck>false</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<PreprocessorDefinitions>TIC80_SHARED;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\include;..\..\..\include;..\..\..\3rd-party\lua-5.3.1\src;..\..\..\3rd-party\giflib-5.1.4\lib;..\..\..\3rd-party\zlib-1.2.8;$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<SDLCheck>false</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<PreprocessorDefinitions>TIC80_SHARED;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\include;..\..\..\include;..\..\..\3rd-party\lua-5.3.1\src;..\..\..\3rd-party\giflib-5.1.4\lib;..\..\..\3rd-party\zlib-1.2.8;$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<SDLCheck>false</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="src">
<UniqueIdentifier>{fd391d6f-58f5-4aba-a1f1-41bf34081296}</UniqueIdentifier>
</Filter>
<Filter Include="src\ext">
<UniqueIdentifier>{cf22f775-8c8b-4047-a23c-fa216fa3b08f}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\code.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\config.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\console.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dialog.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\fs.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\history.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\html.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\map.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\menu.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\music.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\run.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\sfx.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\sprite.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\start.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\studio.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\surf.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\tools.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\world.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ext\gif.c">
<Filter>src\ext</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ext\md5.c">
<Filter>src\ext</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -17,6 +17,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib-uwp", "..\..\..\3rd-pa
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wren", "..\wren\wren.vcxproj", "{BBB0D01A-B124-416C-BE26-E6993154A555}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "studio", "..\studio\studio.vcxproj", "{6A22403A-6CF5-49F2-A012-EC04C9496306}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
@ -117,6 +119,18 @@ Global
{BBB0D01A-B124-416C-BE26-E6993154A555}.Release|x64.Build.0 = Release|x64
{BBB0D01A-B124-416C-BE26-E6993154A555}.Release|x86.ActiveCfg = Release|Win32
{BBB0D01A-B124-416C-BE26-E6993154A555}.Release|x86.Build.0 = Release|Win32
{6A22403A-6CF5-49F2-A012-EC04C9496306}.Debug|ARM.ActiveCfg = Debug|ARM
{6A22403A-6CF5-49F2-A012-EC04C9496306}.Debug|ARM.Build.0 = Debug|ARM
{6A22403A-6CF5-49F2-A012-EC04C9496306}.Debug|x64.ActiveCfg = Debug|x64
{6A22403A-6CF5-49F2-A012-EC04C9496306}.Debug|x64.Build.0 = Debug|x64
{6A22403A-6CF5-49F2-A012-EC04C9496306}.Debug|x86.ActiveCfg = Debug|Win32
{6A22403A-6CF5-49F2-A012-EC04C9496306}.Debug|x86.Build.0 = Debug|Win32
{6A22403A-6CF5-49F2-A012-EC04C9496306}.Release|ARM.ActiveCfg = Release|ARM
{6A22403A-6CF5-49F2-A012-EC04C9496306}.Release|ARM.Build.0 = Release|ARM
{6A22403A-6CF5-49F2-A012-EC04C9496306}.Release|x64.ActiveCfg = Release|x64
{6A22403A-6CF5-49F2-A012-EC04C9496306}.Release|x64.Build.0 = Release|x64
{6A22403A-6CF5-49F2-A012-EC04C9496306}.Release|x86.ActiveCfg = Release|Win32
{6A22403A-6CF5-49F2-A012-EC04C9496306}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -219,17 +219,8 @@
<ProjectReference Include="..\..\..\3rd-party\SDL2-2.0.7\VisualC-WinRT\UWP_VS2015\SDL-UWP.vcxproj">
<Project>{89e9b32e-a86a-47c3-a948-d2b1622925ce}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\3rd-party\zlib-1.2.8\winrt\zlib-uwp\zlib-uwp.vcxproj">
<Project>{978f53db-f959-4cb4-84a7-463af29949be}</Project>
</ProjectReference>
<ProjectReference Include="..\gif\gif.vcxproj">
<Project>{bc1084df-210a-48d6-a077-761d8c16947b}</Project>
</ProjectReference>
<ProjectReference Include="..\lua\lua.vcxproj">
<Project>{53802f21-41da-4ac1-8b62-0dac2ccb8af8}</Project>
</ProjectReference>
<ProjectReference Include="..\tic80\tic80.vcxproj">
<Project>{9c39acf1-5f52-4a2b-a467-9f2805d6174b}</Project>
<ProjectReference Include="..\studio\studio.vcxproj">
<Project>{6a22403a-6cf5-49f2-a012-ec04c9496306}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
@ -244,10 +235,6 @@
<ClCompile Include="..\..\..\3rd-party\SDL2_net-2.0.1\SDLnet.c" />
<ClCompile Include="..\..\..\3rd-party\SDL2_net-2.0.1\SDLnetselect.c" />
<ClCompile Include="..\..\..\3rd-party\SDL2_net-2.0.1\SDLnetTCP.c" />
<ClCompile Include="..\..\..\src\code.c" />
<ClCompile Include="..\..\..\src\config.c" />
<ClCompile Include="..\..\..\src\console.c" />
<ClCompile Include="..\..\..\src\dialog.c" />
<ClCompile Include="..\..\..\src\ext\file_dialog.cpp">
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
@ -256,23 +243,9 @@
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
</ClCompile>
<ClCompile Include="..\..\..\src\ext\gif.c" />
<ClCompile Include="..\..\..\src\ext\md5.c" />
<ClCompile Include="..\..\..\src\fs.c" />
<ClCompile Include="..\..\..\src\history.c" />
<ClCompile Include="..\..\..\src\html.c" />
<ClCompile Include="..\..\..\src\map.c" />
<ClCompile Include="..\..\..\src\menu.c" />
<ClCompile Include="..\..\..\src\music.c" />
<ClCompile Include="..\..\..\src\net.c" />
<ClCompile Include="..\..\..\src\run.c" />
<ClCompile Include="..\..\..\src\sfx.c" />
<ClCompile Include="..\..\..\src\sprite.c" />
<ClCompile Include="..\..\..\src\start.c" />
<ClCompile Include="..\..\..\src\studio.c" />
<ClCompile Include="..\..\..\src\surf.c" />
<ClCompile Include="..\..\..\src\system.c" />
<ClCompile Include="..\..\..\src\tools.c" />
<ClCompile Include="..\..\..\src\world.c" />
</ItemGroup>
<ItemGroup>
<None Include="Package.StoreAssociation.xml" />

View File

@ -47,72 +47,12 @@
<None Include="tic_StoreKey.pfx" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\console.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\fs.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\map.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\music.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\run.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\sfx.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\sprite.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\start.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\studio.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ext\file_dialog.cpp">
<Filter>src\ext</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\history.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\world.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\html.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\code.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\config.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ext\gif.c">
<Filter>src\ext</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ext\md5.c">
<Filter>src\ext</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\net.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\tools.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dialog.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\menu.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\surf.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\3rd-party\SDL2-2.0.7\src\main\winrt\SDL_winrt_main_NonXAML.cpp" />
<ClCompile Include="..\..\..\3rd-party\SDL2_net-2.0.1\SDLnetTCP.c">
<Filter>src\ext\net</Filter>
@ -123,6 +63,12 @@
<ClCompile Include="..\..\..\3rd-party\SDL2_net-2.0.1\SDLnetselect.c">
<Filter>src\ext\net</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\system.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\net.c">
<Filter>src</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\3rd-party\SDL2-2.0.7\src\main\winrt\SDL2-WinRTResources.rc" />

View File

@ -22,10 +22,47 @@
#pragma once
#if (defined(WIN32) || defined(_WIN32) || defined(__MINGW32__))
#if defined(__APPLE__)
/* lets us know what version of Mac OS X we're compiling on */
#include "AvailabilityMacros.h"
#include "TargetConditionals.h"
#ifndef TARGET_OS_IPHONE
#undef __TIC_MACOSX__
#define __TIC_MACOSX__ 1
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
# error SDL for Mac OS X only supports deploying on 10.6 and above.
#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */
#endif /* TARGET_OS_IPHONE */
#endif /* defined(__APPLE__) */
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
/* Try to find out if we're compiling for WinRT or non-WinRT */
#if defined(_MSC_VER) && defined(__has_include)
#define HAVE_WINAPIFAMILY_H __has_include(<winapifamily.h>)
/* If _USING_V110_SDK71_ is defined it means we are using the Windows XP toolset. */
#elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_) /* _MSC_VER == 1700 for Visual Studio 2012 */
#define HAVE_WINAPIFAMILY_H 1
#else
#define HAVE_WINAPIFAMILY_H 0
#endif
#if HAVE_WINAPIFAMILY_H
#include <winapifamily.h>
#define WINAPI_FAMILY_WINRT (!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP))
#else
#define WINAPI_FAMILY_WINRT 0
#endif /* HAVE_WINAPIFAMILY_H */
#if WINAPI_FAMILY_WINRT
#undef __TIC_WINRT__
#define __TIC_WINRT__ 1
#else
#undef __TIC_WINDOWS__
#define __TIC_WINDOWS__ 1
#endif
#endif
#if (defined(linux) || defined(__linux) || defined(__linux__))
# undef __TIC_LINUX__
@ -34,7 +71,7 @@
#ifndef TIC80_API
# if defined(TIC80_SHARED)
# if defined(__TIC_WINDOWS__)
# if defined(__TIC_WINDOWS__) || defined(__TIC_WINRT__)
# define TIC80_API __declspec(dllexport)
# elif defined(__TIC_LINUX__)
# define TIC80_API __attribute__ ((visibility("default")))

View File

@ -32,7 +32,7 @@
#include <lauxlib.h>
#include <lualib.h>
#if defined(__WINRT__) || defined(__TIC_WINDOWS__)
#if defined(__TIC_WINRT__) || defined(__TIC_WINDOWS__)
#include <direct.h>
#include <windows.h>
#else
@ -104,7 +104,7 @@ bool fsIsInPublicDir(FileSystem* fs)
return isPublic(fs);
}
#if defined(__TIC_WINDOWS__) || defined(__WINRT__)
#if defined(__TIC_WINDOWS__) || defined(__TIC_WINRT__)
// #define UTF8ToString(S) (wchar_t *)SDL_iconv_string("UTF-16LE", "UTF-8", (char *)(S), strlen(S)+1)
// #define StringToUTF8(S) SDL_iconv_string("UTF-8", "UTF-16LE", (char *)(S), (wcslen(S)+1)*sizeof(wchar_t))
@ -334,7 +334,7 @@ void fsEnumFiles(FileSystem* fs, ListCallback callback, void* data)
bool fsDeleteDir(FileSystem* fs, const char* name)
{
#if defined(__WINRT__) || defined(__TIC_WINDOWS__)
#if defined(__TIC_WINRT__) || defined(__TIC_WINDOWS__)
const char* path = getFilePath(fs, name);
bool result = tic_rmdir(UTF8ToString(path));
#else
@ -393,7 +393,7 @@ static void onAddFile(const char* name, const u8* buffer, s32 size, void* data,
fwrite(buffer, 1, size, dest);
fclose(dest);
#if !defined(__WINRT__) && !defined(__TIC_WINDOWS__)
#if !defined(__TIC_WINRT__) && !defined(__TIC_WINDOWS__)
if(mode)
chmod(path, mode);
#endif
@ -443,7 +443,7 @@ static void onGetFile(bool result, void* data)
static u32 fsGetMode(FileSystem* fs, const char* name)
{
#if defined(__WINRT__) || defined(__TIC_WINDOWS__)
#if defined(__TIC_WINRT__) || defined(__TIC_WINDOWS__)
return 0;
#else
const char* path = getFilePath(fs, name);
@ -696,7 +696,7 @@ const char* fsFullname(const char *path)
{
char* result = NULL;
#if defined(__TIC_WINDOWS__) || defined(__WINRT__)
#if defined(__TIC_WINDOWS__) || defined(__TIC_WINRT__)
static wchar_t wpath[FILENAME_MAX];
GetFullPathNameW(UTF8ToString(path), sizeof(wpath), wpath, NULL);
@ -714,7 +714,7 @@ const char* fsBasename(const char *path)
{
char* result = NULL;
#if defined(__TIC_WINDOWS__) || defined(__WINRT__)
#if defined(__TIC_WINDOWS__) || defined(__TIC_WINRT__)
#define SEP "\\"
#else
#define SEP "/"