Allow loading a sprite with 0 width or 0 height

This commit is contained in:
jsalmon3 2003-05-03 20:01:06 +00:00
parent e40e06c5ef
commit 5e29362f7a

View file

@ -3029,8 +3029,13 @@ global Graphic* LoadSprite(const char* name,int width,int height)
int depth;
graphic=LoadGraphic(name);
if( !width ) {
width=graphic->Width;
}
if( !height ) {
height=graphic->Height;
}
DebugCheck( !width || !height );
DebugCheck( width>graphic->Width || height>graphic->Height );
depth=8;