Jamie Slowgrove - MGP Assignment 2 - JAM
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Macros
jni
src
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
;
30
JAM_Audio
*
music
;
32
JAM_Vec2
mouse
;
34
JAM_Vec2
target
;
36
int
squareScale
;
38
JAM_Texture
*
border
;
40
JAM_Texture
*
targetTexture
;
42
JAM_Texture
*
wall
;
44
JAM_Button
*
toggle
;
46
int
placementType
;
48
Robot
*
robot
;
50
bool
visible
;
51
57
bool
windowsInput
(SDL_Event& incomingEvent);
58
64
bool
androidInput
(SDL_Event& incomingEvent);
65
66
public
:
74
Game
(
JAM_StateManager
*
stateManager
, SDL_Renderer*
renderer
,
int
screenWidth
,
int
screenHeight
);
75
79
~Game
();
80
85
bool
input
();
86
91
void
update
(
float
dt);
92
96
void
draw
();
97
};
Texture.h
Game::wall
JAM_Texture * wall
Definition:
Game.h:42
Robot.h
Game::~Game
~Game()
Definition:
Game.cpp:73
JAM_State
Creates a State object. Creates a State object to be inherited.
Definition:
State.h:15
JAM_State::renderer
SDL_Renderer * renderer
Definition:
State.h:21
Game::mapSquares
std::vector< std::vector< MapSquare * > > mapSquares
Definition:
Game.h:26
MapSquare.h
Game::robot
Robot * robot
Definition:
Game.h:48
Button.h
Game::androidInput
bool androidInput(SDL_Event &incomingEvent)
Definition:
Game.cpp:232
JAM_Texture
Creates a Texture for use with a renderer. Creates a Texture from an image file, this can then be use...
Definition:
Texture.h:13
Game::update
void update(float dt)
Definition:
Game.cpp:254
Game::placementType
int placementType
Definition:
Game.h:46
JAM_StateManager
Creates a StateManager object. Creates a StateManager object to be inherited.
Definition:
StateManager.h:13
Robot
Creates a Robot object that inherits Entity.
Definition:
Robot.h:9
Game::mouse
JAM_Vec2 mouse
Definition:
Game.h:32
Vec2.h
Game::toggle
JAM_Button * toggle
Definition:
Game.h:44
Node.h
Game::visible
bool visible
Definition:
Game.h:50
Game::nodes
std::vector< std::vector< JAM_Node * > > nodes
Definition:
Game.h:28
Game::targetTexture
JAM_Texture * targetTexture
Definition:
Game.h:40
Game::squareScale
int squareScale
Definition:
Game.h:36
Utilities.h
Text.h
Game::input
bool input()
Definition:
Game.cpp:92
StateManager.h
Game
Creates a Game object that inherits State and runs the Game.
Definition:
Game.h:22
Game::border
JAM_Texture * border
Definition:
Game.h:38
Game::Game
Game(JAM_StateManager *stateManager, SDL_Renderer *renderer, int screenWidth, int screenHeight)
Definition:
Game.cpp:6
Game::windowsInput
bool windowsInput(SDL_Event &incomingEvent)
Definition:
Game.cpp:209
Game::draw
void draw()
Definition:
Game.cpp:263
JAM_State::screenWidth
int screenWidth
Definition:
State.h:23
JAM_State::stateManager
JAM_StateManager * stateManager
Definition:
State.h:19
JAM_State::screenHeight
int screenHeight
Definition:
State.h:25
JAM_Button
Creates a Button object that inherits Entity.
Definition:
Button.h:11
LOS.h
State.h
Audio.h
Game::music
JAM_Audio * music
Definition:
Game.h:30
JAM_Vec2
Creates an Vec2 structure with functions. Creates an Vec2 structure with overloaded operators to crea...
Definition:
Vec2.h:9
JAM_Audio
Creates an Audio object to handle the SDL_Mixer.
Definition:
Audio.h:12
Game::target
JAM_Vec2 target
Definition:
Game.h:34
Generated on Fri May 8 2015 04:37:50 for Jamie Slowgrove - MGP Assignment 2 - JAM by
1.8.8