Jamie Slowgrove - MGP Assignment 2 - JAM
 All Classes Namespaces Files Functions Variables Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Game Class Reference

Creates a Game object that inherits State and runs the Game. More...

#include <Game.h>

Inheritance diagram for Game:
Inheritance graph
Collaboration diagram for Game:
Collaboration graph

Public Member Functions

 Game (JAM_StateManager *stateManager, SDL_Renderer *renderer, int screenWidth, int screenHeight)
 
 ~Game ()
 
bool input ()
 
void update (float dt)
 
void draw ()
 
- Public Member Functions inherited from JAM_State
 JAM_State (JAM_StateManager *stateManager, SDL_Renderer *renderer, int screenWidth, int screenHeight)
 
virtual ~JAM_State ()
 

Private Member Functions

bool windowsInput (SDL_Event &incomingEvent)
 
bool androidInput (SDL_Event &incomingEvent)
 

Private Attributes

JAM_Texturetexture
 
JAM_Audiomusic
 

Additional Inherited Members

- Protected Attributes inherited from JAM_State
JAM_StateManagerstateManager
 
SDL_Renderer * renderer
 
int screenWidth
 
int screenHeight
 

Detailed Description

Creates a Game object that inherits State and runs the Game.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

Game::Game ( JAM_StateManager stateManager,
SDL_Renderer *  renderer,
int  screenWidth,
int  screenHeight 
)

Constructs the Game object.

Parameters
stateManagerA pointer to the StateManager.
rendererA pointer to the renderer.
screenWidthThe screen width.
screenHeightThe screen height.
Game::~Game ( )

Destructs the Game object.

Here is the call graph for this function:

Member Function Documentation

bool Game::androidInput ( SDL_Event &  incomingEvent)
private

Handles the Android Game input.

Parameters
incomingEventA reference to the incoming SDL event.
Returns
If false then quit the Game State.

Here is the caller graph for this function:

void Game::draw ( )
virtual

A function to draw to the screen.

Implements JAM_State.

Here is the call graph for this function:

bool Game::input ( )
virtual

Handles the Game input.

Returns
If false then quit the Game State.

Implements JAM_State.

Here is the call graph for this function:

void Game::update ( float  dt)
virtual

A function to update the Game to allow the Game to run.

Parameters
dtThe delta time.

Implements JAM_State.

Here is the call graph for this function:

bool Game::windowsInput ( SDL_Event &  incomingEvent)
private

Handles the Windows Game input.

Parameters
incomingEventA reference to the incoming SDL event.
Returns
If false then quit the Game State.

Here is the caller graph for this function:

Member Data Documentation

JAM_Audio* Game::music
private

A pointer to the background music.

JAM_Texture* Game::texture
private

Test Texture.


The documentation for this class was generated from the following files: