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

@ -80,7 +80,7 @@ hsBool DeviceSelector::Enumerate(HWND hWnd, hsBool expertMode )
// Sort the modes
hsTArray<hsG3DDeviceRecord> &recs = fSelector.GetDeviceRecords();
for (Int32 i = 0; i < recs.Count(); i++)
for (int32_t i = 0; i < recs.Count(); i++)
{
hsTArray<hsG3DDeviceMode> &modes = recs[i].GetModes();
std::sort(modes.FirstIter(), modes.StopIter());
@ -163,11 +163,11 @@ int DeviceSelector::IFindFiltered( int realIndex )
return idx;
}
hsBool DeviceSelector::CheckDeviceType(UInt32 type)
hsBool DeviceSelector::CheckDeviceType(uint32_t type)
{
hsTArray<hsG3DDeviceRecord>& records = fSelector.GetDeviceRecords();
for (Int32 i = 0; i < records.Count(); i++)
for (int32_t i = 0; i < records.Count(); i++)
{
if (type == records[i].GetG3DDeviceType())
return true;
@ -216,9 +216,9 @@ void DeviceSelector::SetOpenGL()
SetDeviceType(hsG3DDeviceSelector::kDevTypeOpenGL);
}
void DeviceSelector::SetDeviceType (UInt32 type)
void DeviceSelector::SetDeviceType (uint32_t type)
{
Int32 i;
int32_t i;
for(i = 0; i < fRecords.GetCount(); i++)
fRecords[i].Clear();
fRecords.Reset();
@ -267,7 +267,7 @@ hsBool DeviceSelector::IsOpenGL()
return false;
}
hsBool DeviceSelector::SetDevice(UInt32 index)
hsBool DeviceSelector::SetDevice(uint32_t index)
{
if (index < fRecords.Count())
{
@ -283,7 +283,7 @@ hsBool DeviceSelector::SetDevice(UInt32 index)
return false;
}
hsBool DeviceSelector::SetMode(UInt32 index)
hsBool DeviceSelector::SetMode(uint32_t index)
{
if (fSelDev >= fRecords.Count())
return false;
@ -332,12 +332,12 @@ char* DeviceSelector::GetModeDescription( void )
return fStr;
}
UInt32 DeviceSelector::GetNumModes()
uint32_t DeviceSelector::GetNumModes()
{
return fFilteredModes.GetCount();
}
void DeviceSelector::GetMode(UInt32 i, int& width, int& height, int& depth)
void DeviceSelector::GetMode(uint32_t i, int& width, int& height, int& depth)
{
if (i >= fFilteredModes.GetCount())
return;
@ -515,38 +515,38 @@ int DeviceSelector::GetModeNum(const hsG3DDeviceMode *pLoadMode)
return -1;
}
UInt8 DeviceSelector::CanAntiAlias()
uint8_t DeviceSelector::CanAntiAlias()
{
hsG3DDeviceMode *mode = fRecords[ fSelDev ].GetMode( fFilteredModes[ fSelMode ] );
return mode->GetNumFSAATypes();
}
UInt8 DeviceSelector::IsAntiAliased()
uint8_t DeviceSelector::IsAntiAliased()
{
return fSelRec.GetAASetting();
}
void DeviceSelector::SetAntiAlias(UInt8 numSamples)
void DeviceSelector::SetAntiAlias(uint8_t numSamples)
{
fSelRec.SetAASetting( numSamples );
}
UInt8 DeviceSelector::CanAnisotropicFilter()
uint8_t DeviceSelector::CanAnisotropicFilter()
{
UInt8 hi = fRecords[ fSelDev ].GetMaxAnisotropicSamples();
uint8_t hi = fRecords[ fSelDev ].GetMaxAnisotropicSamples();
if( hi > 1 )
return hi;
return 0;
}
UInt8 DeviceSelector::GetAnisotropicLevel()
uint8_t DeviceSelector::GetAnisotropicLevel()
{
return fSelRec.GetMaxAnisotropicSamples();
}
void DeviceSelector::SetAnisotropicLevel( UInt8 level )
void DeviceSelector::SetAnisotropicLevel( uint8_t level )
{
fSelRec.SetMaxAnisotropicSamples( level );
}
@ -581,7 +581,7 @@ void DeviceSelector::SetCompressed(hsBool state)
fSelRec.SetCap(hsG3DDeviceSelector::kCapsCompressTextures, state);
}
bool DeviceSelector::GetCap(UInt32 cap)
bool DeviceSelector::GetCap(uint32_t cap)
{
return fSelRec.GetCap(cap) != 0;
}

View File

@ -55,16 +55,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
class DeviceSelector
{
protected:
UInt32 fSelDevType; // Current type of driver. Set by the SetDirect3D/Glide/OpenGL functions
UInt32 fSelDev; // Index of selected device. Set by SetDevice() or
UInt32 fSelMode; // Index of selected mode for current device
uint32_t fSelDevType; // Current type of driver. Set by the SetDirect3D/Glide/OpenGL functions
uint32_t fSelDev; // Index of selected device. Set by SetDevice() or
uint32_t fSelMode; // Index of selected mode for current device
int fDevDesc; // Used by GetDeviceDescription() to store index of current device
int fModeDesc; // Used by GetModeDescription() to store index of current mode
char fStr[1024]; // Used to return text
UInt16 fPerformance; // Performance level (0-100)
uint16_t fPerformance; // Performance level (0-100)
int fFilterBPP, fFilterWidth, fFilterHeight;
@ -105,32 +105,32 @@ public:
hsBool IsOpenGL();
// Gets and sets the current device or mode.
UInt32 GetSelectedDevice() { return fSelDev; }
UInt32 GetSelectedMode() { return fSelMode; }
hsBool SetDevice(UInt32 index);
hsBool SetMode(UInt32 index);
uint32_t GetSelectedDevice() { return fSelDev; }
uint32_t GetSelectedMode() { return fSelMode; }
hsBool SetDevice(uint32_t index);
hsBool SetMode(uint32_t index);
// Returns the device or mode descriptions. Call repeatedly until nil is returned.
char* GetDeviceDescription();
char* GetModeDescription( void );
UInt32 GetNumModes();
void GetMode(UInt32 i, int& width, int& height, int& depth);
uint32_t GetNumModes();
void GetMode(uint32_t i, int& width, int& height, int& depth);
void SetModeFilter( int bitDepth = 0, int minWidth = 0, int minHeight = 0 );
void SetPerformance (UInt16 value) { fPerformance = value; }
UInt16 GetPerformance () { return fPerformance; }
void SetPerformance (uint16_t value) { fPerformance = value; }
uint16_t GetPerformance () { return fPerformance; }
// Returns max number of samples allowed for AA
UInt8 CanAntiAlias ();
uint8_t CanAntiAlias ();
// Returns current # of samples selected for AA, 0 if none
UInt8 IsAntiAliased ();
void SetAntiAlias (UInt8 numSamples);
uint8_t IsAntiAliased ();
void SetAntiAlias (uint8_t numSamples);
UInt8 CanAnisotropicFilter();
UInt8 GetAnisotropicLevel();
void SetAnisotropicLevel( UInt8 level );
uint8_t CanAnisotropicFilter();
uint8_t GetAnisotropicLevel();
void SetAnisotropicLevel( uint8_t level );
bool CanWindow();
bool IsWindowed();
@ -141,7 +141,7 @@ public:
void SetCompressed (hsBool state);
// Caps from hsG3DDeviceSelector
bool GetCap(UInt32 cap);
bool GetCap(uint32_t cap);
// Save and load
hsBool Save(); // Returns false if output file can't be opened
@ -149,8 +149,8 @@ public:
hsBool SetDefault(); // Returns false if no suitable renderers are found
protected:
hsBool CheckDeviceType(UInt32 type); // Used by the Is*Available() functions
void SetDeviceType(UInt32 type); // Used by SetDirect3D/Glide/OpenGL
hsBool CheckDeviceType(uint32_t type); // Used by the Is*Available() functions
void SetDeviceType(uint32_t type); // Used by SetDirect3D/Glide/OpenGL
// Helpers for LoadDeviceMode()
int GetDeviceNum(const hsG3DDeviceRecord *pLoadRec); // Returns index of passed in device