import plus
import math
import Levels
	
class Level6(Levels.SuperLevel):
    "Level 6 A chapped Batman wished he had a grease pole"
    name = "Level 6"
    preview = "Levels/Level6/grease_pole_preview.bmp"
    mission_index = 6
    
    def __init__(self):
        Levels.SuperLevel.__init__(self)

        self.startpoint = (17, 69.4)
        self.startrotation = (-math.pi / 2, 0, 0) # (yaw, pitch, roll)
            
        self.AddTerrain("resources\\Levels\\Heightmap\\grease_pole_hightmap.bmp", 128, 7, 128, "resources\\Levels\\Ground_Textures\\grease_pole.tga", "resources\\Levels\\Ground_Textures\\dirt1.tga", 1, 1, "resources\\Levels\\Ground_Textures\\dirt4.tga")
        self.AddTerrainPanels("resources\\Levels\\Ground_Textures\\tile.bmp");

        self.AddTerrainEdgeOverlay("Resources\\Levels\\Ground_Textures\\RoadExt_Yard_Ape.bmp", (528.0, 0.0, 112.5), (127.9,0.0,112.5), 6.9)
        self.AddTerrainEdgeOverlay("Resources\\Levels\\Ground_Textures\\RoadExt_Yard_Ape.bmp", (0.1, 0.0, 112.5), (-400.0,0.0,112.5), 6.9)
    
        self.AddSkybox("resources\\Levels\\SkyBox\\sky_left2.bmp", "resources\\Levels\\SkyBox\\sky_right2.bmp", "resources\\Levels\\SkyBox\\sky_front2.bmp", "resources\\Levels\\SkyBox\\sky_back2.bmp", "resources\\Levels\\SkyBox\\sky_top2.bmp")
        self.AddCloudPlane("resources\\Levels\\SkyBox\\cloud_map1.tga", 165.0, 0.002)
        self.AddSun(0.31, "Resources\\Levels\\Billboards\\Sun.tga", 0.5, 0.7, 0.7, 0.7)
        self.AddLensFlareLayer("Resources\\Levels\\Billboards\\lens1.bmp", 1.0, 3.0)
        self.AddLensFlareLayer("Resources\\Levels\\Billboards\\lens2.bmp", 2.0, 0.5)
        self.AddLensFlareLayer("Resources\\Levels\\Billboards\\lens1.bmp", 3.0, 0.25)
        self.AddLensFlareLayer("Resources\\Levels\\Billboards\\lens3.bmp", 8.0, 1.0)
        self.AddLensFlareLayer("Resources\\Levels\\Billboards\\lens1.bmp", -2.0, 0.5)
        self.AddLensFlareLayer("Resources\\Levels\\Billboards\\lens4.bmp", -4.0, 0.25)
        self.AddLensFlareLayer("Resources\\Levels\\Billboards\\lens1.bmp", -5.5, 0.25)
      
        self.AddOctagon(12, 200.0, 30.0)
        self.SetOctagonTexture(0, "Resources\\Levels\\Billboards\\TreePannel1V2.tga")
        self.SetOctagonTexture(1, "Resources\\Levels\\Billboards\\TreePannel1V2.tga")
        self.SetOctagonTexture(2, "Resources\\Levels\\Billboards\\houses_trees.tga")
        self.SetOctagonTexture(3, "Resources\\Levels\\Billboards\\TreePannel1V2.tga")
        self.SetOctagonTexture(4, "Resources\\Levels\\Billboards\\houses_trees.tga")
        self.SetOctagonTexture(5, "Resources\\Levels\\Billboards\\TreePannel1V2.tga")
        self.SetOctagonTexture(6, "Resources\\Levels\\Billboards\\houses_trees.tga")
        self.SetOctagonTexture(7, "Resources\\Levels\\Billboards\\TreePannel1V2.tga")
        self.SetOctagonTexture(8, "Resources\\Levels\\Billboards\\TreePannel1V2.tga")
        self.SetOctagonTexture(9, "Resources\\Levels\\Billboards\\TreePannel1V2.tga")
        self.SetOctagonTexture(10, "Resources\\Levels\\Billboards\\TreePannel1V2.tga")
        self.SetOctagonTexture(11, "Resources\\Levels\\Billboards\\TreePannel1V2.tga")
    
    
        self.SetTreePlacementBitmap("resources\\Levels\\TreeMaps\\tree_map_level6.bmp")
        self.AssignTreeToColor("resources\\Levels\\Billboards\\tree_3.tga", (172, 172, 172), 1.0, 3.3, 1, 25.0)
        self.AssignTreeToColor("resources\\Levels\\Billboards\\tree_2.tga", (0, 255, 0), 2.0, 4.3, 1, 25.0)
        self.AssignTreeToColor("resources\\Levels\\Billboards\\tree_2.tga", (255, 0, 0), 2.0, 3.3, 1, 25.0)
        self.AssignTreeToColor("resources\\Levels\\Billboards\\shrub2.tga", (255, 255, 0), 1.0,1.8, 0, 25.0)
        self.AssignTreeToColor("resources\\Levels\\Billboards\\pinetree.tga", (0, 0, 255), 1.0,1.8, 1, 25.0)
        self.AssignTreeToColor("resources\\Levels\\Billboards\\shrub.tga", (255, 255, 255), 1.0,1.8, 0, 25.0)        
        self.PlaceTrees()
        
        import Level6_features
        Level6_features.setup(self)
        
        #self.AddPlacementZone(0, (8.0 ,8.0 ,8.0 ), (29.0 ,23.0 ,33.0 ))
        self.AddPlacementZone(0, (9.0 ,8.0 ,9.0 ), (34.5 ,21.0 ,35.0 ))
        self.AddPlacementZone(0, (9.0 ,8.0 ,9.0 ), (58.5 ,25.0 ,38.0 ))
        self.AddPlacementZone(0, (9.0 ,8.0 ,9.0 ), (99.5 ,25.0 ,78.5 ))
        
        fmod = .015
        # static cameras
        self.AddStaticCamera("Static 1", (86.8, 17.5, 113.3), (.285, -2.56), math.pi / 4)
        self.AddStaticCamera("Static 2", (90, 36.3, 56.55), (.37, -1.88), math.pi / 4)
        self.AddStaticCamera("Static 3", (2.77, 25, 92.3), (.23, -3.94), math.pi / 4)
        self.AddStaticCamera("Static 4", (24.24, 21.27, 71.33), (.23, -3.94), math.pi / 4)
        
        # watch camera
        self.AddWatchCamera("Watch 1", (52, 21, 85), (2.0, 15.0, fmod*40, math.pi / 4))
        self.AddWatchCamera("Watch 3", (38.5, 28, 45.2), (2.0, 30.0, math.pi / 4, math.pi / 4))

            
Levels.register(Level6)