aboutsummaryrefslogtreecommitdiff
path: root/engines/adl/graphics.h
diff options
context:
space:
mode:
authorWalter van Niftrik2017-01-25 16:01:46 +0100
committerWalter van Niftrik2017-01-25 16:03:11 +0100
commit8c854897fd033b328bb0e7c3ed2a3bef9da42ffd (patch)
tree4e9879ee46722c9b072b600b952199826c21f948 /engines/adl/graphics.h
parent55f3bef837363bf5e392db317cb3fce908876edb (diff)
downloadscummvm-rg350-8c854897fd033b328bb0e7c3ed2a3bef9da42ffd.tar.gz
scummvm-rg350-8c854897fd033b328bb0e7c3ed2a3bef9da42ffd.tar.bz2
scummvm-rg350-8c854897fd033b328bb0e7c3ed2a3bef9da42ffd.zip
ADL: Implement hires5+ flood fill
Diffstat (limited to 'engines/adl/graphics.h')
-rw-r--r--engines/adl/graphics.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/engines/adl/graphics.h b/engines/adl/graphics.h
index aab807696c..af34e80113 100644
--- a/engines/adl/graphics.h
+++ b/engines/adl/graphics.h
@@ -44,6 +44,7 @@ protected:
Display &_display;
};
+// Used in hires1
class Graphics_v1 : public GraphicsMan {
public:
Graphics_v1(Display &display) : GraphicsMan(display) { }
@@ -54,23 +55,39 @@ private:
void drawCornerPixel(Common::Point &p, byte color, byte bits, byte quadrant) const;
};
+// Used in hires0 and hires2-hires4
class Graphics_v2 : public GraphicsMan {
public:
Graphics_v2(Display &display) : GraphicsMan(display), _color(0) { }
void drawPic(Common::SeekableReadStream &pic, const Common::Point &pos);
+protected:
+ bool canFillAt(const Common::Point &p, const bool stopBit = false);
+ void fillRow(Common::Point p, const byte pattern, const bool stopBit = false);
+
private:
void clear();
void drawCorners(Common::SeekableReadStream &pic, bool yFirst);
void drawRelativeLines(Common::SeekableReadStream &pic);
void drawAbsoluteLines(Common::SeekableReadStream &pic);
- void fillRow(const Common::Point &p, bool fillBit, byte pattern);
+ virtual void fillRowLeft(Common::Point p, const byte pattern, const bool stopBit);
+ virtual void fillAt(Common::Point p, const byte pattern);
void fill(Common::SeekableReadStream &pic);
byte _color;
Common::Point _offset;
};
+// Used in hires5, hires6 and gelfling (possibly others as well)
+class Graphics_v3 : public Graphics_v2 {
+public:
+ Graphics_v3(Display &display) : Graphics_v2(display) { }
+
+private:
+ void fillRowLeft(Common::Point p, const byte pattern, const bool stopBit);
+ void fillAt(Common::Point p, const byte pattern);
+};
+
} // End of namespace Adl
#endif