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/Text.h
"
10
#include "
JAM/Flocking.h
"
11
#include "
JAM/Utilities.h
"
12
#include "
JAM/Button.h
"
13
18
class
Game
:
public
JAM_State
19
{
20
private
:
22
JAM_Audio
*
music
;
24
JAM_Flocking
*
flocking
;
26
JAM_Texture
*
boidTexture
;
28
std::vector<JAM_Text*>
text
;
29
/*What to do with the rule. (1 == possitve, 0 = neutral, -1 == negative)*/
30
int
applyRule1
,
applyRule2
,
applyRule3
,
current
;
32
std::vector<JAM_Button*>
buttons
;
33
39
bool
windowsInput
(SDL_Event& incomingEvent);
40
46
bool
androidInput
(SDL_Event& incomingEvent);
47
48
public
:
56
Game
(
JAM_StateManager
*
stateManager
, SDL_Renderer*
renderer
,
int
screenWidth
,
int
screenHeight
);
57
61
~Game
();
62
67
bool
input
();
68
74
void
update
(
float
dt);
75
79
void
draw
();
80
};
Game::flocking
JAM_Flocking * flocking
Definition:
Game.h:24
Texture.h
Game::~Game
~Game()
Definition:
Game.cpp:139
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
Button.h
Game::androidInput
bool androidInput(SDL_Event &incomingEvent)
Definition:
Game.cpp:259
Game::boidTexture
JAM_Texture * boidTexture
Definition:
Game.h:26
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:281
Game::buttons
std::vector< JAM_Button * > buttons
Definition:
Game.h:32
JAM_StateManager
Creates a StateManager object. Creates a StateManager object to be inherited.
Definition:
StateManager.h:13
Game::applyRule3
int applyRule3
Definition:
Game.h:30
Game::applyRule1
int applyRule1
Definition:
Game.h:30
Game::text
std::vector< JAM_Text * > text
Definition:
Game.h:28
JAM_Flocking
Creates a Flocking object.
Definition:
Flocking.h:16
Utilities.h
Text.h
Game::input
bool input()
Definition:
Game.cpp:161
StateManager.h
Game
Creates an Game object that inherits State and runs the Game.
Definition:
Game.h:18
Game::current
int current
Definition:
Game.h:30
Game::Game
Game(JAM_StateManager *stateManager, SDL_Renderer *renderer, int screenWidth, int screenHeight)
Definition:
Game.cpp:7
Game::windowsInput
bool windowsInput(SDL_Event &incomingEvent)
Definition:
Game.cpp:237
Game::draw
void draw()
Definition:
Game.cpp:341
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
Flocking.h
State.h
Audio.h
Game::applyRule2
int applyRule2
Definition:
Game.h:30
Game::music
JAM_Audio * music
Definition:
Game.h:22
JAM_Audio
Creates an Audio object to handle the SDL_Mixer.
Definition:
Audio.h:12
Generated on Fri May 8 2015 04:43:42 for Jamie Slowgrove - MGP Assignment 2 - JAM by
1.8.8