[Scummvm-devel] Redraw problems

Ludvig Strigeus strigeus at home.se
Tue Dec 4 02:46:01 CET 2001


Hello!

Thanks for the patches, it's nice with someone else than me that takes an
initiative to debug the inner parts of the code, which are quite messy imho.

----- Original Message -----
From: "Sam Kenny" <SamKenny at cit.com.au>
To: <scummvm-devel at lists.sourceforge.net>
Sent: Tuesday, December 04, 2001 3:44 AM
Subject: [Scummvm-devel] Redraw problems


> Hi all,
>
> While playing around with the Sam N Max demo, and looking at some of the
> redraw wierdness at the intro (in the SDL version), I think I've found a
> couple of the solutions, but I'm not sure of any side effects they might
> have. Sam N Max at least appears to look really nice now.
>
> The first one is that drawBox doesn't seem to handle a color of -1 at all
> (which I think should be transparent), so I added some code to draw the
> current background instead (I think this is what happens in Sam N Max at
> least).

Yeah, that sounds reasonable.


> The second appears to be a problem with where strings are drawn, around
line
> 726 of string.cpp
> _bg_ptr2 = _backbuff_ptr = _vm->getResourceAddress(rtBuffer,
> vs->number+1)
> + vs->xstart + _drawTop * 320 + _left;
>
> #if !defined(OLD)
> if (_blitAlso) {
> #else
> if (1) {
> #endif
> _bg_ptr2 = _bgbak_ptr = _vm->getResourceAddress(rtBuffer,
> vs->number+5)
> + vs->xstart + _drawTop * 320 + _left;
>
> I think the second bg_ptr2 means that text will be copied to the
background
> instead of the backbuffer. Printing to the backBuffer and changing the
order
> of some operations seems to clear this up.

This new code doesn't work well in the DOTT intro however, when the car
drives around on some hilly terrain. The credit texts should remain on
screen even when a refresh from the background is needed, which is what
_blitAlso is used for, but with this code, the credit texts are removed.

>
> (there is also a fix for a uninitialized
> variable in resource.cpp that I think just slipped through).

Thanks

--
Ludvig Strigeus






More information about the Scummvm-devel mailing list