Level H Engine
Static Public Member Functions | Static Public Attributes | Static Private Member Functions | Static Private Attributes | List of all members
Application Class Reference

Contains details and functions for the application. More...

#include <Application.h>

Collaboration diagram for Application:
Collaboration graph

Static Public Member Functions

static void init (std::string title, Vec2 windowPos, Vec2 windowRes, bool fullscreen, float frameRate)
 A static function to initialise Application. More...
 
static void run (int argc, char *argv[])
 A static function that runs Application. More...
 
static void destroy ()
 A static function that destroys the Application. More...
 
static std::vector< std::shared_ptr< GameObject > > & getGameObjects ()
 A static function to get game objects. More...
 
static std::shared_ptr< GameObject > & getCamera ()
 A static function to get camera. More...
 
static void setBackgroundColour (Vec3 colour)
 A static function to set the background colour. More...
 
static void setDT (float inDT)
 A static function to set delta time. More...
 
static float getDT ()
 A static function to get the delta time. More...
 
static void drawLoadingScreen ()
 A static function to get set the background colour. More...
 

Static Public Attributes

static std::shared_ptr< GameObjectcamera
 A shared pointer for the camera. More...
 

Static Private Member Functions

static bool initSDL ()
 A static function to initialise SDL. More...
 
static bool initTTF ()
 A static function to initialise SDL TTF. More...
 
static bool initMixer ()
 A static function to initialise SDL Mixer. More...
 
static bool initGLEW ()
 A static function to initialise GLEW. More...
 

Static Private Attributes

static SDL_Window * window
 A pointer for the window. More...
 
static SDL_GLContext glcontext
 The SDL OpenGL context. More...
 
static StateManagerstateManager
 A pointer to the state manager. More...
 
static std::vector< std::shared_ptr< GameObject > > gameObjects
 A vector of the game objects. More...
 
static Vec3 backgroundColour
 The background colour. More...
 
static std::string loadingSpriteID
 The loading sprite. More...
 
static float dt
 The delta time. More...
 

Detailed Description

Contains details and functions for the application.

Member Function Documentation

◆ destroy()

void Application::destroy ( )
static

A static function that destroys the Application.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawLoadingScreen()

void Application::drawLoadingScreen ( )
static

A static function to get set the background colour.

Parameters
colourThe colour to set it to.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCamera()

std::shared_ptr< GameObject > & Application::getCamera ( )
static

A static function to get camera.

Here is the caller graph for this function:

◆ getDT()

float Application::getDT ( )
static

A static function to get the delta time.

Returns
The value of DT.
Here is the caller graph for this function:

◆ getGameObjects()

std::vector< std::shared_ptr< GameObject > > & Application::getGameObjects ( )
static

A static function to get game objects.

Here is the caller graph for this function:

◆ init()

void Application::init ( std::string  title,
Vec2  windowPos,
Vec2  windowRes,
bool  fullscreen,
float  frameRate 
)
static

A static function to initialise Application.

Parameters
titleThe title of the window.
windowPosThe position of the window.
windowResThe resolution of the window.
fullscreenIf the window should be fullscreen.
frameRateThe frame rate of the window.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initGLEW()

bool Application::initGLEW ( )
staticprivate

A static function to initialise GLEW.

Returns
If the initialisation succeeded.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initMixer()

bool Application::initMixer ( )
staticprivate

A static function to initialise SDL Mixer.

Returns
If the initialisation succeeded.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initSDL()

bool Application::initSDL ( )
staticprivate

A static function to initialise SDL.

Returns
If the initialisation succeeded.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initTTF()

bool Application::initTTF ( )
staticprivate

A static function to initialise SDL TTF.

Returns
If the initialisation succeeded.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

void Application::run ( int  argc,
char *  argv[] 
)
static

A static function that runs Application.

Parameters
argcThe command line argument count.
argvThe command line argument vector.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setBackgroundColour()

void Application::setBackgroundColour ( Vec3  colour)
static

A static function to set the background colour.

Parameters
colourThe colour to set it to.
Here is the caller graph for this function:

◆ setDT()

void Application::setDT ( float  inDT)
static

A static function to set delta time.

Parameters
inDTThe value to set it to.
Here is the caller graph for this function:

Member Data Documentation

◆ backgroundColour

Vec3 Application::backgroundColour
staticprivate

The background colour.

◆ camera

std::shared_ptr< GameObject > Application::camera
static

A shared pointer for the camera.

◆ dt

float Application::dt
staticprivate

The delta time.

◆ gameObjects

std::vector< std::shared_ptr< GameObject > > Application::gameObjects
staticprivate

A vector of the game objects.

◆ glcontext

SDL_GLContext Application::glcontext
staticprivate

The SDL OpenGL context.

◆ loadingSpriteID

std::string Application::loadingSpriteID
staticprivate

The loading sprite.

◆ stateManager

StateManager * Application::stateManager
staticprivate

A pointer to the state manager.

◆ window

SDL_Window * Application::window
staticprivate

A pointer for the window.


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