summaryrefslogtreecommitdiffstats
path: root/src/UI/WindowOwner.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-09-13 00:18:02 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-09-13 00:18:02 +0200
commit3e741134279e02d204a8d4638f2d46dfbf814d0c (patch)
treea6781315a66a2fb6f8c16ab21f9f36ea7741fb6d /src/UI/WindowOwner.h
parentFixed friction being applied whilst airborne (diff)
downloadcuberite-3e741134279e02d204a8d4638f2d46dfbf814d0c.tar
cuberite-3e741134279e02d204a8d4638f2d46dfbf814d0c.tar.gz
cuberite-3e741134279e02d204a8d4638f2d46dfbf814d0c.tar.bz2
cuberite-3e741134279e02d204a8d4638f2d46dfbf814d0c.tar.lz
cuberite-3e741134279e02d204a8d4638f2d46dfbf814d0c.tar.xz
cuberite-3e741134279e02d204a8d4638f2d46dfbf814d0c.tar.zst
cuberite-3e741134279e02d204a8d4638f2d46dfbf814d0c.zip
Diffstat (limited to '')
-rw-r--r--src/UI/WindowOwner.h69
1 files changed, 1 insertions, 68 deletions
diff --git a/src/UI/WindowOwner.h b/src/UI/WindowOwner.h
index 7a7941e37..a8be3e6cb 100644
--- a/src/UI/WindowOwner.h
+++ b/src/UI/WindowOwner.h
@@ -52,77 +52,10 @@ public:
{
return m_Window;
}
-
- /// Returns the block position at which the element owning the window is
- virtual void GetBlockPos(int & a_BlockX, int & a_BlockY, int & a_BlockZ) = 0;
private:
cWindow * m_Window;
-} ;
-
-
-
-
-
-/**
-Window owner that is associated with a block entity (chest, furnace, ...)
-*/
-class cBlockEntityWindowOwner :
- public cWindowOwner
-{
-public:
- cBlockEntityWindowOwner(void) :
- m_BlockEntity(NULL)
- {
- }
-
- void SetBlockEntity(cBlockEntity * a_BlockEntity)
- {
- m_BlockEntity = a_BlockEntity;
- }
-
- virtual void GetBlockPos(int & a_BlockX, int & a_BlockY, int & a_BlockZ) override
- {
- a_BlockX = m_BlockEntity->GetPosX();
- a_BlockY = m_BlockEntity->GetPosY();
- a_BlockZ = m_BlockEntity->GetPosZ();
- }
-
-private:
- cBlockEntity * m_BlockEntity;
-} ;
-
-
-
-
-
-/**
-Window owner that is associated with an entity (chest minecart)
-*/
-class cEntityWindowOwner :
- public cWindowOwner
-{
-public:
- cEntityWindowOwner(void) :
- m_Entity(NULL)
- {
- }
-
- void SetEntity(cEntity * a_Entity)
- {
- m_Entity = a_Entity;
- }
-
- virtual void GetBlockPos(int & a_BlockX, int & a_BlockY, int & a_BlockZ) override
- {
- a_BlockX = (int)floor(m_Entity->GetPosX() + 0.5);
- a_BlockY = (int)floor(m_Entity->GetPosY() + 0.5);
- a_BlockZ = (int)floor(m_Entity->GetPosZ() + 0.5);
- }
-
-private:
- cEntity * m_Entity;
-} ;
+};