home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 1: Collection A / 17Bit_Collection_A.iso / files / 72.dms / 72.adf / SpriteED.doc < prev    next >
Text File  |  2008-06-02  |  14KB  |  362 lines

  1.  
  2. THE SPRITE EDITOR 
  3. ------------------
  4.  
  5.    Written by Scott Lamb
  6.    (c) Copyright 1986 Scott Lamb
  7.  
  8.  
  9. LOADING THE PROGRAM
  10.  
  11.    The SPRITE EDITOR program may loaded through the workbench, icon
  12.    system by double clicking the SPRITE icon, or it may be loaded 
  13.    from the CLI by typing SPRITE (if the current directory contains
  14.    the SPRITE program).
  15.  
  16.    SPRITE creates its own 32 color screen, so that when operating, it
  17.    can be pulled down to provide access to a second SPRITE screen or
  18.    the WorkBench.  The program is designed to be run twice, as two 
  19.    separate tasks in the Amiga multitasking system, thereby allowing
  20.    you to edit two sprite pairs at the same time.  While each sprite
  21.    pair (FOREGROUND and BACKGROUND) has its own editing screen, the
  22.    sprites themselves will be visible from both screens.
  23.  
  24.  
  25. THE SPRITE EDITOR
  26.  
  27.    The SPRITE EDITOR lets you edit a double wide sprite image, 32
  28.    bits/pixels wide by 21 scan lines high, allowing a total of 672 
  29.    bits/pixels per image.  Why this size?  Sixteen bits is two narrow 
  30.    for most images, so two sprites are combined for the 32 bit 
  31.    resolution.  Twenty-one scan lines corresponds to the height of the
  32.    Commodore 64 sprite.This makes conversions from the 64 possible.  I
  33.    know its arbitrary, since the Amiga sprite can be the full length
  34.    of the screen but the line had to be drawn somewhere.  If you need
  35.    to create sprites larger than 21 scan lines high, use both programs
  36.    and position one of the sprites above or below the other (see the
  37.    Placement menu).  Then you will have to combine the data from the
  38.    two separate sprites yourself.
  39.  
  40.    Each sprite half (Left and Right) is stored in a regular data 
  41.    structure with two words at the start set to x0000, followed by two
  42.    words for each of the 21 scan lines that store the image color
  43.    values, and two final words set to x0000.  Data for the Left half
  44.    of the sprite precedes the data for the right half of the sprite.
  45.    (see DATA FILES)
  46.  
  47.    When the program first begins (and after the commercial message
  48.    requester), you will be asked which sprite priority you want to
  49.    edit, either FOREGROUND or BACKGROUND.  FOREGROUND edits a double
  50.    wide sprite using hardware sprites #2 & #3, while BACKGROUND edits
  51.    a double wide sprite using hardware sprites #4 & #5.  The FOREGROUND
  52.    sprite has priority over the BACKGROUND sprite, so when both are 
  53.    superimposed on the same screen pixels, the FOREGROUND sprite will
  54.    be visible while the BACKGROUND sprite will not be visible.
  55.  
  56.    The FOREGROUND / BACKGROUND requester only appears if both sprites
  57.    are available. If SPRITE is already running as a task and has 
  58.    allocated a sprite, or if another application that is running has 
  59.    allocated a sprite, then the program will default with the other
  60.    available sprite. If no sprites are available, then you will be so 
  61.    informed. 
  62.  
  63.    Besides allowing two different sprites to move past each other, 
  64.    this allows sprites with 6 colors to be created superimposing the
  65.    FORE sprite colors over the BACK sprite colors, when SPRITE is 
  66.    operating as two tasks on two screens.  SPRITE run as FOREGROUND 
  67.    and SPRITE run as BACKGROUND are each slightly different programs.
  68.    They will SAVE the sprites in different files, each being able to
  69.    store 100 double wide sprites in each of five separate files.
  70.  
  71.  
  72. A SECOND CHANCE
  73.  
  74.    Whenever you choose a potentially hazardous action (Load a file, 
  75.    Save a file, Quit/Exit, Copy Sprite, etc.) a validation requester
  76.    will appear to give you the opportunity to change your mind. This
  77.    will reduce the possibility of losing hours of work by accident.
  78.    Even still, it is a good idea to save your work frequently.
  79.  
  80.  
  81. THE SPRITE EDITOR SCREEN
  82.  
  83.    The sprite editor screen is divided into: 
  84.  
  85.        (1) a 672 square EDITING GRID
  86.        (2) a 100 sprite numeric IMAGE TABLE 
  87.        (3) a 4   square sprite COLOR TABLE 
  88.        (4) a 32  square COLOR CHOICE TABLE 
  89.  
  90.  
  91. MENU
  92.  
  93.    The PROJECT MENU offers three choice categories:
  94.  
  95.    (1) PROJECT
  96.  
  97.       [a] PICK FILE __ Pick the current sprite image data file from
  98.                        the following files to be the active file
  99.    
  100.                           BACKGROUND       FOREGROUND
  101.                      [1]      sprite_1b       sprite_1f
  102.                      [2]      sprite_2b       sprite_2f
  103.                      [3]      sprite_3b       sprite_3f
  104.                      [4]      sprite_4b       sprite_4f
  105.                      [5]      sprite_5b       sprite_5f
  106.                                 [_#b is back priority] 
  107.                                 [_#f if fore priority]
  108.  
  109.       [b] SET DRIVE __ Sets the current device to the following
  110.  
  111.                      [1]      df0:    (Internal floppy disk drive)
  112.                      [2]      df1:    (External floppy disk drive)
  113.                      [3]      ram:    (RAM disk)
  114.                      [4]      dh0:    (Hard disk drive)
  115.  
  116.       [c] LOAD FILE __ Loads the current sprite image data file
  117.                        into the sprite numeric image table. 
  118.  
  119.       [d] SAVE FILE __ Saves the current sprite numeric image 
  120.                        table to the sprite image data file.
  121.  
  122.       [d] QUIT/EXIT __ Quit or Exit the editor.
  123.  
  124.  
  125.    (2) MODE menu
  126.  
  127.       [a] DISPLAY   __ DISPLAY MODE allows you to view the
  128.                        sprites in the sprite numeric image
  129.                        table without displaying the sprite
  130.                        to the editing grid. All Sprite menu
  131.                        options, except for COPY SPRITE are 
  132.                        deactivated
  133.  
  134.       [b] EDITING   __ EDITING MODE allows you to edit the
  135.                        sprite images in the editing grid,
  136.                        choose a drawing color, or change a
  137.                        drawing color. All Sprite menu options,
  138.                        except COPY SPRITE are activated.
  139.  
  140.       [c] ERASE     __ In DISPLAY mode -- erases the sprite 
  141.                        editing grid without erasing the 
  142.                        current sprite.
  143.  
  144.                        In EDITING mode -- erases the sprite
  145.                        editing grid, and the current sprite
  146.                        image marked by the sprite table.
  147.  
  148.  
  149.    (3) SPRITE menu
  150.  
  151.       [a] FLIP VERT. _ will vertically invert the image in the
  152.                        editing grid as well as the current sprite.
  153.  
  154.       [b] FLIP HORZ. _ will horizontally invert the image in the
  155.                        editing grid as well as the current sprite.
  156.  
  157.       [c] SHIFT RIGHT_ will shift the image one square/pixel 
  158.                        bit to the right in both the editing
  159.                        grid and the current sprite.
  160.  
  161.       [d] SHIFT LEFT _ will shift the image one square/pixel
  162.                        bit to the left in both the editing 
  163.                        grid and the current sprite.
  164.  
  165.       [e] SHIFT UP   _ will shift the image up one square/scan 
  166.                        line in both the editing grid and the
  167.                        current sprite.
  168.  
  169.       [f] SHIFT DOWN _ will shift the image down one square/
  170.                        scan line in both the editing grid and
  171.                        the current sprite.
  172.  
  173.       [a] COPY SPRITE_ will copy the image within the editing
  174.                        grid to the current sprite.
  175.  
  176.  
  177.    (3) PLACEMENT menu
  178.  
  179.       [a] UP        __ These three menu options allow you to
  180.       [b] CENTER       change the vertical position of the
  181.       [c] DOWN         sprite.  This is useful when using 
  182.                        both sprite and sprite-2 together. 
  183.  
  184.  
  185. USING SPRITE
  186.  
  187.     Choose one of the sprite_n# file names for the current file, and
  188.     either begin editing a set of sprites, or load in the sprites
  189.     already saved in the file.
  190.  
  191.  
  192. MOUSE CONTROL
  193.  
  194.     The sprite editors are all mouse controlled.  Pointing the mouse
  195.     cursor at a square within one of the grids on the screen, and
  196.     clicking the lefthand button will perform the necessary function.
  197.  
  198.  
  199. SPRITE TABLE
  200.  
  201.     The sprite table allows you to point to the number of a particular
  202.     sprite for either editing or display.   When a sprite is chosen
  203.     with the mouse, the data stored within that sprite is transferred to
  204.     the an active sprite structure and displayed. It is also transferred
  205.     to the editing grid if you are in editing mode.  A box is drawn
  206.     around the chosen sprite to mark it. Sprites numbers are as follows
  207.  
  208.                       0  1  2  3  4  5  6  7  8  9
  209.                     |--|--|--|--|--|--|--|--|--|--|
  210.                000__|00|01|02|03|04|05|06|07|08|09|
  211.                010__|10|11|12|13|14|15|16|17|18|19|
  212.                020__|20|21|22|23|24|25|26|27|28|29|
  213.                030__|30|31|32|33|34|35|36|37|38|39|
  214.                040__|40|41|42|43|44|45|46|47|48|49|
  215.                050__|50|51|52|53|54|55|56|57|58|59|
  216.                060__|60|61|62|63|64|65|66|67|68|69|
  217.                070__|70|71|72|73|74|75|76|77|78|79|
  218.                080__|80|81|82|83|84|85|86|87|88|89|
  219.                090__|90|91|92|93|94|95|96|97|98|99|
  220.  
  221.  
  222. EDITING A SPRITE
  223.  
  224.     The four boxes beneath the editing grid are the drawing colors that
  225.     are available to you. The current drawing color is boxed.  The first
  226.     box/color is transparent when used in a sprite, so the color is 
  227.     meaningless to the sprite.
  228.  
  229.     To change the color of the boxed drawing pen, simply point to one of
  230.     the 32 colors in the palette grid. That color will be transferred to
  231.     the drawing pen.  You will note that four of the palette colors are
  232.     within a purple rectangle.  These are the actual color registers 
  233.     assigned to the sprite pair.  To restore the original color to a
  234.     sprite pen, point to the corresponding square within the purple
  235.     rectangle.
  236.  
  237. DRAWING A SPRITE IMAGE
  238.  
  239.     To draw a sprite image first choose EDITING from the Menu. Then
  240.     choose a drawing pen (1 of 4).  Finally, just point to a square
  241.     within the editing grid and hold down the left mouse button.  As
  242.     long as the left mouse button is depressed and the mouse is moved
  243.     slowly, the squares will be flooded with your chosen color, the
  244.     corresponding bit in the sprite structure will be illuminated, and
  245.     the whole sprite will be copied into a storage array that can be
  246.     saved under any of the five file names (FOREGROUND or BACKGROUND)
  247.     when you are finished.
  248.  
  249.  
  250. COPYING A SPRITE
  251.  
  252.     To copy a sprite from one position in the sprite table to another
  253.     position in the sprite table, it is necessary to
  254.  
  255.                  (1) Enter EDITING mode
  256.                  (2) Choose a sprite image from the table,
  257.                      so that the editing grid portrays the
  258.                      sprite image
  259.                  (3) Enter DISPLAY mode 
  260.                  (4) Choose the new sprite into which the 
  261.                      image is to be copied
  262.                  (5) Select COPY sprite from the menu.
  263.  
  264.  
  265. SPRITE DATA STRUCTURE
  266.  
  267.     Sprites are stored in the standard data structure. Each of the
  268.     100 sprites in a file require 92 bytes/46 words for a double
  269.     sprite image.  The first 23 words describe the left half of the 
  270.     double sprite (hardware sprite #1), while the second 23 words 
  271.     describe the right half of the double sprite image (hardware
  272.     sprite #2). The structure of the sprite image is as follows.
  273.  
  274.         Left Half of sprite
  275.  
  276.         1 pair of words (x0000,x0000) position control bytes
  277.        21 pair of words (xnnnn,xnnnn) image data 21 scan lines
  278.         1 pair of words (x0000,x0000) next sprite field
  279.  
  280.  
  281.         Right Half of sprite
  282.  
  283.         1 pair of words (x0000,x0000) position control bytes  
  284.        21 pair of words (xnnnn,xnnnn) image data 21 scan lines
  285.         1 pair of words (x0000,x0000) next sprite field
  286.  
  287.     Position control bytes and next sprite field bytes are set to zero
  288.     in the file structure.
  289.  
  290.  
  291. SPRITE EDITOR - SPRITE COLOR DESCRIPTOR WORDS
  292.  
  293.    The first word of the data pair is called high order word and the
  294.    second word in the data pair is called the low order word.  Binary
  295.    number pairs created by 1 bit in the high order word with the
  296.    corresponding bit in the low order word indicate the color register
  297.    number of the bit within the sprite image.  The following table
  298.    shows the relationship between the binary number pairs, and the
  299.    color register numbers.
  300.  
  301.       Binary      Hardware sprite pair number     sprite
  302.       Number     0 & 1   2 & 3   4 & 5   6 & 7    color
  303.         00        16      20      24      28    transparent
  304.         01        17      21      25      29    pen color 1
  305.         10        18      22      26      30    pen color 2
  306.         11        19      23      27      31    pen color 3
  307.  
  308.       Sprites 0 & 1 are used for the mouse cursor.
  309.       Sprites 2 & 3 are used as the FOREGROUND sprite
  310.       Sprites 4 & 5 are used as the BACKGROUND sprite.
  311.  
  312.    Sprite priority (which sprite is seen in front of the other 
  313.    sprites) is that the lower numbered hardware sprites always have
  314.    a higher priority than the higher numbered hardware sprites.
  315.  
  316.  
  317. USING SPRITE AS TWO SEPARATE TASKS SIMULTANEOUSLY
  318.  
  319.    If you have at least 512K of RAM in your AMIGA, you can run SPRITE
  320.    twice, positioning Sprite Editor screen with FOREGROUND priority 
  321.    in front of the Sprite Editor screen with BACKGROUND priority. Work
  322.    with both editors at the same time. Since each program is on its own
  323.    screen it can be scrolled to the bottom of the monitor and out of
  324.    the way.  The six color sprite that you thus create will be visible
  325.    to both programs at the same time.
  326.  
  327.  
  328. NOTE
  329.  
  330.    SPRITE will use your standard mouse pointer. As such, it can be 
  331.    edited in Preferences.
  332.  
  333.  
  334. REFERENCES
  335.  
  336.    For a complete description on Amiga hardware sprites, see the Amiga
  337.    ROM Kernal Manual Volume 1, and the Amiga Hardware Manual.
  338.  
  339.  
  340. IF YOU NEED HELP
  341.  
  342.    If you need help with this program, or if you have any questions
  343.    (or if you want to send me $10 for the program,if you think it 
  344.    worth the price), contact me at
  345.  
  346.                           Scott Lamb
  347.                           205C Heights Lane
  348.                           Fort Worth, TX 76112
  349.  
  350.                           (817) 496-9220
  351.  
  352.    or leave a message through the FIDO net at
  353.  
  354.                           TRACK ][ FIDO BBS
  355.                           (NET 130, NODE 6)
  356.  
  357.  
  358.  
  359.  
  360.            __________________ENJOY!!!!!!____________________
  361.  
  362.