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

@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsTypes.h"
#include "HeadSpin.h"
#include "plDistOpacityMod.h"
@ -89,9 +89,9 @@ void plDistOpacityMod::SetKey(plKey k)
}
hsScalar plDistOpacityMod::ICalcOpacity(const hsPoint3& targPos, const hsPoint3& refPos) const
float plDistOpacityMod::ICalcOpacity(const hsPoint3& targPos, const hsPoint3& refPos) const
{
hsScalar dist = hsVector3(&targPos, &refPos).Magnitude();
float dist = hsVector3(&targPos, &refPos).Magnitude();
if( dist > fDists[kFarTrans] )
return 0;
@ -129,7 +129,7 @@ void plDistOpacityMod::ISetOpacity()
if( !fSetup )
ISetup();
hsScalar opacity = ICalcOpacity(GetTarget()->GetLocalToWorld().GetTranslate(), fRefPos);
float opacity = ICalcOpacity(GetTarget()->GetLocalToWorld().GetTranslate(), fRefPos);
const int num = fFadeLays.GetCount();
int i;
@ -209,7 +209,7 @@ void plDistOpacityMod::SetTarget(plSceneObject* so)
fSetup = false;
}
void plDistOpacityMod::SetFarDist(hsScalar opaque, hsScalar transparent)
void plDistOpacityMod::SetFarDist(float opaque, float transparent)
{
fDists[kFarOpaq] = opaque;
fDists[kFarTrans] = transparent;
@ -217,7 +217,7 @@ void plDistOpacityMod::SetFarDist(hsScalar opaque, hsScalar transparent)
ICheckDists();
}
void plDistOpacityMod::SetNearDist(hsScalar transparent, hsScalar opaque)
void plDistOpacityMod::SetNearDist(float transparent, float opaque)
{
fDists[kNearOpaq] = opaque;
fDists[kNearTrans] = transparent;
@ -291,7 +291,7 @@ void plDistOpacityMod::ISetup()
hsGMaterial* mat = todo[i].fMat;
plLayerInterface* lay = todo[i].fLay;
plFadeOpacityLay* fade = TRACKED_NEW plFadeOpacityLay;
plFadeOpacityLay* fade = new plFadeOpacityLay;
hsgResMgr::ResMgr()->NewKey(lay->GetKey()->GetName(), fade, lay->GetKey()->GetUoid().GetLocation());
@ -300,11 +300,11 @@ void plDistOpacityMod::ISetup()
// We should add a ref or something here if we're going to hold on to this (even though we created and "own" it).
fFadeLays.Append(fade);
plMatRefMsg* msg = TRACKED_NEW plMatRefMsg(mat->GetKey(), plRefMsg::kOnReplace, i, plMatRefMsg::kLayer);
plMatRefMsg* msg = new plMatRefMsg(mat->GetKey(), plRefMsg::kOnReplace, i, plMatRefMsg::kLayer);
msg->SetOldRef(lay);
hsgResMgr::ResMgr()->SendRef(fade, msg, plRefFlags::kActiveRef);
plGenRefMsg* toMe = TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefFadeLay);
plGenRefMsg* toMe = new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefFadeLay);
hsgResMgr::ResMgr()->SendRef(fade, toMe, plRefFlags::kPassiveRef);
}

View File

@ -67,7 +67,7 @@ protected:
};
// Volatile flag, whether we're setup yet or not.
UInt8 fSetup;
uint8_t fSetup;
enum {
kNearTrans,
@ -77,16 +77,16 @@ protected:
kNumDists
};
hsScalar fDists[kNumDists];
float fDists[kNumDists];
hsPoint3 fRefPos;
hsTArray<plFadeOpacityLay*> fFadeLays;
// We only act in response to messages.
virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty) { return false; }
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; }
hsScalar ICalcOpacity(const hsPoint3& targPos, const hsPoint3& refPos) const;
float ICalcOpacity(const hsPoint3& targPos, const hsPoint3& refPos) const;
void ISetOpacity();
void ISetup();
@ -116,13 +116,13 @@ public:
// Rules are:
// NearTrans <= NearOpaq <= FarOpaque <= FarTrans
void SetFarDist(hsScalar opaque, hsScalar transparent);
void SetNearDist(hsScalar transparent, hsScalar opaque);
void SetFarDist(float opaque, float transparent);
void SetNearDist(float transparent, float opaque);
hsScalar GetFarTransparent() const { return fDists[kFarTrans]; }
hsScalar GetNearTransparent() const { return fDists[kNearTrans]; }
hsScalar GetFarOpaque() const { return fDists[kFarOpaq]; }
hsScalar GetNearOpaque() const { return fDists[kNearOpaq]; }
float GetFarTransparent() const { return fDists[kFarTrans]; }
float GetNearTransparent() const { return fDists[kNearTrans]; }
float GetFarOpaque() const { return fDists[kFarOpaq]; }
float GetNearOpaque() const { return fDists[kNearOpaq]; }
};
#endif // plDistOpacityMod_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 "plFadeOpacityLay.h"
@ -48,16 +48,16 @@ plFadeOpacityLay::plFadeOpacityLay()
: fOpScale(1.f)
{
fOwnedChannels |= kOpacity;
fOpacity = TRACKED_NEW hsScalar;
fOpacity = new float;
}
plFadeOpacityLay::~plFadeOpacityLay()
{
}
UInt32 plFadeOpacityLay::Eval(double secs, UInt32 frame, UInt32 ignore)
uint32_t plFadeOpacityLay::Eval(double secs, uint32_t frame, uint32_t ignore)
{
UInt32 ret = plLayerInterface::Eval(secs, frame, ignore);
uint32_t ret = plLayerInterface::Eval(secs, frame, ignore);
if( fUnderLay )
{

View File

@ -50,7 +50,7 @@ class plFadeOpacityLay : public plLayerInterface
{
protected:
hsScalar fOpScale;
float fOpScale;
public:
plFadeOpacityLay();
@ -59,13 +59,13 @@ public:
CLASSNAME_REGISTER( plFadeOpacityLay );
GETINTERFACE_ANY( plFadeOpacityLay, plLayerInterface );
virtual UInt32 Eval(double secs, UInt32 frame, UInt32 ignore);
virtual uint32_t Eval(double secs, uint32_t frame, uint32_t ignore);
virtual void Read(hsStream* s, hsResMgr* mgr);
virtual void Write(hsStream* s, hsResMgr* mgr);
void SetOpacity(hsScalar f) { fOpScale = f; }
hsScalar GetOpacity() const { return fOpScale; }
void SetOpacity(float f) { fOpScale = f; }
float GetOpacity() const { return fOpScale; }
};
#endif // plFadeOpacityLay_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 "plFadeOpacityMod.h"
#include "plFadeOpacityLay.h"
@ -83,8 +83,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
hsBool plFadeOpacityMod::fLOSCheckDisabled = false;
const hsScalar kDefFadeUp(5.f);
const hsScalar kDefFadeDown(1.f);
const float kDefFadeUp(5.f);
const float kDefFadeDown(1.f);
plFadeOpacityMod::plFadeOpacityMod()
: fFadeUp(kDefFadeUp),
@ -178,7 +178,7 @@ void plFadeOpacityMod::IOnRenderMsg(plRenderMsg* rend)
{
// If we've moved more than 3 feet in a frame, we'll consider this a
// camera cut. In that case, don't fade up or down, just go there.
const hsScalar kCutMagSquared = 3.f * 3.f;
const float kCutMagSquared = 3.f * 3.f;
if( hsVector3(&eyePos, &fLastEye).MagnitudeSquared() > kCutMagSquared )
fFade = kImmediate;
}
@ -237,7 +237,7 @@ void plFadeOpacityMod::ICalcOpacity()
switch( fFade )
{
case kFadeUp:
fOpCurrent = (hsScalar)(t - fStart);
fOpCurrent = (float)(t - fStart);
if( fOpCurrent > fFadeUp )
{
fOpCurrent = 1.f;
@ -249,7 +249,7 @@ void plFadeOpacityMod::ICalcOpacity()
}
break;
case kFadeDown:
fOpCurrent = (hsScalar)(t - fStart);
fOpCurrent = (float)(t - fStart);
if( fOpCurrent > fFadeDown )
{
fOpCurrent = 0.f;
@ -366,7 +366,7 @@ void plFadeOpacityMod::ISetup(plSceneObject* so)
plLayerInterface* lay = mat->GetLayer(j);
if( !j || !(lay->GetZFlags() & hsGMatState::kZNoZWrite) || (lay->GetMiscFlags() & hsGMatState::kMiscRestartPassHere) )
{
plFadeOpacityLay* fade = NEW(plFadeOpacityLay);
plFadeOpacityLay* fade = new plFadeOpacityLay();
hsgResMgr::ResMgr()->NewKey(lay->GetKey()->GetName(), fade, lay->GetKey()->GetUoid().GetLocation());
@ -375,11 +375,11 @@ void plFadeOpacityMod::ISetup(plSceneObject* so)
// We should add a ref or something here if we're going to hold on to this (even though we created and "own" it).
fFadeLays.Append(fade);
plMatRefMsg* msg = NEW(plMatRefMsg)(mat->GetKey(), plRefMsg::kOnReplace, i, plMatRefMsg::kLayer);
plMatRefMsg* msg = new plMatRefMsg(mat->GetKey(), plRefMsg::kOnReplace, i, plMatRefMsg::kLayer);
msg->SetOldRef(lay);
hsgResMgr::ResMgr()->SendRef(fade, msg, plRefFlags::kActiveRef);
plGenRefMsg* toMe = NEW(plGenRefMsg)(GetKey(), plRefMsg::kOnRequest, 0, kRefFadeLay);
plGenRefMsg* toMe = new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefFadeLay);
hsgResMgr::ResMgr()->SendRef(fade, toMe, plRefFlags::kPassiveRef);
}
}

View File

@ -65,8 +65,8 @@ protected:
};
// Input parameters
hsScalar fFadeUp;
hsScalar fFadeDown;
float fFadeUp;
float fFadeDown;
// Internal fade state
enum FadeState {
@ -76,11 +76,11 @@ protected:
kFadeDown = 3,
kImmediate = 4
};
hsScalar fOpCurrent;
float fOpCurrent;
double fStart;
FadeState fFade;
UInt8 fSetup;
uint8_t fSetup;
hsPoint3 fLastEye;
@ -101,7 +101,7 @@ protected:
void ISetup(plSceneObject* so);
// We only act in response to messages.
virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty) { return false; }
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; }
public:
plFadeOpacityMod();
@ -123,11 +123,11 @@ public:
void FadeDown();
void Fade(hsBool up) { if( up ) FadeUp(); else FadeDown(); }
void SetFadeUp(hsScalar f) { fFadeUp = f; }
hsScalar GetFadeUp() const { return fFadeUp; }
void SetFadeUp(float f) { fFadeUp = f; }
float GetFadeUp() const { return fFadeUp; }
void SetFadeDown(hsScalar f) { fFadeDown = f; }
hsScalar GetFadeDown() const { return fFadeDown; }
void SetFadeDown(float f) { fFadeDown = f; }
float GetFadeDown() const { return fFadeDown; }
static hsBool GetLOSCheckDisabled() { return fLOSCheckDisabled; }
static void SetLOSCheckDisabled(hsBool on) { fLOSCheckDisabled = on; }

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 "plGrabCubeMap.h"
@ -87,7 +87,7 @@ void plGrabCubeRenderRequest::Render(plPipeline* pipe, plPageTreeMgr* pageMgr)
}
void plGrabCubeMap::GrabCube(plPipeline* pipe, plSceneObject* obj, const char* pref, const hsColorRGBA& clearColor, UInt8 q)
void plGrabCubeMap::GrabCube(plPipeline* pipe, plSceneObject* obj, const char* pref, const hsColorRGBA& clearColor, uint8_t q)
{
hsPoint3 center;
if( obj && !(obj->GetLocalToWorld().fFlags & hsMatrix44::kIsIdent) )
@ -105,18 +105,18 @@ void plGrabCubeMap::GrabCube(plPipeline* pipe, plSceneObject* obj, const char* p
ISetupRenderRequests(pipe, center, pref, clearColor, q);
}
void plGrabCubeMap::GrabCube(plPipeline* pipe, const hsPoint3& center, const char* pref, const hsColorRGBA& clearColor, UInt8 q)
void plGrabCubeMap::GrabCube(plPipeline* pipe, const hsPoint3& center, const char* pref, const hsColorRGBA& clearColor, uint8_t q)
{
ISetupRenderRequests(pipe, center, pref, clearColor, q);
}
void plGrabCubeMap::ISetupRenderRequests(plPipeline* pipe, const hsPoint3& center, const char* pref, const hsColorRGBA& clearColor, UInt8 q) const
void plGrabCubeMap::ISetupRenderRequests(plPipeline* pipe, const hsPoint3& center, const char* pref, const hsColorRGBA& clearColor, uint8_t q) const
{
hsMatrix44 worldToCameras[6];
hsMatrix44 cameraToWorlds[6];
hsMatrix44::MakeEnvMapMatrices(center, worldToCameras, cameraToWorlds);
UInt32 renderState
uint32_t renderState
= plPipeline::kRenderNormal
| plPipeline::kRenderClearColor
| plPipeline::kRenderClearDepth;
@ -136,7 +136,7 @@ void plGrabCubeMap::ISetupRenderRequests(plPipeline* pipe, const hsPoint3& cente
int i;
for( i = 0; i < 6; i++ )
{
plGrabCubeRenderRequest* req = TRACKED_NEW plGrabCubeRenderRequest;
plGrabCubeRenderRequest* req = new plGrabCubeRenderRequest;
req->SetRenderState(renderState);
req->SetDrawableMask(plDrawable::kNormal);
@ -159,7 +159,7 @@ void plGrabCubeMap::ISetupRenderRequests(plPipeline* pipe, const hsPoint3& cente
req->fQuality = q;
sprintf(req->fFileName, "%s_%s.jpg", pref, suff[i]);
plRenderRequestMsg* reqMsg = TRACKED_NEW plRenderRequestMsg(nil, req);
plRenderRequestMsg* reqMsg = new plRenderRequestMsg(nil, req);
reqMsg->Send();
hsRefCnt_SafeUnRef(req);
}

View File

@ -59,7 +59,7 @@ public:
plGrabCubeRenderRequest();
char fFileName[256];
UInt8 fQuality;
uint8_t fQuality;
// This function is called after the render request is processed by the client
virtual void Render(plPipeline* pipe, plPageTreeMgr* pageMgr);
@ -68,12 +68,12 @@ public:
class plGrabCubeMap
{
protected:
void ISetupRenderRequests(plPipeline* pipe, const hsPoint3& center, const char* pref, const hsColorRGBA& clearColor, UInt8 q) const;
void ISetupRenderRequests(plPipeline* pipe, const hsPoint3& center, const char* pref, const hsColorRGBA& clearColor, uint8_t q) const;
public:
plGrabCubeMap() {}
void GrabCube(plPipeline* pipe, plSceneObject* obj, const char* pref, const hsColorRGBA& clearColor, UInt8 q=75);
void GrabCube(plPipeline* pipe, const hsPoint3& pos, const char* pref, const hsColorRGBA& clearColor, UInt8 q=75);
void GrabCube(plPipeline* pipe, plSceneObject* obj, const char* pref, const hsColorRGBA& clearColor, uint8_t q=75);
void GrabCube(plPipeline* pipe, const hsPoint3& pos, const char* pref, const hsColorRGBA& clearColor, uint8_t q=75);
};

View File

@ -40,19 +40,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsConfig.h"
#include "HeadSpin.h"
#if HS_BUILD_FOR_WIN32
#define WIN32_EXTRA_LEAN
#define WIN32_LEAN_AND_MEAN
#ifndef _WINDOWS_H_ // redundant include guard to minimize compile times
#define _WINDOWS_H_
#include <windows.h>
#endif // _WINDOWS_H_
#include "vfw.h"
#endif // HS_BUILD_FOR_WIN32
#include "hsTypes.h"
#include "plLayerAVI.h"
#include "plGImage/plMipmap.h"
@ -79,7 +72,7 @@ static hsBool ICopySourceToTexture16(BITMAPINFO* bmi, plMi
plLayerAVI::plLayerAVI()
{
fAVIInfo = TRACKED_NEW plAVIFileInfo;
fAVIInfo = new plAVIFileInfo;
}
plLayerAVI::~plLayerAVI()
@ -114,8 +107,8 @@ hsBool plLayerAVI::IInit()
return ISetFault("Can't get first frame");
ISetSize(bmi->bmiHeader.biWidth, bmi->bmiHeader.biHeight);
Int32 endFrame = fAVIInfo->fAVIStreamInfo.dwLength-1;
hsScalar length = float(endFrame) * float(fAVIInfo->fAVIStreamInfo.dwScale)
int32_t endFrame = fAVIInfo->fAVIStreamInfo.dwLength-1;
float length = float(endFrame) * float(fAVIInfo->fAVIStreamInfo.dwScale)
/ float(fAVIInfo->fAVIStreamInfo.dwRate);
ISetLength(length);
#endif
@ -123,14 +116,14 @@ hsBool plLayerAVI::IInit()
return false;
}
Int32 plLayerAVI::ISecsToFrame(hsScalar secs)
int32_t plLayerAVI::ISecsToFrame(float secs)
{
#if HS_BUILD_FOR_WIN32
float timeScale = float(fAVIInfo->fAVIStreamInfo.dwRate) / float(fAVIInfo->fAVIStreamInfo.dwScale);
#else
float timeScale = 1.0f;
#endif
return Int32(secs * timeScale + 0.5f);
return int32_t(secs * timeScale + 0.5f);
}
hsBool plLayerAVI::IGetCurrentFrame()
@ -165,9 +158,9 @@ static hsBool ICopySourceToTexture16(BITMAPINFO* bmi, plMipmap* b)
{
hsAssert( b != nil, "nil mipmap passed to ICopySourceToTexture16()" );
UInt16* pSrc = (UInt16*)( bmi->bmiHeader.biSize + (BYTE*)bmi );
uint16_t* pSrc = (uint16_t*)( bmi->bmiHeader.biSize + (BYTE*)bmi );
UInt32* pix = (UInt32*)b->GetImage();
uint32_t* pix = (uint32_t*)b->GetImage();
pix += b->GetWidth() * b->GetHeight();
int width = bmi->bmiHeader.biWidth;
@ -178,11 +171,11 @@ static hsBool ICopySourceToTexture16(BITMAPINFO* bmi, plMipmap* b)
int i;
for( i = 0; i < useHeight; i++ )
{
UInt16* src = pSrc;
uint16_t* src = pSrc;
pSrc += width;
pix -= b->GetWidth();
UInt32* tPix = pix;
uint32_t* tPix = pix;
int j;
for( j = 0; j < useWidth; j++ )
{

View File

@ -55,7 +55,7 @@ protected:
hsBool ICloseMovie();
virtual Int32 ISecsToFrame(hsScalar secs);
virtual int32_t ISecsToFrame(float secs);
virtual hsBool IInit();
virtual hsBool IGetCurrentFrame();
virtual hsBool IRelease();

View File

@ -40,11 +40,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsTypes.h"
#include "HeadSpin.h"
#include "plLayerMovie.h"
#include "hsStream.h"
#include "hsResMgr.h"
#include "hsUtils.h"
#include "plMessage/plAnimCmdMsg.h"
#include "plGImage/plMipmap.h"
@ -58,7 +58,7 @@ plLayerMovie::plLayerMovie()
fHeight(32)
{
fOwnedChannels |= kTexture;
fTexture = TRACKED_NEW plBitmap*;
fTexture = new plBitmap*;
*fTexture = nil;
// fTimeConvert.SetOwner(this);
@ -82,7 +82,7 @@ hsBool plLayerMovie::ISetFault(const char* errStr)
return true;
}
hsBool plLayerMovie::ISetLength(hsScalar secs)
hsBool plLayerMovie::ISetLength(float secs)
{
fLength = secs;
return false;
@ -111,7 +111,7 @@ hsBool plLayerMovie::ISetupBitmap()
{
if( !GetTexture() )
{
plMipmap* b = TRACKED_NEW plMipmap( fWidth, fHeight, plMipmap::kARGB32Config, 1 );
plMipmap* b = new plMipmap( fWidth, fHeight, plMipmap::kARGB32Config, 1 );
memset(b->GetImage(), 0x10, b->GetHeight() * b->GetRowBytes() );
b->SetFlags( b->GetFlags() | plMipmap::kDontThrowAwayImage );
@ -141,8 +141,8 @@ hsBool plLayerMovie::IMovieIsIdle()
hsBool plLayerMovie::ICurrentFrameDirty(double wSecs)
{
hsScalar secs = fTimeConvert.WorldToAnimTime(wSecs);
UInt32 frame = ISecsToFrame(secs);
float secs = fTimeConvert.WorldToAnimTime(wSecs);
uint32_t frame = ISecsToFrame(secs);
if( frame == fCurrentFrame )
return false;
fCurrentFrame = frame;
@ -150,9 +150,9 @@ hsBool plLayerMovie::ICurrentFrameDirty(double wSecs)
return true;
}
UInt32 plLayerMovie::Eval(double wSecs, UInt32 frame, UInt32 ignore)
uint32_t plLayerMovie::Eval(double wSecs, uint32_t frame, uint32_t ignore)
{
UInt32 dirty = plLayerAnimation::Eval(wSecs, frame, ignore);
uint32_t dirty = plLayerAnimation::Eval(wSecs, frame, ignore);
if( !IGetFault() && !(ignore & kTexture) )
{
@ -187,7 +187,7 @@ void plLayerMovie::Read(hsStream* s, hsResMgr* mgr)
int len = s->ReadLE32();
if( len )
{
fMovieName = TRACKED_NEW char[len+1];
fMovieName = new char[len+1];
s->Read(len, fMovieName);
fMovieName[len] = 0;
}

View File

@ -57,11 +57,11 @@ protected:
// plAnimTimeConvert fTimeConvert;
Int32 fCurrentFrame;
hsScalar fLength;
UInt32 fWidth, fHeight;
int32_t fCurrentFrame;
float fLength;
uint32_t fWidth, fHeight;
virtual Int32 ISecsToFrame(hsScalar secs) = 0;
virtual int32_t ISecsToFrame(float secs) = 0;
hsBool IGetFault() const { return !(fMovieName && *fMovieName); }
hsBool ISetFault(const char* errStr);
@ -69,7 +69,7 @@ protected:
hsBool IMovieIsIdle(); // will call IRelease();
hsBool ISetupBitmap();
hsBool ISetSize(int w, int h);
hsBool ISetLength(hsScalar secs);
hsBool ISetLength(float secs);
hsBool ICurrentFrameDirty(double wSecs);
virtual hsBool IInit() = 0; // Load header etc, must call ISetSize(w, h), ISetLength(s)
@ -82,7 +82,7 @@ public:
CLASSNAME_REGISTER( plLayerMovie );
GETINTERFACE_ANY( plLayerMovie, plLayerAnimation );
virtual UInt32 Eval(double secs, UInt32 frame, UInt32 ignore);
virtual uint32_t Eval(double secs, uint32_t frame, uint32_t ignore);
virtual void Read(hsStream* s, hsResMgr* mgr);
virtual void Write(hsStream* s, hsResMgr* mgr);
@ -97,7 +97,7 @@ public:
// Movie specific
int GetWidth() const;
int GetHeight() const;
hsScalar GetLength() const { return fLength; }
float GetLength() const { return fLength; }
virtual void DefaultMovie();
};