mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: make FS_CopyImage argument const
This commit is contained in:
@@ -492,7 +492,7 @@ void Image_AddCmdFlags( uint flags );
|
||||
void FS_FreeImage( rgbdata_t *pack );
|
||||
rgbdata_t *FS_LoadImage( const char *filename, const byte *buffer, size_t size ) MALLOC_LIKE( FS_FreeImage, 1 ) WARN_UNUSED_RESULT;
|
||||
qboolean FS_SaveImage( const char *filename, rgbdata_t *pix );
|
||||
rgbdata_t *FS_CopyImage( rgbdata_t *in ) MALLOC_LIKE( FS_FreeImage, 1 ) WARN_UNUSED_RESULT;
|
||||
rgbdata_t *FS_CopyImage( const rgbdata_t *in ) MALLOC_LIKE( FS_FreeImage, 1 ) WARN_UNUSED_RESULT;
|
||||
extern const bpc_desc_t PFDesc[]; // image get pixelformat
|
||||
qboolean Image_Process( rgbdata_t **pix, int width, int height, uint flags, float reserved );
|
||||
void Image_PaletteHueReplace( byte *palSrc, int newHue, int start, int end, int pal_size );
|
||||
|
||||
@@ -597,14 +597,15 @@ FS_CopyImage
|
||||
make an image copy
|
||||
================
|
||||
*/
|
||||
rgbdata_t *FS_CopyImage( rgbdata_t *in )
|
||||
rgbdata_t *FS_CopyImage( const rgbdata_t *in )
|
||||
{
|
||||
rgbdata_t *out;
|
||||
int palSize = 0;
|
||||
|
||||
if( !in ) return NULL;
|
||||
if( !in )
|
||||
return NULL;
|
||||
|
||||
out = Mem_Malloc( host.imagepool, sizeof( rgbdata_t ));
|
||||
out = Mem_Malloc( host.imagepool, sizeof( *out ));
|
||||
*out = *in;
|
||||
|
||||
switch( in->type )
|
||||
|
||||
@@ -467,7 +467,7 @@ typedef struct ref_api_s
|
||||
qboolean (*Image_Process)( rgbdata_t **pix, int width, int height, uint flags, float reserved );
|
||||
rgbdata_t *(*FS_LoadImage)( const char *filename, const byte *buffer, size_t size );
|
||||
qboolean (*FS_SaveImage)( const char *filename, rgbdata_t *pix );
|
||||
rgbdata_t *(*FS_CopyImage)( rgbdata_t *in );
|
||||
rgbdata_t *(*FS_CopyImage)( const rgbdata_t *in );
|
||||
void (*FS_FreeImage)( rgbdata_t *pack );
|
||||
void (*Image_SetMDLPointer)( byte *p );
|
||||
const struct bpc_desc_s *(*Image_GetPFDesc)( int idx );
|
||||
|
||||
Reference in New Issue
Block a user