;--------------------------------------
;NWM BVE Route Object File
;--------------------------------------
;
;www.bve4.net
;
;Object (c) Shane Roberts 2006. LMR textures by TSC Team
;www.midland-bve.co.uk
;Originally a Derby to Stoke route object
;
;This object has been modified and used with permission by its original author for use in NWM

;;LH side
CreateMeshBuilder,
AddVertex,-1.02, 3.20, 24.25,
AddVertex,-1.02, 3.20, 0.7,
AddVertex,-1.17, 1.54, 0.372,
AddVertex,-1.17, 1.54, 24.25,
AddVertex,-0.98, 1, 0.28,
AddVertex,-0.98, 1, 24.25,
AddFace,0,1,2,3,
AddFace,4,5,3,2,
GenerateNormals,
setemissivecolor,15,15,15,
LoadTexture,170a_sc.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 0.986, 0,
SetTextureCoordinates,2, 1, 0.8,
SetTextureCoordinates,3, 0, 0.8,
SetTextureCoordinates,4, 1.002, 1,
SetTextureCoordinates,5, 0, 1,

;;RH side
CreateMeshBuilder,
AddVertex,1.02, 3.20, 24.25,
AddVertex,1.02, 3.20, 0.7,
AddVertex,1.17, 1.54, 0.372,
AddVertex,1.17, 1.54, 24.25,
AddVertex,0.98, 1, 0.26,
AddVertex,0.98, 1, 24.25,
AddFace,3,2,1,0,
AddFace,2,3,5,4,
GenerateNormals,
setemissivecolor,15,15,15,
LoadTexture,170b_sc.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 0.986, 0,
SetTextureCoordinates,2, 1, 0.8,
SetTextureCoordinates,3, 0, 0.8,
SetTextureCoordinates,4, 1.002, 1,
SetTextureCoordinates,5, 0, 1,

;coupler
CreateMeshBuilder,
AddVertex,0.22,0.65,0,
AddVertex,0.22,1.12,0,
AddVertex,-0.22,1.12,0,
AddVertex,-0.22,0.65,0,
AddFace,3,2,1,0,
LoadTexture,coupling_front.png,
SetTextureCoordinates,0,0,1,
SetTextureCoordinates,1,0,0,
SetTextureCoordinates,2,1,0,
SetTextureCoordinates,3,1,1,

CreateMeshBuilder,
AddVertex,-0.22,0.65,0,
AddVertex,-0.22,1.12,0,
AddVertex,-0.22,1.12,0.4,
AddVertex,-0.22,0.65,0.4,
AddVertex,0.22,0.65,0,
AddVertex,0.22,1.12,0,
AddVertex,0.22,1.12,0.4,
AddVertex,0.22,0.65,0.4,
AddFace,3,2,1,0,
AddFace,4,5,6,7,
LoadTexture,coupling_side.png,
SetTextureCoordinates,0,0,1,
SetTextureCoordinates,1,0,0,
SetTextureCoordinates,2,1,0,
SetTextureCoordinates,3,1,1,
SetTextureCoordinates,4,0,1,
SetTextureCoordinates,5,0,0,
SetTextureCoordinates,6,1,0,
SetTextureCoordinates,7,1,1,

CreateMeshBuilder,
AddVertex,-0.22,1.12,0,
AddVertex,0.22,1.12,0,
AddVertex,0.22,1.12,0.4,
AddVertex,-0.22,1.12,0.4,
AddFace,3,2,1,0,
LoadTexture,coupling_top.png,
SetTextureCoordinates,0,0,1,
SetTextureCoordinates,1,0,0,
SetTextureCoordinates,2,1,0,
SetTextureCoordinates,3,1,1,

;;connection
CreateMeshBuilder,
AddVertex,-0.4, 3.20, 24.5,
AddVertex,-0.4, 3.20, 24.25,
AddVertex,-0.4, 0.9, 24.25,
AddVertex,-0.4, 0.9, 24.5,
AddVertex,0.4, 3.20, 24.5,
AddVertex,0.4, 3.20, 24.25,
AddVertex,0.4, 1.1, 24.25,
AddVertex,0.4, 1.1, 24.5,
AddFace,0,1,2,3,
AddFace,4,5,1,0,
AddFace,7,6,5,4,
GenerateNormals,
setemissivecolor,15,15,15,
LoadTexture,join.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 1,
SetTextureCoordinates,3, 0,1,
SetTextureCoordinates,4, 0, 0,
SetTextureCoordinates,5, 1, 0,
SetTextureCoordinates,6, 1, 1,
SetTextureCoordinates,7, 0,1,

;Front
CreateMeshBuilder,
AddVertex,-1.24, 3.65, 0.79,
AddVertex,1.24, 3.65, 0.79,
AddVertex,1.22, 0.92, 0.25,
AddVertex,-1.22, 0.92, 0.25,
AddVertex,1.21, 0.3, 0.27,
AddVertex,-1.21, 0.3, 0.27,
AddFace,0,1,2,3,
AddFace,3,2,4,5
GenerateNormals,
setemissivecolor,15,15,15,
LoadTexture,170front_sc.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 0.79,
SetTextureCoordinates,3, 0, 0.79,
SetTextureCoordinates,4, 1, 1,
SetTextureCoordinates,5, 0, 1,
SetDecalTransparentColor,255,0,0,

;back
CreateMeshBuilder,
AddVertex,-1.195, 3.6, 24.25,
AddVertex,1.195, 3.6, 24.25,
AddVertex,1.175, 0.92, 24.25,
AddVertex,-1.175, 0.92, 24.25,
AddVertex,1.155, 0.3, 24.25,
AddVertex,-1.155, 0.3, 24.25,
AddFace,3,2,1,0,
AddFace,5,4,2,3,
GenerateNormals,
setemissivecolor,15,15,15,
LoadTexture,170back.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 0.79,
SetTextureCoordinates,3, 0, 0.79,
SetTextureCoordinates,4, 1, 1,
SetTextureCoordinates,5, 0, 1,
SetDecalTransparentColor,0,255,0,

;Roof
CreateMeshBuilder,
AddVertex,0, 3.53, 24.25, 0.02
AddVertex,0, 3.53, 1.00, 0.02
AddVertex,-0.2, 3.51, 24.25, 0.02
AddVertex,-0.2, 3.51, 1.00, 0.02
AddVertex,-0.5, 3.49, 1.00, 0.02
AddVertex,-0.5, 3.49, 24.25, 0.02
AddVertex,-0.9, 3.3, 24.25, 0.02
AddVertex,-0.9, 3.3, 1.00, 0.02
AddVertex,-1.02, 3.18, 24.25,
AddVertex,-1.02, 3.18, 1.00,
AddVertex,0.2, 3.51, 24.25, 0.02  
AddVertex,0.2, 3.51, 1.00, 0.02
AddVertex,0.5, 3.49, 1.00, 0.02
AddVertex,0.5, 3.49, 24.25, 0.02
AddVertex,0.9, 3.3, 24.25,  0.02
AddVertex,0.9, 3.3, 1.00, 0.02
AddVertex,1.02, 3.18, 24.25,
AddVertex,1.02, 3.18, 1.00, 
AddFace,0,1,3,2,
AddFace,2,3,4,5,
AddFace,5,4,7,6,
AddFace,6,7,9,8,
AddFace,1,0,10,11,
AddFace,11,10,13,12,
AddFace,14,15,12,13,
AddFace,16,17,15,14,
GenerateNormals,
SetColor,120,120,120,

;Roof
CreateMeshBuilder,
AddVertex,0, 3.53, 1.01, 0.02  
AddVertex,0, 3.41, 0.745, 0.02
AddVertex,-0.2, 3.51, 1.01, 0.02
AddVertex,-0.2, 3.41, 0.745, 0.02
AddVertex,-0.5, 3.38, 0.74, 0.02
AddVertex,-0.5, 3.49, 1.01, 0.02
AddVertex,-0.9, 3.3, 1.01, 0.02
AddVertex,-0.87, 3.3, 0.72, 0.02
AddVertex,-1.02, 3.18, 1.01, 0.02
AddVertex,-1.02, 3.18, 0.69,0.02

AddVertex,0.2, 3.51, 1.01,  0.02
AddVertex,0.2, 3.41, 0.745, 0.02
AddVertex,0.5, 3.38, 0.74,0.02
AddVertex,0.5, 3.49, 1.01,0.02
AddVertex,0.9, 3.3, 1.01, 0.02
AddVertex,0.87, 3.3, 0.72,0.02
AddVertex,1.02, 3.18, 1.01,0.02
AddVertex,1.02, 3.18, 0.69, 0.02
AddFace,0,1,3,2,
AddFace,2,3,4,5,
AddFace,5,4,7,6,
AddFace,6,7,9,8,
AddFace,1,0,10,11,
AddFace,11,10,13,12,
AddFace,14,15,12,13,
AddFace,16,17,15,14,
GenerateNormals,
setemissivecolor,15,15,15,
LoadTexture,170top_sc.png,
SetTextureCoordinates,0, 0, 1.2,
SetTextureCoordinates,1, 1, 1.2,
SetTextureCoordinates,2, 1, 2.2,
SetTextureCoordinates,3, 0, 2.2,
SetTextureCoordinates,4, 0, 4.2,
SetTextureCoordinates,5, 1, 4.2,
SetTextureCoordinates,6, 0, 0,
SetTextureCoordinates,7, 1, 0,
SetTextureCoordinates,8, 0, 0,
SetTextureCoordinates,9, 1, 0,
SetTextureCoordinates,10, 0, 2.2,
SetTextureCoordinates,11, 1, 2.2,
SetTextureCoordinates,12, 1, 4.2,
SetTextureCoordinates,13, 0, 4.2,
SetTextureCoordinates,14, 0, 0,
SetTextureCoordinates,15, 1, 0,
SetTextureCoordinates,16, 0, 0,
SetTextureCoordinates,17, 1, 0,


;bogie
CreateMeshBuilder,
AddVertex,-0.8, 1.12, 5.92,
AddVertex,-0.8, 1.12, 2.12,
AddVertex,-0.8, 0.0, 2.12,
AddVertex,-0.8, 0.0, 5.92,
AddVertex,0.8, 1.12, 5.92,
AddVertex,0.8, 1.12, 2.12,
AddVertex,0.8, 0.0, 2.12,
AddVertex,0.8, 0.0, 5.92,
AddVertex,-0.8, 1.12, 19.6,
AddVertex,-0.8, 1.12, 23.4,
AddVertex,-0.8, 0, 23.4,
AddVertex,-0.8, 0, 19.6,
AddVertex,0.8, 1.12, 19.6,
AddVertex,0.8, 1.12, 23.4,
AddVertex,0.8, 0, 23.4,
AddVertex,0.8, 0, 19.6,
AddFace2,0,1,2,3,
AddFace2,7,6,5,4,
AddFace2,11,10,9,8,
AddFace2,12,13,14,15,
GenerateNormals,
setemissivecolor,15,15,15,
LoadTexture,170bogie.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 1,
SetTextureCoordinates,3, 0, 1,
SetTextureCoordinates,4, 0, 0,
SetTextureCoordinates,5, 1, 0,
SetTextureCoordinates,6, 1, 1,
SetTextureCoordinates,7, 0, 1,
SetTextureCoordinates,8, 0, 0,
SetTextureCoordinates,9, 1, 0,
SetTextureCoordinates,10, 1, 1,
SetTextureCoordinates,11, 0, 1,
SetTextureCoordinates,12, 0, 0,
SetTextureCoordinates,13, 1, 0,
SetTextureCoordinates,14, 1, 1,
SetTextureCoordinates,15, 0, 1,
SetDecalTransparentColor,0,128,0,

;wheels
CreateMeshBuilder,
AddVertex,-0.7, 1.1, 5.92,
AddVertex,-0.7, 1.1, 2.12,
AddVertex,-0.7, -0.02, 2.12,
AddVertex,-0.7, -0.02, 5.92,
AddVertex,0.7, 1.1, 5.92,
AddVertex,0.7, 1.1, 2.12,
AddVertex,0.7, -0.02, 2.12,
AddVertex,0.7, -0.02, 5.92,
AddVertex,-0.7, 1.1, 19.6,
AddVertex,-0.7, 1.1, 23.4,
AddVertex,-0.7, -0.02, 23.4,
AddVertex,-0.7, -0.02, 19.6,
AddVertex,0.7, 1.1, 19.6,
AddVertex,0.7, 1.1, 23.4,
AddVertex,0.7, -0.02, 23.4,
AddVertex,0.7, -0.02, 19.6,
AddFace2,0,1,2,3,
AddFace2,7,6,5,4,
AddFace2,11,10,9,8,
AddFace2,12,13,14,15,
GenerateNormals,
setemissivecolor,15,15,15,
LoadTexture,170bogie2.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 1,
SetTextureCoordinates,3, 0, 1,
SetTextureCoordinates,4, 0, 0,
SetTextureCoordinates,5, 1, 0,
SetTextureCoordinates,6, 1, 1,
SetTextureCoordinates,7, 0, 1,
SetTextureCoordinates,8, 0, 0,
SetTextureCoordinates,9, 1, 0,
SetTextureCoordinates,10, 1, 1,
SetTextureCoordinates,11, 0, 1,
SetTextureCoordinates,12, 0, 0,
SetTextureCoordinates,13, 1, 0,
SetTextureCoordinates,14, 1, 1,
SetTextureCoordinates,15, 0, 1,
SetDecalTransparentColor,0,128,0,

;;LH engine
CreateMeshBuilder,
AddVertex,-1, 1.13, 19.75,
AddVertex,-1, 1.13, 16.52,
AddVertex,-0.8, 0.0, 16.52,
AddVertex,-0.8, 0.0, 19.75,
AddFace2,0,1,2,3,
GenerateNormals,
setemissivecolor,15,15,15,
LoadTexture,part1.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 1,
SetTextureCoordinates,3, 0, 1,
SetDecalTransparentColor,0,128,0,

CreateMeshBuilder,
AddVertex,-1, 1.13, 16.52,
AddVertex,-1, 1.13, 13.52,
AddVertex,-0.8, 0.0, 13.52,
AddVertex,-0.8, 0.0, 16.52,
AddFace2,0,1,2,3,
GenerateNormals,
setemissivecolor,15,15,15,
LoadTexture,part2.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 1,
SetTextureCoordinates,3, 0, 1,
SetDecalTransparentColor,0,128,0,

CreateMeshBuilder,
AddVertex,-0.9, 1.13, 13.52,
AddVertex,-0.9, 1.13, 8.52,
AddVertex,-0.9, 0.2, 8.52,
AddVertex,-0.9, 0.2, 13.52,
AddFace2,0,1,2,3,
GenerateNormals,
setemissivecolor,15,15,15,
LoadTexture,part3.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 1,
SetTextureCoordinates,3, 0, 1,
SetDecalTransparentColor,0,128,0,

CreateMeshBuilder,
AddVertex,-1, 1.12, 8.52,
AddVertex,-1, 1.12, 5.92,
AddVertex,-0.8, 0.2, 5.92,
AddVertex,-0.8, 0.2, 8.52,
AddFace2,0,1,2,3,
GenerateNormals,
setemissivecolor,15,15,15,
LoadTexture,part4.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 1,
SetTextureCoordinates,3, 0, 1,
SetDecalTransparentColor,0,128,0,


;;RH engine
CreateMeshBuilder,
AddVertex,1, 1.13, 19.75,
AddVertex,1, 1.13, 16.52,
AddVertex,0.8, 0.0, 16.52,
AddVertex,0.8, 0.0, 19.75,
AddFace2,3,2,1,0,
GenerateNormals,
setemissivecolor,15,15,15,
LoadTexture,part1.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 1,
SetTextureCoordinates,3, 0, 1,
SetDecalTransparentColor,0,128,0,

CreateMeshBuilder,
AddVertex,1, 1.13, 16.52,
AddVertex,1, 1.13, 13.52,
AddVertex,0.8, 0.0, 13.52,
AddVertex,0.8, 0.0, 16.52,
AddFace2,3,2,1,0,
GenerateNormals,
setemissivecolor,15,15,15,
LoadTexture,part2.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 1,
SetTextureCoordinates,3, 0, 1,
SetDecalTransparentColor,0,128,0,

CreateMeshBuilder,
AddVertex,0.9, 1.13, 13.52,
AddVertex,0.9, 1.13, 8.52,
AddVertex,0.9, 0.2, 8.52,
AddVertex,0.9, 0.2, 13.52,
AddFace2,3,2,1,0,
GenerateNormals,
setemissivecolor,15,15,15,
LoadTexture,part3.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 1,
SetTextureCoordinates,3, 0, 1,
SetDecalTransparentColor,0,128,0,

CreateMeshBuilder,
AddVertex,1, 1.12, 8.52,
AddVertex,1, 1.12, 5.92,
AddVertex,0.8, 0.2, 5.92,
AddVertex,0.8, 0.2, 8.52,
AddFace2,3,2,1,0,
GenerateNormals,
setemissivecolor,15,15,15,
LoadTexture,part4.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 1,
SetTextureCoordinates,3, 0, 1,
SetDecalTransparentColor,0,128,0,


;;LH skirt
CreateMeshBuilder,
AddVertex,-1, 1.1, 2.12,
AddVertex,-1, 1.1, 0.22,
AddVertex,-0.9, 0.3, 0.22,
AddVertex,-0.9, 0.3, 2.12,
AddFace2,0,1,2,3,
GenerateNormals,
setemissivecolor,15,15,15,
LoadTexture,part5.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 1,
SetTextureCoordinates,3, 0, 1,
SetDecalTransparentColor,0,128,0,


;;RH skirt
CreateMeshBuilder,
AddVertex,1, 1.1, 2.12,
AddVertex,1, 1.1, 0.22,
AddVertex,0.9, 0.3, 0.22,
AddVertex,0.9, 0.3, 2.12,
AddFace2,3,2,1,0,
GenerateNormals,
setemissivecolor,15,15,15,
LoadTexture,part5.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 1,
SetTextureCoordinates,3, 0, 1,
SetDecalTransparentColor,0,128,0,


;;Plow,
CreateMeshBuilder,
AddVertex,0.9, 0.3, 0.75,
AddVertex,0, 0.15, 0.75,
AddVertex,0, 0.75, 0.9,
AddVertex,0.9, 0.75, 0.9,
AddVertex,-0.9, 0.3, 0.75,
AddVertex,-0.9, 0.75, 0.9,
AddFace2,0,1,2,3,
AddFace2,5,2,1,4,
GenerateNormals,
setemissivecolor,15,15,15,
SetColor,100,80,10,

;night lighting

CreateMeshBuilder,
AddVertex,-1.02, 3.20, 24.25,
AddVertex,-1.02, 3.20, 0.7,
AddVertex,-1.17, 1.54, 0.372,
AddVertex,-1.17, 1.54, 24.25,
AddVertex,-0.98, 1, 0.28,
AddVertex,-0.98, 1, 24.25,
AddFace,0,1,2,3,
AddFace,4,5,3,2,
GenerateNormals,
LoadTexture,dk170a_sc.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 0.986, 0,
SetTextureCoordinates,2, 1, 0.8,
SetTextureCoordinates,3, 0, 0.8,
SetTextureCoordinates,4, 1.002, 1,
SetTextureCoordinates,5, 0, 1,
setemissivecolor,190,190,190,
SetDecalTransparentColor,0,0,0,
translate,-0.005,

CreateMeshBuilder,
AddVertex,1.02, 3.20, 24.25,
AddVertex,1.02, 3.20, 0.7,
AddVertex,1.17, 1.54, 0.372,
AddVertex,1.17, 1.54, 24.25,
AddVertex,0.98, 1, 0.26,
AddVertex,0.98, 1, 24.25,
AddFace,3,2,1,0,
AddFace,2,3,5,4,
GenerateNormals,
LoadTexture,dk170a_sc.png,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 0.986, 0,
SetTextureCoordinates,2, 1, 0.8,
SetTextureCoordinates,3, 0, 0.8,
SetTextureCoordinates,4, 1.002, 1,
SetTextureCoordinates,5, 0, 1,
setemissivecolor,190,190,190,
SetDecalTransparentColor,0,0,0,
translate,0.005,


rotateall,0,1,0,180,
translateall,0,0,24.5,

translateall,0,0,-11.3,