Open main menu

Difference between revisions of "AGIWiki/Picture"

38 bytes added ,  08:48, 14 August 2013
changing link to Sarien to ScummVM
(changing link to Sarien to ScummVM)
Line 299: Line 299:
This routine is relatively straight forward and I suggest that you look at it and try to understand it or you'll be having headaches trying to get you're routines acting like the Sierra ones. Basically it draws a line from (x1, y1) to (x2, y2) using a function called pset to draw a single pixel. The function round() is what makes it act like the Sierra. Essentially when it comes down to a 50:50 decision about where to put a pixel, the direction in which the line is being drawn is taken into account. I've only noticed one pixel out of place in all the screens I've tried Showpic on which makes me believe its probably not a fault in this algorithm, but somewhere else in the code.
This routine is relatively straight forward and I suggest that you look at it and try to understand it or you'll be having headaches trying to get you're routines acting like the Sierra ones. Basically it draws a line from (x1, y1) to (x2, y2) using a function called pset to draw a single pixel. The function round() is what makes it act like the Sierra. Essentially when it comes down to a 50:50 decision about where to put a pixel, the direction in which the line is being drawn is taken into account. I've only noticed one pixel out of place in all the screens I've tried Showpic on which makes me believe its probably not a fault in this algorithm, but somewhere else in the code.


''Note that [[AGIWiki/Sarien|Sarien]] uses a different line drawing algorithm written by Joshua Neal and Stuart George. ''
''Note that the AGI engine in [[AGIWiki/ScummVM|ScummVM]] (based on Sarien) uses a different line drawing algorithm written by Joshua Neal and Stuart George. ''


<syntax type="C++">
<syntax type="C++">
8,014

edits