diff options
author | Martin Kiewitz | 2010-01-12 18:24:37 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-12 18:24:37 +0000 |
commit | 52eb58a3e558a34b03c69ec5b4a60a5e6a1b9b41 (patch) | |
tree | 18ac3710fe3c942272eb2710bbc8f210c026d89e /engines/sci/graphics/view.cpp | |
parent | e4aed638b020a019dd6989541bd125cc93eb26c1 (diff) | |
download | scummvm-rg350-52eb58a3e558a34b03c69ec5b4a60a5e6a1b9b41.tar.gz scummvm-rg350-52eb58a3e558a34b03c69ec5b4a60a5e6a1b9b41.tar.bz2 scummvm-rg350-52eb58a3e558a34b03c69ec5b4a60a5e6a1b9b41.zip |
SCI: View::getCelCount now validates input
svn-id: r47267
Diffstat (limited to 'engines/sci/graphics/view.cpp')
-rw-r--r-- | engines/sci/graphics/view.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp index ffa97adb62..e2bcc47ce5 100644 --- a/engines/sci/graphics/view.cpp +++ b/engines/sci/graphics/view.cpp @@ -507,6 +507,12 @@ void View::draw(Common::Rect rect, Common::Rect clipRect, Common::Rect clipRectT } } +uint16 View::getCelCount(int16 loopNo) { + if ((loopNo < 0) || (loopNo >= _loopCount)) + return 0; + return _loop[loopNo].celCount; +} + Palette *View::getPalette() { return _embeddedPal ? &_viewPalette : &_palette->_sysPalette; } |