mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-24 02:32:18 +00:00
Removed never called idDeferredImage code
This commit is contained in:
parent
134f3ec799
commit
7a94a9c466
3 changed files with 0 additions and 80 deletions
|
@ -251,40 +251,6 @@ typedef enum
|
|||
CF_SINGLE, // SP: A single texture cubemap. All six sides in one image.
|
||||
} cubeFiles_t;
|
||||
|
||||
class idDeferredImage
|
||||
{
|
||||
public:
|
||||
idDeferredImage( const char* imageName );
|
||||
~idDeferredImage();
|
||||
|
||||
idStr name;
|
||||
byte* pic;
|
||||
int width;
|
||||
int height;
|
||||
textureFilter_t textureFilter;
|
||||
textureRepeat_t textureRepeat;
|
||||
textureUsage_t textureUsage;
|
||||
};
|
||||
|
||||
ID_INLINE idDeferredImage::idDeferredImage( const char* imageName )
|
||||
: name( imageName )
|
||||
, pic( nullptr )
|
||||
, width( 0 )
|
||||
, height( 0 )
|
||||
, textureFilter( TF_DEFAULT )
|
||||
, textureRepeat( TR_CLAMP )
|
||||
, textureUsage( TD_DEFAULT )
|
||||
{
|
||||
}
|
||||
|
||||
ID_INLINE idDeferredImage::~idDeferredImage()
|
||||
{
|
||||
if( pic )
|
||||
{
|
||||
delete pic;
|
||||
}
|
||||
}
|
||||
|
||||
typedef void ( *ImageGeneratorFunction )( idImage* image, nvrhi::ICommandList* commandList );
|
||||
|
||||
#include "BinaryImage.h"
|
||||
|
@ -666,8 +632,6 @@ public:
|
|||
idImage* AllocImage( const char* name );
|
||||
idImage* AllocStandaloneImage( const char* name );
|
||||
|
||||
idDeferredImage* AllocDeferredImage( const char* name );
|
||||
|
||||
bool ExcludePreloadImage( const char* name );
|
||||
|
||||
idList<idImage*, TAG_IDLIB_LIST_IMAGE> images;
|
||||
|
@ -676,10 +640,6 @@ public:
|
|||
// Transient list of images to load on the main thread to the gpu. Freed after images are loaded.
|
||||
idList<idImage*, TAG_IDLIB_LIST_IMAGE> imagesToLoad;
|
||||
|
||||
// Permanent images to load from memory instead of a file system.
|
||||
idList<idDeferredImage*, TAG_IDLIB_LIST_IMAGE> deferredImages;
|
||||
idHashIndex deferredImageHash;
|
||||
|
||||
bool insideLevelLoad; // don't actually load images now
|
||||
bool preloadingMapImages; // unless this is set
|
||||
|
||||
|
|
|
@ -328,23 +328,6 @@ idImage* idImageManager::AllocStandaloneImage( const char* name )
|
|||
return image;
|
||||
}
|
||||
|
||||
/*
|
||||
==============
|
||||
AllocDeferredImage
|
||||
|
||||
Allocates an idDeferredImage to load images from memory, adds it to the hash chain
|
||||
==============
|
||||
*/
|
||||
idDeferredImage* idImageManager::AllocDeferredImage( const char* name )
|
||||
{
|
||||
idDeferredImage* image = new( TAG_IMAGE ) idDeferredImage( name );
|
||||
|
||||
int hash = idStr( name ).FileNameHash();
|
||||
deferredImageHash.Add( hash, deferredImages.Append( image ) );
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
ImageFromFunction
|
||||
|
@ -356,7 +339,6 @@ system to be completely regenerated if needed.
|
|||
*/
|
||||
idImage* idImageManager::ImageFromFunction( const char* _name, ImageGeneratorFunction generatorFunction )
|
||||
{
|
||||
|
||||
// strip any .tga file extensions from anywhere in the _name
|
||||
idStr name = _name;
|
||||
name.Replace( ".tga", "" );
|
||||
|
@ -780,8 +762,6 @@ void idImageManager::Shutdown()
|
|||
{
|
||||
images.DeleteContents( true );
|
||||
imageHash.Clear();
|
||||
deferredImages.DeleteContents( true );
|
||||
deferredImageHash.Clear();
|
||||
commandList.Reset();
|
||||
}
|
||||
|
||||
|
|
|
@ -1115,26 +1115,6 @@ retry:
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Try loading from a deferred image hash list
|
||||
int hash = name.FileNameHash();
|
||||
for( int i = globalImages->deferredImageHash.First( hash ); i != -1; i = globalImages->deferredImageHash.Next( i ) )
|
||||
{
|
||||
idDeferredImage* image = globalImages->deferredImages[i];
|
||||
if( name.Icmp( image->name ) == 0 )
|
||||
{
|
||||
if( pic && *pic == nullptr )
|
||||
{
|
||||
*usage = image->textureUsage;
|
||||
*width = image->width;
|
||||
*height = image->height;
|
||||
memcpy( *pic, image->pic, 4 * *width * *height );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// RB end
|
||||
|
||||
if( ( width && *width < 1 ) || ( height && *height < 1 ) )
|
||||
|
|
Loading…
Reference in a new issue