; track 9 - river mouth

Track9::

	start	-40000,200000,$300
	flaginit	%011110000000100000001	; long white lines, warnings, barriers both sides and carpet tiles
;	flags are	:CCLDW----PTTB----PTTB

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

	manbars		Obvhill01r,0
	straight	Obstrw
	park		7500,10000,0

	manbars		Obdhill01k,0
	straight	Obpit03
	park		7500,0,0
	park		7500,10000,0
	objrel		Obroadblock,-16000,6500,$280

	manbars		0,0
	straight	Obpit03
	pitmark
	park		7500,0,0
	park		7500,10000,0
	flagoff		CARPET

	manbars		Obwbar,Obwbar
	straight	Obstrw
	park		7500,0,0

	straight	Obstrw
	straight	Obstrw
	straight	Ob9x
	straight	Obstrw
	flagon		CARPET
	manbars		Obcut01l,Obcut01r
	straight	Obstrw	
	objrel		Obrarrow,-5000,0,$200
	objrel		Obrarrow,5000,0,$200
	objrel		Obsignr,-12000,3300,$200
	objrel		Obsignr,-12000,-3300,$200
	flagoff		LINE
	objrel		Obskid,-1000,0,$40

	twisttgt		16,-$180
	twistinc		8,-$40


	manbars		Obcut01,Obcut01
	straight	Obstrw
	objrel		Obsignr,-12000,3300,$200
	objrel		Obsignr,-12000,-3300,$200

;============= RIGHT BEND, LONG STRAIGHT

	objrel		Obskid2,0,0,$10
	manbars		Obcut04,Obcut05
	right		Obcorw40
	right		Obcorw40

	twisttgt		0,-$180		
	twistinc		-8,0

	flagon		LINE
	manbars		Obmt01l,Obmt01r
	straight	Obstrw
	manbars		Obmt01r,Obmt01l
	objrel		Obskid,-5000,0,-$30
	twisttgt		0,-$280		
	twistinc		0,-$40
	straight	Obstrw
	objrel		Obarrow,5000,0,$200
	objrel		Obarrow,-5000,0,$200
	manbars		Obcut01r,Obcut01l
	straight	Obstrw
	flagoff		CARPET
	manbars		Obwbar,Obwbar
	straight	Obstrw
	objrel		Obskid2,3000,0,$30
	straight	Obstrw
	straight	Obstrw
	flagon		CARPET
	manbars		Obcut01l,Obcut01r
	straight	Obstrw
	objrel		Obskid,1000,0,-$40
	manbars		Obdhill01l,Obcut01
	straight	Obstrw
	objrel		Obrarrow,-5000,0,$200
	objrel		Obrarrow,5000,0,$200
	objrel		Obsignr,-12000,3300,$200
	objrel		Obsignr,-12000,-3300,$200
	flagoff		LINE
	twisttgt	16,$280
	twistinc	2,0
	manbars		Obdmt01l,Obcut01
	straight	Obstrw
	objrel		Obsignr,-12000,3300,$200
	objrel		Obsignr,-12000,-3300,$200

;============= RIGHT U-TURN

	objrel		Obskid2,-4000,0,$50
	manbars		Obdmt04,Obcut05
	right		Obcorw40

	manbars		Obdmt04x,Obcut05
	right		Obcorw40
	objrel		Obskid,-4000,0,$40

	manbars		Obdmt04x,Obcut05
	right		Obcorw40

	manbars		Obdmt04y,Obcut05
	right		Obcorw40

	manbars		Obdmt04x,Obcut05
	right		Obcorw40
	objrel		Obskid,2000,0,-$30

	manbars		Obdmt04,Obcut05
	right		Obcorw40
	twisttgt	0,-$300
	twistinc	-4,-$40

	manbars		Obdmt04y,Obcut05
	right		Obcorw40
	objrel		Obskid,5000,0,$30

	manbars		Obdmt04y,Obcut05
	right		Obcorw40
	flagon		LINE

;============= MEDIUM STRAIGHT, BEND LEFT

	manbars		Obdmt01r,Obcut01
	straight	Obstrw
	objrel		Obskid,-3000,0,$10
	manbars		Obdhill01r,Obcut01
	straight	Obstrw
	objrel		Obarrow,5000,0,$200
	objrel		Obarrow,-5000,0,$200
	manbars		Obcut01r,Obcut01l
	straight	Obstrw
	objrel		Obskid,-1000,0,$40
	flagoff		CARPET
	manbars		Obwbar,Obwbar
	straight	Obstrw
	objrel		Obskid2,0,0,$10
	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
	objrel		Obskid,3000,0,$20
	flagoff		CARPET
	manbars		0,0
	left		Obcorw40
	left		Obcorw40
	flagon		LINE

;============= MEDIUM STRAIGHT, TURN LEFT, MEDIUM STRAIGHT

	straight	Obstrw
	flagoff		CARPET
	manbars		Obwbar,Obwbar
	straight	Obstrw
	objrel		Obarrow,5000,0,$200
	objrel		Obarrow,-5000,0,$200
	straight	Obstrw
	objrel		Obskid,-2000,0,-$10
	straight	Obstrw
	straight	Obstrw
	objrel		Obskid2,1000,0,$10
	flagon		CARPET
	straight	Obstrw
	objrel		Oblarrow,-5000,0,$200
	objrel		Oblarrow,5000,0,$200
	manbars		Obcut01l,Obdhill01k
	flagoff		LINE
	objrel		Obskid,-1000,0,$40
	straight	Obstrw
	objrel		Obsignl,12000,3300,$200
	objrel		Obsignl,12000,-3300,$200
	objrel		Obroadblock,16000,-6500,$80
	manbars		Obdhill04,Obcut05
	left		Obcorw40
	left		Obcorw40
	objrel		Obskid2,2000,0,$10
	left		Obcorw40
	left		Obcorw40
	flagon		LINE
	manbars		Obcut01,Obdhill01x
	straight	Obstrw
	objrel		Obskid2,-3000,0,$40
	manbars		Obcut01y,Obdhill01
	straight	Obstrw
	objrel		Obarrow,5000,0,$200
	objrel		Obarrow,-5000,0,$200
	manbars		Obcut01x,Obdhill01z
	straight	Obstrw
	objrel		Obskid,-1000,0,-$20
	manbars		Obcut01z,Obdhill01y
	straight	Obstrw
	manbars		Obcut01y,Obdhill01x
	straight	Ob9z
	objrel		Obskid2,0,0,$10
	manbars		Obcut01,Obdhill01l
	straight	Obstrw
	objrel		Obsignr,-12000,3300,$200
	objrel		Obsignr,-12000,-3300,$200
	manbars		Obcut01x,Obcut01

	twisttgt	16,-$300
	twistinc	8,0

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

;============= WIDE U-TURN

	flagoff		LINE
	objrel		Obskid,-1000,0,$40
	setbit	3
	manbars		Obcut01a,Obcut01z
	straight	Obstrwv
	manbars		Obcut03yv,Obcut02
	right		Obcorv20

	manbars		Obcut03v,Obcut02
	right		Obcorv20
	objrel		Obskid2,0,0,$10

	manbars		Obcut03xv,Obcut02
	right		Obcorv20

	manbars		Obcut03v,Obcut02
	right		Obcorv20

	manbars		Obcut03yv,Obcut02
	right		Obcorv20
	objrel		Obskid2,3000,0,-$10

	manbars		Obcut03xv,Obcut02
	right		Obcorv20

	manbars		Obcut03xv,Obcut02
	right		Obcorv20

	manbars		Obcut03v,Obcut02
	right		Obcorv20
	objrel		Obskid,-2000,0,$40

	manbars		Obcut03xv,Obcut02
	right		Obcorv20

	manbars		Obcut03yv,Obcut02
	right		Obcorv20

	manbars		Obcut03v,Obcut02
	right		Obcorv20

	manbars		Obcut03xv,Obcut02
	right		Obcorv20

	manbars		Obcut03xv,Obcut02
	right		Obcorv20
	objrel		Obskid2,0,0,$10

	manbars		Obcut03v,Obcut02
	right		Obcorv20
	twisttgt	0,0
	twistinc	-8,$40

	manbars		Obcut03yv,Obcut02
	right		Obcorv20

	manbars		Obcut03xv,Obcut02
	right		Obcorv20
	flagon		LINE
	objrel		Obskid,2000,0,-$10
	manbars		Obdhill01r,Obcut01sp
	reverse		Obstrvw
	clrbit	3

;============= LONG STRAIGHT, RIGHT TURN INTO HOME

	manbars		Obdhill01z,Obdhill01
	straight	Obstrw
	manbars		Obdhill01,Obdhill01x
	straight	Obstrw
	objrel		Obarrow,5000,0,$200
	objrel		Obarrow,-5000,0,$200
	manbars		Obdhill01z,Obdhill01y
	straight	Obstrw
	objrel		Obskid,-1000,0,$10
	manbars		Obdhill01y,Obdhill01x
	straight	Obstrw
	manbars		Obdhill01,Obdhill01z
	straight	Obstrw
	objrel		Obskid2,1000,0,-$10
	manbars		Obdhill01z,Obdhill01y
	straight	Obstrw
	manbars		Obdhill01x,Obdhill01
	straight	Obstrw
	objrel		Obskid,3000,0,$40
	manbars		Obdhill01y,Obdhill01z
	straight	Obstrw
	manbars		Obdhill01x,Obdhill01
	twisttgt	16,-$80
	twistinc	8,-$40
	straight	Obstrw
	objrel		Obsignr,-12000,3300,$200
	objrel		Obsignr,-12000,-3300,$200
	objrel		Obrarrow,-5000,0,$200
	objrel		Obrarrow,5000,0,$200
	flagoff		LINE
	manbars		Obdhill01z,Obdhill01y
	straight	Obstrw
	objrel		Obsignr,-12000,3300,$200
	objrel		Obsignr,-12000,-3300,$200

	manbars		Obdhill03y,Obdhill02
	right		Obcorw20

	manbars		Obdhill03,Obdhill02
	right		Obcorw20
	objrel		Obskid2,2000,0,-$10

	manbars		Obdhill03x,Obdhill02
	right		Obcorw20

	manbars		Obdhill03x,Obdhill02
	right		Obcorw20
	objrel		Obskid,-1000,0,-$40

	manbars		Obdhill03,Obdhill02
	right		Obcorw20

	manbars		Obdhill03y,Obdhill02
	right		Obcorw20

	manbars		Obdhill03x,Obdhill02
	right		Obcorw20
	objrel		Obskid2,2000,0,$10
	twisttgt	0,-$100
	twistinc	-8,-$40

	manbars		Obdhill03,Obdhill02
	right		Obcorw20
	flagon		LINE

	manbars		Obdhill01x,Obdhill01j
	straight	Obstrw
	objrel	Obroadblock,16000,6500,$180

	manbars		Obvhill01l,0
	straight	Obpit03
	pushpos
	manbars		Obvhill01z,0
	straight 	Obpit03
	manbars		Obvhill01r,0
	straight	Obstrw
	objrel		Obskid,-1000,0,$40

	manbars		Obvhill01l,0
	straight	Obstrw
	objrel		Obgrid,5000,9000,0
	objrel		Obgrid,-5000,4000,0
	objrel		Obgrid,5000,-1000,0

	manbars		Obvhill01,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

	manbars		0,0

	poppos		; recover position
	moveit		10000,0,0
	flagoff		DOT
	flagoff		LINE
	straight	Obpit04
	straight	Obpit05
	straight	Obpit06
	straight	Obstrnp
	straight	Obstrnp
	objrel	Obpitbuild,20000,0,$100
	straight	Obpit07
	straight	Obpit08
	straight	Obpit09


;============= GRID DEFINITION OF RIVER

	gridinit	Oblake3,000,-85000,$00,30000,30000
	gridobj		Oblake0,$100
	gridobj		Oblake0,$200
	gridobj		Oblake0,$00
	gridobj		Oblake3,$200
	gridline	0

	gridobj		Oblake3,$00
	gridobj		Oblake0,$300
	gridobj		Oblake0,$00
	gridobj		Oblake0,$100
	gridobj		Oblake3,$200
	gridline	0

	gridobj		Oblake3,$00
	gridobj		Oblake0,$300
	gridobj		Oblake0,$200
	gridobj		Oblake0,$100
	gridobj		Oblake5,$300
	gridobj		Oblake6,$100
	gridline	0

; split happens here

	gridobj		Oblake3,$00
	gridobj		Oblake0,$200
	gridobj		Oblake0,$300
	gridobj		Oblake2,$00
	gridobj		Oblake5,$100
	gridobj		Oblake5,$300
	gridobj		Oblake6,$100
	gridline	0

	gridobj		Oblake3,$00
	gridobj		Oblake0,$100
	gridobj		Oblake0,$100
	gridobj		Oblake3,$200
	gridobj		Oblake6,$300
	gridobj		Oblake5,$100
	gridobj		Oblake5,$300
	gridobj		Oblake6,$100
	gridline	0

	gridobj		Oblake6,$300
	gridobj		Oblake5,$100
	gridobj		Oblake0,$100
	gridobj		Oblake3,$200
	gridskip	1
	gridobj		Oblake6,$300
	gridobj		Oblake5,$100
	gridobj		Oblake5,$300
	gridobj		Oblake6,$100
	gridline	1

	gridobj		Oblake3,$00
	gridobj		Oblake0,$300
	gridobj		Oblake3,$200
	gridskip	2
	gridobj		Oblake6,$300
	gridobj		Oblake5,$100
	gridobj		Oblake5,$300
	gridobj		Oblake6,$100
	gridline	1

	gridobj		Oblake3,$00
	gridobj		Oblake0,$300
	gridobj		Oblake3,$200
	gridskip	3
	gridobj		Oblake6,$300
	gridobj		Oblake5,$100
	gridobj		Oblake5,$300
	gridobj		Oblake6,$100
	gridline	1

	gridobj		Oblake3,$00
	gridobj		Oblake0,$300
	gridobj		Oblake3,$200
	gridskip	4
	gridobj		Oblake6,$300
	gridobj		Oblake5,$100
	gridobj		Oblake5,$300
	gridobj		Oblake6,$100
	gridline	1

	gridobj		Oblake3,$00
	gridobj		Oblake0,$300
	gridobj		Oblake3,$200
	gridskip	5
	gridobj		Oblake6,$300
	gridobj		Oblake5,$100
	gridobj		Oblake5,$300
	gridobj		Oblake6,$100
	gridline	1

	gridobj		Oblake3,$00
	gridobj		Oblake0,$300
	gridobj		Oblake3,$200
	gridline	1

	gridobj		Oblake3,$00
	gridobj		Oblake0,$300
	gridobj		Oblake3,$200

	gridline	1

	gridobj		Oblake3,$00
	gridobj		Oblake0,$300
	gridobj		Oblake3,$200


	gridstop

;============= 
	endtrack
 
