| 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 |  | 
|---|
| 38 | #include "HoverPrereqs.h" | 
|---|
| 39 | #include "HoverOrigin.h" // Necessary for WeakPointer | 
|---|
| 40 | //#include "HoverShip.h"        DO NOT include in Header. Will cause forward declaration issues | 
|---|
| 41 |  | 
|---|
| 42 | //#include "HoverHUDinfo.h" | 
|---|
| 43 |  | 
|---|
| 44 | #include "gametypes/Gametype.h" | 
|---|
| 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 |  | 
|---|
| 60 |  | 
|---|
| 61 |  | 
|---|
| 62 | namespace orxonox | 
|---|
| 63 | { | 
|---|
| 64 |  | 
|---|
| 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 |  | 
|---|
| 74 | class _HoverExport Hover : public Gametype | 
|---|
| 75 | { | 
|---|
| 76 | public: | 
|---|
| 77 | Hover(Context* context); | 
|---|
| 78 |  | 
|---|
| 79 | virtual void start(); | 
|---|
| 80 | virtual void end(); | 
|---|
| 81 |  | 
|---|
| 82 | virtual void tick(float dt); | 
|---|
| 83 |  | 
|---|
| 84 | // void setOrigin(HoverOrigin* center) | 
|---|
| 85 | //    { center_ = center; } | 
|---|
| 86 |  | 
|---|
| 87 | void setOrigin(HoverOrigin* origin) | 
|---|
| 88 | { this->origin_ = origin; } | 
|---|
| 89 |  | 
|---|
| 90 |  | 
|---|
| 91 | WeakPtr<HoverOrigin> origin_; | 
|---|
| 92 |  | 
|---|
| 93 | private: | 
|---|
| 94 | int CellIdx(); | 
|---|
| 95 | int RandomInt(); | 
|---|
| 96 | int RandomInt4(); | 
|---|
| 97 |  | 
|---|
| 98 |  | 
|---|
| 99 | bool IsDirValid( eDirection Dir ); | 
|---|
| 100 | eDirection GetDirection(); | 
|---|
| 101 | void GenerateMaze(); | 
|---|
| 102 | void RenderMaze(); | 
|---|
| 103 | void MazeOut(); | 
|---|
| 104 | void LevelOut(); | 
|---|
| 105 |  | 
|---|
| 106 |  | 
|---|
| 107 | }; | 
|---|
| 108 | } | 
|---|
| 109 |  | 
|---|
| 110 | #endif /* _Hover_H__ */ | 
|---|