mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-06-11 16:04:00 +00:00
replace specific names for a universal getRegistrations
This commit is contained in:
parent
3aac9af35e
commit
d4e9275240
7 changed files with 28 additions and 28 deletions
|
|
@ -38,7 +38,7 @@ using namespace Torque;
|
|||
|
||||
const U32 GBitmap::csFileVersion = 3;
|
||||
|
||||
Vector<GBitmap::Registration>& GBitmap::getBitmapRegistrations()
|
||||
Vector<GBitmap::Registration>& GBitmap::getRegistrations()
|
||||
{
|
||||
static Vector<GBitmap::Registration> * regs =
|
||||
new Vector<GBitmap::Registration>(__FILE__, __LINE__);
|
||||
|
|
@ -203,24 +203,24 @@ U32 GBitmap::getFormatBytesPerPixel(GFXFormat fmt)
|
|||
|
||||
void GBitmap::sRegisterFormat( const GBitmap::Registration ® )
|
||||
{
|
||||
U32 insert = GBitmap::getBitmapRegistrations().size();
|
||||
for ( U32 i = 0; i < GBitmap::getBitmapRegistrations().size(); i++ )
|
||||
U32 insert = GBitmap::getRegistrations().size();
|
||||
for ( U32 i = 0; i < GBitmap::getRegistrations().size(); i++ )
|
||||
{
|
||||
if ( GBitmap::getBitmapRegistrations()[i].priority <= reg.priority )
|
||||
if ( GBitmap::getRegistrations()[i].priority <= reg.priority )
|
||||
{
|
||||
insert = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
GBitmap::getBitmapRegistrations().insert( insert, reg );
|
||||
GBitmap::getRegistrations().insert( insert, reg );
|
||||
}
|
||||
|
||||
const GBitmap::Registration *GBitmap::sFindRegInfo( const String &extension )
|
||||
{
|
||||
for ( U32 i = 0; i < GBitmap::getBitmapRegistrations().size(); i++ )
|
||||
for ( U32 i = 0; i < GBitmap::getRegistrations().size(); i++ )
|
||||
{
|
||||
const GBitmap::Registration ® = GBitmap::getBitmapRegistrations()[i];
|
||||
const GBitmap::Registration ® = GBitmap::getRegistrations()[i];
|
||||
const Vector<String> &extensions = reg.extensions;
|
||||
|
||||
for ( U32 j = 0; j < extensions.size(); ++j )
|
||||
|
|
@ -241,9 +241,9 @@ bool GBitmap::sFindFile( const Path &path, Path *outPath )
|
|||
|
||||
Path tryPath( path );
|
||||
|
||||
for ( U32 i = 0; i < GBitmap::getBitmapRegistrations().size(); i++ )
|
||||
for ( U32 i = 0; i < GBitmap::getRegistrations().size(); i++ )
|
||||
{
|
||||
const Registration ® = GBitmap::getBitmapRegistrations()[i];
|
||||
const Registration ® = GBitmap::getRegistrations()[i];
|
||||
const Vector<String> &extensions = reg.extensions;
|
||||
|
||||
for ( U32 j = 0; j < extensions.size(); ++j )
|
||||
|
|
@ -271,9 +271,9 @@ bool GBitmap::sFindFiles( const Path &path, Vector<Path> *outFoundPaths )
|
|||
|
||||
Path tryPath( path );
|
||||
|
||||
for ( U32 i = 0; i < GBitmap::getBitmapRegistrations().size(); i++ )
|
||||
for ( U32 i = 0; i < GBitmap::getRegistrations().size(); i++ )
|
||||
{
|
||||
const GBitmap::Registration ® = GBitmap::getBitmapRegistrations()[i];
|
||||
const GBitmap::Registration ® = GBitmap::getRegistrations()[i];
|
||||
const Vector<String> &extensions = reg.extensions;
|
||||
|
||||
for ( U32 j = 0; j < extensions.size(); ++j )
|
||||
|
|
@ -297,9 +297,9 @@ String GBitmap::sGetExtensionList()
|
|||
{
|
||||
String list;
|
||||
|
||||
for ( U32 i = 0; i < GBitmap::getBitmapRegistrations().size(); i++ )
|
||||
for ( U32 i = 0; i < GBitmap::getRegistrations().size(); i++ )
|
||||
{
|
||||
const Registration ® = GBitmap::getBitmapRegistrations()[i];
|
||||
const Registration ® = GBitmap::getRegistrations()[i];
|
||||
for ( U32 j = 0; j < reg.extensions.size(); j++ )
|
||||
{
|
||||
list += reg.extensions[j];
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ public:
|
|||
template<class T, dsize_t mapLength>
|
||||
void swizzle(const Swizzle<T,mapLength> *s);
|
||||
|
||||
static Vector<Registration>& getBitmapRegistrations();
|
||||
static Vector<Registration>& getRegistrations();
|
||||
|
||||
private:
|
||||
GFXFormat mInternalFormat;
|
||||
|
|
|
|||
|
|
@ -858,14 +858,14 @@ Torque::Path GFXTextureManager::validatePath(const Torque::Path &path)
|
|||
|
||||
// Now loop through the rest of the GBitmap extensions
|
||||
// to see if we have any matches
|
||||
for (U32 i = 0; i < GBitmap::getBitmapRegistrations().size(); i++)
|
||||
for (U32 i = 0; i < GBitmap::getRegistrations().size(); i++)
|
||||
{
|
||||
// If we have gotten a match (either in this loop or before)
|
||||
// then we can exit
|
||||
if (textureExt)
|
||||
break;
|
||||
|
||||
const GBitmap::Registration ® = GBitmap::getBitmapRegistrations()[i];
|
||||
const GBitmap::Registration ® = GBitmap::getRegistrations()[i];
|
||||
const Vector<String> &extensions = reg.extensions;
|
||||
|
||||
for (U32 j = 0; j < extensions.size(); ++j)
|
||||
|
|
|
|||
|
|
@ -407,9 +407,9 @@ void ColladaShapeLoader::computeBounds(Box3F& bounds)
|
|||
String findTextureExtension(const Torque::Path &texPath)
|
||||
{
|
||||
Torque::Path path(texPath);
|
||||
for(S32 i = 0;i < GBitmap::getBitmapRegistrations().size();++i)
|
||||
for(S32 i = 0;i < GBitmap::getRegistrations().size();++i)
|
||||
{
|
||||
GBitmap::Registration ® = GBitmap::getBitmapRegistrations()[i];
|
||||
GBitmap::Registration ® = GBitmap::getRegistrations()[i];
|
||||
for(S32 j = 0;j < reg.extensions.size();++j)
|
||||
{
|
||||
path.setExtension(reg.extensions[j]);
|
||||
|
|
|
|||
|
|
@ -1302,9 +1302,9 @@ String TSShapeLoader::getFormatExtensions()
|
|||
{
|
||||
// "*.dsq TAB *.dae TAB
|
||||
StringBuilder output;
|
||||
for(U32 n = 0; n < TSShape::getShapeRegistrations().size(); ++n)
|
||||
for(U32 n = 0; n < TSShape::getRegistrations().size(); ++n)
|
||||
{
|
||||
TSShape::ShapeRegistration reg = TSShape::getShapeRegistrations()[n];
|
||||
TSShape::ShapeRegistration reg = TSShape::getRegistrations()[n];
|
||||
for (U32 i = 0; i < reg.extensions.size(); i++)
|
||||
{
|
||||
TSShape::ShapeFormat format = reg.extensions[i];
|
||||
|
|
@ -1320,9 +1320,9 @@ String TSShapeLoader::getFormatFilters()
|
|||
{
|
||||
// "DSQ Files|*.dsq|COLLADA Files|*.dae|"
|
||||
StringBuilder output;
|
||||
for (U32 n = 0; n < TSShape::getShapeRegistrations().size(); ++n)
|
||||
for (U32 n = 0; n < TSShape::getRegistrations().size(); ++n)
|
||||
{
|
||||
TSShape::ShapeRegistration reg = TSShape::getShapeRegistrations()[n];
|
||||
TSShape::ShapeRegistration reg = TSShape::getRegistrations()[n];
|
||||
for (U32 i = 0; i < reg.extensions.size(); i++)
|
||||
{
|
||||
TSShape::ShapeFormat format = reg.extensions[i];
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
// Vector<TSShape::ShapeRegistration> TSShape::sShapeRegistrations(__FILE__, __LINE__);
|
||||
|
||||
Vector<TSShape::ShapeRegistration>& TSShape::getShapeRegistrations()
|
||||
Vector<TSShape::ShapeRegistration>& TSShape::getRegistrations()
|
||||
{
|
||||
static Vector<TSShape::ShapeRegistration>* regs =
|
||||
new Vector<TSShape::ShapeRegistration>(__FILE__, __LINE__);
|
||||
|
|
@ -50,16 +50,16 @@ Vector<TSShape::ShapeRegistration>& TSShape::getShapeRegistrations()
|
|||
|
||||
void TSShape::sRegisterFormat(const ShapeRegistration& reg)
|
||||
{
|
||||
U32 insert = TSShape::getShapeRegistrations().size();
|
||||
TSShape::getShapeRegistrations().insert(insert, reg);
|
||||
U32 insert = TSShape::getRegistrations().size();
|
||||
TSShape::getRegistrations().insert(insert, reg);
|
||||
}
|
||||
|
||||
|
||||
const TSShape::ShapeRegistration* TSShape::sFindShapeRegInfo(const String& extension, bool exporting)
|
||||
{
|
||||
for (U32 i = 0; i < TSShape::getShapeRegistrations().size(); i++)
|
||||
for (U32 i = 0; i < TSShape::getRegistrations().size(); i++)
|
||||
{
|
||||
const TSShape::ShapeRegistration& reg = TSShape::getShapeRegistrations()[i];
|
||||
const TSShape::ShapeRegistration& reg = TSShape::getRegistrations()[i];
|
||||
const Vector<ShapeFormat>& extensions = exporting ? reg.export_extensions : reg.extensions;
|
||||
|
||||
for (U32 j = 0; j < extensions.size(); j++)
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ public:
|
|||
|
||||
static void sRegisterFormat(const ShapeRegistration& reg);
|
||||
static const ShapeRegistration* sFindShapeRegInfo(const String& extension, bool exporting = false);
|
||||
static Vector<ShapeRegistration>& getShapeRegistrations();
|
||||
static Vector<ShapeRegistration>& getRegistrations();
|
||||
|
||||
/// Nodes hold the transforms in the shape's tree. They are the bones of the skeleton.
|
||||
struct Node
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue