Hey there,

Currently i am engaging in a little quest to make a proof-of-concept
SCUMM interface which resembles anything post-DOTT. Verb discs,
conversation items & inventory overlaid over the room graphic, etc.

For a while now, i've been in search of a solution to redraw the current
room graphic. For those of you who haven't scavenged through the full V6
opcode list, there doesn't appear to be anything specifically designed
to redraw either the whole or part of a room.

After a bit of searching, i came across 2 opcodes. One was called
"drawObjectAt", which plonks an object on the screen at the specified
position, and which didn't seem very important at first until i looked
at the other opcode called "setState" which in ScummVM is implemented as
so:
        int state = pop();
        int obj = pop();

        putState(obj, state);
        markObjectRectAsDirty(obj);
        if (_bgNeedsRedraw)
                clearDrawObjectQueue();

Upon disabling the "markObjectRectAsDirty" call, i noticed two things:
        1) The credits text for the intro in samnmax started leaving artifacts
behind when scrolling.
        2) Conversation items in samnmax left behind artifacts when the
conversation ended.

Thus i believe i have found the solution to force a redraw of part of
the current rooms graphic. All you need to do is make an object which
covers the relevant area of the screen you want to redraw, then
alternate its state via a call to setState().

Hope this helps.

Regards,

Stuart J Urquhart


_______________________________________________
ScummC-general mailing list
[email protected]
https://mail.gna.org/listinfo/scummc-general

Reply via email to