Skip to content

Commit

Permalink
GAME-LOGIC: Fix merge requests
Browse files Browse the repository at this point in the history
  • Loading branch information
TTENSHII committed Oct 3, 2023
1 parent 225cfcb commit 67f2c43
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
20 changes: 19 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions src/Client/SceneManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/Client/Systems/Graphic/DeathSystems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ namespace Systems {
// MAP FOR DEATH FUNCTIONS FOR EACH ENTITY
const std::unordered_map<std::type_index, std::function<void(std::size_t)>>
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(
Expand Down

0 comments on commit 67f2c43

Please sign in to comment.