import plus
import math
import Levels
	
class Level7(Levels.SuperLevel):
    "Level 7 is used for monkeys."
    name = "Level 7"
    preview = "Levels/Level7/swamper_preview.bmp"
    mission_index = 7
    
    def __init__(self):
        Levels.SuperLevel.__init__(self)

        self.startpoint = (85, 52)
        self.startrotation = (math.pi / 2, 0, 0)
            
        self.AddTerrain("resources\\Levels\\Heightmap\\swamper_hightmap.bmp", 128, 5, 128, "resources\\Levels\\Ground_Textures\\swamper.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.bmp", (-400.0,0.0,37.4),(0.1, 0.0, 37.4), 11.0)
        self.AddTerrainEdgeOverlay("Resources\\Levels\\Ground_Textures\\RoadExt.bmp", (127.9, 0.0, 37.4),(528.0,0.0,37.4), 11.0)
        self.AddTerrainEdgeOverlay("Resources\\Levels\\Ground_Textures\\RoadExt.bmp", (62.1,0.0, 528.0), (62.1, 0.0, 127.9), 11.0)
    
        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.AddDigZone(55, 69.1, 69.9, 72.8, 1.0, 0)  #dig zone for pipes
      
        self.AddOctagon(8, 250.0, 35.0)
        self.SetOctagonTexture(0, "Resources\\Levels\\Billboards\\Oct1PNL1V2.tga")
        self.SetOctagonTexture(1, "Resources\\Levels\\Billboards\\Oct1PNL1V2_P1.tga")
        self.SetOctagonTexture(2, "Resources\\Levels\\Billboards\\Oct1PNL1V2.tga")
        self.SetOctagonTexture(3, "Resources\\Levels\\Billboards\\Oct1PNL1V2_P1.tga")
        self.SetOctagonTexture(4, "Resources\\Levels\\Billboards\\Oct1PNL1V2.tga")
        self.SetOctagonTexture(5, "Resources\\Levels\\Billboards\\Oct1PNL1V2_P1.tga")
        self.SetOctagonTexture(6, "Resources\\Levels\\Billboards\\Oct1PNL1V2.tga")
        self.SetOctagonTexture(7, "Resources\\Levels\\Billboards\\Oct1PNL1V2_P1.tga")

        self.SetTreePlacementBitmap("resources\\Levels\\TreeMaps\\tree_map_level7.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_4.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 Level7_features
        Level7_features.setup(self)
        
        fmod = .015
        # static cameras
        self.AddStaticCamera("Static 1", (87, 35, 0), (.4, -.36), math.pi / 4)
        self.AddStaticCamera("Static 2", (33.75, 27.64, 73.42), (.515, 1.6), math.pi / 4)
        self.AddStaticCamera("Static 1", (87.7, 23, 101), (.37, 3.64), math.pi / 4)
        
        # watch camera
        self.AddWatchCamera("Watch 1", (20, 28, 85), (2.0, 15.0, fmod*40, fmod*25))
        self.AddWatchCamera("Watch 2", (81.6, 24.16, 98), (2.0, 15.0, fmod*40, fmod*25))
        self.AddWatchCamera("Watch 3", (67, 18, 78), (10.0, 20.0, fmod*60, fmod*25))

            
Levels.register(Level7)