Where the engine gets implemented.
More...
#include <gameEngine.h>
|
| Archimedes (Uint32 flags, const char *title, int x, int y, int w, int h) |
|
virtual void | runGameLoop () |
|
void | stopGameLoop () |
| Quits the game.
|
|
bool | loadTiles (std::vector< Tile * > &tileMap, const std::vector< int > &levelInfo, std::map< std::pair< int, int >, TileType > &coordinateToTileTypeMap, std::map< std::pair< int, int >, std::string > &coordinateToEventTypeMap, int TILE_COUNT, int TYPE_COUNT, int TILE_LENGTH) |
| loads tiles into tileMap. Additionally we have it loading coordinates and event maps.
|
|
bool | loadImageAssets (SDL_Renderer *renderer, std::unordered_map< TextureWrapper *, std::string > textureFilePaths) |
| Loads the image assets.
|
|
bool | clipSheet (int ROWS, int COLS, int BLOCK_LENGTH, int BLOCK_HEIGHT, int TYPE_COUNT, std::vector< SDL_Rect > &sheetClipped) |
| Given the sheet specs, will clip the sheet into SDL rectangles.
|
|
SDL_Window * | getWindow () const |
| the public method to access the window object pointer
|
|
SDL_Renderer * | getRenderer () const |
| the public method to access the renderer object pointer
|
|
std::vector< int > | convertMapToVector (std::string pathName) |
| Takes in a .map file and parses it into a vector in the format that we need it. It's an intermediate step to account for variable size maps.
|
|
bool | getQuit () const |
|
int | getWidth () const |
|
int | getHeight () const |
|
void | setToQuit () |
|
Where the engine gets implemented.
◆ clipSheet()
bool Archimedes::clipSheet |
( |
int |
ROWS, |
|
|
int |
COLS, |
|
|
int |
BLOCK_LENGTH, |
|
|
int |
BLOCK_HEIGHT, |
|
|
int |
TYPE_COUNT, |
|
|
std::vector< SDL_Rect > & |
sheetClipped |
|
) |
| |
Given the sheet specs, will clip the sheet into SDL rectangles.
- Parameters
-
ROWS | |
COLS | |
BLOCK_LENGTH | |
BLOCK_HEIGHT | |
TYPE_COUNT | |
sheetClipped | |
- Returns
◆ convertMapToVector()
std::vector< int > Archimedes::convertMapToVector |
( |
std::string |
pathName | ) |
|
Takes in a .map file and parses it into a vector in the format that we need it. It's an intermediate step to account for variable size maps.
- Parameters
-
- Returns
◆ getRenderer()
SDL_Renderer * Archimedes::getRenderer |
( |
| ) |
const |
the public method to access the renderer object pointer
- Returns
- pointer to the engine's SDL_Renderer instance
◆ getWindow()
SDL_Window * Archimedes::getWindow |
( |
| ) |
const |
the public method to access the window object pointer
- Returns
- pointer to the engine's SDL_Window instance
◆ loadImageAssets()
bool Archimedes::loadImageAssets |
( |
SDL_Renderer * |
renderer, |
|
|
std::unordered_map< TextureWrapper *, std::string > |
textureFilePaths |
|
) |
| |
Loads the image assets.
- Parameters
-
renderer | |
textureFilePaths | |
- Returns
- bool of success or failure
◆ loadTiles()
bool Archimedes::loadTiles |
( |
std::vector< Tile * > & |
tileMap, |
|
|
const std::vector< int > & |
levelInfo, |
|
|
std::map< std::pair< int, int >, TileType > & |
coordinateToTileTypeMap, |
|
|
std::map< std::pair< int, int >, std::string > & |
coordinateToEventTypeMap, |
|
|
int |
TILE_COUNT, |
|
|
int |
TYPE_COUNT, |
|
|
int |
TILE_LENGTH |
|
) |
| |
loads tiles into tileMap. Additionally we have it loading coordinates and event maps.
- Parameters
-
tileMap | |
coordinateToTileTypeMap | |
coordinateToEventTypeMap | |
TILE_COUNT | |
TYPE_COUNT | |
TILE_LENGTH | |
- Returns
◆ runGameLoop()
virtual void Archimedes::runGameLoop |
( |
| ) |
|
|
virtual |
The documentation for this class was generated from the following file: