Opened 10 months ago

Last modified 9 months ago

#14549 new defect

AGI: Missing fill in Winnie the Pooh (pre-AGI!)

Reported by: eriktorbjorn Owned by:
Priority: normal Component: Engine: AGI
Version: Keywords:
Cc: Game:

Description (last modified by eriktorbjorn)

In the first room of Winnie the Pooh in the Hundred Acre Woods (the DOS version, at least) the area in the lower left corner isn't colored in:


In DOSBox it is:


There is a call to draw_Fill(19, 159) with the appropriate color, but since this is right outside the lower edge of the picture it is ignored. If the coordinates are adjusted to 19, 158 the area is colored in as expected.

You could also add something like this for the same effect, but don't mistake this for a proper fix. It was just an experiment:

--- a/engines/agi/picture.cpp
+++ b/engines/agi/picture.cpp
@@ -841,6 +841,9 @@ void PictureMgr::draw_Fill(int16 x, int16 y) {
 	Common::Stack<Common::Point> stack;
 	stack.push(Common::Point(x, y));
 
+	if (draw_FillCheck(x, y - 1))
+		stack.push(Common::Point(x, y - 1));
+
 	// Exit if stack is empty
 	while (!stack.empty()) {
 		Common::Point p = stack.pop();

But it does suggest to me that there is an inaccuracy in ScummVM's draw_Fill() for this particular corner case, for at least this particular game. But the "v2" format seems to be used for lots of games.

Though we already have an apparently game-specific mickeyCrystalAnimation special case in PictureMgr::drawPictureV2(), so maybe another game-specific hack wouldn't be out of the question? (Somewhat alarmingly, this particular one only checks for GType_PreAGI, not a specific game.)

Attachments (2)

winnie-dosbox.png (4.3 KB ) - added by eriktorbjorn 10 months ago.
winnie-scummvm.png (3.5 KB ) - added by eriktorbjorn 10 months ago.

Download all attachments as: .zip

Change History (6)

by eriktorbjorn, 10 months ago

Attachment: winnie-dosbox.png added

by eriktorbjorn, 10 months ago

Attachment: winnie-scummvm.png added

comment:1 by eriktorbjorn, 10 months ago

Description: modified (diff)

comment:2 by tag2015, 10 months ago

Looking at bug https://bugs.scummvm.org/ticket/5730 it seems there are some long-standing issues with the floodfill function, could this be related?

comment:3 by m-kiewitz, 9 months ago

Please keep in mind that Winnie the Pooh is not an AGI game, but "pre-AGI"

The floodfill is based on AGI. It seems there were changes between "pre-AGI" and AGI.
Floodfill to my knowledge is accurate for AGI games, there are several problems like this, in pre-AGI games.

So if it was changed, it may (possibly will) break AGI games. In any case it shouldn't get changed like that, because it would make it inaccurate regarding AGI games. And keep in mind that there are tons of AGI fan games.

In my opinion floodfill should get reverse engineered from a pre-AGI game interpreter and then implemented separately. Problem is these pre-AGI games are really rare and not easy to get your hands on. Same for the booter versions of certain games.

If I remember correctly the floodfill in SCI is also not the same as in AGI. And just like in AGI, the floodfill in SCI has to be 100% perfect, because there are all sorts of corner cases and just one inaccuracy and games will break.

Last edited 9 months ago by m-kiewitz (previous) (diff)

comment:4 by m-kiewitz, 9 months ago

Summary: AGI: Missing fill in Winnie the PoohAGI: Missing fill in Winnie the Pooh (pre-AGI!)
Note: See TracTickets for help on using tickets.