Difference between revisions of "AGIWiki/Picture"

Jump to navigation Jump to search
112 bytes added ,  11:11, 1 February 2015
m
no edit summary
(Created page with "{{AGIWiki}} '''''Picture''''' resources are full-screen images, usually used for backgrounds. They are vector-based rather than bitmaps, which means they are drawn using drawing...")
 
m
 
(3 intermediate revisions by 2 users not shown)
Line 40: Line 40:
The following colors are used in AGI. RGB is given in 6 bit values.
The following colors are used in AGI. RGB is given in 6 bit values.


{|
|
[[File:AGIWiki AGI-palette.gif|left]]
|
  <nowiki>Code  Color            R    G    B
  <nowiki>Code  Color            R    G    B
  ----- ---------------- ---- ---- ----
  ----- ---------------- ---- ---- ----
Line 59: Line 63:
   15  white            0x3F 0x3F 0x3F
   15  white            0x3F 0x3F 0x3F
  </nowiki>
  </nowiki>
|}


=== General actions ===
=== General actions ===
Line 294: 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 371: 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