From d2276762859344bf1029632aac7b8f5853881f08 Mon Sep 17 00:00:00 2001 From: UnEpicier Date: Mon, 8 Jan 2024 10:34:15 +0100 Subject: [PATCH] feat: default window --- .gitignore | 5 ++ Space-Invader.sln | 31 ++++++++ Space-Invader.vcxproj | 141 ++++++++++++++++++++++++++++++++++ Space-Invader.vcxproj.filters | 25 ++++++ Space-Invader.vcxproj.user | 4 + main.cpp | 29 +++++++ vcpkg.json | 10 +++ 7 files changed, 245 insertions(+) create mode 100644 Space-Invader.sln create mode 100644 Space-Invader.vcxproj create mode 100644 Space-Invader.vcxproj.filters create mode 100644 Space-Invader.vcxproj.user create mode 100644 main.cpp create mode 100644 vcpkg.json diff --git a/.gitignore b/.gitignore index 259148f..d213ce4 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,8 @@ *.exe *.out *.app + +# Visual Studio +.vs +vcpkg_installed +x64 \ No newline at end of file diff --git a/Space-Invader.sln b/Space-Invader.sln new file mode 100644 index 0000000..fca078e --- /dev/null +++ b/Space-Invader.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34330.188 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Space-Invader", "Space-Invader.vcxproj", "{77E81A7A-9E66-4C14-8C8C-2D046FEB7DE8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {77E81A7A-9E66-4C14-8C8C-2D046FEB7DE8}.Debug|x64.ActiveCfg = Debug|x64 + {77E81A7A-9E66-4C14-8C8C-2D046FEB7DE8}.Debug|x64.Build.0 = Debug|x64 + {77E81A7A-9E66-4C14-8C8C-2D046FEB7DE8}.Debug|x86.ActiveCfg = Debug|Win32 + {77E81A7A-9E66-4C14-8C8C-2D046FEB7DE8}.Debug|x86.Build.0 = Debug|Win32 + {77E81A7A-9E66-4C14-8C8C-2D046FEB7DE8}.Release|x64.ActiveCfg = Release|x64 + {77E81A7A-9E66-4C14-8C8C-2D046FEB7DE8}.Release|x64.Build.0 = Release|x64 + {77E81A7A-9E66-4C14-8C8C-2D046FEB7DE8}.Release|x86.ActiveCfg = Release|Win32 + {77E81A7A-9E66-4C14-8C8C-2D046FEB7DE8}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FC394877-8CB5-406D-846E-C6337AFC7323} + EndGlobalSection +EndGlobal diff --git a/Space-Invader.vcxproj b/Space-Invader.vcxproj new file mode 100644 index 0000000..6a9c377 --- /dev/null +++ b/Space-Invader.vcxproj @@ -0,0 +1,141 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {77e81a7a-9e66-4c14-8c8c-2d046feb7de8} + SpaceInvader + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + \ No newline at end of file diff --git a/Space-Invader.vcxproj.filters b/Space-Invader.vcxproj.filters new file mode 100644 index 0000000..fe92929 --- /dev/null +++ b/Space-Invader.vcxproj.filters @@ -0,0 +1,25 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + Fichiers sources + + + \ No newline at end of file diff --git a/Space-Invader.vcxproj.user b/Space-Invader.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/Space-Invader.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..ad420c7 --- /dev/null +++ b/main.cpp @@ -0,0 +1,29 @@ +#include + +int main() +{ + sf::RenderWindow window(sf::VideoMode(1024, 800), "Space Invader", sf::Style::Titlebar | sf::Style::Close); + + while (window.isOpen()) + { + sf::Event event; + while (window.pollEvent(event)) + { + if (event.type == sf::Event::Closed) + { + window.close(); + } + else if (event.type == sf::Event::KeyPressed) + { + if (event.key.code == sf::Keyboard::Escape) + { + window.close(); + } + } + } + + // Update here + } + + return 0; +} \ No newline at end of file diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 0000000..041cb26 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "space-invader", + "version": "0.0.0", + "description": "Space Invader Copy", + "dependencies": [ + { + "name": "sfml" + } + ] +} \ No newline at end of file