;Object Data for the Worm demo
;-----------------------------
;This is a data-file which must be assembled with an asm compiler.  In future
;these files will be created with a GUI interface - you might have to wait a
;little while for this!
;
;Assemble file to "GMS:demos/data/OBJ.Worm".

	INCDIR	"INCLUDES:"
	INCLUDE	"games/games.i"

TAGOBJ	MACRO
	dc.l	TAGS
	IFNC	'\2',''
	dc.l	\2
	ELSE
	dc.l	.end
	ENDC
	dc.b	\1,0
	even
	ENDM

	SECTION	"Start",CODE

Start:	cmp.l	#"GKEY",d0	;d0 = Are we being called from GMS?
	bne.s	.exit	;>> = Called from DOS, so exit safely.
	move.l	#Objects,d0	;d0 = Return pointer to start of data.
	rts

.exit	moveq	#$00,d0
	rts

;--------------------------------------------------------------------------;

	SECTION	"ObjectData",DATA

Objects	dc.b	"GOBJ"

Worm:	TAGOBJ	"Worm"
	dc.l	TAGS_BOB,0
	dc.l	BBA_GfxCoords,.frames
	dc.l	BBA_Width,32
	dc.l	BBA_Height,24
	dc.l	BBA_XCoord,150
	dc.l	BBA_YCoord,150
	dc.l	BBA_ClipLX,32
	dc.l	BBA_ClipTY,32
	dc.l	BBA_ClipRX,320-32
	dc.l	BBA_ClipBY,256-32
	dc.l	BBA_Attrib,GENMASKS|CLIP|RESTORE
	dc.l	BBA_PictureTags,.picture
	dc.l	TAGEND

.frames	dc.w	000,000	;X/Y Graphic
	dc.w	032,000
	dc.w	064,000
	dc.w	096,000
	dc.w	128,000
	dc.w	160,000
	dc.w	192,000
	dc.w	224,000
	dc.w	256,000
	dc.w	288,000
	dc.w	000,048
	dc.w	032,048
	dc.w	064,048
	dc.l	-1
.picture
	dc.l	TAGS_PICTURE,0
	dc.l	PCA_Planes,5
	dc.l	PCA_ScrMode,LORES
	dc.l	PCA_ScrType,PLANAR
	dc.l	PCA_Options,BLITMEM
	dc.l	PCA_File,.file
	dc.l	TAGEND
.file	dc.b	"GMS:demos/data/PIC.Rambo",0
	even

.end ;----------------------------------------------------------------------;

SNDRambo:
	TAGOBJ	"SNDRambo"
	dc.l	TAGS_SOUND,0
	dc.l	SA_Channel,CHANNEL1
	dc.l	SA_Octave,OCT_C2S
	dc.l	SA_Volume,100
	dc.l	SA_File,.file
	dc.l	TAGEND
.file	dc.b	"GMS:demos/data/SND.Rambo",0
	even

.end ;----------------------------------------------------------------------;

Screen:	TAGOBJ	"GameScreen"
	dc.l	TAGS_GAMESCREEN,0
	dc.l	GSA_ScrWidth,320
	dc.l	GSA_ScrHeight,256
	dc.l	GSA_Planes,5
	dc.l	GSA_Attrib,DBLBUFFER
	dc.l	GSA_ScrMode,LORES
	dc.l	GSA_ScrType,PLANAR
	dc.l	TAGEND

.end ;----------------------------------------------------------------------;

Background:
	TAGOBJ	"Background"
	dc.l	TAGS_PICTURE,0
	dc.l	PCA_Width,320
	dc.l	PCA_Height,256
	dc.l	PCA_Planes,5
	dc.l	PCA_ScrMode,LORES
	dc.l	PCA_ScrType,PLANAR
	dc.l	PCA_Options,GETPALETTE
	dc.l	PCA_File,.file
	dc.l	TAGEND
.file	dc.b	"GMS:demos/data/PIC.Green",0
	even

.end ;----------------------------------------------------------------------;

	dc.l	"OEND"
