import plus
import math
import Levels
	
class Level2(Levels.SuperLevel):
    "Level 2 is used for skinning cats."
    name = "Level 2"
    preview = "Levels/Level2/catskinner_preview.bmp"
    mission_index = 2
    
    def __init__(self):
        Levels.SuperLevel.__init__(self)

        self.startpoint = (26, 60)
        self.startrotation = (0, 0, 0)
            
        self.AddTerrain("resources\\Levels\\Heightmap\\cat_skinner_hightmap.bmp", 128, 7, 128, "resources\\Levels\\Ground_Textures\\catskinner.tga", "resources\\Levels\\Ground_Textures\\dirt1.tga", 1, 1, "resources\\Levels\\Ground_Textures\\dirt4.tga")
        self.SetForceLODMap("resources\\Levels\\Heightmap\\cat_skinner_LOD.bmp")
        self.AddTerrainPanels("resources\\Levels\\Ground_Textures\\tile.bmp");

        self.AddTerrainEdgeOverlay("Resources\\Levels\\Ground_Textures\\RoadExt_Cat_Skinner.bmp", (0.1, 0.0, 29.3), (-400.0,0.0,29.3), 7.25)
        self.AddTerrainEdgeOverlay("Resources\\Levels\\Ground_Textures\\RoadExt_Cat_Skinner.bmp", (528.0,0.0,29.3), (127.9, 0.0, 29.3), 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\\TreePannel1V2.tga")
        self.SetOctagonTexture(5, "Resources\\Levels\\Billboards\\houses_trees.tga")
        self.SetOctagonTexture(6, "Resources\\Levels\\Billboards\\TreePannel1V2.tga")
        self.SetOctagonTexture(7, "Resources\\Levels\\Billboards\\houses_trees.tga")
        self.SetOctagonTexture(8, "Resources\\Levels\\Billboards\\houses_trees.tga")
        self.SetOctagonTexture(9, "Resources\\Levels\\Billboards\\TreePannel1V2.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_level2.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), 0.8,1.0, 0, 25.0)
        self.AssignTreeToColor("resources\\Levels\\Billboards\\Tree_4_broken.tga", (255, 255, 55), 2.0, 4.3, 0, 25.0)        
        self.PlaceTrees()
        
        import Level2_features
        Level2_features.setup(self)
      
        #self.DisableBuildingEdgeDetection()
        #import Level2_fence
        #Level2_fence.setup(self)
        #self.EnableBuildingEdgeDetection()
        
        import Level2_garage
        Level2_garage.setup(self)
        
        fmod = .015
        # static cameras
        #self.AddStaticCamera("Static 1", (17.7, 11, 40), (.367, -.576), fmod*50)
        self.AddStaticCamera("Static 1", (67, 21, 92), (.17, 3.7), math.pi / 4)
        self.AddStaticCamera("Static 2", (33, 21, 69), (.2, 2.535), math.pi / 4)
        self.AddStaticCamera("Static 3", (35.46, 20.6, 35.6), (.38, .765), math.pi / 4)
        self.AddStaticCamera("Static 4", (21, 62, 30), (1, .77), math.pi / 4)
        
        # watch camera
        self.AddWatchCamera("Watch 1", (13.87, 18.4, 65.5), (2.0, 15.0, fmod*100, fmod*25))
        self.AddWatchCamera("Watch 2", (46.7, 30.61, 13.87), (.46, -.065, fmod*80, fmod*25))
        self.AddWatchCamera("Watch 3", (20, 28, 85), (2.0, 15.0, fmod*40, fmod*25))
        self.AddWatchCamera("Watch 4", (67, 18, 78), (2.0, 30.0, fmod*60, fmod*25))

            
Levels.register(Level2)