[10658] | 1 | /* |
---|
| 2 | * ORXONOX - the hottest 3D action shooter ever to exist |
---|
| 3 | * > www.orxonox.net < |
---|
| 4 | * |
---|
| 5 | * |
---|
| 6 | * License notice: |
---|
| 7 | * |
---|
| 8 | * This program is free software; you can redistribute it and/or |
---|
| 9 | * modify it under the terms of the GNU General Public License |
---|
| 10 | * as published by the Free Software Foundation; either version 2 |
---|
| 11 | * of the License, or (at your option) any later version. |
---|
| 12 | * |
---|
| 13 | * This program is distributed in the hope that it will be useful, |
---|
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 16 | * GNU General Public License for more details. |
---|
| 17 | * |
---|
| 18 | * You should have received a copy of the GNU General Public License |
---|
| 19 | * along with this program; if not, write to the Free Software |
---|
| 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
| 21 | * |
---|
| 22 | * Author: |
---|
| 23 | * Florian Zinggeler |
---|
| 24 | * Co-authors: |
---|
| 25 | * ... |
---|
| 26 | * |
---|
| 27 | */ |
---|
| 28 | |
---|
| 29 | /** |
---|
| 30 | @file Hover.h |
---|
| 31 | @brief Gametype. |
---|
| 32 | @ingroup Hover |
---|
| 33 | */ |
---|
| 34 | |
---|
| 35 | #ifndef _Hover_H__ |
---|
| 36 | #define _Hover_H__ |
---|
| 37 | |
---|
[10664] | 38 | #include "HoverPrereqs.h" |
---|
[10751] | 39 | #include "HoverOrigin.h" // Necessary for WeakPointer |
---|
[10658] | 40 | //#include "HoverShip.h" DO NOT include in Header. Will cause forward declaration issues |
---|
| 41 | |
---|
| 42 | //#include "HoverHUDinfo.h" |
---|
| 43 | |
---|
[10664] | 44 | #include "gametypes/Gametype.h" |
---|
[10658] | 45 | #include "core/EventIncludes.h" |
---|
| 46 | #include "core/command/Executor.h" |
---|
| 47 | #include "core/config/ConfigValueIncludes.h" |
---|
| 48 | |
---|
| 49 | #include "gamestates/GSLevel.h" |
---|
| 50 | #include "chat/ChatManager.h" |
---|
| 51 | #include <vector> |
---|
| 52 | |
---|
| 53 | // ! HACK |
---|
| 54 | #include "infos/PlayerInfo.h" |
---|
| 55 | |
---|
| 56 | #include "core/command/ConsoleCommand.h" |
---|
| 57 | |
---|
| 58 | #include "tools/Timer.h" |
---|
| 59 | |
---|
[10835] | 60 | |
---|
| 61 | |
---|
[10658] | 62 | namespace orxonox |
---|
| 63 | { |
---|
| 64 | |
---|
[10835] | 65 | enum eDirection |
---|
| 66 | { |
---|
| 67 | eDirection_Invalid = 0, |
---|
| 68 | eDirection_Up = 1, |
---|
| 69 | eDirection_Right = 2, |
---|
| 70 | eDirection_Down = 4, |
---|
| 71 | eDirection_Left = 8 |
---|
| 72 | }; |
---|
| 73 | |
---|
[10664] | 74 | class _HoverExport Hover : public Gametype |
---|
[10658] | 75 | { |
---|
| 76 | public: |
---|
| 77 | Hover(Context* context); |
---|
| 78 | |
---|
| 79 | virtual void start(); |
---|
| 80 | virtual void end(); |
---|
| 81 | |
---|
| 82 | virtual void tick(float dt); |
---|
| 83 | |
---|
[10751] | 84 | // void setOrigin(HoverOrigin* center) |
---|
| 85 | // { center_ = center; } |
---|
[10658] | 86 | |
---|
[10751] | 87 | void setOrigin(HoverOrigin* origin) |
---|
| 88 | { this->origin_ = origin; } |
---|
[10658] | 89 | |
---|
[10900] | 90 | int getFlags(); |
---|
[10751] | 91 | WeakPtr<HoverOrigin> origin_; |
---|
| 92 | |
---|
[10835] | 93 | private: |
---|
| 94 | int CellIdx(); |
---|
| 95 | int RandomInt(); |
---|
| 96 | int RandomInt4(); |
---|
[10900] | 97 | int Flags_; |
---|
[10835] | 98 | |
---|
| 99 | bool IsDirValid( eDirection Dir ); |
---|
| 100 | eDirection GetDirection(); |
---|
| 101 | void GenerateMaze(); |
---|
| 102 | void RenderMaze(); |
---|
| 103 | void MazeOut(); |
---|
| 104 | void LevelOut(); |
---|
[10894] | 105 | std::vector<HoverFlag*> flagVector; |
---|
[10835] | 106 | |
---|
| 107 | |
---|
[10658] | 108 | }; |
---|
| 109 | } |
---|
| 110 | |
---|
| 111 | #endif /* _Hover_H__ */ |
---|