1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

Add particle animation, glow

This is implemented by reusing and extending the
TileAnimation code for the methods used by particles.
This commit is contained in:
sfan5 2017-01-14 16:48:49 +01:00
parent c5967f75f0
commit 7279f0b373
16 changed files with 311 additions and 78 deletions

View file

@ -41,12 +41,15 @@ public:
u16 getPeerId() { return m_peer_id; }
u16 getCommand() { return m_command; }
const u32 getRemainingBytes() const { return m_datasize - m_read_offset; }
const char* getRemainingString() { return getString(m_read_offset); }
// Returns a c-string without copying.
// A better name for this would be getRawString()
char* getString(u32 from_offset);
const char* getString(u32 from_offset);
// major difference to putCString(): doesn't write len into the buffer
void putRawString(const char* src, u32 len);
void putRawString(const std::string &src)
{ putRawString(src.c_str(), src.size()); }
NetworkPacket& operator>>(std::string& dst);
NetworkPacket& operator<<(std::string src);