import plus
import math
import Levels
	
class Level5(Levels.SuperLevel):
    "Level 5: Can a monkey use a fulcrum?"
    name = "Level 5"
    preview = "Levels/Level5/lever_monkey_preview.bmp"
    mission_index = 5
    
    def __init__(self):
        Levels.SuperLevel.__init__(self)

        self.startpoint = (107.3, 40.8)
        self.startrotation = (math.pi, 0, 0)
            
        self.AddTerrain("resources\\Levels\\Heightmap\\lever_monkey_hightmap.bmp", 128, 7, 128, "resources\\Levels\\Ground_Textures\\lever_monkey.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_Cat_Skinner.bmp", (106.3, 0.0, 0.1), (106.3,0.0,-400.0), 7.25)
        self.AddTerrainEdgeOverlay("Resources\\Levels\\Ground_Textures\\RoadExt_Cat_Skinner.bmp", (106.3,0.0,528.0), (106.3, 0.0, 127.9), 7.25)
    
        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\\houses_trees.tga")
        self.SetOctagonTexture(2, "Resources\\Levels\\Billboards\\TreePannel1V2.tga")
        self.SetOctagonTexture(3, "Resources\\Levels\\Billboards\\houses_trees.tga")
        self.SetOctagonTexture(4, "Resources\\Levels\\Billboards\\houses_trees.tga")
        self.SetOctagonTexture(5, "Resources\\Levels\\Billboards\\TreePannel1V2.tga")
        self.SetOctagonTexture(6, "Resources\\Levels\\Billboards\\TreePannel1V2.tga")
        self.SetOctagonTexture(7, "Resources\\Levels\\Billboards\\houses_trees.tga")
        self.SetOctagonTexture(8, "Resources\\Levels\\Billboards\\TreePannel1V2.tga")
        self.SetOctagonTexture(9, "Resources\\Levels\\Billboards\\houses_trees.tga")
        self.SetOctagonTexture(10, "Resources\\Levels\\Billboards\\houses_trees.tga")
        self.SetOctagonTexture(11, "Resources\\Levels\\Billboards\\TreePannel1V2.tga")
    
    
        self.SetTreePlacementBitmap("resources\\Levels\\TreeMaps\\tree_map_level5.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 Level5_features
        Level5_features.setup(self)
        
        import Level5_apartment
        Level5_apartment.setup(self)
        
        fmod = .015
        # static cameras
        #self.AddStaticCamera("Static 1", (17.7, 11, 40), (.367, -.576), fmod*50)
        self.AddStaticCamera("Static 1", (82.6, 22.4, -1.25), (.2, -.07), math.pi / 4)
        self.AddStaticCamera("Static 2", (96, 20, 81), (.175, -1.78), math.pi / 4)
        self.AddStaticCamera("Static 3", (68.8, 25.4, 116.2), (.335, -2.68), math.pi / 4)
        
        # watch camera
        self.AddWatchCamera("Watch 1", (20, 28, 85), (2.0, 15.0, fmod*40, fmod*25))
        self.AddWatchCamera("Watch 2", (67, 18, 78), (2.0, 30.0, fmod*60, fmod*25))
        self.AddWatchCamera("Watch 3", (106, 19, 91.1), (2.0, 30.0, math.pi / 4, math.pi / 4))

            
Levels.register(Level5)