123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- #pragma once
- #include <SFML/Graphics.hpp>
- #include <SFML/Audio.hpp>
- #include <tmxlite/Map.hpp>
- #include "Shared.hpp"
- #include "Player.hpp"
- #include "NumText.hpp"
- #include "Portal.hpp"
- #include "Kebab.hpp"
- #include "SFMLOrthogonalLayer.hpp"
- #define LAYERCOUNT 5
- using namespace sf;
- struct Global {
- int lives;
- unsigned score;
- unsigned high;
- bool restart;
- RenderWindow window;
- Music music;
- bool reachedEast;
- };
- class Core {
- public:
- Core() = delete;
- Core(Global* lg);
- virtual ~Core();
- void run();
- private:
- void think(float delta);
- void loop(float delta);
- void render();
- Global* g;
- View _view;
- Shared _settings;
- Player _player;
- tmx::Map map;
- MapLayer _layer[LAYERCOUNT];
- Texture _background_tx;
- Sprite _background;
- Texture _evm_tx;
- Sprite _evm;
- Texture _fog_tx;
- Sprite _fog;
- Sprite _head;
- Texture _head_tx;
- Sprite _frame;
- Texture _frame_tx;
- Sprite _hud_score;
- Sprite _hud_highscore;
- Sprite _hud_time;
- Sprite _hud_energy;
- Texture _hud_tx;
- Texture _font;
- NumText _score_text;
- NumText _highscore_text;
- NumText _time_text;
- NumText _energy_text;
- RectangleShape debug;
- RectangleShape debug2;
- std::vector<Corrupted> _corrupted;
- std::vector<Kebab> keb;
- Clock _corr_clock;
- Portal _p1;
- Portal _p2;
- Portal _p3;
- Texture splashtx;
- Sprite splash;
- int _lives;
- Clock _s1c;
- Sprite _trixie;
- Texture _trix;
- bool timegranted;
- Texture ggtex;
- std::vector<Sprite> gg;
- SoundBuffer boom;
- Sound sht;
- std::vector<IntRect> jedi;
- Clock jediClock;
- };
|