diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-08-20 16:14:12 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-08-20 16:14:12 +0000 |
commit | 2fe42d32c6d368a66586c605cc1b38ee8d85ed1d (patch) | |
tree | 705a76dffde116ddbffb5cba9aa45e4b0700f280 /src/net/itemhandler.cpp | |
parent | 292f3e50a59b06bf129893b352466d7d54fa3d71 (diff) | |
download | mana-2fe42d32c6d368a66586c605cc1b38ee8d85ed1d.tar.gz mana-2fe42d32c6d368a66586c605cc1b38ee8d85ed1d.tar.bz2 mana-2fe42d32c6d368a66586c605cc1b38ee8d85ed1d.tar.xz mana-2fe42d32c6d368a66586c605cc1b38ee8d85ed1d.zip |
Changed MessageHandler::handleMessage to take a reference instead of a pointer.
Removed unused Packet class. Added stub for handling GPMSG_BEING_ENTER.
Diffstat (limited to 'src/net/itemhandler.cpp')
-rw-r--r-- | src/net/itemhandler.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/net/itemhandler.cpp b/src/net/itemhandler.cpp index 23a9fa60..2961f71b 100644 --- a/src/net/itemhandler.cpp +++ b/src/net/itemhandler.cpp @@ -40,28 +40,28 @@ ItemHandler::ItemHandler() handledMessages = _messages; } -void ItemHandler::handleMessage(MessageIn *msg) +void ItemHandler::handleMessage(MessageIn &msg) { Uint32 id; Uint16 x, y; Sint16 itemId; - switch (msg->getId()) + switch (msg.getId()) { case SMSG_ITEM_VISIBLE: case SMSG_ITEM_DROPPED: - id = msg->readLong(); - itemId = msg->readShort(); - msg->readByte(); // identify flag - x = msg->readShort(); - y = msg->readShort(); + id = msg.readLong(); + itemId = msg.readShort(); + msg.readByte(); // identify flag + x = msg.readShort(); + y = msg.readShort(); floorItemManager->create(id, itemId, x, y, engine->getCurrentMap()); break; case SMSG_ITEM_REMOVE: FloorItem *item; - item = floorItemManager->findById(msg->readLong()); + item = floorItemManager->findById(msg.readLong()); if (item) floorItemManager->destroy(item); break; |