Archimedes/Dash Da Capo!
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Archimedes Class Reference

Where the engine gets implemented. More...

#include <gameEngine.h>

Inheritance diagram for Archimedes:
DashDaCapo

Public Member Functions

 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 ()
 

Detailed Description

Where the engine gets implemented.

Member Function Documentation

◆ 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
pathName
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

Reimplemented in DashDaCapo.


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