aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/celobj32.h
diff options
context:
space:
mode:
authorColin Snover2016-02-17 18:15:54 -0600
committerColin Snover2016-02-18 13:18:02 -0600
commit775c39102a8999e7ea62313ce00b4b3f51780fc7 (patch)
treeb3f5c0ed78ef85addab3119e9b4f5794c262a78c /engines/sci/graphics/celobj32.h
parent2c0e64fdaf8f2ec2b28124d488be68f36cb25317 (diff)
downloadscummvm-rg350-775c39102a8999e7ea62313ce00b4b3f51780fc7.tar.gz
scummvm-rg350-775c39102a8999e7ea62313ce00b4b3f51780fc7.tar.bz2
scummvm-rg350-775c39102a8999e7ea62313ce00b4b3f51780fc7.zip
SCI: Implement templated drawing subroutines
Diffstat (limited to 'engines/sci/graphics/celobj32.h')
-rw-r--r--engines/sci/graphics/celobj32.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/sci/graphics/celobj32.h b/engines/sci/graphics/celobj32.h
index 8bda86ec7e..2e1b4250df 100644
--- a/engines/sci/graphics/celobj32.h
+++ b/engines/sci/graphics/celobj32.h
@@ -205,9 +205,6 @@ class ScreenItem;
* pixel buffer.
*/
class CelObj {
-private:
- static CelScaler *_scaler;
-
protected:
/**
* When true, this cel will be horizontally mirrored
@@ -219,6 +216,8 @@ protected:
bool _drawMirrored;
public:
+ static CelScaler *_scaler;
+
/**
* The basic identifying information for this cel. This
* information effectively acts as a composite key for
@@ -380,6 +379,12 @@ public:
#pragma mark -
#pragma mark CelObj - Drawing
private:
+ template <typename MAPPER, typename SCALER>
+ void render(Buffer &target, const Common::Rect &targetRect, const Common::Point &scaledPosition) const;
+
+ template <typename MAPPER, typename SCALER>
+ void render(Buffer &target, const Common::Rect &targetRect, const Common::Point &scaledPosition, const Ratio &scaleX, const Ratio &scaleY) const;
+
void drawHzFlip(Buffer &target, const Common::Rect &targetRect, const Common::Point &scaledPosition) const;
void drawNoFlip(Buffer &target, const Common::Rect &targetRect, const Common::Point &scaledPosition) const;
void drawUncompNoFlip(Buffer &target, const Common::Rect &targetRect, const Common::Point &scaledPosition) const;