diff --git a/CMakeLists.txt b/CMakeLists.txt index 906ba6cf..d1b43b6d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,7 +56,25 @@ install(TARGETS ${PROJECT_NAME_SERVER} add_subdirectory(deps) - +# Clang-Tidy + +find_program(CLANG_TIDY_EXE NAMES "clang-tidy") + +if(CLANG_TIDY_EXE) + if (MSVC) + set_target_properties(${PROJECT_NAME_CLIENT} PROPERTIES + VS_GLOBAL_RunCodeAnalysis true + VS_GLOBAL_EnableClangTidyCodeAnalysis true + ) + set_target_properties(${PROJECT_NAME_SERVER} PROPERTIES + VS_GLOBAL_RunCodeAnalysis true + VS_GLOBAL_EnableClangTidyCodeAnalysis true + ) + else() + set(CLANG_TIDY_COMMAND "${CLANG_TIDY_EXE}" "--fix" "--fix-notes" "--fix-errors") + set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND}") + endif() +endif() if(MSVC) target_compile_options( diff --git a/src/Client/SceneManager.cpp b/src/Client/SceneManager.cpp index 5da432bc..5cfcbeba 100644 --- a/src/Client/SceneManager.cpp +++ b/src/Client/SceneManager.cpp @@ -14,8 +14,8 @@ #include "CustomTypes.hpp" -constexpr int screenWidth = 800; -constexpr int screenHeight = 600; +constexpr int screenWidth = 1920; +constexpr int screenHeight = 1080; // NOLINTBEGIN(cppcoreguidelines-avoid-non-const-global-variables) bool SceneManager::_init = false; diff --git a/src/Client/Systems/Graphic/DeathSystems.cpp b/src/Client/Systems/Graphic/DeathSystems.cpp index ca413563..76fd212a 100644 --- a/src/Client/Systems/Graphic/DeathSystems.cpp +++ b/src/Client/Systems/Graphic/DeathSystems.cpp @@ -34,8 +34,8 @@ namespace Systems { // MAP FOR DEATH FUNCTIONS FOR EACH ENTITY const std::unordered_map> deathFunctions = { - // {std::type_index(typeid(Types::Player)), setPlayerAnimRectDeath}, - // {std::type_index(typeid(Types::Enemy)), setEnemyDeathFunc }, + {std::type_index(typeid(Types::Player)), setPlayerAnimRectDeath}, + {std::type_index(typeid(Types::Enemy)), setEnemyDeathFunc }, }; void DeathSystems::setEntityDeathFunction(