mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-18 20:00:56 +00:00
Merge remote-tracking branch 'smally/platform_type_consistency' into platform-type-consistency
Conflicts: Engine/source/platform/platformCPUCount.cpp
This commit is contained in:
commit
87d9e245b7
210 changed files with 896 additions and 896 deletions
|
|
@ -91,7 +91,7 @@ size_t SFXVorbisStream::_read_func( void *ptr, size_t size, size_t nmemb, void *
|
|||
return readItems;
|
||||
}
|
||||
|
||||
int SFXVorbisStream::_seek_func( void *datasource, ogg_int64_t offset, int whence )
|
||||
S32 SFXVorbisStream::_seek_func( void *datasource, ogg_int64_t offset, S32 whence )
|
||||
{
|
||||
Stream *stream = reinterpret_cast<Stream*>( datasource );
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ bool SFXVorbisStream::_openVorbis()
|
|||
cb.tell_func = canSeek ? _tell_func : NULL;
|
||||
|
||||
// Open it.
|
||||
int ovResult = ov_open_callbacks( mStream, mVF, NULL, 0, cb );
|
||||
S32 ovResult = ov_open_callbacks( mStream, mVF, NULL, 0, cb );
|
||||
if( ovResult != 0 )
|
||||
return false;
|
||||
|
||||
|
|
@ -196,9 +196,9 @@ S32 SFXVorbisStream::read( U8 *buffer,
|
|||
mBitstream = *bitstream;
|
||||
|
||||
#ifdef TORQUE_BIG_ENDIAN
|
||||
static const int isBigEndian = 1;
|
||||
static const S32 isBigEndian = 1;
|
||||
#else
|
||||
static const int isBigEndian = 0;
|
||||
static const S32 isBigEndian = 0;
|
||||
#endif
|
||||
|
||||
// Vorbis doesn't seem to like reading
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class SFXVorbisStream : public SFXFileStream,
|
|||
|
||||
// The ov_callbacks.
|
||||
static size_t _read_func( void *ptr, size_t size, size_t nmemb, void *datasource );
|
||||
static int _seek_func( void *datasource, ogg_int64_t offset, int whence );
|
||||
static S32 _seek_func( void *datasource, ogg_int64_t offset, S32 whence );
|
||||
static long _tell_func( void *datasource );
|
||||
|
||||
// SFXStream
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -561,7 +561,7 @@ class SFXMaterialProperties
|
|||
|
||||
|
||||
/// An array of float values with optional random variances.
|
||||
template< int NUM_VALUES >
|
||||
template< S32 NUM_VALUES >
|
||||
struct SFXVariantFloat
|
||||
{
|
||||
/// Base value.
|
||||
|
|
|
|||
|
|
@ -854,7 +854,7 @@ void SFXSystem::_updateSources()
|
|||
if( source->getLastStatus() == SFXStatusStopped &&
|
||||
source->getSavedStatus() != SFXStatusPlaying )
|
||||
{
|
||||
int index = iter - mPlayOnceSources.begin();
|
||||
S32 index = iter - mPlayOnceSources.begin();
|
||||
|
||||
// Erase it from the vector first, so that onRemoveSource
|
||||
// doesn't do it during cleanup and screw up our loop here!
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ enum SFXObjectFlags
|
|||
/// 3D voices active on the device at any one point is defined as the set of
|
||||
/// current sound sources.
|
||||
///
|
||||
template< int NUM_DIMENSIONS >
|
||||
template< S32 NUM_DIMENSIONS >
|
||||
class SFXObject : public ScopeTrackerObject< NUM_DIMENSIONS >
|
||||
{
|
||||
public:
|
||||
|
|
@ -184,7 +184,7 @@ class SFXObject : public ScopeTrackerObject< NUM_DIMENSIONS >
|
|||
/// occlusion manager installed on the system and tracking the listener traveling through
|
||||
/// the ambient spaces is
|
||||
///
|
||||
template< int NUM_DIMENSIONS, typename Object >
|
||||
template< S32 NUM_DIMENSIONS, typename Object >
|
||||
class SFXWorld : public ScopeTracker< NUM_DIMENSIONS, Object >
|
||||
{
|
||||
public:
|
||||
|
|
@ -250,7 +250,7 @@ class SFXWorld : public ScopeTracker< NUM_DIMENSIONS, Object >
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
template< int NUM_DIMENSIONS, class Object >
|
||||
template< S32 NUM_DIMENSIONS, class Object >
|
||||
SFXWorld< NUM_DIMENSIONS, Object >::SFXWorld()
|
||||
{
|
||||
VECTOR_SET_ASSOCIATION( mScopeStack );
|
||||
|
|
@ -258,7 +258,7 @@ SFXWorld< NUM_DIMENSIONS, Object >::SFXWorld()
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
template< int NUM_DIMENSIONS, class Object >
|
||||
template< S32 NUM_DIMENSIONS, class Object >
|
||||
void SFXWorld< NUM_DIMENSIONS, Object >::update()
|
||||
{
|
||||
if( !this->mReferenceObject )
|
||||
|
|
@ -320,7 +320,7 @@ void SFXWorld< NUM_DIMENSIONS, Object >::update()
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
template< int NUM_DIMENSIONS, class Object >
|
||||
template< S32 NUM_DIMENSIONS, class Object >
|
||||
void SFXWorld< NUM_DIMENSIONS, Object >::notifyChanged( Object object )
|
||||
{
|
||||
SFXAmbience* ambience = Deref( object ).getAmbience();
|
||||
|
|
@ -369,7 +369,7 @@ void SFXWorld< NUM_DIMENSIONS, Object >::_onScopeIn( Object object )
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
template< int NUM_DIMENSIONS, class Object >
|
||||
template< S32 NUM_DIMENSIONS, class Object >
|
||||
void SFXWorld< NUM_DIMENSIONS, Object >::_onScopeOut( Object object )
|
||||
{
|
||||
#ifdef DEBUG_SPEW
|
||||
|
|
@ -393,7 +393,7 @@ void SFXWorld< NUM_DIMENSIONS, Object >::_onScopeOut( Object object )
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
template< int NUM_DIMENSIONS, class Object >
|
||||
template< S32 NUM_DIMENSIONS, class Object >
|
||||
F32 SFXWorld< NUM_DIMENSIONS, Object >::_getSortValue( Object object )
|
||||
{
|
||||
//RDTODO: probably need to work with the overlap here instead of the full volumes
|
||||
|
|
@ -414,7 +414,7 @@ F32 SFXWorld< NUM_DIMENSIONS, Object >::_getSortValue( Object object )
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
template< int NUM_DIMENSIONS, class Object >
|
||||
template< S32 NUM_DIMENSIONS, class Object >
|
||||
S32 SFXWorld< NUM_DIMENSIONS, Object >::_findScope( Object object )
|
||||
{
|
||||
for( U32 i = 0; i < mScopeStack.size(); ++ i )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue