************************************************************************
*                Function: Handling a Object list		       *
*                          					       *
*                                                                      *
*                Project #:              NATIVE                        *
*                                                                      *
*                Programmer:             Roland Graf                   *
*                Date:                   20.2.97                       *
*					 14.1.98 poor english docs     *
*                                                                      *
*              COPYRIGHT 1996,1997,1998 Duranik Software               *
*          UNATHORIZED REPRODUCTION, ADAPTATION, DISTRIBUTION,         *
*          PERFORMANCE OR DISPLAY OF THIS COMPUTER PROGRAM OR          *
*        THE ASSOCIATED AUDIOVISUAL WORK IS STRICTLY PROHIBITED.       *
*                            ALL RIGHTS RESERVED.                      *
*                                                                      *
************************************************************************


*** Defining a enemy/object ***
gegner_daten:
	dc.l	10			; X-Pos where object became activ
	dc.w	0			; Layer offset	
	dc.w	0			; total number of object positions
	dc.w	51			; X-Pos object
	dc.w	89*2+42			; Y-Pos object
	dc.l	zahnrad			; starting adress object graphic data
	dc.w	72			; object Height
	dc.w	72/4			; iwidth
	dc.w	72/4			; dwidth
	dc.b	4			; Flags
	dc.b	0			; Firstpix
	dc.b	0			; object type 
	dc.b	4			; depth
	dc.b	1			; Pitch
	dc.b	0			; Index
	dc.w	$20			; Remainder
	dc.b	$10			; V-Scale
	dc.b	$10			; H-Scale
	dc.l	zahnrad_scale		; adress actual scaling list
	dc.l	zahnrad_scale		; start adress scaling list
	dc.l	schuss			; start adress shooting list
	dc.l	schuss_counter		; counter shooting list
	dc.l	zahnrad_anim		; adress actual object graphic list
	dc.l	zahnrad_anim		; start adress object graphic list
	dc.l	zahnrad_kurve		; start adress curve list
	dc.l	sample2			; Sample
	dc.w	1			; power to destroy object/power of a shoot
	dc.w	0			; points for destroying object/money
	dc.l	explo_daten		; start adress following object
	dc.w	2			; speed in pics/sec
	dc.w	2			; speed in pics/sec for restart
	dc.l	1			; Object width in pixel



X-Pos where Object became activ:
  The game starts with 0 and counts every VBL + 1. When this number is
  the same as the game counter, then the new Object will be activated.
  (When Objects should be activated at the same time, it is allowed,
  that all have the same number). The value must be greater then 0,
  because a 0 indicates the end of the list.


Layer Offset:
  Every object has a layer offset, that indicates the position of the object
  on the screen. For example: a object with the layer 0 will always be
  displaced behind a object with the layer obj_enemy-obj_gegner if the
  objects are crossing each other.
  This come into count, when you are defining which objects are before or
  behind each other. (see additional LAYER.TXT for more information)


total number of object positions:
  How many Object positions should be checked for activating a new
  object. If there are 20 positions for enemys, the game checks
  max. 20 positions to find a free one. Is no position free, then the
  Object could not be activated. The positions depend on the layers.
  (variables for this are defined in NATIVE.INC file).
  

X-Pos object:
  X-Pos object on the screen


Y-Pos object:
  Y-Pos object on the screen * 2 (because the OP is thinking in
  halflines) + 42 (offset to the first visible line of the screen)


starting adress Object grafic data
  First value from the Object list.


Object Heigth:
  Height of the Object in pixel.


Iwidht:
  Tell the OP how many phrases to draw in each line. This is the
  acual number of phrases to draw, not the horizontal index to
  index the next line (dwidth).
  Object with 65535 Colors  ==> Width in pixel / 4 = ... phrases
  Object with   256 Colors  ==> Width in pixel / 8 = ... phrases


Dwidht:
  The horizontal phrase offset the OP should use to index to the
  next line. If your data is laid out in consecutive strips of
  horizontal data then this should be just the same as iwidth.


Flags:
  How to draw to Object to the screen
  You can combine the flags for example
        3 = horizontal Flip + Read modify Write
	
	1 = horizontal Flip
	2 = Read modify Write
	4 = transparent
	8 = release


Firstpix:
  number of bits to skip before fetching the first pixel. this must
  be used whenever your bitmap data isn't phrase aligned.
  Normally a 0 is the right value


object type:
  Object type the OP should create
	0 = Bitmap Object
	1 = Scaled Bitmap Object
	2 = GPU Object
	3 = Branch Object
	4 = Stop Object
	5 = Object nicht activ (for finding free object positions)
	6 = Bitmap Object, with no animation list (R-Type)
	7 = Bitmap Object, with no animation list and the Y-Pos will
	    not be modified by scrollin in Y-Pos (Points and Enery)


depth:
  The number of bits of each pixel. This specifies the rez of the
  object. (Remember: Iwidth and Dwidth depent on the depth)
	0 =  1 Bit per pixel	     2 colors CLUT mode
	1 =  2 Bit per pixel	     4 colors CLUT mode
	2 =  4 Bit per pixel	    16 colors CLUT mode
	3 =  8 Bit per pixel	   256 colors CLUT mode
	4 = 16 Bit per pixel	 65536 colors
	5 = 24 Bit per pixel	16 Mio colors

		
Pitch:
  With this value you control the data pointer that the OP uses to
  traverse your bitmap data. This value is added to the data-pointer
  after the phrase over and over again. (normally a 1 is the right
  value)


Index:
  Index into the ColorLookUpTable (CLUT). This information is only
  used for 1, 2 or 4 bitplane objects, to determine the offset in
  the CLUT to use. (normally a 0 is the right value)


Remainder:
  Keeps the VScale remainder. If the object is not scaled 0 is the
  right value.


V-Scale:
  Vertical scaling factor. If the object is not scaled 0 is the right
  value.


H-Scale:
  Horizontal scaling factor. If the object is not scaled 0 is the right
  value.


actual adress scaling list:
  Actual adress of your scaling list.


start adress scaling list:
  Start adress of your scaling list.


start adress shooting list:
  Start adress of your shooting list. If the enemy don't shot, a 0
  is the right value.

  
counter shooting list:
  First counter of your shooting list.


adress actual object grafic list:
  Actual adress of your object graphic list. The values in the list are the
  adresses from how the object graphic will be displayed. The list
  ended with a dc.l 0. If the list reaches the end, then it will restart
  with the value form the field "start adress object graphic list".


start adress object graphic list:
  Start adress object graphic list. This value is the restart adress when
  the object graphic list reaches the end.


start adress curve list:
  Startadresse Flugbahn des Gegners. Ein Gegner durchl„uft seine Flugbahn,
  und wird am Ende der Flugbahn inaktiviert.


Sample:
  Not fully implemented in the current engine, sorry.


power to destroy Object/power of a shoot:
  Total amount of hits before object will be destroyed. If a shoot has
  a power of 5, it will be substract 5 of this value. If the value
  is less than zero, the object will be destroyed and his following object
  will be activated (see "start adress following object").
  If a object is not destroyable then you must write DESTROY as value.
  (this is defined as DESTROY EQU -1).
  If the object is a shoot, then this value is the power of the shoot.


points for destroying object/money:
  Points for destroying a object. If the object is a extra/money this
  value says the amount of money get.


start adress following object:
  adress of a new object list when object will be destroyed. The new
  object list must end with dc.l 0.
  If no following object should appear, write a 0.
  Attention: A new CLUT will not be activated, therefore only objects
             without CLUT are allowed.
  

speed in pics/sec:
  60 / this value says the pics/sec a new value from the object grafic
  list will be activated. 


speed in pics/sec for restart:
  Same value as above. This will be the restart value for speed in
  pics/sec.


object width in pixel:
  Width of the object in pixel for collision detection, so the
  game must not calculate the width in pixel from width in phrases and
  colordepth.
  
  


  
*** defining a color palette for a object ****
	dc.l	10			; X-Pos where CLUT became activ
	dc.l	0			; not used
	dc.w	COLOR			; Magic activate CLUT
	dc.w	0			; not used
	dc.l	zahnrad			; CLUT adress



X-Pos wo Gegner Farbpalette gesetzt wird:
  The game starts with 0 and counts every VBL + 1. When this number is
  the same as the game counter, then the new CLUT will be activated.
  (When Objects should be activated at the same time, it is allowed,
  that all have the same number). The value must be greater then 0,
  because a 0 indicates the end of the list.
  
  
Magic activate CLUT:
  Magic for the program to activate a new CLUT.
  

CLUT adress:
  adress of the CLUT.  




  
*** unpacking packed data ***
	dc.l	10			; X-Pos where data will be decrunched
	dc.l	$60000			; destination adress packed data
	dc.w	PACKED			; Magic packed data
	dc.w	0			; not used
	dc.l	zahnrad			; source adress packed data



X-Pos where data will be decrunched:
  The game starts with 0 and counts every VBL + 1. When this number is
  the same as the game counter, then the new data will be decrunched.
  (When Objects should be activated at the same time, it is allowed,
  that all have the same number). The value must be greater then 0,
  because a 0 indicates the end of the list.
  
  
destination adress packed data:
  destination adress for the unpacked data.


Magic packed data:
  Magic for the program to decrunch data.  


source adress packed data:
  source adress for the packed data.