Allow loading a sprite with 0 width or 0 height
This commit is contained in:
parent
e40e06c5ef
commit
5e29362f7a
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue