Definition at line 27 of file Maps.h.
#include <Maps.h>
|
void | lineHandleAssignment (std::string &sVar, std::string &sValue) |
|
bool | lineHandleLayout (const std::string &sLine, TPureFloat &y, bool bDryRun) |
| This function to be invoked for every single line of the map layout definition.
|
|
◆ Maps() [1/3]
proofps_dd::Maps::Maps |
( |
pge_audio::PgeAudio & | audio, |
|
|
PGEcfgProfiles & | cfgProfiles, |
|
|
PR00FsUltimateRenderingEngine & | gfx ) |
◆ ~Maps()
proofps_dd::Maps::~Maps |
( |
| ) |
|
◆ Maps() [2/3]
proofps_dd::Maps::Maps |
( |
const Maps & | | ) |
|
|
delete |
◆ Maps() [3/3]
proofps_dd::Maps::Maps |
( |
Maps && | | ) |
|
|
delete |
◆ getBlockCount()
int proofps_dd::Maps::getBlockCount |
( |
| ) |
const |
◆ getBlockPosMax()
const PureVector & proofps_dd::Maps::getBlockPosMax |
( |
| ) |
const |
◆ getBlockPosMin()
const PureVector & proofps_dd::Maps::getBlockPosMin |
( |
| ) |
const |
◆ getBlocks()
PureObject3D ** proofps_dd::Maps::getBlocks |
( |
| ) |
|
◆ getBlocksVertexPosMax()
const PureVector & proofps_dd::Maps::getBlocksVertexPosMax |
( |
| ) |
const |
◆ getBlocksVertexPosMin()
const PureVector & proofps_dd::Maps::getBlocksVertexPosMin |
( |
| ) |
const |
◆ getConsole()
CConsole & proofps_dd::Maps::getConsole |
( |
| ) |
const |
◆ getFilename()
const std::string & proofps_dd::Maps::getFilename |
( |
| ) |
const |
Retrieves the currently loaded map filename.
- Returns
- Filename of the currently loaded map. Empty string if no map is loaded currently.
Definition at line 459 of file Maps.cpp.
◆ getForegroundBlockCount()
int proofps_dd::Maps::getForegroundBlockCount |
( |
| ) |
const |
◆ getForegroundBlocks()
PureObject3D ** proofps_dd::Maps::getForegroundBlocks |
( |
| ) |
|
◆ getItems()
◆ getJumppadForceFactors()
const TPURE_XY & proofps_dd::Maps::getJumppadForceFactors |
( |
const size_t & | index | ) |
const |
◆ getJumppads()
const std::vector< PureObject3D * > & proofps_dd::Maps::getJumppads |
( |
| ) |
const |
◆ getJumppadValidVarsCount()
size_t proofps_dd::Maps::getJumppadValidVarsCount |
( |
| ) |
|
◆ getLeftMostSpawnpoint()
const PureVector & proofps_dd::Maps::getLeftMostSpawnpoint |
( |
| ) |
const |
◆ getLoggerModuleName()
const char * proofps_dd::Maps::getLoggerModuleName |
( |
| ) |
|
|
static |
◆ getMapcycle()
◆ getNextMapToBeLoaded()
const std::string & proofps_dd::Maps::getNextMapToBeLoaded |
( |
| ) |
const |
◆ getRandomSpawnpoint()
const PureVector & proofps_dd::Maps::getRandomSpawnpoint |
( |
| ) |
const |
Retrieves a randomly selected spawnpoint from the set of spawnpoints of the currently loaded map.
A spawnpoint is a 3D coordinate where the player can spawn at.
- Returns
- A randomly selected spawnpoint on the current map.
Definition at line 483 of file Maps.cpp.
◆ getRightMostSpawnpoint()
const PureVector & proofps_dd::Maps::getRightMostSpawnpoint |
( |
| ) |
const |
◆ getSpawnpoints()
const std::set< PureVector > & proofps_dd::Maps::getSpawnpoints |
( |
| ) |
const |
Retrieves the set of spawnpoints of the currently loaded map.
A spawnpoint is a 3D coordinate where the player can spawn at.
- Returns
- The set of spawnpoints of the currently loaded map.
Definition at line 471 of file Maps.cpp.
◆ getVars()
const std::map< std::string, PGEcfgVariable > & proofps_dd::Maps::getVars |
( |
| ) |
const |
◆ handleMapItemUpdateFromServer()
bool proofps_dd::Maps::handleMapItemUpdateFromServer |
( |
pge_network::PgeNetworkConnectionHandle | , |
|
|
const MsgMapItemUpdateFromServer & | msg ) |
◆ height()
unsigned int proofps_dd::Maps::height |
( |
| ) |
const |
◆ initialize()
bool proofps_dd::Maps::initialize |
( |
| ) |
|
Initializes the map handler.
Reads the mapcycle file if it exists. You need to invoke this once before trying to load any map.
- Returns
- True on success, false otherwise.
Definition at line 63 of file Maps.cpp.
◆ isInitialized()
bool proofps_dd::Maps::isInitialized |
( |
| ) |
const |
◆ lineHandleAssignment()
void proofps_dd::Maps::lineHandleAssignment |
( |
std::string & | sVar, |
|
|
std::string & | sValue ) |
|
private |
◆ lineHandleLayout()
bool proofps_dd::Maps::lineHandleLayout |
( |
const std::string & | sLine, |
|
|
TPureFloat & | y, |
|
|
bool | bDryRun ) |
|
private |
This function to be invoked for every single line of the map layout definition.
Map layout definition is the last part of a map file, containing the blocks building up the map (walls, floor, etc.).
- Parameters
-
sLine | The current line of the map layout definition we want to process. |
y | The current height we are currently placing newly created blocks for this line of the map definition layout. |
bDryRun | If true, blocks are not allocated thus the map is not actually created, however the following variables are actually updated: m_width, m_height, m_blocks_h, m_foregroundBlocks_h, m_items, y. If we finish processing all lines with bDryRun as true, we will know the actual size of the map and number of blocks, thus in the next non-dry run we will have to allocate memory only once for the blocks. And yes, dry run actually creates all the items in m_items. |
Definition at line 887 of file Maps.cpp.
◆ lineIsValueAssignment()
bool proofps_dd::Maps::lineIsValueAssignment |
( |
const std::string & | sLine, |
|
|
std::string & | sVar, |
|
|
std::string & | sValue, |
|
|
bool & | bParseError ) |
|
staticprivate |
◆ lineShouldBeIgnored()
bool proofps_dd::Maps::lineShouldBeIgnored |
( |
const std::string & | sLine | ) |
|
|
staticprivate |
◆ load()
bool proofps_dd::Maps::load |
( |
const char * | fname, |
|
|
std::function< void(int)> & | cbDisplayProgressUpdate ) |
◆ loaded()
bool proofps_dd::Maps::loaded |
( |
| ) |
const |
◆ operator=() [1/2]
Maps & proofps_dd::Maps::operator= |
( |
const Maps & | | ) |
|
|
delete |
◆ operator=() [2/2]
Maps && proofps_dd::Maps::operator= |
( |
Maps && | | ) |
|
|
delete |
◆ serverDecideFirstMapAndUpdateNextMapToBeLoaded()
const std::string & proofps_dd::Maps::serverDecideFirstMapAndUpdateNextMapToBeLoaded |
( |
| ) |
|
◆ shutdown()
void proofps_dd::Maps::shutdown |
( |
| ) |
|
Shuts down the map handler.
The currently loaded map will be also unloaded. After calling this, initialize() can be invoked again.
Definition at line 97 of file Maps.cpp.
◆ unload()
void proofps_dd::Maps::unload |
( |
| ) |
|
◆ update()
void proofps_dd::Maps::update |
( |
const float & | fps | ) |
|
◆ updateVisibilitiesForRenderer()
void proofps_dd::Maps::updateVisibilitiesForRenderer |
( |
| ) |
|
◆ width()
unsigned int proofps_dd::Maps::width |
( |
| ) |
const |
◆ backgroundBlocks
const std::set<char> proofps_dd::Maps::backgroundBlocks |
|
private |
Initial value:= {
'a', 'c', 'e', 'm', 'n', 'p', 'o', 'r', 'u', 'v', 'w', 'x', 'y', 'z',
',' ,
'+' ,
'2' ,
'3' ,
'4' ,
'S'
}
Definition at line 115 of file Maps.h.
◆ fMapBlockSizeDepth
float proofps_dd::Maps::fMapBlockSizeDepth = 1.0f |
|
staticconstexpr |
◆ fMapBlockSizeHeight
float proofps_dd::Maps::fMapBlockSizeHeight = 1.0f |
|
staticconstexpr |
◆ fMapBlockSizeWidth
float proofps_dd::Maps::fMapBlockSizeWidth = 1.0f |
|
staticconstexpr |
◆ foregroundBlocks
const std::set<char> proofps_dd::Maps::foregroundBlocks |
|
private |
Initial value:= {
'B', 'D', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'Q', 'T',
'^' ,
'\\' ,
'/'
}
Definition at line 107 of file Maps.h.
◆ GAME_DECOR_POS_Z
◆ GAME_ITEMS_POS_Z
◆ GAME_PLAYERS_POS_Z
float proofps_dd::Maps::GAME_PLAYERS_POS_Z = -1.2f |
|
staticconstexprprivate |
◆ m_audio
pge_audio::PgeAudio& proofps_dd::Maps::m_audio |
|
private |
◆ m_Block2Texture
std::map<char, std::string> proofps_dd::Maps::m_Block2Texture |
|
private |
◆ m_blockPosMax
PureVector proofps_dd::Maps::m_blockPosMax |
|
private |
◆ m_blockPosMin
PureVector proofps_dd::Maps::m_blockPosMin |
|
private |
◆ m_blocks
PureObject3D** proofps_dd::Maps::m_blocks |
|
private |
◆ m_blocks_h
int proofps_dd::Maps::m_blocks_h |
|
private |
◆ m_blocksVertexPosMax
PureVector proofps_dd::Maps::m_blocksVertexPosMax |
|
private |
◆ m_blocksVertexPosMin
PureVector proofps_dd::Maps::m_blocksVertexPosMin |
|
private |
◆ m_cfgProfiles
PGEcfgProfiles& proofps_dd::Maps::m_cfgProfiles |
|
private |
◆ m_decorations
std::vector<PureObject3D*> proofps_dd::Maps::m_decorations |
|
private |
◆ m_fJumppadForceFactors
std::vector<TPURE_XY> proofps_dd::Maps::m_fJumppadForceFactors |
|
private |
◆ m_foregroundBlocks
PureObject3D** proofps_dd::Maps::m_foregroundBlocks |
|
private |
◆ m_foregroundBlocks_h
int proofps_dd::Maps::m_foregroundBlocks_h |
|
private |
◆ m_gfx
PR00FsUltimateRenderingEngine& proofps_dd::Maps::m_gfx |
|
private |
◆ m_height
unsigned int proofps_dd::Maps::m_height |
|
private |
◆ m_items
◆ m_jumppads
std::vector<PureObject3D*> proofps_dd::Maps::m_jumppads |
|
private |
◆ m_mapcycle
◆ m_mapReferenceBlockObject3Ds
std::map<char, PureObject3D*> proofps_dd::Maps::m_mapReferenceBlockObject3Ds |
|
private |
◆ m_nValidJumppadVarsCount
size_t proofps_dd::Maps::m_nValidJumppadVarsCount |
|
private |
◆ m_sFileName
std::string proofps_dd::Maps::m_sFileName |
|
private |
◆ m_spawnpointLeftMost
PureVector proofps_dd::Maps::m_spawnpointLeftMost |
|
private |
◆ m_spawnpointRightMost
PureVector proofps_dd::Maps::m_spawnpointRightMost |
|
private |
◆ m_spawnpoints
std::set<PureVector> proofps_dd::Maps::m_spawnpoints |
|
private |
◆ m_sRawName
std::string proofps_dd::Maps::m_sRawName |
|
private |
◆ m_sServerMapFilenameToLoad
std::string proofps_dd::Maps::m_sServerMapFilenameToLoad |
|
private |
We set this as soon as we get to know which map we should load.
Definition at line 131 of file Maps.h.
◆ m_texDecorJumpPadVertical
PureTexture* proofps_dd::Maps::m_texDecorJumpPadVertical |
|
private |
◆ m_texRed
PureTexture* proofps_dd::Maps::m_texRed |
|
private |
◆ m_vars
std::map<std::string, PGEcfgVariable> proofps_dd::Maps::m_vars |
|
private |
◆ m_width
unsigned int proofps_dd::Maps::m_width |
|
private |
◆ szCVarSvMap
char* proofps_dd::Maps::szCVarSvMap = "sv_map" |
|
staticconstexpr |
The documentation for this class was generated from the following files:
- C:/__PR00F__/___developing___/projects/PRooFPS-dd/PRooFPS-dd/Maps.h
- C:/__PR00F__/___developing___/projects/PRooFPS-dd/PRooFPS-dd/Maps.cpp