;=====================================================================
;Header file to be included by any files using DEMO routines.
;---------------------------------------------------------------------
;
;Variables accessible from other routines.


				global demo,viewx
				global demo,viewy
				global demo,viewz
				global demo,viewa
				global demo,cameraobject
				global demo,mainobject

				global demo,fontl
				global demo,fontm

				global demo,defence1def
				global demo,nitro1def
				global demo,gulp1def
				global demo,rev1def
				global demo,stop1def
				global demo,fast1def
				global demo,dfault1def
				global demo,defence2def
				global demo,nitro2def
				global demo,gulp2def
				global demo,rev2def
				global demo,stop2def
				global demo,fast2def
				global demo,dfault2def
				global demo,defence3def
				global demo,nitro3def
				global demo,gulp3def
				global demo,rev3def
				global demo,stop3def
				global demo,fast3def
				global demo,dfault3def
				global demo,defence4def
				global demo,nitro4def
				global demo,gulp4def
				global demo,rev4def
				global demo,stop4def
				global demo,fast4def
				global demo,dfault4def
				global demo,defence5def
				global demo,nitro5def
				global demo,gulp5def
				global demo,rev5def
				global demo,stop5def
				global demo,fast5def
				global demo,dfault5def
				global demo,defence6def
				global demo,nitro6def
				global demo,gulp6def
				global demo,rev6def
				global demo,stop6def
				global demo,fast6def
				global demo,dfault6def
				global demo,morphidx

				global demo,shrapneldef
				global demo,emissldef

				global demo,gloopcount
				global demo,ingameflag
				global demo,demoflag

				global demo,scrn1
				global demo,scrn2
				global demo,scrn3
				global demo,commonz

				global demo,scrnptrB
				global demo,scrnptrF
				global demo,scrnptrD
				global demo,workscrn

				global demo,shapelist
				global demo,spritelist
				global demo,polylist

				global demo,pulsecolr

				global demo,cruisemap

				global demo,musicflag
				global demo,buttonopt
				global demo,flightopt
				global demo,cheatenabled

				global demo,SCRNOBJGH


;Functions now follow ------------------------------------------------

				global demo,makelexplosion1
				global demo,makelexplosion2

				global demo,setscrnht
				global demo,screenswap
				global demo,fadeout
				global demo,swapfadein
				global demo,fadein
				global demo,cls
				global demo,waitntitle
				global demo,chkgamereset
				global demo,chkgametitle
				global demo,dfaultEEPROM


;Macros etc involved with Morphing -----------------------------------

				global demo,morphbuf1
				global demo,domorph


				STRUCT morph

				ELEMENT morph.pri,WORD		;morph priority
				ELEMENT morph.add,WORD		;addon (speed of morph)
				ELEMENT morph.prate,WORD	;pulse rate
				ELEMENT morph.snd,WORD		;sound effect (-ve means none)
				ELEMENT morph.defn,DWORD	;ptr to definition

				ENDS morphstructsz


DOMORPH			macro
				IFNC '\1','d0'
				IFNC '\1','D0'
				move.w #\1,d0
				ENDC
				ENDC
				add.w morphidx(a6),d0
				bsr domorph
				endm


;Morph numbers -------------------------------------------------------

MORPH_INT		equ $8000				;interrupt current sequence!

MORPH_NORMAL	equ 0*morphstructsz
MORPH_FAST		equ 1*morphstructsz
MORPH_STOP		equ 2*morphstructsz
MORPH_REVERSE	equ 3*morphstructsz
MORPH_GULP		equ 4*morphstructsz
MORPH_DEFENCE	equ 5*morphstructsz
MORPH_NITRO		equ 6*morphstructsz

MORPH_SINGLE	equ MORPH_NORMAL
MORPH_DOUBLE	equ 7*morphstructsz
MORPH_TRIPLE	equ 14*morphstructsz
MORPH_FLAMER	equ 21*morphstructsz
MORPH_BOMB		equ 28*morphstructsz
MORPH_MINE		equ 35*morphstructsz


;Codes for checking controller ---------------------------------------

PRESSED0		equ 1			;toggle title music
PRESSEDRESET	equ -1			;reset to title screen
PRESSEDSTART	equ -2			;start pressed
PRESSEDOPTION	equ -3			;Option pressed
