diff options
author | Benjamin Haisch | 2008-04-21 11:17:51 +0000 |
---|---|---|
committer | Benjamin Haisch | 2008-04-21 11:17:51 +0000 |
commit | 42e8f1f882beb2a803381e9132ac998a212010f2 (patch) | |
tree | 417e4394287464d6532bd2373b45d178a299a264 /engines/made | |
parent | 7531e54006f67398213f827d821be77e3bdb2070 (diff) | |
download | scummvm-rg350-42e8f1f882beb2a803381e9132ac998a212010f2.tar.gz scummvm-rg350-42e8f1f882beb2a803381e9132ac998a212010f2.tar.bz2 scummvm-rg350-42e8f1f882beb2a803381e9132ac998a212010f2.zip |
Fixed drawAnimFrame (don't draw anything if the frame number is invalid)
svn-id: r31642
Diffstat (limited to 'engines/made')
-rw-r--r-- | engines/made/screen.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index c0cee5fa51..6ae93730f7 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -259,6 +259,9 @@ uint16 Screen::drawFlex(uint16 flexIndex, int16 x, int16 y, uint16 flag1, uint16 void Screen::drawAnimFrame(uint16 animIndex, int16 x, int16 y, int16 frameNum, uint16 flag1, uint16 flag2, const ClipInfo &clipInfo) { + if (frameNum < 0) + return; + AnimationResource *anim = _vm->_res->getAnimation(animIndex); Graphics::Surface *sourceSurface = anim->getFrame(frameNum); byte *source = (byte*)sourceSurface->getBasePtr(0, 0); @@ -279,7 +282,7 @@ void Screen::drawAnimFrame(uint16 animIndex, int16 x, int16 y, int16 frameNum, u uint16 Screen::drawPic(uint16 index, int16 x, int16 y, uint16 flag1, uint16 flag2) { - //DEBUG + //HACK (until clipping is impelemented) if (y > 200) y = 0; drawFlex(index, x, y, flag1, flag2, _clipInfo1); |