1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 11:19:10 +00:00

Convert custom HeadSpin integer types to standard types from stdint.h

This commit is contained in:
2012-01-19 21:19:26 -05:00
parent a0d54e2644
commit 5027b5a4ac
1301 changed files with 14497 additions and 14532 deletions

View File

@ -67,7 +67,7 @@ protected:
};
// Volatile flag, whether we're setup yet or not.
UInt8 fSetup;
uint8_t fSetup;
enum {
kNearTrans,
@ -84,7 +84,7 @@ protected:
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, hsScalar del, uint32_t dirty) { return false; }
hsScalar ICalcOpacity(const hsPoint3& targPos, const hsPoint3& refPos) const;
void ISetOpacity();

View File

@ -55,9 +55,9 @@ 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

@ -59,7 +59,7 @@ 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);

View File

@ -80,7 +80,7 @@ protected:
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, hsScalar del, uint32_t dirty) { return false; }
public:
plFadeOpacityMod();

View File

@ -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;

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

@ -114,7 +114,7 @@ hsBool plLayerAVI::IInit()
return ISetFault("Can't get first frame");
ISetSize(bmi->bmiHeader.biWidth, bmi->bmiHeader.biHeight);
Int32 endFrame = fAVIInfo->fAVIStreamInfo.dwLength-1;
int32_t endFrame = fAVIInfo->fAVIStreamInfo.dwLength-1;
hsScalar length = float(endFrame) * float(fAVIInfo->fAVIStreamInfo.dwScale)
/ float(fAVIInfo->fAVIStreamInfo.dwRate);
ISetLength(length);
@ -123,14 +123,14 @@ hsBool plLayerAVI::IInit()
return false;
}
Int32 plLayerAVI::ISecsToFrame(hsScalar secs)
int32_t plLayerAVI::ISecsToFrame(hsScalar 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 +165,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 +178,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(hsScalar secs);
virtual hsBool IInit();
virtual hsBool IGetCurrentFrame();
virtual hsBool IRelease();

View File

@ -143,7 +143,7 @@ hsBool plLayerMovie::IMovieIsIdle()
hsBool plLayerMovie::ICurrentFrameDirty(double wSecs)
{
hsScalar secs = fTimeConvert.WorldToAnimTime(wSecs);
UInt32 frame = ISecsToFrame(secs);
uint32_t frame = ISecsToFrame(secs);
if( frame == fCurrentFrame )
return false;
fCurrentFrame = frame;
@ -151,9 +151,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) )
{

View File

@ -57,11 +57,11 @@ protected:
// plAnimTimeConvert fTimeConvert;
Int32 fCurrentFrame;
int32_t fCurrentFrame;
hsScalar fLength;
UInt32 fWidth, fHeight;
uint32_t fWidth, fHeight;
virtual Int32 ISecsToFrame(hsScalar secs) = 0;
virtual int32_t ISecsToFrame(hsScalar secs) = 0;
hsBool IGetFault() const { return !(fMovieName && *fMovieName); }
hsBool ISetFault(const char* errStr);
@ -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);