@@ -3,7 +3,7 @@ project(swan) | |||
find_package(SFML 2.5 COMPONENTS graphics system window REQUIRED) | |||
add_compile_options(-Wall -Wextra -Wpedantic -Wno-unused-parameter -g -fsanitize=address) | |||
add_compile_options(-std=c++17 -Wall -Wextra -Wpedantic -Wno-unused-parameter -g -fsanitize=address) | |||
add_link_options(-fsanitize=address) | |||
include_directories("${PROJECT_SOURCE_DIR}/libswan/include") | |||
@@ -1,10 +1,5 @@ | |||
#include "EntPlayer.h" | |||
const float EntPlayer::FORCE = 600; | |||
const float EntPlayer::FRICTION = 100; | |||
const float EntPlayer::MASS = 80; | |||
const Swan::Vec2 EntPlayer::SIZE = Swan::Vec2(1, 2); | |||
void EntPlayer::draw(Swan::Win &win) { | |||
body_.outline(win); | |||
} |
@@ -18,8 +18,8 @@ public: | |||
void update(Swan::WorldPlane &plane, float dt) override; | |||
private: | |||
static const float FORCE; | |||
static const float FRICTION; | |||
static const float MASS; | |||
static const Swan::Vec2 SIZE; | |||
static constexpr float FORCE = 600; | |||
static constexpr float FRICTION = 100; | |||
static constexpr float MASS = 80; | |||
static constexpr Swan::Vec2 SIZE = Swan::Vec2(1, 2); | |||
}; |