From 1590ea242e3c1be2fc04056e76e91e68fee27906 Mon Sep 17 00:00:00 2001
From: Eugene Sandulenko <sev@scummvm.org>
Date: Sat, 3 Jul 2004 03:06:15 +0000
Subject: [PATCH] Fix veggie head bug in fbear. Patch attahed to bugreport
 #984258 is partially attached.

svn-id: r14154
---
 TODO            | 1 -
 scumm/actor.cpp | 5 +++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/TODO b/TODO
index 104cdd01a0d..5af268052cf 100644
--- a/TODO
+++ b/TODO
@@ -283,7 +283,6 @@ SCUMM
   - Fix creature behind garage door disappearing in moondemo
   - Fix remaining masking issues, when cars come out of garages in puttputt and
     when Putt-Putt gets off the chair in Cosmic Dust Diner of puttmoon
-  - Fix 'costume x undefined x x' errors in veggie head mini game of fbear
   - Document and fix AKOS differences in Humongous Entertainment games
   - Support various newer Humongous Entertainment games
 * Humongous entertainment >= v7 titles:
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index e465ecc1730..3a8d06ee3a7 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -1241,6 +1241,11 @@ void Actor::setActorCostume(int c) {
 		return;
 	}
 
+	// Based on disassembly. It seems that high byte is not used at all, though
+	// it is attached to all horizontally flipped object, like left eye.
+	if (_vm->_heversion == 60)
+		c &= 0xff;
+
 	costumeNeedsInit = true;
 	
 	if (_vm->_features & GF_NEW_COSTUMES) {