; track 5 - island hop

split	set 0

Track5::

	start	-100000,160000,$300

	flaginit	%001100000000100000001	; long white lines, warnings, barriers both sides
;	flags are	:CCLDW----PTTB----PTTB

;============= STARTING STRAIGHT

	straight	Obstrw
	park		7500,10000,0
	objrel		Obflag3,14000,0,0

	straight	Obstrw
	park		7500,0,0
	park		7500,10000,0
	objrel		Obflag3,14000,0,0

	straight	Obpit03
	park		7500,0,0
	park		7500,10000,0
	objrel		Obstadium,-20000,-10000,$200

	straight	Obpit03
	pitmark
	park		7500,0,0

	straight	Obstrw
	objrel		Obsignr,-12000,3300,$200
	objrel		Obsignr,-12000,-3300,$200
	objrel		Obrarrow,-5000,0,$200
	objrel		Obrarrow,5000,0,$200

;============= RIGHT TURN AND SHORT STRAIGHT OUT INTO SEA

	right		Obcorw40
	objrel		Obskid3,-3000,0,$20
	right		Obcorw40
	right		Obcorw40
	objrel		Obskid,-6000,0,$30
	right		Obcorw40
	setbit		2		; tight turn marker - well in advance to get cars slowed down and in line
	straight	Obstrw
	objrel		Oblarrow,-5000,0,$200
	objrel		Oblarrow,5000,0,$200
	flagoff		LINE
	straight	Obstrw
	objrel		Obsignl,12000,3300,$200
	objrel		Obsignl,12000,-3300,$200

;============= LEFT U-TURN AND SHORT STRAIGHT BACK TOWARDS ISLAND 2

	left		Obcorw90
	objrel		Obskid,-3000,-3000,$300
	objrel		Obskid2,-5000,-1000,$2c0
	objrel		Obskid3,-7000,-6000,$330
	objrel		Obroadblock,-15000,15000,$300
	left		Obcorw90
	objrel		Obskid2,0,-3000,$360
	objrel		Obskid,-6000,-2000,$300
	straight	Obstrw
	flagon		LINE
	straight	Obstrw
	objrel		Obrarrow,-5000,0,$200
	objrel		Obrarrow,5000,0,$200
	clrbit		2		; tight turn marker
	straight	Obstrw

;============= WIDE RIGHT TURN INTO MEDIUM STRAIGHT ACROSS ISLAND 2 

	right		Obcorw20
	objrel		Obskid,3000,0,$20
	right		Obcorw20
	right		Obcorw20
	objrel		Obskid2,-5000,0,$10
	right		Obcorw20
	objrel		Obskid,-2000,0,-$10
	right		Obcorw20
	right		Obcorw20
	objrel		Obskid,1000,0,$0
	objrel		Obskid3,-3000,0,$30
	right		Obcorw20
	right		Obcorw20
	objrel		Obskid,-5000,0,$40
	straight	Obstrw
	straight	Ob5x
	objrel		Obrarrow,-5000,0,$200
	objrel		Obrarrow,5000,0,$200
	objrel		Obsignr,-12000,3300,$200
	objrel		Obsignr,-12000,-3300,$200
	objrel		Obskid3,3000,0,-$20
	straight	Obstrw
	objrel		Obsignr,-12000,3300,$200
	objrel		Obsignr,-12000,-3300,$200

;============= RIGHT TURN INTO MEDIUM STRAIGHT ACROSS SEA TO ISLAND 3

	right		Obcorw40
	objrel		Obskid2,-2000,0,$30
	right		Obcorw40
	objrel		Obskid,-5000,0,$20
	right		Obcorw40
	objrel		Obskid3,0,0,-$50
	manbars		Obbar10y,Obbar11y
	right		Obcorw40
.if split=0
	objrel		Obaftop,0,-10000,0
.else
	objrel		Obaftopl,-13241,-2634,-$20
	objrel		Obaftopr,13241,2634,-$20
.endif
	objrel		Obafbot,0,-10000,0
	objrel		Obafshad,0,-10000,0
	manbars		0,0
	straight	Obstrw
	objrel		Obskid,4000,0,$10
	manbars		Obbar01y,Obbar01y	; barrier with built in support
	straight	Obstrw
.if split=0
	objrel		Obaftop,0,0,0
.else
	objrel		Obaftopl,-13500,0,0
	objrel		Obaftopr,13500,0,0
.endif
	objrel		Obafbot,0,0,0
	objrel		Obafshad,0,0,0
	manbars	0,0
	straight	Obstrw
	objrel		Obskid2,-4000,3000,-$30
	objrel		Obskid,0,0,$50
	manbars		Obbar01y,Obbar01y	; barrier with built in support
	straight	Obstrw
.if split=0
	objrel		Obaftop,0,0,0
.else
	objrel		Obaftopl,-13500,0,0
	objrel		Obaftopr,13500,0,0
.endif
	objrel		Obafbot,0,0,0
	objrel		Obafshad,0,0,0
	manbars	0,0
	straight	Obstrw
	objrel		Obskid3,2000,0,$20
	straight	Obstrw
	objrel		Obsignr,-12000,3300,$200
	objrel		Obsignr,-12000,-3300,$200

;============= RIGHT, STRAIGHT, LEFT THROUGH ISLAND 3
	
	right		Obcorw40
	objrel		Obpalm,14500,-4000,$0	;palm
	objrel		Obskid,-5000,0,$40
	right		Obcorw40
	straight	Obstrw
	objrel		Obpalm,16000,-6000,$0	;palm
	objrel		Obpalm,-16000,-6000,$0	;palm
	objrel		Obpalm,14000,6000,$0	;palm
	objrel		Obskid3,2000,0,$0
	straight	Obstrw
	objrel		Obsignl,12000,3300,$200
	objrel		Obpalm,14000,-6000,$0	;palm
	objrel		Obpalm,-14000,-6000,$0	;palm
	objrel		Obsignl,12000,-3300,$200
	left		Obcorw40
	objrel		Obpalm,-15000,-2000,$0	;palm
	objrel		Obpalm,13000,-6000,$0	;palm
	objrel		Obskid,6000,0,-$40				;leftpalm
	left		Obcorw40

;============= SHORT STRAIGHT, WIDE RIGHT TURN OUT FROM ISLAND 3
	objrel		Obpalm,13000,-6000,$0	;palm
	straight	Obstrw
	objrel		Obskid3,3000,0,$20
	objrel		Obpalm,-15000,-4000,$0	;palm
	objrel		Obpalm,14000,-6000,$0	;palm
	objrel		Obpalm,-16000,4000,$0	;palm
	straight	Obstrw
	objrel		Obpalm,16000,-4000,$0	;palm
	straight	Obstrw
	objrel		Obrarrow,-5000,0,$200
	objrel		Obrarrow,5000,0,$200
	objrel		Obsignr,-12000,3300,$200
	objrel		Obsignr,-12000,-3300,$200
	objrel		Obskid2,1000,0,$10
	objrel		Obskid,-3000,0,$20
	objrel		Obpalm,-14000,-6000,$0	;palm
	objrel		Obpalm,15000,-6000,$0	;palm
	straight	Obstrw
	objrel		Obsignr,-12000,3300,$200			;endpalm
	objrel		Obsignr,-12000,-3300,$200
	right		Obcorw20
	manbars		Obbar06y,Obbar07y
	right		Obcorw20
	objrel		Obskid3,-4000,0,$20
.if split=0
	objrel		Obaftop,0,-10000,0
.else
	objrel		Obaftopl,-13435,-1323,-$10
	objrel		Obaftopr,13435,1323,-$10
.endif
	objrel		Obafbot,0,-10000,0
	objrel		Obafshad,0,-10000,0
	manbars		0,0
	right		Obcorw20
	manbars		Obbar06y,Obbar07y
	right		Obcorw20
	objrel		Obskid2,2000,0,-$30
.if split=0
	objrel		Obaftop,0,-10000,0
.else
	objrel		Obaftopl,-13435,-1323,-$10
	objrel		Obaftopr,13435,1323,-$10
.endif
	objrel		Obafbot,0,-10000,0
	objrel		Obafshad,0,-10000,0
	manbars		0,0
	right		Obcorw20
	objrel		Obskid,1000,0,$40
	manbars		Obbar06y,Obbar07y
	right		Obcorw20
.if split=0
	objrel		Obaftop,0,-10000,0
.else
	objrel		Obaftopl,-13435,-1323,-$10
	objrel		Obaftopr,13435,1323,-$10
.endif
	objrel		Obafbot,0,-10000,0
	objrel		Obafshad,0,-10000,0
	manbars		0,0
	right		Obcorw20
	objrel		Obskid3,1000,0,$10
	manbars		Obbar06y,Obbar07y
	right		Obcorw20
	objrel		Obskid,3000,-4000,$10

;============= MEDIUM STRAIGHT, BEND RIGHT, MEDIUM STRAIGHT, BEND LEFT ALL IN SEA

.if split=0
	objrel		Obaftop,0,-10000,0
.else
	objrel		Obaftopl,-13500,0,0
	objrel		Obaftopr,13500,0,0
.endif
	objrel		Obafbot,0,-10000,0
	objrel		Obafshad,0,-10000,0
	manbars		0,0
	straight	Obstrw
	manbars		Obbar01y,Obbar01y	; barrier with built in support
	straight	Obstrw
	objrel		Obskid2,-2000,0,$20
.if split=0
	objrel		Obaftop,0,0,0
.else
	objrel		Obaftopl,-13500,0,0
	objrel		Obaftopr,13500,0,0
.endif
	objrel		Obafbot,0,0,0
	objrel		Obafshad,0,0,0
	manbars	0,0
	straight	Obstrw
	objrel		Obrarrow,-5000,0,$200
	objrel		Obrarrow,5000,0,$200
	manbars		Obbar01y,Obbar01y	; barrier with built in support
	straight	Obstrw
	objrel		Obskid3,3000,0,$30
	objrel		Obskid,-2000,0,-$20
.if split=0
	objrel		Obaftop,0,0,0
.else
	objrel		Obaftopl,-13500,0,0
	objrel		Obaftopr,13500,0,0
.endif
	objrel		Obafbot,0,0,0
	objrel		Obafshad,0,0,0
	manbars	0,0
	right		Obcorw40
	manbars		Obbar10y,Obbar11y
	right		Obcorw40
	objrel		Obskid3,-7000,0,$10
.if split=0
	objrel		Obaftop,0,-10000,0
.else
	objrel		Obaftopl,-13241,-2634,-$20
	objrel		Obaftopr,13241,2634,-$20
.endif
	objrel		Obafbot,0,-10000,0
	objrel		Obafshad,0,-10000,0
	manbars		0,0
	straight	Obstrw
	manbars		Obbar01y,Obbar01y	; barrier with built in support
	straight	Obstrw
	objrel		Obskid,3000,0,$40
.if split=0
	objrel		Obaftop,0,0,0
.else
	objrel		Obaftopl,-13500,0,0
	objrel		Obaftopr,13500,0,0
.endif
	objrel		Obafbot,0,0,0
	objrel		Obafshad,0,0,0
	manbars	0,0
	straight	Obstrw
	objrel		Obskid3,-1000,0,$10
	manbars		Obbar01y,Obbar01y	; barrier with built in support
	straight	Obstrw
.if split=0
	objrel		Obaftop,0,0,0
.else
	objrel		Obaftopl,-13500,0,0
	objrel		Obaftopr,13500,0,0
.endif
	objrel		Obafbot,0,0,0
	objrel		Obafshad,0,0,0
	manbars	0,0
	left		Obcorw40
	objrel		Obskid,6000,0,$20
	manbars		Obbar10y,Obbar11y
	left		Obcorw40
.if split=0
	objrel		Obaftop,0,10000,0
.else
	objrel		Obaftopl,-13241,-2634,-$20
	objrel		Obaftopr,13241,2634,-$20
.endif
	objrel		Obafbot,0,10000,0
	objrel		Obafshad,0,10000,0

;============= MEDIUM STRAIGHT ACROSS ISLAND 1, RIGHT TURN BACK ONTO ISLAND 1

	manbars		0,0
	straight	Obstrw
	objrel		Obskid2,4000,0,$10
	straight	Obstrw
	objrel		Obarrow,5000,0,$200
	objrel		Obarrow,-5000,0,$200
	straight	Obstrw
	objrel		Obskid,-3000,0,$20
	objrel		Obskid3,5000,0,-$10
	straight	Obstrw
	objrel		Oblightho1,24000,0,0

	straight	Obstrw
	objrel		Obih3,21000,0,$200
	objrel		Obih3,31000,-12000,$180
	objrel		Obih3,26000,4000,$300
	objrel		Obskid3,9000,0,$0
	straight	Obstrw
	objrel		Obih2,31000,-12000,$180
	objrel		Obih2,21000,-0,$100
	objrel		Obskid2,0,0,-$50
	straight	Obstrw
	objrel		Obsignr,-12000,3300,$200
	objrel		Obsignr,-12000,-3300,$200
	objrel		Obrarrow,-5000,0,$200
	objrel		Obrarrow,5000,0,$200
	objrel		Obskid,3000,0,$10
	straight	Obstrw
	objrel		Obsignr,-12000,3300,$200
	objrel		Obsignr,-12000,-3300,$200
	right		Obcorw40
	objrel		Obskid2,-4000,0,$30
	objrel		Obskid,1000,0,$10
	right		Obcorw40
	right		Obcorw40
	objrel		Obskid3,3000,0,-$20
	right		Obcorw40

;============= MEDIUM STRAIGHT, RIGHT TURN INTO START STRAIGHT

	straight	Obstrw
	objrel		Obarrow,5000,0,$200
	objrel		Obarrow,-5000,0,$200
	straight	Obstrw
	flagon		PALMR
	straight	Obstrw
	objrel		Obskid,4000,0,$10
	straight	Obstrw
	straight	Ob5z
	straight	Obstrw
	straight	Obstrw
	straight	Obstrw
	straight	Obstrw
	objrel		Obsignr,-12000,3300,$200
	objrel		Obsignr,-12000,-3300,$200
	objrel		Obrarrow,-5000,0,$200
	objrel		Obrarrow,5000,0,$200
	straight	Obstrw
	objrel		Obsignr,-12000,3300,$200
	objrel		Obsignr,-12000,-3300,$200
	right		Obcorw40
	objrel		Obskid,-6000,0,$20
	flagoff		PALMR
	right		Obcorw40
	right		Obcorw40
	objrel		Obskid3,4000,0,$10
	right		Obcorw40
	straight	Obstrw
	objrel		Obskid,-7000,0,$20
	objrel		Obskid3,8000,3000,-$40

	straight	Obpit03
	pushpos		; remember this location cos this is where the pit lane will start
	straight 	Obpit03

	straight	Obstrw
	objrel		Obih1,-21000,0,$200
	straight	Obstrw
	objrel		Obflag3,14000,0,0
	objrel		Obih2,-21000,0,$200
	straight	Obstrw
	objrel		Obgrid,5000,9000,0
	objrel		Obgrid,-5000,4000,0
	objrel		Obih3,-21000,0,$200
	objrel		Obgrid,5000,-1000,0
	objrel		Obflag3,14000,0,0

	straight	Obstrw
	objrel		Obstart,0,6000,0
	objrel		Obgantry,-18500,12000,$200
	objrel		Obgrid,-5000,4000,0
	objrel		Obgrid,5000,-1000,0
	objrel		Obgrid,-5000,-6000,0
	objrel		Obflag3,14000,0,0

	poppos		; recover location for use by pits
	moveit		10000,0,0
	flagoff		DOT
	flagoff		LINE
	straight	Obpit04
	straight	Obpit05
	straight	Obpit06
	straight	Obstrnp
	straight	Obstrnp
	straight	Obstrnp
	objrel	Obpitbuild,20000,0,$100
	straight	Obstrnp
	straight	Obpit07
	straight	Obpit08
	straight	Obpit09


;============= 

; island 3

	gridinit	Oblake0,155000,-180000,$0,30000,30000
	gridobj		Oblake0,$100
	gridobj		Oblake0,$300
	gridobj		Oblake0,$100
	gridline	0

	gridobj		Oblake0,$200
	gridobj		Oblake2,$0
	gridobj		Obsea3,$300
	gridobj		Obsea3,$300
	gridobj		Oblake2,$100
	gridline	1

	gridobj		Obsea3,$200
	gridobj		Oblake4,$100
	gridobj		Oblake4,$200
	gridobj		Obsea3,$000
	gridline	1

	gridobj		Obsea3,$200
	gridobj		Oblake4,$300
	gridobj		Oblake4,$100
	gridobj		Obsea3,$000
	gridline	1

	gridobj		Obsea3,$200
	gridobj		Oblake4,$200
	gridobj		Oblake4,$300
	gridobj		Obsea3,$000
	gridline	1

	gridobj		Obsea3,$200
	gridobj		Oblake4,$100
	gridobj		Oblake4,$200
	gridobj		Obsea3,$000
	gridline	1

	gridobj		Obsea3,$200
	gridobj		Oblake4,$200
	gridobj		Oblake4,$100
	gridobj		Obsea1,$300
	gridobj		Oblake2,$100
	gridline	1

	gridobj		Oblake2,$300
	gridobj		Obsea1,$100
	gridobj		Oblake4,$200
	gridobj		Oblake4,$100
	gridobj		Obsea3,$00
	gridline	2

	gridobj		Oblake2,$300
	gridobj		Obsea3,$100
	gridobj		Obsea3,$100
	gridobj		Oblake2,$200
;	gridline	3

;	gridobj		Oblake0,$100
;	gridobj		Oblake0,$200
;	gridobj		Oblake0,$0
;	gridobj		Oblake0,$300
;	gridobj		Oblake0,$200
;	gridobj		Oblake0,$100

	gridstop

; ISLAND ONE

	gridinit	Oblake0,-315000,-170000,$0,30000,30000
	gridskip	2
	gridobj		Oblake2,$00
	gridobj		Obsea3,$300
	gridobj		Obsea3,$300
	gridobj		Oblake2,$100	
	gridobj		Oblake0,$300
	gridline	1

	gridobj		Oblake0,$100
	gridobj		Oblake0,$300
	gridobj		Obsea3,$200
	gridobj		Oblake4,$100
	gridobj		Oblake4,$00
	gridobj		Obsea3,$00
	gridobj		Oblake0,$0
	gridline	0

	gridobj		Oblake0,$200
	gridobj		Oblake0,$300
	gridobj		Oblake0,$100
	gridobj		Obsea3,$200
	gridobj		Oblake4,$300
	gridobj		Oblake4,$200
	gridobj		Obsea3,$00
	gridobj		Oblake0,$100
	gridline	0

	gridobj		Oblake2,$00
	gridobj		Obsea3,$300
	gridobj		Obsea3,$300
	gridobj		Obsea6,$200
	gridobj		Obsea6,$00
	gridobj		Obsea3,$100
	gridobj		Oblake5,$200
	gridline	0

	gridobj		Obsea3,$200
	gridobj		Oblake4,$100
	gridobj		Oblake4,$200
	gridobj		Oblake4,$300
	gridobj		Obsea3,$0
	gridline	0

	gridobj		Obsea3,$200
	gridobj		Oblake4,$300
	gridobj		Oblake4,$100
	gridobj		Oblake4,$200
	gridobj		Obsea3,$0
	gridline	0

	gridobj		Obsea3,$200
	gridobj		Oblake4,$100
	gridobj		Oblake4,$300
	gridobj		Oblake4,$200
	gridobj		Obsea3,$0
	gridline	0

	gridobj		Obsea3,$200
	gridobj		Oblake4,$100
	gridobj		Oblake4,$300
	gridobj		Oblake4,$200
	gridobj		Obsea3,$0
	gridline	0

	gridobj		Obsea3,$200
	gridobj		Oblake4,$300
	gridobj		Oblake4,$100
	gridobj		Oblake4,$200
	gridobj		Obsea3,$0
	gridline	0

	gridobj		Obsea3,$200
	gridobj		Oblake4,$100
	gridobj		Oblake4,$00
	gridobj		Oblake4,$300
	gridobj		Obsea1,$300
	gridobj		Obsea3,$300
	gridobj		Obsea3,$300
	gridobj		Obsea3,$300
	gridobj		Obsea3,$300
	gridobj		Obsea3,$300
	gridobj		Oblake2,$100
	gridline	0

	gridobj		Obsea3,$200
	gridobj		Oblake4,$100
	gridobj		Oblake4,$200
	gridobj		Oblake4,$300
	gridobj		Oblake4,$00
	gridobj		Oblake4,$200
	gridobj		Oblake4,$300
	gridobj		Oblake4,$200
	gridobj		Oblake4,$300
	gridobj		Oblake4,$200
	gridobj		Obsea3,$00
	gridline	0

	gridobj		Oblake5,$300
	gridobj		Obsea6,$100
	gridobj		Oblake4,$100
	gridobj		Oblake4,$200
	gridobj		Oblake4,$300
	gridobj		Oblake4,$00
	gridobj		Oblake4,$200
	gridobj		Oblake4,$300
	gridobj		Oblake4,$300
	gridobj		Oblake4,$200
	gridobj		Obsea3,$00
	gridline	1

	gridobj		Oblake5,$300
	gridobj		Obsea6,$100
	gridobj		Oblake4,$300
	gridobj		Oblake4,$00
	gridobj		Oblake4,$200
	gridobj		Oblake4,$300
	gridobj		Oblake4,$100
	gridobj		Oblake4,$200
	gridobj		Oblake4,$300
	gridobj		Obsea3,$00
	gridline	2

	gridobj		Oblake5,$300
	gridobj		Obsea3,$100
	gridobj		Obsea3,$100
	gridobj		Obsea3,$100
	gridobj		Obsea3,$100
	gridobj		Obsea3,$100
	gridobj		Obsea3,$100
	gridobj		Obsea3,$100
	gridobj		Oblake2,$200

	gridstop

; island 2

	gridinit	Oblake2,65000,155000,$0,30000,30000
	gridobj		Obsea3,$300
	gridobj		Oblake5,$100
	gridline	0

	gridobj		Obsea3,$200
	gridobj		Oblake4,$0
	gridobj		Obsea6,$300
	gridobj		Obsea3,$300
	gridobj		Obsea3,$300
	gridobj		Oblake2,$100
	gridline	0

	gridobj		Obsea3,$200
	gridobj		Oblake4,$100
	gridobj		Oblake4,$300
	gridobj		Oblake4,$00
	gridobj		Oblake4,$200
	gridobj		Obsea3,$0
	gridline	0

	gridobj		Obsea3,$200
	gridobj		Oblake4,$0
	gridobj		Oblake4,$100
	gridobj		Oblake4,$100
	gridobj		Oblake4,$300
	gridobj		Obsea3,$0
	gridskip	2
	objrel		Oblightho2,0,0,0
	gridobj		Oblake0,$0

	gridstop

; small island for the tight turn piece

;	gridinit	Oblake5,20000,20000,$0,30000,30000
;	gridobj		Obsea3,$300
;	gridobj		Obsea3,$300
;	gridobj		Oblake5,$100
;	gridline	0

	gridinit	Oblake3,20000,20000,$200,30000,30000
	gridobj		Oblake4,$00
	gridobj		Oblake4,$300
	gridobj		Oblake3,$00
	gridline	0

	gridobj		Obsea3,$200
	gridobj		Oblake4,$100
	gridobj		Oblake4,$200
	gridobj		Obsea3,$0
	gridline	0

	gridobj		Obsea3,$200
	gridobj		Oblake4,$300
	gridobj		Oblake4,$200
	gridobj		Obsea3,$0
	gridline	0

	gridobj		Oblake5,$300
	gridobj		Obsea3,$100
	gridobj		Obsea3,$100
	gridobj		Oblake5,$200

	gridstop

	endtrack

