aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/surface.cpp
diff options
context:
space:
mode:
authorSven Hesse2012-07-30 01:50:39 +0200
committerSven Hesse2012-07-30 01:50:59 +0200
commitd80d08128b2a030a65ce4f48776f5c63370ac598 (patch)
tree8e219014f2ccde916ae8ce5a32754026b3ff0e98 /engines/gob/surface.cpp
parente8fd51e56b9eb4eecd09711757b2d851d5bafafc (diff)
parentb001168658f57b845bae81df0ca85240c796e74e (diff)
downloadscummvm-rg350-d80d08128b2a030a65ce4f48776f5c63370ac598.tar.gz
scummvm-rg350-d80d08128b2a030a65ce4f48776f5c63370ac598.tar.bz2
scummvm-rg350-d80d08128b2a030a65ce4f48776f5c63370ac598.zip
Merge branch 'pregob' (WIP Once Upon A Time)
This is some in-progress work for supporting the mostly hard-coded Once Upon A Time titles Abracadabra and Baba Yaga.
Diffstat (limited to 'engines/gob/surface.cpp')
-rw-r--r--engines/gob/surface.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/gob/surface.cpp b/engines/gob/surface.cpp
index 3eaf741be2..afbb7c3bae 100644
--- a/engines/gob/surface.cpp
+++ b/engines/gob/surface.cpp
@@ -684,6 +684,12 @@ void Surface::shadeRect(uint16 left, uint16 top, uint16 right, uint16 bottom,
}
+void Surface::recolor(uint8 from, uint8 to) {
+ for (Pixel p = get(); p.isValid(); ++p)
+ if (p.get() == from)
+ p.set(to);
+}
+
void Surface::putPixel(uint16 x, uint16 y, uint32 color) {
if ((x >= _width) || (y >= _height))
return;