PROTO::KLUDGE  0.1
Quick prototyping library for games using SDL and OpenGL.
Arena.hpp
Go to the documentation of this file.
1 #ifndef ARENA_HPP
2 #define ARENA_HPP
3 
4 #include <algorithm>
5 #include <string>
6 
7 #include <csv/reader.hpp>
8 
9 #include "steeriously/libinc.hpp"
10 
11 #include "graphics/GLTexture.hpp"
12 #include "graphics/Shader.hpp"
13 #include "gameplay/Thwomp.hpp"
16 #include "gameplay/Ghost.hpp"
17 #include "gameplay/Walker.hpp"
19 
20 namespace pk
21 {
22 
23 class Arena
24 {
25  public:
26  Arena(b2World* world, std::string level);
27  virtual ~Arena();
28 
29  void handleInput();
30 
31  void update(float dt);
32 
33  void render(pk::GLStates& states);
34 
35  bool requestPause(){ return (m_p1->requestPause() || m_p2->requestPause() || m_p3->requestPause() || m_p4->requestPause()); };
36 
37  private:
38  b2World* m_world;
42  csv::Reader m_platformData;
43  std::vector<pk::StaticPlatform> m_platforms;
47  csv::Reader m_specialPlatformData;
48  std::vector<pk::MovingPlaform*> m_movingPlatforms;
50  csv::Reader m_thwompData;
51  std::vector<pk::Thwomp*> m_thwomps;
52  steer::BehaviorParameters m_fishParams;
54  csv::Reader m_ghostData;
55  std::vector<pk::Ghost*> m_fish;
56  steer::BehaviorParameters m_groundEnemyParams;
58  csv::Reader m_walkerData;
59  std::vector<pk::Walker*> m_groundEnemy;
70 };
71 
72 }
73 
74 #endif // ARENA_HPP
pk::GLTexture m_groundEnemyTexture
Definition: Arena.hpp:57
bool requestPause()
Definition: Arena.hpp:35
Arena(b2World *world, std::string level)
csv::Reader m_platformData
Definition: Arena.hpp:42
pk::GLTexture m_playerThreeTexture
Definition: Arena.hpp:64
Definition: Game.hpp:7
csv::Reader m_thwompData
Definition: Arena.hpp:50
pk::Window * m_window
Definition: Arena.hpp:39
std::vector< pk::StaticPlatform > m_platforms
Definition: Arena.hpp:43
pk::CharacterController * m_p2
Definition: Arena.hpp:67
b2World * m_world
Definition: Arena.hpp:35
pk::GLTexture m_playerTwoTexture
Definition: Arena.hpp:63
pk::GLSprite m_bulletSprite
Definition: Arena.hpp:61
pk::CharacterController * m_p1
Definition: Arena.hpp:66
bool requestPause()
Definition: CharacterController.hpp:27
pk::GLTexture m_bulletTexture
Definition: Arena.hpp:60
pk::GLTexture m_thwompTexture
Definition: Arena.hpp:49
void handleInput()
pk::GLTexture m_playerOneTexture
Definition: Arena.hpp:62
void update(float dt)
std::vector< pk::Ghost * > m_fish
Definition: Arena.hpp:55
pk::GLTexture m_shortPlatformTexture
Definition: Arena.hpp:44
void render(pk::GLStates &states)
Definition: Arena.hpp:23
pk::GLTexture m_longPlatformTexture
Definition: Arena.hpp:46
steer::BehaviorParameters m_fishParams
Definition: Arena.hpp:52
csv::Reader m_specialPlatformData
Definition: Arena.hpp:47
Stores the states used to draw OpenGL objects.
Definition: GLStates.hpp:16
pk::GLTexture m_mediumPlatformTexture
Definition: Arena.hpp:45
virtual ~Arena()
csv::Reader m_walkerData
Definition: Arena.hpp:58
Definition: CharacterController.hpp:16
std::vector< pk::MovingPlaform * > m_movingPlatforms
Definition: Arena.hpp:48
Class for SDL window creation and management, implemented using the Facade pattern to provide a more ...
Definition: Window.hpp:24
pk::GLTexture m_fishTexture
Definition: Arena.hpp:53
pk::CharacterController * m_p4
Definition: Arena.hpp:69
std::vector< pk::Walker * > m_groundEnemy
Definition: Arena.hpp:59
GLSprite m_backgroundSprite
Definition: Arena.hpp:41
Class for creating textures usable with OpenGL from SDL.
Definition: GLTexture.hpp:57
steer::BehaviorParameters m_groundEnemyParams
Definition: Arena.hpp:56
pk::GLTexture m_playerFourTexture
Definition: Arena.hpp:65
csv::Reader m_ghostData
Definition: Arena.hpp:54
std::vector< pk::Thwomp * > m_thwomps
Definition: Arena.hpp:51
GLTexture m_backgroundTexture
Definition: Arena.hpp:40
Definition: GLSprite.hpp:13
pk::CharacterController * m_p3
Definition: Arena.hpp:68