1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +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:
2012-01-28 17:20:01 -08:00
1722 changed files with 24149 additions and 27599 deletions

View File

@ -56,7 +56,7 @@ public:
// flags should be either:
// plRefMsg::kOnRequest - I'm adding this child to the receiver
// plRefMsg::kOnRemove - I'm detaching this child from the receiver
plAttachMsg(const plKey &rcv, hsKeyedObject* child, UInt8 context, const plKey snd=nil) : plRefMsg(rcv, context) { SetSender(snd); SetRef(child); }
plAttachMsg(const plKey &rcv, hsKeyedObject* child, uint8_t context, const plKey snd=nil) : plRefMsg(rcv, context) { SetSender(snd); SetRef(child); }
CLASSNAME_REGISTER( plAttachMsg );
GETINTERFACE_ANY( plAttachMsg, plRefMsg );

View File

@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsTypes.h"
#include "HeadSpin.h"
#include "plCameraMsg.h"
#include "hsStream.h"
#include "hsResMgr.h"

View File

@ -82,13 +82,13 @@ public:
int fType;
hsPoint3 fOffset;
hsScalar fAccel;
hsScalar fDecel;
hsScalar fVel;
hsScalar fFPAccel;
hsScalar fFPDecel;
hsScalar fFPVel;
hsScalar fFOVw, fFOVh;
float fAccel;
float fDecel;
float fVel;
float fFPAccel;
float fFPDecel;
float fFPVel;
float fFOVw, fFOVh;
hsBool fWorldspace;
void Read(hsStream* stream);

View File

@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "plClientMsg.h"
#include "hsTypes.h"
#include "HeadSpin.h"
void plClientMsg::IReset()
{

View File

@ -46,7 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnMessage/plRefMsg.h"
#include "hsStream.h"
#include "hsResMgr.h"
#include "hsUtils.h"
#include "hsStlUtils.h"
#include "pnKeyedObject/plUoid.h"
@ -139,15 +139,15 @@ public:
plClientRefMsg(): fType(-1), fWhich(-1) {};
plClientRefMsg(const plKey &r, UInt8 refMsgFlags, Int8 which , Int8 type)
plClientRefMsg(const plKey &r, uint8_t refMsgFlags, int8_t which , int8_t type)
: plRefMsg(r, refMsgFlags), fType(type), fWhich(which) {}
CLASSNAME_REGISTER( plClientRefMsg );
GETINTERFACE_ANY( plClientRefMsg, plRefMsg );
Int8 fType;
Int8 fWhich;
int8_t fType;
int8_t fWhich;
// IO - not really applicable to ref msgs, but anyway
void Read(hsStream* stream, hsResMgr* mgr)

View File

@ -80,7 +80,7 @@ public:
hsBitVector fCmd;
plControlConfig* fInterface;
UInt32 fControlCode;
uint32_t fControlCode;
int fIndex;
hsBool Cmd(int n) { return fCmd.IsBitSet(n); }

View File

@ -54,17 +54,17 @@ public:
kAddingSpan,
kRemovingSpan
};
UInt8 fType;
uint8_t fType;
enum {
kLeaveEmptyDrawable = 0x1
};
UInt8 fFlags;
uint8_t fFlags;
Int32 fIndex;
int32_t fIndex;
plDISpansMsg() : plMessage(), fType(0), fFlags(0), fIndex(-1) {}
plDISpansMsg(const plKey &r, UInt8 type, int index, int flags) : plMessage(nil, r, nil), fType(type), fIndex(index), fFlags(flags) {}
plDISpansMsg(const plKey &r, uint8_t type, int index, int flags) : plMessage(nil, r, nil), fType(type), fIndex(index), fFlags(flags) {}
CLASSNAME_REGISTER( plDISpansMsg );
GETINTERFACE_ANY( plDISpansMsg, plMessage );

View File

@ -70,9 +70,9 @@ public:
void SetCmd(int n) { fCmd.SetBit(n); }
void ClearCmd() { fCmd.Clear(); }
void AddType(UInt16 t) { fTypes.SetBit(t); }
void RemoveType(UInt16 t) { fTypes.ClearBit(t); }
hsBool Type(UInt16 t) const { return fTypes.IsBitSet(t); }
void AddType(uint16_t t) { fTypes.SetBit(t); }
void RemoveType(uint16_t t) { fTypes.ClearBit(t); }
hsBool Type(uint16_t t) const { return fTypes.IsBitSet(t); }
const hsBitVector& Types() const { return fTypes; }
plEnableMsg() { }

View File

@ -65,12 +65,12 @@ class plEventCallbackMsg : public plMessage
protected:
public:
hsScalar fEventTime; // the time for time events
float fEventTime; // the time for time events
CallbackEvent fEvent; // the event
Int16 fIndex; // the index of the object we want the event to come from
int16_t fIndex; // the index of the object we want the event to come from
// (where applicable, required for sounds)
Int16 fRepeats; // -1 for infinite repeats, 0 for one call, no repeats
Int16 fUser; // User defined data, useful for keeping track of multiple callbacks
int16_t fRepeats; // -1 for infinite repeats, 0 for one call, no repeats
int16_t fUser; // User defined data, useful for keeping track of multiple callbacks
plEventCallbackMsg() : fEventTime(0.0f), fEvent((CallbackEvent)0), fRepeats(-1), fUser(0), fIndex(0) {;}
plEventCallbackMsg (const plKey &s,
@ -79,7 +79,7 @@ public:
plMessage(s, r, t),
fEventTime(0.0f), fEvent((CallbackEvent)0), fRepeats(-1), fUser(0), fIndex(0) {;}
plEventCallbackMsg(const plKey &receiver, CallbackEvent e, int idx=0, hsScalar t=0, Int16 repeats=-1, UInt16 user=0) :
plEventCallbackMsg(const plKey &receiver, CallbackEvent e, int idx=0, float t=0, int16_t repeats=-1, uint16_t user=0) :
plMessage(nil, receiver, nil), fEvent(e), fIndex(idx), fEventTime(t), fRepeats(repeats), fUser(user) {}
~plEventCallbackMsg(){;}
@ -101,7 +101,7 @@ public:
{
plMessage::IMsgWrite(stream, mgr);
stream->WriteLEFloat(fEventTime);
stream->WriteLE16((Int16)fEvent);
stream->WriteLE16((int16_t)fEvent);
stream->WriteLE16(fIndex);
stream->WriteLE16(fRepeats);
stream->WriteLE16(fUser);

View File

@ -65,14 +65,14 @@ public:
};
plIntRefMsg() : fType(-1), fWhich(-1), fIdx(-1) {}
plIntRefMsg(const plKey &r, UInt8 flags, Int32 which, Int8 type, Int8 idx=-1) : plRefMsg(r, flags), fWhich((Int16)which), fType(type), fIdx(idx) {}
plIntRefMsg(const plKey &r, uint8_t flags, int32_t which, int8_t type, int8_t idx=-1) : plRefMsg(r, flags), fWhich((int16_t)which), fType(type), fIdx(idx) {}
CLASSNAME_REGISTER( plIntRefMsg );
GETINTERFACE_ANY( plIntRefMsg, plRefMsg );
Int8 fType;
Int8 fIdx;
Int16 fWhich;
int8_t fType;
int8_t fIdx;
int16_t fWhich;
// IO - not really applicable to ref msgs, but anyway
void Read(hsStream* stream, hsResMgr* mgr)

View File

@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsTypes.h"
#include "HeadSpin.h"
#define PLMESSAGE_PRIVATE
#include "plMessage.h"
#include "hsStream.h"
@ -84,7 +84,7 @@ plMessage::~plMessage()
}
plMessage& plMessage::SetNumReceivers(int n) { fReceivers.SetCount(n); return *this; }
UInt32 plMessage::GetNumReceivers() const { return fReceivers.GetCount(); }
uint32_t plMessage::GetNumReceivers() const { return fReceivers.GetCount(); }
const plKey& plMessage::GetReceiver(int i) const { return fReceivers[i]; }
plMessage& plMessage::RemoveReceiver(int i) { fReceivers.Remove(i); return *this; }
@ -200,24 +200,24 @@ void plMessage::IMsgWriteVersion(hsStream* s, hsResMgr* mgr)
s->WriteLE32(fBCastFlags);
}
void plMessage::AddNetReceiver( UInt32 plrID )
void plMessage::AddNetReceiver( uint32_t plrID )
{
if ( !fNetRcvrPlayerIDs )
fNetRcvrPlayerIDs = TRACKED_NEW std::vector<UInt32>;
fNetRcvrPlayerIDs = new std::vector<uint32_t>;
fNetRcvrPlayerIDs->push_back( plrID );
}
void plMessage::AddNetReceivers( const std::vector<UInt32> & plrIDs )
void plMessage::AddNetReceivers( const std::vector<uint32_t> & plrIDs )
{
if ( !fNetRcvrPlayerIDs )
fNetRcvrPlayerIDs = TRACKED_NEW std::vector<UInt32>;
fNetRcvrPlayerIDs = new std::vector<uint32_t>;
std::copy( plrIDs.begin(), plrIDs.end(), std::back_inserter( *fNetRcvrPlayerIDs ) );
}
/////////////////////////////////////////////////////////////////
// STATIC
int plMsgStdStringHelper::Poke(const std::string & stringref, hsStream* stream, const UInt32 peekOptions)
int plMsgStdStringHelper::Poke(const std::string & stringref, hsStream* stream, const uint32_t peekOptions)
{
plMessage::plStrLen strlen;
hsAssert( stringref.length()<0xFFFF, "buf too big for plMsgStdStringHelper" );
@ -228,16 +228,16 @@ int plMsgStdStringHelper::Poke(const std::string & stringref, hsStream* stream,
return stream->GetPosition();
}
int plMsgStdStringHelper::PokeBig(const std::string & stringref, hsStream* stream, const UInt32 peekOptions)
int plMsgStdStringHelper::PokeBig(const std::string & stringref, hsStream* stream, const uint32_t peekOptions)
{
UInt32 strlen = stringref.length();
uint32_t strlen = stringref.length();
stream->WriteLE(strlen);
if (strlen)
stream->Write(strlen,stringref.data());
return stream->GetPosition();
}
int plMsgStdStringHelper::Poke(const char * buf, UInt32 bufsz, hsStream* stream, const UInt32 peekOptions)
int plMsgStdStringHelper::Poke(const char * buf, uint32_t bufsz, hsStream* stream, const uint32_t peekOptions)
{
plMessage::plStrLen strlen;
hsAssert( bufsz<0xFFFF, "buf too big for plMsgStdStringHelper" );
@ -248,7 +248,7 @@ int plMsgStdStringHelper::Poke(const char * buf, UInt32 bufsz, hsStream* stream,
return stream->GetPosition();
}
int plMsgStdStringHelper::PokeBig(const char * buf, UInt32 bufsz, hsStream* stream, const UInt32 peekOptions)
int plMsgStdStringHelper::PokeBig(const char * buf, uint32_t bufsz, hsStream* stream, const uint32_t peekOptions)
{
stream->WriteLE(bufsz);
if (bufsz)
@ -269,7 +269,7 @@ int plMsgStdStringHelper::PokeBig(const plString & stringref, hsStream* stream,
}
// STATIC
int plMsgStdStringHelper::Peek(std::string & stringref, hsStream* stream, const UInt32 peekOptions)
int plMsgStdStringHelper::Peek(std::string & stringref, hsStream* stream, const uint32_t peekOptions)
{
plMessage::plStrLen strlen;
stream->LogSubStreamStart("push this");
@ -291,9 +291,9 @@ int plMsgStdStringHelper::Peek(std::string & stringref, hsStream* stream, const
return stream->GetPosition();
}
int plMsgStdStringHelper::PeekBig(std::string & stringref, hsStream* stream, const UInt32 peekOptions)
int plMsgStdStringHelper::PeekBig(std::string & stringref, hsStream* stream, const uint32_t peekOptions)
{
UInt32 bufsz;
uint32_t bufsz;
stream->LogSubStreamStart("push this");
stream->LogReadLE(&bufsz,"Bufsz");
stringref.erase();
@ -332,7 +332,7 @@ int plMsgStdStringHelper::PeekBig(plString & stringref, hsStream* stream, const
/////////////////////////////////////////////////////////////////
// STATIC
int plMsgXtlStringHelper::Poke(const xtl::istring & stringref, hsStream* stream, const UInt32 peekOptions)
int plMsgXtlStringHelper::Poke(const xtl::istring & stringref, hsStream* stream, const uint32_t peekOptions)
{
plMessage::plStrLen strlen;
strlen = stringref.length();
@ -343,7 +343,7 @@ int plMsgXtlStringHelper::Poke(const xtl::istring & stringref, hsStream* stream,
}
// STATIC
int plMsgXtlStringHelper::Peek(xtl::istring & stringref, hsStream* stream, const UInt32 peekOptions)
int plMsgXtlStringHelper::Peek(xtl::istring & stringref, hsStream* stream, const uint32_t peekOptions)
{
plMessage::plStrLen strlen;
stream->LogSubStreamStart("push me");
@ -365,7 +365,7 @@ int plMsgXtlStringHelper::Peek(xtl::istring & stringref, hsStream* stream, const
/////////////////////////////////////////////////////////////////
// STATIC
int plMsgCStringHelper::Poke(const char * str, hsStream* stream, const UInt32 peekOptions)
int plMsgCStringHelper::Poke(const char * str, hsStream* stream, const uint32_t peekOptions)
{
plMessage::plStrLen strlen;
strlen = (str)?hsStrlen(str):0;
@ -376,7 +376,7 @@ int plMsgCStringHelper::Poke(const char * str, hsStream* stream, const UInt32 pe
}
// STATIC
int plMsgCStringHelper::Peek(char *& str, hsStream* stream, const UInt32 peekOptions)
int plMsgCStringHelper::Peek(char *& str, hsStream* stream, const uint32_t peekOptions)
{
plMessage::plStrLen strlen;
stream->LogSubStreamStart("push me");
@ -387,7 +387,7 @@ int plMsgCStringHelper::Peek(char *& str, hsStream* stream, const UInt32 peekOpt
{
if (strlen)
{
str = TRACKED_NEW char[strlen+1];
str = new char[strlen+1];
str[strlen] = '\0';
if (strlen) {
stream->LogRead(strlen,str,"CString");
@ -417,14 +417,14 @@ int plMsgCStringHelper::Peek(plString & str, hsStream* stream, const UInt32 peek
/////////////////////////////////////////////////////////////////
// STATIC
int plMsgCArrayHelper::Poke(const void * buf, UInt32 bufsz, hsStream* stream, const UInt32 peekOptions)
int plMsgCArrayHelper::Poke(const void * buf, uint32_t bufsz, hsStream* stream, const uint32_t peekOptions)
{
stream->Write(bufsz,buf);
return stream->GetPosition();
}
// STATIC
int plMsgCArrayHelper::Peek(void * buf, UInt32 bufsz, hsStream* stream, const UInt32 peekOptions)
int plMsgCArrayHelper::Peek(void * buf, uint32_t bufsz, hsStream* stream, const uint32_t peekOptions)
{
stream->LogSubStreamStart("push me");
stream->LogRead(bufsz,buf,"CArray");

View File

@ -57,7 +57,7 @@ class plString;
class plMessage : public plCreatable
{
public:
typedef UInt16 plStrLen;
typedef uint16_t plStrLen;
enum plBCastFlags {
kBCastNone = 0x0,
@ -94,8 +94,8 @@ protected:
hsTArray<plKey> fReceivers;
double fTimeStamp;
UInt32 fBCastFlags;
std::vector<UInt32>* fNetRcvrPlayerIDs;
uint32_t fBCastFlags;
std::vector<uint32_t>* fNetRcvrPlayerIDs;
void IMsgRead(hsStream* stream, hsResMgr* mgr); // default read implementation
void IMsgWrite(hsStream* stream, hsResMgr* mgr); // default write implementation
@ -124,7 +124,7 @@ public:
plMessage& SetSender(const plKey &s) { fSender = s; return *this; }
plMessage& SetNumReceivers(int n);
UInt32 GetNumReceivers() const ;
uint32_t GetNumReceivers() const ;
const plKey& GetReceiver(int i) const;
plMessage& RemoveReceiver(int i);
@ -138,15 +138,15 @@ public:
const double GetTimeStamp() const { return fTimeStamp; }
plMessage& SetTimeStamp(double t) { fTimeStamp = t; return *this; }
hsBool HasBCastFlag(UInt32 f) const { return 0 != (fBCastFlags & f); }
plMessage& SetBCastFlag(UInt32 f, hsBool on=true) { if( on )fBCastFlags |= f; else fBCastFlags &= ~f; return *this; }
hsBool HasBCastFlag(uint32_t f) const { return 0 != (fBCastFlags & f); }
plMessage& SetBCastFlag(uint32_t f, hsBool on=true) { if( on )fBCastFlags |= f; else fBCastFlags &= ~f; return *this; }
void SetAllBCastFlags(UInt32 f) { fBCastFlags=f; }
UInt32 GetAllBCastFlags() const { return fBCastFlags; }
void SetAllBCastFlags(uint32_t f) { fBCastFlags=f; }
uint32_t GetAllBCastFlags() const { return fBCastFlags; }
void AddNetReceiver( UInt32 plrID );
void AddNetReceivers( const std::vector<UInt32> & plrIDs );
std::vector<UInt32>* GetNetReceivers() const { return fNetRcvrPlayerIDs; }
void AddNetReceiver( uint32_t plrID );
void AddNetReceivers( const std::vector<uint32_t> & plrIDs );
std::vector<uint32_t>* GetNetReceivers() const { return fNetRcvrPlayerIDs; }
// just before dispatching this message, drop into debugger
void SetBreakBeforeDispatch (bool on) { dispatchBreak = on; }
@ -168,16 +168,16 @@ public:
struct plMsgStdStringHelper
{
static int Poke(const std::string & stringref, hsStream* stream, const UInt32 peekOptions=0);
static int PokeBig(const std::string & stringref, hsStream* stream, const UInt32 peekOptions=0);
static int Poke(const char * buf, UInt32 bufsz, hsStream* stream, const UInt32 peekOptions=0);
static int PokeBig(const char * buf, UInt32 bufsz, hsStream* stream, const UInt32 peekOptions=0);
static int Poke(const plString & stringref, hsStream* stream, const UInt32 peekOptions=0);
static int PokeBig(const plString & stringref, hsStream* stream, const UInt32 peekOptions=0);
static int Peek(std::string & stringref, hsStream* stream, const UInt32 peekOptions=0);
static int PeekBig(std::string & stringref, hsStream* stream, const UInt32 peekOptions=0);
static int Peek(plString & stringref, hsStream* stream, const UInt32 peekOptions=0);
static int PeekBig(plString & stringref, hsStream* stream, const UInt32 peekOptions=0);
static int Poke(const std::string & stringref, hsStream* stream, const uint32_t peekOptions=0);
static int PokeBig(const std::string & stringref, hsStream* stream, const uint32_t peekOptions=0);
static int Poke(const char * buf, uint32_t bufsz, hsStream* stream, const uint32_t peekOptions=0);
static int PokeBig(const char * buf, uint32_t bufsz, hsStream* stream, const uint32_t peekOptions=0);
static int Poke(const plString & stringref, hsStream* stream, const uint32_t peekOptions=0);
static int PokeBig(const plString & stringref, hsStream* stream, const uint32_t peekOptions=0);
static int Peek(std::string & stringref, hsStream* stream, const uint32_t peekOptions=0);
static int PeekBig(std::string & stringref, hsStream* stream, const uint32_t peekOptions=0);
static int Peek(plString & stringref, hsStream* stream, const uint32_t peekOptions=0);
static int PeekBig(plString & stringref, hsStream* stream, const uint32_t peekOptions=0);
};
/////////////////////////////////////////////////////////////////
@ -185,8 +185,8 @@ struct plMsgStdStringHelper
struct plMsgXtlStringHelper
{
static int Poke(const xtl::istring & stringref, hsStream* stream, const UInt32 peekOptions=0);
static int Peek(xtl::istring & stringref, hsStream* stream, const UInt32 peekOptions=0);
static int Poke(const xtl::istring & stringref, hsStream* stream, const uint32_t peekOptions=0);
static int Peek(xtl::istring & stringref, hsStream* stream, const uint32_t peekOptions=0);
};
/////////////////////////////////////////////////////////////////
@ -194,23 +194,23 @@ struct plMsgXtlStringHelper
struct plMsgCStringHelper
{
static int Poke(const char * str, hsStream* stream, const UInt32 peekOptions=0);
static int Poke(const char * str, hsStream* stream, const uint32_t peekOptions=0);
// deletes str and reallocates. you must delete [] str;
static int Peek(char *& str, hsStream* stream, const UInt32 peekOptions=0);
static int Peek(char *& str, hsStream* stream, const uint32_t peekOptions=0);
static int Poke(const plString & str, hsStream* stream, const UInt32 peekOptions=0);
static int Peek(plString & str, hsStream* stream, const UInt32 peekOptions=0);
static int Poke(const plString & str, hsStream* stream, const uint32_t peekOptions=0);
static int Peek(plString & str, hsStream* stream, const uint32_t peekOptions=0);
};
/////////////////////////////////////////////////////////////////
// reads/writes your type [] field
// don't use with byte ordered types like Int16,32.
// fine for Int8, char, and IEEE formatted types like float, double.
// don't use with uint8_t ordered types like int16_t,32.
// fine for int8_t, char, and IEEE formatted types like float, double.
struct plMsgCArrayHelper
{
static int Poke(const void * buf, UInt32 bufsz, hsStream* stream, const UInt32 peekOptions=0);
static int Peek(void * buf, UInt32 bufsz, hsStream* stream, const UInt32 peekOptions=0);
static int Poke(const void * buf, uint32_t bufsz, hsStream* stream, const uint32_t peekOptions=0);
static int Peek(void * buf, uint32_t bufsz, hsStream* stream, const uint32_t peekOptions=0);
};

View File

@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsTypes.h"
#include "HeadSpin.h"
#include "plNodeChangeMsg.h"
#include "hsStream.h"
#include "hsResMgr.h"

View File

@ -60,7 +60,7 @@ public:
};
plNodeRefMsg() {}
plNodeRefMsg(const plKey &r, UInt8 flags, Int8 which, Int8 type) : plGenRefMsg(r, flags, which, type) {}
plNodeRefMsg(const plKey &r, uint8_t flags, int8_t which, int8_t type) : plGenRefMsg(r, flags, which, type) {}
CLASSNAME_REGISTER( plNodeRefMsg );
GETINTERFACE_ANY( plNodeRefMsg, plGenRefMsg );

View File

@ -247,7 +247,7 @@ void plNotifyMsg::AddCollisionEvent( hsBool enter, const plKey &other, const plK
}
// create the collision event record
proCollisionEventData* pED = TRACKED_NEW proCollisionEventData;
proCollisionEventData* pED = new proCollisionEventData;
pED->fEnter = enter;
pED->fHitter = other;
pED->fHittee = self;
@ -260,7 +260,7 @@ void plNotifyMsg::AddCollisionEvent( hsBool enter, const plKey &other, const plK
// PARAMETERS : event - the event type, as enumerated in plEventCallbackMsg.h
//
//
void plNotifyMsg::AddCallbackEvent( Int32 event )
void plNotifyMsg::AddCallbackEvent( int32_t event )
{
// remove records that are like the one being added
int num_recs = fEvents.GetCount();
@ -283,7 +283,7 @@ void plNotifyMsg::AddCallbackEvent( Int32 event )
}
// create the collision event record
proCallbackEventData* pED = TRACKED_NEW proCallbackEventData;
proCallbackEventData* pED = new proCallbackEventData;
pED->fEventType = event;
fEvents.Append(pED); // then add it to the list of event records
}
@ -295,7 +295,7 @@ void plNotifyMsg::AddCallbackEvent( Int32 event )
// PARAMETERS : state - the state for the responder to switch to before triggering
//
//
void plNotifyMsg::AddResponderStateEvent( Int32 state )
void plNotifyMsg::AddResponderStateEvent( int32_t state )
{
// remove records that are like the one being added
int num_recs = fEvents.GetCount();
@ -318,7 +318,7 @@ void plNotifyMsg::AddResponderStateEvent( Int32 state )
}
// create the collision event record
proResponderStateEventData* pED = TRACKED_NEW proResponderStateEventData;
proResponderStateEventData* pED = new proResponderStateEventData;
pED->fState = state;
fEvents.Append(pED); // then add it to the list of event records
}
@ -331,20 +331,20 @@ void plNotifyMsg::AddResponderStateEvent( Int32 state )
// : event - what was the event that happened
//
//
void plNotifyMsg::AddMultiStageEvent( Int32 stage, Int32 event, const plKey& avatar )
void plNotifyMsg::AddMultiStageEvent( int32_t stage, int32_t event, const plKey& avatar )
{
// we can have multi events of this type
// create the mutlistage event record
proMultiStageEventData* pED = TRACKED_NEW proMultiStageEventData;
proMultiStageEventData* pED = new proMultiStageEventData;
pED->fStage = stage;
pED->fEvent = event;
pED->fAvatar = avatar;
fEvents.Append(pED); // then add it to the list of event records
}
void plNotifyMsg::AddCoopEvent(UInt32 id, UInt16 serial)
void plNotifyMsg::AddCoopEvent(uint32_t id, uint16_t serial)
{
proCoopEventData *pED = TRACKED_NEW proCoopEventData;
proCoopEventData *pED = new proCoopEventData;
pED->fID = id;
pED->fSerial = serial;
fEvents.Append(pED);
@ -352,7 +352,7 @@ void plNotifyMsg::AddCoopEvent(UInt32 id, UInt16 serial)
void plNotifyMsg::AddSpawnedEvent (const plKey &spawner, const plKey &spawnee)
{
proSpawnedEventData* pED = TRACKED_NEW proSpawnedEventData();
proSpawnedEventData* pED = new proSpawnedEventData();
pED->fSpawner = spawner;
pED->fSpawnee = spawnee;
fEvents.Append(pED);
@ -393,7 +393,7 @@ void plNotifyMsg::AddActivateEvent( hsBool activate )
}
// create the collision event record
proActivateEventData* pED = TRACKED_NEW proActivateEventData;
proActivateEventData* pED = new proActivateEventData;
pED->fActive = true;
pED->fActivate = activate;
fEvents.Append(pED); // then add it to the list of event records
@ -435,7 +435,7 @@ void plNotifyMsg::AddPickEvent( const plKey &other, const plKey& self, hsBool en
}
// create the pick event record
proPickedEventData* pED = TRACKED_NEW proPickedEventData;
proPickedEventData* pED = new proPickedEventData;
pED->fPicker = other;
pED->fPicked = self;
pED->fEnabled = enabled;
@ -480,7 +480,7 @@ void plNotifyMsg::AddContainerEvent( const plKey &container, const plKey &contai
}
// create the pick event record
proContainedEventData* pED = TRACKED_NEW proContainedEventData;
proContainedEventData* pED = new proContainedEventData;
pED->fContained = contained;
pED->fContainer = container;
pED->fEntering = entering;
@ -502,7 +502,7 @@ void plNotifyMsg::AddContainerEvent( const plKey &container, const plKey &contai
// NOTE: To test for duplicate record, it only checks for records of the same type
// : Eventually, it might be wise to check if the same 'self' key also?
//
void plNotifyMsg::AddFacingEvent( const plKey &other, const plKey &self, hsScalar dot, hsBool enabled )
void plNotifyMsg::AddFacingEvent( const plKey &other, const plKey &self, float dot, hsBool enabled )
{
// remove records that are like the one being added
@ -526,7 +526,7 @@ void plNotifyMsg::AddFacingEvent( const plKey &other, const plKey &self, hsScala
}
// create the pick event record
proFacingEventData* pED = TRACKED_NEW proFacingEventData;
proFacingEventData* pED = new proFacingEventData;
pED->fFacer = other;
pED->fFacee = self;
pED->dot = dot;
@ -546,7 +546,7 @@ void plNotifyMsg::AddFacingEvent( const plKey &other, const plKey &self, hsScala
// NOTE: To test for duplicate record, it only checks for records of the same type
// : Eventually, it might be wise to check if the same 'self' key also?
//
void plNotifyMsg::AddControlKeyEvent( Int32 key, hsBool down )
void plNotifyMsg::AddControlKeyEvent( int32_t key, hsBool down )
{
// remove records that are like the one being added
int num_recs = fEvents.GetCount();
@ -569,7 +569,7 @@ void plNotifyMsg::AddControlKeyEvent( Int32 key, hsBool down )
}
// create the control key event record
proControlKeyEventData* pED = TRACKED_NEW proControlKeyEventData;
proControlKeyEventData* pED = new proControlKeyEventData;
pED->fControlKey = key;
pED->fDown = down;
fEvents.Append(pED); // then add it to the list of event records
@ -583,10 +583,10 @@ void plNotifyMsg::AddControlKeyEvent( Int32 key, hsBool down )
//
// PURPOSE : Add a variable event record to this notify message
//
void plNotifyMsg::AddVariableEvent( const char* name, hsScalar number )
void plNotifyMsg::AddVariableEvent( const char* name, float number )
{
// create the control key event record
proVariableEventData* pED = TRACKED_NEW proVariableEventData;
proVariableEventData* pED = new proVariableEventData;
pED->fName = hsStrcpy(nil,name);
// pED->fName = (char*)name;
pED->fDataType = proEventData::kNumber;
@ -606,7 +606,7 @@ void plNotifyMsg::AddVariableEvent( const char* name, hsScalar number )
void plNotifyMsg::AddVariableEvent( const char* name, const plKey &key )
{
// create the control key event record
proVariableEventData* pED = TRACKED_NEW proVariableEventData;
proVariableEventData* pED = new proVariableEventData;
pED->fName = hsStrcpy(nil,name);
// pED->fName = (char*)name;
pED->fDataType = proEventData::kKey;
@ -628,7 +628,7 @@ void plNotifyMsg::AddVariableEvent( const char* name, const plKey &key )
// NOTE: To test for duplicate record, it only checks for records of the same type
// : Eventually, it might be wise to check if the same 'self' key also?
//
void plNotifyMsg::AddClickDragEvent( const plKey& dragger, const plKey& dragee, hsScalar animPos )
void plNotifyMsg::AddClickDragEvent( const plKey& dragger, const plKey& dragee, float animPos )
{
// remove records that are like the one being added
int num_recs = fEvents.GetCount();
@ -651,7 +651,7 @@ void plNotifyMsg::AddClickDragEvent( const plKey& dragger, const plKey& dragee,
}
// create the control key event record
proClickDragEventData* pED = TRACKED_NEW proClickDragEventData;
proClickDragEventData* pED = new proClickDragEventData;
pED->picked = dragee;
pED->picker = dragger;
pED->animPos = animPos;
@ -694,7 +694,7 @@ void plNotifyMsg::AddOfferBookEvent(const plKey& offerer, int targetAge, int off
}
// create the control key event record
proOfferLinkingBookEventData* pED = TRACKED_NEW proOfferLinkingBookEventData;
proOfferLinkingBookEventData* pED = new proOfferLinkingBookEventData;
pED->offerer = offerer;
pED->targetAge = targetAge;
pED->offeree = offeree;
@ -713,7 +713,7 @@ void plNotifyMsg::AddOfferBookEvent(const plKey& offerer, int targetAge, int off
// NOTE: To test for duplicate record, it only checks for records of the same type
// : Eventually, it might be wise to check if the same 'self' key also?
//
void plNotifyMsg::AddBookEvent( UInt32 event, UInt32 linkID /*=0*/)
void plNotifyMsg::AddBookEvent( uint32_t event, uint32_t linkID /*=0*/)
{
// remove records that are like the one being added
int num_recs = fEvents.GetCount();
@ -736,7 +736,7 @@ void plNotifyMsg::AddBookEvent( UInt32 event, UInt32 linkID /*=0*/)
}
// create the control key event record
proBookEventData* pED = TRACKED_NEW proBookEventData;
proBookEventData* pED = new proBookEventData;
pED->fEvent = event;
pED->fLinkID = linkID;
fEvents.Append(pED); // then add it to the list of event records
@ -776,7 +776,7 @@ void plNotifyMsg::AddHitClimbingBlockerEvent(const plKey &blocker)
}
// create the control key event record
proClimbingBlockerHitEventData* pED = TRACKED_NEW proClimbingBlockerHitEventData;
proClimbingBlockerHitEventData* pED = new proClimbingBlockerHitEventData;
pED->fBlockerKey = blocker;
fEvents.Append(pED); // then add it to the list of event records
}
@ -790,7 +790,7 @@ void plNotifyMsg::AddHitClimbingBlockerEvent(const plKey &blocker)
//
// PURPOSE : Find the first record in the event records that is of type eventtype
//
proEventData* plNotifyMsg::FindEventRecord( Int32 eventtype )
proEventData* plNotifyMsg::FindEventRecord( int32_t eventtype )
{
// make sure that its a legal event type
if ( eventtype >= 0 && eventtype < proEventData::kNone )
@ -844,7 +844,7 @@ void plNotifyMsg::Read(hsStream* stream, hsResMgr* mgr)
stream->ReadLE(&fState);
fID = stream->ReadLE32();
// read in the variable part of the message
Int32 numberEDs = stream->ReadLE32();
int32_t numberEDs = stream->ReadLE32();
fEvents.SetCountAndZero(numberEDs);
if ( numberEDs > 0 )
{
@ -873,7 +873,7 @@ void plNotifyMsg::Write(hsStream* stream, hsResMgr* mgr)
stream->WriteLE(fState);
stream->WriteLE32(fID);
// then write the variable data
Int32 numberEDs = fEvents.Count();
int32_t numberEDs = fEvents.Count();
stream->WriteLE32(numberEDs);
if ( numberEDs > 0 )
{
@ -914,7 +914,7 @@ void plNotifyMsg::ReadVersion(hsStream* s, hsResMgr* mgr)
if (contentFlags.IsBitSet(kNotifyMsgEDs))
{
// read in the variable part of the message
Int32 numberEDs = s->ReadLE32();
int32_t numberEDs = s->ReadLE32();
fEvents.SetCountAndZero(numberEDs);
if (numberEDs > 0)
{
@ -955,7 +955,7 @@ void plNotifyMsg::WriteVersion(hsStream* s, hsResMgr* mgr)
s->WriteLE32(fID);
// kNotifyMsgEDs
Int32 numberEDs = fEvents.Count();
int32_t numberEDs = fEvents.Count();
s->WriteLE32(numberEDs);
if (numberEDs > 0)
{
@ -998,25 +998,25 @@ plKey plNotifyMsg::GetAvatarKey()
///////////////////////////////////////////////////////////////////////////////////////////
proEventData* proEventData::ICreateEventDataType(Int32 type)
proEventData* proEventData::ICreateEventDataType(int32_t type)
{
switch (type)
{
case kCollision: return TRACKED_NEW proCollisionEventData;
case kPicked: return TRACKED_NEW proPickedEventData;
case kControlKey: return TRACKED_NEW proControlKeyEventData;
case kVariable: return TRACKED_NEW proVariableEventData;
case kFacing: return TRACKED_NEW proFacingEventData;
case kContained: return TRACKED_NEW proContainedEventData;
case kActivate: return TRACKED_NEW proActivateEventData;
case kCallback: return TRACKED_NEW proCallbackEventData;
case kResponderState: return TRACKED_NEW proResponderStateEventData;
case kMultiStage: return TRACKED_NEW proMultiStageEventData;
case kCoop: return TRACKED_NEW proCoopEventData;
case kSpawned: return TRACKED_NEW proSpawnedEventData;
case kOfferLinkingBook: return TRACKED_NEW proOfferLinkingBookEventData;
case kBook: return TRACKED_NEW proBookEventData;
case kClimbingBlockerHit: return TRACKED_NEW proClimbingBlockerHitEventData;
case kCollision: return new proCollisionEventData;
case kPicked: return new proPickedEventData;
case kControlKey: return new proControlKeyEventData;
case kVariable: return new proVariableEventData;
case kFacing: return new proFacingEventData;
case kContained: return new proContainedEventData;
case kActivate: return new proActivateEventData;
case kCallback: return new proCallbackEventData;
case kResponderState: return new proResponderStateEventData;
case kMultiStage: return new proMultiStageEventData;
case kCoop: return new proCoopEventData;
case kSpawned: return new proSpawnedEventData;
case kOfferLinkingBook: return new proOfferLinkingBookEventData;
case kBook: return new proBookEventData;
case kClimbingBlockerHit: return new proClimbingBlockerHitEventData;
}
return nil;
@ -1028,7 +1028,7 @@ proEventData* proEventData::ICreateEventDataType(Int32 type)
proEventData* proEventData::Read( hsStream *stream, hsResMgr *mgr )
{
Int32 evtType = stream->ReadLE32();
int32_t evtType = stream->ReadLE32();
proEventData* data = ICreateEventDataType(evtType);
@ -1056,7 +1056,7 @@ proEventData* proEventData::ReadVersion(hsStream* s, hsResMgr* mgr)
if (contentFlags.IsBitSet(kProEventDataType))
{
Int32 evtType = s->ReadLE32();
int32_t evtType = s->ReadLE32();
proEventData* data = ICreateEventDataType(evtType);

View File

@ -45,7 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plMessage.h"
#include "hsResMgr.h"
#include "pnModifier/plSingleModifier.h"
#include "hsUtils.h"
#include "hsGeometry3.h"
@ -80,7 +80,7 @@ public:
kNone
};
proEventData( Int32 evtType = kNone ) : fEventType( evtType )
proEventData( int32_t evtType = kNone ) : fEventType( evtType )
{
}
virtual ~proEventData() {}
@ -102,9 +102,9 @@ public:
kNothing
};
Int32 fEventType; // what type of event (evenType enum)
int32_t fEventType; // what type of event (evenType enum)
static proEventData* ICreateEventDataType(Int32 type);
static proEventData* ICreateEventDataType(int32_t type);
static proEventData* Read(hsStream* stream, hsResMgr* mgr);
void Write(hsStream* stream, hsResMgr* mgr);
@ -165,7 +165,7 @@ protected:
};
proEventType(ControlKey)
Int32 fControlKey; // what control key was hit
int32_t fControlKey; // what control key was hit
hsBool fDown; // was the key going down (false if going up)
protected:
@ -178,10 +178,10 @@ protected:
proEventType(Variable)
char* fName; // name of variable
Int32 fDataType; // type of data
int32_t fDataType; // type of data
// Can't be a union, sadly, but it isn't that much of a waste of space...
hsScalar fNumber; // if its a number
float fNumber; // if its a number
plKey fKey; // if its a plKey (pointer to something)
@ -198,7 +198,7 @@ protected:
proEventType(Facing)
plKey fFacer; // what was facing
plKey fFacee; // what was being faced
hsScalar dot; // the dot prod of their view vectors
float dot; // the dot prod of their view vectors
hsBool enabled; // Now meets facing requirement (true) or no longer meets requirement (false)
protected:
@ -235,7 +235,7 @@ protected:
};
proEventType(Callback)
Int32 fEventType; // enumerated in plEventCallbackMsg.h
int32_t fEventType; // enumerated in plEventCallbackMsg.h
protected:
virtual void IRead(hsStream* stream, hsResMgr* mgr);
@ -246,7 +246,7 @@ protected:
};
proEventType(ResponderState)
Int32 fState; // what state the responder should be switched to before triggering
int32_t fState; // what state the responder should be switched to before triggering
protected:
virtual void IRead(hsStream* stream, hsResMgr* mgr);
@ -257,8 +257,8 @@ protected:
};
proEventType(MultiStage)
Int32 fStage;
Int32 fEvent;
int32_t fStage;
int32_t fEvent;
plKey fAvatar; // who was running the stage
protected:
@ -270,8 +270,8 @@ protected:
};
proEventType(Coop)
UInt32 fID; // player ID of the initiator
UInt16 fSerial; // serial number for the initiator
uint32_t fID; // player ID of the initiator
uint16_t fSerial; // serial number for the initiator
protected:
virtual void IRead(hsStream* stream, hsResMgr* mgr);
virtual void IWrite(hsStream* stream, hsResMgr* mgr);
@ -284,7 +284,7 @@ protected:
proEventType(ClickDrag)
plKey picker; // always the local avatar in this case
plKey picked;
hsScalar animPos; // 0.0 to 1.0 animation percentage
float animPos; // 0.0 to 1.0 animation percentage
};
proEventType(OfferLinkingBook)
@ -300,8 +300,8 @@ protected:
};
proEventType(Book)
UInt32 fEvent; // The type of event. See pfJournalBook.h for enumsu
UInt32 fLinkID; // The link ID of the image clicked, if an image link event, otherwise unused
uint32_t fEvent; // The type of event. See pfJournalBook.h for enumsu
uint32_t fLinkID; // The link ID of the image clicked, if an image link event, otherwise unused
protected:
virtual void IRead(hsStream* stream, hsResMgr* mgr);
virtual void IWrite(hsStream* stream, hsResMgr* mgr);
@ -354,36 +354,36 @@ public:
kResponderFF, // Fast forward
kResponderChangeState, // Change state without triggering
};
Int32 fType; // what type of notification
hsScalar fState; // state of the notifier 0.0=false, 1.0=true
Int32 fID; // special ID mostly for responder State transitions
int32_t fType; // what type of notification
float fState; // state of the notifier 0.0=false, 1.0=true
int32_t fID; // special ID mostly for responder State transitions
hsTArray<proEventData*> fEvents;// list of events with data
void SetType(notificationType type) { fType = type; }
void SetState(hsScalar state) { fState = state; }
void SetState(float state) { fState = state; }
// event records for the notify message
void AddEvent( proEventData* ed);
void AddCollisionEvent( hsBool enter, const plKey &other, const plKey &self, hsBool onlyOneCollision=true );
void AddPickEvent( const plKey &other, const plKey& self, hsBool enabled, hsPoint3 hitPoint );
void AddControlKeyEvent( Int32 key, hsBool down );
void AddVariableEvent( const char* name, hsScalar number );
void AddControlKeyEvent( int32_t key, hsBool down );
void AddVariableEvent( const char* name, float number );
void AddVariableEvent( const char *name, const plKey &key);
void AddFacingEvent( const plKey &other, const plKey &self, hsScalar dot, hsBool enabled);
void AddFacingEvent( const plKey &other, const plKey &self, float dot, hsBool enabled);
void AddContainerEvent( const plKey &container, const plKey &contained, hsBool entering);
void AddActivateEvent( hsBool activate );
void AddCallbackEvent( Int32 event );
void AddResponderStateEvent( Int32 state );
void AddMultiStageEvent( Int32 stage, Int32 event, const plKey& avatar );
void AddCoopEvent(UInt32 id, UInt16 serial);
void AddCallbackEvent( int32_t event );
void AddResponderStateEvent( int32_t state );
void AddMultiStageEvent( int32_t stage, int32_t event, const plKey& avatar );
void AddCoopEvent(uint32_t id, uint16_t serial);
void AddSpawnedEvent (const plKey &spawner, const plKey &spawned);
void AddClickDragEvent(const plKey& dragger, const plKey& dragee, hsScalar animPos);
void AddClickDragEvent(const plKey& dragger, const plKey& dragee, float animPos);
void AddOfferBookEvent(const plKey& offerer, int targetAge, int offeree);
void AddBookEvent( UInt32 event, UInt32 linkID = 0 );
void AddBookEvent( uint32_t event, uint32_t linkID = 0 );
void AddHitClimbingBlockerEvent(const plKey &blocker);
proEventData* FindEventRecord( Int32 eventtype );
Int32 GetEventCount() { return fEvents.Count(); }
proEventData* GetEventRecord(Int32 i) { return fEvents[i]; }
proEventData* FindEventRecord( int32_t eventtype );
int32_t GetEventCount() { return fEvents.Count(); }
proEventData* GetEventRecord(int32_t i) { return fEvents[i]; }
void ClearEvents();
// Searches the event records for an event triggered by an avatar, and returns that key

View File

@ -60,15 +60,15 @@ public:
plObjRefMsg(): fType(-1), fWhich(-1) {};
plObjRefMsg(const plKey &r, UInt8 refMsgFlags, Int8 which , Int8 type)
plObjRefMsg(const plKey &r, uint8_t refMsgFlags, int8_t which , int8_t type)
: plRefMsg(r, refMsgFlags), fType(type), fWhich(which) {}
CLASSNAME_REGISTER( plObjRefMsg );
GETINTERFACE_ANY( plObjRefMsg, plRefMsg );
Int8 fType;
Int8 fWhich;
int8_t fType;
int8_t fWhich;
// IO - not really applicable to ref msgs, but anyway
void Read(hsStream* stream, hsResMgr* mgr)

View File

@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsTypes.h"
#include "HeadSpin.h"
#include "plProxyDrawMsg.h"
#include "hsStream.h"
@ -51,14 +51,14 @@ plProxyDrawMsg::plProxyDrawMsg()
SetBCastFlag(plMessage::kBCastByExactType);
}
plProxyDrawMsg::plProxyDrawMsg(UInt16 flags)
plProxyDrawMsg::plProxyDrawMsg(uint16_t flags)
: plMessage(nil, nil, nil),
fProxyFlags(flags)
{
SetBCastFlag(plMessage::kBCastByExactType);
}
plProxyDrawMsg::plProxyDrawMsg(plKey &rcv, UInt16 flags)
plProxyDrawMsg::plProxyDrawMsg(plKey &rcv, uint16_t flags)
: plMessage(rcv, rcv, nil),
fProxyFlags(flags)
{

View File

@ -56,12 +56,12 @@ class hsResMgr;
class plProxyDrawMsg : public plMessage
{
protected:
UInt16 fProxyFlags;
uint16_t fProxyFlags;
public:
plProxyDrawMsg();
plProxyDrawMsg(UInt16 flags); // for broadcast
plProxyDrawMsg(plKey &rcv, UInt16 flags); // send yourself an ack
plProxyDrawMsg(uint16_t flags); // for broadcast
plProxyDrawMsg(plKey &rcv, uint16_t flags); // send yourself an ack
~plProxyDrawMsg();
CLASSNAME_REGISTER( plProxyDrawMsg );
@ -88,8 +88,8 @@ public:
| kCamera
};
UInt16 GetProxyFlags() const { return fProxyFlags; }
void SetProxyFlags(UInt16 f) { fProxyFlags = f; }
uint16_t GetProxyFlags() const { return fProxyFlags; }
void SetProxyFlags(uint16_t f) { fProxyFlags = f; }
virtual void Read(hsStream* stream, hsResMgr* mgr);
virtual void Write(hsStream* stream, hsResMgr* mgr);

View File

@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsTypes.h"
#include "HeadSpin.h"
#include "plRefMsg.h"
#include "hsStream.h"
@ -53,7 +53,7 @@ plRefMsg::plRefMsg()
{
}
plRefMsg::plRefMsg(const plKey &r, UInt8 c)
plRefMsg::plRefMsg(const plKey &r, uint8_t c)
: plMessage(nil, r, nil), fRef(nil), fOldRef(nil), fContext(c)
{
if( !fContext )

View File

@ -63,10 +63,10 @@ protected:
hsKeyedObject* fRef;
hsKeyedObject* fOldRef; // on replace
UInt8 fContext;
uint8_t fContext;
public:
plRefMsg();
plRefMsg(const plKey &r, UInt8 c);
plRefMsg(const plKey &r, uint8_t c);
virtual ~plRefMsg();
@ -79,8 +79,8 @@ public:
plRefMsg& SetOldRef(hsKeyedObject* oldRef);
hsKeyedObject* GetOldRef() { return fOldRef; }
plRefMsg& SetContext(UInt8 c) { fContext = c; return *this; }
UInt8 GetContext() { return fContext; }
plRefMsg& SetContext(uint8_t c) { fContext = c; return *this; }
uint8_t GetContext() { return fContext; }
void Read(hsStream* stream, hsResMgr* mgr);
void Write(hsStream* stream, hsResMgr* mgr);
@ -91,7 +91,7 @@ class plGenRefMsg : public plRefMsg
{
public:
plGenRefMsg() : fType(-1), fWhich(-1) {}
plGenRefMsg(const plKey &r, UInt8 c, Int32 which, Int8 type) : plRefMsg(r, c), fWhich(which), fType(type) {}
plGenRefMsg(const plKey &r, uint8_t c, int32_t which, int8_t type) : plRefMsg(r, c), fWhich(which), fType(type) {}
CLASSNAME_REGISTER(plGenRefMsg);
GETINTERFACE_ANY(plGenRefMsg, plRefMsg);
@ -99,8 +99,8 @@ public:
// User variables. You can put anything here, but the standard convention
// is an enum telling what type of ref it is in fType, and an index in
// fWhich, for keeping track of multiple refs of the same type.
Int8 fType;
Int32 fWhich;
int8_t fType;
int32_t fWhich;
void Read(hsStream* stream, hsResMgr* mgr);
void Write(hsStream* stream, hsResMgr* mgr);

View File

@ -43,7 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define plSDLModifierMsg_INC
#include "pnMessage/plMessage.h"
#include "hsUtils.h"
//
// A msg sent to an SDL modifier to tell it send or recv state.
@ -67,8 +67,8 @@ protected:
Action fAction;
plStateDataRecord* fState; // for recving state
bool fManageStateMem; // delete fState?
UInt32 fPlayerID;
UInt32 fFlags;
uint32_t fPlayerID;
uint32_t fFlags;
public:
plSDLModifierMsg(const char* sdlName=nil, Action a=kActionNone);
@ -77,8 +77,8 @@ public:
CLASSNAME_REGISTER( plSDLModifierMsg );
GETINTERFACE_ANY( plSDLModifierMsg, plMessage );
UInt32 GetFlags() const { return fFlags; }
void SetFlags(UInt32 f) { fFlags = f; }
uint32_t GetFlags() const { return fFlags; }
void SetFlags(uint32_t f) { fFlags = f; }
Action GetAction() const { return fAction; }
void SetAction(Action t) { fAction=t; }
@ -89,8 +89,8 @@ public:
const char* GetSDLName() const { return fSDLName; }
void SetSDLName(const char* s) { delete [] fSDLName; fSDLName=hsStrcpy(s); }
UInt32 GetPlayerID() const { return fPlayerID; }
void SetPlayerID(UInt32 p) { fPlayerID=p; }
uint32_t GetPlayerID() const { return fPlayerID; }
void SetPlayerID(uint32_t p) { fPlayerID=p; }
// IO
void Read(hsStream* stream, hsResMgr* mgr) { hsAssert(false, "local only msg"); }

View File

@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsTypes.h"
#include "HeadSpin.h"
#include "plSoundMsg.h"
#include "hsStream.h"
@ -90,5 +90,5 @@ void plSoundMsg::Write(hsStream* stream, hsResMgr* mgr)
stream->WriteLE(fRepeats);
stream->WriteLE(fNameStr);
stream->WriteLE(fVolume);
stream->WriteByte( (UInt8)fFadeType );
stream->WriteByte( (uint8_t)fFadeType );
}

View File

@ -98,13 +98,13 @@ public:
double fBegin;
double fEnd;
hsBool fLoop;
hsScalar fSpeed;
float fSpeed;
double fTime;
int fIndex;
int fRepeats;
hsBool fPlaying;
UInt32 fNameStr;
hsScalar fVolume; // Range: 0 - silence, 1.f - loudest
uint32_t fNameStr;
float fVolume; // Range: 0 - silence, 1.f - loudest
enum FadeType
{

View File

@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsTypes.h"
#include "HeadSpin.h"
#include "plTimeMsg.h"
#include "hsTimer.h"
@ -51,7 +51,7 @@ plTimeMsg::plTimeMsg()
plTimeMsg::plTimeMsg(const plKey &s,
const plKey &r,
const double* t, const hsScalar* d)
const double* t, const float* d)
: plMessage(s, r, t)
{
fSeconds = t ? *t : hsTimer::GetSysSeconds();
@ -70,7 +70,7 @@ plEvalMsg::plEvalMsg()
plEvalMsg::plEvalMsg(const plKey &s,
const plKey &r,
const double* t, const hsScalar* d)
const double* t, const float* d)
: plTimeMsg(s, r, t, d)
{
}
@ -85,7 +85,7 @@ plTransformMsg::plTransformMsg()
plTransformMsg::plTransformMsg(const plKey &s,
const plKey &r,
const double* t, const hsScalar* d)
const double* t, const float* d)
: plTimeMsg(s, r, t, d)
{
SetBCastFlag(plMessage::kClearAfterBCast);

View File

@ -50,23 +50,23 @@ class plTimeMsg : public plMessage
{
protected:
double fSeconds;
hsScalar fDelSecs;
float fDelSecs;
public:
plTimeMsg();
plTimeMsg(const plKey &s,
const plKey &r,
const double* t, const hsScalar* del);
const double* t, const float* del);
~plTimeMsg();
CLASSNAME_REGISTER( plTimeMsg );
GETINTERFACE_ANY( plTimeMsg, plMessage );
plTimeMsg& SetSeconds(double s) { fSeconds = s; return *this; }
plTimeMsg& SetDelSeconds(hsScalar d) { fDelSecs = d; return *this; }
plTimeMsg& SetDelSeconds(float d) { fDelSecs = d; return *this; }
double DSeconds() { return fSeconds; }
hsScalar DelSeconds() { return fDelSecs; }
float DelSeconds() { return fDelSecs; }
// IO
void Read(hsStream* stream, hsResMgr* mgr)
@ -90,7 +90,7 @@ public:
plEvalMsg();
plEvalMsg(const plKey &s,
const plKey &r,
const double* t, const hsScalar* del);
const double* t, const float* del);
~plEvalMsg();
CLASSNAME_REGISTER( plEvalMsg );
@ -107,7 +107,7 @@ public:
plTransformMsg();
plTransformMsg(const plKey &s,
const plKey &r,
const double* t, const hsScalar* del);
const double* t, const float* del);
~plTransformMsg();
CLASSNAME_REGISTER( plTransformMsg );
@ -125,7 +125,7 @@ class plDelayedTransformMsg : public plTransformMsg
{
public:
plDelayedTransformMsg() : plTransformMsg() {}
plDelayedTransformMsg(const plKey &s, const plKey &r, const double* t, const hsScalar* del) : plTransformMsg(s, r, t, del) {}
plDelayedTransformMsg(const plKey &s, const plKey &r, const double* t, const float* del) : plTransformMsg(s, r, t, del) {}
CLASSNAME_REGISTER( plDelayedTransformMsg );
GETINTERFACE_ANY( plDelayedTransformMsg, plTransformMsg );

View File

@ -50,7 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
class plWarpMsg : public plMessage
{
private:
UInt32 fWarpFlags;
uint32_t fWarpFlags;
hsMatrix44 fTransform;
public:
enum WarpFlags
@ -64,7 +64,7 @@ public:
plWarpMsg(const plKey &s,
const plKey &r,
const double* t) { Clear(); }
plWarpMsg(const plKey &s, const plKey &r, UInt32 flags, const hsMatrix44 &mat)
plWarpMsg(const plKey &s, const plKey &r, uint32_t flags, const hsMatrix44 &mat)
: fWarpFlags(flags), fTransform(mat), plMessage(s, r, nil)
{ };
@ -75,8 +75,8 @@ public:
void Clear() { fWarpFlags=0; }
UInt32 GetWarpFlags() { return fWarpFlags; }
void SetWarpFlags(UInt32 f) { fWarpFlags=f; }
uint32_t GetWarpFlags() { return fWarpFlags; }
void SetWarpFlags(uint32_t f) { fWarpFlags=f; }
void SetTransform(const hsMatrix44& mat) { fTransform=mat; }
hsMatrix44& GetTransform() { return fTransform; }