;--------------------------------------
;NWM BVE Route Object File
;--------------------------------------
;(c) TSC team 2009
;www.bve4.net
;
;Original object(c) Anthony Bowden
;www.railsimroutes.co.uk
;and Robert Glass (c) 2002.
;http://scotrailsim.cjb.net
;
;Textures Trainsimcentral 2009

;Please seek permission before using
;any NWM files in your own route.
;
;see 'Readme.txt' file.
;

CreateMeshBuilder,
AddVertex,-0.7, -0.05, 23.50,
AddVertex,-0.7, 1.22, 23.50,
AddVertex,-0.7, 1.22, 7.50,
AddVertex,-0.7, -0.05, 7.50,
AddFace2,0,1,2,3,
GenerateNormals,

LoadTexture,hst_chs.bmp,
SetTextureCoordinates,0,1,1,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,0,0,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,192,192,192,

CreateMeshBuilder,
AddVertex,0.7, -0.05, 23.50,
AddVertex,0.7, 1.22, 23.50,
AddVertex,0.7, 1.22, 7.50,
AddVertex,0.7, -0.05, 7.50,
AddFace2,0,1,2,3,
GenerateNormals,

LoadTexture,hst_chs.bmp,
SetTextureCoordinates,0,1,1,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,0,0,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,192,192,192,

;Side Left
CreateMeshBuilder,
AddVertex,-1.13, 3.28, 24.75,
AddVertex,-1.2, 3.28, 8.58,
AddVertex,-1.2, 1.5, 6.98,
AddVertex,-0.68, 0, 8.58,
AddVertex,-0.82, 0, 24.75,
AddVertex,-1.2, 1.5, 24.75,
AddVertex,-1.1, 3.28, 8.0,
AddVertex,-1.1, 1.5, 6.4,
AddVertex,-0.56, 0, 7.995,
AddFace,0,1,2,5,
AddFace,5,2,3,4,
AddFace,1,6,7,2,
AddFace,2,7,8,3,
GenerateNormals,

LoadTexture,hst_s.bmp,
SetTextureCoordinates,0, 1, 0,
SetTextureCoordinates,1, 0.127, 0,
SetTextureCoordinates,2, 0.042, 0.5,
SetTextureCoordinates,3, 0.112, 1,
SetTextureCoordinates,4, 1, 1,
SetTextureCoordinates,5, 1, 0.5,
SetTextureCoordinates,6, 0.095, 0,
SetTextureCoordinates,7, 0.01, 0.49,
SetTextureCoordinates,8, 0.08, 1,

SetDecalTransparentColor,0,0,0,

;Roof L
CreateMeshBuilder,
AddVertex,-0.2, 3.8, 24.75,
AddVertex,-0.2, 3.9, 9,
AddVertex,-0.6, 3.8, 8.5,
AddVertex,-0.6, 3.71, 24.75,
AddVertex,-1.0, 3.5, 24.75,
AddVertex,-1.06, 3.5, 8.58,
AddVertex,-1.13, 3.26, 24.75,
AddVertex,-1.2, 3.26, 8.58,
AddVertex,-0.0, 3.805, 24.75,
AddVertex,-0.0, 3.901, 9,
AddFace,0,1,2,3
AddFace,3,2,5,4,
AddFace,4,5,7,6,
Addface,1,0,8,9,
GenerateNormals,

LoadTexture,HST_roof.bmp,
SetTextureCoordinates,0, 1, 0,
SetTextureCoordinates,1, 0.150, 0,
SetTextureCoordinates,2, 0.122, 0.2,
SetTextureCoordinates,3, 1, 0.2,
SetTextureCoordinates,4, 1, 0.5,
SetTextureCoordinates,5, 0.125, 0.5,
SetTextureCoordinates,6, 1, 1,
SetTextureCoordinates,7, 0.124, 1,
SetTextureCoordinates,8, 1, 0.2
SetTextureCoordinates,9, 0.1500, 0,


;Roof R
CreateMeshBuilder,
AddVertex,0.2, 3.8, 24.75,
AddVertex,0.2, 3.9, 9,
AddVertex,0.6, 3.8, 8.5,
AddVertex,0.6, 3.71, 24.75,
AddVertex,1.0, 3.5, 24.75,
AddVertex,1.06, 3.5, 8.58,
AddVertex,1.13, 3.26, 24.75,
AddVertex,1.2, 3.26, 8.58,
AddVertex,-0.0, 3.805, 24.75,
AddVertex,-0.0, 3.901, 9,
AddFace,3,2,1,0,
AddFace,4,5,2,3,
AddFace,6,7,5,4,
Addface,9,8,0,1,
GenerateNormals,

LoadTexture,HST_roof.bmp,
SetTextureCoordinates,0, 1, 0,
SetTextureCoordinates,1, 0.150, 0,
SetTextureCoordinates,2, 0.122, 0.2,
SetTextureCoordinates,3, 1, 0.2,
SetTextureCoordinates,4, 1, 0.5,
SetTextureCoordinates,5, 0.125, 0.5,
SetTextureCoordinates,6, 1, 1,
SetTextureCoordinates,7, 0.124, 1,
SetTextureCoordinates,8, 1, 0.2
SetTextureCoordinates,9, 0.1500, 0,

;Side R
CreateMeshBuilder,
AddVertex,1.13, 3.28, 24.75,
AddVertex,1.2, 3.28, 8.58,
AddVertex,1.2, 1.5, 6.98,
AddVertex,0.68, 0, 8.58,
AddVertex,0.82, 0, 24.75,
AddVertex,1.2, 1.5, 24.75,
AddVertex,1.1, 3.28, 8.0,
AddVertex,1.1, 1.5, 6.4,
AddVertex,0.56, 0, 7.995,
AddFace,5,2,1,0,
AddFace,4,3,2,5,
AddFace,2,7,6,1,
AddFace,3,8,7,2,
GenerateNormals,

LoadTexture,hst_s2.bmp,
SetTextureCoordinates,0, 1, 0,
SetTextureCoordinates,1, 0.127, 0,
SetTextureCoordinates,2, 0.042, 0.5,
SetTextureCoordinates,3, 0.112, 1,
SetTextureCoordinates,4, 1, 1,
SetTextureCoordinates,5, 1, 0.5,
SetTextureCoordinates,6, 0.095, 0,
SetTextureCoordinates,7, 0.01, 0.49,
SetTextureCoordinates,8, 0.08, 1,

SetDecalTransparentColor,0,0,0,

;;Front - Roof Dome
;;
CreateMeshBuilder,
AddVertex,-0.2,3.9,9,
AddVertex,0.2,3.9,9,
AddVertex,0.6, 3.8, 8.5,
AddVertex,0.75, 3.5, 7.95,
AddVertex,0.8, 3.28, 7.7,
AddVertex,-0.8, 3.28, 7.7,
AddVertex,-0.75, 3.5, 7.95,
AddVertex,-0.6, 3.8, 8.5,
AddVertex,0.98, 3.5, 8.2,
AddVertex,1.1,3.28,8.0,
AddVertex,1.06, 3.5, 8.58,
AddVertex,1.2, 3.28, 8.58,
AddVertex,-0.98, 3.5, 8.2,
AddVertex,-1.1,3.28,8.0,
AddVertex,-1.06, 3.5, 8.58,
AddVertex,-1.2, 3.28, 8.58,
AddFace,0,1,2,7,
AddFace,7,2,3,6,
AddFace,6,3,4,5,
AddFace,3,8,9,4,
AddFace,8,10,11,9,
AddFace,2,8,3,
AddFace,2,10,8
AddFace,12,6,5,13,
AddFace,14,12,13,15,
AddFace,7,6,12,
AddFace,7,12,14,
GenerateNormals,

LoadTexture,hst_ftop.png,
SetTextureCoordinates,0,0.415,0
SetTextureCoordinates,1,0.585,0
SetTextureCoordinates,2,0.76,0.06
SetTextureCoordinates,3,0.83,0.23
SetTextureCoordinates,4,0.85,0.30
SetTextureCoordinates,5,0.15,0.30
SetTextureCoordinates,6,0.17,0.23
SetTextureCoordinates,7,0.24,0.06
SetTextureCoordinates,8,0.985,0.23
SetTextureCoordinates,9,0.985,0.30
SetTextureCoordinates,10,0.86,0.23
SetTextureCoordinates,11,0.86,0.30
SetTextureCoordinates,12,0.015,0.23
SetTextureCoordinates,13,0.015,0.30
SetTextureCoordinates,14,0.14,0.23
SetTextureCoordinates,15,0.14,0.30

;; Front - cab
;;
CreateMeshBuilder,
AddVertex,-1.1,3.28,8.0,
AddVertex,-0.8,3.28,7.7,
AddVertex,0.8,3.28,7.7,
AddVertex,1.1,3.28,8.0,
AddVertex,1.1,1.48,6.4,
AddVertex,0.8,1.48,6.1,
AddVertex,-0.8,1.48,6.1,
AddVertex,-1.1,1.48,6.4,
AddFace,0,1,6,7,
AddFace,1,2,5,6,
AddFace,2,3,4,5,
GenerateNormals,

LoadTexture,hst_ftop.png,
SetTextureCoordinates,0, 0.015, 0.30,
SetTextureCoordinates,1, 0.15, 0.30,
SetTextureCoordinates,2, 0.85, 0.30,
SetTextureCoordinates,3, 0.985, 0.30,
SetTextureCoordinates,4, 0.985, 1,
SetTextureCoordinates,5, 0.85, 1,
SetTextureCoordinates,6, 0.15, 1,
SetTextureCoordinates,7, 0.015, 1,

;; Front bottom
;;
CreateMeshBuilder,
AddVertex,-1.1,1.5,6.4,
AddVertex,-0.8,1.5,6.1,
AddVertex,0.8,1.5,6.1,
AddVertex,1.1,1.5,6.4,
AddVertex,0.8,0.65,7.35,
AddVertex,0.70,0.65,6.95,
AddVertex,-0.70,0.65,6.95,
AddVertex,-0.8,0.65,7.35,
AddFace,0,1,6,7,
AddFace,1,2,5,6,
AddFace,2,3,4,5,
GenerateNormals,

LoadTexture,hstftb.bmp,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 0.15, 0,
SetTextureCoordinates,2, 0.85, 0,
SetTextureCoordinates,3, 1, 0,
SetTextureCoordinates,4, 1, 0.5,
SetTextureCoordinates,5, 0.82, 0.5,
SetTextureCoordinates,6, 0.18, 0.5,
SetTextureCoordinates,7, 0, 0.5,
SetDecalTransparentColor,0,0,0,

;; Rear End
;;
CreateMeshBuilder,
AddVertex, 1.23 ,  1 , 24.75 ,
AddVertex, 1.23 ,  3.855 , 24.75 ,
AddVertex,-1.23 ,  3.855 , 24.75 ,
AddVertex,-1.23 ,  1 , 24.75 ,
AddFace2, 0,1,2,3,
GenerateNormals,

LoadTexture,mk2end.bmp,
SetTextureCoordinates,0,1,1,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,0,0,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,0,0,255

;; Lights glow

CreateMeshBuilder,
AddVertex,-0.6, 1.7, 6.1,
AddVertex,-1.35, 1.7, 6.8,
AddVertex,-1.35, 1.3, 6.48,
AddVertex,-0.6, 1.3, 5.78,
AddVertex,0.6, 1.7, 6.1,
AddVertex,1.35, 1.7, 6.8,
AddVertex,1.35, 1.3, 6.48,
AddVertex,0.6, 1.3, 5.78,
AddFace2,3,2,1,0,
AddFace2,4,5,6,7,
GenerateNormals,
translate,0,0.16,0,

LoadTexture,glow_white.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,
SetDecalTransparentColor,0,0,0,
SetEmissiveColor,255,255,255,
SetBlendMode,Additive,5,
Translateall,0,0,-15.625
RotateAll,0,180,0,180