If you wish to plot a large sprite such as a full screen title page then due to the restrictions of fast sprite plotting routines you may find it necessary to break a large sprite down into many smaller sprites. This chapter outlines how to do this.
To only extract a specific area of a sprite you need this part of the menu structure.
The section to be extracted is shown in the sprite display window as a box which inverts the colours of the sprite along it's edges. The section boundaries can be altered by clicking on the small arrows in the top right and bottom left hand corners of the window or by setting the caret in the coordinate part and typing in a suitable number. Clicking on the central icon ("Grab Whole Sprite") will reset the boundaries to the edges of the sprite. When you have finished altering then click on the OK icon.
If you select a new sprite for an extraction instruction then the section boundaries will be set to the edges of the new sprite.
The pixel coordinates on which the section boundaries can lie depend on the mode of the sprite the data is being extracted from and also the type of mask interlace being used (see chapter 3). If the mode of the sprite is a 16 colour mode, (modes 9 & 12) then there are 2 pixels for every byte of memory and as the extraction has to take out whole bytes then only half the possible pixel boundaries can be used. However, if your mask interlace type is set to units of words/lines of sprite/et cetera (ie greater than a byte by byte setting) then the boundary will be restricted furthur. For example as a word is four bytes, then if you are extracting in whole words, the section width has to be a multiple of four bytes wide. Remember that these coordinate restrictions only apply to the horizontal width of the section and not the vertical.
If the coordinates of an extraction instruction are being restricted and the sprites width is a non-valid value then to grab the whole sprite will actually take more of the sprite than there is. For example, if a mode 15 sprite is 14 pixels wide and the mask setting is "1 sprite word then 1 mask word" then extracting the whole sprite will extract an area that is 16 pixels wide, ie there will be two pixels on the end of each line of sprite that are not defined by the sprite. These extra pixels are always colour 0 and they are always set to be masked out, therefore in a masked plot these pixels will not show up. However, a sprite that is not masked could show extra pixels as colour 0 along the edge.
An example of the Section feature has been included on the disk and the instructions follow.
First load up Extractor, then load the example sprite file into Extractor and open the 'Examples' directory as before. Now select the sprite called "landscape" for the first extraction instruction and then click on "Add to List" to get two extraction instructions, both extraction from the sprite called "landscape". Use the section boundary window to set the first extraction instructions section boundaries to 0,0 : 32,32 and set the second extraction instructions section boundaries to 32,0 : 64,32. Now save this extract list file as 'EGChptr4' and save the extracted data file as 'RawDC4', both in the 'Examples' directory. To see the sprite plotted in two bits from machine code, run the application called '!Chptr4EG'.
The section boundary can also be used to only use part of a sprite instead of having to use all of it.