@ -1 +1,17 @@
|
||||
# An empty find module to allow calls to `find_package(SDL2)` to succeed. |
||||
if(UWP_LIB AND NOT TARGET SDL2::SDL2-static) |
||||
set(SDL_BUILD_TYPE "Release") |
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Debug") |
||||
set(SDL_BUILD_TYPE "Debug") |
||||
endif() |
||||
|
||||
set(SDL2_LIBRARY "${UWP_SDL2_DIR}/VisualC-WinRT/x64/${SDL_BUILD_TYPE}/SDL-UWP") |
||||
set(SDL2_INCLUDE_DIR "${UWP_SDL2_DIR}/include") |
||||
add_library(SDL2_lib STATIC IMPORTED) |
||||
set_property(TARGET SDL2_lib PROPERTY IMPORTED_LOCATION "${SDL2_LIBRARY}/SDL2.lib") |
||||
set_property(TARGET SDL2_lib PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SDL2_INCLUDE_DIR}) |
||||
add_library(SDL2::SDL2-static ALIAS SDL2_lib) |
||||
mark_as_advanced(SDL2_INCLUDE_DIR SDL2_LIBRARY) |
||||
set(SDL2_LIBRARIES ${SDL2_LIBRARY}) |
||||
set(SDL2_INCLUDE_DIRS ${SDL2_INCLUDE_DIR}) |
||||
endif() |
||||
|
||||
@ -0,0 +1,49 @@
|
||||
include(functions/FetchContent_MakeAvailableExcludeFromAll) |
||||
|
||||
include(FetchContent) |
||||
FetchContent_Declare(zlib |
||||
URL https://www.zlib.net/zlib-1.2.11.tar.gz |
||||
URL_HASH MD5=1c9f62f0778697a09d36121ead88e08e |
||||
) |
||||
FetchContent_MakeAvailableExcludeFromAll(zlib) |
||||
|
||||
if(DEVILUTIONX_STATIC_ZLIB) |
||||
set(_lib_type STATIC) |
||||
else() |
||||
set(_lib_type SHARED) |
||||
endif() |
||||
add_library(ZLIB ${_lib_type} |
||||
${zlib_SOURCE_DIR}/crc32.h |
||||
${zlib_SOURCE_DIR}/gzguts.h |
||||
${zlib_SOURCE_DIR}/inffixed.h |
||||
${zlib_SOURCE_DIR}/inftrees.h |
||||
${zlib_BINARY_DIR}/zconf.h |
||||
${zlib_SOURCE_DIR}/zutil.h |
||||
${zlib_SOURCE_DIR}/deflate.h |
||||
${zlib_SOURCE_DIR}/inffast.h |
||||
${zlib_SOURCE_DIR}/inflate.h |
||||
${zlib_SOURCE_DIR}/trees.h |
||||
${zlib_SOURCE_DIR}/zlib.h |
||||
${zlib_SOURCE_DIR}/adler32.c |
||||
${zlib_SOURCE_DIR}/deflate.c |
||||
${zlib_SOURCE_DIR}/gzread.c |
||||
${zlib_SOURCE_DIR}/inffast.c |
||||
${zlib_SOURCE_DIR}/trees.c |
||||
${zlib_SOURCE_DIR}/compress.c |
||||
${zlib_SOURCE_DIR}/gzclose.c |
||||
${zlib_SOURCE_DIR}/gzwrite.c |
||||
${zlib_SOURCE_DIR}/inflate.c |
||||
${zlib_SOURCE_DIR}/uncompr.c |
||||
${zlib_SOURCE_DIR}/crc32.c |
||||
${zlib_SOURCE_DIR}/gzlib.c |
||||
${zlib_SOURCE_DIR}/infback.c |
||||
${zlib_SOURCE_DIR}/inftrees.c |
||||
${zlib_SOURCE_DIR}/zutil.c |
||||
) |
||||
target_include_directories(ZLIB PUBLIC ${zlib_SOURCE_DIR}) |
||||
target_include_directories(ZLIB PUBLIC ${zlib_BINARY_DIR}) |
||||
|
||||
add_library(ZLIB::ZLIB ALIAS ZLIB) |
||||
|
||||
set(ZLIB_LIBRARY "${CMAKE_CURRENT_BINARY_DIR}/3dsParty/zlib" PARENT_SCOPE) |
||||
set(ZLIB_INCLUDE_DIR HINTS ${zlib_SOURCE_DIR} ${zlib_BINARY_DIR} PARENT_SCOPE) |
||||
@ -0,0 +1,26 @@
|
||||
set(ASAN OFF) |
||||
set(UBSAN OFF) |
||||
set(BUILD_TESTING OFF) |
||||
set(DISCORD_INTEGRATION OFF) |
||||
|
||||
# setting all libs to be built statically and from source |
||||
set(DEVILUTIONX_SYSTEM_SDL2 OFF) |
||||
set(DEVILUTIONX_SYSTEM_SDL_IMAGE OFF) |
||||
set(DEVILUTIONX_SYSTEM_SDL_AUDIOLIB OFF) |
||||
set(DEVILUTIONX_SYSTEM_LIBSODIUM OFF) |
||||
set(DEVILUTIONX_SYSTEM_LIBPNG OFF) |
||||
set(DEVILUTIONX_SYSTEM_LIBFMT OFF) |
||||
set(DEVILUTIONX_SYSTEM_BZIP2 OFF) |
||||
set(DEVILUTIONX_SYSTEM_ZLIB OFF) |
||||
|
||||
set(DEVILUTIONX_STATIC_SDL2 ON) |
||||
set(DEVILUTIONX_STATIC_SDL_IMAGE ON) |
||||
set(DEVILUTIONX_STATIC_SDL_AUDIOLIB ON) |
||||
set(DEVILUTIONX_STATIC_LIBSODIUM ON) |
||||
set(DEVILUTIONX_STATIC_LIBPNG ON) |
||||
set(DEVILUTIONX_STATIC_LIBFMT ON) |
||||
set(DEVILUTIONX_STATIC_BZIP2 ON) |
||||
set(DEVILUTIONX_STATIC_ZLIB ON) |
||||
|
||||
# not really necessary but a good measure for SDL related stuff |
||||
set(WINDOWS_STORE ON) |
||||
@ -0,0 +1,20 @@
|
||||
call VsDevCmd.bat |
||||
|
||||
mkdir ..\..\build |
||||
cd ..\..\build |
||||
|
||||
git clone https://github.com/libsdl-org/SDL.git |
||||
git -C SDL checkout b424665e0899769b200231ba943353a5fee1b6b6 |
||||
msbuild /p:PlatformToolset=v143;TargetPlatformVersion=10.0.22000.0;TargetPlatformMinVersion=10.0.14393.0;ConfigurationType=StaticLibrary;Configuration=Release;Platform=x64 SDL\VisualC-WinRT\SDL-UWP.vcxproj |
||||
|
||||
cmake -DUWP_LIB=1 -DUWP_SDL2_DIR="%CD%/SDL" -DCMAKE_BUILD_TYPE=x64-Release .. |
||||
|
||||
msbuild /p:Configuration=Release;Platform=x64 DevilutionX.sln |
||||
|
||||
powershell "Get-Content ..\uwp-project\Package.appxmanifest.template | %% {$_ -replace '__PROJECT_VERSION__',$(& {git describe --tags --abbrev=0})} | Out-File -FilePath ..\uwp-project\Package.appxmanifest -encoding ASCII" |
||||
|
||||
msbuild /p:Configuration=Release;Platform=x64;AppxBundle=Always;AppxBundlePlatforms=x64 ..\uwp-project\devilutionx.sln |
||||
|
||||
powershell "Get-Childitem -Path uwp-project\AppxPackages, uwp-project\Release -Include Microsoft.VCLibs.x64.*.appx, devilutionX_*_x64.appx -File -Recurse | Copy-Item -Destination ..\Packaging\xbox-one" |
||||
|
||||
cd ..\Packaging\xbox-one |
||||
@ -0,0 +1,16 @@
|
||||
version: 1.0.{build} |
||||
|
||||
pull_requests: |
||||
do_not_increment_build_number: true |
||||
image: Visual Studio 2022 |
||||
|
||||
before_build: |
||||
- cd %APPVEYOR_BUILD_FOLDER%\Packaging\xbox-one |
||||
|
||||
build_script: |
||||
- build.bat |
||||
artifacts: |
||||
- path: . |
||||
name: devilutionX_*_x64.appx |
||||
- path: . |
||||
name: Microsoft.VCLibs.x64.*.appx |
||||
@ -0,0 +1,40 @@
|
||||
# DevilutionX (Diablo 1) for Microsoft Xbox One/Series |
||||
|
||||
## Installation |
||||
|
||||
1. Download and unzip [devilutionx-xbox-one.zip](https://github.com/diasurgical/devilutionX/releases/latest/download/devilutionx-xbox-one.zip). |
||||
2. In Xbox Device Portal click on `Add` button located at `Home/My games & apps` |
||||
3. In the first popup - called `Deploy or Install Application` choose `devilutionX..appx` and then click `Next` |
||||
4. In the second popup - called `Choose any necessary dependencies` choose `Microsoft.VCLibs..appx` and then click `Start` |
||||
5. In your PC go to the shared folder `WindowsApps` and find the devilutionX folder which should be something like `<random string>\_<version>\_random string<>` |
||||
6. Copy `diabdat.mpq` from your CD (or GoG install folder) to it. |
||||
7. In the Xbox press `View` on DevilutionX and select `Details` and there change the type from `App` to `Game`. |
||||
|
||||
## Usage |
||||
|
||||
Launch `DevilutionX` from the Dev Mode home. |
||||
|
||||
## Controls |
||||
|
||||
- Left analog or D-Pad: move hero |
||||
- A: attack nearby enemies, talk to townspeople and merchants, pickup/place items in the inventory, OK while in main menu |
||||
- B: select spell, back while in menus |
||||
- X: pickup items, open nearby chests and doors, use item in the inventory |
||||
- Y: cast spell, delete character while in main menu |
||||
- LB: use health item from belt |
||||
- RB: use mana potion from belt |
||||
- LT: character sheet (alt: Menu + LB or ←) |
||||
- RT: inventory (alt: Menu + RB or →) |
||||
- Left analog click: toggle automap (alt: Menu + ↓) |
||||
- Menu + View: game menu (alt: Menu + ↑) |
||||
- View + A/B/X/Y: Spell hotkeys |
||||
- Right analog: move automap or simulate mouse |
||||
- Right analog click: left mouse click (alt: View + LB) |
||||
- View + Right analog click: right mouse click (alt: View + RB) |
||||
- View + LT: quest log (alt: Menu + Y) |
||||
- View + RT: spell book (alt: Menu + B) |
||||
|
||||
## Resources |
||||
|
||||
* Discord: https://discord.gg/YQKCAYQ |
||||
* GitHub: https://github.com/diasurgical/devilutionX |
||||
|
After Width: | Height: | Size: 319 B |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 7.9 KiB |
|
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
|
||||
<Package |
||||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" |
||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" |
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" |
||||
IgnorableNamespaces="uap mp"> |
||||
|
||||
<Identity |
||||
Name="b6830ff4-1ef5-4907-9d9e-1ba808edf70f" |
||||
Publisher="CN=devilutionX" |
||||
Version="0.0.0.0" /> |
||||
|
||||
<mp:PhoneIdentity PhoneProductId="b6830ff4-1ef5-4907-9d9e-1ba808edf70f" PhonePublisherId="00000000-0000-0000-0000-000000000000"/> |
||||
|
||||
<Properties> |
||||
<DisplayName>devilutionX</DisplayName> |
||||
<PublisherDisplayName>devilution Team</PublisherDisplayName> |
||||
<Logo>Assets\StoreLogo.png</Logo> |
||||
</Properties> |
||||
|
||||
<Dependencies> |
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.10069.0" MaxVersionTested="10.0.10069.0" /> |
||||
</Dependencies> |
||||
|
||||
<Resources> |
||||
<Resource Language="x-generate"/> |
||||
</Resources> |
||||
|
||||
<Applications> |
||||
<Application Id="App" |
||||
Executable="$targetnametoken$.exe" |
||||
EntryPoint="devilutionX.App"> |
||||
<uap:VisualElements |
||||
DisplayName="DevilutionX" |
||||
Square150x150Logo="Assets\Logo.png" |
||||
Square44x44Logo="Assets\SmallLogo.png" |
||||
Description="DevilutionX" |
||||
BackgroundColor="#000000"> |
||||
<uap:SplashScreen Image="Assets\SplashScreen.png" BackgroundColor="#000000"/> |
||||
<uap:DefaultTile Square71x71Logo="Assets\SmallTile.png" Wide310x150Logo="Assets\WideTile.png" Square310x310Logo="Assets\LargeTile.png"/> |
||||
<uap:LockScreen BadgeLogo="Assets\BadgeLogo.png" Notification="badgeAndTileText"/> |
||||
</uap:VisualElements> |
||||
</Application> |
||||
</Applications> |
||||
|
||||
<Capabilities> |
||||
<Capability Name="internetClient" /> |
||||
<Capability Name="internetClientServer"/> |
||||
</Capabilities> |
||||
</Package> |
||||
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
|
||||
<Package |
||||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" |
||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" |
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" |
||||
IgnorableNamespaces="uap mp"> |
||||
|
||||
<Identity |
||||
Name="b6830ff4-1ef5-4907-9d9e-1ba808edf70f" |
||||
Publisher="CN=devilutionX" |
||||
Version="__PROJECT_VERSION__" /> |
||||
|
||||
<mp:PhoneIdentity PhoneProductId="b6830ff4-1ef5-4907-9d9e-1ba808edf70f" PhonePublisherId="00000000-0000-0000-0000-000000000000"/> |
||||
|
||||
<Properties> |
||||
<DisplayName>devilutionX</DisplayName> |
||||
<PublisherDisplayName>devilution Team</PublisherDisplayName> |
||||
<Logo>Assets\StoreLogo.png</Logo> |
||||
</Properties> |
||||
|
||||
<Dependencies> |
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.10069.0" MaxVersionTested="10.0.10069.0" /> |
||||
</Dependencies> |
||||
|
||||
<Resources> |
||||
<Resource Language="x-generate"/> |
||||
</Resources> |
||||
|
||||
<Applications> |
||||
<Application Id="App" |
||||
Executable="$targetnametoken$.exe" |
||||
EntryPoint="devilutionX.App"> |
||||
<uap:VisualElements |
||||
DisplayName="DevilutionX" |
||||
Square150x150Logo="Assets\Logo.png" |
||||
Square44x44Logo="Assets\SmallLogo.png" |
||||
Description="DevilutionX" |
||||
BackgroundColor="#000000"> |
||||
<uap:SplashScreen Image="Assets\SplashScreen.png" BackgroundColor="#000000"/> |
||||
<uap:DefaultTile Square71x71Logo="Assets\SmallTile.png" Wide310x150Logo="Assets\WideTile.png" Square310x310Logo="Assets\LargeTile.png"/> |
||||
<uap:LockScreen BadgeLogo="Assets\BadgeLogo.png" Notification="badgeAndTileText"/> |
||||
</uap:VisualElements> |
||||
</Application> |
||||
</Applications> |
||||
|
||||
<Capabilities> |
||||
<Capability Name="internetClient" /> |
||||
<Capability Name="internetClientServer"/> |
||||
</Capabilities> |
||||
</Package> |
||||
@ -0,0 +1,27 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00 |
||||
# Visual Studio Version 17 |
||||
VisualStudioVersion = 17.0.32014.148 |
||||
MinimumVisualStudioVersion = 10.0.40219.1 |
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "devilutionX", "devilutionx.vcxproj", "{3183A558-46F4-4FEF-8684-0A79B793599F}" |
||||
EndProject |
||||
Global |
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
||||
Debug|x64 = Debug|x64 |
||||
Release|x64 = Release|x64 |
||||
EndGlobalSection |
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
||||
{3183A558-46F4-4FEF-8684-0A79B793599F}.Debug|x64.ActiveCfg = Debug|x64 |
||||
{3183A558-46F4-4FEF-8684-0A79B793599F}.Debug|x64.Build.0 = Debug|x64 |
||||
{3183A558-46F4-4FEF-8684-0A79B793599F}.Debug|x64.Deploy.0 = Debug|x64 |
||||
{3183A558-46F4-4FEF-8684-0A79B793599F}.Release|x64.ActiveCfg = Release|x64 |
||||
{3183A558-46F4-4FEF-8684-0A79B793599F}.Release|x64.Build.0 = Release|x64 |
||||
{3183A558-46F4-4FEF-8684-0A79B793599F}.Release|x64.Deploy.0 = Release|x64 |
||||
EndGlobalSection |
||||
GlobalSection(SolutionProperties) = preSolution |
||||
HideSolutionNode = FALSE |
||||
EndGlobalSection |
||||
GlobalSection(ExtensibilityGlobals) = postSolution |
||||
SolutionGuid = {D91CBA35-4ECA-4F87-81C4-EBD110EDEE56} |
||||
EndGlobalSection |
||||
EndGlobal |
||||
@ -0,0 +1,140 @@
|
||||
<?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|x64"> |
||||
<Configuration>Debug</Configuration> |
||||
<Platform>x64</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Release|x64"> |
||||
<Configuration>Release</Configuration> |
||||
<Platform>x64</Platform> |
||||
</ProjectConfiguration> |
||||
</ItemGroup> |
||||
<PropertyGroup Label="Globals"> |
||||
<ProjectGuid>{3183a558-46f4-4fef-8684-0a79b793599f}</ProjectGuid> |
||||
<Keyword>DirectXApp</Keyword> |
||||
<RootNamespace>devilutionX</RootNamespace> |
||||
<DefaultLanguage>en-US</DefaultLanguage> |
||||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion> |
||||
<AppContainerApplication>true</AppContainerApplication> |
||||
<ApplicationType>Windows Store</ApplicationType> |
||||
<ApplicationTypeRevision>8.2</ApplicationTypeRevision> |
||||
<TargetPlatformVersion>10.0.10069.0</TargetPlatformVersion> |
||||
<TargetPlatformMinVersion>10.0.10069.0</TargetPlatformMinVersion> |
||||
<WindowsTargetPlatformVersion>10.0.22000.0</WindowsTargetPlatformVersion> |
||||
<WindowsTargetPlatformMinVersion>10.0.14393.0</WindowsTargetPlatformMinVersion> |
||||
<ProjectName>devilutionX</ProjectName> |
||||
</PropertyGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
||||
<ConfigurationType>Application</ConfigurationType> |
||||
<UseDebugLibraries>true</UseDebugLibraries> |
||||
<PlatformToolset>v143</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> |
||||
<ConfigurationType>Application</ConfigurationType> |
||||
<UseDebugLibraries>false</UseDebugLibraries> |
||||
<WholeProgramOptimization>true</WholeProgramOptimization> |
||||
<PlatformToolset>v143</PlatformToolset> |
||||
</PropertyGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
||||
<ImportGroup Label="ExtensionSettings"> |
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ImageContentTask.props" /> |
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\MeshContentTask.props" /> |
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ShaderGraphContentTask.props" /> |
||||
</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> |
||||
<PackageCertificateKeyFile>devilutionX_TemporaryKey.pfx</PackageCertificateKeyFile> |
||||
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled> |
||||
<GenerateAppInstallerFile>False</GenerateAppInstallerFile> |
||||
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm> |
||||
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision> |
||||
<GenerateTestArtifacts>True</GenerateTestArtifacts> |
||||
<AppxBundle>Always</AppxBundle> |
||||
<AppxBundlePlatforms>x64</AppxBundlePlatforms> |
||||
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks> |
||||
<AppxPackageDir>..\build\uwp-project\AppxPackages</AppxPackageDir> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||
<OutDir>..\build\uwp-project\$(Configuration)\</OutDir> |
||||
<IntDir>..\build\uwp-project\obj\</IntDir> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||
<OutDir>..\build\uwp-project\$(Configuration)\</OutDir> |
||||
<IntDir>..\build\uwp-project\obj\</IntDir> |
||||
</PropertyGroup> |
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||
<Link> |
||||
<AdditionalDependencies>sdl_image.lib;libpng16_staticd.lib;pkware.lib;fmtd.lib;zlib.lib;bzip2.lib;libsmackerdec.lib;libmpq.lib;libdevilutionx.lib;sdl2.lib;sdl_audiolib.lib;sodium.lib;zt.lib;lwip_pic.lib;miniupnpc_pic.lib;natpmp_pic.lib;zt_pic.lib;zto_pic.lib;shlwapi.lib;shell32.lib;%(AdditionalDependencies)</AdditionalDependencies> |
||||
<AdditionalLibraryDirectories>..\build\SDL\VisualC-WinRT\x64\Debug\SDL-UWP;..\build\3rdParty\SDL_image\Debug;..\build\3rdParty\zlib\Debug;..\build\3rdParty\PKWare\Debug;..\build\3rdParty\bzip2\Debug;..\build\3rdParty\libsmackerdec\Debug;..\build\3rdParty\libmpq\Debug;..\build\_deps\sdl_audiolib-build\Debug;..\build\_deps\libsodium-build\Debug;..\build\_deps\libzt-build\lib\Debug;..\build\_deps\libfmt-build\Debug;..\build\_deps\libpng-build\Debug;..\build\Source\libdevilutionx.dir\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
||||
</Link> |
||||
<ClCompile> |
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> |
||||
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> |
||||
<AdditionalIncludeDirectories>..\Source;..\build\SDL\include;..\build\_deps\sdl_audiolib-src\include;..\build\_deps\sdl_audiolib-build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> |
||||
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings> |
||||
<PreprocessorDefinitions>_DEBUG;__UWP__=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<LanguageStandard>stdcpp17</LanguageStandard> |
||||
<CompileAsWinRT>true</CompileAsWinRT> |
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> |
||||
<EnableModules>false</EnableModules> |
||||
</ClCompile> |
||||
</ItemDefinitionGroup> |
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||
<Link> |
||||
<AdditionalDependencies>sdl_image.lib;libpng16_static.lib;pkware.lib;fmt.lib;zlib.lib;bzip2.lib;libsmackerdec.lib;libmpq.lib;libdevilutionx.lib;sdl2.lib;sdl_audiolib.lib;sodium.lib;zt.lib;lwip_pic.lib;miniupnpc_pic.lib;natpmp_pic.lib;zt_pic.lib;zto_pic.lib;shlwapi.lib;shell32.lib;%(AdditionalDependencies)</AdditionalDependencies> |
||||
<AdditionalLibraryDirectories>..\build\SDL\VisualC-WinRT\x64\Release\SDL-UWP;..\build\3rdParty\SDL_image\Release;..\build\3rdParty\zlib\Release;..\build\3rdParty\PKWare\Release;..\build\3rdParty\bzip2\Release;..\build\3rdParty\libsmackerdec\Release;..\build\3rdParty\libmpq\Release;..\build\_deps\sdl_audiolib-build\Release;..\build\_deps\libsodium-build\Release;..\build\_deps\libzt-build\lib\Release;..\build\_deps\libfmt-build\Release;..\build\_deps\libpng-build\Release;..\build\Source\libdevilutionx.dir\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
||||
</Link> |
||||
<ClCompile> |
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> |
||||
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> |
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> |
||||
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings> |
||||
<PreprocessorDefinitions>NDEBUG;__UWP__=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<AdditionalIncludeDirectories>..\Source;..\build\SDL\include;..\build\_deps\sdl_audiolib-src\include;..\build\_deps\sdl_audiolib-build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
||||
<LanguageStandard>stdcpp17</LanguageStandard> |
||||
</ClCompile> |
||||
</ItemDefinitionGroup> |
||||
<ItemGroup> |
||||
<Image Include="Assets\BadgeLogo.scale-200.png" /> |
||||
<Image Include="Assets\LargeTile.scale-200.png" /> |
||||
<Image Include="Assets\Logo.scale-200.png" /> |
||||
<Image Include="Assets\SmallLogo.altform-lightunplated_targetsize-48.png" /> |
||||
<Image Include="Assets\SmallLogo.altform-unplated_targetsize-48.png" /> |
||||
<Image Include="Assets\SmallLogo.scale-200.png" /> |
||||
<Image Include="Assets\SmallLogo.targetsize-48.png" /> |
||||
<Image Include="Assets\SmallTile.scale-200.png" /> |
||||
<Image Include="Assets\SplashScreen.scale-200.png" /> |
||||
<Image Include="Assets\StoreLogo.scale-200.png" /> |
||||
<Image Include="Assets\WideTile.scale-200.png" /> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<AppxManifest Include="Package.appxmanifest"> |
||||
<SubType>Designer</SubType> |
||||
</AppxManifest> |
||||
<None Include="..\build\assets\*\*.*"> |
||||
<DeploymentContent>true</DeploymentContent> |
||||
<Link>Assets\%(RecursiveDir)%(Filename)%(Extension)</Link> |
||||
</None> |
||||
<None Include="devilutionX_TemporaryKey.pfx" /> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<ClCompile Include="src\SDL_winrt_main_NonXAML.cpp" /> |
||||
</ItemGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
||||
<ImportGroup Label="ExtensionTargets"> |
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ImageContentTask.targets" /> |
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\MeshContentTask.targets" /> |
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ShaderGraphContentTask.targets" /> |
||||
</ImportGroup> |
||||
</Project> |
||||
@ -0,0 +1,89 @@
|
||||
/*
|
||||
SDL_winrt_main_NonXAML.cpp, placed in the public domain by David Ludwig 3/13/14 |
||||
*/ |
||||
|
||||
#include <SDL.h> |
||||
#include <diablo.h> |
||||
#include <wrl.h> |
||||
#include <iostream> |
||||
#include <string> |
||||
|
||||
/* At least one file in any SDL/WinRT app appears to require compilation
|
||||
with C++/CX, otherwise a Windows Metadata file won't get created, and |
||||
an APPX0702 build error can appear shortly after linking. |
||||
|
||||
The following set of preprocessor code forces this file to be compiled |
||||
as C++/CX, which appears to cause Visual C++ 2012's build tools to |
||||
create this .winmd file, and will help allow builds of SDL/WinRT apps |
||||
to proceed without error. |
||||
|
||||
If other files in an app's project enable C++/CX compilation, then it might |
||||
be possible for SDL_winrt_main_NonXAML.cpp to be compiled without /ZW, |
||||
for Visual C++'s build tools to create a winmd file, and for the app to |
||||
build without APPX0702 errors. In this case, if |
||||
SDL_WINRT_METADATA_FILE_AVAILABLE is defined as a C/C++ macro, then |
||||
the #error (to force C++/CX compilation) will be disabled. |
||||
|
||||
Please note that /ZW can be specified on a file-by-file basis. To do this, |
||||
right click on the file in Visual C++, click Properties, then change the |
||||
setting through the dialog that comes up. |
||||
*/ |
||||
#ifndef SDL_WINRT_METADATA_FILE_AVAILABLE |
||||
#ifndef __cplusplus_winrt |
||||
#error SDL_winrt_main_NonXAML.cpp must be compiled with /ZW, otherwise build errors due to missing .winmd files can occur. |
||||
#endif |
||||
#endif |
||||
|
||||
/* Prevent MSVC++ from warning about threading models when defining our
|
||||
custom WinMain. The threading model will instead be set via a direct |
||||
call to Windows::Foundation::Initialize (rather than via an attributed |
||||
function). |
||||
|
||||
To note, this warning (C4447) does not seem to come up unless this file |
||||
is compiled with C++/CX enabled (via the /ZW compiler flag). |
||||
*/ |
||||
#ifdef _MSC_VER |
||||
#pragma warning(disable:4447) |
||||
#endif |
||||
|
||||
/* Make sure the function to initialize the Windows Runtime gets linked in. */ |
||||
#ifdef _MSC_VER |
||||
#pragma comment(lib, "runtimeobject.lib") |
||||
#endif |
||||
|
||||
// This handler is needed otherwise B button will exit the game as it is the behavior default for UWP apps
|
||||
void OnBackRequested(Platform::Object^, Windows::UI::Core::BackRequestedEventArgs^ args) |
||||
{ |
||||
args->Handled = true; |
||||
} |
||||
|
||||
void onInitialized() |
||||
{ |
||||
Windows::UI::Core::SystemNavigationManager::GetForCurrentView()->BackRequested += ref new Windows::Foundation::EventHandler<Windows::UI::Core::BackRequestedEventArgs^>(OnBackRequested); |
||||
|
||||
// workaround untill new config is released
|
||||
std::string controllerMapping = ",*,a:b1,b:b0,x:b3,y:b2,back:b6,start:b7,leftstick:b8,rightstick:b9,leftshoulder:b4,rightshoulder:b5,dpup:b10,dpdown:b12,dpleft:b13,dpright:b11,leftx:a1,lefty:a0~,rightx:a3,righty:a2~,lefttrigger:a4,righttrigger:a5,platform:WinRT"; |
||||
|
||||
for(int i = 0; i < SDL_NumJoysticks(); ++i) |
||||
{ |
||||
SDL_JoystickType type = SDL_JoystickGetDeviceType(i); |
||||
|
||||
if(type == SDL_JOYSTICK_POWER_UNKNOWN) |
||||
continue; |
||||
|
||||
SDL_JoystickGUID guid = SDL_JoystickGetDeviceGUID(i); |
||||
|
||||
if(!guid.data) |
||||
continue; |
||||
|
||||
char guidString[33]; |
||||
SDL_JoystickGetGUIDString(guid, guidString, 33); |
||||
SDL_GameControllerAddMapping((guidString + controllerMapping).c_str()); |
||||
} |
||||
} |
||||
|
||||
int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR, int) |
||||
{ |
||||
devilution::setOnInitialized(&onInitialized); |
||||
return SDL_WinRTRunApp(devilution::DiabloMain, NULL); |
||||
} |
||||