Otclient 1.0  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 reDrawFlags, LightView *lightView=nullptr)
 
void drawGround (const Point &dest, float scaleFactor, int reDrawFlags, LightView *lightView=nullptr)
 
void drawBottom (const Point &dest, float scaleFactor, int reDrawFlags, LightView *lightView=nullptr)
 
void drawTop (const Point &dest, float scaleFactor, int reDrawFlags, LightView *lightView)
 
void clean ()
 
void addWalkingCreature (const CreaturePtr &creature)
 
void removeWalkingCreature (const CreaturePtr &creature)
 
void addThing (const ThingPtr &thing, int stackPos)
 
bool removeThing (const 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< CreaturePtrgetWalkingCreatures ()
 
std::vector< ThingPtrgetThings ()
 
std::vector< CreaturePtrgetCreatures ()
 
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 ()
 
bool hasDisplacement ()
 
bool hasLight ()
 
void analyzeThing (const ThingPtr &thing, bool add)
 
bool hasGroundToDraw () const
 
bool hasBottomToDraw () const
 
bool hasTopToDraw () const
 
void cancelListenerPainter ()
 
- 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 37 of file tile.cpp.

Member Function Documentation

◆ addThing()

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

Definition at line 153 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 139 of file tile.cpp.

Here is the caller graph for this function:

◆ analyzeThing()

void Tile::analyzeThing ( const ThingPtr thing,
bool  add 
)

Definition at line 666 of file tile.cpp.

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

◆ asTile()

TilePtr Tile::asTile ( )
inline

Definition at line 132 of file tile.h.

◆ cancelListenerPainter()

void Tile::cancelListenerPainter ( )

Definition at line 656 of file tile.cpp.

Here is the caller graph for this function:

◆ canErase()

bool Tile::canErase ( )

Definition at line 579 of file tile.cpp.

Here is the call graph for this function:

◆ clean()

void Tile::clean ( )

Definition at line 127 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  reDrawFlags,
LightView lightView = nullptr 
)

Definition at line 120 of file tile.cpp.

Here is the call graph for this function:

◆ drawBottom()

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

Definition at line 59 of file tile.cpp.

Here is the caller graph for this function:

◆ drawGround()

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

Definition at line 47 of file tile.cpp.

Here is the caller graph for this function:

◆ drawTop()

void Tile::drawTop ( const Point dest,
float  scaleFactor,
int  reDrawFlags,
LightView lightView 
)

Definition at line 109 of file tile.cpp.

Here is the caller graph for this function:

◆ getCreatures()

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

Definition at line 94 of file tile.h.

Here is the caller graph for this function:

◆ getDrawElevation()

int Tile::getDrawElevation ( )
inline

Definition at line 90 of file tile.h.

Here is the caller graph for this function:

◆ getEffect()

EffectPtr Tile::getEffect ( uint16  id)

Definition at line 367 of file tile.cpp.

◆ getElevation()

int Tile::getElevation ( ) const

Definition at line 619 of file tile.cpp.

Here is the caller graph for this function:

◆ getFlags()

uint32 Tile::getFlags ( )
inline

Definition at line 122 of file tile.h.

Here is the caller graph for this function:

◆ getGround()

ItemPtr Tile::getGround ( )

Definition at line 360 of file tile.cpp.

Here is the caller graph for this function:

◆ getGroundSpeed()

int Tile::getGroundSpeed ( )

Definition at line 376 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 125 of file tile.h.

◆ getItems()

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

Definition at line 348 of file tile.cpp.

Here is the caller graph for this function:

◆ getMinimapColorByte()

uint8 Tile::getMinimapColorByte ( )

Definition at line 384 of file tile.cpp.

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

◆ getPosition()

const Position& Tile::getPosition ( )
inline

Definition at line 89 of file tile.h.

Here is the caller graph for this function:

◆ getThing()

ThingPtr Tile::getThing ( int  stackPos)

Definition at line 316 of file tile.cpp.

Here is the caller graph for this function:

◆ getThingCount()

int Tile::getThingCount ( )
inline

Definition at line 98 of file tile.h.

Here is the caller graph for this function:

◆ getThings()

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

Definition at line 93 of file tile.h.

Here is the caller graph for this function:

◆ getThingStackPos()

int Tile::getThingStackPos ( const ThingPtr thing)

Definition at line 324 of file tile.cpp.

Here is the caller graph for this function:

◆ getTopCreature()

CreaturePtr Tile::getTopCreature ( )

Definition at line 461 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 408 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 492 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 506 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 338 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 436 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 92 of file tile.h.

◆ hasBottomToDraw()

bool Tile::hasBottomToDraw ( ) const
inline

Definition at line 139 of file tile.h.

◆ hasCreature()

bool Tile::hasCreature ( )

Definition at line 607 of file tile.cpp.

Here is the caller graph for this function:

◆ hasDisplacement()

bool Tile::hasDisplacement ( )
inline

Definition at line 134 of file tile.h.

◆ hasElevation()

bool Tile::hasElevation ( int  elevation = 1)

Definition at line 624 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 121 of file tile.h.

Here is the caller graph for this function:

◆ hasGroundToDraw()

bool Tile::hasGroundToDraw ( ) const
inline

Definition at line 138 of file tile.h.

◆ hasLight()

bool Tile::hasLight ( )

Definition at line 629 of file tile.cpp.

◆ hasThing()

bool Tile::hasThing ( const ThingPtr thing)

Definition at line 333 of file tile.cpp.

◆ hasTopToDraw()

bool Tile::hasTopToDraw ( ) const
inline

Definition at line 140 of file tile.h.

◆ hasTranslucentLight()

bool Tile::hasTranslucentLight ( )
inline

Definition at line 108 of file tile.h.

◆ isClickable()

bool Tile::isClickable ( )

Definition at line 569 of file tile.cpp.

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

◆ isDrawable()

bool Tile::isDrawable ( )

Definition at line 584 of file tile.cpp.

Here is the call graph for this function:

◆ isEmpty()

bool Tile::isEmpty ( )

Definition at line 574 of file tile.cpp.

Here is the caller graph for this function:

◆ isFullGround()

bool Tile::isFullGround ( )

Definition at line 549 of file tile.cpp.

Here is the caller graph for this function:

◆ isFullyOpaque()

bool Tile::isFullyOpaque ( )

Definition at line 554 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 126 of file tile.h.

Here is the caller graph for this function:

◆ isLookPossible()

bool Tile::isLookPossible ( )

Definition at line 564 of file tile.cpp.

Here is the caller graph for this function:

◆ isPathable()

bool Tile::isPathable ( )

Definition at line 544 of file tile.cpp.

Here is the caller graph for this function:

◆ isSelected()

bool Tile::isSelected ( )
inline

Definition at line 130 of file tile.h.

Here is the caller graph for this function:

◆ isSingleDimension()

bool Tile::isSingleDimension ( )

Definition at line 559 of file tile.cpp.

Here is the caller graph for this function:

◆ isWalkable()

bool Tile::isWalkable ( bool  ignoreCreatures = false)

Definition at line 528 of file tile.cpp.

Here is the caller graph for this function:

◆ limitsFloorsView()

bool Tile::limitsFloorsView ( bool  isFreeView = false)

Definition at line 612 of file tile.cpp.

Here is the call graph for this function:

◆ mustHookEast()

bool Tile::mustHookEast ( )

Definition at line 589 of file tile.cpp.

Here is the caller graph for this function:

◆ mustHookSouth()

bool Tile::mustHookSouth ( )

Definition at line 598 of file tile.cpp.

Here is the caller graph for this function:

◆ overwriteMinimapColor()

void Tile::overwriteMinimapColor ( uint8  color)
inline

Definition at line 116 of file tile.h.

Here is the caller graph for this function:

◆ remFlag()

void Tile::remFlag ( uint32  flag)
inline

Definition at line 118 of file tile.h.

Here is the caller graph for this function:

◆ removeThing()

bool Tile::removeThing ( const ThingPtr thing)

Definition at line 255 of file tile.cpp.

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

◆ removeWalkingCreature()

void Tile::removeWalkingCreature ( const CreaturePtr creature)

Definition at line 144 of file tile.cpp.

Here is the caller graph for this function:

◆ select()

void Tile::select ( )
inline

Definition at line 128 of file tile.h.

Here is the caller graph for this function:

◆ setFlag()

void Tile::setFlag ( uint32  flag)
inline

Definition at line 119 of file tile.h.

Here is the caller graph for this function:

◆ setFlags()

void Tile::setFlags ( uint32  flags)
inline

Definition at line 120 of file tile.h.

Here is the caller graph for this function:

◆ setHouseId()

void Tile::setHouseId ( uint32  hid)
inline

Definition at line 124 of file tile.h.

Here is the caller graph for this function:

◆ unselect()

void Tile::unselect ( )
inline

Definition at line 129 of file tile.h.

Here is the caller graph for this function:

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