Remove colour attributes from body and strip most of the font tags out
This commit is contained in:
parent
7e957c0bb4
commit
c1f88ddb41
362 changed files with 1632 additions and 1706 deletions
10
43-02.html
10
43-02.html
|
|
@ -24,7 +24,7 @@
|
|||
<!--CHAPTER=43//-->
|
||||
<!--PAGES=799-801//-->
|
||||
<!--UNASSIGNED1//-->
|
||||
<!--UNASSIGNED2//--></HEAD><BODY LINK=#0000FF ALINK=#000099 VLINK=#0000FF BGCOLOR=#FFFFFF>
|
||||
<!--UNASSIGNED2//--></HEAD><body>
|
||||
|
||||
<CENTER>
|
||||
<TABLE BORDER>
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
</CENTER>
|
||||
<P><BR></P>
|
||||
</P>
|
||||
<H4 ALIGN="LEFT"><A NAME="Heading4"></A><FONT COLOR="#000077">Stacking the Palette Registers</FONT></H4>
|
||||
<H4 ALIGN="LEFT"><A NAME="Heading4"></A>Stacking the Palette Registers</H4>
|
||||
<P>Suppose that instead of viewing the four bits per pixel coming out of display memory as selecting one of sixteen colors,we view those bits as selecting one of <I>four</I> colors. If the bit from plane 0 is 1, that would select color 0 (say, red). The bit from plane 1 would select color 1 (say, green), the bit from plane 2 would select color 2 (say, blue), and the bit from plane 3 would select color 3 (say, white). Whenever more than 1 bit is 1, the 1 bit from the lowest-numbered plane would determine the color, and 1 bits from all other planes would be ignored. Finally, the absence of any 1 bits at all would select the background color (say, black).</P>
|
||||
<P>That would give us four colors and the background color. It would also give us nifty image precedence, with images in plane 0 appearing to be in front of images from the other planes, images in plane 1 appearing to be in front of images from planes 2 and 3, and so on. It would even give us transparency, where rearward images would show through holes within and around the edges of images in forward planes. Finally, and most importantly, it would meet all the criteria needed to allow us to store each image in a single plane, letting us manipulate the images very quickly and with no reprogramming of the VGA’s hardware other than the few <B>OUT</B> instructions required to select the plane we want to write to.</P>
|
||||
<P>Which leaves only one question: How do we get this magical pixel-precedence scheme to work? As it turns out, all we need to do is reprogram the palette registers so that the 1 bit from the plane with the highest precedence determines the color. The palette RAM settings for the colors described above are summarized in Table 43.1.</P>
|
||||
|
|
@ -122,11 +122,11 @@
|
|||
<TH COLSPAN="3"><HR>
|
||||
</TABLE>
|
||||
<P><A NAME="Fig4"><!-- </A><A HREF="javascript:displayWindow('images/43-04.jpg',405,198 )"> --><IMG SRC="images/43-04.jpg"><BR><!-- </A>
|
||||
<BR><A HREF="javascript:displayWindow('images/43-04.jpg',405,198)"> --><FONT COLOR="#000077"><B>Figure 43.4</B></FONT></A> <I>How pixel precedence works.</I>
|
||||
<BR><A HREF="javascript:displayWindow('images/43-04.jpg',405,198)"> --><B>Figure 43.4</B></A> <I>How pixel precedence works.</I>
|
||||
</P>
|
||||
<P>Seems almost too easy, doesn’t it? Nonetheless, it works beautifully, as we’ll see very shortly. First, though, I’d like to point out that there’s nothing sacred about plane 0 having precedence. We could rearrange the palette register settings so that any plane had the highest precedence, followed by the other planes in any order. I’ve chosen to make plane 0 the highest precedence only because it seems simplest to think of plane 0 as appearing in front of plane 1, which is in front of plane 2, which is in front of plane 3.
|
||||
</P>
|
||||
<H3><A NAME="Heading5"></A><FONT COLOR="#000077">Bit-Plane Animation in Action</FONT></H3>
|
||||
<H3><A NAME="Heading5"></A>Bit-Plane Animation in Action</H3>
|
||||
<P>Without further ado, Listing 43.1 shows bit-plane animation in action. Listing 43.1 animates 13 rather large images (each 32 pixels on a side) over a complex background at a good clip <I>even on a primordial 8088-based PC</I>. Five of the images move very quickly, while the other 8 bounce back and forth at a steady pace.</P><P><BR></P>
|
||||
<CENTER>
|
||||
<TABLE BORDER>
|
||||
|
|
@ -140,7 +140,7 @@
|
|||
|
||||
<hr width="90%" size="1" noshade>
|
||||
<div align="center">
|
||||
<font face="Verdana,sans-serif" size="1">Graphics Programming Black Book © 2001 Michael Abrash</font>
|
||||
Graphics Programming Black Book © 2001 Michael Abrash
|
||||
</div>
|
||||
<!-- all of the reference materials (books) have the footer and subfoot reveresed -->
|
||||
<!-- reference_subfoot = footer -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue