diff options
author | Sven Hesse | 2011-01-27 20:38:58 +0000 |
---|---|---|
committer | Sven Hesse | 2011-01-27 20:38:58 +0000 |
commit | ecd2e0f3a04066abd0c4ca332c4d078f06d3b4b5 (patch) | |
tree | d8514638c5f6007ddb67d68ed141a41a75d48306 /engines/gob/surface.h | |
parent | 57dc8f6fc264597bbc80faba4a837f22ff145691 (diff) | |
download | scummvm-rg350-ecd2e0f3a04066abd0c4ca332c4d078f06d3b4b5.tar.gz scummvm-rg350-ecd2e0f3a04066abd0c4ca332c4d078f06d3b4b5.tar.bz2 scummvm-rg350-ecd2e0f3a04066abd0c4ca332c4d078f06d3b4b5.zip |
GOB: Add sanity checks to Pixel and ConstPixel
svn-id: r55571
Diffstat (limited to 'engines/gob/surface.h')
-rw-r--r-- | engines/gob/surface.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/gob/surface.h b/engines/gob/surface.h index 89e91975a2..b8426989f3 100644 --- a/engines/gob/surface.h +++ b/engines/gob/surface.h @@ -35,7 +35,7 @@ namespace Gob { /** An iterator over a surface's image data, automatically handles different color depths. */ class Pixel { public: - Pixel(byte *vidMem, uint8 bpp); + Pixel(byte *vidMem, uint8 bpp, byte *min, byte *max); Pixel &operator++(); Pixel operator++(int x); @@ -51,13 +51,14 @@ public: private: byte *_vidMem; + byte *_min, *_max; uint8 _bpp; }; /** A const iterator over a surface's image data, automatically handles different color depths. */ class ConstPixel { public: - ConstPixel(const byte *vidMem, uint8 bpp); + ConstPixel(const byte *vidMem, uint8 bpp, const byte *min, const byte *max); ConstPixel &operator++(); ConstPixel operator++(int x); @@ -72,6 +73,7 @@ public: private: const byte *_vidMem; + const byte *_min, *_max; uint8 _bpp; }; |