1,554
edits
(→Line drawing: -- code highlighting) |
(Wikify and fill in differences from SGML. Work complete) |
||
Line 3: | Line 3: | ||
Written by Lance Ewing, with additions/modifications by Claudio Matsuoka based on the AGDS documentation translated by Vassili Bykov (Last updated: 22 May 1999). | Written by Lance Ewing, with additions/modifications by Claudio Matsuoka based on the AGDS documentation translated by Vassili Bykov (Last updated: 22 May 1999). | ||
==Introduction== | ==Introduction== | ||
Line 62: | Line 63: | ||
Initially all pixels of the background are white and have priority 4. After this command is executed, all the subsequent graphic commands draw using the colour set by the command. | Initially all pixels of the background are white and have priority 4. After this command is executed, all the subsequent graphic commands draw using the colour set by the command. | ||
Example: F0 0D changes picture screen drawing colour to light magenta and enables drawing to the picture screen. | Example: <tt>F0 0D</tt> changes picture screen drawing colour to light magenta and enables drawing to the picture screen. | ||
====0xF1: Disable picture draw==== | ====0xF1: Disable picture draw==== | ||
Line 72: | Line 73: | ||
Function: Changes the current drawing colour for the priority screen to that given by the one and only argument, and enables subsequent actions to draw to the priority screen. | Function: Changes the current drawing colour for the priority screen to that given by the one and only argument, and enables subsequent actions to draw to the priority screen. | ||
Example: F0 04 changes priority screen drawing colour to red and enables drawing to the priority screen. | Example: <tt>F0 04</tt> changes priority screen drawing colour to red and enables drawing to the priority screen. | ||
====0xF3: Disable priority draw==== | ====0xF3: Disable priority draw==== | ||
Line 227: | Line 228: | ||
for plot 7 | for plot 7 | ||
</pre> | </pre> | ||
To implement this you will need to store bitmaps for each of these of these circles. | |||
====0xFA: Plot with pen==== | ====0xFA: Plot with pen==== | ||
Line 290: | Line 292: | ||
The picture screen has a starting state of being completely white. The priority screen has starting state of being completely red. It is important that you set all pixels in each screen to the relevant background colour else you won't get the right result. | The picture screen has a starting state of being completely white. The priority screen has starting state of being completely red. It is important that you set all pixels in each screen to the relevant background colour else you won't get the right result. | ||
===General guidelines=== | ===General guidelines=== | ||
The screen mode used by the AGI games is the 320x200x16 standard EGA mode. However, all graphics is designed to be shown on a 160x200x16 mode. This was apparently the resolution that the original PCjr interpreter used. They stuck with it when they started supporting EGA and thus have a situation where each AGI pixel has a width of two normal 320x200 pixels. | The screen mode used by the AGI games is the 320x200x16 standard EGA mode. However, all graphics is designed to be shown on a 160x200x16 mode. This was apparently the resolution that the original PCjr interpreter used. They stuck with it when they started supporting EGA and thus have a situation where each AGI pixel has a width of two normal 320x200 pixels. | ||
===Line drawing=== | ===Line drawing=== | ||
Line 349: | Line 353: | ||
==Using higher resolution modes== | ==Using higher resolution modes== | ||
I | I often wondered if it would be possible to show PICTUREs in a higher resolution, for example, 640x400. Since the data is stored as vectors, it should be possible to multiply all the x components by four and all the y components by two and then draw the lines. This would give less blocky pictures. There would be a number of problems to overcome. Firstly, the fill action (or tool) may cause problems because pixels could be in the wrong places. There will also be a need to draw end pixels of a line with a width of four so that there are no holes for the flood fill to flow out of. | ||
<span id="PicEdit"></span> | <span id="PicEdit"></span> | ||
Line 362: | Line 366: | ||
Tool:Line V:A P:o C:o X=199 Y=55 Pri:2 | Tool:Line V:A P:o C:o X=199 Y=55 Pri:2 | ||
o = off (or disabled) | o = off (or disabled) | ||
Pri looks like it could be giving the current priority band that the cursor location is in. The above status lines are for the SCI Picture Editor. I ran these values past SQ3 and the values given for Pri are indeed the values of the priority band at the locations given. | Pri looks like it could be giving the current priority band that the cursor location is in. The above status lines are for the SCI Picture Editor. I ran these values past SQ3 and the values given for Pri are indeed the values of the priority band at the locations given. |