* 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>
66 lines
2.5 KiB
C++
66 lines
2.5 KiB
C++
#pragma once
|
|
#include "Tile.h"
|
|
#include "Definitions.h"
|
|
|
|
class Player;
|
|
class HitResult;
|
|
class ChunkRebuildData;
|
|
|
|
class DoorTile : public Tile
|
|
{
|
|
friend class Tile;
|
|
friend class ChunkRebuildData;
|
|
|
|
private:
|
|
static const int TEXTURE_NORMAL = 0;
|
|
static const int TEXTURE_FLIPPED = 1;
|
|
|
|
public:
|
|
static const int UPPER_BIT = 8;
|
|
static const int C_DIR_MASK = 3;
|
|
static const int C_OPEN_MASK = 4;
|
|
static const int C_LOWER_DATA_MASK = 7;
|
|
static const int C_IS_UPPER_MASK = 8;
|
|
static const int C_RIGHT_HINGE_MASK = 16;
|
|
|
|
private:
|
|
static const int DOOR_TILE_TEXTURE_COUNT = 4;
|
|
static const wstring TEXTURES[];
|
|
int texBase;
|
|
Icon *iconTop[2];
|
|
Icon *iconBottom[2];
|
|
|
|
protected:
|
|
DoorTile(int id, Material *material);
|
|
public:
|
|
virtual Icon *getTexture(int face, int data);
|
|
virtual Icon *getTexture(LevelSource *level, int x, int y, int z, int face);
|
|
virtual void registerIcons(IconRegister *iconRegister);
|
|
virtual bool blocksLight();
|
|
virtual bool isSolidRender(bool isServerLevel = false);
|
|
virtual bool isCubeShaped();
|
|
virtual int getRenderShape();
|
|
virtual AABB *getTileAABB(Level *level, int x, int y, int z);
|
|
virtual AABB *getAABB(Level *level, int x, int y, int z);
|
|
virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, shared_ptr<TileEntity> forceEntity = shared_ptr<TileEntity>()); // 4J added forceData, forceEntity param
|
|
int getDir(LevelSource *level, int x, int y, int z);
|
|
bool isOpen(LevelSource *level, int x, int y, int z);
|
|
private:
|
|
using Tile::setShape;
|
|
virtual void setShape(int compositeData);
|
|
public:
|
|
virtual void attack(Level *level, int x, int y, int z, shared_ptr<Player> player);
|
|
virtual bool TestUse();
|
|
virtual bool use(Level *level, int x, int y, int z, shared_ptr<Player> player, int clickedFace, float clickX, float clickY, float clickZ, bool soundOnly = false); // 4J added soundOnly param
|
|
void setOpen(Level *level, int x, int y, int z, bool shouldOpen);
|
|
virtual void neighborChanged(Level *level, int x, int y, int z, int type);
|
|
virtual int getResource(int data, Random *random, int playerBonusLevel);
|
|
virtual HitResult *clip(Level *level, int xt, int yt, int zt, Vec3 *a, Vec3 *b);
|
|
virtual bool mayPlace(Level *level, int x, int y, int z);
|
|
static bool isOpen(int data);
|
|
virtual int getPistonPushReaction();
|
|
int getCompositeData(LevelSource *level, int x, int y, int z);
|
|
virtual int cloneTileId(Level *level, int x, int y, int z);
|
|
virtual void playerWillDestroy(Level *level, int x, int y, int z, int data, shared_ptr<Player> player);
|
|
};
|