mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 14:50:17 +00:00
SCI: View::getCelCount now validates input
svn-id: r47267
This commit is contained in:
parent
e4aed638b0
commit
52eb58a3e5
@ -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;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
byte *getBitmap(int16 loopNo, int16 celNo);
|
||||
void draw(Common::Rect rect, Common::Rect clipRect, Common::Rect clipRectTranslated, int16 loopNo, int16 celNo, byte priority, uint16 EGAmappingNr, bool upscaledHires, uint16 scaleX = 128, uint16 scaleY = 128);
|
||||
uint16 getLoopCount() const { return _loopCount; }
|
||||
uint16 getCelCount(int16 loopNo) { return _loop[loopNo].celCount; }
|
||||
uint16 getCelCount(int16 loopNo);
|
||||
Palette *getPalette();
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user