@@ -163,7 +163,7 @@ void R_LoadDDSImageData( void *pImageData, const char *name, byte **data,
163
163
164
164
if ( strncmp ( ( const char * ) buff, " DDS " , 4 ) != 0 )
165
165
{
166
- Log::Warn (" R_LoadDDSImage: invalid dds header \" %s \" " , name );
166
+ Log::Warn (" DDS image '%s' has invalid DDS id " , name );
167
167
return ;
168
168
}
169
169
@@ -186,15 +186,15 @@ void R_LoadDDSImageData( void *pImageData, const char *name, byte **data,
186
186
187
187
if ( ddsd->dwSize != sizeof ( DDSHEADER_t ) || ddsd->ddpfPixelFormat .dwSize != sizeof ( DDS_PIXELFORMAT_t ) )
188
188
{
189
- Log::Warn (" R_LoadDDSImage: invalid dds header \" %s \" " , name );
189
+ Log::Warn (" DDS image '%s' has invalid DDS header" , name );
190
190
return ;
191
191
}
192
192
193
193
*numMips = ( ( ddsd->dwFlags & DDSD_MIPMAPCOUNT ) && ( ddsd->dwMipMapCount > 1 ) ) ? ddsd->dwMipMapCount : 1 ;
194
194
195
195
if ( *numMips > MAX_TEXTURE_MIPS )
196
196
{
197
- Log::Warn (" R_LoadDDSImage: dds image has too many mip levels \" %s \" " , name );
197
+ Log::Warn (" DDS image '%s' has too many mip levels (%d > %d) " , name, *numMips, MAX_TEXTURE_MIPS );
198
198
return ;
199
199
}
200
200
@@ -207,7 +207,8 @@ void R_LoadDDSImageData( void *pImageData, const char *name, byte **data,
207
207
208
208
if ( ddsd->dwWidth != ddsd->dwHeight )
209
209
{
210
- Log::Warn (" R_LoadDDSImage: invalid dds image \" %s\" " , name );
210
+ Log::Warn (" DDS image '%s' is cube map and height (%d) != width (%d)" , name,
211
+ ddsd->dwWidth , ddsd->dwHeight );
211
212
return ;
212
213
}
213
214
@@ -218,7 +219,7 @@ void R_LoadDDSImageData( void *pImageData, const char *name, byte **data,
218
219
if ( *width & ( *width - 1 ) )
219
220
{
220
221
// cubes must be a power of two
221
- Log::Warn (" R_LoadDDSImage: cube images must be power of two \" %s \" " , name );
222
+ Log::Warn (" DDS image '%s' is cube map and width (%d) is not power of two" , name, *width );
222
223
return ;
223
224
}
224
225
}
@@ -232,13 +233,15 @@ void R_LoadDDSImageData( void *pImageData, const char *name, byte **data,
232
233
233
234
if ( *numLayers > MAX_TEXTURE_LAYERS )
234
235
{
235
- Log::Warn (" R_LoadDDSImage: dds image has too many layers \" %s\" " , name );
236
+ Log::Warn (" DDS image '%s' is volume and has too many layers (%d > %d)" , name,
237
+ *numLayers, MAX_TEXTURE_LAYERS );
236
238
return ;
237
239
}
238
240
239
241
if ( *width & ( *width - 1 ) || *height & ( *height - 1 ) || *numLayers & ( *numLayers - 1 ) )
240
242
{
241
- Log::Warn (" R_LoadDDSImage: volume images must be power of two \" %s\" " , name );
243
+ Log::Warn (" DDS image '%s' is volume and it's values are not power of two: "
244
+ " width (%d), height (%d), layers (%d)" , name, *width, *height, *numLayers );
242
245
return ;
243
246
}
244
247
}
@@ -254,7 +257,8 @@ void R_LoadDDSImageData( void *pImageData, const char *name, byte **data,
254
257
// except for compressed images!
255
258
if ( compressed && ( *width & ( *width - 1 ) || *height & ( *height - 1 ) ) )
256
259
{
257
- Log::Warn (" R_LoadDDSImage: compressed texture images must be power of two \" %s\" " , name );
260
+ Log::Warn (" DDS image '%s' is 2D compressed texture and it's values are not power of two: "
261
+ " width (%d), height (%d)" , name, *width, *height );
258
262
return ;
259
263
}
260
264
}
@@ -265,7 +269,7 @@ void R_LoadDDSImageData( void *pImageData, const char *name, byte **data,
265
269
266
270
if ( *numLayers != 0 )
267
271
{
268
- Log::Warn (" R_LoadDDSImage: compressed volume textures are not supported \" %s \" " , name );
272
+ Log::Warn (" DDS image '%s' is unsupported compressed volume texture " , name );
269
273
return ;
270
274
}
271
275
@@ -300,8 +304,8 @@ void R_LoadDDSImageData( void *pImageData, const char *name, byte **data,
300
304
break ;
301
305
302
306
default :
303
- Log::Warn (" R_LoadDDSImage: unsupported FOURCC 0x%08x, \" %s \" " ,
304
- ddsd->ddpfPixelFormat .dwFourCC , name );
307
+ Log::Warn (" DDS image '%s' is compressed, but FOURCC 0x%08x is unsupported " ,
308
+ name, ddsd->ddpfPixelFormat .dwFourCC );
305
309
return ;
306
310
}
307
311
w = *width;
@@ -329,13 +333,14 @@ void R_LoadDDSImageData( void *pImageData, const char *name, byte **data,
329
333
break ;
330
334
331
335
default :
332
- Log::Warn (" R_LoadDDSImage: unsupported RGB bit depth \" %s\" " , name );
336
+ Log::Warn (" DDS image '%s' is not compressed, but RGB bit depth (%d) is unsupported" , name,
337
+ ddsd->ddpfPixelFormat .dwRGBBitCount );
333
338
return ;
334
339
}
335
340
}
336
341
else
337
342
{
338
- Log::Warn (" R_LoadDDSImage: unsupported DDS image type \" %s \" " , name );
343
+ Log::Warn (" DDS image '%s' is not compressed and has unsupported image type " , name );
339
344
return ;
340
345
}
341
346
}
0 commit comments