Update of /cvsroot/wpdev/wolfpack/network
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21928/network
Modified Files:
asyncnetio.cpp encryption.cpp network.cpp network.h
uorxpackets.cpp uorxpackets.h uosocket.cpp uosocket.h
Log Message:
QT_CLEAN_NAMESPACE
Index: encryption.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/encryption.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** encryption.cpp 10 Aug 2004 03:24:29 -0000 1.3
--- encryption.cpp 19 Aug 2004 01:22:56 -0000 1.4
***************
*** 106,111 ****
void cLoginEncryption::clientDecrypt( char* buffer, unsigned int length )
{
! register UINT32 eax, ecx, edx, esi;
! for ( UINT32 i = 0; i < length; ++i )
{
buffer[i] = buffer[i] ^ ( UINT8 ) ( table1 & 0xFF );
--- 106,111 ----
void cLoginEncryption::clientDecrypt( char* buffer, unsigned int length )
{
! register Q_UINT32 eax, ecx, edx, esi;
! for ( Q_UINT32 i = 0; i < length; ++i )
{
buffer[i] = buffer[i] ^ ( UINT8 ) ( table1 & 0xFF );
Index: uorxpackets.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uorxpackets.h,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -d -r1.65 -r1.66
*** uorxpackets.h 10 Aug 2004 03:24:29 -0000 1.65
--- uorxpackets.h 19 Aug 2004 01:22:56 -0000 1.66
***************
*** 396,400 ****
return getShort( 0x87 );
}
! INT32 timezoneBias( void ) const
{
return getInt( 0x8C );
--- 396,400 ----
return getShort( 0x87 );
}
! int timezoneBias( void ) const
{
return getInt( 0x8C );
***************
*** 876,880 ****
return ( *this )[15];
}
! INT8 z() const
{
return ( *this )[16];
--- 876,880 ----
return ( *this )[15];
}
! signed char z() const
{
return ( *this )[16];
***************
*** 956,960 ****
return getShort( 7 );
}
! INT8 z() const
{
return ( *this )[9];
--- 956,960 ----
return getShort( 7 );
}
! signed char z() const
{
return ( *this )[9];
Index: asyncnetio.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/asyncnetio.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** asyncnetio.cpp 10 Aug 2004 03:24:29 -0000 1.49
--- asyncnetio.cpp 19 Aug 2004 01:22:55 -0000 1.50
***************
*** 131,135 ****
bool login; // false = GameServer Protocol, true = LoginServer Protocol
! UINT32 seed;
cClientEncryption* encryption;
};
--- 131,135 ----
bool login; // false = GameServer Protocol, true = LoginServer Protocol
! Q_UINT32 seed;
cClientEncryption* encryption;
};
Index: uosocket.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.h,v
retrieving revision 1.122
retrieving revision 1.123
diff -C2 -d -r1.122 -r1.123
*** uosocket.h 10 Aug 2004 03:24:29 -0000 1.122
--- uosocket.h 19 Aug 2004 01:22:56 -0000 1.123
***************
*** 56,64 ****
struct stTargetItem
{
! UINT16 id;
INT16 xOffset;
INT16 yOffset;
INT16 zOffset;
! UINT16 hue;
};
--- 56,64 ----
struct stTargetItem
{
! Q_UINT16 id;
INT16 xOffset;
INT16 yOffset;
INT16 zOffset;
! Q_UINT16 hue;
};
***************
*** 142,154 ****
return tooltipscache_;
}
! bool haveTooltip( UINT32 data ) const
{
return tooltipscache_->testBit( data );
}
! void delTooltip( UINT32 data )
{
tooltipscache_->setBit( data, false );
}
! void addTooltip( UINT32 );
cUOSocket( QSocketDevice* sDevice );
--- 142,154 ----
return tooltipscache_;
}
! bool haveTooltip( Q_UINT32 data ) const
{
return tooltipscache_->testBit( data );
}
! void delTooltip( Q_UINT32 data )
{
tooltipscache_->setBit( data, false );
}
! void addTooltip( Q_UINT32 );
cUOSocket( QSocketDevice* sDevice );
***************
*** 249,253 ****
void sendChar( P_CHAR pChar );
void showSpeech( const cUObject* object, const QString& message, Q_UINT16 color = 0x3B2, Q_UINT16 font = 3, UINT8 speechType = 0x00 ) const;
! void sysMessage( const QString& message, Q_UINT16 color = 0x3b2, UINT16 font = 3 ) const;
void sendCharList();
void removeObject( cUObject* object );
--- 249,253 ----
void sendChar( P_CHAR pChar );
void showSpeech( const cUObject* object, const QString& message, Q_UINT16 color = 0x3B2, Q_UINT16 font = 3, UINT8 speechType = 0x00 ) const;
! void sysMessage( const QString& message, Q_UINT16 color = 0x3b2, Q_UINT16 font = 3 ) const;
void sendCharList();
void removeObject( cUObject* object );
***************
*** 265,271 ****
void resendPlayer( bool quick = true );
void poll();
! void soundEffect( UINT16 soundId, cUObject* source = NULL );
void attachTarget( cTargetRequest* request );
! void attachTarget( cTargetRequest* request, UINT16 multiid );
void attachTarget( cTargetRequest* request, std::vector<stTargetItem>& items, INT16 xOffset = 0, INT16 yOffset = 0, INT16 zOffset = 0 );
void cancelTarget();
--- 265,271 ----
void resendPlayer( bool quick = true );
void poll();
! void soundEffect( Q_UINT16 soundId, cUObject* source = NULL );
void attachTarget( cTargetRequest* request );
! void attachTarget( cTargetRequest* request, Q_UINT16 multiid );
void attachTarget( cTargetRequest* request, std::vector<stTargetItem>& items, INT16 xOffset = 0, INT16 yOffset = 0, INT16 zOffset = 0 );
void cancelTarget();
***************
*** 277,289 ****
void sendStatWindow( P_CHAR pChar = NULL );
bool inRange( cUOSocket* ) const;
! void sendSkill( UINT16 skill );
void sendBuyWindow( P_NPC pVendor );
void sendSellWindow( P_NPC pVendor, P_CHAR pSeller );
void sendVendorCont( P_ITEM pItem );
! void clilocMessage( const UINT32 MsgID, const QString& params = 0, const Q_UINT16 color = 0x3b2, const Q_UINT16 font = 3, cUObject* object = 0, bool system = false );
! void clilocMessageAffix( const UINT32 MsgID, const QString& params = 0, const QString& affix = 0, const Q_UINT16 color = 0x3b2, const Q_UINT16 font = 3, cUObject* object = 0, bool dontMove = false, bool prepend = false, bool system = false );
void updateLightLevel();
! void sendQuestArrow( bool show, UINT16 x, UINT16 y );
! void closeGump( UINT32 type, UINT32 returnCode );
void log( eLogLevel loglevel, const QString& message );
void log( const QString& message );
--- 277,289 ----
void sendStatWindow( P_CHAR pChar = NULL );
bool inRange( cUOSocket* ) const;
! void sendSkill( Q_UINT16 skill );
void sendBuyWindow( P_NPC pVendor );
void sendSellWindow( P_NPC pVendor, P_CHAR pSeller );
void sendVendorCont( P_ITEM pItem );
! void clilocMessage( const Q_UINT32 MsgID, const QString& params = 0, const Q_UINT16 color = 0x3b2, const Q_UINT16 font = 3, cUObject* object = 0, bool system = false );
! void clilocMessageAffix( const Q_UINT32 MsgID, const QString& params = 0, const QString& affix = 0, const Q_UINT16 color = 0x3b2, const Q_UINT16 font = 3, cUObject* object = 0, bool dontMove = false, bool prepend = false, bool system = false );
void updateLightLevel();
! void sendQuestArrow( bool show, Q_UINT16 x, Q_UINT16 y );
! void closeGump( Q_UINT32 type, Q_UINT32 returnCode );
void log( eLogLevel loglevel, const QString& message );
void log( const QString& message );
Index: network.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/network.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** network.cpp 4 Aug 2004 23:17:38 -0000 1.3
--- network.cpp 19 Aug 2004 01:22:56 -0000 1.4
***************
*** 215,219 ****
}
! void cNetwork::broadcast( const QString& message, UINT16 color, UINT16 font )
{
for ( cUOSocket*socket = uoSockets.first(); socket; socket = uoSockets.next() )
--- 215,219 ----
}
! void cNetwork::broadcast( const QString& message, Q_UINT16 color, Q_UINT16 font )
{
for ( cUOSocket*socket = uoSockets.first(); socket; socket = uoSockets.next() )
Index: network.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/network.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** network.h 2 Jun 2004 15:04:09 -0000 1.2
--- network.h 19 Aug 2004 01:22:56 -0000 1.3
***************
*** 89,93 ****
return uoSockets.next();
}
! UINT32 count()
{
return uoSockets.count();
--- 89,93 ----
return uoSockets.next();
}
! Q_UINT32 count()
{
return uoSockets.count();
***************
*** 98,102 ****
}
! void broadcast( const QString& message, UINT16 color = 0x84d, UINT16 font = 0 );
};
--- 98,102 ----
}
! void broadcast( const QString& message, Q_UINT16 color = 0x84d, Q_UINT16 font = 0 );
};
Index: uosocket.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.cpp,v
retrieving revision 1.393
retrieving revision 1.394
diff -C2 -d -r1.393 -r1.394
*** uosocket.cpp 15 Aug 2004 02:17:40 -0000 1.393
--- uosocket.cpp 19 Aug 2004 01:22:56 -0000 1.394
***************
*** 1051,1055 ****
\sa cUOTxUnicodeSpeech
*/
! void cUOSocket::sysMessage( const QString& message, Q_UINT16 color, UINT16 font ) const
{
if ( message.isEmpty() )
--- 1051,1055 ----
\sa cUOTxUnicodeSpeech
*/
! void cUOSocket::sysMessage( const QString& message, Q_UINT16 color, Q_UINT16 font ) const
{
if ( message.isEmpty() )
***************
*** 1664,1673 ****
// if it's normal speech send it to the normal speech dispatcher
QString speech = packet->message();
! QValueVector<UINT16> keywords;
if ( packet->type() & 0xc0 )
keywords = packet->keywords();
! UINT16 color = packet->color();
! UINT16 font = packet->font();
! UINT16 type = packet->type() & 0x3f; // Pad out the Tokenized speech flag
// There is one special case. if the user has the body 0x3db and the first char
--- 1664,1673 ----
// if it's normal speech send it to the normal speech dispatcher
QString speech = packet->message();
! QValueVector<Q_UINT16> keywords;
if ( packet->type() & 0xc0 )
keywords = packet->keywords();
! Q_UINT16 color = packet->color();
! Q_UINT16 font = packet->font();
! Q_UINT16 type = packet->type() & 0x3f; // Pad out the Tokenized speech flag
// There is one special case. if the user has the body 0x3db and the first char
***************
*** 1782,1786 ****
cTerritory* Region = _player->region();
! UINT32 midi = 0;
if ( _player->isAtWar() )
--- 1782,1786 ----
cTerritory* Region = _player->region();
! Q_UINT32 midi = 0;
if ( _player->isAtWar() )
***************
*** 1803,1807 ****
// Get the container gump
! UINT16 gump = 0x3D;
switch ( pCont->id() )
--- 1803,1807 ----
// Get the container gump
! Q_UINT16 gump = 0x3D;
switch ( pCont->id() )
***************
*** 2114,2118 ****
}
! void cUOSocket::attachTarget( cTargetRequest* request, UINT16 multiid )
{
if ( multiid < 0x4000 )
--- 2114,2118 ----
}
! void cUOSocket::attachTarget( cTargetRequest* request, Q_UINT16 multiid )
{
if ( multiid < 0x4000 )
***************
*** 2172,2176 ****
}
! void cUOSocket::soundEffect( UINT16 soundId, cUObject* source )
{
if ( !_player )
--- 2172,2176 ----
}
! void cUOSocket::soundEffect( Q_UINT16 soundId, cUObject* source )
{
if ( !_player )
***************
*** 2283,2287 ****
{
update.setMaximum( 100 );
! update.setCurrent( ( UINT16 ) ( ( pChar->stamina() / pChar->dexterity() ) * 100 ) );
}
--- 2283,2287 ----
{
update.setMaximum( 100 );
! update.setCurrent( ( Q_UINT16 ) ( ( pChar->stamina() / pChar->dexterity() ) * 100 ) );
}
***************
*** 2314,2318 ****
{
update.setMaximum( 100 );
! update.setCurrent( ( UINT16 ) ( ( pChar->mana() / pChar->intelligence() ) * 100 ) );
}
--- 2314,2318 ----
{
update.setMaximum( 100 );
! update.setCurrent( ( Q_UINT16 ) ( ( pChar->mana() / pChar->intelligence() ) * 100 ) );
}
***************
*** 2456,2460 ****
}
! void cUOSocket::sendSkill( UINT16 skill )
{
if ( !_player )
--- 2456,2460 ----
}
! void cUOSocket::sendSkill( Q_UINT16 skill )
{
if ( !_player )
***************
*** 2709,2713 ****
thanks to codex
*/
! void cUOSocket::clilocMessage( const UINT32 MsgID, const QString& params, const Q_UINT16 color, const Q_UINT16 font, cUObject* object, bool system )
{
cUOTxClilocMsg msg;
--- 2709,2713 ----
thanks to codex
*/
! void cUOSocket::clilocMessage( const Q_UINT32 MsgID, const QString& params, const Q_UINT16 color, const Q_UINT16 font, cUObject* object, bool system )
{
cUOTxClilocMsg msg;
***************
*** 2755,2759 ****
}
! void cUOSocket::clilocMessageAffix( const UINT32 MsgID, const QString& params, const QString& affix, const Q_UINT16 color, const Q_UINT16 font, cUObject* object, bool dontMove, bool prepend, bool system )
{
cUOTxClilocMsgAffix msg;
--- 2755,2759 ----
}
! void cUOSocket::clilocMessageAffix( const Q_UINT32 MsgID, const QString& params, const QString& affix, const Q_UINT16 color, const Q_UINT16 font, cUObject* object, bool dontMove, bool prepend, bool system )
{
cUOTxClilocMsgAffix msg;
***************
*** 2887,2891 ****
}
! void cUOSocket::sendQuestArrow( bool show, UINT16 x, UINT16 y )
{
cUOTxQuestArrow qArrow;
--- 2887,2891 ----
}
! void cUOSocket::sendQuestArrow( bool show, Q_UINT16 x, Q_UINT16 y )
{
cUOTxQuestArrow qArrow;
***************
*** 2895,2899 ****
}
! void cUOSocket::closeGump( UINT32 type, UINT32 returnCode )
{
cUOTxCloseGump closegump;
--- 2895,2899 ----
}
! void cUOSocket::closeGump( Q_UINT32 type, Q_UINT32 returnCode )
{
cUOTxCloseGump closegump;
***************
*** 2903,2907 ****
}
! void cUOSocket::addTooltip( UINT32 data )
{
if ( data >= tooltipscache_->size() )
--- 2903,2907 ----
}
! void cUOSocket::addTooltip( Q_UINT32 data )
{
if ( data >= tooltipscache_->size() )
Index: uorxpackets.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uorxpackets.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -d -r1.64 -r1.65
*** uorxpackets.cpp 1 Jul 2004 20:07:07 -0000 1.64
--- uorxpackets.cpp 19 Aug 2004 01:22:56 -0000 1.65
***************
*** 174,179 ****
{
// Skip the keywords
! UINT16 skipCount = ( keywordCount() + 1 ) * 12; // We have 12 Bits for the count as well
! UINT16 skipBytes = static_cast<UINT16>( skipCount / 8 );
if ( skipCount % 8 > 0 ) // Round up
skipBytes++;
--- 174,179 ----
{
// Skip the keywords
! Q_UINT16 skipCount = ( keywordCount() + 1 ) * 12; // We have 12 Bits for the count as well
! Q_UINT16 skipBytes = static_cast<Q_UINT16>( skipCount / 8 );
if ( skipCount % 8 > 0 ) // Round up
skipBytes++;
***************
*** 194,209 ****
gumpChoice_st choice;
choice.button = getInt( 11 );
! UINT32 numSwitches = getInt( 15 );
! UINT32 i;
for ( i = 0; i < numSwitches; i++ )
{
choice.switches.push_back( getInt( 19 + 4 * i ) );
}
! UINT32 numTextEntries = getInt( 19 + 4 * numSwitches );
! UINT32 offset = 0;
for ( i = 0; i < numTextEntries; i++ )
{
! UINT16 textLength = getShort( 25 + 4 * numSwitches + offset );
! choice.textentries.insert( make_pair<UINT16, QString>( getShort( 23 + 4 * numSwitches + offset ), getUnicodeString( 27 + 4 * numSwitches + offset, textLength * 2 ) ) );
offset += 4 + textLength * 2;
--- 194,209 ----
gumpChoice_st choice;
choice.button = getInt( 11 );
! Q_UINT32 numSwitches = getInt( 15 );
! Q_UINT32 i;
for ( i = 0; i < numSwitches; i++ )
{
choice.switches.push_back( getInt( 19 + 4 * i ) );
}
! Q_UINT32 numTextEntries = getInt( 19 + 4 * numSwitches );
! Q_UINT32 offset = 0;
for ( i = 0; i < numTextEntries; i++ )
{
! Q_UINT16 textLength = getShort( 25 + 4 * numSwitches + offset );
! choice.textentries.insert( make_pair<Q_UINT16, QString>( getShort( 23 + 4 * numSwitches + offset ), getUnicodeString( 27 + 4 * numSwitches + offset, textLength * 2 ) ) );
offset += 4 + textLength * 2;
***************
*** 213,224 ****
}
! QValueVector< UINT16 > cUORxSpeechRequest::keywords()
{
! QValueVector<UINT16> keywords;
! UINT16 count = keywordCount();
! UINT16 offset = 13; // Skip the count
! for ( UINT16 i = 0; i < count; ++i )
{
// Invalid Packet size
--- 213,224 ----
}
! QValueVector< Q_UINT16 > cUORxSpeechRequest::keywords()
{
! QValueVector<Q_UINT16> keywords;
! ushort count = keywordCount();
! ushort offset = 13; // Skip the count
! for ( ushort i = 0; i < count; ++i )
{
// Invalid Packet size
***************
*** 226,230 ****
return keywords;
! UINT16 value;
// The second, fourth, etc. keyword always
--- 226,230 ----
return keywords;
! ushort value;
// The second, fourth, etc. keyword always
|