Convert figure images to markdown

This commit is contained in:
James Gregory 2013-12-31 07:56:10 +11:00
commit 77a95ec319
115 changed files with 218 additions and 403 deletions

View file

@ -20,8 +20,7 @@ the least.
![](images/i.jpg) *That's what Zen programming is all about, though; tying together two pieces of seemingly unrelated information to good effect—and that's what I had failed to do. Like Robert Heinlein—like all of us—I had viewed the world through a filter composed of my ingrained assumptions, and one of those assumptions, based on all my past experience, was that pixel processing proceeds left to right. Eventually, I might have come up with Chris's approach; but I would only have come up with it when and if I relaxed and stepped back a little, and allowed myself—almost dared myself—to think of it. When you're optimizing, be sure to leave quiet, nondirected time in which to conjure up those less obvious solutions, and periodically try to figure out what assumptions you're making—and then question them!*
------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
![](images/58-03.jpg)\
**Figure 58.3**  *Texture mapping a single vertical column.*
![**Figure 58.3**  *Texture mapping a single vertical column.*](images/58-03.jpg)
There are a few complications with Chris's approach, not least that
X-Sharp's polygon-filling convention (top and left edges included,
@ -91,9 +90,8 @@ current coordinates with four separate 16-bit operations, and carries
from fractional to integer parts are detected via conditional jumps, as
shown in Figure 58.4. There's quite a lot we can do to improve this.
![](images/58-04.jpg)\
**Figure 58.4**  *Original method for advancing the source texture
pointer.*
![**Figure 58.4**  *Original method for advancing the source texture
pointer.*](images/58-04.jpg)
First, we can sum the X and Y integer advance amounts outside the loop,
then add them both to the source pointer with a single instruction.
@ -123,13 +121,11 @@ X and Y, and the following instruction **ADC SI,BP** finishes advancing
the source pointer in X. That's a mere 3 cycles, and all that remains is
to finish advancing the source pointer in Y.
![](images/58-05.jpg)\
**Figure 58.5**  *Efficient method for advancing source texture
pointer.*
![**Figure 58.5**  *Efficient method for advancing source texture
pointer.*](images/58-05.jpg)
![](images/58-06.jpg)\
**Figure 58.6**  *Storing both X and Y fractional coordinates in one
register.*
![**Figure 58.6**  *Storing both X and Y fractional coordinates in one
register.*](images/58-06.jpg)
Actually, we also advanced the source pointer by the Y integer amount
back when we added BP to SI; all that's left is to detect whether our