Opened 14 years ago

Closed 14 years ago

#4827 closed defect (fixed)

DW2: Mad Drongo Animation Malfunction

Reported by: digitall Owned by: dreammaster
Priority: normal Component: Engine: Tinsel
Version: Keywords:
Cc: Game: Discworld II


Mad Drongo present in the High Energy Magic Building has a corrupted animation with multiple overdrawn frames...

Ticket imported from: #2974817. Ticket imported from: bugs/4827.

Attachments (3)

dw2-gb.001 (2.1 KB ) - added by digitall 14 years ago.
bug.png (151.9 KB ) - added by digitall 14 years ago.
Screen capture of bug
dw2-gb.002 (2.1 KB ) - added by digitall 14 years ago.
Savegame which does NOT exhibit bug

Download all attachments as: .zip

Change History (12)

by digitall, 14 years ago

Attachment: dw2-gb.001 added


comment:1 by digitall, 14 years ago

ScummVM SVN 1.1.0 Branch Revision 48357 built on Linux x86_32 2.6.31 by GCC 4.3.4 DW2 is CD/DOS/English (GB) version

by digitall, 14 years ago

Attachment: bug.png added

Screen capture of bug

by digitall, 14 years ago

Attachment: dw2-gb.002 added

Savegame which does NOT exhibit bug

comment:2 by digitall, 14 years ago

This bug has been replicated by salty-horse.

It exhibits with the attached savegame. An unaffected game is attached for comparison.

It is inferred taht the fault is associated with a specific case of the random / date-time fields in the Tinsel savegame format, but I'm not currently familar enough with these to spot the specific issue.

comment:3 by dreammaster, 14 years ago

Owner: set to dreammaster
Summary: Mad Drongo Animation MalfunctionDW2: Mad Drongo Animation Malfunction

comment:4 by digitall, 14 years ago

Further investigation indicates that this bug does not occur if using "New Game" option or Save/Loading from this game state, but only when loading a previously saved game from the launcher or choosing the "Resume Game" option.

This would indicate some game state variable is not being initialised correctly on load, as opposed to new game.

comment:5 by digitall, 14 years ago

It should be noted that this issue has been reported before as bug 2788154.

However, this bug is not invalid, but troublesome to replicate.

If I recall correctly, this bug occurred in the original engine as well, so this would indicate a script issue.

comment:6 by dreammaster, 14 years ago

We've been able to establish that it isn't reproducable from loading directly from the launcher versus loading in-game, so I agree with tdhs that it's likely some script bug. Unfortunately, whilst the savegame will likely be to able to tell me what's wrong, it likely won't be able to tell me *how* it got wrong, so it likely won't be easy to fix.

comment:7 by digitall, 14 years ago

dreammaster : Tried to reproduce this in the original engine without success, though this is inconclusive.

High Energy Magic Building is Scene 66. By intercepting _ctx->reelActor in t2PlayReel() in engines/tinsel/play.cpp, I have identified Mad Drongo as 235 (Talking), 236 (Vomiting), 237 (Idle, Blinking) and 238 (Laughing).

In both cases, 235, 237 and 238 are called, but it appears the bug causes 235 and 238 to be visible, rather than hidden when you load a savegame in Scene 66.

Still trying to trace down the exact cause, but hope this helps you.

comment:8 by dreammaster, 14 years ago

Thanks to your help, I finally tracked down the source of the problem. It's one of those Doh! moments - looking at syncSavedActor after several previous times, it only then dawned on me that the value of 'bHidden' was never actually getting saved in the savegame, which is why the several reels could be false.. it would actually take the bHidden values from whatever previously stored in those fields, either uninitialised data, or whatever was in them the last time a savegame was made.

Luckily, the existin savegame format dedicated a 32-bit LE value for storing the 'bAlive' boolean value, so I've converted it to being stored in a 16-bit LE value, and used the remaining two bytes to store the bHidden value. This will cause minimal impact on the savegame format, and allow existing savegames to still load properly

comment:9 by dreammaster, 14 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.