Simple pass over the codebase to standardize the platform types.

This commit is contained in:
cpusci 2013-08-04 16:26:01 -05:00
parent c75d6feb20
commit 4c35fd37af
189 changed files with 824 additions and 824 deletions

View file

@ -172,7 +172,7 @@ void ALDeviceList::GetDeviceVersion(int index, int *major, int *minor)
/*
* Returns the maximum number of Sources that can be generate on the given device
*/
unsigned int ALDeviceList::GetMaxNumSources(int index)
U32 ALDeviceList::GetMaxNumSources(S32 index)
{
if (index < GetNumDevices())
return vDeviceInfo[index].uiSourceCount;
@ -204,10 +204,10 @@ int ALDeviceList::GetDefaultDevice()
/*
* Deselects devices which don't have the specified minimum version
*/
void ALDeviceList::FilterDevicesMinVer(int major, int minor)
void ALDeviceList::FilterDevicesMinVer(S32 major, S32 minor)
{
int dMajor, dMinor;
for (unsigned int i = 0; i < vDeviceInfo.size(); i++) {
for (U32 i = 0; i < vDeviceInfo.size(); i++) {
GetDeviceVersion(i, &dMajor, &dMinor);
if ((dMajor < major) || ((dMajor == major) && (dMinor < minor))) {
vDeviceInfo[i].bSelected = false;
@ -218,10 +218,10 @@ void ALDeviceList::FilterDevicesMinVer(int major, int minor)
/*
* Deselects devices which don't have the specified maximum version
*/
void ALDeviceList::FilterDevicesMaxVer(int major, int minor)
void ALDeviceList::FilterDevicesMaxVer(S32 major, S32 minor)
{
int dMajor, dMinor;
for (unsigned int i = 0; i < vDeviceInfo.size(); i++) {
S32 dMajor, dMinor;
for (U32 i = 0; i < vDeviceInfo.size(); i++) {
GetDeviceVersion(i, &dMajor, &dMinor);
if ((dMajor > major) || ((dMajor == major) && (dMinor > minor))) {
vDeviceInfo[i].bSelected = false;
@ -234,7 +234,7 @@ void ALDeviceList::FilterDevicesMaxVer(int major, int minor)
*/
void ALDeviceList::FilterDevicesExtension(SFXALCaps cap)
{
for (unsigned int i = 0; i < vDeviceInfo.size(); i++)
for (U32 i = 0; i < vDeviceInfo.size(); i++)
vDeviceInfo[i].bSelected = vDeviceInfo[i].iCapsFlags & cap;
}
@ -243,7 +243,7 @@ void ALDeviceList::FilterDevicesExtension(SFXALCaps cap)
*/
void ALDeviceList::ResetFilters()
{
for (int i = 0; i < GetNumDevices(); i++) {
for (S32 i = 0; i < GetNumDevices(); i++) {
vDeviceInfo[i].bSelected = true;
}
filterIndex = 0;
@ -287,7 +287,7 @@ int ALDeviceList::GetNextFilteredDevice()
unsigned int ALDeviceList::GetMaxNumSources()
{
ALuint uiSources[256];
unsigned int iSourceCount = 0;
U32 iSourceCount = 0;
// Clear AL Error Code
ALFunction.alGetError();
@ -304,7 +304,7 @@ unsigned int ALDeviceList::GetMaxNumSources()
ALFunction.alDeleteSources(iSourceCount, uiSources);
if (ALFunction.alGetError() != AL_NO_ERROR)
{
for (unsigned int i = 0; i < 256; i++)
for (U32 i = 0; i < 256; i++)
{
ALFunction.alDeleteSources(1, &uiSources[i]);
}

View file

@ -32,10 +32,10 @@
typedef struct
{
char strDeviceName[256];
int iMajorVersion;
int iMinorVersion;
unsigned int uiSourceCount;
int iCapsFlags;
S32 iMajorVersion;
S32 iMinorVersion;
U32 uiSourceCount;
S32 iCapsFlags;
bool bSelected;
} ALDEVICEINFO, *LPALDEVICEINFO;
@ -44,27 +44,27 @@ class ALDeviceList
private:
OPENALFNTABLE ALFunction;
Vector<ALDEVICEINFO> vDeviceInfo;
int defaultDeviceIndex;
int filterIndex;
S32 defaultDeviceIndex;
S32 filterIndex;
public:
ALDeviceList ( const OPENALFNTABLE &oalft );
~ALDeviceList ();
int GetNumDevices();
const char *GetDeviceName(int index);
void GetDeviceVersion(int index, int *major, int *minor);
unsigned int GetMaxNumSources(int index);
bool IsExtensionSupported(int index, SFXALCaps caps);
int GetDefaultDevice();
void FilterDevicesMinVer(int major, int minor);
void FilterDevicesMaxVer(int major, int minor);
S32 GetNumDevices();
const char *GetDeviceName(S32 index);
void GetDeviceVersion(S32 index, S32 *major, S32 *minor);
U32 GetMaxNumSources(S32 index);
bool IsExtensionSupported(S32 index, SFXALCaps caps);
S32 GetDefaultDevice();
void FilterDevicesMinVer(S32 major, S32 minor);
void FilterDevicesMaxVer(S32 major, S32 minor);
void FilterDevicesExtension(SFXALCaps caps);
void ResetFilters();
int GetFirstFilteredDevice();
int GetNextFilteredDevice();
S32 GetFirstFilteredDevice();
S32 GetNextFilteredDevice();
private:
unsigned int GetMaxNumSources();
U32 GetMaxNumSources();
};
#endif // ALDEVICELIST_H

View file

@ -93,18 +93,18 @@ void SFXALProvider::init()
const char *deviceFormat = "OpenAL v%d.%d %s";
char temp[256];
for( int i = 0; i < mALDL->GetNumDevices(); i++ )
for( S32 i = 0; i < mALDL->GetNumDevices(); i++ )
{
ALDeviceInfo* info = new ALDeviceInfo;
info->name = String( mALDL->GetDeviceName( i ) );
int major, minor, eax = 0;
S32 major, minor, eax = 0;
mALDL->GetDeviceVersion( i, &major, &minor );
// Apologies for the blatent enum hack -patw
for( int j = SFXALEAX2; j < SFXALEAXRAM; j++ )
for( S32 j = SFXALEAX2; j < SFXALEAXRAM; j++ )
eax += (int)mALDL->IsExtensionSupported( i, (SFXALCaps)j );
if( eax > 0 )