Remove colour attributes from body and strip most of the font tags out

This commit is contained in:
James Gregory 2013-12-30 13:57:02 +11:00
commit c1f88ddb41
362 changed files with 1632 additions and 1706 deletions

View file

@ -24,7 +24,7 @@
<!--CHAPTER=44//-->
<!--PAGES=833-835//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//--></HEAD><BODY LINK=#0000FF ALINK=#000099 VLINK=#0000FF BGCOLOR=#FFFFFF>
<!--UNASSIGNED2//--></HEAD><body>
<CENTER>
<TABLE BORDER>
@ -42,13 +42,13 @@
</TABLE>
<P>I&rsquo;m not going to delve any deeper into the considerable issues of drawing VGA text; I just want to sensitize you to the existence of approaches other than the ones used in Listings 44.1 and 44.2. On the VGA, the rule is: If there&rsquo;s something you want to do, there probably are 10 ways to do it, each with unique strengths and weaknesses. Your mission, should you decide to accept it, is to figure out which one is best for your particular application.
</P>
<H4 ALIGN="CENTER"><A NAME="Heading7"></A><FONT COLOR="#000077">Page Flipping</FONT></H4>
<H4 ALIGN="CENTER"><A NAME="Heading7"></A>Page Flipping</H4>
<P>Now that we know how to update the screen reasonably quickly, it&rsquo;s time to get on to the fun stuff. Page flipping answers the second requirement for animation, by keeping bitmap changes off the screen until they&rsquo;re complete. In other words, page flipping guarantees that partially updated bitmaps are never seen.
</P>
<P>How is it possible to update a bitmap without seeing the changes as they&rsquo;re made? Easy&mdash;with page flipping, there are <I>two</I> bitmaps; the program shows you one bitmap while it updates the other. Conceptually, it&rsquo;s that simple. In practice, unfortunately, it&rsquo;s not so simple, because of the design of the VGA. To understand why that is, we must look at how the VGA turns bytes in display memory into pixels on the screen.</P>
<P>The VGA bitmap is a linear 64 K block of memory. (True, most adapters nowadays are SuperVGAs with more than 256 K of display memory, but every make of SuperVGA has its own way of letting you access that extra memory, so going beyond standard VGA is a daunting and difficult task. Also, it&rsquo;s hard to manipulate the large frame buffers of SuperVGA modes fast enough for real-time animation.) Normally, the VGA picks up the first byte of memory (the byte at offset 0) and displays the corresponding 8 pixels on the screen, then picks up the byte at offset 1 and displays the next 8 pixels, and so on to the end of the screen. However, the offset of the first byte of display memory picked up during each frame is not fixed at 0, but is rather programmable by way of the Start Address High and Low registers, which together store the 16-bit offset in display memory at which the bitmap to be displayed during the next frame starts. So, for example, in mode 10H (640x350, 16 colors), a large enough bitmap to store a complete screen of information can be stored at display memory offsets 0 through 27,999, and <I>another</I> full bitmap could be stored at offsets 28,000 through 55,999, as shown in Figure 44.1. (I&rsquo;m discussing 640x350 mode at the moment for good reason; we&rsquo;ll get to 640x480 shortly.) When the Start Address registers are set to 0, the first bitmap (or page) is displayed; when they are set to 28,000, the second bitmap is displayed. Page flipped animation can be performed by displaying page 0 and drawing to page 1, then setting the start address to page 1 to display that page and drawing to page 0, and so on <I>ad infinitum.</I></P>
<P><A NAME="Fig1"><!-- </A><A HREF="javascript:displayWindow('images/44-01.jpg',411,188 )"> --><IMG SRC="images/44-01.jpg"><BR><!-- </A>
<BR><A HREF="javascript:displayWindow('images/44-01.jpg',411,188)"> --><FONT COLOR="#000077"><B>Figure 44.1</B></FONT></A>&nbsp;&nbsp;<I>Memory allocation for mode 10h page flipping.</I>
<BR><A HREF="javascript:displayWindow('images/44-01.jpg',411,188)"> --><B>Figure 44.1</B></A>&nbsp;&nbsp;<I>Memory allocation for mode 10h page flipping.</I>
<P><BR></P>
<CENTER>
<TABLE BORDER>
@ -62,7 +62,7 @@
<hr width="90%" size="1" noshade>
<div align="center">
<font face="Verdana,sans-serif" size="1">Graphics Programming Black Book &copy; 2001 Michael Abrash</font>
Graphics Programming Black Book &copy; 2001 Michael Abrash
</div>
<!-- all of the reference materials (books) have the footer and subfoot reveresed -->
<!-- reference_subfoot = footer -->