;Guy Lorry - Silent Night Beds,
;Object created by Alan Wheeler, aka Guillyman, email allanwheeler1@talktalk.net
;From Photographs by eezypeazy, email eezypeazy@eezypeazy.co.uk
;copyright eezypeazy and Allan Wheeler 2008. All rights reserved. You may publish this object without alteration in your BVE routes providing that you acknowledge this copyright. 

;________Nearside________________________________,

CreateMeshBuilder,
AddVertex,1.133,3.546,0.244,
AddVertex,1.128,3.546,7.491 ,
AddVertex,1.143,0.4,0.244,
AddVertex,1.143,0.4,7.491 ,
Addface, 0,1,3,2,
generatenormals,
LoadTexture, Nearside.png,
SetTextureCoordinates, 0,0,0,
SetTextureCoordinates, 1,1,0,
SetTextureCoordinates, 2,0,1,
SetTextureCoordinates, 3,1,1,
Setdecaltransparentcolor,0,0,255,

;________Offside_________________________________,

CreateMeshBuilder,
AddVertex,-1.128,3.546,7.491,
AddVertex,-1.133,3.546,0.244,
AddVertex,-1.143,0.4,7.491,
AddVertex,-1.143,0.4,0.244,
Addface, 0,1,3,2,
generatenormals,
LoadTexture, Offside.png,
SetTextureCoordinates, 0,0,0,
SetTextureCoordinates, 1,1,0,
SetTextureCoordinates, 2,0,1,
SetTextureCoordinates, 3,1,1,
Setdecaltransparentcolor,0,0,255,

;________Rear____________________________________,

CreateMeshBuilder,
AddVertex,1.173,3.546,7.454,
AddVertex,-1.173,3.546,7.454,
AddVertex,1.173,0.53,7.491,
AddVertex,-1.173,0.53,7.491,
Addface, 0,1,3,2,
generatenormals,
LoadTexture, Rear.png,
SetTextureCoordinates, 0,0,0,
SetTextureCoordinates, 1,1,0,
SetTextureCoordinates, 2,0,1,
SetTextureCoordinates, 3,1,1,
Setdecaltransparentcolor,0,0,255,

;________Above Cab_______________________________,

CreateMeshBuilder,
AddVertex,-1.173,3.546,0.284,
AddVertex,1.173,3.546,0.284,
AddVertex,-1.173,2.18,0.269,
AddVertex,1.173,2.18,0.269,
Addface, 0,1,3,2,
generatenormals,
LoadTexture, FrontLogo.png,
SetTextureCoordinates, 0,0,0,
SetTextureCoordinates, 1,1,0,
SetTextureCoordinates, 2,0,1,
SetTextureCoordinates, 3,1,1,
Setdecaltransparentcolor,0,0,255,

;________Roof____________________________________,

CreateMeshBuilder,
AddVertex,1.133,3.546,0.284,
AddVertex,-1.133,3.546,0.284,
AddVertex,1.128,3.546,7.454,
AddVertex,-1.128,3.546,7.454,
Addface, 0,1,3,2,
generatenormals,
LoadTexture, Roof.png,
SetTextureCoordinates, 0,0,0,
SetTextureCoordinates, 1,1,0,
SetTextureCoordinates, 2,0,1,
SetTextureCoordinates, 3,1,1,

;________Above and behind Cab____________________,

CreateMeshBuilder,
AddVertex,-1.143,2.18,0.269,
AddVertex,1.143,2.18,0.269,
AddVertex,-1.143,2.18,1.604,
AddVertex,1.143,2.18,1.604,
AddVertex,-1.143,0.4,1.604,
AddVertex,1.143,0.4,1.604,
Addface, 0,1,3,2,
Addface, 2,3,5,4,
generatenormals,
LoadTexture, CabTopBack.png,
SetTextureCoordinates, 0,0,0,
SetTextureCoordinates, 1,1,0,
SetTextureCoordinates, 2,0,0.21,
SetTextureCoordinates, 3,1,0.21,
SetTextureCoordinates, 4,0,1,
SetTextureCoordinates, 5,1,1,

;________Cab Nearside____________________________,

CreateMeshBuilder,
AddVertex,0.857,2.18,0,
AddVertex,0.857,2.18,1.604,
AddVertex,0.79,0,0,
AddVertex,0.857,0,1.604,
Addface2, 0,1,3,2,
generatenormals,
LoadTexture, CabNearSide.png,
SetTextureCoordinates, 0,0,0,
SetTextureCoordinates, 1,1,0,
SetTextureCoordinates, 2,0,1,
SetTextureCoordinates, 3,1,1,
Setdecaltransparentcolor,0,0,255,

;________Cab Offside_____________________________,

CreateMeshBuilder,
AddVertex,-0.857,2.18,1.604,
AddVertex,-0.857,2.18,0,
AddVertex,-0.857,0,1.604,
AddVertex,-0.78,0,0,
Addface2, 0,1,3,2,
generatenormals,
LoadTexture, CabOffSide.png,
SetTextureCoordinates, 0,0,0,
SetTextureCoordinates, 1,1,0,
SetTextureCoordinates, 2,0,1,
SetTextureCoordinates, 3,1,1,
Setdecaltransparentcolor,0,0,255,

;________Cab Front_______________________________,

CreateMeshBuilder,
AddVertex,-1.12,2.18,0.658,
AddVertex,1.12,2.18,0.658,
AddVertex,-1.12,1.35,0.224,
AddVertex,1.12,1.35,0.224,
AddVertex,-1.12,0.97,0.099,
AddVertex,1.12,0.97,0.099,
AddVertex,-1.12,0.2,0.099,
AddVertex,1.12,0.2,0.099,
Addface, 0,1,3,2,
Addface, 2,3,5,4,
Addface, 4,5,7,6,
generatenormals,
LoadTexture, CabFront.png,
SetTextureCoordinates, 0,0,0,
SetTextureCoordinates, 1,1,0,
SetTextureCoordinates, 2,0,0.44,
SetTextureCoordinates, 3,1,0.44,
SetTextureCoordinates, 4,0,0.65,
SetTextureCoordinates, 5,1,0.65,
SetTextureCoordinates, 6,0,1,
SetTextureCoordinates, 7,1,1,
Setdecaltransparentcolor,0,0,255,

;________Front Bumper____________________________,

CreateMeshBuilder,
AddVertex,-1.12,0.53,0,
AddVertex,1.12,0.53,0,
AddVertex,-1.12,0.25,0,
AddVertex,1.12,0.25,0,
Addface2, 0,1,3,2,
generatenormals,
LoadTexture, Bumper.png,
SetTextureCoordinates, 0,0,0,
SetTextureCoordinates, 1,1,0,
SetTextureCoordinates, 2,0,1,
SetTextureCoordinates, 3,1,1,
Setdecaltransparentcolor,0,0,255,

;________Shadow__________________________________,

CreateMeshBuilder,
AddVertex,-1.143,0,0,
AddVertex,-1.143,0,7.491,
AddVertex,1.143,0,0,
AddVertex,1.143,0,7.491,
Addface, 0,1,3,2,
generatenormals,
SetColor, 50,50,50,120,

;________Nearside Wing___________________________,

CreateMeshBuilder,
Addvertex, 0.795,0.4,1.604,
Addvertex, 1.09,0.4,1.604,
Addvertex, 0.795,0.4,1.24,
Addvertex, 1.09,0.4,1.24,
Addvertex, 0.795,0.65,1.19,
Addvertex, 1.09,0.65,1.19,
Addvertex, 0.795,0.86,1.04,
Addvertex, 1.09,0.86,1.04,
Addvertex, 0.795,1.0,0.76,
Addvertex, 1.09,1.0,0.76,
Addvertex, 0.795,1.0,0.44,
Addvertex, 1.09,1.0,0.44,
Addvertex, 0.795,0.86,0.16,
Addvertex, 1.09,0.86,0.16,
Addvertex, 0.795,0.65,0.03,
Addvertex, 1.09,0.65,0.03,
Addvertex, 0.795,0.4,0.01,
Addvertex, 1.09,0.4,0.01,
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,
Addface2, 14,15,17,16,
generatenormals,
LoadTexture, Wing.png,
SetTextureCoordinates, 0,0,0,
SetTextureCoordinates, 1,1,0,
SetTextureCoordinates, 2,0,0.333,
SetTextureCoordinates, 3,1,0.333,
SetTextureCoordinates, 4,0,0.428,
SetTextureCoordinates, 5,1,0.428,
SetTextureCoordinates, 6,0,0.523,
SetTextureCoordinates, 7,1,0.523,
SetTextureCoordinates, 8,0,0.618,
SetTextureCoordinates, 9,1,0.618,
SetTextureCoordinates, 10,0,0.713,
SetTextureCoordinates, 11,1,0.713,
SetTextureCoordinates, 12,0,0.808
SetTextureCoordinates, 13,1,0.808
SetTextureCoordinates, 14,0,0.903
SetTextureCoordinates, 15,1,0.903
SetTextureCoordinates, 16,0,1,
SetTextureCoordinates, 17,1,1,

;________Offside Wing____________________________,

CreateMeshBuilder,
Addvertex, -1.09,0.4,1.604,
Addvertex, -0.795,0.4,1.604,
Addvertex, -1.09,0.4,1.24,
Addvertex, -0.795,0.4,1.24,
Addvertex, -1.09,0.65,1.19,
Addvertex, -0.795,0.65,1.19,
Addvertex, -1.09,0.86,1.04,
Addvertex, -0.795,0.86,1.04,
Addvertex, -1.09,1.0,0.76,
Addvertex, -0.795,1.0,0.76,
Addvertex, -1.09,1.0,0.44,
Addvertex, -0.795,1.0,0.44,
Addvertex, -1.09,0.86,0.16,
Addvertex, -0.795,0.86,0.16,
Addvertex, -1.09,0.65,0.03,
Addvertex, -0.795,0.65,0.03,
Addvertex, -1.09,0.4,0.01,
Addvertex, -0.795,0.4,0.01,
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,
Addface2, 14,15,17,16,
generatenormals,
LoadTexture, Wing.png,
SetTextureCoordinates, 0,1,0,
SetTextureCoordinates, 1,0,0,
SetTextureCoordinates, 2,1,0.333,
SetTextureCoordinates, 3,0,0.333,
SetTextureCoordinates, 4,1,0.428,
SetTextureCoordinates, 5,0,0.428,
SetTextureCoordinates, 6,1,0.523,
SetTextureCoordinates, 7,0,0.523,
SetTextureCoordinates, 8,1,0.618,
SetTextureCoordinates, 9,0,0.618,
SetTextureCoordinates, 10,1,0.713,
SetTextureCoordinates, 11,0,0.713,
SetTextureCoordinates, 12,1,0.808
SetTextureCoordinates, 13,0,0.808
SetTextureCoordinates, 14,1,0.903
SetTextureCoordinates, 15,0,0.903
SetTextureCoordinates, 16,1,1,
SetTextureCoordinates, 17,0,1,

;________Nearside Mudguard_______________________,

CreateMeshBuilder,
Addvertex, 1.09,1.02,0,
Addvertex, 1.09,1.02,1.25,
Addvertex, 1.09,0.39,0,
Addvertex, 1.09,0.39,1.25,
Addface, 0,1,3,2,
generatenormals,
LoadTexture, MudGuard.png,
SetTextureCoordinates, 0,0,0,
SetTextureCoordinates, 1,1,0,
SetTextureCoordinates, 2,0,1,
SetTextureCoordinates, 3,1,1,
Setdecaltransparentcolor,0,0,255,

;________Offside Mudguard________________________,

CreateMeshBuilder,
Addvertex, -1.09,1.02,1.25,
Addvertex, -1.09,1.02,0,
Addvertex, -1.09,0.39,1.25,
Addvertex, -1.09,0.39,0,
Addface, 0,1,3,2,
generatenormals,
LoadTexture, MudGuard.png,
SetTextureCoordinates, 0,1,0,
SetTextureCoordinates, 1,0,0,
SetTextureCoordinates, 2,1,1,
SetTextureCoordinates, 3,0,1,
Setdecaltransparentcolor,0,0,255,

;________Rear Nearside Wheel_____________________,

CreateMeshBuilder,
Addvertex, 1.08,1.26,4.62,
Addvertex, 1.08,1.26,5.88,
Addvertex, 1.08,0,4.62,
Addvertex, 1.08,0,5.88,
Addface2, 0,1,3,2,
generatenormals,
LoadTexture, RearWheel.png,
SetTextureCoordinates, 0,0,0,
SetTextureCoordinates, 1,1,0,
SetTextureCoordinates, 2,0,1,
SetTextureCoordinates, 3,1,1,
Setdecaltransparentcolor, 0,0,255,

;________Rear Offside Wheel______________________,

CreateMeshBuilder,
Addvertex, -1.08,1.26,5.88,
Addvertex, -1.08,1.26,4.62,
Addvertex, -1.08,0,5.88,
Addvertex, -1.08,0,4.62,
Addface2, 0,1,3,2,
generatenormals,
LoadTexture, RearWheel.png,
SetTextureCoordinates, 0,1,0,
SetTextureCoordinates, 1,0,0,
SetTextureCoordinates, 2,1,1,
SetTextureCoordinates, 3,0,1,
Setdecaltransparentcolor, 0,0,255,

;________Front Nearside Wheel____________________,

CreateMeshBuilder,
Addvertex, 1.0,0.95,0.1,
Addvertex, 1.0,0.95,1.15,
Addvertex, 1.0,0,0.1,
Addvertex, 1.0,0,1.15,
Addface2, 0,1,3,2,
generatenormals,
LoadTexture, FrontWheel.png,
SetTextureCoordinates, 0,0,0,
SetTextureCoordinates, 1,1,0,
SetTextureCoordinates, 2,0,1,
SetTextureCoordinates, 3,1,1,
Setdecaltransparentcolor,0,0,255,

;________Front Offside Wheel_____________________,

CreateMeshBuilder,
Addvertex, -1.0,0.95,1.15,
Addvertex, -1.0,0.95,0.1,
Addvertex, -1.0,0,1.15,
Addvertex, -1.0,0,0.1,
Addface2, 0,1,3,2,
generatenormals,
LoadTexture, FrontWheel.png,
SetTextureCoordinates, 0,1,0,
SetTextureCoordinates, 1,0,0,
SetTextureCoordinates, 2,1,1,
SetTextureCoordinates, 3,0,1,
Setdecaltransparentcolor,0,0,255,
