home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
POINT Software Programming
/
PPROG1.ISO
/
c
/
wgtspr35
/
sprite35.doc
< prev
next >
Wrap
Text File
|
1993-01-28
|
22KB
|
548 lines
WordUp Graphics Toolkit Sprite Creator
Version 3.5
Copyright 1993 WordUp Software Productions
*************Shareware Version************
Written by Chris Egerter
Requirements: IBM Compatible computer
VGA display
Microsoft Compatible Mouse (at least two buttons)
The Shareware Concept
~~~~~~~~~~~~~~~~~~~~~
WGT Sprite Creator has been released for distribution as
shareware. You have as long as you want to examine
and use the WGT Sprite Creator. If you like the program and
want to be able to use your sprites in a program, (commercial, shareware,
or public domain) WGT Sprite Creator costs $20 for registration.
Please see the file called order.frm for more information.
WordUp Software Productions
~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you have any questions, comments, or suggestions,
WordUp Software Productions can be contacted through
BBS: Barry Egerter (EMAIL)
Softnet BBS (NANET)
(519)-457-0065
OR WRITE
Barry Egerter
94 Andover Drive
London, Ontario
Canada, N6J 3X2
Table of Contents:
To go to the topic desired, use the search command of your favourite
word processor and search for the Page codes.
Topic Page Code
~~~~~ ~~~~~~~~~
Introduction.......................................P1
Installing the WGT Sprite Creator..................P2
Running the WGT Sprite Creator.....................P3
THE EDIT WINDOW....................................P4
THE COLOUR SELECTOR................................P5
SIZE WINDOW........................................P6
SCROLL BUTTONS.....................................P7
WIDTH AND HEIGHT INDICATORS........................P8
CONTROL PANEL......................................P9
SPRITE NUMBER INDICATOR............................P10
STORAGE SECTION....................................P11
TOOLS IN THE CONTROL PANEL.........................P12
CHANGING THE COLOURS...............................P13
ANIMATING YOUR SPRITES.............................P14
THE FILE SELECTOR..................................P15
ADDITIONAL COMMAND KEYS............................P16
Using PCX, CELs, and GIFs..........................P17
The Future.........................................P18
P1 WordUp Graphics Toolkit Sprite Creator
A sprite editor built for gaming and graphic programmers.
This sprite creator is part of the WordUp Graphics Toolkit 3.5 for Turbo
C++. It is meant specifically for this package and therefore
saves and loads files which are currently only supported by WGT. If
you wish to purchase the WordUp Graphics Toolkit, please see the file
called order.frm included. To demonstrate what WGT can do, the graphic
procedures used in this sprite creator were completely from the
Turbo C++ version of WGT. No BGI procedures were used!
The WGT Sprite Creator is designed to give the programmer many
tools for designing small pieces of graphics. These pieces can
be saved in a common file to be loaded and displayed in your
own programs.
Version 2.0 of the WordUp Graphics Toolkit has special procedures
for displaying the sprites. You can have up to 40 sprites on the
screen at once, each moving and animating independantly. One line
commands control all the movement and animation for the sprites,
so once you set up the movement and animation, you don't need to
worry about where they are. They move around on their own!
WGT controls everything for you, so you can concentrate on other
matters.
Version 3.0+ has even better uses for sprites, such as objects on
a world which can scroll in ANY direction, create custom fonts,
as well as all of the old uses.
P2 Installing the WGT Sprite Creator
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you received this in a zipped file:
To execute the WGT Sprite Creator V. 3.5, first make a directory,
unzip everything into that directory.
If you received this on registered disk:
Copy all of the files from the appropriate directory to your hard disk.
P3
Now go to the correct directory and type SPRITE35. The main screen
should appear and wait for your actions.
If something goes wrong, you must make sure you have
a VGA monitor and card, enough memory (remove some TSR's if
necessary) and a Microsoft compatible mouse with at least two buttons.
Command line parameters:
On fast computers, the mouse may freeze or lock the computer, because
it is polled too fast. To slow down the mouse, enter a parameter of
about 10 to 20 when you run sprite. Larger numbers slow it down more.
The second parameter is a switch, and can be either 0 or 1. If you
set it to 1, the last 3 colors in the palette will not be modified
when you load in PCX or CEL files. This will cause the normally grey
menus to be shown in different colors, but your picture will look right.
The third parameter is a switch for the second screen buffer which is used
to load in other pics, resize blocks, etc. A 1 will turn off the buffer, in
case you are running low on memory.
Example:
sprite 14 1 1
will have a delay of 14 for the mouse, and will turn off fixed menu colors.
The second screen buffer will be turned off, which saves 64k of memory.
The Sprite Creator demands a LOT of memory because it can hold
up to 1000 sprites at once, plus a full screen buffer.
Please make sure you have enough memory before you try using the
program. WordUp Software Productions is not responsible for any
loss of data, or damage caused by this product. If you do however
find a problem with this program, please contact us so we can find
and correct the bug.
After running the program, a registration notice will appear.
It shows which version of the sprite creator it is, and who it
is registered to. Click the mouse button to continue.
The screen is divided into several sections, which will be covered
in detail below. The main areas are the edit window, colour selector,
control panel, storage, and size window.
P4
THE EDIT WINDOW
~~~~~~~~~~~~~~~
The edit window is in the top left corner. It shows an area
of the current sprite, in which all editting is performed. It has
variable magnification depending on what you set the size to be in
the size window. When you load the WGT Sprite Creator, the pencil
tool will be selected as a default. Try clicking in the edit window.
It will set the pixel you click on to the colour selected. Notice
if you press the right hand button, a different colour is used.
This is good for quick editting, in case you make a mistake. See
the 'colour selector' below for more details.
P5
THE COLOUR SELECTOR
~~~~~~~~~~~~~~~~~~~
User definable colours range from 0 to 252. Colour 253-255
are used for the sprite creator's grey buttons. If you click on one
of the colours, a box next to the mouse is filled with that colour and
the number of that colour is displayed in the box as well. This
is your drawing colour. You can have different drawing colours for
left and right mouse buttons. Simply click on the right button to
change the right mouse colour. If you click on the picture of the
mouse between the drawing colour boxes, the colours will exchange
with each other. This is useful for mistakes using the change tool.
Below the mouse is a box called 'Edit'. Clicking on the box
will bring up a submenu for changing the RGB values of the colours.
Beside the colour selector is a place where you can keep commonly used
colours handy. Click on the right button and then select a new colour,
for each color box. Clicking on the left button will then use that colour
for drawing. This allows you to store certain colours for quick use.
P6
SIZE WINDOW
~~~~~~~~~~~
The maximum size for a sprite is 64x64 pixels. The minimum
size is 2x2. A 64x64 buffer is used even if the sprite is smaller.
This way you can keep a whole sprite in memory, while zooming in
closely for fine editting, and then zoom back out to the full size.
The zoomed area shown in the edit window is defined by a box in the
size window (top right corner). Clicking (and dragging) the mouse in
the window will change the size of the box. Notice it only changes the
bottom right corner. Below the size window is two buttons controlling the
corner movement. By clicking on the left button, you can move the
other corner of the box. Also note how the edit window is zoomed in
and out when you change the size.
P7
SCROLL BUTTONS
~~~~~~~~~~~~~~
Beside the size window are four buttons for scrolling the
sprite in a direction. Simply click on the button and the sprite will
move in that direction.
P8
WIDTH AND HEIGHT INDICATORS
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Below the size window are two lines showing the width and
height of the current sprite. These are updated when you change
the size of the sprite.
P9
CONTROL PANEL
~~~~~~~~~~~~~
This is located in the top middle part of the screen. It
contains most of the tools you will need to control the WGT sprite
creator. Each tool in the control panel will be described in detail
later.
P10
SPRITE NUMBER INDICATOR
~~~~~~~~~~~~~~~~~~~~~~~
Shows the sprite number the storage is pointing to.
This is updated when you move through the storage.
P11
STORAGE SECTION
~~~~~~~~~~~~~~~
The storage section is basically a group of sprites, which
can be moved around in the storage, copied from one to another and
of course saved and loaded back in. Instead of having many files
containing separate sprites and loading them in one at a time, you
can put all the graphics in one file, and load them into your
programs with one command. The palette is saved as well. This is
much more conveinent than having lots of small graphic files.
You will see three boxes in the lower right corner of the screen.
The middle box shows the sprite you are working with. The boxes on
either side show what is next in the storage area. The sprite
number indicator shows the number of this sprite. The storage
can hold up to a maximum of 1000 sprites.
Above the boxes are four buttons. Each has an arrow pointing
in a direction. The buttons pointing left and right move the current
sprite back and forth through the storage area. As you do this,
the graphic in the edit and size window does not change. To get a
sprite from the storage into the edit window, push the button with
the up arrow. To put the sprite shown in the EDIT WINDOW (only
what is shown in the edit window will be saved. Move the box in the
size window to change what is saved) push the button with the down
arrow. You can copy one sprite to another by getting it from the
storage, moving to another sprite number in the storage, and finally
putting the sprite into that number.
Sprites do not have to be in any order, and you may leave spaces
between sprites. For example you may have a sprite in number one, and
then have one in number 5. This is perfectly acceptable.
The left and right arrows can be clicked on with the right mouse button.
This will quickly move through the storage area, 1 sprite at a time.
The slider between the arrows can be changed as well. Click and hold when
you are on the slider, and move it to a new location. The slider moves
through the storage in multiple of 10.
P12
TOOLS IN THE CONTROL PANEL
~~~~~~~~~~~~~~~~~~~~~~~~~~
PENCIL: Puts a pixel where you click in the edit window.
LINE: Draws a line from where you click to where the mouse is after
you drag it.
RECTANGLE: Draws a rectangle from where you click to where the mouse is
after you drag it.
BAR: Draws a filled rectangle from where you click to where the
mouse is after you drag it.
CIRCLE: Draws a circle from where you click to where the mouse is
after you drag it, using the first point as the center.
FCIRCLE: Draws a filled circle from where you click to where the mouse
is after you drag it, using the first point as the center.
SPRAY: Simulates a spray can where you click in the edit window.
FILL: Fills an enclosed area with a colour.
(Does not work perfectly yet!)
* All of the above use the left and right mouse buttons to draw with
different colours *
GET: Works like rectangle. Gets a portion of the sprite so
you can paste it back on in a different location. Has
no effect on the buffer.
PUT: Puts the last portion back on using an XRAY (or see-through)
technique. Hold down the mouse button and move the image
to where you want it, then release the button to drop it on.
*IMPORTANT* You cannot get a portion of a sprite and then
zoom in closer. You must either be at the same zoom level
or less than when you grabbed the portion. If you try to
put at a higher zoom, you will hear a beep.
CHANGE: Changes any pixels in the edit window, from the right mouse
button colour to the left mouse button colour. Works the
same as rectangle.
GET COLOUR:By clicking somewhere in the edit window, you can get the
colour of the pixel you clicked on. This works for either
mouse button.
ROTATE: Rotates entire 64x64 buffer at once, counterclockwise.
HORZ FLIP: Flips the entire 64x64 buffer horizontally.
VERT FLIP: Flips the entire 64x64 buffer vertically.
TRIM: Shrinks the sprite by changing the bottom right corner.
If there is extra space (black) in the sprite, it will
shrink it down to the edges of the drawing. By pressing
the right button, you can trim all of the sprites in the
file. This is useful before saving to save some disk space.
*Only changes the bottom right corner, so it will not interfere
any ofsets for animation.*
ANIMATE: Brings up a submenu to see how your sprites look in animation.
See below...
TRASH: Deletes all the sprites in the storage. Double checks beforehand
CLS: Clears the sprite buffer completely.
DEL: Deletes a sprite from the storage buffer. All sprites
after the one deleted will be moved to fill the empty space.
INS: Inserts an empty space into the storage buffer. Sprites
after the one inserted are moved. If there is a sprite
in space number 1000 when you insert, no space will be
inserted.
LOAD: Brings up a file selector and loads in a sprite file.
SAVE: Brings up a file selector and saves the sprite file.
To load sprites into your own Turbo Pascal or Turbo
C programs, get the WGT Library, from either your
local BBS, or write to us.
QUIT: Ends the program.
UNDO: Recalls what was last placed in the undo buffer. Use this
to correct any mistakes you made. NOTE: The sprite buffer
is copied into the undo buffer when you click on a tool.
Remembering this will help you control what is stored in the
undo buffer.
FILES: The sprite creator has a full screen buffer which can be
used for loading in pictures, saving pictures, grabbing
sprites from it, putting sprites onto it, and resizing
sprites on top of it. This tool will show a submenu of
choices. Choose one of them to load or save the screen
buffer.
BLK and PAK are picture types specific to the WGT library.
PCX is a widely supported format, which has many versions.
The PCX and GIF pictures can be any size. Interlaced GIF
pics are NOT supported.
After load a PCX or GIf, you can remap the picture onto the
current palette, or use the pictures correct palette.
GET SPRITE:Displays the screen buffer, and waits for a mouse click.
Click on the top left of the portion you wish to cut out,
and move to the lower right. Click again to grab it and
place it in the sprite buffer. A right mouse click will
take you one step back.
PUT SPRITE:Displays the screen buffer and pastes the sprite in the
sprite buffer onto the screen when you click the left button.
If you click the right, it will cancel. When you first click
on the tool, the button you press determines how the sprite
will be pasted on. Left means xray mode, and right means
copy mode. Xray mode does not copy any black spaces.
RESIZE: Allows you to shrink or expand the sprite in the sprite
buffer. The top left corner of the sprite always starts
in the top left corner of the screen and the bottom right
is where you click the left button. Again, click the right
to return to the main screen. If you click on this tool
with the right button, the whole screen buffer will be
resized instead of the sprite.
CLB: Clears the screen buffer with the colour associated with
the mouse button you press when you select this tool.
P13
CHANGING THE COLOURS
~~~~~~~~~~~~~~~~~~~~
Once you have clicked on the edit button underneath the
mouse icon, a submenu will appear allowing you to change the
red, green, and blue values for the palette. It will look like this:
---------------------------------------- Red, green, and blue values
| R - ----I---- + 40 | are shown on right, and a
| G - --I------ + 23 | graphical slider (I) shows
| B - --------I + 63 | the amount of each in the
| | middle. Clicking on the
| ----- ------ ------- ------ ------ | - and + will change the values
| |SET| |COPY| |BLEND| |LOAD| |SAVE| | or you can click and drag
| ----- ------ ------- ------ ------ | the sliders to new positions.
| | Next are some control buttons.
| |
| Copy 10 | This line show where copy and
| To 40 | blend operations will take
| | place.
| ------ |
| | OK | | To finishing changing the
| ------ | colours, click here.
----------------------------------------
Choosing set, copy, or blend will activate the colour selector. Press
the left button to choose a colour or the right button to cancel the
operation. Blend and copy require two colour selections.
Load and Save will bring up a file selector for selecting the palette.
(These are compatible with Autodesk Animator's .COL files)
P14
ANIMATING YOUR SPRITES
~~~~~~~~~~~~~~~~~~~~~~
Once you have clicked on the animation button (running person)
a submenu will appear allowing you to change the animation order and
speed.
----------------------------------------
| CLEAR ALL | Clears all values
|--------------------------------------|
| |
| Slot : - 1 + | Click on the + or - to change
| Sprite: - 0 + | the values. You can animate
| Delay : - 0 + | up to 40 sprites at a time.
| | Change the sprite number to
| | include that sprite in the
| | animation. For example,
| | to animate sprites 1 and 2 set:
| | Slot 1 Sprite 1 Delay 3
| | Slot 2 Sprite 2 Delay 3
|--------------------------------------|
| ANIMATE | OK | Click OK to end, or to animate,
|--------------------------------------| click and hold the animate button.
----------------------------------------
Note: The delay speed is not the same as the delay in the animate
command in the WGT library.
P15
THE FILE SELECTOR
~~~~~~~~~~~~~~~~~
Any time you need to save or load a file, a file selector will
appear. At the top is a line which says "Type Filename:". If you
click on that top line, you can type in the filename instead of pointing
and clicking with the mouse. This is necessary when you want to save a
new file which doesn't exist yet. On the right side are some buttons with
arrows. The double arrows move to the top and bottom of the directory
listing. The single arrows move up and down one page.
When you find the file you want, simply click on the name. Notice how
the names are highlighted when you move the mouse over them. This is
so you don't click on the wrong name by accident.
In case you don't want to pick a file, click on the button labelled
CANCEL.
Currently, you cannot change drives from the file selector.
P16
ADDITIONAL COMMAND KEYS
~~~~~~~~~~~~~~~~~~~~~~~
While on the main screen, the following keys can be pressed:
M : shows how much free memory is left
F1: Displays version number and registration and keys
D : Goes to DOS shell. Type exit to return.
C : Copy menu. Click on the start and end buttons
to increase or decrease the range to copy.
The right button changes by 10 at a time.
Select the destination, and click on
the copy button.
T : Text Menu. Load font brings up a file selector,
and loads the font if you select one.
Default font unloads previous fonts and uses the
8x8 default font.
Type text switches to the screen buffer. Click where
you want to type some text, and a flashing cursor
will appear. Type in the text, and hit Esc when
finished.
P17
Using PCX,CELs, and GIFs
~~~~~~~~~~~~~~~~~~~~~~~~
The WGT Sprite Creator allows you to edit pictures using high quality
paint programs and grab sprites from the pictures created. Popular formats
available are PCX,Autodesk Animator's CEL, and Compuserve's GIF.
P18
The Future
~~~~~~~~~~
REMEMBER: The WordUp Sprite Creator is shareware. When you become a
registered user, you will receive the latest version of the sprite
creator, with the first shareware notice removed. You may also
receive some new software from WordUp Software Productions, for free.
So please, register and support the shareware concept.