Normal quotes

This commit is contained in:
James Gregory 2013-12-30 18:34:31 +11:00
commit 18011c595a
352 changed files with 6040 additions and 6040 deletions

View file

@ -2,14 +2,14 @@
[Previous](43-03.html) [Table of Contents](index.html) [Next](43-05.html)
------------------------ --------------------------------- --------------------
For those of you who haven’t experienced the frustrations of animation
programming on a PC, there’s a *whole* lot of animation going on in
Listing 43.1. What’s more, the animation is virtually flicker-free,
For those of you who haven't experienced the frustrations of animation
programming on a PC, there's a *whole* lot of animation going on in
Listing 43.1. What's more, the animation is virtually flicker-free,
partly thanks to bit-plane animation and partly because images are never
really erased but rather are simply overwritten. (The principle behind
the animation is that of redrawing each image with a blank fringe around
it when it moves, so that the blank fringe erases the part of the old
image that the new image doesn’t overwrite. For details on this sort of
image that the new image doesn't overwrite. For details on this sort of
animation, see the above-mentioned *PC Tech Journal* July 1986 article.)
Better yet, the red images take precedence over the green images, which
take precedence over the blue images, which take precedence over the
@ -26,9 +26,9 @@ like—dare I say it?—a games machine.
Listing 43.1 was designed to run at the absolute fastest speed, and as I
mentioned it puts in a pretty amazing performance on the slowest PCs of
all. Assuming you’ll be running Listing 43.1 on an faster computer,
you’ll have to crank up the **DELAY** equate at the start of Listing
43.1 to slow things down to a reasonable pace. (It’s not a very good
all. Assuming you'll be running Listing 43.1 on an faster computer,
you'll have to crank up the **DELAY** equate at the start of Listing
43.1 to slow things down to a reasonable pace. (It's not a very good
game where all the pieces are a continual blur!) Even on something as
modest as a 286-based AT, Listing 43.1 runs much too fast without a
substantial delay (although it does look rather interesting at warp
@ -36,7 +36,7 @@ speed). We should all have such problems, eh? In fact, we could easily
increase the number of animated images past 20 on that old AT, and well
into the hundreds on a cutting-edge local-bus 486 or Pentium.
I’m not going to discuss Listing 43.1 in detail; the code is very
I'm not going to discuss Listing 43.1 in detail; the code is very
thoroughly commented and should speak for itself, and most of the
individual components of Listing 43.1—the Map Mask register, mode sets,
word versus byte **OUT** instructions to the VGA—have been covered in
@ -46,7 +46,7 @@ pointer to a 17-byte array (1 byte for each of the 16 palette registers,
and 1 byte for the border color) to the BIOS video interrupt (**INT**
10H), function 10H, subfunction 2.
Bit-plane animation does have inherent limitations, which we’ll get to
Bit-plane animation does have inherent limitations, which we'll get to
in a second. One limitation that is *not* inherent to bit-plane
animation but simply a shortcoming of Listing 43.1 is somewhat choppy
horizontal motion. In the interests of both clarity and keeping Listing
@ -57,7 +57,7 @@ support rotation. Unfortunately, it also meant that the smallest
possible horizontal movement was 8 pixels (1 byte of display memory),
which is far enough to be noticeable at certain speeds. The situation
is, however, easily correctable with the additional rotations and code.
We’ll see an implementation of fully rotated images (in this case for
We'll see an implementation of fully rotated images (in this case for
Mode X, but the principles generalize nicely) in Chapter 49. Vertically,
where there is no byte-alignment issue, the images move 4 or 6 pixels at
a times, resulting in considerably smoother animation.
@ -67,13 +67,13 @@ to support for internal animation, where the appearance of a given image
changes over time to suggest that the image is an active entity. For
example, propellers could whirl, jaws could snap, and jets could flare.
Bit-plane animation with bit-aligned images and internal animation can
look truly spectacular. It’s a sight worth seeing, particularly for
those who doubt the PC’s worth when it comes to animation.
look truly spectacular. It's a sight worth seeing, particularly for
those who doubt the PC's worth when it comes to animation.
### Limitations of Bit-Plane Animation {#Heading6}
As I’ve said, bit-plane animation is not perfect. For starters,
bit-plane animation can only be used in the VGA’s planar modes, modes
As I've said, bit-plane animation is not perfect. For starters,
bit-plane animation can only be used in the VGA's planar modes, modes
0DH, 0EH, 10H, and 12H. Also, the reprogramming of the palette registers
that provides image precedence also reduces the available color set from
the normal 16 colors to just 5 (one color per plane plus the background
@ -91,7 +91,7 @@ plane 3 for bit-plane animation while using planes 0-2 for normal
of the 8-color images. If we wanted the plane 3 images to be yellow, we
could set up the palette registers as shown in Table 43.2.
As you can see, the color yellow is displayed whenever a pixel’s bit
As you can see, the color yellow is displayed whenever a pixel's bit
from plane 3 is 1. This gives the images from plane 3 precedence, while
leaving us with the 8 normal low-intensity colors for images drawn
across the other 3 planes, as shown in Figure 43.5. Of course, this