replace ASSERT(0) with useful fail messages

This commit is contained in:
Devin J. Pohly
2012-12-27 16:59:35 -05:00
parent 376056a0cf
commit bd0e2074ad
71 changed files with 289 additions and 245 deletions
+4 -4
View File
@@ -360,8 +360,9 @@ int RageSurfaceUtils::FindSurfaceTraits( const RageSurface *img )
{
case NEEDS_NO_ALPHA: ret |= TRAIT_NO_TRANSPARENCY; break;
case NEEDS_BOOL_ALPHA: ret |= TRAIT_BOOL_TRANSPARENCY; break;
case NEEDS_FULL_ALPHA: break;
default: ASSERT(0);
case NEEDS_FULL_ALPHA: break;
default:
FAIL_M(ssprintf("Invalid alpha type: %i", alpha_type));
}
return ret;
@@ -670,8 +671,7 @@ void RageSurfaceUtils::Blit( const RageSurface *src, RageSurface *dst, int width
if( blit_generic(src, dst, width, height) )
break;
// We don't do RGBA->PAL.
ASSERT(0);
FAIL_M("We don't do RGBA->PAL");
} while(0);
/* The destination surface may be larger than the source. For example, we may be