%format latex

\documentstyle[din_a4]{article}
\emergencystretch=100pt
%\twocolumn

\title{Spooky Sprites}
\author{Johan Karlsson\\Internet: d92jk@efd.lth.se}
\date{Version 2\\February 26, 1995}

\begin{document}
\maketitle
\tableofcontents
%\begin{abstract}
%\end{abstract}

\section{Short Introduction}

With this program you can create true colour sprites for
the Atari Falcon. The stuff you require are a F030 with at
least 4 megs of memory and a RGB monitor or TV. It's now 
compatible with both
screen enhancers and virtual memory. If
you want this program to be VGA compatible you could supply me 
with
the register values for a 384*240 large screen and I will put 
them in the
program.

\section{How to use this program}

\subsection{Choosing colours}

To pick a colour press the right button on the colour you want.
You can do this anywhere but on the buttons. To create new 
colours double
click with the left button on the palette you don't want anymore 
and
you will come to the palette creation screen. The program uses 
all
65000 colours.

\subsection{Put me down}

When you have made your sprite you can put it down into the 
sprite
storage area by pressing the put button (arrow down on the top 
row). To
retrieve a stored sprite use the numeric keyboard keys 4 and 6 to 
scroll until
the correct sprite is in the middle of the screen, then press the 
get button.

\subsection{Saving sprites}

Sprites may be saved in either uncompressed or compressed format. 
The
sprites may also be saved as both formats at once. This is chosen 
          per sprite
so you might save some of your sprites uncompressed and some 
compressed and
the rest both. If you want to change all sprites to the same 
format this can
be done in the preferences meny. Selecting format for single 
sprite is done
with the symbol in the bottom right corner of the button panel. 
If it says 1
then the current sprite will be saved in an uncompressed format, 
if it says
2 it will be saved in a compressed format and if it says 1\&2 it 
will be
saved in both formats. Notice that only sprites that have been 
put and show up
in the bottom part of the screen will be saved.

The advantages of saving the sprites in compressed format is
that they are drawn faster and if they contain lots of black they 
will require
less disc space and memory than uncompressed sprites. The 
drawback is that
if clipping is required when saving sprites they will take longer 
time to draw
and if they don't contain any black then they will require more 
memory and
discspace as well. Since the save method is chosen per sprite you 
can save
the most important sprites in both formats e.g. the shots in a 
shoot-em-up
game.

%\subsection{Special effects}

\subsection{Grabbing sprites from a picture}

The grab a sprite from a picture you must first load a picture. 
When you have
done that you may grab a sprite from it. When grabbing you shall 
click on the
top left corner of the part you want to grab. In the preferences 
you might
turn on a grid with an optional offset to make grabbing easier. 
This is all
made from the file menu. The following picture formats are 
currently
supported.
\begin{itemize}
\item {\bf TGA} 24-bits type two Targa pictures.
\item {\bf TRP} 16-bits Falcon true colour picture.
\end{itemize}

\section{How do I use the sprites in my own program}

If you program in assembler then you can find a sprite drawing 
routine in
falclib6. If you are using STOS then you could hope that Anthony 
Jacques
(jacquesa@cs.man.ac.uk) gets his Falcon STOS extension ready 
soon, because it
supports true colour Spooky Sprites. The assembler sprite drawing 
program is
written in position independent code and could easily be used in 
other
languages like GFA-Basic with very small modifications.

\section{Keyboard commands}

Note that the copy and paste commands can only be used from the 
keyboard.

\begin{tabular}{ll}
{\bf Q} & quit \\
{\bf p} & preferences \\
{\bf x} & fx \\
{\bf s} & save sprites \\
{\bf l} & load sprites \\
{\bf z} & change size \\
{\bf c} & copy \\
{\bf v} & paste \\
{\bf V} & set paste mode \\
{\bf b} & paste onto picture\\
{\bf B} & paste onto last grabbed place on the picture\\
{\bf a} & animate \\
{\bf A} & set animation mode \\
{\bf U} & undo \\
{\bf 4} & select sprite to the left \\
{\bf 6} & select sprite to the right \\
{\bf 1} & select colour to the left \\
{\bf 3} & select colour to the right \\
\end{tabular}

\section{Sprite and picture formats}

\subsection{TRS, True Colour Sprites (version 1)}

\subsubsection{File header}
4 bytes Ascii header 'TCSF'.\\
1 word Number of sprites.\\
1 word File version. This should be 1.\\
1 word Xres that the packed sprites are calculated for.\\

\subsubsection{Sprite locations}

This section is repeated number of sprites times.
\\\\
1 byte Width in pixels.\\
1 byte Height in pixels.\\
1 long Offset to unpacked data from start of file or 0.\\
1 long Offset to packed data from start of file or 0.\\

\subsubsection{Sprite data}

This section is repeated number of sprites times.
\\\\
{\em If unpacked data is available then it's here.}\\
width*height words of raw true colour data\\
{\em If packed data is available then it's here}\\
1 word Number of chunks\\
{\em Start of compressed chunk (the chunk is repeated number of 
chunks
times)}\\
1 word Screen offset. Add this value to the screen pointer.\\
1 word Nbr of data words -1.\\
1*(nbr of data words) words of raw true colour data\\
{\em End of chunk.}


\subsection{TRP, True Colour Picture}
4 bytes ASCII header 'tru?'.\\
1 word picture width in pixels.\\
1 word picture height in pixels.\\
width*height words of picture data

\section{History}

\subsection{Version 2}

A new improved sprite grabbing. You can now load pictures that 
are larger than
the screen and scroll around. Loading pictures doesn't crash the 
virtual
memory any more. You can now paste sprites to pictures and save 
the pictures.
Now it's possible to save the sprites as raw data and to load raw 
data
pictures.

\subsection{Version 1}

The quite buggy first version.

\end{document}


