Jamie Slowgrove - MGP Assignment 2 - JAM
 All Classes Namespaces Files Functions Variables Macros
Game.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL.h>
4 #include <vector>
5 #include "JAM/State.h"
6 #include "JAM/StateManager.h"
7 #include "JAM/Texture.h"
8 #include "JAM/Audio.h"
9 #include "JAM/Utilities.h"
10 #include "JAM/Text.h"
11 #include "JAM/Vec2.h"
12 #include "JAM/Button.h"
13 #include "JAM/Node.h"
14 #include "JAM/LOS.h"
15 #include "MapSquare.h"
16 #include "Robot.h"
17 
22 class Game : public JAM_State
23 {
24 private:
26  std::vector<std::vector<MapSquare*>> mapSquares;
28  std::vector<std::vector<JAM_Node*>> nodes;
50  bool visible;
51 
57  bool windowsInput(SDL_Event& incomingEvent);
58 
64  bool androidInput(SDL_Event& incomingEvent);
65 
66 public:
75 
79  ~Game();
80 
85  bool input();
86 
91  void update(float dt);
92 
96  void draw();
97 };
JAM_Texture * wall
Definition: Game.h:42
~Game()
Definition: Game.cpp:73
Creates a State object. Creates a State object to be inherited.
Definition: State.h:15
SDL_Renderer * renderer
Definition: State.h:21
std::vector< std::vector< MapSquare * > > mapSquares
Definition: Game.h:26
Robot * robot
Definition: Game.h:48
bool androidInput(SDL_Event &incomingEvent)
Definition: Game.cpp:232
Creates a Texture for use with a renderer. Creates a Texture from an image file, this can then be use...
Definition: Texture.h:13
void update(float dt)
Definition: Game.cpp:254
int placementType
Definition: Game.h:46
Creates a StateManager object. Creates a StateManager object to be inherited.
Definition: StateManager.h:13
Creates a Robot object that inherits Entity.
Definition: Robot.h:9
JAM_Vec2 mouse
Definition: Game.h:32
JAM_Button * toggle
Definition: Game.h:44
bool visible
Definition: Game.h:50
std::vector< std::vector< JAM_Node * > > nodes
Definition: Game.h:28
JAM_Texture * targetTexture
Definition: Game.h:40
int squareScale
Definition: Game.h:36
bool input()
Definition: Game.cpp:92
Creates a Game object that inherits State and runs the Game.
Definition: Game.h:22
JAM_Texture * border
Definition: Game.h:38
Game(JAM_StateManager *stateManager, SDL_Renderer *renderer, int screenWidth, int screenHeight)
Definition: Game.cpp:6
bool windowsInput(SDL_Event &incomingEvent)
Definition: Game.cpp:209
void draw()
Definition: Game.cpp:263
int screenWidth
Definition: State.h:23
JAM_StateManager * stateManager
Definition: State.h:19
int screenHeight
Definition: State.h:25
Creates a Button object that inherits Entity.
Definition: Button.h:11
JAM_Audio * music
Definition: Game.h:30
Creates an Vec2 structure with functions. Creates an Vec2 structure with overloaded operators to crea...
Definition: Vec2.h:9
Creates an Audio object to handle the SDL_Mixer.
Definition: Audio.h:12
JAM_Vec2 target
Definition: Game.h:34