1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 03:09:13 +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

@ -77,7 +77,7 @@ void plAnimEventModifier::Read(hsStream* stream, hsResMgr* mgr)
//
plKey animKey = fCallback->GetReceiver(0);
hsgResMgr::ResMgr()->AddViaNotify(animKey,
TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0),
new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0),
plRefFlags::kPassiveRef);
}
@ -128,7 +128,7 @@ void plAnimEventModifier::ISendNotify(bool triggered)
{
if (fDisabled)
return;
plNotifyMsg* notify = TRACKED_NEW plNotifyMsg;
plNotifyMsg* notify = new plNotifyMsg;
// Setup the event data in case this is a OneShot responder that needs it
plKey playerKey = plNetClientApp::GetInstance()->GetLocalPlayerKey();

View File

@ -54,7 +54,7 @@ protected:
hsTArray<plKey> fReceivers;// Keys to notify when the anim event happens
plMessage* fCallback; // The callback setup message we send when the anim loads
virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty) { return false; }
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; }
void ISendNotify(bool triggered);
hsBool fDisabled;

View File

@ -88,7 +88,7 @@ void plAnimTimeConvertSDLModifier::ISetCurrentATC(const plStateDataRecord* atcSt
plStateDataRecord::SimpleVarsList vars;
int num=atcStateDataRec->GetUsedVars(&vars);
int j;
hsScalar lastStateAnimTime = 0;
float lastStateAnimTime = 0;
double lastStateChange = 0;
for(j=0;j<num;j++)
{

View File

@ -40,8 +40,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsTypes.h"
#include "hsUtils.h"
#include "HeadSpin.h"
#include "plAxisAnimModifier.h"
#include "hsResMgr.h"
#include "pnSceneObject/plSceneObject.h"
@ -79,7 +79,7 @@ class plAxisInputInterface : public plInputInterface
plAxisInputInterface( plAxisAnimModifier *owner ) { fOwner = owner; SetEnabled( true ); }
virtual UInt32 GetPriorityLevel( void ) const { return kSceneInteractionPriority + 10; }
virtual uint32_t GetPriorityLevel( void ) const { return kSceneInteractionPriority + 10; }
virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg )
{
plMouseEventMsg* pMMsg = plMouseEventMsg::ConvertNoRef( pMsg );
@ -88,7 +88,7 @@ class plAxisInputInterface : public plInputInterface
if( pMMsg->GetButton() == kLeftButtonUp )
{
// Remove ourselves from the stack
plInputIfaceMgrMsg *msg = TRACKED_NEW plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface );
plInputIfaceMgrMsg *msg = new plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface );
msg->SetIFace( this );
plgDispatch::MsgSend( msg );
return true;
@ -99,7 +99,7 @@ class plAxisInputInterface : public plInputInterface
return false;
}
virtual UInt32 GetCurrentCursorID( void ) const { return kCursorGrab; }
virtual uint32_t GetCurrentCursorID( void ) const { return kCursorGrab; }
virtual hsBool HasInterestingCursorID( void ) const { return true; }
};
@ -112,8 +112,8 @@ fYPos(0.0f),
fIface(0),
fAllOrNothing(false)
{
fNotify = TRACKED_NEW plNotifyMsg;
fInputIface = TRACKED_NEW plAxisInputInterface( this );
fNotify = new plNotifyMsg;
fInputIface = new plAxisInputInterface( this );
}
plAxisAnimModifier::~plAxisAnimModifier()
{
@ -122,7 +122,7 @@ plAxisAnimModifier::~plAxisAnimModifier()
}
hsBool plAxisAnimModifier::IEval(double secs, hsScalar del, UInt32 dirty)
hsBool plAxisAnimModifier::IEval(double secs, float del, uint32_t dirty)
{
if (!fActive)
return true;
@ -144,7 +144,7 @@ hsBool plAxisAnimModifier::MsgReceive(plMessage* msg)
if (pCall)
{
// Send our notification to whomever cares;
hsScalar time = 0.0f;
float time = 0.0f;
if (pCall->fEvent == kEnd)
time = 1.0f;
fNotify->ClearEvents();
@ -172,7 +172,7 @@ hsBool plAxisAnimModifier::MsgReceive(plMessage* msg)
fYPos = plMouseDevice::Instance()->GetCursorY();
// Insert our input interface onto the input stack
plInputIfaceMgrMsg *msg = TRACKED_NEW plInputIfaceMgrMsg( plInputIfaceMgrMsg::kAddInterface );
plInputIfaceMgrMsg *msg = new plInputIfaceMgrMsg( plInputIfaceMgrMsg::kAddInterface );
msg->SetIFace( fInputIface );
plgDispatch::MsgSend( msg );
}
@ -183,7 +183,7 @@ hsBool plAxisAnimModifier::MsgReceive(plMessage* msg)
fActive = false;
// Remove our input interface from the input stack
plInputIfaceMgrMsg *msg = TRACKED_NEW plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface );
plInputIfaceMgrMsg *msg = new plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface );
msg->SetIFace( fInputIface );
plgDispatch::MsgSend( msg );
}
@ -201,7 +201,7 @@ hsBool plAxisAnimModifier::MsgReceive(plMessage* msg)
{
if (pMMsg->GetDX() > 0.05f)
return true;
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
pMsg->AddReceiver(fXAnim);
pMsg->SetAnimName(fAnimLabel.c_str());
// pMsg->SetAnimName()
@ -221,7 +221,7 @@ hsBool plAxisAnimModifier::MsgReceive(plMessage* msg)
if (pMMsg->GetDY() > 0.05f)
return true;
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
pMsg->AddReceiver(fYAnim);
pMsg->SetAnimName(fAnimLabel.c_str());
if (fYPos > pMMsg->GetYPos())
@ -233,7 +233,7 @@ hsBool plAxisAnimModifier::MsgReceive(plMessage* msg)
fActive = false;
// Remove our input interface from the input stack
plInputIfaceMgrMsg *msg = TRACKED_NEW plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface );
plInputIfaceMgrMsg *msg = new plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface );
msg->SetIFace( fInputIface );
plgDispatch::MsgSend( msg );
plInputManager::SetRecenterMouse(false);
@ -252,7 +252,7 @@ hsBool plAxisAnimModifier::MsgReceive(plMessage* msg)
fActive = false;
// Remove our input interface from the input stack
plInputIfaceMgrMsg *msg = TRACKED_NEW plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface );
plInputIfaceMgrMsg *msg = new plInputIfaceMgrMsg( plInputIfaceMgrMsg::kRemoveInterface );
msg->SetIFace( fInputIface );
plgDispatch::MsgSend( msg );
@ -287,17 +287,17 @@ hsBool plAxisAnimModifier::MsgReceive(plMessage* msg)
fXAnim = pRefMsg->GetRef()->GetKey();
// add callbacks for beginning and end of animation
plEventCallbackMsg* pCall1 = TRACKED_NEW plEventCallbackMsg;
plEventCallbackMsg* pCall1 = new plEventCallbackMsg;
pCall1->fEvent = kBegin;
pCall1->fRepeats = -1;
pCall1->AddReceiver(GetKey());
plEventCallbackMsg* pCall2 = TRACKED_NEW plEventCallbackMsg;
plEventCallbackMsg* pCall2 = new plEventCallbackMsg;
pCall2->fEvent = kEnd;
pCall2->fRepeats = -1;
pCall2->AddReceiver(GetKey());
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
pMsg->SetCmd(plAnimCmdMsg::kAddCallbacks);
pMsg->AddCallback(pCall1);
pMsg->AddCallback(pCall2);
@ -315,17 +315,17 @@ hsBool plAxisAnimModifier::MsgReceive(plMessage* msg)
fYAnim = pRefMsg->GetRef()->GetKey();
// add callbacks for beginning and end of animation
plEventCallbackMsg* pCall1 = TRACKED_NEW plEventCallbackMsg;
plEventCallbackMsg* pCall1 = new plEventCallbackMsg;
pCall1->fEvent = kBegin;
pCall1->fRepeats = -1;
pCall1->AddReceiver(GetKey());
plEventCallbackMsg* pCall2 = TRACKED_NEW plEventCallbackMsg;
plEventCallbackMsg* pCall2 = new plEventCallbackMsg;
pCall2->fEvent = kEnd;
pCall2->fRepeats = -1;
pCall2->AddReceiver(GetKey());
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
pMsg->SetCmd(plAnimCmdMsg::kAddCallbacks);
pMsg->AddCallback(pCall1);
pMsg->AddCallback(pCall2);
@ -365,9 +365,9 @@ void plAxisAnimModifier::Read(hsStream* s, hsResMgr* mgr)
{
plSingleModifier::Read(s, mgr);
mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kTypeX), plRefFlags::kPassiveRef);
mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kTypeY), plRefFlags::kPassiveRef);
mgr->ReadKeyNotifyMe( s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kTypeLogic), plRefFlags::kPassiveRef);
mgr->ReadKeyNotifyMe( s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kTypeX), plRefFlags::kPassiveRef);
mgr->ReadKeyNotifyMe( s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kTypeY), plRefFlags::kPassiveRef);
mgr->ReadKeyNotifyMe( s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kTypeLogic), plRefFlags::kPassiveRef);
fAllOrNothing = s->ReadBool();
plNotifyMsg* pMsg = plNotifyMsg::ConvertNoRef(mgr->ReadCreatable(s));

View File

@ -66,8 +66,8 @@ protected:
plKey fYAnim;
plKey fNotificationKey;
hsScalar fXPos;
hsScalar fYPos;
float fXPos;
float fYPos;
hsBool fActive;
hsBool fAllOrNothing;
@ -78,7 +78,7 @@ protected:
plAxisInputInterface *fInputIface;
virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty);
virtual hsBool IEval(double secs, float del, uint32_t dirty);
public:
plAxisAnimModifier();

View File

@ -111,18 +111,18 @@ plKey plCloneSpawnModifier::SpawnClone(const char* cloneName, const char* cloneA
if (key)
{
plLoadCloneMsg* cloneMsg = TRACKED_NEW plLoadCloneMsg(objUoid, requestor, 0);
plLoadCloneMsg* cloneMsg = new plLoadCloneMsg(objUoid, requestor, 0);
cloneMsg->SetBCastFlag(plMessage::kMsgWatch);
plKey cloneKey = cloneMsg->GetCloneKey();//resMgr->CloneKey(key);
cloneMsg->Send();
// Put the clone into the clone room, which also forces it to load.
plKey cloneNodeKey = resMgr->FindKey(kNetClientCloneRoom_KEY);
plNodeRefMsg* nodeRefCloneMsg = TRACKED_NEW plNodeRefMsg(cloneNodeKey, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kObject);
plNodeRefMsg* nodeRefCloneMsg = new plNodeRefMsg(cloneNodeKey, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kObject);
resMgr->AddViaNotify(cloneKey, nodeRefCloneMsg, plRefFlags::kActiveRef);
// Warp it into position
plWarpMsg *warpMsg = TRACKED_NEW plWarpMsg;
plWarpMsg *warpMsg = new plWarpMsg;
warpMsg->AddReceiver(cloneKey);
warpMsg->SetTransform(pos);
plgDispatch::MsgSend(warpMsg);

View File

@ -50,7 +50,7 @@ protected:
char* fTemplateName;
bool fExportTime;
virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty) { return true; }
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; }
public:
plCloneSpawnModifier();

View File

@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsTypes.h"
#include "HeadSpin.h"
#include "plDecalEnableMod.h"
#include "plMessage/plDynaDecalEnableMsg.h"
#include "plMessage/plCollideMsg.h"
@ -79,7 +79,7 @@ hsBool plDecalEnableMod::MsgReceive(plMessage* msg)
int i;
for( i = 0; i < fDecalMgrs.GetCount(); i++ )
{
plDynaDecalEnableMsg* ena = TRACKED_NEW plDynaDecalEnableMsg(fDecalMgrs[i], armKey, hsTimer::GetSysSeconds(), fWetLength, !coll->fEntering);
plDynaDecalEnableMsg* ena = new plDynaDecalEnableMsg(fDecalMgrs[i], armKey, hsTimer::GetSysSeconds(), fWetLength, !coll->fEntering);
ena->Send();
}

View File

@ -53,9 +53,9 @@ protected:
hsTArray<plKey> fDecalMgrs;
hsScalar fWetLength;
float fWetLength;
virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty) { return false; }
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; }
public:
plDecalEnableMod();
@ -69,11 +69,11 @@ public:
virtual void Read(hsStream* stream, hsResMgr* mgr);
virtual void Write(hsStream* stream, hsResMgr* mgr);
void SetWetLength(hsScalar t) { fWetLength = t; }
hsScalar GetWetLength() const { return fWetLength; }
void SetWetLength(float t) { fWetLength = t; }
float GetWetLength() const { return fWetLength; }
void AddDecalKey(const plKey& k) { fDecalMgrs.Append(k); }
UInt32 GetNumDecalKeys() const { return fDecalMgrs.GetCount(); }
uint32_t GetNumDecalKeys() const { return fDecalMgrs.GetCount(); }
const plKey& GetDecalKey(int i) const { return fDecalMgrs[i]; }
};

View File

@ -189,7 +189,7 @@ void plExcludeRegionModifier::AddTarget(plSceneObject* so)
if (so)
{
delete fSDLModifier;
fSDLModifier = TRACKED_NEW plExcludeRegionSDLModifier(this);
fSDLModifier = new plExcludeRegionSDLModifier(this);
so->AddModifier(fSDLModifier);
}
plSingleModifier::SetTarget(so);
@ -285,7 +285,7 @@ void plExcludeRegionModifier::IMoveAvatars()
if (closestIdx != -1)
{
plAvSeekMsg* msg = TRACKED_NEW plAvSeekMsg;
plAvSeekMsg* msg = new plAvSeekMsg;
msg->SetBCastFlag(plMessage::kPropagateToModifiers);
msg->AddReceiver(fContainedAvatars[i]);
msg->fSmartSeek = fSeek;
@ -305,7 +305,7 @@ void plExcludeRegionModifier::IMoveAvatars()
int numControllers = plPXPhysicalControllerCore::GetNumberOfControllersInThisSubWorld(phys->GetWorldKey());
if (numControllers > 0)
{
plPXPhysicalControllerCore** controllers = TRACKED_NEW plPXPhysicalControllerCore*[numControllers];
plPXPhysicalControllerCore** controllers = new plPXPhysicalControllerCore*[numControllers];
int actualCount = plPXPhysicalControllerCore::GetControllersInThisSubWorld(phys->GetWorldKey(), numControllers, controllers);
@ -323,7 +323,7 @@ void plExcludeRegionModifier::IMoveAvatars()
// *** warning; if there's more than one generic brain active, this will only look at the first
if (curGenBrain && curGenBrain->GetType() == plAvBrainGeneric::kLadder)
{
plAvBrainGenericMsg* pMsg = TRACKED_NEW plAvBrainGenericMsg(
plAvBrainGenericMsg* pMsg = new plAvBrainGenericMsg(
nil,
constAvMod->GetKey(),
plAvBrainGenericMsg::kGotoStage,
@ -341,7 +341,7 @@ void plExcludeRegionModifier::IMoveAvatars()
int closestIdx = IFindClosestSafePoint(controllers[i]->GetOwner());
if (closestIdx != -1)
{
plAvSeekMsg* msg = TRACKED_NEW plAvSeekMsg;
plAvSeekMsg* msg = new plAvSeekMsg;
msg->SetBCastFlag(plMessage::kPropagateToModifiers);
msg->AddReceiver(controllers[i]->GetOwner());
msg->fSmartSeek = fSeek;

View File

@ -63,8 +63,8 @@ protected:
hsTArray<plKey> fContainedAvatars; // Avatars inside our volume
plExcludeRegionSDLModifier *fSDLModifier;
hsBool fSeek; // use smart seek or teleport?
hsScalar fSeekTime; // how long to seek for
virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty) { return true; }
float fSeekTime; // how long to seek for
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; }
void ISetPhysicalState(bool cleared);
@ -91,7 +91,7 @@ public:
void AddSafePoint(plKey& key);
void UseSmartSeek() { fSeek = true; }
void SetSeekTime(hsScalar s) { fSeekTime = s; }
void SetSeekTime(float s) { fSeekTime = s; }
void SetBlockCameras(bool block) { fFlags.SetBit(kBlockCameras, block); }
};

View File

@ -52,7 +52,7 @@ hsBool plGameMarkerModifier::MsgReceive(plMessage* msg)
{
if (collideMsg->fEntering)
{
plNotifyMsg* notify = TRACKED_NEW plNotifyMsg;
plNotifyMsg* notify = new plNotifyMsg;
notify->AddCollisionEvent(true, collideMsg->fOtherKey, GetTarget()->GetKey());
notify->Send(hsgResMgr::ResMgr()->FindKey(kMarkerMgr_KEY));
}

View File

@ -51,10 +51,10 @@ protected:
plKey fRedAnimKey;
plKey fOpenAnimKey;
plKey fBounceAnimKey;
UInt16 fPlaceSndIdx;
UInt16 fHitSndIdx;
uint16_t fPlaceSndIdx;
uint16_t fHitSndIdx;
virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty) { return true; }
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; }
plKey IFindCloneKey(plKey baseKey);
@ -68,7 +68,7 @@ public:
GETINTERFACE_ANY(plGameMarkerModifier, plSingleModifier);
void ExportInit(plKey greenKey, plKey redKey, plKey openKey, plKey bounceAnimKey,
UInt16 placeSndIdx, UInt16 hitSndIdx)
uint16_t placeSndIdx, uint16_t hitSndIdx)
{
fGreenAnimKey = greenKey;
fRedAnimKey = redKey;

View File

@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsTypes.h"
#include "HeadSpin.h"
#include "plImageLibMod.h"
#include "plGImage/plBitmap.h"
@ -85,10 +85,10 @@ void plImageLibMod::Read(hsStream* stream, hsResMgr* mgr)
{
plSingleModifier::Read(stream, mgr);
UInt32 i, count = stream->ReadLE32();
uint32_t i, count = stream->ReadLE32();
fImages.SetCountAndZero( count );
for( i = 0; i < count; i++ )
mgr->ReadKeyNotifyMe( stream, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kRefImage ), plRefFlags::kActiveRef );
mgr->ReadKeyNotifyMe( stream, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kRefImage ), plRefFlags::kActiveRef );
}
void plImageLibMod::Write(hsStream* stream, hsResMgr* mgr)
@ -96,7 +96,7 @@ void plImageLibMod::Write(hsStream* stream, hsResMgr* mgr)
plSingleModifier::Write(stream, mgr);
stream->WriteLE32( fImages.GetCount() );
UInt32 i;
uint32_t i;
for( i = 0; i < fImages.GetCount(); i++ )
mgr->WriteKey( stream, fImages[ i ]->GetKey() );
}

View File

@ -54,7 +54,7 @@ protected:
hsTArray<plBitmap *> fImages;
virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty) { return false; }
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; }
public:
plImageLibMod();
@ -73,7 +73,7 @@ public:
kRefImage = 0
};
UInt32 GetNumImages( void ) const { return fImages.GetCount(); }
uint32_t GetNumImages( void ) const { return fImages.GetCount(); }
};
#endif // plImageLibMod_inc

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 "plInterfaceInfoModifier.h"
#include "hsResMgr.h"
#include "pnKeyedObject/plKey.h"

View File

@ -52,7 +52,7 @@ class plInterfaceInfoModifier : public plSingleModifier
protected:
hsTArray<plKey> fKeyList;
virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty){ return true; }
virtual hsBool IEval(double secs, float del, uint32_t dirty){ return true; }
public:
plInterfaceInfoModifier();

View File

@ -112,24 +112,24 @@ void plLayerSDLModifier::IPutCurrentStateIn(plStateDataRecord* dstState)
int channelIdx = 0;
if (layer->fPreshadeColor && (layer->fOwnedChannels & plLayerInterface::kPreshadeColor))
{
channelVar->Set((UInt8)(layer->fPreshadeColor->r * 255), channelIdx++);
channelVar->Set((UInt8)(layer->fPreshadeColor->g * 255), channelIdx++);
channelVar->Set((UInt8)(layer->fPreshadeColor->b * 255), channelIdx++);
channelVar->Set((uint8_t)(layer->fPreshadeColor->r * 255), channelIdx++);
channelVar->Set((uint8_t)(layer->fPreshadeColor->g * 255), channelIdx++);
channelVar->Set((uint8_t)(layer->fPreshadeColor->b * 255), channelIdx++);
}
if (layer->fRuntimeColor && (layer->fOwnedChannels & plLayerInterface::kRuntimeColor))
{
channelVar->Set((UInt8)(layer->fRuntimeColor->r * 255), channelIdx++);
channelVar->Set((UInt8)(layer->fRuntimeColor->g * 255), channelIdx++);
channelVar->Set((UInt8)(layer->fRuntimeColor->b * 255), channelIdx++);
channelVar->Set((uint8_t)(layer->fRuntimeColor->r * 255), channelIdx++);
channelVar->Set((uint8_t)(layer->fRuntimeColor->g * 255), channelIdx++);
channelVar->Set((uint8_t)(layer->fRuntimeColor->b * 255), channelIdx++);
}
if (layer->fAmbientColor && (layer->fOwnedChannels & plLayerInterface::kAmbientColor))
{
channelVar->Set((UInt8)(layer->fAmbientColor->r * 255), channelIdx++);
channelVar->Set((UInt8)(layer->fAmbientColor->g * 255), channelIdx++);
channelVar->Set((UInt8)(layer->fAmbientColor->b * 255), channelIdx++);
channelVar->Set((uint8_t)(layer->fAmbientColor->r * 255), channelIdx++);
channelVar->Set((uint8_t)(layer->fAmbientColor->g * 255), channelIdx++);
channelVar->Set((uint8_t)(layer->fAmbientColor->b * 255), channelIdx++);
}
if (layer->fOpacity && (layer->fOwnedChannels & plLayerInterface::kOpacity))
channelVar->Set((UInt8)(*layer->fOpacity * 255), channelIdx++);
channelVar->Set((uint8_t)(*layer->fOpacity * 255), channelIdx++);
}
//
@ -166,7 +166,7 @@ void plLayerSDLModifier::ISetCurrentStateFrom(const plStateDataRecord* srcState)
plSimpleStateVariable *channelVar = srcState->FindVar(kStrChannelData);
int channelIdx = 0;
UInt8 val;
uint8_t val;
if (layer->fPreshadeColor && (layer->fOwnedChannels & plLayerInterface::kPreshadeColor))
{
channelVar->Get(&val, channelIdx++);

View File

@ -39,7 +39,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021
*==LICENSE==*/
#include "hsTypes.h"
#include "HeadSpin.h"
#include "plLogicModifier.h"
#include "plgDispatch.h"
#include "pnTimer/plTimerCallbackManager.h"
@ -162,7 +162,7 @@ hsBool plLogicModifier::MsgReceive(plMessage* msg)
{
plCursorChangeMsg* pMsg = 0;
if ((VerifyConditions(pFakeMsg) && fMyCursor) && !Disabled())
pMsg = TRACKED_NEW plCursorChangeMsg(fMyCursor, 1);
pMsg = new plCursorChangeMsg(fMyCursor, 1);
else
{
#ifndef PLASMA_EXTERNAL_RELEASE
@ -190,7 +190,7 @@ hsBool plLogicModifier::MsgReceive(plMessage* msg)
}
}
#endif // PLASMA_EXTERNAL_RELEASE
pMsg = TRACKED_NEW plCursorChangeMsg(plCursorChangeMsg::kNullCursor, 1);
pMsg = new plCursorChangeMsg(plCursorChangeMsg::kNullCursor, 1);
}
pMsg->AddReceiver( pFakeMsg->GetSender() );
@ -221,7 +221,7 @@ void plLogicModifier::PreTrigger(hsBool netRequest)
if (fTimer)
{
plgTimerCallbackMgr::NewTimer( fTimer, TRACKED_NEW plTimerCallbackMsg( GetKey() ) );
plgTimerCallbackMgr::NewTimer( fTimer, new plTimerCallbackMsg( GetKey() ) );
return;
}
plLogicModBase::PreTrigger(netRequest);
@ -244,7 +244,7 @@ void plLogicModifier::Read(hsStream* stream, hsResMgr* mgr)
int i;
for(i = 0; i < n; i++ )
{
refMsg = TRACKED_NEW plCondRefMsg(GetKey(), i);
refMsg = new plCondRefMsg(GetKey(), i);
mgr->ReadKeyNotifyMe(stream,refMsg, plRefFlags::kActiveRef);
}
fMyCursor = stream->ReadLE32();
@ -261,7 +261,7 @@ void plLogicModifier::Write(hsStream* stream, hsResMgr* mgr)
void plLogicModifier::AddCondition(plConditionalObject* c)
{
plGenRefMsg *msg= TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1);
plGenRefMsg *msg= new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1);
hsgResMgr::ResMgr()->AddViaNotify(c->GetKey(), msg, plRefFlags::kActiveRef);
fConditionList.Append(c);

View File

@ -57,7 +57,7 @@ public:
kCalibrated,
};
protected:
virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty) {return true;}
virtual hsBool IEval(double secs, float del, uint32_t dirty) {return true;}
int fCalibrated;
public:

View File

@ -39,7 +39,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021
*==LICENSE==*/
#include "hsTypes.h"
#include "HeadSpin.h"
#include "hsStlUtils.h"
#include "hsTimer.h"
#include "plResponderModifier.h"
@ -168,14 +168,14 @@ hsBool plResponderModifier::MsgReceive(plMessage* msg)
plTimerCallbackMsg *timerMsg = plTimerCallbackMsg::ConvertNoRef(msg);
if (pEventMsg || timerMsg)
{
UInt32 waitID = pEventMsg ? pEventMsg->fUser : timerMsg->fID;
uint32_t waitID = pEventMsg ? pEventMsg->fUser : timerMsg->fID;
if (waitID != -1)
{
// Flag that this callback completed and try sending in case any commands were waiting on this
fCompletedEvents.SetBit(waitID);
ResponderLog(ILog(plStatusLog::kWhite, "Got callback from command %d(id:%d)", ICmdFromWait((Int8)waitID)+1, waitID));
ResponderLog(ILog(plStatusLog::kWhite, "Got callback from command %d(id:%d)", ICmdFromWait((int8_t)waitID)+1, waitID));
IContinueSending();
DirtySynchState(kSDLResponder, 0);
@ -203,7 +203,7 @@ void plResponderModifier::AddCommand(plMessage* pMsg, int state)
fStates[state].fCmds.Append(plResponderCmd(pMsg, -1));
}
void plResponderModifier::AddCallback(Int8 state, Int8 cmd, Int8 callback)
void plResponderModifier::AddCallback(int8_t state, int8_t cmd, int8_t callback)
{
fStates[state].fWaitToCmd[callback] = cmd;
}
@ -227,7 +227,7 @@ bool plResponderModifier::IIsLocalOnlyCmd(plMessage* cmd)
return false;
}
void plResponderModifier::ISetResponderState(Int8 state)
void plResponderModifier::ISetResponderState(int8_t state)
{
// make sure that it is a valid state to switch to
if (state >= 0 && state < fStates.Count())
@ -245,7 +245,7 @@ void plResponderModifier::ISetResponderStateFromNotify(plNotifyMsg* msg)
// set the state of the responder IF they want it to be
proResponderStateEventData* event = (proResponderStateEventData*)msg->FindEventRecord(proEventData::kResponderState);
if (event != nil)
ISetResponderState((Int8)(event->fState));
ISetResponderState((int8_t)(event->fState));
}
void plResponderModifier::Trigger(plNotifyMsg *msg)
@ -259,7 +259,7 @@ void plResponderModifier::Trigger(plNotifyMsg *msg)
#endif
// If we're not in the middle of sending, reset and start sending commands
if (fCurCommand == Int8(-1) && fEnabled)
if (fCurCommand == int8_t(-1) && fEnabled)
{
ResponderLog(ILog(plStatusLog::kGreen, "Trigger"));
@ -288,7 +288,7 @@ void plResponderModifier::Trigger(plNotifyMsg *msg)
bool plResponderModifier::IContinueSending()
{
// If we haven't been started, exit
if (fCurCommand == Int8(-1))
if (fCurCommand == int8_t(-1))
return false;
plResponderState& state = fStates[fCurState];
@ -299,17 +299,17 @@ bool plResponderModifier::IContinueSending()
if (msg)
{
// If this command needs to wait, and it's condition hasn't been met yet, exit
Int8 wait = state.fCmds[fCurCommand].fWaitOn;
int8_t wait = state.fCmds[fCurCommand].fWaitOn;
if (wait != -1 && !fCompletedEvents.IsBitSet(wait))
{
ResponderLog(ILog(plStatusLog::kWhite, "Command %d is waiting for command %d(id:%d)", Int8(fCurCommand)+1, ICmdFromWait(wait)+1, wait));
ResponderLog(ILog(plStatusLog::kWhite, "Command %d is waiting for command %d(id:%d)", int8_t(fCurCommand)+1, ICmdFromWait(wait)+1, wait));
return false;
}
if (!(fNotifyMsgFlags & plMessage::kNetNonLocal)|| !IIsLocalOnlyCmd(msg))
{
// make sure outgoing msgs inherit net flags as part of cascade
UInt32 msgFlags = msg->GetAllBCastFlags();
uint32_t msgFlags = msg->GetAllBCastFlags();
plNetClientApp::InheritNetMsgFlags(fNotifyMsgFlags, &msgFlags, true);
msg->SetAllBCastFlags(msgFlags);
@ -414,7 +414,7 @@ bool plResponderModifier::IContinueSending()
return true;
}
Int8 plResponderModifier::ICmdFromWait(Int8 waitIdx)
int8_t plResponderModifier::ICmdFromWait(int8_t waitIdx)
{
WaitToCmd& waitToCmd = fStates[fCurState].fWaitToCmd;
if (waitToCmd.find(waitIdx) != waitToCmd.end())
@ -457,14 +457,14 @@ void plResponderModifier::Restore()
if (plAnimCmdMsg* animMsg = plAnimCmdMsg::ConvertNoRef(callbackMsg))
{
plAnimCmdMsg* newAnimMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* newAnimMsg = new plAnimCmdMsg;
newAnimMsg->SetCmd(plAnimCmdMsg::kAddCallbacks);
newCallbackMsg = newAnimMsg;
ResponderLog(ILog(plStatusLog::kGreen, "Restoring anim callback"));
}
else if (plSoundMsg* soundMsg = plSoundMsg::ConvertNoRef(callbackMsg))
{
plSoundMsg* newSoundMsg = TRACKED_NEW plSoundMsg;
plSoundMsg* newSoundMsg = new plSoundMsg;
newSoundMsg->SetCmd(plSoundMsg::kAddCallbacks);
newCallbackMsg = newSoundMsg;
ResponderLog(ILog(plStatusLog::kGreen, "Restoring sound callback"));
@ -502,7 +502,7 @@ plMessage* plResponderModifier::IGetFastForwardMsg(plMessage* msg, bool python)
if (animMsg->Cmd(plAnimCmdMsg::kContinue) ||
animMsg->Cmd(plAnimCmdMsg::kAddCallbacks))
{
plAnimCmdMsg* newAnimMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* newAnimMsg = new plAnimCmdMsg;
newAnimMsg->fCmd = animMsg->fCmd;
newAnimMsg->fBegin = animMsg->fBegin;
newAnimMsg->fEnd = animMsg->fEnd;
@ -544,7 +544,7 @@ plMessage* plResponderModifier::IGetFastForwardMsg(plMessage* msg, bool python)
soundMsg->Cmd(plSoundMsg::kToggleState) ||
soundMsg->Cmd(plAnimCmdMsg::kAddCallbacks))
{
plSoundMsg *newSoundMsg = TRACKED_NEW plSoundMsg;
plSoundMsg *newSoundMsg = new plSoundMsg;
newSoundMsg->fCmd = soundMsg->fCmd;
newSoundMsg->fBegin = soundMsg->fBegin;
newSoundMsg->fEnd = soundMsg->fEnd;
@ -640,17 +640,17 @@ void plResponderModifier::Read(hsStream* stream, hsResMgr* mgr)
{
plSingleModifier::Read(stream, mgr);
Int8 numStates = stream->ReadByte();
int8_t numStates = stream->ReadByte();
fStates.SetCount(numStates);
for (Int8 i = 0; i < numStates; i++)
for (int8_t i = 0; i < numStates; i++)
{
plResponderState& state = fStates[i];
state.fNumCallbacks = stream->ReadByte();
state.fSwitchToState = stream->ReadByte();
Int8 j;
int8_t j;
Int8 numCmds = stream->ReadByte();
int8_t numCmds = stream->ReadByte();
state.fCmds.SetCount(numCmds);
for (j = 0; j < numCmds; j++)
{
@ -662,11 +662,11 @@ void plResponderModifier::Read(hsStream* stream, hsResMgr* mgr)
}
state.fWaitToCmd.clear();
Int8 mapSize = stream->ReadByte();
int8_t mapSize = stream->ReadByte();
for (j = 0; j < mapSize; j++)
{
Int8 wait = stream->ReadByte();
Int8 cmd = stream->ReadByte();
int8_t wait = stream->ReadByte();
int8_t cmd = stream->ReadByte();
state.fWaitToCmd[wait] = cmd;
}
}
@ -677,7 +677,7 @@ void plResponderModifier::Read(hsStream* stream, hsResMgr* mgr)
// attach responderSDLMod
delete fResponderSDLMod;
fResponderSDLMod = TRACKED_NEW plResponderSDLModifier;
fResponderSDLMod = new plResponderSDLModifier;
fResponderSDLMod->SetResponder(this);
}
@ -685,7 +685,7 @@ void plResponderModifier::Write(hsStream* stream, hsResMgr* mgr)
{
plSingleModifier::Write(stream, mgr);
Int8 numStates = fStates.GetCount();
int8_t numStates = fStates.GetCount();
stream->WriteByte(numStates);
for (int i = 0; i < numStates; i++)
{
@ -693,7 +693,7 @@ void plResponderModifier::Write(hsStream* stream, hsResMgr* mgr)
stream->WriteByte(state.fNumCallbacks);
stream->WriteByte(state.fSwitchToState);
Int8 numCmds = state.fCmds.GetCount();
int8_t numCmds = state.fCmds.GetCount();
stream->WriteByte(numCmds);
for (int j = 0; j < numCmds; j++)
{
@ -703,7 +703,7 @@ void plResponderModifier::Write(hsStream* stream, hsResMgr* mgr)
stream->WriteByte(cmd.fWaitOn);
}
Int8 mapSize = state.fWaitToCmd.size();
int8_t mapSize = state.fWaitToCmd.size();
stream->WriteByte(mapSize);
for (WaitToCmd::iterator it = state.fWaitToCmd.begin(); it != state.fWaitToCmd.end(); it++)
{
@ -724,23 +724,23 @@ void plResponderModifier::IDebugAnimBox(bool start)
{
plDebugText &debugTxt = plDebugText::Instance();
UInt32 scrnWidth, scrnHeight;
uint32_t scrnWidth, scrnHeight;
debugTxt.GetScreenSize(&scrnWidth, &scrnHeight);
// Box size is 1/8 screen size
UInt32 boxSize = scrnHeight / 8;
uint32_t boxSize = scrnHeight / 8;
// Draw box in lower left corner
if (start)
debugTxt.DrawRect(0, (UInt16)(scrnHeight-boxSize), (UInt16)boxSize, (UInt16)scrnHeight, 0, 255, 0);
debugTxt.DrawRect(0, (uint16_t)(scrnHeight-boxSize), (uint16_t)boxSize, (uint16_t)scrnHeight, 0, 255, 0);
else
debugTxt.DrawRect((UInt16)boxSize, (UInt16)(scrnHeight-boxSize), (UInt16)(boxSize*2), (UInt16)scrnHeight, 255, 0, 0);
debugTxt.DrawRect((uint16_t)boxSize, (uint16_t)(scrnHeight-boxSize), (uint16_t)(boxSize*2), (uint16_t)scrnHeight, 255, 0, 0);
}
void plResponderModifier::IDebugPlayMsg(plAnimCmdMsg* msg)
{
// Create a stop callback so we can do a cue for that too
plEventCallbackMsg *eventMsg = TRACKED_NEW plEventCallbackMsg;
plEventCallbackMsg *eventMsg = new plEventCallbackMsg;
eventMsg->AddReceiver(GetKey());
eventMsg->fRepeats = 0;
eventMsg->fUser = -1;
@ -766,7 +766,7 @@ void plResponderModifier::NoLogString(const char* str)
#endif // STATUS_LOG
}
void plResponderModifier::ILog(UInt32 color, const char* format, ...)
void plResponderModifier::ILog(uint32_t color, const char* format, ...)
{
#ifdef STATUS_LOG
if (!gLog)

View File

@ -54,30 +54,30 @@ class plResponderModifier : public plSingleModifier
{
friend class plResponderSDLModifier;
protected:
typedef std::map<Int8,Int8> WaitToCmd;
typedef std::map<int8_t,int8_t> WaitToCmd;
class plResponderCmd
{
public:
plResponderCmd() : fMsg(nil), fWaitOn(-1) {}
plResponderCmd(plMessage *msg, Int8 waitOn) : fMsg(msg), fWaitOn(waitOn) {}
plResponderCmd(plMessage *msg, int8_t waitOn) : fMsg(msg), fWaitOn(waitOn) {}
plMessage *fMsg;
Int8 fWaitOn; // Index into fCompletedEvents of who we're waiting on
int8_t fWaitOn; // Index into fCompletedEvents of who we're waiting on
};
class plResponderState
{
public:
hsTArray<plResponderCmd> fCmds;
Int8 fNumCallbacks; // So we know how far to search into the bitvector to find out when we're done
Int8 fSwitchToState; // State to switch to when all commands complete
int8_t fNumCallbacks; // So we know how far to search into the bitvector to find out when we're done
int8_t fSwitchToState; // State to switch to when all commands complete
WaitToCmd fWaitToCmd;
};
hsTArray<plResponderState> fStates;
Int8 fCurState; // The current state (first index for fCommandList)
Int8 fCurCommand; // The command we are currently waiting to send (or -1 if we're not sending)
int8_t fCurState; // The current state (first index for fCommandList)
int8_t fCurCommand; // The command we are currently waiting to send (or -1 if we're not sending)
bool fNetRequest; // Was the last trigger a net request
hsBitVector fCompletedEvents; // Which events that commands are waiting on have completed
bool fEnabled;
@ -94,16 +94,16 @@ protected:
kDetectUnTrigger = 0x2,
kSkipFFSound = 0x4
};
UInt8 fFlags;
UInt32 fNotifyMsgFlags; // store the msg flags of the notify which triggered us
uint8_t fFlags;
uint32_t fNotifyMsgFlags; // store the msg flags of the notify which triggered us
void Trigger(plNotifyMsg *msg);
bool IIsLocalOnlyCmd(plMessage* cmd);
bool IContinueSending();
Int8 ICmdFromWait(Int8 waitIdx);
int8_t ICmdFromWait(int8_t waitIdx);
virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty) { return true; }
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; }
static bool fDebugAnimBox; // Draws a box on screen when an animation is started
static void IDebugAnimBox(bool start);
@ -116,9 +116,9 @@ protected:
plMessage* IGetFastForwardMsg(plMessage* msg, bool python);
void ISetResponderStateFromNotify(plNotifyMsg* msg);
void ISetResponderState(Int8 state);
void ISetResponderState(int8_t state);
void ILog(UInt32 color, const char* format, ...);
void ILog(uint32_t color, const char* format, ...);
friend class plResponderComponent;
friend class plResponderWait;
@ -143,12 +143,12 @@ public:
// Restore callback state after load
void Restore();
const Int8 GetState() const { return fCurState; }
const int8_t GetState() const { return fCurState; }
//
// Export time only
//
void AddCommand(plMessage* pMsg, int state=0);
void AddCallback(Int8 state, Int8 cmd, Int8 callback);
void AddCallback(int8_t state, int8_t cmd, int8_t callback);
};
// Message for changing the enable state in a responder modifier

View File

@ -70,10 +70,10 @@ void plSDLModifier::AddTarget(plSceneObject* so)
if (so)
plSingleModifier::AddTarget(so);
if (!fStateCache)
fStateCache = TRACKED_NEW plStateDataRecord(GetSDLName());
fStateCache = new plStateDataRecord(GetSDLName());
}
UInt32 plSDLModifier::IApplyModFlags(UInt32 sendFlags)
uint32_t plSDLModifier::IApplyModFlags(uint32_t sendFlags)
{
return sendFlags;
}
@ -81,7 +81,7 @@ UInt32 plSDLModifier::IApplyModFlags(UInt32 sendFlags)
//
// write to net msg and send to server
//
void plSDLModifier::ISendNetMsg(plStateDataRecord*& state, plKey senderKey, UInt32 sendFlags)
void plSDLModifier::ISendNetMsg(plStateDataRecord*& state, plKey senderKey, uint32_t sendFlags)
{
hsAssert(senderKey, "nil senderKey?");
@ -112,7 +112,7 @@ hsBool plSDLModifier::MsgReceive(plMessage* msg)
plSDLModifierMsg* sdlMsg = plSDLModifierMsg::ConvertNoRef(msg);
if (sdlMsg && !stricmp(sdlMsg->GetSDLName(),GetSDLName()))
{
UInt32 sendFlags = IApplyModFlags(sdlMsg->GetFlags());
uint32_t sendFlags = IApplyModFlags(sdlMsg->GetFlags());
if (!fSentOrRecvdState)
sendFlags |= plSynchedObject::kNewState;
@ -150,7 +150,7 @@ hsBool plSDLModifier::MsgReceive(plMessage* msg)
// send a state update
//
bool gMooseDump=false;
void plSDLModifier::SendState(UInt32 sendFlags)
void plSDLModifier::SendState(uint32_t sendFlags)
{
hsAssert(fStateCache, "nil stateCache");
@ -161,7 +161,7 @@ void plSDLModifier::SendState(UInt32 sendFlags)
bool broadcast = (sendFlags & plSynchedObject::kBCastToClients) != 0;
// record current state
plStateDataRecord* curState = TRACKED_NEW plStateDataRecord(GetSDLName());
plStateDataRecord* curState = new plStateDataRecord(GetSDLName());
IPutCurrentStateIn(curState); // return sdl record which reflects current state of sceneObj, dirties curState
if (!force)
{

View File

@ -56,13 +56,13 @@ protected:
plStateDataRecord* fStateCache;
bool fSentOrRecvdState;
void ISendNetMsg(plStateDataRecord*& state, plKey senderKey, UInt32 sendFlags); // transmit net msg
void ISendNetMsg(plStateDataRecord*& state, plKey senderKey, uint32_t sendFlags); // transmit net msg
virtual void IPutCurrentStateIn(plStateDataRecord* dstState) = 0;
virtual void ISetCurrentStateFrom(const plStateDataRecord* srcState) = 0;
virtual void ISentState(const plStateDataRecord* sentState) {}
hsBool IEval(double secs, hsScalar del, UInt32 dirty) {return false;}
hsBool IEval(double secs, float del, uint32_t dirty) {return false;}
virtual UInt32 IApplyModFlags(UInt32 sendFlags);
virtual uint32_t IApplyModFlags(uint32_t sendFlags);
public:
CLASSNAME_REGISTER( plSDLModifier );
@ -72,7 +72,7 @@ public:
virtual ~plSDLModifier();
hsBool MsgReceive(plMessage* msg);
void SendState(UInt32 sendFlags); // send a state update
void SendState(uint32_t sendFlags); // send a state update
void ReceiveState(const plStateDataRecord* srcState); // recv a state update
virtual const char* GetSDLName() const = 0; // return the string name of the type of state descriptor you handle
virtual plKey GetStateOwnerKey() const;

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 "plSimpleModifier.h"
#include "plgDispatch.h"
@ -114,7 +114,7 @@ void plSimpleModifier::IEnd()
}
}
hsBool plSimpleModifier::IEval(double secs, hsScalar del, UInt32 dirty)
hsBool plSimpleModifier::IEval(double secs, float del, uint32_t dirty)
{
return IHandleTime(secs, del);
}
@ -180,13 +180,13 @@ hsBool plSimpleModifier::IHandleCmd(plAnimCmdMsg* modMsg)
return true;
}
hsBool plSimpleModifier::IHandleTime(double wSecs, hsScalar del)
hsBool plSimpleModifier::IHandleTime(double wSecs, float del)
{
if( !fTarget )
return true;
hsScalar secs = fTimeConvert.WorldToAnimTime(wSecs);
float secs = fTimeConvert.WorldToAnimTime(wSecs);
if( secs != fCurrentTime )
{

View File

@ -71,9 +71,9 @@ protected:
plAnimTimeConvert fTimeConvert;
// The following are in animation time.
hsScalar fCurrentTime;
float fCurrentTime;
hsBool IHandleTime(double wSecs, hsScalar del);
hsBool IHandleTime(double wSecs, float del);
hsBool IHandleRef(plRefMsg* refMsg);
virtual hsBool IHandleCmd(plAnimCmdMsg* modMsg);
@ -83,7 +83,7 @@ protected:
virtual void IBegin();
virtual void IEnd();
virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty);
virtual hsBool IEval(double secs, float del, uint32_t dirty);
public:
plSimpleModifier();

View File

@ -116,7 +116,7 @@ void plSoundSDLModifier::ISetCurrentStateFrom(const plStateDataRecord* srcState)
{
//double timeStarted;
/*if (soundState->FindVar(kStrTime)->Get(&timeStarted))
sound->SynchedPlay((hsScalar)timeStarted);
sound->SynchedPlay((float)timeStarted);
else
{
// Can't get the time we're supposed to start at, so we'll just try to play normally,

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 "hsGeometry3.h"
//#include "plgDispatch.h"
//#include "pnSceneObject/plDrawInterface.h"
@ -63,7 +63,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// fTargets.GetCount();
// for (int i=0; i < GetNumTargets(); i++)
// {
// plSpawnModMsg* pMsg = NEW(plSpawnModMsg);
// plSpawnModMsg* pMsg = new plSpawnModMsg;
// pMsg->AddReceiver( pSpawnMsg->GetSender() );
// //pMsg->fPos= GetTarget(i)->GetDrawInterface()->GetWorldBounds().GetCenter();
// pMsg->fPos= GetTarget(i)->GetCoordinateInterface()->GetLocalToWorld().GetTranslate();

View File

@ -49,7 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
class plSpawnModifier : public plMultiModifier
{
protected:
virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty) {return true;}
virtual hsBool IEval(double secs, float del, uint32_t dirty) {return true;}
public:
plSpawnModifier(){;}