diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..b87e3122 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,32 @@ +# Merge Request Template + +## Description +### What's new? +... + +### What has changed? +... + +### Extra information? +... + +## Definition of Done +### Code +- [ ] Code voldoet aan alle genoemde eisen in de code conventions. +- [ ] Code komt sterk overeen met gamedesign (User Story #1). +- [ ] Code komt overeen met het technisch design, bij nodige afwijking wordt het diagram geupdate en de update gecommuniceerd met het hele team. +- [ ] Code gedocumenteerd (comments). +- [ ] Code gecontroleerd op (stilistische) fouten. +- [ ] Unit tests geschreven en geslaagd voor nieuwe code. +- [x] ~~Code is reviewed door minimaal één ander teamlid. Voor complexe danwel grote PR door minimaal 2 teamleden.~~ PR gerelateerd. +- [ ] Aan alle in de story benoemde acceptatie criteria is voldaan. + +### Documentatie +- [ ] Github wiki aangepast. + +### Testen +- [ ] Alle (nieuwe) code runt lokaal op het systeem van de developer. +- [ ] Alle gevonden bugs zijn onderkend en indien deze niet op korte termijn opgelost kunnen worden, als nieuw item opgenomen in de backlog. + +### Overige +- [ ] User story in Taiga staat op Testing, wanneer getest op Done. \ No newline at end of file diff --git a/SDL-Research/.gitignore b/SDL-Research/.gitignore index b285fc76..e115ef4b 100644 --- a/SDL-Research/.gitignore +++ b/SDL-Research/.gitignore @@ -1,3 +1,4 @@ ./cmake-build-debug/ .cmake/ +build/ SDL2Test \ No newline at end of file diff --git a/SDL-Research/CMakeLists.txt b/SDL-Research/CMakeLists.txt index c85c02e0..5e02a33a 100644 --- a/SDL-Research/CMakeLists.txt +++ b/SDL-Research/CMakeLists.txt @@ -1,13 +1,20 @@ -cmake_minimum_required(VERSION 3.7) -set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) -set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) +cmake_minimum_required(VERSION 3.17) +set(CMAKE_CXX_STANDARD 17) + +set(CMAKE_CURRENT_BINARY_DIR ./build) +set(CMAKE_CURRENT_SOURCE_DIR ./) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) + +set(SDL2_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../SDL) -#SET(SDL2_DIR ./lib) project(SDL2Test) -#find_package(SDL2 REQUIRED) -#include_directories(SDL2Test ${SDL2_INCLUDE_DIRS}) + +add_subdirectory(${SDL2_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) add_executable(SDL2Test Main.cpp) -#target_link_libraries(SDL2Test ${SDL2_LIBRARIES}) \ No newline at end of file + +target_include_directories(SDL2Test PUBLIC ${SDL2_SOURCE_DIR}/include) +target_link_libraries(SDL2Test SDL2) \ No newline at end of file diff --git a/SDL-Research/Main.cpp b/SDL-Research/Main.cpp index 342b491e..d1bd3c84 100644 --- a/SDL-Research/Main.cpp +++ b/SDL-Research/Main.cpp @@ -1,35 +1,32 @@ // // Created by husey on 29-8-2020. // +#define SDL_MAIN_HANDLED #include -//#include "SDL.h" - +#include "SDL.h" using namespace std; int main(int argc, char *argv[]) { -// SDL_Init(SDL_INIT_VIDEO); -// -// SDL_Window *window = SDL_CreateWindow( -// "SDL2Test", -// SDL_WINDOWPOS_UNDEFINED, -// SDL_WINDOWPOS_UNDEFINED, -// 640, -// 480, -// 0 -// ); -// -// SDL_Renderer *renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_SOFTWARE); -// SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE); -// SDL_RenderClear(renderer); -// SDL_RenderPresent(renderer); -// -// SDL_Delay(3000); -// -// SDL_DestroyWindow(window); -// SDL_Quit(); + SDL_Init(SDL_INIT_VIDEO); + + SDL_Window *window = SDL_CreateWindow( + "SDL2Test", + SDL_WINDOWPOS_UNDEFINED, + SDL_WINDOWPOS_UNDEFINED, + 640, + 480, + 0 + ); + + SDL_Renderer *renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_SOFTWARE); + SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE); + SDL_RenderClear(renderer); + SDL_RenderPresent(renderer); + + std::string name; @@ -37,5 +34,9 @@ int main(int argc, char *argv[]) std::getline (std::cin,name); std::cout << "Hello, " << name << "!\n"; + + SDL_DestroyWindow(window); + SDL_Quit(); + return 0; } \ No newline at end of file diff --git a/SDL-Research/SDL2Test.cbp b/SDL-Research/SDL2Test.cbp deleted file mode 100644 index df106e53..00000000 --- a/SDL-Research/SDL2Test.cbp +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - diff --git a/SDL-Research/lib/sdl2-config.cmake b/SDL-Research/lib/sdl2-config.cmake deleted file mode 100644 index 8ac7d39f..00000000 --- a/SDL-Research/lib/sdl2-config.cmake +++ /dev/null @@ -1,10 +0,0 @@ -set(SDL2_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../include") - -# Support both 32 and 64 bit builds -if (${CMAKE_SIZEOF_VOID_P} MATCHES 8) - set(SDL2_LIBRARIES "${CMAKE_CURRENT_LIST_DIR}/x64/SDL2.lib;${CMAKE_CURRENT_LIST_DIR}/x64/SDL2main.lib") -else () - set(SDL2_LIBRARIES "${CMAKE_CURRENT_LIST_DIR}/x86/SDL2.lib;${CMAKE_CURRENT_LIST_DIR}/x86/SDL2main.lib") -endif () - -string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES) \ No newline at end of file