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
+5 -5
View File
@@ -272,7 +272,7 @@ void BGAnimationLayer::LoadFromAniLayerFile( const RString& sPath )
m_vParticleVelocity[i].y *= PARTICLE_SPEED;
break;
default:
ASSERT(0);
FAIL_M(ssprintf("Unrecognized layer effect: %i", effect));
}
}
}
@@ -334,14 +334,14 @@ void BGAnimationLayer::LoadFromAniLayerFile( const RString& sPath )
pSprite->SetEffectPulse( 1, 0.3f, 1.f );
break;
default:
ASSERT(0);
FAIL_M(ssprintf("Not a tile effect: %i", effect));
}
}
}
}
break;
default:
ASSERT(0);
FAIL_M(ssprintf("Unrecognized layer effect: %i", effect));
}
@@ -527,7 +527,7 @@ void BGAnimationLayer::LoadFromNode( const XNode* pNode )
}
break;
default:
ASSERT(0);
FAIL_M(ssprintf("Unrecognized layer type: %i", m_Type));
}
bool bStartOnRandomFrame = false;
@@ -641,7 +641,7 @@ void BGAnimationLayer::UpdateInternal( float fDeltaTime )
}
break;
default:
ASSERT(0);
FAIL_M(ssprintf("Unrecognized layer type: %i", m_Type));
}
}