소스 검색

let's just use C++17 ok

opengl-renderer-broken
Martin Dørum 4 년 전
부모
커밋
7f4dedb8f2
3개의 변경된 파일5개의 추가작업 그리고 10개의 파일을 삭제
  1. 1
    1
      CMakeLists.txt
  2. 0
    5
      core.mod/src/entities/EntPlayer.cc
  3. 4
    4
      core.mod/src/entities/EntPlayer.h

+ 1
- 1
CMakeLists.txt 파일 보기

@@ -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")


+ 0
- 5
core.mod/src/entities/EntPlayer.cc 파일 보기

@@ -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);
}

+ 4
- 4
core.mod/src/entities/EntPlayer.h 파일 보기

@@ -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);
};

Loading…
취소
저장