[Scummvm-devel] SCI: line drawing functions

Max Horn max at quendi.de
Mon Feb 23 14:21:39 CET 2009


Am 23.02.2009 um 05:19 schrieb Filippos Karapetis:

> Hello
>
> I was having a look at SCI's line drawing functions, and have some  
> questions
> - would it be safe to replace the line drawing functions inside gfx/ 
> gfx_support.cpp and gfx/gfx_line.cpp with our  
> Graphics::drawThickLine() function? I personally don't see any  
> issues with this, and I've tested some SCI games with this change,  
> and they seem to run correctly, but I just wanted to get a second  
> opinion. Our line code is in graphics/primitives.cpp and is based on  
> Bresenham's line algorithm.
> - it seems that there is provision in the code to draw thicker lines  
> than 1 pixel, but it seems only line thickness of 1 is used... so we  
> could replace this with our simpler Graphics::drawLine function,  
> instead of Graphics::drawThickLine, right?


I would be careful with replacing. If you are sure the two methods  
produce pixel identical output, it could be considered. But if not,  
better don't do it right now, or wait until Walter or Lars confirmed  
it is OK. As in AGI, stuff might depend on specific pixels being set  
or not, for priority screens. Well, or not, but an expert should clear  
this.

Bye,
Max




More information about the Scummvm-devel mailing list