diff options
-rw-r--r-- | game/CMakeLists.txt | 2 | ||||
-rw-r--r-- | game/QuitScript.cpp | 5 | ||||
-rw-r--r-- | game/QuitScript.h | 3 | ||||
-rw-r--r-- | game/hud/HudScript.cpp | 3 | ||||
-rw-r--r-- | game/missile/AlertScript.cpp | 4 | ||||
-rw-r--r-- | game/missile/AlertScript.h | 3 | ||||
-rw-r--r-- | game/missile/AlertSubScene.cpp | 11 | ||||
-rw-r--r-- | game/missile/AlertSubScene.h | 3 | ||||
-rw-r--r-- | game/missile/MissileScript.cpp | 10 | ||||
-rw-r--r-- | game/missile/SpawnEvent.cpp | 4 |
10 files changed, 24 insertions, 24 deletions
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt index b39416b..a94beca 100644 --- a/game/CMakeLists.txt +++ b/game/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.28) set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 20) set(CMAKE_EXPORT_COMPILE_COMMANDS 1) -set(CMAKE_BUILD_TYPE Debug) +set(CMAKE_BUILD_TYPE Release) project(game C CXX) add_subdirectory(../src crepe) diff --git a/game/QuitScript.cpp b/game/QuitScript.cpp index e48863f..fc33dcf 100644 --- a/game/QuitScript.cpp +++ b/game/QuitScript.cpp @@ -1,8 +1,9 @@ #include "QuitScript.h" -#include "api/Event.h" -#include "api/KeyCodes.h" + +#include <crepe/api/Event.h> +#include <crepe/api/KeyCodes.h> using namespace crepe; diff --git a/game/QuitScript.h b/game/QuitScript.h index c295183..af78ccf 100644 --- a/game/QuitScript.h +++ b/game/QuitScript.h @@ -1,7 +1,8 @@ #pragma once -#include "api/Script.h" +#include <crepe/api/Script.h> + class QuitScript : public crepe::Script { private: bool on_event(const crepe::KeyPressEvent & ev); diff --git a/game/hud/HudScript.cpp b/game/hud/HudScript.cpp index 3fb7a77..e4aeae7 100644 --- a/game/hud/HudScript.cpp +++ b/game/hud/HudScript.cpp @@ -3,6 +3,7 @@ #include "../Config.h" #include "../Events.h" +#include "api/KeyCodes.h" #include "menus/endgame/EndGameSubScript.h" #include <climits> @@ -37,7 +38,7 @@ void HudScript::init() { } bool HudScript::toggle_fps(crepe::KeyPressEvent ev) { - if (ev.key != Keycode::END) return false; + if (ev.key != Keycode::D1) return false; Text & txt_fps = this->get_components_by_name<Text>(HUD_FPS).front(); this->show_fps = !this->show_fps; if (this->show_fps) { diff --git a/game/missile/AlertScript.cpp b/game/missile/AlertScript.cpp index c1124ac..24b4af9 100644 --- a/game/missile/AlertScript.cpp +++ b/game/missile/AlertScript.cpp @@ -1,8 +1,8 @@ #include "AlertScript.h" #include "../Config.h" -#include "api/CircleCollider.h" -#include "api/Sprite.h" +#include <crepe/api/CircleCollider.h> +#include <crepe/api/Sprite.h> #include <crepe/api/Transform.h> using namespace crepe; diff --git a/game/missile/AlertScript.h b/game/missile/AlertScript.h index ab29863..5b0b3a1 100644 --- a/game/missile/AlertScript.h +++ b/game/missile/AlertScript.h @@ -1,6 +1,7 @@ #pragma once -#include "api/Script.h" +#include <crepe/api/Script.h> + class AlertScript : public crepe::Script { private: bool has_alert = false; diff --git a/game/missile/AlertSubScene.cpp b/game/missile/AlertSubScene.cpp index c3379e8..8d59f97 100644 --- a/game/missile/AlertSubScene.cpp +++ b/game/missile/AlertSubScene.cpp @@ -1,10 +1,9 @@ #include "AlertSubScene.h" #include "../Config.h" -#include "api/Animator.h" -#include "api/BehaviorScript.h" -#include "api/Scene.h" -#include "api/Sprite.h" -#include "missile/AlertScript.h" + +#include <crepe/api/Animator.h> +#include <crepe/api/Scene.h> +#include <crepe/api/Sprite.h> using namespace crepe; @@ -13,8 +12,6 @@ MissileAlert::MissileAlert(Scene& scn){ Asset missile_alert_ss {"asset/obstacles/missile/missileAlert.png"}; - //alert.add_component<BehaviorScript>().set_script<AlertScript>(); - auto & missile_alert_sprite = alert.add_component<Sprite>( missile_alert_ss, Sprite::Data { diff --git a/game/missile/AlertSubScene.h b/game/missile/AlertSubScene.h index 661b3f1..8ea288f 100644 --- a/game/missile/AlertSubScene.h +++ b/game/missile/AlertSubScene.h @@ -1,6 +1,7 @@ #pragma once -#include "api/Scene.h" +#include <crepe/api/Scene.h> + class MissileAlert { public: MissileAlert(crepe::Scene & scn); diff --git a/game/missile/MissileScript.cpp b/game/missile/MissileScript.cpp index 2d1052e..797e1ac 100644 --- a/game/missile/MissileScript.cpp +++ b/game/missile/MissileScript.cpp @@ -1,17 +1,15 @@ #include "MissileScript.h" #include "../Config.h" -#include "Collider.h" -#include "api/BehaviorScript.h" -#include "api/CircleCollider.h" -#include "api/Rigidbody.h" +#include <cmath> +#include <crepe/api/CircleCollider.h> +#include <crepe/api/Rigidbody.h> +#include <crepe/api/BehaviorScript.h> #include <crepe/api/Animator.h> #include <crepe/api/AudioSource.h> #include <crepe/api/Transform.h> #include <crepe/system/CollisionSystem.h> #include <crepe/types.h> - -#include <cmath> #include <crepe/api/AI.h> #include <crepe/api/KeyCodes.h> #include <crepe/api/Sprite.h> diff --git a/game/missile/SpawnEvent.cpp b/game/missile/SpawnEvent.cpp index c407832..a54d0a5 100644 --- a/game/missile/SpawnEvent.cpp +++ b/game/missile/SpawnEvent.cpp @@ -1,8 +1,8 @@ #include "SpawnEvent.h" -#include "Config.h" #include "Random.h" -#include "api/CircleCollider.h" + +#include <crepe/api/CircleCollider.h> #include <crepe/api/Animator.h> #include <crepe/api/AudioSource.h> #include <crepe/api/BehaviorScript.h> |