* try to resolve merge conflict
* feat: TU19 (Dec 2014) Features & Content (#32)
* December 2014 files
* Working release build
* Fix compilation issues
* Add sound to Windows64Media
* Add DLC content and force Tutorial DLC
* Revert "Add DLC content and force Tutorial DLC"
This reverts commit 97a4399472.
* Disable broken light packing
* Disable breakpoint during DLC texture map load
Allows DLC loading but the DLC textures are still broken
* Fix post build not working
* ...
* fix vs2022 build
* fix cmake build
---------
Co-authored-by: Loki <lokirautio@gmail.com>
146 lines
4.1 KiB
C++
146 lines
4.1 KiB
C++
#pragma once
|
|
|
|
#include "StructurePiece.h"
|
|
|
|
class MineShaftPieces
|
|
{
|
|
private:
|
|
static const int DEFAULT_SHAFT_WIDTH = 3;
|
|
static const int DEFAULT_SHAFT_HEIGHT = 3;
|
|
static const int DEFAULT_SHAFT_LENGTH = 5;
|
|
|
|
static const int MAX_DEPTH = 8; // 1.2.3 change
|
|
|
|
public:
|
|
static void loadStatic();
|
|
|
|
private:
|
|
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);
|
|
|
|
/**
|
|
*
|
|
*
|
|
*/
|
|
public:
|
|
class MineShaftRoom : public StructurePiece
|
|
{
|
|
public:
|
|
static StructurePiece *Create() { return new MineShaftRoom(); }
|
|
virtual EStructurePiece GetType() { return eStructurePiece_MineShaftRoom; }
|
|
|
|
private:
|
|
list<BoundingBox *> childEntranceBoxes;
|
|
|
|
public:
|
|
MineShaftRoom();
|
|
MineShaftRoom(int genDepth, Random *random, int west, int north);
|
|
~MineShaftRoom();
|
|
|
|
virtual void addChildren(StructurePiece *startPiece, list<StructurePiece *> *pieces, Random *random);
|
|
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
|
|
|
|
protected:
|
|
void addAdditonalSaveData(CompoundTag *tag);
|
|
void readAdditonalSaveData(CompoundTag *tag);
|
|
};
|
|
|
|
/**
|
|
*
|
|
*
|
|
*/
|
|
class MineShaftCorridor : public StructurePiece
|
|
{
|
|
public:
|
|
static StructurePiece *Create() { return new MineShaftCorridor(); }
|
|
virtual EStructurePiece GetType() { return eStructurePiece_MineShaftCorridor; }
|
|
|
|
private:
|
|
bool hasRails; // was final
|
|
bool spiderCorridor; // was final
|
|
bool hasPlacedSpider;
|
|
int numSections;
|
|
|
|
public:
|
|
MineShaftCorridor();
|
|
|
|
protected:
|
|
void addAdditonalSaveData(CompoundTag *tag);
|
|
void readAdditonalSaveData(CompoundTag *tag);
|
|
|
|
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);
|
|
|
|
protected:
|
|
virtual bool createChest(Level *level, BoundingBox *chunkBB, Random *random, int x, int y, int z, WeighedTreasureArray treasure, int numRolls);
|
|
|
|
public:
|
|
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
|
|
};
|
|
|
|
/**
|
|
*
|
|
*
|
|
*/
|
|
class MineShaftCrossing : public StructurePiece
|
|
{
|
|
public:
|
|
static StructurePiece *Create() { return new MineShaftCrossing(); }
|
|
virtual EStructurePiece GetType() { return eStructurePiece_MineShaftCrossing; }
|
|
|
|
private:
|
|
int direction;
|
|
bool isTwoFloored;
|
|
|
|
public:
|
|
MineShaftCrossing();
|
|
|
|
protected:
|
|
void addAdditonalSaveData(CompoundTag *tag);
|
|
void readAdditonalSaveData(CompoundTag *tag);
|
|
|
|
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);
|
|
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
|
|
};
|
|
|
|
/**
|
|
*
|
|
*
|
|
*/
|
|
class MineShaftStairs : public StructurePiece
|
|
{
|
|
public:
|
|
static StructurePiece *Create() { return new MineShaftStairs(); }
|
|
virtual EStructurePiece GetType() { return eStructurePiece_MineShaftStairs; }
|
|
|
|
public:
|
|
MineShaftStairs();
|
|
MineShaftStairs(int genDepth, Random *random, BoundingBox *stairsBox, int direction);
|
|
|
|
protected:
|
|
void addAdditonalSaveData(CompoundTag *tag);
|
|
void readAdditonalSaveData(CompoundTag *tag);
|
|
|
|
public:
|
|
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);
|
|
virtual bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
|
|
|
|
};
|
|
|
|
/* @formatter:off */
|
|
private:
|
|
static WeighedTreasureArray smallTreasureItems;
|
|
/* @formatter:on */
|
|
|
|
public:
|
|
static void staticCtor();
|
|
|
|
}; |