ANIMATION OF OBJECTS

Question nr1:
From which level shall the ANI option be inserted. One way is 
to do it from the enemy tab (sequenser) or letting each object 
be connected to a chain (which ofcourse can be left out).

If we use the enemy tab option we will make it more difficult to 
futher improve the enemytab.
No mather which system we will use it will be the sprite tab 
that during playing keeps track of which object to show (with 
the help of some kind of animation tab?)

Looking at the fact I have decided to use a flag on the object 
tab that tells which animation to use (-1 = use this object). 
Then there will be a pointer on the sprite tab that points on 
the animation tab (and a counter for delays, which can be 
different on different parts of the animation)



Slutsats:
Man kan se att det r ett o-ani (object animation) object man 
vill ha genom att i enemy tabellen s r det ett nagativ vrde 
som med sin positiva motsvarar sger vilken o-ani det rr sig 
om. (genom OANITAB).  Detta gr att man kan ha bde joinade och 
normala o-ani object.  Frrut innan denna updatering s stod en 
-1 i object nummer i enemytaben fr att det var en joinad 
enemy, numera anvnds vrdet 0 fr detta (d 0 motsvarar en 
explotion, vilket med stor sannolikhet aldrig kommer att 
anvndas som fiende).

With the OANI function one can have animations with different 
size, explotions, bullets, shootingrate, explotionArea and 
different attributes on the SpriteFlags.

One could have image animations on an object that is included 
in a O-Ani sequense..  This function comes for free, but is 
limited as the image pointer will restore itself at each new 
o-ani update... but during the delay a image ani might very 
well operate.

OBSERVE: When using O-ANI in Joined Sprites there is some 
things that might screw up things a lot:
1: The X & Y offset values is taken from the OANI not from the
   the ENEMY DATA (this might cause problems on normal enemies
   too...). This means that there will be even more OANI data
   cells (one for every different offset).
2: The shooting rate, bullet type and sprite flags will
   constantly be updated during animation, but if the "object"
   is the first object in the join chain it will start with the
   values given in the enemy data.. If it isn't the first object
   one might end up with several sprites that can shoot on the
   same object (I recomend to in such cases make a OANI object
   that sets shooting rate to 0). Just skip to fill in the
   values in the enemy data and you will only have to think about
   the first enemy cell object (until it animates) and all the
   O-ANI data.. You will probably end up with several OANI that
   has the same "objects" in it but with different shootingrate
   ect ect.


Fljande addresser lggs till i SPRITETABELLEN
80.w  AniNr (-1 if no ani)
82.l  Ani pek, points directly to the oanidata
86.w  Counter (if null then increase AniPrek and update sprite)

Fljande addresser i SPRITETAB mste uppdateras vid ny 
animations poster.
16.w  Obj Nr
18.w  ShootingRate
20.w  BulletType
22.w  Pointer to image start (for image ani)
32.w  Center X
34.w  Center Y
40.l  Addr to OBJ data
46.w  SpriteFlags

To find the location of ANITAB you have to use the pointer
ANITAB_PEK (dc.l)

Structure of ANITAB:
0.w   (as -1 becomes 1 this one is dummy!)
n*2.w Ofset from ANITAB to OANIDATA for n (n=1...)
..

This is the structure of the OANIDATA:
0.w   Object to use  (-1= no more objects, warp!)
2.w   Center X
4.w   Center Y
6.w   Count untill next oani (0=next frame)
8.w   SpriteFlags
10.w  ShootingRate
12.w  BulletType
14.w  ** Reserved **


