From d3175115354bb2417f01877a96d0068e2f2c875d Mon Sep 17 00:00:00 2001 From: Björn Steinbrink Date: Sun, 16 Oct 2005 21:18:11 +0000 Subject: Rename {read,write}{Byte,Short,Long} to {read,write}Int{8,16,32}. --- src/gui/connection.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/gui/connection.cpp') diff --git a/src/gui/connection.cpp b/src/gui/connection.cpp index 0e885598..bfa69f23 100644 --- a/src/gui/connection.cpp +++ b/src/gui/connection.cpp @@ -104,12 +104,12 @@ void ConnectionDialog::mapLogin() { // Send login infos MessageOut outMsg; - outMsg.writeShort(0x0072); - outMsg.writeLong(account_ID); - outMsg.writeLong(char_ID); - outMsg.writeLong(session_ID1); - outMsg.writeLong(session_ID2); - outMsg.writeByte(sex); + outMsg.writeInt16(0x0072); + outMsg.writeInt32(account_ID); + outMsg.writeInt32(char_ID); + outMsg.writeInt32(session_ID1); + outMsg.writeInt32(session_ID2); + outMsg.writeInt8(sex); // Skip a mysterious 4 bytes while ((in_size < 4)|| (out_size > 0)) flush(); @@ -120,7 +120,7 @@ void ConnectionDialog::mapLogin() if (msg.getId() == SMSG_LOGIN_SUCCESS) { unsigned char direction; - msg.readLong(); // server tick + msg.readInt32(); // server tick msg.readCoordinates(startX, startY, direction); msg.skip(2); // unknown logger->log("Protocol: Player start position: (%d, %d), Direction: %d", @@ -140,7 +140,7 @@ void ConnectionDialog::mapLogin() // Send "map loaded" // TODO: be able to reuse the same msg MessageOut newMsg; - newMsg.writeShort(0x007d); + newMsg.writeInt16(0x007d); } void connectionInputHandler(SDL_KeyboardEvent *keyEvent) -- cgit v1.2.3-70-g09d2