|
WorldSim
inDev
2D tile-based sandbox RPG with procedurally generated fantasy world simulator 🌏
|
#include <World.hpp>


Public Member Functions | |
| World () | |
| ~World () | |
| World_Local * | operator() (const int _x, const int _y) |
| LocalTile * | operator() (unsigned long int _x, unsigned long int _y, const bool subterranean=false) |
| LocalTile * | operator() (HasXY2< unsigned long int > *, const bool subterranean=false) |
| bool | absoluteToRelative (const unsigned long int _absoluteX, const unsigned long int _absoluteY, int *_globalX, int *_globalY, int *_localX, int *_localY) |
| bool | isGenerated (unsigned long int _absoluteX, unsigned long int _absoluteY) |
| bool | generateMythology () |
| void | startSimulation () |
| bool | prepareAdventureMode (Character *) |
| void | incrementTicks (int) |
| void | incrementTicksBacklog (long long unsigned int) |
| bool | handleTickBacklog () |
| void | idleTick () |
| void | logicTick () |
| void | updateMaps () |
| bool | loadWorld (std::string) |
| void | generateWorld (const std::string, const int, const int, int, int, const bool, const bool, const bool, const double) |
| void | generateLocal (const int, const int) |
| void | generateLocal (HasXY *) |
| void | unloadLocal (const int, const int) |
| void | buildArrays (WorldGenerator2 &wg) |
| void | nameRegions () |
| void | generateTribes (int, int, int) |
| bool | addRace (int, std::string) |
| void | generateDwarves (int) |
| void | generateElves (int) |
| void | generateHumans (int) |
| void | controlCharacter (Character *) |
| Character * | getRandomCharacter () |
| Vector< HasXY2< unsigned long int > * > * | rayTraceLOS (unsigned long int _x, unsigned long int _y, const int RANGE, const bool, const bool subterranean=false) |
| void | rayTrace (unsigned long int _x1, unsigned long int _y1, unsigned long int _x2, unsigned long int _y2, Vector< HasXY2< unsigned long int > *> *vVisibleTiles, bool subterranean=false) |
| int | getPopulation () |
| bool | isLand (int _x, int _y) |
| bool | isLand (HasXY *) |
| bool | isSafe (int _x, int _y) |
| bool | isSafe (unsigned long int _x, unsigned long int _y) |
| World_Local * | getTile (const int, const int) |
| int | getTileFertility (const int, const int) |
| int | getTileFertility (const HasXY *) |
| int | getSurroundingFertility (const int _x, const int _y) |
| int | getHuntingYield (const int _x, const int _y) |
| void | getRandomTile (int *x, int *y) |
| bool | getRandomLandTile (int *x, int *y) |
| HasXY * | getRandomLandTile () |
| HasXY * | getRandomTileOfType (enumBiome _type) |
| Vector< WorldObjectGlobal * > * | getNeighboringObjects (WorldObjectGlobal *) |
| bool | putObject (WorldObjectGlobal *_object, int x=-1, int y=-1) |
| bool | removeObject (WorldObjectGlobal *_object) |
| std::string | getLandmassName (const int, const int) |
| std::string | getLandmassName (HasXY *) |
| World_Biome * | getBiome (const int id) |
| World_Biome * | getBiome (const int x, const int y) |
| std::string | getBiomeName (const int, const int) |
| std::string | getTileType (const int _x, const int _y) |
| void | queryTile (int hoveredXTile, int hoveredYTile) |
| void | queryTileLocal (int hoveredXTile, int hoveredYTile) |
| void | addInfluence (Tribe *tribe, int amount) |
| void | degradeInfluence (int amount=1) |
| void | destroyInfluence (Tribe *tribe) |
| Tribe * | getDominantInfluence (const int, const int) |
| Tribe * | getDominantInfluence (HasXY *) |
| Vector< Tribe * > * | getTribesOn (const int, const int) |
| Tribe * | combatCheck (Tribe *) |
| bool | hasFreeTerritory (int landmassID) |
| int | nFreeTerritory (int landmassID) |
| void | evolveToCiv (Tribe *) |
| void | incrementDeities (int) |
| Tribe * | getNearestConnectedTribe (Tribe *, bool sameRace=true) |
| int | getHighestInfluence (const int, const int) |
| int | getHighestInfluence (HasXY *) |
| bool | hasSettlement (const int, const int) |
| void | buildMinimap () |
| virtual void | save () |
| World::World | ( | ) |
| World::~World | ( | ) |
| bool World::absoluteToRelative | ( | const unsigned long int | _absoluteX, |
| const unsigned long int | _absoluteY, | ||
| int * | _globalX, | ||
| int * | _globalY, | ||
| int * | _localX, | ||
| int * | _localY | ||
| ) |
| void World::addInfluence | ( | Tribe * | tribe, |
| int | amount | ||
| ) |
| bool World::addRace | ( | int | , |
| std::string | |||
| ) |
| void World::buildArrays | ( | WorldGenerator2 & | wg | ) |
| void World::buildMinimap | ( | ) |
This function builds a minimap texture which is later rendered in the world simulator.
| void World::controlCharacter | ( | Character * | _character | ) |
| void World::degradeInfluence | ( | int | amount = 1 | ) |
| void World::destroyInfluence | ( | Tribe * | tribe | ) |
| void World::evolveToCiv | ( | Tribe * | _tribe | ) |
| void World::generateDwarves | ( | int | _nCivs | ) |
| void World::generateElves | ( | int | _nTribes | ) |
| void World::generateHumans | ( | int | _nTribes | ) |
| void World::generateLocal | ( | const int | _localX, |
| const int | _localY | ||
| ) |
| void World::generateLocal | ( | HasXY * | _xy | ) |
| bool World::generateMythology | ( | ) |
| void World::generateTribes | ( | int | nTribesHuman = DEFAULT_NUMBER_TRIBES_HUMAN, |
| int | nTribesDwarven = DEFAULT_NUMBER_TRIBES_DWARVEN, |
||
| int | nTribesElven = DEFAULT_NUMBER_TRIBES_ELVEN |
||
| ) |
| void World::generateWorld | ( | const std::string | _worldName, |
| const int | x = 127, |
||
| const int | y = 127, |
||
| int | seed = 0, |
||
| int | fragmentation = 2, |
||
| const bool | islandMode = true, |
||
| const bool | wrapX = true, |
||
| const bool | wrapY = false, |
||
| const double | landPercent = 0.66 |
||
| ) |
| World_Biome * World::getBiome | ( | const int | id | ) |
| World_Biome * World::getBiome | ( | const int | x, |
| const int | y | ||
| ) |
| std::string World::getBiomeName | ( | const int | _x, |
| const int | _y | ||
| ) |
| Tribe * World::getDominantInfluence | ( | const int | _x, |
| const int | _y | ||
| ) |
| Tribe * World::getDominantInfluence | ( | HasXY * | _xy | ) |
| int World::getHighestInfluence | ( | const int | _x, |
| const int | _y | ||
| ) |
| int World::getHighestInfluence | ( | HasXY * | _xy | ) |
| int World::getHuntingYield | ( | const int | _x, |
| const int | _y | ||
| ) |
| std::string World::getLandmassName | ( | const int | _x, |
| const int | _y | ||
| ) |
| std::string World::getLandmassName | ( | HasXY * | _xy | ) |
| Vector< WorldObjectGlobal * > * World::getNeighboringObjects | ( | WorldObjectGlobal * | _obj | ) |
| int World::getPopulation | ( | ) |
| Character * World::getRandomCharacter | ( | ) |
| bool World::getRandomLandTile | ( | int * | x, |
| int * | y | ||
| ) |
| HasXY * World::getRandomLandTile | ( | ) |
| void World::getRandomTile | ( | int * | x, |
| int * | y | ||
| ) |
| HasXY * World::getRandomTileOfType | ( | enumBiome | _type | ) |
| int World::getSurroundingFertility | ( | const int | _x, |
| const int | _y | ||
| ) |
| World_Local * World::getTile | ( | const int | x, |
| const int | y | ||
| ) |
| int World::getTileFertility | ( | const int | _x, |
| const int | _y | ||
| ) |
|
inline |
| std::string World::getTileType | ( | const int | _x, |
| const int | _y | ||
| ) |
| Vector< Tribe * > * World::getTribesOn | ( | const int | _x, |
| const int | _y | ||
| ) |
| bool World::handleTickBacklog | ( | ) |
| bool World::hasFreeTerritory | ( | int | landmassID | ) |
| bool World::hasSettlement | ( | const int | _x, |
| const int | _y | ||
| ) |
| void World::idleTick | ( | ) |
| void World::incrementDeities | ( | int | nTicks | ) |
| void World::incrementTicks | ( | int | nTicks | ) |
| void World::incrementTicksBacklog | ( | long long unsigned int | nTicks | ) |
| bool World::isGenerated | ( | unsigned long int | _absoluteX, |
| unsigned long int | _absoluteY | ||
| ) |
| bool World::isLand | ( | int | _x, |
| int | _y | ||
| ) |
|
inline |
| bool World::isSafe | ( | int | _x, |
| int | _y | ||
| ) |
| bool World::isSafe | ( | unsigned long int | _x, |
| unsigned long int | _y | ||
| ) |
| bool World::loadWorld | ( | std::string | _name | ) |
| void World::logicTick | ( | ) |
| void World::nameRegions | ( | ) |
| int World::nFreeTerritory | ( | int | landmassID | ) |
|
inline |
|
inline |
|
inline |
| bool World::prepareAdventureMode | ( | Character * | _character | ) |
| bool World::putObject | ( | WorldObjectGlobal * | _object, |
| int | x = -1, |
||
| int | y = -1 |
||
| ) |
| void World::queryTile | ( | int | hoveredXTile, |
| int | hoveredYTile | ||
| ) |
| void World::queryTileLocal | ( | int | hoveredXTile, |
| int | hoveredYTile | ||
| ) |
| void World::rayTrace | ( | unsigned long int | _x1, |
| unsigned long int | _y1, | ||
| unsigned long int | _x2, | ||
| unsigned long int | _y2, | ||
| Vector< HasXY2< unsigned long int > *> * | vVisibleTiles, | ||
| bool | subterranean = false |
||
| ) |
| Vector< HasXY2< unsigned long int > * > * World::rayTraceLOS | ( | unsigned long int | _x, |
| unsigned long int | _y, | ||
| const int | RANGE, | ||
| const bool | isSneaking = false, |
||
| const bool | subterranean = false |
||
| ) |
| bool World::removeObject | ( | WorldObjectGlobal * | _object | ) |
|
virtual |
| void World::startSimulation | ( | ) |
| void World::unloadLocal | ( | const int | _localX, |
| const int | _localY | ||
| ) |
| void World::updateMaps | ( | ) |
| ArrayS2<int> World::aBiomeID |
| bool World::active |
| ArrayS2<unsigned char> World::aGoodEvil |
| ArrayS2<int> World::aRiverID |
| World_Astronomy World::astronomy |
| ArrayS3<unsigned char> World::aTopoMap |
| ArrayS2<WorldObject*> World::aWorldObject |
| ArrayS2<World_Local> World::aWorldTile |
| int World::dailyCounter |
| int World::deityTicks |
| EventManager World::eventManager |
| bool World::generated |
| bool World::incrementContinuous |
| bool World::isRaining |
| int World::landmassSeed |
| Calendar World::lastDate |
| unsigned long int World::maximumX |
| unsigned long int World::maximumY |
| int World::monthlyCounter |
| unsigned char World::mountainLevel |
| Mythology_Manager World::mythologyManager |
| std::string World::name |
| int World::nX |
| int World::nY |
| int World::queryWorldX |
| int World::queryWorldXLocal |
| int World::queryWorldY |
| int World::queryWorldYLocal |
| Timer World::relinquishTimer |
| unsigned char World::seaLevel |
| int World::simX |
| int World::simY |
| std::string World::strSavePath |
| long long unsigned int World::ticksBacklog |
| Vector< Vector <int> * > World::vAllTiles |
| Vector<HasXY*> World::vAllTiles2 |
| Vector<World_Biome*> World::vBiome |
| Vector<Civ*> World::vCiv |
| Vector<World_Landmass*> World::vLandmass |
| Vector<Tribe*> World::vTribe |
| Vector<World_Local*> World::vWorldLocal |
| Vector<WorldObjectGlobal*> World::vWorldObjectGlobal |
| std::string World::worldFilePath |
1.8.13