;--------------------------------------
;NWM BVE Route Object File
;-------------------------------------- 
;(c) TSC team 2008
;www.bve4.net
;
;Please seek permission before using
;any NWM files in your own route.
;
;see 'Readme.txt' file.
;
; Modified for use as exterior train view in Openbve 6.0-
; Glow lights: from OpenBVE
; S.Green July 08
; Fixed 01.09

CreateMeshBuilder,
AddVertex,-0.4, 1.1, 0.1,
AddVertex,-0.4, 1.1, 0.8,
AddVertex,-0.47, 1.2, 0.1,
AddVertex,-0.47, 1.2, 0.8,
AddVertex,-0.47, 3.33, 0.1,
AddVertex,-0.47, 3.33, 0.8,
AddVertex,-0.4, 3.43, 0.1,
AddVertex,-0.4, 3.43, 0.8,
AddVertex,0.4, 3.43, 0.1,
AddVertex,0.4, 3.43, 0.8,
AddVertex,0.47, 3.33, 0.1,
AddVertex,0.47, 3.33, 0.8,
AddVertex,0.47, 1.2, 0.1,
AddVertex,0.47, 1.2, 0.8,
AddVertex,0.4, 1.1, 0.1,
AddVertex,0.4, 1.1, 0.8,
AddFace2,0,1,3,2,
AddFace2,2,3,5,4,
AddFace2,4,5,7,6,
AddFace2,6,7,9,8,
AddFace2,8,9,11,10,
AddFace2,10,11,13,12,
AddFace2,12,13,15,14,
SetColor,55,55,55,
Translate,0,0,-12.7,
GenerateNormals,

CreateMeshBuilder,
AddVertex,-0.4, 1.1, 0.1,
AddVertex,-0.4, 1.1, 0.8,
AddVertex,-0.47, 1.2, 0.1,
AddVertex,-0.47, 1.2, 0.8,
AddVertex,-0.47, 3.33, 0.1,
AddVertex,-0.47, 3.33, 0.8,
AddVertex,-0.4, 3.43, 0.1,
AddVertex,-0.4, 3.43, 0.8,
AddVertex,0.4, 3.43, 0.1,
AddVertex,0.4, 3.43, 0.8,
AddVertex,0.47,3.33, 0.1,
AddVertex,0.47,3.33, 0.8,
AddVertex,0.47,1.2, 0.1,
AddVertex,0.47,1.2, 0.8,
AddVertex,0.47,1.1, 0.1,
AddVertex,0.47,1.1, 0.8,
AddFace2,0,1,3,2,
AddFace2,2,3,5,4,
AddFace2,4,5,7,6,
AddFace2,6,7,9,8,
AddFace2,8,9,11,10,
AddFace2,10,11,13,12,
AddFace2,12,13,15,14,
SetColor,55,55,55,
Translate,0,0,11.9,
GenerateNormals,

CreateMeshBuilder,
AddVertex,-1.21,1.11,0.25,
AddVertex,-1.21,3.8,0.25,
AddVertex,1.21,3.8,0.25,
AddVertex,1.21,1.11,0.25,
AddFace,0,1,2,3,
Translate,0,0,-12.5,
GenerateNormals,

LoadTexture,153b.bmp,
SetTextureCoordinates,0,0,1,
SetTextureCoordinates,1,0,0,
SetTextureCoordinates,2,1,0,
SetTextureCoordinates,3,1,1,
SetDecalTransparentColor,0,0,255

;rear
CreateMeshBuilder,
AddVertex,1.21,1.11,24.75,
AddVertex,1.21,3.8,24.75,
AddVertex,-1.21,3.8,24.75,
AddVertex,-1.21,1.11,24.75,
AddFace,0,1,2,3,
Translate,0,0,-12.5,
GenerateNormals,

LoadTexture,153f.bmp,
SetTextureCoordinates,0,0,1,
SetTextureCoordinates,1,0,0,
SetTextureCoordinates,2,1,0,
SetTextureCoordinates,3,1,1,
SetDecalTransparentColor,0,0,255

;Roof fill
CreateMeshBuilder,
AddVertex,0.2, 3.8, 24.75,
AddVertex,0.2, 3.8, 0.25,
AddVertex,-0.2, 3.8, 0.25,
AddVertex,-0.2, 3.8, 24.75,
Translate,0,0,-12.5,
AddFace,0,1,2,3,
GenerateNormals,

LoadTexture,150roof.bmp,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 2,
SetTextureCoordinates,3, 0, 2,

;Chassis Front
CreateMeshBuilder,
AddVertex,-1.2,1.2,0.25,
AddVertex,-0.6,1.2,0.25,
AddVertex,0.6,1.2,0.25,
AddVertex,1.2,1.2,0.25,
AddVertex,-1.2,0,0.75,
AddVertex,-0.6,0,0.25,
AddVertex,0.6,0,0.25,
AddVertex,1.2,0,0.75,
AddFace2,0,1,5,4,
AddFace2,1,2,6,5,
AddFace2,2,3,7,6,
Translate,0,0,-12.4,
GenerateNormals,

LoadTexture,150_chf.bmp,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,0.25,0,
SetTextureCoordinates,2,0.75,0,
SetTextureCoordinates,3,1,0,
SetTextureCoordinates,4,0,1,
SetTextureCoordinates,5,0.25,1,
SetTextureCoordinates,6,0.75,1,
SetTextureCoordinates,7,1,1,
SetDecalTransparentColor,0,0,0,

CreateMeshBuilder,
AddVertex,-1.2,1.2,0.25,
AddVertex,-0.6,1.2,0.25,
AddVertex,0.6,1.2,0.25,
AddVertex,1.2,1.2,0.25,
AddVertex,-1.2,0,-0.25,
AddVertex,-0.6,0,0.25,
AddVertex,0.6,0,0.25,
AddVertex,1.2,0,-0.25,
AddFace2,4,5,1,0,
AddFace2,5,6,2,1,
AddFace2,6,7,3,2,
Translate,0,0,11.9,
GenerateNormals,

LoadTexture,150_chf.bmp,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,0.25,0,
SetTextureCoordinates,2,0.75,0,
SetTextureCoordinates,3,1,0,
SetTextureCoordinates,4,0,1,
SetTextureCoordinates,5,0.25,1,
SetTextureCoordinates,6,0.75,1,
SetTextureCoordinates,7,1,1,
SetDecalTransparentColor,0,0,0,

;Underframe Left
CreateMeshBuilder,
AddVertex,-0.8, -0.05, 24.75,
AddVertex,-0.8, 1.22, 24.75,
AddVertex,-0.8, 1.22, 0.25,
AddVertex,-0.8, -0.05, 0.25,
AddFace2,0,1,2,3,
Translate,0,0,-12.5,
GenerateNormals,

LoadTexture,150_chs.bmp,
SetTextureCoordinates,0,1,1,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,0,0,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,0,0,0,

;Side Left
CreateMeshBuilder,
AddVertex,-1.2, 3.27, 24.75,
AddVertex,-1.2, 3.27, 0.25,
AddVertex,-1.2, 1.5, 0.25,
AddVertex,-1.1, 1.11, 0.25,
AddVertex,-1.1, 1.11, 24.75,
AddVertex,-1.2, 1.5, 24.75,
AddFace,0,1,2,5,
AddFace,5,2,3,4,
Translate,0,0,-12.5,
GenerateNormals,

LoadTexture,153_s2.bmp,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 0.85,
SetTextureCoordinates,3, 1, 1,
SetTextureCoordinates,4, 0, 1,
SetTextureCoordinates,5, 0, 0.85,


;Roof
CreateMeshBuilder,
AddVertex,-0.2, 3.8, 24.75,
AddVertex,-0.2, 3.8, 0.25,
AddVertex,-0.6, 3.71, 0.25,
AddVertex,-0.6, 3.71, 24.75,
AddVertex,-1.0, 3.48, 24.75,
AddVertex,-1.0, 3.48, 0.25,
AddVertex,-1.2, 3.27, 24.75,
AddVertex,-1.2, 3.27, 0.25,
AddFace,0,1,2,3,
AddFace,3,2,5,4,
AddFace,4,5,7,6,
Translate,0,0,-12.5,
GenerateNormals,

LoadTexture,150roof.bmp,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 2,
SetTextureCoordinates,3, 0, 2,
SetTextureCoordinates,4, 0, 5,
SetTextureCoordinates,5, 1, 5,
SetTextureCoordinates,6, 0, 5,
SetTextureCoordinates,7, 1, 5,

CreateMeshBuilder,
AddVertex,-0,3.75,2.75,
AddVertex,-0,6,2.75,
AddVertex,-1.5,6,2.75,
AddVertex,-1.5,3.75,2.75,
AddFace2,3,2,1,0,
SetColor,255,255,255,20,
Translate,0,0,-12.5,
GenerateNormals,

LoadTexture,Clag2.bmp,
SetTextureCoordinates,0,0,1,
SetTextureCoordinates,1,0,0,
SetTextureCoordinates,2,1,0,
SetTextureCoordinates,3,1,1,
SetDecalTransparentColor,0,0,0,

;Underframe R
CreateMeshBuilder,
AddVertex,0.8, -0.05, 24.75,
AddVertex,0.8, 1.22, 24.75,
AddVertex,0.8, 1.22, 0.25,
AddVertex,0.8, -0.05, 0.25,
AddFace2,3,2,1,0,
Translate,0,0,-12.5,
GenerateNormals,

LoadTexture,150_chs.bmp,
SetTextureCoordinates,0,1,1,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,0,0,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,0,0,0,

;Side R
CreateMeshBuilder,
AddVertex,1.2, 3.27, 24.75,
AddVertex,1.2, 3.27, 0.25,
AddVertex,1.2, 1.5, 0.25,
AddVertex,1.1, 1.11, 0.25,
AddVertex,1.1, 1.11, 24.75,
AddVertex,1.2, 1.5, 24.75,
AddFace,5,2,1,0,
AddFace,4,3,2,5,
Translate,0,0,-12.5,
GenerateNormals,

LoadTexture,153_s.bmp,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 0.85,
SetTextureCoordinates,3, 1, 1,
SetTextureCoordinates,4, 0, 1,
SetTextureCoordinates,5, 0, 0.85,


;Roof R
CreateMeshBuilder,
AddVertex,0.2, 3.8, 24.75,
AddVertex,0.2, 3.8, 0.25,
AddVertex,0.6, 3.71, 0.25,
AddVertex,0.6, 3.71, 24.75,
AddVertex,1.0, 3.48, 24.75,
AddVertex,1.0, 3.48, 0.25,
AddVertex,1.2, 3.27, 24.75,
AddVertex,1.2, 3.27, 0.25,
AddFace,3,2,1,0,
AddFace,4,5,2,3,
AddFace,6,7,5,4,
Translate,0,0,-12.5,
GenerateNormals,

LoadTexture,150roof.bmp,
SetTextureCoordinates,0, 0, 0,
SetTextureCoordinates,1, 1, 0,
SetTextureCoordinates,2, 1, 2,
SetTextureCoordinates,3, 0, 2,
SetTextureCoordinates,4, 0, 5,
SetTextureCoordinates,5, 1, 5,
SetTextureCoordinates,6, 0, 5,
SetTextureCoordinates,7, 1, 5,

CreateMeshBuilder,
AddVertex,0.75, 1.85, 24.76,
AddVertex,1.35, 1.85, 24.76,
AddVertex,1.35, 1.25, 24.76,
AddVertex,0.75, 1.25, 24.76,
AddFace2,0,1,2,3,
GenerateNormals,
translate,-0.26,-0.05,-12.5,

LoadTexture,glow_white.png,
SetTextureCoordinates,0, 1, 0,
SetTextureCoordinates,1, 0, 0,
SetTextureCoordinates,2, 0, 1,
SetTextureCoordinates,3, 1, 1,
SetDecalTransparentColor,0,0,0,
SetEmissiveColor,255,255,255,
SetBlendMode,Additive,1,

CreateMeshBuilder,
AddVertex,-0.55, 1.7, 0.24,
AddVertex,-0.85, 1.7, 0.24,
AddVertex,-0.85, 1.3, 0.24,
AddVertex,-0.55, 1.3, 0.24,
AddVertex,0.545, 1.7, 0.24,
AddVertex,0.845, 1.7, 0.24,
AddVertex,0.845, 1.3, 0.24,
AddVertex,0.545, 1.3, 0.24,
AddFace,3,2,1,0,
AddFace,4,5,6,7,
GenerateNormals,
translate,0,0.38,-12.5,

LoadTexture,glow_red.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,1,