- Timestamp:
- Jan 4, 2016, 11:23:59 AM (8 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentationHS15/src/modules/hover/MazeGenerator.h
r11026 r11035 28 28 29 29 /** 30 @file Hover.h 31 @brief Gametype. For more information see .cc file 30 @file MazeGenerator.h 32 31 @ingroup Hover 33 32 */ 34 33 35 #ifndef _ Hover_H__36 #define _ Hover_H__34 #ifndef _MazeGenerator_H__ 35 #define _MazeGenerator_H__ 37 36 38 37 #include "HoverPrereqs.h" 39 #include "HoverOrigin.h"40 41 #include "gametypes/Gametype.h"42 #include "core/EventIncludes.h"43 #include "core/command/Executor.h"44 #include "core/config/ConfigValueIncludes.h"45 46 #include "gamestates/GSLevel.h"47 #include "chat/ChatManager.h"48 #include <vector>49 50 // ! HACK51 #include "infos/PlayerInfo.h"52 53 #include "core/command/ConsoleCommand.h"54 55 #include "tools/Timer.h"56 57 58 38 59 39 namespace orxonox 60 40 { 61 62 41 enum eDirection 63 42 { … … 69 48 }; 70 49 71 class _HoverExport Hover : public Gametype50 class _HoverExport MazeGenerator 72 51 { 73 public:74 Hover(Context* context);52 public: 53 MazeGenerator(); 75 54 76 virtual void start(); 77 virtual void end(); 55 void generateMaze(); 56 void renderMaze(); 57 void mazeOut(); 58 void levelOut(); 78 59 79 virtual void tick(float dt); 80 81 void setOrigin(HoverOrigin* origin) 82 { this->origin_ = origin; } 83 84 int getFlags(); 85 WeakPtr<HoverOrigin> origin_; 60 int* getLevelcode() const 61 { return this->levelcode_; } 62 int getNumCells() const 63 { return NUM_CELLS; } 86 64 87 65 private: 88 int CellIdx(); 89 int RandomInt(); 90 int RandomInt4(); 91 int Flags_; 66 bool isDirValid( eDirection Dir ); 67 eDirection getDirection(); 92 68 93 bool IsDirValid( eDirection Dir ); 94 eDirection GetDirection(); 95 void GenerateMaze(); 96 void RenderMaze(); 97 void MazeOut(); 98 void LevelOut(); 99 std::vector<HoverFlag*> flagVector; 69 int cellIdx(); 70 int randomInt(); 71 int randomInt4(); 100 72 73 static const int NUM_CELLS = 10; 74 int* levelcode_; 75 unsigned char* maze_; 101 76 77 // current traversing position 78 int ptX_; 79 int ptY_; 80 81 int headingX_[9]; 82 int headingY_[9]; 83 int mask_[9]; 102 84 }; 103 85 } 104 86 105 #endif /* _ Hover_H__ */87 #endif /* _MazeGenerator_H__ */
Note: See TracChangeset
for help on using the changeset viewer.