mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 00:12:59 +00:00
Fixed drawAnimFrame (don't draw anything if the frame number is invalid)
svn-id: r31642
This commit is contained in:
parent
7531e54006
commit
42e8f1f882
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user