home *** CD-ROM | disk | FTP | other *** search
-
- THE SPRITE EDITOR
- ------------------
-
- Written by Scott Lamb
- (c) Copyright 1986 Scott Lamb
-
-
- LOADING THE PROGRAM
-
- The SPRITE EDITOR program may loaded through the workbench, icon
- system by double clicking the SPRITE icon, or it may be loaded
- from the CLI by typing SPRITE (if the current directory contains
- the SPRITE program).
-
- SPRITE creates its own 32 color screen, so that when operating, it
- can be pulled down to provide access to a second SPRITE screen or
- the WorkBench. The program is designed to be run twice, as two
- separate tasks in the Amiga multitasking system, thereby allowing
- you to edit two sprite pairs at the same time. While each sprite
- pair (FOREGROUND and BACKGROUND) has its own editing screen, the
- sprites themselves will be visible from both screens.
-
-
- THE SPRITE EDITOR
-
- The SPRITE EDITOR lets you edit a double wide sprite image, 32
- bits/pixels wide by 21 scan lines high, allowing a total of 672
- bits/pixels per image. Why this size? Sixteen bits is two narrow
- for most images, so two sprites are combined for the 32 bit
- resolution. Twenty-one scan lines corresponds to the height of the
- Commodore 64 sprite.This makes conversions from the 64 possible. I
- know its arbitrary, since the Amiga sprite can be the full length
- of the screen but the line had to be drawn somewhere. If you need
- to create sprites larger than 21 scan lines high, use both programs
- and position one of the sprites above or below the other (see the
- Placement menu). Then you will have to combine the data from the
- two separate sprites yourself.
-
- Each sprite half (Left and Right) is stored in a regular data
- structure with two words at the start set to x0000, followed by two
- words for each of the 21 scan lines that store the image color
- values, and two final words set to x0000. Data for the Left half
- of the sprite precedes the data for the right half of the sprite.
- (see DATA FILES)
-
- When the program first begins (and after the commercial message
- requester), you will be asked which sprite priority you want to
- edit, either FOREGROUND or BACKGROUND. FOREGROUND edits a double
- wide sprite using hardware sprites #2 & #3, while BACKGROUND edits
- a double wide sprite using hardware sprites #4 & #5. The FOREGROUND
- sprite has priority over the BACKGROUND sprite, so when both are
- superimposed on the same screen pixels, the FOREGROUND sprite will
- be visible while the BACKGROUND sprite will not be visible.
-
- The FOREGROUND / BACKGROUND requester only appears if both sprites
- are available. If SPRITE is already running as a task and has
- allocated a sprite, or if another application that is running has
- allocated a sprite, then the program will default with the other
- available sprite. If no sprites are available, then you will be so
- informed.
-
- Besides allowing two different sprites to move past each other,
- this allows sprites with 6 colors to be created superimposing the
- FORE sprite colors over the BACK sprite colors, when SPRITE is
- operating as two tasks on two screens. SPRITE run as FOREGROUND
- and SPRITE run as BACKGROUND are each slightly different programs.
- They will SAVE the sprites in different files, each being able to
- store 100 double wide sprites in each of five separate files.
-
-
- A SECOND CHANCE
-
- Whenever you choose a potentially hazardous action (Load a file,
- Save a file, Quit/Exit, Copy Sprite, etc.) a validation requester
- will appear to give you the opportunity to change your mind. This
- will reduce the possibility of losing hours of work by accident.
- Even still, it is a good idea to save your work frequently.
-
-
- THE SPRITE EDITOR SCREEN
-
- The sprite editor screen is divided into:
-
- (1) a 672 square EDITING GRID
- (2) a 100 sprite numeric IMAGE TABLE
- (3) a 4 square sprite COLOR TABLE
- (4) a 32 square COLOR CHOICE TABLE
-
-
- MENU
-
- The PROJECT MENU offers three choice categories:
-
- (1) PROJECT
-
- [a] PICK FILE __ Pick the current sprite image data file from
- the following files to be the active file
-
- BACKGROUND FOREGROUND
- [1] sprite_1b sprite_1f
- [2] sprite_2b sprite_2f
- [3] sprite_3b sprite_3f
- [4] sprite_4b sprite_4f
- [5] sprite_5b sprite_5f
- [_#b is back priority]
- [_#f if fore priority]
-
- [b] SET DRIVE __ Sets the current device to the following
-
- [1] df0: (Internal floppy disk drive)
- [2] df1: (External floppy disk drive)
- [3] ram: (RAM disk)
- [4] dh0: (Hard disk drive)
-
- [c] LOAD FILE __ Loads the current sprite image data file
- into the sprite numeric image table.
-
- [d] SAVE FILE __ Saves the current sprite numeric image
- table to the sprite image data file.
-
- [d] QUIT/EXIT __ Quit or Exit the editor.
-
-
- (2) MODE menu
-
- [a] DISPLAY __ DISPLAY MODE allows you to view the
- sprites in the sprite numeric image
- table without displaying the sprite
- to the editing grid. All Sprite menu
- options, except for COPY SPRITE are
- deactivated
-
- [b] EDITING __ EDITING MODE allows you to edit the
- sprite images in the editing grid,
- choose a drawing color, or change a
- drawing color. All Sprite menu options,
- except COPY SPRITE are activated.
-
- [c] ERASE __ In DISPLAY mode -- erases the sprite
- editing grid without erasing the
- current sprite.
-
- In EDITING mode -- erases the sprite
- editing grid, and the current sprite
- image marked by the sprite table.
-
-
- (3) SPRITE menu
-
- [a] FLIP VERT. _ will vertically invert the image in the
- editing grid as well as the current sprite.
-
- [b] FLIP HORZ. _ will horizontally invert the image in the
- editing grid as well as the current sprite.
-
- [c] SHIFT RIGHT_ will shift the image one square/pixel
- bit to the right in both the editing
- grid and the current sprite.
-
- [d] SHIFT LEFT _ will shift the image one square/pixel
- bit to the left in both the editing
- grid and the current sprite.
-
- [e] SHIFT UP _ will shift the image up one square/scan
- line in both the editing grid and the
- current sprite.
-
- [f] SHIFT DOWN _ will shift the image down one square/
- scan line in both the editing grid and
- the current sprite.
-
- [a] COPY SPRITE_ will copy the image within the editing
- grid to the current sprite.
-
-
- (3) PLACEMENT menu
-
- [a] UP __ These three menu options allow you to
- [b] CENTER change the vertical position of the
- [c] DOWN sprite. This is useful when using
- both sprite and sprite-2 together.
-
-
- USING SPRITE
-
- Choose one of the sprite_n# file names for the current file, and
- either begin editing a set of sprites, or load in the sprites
- already saved in the file.
-
-
- MOUSE CONTROL
-
- The sprite editors are all mouse controlled. Pointing the mouse
- cursor at a square within one of the grids on the screen, and
- clicking the lefthand button will perform the necessary function.
-
-
- SPRITE TABLE
-
- The sprite table allows you to point to the number of a particular
- sprite for either editing or display. When a sprite is chosen
- with the mouse, the data stored within that sprite is transferred to
- the an active sprite structure and displayed. It is also transferred
- to the editing grid if you are in editing mode. A box is drawn
- around the chosen sprite to mark it. Sprites numbers are as follows
-
- 0 1 2 3 4 5 6 7 8 9
- |--|--|--|--|--|--|--|--|--|--|
- 000__|00|01|02|03|04|05|06|07|08|09|
- 010__|10|11|12|13|14|15|16|17|18|19|
- 020__|20|21|22|23|24|25|26|27|28|29|
- 030__|30|31|32|33|34|35|36|37|38|39|
- 040__|40|41|42|43|44|45|46|47|48|49|
- 050__|50|51|52|53|54|55|56|57|58|59|
- 060__|60|61|62|63|64|65|66|67|68|69|
- 070__|70|71|72|73|74|75|76|77|78|79|
- 080__|80|81|82|83|84|85|86|87|88|89|
- 090__|90|91|92|93|94|95|96|97|98|99|
-
-
- EDITING A SPRITE
-
- The four boxes beneath the editing grid are the drawing colors that
- are available to you. The current drawing color is boxed. The first
- box/color is transparent when used in a sprite, so the color is
- meaningless to the sprite.
-
- To change the color of the boxed drawing pen, simply point to one of
- the 32 colors in the palette grid. That color will be transferred to
- the drawing pen. You will note that four of the palette colors are
- within a purple rectangle. These are the actual color registers
- assigned to the sprite pair. To restore the original color to a
- sprite pen, point to the corresponding square within the purple
- rectangle.
-
- DRAWING A SPRITE IMAGE
-
- To draw a sprite image first choose EDITING from the Menu. Then
- choose a drawing pen (1 of 4). Finally, just point to a square
- within the editing grid and hold down the left mouse button. As
- long as the left mouse button is depressed and the mouse is moved
- slowly, the squares will be flooded with your chosen color, the
- corresponding bit in the sprite structure will be illuminated, and
- the whole sprite will be copied into a storage array that can be
- saved under any of the five file names (FOREGROUND or BACKGROUND)
- when you are finished.
-
-
- COPYING A SPRITE
-
- To copy a sprite from one position in the sprite table to another
- position in the sprite table, it is necessary to
-
- (1) Enter EDITING mode
- (2) Choose a sprite image from the table,
- so that the editing grid portrays the
- sprite image
- (3) Enter DISPLAY mode
- (4) Choose the new sprite into which the
- image is to be copied
- (5) Select COPY sprite from the menu.
-
-
- SPRITE DATA STRUCTURE
-
- Sprites are stored in the standard data structure. Each of the
- 100 sprites in a file require 92 bytes/46 words for a double
- sprite image. The first 23 words describe the left half of the
- double sprite (hardware sprite #1), while the second 23 words
- describe the right half of the double sprite image (hardware
- sprite #2). The structure of the sprite image is as follows.
-
- Left Half of sprite
-
- 1 pair of words (x0000,x0000) position control bytes
- 21 pair of words (xnnnn,xnnnn) image data 21 scan lines
- 1 pair of words (x0000,x0000) next sprite field
-
-
- Right Half of sprite
-
- 1 pair of words (x0000,x0000) position control bytes
- 21 pair of words (xnnnn,xnnnn) image data 21 scan lines
- 1 pair of words (x0000,x0000) next sprite field
-
- Position control bytes and next sprite field bytes are set to zero
- in the file structure.
-
-
- SPRITE EDITOR - SPRITE COLOR DESCRIPTOR WORDS
-
- The first word of the data pair is called high order word and the
- second word in the data pair is called the low order word. Binary
- number pairs created by 1 bit in the high order word with the
- corresponding bit in the low order word indicate the color register
- number of the bit within the sprite image. The following table
- shows the relationship between the binary number pairs, and the
- color register numbers.
-
- Binary Hardware sprite pair number sprite
- Number 0 & 1 2 & 3 4 & 5 6 & 7 color
- 00 16 20 24 28 transparent
- 01 17 21 25 29 pen color 1
- 10 18 22 26 30 pen color 2
- 11 19 23 27 31 pen color 3
-
- Sprites 0 & 1 are used for the mouse cursor.
- Sprites 2 & 3 are used as the FOREGROUND sprite
- Sprites 4 & 5 are used as the BACKGROUND sprite.
-
- Sprite priority (which sprite is seen in front of the other
- sprites) is that the lower numbered hardware sprites always have
- a higher priority than the higher numbered hardware sprites.
-
-
- USING SPRITE AS TWO SEPARATE TASKS SIMULTANEOUSLY
-
- If you have at least 512K of RAM in your AMIGA, you can run SPRITE
- twice, positioning Sprite Editor screen with FOREGROUND priority
- in front of the Sprite Editor screen with BACKGROUND priority. Work
- with both editors at the same time. Since each program is on its own
- screen it can be scrolled to the bottom of the monitor and out of
- the way. The six color sprite that you thus create will be visible
- to both programs at the same time.
-
-
- NOTE
-
- SPRITE will use your standard mouse pointer. As such, it can be
- edited in Preferences.
-
-
- REFERENCES
-
- For a complete description on Amiga hardware sprites, see the Amiga
- ROM Kernal Manual Volume 1, and the Amiga Hardware Manual.
-
-
- IF YOU NEED HELP
-
- If you need help with this program, or if you have any questions
- (or if you want to send me $10 for the program,if you think it
- worth the price), contact me at
-
- Scott Lamb
- 205C Heights Lane
- Fort Worth, TX 76112
-
- (817) 496-9220
-
- or leave a message through the FIDO net at
-
- TRACK ][ FIDO BBS
- (NET 130, NODE 6)
-
-
-
-
- __________________ENJOY!!!!!!____________________
-
-