Merge pull request #427 from SamNChiet/testing_uwp

Add Keyboard Input
This commit is contained in:
Ray 2017-12-29 09:54:34 +01:00 committed by GitHub
commit f51dcd8bfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 272 additions and 51 deletions

View File

@ -23,63 +23,188 @@ using namespace raylibUWP;
#define MAX_GAMEPADS 4 // Max number of gamepads supported
#define MAX_GAMEPAD_BUTTONS 32 // Max bumber of buttons supported (per gamepad)
#define MAX_GAMEPAD_AXIS 8 // Max number of axis supported (per gamepad)
static bool gamepadReady[MAX_GAMEPADS] = { false }; // Flag to know if gamepad is ready
static float gamepadAxisState[MAX_GAMEPADS][MAX_GAMEPAD_AXIS]; // Gamepad axis state
static char previousGamepadState[MAX_GAMEPADS][MAX_GAMEPAD_BUTTONS]; // Previous gamepad buttons state
static char currentGamepadState[MAX_GAMEPADS][MAX_GAMEPAD_BUTTONS]; // Current gamepad buttons state
//#define MAX_KEYS 512
static char previousKeyState[512] = { 0 }; // Contains previous frame keyboard state
static char currentKeyState[512] = { 0 }; // Contains current frame keyboard state
void UWP_PollInput()
{
// Check if gamepads are ready
for (int i = 0; i < MAX_GAMEPADS; i++)
// Process Keyboard
{
// HACK: UWP keeps a contiguous list of gamepads. For the interest of time I'm just doing a 1:1 mapping of
// connected gamepads with their spot in the list, but this has serious robustness problems
// e.g. player 1, 2, and 3 are playing a game - if player2 disconnects, p3's controller would now be mapped to p2's character since p3 is now second in the list.
// Register previous keyboard state
for (int k = 0; k < 512; k++) previousKeyState[k] = currentKeyState[k];
gamepadReady[i] = (i < Gamepad::Gamepads->Size);
// Poll keyboard input
CoreWindow ^window = CoreWindow::GetForCurrentThread();
using Windows::System::VirtualKey;
// NOTE: Potential UWP bug with Alt key: https://social.msdn.microsoft.com/Forums/windowsapps/en-US/9bebfb0a-7637-400e-8bda-e55620091407/unexpected-behavior-in-windowscoreuicorephysicalkeystatusismenukeydown
currentKeyState[KEY_SPACE] = (window->GetAsyncKeyState(VirtualKey::Space) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_ESCAPE] = (window->GetAsyncKeyState(VirtualKey::Escape) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_ENTER] = (window->GetAsyncKeyState(VirtualKey::Enter) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_BACKSPACE] = (window->GetAsyncKeyState(VirtualKey::Back) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_RIGHT] = (window->GetAsyncKeyState(VirtualKey::Right) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_LEFT] = (window->GetAsyncKeyState(VirtualKey::Left) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_DOWN] = (window->GetAsyncKeyState(VirtualKey::Down) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_UP] = (window->GetAsyncKeyState(VirtualKey::Up) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_F1] = (window->GetAsyncKeyState(VirtualKey::F1) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_F2] = (window->GetAsyncKeyState(VirtualKey::F2) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_F3] = (window->GetAsyncKeyState(VirtualKey::F3) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_F4] = (window->GetAsyncKeyState(VirtualKey::F4) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_F5] = (window->GetAsyncKeyState(VirtualKey::F5) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_F6] = (window->GetAsyncKeyState(VirtualKey::F6) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_F7] = (window->GetAsyncKeyState(VirtualKey::F7) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_F8] = (window->GetAsyncKeyState(VirtualKey::F8) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_F9] = (window->GetAsyncKeyState(VirtualKey::F9) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_F10] = (window->GetAsyncKeyState(VirtualKey::F10) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_F11] = (window->GetAsyncKeyState(VirtualKey::F11) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_F12] = (window->GetAsyncKeyState(VirtualKey::F12) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_LEFT_SHIFT] = (window->GetAsyncKeyState(VirtualKey::LeftShift) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_LEFT_CONTROL] = (window->GetAsyncKeyState(VirtualKey::LeftControl) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_LEFT_ALT] = (window->GetAsyncKeyState(VirtualKey::LeftMenu) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_RIGHT_SHIFT] = (window->GetAsyncKeyState(VirtualKey::RightShift) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_RIGHT_CONTROL] = (window->GetAsyncKeyState(VirtualKey::RightControl) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_RIGHT_ALT] = (window->GetAsyncKeyState(VirtualKey::RightMenu) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_ZERO] = (window->GetAsyncKeyState(VirtualKey::Number0) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_ONE] = (window->GetAsyncKeyState(VirtualKey::Number1) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_TWO] = (window->GetAsyncKeyState(VirtualKey::Number2) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_THREE] = (window->GetAsyncKeyState(VirtualKey::Number3) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_FOUR] = (window->GetAsyncKeyState(VirtualKey::Number4) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_FIVE] = (window->GetAsyncKeyState(VirtualKey::Number5) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_SIX] = (window->GetAsyncKeyState(VirtualKey::Number6) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_SEVEN] = (window->GetAsyncKeyState(VirtualKey::Number7) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_EIGHT] = (window->GetAsyncKeyState(VirtualKey::Number8) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_NINE] = (window->GetAsyncKeyState(VirtualKey::Number9) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_A] = (window->GetAsyncKeyState(VirtualKey::A) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_B] = (window->GetAsyncKeyState(VirtualKey::B) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_C] = (window->GetAsyncKeyState(VirtualKey::C) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_D] = (window->GetAsyncKeyState(VirtualKey::D) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_E] = (window->GetAsyncKeyState(VirtualKey::E) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_F] = (window->GetAsyncKeyState(VirtualKey::F) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_G] = (window->GetAsyncKeyState(VirtualKey::G) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_H] = (window->GetAsyncKeyState(VirtualKey::H) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_I] = (window->GetAsyncKeyState(VirtualKey::I) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_J] = (window->GetAsyncKeyState(VirtualKey::J) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_K] = (window->GetAsyncKeyState(VirtualKey::K) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_L] = (window->GetAsyncKeyState(VirtualKey::L) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_M] = (window->GetAsyncKeyState(VirtualKey::M) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_N] = (window->GetAsyncKeyState(VirtualKey::N) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_O] = (window->GetAsyncKeyState(VirtualKey::O) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_P] = (window->GetAsyncKeyState(VirtualKey::P) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_Q] = (window->GetAsyncKeyState(VirtualKey::Q) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_R] = (window->GetAsyncKeyState(VirtualKey::R) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_S] = (window->GetAsyncKeyState(VirtualKey::S) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_T] = (window->GetAsyncKeyState(VirtualKey::T) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_U] = (window->GetAsyncKeyState(VirtualKey::U) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_V] = (window->GetAsyncKeyState(VirtualKey::V) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_W] = (window->GetAsyncKeyState(VirtualKey::W) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_X] = (window->GetAsyncKeyState(VirtualKey::X) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_Y] = (window->GetAsyncKeyState(VirtualKey::Y) == CoreVirtualKeyStates::Down);
currentKeyState[KEY_Z] = (window->GetAsyncKeyState(VirtualKey::Z) == CoreVirtualKeyStates::Down);
}
// Get current gamepad state
for (int i = 0; i < MAX_GAMEPADS; i++)
// Process Gamepads
{
if (gamepadReady[i])
// Check if gamepads are ready
for (int i = 0; i < MAX_GAMEPADS; i++)
{
// Register previous gamepad states
for (int k = 0; k < MAX_GAMEPAD_BUTTONS; k++) previousGamepadState[i][k] = currentGamepadState[i][k];
// HACK: UWP keeps a contiguous list of gamepads. For the interest of time I'm just doing a 1:1 mapping of
// connected gamepads with their spot in the list, but this has serious robustness problems
// e.g. player 1, 2, and 3 are playing a game - if player2 disconnects, p3's controller would now be mapped to p2's character since p3 is now second in the list.
// Get current gamepad state
auto gamepad = Gamepad::Gamepads->GetAt(i);
GamepadReading reading = gamepad->GetCurrentReading();
gamepadReady[i] = (i < Gamepad::Gamepads->Size);
}
// NOTE: Maybe it would be wiser to redefine the gamepad button mappings in "raylib.h" for the UWP platform instead of doing this
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_A] = ((reading.Buttons & GamepadButtons::A) == GamepadButtons::A);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_B] = ((reading.Buttons & GamepadButtons::B) == GamepadButtons::B);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_X] = ((reading.Buttons & GamepadButtons::X) == GamepadButtons::X);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_Y] = ((reading.Buttons & GamepadButtons::Y) == GamepadButtons::Y);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_LB] = ((reading.Buttons & GamepadButtons::LeftShoulder) == GamepadButtons::LeftShoulder);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_RB] = ((reading.Buttons & GamepadButtons::RightShoulder) == GamepadButtons::RightShoulder);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_SELECT] = ((reading.Buttons & GamepadButtons::View) == GamepadButtons::View); // Changed for XB1 Controller
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_START] = ((reading.Buttons & GamepadButtons::Menu) == GamepadButtons::Menu); // Changed for XB1 Controller
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_UP] = ((reading.Buttons & GamepadButtons::DPadUp) == GamepadButtons::DPadUp);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_RIGHT] = ((reading.Buttons & GamepadButtons::DPadRight) == GamepadButtons::DPadRight);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_DOWN] = ((reading.Buttons & GamepadButtons::DPadLeft) == GamepadButtons::DPadDown);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_LEFT] = ((reading.Buttons & GamepadButtons::DPadDown) == GamepadButtons::DPadLeft);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_HOME] = false; // Home button not supported by UWP
// Get current gamepad state
for (int i = 0; i < MAX_GAMEPADS; i++)
{
if (gamepadReady[i])
{
// Register previous gamepad states
for (int k = 0; k < MAX_GAMEPAD_BUTTONS; k++) previousGamepadState[i][k] = currentGamepadState[i][k];
// Get current axis state
gamepadAxisState[i][GAMEPAD_XBOX_AXIS_LEFT_X] = reading.LeftThumbstickX;
gamepadAxisState[i][GAMEPAD_XBOX_AXIS_LEFT_Y] = reading.LeftThumbstickY;
gamepadAxisState[i][GAMEPAD_XBOX_AXIS_RIGHT_X] = reading.RightThumbstickX;
gamepadAxisState[i][GAMEPAD_XBOX_AXIS_RIGHT_Y] = reading.RightThumbstickY;
gamepadAxisState[i][GAMEPAD_XBOX_AXIS_LT] = reading.LeftTrigger;
gamepadAxisState[i][GAMEPAD_XBOX_AXIS_RT] = reading.RightTrigger;
// Get current gamepad state
auto gamepad = Gamepad::Gamepads->GetAt(i);
GamepadReading reading = gamepad->GetCurrentReading();
// NOTE: Maybe it would be wiser to redefine the gamepad button mappings in "raylib.h" for the UWP platform instead of remapping them manually
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_A] = ((reading.Buttons & GamepadButtons::A) == GamepadButtons::A);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_B] = ((reading.Buttons & GamepadButtons::B) == GamepadButtons::B);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_X] = ((reading.Buttons & GamepadButtons::X) == GamepadButtons::X);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_Y] = ((reading.Buttons & GamepadButtons::Y) == GamepadButtons::Y);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_LB] = ((reading.Buttons & GamepadButtons::LeftShoulder) == GamepadButtons::LeftShoulder);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_RB] = ((reading.Buttons & GamepadButtons::RightShoulder) == GamepadButtons::RightShoulder);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_SELECT] = ((reading.Buttons & GamepadButtons::View) == GamepadButtons::View); // Changed for XB1 Controller
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_START] = ((reading.Buttons & GamepadButtons::Menu) == GamepadButtons::Menu); // Changed for XB1 Controller
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_UP] = ((reading.Buttons & GamepadButtons::DPadUp) == GamepadButtons::DPadUp);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_RIGHT] = ((reading.Buttons & GamepadButtons::DPadRight) == GamepadButtons::DPadRight);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_DOWN] = ((reading.Buttons & GamepadButtons::DPadLeft) == GamepadButtons::DPadDown);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_LEFT] = ((reading.Buttons & GamepadButtons::DPadDown) == GamepadButtons::DPadLeft);
currentGamepadState[i][GAMEPAD_XBOX_BUTTON_HOME] = false; // Home button not supported by UWP
// Get current axis state
gamepadAxisState[i][GAMEPAD_XBOX_AXIS_LEFT_X] = reading.LeftThumbstickX;
gamepadAxisState[i][GAMEPAD_XBOX_AXIS_LEFT_Y] = reading.LeftThumbstickY;
gamepadAxisState[i][GAMEPAD_XBOX_AXIS_RIGHT_X] = reading.RightThumbstickX;
gamepadAxisState[i][GAMEPAD_XBOX_AXIS_RIGHT_Y] = reading.RightThumbstickY;
gamepadAxisState[i][GAMEPAD_XBOX_AXIS_LT] = reading.LeftTrigger;
gamepadAxisState[i][GAMEPAD_XBOX_AXIS_RT] = reading.RightTrigger;
}
}
}
}
/* OTHER CODE*/
// The following functions were reimplemented for UWP from core.c
static bool GetKeyStatus(int key)
{
return currentKeyState[key];
}
// The following functions were ripped from core.c
// Detect if a key has been pressed once
bool UWPIsKeyPressed(int key)
{
bool pressed = false;
if ((currentKeyState[key] != previousKeyState[key]) && (currentKeyState[key] == 1))
pressed = true;
else pressed = false;
return pressed;
}
// Detect if a key is being pressed (key held down)
bool UWPIsKeyDown(int key)
{
if (GetKeyStatus(key) == 1) return true;
else return false;
}
// Detect if a key has been released once
bool UWPIsKeyReleased(int key)
{
bool released = false;
if ((currentKeyState[key] != previousKeyState[key]) && (currentKeyState[key] == 0)) released = true;
else released = false;
return released;
}
// Detect if a key is NOT being pressed (key not held down)
bool UWPIsKeyUp(int key)
{
if (GetKeyStatus(key) == 0) return true;
else return false;
}
/* OTHER CODE */
// Helper to convert a length in device-independent pixels (DIPs) to a length in physical pixels.
inline float ConvertDipsToPixels(float dips, float dpi)
@ -139,7 +264,6 @@ void App::SetWindow(CoreWindow^ window)
currentDisplayInformation->DpiChanged += ref new TypedEventHandler<DisplayInformation^, Object^>(this, &App::OnDpiChanged);
currentDisplayInformation->OrientationChanged += ref new TypedEventHandler<DisplayInformation^, Object^>(this, &App::OnOrientationChanged);
// The CoreWindow has been created, so EGL can be initialized.
InitWindow(800, 450, (EGLNativeWindowType)window);
}
@ -150,6 +274,9 @@ void App::Load(Platform::String^ entryPoint)
// InitWindow() --> rlglInit()
}
static int posX = 100;
static int posY = 100;
static int time = 0;
// This method is called after the window becomes active.
void App::Run()
{
@ -158,18 +285,44 @@ void App::Run()
if (mWindowVisible)
{
// Update
UWP_PollInput();
// Draw
BeginDrawing();
ClearBackground(RAYWHITE);
DrawRectangle(100, 100, 400, 100, RED);
posX += gamepadAxisState[GAMEPAD_PLAYER1][GAMEPAD_XBOX_AXIS_LEFT_X] * 5;
posY += gamepadAxisState[GAMEPAD_PLAYER1][GAMEPAD_XBOX_AXIS_LEFT_Y] * -5;
DrawRectangle(posX, posY, 400, 100, RED);
DrawLine(0, 0, GetScreenWidth(), GetScreenHeight(), BLUE);
EndDrawing();
if(UWPIsKeyDown(KEY_S))
{
DrawCircle(100, 100, 100, BLUE);
}
if(UWPIsKeyPressed(KEY_A))
{
posX -= 50;
}
if (UWPIsKeyPressed(KEY_D))
{
posX += 50;
}
if(currentKeyState[KEY_LEFT_ALT])
DrawRectangle(250, 250, 20, 20, BLACK);
if (currentKeyState[KEY_BACKSPACE])
DrawRectangle(280, 250, 20, 20, BLACK);
DrawRectangle(250, 280 + (time++ % 60), 10, 10, PURPLE);
EndDrawing();
CoreWindow::GetForCurrentThread()->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessAllIfPresent);
}
else

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ANGLE.WindowsStore" version="2.1.2" targetFramework="native" />
<package id="ANGLE.WindowsStore" version="2.1.13" targetFramework="native" />
</packages>

View File

@ -58,10 +58,14 @@
<PropertyGroup>
<PackageCertificateKeyFile>raylib.App.UWP.TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<IncludePath>C:\Users\Sam\Documents\GitHub\raylib\release\include;$(IncludePath)</IncludePath>
<LibraryPath>C:\Users\Sam\Documents\GitHub\raylib\project\vs2015.UWP\raylib\Debug;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Platform)'=='ARM'">
<Link>
<AdditionalDependencies>mincore.lib; %(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm; $(VCInstallDir)\lib\arm</AdditionalLibraryDirectories>
<AdditionalDependencies>mincore.lib;raylib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(VCInstallDir)\lib\store\arm;$(VCInstallDir)\lib\arm</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
@ -73,7 +77,7 @@
<ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
<Link>
<AdditionalDependencies>mincore.lib;raylib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\Users\Alumno\Downloads\angle\UWP_OpenGLES2\raylib;%(AdditionalLibraryDirectories);$(VCInstallDir)\lib\store\amd64;$(VCInstallDir)\lib\amd64</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>C:\Users\Sam\Documents\GitHub\raylib\project\vs2015.UWP\x64\Debug;C:\Users\Alumno\Downloads\angle\UWP_OpenGLES2\raylib;%(AdditionalLibraryDirectories);$(VCInstallDir)\lib\store\amd64;$(VCInstallDir)\lib\amd64</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
@ -85,6 +89,9 @@
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ProjectReference>
<LinkLibraryDependencies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
@ -122,19 +129,17 @@
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<None Include="raylib.App.UWP.TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="raylib.App.UWP.TemporaryKey.pfx" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\ANGLE.WindowsStore.2.1.2\build\native\ANGLE.WindowsStore.targets" Condition="Exists('..\packages\ANGLE.WindowsStore.2.1.2\build\native\ANGLE.WindowsStore.targets')" />
<Import Project="..\packages\ANGLE.WindowsStore.2.1.13\build\native\ANGLE.WindowsStore.targets" Condition="Exists('..\packages\ANGLE.WindowsStore.2.1.13\build\native\ANGLE.WindowsStore.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\ANGLE.WindowsStore.2.1.2\build\native\ANGLE.WindowsStore.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ANGLE.WindowsStore.2.1.2\build\native\ANGLE.WindowsStore.targets'))" />
<Error Condition="!Exists('..\packages\ANGLE.WindowsStore.2.1.13\build\native\ANGLE.WindowsStore.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ANGLE.WindowsStore.2.1.13\build\native\ANGLE.WindowsStore.targets'))" />
</Target>
</Project>

View File

@ -36,7 +36,7 @@ Global
{B842558C-C034-4E4B-9457-A286F26E83CC}.Release|x86.Build.0 = Release|Win32
{B842558C-C034-4E4B-9457-A286F26E83CC}.Release|x86.Deploy.0 = Release|Win32
{E89D61AC-55DE-4482-AFD4-DF7242EBC859}.Debug|ARM.ActiveCfg = Debug|Win32
{E89D61AC-55DE-4482-AFD4-DF7242EBC859}.Debug|x64.ActiveCfg = Debug|Win32
{E89D61AC-55DE-4482-AFD4-DF7242EBC859}.Debug|x64.ActiveCfg = Debug|x64
{E89D61AC-55DE-4482-AFD4-DF7242EBC859}.Debug|x86.ActiveCfg = Debug|Win32
{E89D61AC-55DE-4482-AFD4-DF7242EBC859}.Debug|x86.Build.0 = Debug|Win32
{E89D61AC-55DE-4482-AFD4-DF7242EBC859}.Release|ARM.ActiveCfg = Release|Win32

View File

@ -5,10 +5,18 @@
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</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>
<PropertyGroup Label="Globals">
<ProjectGuid>{E89D61AC-55DE-4482-AFD4-DF7242EBC859}</ProjectGuid>
@ -23,6 +31,12 @@
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
@ -30,6 +44,13 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
@ -38,13 +59,20 @@
<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 Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<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 Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(ProjectName)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(ProjectName)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)$(ProjectName)\$(Configuration)\temp</IntDir>
@ -66,6 +94,23 @@
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions);GRAPHICS_API_OPENGL_ES2;PLATFORM_UWP</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\release\include;$(SolutionDir)..\..\src\external\include\ANGLE</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
</Link>
<Lib>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
@ -84,6 +129,24 @@
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);GRAPHICS_API_OPENGL_ES2;PLATFORM_UWP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src\external\include\ANGLE;$(SolutionDir)..\..\release\include</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>