# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 239 Marine (terran\marine.grp)
.headerstart
IsId          	78
Type          	12
Init          	MarineInit
Death         	MarineDeath
GndAttkInit   	MarineGndAttkInit
AirAttkInit   	MarineGndAttkInit
Unused1       	[NONE]
GndAttkRpt    	MarineGndAttkRpt
AirAttkRpt    	MarineGndAttkRpt
CastSpell     	[NONE]
GndAttkToIdle 	MarineGndAttkToIdle
AirAttkToIdle 	MarineGndAttkToIdle
Unused2       	[NONE]
Walking       	MarineWalking
WalkingToIdle 	MarineWalkingToIdle
SpecialState1 	[NONE]
.headerend
# ----------------------------------------------------------------------------- #

MarineInit:
	imgul             	240 0 0	# Marine Shadow (terran\tmaShad.grp)
MarineWalkingToIdle:
	playfram          	0x00	# Frame set 0
MarineLocal00:
	waitrand          	63 129 
	randcondjmp       	128 MarineLocal01
	randcondjmp       	25 MarineLocal02
	goto              	MarineLocal00

MarineLocal01:
	playfram          	0x00	# Frame set 0
	randcondjmp       	192 MarineLocal03
	turnccwise        	2 
	wait              	3 
	turnccwise        	2 
	wait              	3 
	turnccwise        	2 
	wait              	3 
	turnccwise        	2 
	wait              	3 
	turnccwise        	2 
	wait              	3 
	wait              	6 
	turncwise         	2 
	wait              	3 
	turncwise         	2 
	wait              	3 
	turncwise         	2 
	wait              	3 
	turncwise         	2 
	wait              	3 
	turncwise         	2 
	wait              	3 
	wait              	6 
	turnccwise        	2 
	wait              	3 
	turnccwise        	2 
	wait              	3 
	turnccwise        	2 
	wait              	3 
	goto              	MarineLocal00

MarineLocal03:
	waitrand          	10 34 
	goto              	MarineLocal04

MarineLocal04:
	waitrand          	10 34 
	goto              	MarineLocal00

MarineLocal02:
	waitrand          	10 34 
	playfram          	0x00	# Frame set 0
	wait              	1 
	playfram          	0x77	# Frame set 1
	wait              	1 
	turnrand          	3 
	wait              	1 
	playfram          	0x00	# Frame set 0
	wait              	1 
	goto              	MarineLocal00

MarineDeath:
	playsndbtwn       	276 277	# Terran\MARINE\TMaDth00.WAV | Terran\MARINE\TMaDth01.WAV
	setfldirect       	0 
	imgol             	3 0 0	# Scourge Death (zerg\zavDeath.grp)
	wait              	6 
	lowsprul          	236 0 0	# Marine Remnants (terran\tmaDeath.grp)
	wait              	1 
	end

MarineGndAttkInit:
	playfram          	0x00	# Frame set 0
	wait              	1 
	playfram          	0x11	# Frame set 7
MarineGndAttkRpt:
	wait              	1 
	nobrkcodestart
	playfram          	0x22	# Frame set 8
	playsnd           	69	# Bullet\TMaFir00.wav
	attackwith        	1 
	playfram          	0x11	# Frame set 9
	wait              	1 
	playfram          	0x22	# Frame set 7
	wait              	1 
	playfram          	0x11	# Frame set 8
	wait              	1 
	playfram          	0x22	# Frame set 9
	wait              	1 
	playfram          	0x11	# Frame set 8
	wait              	1 
	nobrkcodeend
	gotorepeatattk
	ignorerest
MarineGndAttkToIdle:
	playfram          	0x11	# Frame set 7
	wait              	1 
	goto              	MarineWalkingToIdle

MarineWalking:
	move              	4 
	wait              	1 
	playfram          	0x33	# Frame set 1
	move              	5 
	wait              	1 
	playfram          	0x44	# Frame set 2
	move              	4 
	wait              	1 
	playfram          	0x55	# Frame set 3
	move              	5 
	wait              	1 
	playfram          	0x66	# Frame set 3
	move              	5 
	wait              	1 
	playfram          	0x77	# Frame set 5
	move              	5 
	wait              	1 
	playfram          	0x88	# Frame set 6
	move              	4 
	wait              	1 
	playfram          	0x99	# Frame set 5
	move              	5 
	wait              	1 
	playfram          	0xaa	# Frame set 4
	move              	4 
	wait              	1 
	playfram          	0xbb	# Frame set 3
	move              	5 
	wait              	1 
	playfram          	0xcc	# Frame set 2
	move              	4 
	wait              	1 
	playfram 0xdd
	move 4
	wait 1
	playfram 0xee
	move 4
	wait 1
	goto              	MarineWalking
