1
0
forked from 0ad/0ad

# housekeeping

terrain: fix unused a90 etc. warnings by commenting them out
renamed ERR_TEX_CODEC_CANNOT_HANDLE to INFO_.. (to prevent the kind of
mistake that philip just fixed)

This was SVN commit r3805.
This commit is contained in:
janwas 2006-04-24 01:50:32 +00:00
parent dfa58e02bf
commit 64ef19475d
9 changed files with 18 additions and 17 deletions

View File

@ -300,13 +300,14 @@ float CTerrain::getSlopeAngleFace(float x, float y, float orientation) const
int yi = (int)floor(y);
CVector3D flat( (float)CELL_SIZE, 0.0f, (float)CELL_SIZE );
CVector3D elevated=flat;
float a0 = DEGTORAD(0.0f);
float a90 = DEGTORAD(90.0f);
float a180 = DEGTORAD(180.0f);
float neg = DEGTORAD(-90.0f);
float a45 = DEGTORAD(45.0f);
float a135 = DEGTORAD(135.0f);
/* JW: currently all unused, so commented out to avoid warning
const float a0 = DEGTORAD(0.0f);
const float a90 = DEGTORAD(90.0f);
const float a180 = DEGTORAD(180.0f);
const float neg = DEGTORAD(-90.0f);
const float a45 = DEGTORAD(45.0f);
const float a135 = DEGTORAD(135.0f);*/
//Find which side it's facing; use that and the opposite
if ( orientation > 0.0f && orientation < DEGTORAD(90.0f) )

View File

@ -460,7 +460,7 @@ ERR(-100503, ERR_TEX_INVALID_LAYOUT, "Unsupported texel layout, e.g. right-to-le
ERR(-100504, ERR_TEX_COMPRESSED, "Unsupported texture compression")
ERR(+100505, WARN_TEX_INVALID_DATA, "Warning: invalid texel data encountered")
ERR(-100506, ERR_TEX_INVALID_SIZE, "Texture size is incorrect")
ERR(-100507, ERR_TEX_CODEC_CANNOT_HANDLE, "Texture codec cannot handle the given format")
ERR(+100507, INFO_TEX_CODEC_CANNOT_HANDLE, "Texture codec cannot handle the given format")
// CPU
ERR(-100600, ERR_CPU_FEATURE_MISSING, "This CPU doesn't support a required feature")

View File

@ -207,7 +207,7 @@ TIMER_ACCRUE(tc_plain_transform);
// sanity checks (not errors, we just can't handle these cases)
// .. unknown transform
if(transforms & ~(TEX_BGR|TEX_ORIENTATION|TEX_MIPMAPS))
return ERR_TEX_CODEC_CANNOT_HANDLE;
return INFO_TEX_CODEC_CANNOT_HANDLE;
// .. data is not in "plain" format
RETURN_ERR(tex_validate_plain_format(bpp, flags));
// .. nothing to do

View File

@ -58,7 +58,7 @@ struct BmpHeader
static LibError bmp_transform(Tex* UNUSED(t), uint UNUSED(transforms))
{
return ERR_TEX_CODEC_CANNOT_HANDLE;
return INFO_TEX_CODEC_CANNOT_HANDLE;
}

View File

@ -87,7 +87,7 @@ LibError tex_codec_for_header(const u8* file, size_t file_size, const TexCodecVT
LibError tex_codec_transform(Tex* t, uint transforms)
{
LibError ret = ERR_TEX_CODEC_CANNOT_HANDLE;
LibError ret = INFO_TEX_CODEC_CANNOT_HANDLE;
// find codec that understands the data, and transform
for(const TexCodecVTbl* c = codecs; c; c = c->next)
@ -97,7 +97,7 @@ LibError tex_codec_transform(Tex* t, uint transforms)
if(err == ERR_OK)
return ERR_OK;
// something went wrong
else if(err != ERR_TEX_CODEC_CANNOT_HANDLE)
else if(err != INFO_TEX_CODEC_CANNOT_HANDLE)
{
ret = err;
debug_warn("codec indicates error");

View File

@ -626,7 +626,7 @@ static LibError dds_encode(Tex* restrict UNUSED(t), DynArray* restrict UNUSED(da
{
// note: do not return ERR_NOT_IMPLEMENTED et al. because that would
// break tex_write (which assumes either this, 0 or errors are returned).
return ERR_TEX_CODEC_CANNOT_HANDLE;
return INFO_TEX_CODEC_CANNOT_HANDLE;
}
@ -646,7 +646,7 @@ static LibError dds_transform(Tex* t, uint transforms)
// compressed) or requesting compression (not implemented) or
// both not DXT (nothing we can do) - bail.
else
return ERR_TEX_CODEC_CANNOT_HANDLE;
return INFO_TEX_CODEC_CANNOT_HANDLE;
}

View File

@ -422,7 +422,7 @@ JpgErrorMgr::JpgErrorMgr(j_common_ptr cinfo)
static LibError jpg_transform(Tex* UNUSED(t), uint UNUSED(transforms))
{
return ERR_TEX_CODEC_CANNOT_HANDLE;
return INFO_TEX_CODEC_CANNOT_HANDLE;
}

View File

@ -88,7 +88,7 @@ static void io_flush(png_structp UNUSED(png_ptr))
static LibError png_transform(Tex* UNUSED(t), uint UNUSED(transforms))
{
return ERR_TEX_CODEC_CANNOT_HANDLE;
return INFO_TEX_CODEC_CANNOT_HANDLE;
}

View File

@ -65,7 +65,7 @@ TgaHeader;
static LibError tga_transform(Tex* UNUSED(t), uint UNUSED(transforms))
{
return ERR_TEX_CODEC_CANNOT_HANDLE;
return INFO_TEX_CODEC_CANNOT_HANDLE;
}