refactor: unglob std::list

This commit is contained in:
Tropical 2026-03-06 20:37:02 -06:00
parent 277e3a1e87
commit e918160231
16 changed files with 206 additions and 206 deletions

View file

@ -134,10 +134,10 @@ public:
int m_primedTntCount;
int m_fallingTileCount;
CRITICAL_SECTION m_limiterCS;
list< std::shared_ptr<Entity> > m_itemEntities;
list< std::shared_ptr<Entity> > m_hangingEntities;
list< std::shared_ptr<Entity> > m_arrowEntities;
list< std::shared_ptr<Entity> > m_experienceOrbEntities;
std::list< std::shared_ptr<Entity> > m_itemEntities;
std::list< std::shared_ptr<Entity> > m_hangingEntities;
std::list< std::shared_ptr<Entity> > m_arrowEntities;
std::list< std::shared_ptr<Entity> > m_experienceOrbEntities;
virtual bool addEntity(std::shared_ptr<Entity> e);
void entityAddedExtra(std::shared_ptr<Entity> e);

View file

@ -21,7 +21,7 @@ public:
MinecraftServer *server;
ServerPlayerGameMode *gameMode;
double lastMoveX, lastMoveZ;
list<ChunkPos> chunksToSend;
std::list<ChunkPos> chunksToSend;
std::vector<int> entitiesToRemove;
std::unordered_set<ChunkPos, ChunkPosKeyHash, ChunkPosKeyEq> seenChunks;
int spewTimer;

View file

@ -111,7 +111,7 @@ bool StructureFeature::isInsideFeature(int cellX, int cellY, int cellZ)
return true;
}
*/
list<StructurePiece *> *pieces=pStructureStart->getPieces();
std::list<StructurePiece *> *pieces=pStructureStart->getPieces();
for ( AUTO_VAR(it2, pieces->begin()); it2 != pieces->end(); it2++ )
{

View file

@ -89,7 +89,7 @@ VillageFeature::VillageStart::VillageStart(Level *level, Random *random, int chu
valid = false; // 4J added initialiser
m_iXZSize=iXZSize;
list<VillagePieces::PieceWeight *> *pieceSet = VillagePieces::createPieceSet(random, villageSizeModifier);
std::list<VillagePieces::PieceWeight *> *pieceSet = VillagePieces::createPieceSet(random, villageSizeModifier);
VillagePieces::StartPiece *startRoom = new VillagePieces::StartPiece(level->getBiomeSource(), 0, random, (chunkX << 4) + 2, (chunkZ << 4) + 2, pieceSet, villageSizeModifier, level);
pieces.push_back(startRoom);

View file

@ -27,7 +27,7 @@ void MineShaftPieces::staticCtor()
smallTreasureItems[10] = new WeighedTreasure(Item::seeds_pumpkin_Id, 0, 2, 4, 10);
}
StructurePiece *MineShaftPieces::createRandomShaftPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
StructurePiece *MineShaftPieces::createRandomShaftPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
int randomSelection = random->nextInt(100);
if (randomSelection >= 80)
@ -58,7 +58,7 @@ StructurePiece *MineShaftPieces::createRandomShaftPiece(list<StructurePiece *> *
return NULL;
}
StructurePiece *MineShaftPieces::generateAndAddPiece(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
StructurePiece *MineShaftPieces::generateAndAddPiece(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
{
if (depth > MAX_DEPTH)
{
@ -94,7 +94,7 @@ MineShaftPieces::MineShaftRoom::~MineShaftRoom()
}
}
void MineShaftPieces::MineShaftRoom::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void MineShaftPieces::MineShaftRoom::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
int depth = getGenDepth();
@ -221,7 +221,7 @@ MineShaftPieces::MineShaftCorridor::MineShaftCorridor(int genDepth, Random *rand
}
}
BoundingBox *MineShaftPieces::MineShaftCorridor::findCorridorSize(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction)
BoundingBox *MineShaftPieces::MineShaftCorridor::findCorridorSize(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction)
{
BoundingBox *box = new BoundingBox(footX, footY, footZ, footX, footY + (DEFAULT_SHAFT_HEIGHT - 1), footZ);
@ -270,7 +270,7 @@ BoundingBox *MineShaftPieces::MineShaftCorridor::findCorridorSize(list<Structure
return NULL;
}
void MineShaftPieces::MineShaftCorridor::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void MineShaftPieces::MineShaftCorridor::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
int depth = getGenDepth();
int endSelection = random->nextInt(4);
@ -480,7 +480,7 @@ MineShaftPieces::MineShaftCrossing::MineShaftCrossing(int genDepth, Random *rand
boundingBox = crossingBox;
}
BoundingBox *MineShaftPieces::MineShaftCrossing::findCrossing(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction)
BoundingBox *MineShaftPieces::MineShaftCrossing::findCrossing(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction)
{
BoundingBox *box = new BoundingBox(footX, footY, footZ, footX, footY + (DEFAULT_SHAFT_HEIGHT - 1), footZ);
@ -523,7 +523,7 @@ BoundingBox *MineShaftPieces::MineShaftCrossing::findCrossing(list<StructurePiec
return box;
}
void MineShaftPieces::MineShaftCrossing::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void MineShaftPieces::MineShaftCrossing::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
int depth = getGenDepth();
@ -616,7 +616,7 @@ MineShaftPieces::MineShaftStairs::MineShaftStairs(int genDepth, Random *random,
boundingBox = stairsBox;
}
BoundingBox *MineShaftPieces::MineShaftStairs::findStairs(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction)
BoundingBox *MineShaftPieces::MineShaftStairs::findStairs(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction)
{
// stairs are two steps in, 5x5 steps down, two steps out
@ -651,7 +651,7 @@ BoundingBox *MineShaftPieces::MineShaftStairs::findStairs(list<StructurePiece *>
return box;
}
void MineShaftPieces::MineShaftStairs::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void MineShaftPieces::MineShaftStairs::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
int depth = getGenDepth();
// crossings are coming from a direction and will generate children

View file

@ -11,8 +11,8 @@ private:
static const int MAX_DEPTH = 8; // 1.2.3 change
static StructurePiece *createRandomShaftPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
static StructurePiece *generateAndAddPiece(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
static StructurePiece *createRandomShaftPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
static StructurePiece *generateAndAddPiece(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
/**
*
@ -22,13 +22,13 @@ public:
class MineShaftRoom : public StructurePiece
{
private:
list<BoundingBox *> childEntranceBoxes;
std::list<BoundingBox *> childEntranceBoxes;
public:
MineShaftRoom(int genDepth, Random *random, int west, int north);
~MineShaftRoom();
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -47,8 +47,8 @@ public:
public:
MineShaftCorridor(int genDepth, Random *random, BoundingBox *corridorBox, int direction);
static BoundingBox *findCorridorSize(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static BoundingBox *findCorridorSize(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -65,8 +65,8 @@ public:
public:
MineShaftCrossing(int genDepth, Random *random, BoundingBox *crossingBox, int direction);
static BoundingBox *findCrossing(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static BoundingBox *findCrossing(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -79,8 +79,8 @@ public:
public:
MineShaftStairs(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
static BoundingBox *findStairs(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static BoundingBox *findStairs(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};

View file

@ -54,7 +54,7 @@ NetherBridgePieces::PieceWeight *NetherBridgePieces::castlePieceWeights[NetherBr
new PieceWeight(EPieceClass_CastleCorridorTBalconyPiece, 7, 2),
};
NetherBridgePieces::NetherBridgePiece *NetherBridgePieces::findAndCreateBridgePieceFactory(NetherBridgePieces::PieceWeight *piece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
NetherBridgePieces::NetherBridgePiece *NetherBridgePieces::findAndCreateBridgePieceFactory(NetherBridgePieces::PieceWeight *piece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
{
EPieceClass pieceClass = piece->pieceClass;
NetherBridgePiece *structurePiece = NULL;
@ -118,7 +118,7 @@ NetherBridgePieces::NetherBridgePiece::NetherBridgePiece(int genDepth) : Structu
{
}
int NetherBridgePieces::NetherBridgePiece::updatePieceWeight(list<PieceWeight *> *currentPieces)
int NetherBridgePieces::NetherBridgePiece::updatePieceWeight(std::list<PieceWeight *> *currentPieces)
{
bool hasAnyPieces = false;
int totalWeight = 0;
@ -135,7 +135,7 @@ int NetherBridgePieces::NetherBridgePiece::updatePieceWeight(list<PieceWeight *>
return (hasAnyPieces ? totalWeight : -1);
}
NetherBridgePieces::NetherBridgePiece *NetherBridgePieces::NetherBridgePiece::generatePiece(StartPiece *startPiece, list<NetherBridgePieces::PieceWeight *> *currentPieces, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
NetherBridgePieces::NetherBridgePiece *NetherBridgePieces::NetherBridgePiece::generatePiece(StartPiece *startPiece, std::list<NetherBridgePieces::PieceWeight *> *currentPieces, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
{
int totalWeight = updatePieceWeight(currentPieces);
boolean doStuff = totalWeight > 0 && depth <= MAX_DEPTH;
@ -178,13 +178,13 @@ NetherBridgePieces::NetherBridgePiece *NetherBridgePieces::NetherBridgePiece::ge
}
StructurePiece *NetherBridgePieces::NetherBridgePiece::generateAndAddPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth, bool isCastle)
StructurePiece *NetherBridgePieces::NetherBridgePiece::generateAndAddPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth, bool isCastle)
{
if (abs(footX - startPiece->getBoundingBox()->x0) > 7 * 16 || abs(footZ - startPiece->getBoundingBox()->z0) > 7 * 16)
{
return BridgeEndFiller::createPiece(pieces, random, footX, footY, footZ, direction, depth);
}
list<PieceWeight *> *availablePieces = &startPiece->availableBridgePieces;
std::list<PieceWeight *> *availablePieces = &startPiece->availableBridgePieces;
if (isCastle)
{
availablePieces = &startPiece->availableCastlePieces;
@ -198,7 +198,7 @@ StructurePiece *NetherBridgePieces::NetherBridgePiece::generateAndAddPiece(Start
return newPiece;
}
StructurePiece *NetherBridgePieces::NetherBridgePiece::generateChildForward(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int xOff, int yOff, bool isCastle)
StructurePiece *NetherBridgePieces::NetherBridgePiece::generateChildForward(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int xOff, int yOff, bool isCastle)
{
switch (orientation)
{
@ -214,7 +214,7 @@ StructurePiece *NetherBridgePieces::NetherBridgePiece::generateChildForward(Star
return NULL;
}
StructurePiece *NetherBridgePieces::NetherBridgePiece::generateChildLeft(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int yOff, int zOff, bool isCastle)
StructurePiece *NetherBridgePieces::NetherBridgePiece::generateChildLeft(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int yOff, int zOff, bool isCastle)
{
switch (orientation)
{
@ -230,7 +230,7 @@ StructurePiece *NetherBridgePieces::NetherBridgePiece::generateChildLeft(StartPi
return NULL;
}
StructurePiece *NetherBridgePieces::NetherBridgePiece::generateChildRight(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int yOff, int zOff, bool isCastle)
StructurePiece *NetherBridgePieces::NetherBridgePiece::generateChildRight(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int yOff, int zOff, bool isCastle)
{
switch (orientation)
{
@ -316,12 +316,12 @@ NetherBridgePieces::BridgeStraight::BridgeStraight(int genDepth, Random *random,
boundingBox = stairsBox;
}
void NetherBridgePieces::BridgeStraight::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void NetherBridgePieces::BridgeStraight::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
generateChildForward((StartPiece *) startPiece, pieces, random, 1, 3, false);
}
NetherBridgePieces::BridgeStraight *NetherBridgePieces::BridgeStraight::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
NetherBridgePieces::BridgeStraight *NetherBridgePieces::BridgeStraight::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -1, -3, 0, width, height, depth, direction);
@ -382,7 +382,7 @@ NetherBridgePieces::BridgeEndFiller::BridgeEndFiller(int genDepth, Random *rando
selfSeed = random->nextInt();
}
NetherBridgePieces::BridgeEndFiller *NetherBridgePieces::BridgeEndFiller::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
NetherBridgePieces::BridgeEndFiller *NetherBridgePieces::BridgeEndFiller::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -1, -3, 0, width, height, depth, direction);
@ -464,14 +464,14 @@ NetherBridgePieces::BridgeCrossing::BridgeCrossing(Random *random, int west, int
}
}
void NetherBridgePieces::BridgeCrossing::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void NetherBridgePieces::BridgeCrossing::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
generateChildForward((StartPiece *) startPiece, pieces, random, 8, 3, false);
generateChildLeft((StartPiece *) startPiece, pieces, random, 3, 8, false);
generateChildRight((StartPiece *) startPiece, pieces, random, 3, 8, false);
}
NetherBridgePieces::BridgeCrossing *NetherBridgePieces::BridgeCrossing::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
NetherBridgePieces::BridgeCrossing *NetherBridgePieces::BridgeCrossing::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -8, -3, 0, width, height, depth, direction);
@ -565,14 +565,14 @@ NetherBridgePieces::RoomCrossing::RoomCrossing(int genDepth, Random *random, Bou
boundingBox = box;
}
void NetherBridgePieces::RoomCrossing::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void NetherBridgePieces::RoomCrossing::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
generateChildForward((StartPiece *) startPiece, pieces, random, 2, 0, false);
generateChildLeft((StartPiece *) startPiece, pieces, random, 0, 2, false);
generateChildRight((StartPiece *) startPiece, pieces, random, 0, 2, false);
}
NetherBridgePieces::RoomCrossing *NetherBridgePieces::RoomCrossing::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
NetherBridgePieces::RoomCrossing *NetherBridgePieces::RoomCrossing::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -2, 0, 0, width, height, depth, direction);
@ -632,12 +632,12 @@ NetherBridgePieces::StairsRoom::StairsRoom(int genDepth, Random *random, Boundin
boundingBox = box;
}
void NetherBridgePieces::StairsRoom::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void NetherBridgePieces::StairsRoom::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
generateChildRight((StartPiece *) startPiece, pieces, random, 6, 2, false);
}
NetherBridgePieces::StairsRoom *NetherBridgePieces::StairsRoom::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
NetherBridgePieces::StairsRoom *NetherBridgePieces::StairsRoom::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -2, 0, 0, width, height, depth, direction);
@ -707,7 +707,7 @@ NetherBridgePieces::MonsterThrone::MonsterThrone(int genDepth, Random *random, B
hasPlacedMobSpawner = false;
}
NetherBridgePieces::MonsterThrone *NetherBridgePieces::MonsterThrone::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
NetherBridgePieces::MonsterThrone *NetherBridgePieces::MonsterThrone::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -2, 0, 0, width, height, depth, direction);
@ -780,12 +780,12 @@ NetherBridgePieces::CastleEntrance::CastleEntrance(int genDepth, Random *random,
boundingBox = stairsBox;
}
void NetherBridgePieces::CastleEntrance::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void NetherBridgePieces::CastleEntrance::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
generateChildForward((StartPiece *) startPiece, pieces, random, 5, 3, true);
}
NetherBridgePieces::CastleEntrance *NetherBridgePieces::CastleEntrance::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
NetherBridgePieces::CastleEntrance *NetherBridgePieces::CastleEntrance::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -5, -3, 0, width, height, depth, direction);
@ -905,13 +905,13 @@ NetherBridgePieces::CastleStalkRoom::CastleStalkRoom(int genDepth, Random *rando
boundingBox = stairsBox;
}
void NetherBridgePieces::CastleStalkRoom::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void NetherBridgePieces::CastleStalkRoom::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
generateChildForward((StartPiece *) startPiece, pieces, random, 5, 3, true);
generateChildForward((StartPiece *) startPiece, pieces, random, 5, 11, true);
}
NetherBridgePieces::CastleStalkRoom *NetherBridgePieces::CastleStalkRoom::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
NetherBridgePieces::CastleStalkRoom *NetherBridgePieces::CastleStalkRoom::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -5, -3, 0, width, height, depth, direction);
@ -1067,12 +1067,12 @@ NetherBridgePieces::CastleSmallCorridorPiece::CastleSmallCorridorPiece(int genDe
}
void NetherBridgePieces::CastleSmallCorridorPiece::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void NetherBridgePieces::CastleSmallCorridorPiece::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
generateChildForward((StartPiece *) startPiece, pieces, random, 1, 0, true);
}
NetherBridgePieces::CastleSmallCorridorPiece *NetherBridgePieces::CastleSmallCorridorPiece::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
NetherBridgePieces::CastleSmallCorridorPiece *NetherBridgePieces::CastleSmallCorridorPiece::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -1, 0, 0, width, height, depth, direction);
@ -1126,14 +1126,14 @@ NetherBridgePieces::CastleSmallCorridorCrossingPiece::CastleSmallCorridorCrossin
boundingBox = stairsBox;
}
void NetherBridgePieces::CastleSmallCorridorCrossingPiece::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void NetherBridgePieces::CastleSmallCorridorCrossingPiece::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
generateChildForward((StartPiece *) startPiece, pieces, random, 1, 0, true);
generateChildLeft((StartPiece *) startPiece, pieces, random, 0, 1, true);
generateChildRight((StartPiece *) startPiece, pieces, random, 0, 1, true);
}
NetherBridgePieces::CastleSmallCorridorCrossingPiece *NetherBridgePieces::CastleSmallCorridorCrossingPiece::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
NetherBridgePieces::CastleSmallCorridorCrossingPiece *NetherBridgePieces::CastleSmallCorridorCrossingPiece::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -1, 0, 0, width, height, depth, direction);
@ -1184,12 +1184,12 @@ NetherBridgePieces::CastleSmallCorridorRightTurnPiece::CastleSmallCorridorRightT
boundingBox = stairsBox;
}
void NetherBridgePieces::CastleSmallCorridorRightTurnPiece::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void NetherBridgePieces::CastleSmallCorridorRightTurnPiece::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
generateChildRight((StartPiece *) startPiece, pieces, random, 0, 1, true);
}
NetherBridgePieces::CastleSmallCorridorRightTurnPiece *NetherBridgePieces::CastleSmallCorridorRightTurnPiece::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
NetherBridgePieces::CastleSmallCorridorRightTurnPiece *NetherBridgePieces::CastleSmallCorridorRightTurnPiece::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -1, 0, 0, width, height, depth, direction);
@ -1245,12 +1245,12 @@ NetherBridgePieces::CastleSmallCorridorLeftTurnPiece::CastleSmallCorridorLeftTur
boundingBox = stairsBox;
}
void NetherBridgePieces::CastleSmallCorridorLeftTurnPiece::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void NetherBridgePieces::CastleSmallCorridorLeftTurnPiece::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
generateChildLeft((StartPiece *) startPiece, pieces, random, 0, 1, true);
}
NetherBridgePieces::CastleSmallCorridorLeftTurnPiece *NetherBridgePieces::CastleSmallCorridorLeftTurnPiece::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
NetherBridgePieces::CastleSmallCorridorLeftTurnPiece *NetherBridgePieces::CastleSmallCorridorLeftTurnPiece::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -1, 0, 0, width, height, depth, direction);
@ -1306,12 +1306,12 @@ NetherBridgePieces::CastleCorridorStairsPiece::CastleCorridorStairsPiece(int gen
boundingBox = stairsBox;
}
void NetherBridgePieces::CastleCorridorStairsPiece::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void NetherBridgePieces::CastleCorridorStairsPiece::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
generateChildForward((StartPiece *) startPiece, pieces, random, 1, 0, true);
}
NetherBridgePieces::CastleCorridorStairsPiece *NetherBridgePieces::CastleCorridorStairsPiece::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
NetherBridgePieces::CastleCorridorStairsPiece *NetherBridgePieces::CastleCorridorStairsPiece::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -1, -7, 0, width, height, depth, direction);
@ -1376,7 +1376,7 @@ NetherBridgePieces::CastleCorridorTBalconyPiece::CastleCorridorTBalconyPiece(int
boundingBox = stairsBox;
}
void NetherBridgePieces::CastleCorridorTBalconyPiece::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void NetherBridgePieces::CastleCorridorTBalconyPiece::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
int zOff = 1;
// compensate for weird negative-facing behaviour
@ -1389,7 +1389,7 @@ void NetherBridgePieces::CastleCorridorTBalconyPiece::addChildren(StructurePiece
generateChildRight((StartPiece *) startPiece, pieces, random, 0, zOff, random->nextInt(8) > 0);
}
NetherBridgePieces::CastleCorridorTBalconyPiece *NetherBridgePieces::CastleCorridorTBalconyPiece::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
NetherBridgePieces::CastleCorridorTBalconyPiece *NetherBridgePieces::CastleCorridorTBalconyPiece::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -3, 0, 0, width, height, depth, direction);

View file

@ -49,7 +49,7 @@ private:
private:
class NetherBridgePiece;
static NetherBridgePiece *findAndCreateBridgePieceFactory(NetherBridgePieces::PieceWeight *piece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
static NetherBridgePiece *findAndCreateBridgePieceFactory(NetherBridgePieces::PieceWeight *piece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
/**
*
@ -64,14 +64,14 @@ private:
protected:
NetherBridgePiece(int genDepth);
private:
int updatePieceWeight(list<PieceWeight *> *currentPieces);
int updatePieceWeight(std::list<PieceWeight *> *currentPieces);
NetherBridgePiece *generatePiece(StartPiece *startPiece, list<NetherBridgePieces::PieceWeight *> *currentPieces, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
StructurePiece *generateAndAddPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth, bool isCastle);
NetherBridgePiece *generatePiece(StartPiece *startPiece, std::list<NetherBridgePieces::PieceWeight *> *currentPieces, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
StructurePiece *generateAndAddPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth, bool isCastle);
protected:
StructurePiece *generateChildForward(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int xOff, int yOff, bool isCastle);
StructurePiece *generateChildLeft(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int yOff, int zOff, bool isCastle);
StructurePiece *generateChildRight(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int yOff, int zOff, bool isCastle);
StructurePiece *generateChildForward(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int xOff, int yOff, bool isCastle);
StructurePiece *generateChildLeft(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int yOff, int zOff, bool isCastle);
StructurePiece *generateChildRight(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int yOff, int zOff, bool isCastle);
static bool isOkBox(BoundingBox *box, StartPiece *startRoom); // 4J added startRoom param
void generateLightPost(Level *level, Random *random, BoundingBox *chunkBB, int x, int y, int z, int xOff, int zOff);
@ -95,8 +95,8 @@ private:
public:
BridgeStraight(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static BridgeStraight *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static BridgeStraight *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -111,7 +111,7 @@ private:
public:
BridgeEndFiller(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
static BridgeEndFiller *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
static BridgeEndFiller *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -127,8 +127,8 @@ private:
protected:
BridgeCrossing(Random *random, int west, int north);
public:
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static BridgeCrossing *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static BridgeCrossing *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -141,8 +141,8 @@ public:
PieceWeight *previousPiece;
Level *m_level;
list<PieceWeight *> availableBridgePieces;
list<PieceWeight *> availableCastlePieces;
std::list<PieceWeight *> availableBridgePieces;
std::list<PieceWeight *> availableCastlePieces;
// this queue is used so that the addChildren calls are
// called in a random order
@ -162,8 +162,8 @@ private:
public:
RoomCrossing(int genDepth, Random *random, BoundingBox *box, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static RoomCrossing *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static RoomCrossing *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -176,8 +176,8 @@ private:
public:
StairsRoom(int genDepth, Random *random, BoundingBox *box, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static StairsRoom *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static StairsRoom *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -192,7 +192,7 @@ private:
public:
MonsterThrone(int genDepth, Random *random, BoundingBox *box, int direction);
static MonsterThrone *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
static MonsterThrone *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -208,8 +208,8 @@ private:
static const int depth = 13;
public:
CastleEntrance(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static CastleEntrance *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static CastleEntrance *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -226,8 +226,8 @@ private:
public:
CastleStalkRoom(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static CastleStalkRoom *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static CastleStalkRoom *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -244,8 +244,8 @@ private:
public:
CastleSmallCorridorPiece(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static CastleSmallCorridorPiece *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static CastleSmallCorridorPiece *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -262,8 +262,8 @@ private:
public:
CastleSmallCorridorCrossingPiece(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static CastleSmallCorridorCrossingPiece *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static CastleSmallCorridorCrossingPiece *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -280,8 +280,8 @@ private:
public:
CastleSmallCorridorRightTurnPiece(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static CastleSmallCorridorRightTurnPiece *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static CastleSmallCorridorRightTurnPiece *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -299,8 +299,8 @@ private:
public:
CastleSmallCorridorLeftTurnPiece(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static CastleSmallCorridorLeftTurnPiece *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static CastleSmallCorridorLeftTurnPiece *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -317,8 +317,8 @@ private:
public:
CastleCorridorStairsPiece(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static CastleCorridorStairsPiece *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static CastleCorridorStairsPiece *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -336,8 +336,8 @@ private:
public:
CastleCorridorTBalconyPiece(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static CastleCorridorTBalconyPiece *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static CastleCorridorTBalconyPiece *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
};

View file

@ -11,7 +11,7 @@
#include "../../Util/Facing.h"
int StrongholdPieces::totalWeight = 0;
list<StrongholdPieces::PieceWeight *> StrongholdPieces::currentPieces;
std::list<StrongholdPieces::PieceWeight *> StrongholdPieces::currentPieces;
StrongholdPieces::EPieceClass StrongholdPieces::imposedPiece;
const bool StrongholdPieces::CHECK_AIR = true;
@ -71,7 +71,7 @@ bool StrongholdPieces::updatePieceWeight()
return hasAnyPieces;
}
StrongholdPieces::StrongholdPiece *StrongholdPieces::findAndCreatePieceFactory(EPieceClass pieceClass, list<StructurePiece*> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
StrongholdPieces::StrongholdPiece *StrongholdPieces::findAndCreatePieceFactory(EPieceClass pieceClass, std::list<StructurePiece*> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
{
StrongholdPiece *strongholdPiece = NULL;
@ -124,7 +124,7 @@ StrongholdPieces::StrongholdPiece *StrongholdPieces::findAndCreatePieceFactory(E
return strongholdPiece;
}
StrongholdPieces::StrongholdPiece *StrongholdPieces::generatePieceFromSmallDoor(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
StrongholdPieces::StrongholdPiece *StrongholdPieces::generatePieceFromSmallDoor(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
{
if (!updatePieceWeight())
{
@ -186,7 +186,7 @@ StrongholdPieces::StrongholdPiece *StrongholdPieces::generatePieceFromSmallDoor(
return NULL;
}
StructurePiece *StrongholdPieces::generateAndAddPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
StructurePiece *StrongholdPieces::generateAndAddPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
{
if (depth > MAX_DEPTH)
{
@ -305,7 +305,7 @@ StrongholdPieces::StrongholdPiece::SmallDoorType StrongholdPieces::StrongholdPie
}
}
StructurePiece *StrongholdPieces::StrongholdPiece::generateSmallDoorChildForward(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int xOff, int yOff)
StructurePiece *StrongholdPieces::StrongholdPiece::generateSmallDoorChildForward(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int xOff, int yOff)
{
switch (orientation)
{
@ -321,7 +321,7 @@ StructurePiece *StrongholdPieces::StrongholdPiece::generateSmallDoorChildForward
return NULL;
}
StructurePiece *StrongholdPieces::StrongholdPiece::generateSmallDoorChildLeft(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int yOff, int zOff)
StructurePiece *StrongholdPieces::StrongholdPiece::generateSmallDoorChildLeft(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int yOff, int zOff)
{
switch (orientation)
{
@ -337,7 +337,7 @@ StructurePiece *StrongholdPieces::StrongholdPiece::generateSmallDoorChildLeft(St
return NULL;
}
StructurePiece *StrongholdPieces::StrongholdPiece::generateSmallDoorChildRight(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int yOff, int zOff)
StructurePiece *StrongholdPieces::StrongholdPiece::generateSmallDoorChildRight(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int yOff, int zOff)
{
switch (orientation)
{
@ -386,7 +386,7 @@ StrongholdPieces::FillerCorridor::FillerCorridor(int genDepth, Random *random, B
boundingBox = corridorBox;
}
BoundingBox *StrongholdPieces::FillerCorridor::findPieceBox(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction)
BoundingBox *StrongholdPieces::FillerCorridor::findPieceBox(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction)
{
const int maxLength = 3;
@ -482,7 +482,7 @@ StrongholdPieces::StairsDown::StairsDown(int genDepth, Random *random, BoundingB
boundingBox = stairsBox;
}
void StrongholdPieces::StairsDown::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void StrongholdPieces::StairsDown::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
if( isSource )
{
@ -491,7 +491,7 @@ void StrongholdPieces::StairsDown::addChildren(StructurePiece *startPiece, list<
generateSmallDoorChildForward((StartPiece *) startPiece, pieces, random, 1, 1);
}
StrongholdPieces::StairsDown *StrongholdPieces::StairsDown::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
StrongholdPieces::StairsDown *StrongholdPieces::StairsDown::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -1, 4 - height, 0, width, height, depth, direction);
@ -571,14 +571,14 @@ StrongholdPieces::Straight::Straight(int genDepth, Random *random, BoundingBox *
boundingBox = stairsBox;
}
void StrongholdPieces::Straight::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void StrongholdPieces::Straight::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
generateSmallDoorChildForward((StartPiece *) startPiece, pieces, random, 1, 1);
if (leftChild) generateSmallDoorChildLeft((StartPiece *) startPiece, pieces, random, 1, 2);
if (rightChild) generateSmallDoorChildRight((StartPiece *) startPiece, pieces, random, 1, 2);
}
StrongholdPieces::Straight *StrongholdPieces::Straight::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
StrongholdPieces::Straight *StrongholdPieces::Straight::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -1, -1, 0, width, height, depth, direction);
@ -649,12 +649,12 @@ StrongholdPieces::ChestCorridor::ChestCorridor(int genDepth, Random *random, Bou
boundingBox = stairsBox;
}
void StrongholdPieces::ChestCorridor::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void StrongholdPieces::ChestCorridor::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
generateSmallDoorChildForward((StartPiece *) startPiece, pieces, random, 1, 1);
}
StrongholdPieces::ChestCorridor *StrongholdPieces::ChestCorridor::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
StrongholdPieces::ChestCorridor *StrongholdPieces::ChestCorridor::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -1, -1, 0, width, height, depth, direction);
@ -715,12 +715,12 @@ StrongholdPieces::StraightStairsDown::StraightStairsDown(int genDepth, Random *r
boundingBox = stairsBox;
}
void StrongholdPieces::StraightStairsDown::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void StrongholdPieces::StraightStairsDown::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
generateSmallDoorChildForward((StartPiece *) startPiece, pieces, random, 1, 1);
}
StrongholdPieces::StraightStairsDown *StrongholdPieces::StraightStairsDown::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
StrongholdPieces::StraightStairsDown *StrongholdPieces::StraightStairsDown::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -1, 4 - height, 0, width, height, depth, direction);
@ -774,7 +774,7 @@ StrongholdPieces::LeftTurn::LeftTurn(int genDepth, Random *random, BoundingBox *
boundingBox = stairsBox;
}
void StrongholdPieces::LeftTurn::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void StrongholdPieces::LeftTurn::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
if (orientation == Direction::NORTH || orientation == Direction::EAST)
{
@ -786,7 +786,7 @@ void StrongholdPieces::LeftTurn::addChildren(StructurePiece *startPiece, list<St
}
}
StrongholdPieces::LeftTurn *StrongholdPieces::LeftTurn::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
StrongholdPieces::LeftTurn *StrongholdPieces::LeftTurn::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -1, -1, 0, width, height, depth, direction);
@ -830,7 +830,7 @@ StrongholdPieces::RightTurn::RightTurn(int genDepth, Random *random, BoundingBox
{
}
void StrongholdPieces::RightTurn::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void StrongholdPieces::RightTurn::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
if (orientation == Direction::NORTH || orientation == Direction::EAST)
{
@ -873,14 +873,14 @@ StrongholdPieces::RoomCrossing::RoomCrossing(int genDepth, Random *random, Bound
boundingBox = stairsBox;
}
void StrongholdPieces::RoomCrossing::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void StrongholdPieces::RoomCrossing::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
generateSmallDoorChildForward((StartPiece*) startPiece, pieces, random, 4, 1);
generateSmallDoorChildLeft((StartPiece*) startPiece, pieces, random, 1, 4);
generateSmallDoorChildRight((StartPiece*) startPiece, pieces, random, 1, 4);
}
StrongholdPieces::RoomCrossing *StrongholdPieces::RoomCrossing::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
StrongholdPieces::RoomCrossing *StrongholdPieces::RoomCrossing::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -4, -1, 0, width, height, depth, direction);
@ -1021,12 +1021,12 @@ StrongholdPieces::PrisonHall::PrisonHall(int genDepth, Random *random, BoundingB
boundingBox = stairsBox;
}
void StrongholdPieces::PrisonHall::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void StrongholdPieces::PrisonHall::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
generateSmallDoorChildForward((StartPiece *) startPiece, pieces, random, 1, 1);
}
StrongholdPieces::PrisonHall *StrongholdPieces::PrisonHall::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
StrongholdPieces::PrisonHall *StrongholdPieces::PrisonHall::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -1, -1, 0, width, height, depth, direction);
@ -1086,7 +1086,7 @@ StrongholdPieces::Library::Library(int genDepth, Random *random, BoundingBox *ro
boundingBox = roomBox;
}
StrongholdPieces::Library *StrongholdPieces::Library::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
StrongholdPieces::Library *StrongholdPieces::Library::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
// attempt to make a tall library first
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -4, -1, 0, width, tallHeight, depth, direction);
@ -1257,7 +1257,7 @@ StrongholdPieces::FiveCrossing::FiveCrossing(int genDepth, Random *random, Bound
rightHigh = random->nextInt(3) > 0;
}
void StrongholdPieces::FiveCrossing::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void StrongholdPieces::FiveCrossing::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
int zOffA = 3;
int zOffB = 5;
@ -1275,7 +1275,7 @@ void StrongholdPieces::FiveCrossing::addChildren(StructurePiece *startPiece, lis
if (rightHigh) generateSmallDoorChildRight((StartPiece *) startPiece, pieces, random, zOffB, 7);
}
StrongholdPieces::FiveCrossing *StrongholdPieces::FiveCrossing::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
StrongholdPieces::FiveCrossing *StrongholdPieces::FiveCrossing::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -4, -3, 0, width, height, depth, direction);
@ -1345,7 +1345,7 @@ StrongholdPieces::PortalRoom::PortalRoom(int genDepth, Random *random, BoundingB
boundingBox = box;
}
void StrongholdPieces::PortalRoom::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void StrongholdPieces::PortalRoom::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
if (startPiece != NULL)
{
@ -1353,7 +1353,7 @@ void StrongholdPieces::PortalRoom::addChildren(StructurePiece *startPiece, list<
}
}
StrongholdPieces::PortalRoom *StrongholdPieces::PortalRoom::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
StrongholdPieces::PortalRoom *StrongholdPieces::PortalRoom::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -4, -1, 0, width, height, depth, direction);

View file

@ -58,7 +58,7 @@ private:
virtual bool doPlace(int depth) { return PieceWeight::doPlace(depth) && depth > 5; }
};
static list<PieceWeight *> currentPieces;
static std::list<PieceWeight *> currentPieces;
static EPieceClass imposedPiece;
static int totalWeight;
@ -68,9 +68,9 @@ public:
private:
class StrongholdPiece;
static bool updatePieceWeight();
static StrongholdPiece *findAndCreatePieceFactory(EPieceClass pieceClass, list<StructurePiece*> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
static StrongholdPiece *generatePieceFromSmallDoor(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
static StructurePiece *generateAndAddPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
static StrongholdPiece *findAndCreatePieceFactory(EPieceClass pieceClass, std::list<StructurePiece*> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
static StrongholdPiece *generatePieceFromSmallDoor(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
static StructurePiece *generateAndAddPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
/**
@ -91,9 +91,9 @@ private:
void generateSmallDoor(Level *level, Random *random, BoundingBox *chunkBB, SmallDoorType doorType, int footX, int footY, int footZ);
SmallDoorType randomSmallDoor(Random *random);
StructurePiece *generateSmallDoorChildForward(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int xOff, int yOff);
StructurePiece *generateSmallDoorChildLeft(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int yOff, int zOff);
StructurePiece *generateSmallDoorChildRight(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int yOff, int zOff);
StructurePiece *generateSmallDoorChildForward(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int xOff, int yOff);
StructurePiece *generateSmallDoorChildLeft(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int yOff, int zOff);
StructurePiece *generateSmallDoorChildRight(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int yOff, int zOff);
static bool isOkBox(BoundingBox *box, StartPiece *startRoom); // 4J added startRoom param
};
@ -111,7 +111,7 @@ public:
public:
FillerCorridor(int genDepth, Random *random, BoundingBox *corridorBox, int direction);
static BoundingBox *findPieceBox(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction);
static BoundingBox *findPieceBox(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -134,8 +134,8 @@ public:
StairsDown(int genDepth, Random *random, int west, int north);
StairsDown(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static StairsDown *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static StairsDown *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -176,8 +176,8 @@ public:
public:
Straight(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static Straight *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static Straight *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -201,8 +201,8 @@ public:
public:
ChestCorridor(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static ChestCorridor *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static ChestCorridor *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -222,8 +222,8 @@ public:
public:
StraightStairsDown(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static StraightStairsDown *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static StraightStairsDown *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -244,8 +244,8 @@ public:
public:
LeftTurn(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static LeftTurn *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static LeftTurn *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -258,7 +258,7 @@ public:
{
public:
RightTurn(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -283,8 +283,8 @@ public:
const int type;
public:
RoomCrossing(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static RoomCrossing *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static RoomCrossing *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -304,8 +304,8 @@ public:
public:
PrisonHall(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static PrisonHall *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static PrisonHall *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -332,7 +332,7 @@ public:
public:
Library(int genDepth, Random *random, BoundingBox *roomBox, int direction);
static Library *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
static Library *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -356,8 +356,8 @@ public:
public:
FiveCrossing(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static FiveCrossing *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static FiveCrossing *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -378,8 +378,8 @@ public:
public:
PortalRoom(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static PortalRoom *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static PortalRoom *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};

View file

@ -53,7 +53,7 @@ StructurePiece::~StructurePiece()
if(boundingBox != NULL) delete boundingBox;
}
void StructurePiece::addChildren( StructurePiece* startPiece, list< StructurePiece* > *pieces, Random* random )
void StructurePiece::addChildren( StructurePiece* startPiece, std::list< StructurePiece* > *pieces, Random* random )
{
}
@ -75,7 +75,7 @@ bool StructurePiece::isInChunk( ChunkPos* pos )
return boundingBox->intersects( cx, cz, cx + 15, cz + 15 );
}
StructurePiece* StructurePiece::findCollisionPiece( list< StructurePiece* > *pieces, BoundingBox* box )
StructurePiece* StructurePiece::findCollisionPiece( std::list< StructurePiece* > *pieces, BoundingBox* box )
{
for ( AUTO_VAR(it, pieces->begin()); it != pieces->end(); it++ )
{

View file

@ -64,7 +64,7 @@ protected:
public:
virtual ~StructurePiece();
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB) = 0;
virtual BoundingBox *getBoundingBox();
@ -73,7 +73,7 @@ public:
public:
bool isInChunk(ChunkPos *pos);
static StructurePiece *findCollisionPiece(list<StructurePiece *> *pieces, BoundingBox *box);
static StructurePiece *findCollisionPiece(std::list<StructurePiece *> *pieces, BoundingBox *box);
virtual TilePos *getLocatorPosition();
protected:
bool edgesLiquid(Level *level, BoundingBox *chunkBB);

View file

@ -24,7 +24,7 @@ BoundingBox *StructureStart::getBoundingBox()
return boundingBox;
}
list<StructurePiece *> *StructureStart::getPieces()
std::list<StructurePiece *> *StructureStart::getPieces()
{
return &pieces;
}

View file

@ -6,14 +6,14 @@ class StructureStart
{
protected:
list<StructurePiece *> pieces;
std::list<StructurePiece *> pieces;
BoundingBox *boundingBox;
StructureStart();
public:
~StructureStart();
BoundingBox *getBoundingBox();
list<StructurePiece *> *getPieces();
std::list<StructurePiece *> *getPieces();
void postProcess(Level *level, Random *random, BoundingBox *chunkBB);
protected:
void calculateBoundingBox();

View file

@ -33,9 +33,9 @@ bool VillagePieces::PieceWeight::isValid()
return maxPlaceCount == 0 || placeCount < maxPlaceCount;
}
list<VillagePieces::PieceWeight *> *VillagePieces::createPieceSet(Random *random, int villageSize)
std::list<VillagePieces::PieceWeight *> *VillagePieces::createPieceSet(Random *random, int villageSize)
{
list<PieceWeight *> *newPieces = new list<PieceWeight *>;
std::list<PieceWeight *> *newPieces = new std::list<PieceWeight *>;
newPieces->push_back(new PieceWeight(VillagePieces::EPieceClass_SimpleHouse, 4, Mth::nextInt(random, 2 + villageSize, 4 + villageSize * 2)));
newPieces->push_back(new PieceWeight(VillagePieces::EPieceClass_SmallTemple, 20, Mth::nextInt(random, 0 + villageSize, 1 + villageSize)));
@ -65,7 +65,7 @@ list<VillagePieces::PieceWeight *> *VillagePieces::createPieceSet(Random *random
return newPieces;
}
int VillagePieces::updatePieceWeight(list<PieceWeight *> *currentPieces)
int VillagePieces::updatePieceWeight(std::list<PieceWeight *> *currentPieces)
{
bool hasAnyPieces = false;
int totalWeight = 0;
@ -81,7 +81,7 @@ int VillagePieces::updatePieceWeight(list<PieceWeight *> *currentPieces)
return (hasAnyPieces ? totalWeight : -1);
}
VillagePieces::VillagePiece *VillagePieces::findAndCreatePieceFactory(StartPiece *startPiece, VillagePieces::PieceWeight *piece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
VillagePieces::VillagePiece *VillagePieces::findAndCreatePieceFactory(StartPiece *startPiece, VillagePieces::PieceWeight *piece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
{
VillagePieces::EPieceClass pieceClass = piece->pieceClass;
VillagePiece *villagePiece = NULL;
@ -126,7 +126,7 @@ VillagePieces::VillagePiece *VillagePieces::findAndCreatePieceFactory(StartPiece
return villagePiece;
}
VillagePieces::VillagePiece *VillagePieces::generatePieceFromSmallDoor(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
VillagePieces::VillagePiece *VillagePieces::generatePieceFromSmallDoor(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
{
int totalWeight = updatePieceWeight(startPiece->pieceSet);
if (totalWeight <= 0)
@ -181,7 +181,7 @@ VillagePieces::VillagePiece *VillagePieces::generatePieceFromSmallDoor(StartPiec
return NULL;
}
StructurePiece *VillagePieces::generateAndAddPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
StructurePiece *VillagePieces::generateAndAddPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
{
if (depth > MAX_DEPTH)
{
@ -211,7 +211,7 @@ StructurePiece *VillagePieces::generateAndAddPiece(StartPiece *startPiece, list<
return NULL;
}
StructurePiece *VillagePieces::generateAndAddRoadPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
StructurePiece *VillagePieces::generateAndAddRoadPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth)
{
if (depth > BASE_ROAD_DEPTH + startPiece->villageSize)
{
@ -254,7 +254,7 @@ VillagePieces::VillagePiece::VillagePiece(StartPiece *startPiece, int genDepth)
this->startPiece = startPiece;
}
StructurePiece *VillagePieces::VillagePiece::generateHouseNorthernLeft(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int yOff, int zOff)
StructurePiece *VillagePieces::VillagePiece::generateHouseNorthernLeft(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int yOff, int zOff)
{
switch (orientation)
{
@ -270,7 +270,7 @@ StructurePiece *VillagePieces::VillagePiece::generateHouseNorthernLeft(StartPiec
return NULL;
}
StructurePiece *VillagePieces::VillagePiece::generateHouseNorthernRight(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int yOff, int zOff)
StructurePiece *VillagePieces::VillagePiece::generateHouseNorthernRight(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int yOff, int zOff)
{
switch (orientation)
{
@ -464,7 +464,7 @@ VillagePieces::Well::Well(StartPiece *startPiece, int genDepth, Random *random,
boundingBox = stairsBox;
}
void VillagePieces::Well::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void VillagePieces::Well::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
generateAndAddRoadPiece((StartPiece *) startPiece, pieces, random, boundingBox->x0 - 1, boundingBox->y1 - 4, boundingBox->z0 + 1, Direction::WEST, getGenDepth());
generateAndAddRoadPiece((StartPiece *) startPiece, pieces, random, boundingBox->x1 + 1, boundingBox->y1 - 4, boundingBox->z0 + 1, Direction::EAST, getGenDepth());
@ -472,7 +472,7 @@ void VillagePieces::Well::addChildren(StructurePiece *startPiece, list<Structure
generateAndAddRoadPiece((StartPiece *) startPiece, pieces, random, boundingBox->x0 + 1, boundingBox->y1 - 4, boundingBox->z1 + 1, Direction::SOUTH, getGenDepth());
}
//VillagePieces::Well *VillagePieces::Well::createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
//VillagePieces::Well *VillagePieces::Well::createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
//{
// BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, -1, 4 - height, 0, width, height, depth, direction);
//
@ -531,7 +531,7 @@ bool VillagePieces::Well::postProcess(Level *level, Random *random, BoundingBox
}
VillagePieces::StartPiece::StartPiece(BiomeSource *biomeSource, int genDepth, Random *random, int west, int north, list<PieceWeight *> *pieceSet, int villageSize, Level *level) : Well(NULL, 0, random, west, north)
VillagePieces::StartPiece::StartPiece(BiomeSource *biomeSource, int genDepth, Random *random, int west, int north, std::list<PieceWeight *> *pieceSet, int villageSize, Level *level) : Well(NULL, 0, random, west, north)
{
isLibraryAdded = false; // 4J - added initialiser
previousPiece = NULL; // 4J - added initialiser
@ -566,7 +566,7 @@ VillagePieces::StraightRoad::StraightRoad(StartPiece *startPiece, int genDepth,
length = Math::_max(stairsBox->getXSpan(), stairsBox->getZSpan());
}
void VillagePieces::StraightRoad::addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random)
void VillagePieces::StraightRoad::addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random)
{
bool hasHouses = false;
@ -634,7 +634,7 @@ void VillagePieces::StraightRoad::addChildren(StructurePiece *startPiece, list<S
}
}
BoundingBox *VillagePieces::StraightRoad::findPieceBox(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction)
BoundingBox *VillagePieces::StraightRoad::findPieceBox(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction)
{
int length = 7 * (Mth::nextInt(random, 3, 5));
@ -682,7 +682,7 @@ VillagePieces::SimpleHouse::SimpleHouse(StartPiece *startPiece, int genDepth, Ra
boundingBox = stairsBox;
}
VillagePieces::SimpleHouse *VillagePieces::SimpleHouse::createPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
VillagePieces::SimpleHouse *VillagePieces::SimpleHouse::createPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, 0, 0, 0, width, height, depth, direction);
@ -804,7 +804,7 @@ VillagePieces::SmallTemple::SmallTemple(StartPiece *startPiece, int genDepth, Ra
boundingBox = stairsBox;
}
VillagePieces::SmallTemple *VillagePieces::SmallTemple::createPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
VillagePieces::SmallTemple *VillagePieces::SmallTemple::createPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, 0, 0, 0, width, height, depth, direction);
@ -942,7 +942,7 @@ VillagePieces::BookHouse::BookHouse(StartPiece *startPiece, int genDepth, Random
boundingBox = stairsBox;
}
VillagePieces::BookHouse *VillagePieces::BookHouse::createPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
VillagePieces::BookHouse *VillagePieces::BookHouse::createPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, 0, 0, 0, width, height, depth, direction);
@ -1079,7 +1079,7 @@ VillagePieces::SmallHut::SmallHut(StartPiece *startPiece, int genDepth, Random *
boundingBox = stairsBox;
}
VillagePieces::SmallHut *VillagePieces::SmallHut::createPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
VillagePieces::SmallHut *VillagePieces::SmallHut::createPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, 0, 0, 0, width, height, depth, direction);
@ -1180,7 +1180,7 @@ VillagePieces::PigHouse::PigHouse(StartPiece *startPiece, int genDepth, Random *
boundingBox = stairsBox;
}
VillagePieces::PigHouse *VillagePieces::PigHouse::createPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
VillagePieces::PigHouse *VillagePieces::PigHouse::createPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, 0, 0, 0, width, height, depth, direction);
@ -1321,7 +1321,7 @@ VillagePieces::TwoRoomHouse::TwoRoomHouse(StartPiece *startPiece, int genDepth,
boundingBox = stairsBox;
}
VillagePieces::TwoRoomHouse *VillagePieces::TwoRoomHouse::createPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
VillagePieces::TwoRoomHouse *VillagePieces::TwoRoomHouse::createPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, 0, 0, 0, width, height, depth, direction);
@ -1501,7 +1501,7 @@ VillagePieces::Smithy::Smithy(StartPiece *startPiece, int genDepth, Random *rand
boundingBox = stairsBox;
}
VillagePieces::Smithy *VillagePieces::Smithy::createPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
VillagePieces::Smithy *VillagePieces::Smithy::createPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, 0, 0, 0, width, height, depth, direction);
@ -1640,7 +1640,7 @@ int VillagePieces::Farmland::selectCrops(Random *random)
}
}
VillagePieces::Farmland *VillagePieces::Farmland::createPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
VillagePieces::Farmland *VillagePieces::Farmland::createPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, 0, 0, 0, width, height, depth, direction);
@ -1725,7 +1725,7 @@ int VillagePieces::DoubleFarmland::selectCrops(Random *random)
}
}
VillagePieces::DoubleFarmland *VillagePieces::DoubleFarmland::createPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
VillagePieces::DoubleFarmland *VillagePieces::DoubleFarmland::createPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, 0, 0, 0, width, height, depth, direction);
@ -1801,7 +1801,7 @@ VillagePieces::LightPost::LightPost(StartPiece *startPiece, int genDepth, Random
boundingBox = box;
}
BoundingBox *VillagePieces::LightPost::findPieceBox(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction)
BoundingBox *VillagePieces::LightPost::findPieceBox(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction)
{
BoundingBox *box = BoundingBox::orientBox(footX, footY, footZ, 0, 0, 0, width, height, depth, direction);

View file

@ -43,16 +43,16 @@ public:
bool isValid();
};
static list<PieceWeight *> *createPieceSet(Random *random, int villageSize); // 4J - was ArrayList
static std::list<PieceWeight *> *createPieceSet(Random *random, int villageSize); // 4J - was ArrayList
class StartPiece;
private:
class VillagePiece;
static int updatePieceWeight(list<PieceWeight *> *currentPieces); // 4J = was array list
static VillagePiece *findAndCreatePieceFactory(StartPiece *startPiece, PieceWeight *piece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
static VillagePiece *generatePieceFromSmallDoor(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
static StructurePiece *generateAndAddPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
static StructurePiece *generateAndAddRoadPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
static int updatePieceWeight(std::list<PieceWeight *> *currentPieces); // 4J = was array list
static VillagePiece *findAndCreatePieceFactory(StartPiece *startPiece, PieceWeight *piece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
static VillagePiece *generatePieceFromSmallDoor(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
static StructurePiece *generateAndAddPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
static StructurePiece *generateAndAddRoadPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int depth);
/**
@ -68,8 +68,8 @@ private:
StartPiece *startPiece;
VillagePiece(StartPiece *startPiece, int genDepth);
StructurePiece *generateHouseNorthernLeft(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int yOff, int zOff);
StructurePiece *generateHouseNorthernRight(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int yOff, int zOff);
StructurePiece *generateHouseNorthernLeft(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int yOff, int zOff);
StructurePiece *generateHouseNorthernRight(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int yOff, int zOff);
int getAverageGroundHeight(Level *level, BoundingBox *chunkBB);
static bool isOkBox(BoundingBox *box, StartPiece *startRoom); // 4J added startRoom param
void spawnVillagers(Level *level, BoundingBox *chunkBB, int x, int y, int z, int count);
@ -100,8 +100,8 @@ public:
Well(StartPiece *startPiece, int genDepth, Random *random, int west, int north);
Well(StartPiece *startPiece, int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
//static Well *createPiece(list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
//static Well *createPiece(std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -115,7 +115,7 @@ public:
int villageSize;
bool isLibraryAdded;
PieceWeight *previousPiece;
list<PieceWeight *> *pieceSet; // 4J - was ArrayList
std::list<PieceWeight *> *pieceSet; // 4J - was ArrayList
Level *m_level;
// these queues are used so that the addChildren calls are
@ -123,7 +123,7 @@ public:
std::vector<StructurePiece *> pendingHouses; // 4J - was ArrayList
std::vector<StructurePiece *> pendingRoads; // 4J - was ArrayList
StartPiece(BiomeSource *biomeSource, int genDepth, Random *random, int west, int north, list<PieceWeight *> *pieceSet, int villageSize, Level *level); // 4J Added level param
StartPiece(BiomeSource *biomeSource, int genDepth, Random *random, int west, int north, std::list<PieceWeight *> *pieceSet, int villageSize, Level *level); // 4J Added level param
virtual ~StartPiece();
BiomeSource *getBiomeSource();
@ -150,8 +150,8 @@ public:
int length;
public:
StraightRoad(StartPiece *startPiece, int genDepth, Random *random, BoundingBox *stairsBox, int direction);
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
static BoundingBox *findPieceBox(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction);
virtual void addChildren(StructurePiece *startPiece, std::list<StructurePiece *> *pieces, Random *random);
static BoundingBox *findPieceBox(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -174,7 +174,7 @@ public:
public:
SimpleHouse(StartPiece *startPiece, int genDepth, Random *random, BoundingBox *stairsBox, int direction);
public:
static SimpleHouse *createPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
static SimpleHouse *createPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -191,7 +191,7 @@ public:
public:
SmallTemple(StartPiece *startPiece, int genDepth, Random *random, BoundingBox *stairsBox, int direction);
static SmallTemple *createPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
static SmallTemple *createPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
virtual int getVillagerProfession(int villagerNumber);
};
@ -209,7 +209,7 @@ public:
public:
BookHouse(StartPiece *startPiece, int genDepth, Random *random, BoundingBox *stairsBox, int direction);
static BookHouse *createPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
static BookHouse *createPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
virtual int getVillagerProfession(int villagerNumber);
};
@ -229,7 +229,7 @@ public:
public:
SmallHut(StartPiece *startPiece, int genDepth, Random *random, BoundingBox *stairsBox, int direction);
static SmallHut *createPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
static SmallHut *createPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -246,7 +246,7 @@ public:
public:
PigHouse(StartPiece *startPiece, int genDepth, Random *random, BoundingBox *stairsBox, int direction);
static PigHouse *createPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
static PigHouse *createPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
virtual int getVillagerProfession(int villagerNumber);
};
@ -263,7 +263,7 @@ public:
public:
TwoRoomHouse(StartPiece *startPiece, int genDepth, Random *random, BoundingBox *stairsBox, int direction);
static TwoRoomHouse *createPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
static TwoRoomHouse *createPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -285,7 +285,7 @@ public:
static void staticCtor();
Smithy(StartPiece *startPiece, int genDepth, Random *random, BoundingBox *stairsBox, int direction);
static Smithy *createPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
static Smithy *createPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
virtual int getVillagerProfession(int villagerNumber);
};
@ -308,7 +308,7 @@ public:
public:
Farmland(StartPiece *startPiece, int genDepth, Random *random, BoundingBox *stairsBox, int direction);
static Farmland *createPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
static Farmland *createPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -331,7 +331,7 @@ public:
public:
DoubleFarmland(StartPiece *startPiece, int genDepth, Random *random, BoundingBox *stairsBox, int direction);
static DoubleFarmland *createPiece(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
static DoubleFarmland *createPiece(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction, int genDepth);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
@ -347,7 +347,7 @@ public:
public:
LightPost(StartPiece *startPiece, int genDepth, Random *random, BoundingBox *box, int direction);
static BoundingBox *findPieceBox(StartPiece *startPiece, list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction);
static BoundingBox *findPieceBox(StartPiece *startPiece, std::list<StructurePiece *> *pieces, Random *random, int footX, int footY, int footZ, int direction);
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
};
};