| 1 | // (_||_/ |
| 2 | // ( ) Editor class |
| 3 | // ( o 0 ) |
| 4 | //-OOO°--(_)---°OOO--------------------------------------- |
| 5 | // Copyright (C) 2006 By Dominique Roux-Serret |
| 6 | // .OOOo oOOO. [email protected] |
| 7 | //-( )------( )--------------------------------------- |
| 8 | // ( ( ) / Copyright (C) 2023 By Johnny Jazeix |
| 9 | // (_) (_/ [email protected] |
| 10 | |
| 11 | // This program is free software; you can redistribute it and/or modify |
| 12 | // it under the terms of the GNU General Public License as published by |
| 13 | // the Free Software Foundation; either version 2 or version 3 of the License. |
| 14 | |
| 15 | // This program is distributed in the hope that it will be useful, |
| 16 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | // GNU General Public License for more details. |
| 19 | |
| 20 | // You should have received a copy of the GNU General Public License along |
| 21 | // with this program; if not, write to the Free Software Foundation, Inc., |
| 22 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 23 | |
| 24 | #ifndef EDITOR_DOM_ |
| 25 | #define EDITOR_DOM_ |
| 26 | |
| 27 | #include "preference.h" |
| 28 | #include "sprite.h" |
| 29 | |
| 30 | class Mouse; |
| 31 | class Game; |
| 32 | class Gamepad; |
| 33 | |
| 34 | /*** Définition de la class ***/ |
| 35 | /******************************/ |
| 36 | class Editor |
| 37 | { |
| 38 | public: |
| 39 | Editor(Mouse &mouse, Game &game, Gamepad &gamepad) : |
| 40 | m_mouse(mouse), m_game(game), m_gamepad(gamepad) { }; |
| 41 | ~Editor() = default; |
| 42 | |
| 43 | /*** Fonctions ***/ |
| 44 | /*****************/ |
| 45 | eMenu SDLMain(int NumNiveau); // Boucle principale |
| 46 | void Affiche() const; // Charge un tableau |
| 47 | void PrendTouche(int Touche); // Prend les touches enfoncées |
| 48 | |
| 49 | private: |
| 50 | /*** Variables ***/ |
| 51 | int N { 0 }; // Numero du tableau à éditer |
| 52 | e_Sprite Option { locomotive }; |
| 53 | int NumDeco { 0 }; |
| 54 | int NumN { 0 }; |
| 55 | |
| 56 | Mouse &m_mouse; |
| 57 | Game &m_game; |
| 58 | Gamepad &m_gamepad; |
| 59 | }; |
| 60 | #endif |