aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/pregob
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob/pregob')
-rw-r--r--engines/gob/pregob/onceupon/onceupon.cpp18
-rw-r--r--engines/gob/pregob/onceupon/onceupon.h1
2 files changed, 7 insertions, 12 deletions
diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp
index 1d1bfd4629..53fa3bcece 100644
--- a/engines/gob/pregob/onceupon/onceupon.cpp
+++ b/engines/gob/pregob/onceupon/onceupon.cpp
@@ -1492,12 +1492,6 @@ enum CharGenState {
kCharGenStateFinish // Finished
};
-void OnceUpon::recolor(Surface &surface, uint8 from, uint8 to) {
- for (Pixel p = surface.get(); p.isValid(); ++p)
- if (p.get() == from)
- p.set(to);
-}
-
void OnceUpon::charGenSetup(uint stage) {
Surface choix(320, 200, 1), elchoix(320, 200, 1), paperDoll(65, 137, 1);
@@ -1518,12 +1512,14 @@ void OnceUpon::charGenSetup(uint stage) {
_vm->_draw->_backSurface->blit(choix, 0, 38, 159, 121, 140, 54);
// Recolor the paper doll parts
- if (_colorHair != 0xFF)
- recolor(elchoix , 0x0C, _colorHair);
- if (_colorJacket != 0xFF)
- recolor(paperDoll, 0x0A, _colorJacket);
+ if (_colorHair != 0xFF)
+ elchoix.recolor(0x0C, _colorHair);
+
+ if (_colorJacket != 0xFF)
+ paperDoll.recolor(0x0A, _colorJacket);
+
if (_colorTrousers != 0xFF)
- recolor(paperDoll, 0x09, _colorTrousers);
+ paperDoll.recolor(0x09, _colorTrousers);
_vm->_draw->_backSurface->blit(paperDoll, 32, 51);
diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h
index 3b924a11e6..80fcba35bd 100644
--- a/engines/gob/pregob/onceupon/onceupon.h
+++ b/engines/gob/pregob/onceupon/onceupon.h
@@ -314,7 +314,6 @@ private:
void charGenSetup(uint stage);
void charGenDrawName();
- static void recolor(Surface &surface, uint8 from, uint8 to);
static bool enterString(Common::String &name, int16 key, uint maxLength, const Font &font);