Difference between revisions of "AGIWiki/Picture"

Jump to navigation Jump to search
64 bytes added ,  11:11, 1 February 2015
m
no edit summary
m
 
(2 intermediate revisions by 2 users not shown)
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++">
Line 376: Line 376:
* [[AGIWiki/AGI Studio|AGI Studio]] help file
* [[AGIWiki/AGI Studio|AGI Studio]] help file
* [[AGIWiki/AGI Specs|AGI Specs version 3.0]]
* [[AGIWiki/AGI Specs|AGI Specs version 3.0]]
{{AGIWiki/AGI Resources}}
885

edits

Navigation menu