mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 19:29:09 +00:00
Merge remote-tracking branch 'origin/master' into plString
Conflicts: Sources/Plasma/CoreLib/hsStream.h Sources/Plasma/FeatureLib/pfAudio/plListener.cpp Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp Sources/Plasma/FeatureLib/pfConsole/pfDispatchLog.cpp Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp Sources/Plasma/FeatureLib/pfPython/cyMisc.h Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.h Sources/Plasma/FeatureLib/pfPython/pyImage.cpp Sources/Plasma/FeatureLib/pfPython/pyJournalBook.cpp Sources/Plasma/FeatureLib/pfPython/pyNetServerSessionInfo.h Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.cpp Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.h Sources/Plasma/NucleusLib/pnMessage/plMessage.h Sources/Plasma/NucleusLib/pnNetCommon/plNetApp.h Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpansExport.cpp Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.cpp Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.h Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.h Sources/Plasma/PubUtilLib/plNetCommon/plClientGuid.h Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.cpp Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.h Sources/Plasma/PubUtilLib/plNetTransport/plNetTransportMember.h Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.cpp Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.h Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.h Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.cpp Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.h Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.cpp
This commit is contained in:
@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef plNetCommonMessage_inc
|
||||
#define plNetCommonMessage_inc
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsSafeRefCnt.h"
|
||||
|
||||
//
|
||||
@ -72,7 +72,7 @@ class plNetCommonMessage
|
||||
private:
|
||||
plNetCommonMessageData* fMsgData;
|
||||
protected:
|
||||
UInt32 fLen; // sent
|
||||
uint32_t fLen; // sent
|
||||
public:
|
||||
plNetCommonMessage() : fLen(0),fMsgData(nil) {}
|
||||
virtual ~plNetCommonMessage() { hsRefCnt_SafeUnRef(fMsgData); }
|
||||
@ -80,7 +80,7 @@ public:
|
||||
// setters
|
||||
void SetData(char *d)
|
||||
{
|
||||
plNetCommonMessageData* n = d ? TRACKED_NEW plNetCommonMessageData(d) : nil;
|
||||
plNetCommonMessageData* n = d ? new plNetCommonMessageData(d) : nil;
|
||||
hsRefCnt_SafeAssign(fMsgData, n);
|
||||
hsRefCnt_SafeUnRef(n);
|
||||
}
|
||||
@ -88,12 +88,12 @@ public:
|
||||
{
|
||||
hsRefCnt_SafeAssign(fMsgData, d);
|
||||
}
|
||||
void SetLen(UInt32 l) { fLen=l; }
|
||||
void SetLen(uint32_t l) { fLen=l; }
|
||||
|
||||
// getters
|
||||
char* GetData() const { return fMsgData ? fMsgData->GetData() : nil; }
|
||||
virtual UInt32 GetDataLen() { return fLen; }
|
||||
UInt32 GetLen() const { return fLen; }
|
||||
virtual uint32_t GetDataLen() { return fLen; }
|
||||
uint32_t GetLen() const { return fLen; }
|
||||
plNetCommonMessageData* GetMsgData() const { return fMsgData; }
|
||||
};
|
||||
#endif // plNetCommonMessage_inc
|
||||
|
@ -39,7 +39,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
#include "hsWindows.h"
|
||||
|
||||
#include "hsResMgr.h"
|
||||
#include "plNetMessage.h"
|
||||
#include "plNetCommonMessage.h"
|
||||
@ -70,8 +70,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// static
|
||||
//
|
||||
// see plNetMsgVersion.h
|
||||
const UInt8 plNetMessage::kVerMajor = PLASMA2_NETMSG_MAJOR_VERSION;
|
||||
const UInt8 plNetMessage::kVerMinor = PLASMA2_NETMSG_MINOR_VERSION;
|
||||
const uint8_t plNetMessage::kVerMajor = PLASMA2_NETMSG_MAJOR_VERSION;
|
||||
const uint8_t plNetMessage::kVerMinor = PLASMA2_NETMSG_MINOR_VERSION;
|
||||
|
||||
|
||||
|
||||
@ -182,7 +182,7 @@ plNetMessage* plNetMessage::Create(const plNetCommonMessage* msg)
|
||||
return nil;
|
||||
}
|
||||
|
||||
int plNetMessage::PokeBuffer(char* bufIn, int bufLen, UInt32 peekOptions)
|
||||
int plNetMessage::PokeBuffer(char* bufIn, int bufLen, uint32_t peekOptions)
|
||||
{
|
||||
fPeekStatus = 0;
|
||||
|
||||
@ -207,12 +207,12 @@ int plNetMessage::PokeBuffer(char* bufIn, int bufLen, UInt32 peekOptions)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int plNetMessage::PeekBuffer(const char* bufIn, int bufLen, UInt32 peekOptions, bool forcePeek, plStreamLogger::EventList* el)
|
||||
int plNetMessage::PeekBuffer(const char* bufIn, int bufLen, uint32_t peekOptions, bool forcePeek, plStreamLogger::EventList* el)
|
||||
{
|
||||
if(!bufLen || bufLen < 1)
|
||||
return 0;
|
||||
|
||||
UInt32 partialPeekOptions = (peekOptions & kPartialPeekMask);
|
||||
uint32_t partialPeekOptions = (peekOptions & kPartialPeekMask);
|
||||
if (!forcePeek && (fPeekStatus & partialPeekOptions) )
|
||||
return 0; // already peeked, fully or partially
|
||||
|
||||
@ -251,7 +251,7 @@ void plNetMessage::IWriteClassIndex(hsStream* stream)
|
||||
}
|
||||
|
||||
// put in buffer
|
||||
int plNetMessage::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMessage::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
IWriteClassIndex(stream);
|
||||
|
||||
@ -284,7 +284,7 @@ void plNetMessage::IReadClassIndex(hsStream* stream)
|
||||
}
|
||||
|
||||
// get out of buffer
|
||||
int plNetMessage::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMessage::IPeekBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
IReadClassIndex(stream);
|
||||
|
||||
@ -405,7 +405,7 @@ int plNetMessage::GetPackSize()
|
||||
return IPokeBuffer(&nullStream);
|
||||
}
|
||||
|
||||
UInt32 plNetMessage::GetNetCoreMsgLen() const
|
||||
uint32_t plNetMessage::GetNetCoreMsgLen() const
|
||||
{
|
||||
return fNetCoreMsg ? fNetCoreMsg->GetLen() : 0;
|
||||
}
|
||||
@ -424,7 +424,7 @@ void plNetMessage::ValidatePoke() const
|
||||
////////////////////////////////////////////////////////
|
||||
// plNetMsgStream
|
||||
////////////////////////////////////////////////////////
|
||||
int plNetMsgStream::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgStream::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMessage::IPokeBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -436,7 +436,7 @@ int plNetMsgStream::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int plNetMsgStream::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgStream::IPeekBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMessage::IPeekBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -452,7 +452,7 @@ int plNetMsgStream::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
////////////////////////////////////////////////////////
|
||||
// plNetMsgGameMessage
|
||||
////////////////////////////////////////////////////////
|
||||
int plNetMsgGameMessage::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgGameMessage::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgStream::IPokeBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -471,7 +471,7 @@ int plNetMsgGameMessage::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int plNetMsgGameMessage::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgGameMessage::IPeekBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgStream::IPeekBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -550,7 +550,7 @@ void plNetMsgGameMessage::WriteVersion(hsStream* s, hsResMgr* mgr)
|
||||
////////////////////////////////////////////////////////
|
||||
// plNetMsgGameMessageDirected
|
||||
////////////////////////////////////////////////////////
|
||||
int plNetMsgGameMessageDirected::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgGameMessageDirected::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgGameMessage::IPokeBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -562,7 +562,7 @@ int plNetMsgGameMessageDirected::IPokeBuffer(hsStream* stream, UInt32 peekOption
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int plNetMsgGameMessageDirected::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgGameMessageDirected::IPeekBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgGameMessage::IPeekBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -601,7 +601,7 @@ void plNetMsgGameMessageDirected::WriteVersion(hsStream* s, hsResMgr* mgr)
|
||||
////////////////////////////////////////////////////////
|
||||
// plNetMsgObject
|
||||
////////////////////////////////////////////////////////
|
||||
int plNetMsgObject::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgObject::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMessage::IPokeBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -612,7 +612,7 @@ int plNetMsgObject::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int plNetMsgObject::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgObject::IPeekBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMessage::IPeekBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -652,7 +652,7 @@ void plNetMsgObject::WriteVersion(hsStream* s, hsResMgr* mgr)
|
||||
// plNetMsgStreamedObject
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
int plNetMsgStreamedObject::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgStreamedObject::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgObject::IPokeBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -663,7 +663,7 @@ int plNetMsgStreamedObject::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int plNetMsgStreamedObject::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgStreamedObject::IPeekBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgObject::IPeekBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -727,7 +727,7 @@ void plNetMsgSDLState::ISetDescName() const
|
||||
}
|
||||
}
|
||||
|
||||
int plNetMsgSDLState::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgSDLState::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
ISetDescName(); // stash away the descName before poke/compress
|
||||
plNetMsgStreamedObject::IPokeBuffer(stream, peekOptions);
|
||||
@ -737,7 +737,7 @@ int plNetMsgSDLState::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
return stream->GetPosition();
|
||||
}
|
||||
|
||||
int plNetMsgSDLState::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgSDLState::IPeekBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
plNetMsgStreamedObject::IPeekBuffer(stream, peekOptions);
|
||||
stream->LogReadLE( &fIsInitialState, "IsInitialAgeState" );
|
||||
@ -756,9 +756,9 @@ void plNetMsgSDLState::ReadVersion(hsStream* s, hsResMgr* mgr)
|
||||
|
||||
if (contentFlags.IsBitSet(kSDLStateStream))
|
||||
{
|
||||
UInt32 len;
|
||||
uint32_t len;
|
||||
s->LogReadLE(&len,"SDLState StreamLen");
|
||||
UInt8* buf = TRACKED_NEW UInt8[len];
|
||||
uint8_t* buf = new uint8_t[len];
|
||||
s->LogRead(len, buf,"SDLState StreamData");
|
||||
|
||||
StreamInfo()->SetStreamLen(len);
|
||||
@ -795,7 +795,7 @@ void plNetMsgSDLState::WriteVersion(hsStream* s, hsResMgr* mgr)
|
||||
// plNetMsgSDLStateBCast
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
int plNetMsgSDLStateBCast::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgSDLStateBCast::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes = plNetMsgSDLState::IPokeBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -805,7 +805,7 @@ int plNetMsgSDLStateBCast::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int plNetMsgSDLStateBCast::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgSDLStateBCast::IPeekBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgSDLState::IPeekBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -828,7 +828,7 @@ void plNetMsgSDLStateBCast::WriteVersion(hsStream* s, hsResMgr* mgr)
|
||||
////////////////////////////////////////////////////////
|
||||
// plNetMsgRoomsList
|
||||
////////////////////////////////////////////////////////
|
||||
int plNetMsgRoomsList::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgRoomsList::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMessage::IPokeBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -848,7 +848,7 @@ int plNetMsgRoomsList::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int plNetMsgRoomsList::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgRoomsList::IPeekBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMessage::IPeekBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -894,7 +894,7 @@ int plNetMsgRoomsList::FindRoomLocation(plLocation loc)
|
||||
////////////////////////////////////////////////////////
|
||||
// plNetMsgPagingRoom
|
||||
////////////////////////////////////////////////////////
|
||||
int plNetMsgPagingRoom::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgPagingRoom::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgRoomsList::IPokeBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -905,7 +905,7 @@ int plNetMsgPagingRoom::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int plNetMsgPagingRoom::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgPagingRoom::IPeekBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgRoomsList::IPeekBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -919,7 +919,7 @@ int plNetMsgPagingRoom::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
////////////////////////////////////////////////////////
|
||||
// plNetMsgGroupOwner
|
||||
////////////////////////////////////////////////////////
|
||||
int plNetMsgGroupOwner::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgGroupOwner::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgServerToClient::IPokeBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -934,7 +934,7 @@ int plNetMsgGroupOwner::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int plNetMsgGroupOwner::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgGroupOwner::IPeekBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgServerToClient::IPeekBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -966,7 +966,7 @@ void plNetMsgSharedState::CopySharedState(plNetSharedState* ss)
|
||||
StreamInfo()->CopyStream(&stream);
|
||||
}
|
||||
|
||||
int plNetMsgSharedState::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgSharedState::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgStreamedObject::IPokeBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -977,7 +977,7 @@ int plNetMsgSharedState::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int plNetMsgSharedState::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgSharedState::IPeekBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgStreamedObject::IPeekBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -1014,7 +1014,7 @@ void plNetMsgSharedState::WriteVersion(hsStream* s, hsResMgr* mgr)
|
||||
////////////////////////////////////////////////////////
|
||||
// plNetMsgGetSharedState
|
||||
////////////////////////////////////////////////////////
|
||||
int plNetMsgGetSharedState::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgGetSharedState::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgObject::IPokeBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -1025,7 +1025,7 @@ int plNetMsgGetSharedState::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int plNetMsgGetSharedState::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgGetSharedState::IPeekBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgObject::IPeekBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -1041,7 +1041,7 @@ int plNetMsgGetSharedState::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
////////////////////////////////////////////////////////
|
||||
// plNetMsgObject
|
||||
////////////////////////////////////////////////////////
|
||||
int plNetMsgObjectUpdateFilter::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgObjectUpdateFilter::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMessage::IPokeBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -1054,7 +1054,7 @@ int plNetMsgObjectUpdateFilter::IPokeBuffer(hsStream* stream, UInt32 peekOptions
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int plNetMsgObjectUpdateFilter::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgObjectUpdateFilter::IPeekBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMessage::IPeekBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -1072,7 +1072,7 @@ int plNetMsgObjectUpdateFilter::IPeekBuffer(hsStream* stream, UInt32 peekOptions
|
||||
////////////////////////////////////////////////////////
|
||||
// plNetMsgMembersList
|
||||
////////////////////////////////////////////////////////
|
||||
int plNetMsgMembersList::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgMembersList::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgServerToClient::IPokeBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -1083,7 +1083,7 @@ int plNetMsgMembersList::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int plNetMsgMembersList::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgMembersList::IPeekBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgServerToClient::IPeekBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -1098,7 +1098,7 @@ int plNetMsgMembersList::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
////////////////////////////////////////////////////////
|
||||
// plNetMsgMemberUpdate
|
||||
////////////////////////////////////////////////////////
|
||||
int plNetMsgMemberUpdate::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgMemberUpdate::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgServerToClient::IPokeBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -1114,7 +1114,7 @@ int plNetMsgMemberUpdate::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int plNetMsgMemberUpdate::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgMemberUpdate::IPeekBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMsgServerToClient::IPeekBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -1131,7 +1131,7 @@ int plNetMsgMemberUpdate::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
////////////////////////////////////////////////////////
|
||||
// plNetMsgVoice
|
||||
////////////////////////////////////////////////////////
|
||||
int plNetMsgVoice::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgVoice::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
plNetMessage::IPokeBuffer(stream, peekOptions);
|
||||
stream->WriteLE(fFlags);
|
||||
@ -1141,7 +1141,7 @@ int plNetMsgVoice::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
return stream->GetPosition();
|
||||
}
|
||||
|
||||
int plNetMsgVoice::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgVoice::IPeekBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMessage::IPeekBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -1161,7 +1161,7 @@ void plNetMsgVoice::ReadVersion(hsStream* s, hsResMgr* mgr)
|
||||
{
|
||||
plNetMessage::ReadVersion(s,mgr);
|
||||
|
||||
UInt16 old = 0;
|
||||
uint16_t old = 0;
|
||||
hsBitVector contentFlags;
|
||||
contentFlags.Read(s);
|
||||
|
||||
@ -1207,7 +1207,7 @@ const char *plNetMsgVoice::GetVoiceData() const
|
||||
////////////////////////////////////////////////////////
|
||||
// plNetMsgListenListUpdate
|
||||
////////////////////////////////////////////////////////
|
||||
int plNetMsgListenListUpdate::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgListenListUpdate::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMessage::IPokeBuffer(stream, peekOptions);
|
||||
stream->WriteLE(fAdding);
|
||||
@ -1215,7 +1215,7 @@ int plNetMsgListenListUpdate::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
return stream->GetPosition();
|
||||
}
|
||||
|
||||
int plNetMsgListenListUpdate::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgListenListUpdate::IPeekBuffer(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
int bytes=plNetMessage::IPeekBuffer(stream, peekOptions);
|
||||
if (bytes)
|
||||
@ -1232,7 +1232,7 @@ int plNetMsgListenListUpdate::IPeekBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
// plNetMsgPlayerPage
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
int plNetMsgPlayerPage::IPokeBuffer( hsStream* stream, UInt32 peekOptions )
|
||||
int plNetMsgPlayerPage::IPokeBuffer( hsStream* stream, uint32_t peekOptions )
|
||||
{
|
||||
plNetMessage::IPokeBuffer( stream, peekOptions );
|
||||
stream->WriteLE( fUnload );
|
||||
@ -1241,7 +1241,7 @@ int plNetMsgPlayerPage::IPokeBuffer( hsStream* stream, UInt32 peekOptions )
|
||||
return stream->GetPosition();
|
||||
}
|
||||
|
||||
int plNetMsgPlayerPage::IPeekBuffer( hsStream* stream, UInt32 peekOptions )
|
||||
int plNetMsgPlayerPage::IPeekBuffer( hsStream* stream, uint32_t peekOptions )
|
||||
{
|
||||
int bytes = plNetMessage::IPeekBuffer(stream, peekOptions );
|
||||
if ( bytes )
|
||||
@ -1258,7 +1258,7 @@ int plNetMsgPlayerPage::IPeekBuffer( hsStream* stream, UInt32 peekOptions )
|
||||
// plNetMsgLoadClone
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
int plNetMsgLoadClone::IPokeBuffer( hsStream* stream, UInt32 peekOptions )
|
||||
int plNetMsgLoadClone::IPokeBuffer( hsStream* stream, uint32_t peekOptions )
|
||||
{
|
||||
int bytes = plNetMsgGameMessage::IPokeBuffer( stream, peekOptions );
|
||||
if ( bytes )
|
||||
@ -1272,7 +1272,7 @@ int plNetMsgLoadClone::IPokeBuffer( hsStream* stream, UInt32 peekOptions )
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int plNetMsgLoadClone::IPeekBuffer( hsStream* stream, UInt32 peekOptions )
|
||||
int plNetMsgLoadClone::IPeekBuffer( hsStream* stream, uint32_t peekOptions )
|
||||
{
|
||||
stream->LogSubStreamPushDesc("LoadClone");
|
||||
int bytes = plNetMsgGameMessage::IPeekBuffer(stream, peekOptions );
|
||||
@ -1326,14 +1326,14 @@ void plNetMsgLoadClone::WriteVersion(hsStream* s, hsResMgr* mgr)
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
int plNetMsgInitialAgeStateSent::IPokeBuffer( hsStream* stream, UInt32 peekOptions )
|
||||
int plNetMsgInitialAgeStateSent::IPokeBuffer( hsStream* stream, uint32_t peekOptions )
|
||||
{
|
||||
plNetMessage::IPokeBuffer( stream, peekOptions );
|
||||
stream->WriteLE( fNumInitialSDLStates );
|
||||
return stream->GetPosition();
|
||||
}
|
||||
|
||||
int plNetMsgInitialAgeStateSent::IPeekBuffer( hsStream* stream, UInt32 peekOptions )
|
||||
int plNetMsgInitialAgeStateSent::IPeekBuffer( hsStream* stream, uint32_t peekOptions )
|
||||
{
|
||||
stream->LogSubStreamPushDesc("InitialAgeStateSent");
|
||||
int bytes=plNetMessage::IPeekBuffer(stream, peekOptions );
|
||||
@ -1350,7 +1350,7 @@ int plNetMsgInitialAgeStateSent::IPeekBuffer( hsStream* stream, UInt32 peekOptio
|
||||
// plNetMsgRelevanceRegions
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
int plNetMsgRelevanceRegions::IPokeBuffer( hsStream* stream, UInt32 peekOptions )
|
||||
int plNetMsgRelevanceRegions::IPokeBuffer( hsStream* stream, uint32_t peekOptions )
|
||||
{
|
||||
plNetMessage::IPokeBuffer( stream, peekOptions );
|
||||
fRegionsICareAbout.Write(stream);
|
||||
@ -1359,7 +1359,7 @@ int plNetMsgRelevanceRegions::IPokeBuffer( hsStream* stream, UInt32 peekOptions
|
||||
return stream->GetPosition();
|
||||
}
|
||||
|
||||
int plNetMsgRelevanceRegions::IPeekBuffer( hsStream* stream, UInt32 peekOptions )
|
||||
int plNetMsgRelevanceRegions::IPeekBuffer( hsStream* stream, uint32_t peekOptions )
|
||||
{
|
||||
stream->LogSubStreamPushDesc("RelevanceRegions");
|
||||
int bytes=plNetMessage::IPeekBuffer(stream, peekOptions );
|
||||
|
@ -42,8 +42,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef plNetMessage_h_inc
|
||||
#define plNetMessage_h_inc
|
||||
|
||||
#include "hsUtils.h"
|
||||
#include "hsTypes.h"
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "hsStlUtils.h"
|
||||
#include "hsStream.h"
|
||||
#include "hsBitVector.h"
|
||||
@ -82,18 +82,18 @@ class plNetMessage : public plCreatable
|
||||
{
|
||||
friend class plNetServerMsgPlsRoutableMsg;
|
||||
|
||||
UInt32 fFlags; // indicates what is present in the message, always transmitted
|
||||
uint32_t fFlags; // indicates what is present in the message, always transmitted
|
||||
plUnifiedTime fTimeSent; // time msg was sent (in sender's unified timeSpace), always transmitted to and from the client
|
||||
double fTimeRecvd; // time msg was recvd (in rcvrs timeSpace), never transmitted
|
||||
UInt32 fBytesRead; // amount of data we've already read, never transmitted
|
||||
UInt32 fContext; // set by sender, included in reply. Only written if kHasContext flag set
|
||||
UInt32 fTransactionID; // set by originator, included in reply. Only written if kHasTransactionID flag set
|
||||
UInt32 fPlayerID; // set by originator. Only written if kHasPlayerID flag set
|
||||
uint32_t fBytesRead; // amount of data we've already read, never transmitted
|
||||
uint32_t fContext; // set by sender, included in reply. Only written if kHasContext flag set
|
||||
uint32_t fTransactionID; // set by originator, included in reply. Only written if kHasTransactionID flag set
|
||||
uint32_t fPlayerID; // set by originator. Only written if kHasPlayerID flag set
|
||||
plUUID fAcctUUID; // set by sender (app level). Only written if kHasAcctUUID flag set
|
||||
const plNetCommonMessage* fNetCoreMsg; // not sent, set by the receiver
|
||||
UInt32 fPeekStatus; // not sent. set on PeekBuffer, cleared on PokeBuffer
|
||||
UInt8 fProtocolVerMajor; // conditionally sent
|
||||
UInt8 fProtocolVerMinor; // conditionally sent
|
||||
uint32_t fPeekStatus; // not sent. set on PeekBuffer, cleared on PokeBuffer
|
||||
uint8_t fProtocolVerMajor; // conditionally sent
|
||||
uint8_t fProtocolVerMinor; // conditionally sent
|
||||
ENetProtocol fNetProtocol; // the server this msg should be sent to. this value is not sent over wire.
|
||||
|
||||
enum ContentFlags
|
||||
@ -107,20 +107,20 @@ class plNetMessage : public plCreatable
|
||||
};
|
||||
|
||||
protected:
|
||||
virtual int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
virtual int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
|
||||
void IWriteClassIndex(hsStream* stream);
|
||||
void IReadClassIndex(hsStream* stream);
|
||||
|
||||
bool IPeeked() const { return fPeekStatus==kFullyPeeked;}
|
||||
void ISetPeekStatus(UInt32 s) { fPeekStatus=s; }
|
||||
void ISetPeekStatus(uint32_t s) { fPeekStatus=s; }
|
||||
|
||||
public:
|
||||
typedef UInt16 plStrLen;
|
||||
static const UInt8 kVerMajor, kVerMinor; // version of the networking code
|
||||
typedef uint16_t plStrLen;
|
||||
static const uint8_t kVerMajor, kVerMinor; // version of the networking code
|
||||
|
||||
typedef UInt16 ClassIndexType; // the type returned by plCreatable::ClassIndex()
|
||||
typedef uint16_t ClassIndexType; // the type returned by plCreatable::ClassIndex()
|
||||
enum
|
||||
{
|
||||
kMaxNameLen=32
|
||||
@ -193,8 +193,8 @@ public:
|
||||
|
||||
static plNetMessage* CreateAndRead(const plNetCommonMessage*, plStreamLogger::EventList* el = nil);
|
||||
static plNetMessage* Create(const plNetCommonMessage*);
|
||||
int PokeBuffer(char* buf, int bufLen, UInt32 peekOptions=0); // put msg in buffer
|
||||
int PeekBuffer(const char* buf, int bufLen, UInt32 peekOptions=0, bool forcePeek=false, plStreamLogger::EventList* el = nil); // get msg out of buffer
|
||||
int PokeBuffer(char* buf, int bufLen, uint32_t peekOptions=0); // put msg in buffer
|
||||
int PeekBuffer(const char* buf, int bufLen, uint32_t peekOptions=0, bool forcePeek=false, plStreamLogger::EventList* el = nil); // get msg out of buffer
|
||||
bool NeedsReliableSend() const { return IsBitSet(kNeedsReliableSend); }
|
||||
bool IsSystemMessage() const { return IsBitSet(kIsSystemMessage); }
|
||||
virtual void ValidatePoke() const;
|
||||
@ -209,18 +209,18 @@ public:
|
||||
double GetTimeReceived() const { return fTimeRecvd; }
|
||||
bool IsBitSet(int b) const { return (fFlags & b) != 0; }
|
||||
const plNetCommonMessage* GetNetCoreMsg() const { return fNetCoreMsg; }
|
||||
UInt32 GetNetCoreMsgLen() const;
|
||||
uint32_t GetNetCoreMsgLen() const;
|
||||
bool GetHasContext() const { return IsBitSet(kHasContext);}
|
||||
UInt32 GetContext() const { return fContext;}
|
||||
uint32_t GetContext() const { return fContext;}
|
||||
bool GetHasTransactionID() const { return IsBitSet(kHasTransactionID);}
|
||||
UInt32 GetTransactionID() const { return fTransactionID;}
|
||||
uint32_t GetTransactionID() const { return fTransactionID;}
|
||||
bool GetHasPlayerID() const { return IsBitSet(kHasPlayerID);}
|
||||
UInt32 GetPlayerID() const { hsAssert(GetHasPlayerID(), "uninit playerID"); return fPlayerID; }
|
||||
UInt32 JustGetPlayerID() const { return fPlayerID; }
|
||||
uint32_t GetPlayerID() const { hsAssert(GetHasPlayerID(), "uninit playerID"); return fPlayerID; }
|
||||
uint32_t JustGetPlayerID() const { return fPlayerID; }
|
||||
bool GetHasAcctUUID() const { return IsBitSet(kHasAcctUUID); }
|
||||
const plUUID * GetAcctUUID() const { return &fAcctUUID; }
|
||||
UInt8 GetVersionMajor() const { return fProtocolVerMajor; }
|
||||
UInt8 GetVersionMinor() const { return fProtocolVerMinor; }
|
||||
uint8_t GetVersionMajor() const { return fProtocolVerMajor; }
|
||||
uint8_t GetVersionMinor() const { return fProtocolVerMinor; }
|
||||
ENetProtocol GetNetProtocol () const { return fNetProtocol; }
|
||||
|
||||
// setters
|
||||
@ -230,14 +230,14 @@ public:
|
||||
void SetBit(int b, bool on=true) { if (on) fFlags |= b; else fFlags &= ~b; }
|
||||
void SetNetCoreMsg(const plNetCommonMessage* ncmsg) { fNetCoreMsg=ncmsg; }
|
||||
void SetHasContext(bool value) { SetBit(kHasContext,value);}
|
||||
void SetContext(UInt32 value) { fContext=value; SetHasContext(true);}
|
||||
void SetContext(uint32_t value) { fContext=value; SetHasContext(true);}
|
||||
void SetHasTransactionID(bool value) { SetBit(kHasTransactionID,value);}
|
||||
void SetTransactionID(UInt32 value) { fTransactionID=value; SetHasTransactionID(true);}
|
||||
void SetTransactionID(uint32_t value) { fTransactionID=value; SetHasTransactionID(true);}
|
||||
void SetHasPlayerID(bool value) { SetBit(kHasPlayerID,value);}
|
||||
void SetPlayerID(UInt32 value) { fPlayerID=value; SetHasPlayerID(true);}
|
||||
void SetPlayerID(uint32_t value) { fPlayerID=value; SetHasPlayerID(true);}
|
||||
void SetHasAcctUUID( bool v ) { SetBit( kHasAcctUUID,v ); }
|
||||
void SetAcctUUID(const plUUID * v ) { fAcctUUID.CopyFrom(v); SetHasAcctUUID(true); }
|
||||
void SetVersion(UInt8 maj=kVerMajor, UInt8 min=kVerMinor) { SetBit(kHasVersion); fProtocolVerMajor=maj; fProtocolVerMinor=min; }
|
||||
void SetVersion(uint8_t maj=kVerMajor, uint8_t min=kVerMinor) { SetBit(kHasVersion); fProtocolVerMajor=maj; fProtocolVerMinor=min; }
|
||||
void SetNetProtocol (ENetProtocol v ) { fNetProtocol = v; }
|
||||
|
||||
// init fContext, fTransactionID, etc. if needed.
|
||||
@ -294,8 +294,8 @@ class plNetMsgStream : public plNetMessage
|
||||
protected:
|
||||
plNetMsgStreamHelper fStreamHelper;
|
||||
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
CLASSNAME_REGISTER( plNetMsgStream );
|
||||
GETINTERFACE_ANY_AUX(plNetMsgStream,plNetMessage,plNetMsgStreamHelper,fStreamHelper)
|
||||
@ -316,8 +316,8 @@ private:
|
||||
};
|
||||
protected:
|
||||
plNetMsgObjectHelper fObjectHelper;
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
CLASSNAME_REGISTER( plNetMsgObject );
|
||||
GETINTERFACE_ANY_AUX(plNetMsgObject,plNetMessage,plNetMsgObjectHelper,fObjectHelper)
|
||||
@ -349,8 +349,8 @@ private:
|
||||
protected:
|
||||
plNetMsgStreamHelper fStreamHelper;
|
||||
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
plNetMsgStreamedObject() {}
|
||||
~plNetMsgStreamedObject() {}
|
||||
@ -385,8 +385,8 @@ private:
|
||||
bool fIsInitialState;
|
||||
|
||||
protected:
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
|
||||
bool fPersistOnServer;
|
||||
bool fIsAvatarState;
|
||||
@ -418,8 +418,8 @@ public:
|
||||
class plNetMsgSDLStateBCast : public plNetMsgSDLState
|
||||
{
|
||||
protected:
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
CLASSNAME_REGISTER( plNetMsgSDLStateBCast );
|
||||
GETINTERFACE_ANY(plNetMsgSDLStateBCast, plNetMsgSDLState);
|
||||
@ -453,8 +453,8 @@ protected:
|
||||
std::vector<plLocation> fRooms;
|
||||
std::vector<plString> fRoomNames; // for debug usage only
|
||||
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
plNetMsgRoomsList() {}
|
||||
~plNetMsgRoomsList() {};
|
||||
@ -481,8 +481,8 @@ class plNetMsgGameMessage: public plNetMsgStream
|
||||
protected:
|
||||
plClientUnifiedTime fDeliveryTime; // for future timestamping
|
||||
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
plNetMsgGameMessage() { SetBit(kNeedsReliableSend); }
|
||||
|
||||
@ -530,8 +530,8 @@ protected:
|
||||
bool fIsInitialState;
|
||||
plNetMsgObjectHelper fObjectHelper;
|
||||
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
|
||||
CLASSNAME_REGISTER( plNetMsgLoadClone );
|
||||
@ -568,8 +568,8 @@ public:
|
||||
class plNetMsgPlayerPage : public plNetMessage
|
||||
{
|
||||
protected:
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
plUoid fUoid;
|
||||
bool fUnload;
|
||||
@ -594,8 +594,8 @@ private:
|
||||
protected:
|
||||
plNetMsgReceiversListHelper fReceivers;
|
||||
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
CLASSNAME_REGISTER( plNetMsgGameMessageDirected );
|
||||
GETINTERFACE_ANY_AUX(plNetMsgGameMessageDirected,plNetMsgGameMessage,
|
||||
@ -622,10 +622,10 @@ public:
|
||||
kFinalRoomInAge=0x8 // done paging in the age
|
||||
};
|
||||
protected:
|
||||
UInt8 fPageFlags;
|
||||
uint8_t fPageFlags;
|
||||
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
plNetMsgPagingRoom() : fPageFlags(0) { SetBit(kIsSystemMessage|kNeedsReliableSend); }
|
||||
~plNetMsgPagingRoom() {}
|
||||
@ -633,8 +633,8 @@ public:
|
||||
CLASSNAME_REGISTER( plNetMsgPagingRoom );
|
||||
GETINTERFACE_ANY( plNetMsgPagingRoom, plNetMsgRoomsList );
|
||||
|
||||
void SetPageFlags(UInt8 f) { fPageFlags=f; }
|
||||
UInt8 GetPageFlags() const { return fPageFlags; }
|
||||
void SetPageFlags(uint8_t f) { fPageFlags=f; }
|
||||
uint8_t GetPageFlags() const { return fPageFlags; }
|
||||
|
||||
void SetPagingOut(hsBool b) { if (b) fPageFlags |= kPagingOut; else fPageFlags&=~kPagingOut; }
|
||||
hsBool GetPagingOut() const { return (fPageFlags & kPagingOut) != 0; }
|
||||
@ -690,8 +690,8 @@ public:
|
||||
protected:
|
||||
std::vector<GroupInfo> fGroups;
|
||||
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
CLASSNAME_REGISTER( plNetMsgGroupOwner );
|
||||
GETINTERFACE_ANY( plNetMsgGroupOwner, plNetMsgServerToClient );
|
||||
@ -721,14 +721,14 @@ private:
|
||||
kVoiceData
|
||||
};
|
||||
protected:
|
||||
UInt8 fFlags; // voice flags
|
||||
UInt8 fNumFrames; // number of frames encoded
|
||||
uint8_t fFlags; // voice flags
|
||||
uint8_t fNumFrames; // number of frames encoded
|
||||
std::string fVoiceData;
|
||||
|
||||
plNetMsgReceiversListHelper fReceivers;
|
||||
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
plNetMsgVoice(): fFlags(0), fNumFrames(0) { }
|
||||
~plNetMsgVoice() {}
|
||||
@ -739,8 +739,8 @@ public:
|
||||
void SetFlag(int f) { fFlags |= f; }
|
||||
int GetFlags() { return fFlags; }
|
||||
|
||||
void SetNumFrames(UInt8 f) { fNumFrames = f; }
|
||||
UInt8 GetNumFrames() const { return fNumFrames; }
|
||||
void SetNumFrames(uint8_t f) { fNumFrames = f; }
|
||||
uint8_t GetNumFrames() const { return fNumFrames; }
|
||||
|
||||
void SetVoiceData(char *data, int len );
|
||||
int GetVoiceDataLen() const { return fVoiceData.length(); }
|
||||
@ -777,8 +777,8 @@ private:
|
||||
protected:
|
||||
bool fLockRequest;
|
||||
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
plNetMsgSharedState() : fLockRequest(false) {}
|
||||
~plNetMsgSharedState() {}
|
||||
@ -822,8 +822,8 @@ class plNetMsgGetSharedState : public plNetMsgObject
|
||||
protected:
|
||||
char fSharedStateName[kMaxNameLen];
|
||||
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
plNetMsgGetSharedState() { *fSharedStateName=0; SetBit(kNeedsReliableSend); }
|
||||
~plNetMsgGetSharedState() {}
|
||||
@ -844,8 +844,8 @@ protected:
|
||||
plNetMsgObjectListHelper fObjectListHelper;
|
||||
float fMaxUpdateFreq; // in secs
|
||||
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
plNetMsgObjectUpdateFilter() : fMaxUpdateFreq(-1) {}
|
||||
~plNetMsgObjectUpdateFilter() {}
|
||||
@ -879,8 +879,8 @@ class plNetMsgMembersList : public plNetMsgServerToClient
|
||||
protected:
|
||||
plNetMsgMemberListHelper fMemberListHelper;
|
||||
protected:
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
CLASSNAME_REGISTER( plNetMsgMembersList );
|
||||
GETINTERFACE_ANY_AUX(plNetMsgMembersList,plNetMsgServerToClient,plNetMsgMemberListHelper,fMemberListHelper)
|
||||
@ -897,8 +897,8 @@ protected:
|
||||
plNetMsgMemberInfoHelper fMemberInfo;
|
||||
bool fAddMember; // else remove member
|
||||
protected:
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
CLASSNAME_REGISTER( plNetMsgMemberUpdate );
|
||||
GETINTERFACE_ANY_AUX(plNetMsgMemberUpdate,plNetMsgServerToClient,plNetMsgMemberInfoHelper,fMemberInfo)
|
||||
@ -922,8 +922,8 @@ private:
|
||||
plNetMsgReceiversListHelper fReceivers; // used by server, the players we're listening to
|
||||
bool fAdding; // else removing
|
||||
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
plNetMsgListenListUpdate() : fAdding(false) {}
|
||||
~plNetMsgListenListUpdate() {}
|
||||
@ -944,15 +944,15 @@ public:
|
||||
///////////////////////////////////////////////////////////////////
|
||||
class plNetMsgInitialAgeStateSent : public plNetMsgServerToClient
|
||||
{
|
||||
UInt32 fNumInitialSDLStates;
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
uint32_t fNumInitialSDLStates;
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
plNetMsgInitialAgeStateSent():fNumInitialSDLStates(0){}
|
||||
CLASSNAME_REGISTER( plNetMsgInitialAgeStateSent );
|
||||
GETINTERFACE_ANY( plNetMsgInitialAgeStateSent, plNetMsgServerToClient);
|
||||
void SetNumInitialSDLStates( UInt32 n ) { fNumInitialSDLStates=n; }
|
||||
UInt32 GetNumInitialSDLStates() const { return fNumInitialSDLStates; }
|
||||
void SetNumInitialSDLStates( uint32_t n ) { fNumInitialSDLStates=n; }
|
||||
uint32_t GetNumInitialSDLStates() const { return fNumInitialSDLStates; }
|
||||
};
|
||||
|
||||
//
|
||||
@ -964,8 +964,8 @@ protected:
|
||||
hsBitVector fRegionsImIn;
|
||||
hsBitVector fRegionsICareAbout;
|
||||
|
||||
int IPokeBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, UInt32 peekOptions=0);
|
||||
int IPokeBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
int IPeekBuffer(hsStream* stream, uint32_t peekOptions=0);
|
||||
public:
|
||||
plNetMsgRelevanceRegions() { SetBit(kNeedsReliableSend); }
|
||||
~plNetMsgRelevanceRegions() {}
|
||||
|
@ -59,14 +59,14 @@ plNetMsgStreamableHelper & plNetMsgStreamableHelper::operator =(hsStreamable * v
|
||||
return *this;
|
||||
}
|
||||
|
||||
int plNetMsgStreamableHelper::Poke(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgStreamableHelper::Poke(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
hsAssert(fObject, "plNetMsgStreamableHelper::Poke: fObject not set.");
|
||||
fObject->Write(stream);
|
||||
return stream->GetPosition();
|
||||
}
|
||||
|
||||
int plNetMsgStreamableHelper::Peek(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgStreamableHelper::Peek(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
hsAssert(fObject, "plNetMsgStreamableHelper::Peek: fObject not set.");
|
||||
fObject->Read(stream);
|
||||
@ -117,18 +117,18 @@ plCreatable * plNetMsgCreatableHelper::GetObject()
|
||||
return fCreatable;
|
||||
}
|
||||
|
||||
int plNetMsgCreatableHelper::Poke(hsStream * s, UInt32 peekOptions)
|
||||
int plNetMsgCreatableHelper::Poke(hsStream * s, uint32_t peekOptions)
|
||||
{
|
||||
hsAssert(fCreatable,"plNetMsgCreatableHelper::Poke: fCreatable not set");
|
||||
UInt16 classIndex = fCreatable->ClassIndex();
|
||||
uint16_t classIndex = fCreatable->ClassIndex();
|
||||
s->WriteLE(classIndex);
|
||||
fCreatable->Write(s,nil);
|
||||
return s->GetPosition();
|
||||
}
|
||||
|
||||
int plNetMsgCreatableHelper::Peek(hsStream * s, UInt32 peekOptions)
|
||||
int plNetMsgCreatableHelper::Peek(hsStream * s, uint32_t peekOptions)
|
||||
{
|
||||
UInt16 classIndex;
|
||||
uint16_t classIndex;
|
||||
s->LogSubStreamStart("push me");
|
||||
s->LogReadLE(&classIndex,"ClassIdx");
|
||||
SetObject(plFactory::Create(classIndex));
|
||||
@ -160,7 +160,7 @@ void plNetMsgStreamHelper::Clear()
|
||||
fCompressionThreshold = kDefaultCompressionThreshold;
|
||||
}
|
||||
|
||||
int plNetMsgStreamHelper::Poke(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgStreamHelper::Poke(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
if ( !(peekOptions & plNetMessage::kDontCompress) )
|
||||
Compress();
|
||||
@ -171,7 +171,7 @@ int plNetMsgStreamHelper::Poke(hsStream* stream, UInt32 peekOptions)
|
||||
return stream->GetPosition();
|
||||
}
|
||||
|
||||
int plNetMsgStreamHelper::Peek(hsStream* stream, const UInt32 peekOptions)
|
||||
int plNetMsgStreamHelper::Peek(hsStream* stream, const uint32_t peekOptions)
|
||||
{
|
||||
stream->LogSubStreamStart("Stream Helper");
|
||||
stream->LogReadLE(&fUncompressedSize,"UncompressedSize");
|
||||
@ -187,7 +187,7 @@ int plNetMsgStreamHelper::Peek(hsStream* stream, const UInt32 peekOptions)
|
||||
stream->LogRead(fStreamLen, fStreamBuf,"StreamData");
|
||||
if ( !(peekOptions & plNetMessage::kDontCompress) )
|
||||
Uncompress();
|
||||
fStreamType = *(Int16*)fStreamBuf; // grab from start fo stream
|
||||
fStreamType = *(int16_t*)fStreamBuf; // grab from start fo stream
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -233,28 +233,28 @@ void plNetMsgStreamHelper::WriteVersion(hsStream* s, hsResMgr* mgr)
|
||||
s->Write(fStreamLen,fStreamBuf);
|
||||
}
|
||||
|
||||
void plNetMsgStreamHelper::IAllocStream(UInt32 len)
|
||||
void plNetMsgStreamHelper::IAllocStream(uint32_t len)
|
||||
{
|
||||
delete [] fStreamBuf;
|
||||
fStreamBuf=nil;
|
||||
fStreamLen=len;
|
||||
if (len)
|
||||
fStreamBuf = TRACKED_NEW UInt8[len];
|
||||
fStreamBuf = new uint8_t[len];
|
||||
}
|
||||
|
||||
void plNetMsgStreamHelper::CopyStream(hsStream* ssStream)
|
||||
{
|
||||
UInt32 len=ssStream->GetEOF();
|
||||
uint32_t len=ssStream->GetEOF();
|
||||
IAllocStream(len);
|
||||
ssStream->CopyToMem(fStreamBuf);
|
||||
fStreamType = *(Int16*)fStreamBuf;
|
||||
fStreamType = *(int16_t*)fStreamBuf;
|
||||
}
|
||||
|
||||
void plNetMsgStreamHelper::CopyStream(Int32 len, const void* buf)
|
||||
void plNetMsgStreamHelper::CopyStream(int32_t len, const void* buf)
|
||||
{
|
||||
IAllocStream(len);
|
||||
memcpy(fStreamBuf, buf, len);
|
||||
fStreamType = *(Int16*)fStreamBuf;
|
||||
fStreamType = *(int16_t*)fStreamBuf;
|
||||
}
|
||||
|
||||
void plNetMsgStreamHelper::CopyFrom(const plNetMsgStreamHelper* other)
|
||||
@ -270,16 +270,16 @@ bool plNetMsgStreamHelper::Compress(int offset)
|
||||
return true;
|
||||
|
||||
plZlibCompress compressor;
|
||||
UInt8* buf = (UInt8*)GetStreamBuf(); // skip creatable index
|
||||
UInt32 bufLen = GetStreamLen();
|
||||
UInt32 uncompressedSize = bufLen;
|
||||
uint8_t* buf = (uint8_t*)GetStreamBuf(); // skip creatable index
|
||||
uint32_t bufLen = GetStreamLen();
|
||||
uint32_t uncompressedSize = bufLen;
|
||||
SetUncompressedSize( uncompressedSize );
|
||||
if ( compressor.Compress( &buf, &bufLen, offset) )
|
||||
{
|
||||
SetCompressionType( plNetMessage::kCompressionZlib );
|
||||
SetStreamLen(bufLen);
|
||||
SetStreamBuf(buf);
|
||||
Int32 diff = uncompressedSize-bufLen;
|
||||
int32_t diff = uncompressedSize-bufLen;
|
||||
#if 0
|
||||
plNetApp::StaticDebugMsg( "\tCompressed stream: %lu->%lu bytes, (%s %d bytes, %.1f%%)",
|
||||
uncompressedSize, bufLen, (diff>=0)?"shrunk":"GREW?!?", diff, (diff/(float)uncompressedSize)*100 );
|
||||
@ -299,16 +299,16 @@ bool plNetMsgStreamHelper::Uncompress(int offset)
|
||||
if ( !IsCompressed() )
|
||||
return true;
|
||||
|
||||
UInt32 origLen = GetStreamLen();
|
||||
uint32_t origLen = GetStreamLen();
|
||||
plZlibCompress compressor;
|
||||
UInt8* buf = (UInt8*)GetStreamBuf();
|
||||
UInt32 bufLen = origLen;
|
||||
uint8_t* buf = (uint8_t*)GetStreamBuf();
|
||||
uint32_t bufLen = origLen;
|
||||
if ( compressor.Uncompress( &buf, &bufLen, GetUncompressedSize(), offset ) )
|
||||
{
|
||||
SetCompressionType( plNetMessage::kCompressionNone );
|
||||
SetStreamLen(bufLen);
|
||||
SetStreamBuf(buf);
|
||||
Int32 diff = bufLen-origLen;
|
||||
int32_t diff = bufLen-origLen;
|
||||
#if 0
|
||||
plNetApp::StaticDebugMsg( "\tUncompressed stream: %lu->%lu bytes, (%s %d bytes, %.1f%%)",
|
||||
origLen, bufLen, (diff>=0)?"grew":"SHRUNK?!?", diff, (diff/(float)bufLen)*100 );
|
||||
@ -347,14 +347,14 @@ plNetMsgObjectHelper & plNetMsgObjectHelper::operator =(const plNetMsgObjectHelp
|
||||
return *this;
|
||||
}
|
||||
|
||||
int plNetMsgObjectHelper::Poke(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgObjectHelper::Poke(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
fUoid.Write(stream);
|
||||
|
||||
return stream->GetPosition();
|
||||
}
|
||||
|
||||
int plNetMsgObjectHelper::Peek(hsStream* stream, const UInt32 peekOptions)
|
||||
int plNetMsgObjectHelper::Peek(hsStream* stream, const uint32_t peekOptions)
|
||||
{
|
||||
stream->LogSubStreamStart("push me");
|
||||
fUoid.Read(stream);
|
||||
@ -411,9 +411,9 @@ void plNetMsgObjectListHelper::Reset()
|
||||
fObjects.clear();
|
||||
}
|
||||
|
||||
int plNetMsgObjectListHelper::Poke(hsStream* stream, UInt32 peekOptions)
|
||||
int plNetMsgObjectListHelper::Poke(hsStream* stream, uint32_t peekOptions)
|
||||
{
|
||||
Int16 num = GetNumObjects();
|
||||
int16_t num = GetNumObjects();
|
||||
stream->WriteLE(num);
|
||||
int i;
|
||||
for( i=0 ;i<num ;i++ )
|
||||
@ -424,18 +424,18 @@ int plNetMsgObjectListHelper::Poke(hsStream* stream, UInt32 peekOptions)
|
||||
return stream->GetPosition();
|
||||
}
|
||||
|
||||
int plNetMsgObjectListHelper::Peek(hsStream* stream, const UInt32 peekOptions)
|
||||
int plNetMsgObjectListHelper::Peek(hsStream* stream, const uint32_t peekOptions)
|
||||
{
|
||||
Reset();
|
||||
|
||||
stream->LogSubStreamStart("push me");
|
||||
Int16 num;
|
||||
int16_t num;
|
||||
stream->LogReadLE(&num,"ObjectListHelper Num");
|
||||
|
||||
int i;
|
||||
for( i=0 ;i<num ;i++ )
|
||||
{
|
||||
fObjects.push_back(TRACKED_NEW plNetMsgObjectHelper);
|
||||
fObjects.push_back(new plNetMsgObjectHelper);
|
||||
GetObject(i)->Peek(stream, peekOptions);
|
||||
} // for
|
||||
stream->LogSubStreamEnd();
|
||||
@ -451,7 +451,7 @@ plNetMsgMemberInfoHelper::plNetMsgMemberInfoHelper()
|
||||
{
|
||||
}
|
||||
|
||||
int plNetMsgMemberInfoHelper::Peek(hsStream* s, const UInt32 peekOptions)
|
||||
int plNetMsgMemberInfoHelper::Peek(hsStream* s, const uint32_t peekOptions)
|
||||
{
|
||||
s->LogSubStreamStart("push me");
|
||||
s->LogReadLE(&fFlags,"MemberInfoHelper Flags");
|
||||
@ -461,7 +461,7 @@ int plNetMsgMemberInfoHelper::Peek(hsStream* s, const UInt32 peekOptions)
|
||||
return s->GetPosition();
|
||||
}
|
||||
|
||||
int plNetMsgMemberInfoHelper::Poke(hsStream* s, const UInt32 peekOptions)
|
||||
int plNetMsgMemberInfoHelper::Poke(hsStream* s, const uint32_t peekOptions)
|
||||
{
|
||||
s->WriteLE(fFlags);
|
||||
fClientGuid.Write( s, nil );
|
||||
@ -480,16 +480,16 @@ plNetMsgMemberListHelper::~plNetMsgMemberListHelper()
|
||||
delete fMembers[i];
|
||||
}
|
||||
|
||||
int plNetMsgMemberListHelper::Peek(hsStream* stream, const UInt32 peekOptions)
|
||||
int plNetMsgMemberListHelper::Peek(hsStream* stream, const uint32_t peekOptions)
|
||||
{
|
||||
Int16 numMembers;
|
||||
int16_t numMembers;
|
||||
stream->LogSubStreamStart("push me");
|
||||
stream->LogReadLE(&numMembers,"MemberListHelper NumMembers");
|
||||
fMembers.clear();
|
||||
int i;
|
||||
for(i=0;i<numMembers;i++)
|
||||
{
|
||||
plNetMsgMemberInfoHelper* addr=TRACKED_NEW plNetMsgMemberInfoHelper;
|
||||
plNetMsgMemberInfoHelper* addr=new plNetMsgMemberInfoHelper;
|
||||
addr->Peek(stream, peekOptions);
|
||||
AddMember(addr);
|
||||
}
|
||||
@ -497,9 +497,9 @@ int plNetMsgMemberListHelper::Peek(hsStream* stream, const UInt32 peekOptions)
|
||||
return stream->GetPosition();
|
||||
}
|
||||
|
||||
int plNetMsgMemberListHelper::Poke(hsStream* stream, const UInt32 peekOptions)
|
||||
int plNetMsgMemberListHelper::Poke(hsStream* stream, const uint32_t peekOptions)
|
||||
{
|
||||
Int16 numMembers = (Int16)GetNumMembers();
|
||||
int16_t numMembers = (int16_t)GetNumMembers();
|
||||
stream->WriteLE(numMembers);
|
||||
|
||||
int i;
|
||||
@ -519,9 +519,9 @@ int plNetMsgMemberListHelper::Poke(hsStream* stream, const UInt32 peekOptions)
|
||||
// plNetMsgReceiversListHelper - HELPER class
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
int plNetMsgReceiversListHelper::Peek(hsStream* stream, const UInt32 peekOptions)
|
||||
int plNetMsgReceiversListHelper::Peek(hsStream* stream, const uint32_t peekOptions)
|
||||
{
|
||||
UInt8 numIDs;
|
||||
uint8_t numIDs;
|
||||
stream->LogSubStreamStart("push me");
|
||||
stream->LogReadLE(&numIDs,"ReceiversListHelper NumIDs");
|
||||
|
||||
@ -529,7 +529,7 @@ int plNetMsgReceiversListHelper::Peek(hsStream* stream, const UInt32 peekOptions
|
||||
int i;
|
||||
for(i=0;i<numIDs;i++)
|
||||
{
|
||||
UInt32 ID;
|
||||
uint32_t ID;
|
||||
stream->LogReadLE(&ID,"ReceiversListHelper ID");
|
||||
AddReceiverPlayerID(ID);
|
||||
}
|
||||
@ -537,9 +537,9 @@ int plNetMsgReceiversListHelper::Peek(hsStream* stream, const UInt32 peekOptions
|
||||
return stream->GetPosition();
|
||||
}
|
||||
|
||||
int plNetMsgReceiversListHelper::Poke(hsStream* stream, const UInt32 peekOptions)
|
||||
int plNetMsgReceiversListHelper::Poke(hsStream* stream, const uint32_t peekOptions)
|
||||
{
|
||||
UInt8 numIDs = (UInt8)GetNumReceivers();
|
||||
uint8_t numIDs = (uint8_t)GetNumReceivers();
|
||||
stream->WriteLE(numIDs);
|
||||
|
||||
int i;
|
||||
@ -550,9 +550,9 @@ int plNetMsgReceiversListHelper::Poke(hsStream* stream, const UInt32 peekOptions
|
||||
}
|
||||
|
||||
|
||||
bool plNetMsgReceiversListHelper::RemoveReceiverPlayerID(UInt32 n)
|
||||
bool plNetMsgReceiversListHelper::RemoveReceiverPlayerID(uint32_t n)
|
||||
{
|
||||
std::vector<UInt32>::iterator res = std::find(fPlayerIDList.begin(), fPlayerIDList.end(), n);
|
||||
std::vector<uint32_t>::iterator res = std::find(fPlayerIDList.begin(), fPlayerIDList.end(), n);
|
||||
if (res != fPlayerIDList.end())
|
||||
{
|
||||
fPlayerIDList.erase(res);
|
||||
|
@ -47,8 +47,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// in to avoid multiple derivation by net messages.
|
||||
//
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "hsUtils.h"
|
||||
#include "HeadSpin.h"
|
||||
|
||||
#include "hsStream.h"
|
||||
#include "hsStlUtils.h"
|
||||
#include "pnNetCommon/pnNetCommon.h"
|
||||
@ -80,8 +80,8 @@ public:
|
||||
GETINTERFACE_ANY(plNetMsgStreamableHelper, plCreatable);
|
||||
void SetObject(hsStreamable * object) { fObject=object;}
|
||||
hsStreamable * GetObject() const { return fObject;}
|
||||
int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
int Poke(hsStream* stream, uint32_t peekOptions=0);
|
||||
int Peek(hsStream* stream, uint32_t peekOptions=0);
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -106,8 +106,8 @@ public:
|
||||
GETINTERFACE_ANY(plNetMsgCreatableHelper, plCreatable);
|
||||
void SetObject(plCreatable * object);
|
||||
plCreatable * GetObject();
|
||||
int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
int Poke(hsStream* stream, uint32_t peekOptions=0);
|
||||
int Peek(hsStream* stream, uint32_t peekOptions=0);
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -125,14 +125,14 @@ private:
|
||||
kCompressionType,
|
||||
};
|
||||
protected:
|
||||
UInt32 fUncompressedSize;
|
||||
Int16 fStreamType; // set to creatable type, not read/written, gleaned from creatable stream
|
||||
UInt8* fStreamBuf;
|
||||
UInt32 fStreamLen;
|
||||
UInt8 fCompressionType; // see plNetMessage::CompressionType
|
||||
UInt32 fCompressionThreshold; // NOT WRITTEN
|
||||
uint32_t fUncompressedSize;
|
||||
int16_t fStreamType; // set to creatable type, not read/written, gleaned from creatable stream
|
||||
uint8_t* fStreamBuf;
|
||||
uint32_t fStreamLen;
|
||||
uint8_t fCompressionType; // see plNetMessage::CompressionType
|
||||
uint32_t fCompressionThreshold; // NOT WRITTEN
|
||||
|
||||
void IAllocStream(UInt32 len);
|
||||
void IAllocStream(uint32_t len);
|
||||
|
||||
public:
|
||||
enum { kDefaultCompressionThreshold = 255 }; // bytes
|
||||
@ -143,8 +143,8 @@ public:
|
||||
CLASSNAME_REGISTER( plNetMsgStreamHelper );
|
||||
GETINTERFACE_ANY(plNetMsgStreamHelper, plCreatable);
|
||||
|
||||
virtual int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Poke(hsStream* stream, uint32_t peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, uint32_t peekOptions=0);
|
||||
|
||||
// creatable ops
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr) { Peek(s); }
|
||||
@ -158,27 +158,27 @@ public:
|
||||
// copiers
|
||||
void CopyFrom(const plNetMsgStreamHelper* other);
|
||||
void CopyStream(hsStream* ssStream); // copies to fStream
|
||||
void CopyStream(Int32 len, const void* buf); // copies to fStream
|
||||
void CopyStream(int32_t len, const void* buf); // copies to fStream
|
||||
|
||||
// setters
|
||||
void SetCompressionType(UInt8 t) { fCompressionType=t; }
|
||||
void SetStreamLen(UInt32 l) { fStreamLen=l; }
|
||||
void SetStreamBuf(UInt8* b) { fStreamBuf=b; }
|
||||
void SetUncompressedSize(UInt32 s) { fUncompressedSize=s; }
|
||||
void SetCompressionType(uint8_t t) { fCompressionType=t; }
|
||||
void SetStreamLen(uint32_t l) { fStreamLen=l; }
|
||||
void SetStreamBuf(uint8_t* b) { fStreamBuf=b; }
|
||||
void SetUncompressedSize(uint32_t s) { fUncompressedSize=s; }
|
||||
|
||||
// Getters
|
||||
UInt8 GetCompressionType() const { return fCompressionType; }
|
||||
Int16 GetStreamType() const { return fStreamType; }
|
||||
UInt32 GetStreamLen() const { return fStreamLen; }
|
||||
UInt8* GetStreamBuf() const { return fStreamBuf; }
|
||||
UInt32 GetUncompressedSize() const { return fUncompressedSize; }
|
||||
uint8_t GetCompressionType() const { return fCompressionType; }
|
||||
int16_t GetStreamType() const { return fStreamType; }
|
||||
uint32_t GetStreamLen() const { return fStreamLen; }
|
||||
uint8_t* GetStreamBuf() const { return fStreamBuf; }
|
||||
uint32_t GetUncompressedSize() const { return fUncompressedSize; }
|
||||
|
||||
bool Compress(int offset=2 /* skip 2 bytes as creatable index */ );
|
||||
bool Uncompress(int offset=2 /* skip 2 bytes as creatable index */ );
|
||||
bool IsCompressed() const;
|
||||
bool IsCompressable() const;
|
||||
UInt32 GetCompressionThreshold() const { return fCompressionThreshold; }
|
||||
void SetCompressionThreshold( UInt32 v ) { fCompressionThreshold=v; }
|
||||
uint32_t GetCompressionThreshold() const { return fCompressionThreshold; }
|
||||
void SetCompressionThreshold( uint32_t v ) { fCompressionThreshold=v; }
|
||||
};
|
||||
|
||||
//
|
||||
@ -203,8 +203,8 @@ public:
|
||||
CLASSNAME_REGISTER( plNetMsgObjectHelper );
|
||||
GETINTERFACE_ANY(plNetMsgObjectHelper, plCreatable);
|
||||
|
||||
virtual int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Poke(hsStream* stream, uint32_t peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, uint32_t peekOptions=0);
|
||||
|
||||
plNetMsgObjectHelper & operator =(const plNetMsgObjectHelper & other);
|
||||
|
||||
@ -214,7 +214,7 @@ public:
|
||||
|
||||
// getters
|
||||
const plString& GetObjectName() const { return fUoid.GetObjectName(); }
|
||||
UInt32 GetPageID() const { return fUoid.GetLocation().GetSequenceNumber(); }
|
||||
uint32_t GetPageID() const { return fUoid.GetLocation().GetSequenceNumber(); }
|
||||
const plUoid& GetUoid() const { return fUoid; }
|
||||
|
||||
void ReadVersion(hsStream* s, hsResMgr* mgr);
|
||||
@ -235,13 +235,13 @@ public:
|
||||
CLASSNAME_REGISTER( plNetMsgObjectListHelper );
|
||||
GETINTERFACE_ANY(plNetMsgObjectListHelper, plCreatable);
|
||||
|
||||
virtual int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Poke(hsStream* stream, uint32_t peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, uint32_t peekOptions=0);
|
||||
|
||||
void Reset();
|
||||
int GetNumObjects() const { return fObjects.size(); }
|
||||
plNetMsgObjectHelper* GetObject(int i) { return fObjects[i]; }
|
||||
void AddObject(plKey key) { fObjects.push_back(TRACKED_NEW plNetMsgObjectHelper(key)); }
|
||||
void AddObject(plKey key) { fObjects.push_back(new plNetMsgObjectHelper(key)); }
|
||||
};
|
||||
|
||||
//
|
||||
@ -250,7 +250,7 @@ public:
|
||||
class plNetMsgMemberInfoHelper : public plCreatable
|
||||
{
|
||||
protected:
|
||||
UInt32 fFlags;
|
||||
uint32_t fFlags;
|
||||
plUoid fAvatarUoid;
|
||||
plClientGuid fClientGuid;
|
||||
public:
|
||||
@ -259,16 +259,16 @@ public:
|
||||
CLASSNAME_REGISTER( plNetMsgMemberInfoHelper );
|
||||
GETINTERFACE_ANY( plNetMsgMemberInfoHelper, plCreatable);
|
||||
|
||||
virtual int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Poke(hsStream* stream, uint32_t peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, uint32_t peekOptions=0);
|
||||
|
||||
const plClientGuid * GetClientGuid() const { return &fClientGuid; }
|
||||
plClientGuid * GetClientGuid() { return &fClientGuid; }
|
||||
|
||||
UInt32 GetFlags() const { return fFlags; }
|
||||
uint32_t GetFlags() const { return fFlags; }
|
||||
plUoid GetAvatarUoid() const { return fAvatarUoid; }
|
||||
|
||||
void SetFlags(UInt32 v) { fFlags=v; }
|
||||
void SetFlags(uint32_t v) { fFlags=v; }
|
||||
void SetAvatarUoid(plUoid u) { fAvatarUoid=u; }
|
||||
};
|
||||
|
||||
@ -282,8 +282,8 @@ public:
|
||||
typedef std::vector<plNetMsgMemberInfoHelper*> MemberInfoHelperVec;
|
||||
struct MatchesPlayerID
|
||||
{
|
||||
UInt32 fID;
|
||||
MatchesPlayerID( UInt32 id ): fID( id ){}
|
||||
uint32_t fID;
|
||||
MatchesPlayerID( uint32_t id ): fID( id ){}
|
||||
bool operator()( const plNetMsgMemberInfoHelper * mbr ) const
|
||||
{
|
||||
return ( mbr && mbr->GetClientGuid()->GetPlayerID()==fID );
|
||||
@ -300,8 +300,8 @@ public:
|
||||
CLASSNAME_REGISTER( plNetMsgMemberListHelper );
|
||||
GETINTERFACE_ANY( plNetMsgMemberListHelper, plCreatable);
|
||||
|
||||
virtual int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Poke(hsStream* stream, uint32_t peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, uint32_t peekOptions=0);
|
||||
|
||||
int GetNumMembers() const { return fMembers.size(); }
|
||||
const plNetMsgMemberInfoHelper* GetMember(int i) const { return fMembers[i]; }
|
||||
@ -320,7 +320,7 @@ public:
|
||||
class plNetMsgReceiversListHelper : public plCreatable
|
||||
{
|
||||
protected:
|
||||
std::vector<UInt32> fPlayerIDList;
|
||||
std::vector<uint32_t> fPlayerIDList;
|
||||
public:
|
||||
plNetMsgReceiversListHelper() {}
|
||||
virtual ~plNetMsgReceiversListHelper() {}
|
||||
@ -328,14 +328,14 @@ public:
|
||||
CLASSNAME_REGISTER( plNetMsgReceiversListHelper );
|
||||
GETINTERFACE_ANY( plNetMsgReceiversListHelper, plCreatable);
|
||||
|
||||
virtual int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Poke(hsStream* stream, uint32_t peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, uint32_t peekOptions=0);
|
||||
|
||||
void Clear() { fPlayerIDList.clear(); }
|
||||
int GetNumReceivers() const { return fPlayerIDList.size(); }
|
||||
UInt32 GetReceiverPlayerID(int i) const { return fPlayerIDList[i]; }
|
||||
void AddReceiverPlayerID(UInt32 a) { fPlayerIDList.push_back(a); }
|
||||
bool RemoveReceiverPlayerID(UInt32 n); // returns true if found and removed
|
||||
uint32_t GetReceiverPlayerID(int i) const { return fPlayerIDList[i]; }
|
||||
void AddReceiverPlayerID(uint32_t a) { fPlayerIDList.push_back(a); }
|
||||
bool RemoveReceiverPlayerID(uint32_t n); // returns true if found and removed
|
||||
};
|
||||
|
||||
|
||||
|
@ -58,7 +58,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
9 07/01/02 rje Changed Authentication Scheme
|
||||
10 10/16/02 eap Removed low-level KI. Replaced with plVault.
|
||||
11 07/03/03 MT Optimized plNetMessage headers for size
|
||||
12 09/17/03 eap Removed UInt32 acctID. Added Uuid acctUUID. Changed PlayerUpdate enum values.
|
||||
12 09/17/03 eap Removed uint32_t acctID. Added Uuid acctUUID. Changed PlayerUpdate enum values.
|
||||
*/
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
1 10/15/02 thamer minor changes for CCR
|
||||
2 11/04/02 eap Changed plNetMsgVault format.
|
||||
3 12/04/02 eap Moved compression into plNetMsgStreamHelper. Changed plNetMsgVault format.
|
||||
4 12/04/02 eap Changed plNetMsgStreamHelper fUncompressedSize type to UInt32.
|
||||
4 12/04/02 eap Changed plNetMsgStreamHelper fUncompressedSize type to uint32_t.
|
||||
5 12/05/02 eap Added PlayerName and AvatarShape to CreatePlayer msg.
|
||||
6 12/11/02 thamer Moved PlayerID into the base class
|
||||
7 12/18/02 thamer Changed SDL format
|
||||
@ -111,7 +111,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
12 02/05/03 thamer Added initial age state to joinAck
|
||||
13 02/10/03 eap Changed format of vault FetchNodes msg to support bundling of multiple nodes into one msg.
|
||||
14 02/12/03 eap Changed the way ages are (un)registered. client used to do it. now vault server does it.
|
||||
15 02/24/03 eap Added a byte to plNetMsgLeave to specify the reason for leaving.
|
||||
15 02/24/03 eap Added a uint8_t to plNetMsgLeave to specify the reason for leaving.
|
||||
16 02/25/03 thamer Changed the auth response generation
|
||||
17 02/26/03 thamer again
|
||||
18 02/28/03 eap Support for multiple spawn points for vault age link nodes.
|
||||
|
Reference in New Issue
Block a user