mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-20 03:45:26 +00:00
Merge branch 'master' into console-func-refactor
Conflicts: Engine/source/app/net/net.cpp Engine/source/console/astNodes.cpp Engine/source/console/compiledEval.cpp Engine/source/console/console.h Engine/source/console/consoleInternal.h Engine/source/console/engineAPI.h
This commit is contained in:
commit
b507dc9555
6487 changed files with 315149 additions and 609761 deletions
|
|
@ -33,7 +33,6 @@
|
|||
bool SFXFMODDevice::smPrefDisableSoftware = false;
|
||||
bool SFXFMODDevice::smPrefUseSoftwareOcclusion = true;
|
||||
bool SFXFMODDevice::smPrefUseSoftwareHRTF = true;
|
||||
bool SFXFMODDevice::smPrefUseSoftwareReverbLowmem = false;
|
||||
bool SFXFMODDevice::smPrefEnableProfile = false;
|
||||
bool SFXFMODDevice::smPrefGeometryUseClosest = false;
|
||||
const char* SFXFMODDevice::smPrefDSoundHRTF = "full";
|
||||
|
|
@ -248,8 +247,6 @@ bool SFXFMODDevice::_init()
|
|||
flags |= FMOD_INIT_OCCLUSION_LOWPASS;
|
||||
if( smPrefUseSoftwareHRTF )
|
||||
flags |= FMOD_INIT_HRTF_LOWPASS;
|
||||
if( smPrefUseSoftwareReverbLowmem )
|
||||
flags |= FMOD_INIT_SOFTWARE_REVERB_LOWMEM;
|
||||
if( smPrefEnableProfile )
|
||||
flags |= FMOD_INIT_ENABLE_PROFILE;
|
||||
if( smPrefGeometryUseClosest )
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
|
||||
// This doesn't appear to exist in some contexts, so let's just add it.
|
||||
#if defined(TORQUE_OS_WIN32) || defined(TORQUE_OS_XENON)
|
||||
#if defined(TORQUE_OS_WIN) || defined(TORQUE_OS_XENON)
|
||||
#ifndef WINAPI
|
||||
#define WINAPI __stdcall
|
||||
#endif
|
||||
|
|
@ -294,9 +294,6 @@ class SFXFMODDevice : public SFXDevice
|
|||
///
|
||||
static bool smPrefUseSoftwareHRTF;
|
||||
|
||||
///
|
||||
static bool smPrefUseSoftwareReverbLowmem;
|
||||
|
||||
///
|
||||
static bool smPrefEnableProfile;
|
||||
|
||||
|
|
|
|||
|
|
@ -60,10 +60,6 @@ public:
|
|||
"This will add a lowpass filter effect to the DSP effect chain of all sounds mixed in software.\n\n"
|
||||
"@note Only applies when using an %FMOD sound device.\n\n"
|
||||
"@ingroup SFXFMOD" );
|
||||
Con::addVariable( "$pref::SFX::FMOD::useSoftwareReverbLowmem", TypeBool, &SFXFMODDevice::smPrefUseSoftwareReverbLowmem,
|
||||
"If true, %FMOD's SFX reverb is run using 22/24kHz delay buffers, halving the memory required.\n\n"
|
||||
"@note Only applies when using an %FMOD sound device.\n\n"
|
||||
"@ingroup SFXFMOD" );
|
||||
Con::addVariable( "$pref::SFX::FMOD::enableProfile", TypeBool, &SFXFMODDevice::smPrefEnableProfile,
|
||||
"Whether to enable support for %FMOD's profiler.\n\n"
|
||||
"@note Only applies when using an %FMOD sound device.\n\n"
|
||||
|
|
@ -173,7 +169,7 @@ void SFXFMODProvider::init()
|
|||
const char* pDllName; // plugin-based DLL
|
||||
const char* eventDllName;
|
||||
|
||||
#ifdef TORQUE_OS_WIN32
|
||||
#ifdef TORQUE_OS_WIN
|
||||
dllName = "fmodex.dll";
|
||||
pDllName = "fmodexp.dll";
|
||||
eventDllName = "fmod_event.dll";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -161,9 +161,9 @@ const char *ALDeviceList::GetDeviceName(int index)
|
|||
void ALDeviceList::GetDeviceVersion(int index, int *major, int *minor)
|
||||
{
|
||||
if (index < GetNumDevices()) {
|
||||
if (*major)
|
||||
if (major)
|
||||
*major = vDeviceInfo[index].iMajorVersion;
|
||||
if (*minor)
|
||||
if (minor)
|
||||
*minor = vDeviceInfo[index].iMinorVersion;
|
||||
}
|
||||
return;
|
||||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include "core/resourceManager.h"
|
||||
#include "console/engineAPI.h"
|
||||
|
||||
using namespace Torque;
|
||||
|
||||
IMPLEMENT_CO_DATABLOCK_V1( SFXProfile );
|
||||
|
||||
|
|
|
|||
|
|
@ -434,7 +434,7 @@ class SFXSource : public SimGroup
|
|||
virtual bool isVirtualized() const { return false; }
|
||||
|
||||
/// Returns true if this is a looping source.
|
||||
bool isLooping() const { return mDescription->mIsLooping; }
|
||||
bool isLooping() const { return mDescription.isValid() && mDescription->mIsLooping; }
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -686,7 +686,8 @@ void SFXSystem::_onRemoveSource( SFXSource* source )
|
|||
if( dynamic_cast< SFXSound* >( source ) )
|
||||
{
|
||||
SFXSoundVector::iterator iter = find( mSounds.begin(), mSounds.end(), static_cast< SFXSound* >( source ) );
|
||||
mSounds.erase_fast( iter );
|
||||
if( iter != mSounds.end() )
|
||||
mSounds.erase_fast( iter );
|
||||
|
||||
mStatNumSounds = mSounds.size();
|
||||
}
|
||||
|
|
@ -854,7 +855,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