Otclient  14/8/2020
Tile Class Reference

#include <tile.h>

Inheritance diagram for Tile:
Collaboration diagram for Tile:

Public Types

enum  { MAX_THINGS = 10 }
 

Public Member Functions

 Tile (const Position &position)
 
void draw (const Point &dest, float scaleFactor, int drawFlags, LightView *lightView=nullptr)
 
void clean ()
 
void addWalkingCreature (const CreaturePtr &creature)
 
void removeWalkingCreature (const CreaturePtr &creature)
 
void addThing (const ThingPtr &thing, int stackPos)
 
bool removeThing (ThingPtr thing)
 
ThingPtr getThing (int stackPos)
 
EffectPtr getEffect (uint16 id)
 
bool hasThing (const ThingPtr &thing)
 
int getThingStackPos (const ThingPtr &thing)
 
ThingPtr getTopThing ()
 
ThingPtr getTopLookThing ()
 
ThingPtr getTopUseThing ()
 
CreaturePtr getTopCreature ()
 
ThingPtr getTopMoveThing ()
 
ThingPtr getTopMultiUseThing ()
 
const PositiongetPosition ()
 
int getDrawElevation ()
 
std::vector< ItemPtrgetItems ()
 
std::vector< CreaturePtrgetCreatures ()
 
std::vector< CreaturePtrgetWalkingCreatures ()
 
std::vector< ThingPtrgetThings ()
 
ItemPtr getGround ()
 
int getGroundSpeed ()
 
uint8 getMinimapColorByte ()
 
int getThingCount ()
 
bool isPathable ()
 
bool isWalkable (bool ignoreCreatures=false)
 
bool isFullGround ()
 
bool isFullyOpaque ()
 
bool isSingleDimension ()
 
bool isLookPossible ()
 
bool isClickable ()
 
bool isEmpty ()
 
bool isDrawable ()
 
bool hasTranslucentLight ()
 
bool mustHookSouth ()
 
bool mustHookEast ()
 
bool hasCreature ()
 
bool limitsFloorsView (bool isFreeView=false)
 
bool canErase ()
 
int getElevation () const
 
bool hasElevation (int elevation=1)
 
void overwriteMinimapColor (uint8 color)
 
void remFlag (uint32 flag)
 
void setFlag (uint32 flag)
 
void setFlags (uint32 flags)
 
bool hasFlag (uint32 flag)
 
uint32 getFlags ()
 
void setHouseId (uint32 hid)
 
uint32 getHouseId ()
 
bool isHouseTile ()
 
void select ()
 
void unselect ()
 
bool isSelected ()
 
TilePtr asTile ()
 
- Public Member Functions inherited from LuaObject
 LuaObject ()
 
virtual ~LuaObject ()
 
template<typename T >
void connectLuaField (const std::string &field, const std::function< T > &f, bool pushFront=false)
 
template<typename... T>
int luaCallLuaField (const std::string &field, const T &... args)
 
template<typename R , typename... T>
callLuaField (const std::string &field, const T &... args)
 
template<typename... T>
void callLuaField (const std::string &field, const T &... args)
 
bool hasLuaField (const std::string &field)
 Returns true if the lua field exists. More...
 
template<typename T >
void setLuaField (const std::string &key, const T &value)
 Sets a field in this lua object. More...
 
template<typename T >
getLuaField (const std::string &key)
 Gets a field from this lua object. More...
 
void releaseLuaFieldsTable ()
 Release fields table reference. More...
 
void luaSetField (const std::string &key)
 Sets a field from this lua object, the value must be on the stack. More...
 
void luaGetField (const std::string &key)
 Gets a field from this lua object, the result is pushed onto the stack. More...
 
void luaGetMetatable ()
 Get object's metatable. More...
 
void luaGetFieldsTable ()
 Gets the table containing all stored fields of this lua object, the result is pushed onto the stack. More...
 
int getUseCount ()
 
std::string getClassName ()
 Returns the derived class name, its the same name used in Lua. More...
 
LuaObjectPtr asLuaObject ()
 
void operator= (const LuaObject &)
 
- Public Member Functions inherited from stdext::shared_object
 shared_object ()
 
virtual ~shared_object ()
 
void add_ref ()
 
void dec_ref ()
 
refcount_t ref_count ()
 
template<typename T >
stdext::shared_object_ptr< T > static_self_cast ()
 
template<typename T >
stdext::shared_object_ptr< T > dynamic_self_cast ()
 
template<typename T >
stdext::shared_object_ptr< T > const_self_cast ()
 

Detailed Description

Definition at line 56 of file tile.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX_THINGS 

Definition at line 59 of file tile.h.

Constructor & Destructor Documentation

◆ Tile()

Tile::Tile ( const Position position)

Definition at line 34 of file tile.cpp.

Member Function Documentation

◆ addThing()

void Tile::addThing ( const ThingPtr thing,
int  stackPos 
)

Definition at line 166 of file tile.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addWalkingCreature()

void Tile::addWalkingCreature ( const CreaturePtr creature)

Definition at line 154 of file tile.cpp.

Here is the caller graph for this function:

◆ asTile()

TilePtr Tile::asTile ( )
inline

Definition at line 130 of file tile.h.

◆ canErase()

bool Tile::canErase ( )

Definition at line 599 of file tile.cpp.

◆ clean()

void Tile::clean ( )

Definition at line 148 of file tile.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw()

void Tile::draw ( const Point dest,
float  scaleFactor,
int  drawFlags,
LightView lightView = nullptr 
)

Definition at line 42 of file tile.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCreatures()

std::vector< CreaturePtr > Tile::getCreatures ( )

Definition at line 314 of file tile.cpp.

Here is the caller graph for this function:

◆ getDrawElevation()

int Tile::getDrawElevation ( )
inline

Definition at line 88 of file tile.h.

Here is the caller graph for this function:

◆ getEffect()

EffectPtr Tile::getEffect ( uint16  id)

Definition at line 271 of file tile.cpp.

◆ getElevation()

int Tile::getElevation ( ) const

Definition at line 604 of file tile.cpp.

Here is the caller graph for this function:

◆ getFlags()

uint32 Tile::getFlags ( )
inline

Definition at line 120 of file tile.h.

Here is the caller graph for this function:

◆ getGround()

ItemPtr Tile::getGround ( )

Definition at line 324 of file tile.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGroundSpeed()

int Tile::getGroundSpeed ( )

Definition at line 334 of file tile.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHouseId()

uint32 Tile::getHouseId ( )
inline

Definition at line 123 of file tile.h.

◆ getItems()

std::vector< ItemPtr > Tile::getItems ( )

Definition at line 302 of file tile.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMinimapColorByte()

uint8 Tile::getMinimapColorByte ( )

Definition at line 342 of file tile.cpp.

Here is the caller graph for this function:

◆ getPosition()

const Position& Tile::getPosition ( )
inline

Definition at line 87 of file tile.h.

Here is the caller graph for this function:

◆ getThing()

ThingPtr Tile::getThing ( int  stackPos)

Definition at line 264 of file tile.cpp.

Here is the caller graph for this function:

◆ getThingCount()

int Tile::getThingCount ( )
inline

Definition at line 96 of file tile.h.

Here is the caller graph for this function:

◆ getThings()

std::vector<ThingPtr> Tile::getThings ( )
inline

Definition at line 92 of file tile.h.

Here is the caller graph for this function:

◆ getThingStackPos()

int Tile::getThingStackPos ( const ThingPtr thing)

Definition at line 284 of file tile.cpp.

Here is the caller graph for this function:

◆ getTopCreature()

CreaturePtr Tile::getTopCreature ( )

Definition at line 389 of file tile.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTopLookThing()

ThingPtr Tile::getTopLookThing ( )

Definition at line 358 of file tile.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTopMoveThing()

ThingPtr Tile::getTopMoveThing ( )

Definition at line 423 of file tile.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTopMultiUseThing()

ThingPtr Tile::getTopMultiUseThing ( )

Definition at line 445 of file tile.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTopThing()

ThingPtr Tile::getTopThing ( )

Definition at line 292 of file tile.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTopUseThing()

ThingPtr Tile::getTopUseThing ( )

Definition at line 371 of file tile.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWalkingCreatures()

std::vector<CreaturePtr> Tile::getWalkingCreatures ( )
inline

Definition at line 91 of file tile.h.

◆ hasCreature()

bool Tile::hasCreature ( )

Definition at line 577 of file tile.cpp.

Here is the caller graph for this function:

◆ hasElevation()

bool Tile::hasElevation ( int  elevation = 1)

Definition at line 613 of file tile.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasFlag()

bool Tile::hasFlag ( uint32  flag)
inline

Definition at line 119 of file tile.h.

Here is the caller graph for this function:

◆ hasThing()

bool Tile::hasThing ( const ThingPtr thing)

Definition at line 279 of file tile.cpp.

◆ hasTranslucentLight()

bool Tile::hasTranslucentLight ( )
inline

Definition at line 106 of file tile.h.

Here is the caller graph for this function:

◆ isClickable()

bool Tile::isClickable ( )

Definition at line 535 of file tile.cpp.

Here is the caller graph for this function:

◆ isDrawable()

bool Tile::isDrawable ( )

Definition at line 556 of file tile.cpp.

◆ isEmpty()

bool Tile::isEmpty ( )

Definition at line 551 of file tile.cpp.

Here is the caller graph for this function:

◆ isFullGround()

bool Tile::isFullGround ( )

Definition at line 503 of file tile.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isFullyOpaque()

bool Tile::isFullyOpaque ( )

Definition at line 511 of file tile.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isHouseTile()

bool Tile::isHouseTile ( )
inline

Definition at line 124 of file tile.h.

Here is the caller graph for this function:

◆ isLookPossible()

bool Tile::isLookPossible ( )

Definition at line 527 of file tile.cpp.

Here is the caller graph for this function:

◆ isPathable()

bool Tile::isPathable ( )

Definition at line 495 of file tile.cpp.

Here is the caller graph for this function:

◆ isSelected()

bool Tile::isSelected ( )
inline

Definition at line 128 of file tile.h.

Here is the caller graph for this function:

◆ isSingleDimension()

bool Tile::isSingleDimension ( )

Definition at line 517 of file tile.cpp.

Here is the caller graph for this function:

◆ isWalkable()

bool Tile::isWalkable ( bool  ignoreCreatures = false)

Definition at line 475 of file tile.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ limitsFloorsView()

bool Tile::limitsFloorsView ( bool  isFreeView = false)

Definition at line 585 of file tile.cpp.

Here is the call graph for this function:

◆ mustHookEast()

bool Tile::mustHookEast ( )

Definition at line 561 of file tile.cpp.

Here is the caller graph for this function:

◆ mustHookSouth()

bool Tile::mustHookSouth ( )

Definition at line 569 of file tile.cpp.

Here is the caller graph for this function:

◆ overwriteMinimapColor()

void Tile::overwriteMinimapColor ( uint8  color)
inline

Definition at line 114 of file tile.h.

Here is the caller graph for this function:

◆ remFlag()

void Tile::remFlag ( uint32  flag)
inline

Definition at line 116 of file tile.h.

Here is the caller graph for this function:

◆ removeThing()

bool Tile::removeThing ( ThingPtr  thing)

Definition at line 234 of file tile.cpp.

Here is the caller graph for this function:

◆ removeWalkingCreature()

void Tile::removeWalkingCreature ( const CreaturePtr creature)

Definition at line 159 of file tile.cpp.

Here is the caller graph for this function:

◆ select()

void Tile::select ( )
inline

Definition at line 126 of file tile.h.

Here is the caller graph for this function:

◆ setFlag()

void Tile::setFlag ( uint32  flag)
inline

Definition at line 117 of file tile.h.

Here is the caller graph for this function:

◆ setFlags()

void Tile::setFlags ( uint32  flags)
inline

Definition at line 118 of file tile.h.

Here is the caller graph for this function:

◆ setHouseId()

void Tile::setHouseId ( uint32  hid)
inline

Definition at line 122 of file tile.h.

Here is the caller graph for this function:

◆ unselect()

void Tile::unselect ( )
inline

Definition at line 127 of file tile.h.

Here is the caller graph for this function:

The documentation for this class was generated from the following files: