diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2025-01-06 17:57:50 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2025-01-06 17:57:50 +0100 |
commit | 4c83562ef39a0364cd01f1f3615eb7672ca9f4a2 (patch) | |
tree | 2f7b72c538e7a30c741939d339f6ec2ddadfa129 /game/menus/mainmenu | |
parent | 07615060da6c211e08a3d7f2e1bb9e99ffc05364 (diff) |
corrected includes
Diffstat (limited to 'game/menus/mainmenu')
-rw-r--r-- | game/menus/mainmenu/ButtonTransitionPreviewScript.cpp | 5 | ||||
-rw-r--r-- | game/menus/mainmenu/ButtonTransitionPreviewScript.h | 3 | ||||
-rw-r--r-- | game/menus/mainmenu/ITransitionScript.cpp | 8 | ||||
-rw-r--r-- | game/menus/mainmenu/MainMenuConfig.h | 2 | ||||
-rw-r--r-- | game/menus/mainmenu/MainMenuScene.cpp | 19 | ||||
-rw-r--r-- | game/menus/mainmenu/MainMenuScene.h | 1 | ||||
-rw-r--r-- | game/menus/mainmenu/TransitionStartScript.cpp | 7 | ||||
-rw-r--r-- | game/menus/mainmenu/TransitionStartScript.h | 1 |
8 files changed, 21 insertions, 25 deletions
diff --git a/game/menus/mainmenu/ButtonTransitionPreviewScript.cpp b/game/menus/mainmenu/ButtonTransitionPreviewScript.cpp index c702260..084d02b 100644 --- a/game/menus/mainmenu/ButtonTransitionPreviewScript.cpp +++ b/game/menus/mainmenu/ButtonTransitionPreviewScript.cpp @@ -1,20 +1,17 @@ #include "ButtonTransitionPreviewScript.h" + #include "../MenusConfig.h" -#include "iostream" using namespace crepe; using namespace std; - void ButtonTransitionPreviewScript::init(){ - cout << "script init" << endl; IButtonScript::init(); this->subscribe<ButtonPressEvent>([this](const ButtonPressEvent& e) { return this->on_button_press(e); }); } bool ButtonTransitionPreviewScript::on_button_press(const ButtonPressEvent& e){ if(!this->transition) this->transition = true; - cout << "Start triggered:" << e.metadata.game_object_id << std::endl; return false; } diff --git a/game/menus/mainmenu/ButtonTransitionPreviewScript.h b/game/menus/mainmenu/ButtonTransitionPreviewScript.h index 26a778a..5973dbf 100644 --- a/game/menus/mainmenu/ButtonTransitionPreviewScript.h +++ b/game/menus/mainmenu/ButtonTransitionPreviewScript.h @@ -1,8 +1,9 @@ #pragma once -#include "../IButtonScript.h" #include "ITransitionScript.h" +#include "../IButtonScript.h" + class ButtonTransitionPreviewScript : public ITransitionScript, public IButtonScript { public: void init() override; diff --git a/game/menus/mainmenu/ITransitionScript.cpp b/game/menus/mainmenu/ITransitionScript.cpp index 07360a0..9e547e6 100644 --- a/game/menus/mainmenu/ITransitionScript.cpp +++ b/game/menus/mainmenu/ITransitionScript.cpp @@ -1,9 +1,11 @@ #include "ITransitionScript.h" -#include "api/Transform.h" -#include <crepe/api/Camera.h> #include "MainMenuConfig.h" + #include "../MenusConfig.h" -#include "types.h" + +#include <crepe/types.h> +#include <crepe/api/Transform.h> +#include <crepe/api/Camera.h> using namespace crepe; using namespace std; diff --git a/game/menus/mainmenu/MainMenuConfig.h b/game/menus/mainmenu/MainMenuConfig.h index 7227f84..01995f0 100644 --- a/game/menus/mainmenu/MainMenuConfig.h +++ b/game/menus/mainmenu/MainMenuConfig.h @@ -1,5 +1,5 @@ #pragma once -#include "types.h" +#include <crepe/types.h> //main menu config static constexpr float STARTMAP_OFFSET = 50; diff --git a/game/menus/mainmenu/MainMenuScene.cpp b/game/menus/mainmenu/MainMenuScene.cpp index f6f8220..fcbd43f 100644 --- a/game/menus/mainmenu/MainMenuScene.cpp +++ b/game/menus/mainmenu/MainMenuScene.cpp @@ -1,17 +1,20 @@ #include "MainMenuScene.h" -#include "../ButtonSubScene.h" #include "TransitionStartScript.h" -#include "api/BehaviorScript.h" -#include "api/Camera.h" +#include "MainMenuConfig.h" + +#include "../ButtonSubScene.h" +#include "../MenusConfig.h" + #include "../../background/StartSubScene.h" #include "../../background/HallwaySubScene.h" -#include "MainMenuConfig.h" -#include "api/GameObject.h" -#include "api/Sprite.h" -#include "manager/SaveManager.h" #include "../../Config.h" -#include "../MenusConfig.h" + +#include <crepe/api/BehaviorScript.h> +#include <crepe/api/GameObject.h> +#include <crepe/api/Sprite.h> +#include <crepe/api/Camera.h> +#include <crepe/manager/SaveManager.h> using namespace crepe; using namespace std; diff --git a/game/menus/mainmenu/MainMenuScene.h b/game/menus/mainmenu/MainMenuScene.h index f7319cb..1eea90e 100644 --- a/game/menus/mainmenu/MainMenuScene.h +++ b/game/menus/mainmenu/MainMenuScene.h @@ -6,6 +6,5 @@ class MainMenuScene : public crepe::Scene { public: void load_scene(); - std::string get_name() const; }; diff --git a/game/menus/mainmenu/TransitionStartScript.cpp b/game/menus/mainmenu/TransitionStartScript.cpp index d03adf0..9b395de 100644 --- a/game/menus/mainmenu/TransitionStartScript.cpp +++ b/game/menus/mainmenu/TransitionStartScript.cpp @@ -1,15 +1,10 @@ #include "TransitionStartScript.h" + #include "../MenusConfig.h" -#include "iostream" using namespace crepe; using namespace std; - -void TransitionStartScript::init(){ - cout << "script init" << endl; -} - void TransitionStartScript::fixed_update(crepe::duration_t dt){ if(this->get_key_state(Keycode::ENTER) && this->transition == false) this->transition = true; } diff --git a/game/menus/mainmenu/TransitionStartScript.h b/game/menus/mainmenu/TransitionStartScript.h index 76f532e..c6df1b9 100644 --- a/game/menus/mainmenu/TransitionStartScript.h +++ b/game/menus/mainmenu/TransitionStartScript.h @@ -4,7 +4,6 @@ class TransitionStartScript : public ITransitionScript { public: - void init() override; void fixed_update(crepe::duration_t dt) override; const char* get_scene_name() const override; }; |