diff options
author | Martin Kiewitz | 2010-06-30 15:26:45 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-06-30 15:26:45 +0000 |
commit | bcc010a56e6e58baf1f19f829802e1dbaad83f60 (patch) | |
tree | d80ad624f343668bf16c961119c6d2ac80b2e80b /engines/sci/graphics | |
parent | 04d8ac41142de7f1a3a732073d1e236c0192f533 (diff) | |
download | scummvm-rg350-bcc010a56e6e58baf1f19f829802e1dbaad83f60.tar.gz scummvm-rg350-bcc010a56e6e58baf1f19f829802e1dbaad83f60.tar.bz2 scummvm-rg350-bcc010a56e6e58baf1f19f829802e1dbaad83f60.zip |
SCI: remove some duplicate code
svn-id: r50535
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/view.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp index 816dad0cbb..93df45820c 100644 --- a/engines/sci/graphics/view.cpp +++ b/engines/sci/graphics/view.cpp @@ -265,15 +265,11 @@ GuiResourceId GfxView::getResourceId() const { } int16 GfxView::getWidth(int16 loopNo, int16 celNo) const { - loopNo = CLIP<int16>(loopNo, 0, _loopCount - 1); - celNo = CLIP<int16>(celNo, 0, _loop[loopNo].celCount - 1); - return _loopCount ? _loop[loopNo].cel[celNo].width : 0; + return _loopCount ? getCelInfo(loopNo, celNo)->width : 0; } int16 GfxView::getHeight(int16 loopNo, int16 celNo) const { - loopNo = CLIP<int16>(loopNo, 0, _loopCount - 1); - celNo = CLIP<int16>(celNo, 0, _loop[loopNo].celCount - 1); - return _loopCount ? _loop[loopNo].cel[celNo].height : 0; + return _loopCount ? getCelInfo(loopNo, celNo)->height : 0; } const CelInfo *GfxView::getCelInfo(int16 loopNo, int16 celNo) const { |