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/AStar.h"
14 #include "MapSquare.h"
15 #include "Robot.h"
16 
21 class Game : public JAM_State
22 {
23 private:
25  std::vector<std::vector<MapSquare*>> mapSquares;
48 
54  bool windowsInput(SDL_Event& incomingEvent);
55 
61  bool androidInput(SDL_Event& incomingEvent);
62 
63 public:
72 
76  ~Game();
77 
82  bool input();
83 
88  void update(float dt);
89 
93  void draw();
94 };
JAM_Texture * wall
Definition: Game.h:39
~Game()
Definition: Game.cpp:72
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:25
Robot * robot
Definition: Game.h:47
JAM_AStar * aStar
Definition: Game.h:45
bool androidInput(SDL_Event &incomingEvent)
Definition: Game.cpp:234
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:256
int placementType
Definition: Game.h:43
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:29
JAM_Button * toggle
Definition: Game.h:41
JAM_Texture * targetTexture
Definition: Game.h:37
int squareScale
Definition: Game.h:33
bool input()
Definition: Game.cpp:91
Creates an Game object that inherits State and runs the Game.
Definition: Game.h:21
JAM_Texture * border
Definition: Game.h:35
Game(JAM_StateManager *stateManager, SDL_Renderer *renderer, int screenWidth, int screenHeight)
Definition: Game.cpp:6
bool windowsInput(SDL_Event &incomingEvent)
Definition: Game.cpp:211
void draw()
Definition: Game.cpp:265
int screenWidth
Definition: State.h:23
JAM_StateManager * stateManager
Definition: State.h:19
int screenHeight
Definition: State.h:25
Creates an object for A* path finding.
Definition: AStar.h:13
Creates a Button object that inherits Entity.
Definition: Button.h:11
JAM_Audio * music
Definition: Game.h:27
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:31