Jagguar Game Engine

Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Engine Class Reference

`#include <Engine.hpp>`

Collaboration diagram for Engine:
[legend]

## Public Member Functions
| Engine ()
| ~Engine ()
void | Input (bool *quit, bool *editing)
void | Update ()
void | Render ()
void | MainGameLoop ()
void | Start ()
void | Shutdown ()
void | InitializeGraphicsSubSystem ()
void | InitializePhysicsSubsystem ()
void | InitializeGUI ()
GameObject * | createFly (Vec2D spawnPos)

## Private Attributes
SDLGraphicsEngineRenderer * | mRenderer = nullptr
PhysicsEngine * | mPhysics = nullptr
GameMakerGUI * | mGUI = nullptr
std::vector< GameObject * > | m_gameobjects
bool | runGame = true

## Detailed Description

The main game engine class. Holds all objects relevant to the game and runs them based on a clock.

## Constructor & Destructor Documentation

## ◆ Engine()

Engine::Engine | ( |  | ) |

Constructor of Engine

## ◆ ~Engine()

Engine::~Engine | ( |  | ) |

Destructor

## Member Function Documentation

## ◆ createFly()

GameObject * Engine::createFly | ( | Vec2D | spawnPos | ) |

Create a new bespoke Fly GameObject at the given location. Used to create the demo scene.

Parameters

  spawnPos | the position to place the new GameObject

Returns
  a Fly GameObject

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

## ◆ InitializeGraphicsSubSystem()

void Engine::InitializeGraphicsSubSystem | ( |  | ) |

Request to startup the Graphics Subsystem.

See also
  IGraphicsEngineRenderer

## ◆ InitializeGUI()

void Engine::InitializeGUI | ( |  | ) |

Request to startup the GUI Subsystem.

See also
  GameMakerGUI

Here is the call graph for this function:

## ◆ InitializePhysicsSubsystem()

void Engine::InitializePhysicsSubsystem | ( |  | ) |

Request to startup the Physics Subsystem.

See also
  PhysicsEngine

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

## ◆ Input()

void Engine::Input | ( | bool * | quit,
|  | bool * | editing
| ) |  |

Gets user input

Parameters

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

## ◆ MainGameLoop()

void Engine::MainGameLoop | ( |  | ) |

Main Game Loop that runs forever

Here is the call graph for this function:

## ◆ Render()

void Engine::Render | ( |  | ) |

Per frame render. Renders everything

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

## ◆ Shutdown()

void Engine::Shutdown | ( |  | ) |

Initialization and shutdown pattern. Explicitly call 'Shutdown' to terminate the engine

## ◆ Start()

void Engine::Start | ( |  | ) |

Initialization and shutdown pattern. Explicitly call 'Start' to launch the engine

Here is the call graph for this function:

## ◆ Update()

void Engine::Update | ( |  | ) |

Per frame update

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

## Member Data Documentation

## ◆ m_gameobjects

std::vector<GameObject *> Engine::m_gameobjects
| private

Holds all game objects

## ◆ mGUI

GameMakerGUI* Engine::mGUI = nullptr
| private

Displays editor

## ◆ mPhysics

PhysicsEngine* Engine::mPhysics = nullptr
| private

Calculates all collisions

## ◆ mRenderer

SDLGraphicsEngineRenderer* Engine::mRenderer = nullptr
| private

Object that renders all objects

## ◆ runGame

bool Engine::runGame = true
| private

Used to pause/play the game

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

- include/Engine.hpp
- src/Engine.cpp