mirror of
https://github.com/edubart/otclient.git
synced 2025-11-30 23:26:51 +01:00
Removed Position dependencies inside the framework
This commit is contained in:
@@ -165,15 +165,6 @@ std::string BinaryTree::getString(uint16 len)
|
||||
return ret;
|
||||
}
|
||||
|
||||
Position BinaryTree::getPosition()
|
||||
{
|
||||
Position ret;
|
||||
ret.x = getU16();
|
||||
ret.y = getU16();
|
||||
ret.z = getU8();
|
||||
return ret;
|
||||
}
|
||||
|
||||
Point BinaryTree::getPoint()
|
||||
{
|
||||
Point ret;
|
||||
@@ -216,11 +207,11 @@ void OutputBinaryTree::addString(const std::string& v)
|
||||
write((const uint8*)v.c_str(), v.length());
|
||||
}
|
||||
|
||||
void OutputBinaryTree::addPos(const Position& pos)
|
||||
void OutputBinaryTree::addPos(uint16 x, uint16 y, uint8 z)
|
||||
{
|
||||
addU16(pos.x);
|
||||
addU16(pos.y);
|
||||
addU8(pos.z);
|
||||
addU16(x);
|
||||
addU16(y);
|
||||
addU8(z);
|
||||
}
|
||||
|
||||
void OutputBinaryTree::addPoint(const Point& point)
|
||||
|
||||
@@ -49,7 +49,6 @@ public:
|
||||
uint32 getU32();
|
||||
uint64 getU64();
|
||||
std::string getString(uint16 len = 0);
|
||||
Position getPosition();
|
||||
Point getPoint();
|
||||
|
||||
BinaryTreeVec getChildren();
|
||||
@@ -74,7 +73,7 @@ public:
|
||||
void addU16(uint16 v);
|
||||
void addU32(uint32 v);
|
||||
void addString(const std::string& v);
|
||||
void addPos(const Position& pos);
|
||||
void addPos(uint16 x, uint16 y, uint8 z);
|
||||
void addPoint(const Point& point);
|
||||
|
||||
void startNode(uint8 node);
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
void addU32(uint32 v);
|
||||
void addU64(uint64 v);
|
||||
void addString(const std::string& v);
|
||||
void addPos(const Position& pos) { addU16(pos.x); addU16(pos.y); addU8(pos.z); }
|
||||
void addPos(uint16 x, uint16 y, uint8 z) { addU16(x); addU16(y); addU8(z); }
|
||||
void addPoint(const Point& p) { addU8(p.x); addU8(p.y); }
|
||||
|
||||
FileStreamPtr asFileStream() { return static_self_cast<FileStream>(); }
|
||||
|
||||
@@ -962,15 +962,6 @@ public:
|
||||
return ret;
|
||||
}
|
||||
|
||||
Position readPos(const std::string& base = std::string()) const
|
||||
{
|
||||
Position ret;
|
||||
ret.x = readType<uint16>(base + "x");
|
||||
ret.y = readType<uint16>(base + "y");
|
||||
ret.z = readType<uint8>(base + "z");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/** Template form of the attribute query which will try to read the
|
||||
attribute into the specified type. Very easy, very powerful, but
|
||||
be careful to make sure to call this with the correct type.
|
||||
|
||||
Reference in New Issue
Block a user