private void loadContent2()
        {
#if XBOX
            Thread.CurrentThread.SetProcessorAffinity(3);
#endif
            backGroundPic   = Content.Load <Texture2D>("titleScreenPic");
            frostTreeLogo   = Content.Load <Texture2D>("FrostTreeLogo");
            testArrow       = Content.Load <Texture2D>("gfx/testArrow");
            laserPic        = Content.Load <Texture2D>("gfx/laser");
            healthBar       = Content.Load <Texture2D>("bg");
            healthColor     = Content.Load <Texture2D>("healthTexture");
            energyColor     = Content.Load <Texture2D>("ammoTexture");
            energyOverlay   = Content.Load <Texture2D>("overlay");
            popUpBackground = Content.Load <Texture2D>("popUpBackground");
            greyBar         = Content.Load <Texture2D>("grayTexture");
            creditImage     = Content.Load <Texture2D>("EndCredits");
            heartPic        = Content.Load <Texture2D>("heartSheet");
            guardIcon       = Content.Load <Texture2D>("guard");
            prisonerIcon    = Content.Load <Texture2D>("prisoner");
            p2Icon          = Content.Load <Texture2D>("P2Icon");

            TextureLib ts = new TextureLib(GraphicsDevice);
            TextureLib.loadFromManifest();

            aspectRatio = graphics.GraphicsDevice.Viewport.AspectRatio;

            bloomFilter = Content.Load <Effect>("BloomShader");

            BackGroundAudio music = new BackGroundAudio(Content);

            music.addSong("Menu");
            music.addSong("RPG Game");
            AudioLib lb = new AudioLib();

            tenbyFive8       = Content.Load <SpriteFont>("tenbyFive/tenbyFive8");
            tenbyFive10      = Content.Load <SpriteFont>("tenbyFive/tenbyFive10");
            tenbyFive14      = Content.Load <SpriteFont>("tenbyFive/tenbyFive14");
            tenbyFive24      = Content.Load <SpriteFont>("tenbyFive/tenbyFive24");
            tenbyFive72      = Content.Load <SpriteFont>("tenbyFive/tenbyFive72");
            font             = tenbyFive14;
            testComputerFont = tenbyFive24;

            levelExitVideo          = Content.Load <Video>("fmv/elevatorExit");
            levelEnterVideo         = Content.Load <Video>("fmv/levelStart");
            titleScreenVideo        = Content.Load <Video>("fmv/menu");
            introCutScene           = Content.Load <Video>("fmv/intro");
            introCutSceneCoop       = Content.Load <Video>("fmv/intro COOP");
            levelEnterVideoCoop     = Content.Load <Video>("fmv/levelStartCOOP");
            levelExitVideoCoop      = Content.Load <Video>("fmv/elevatorExitCOOP");
            guardEndCutScene        = Content.Load <Video>("fmv/endGuardSingle");
            alienEndCutScene        = Content.Load <Video>("fmv/endAlienSingle");
            prisonerEndCutScene     = Content.Load <Video>("fmv/endPrisonerSingle");
            guardEndCutSceneCoop    = Content.Load <Video>("fmv/endGuardCoop");
            alienEndCutSceneCoop    = Content.Load <Video>("fmv/endAlienCoop");
            prisonerEndCutSceneCoop = Content.Load <Video>("fmv/endPrisonerCoop");
            videoPlayer             = new VideoPlayer();

            ChunkLib cs = new ChunkLib();

            AnimationLib.loadFrameFromManifest();

            GlobalGameConstants.WeaponDictionary.InitalizePriceData();

            GameCampaign.InitalizeCampaignData();
            GameCampaign.ResetPlayerValues("INIT", 0);

            // lol so many game screens
            currentGameScreen = new TitleScreen(TitleScreen.titleScreens.logoScreen);
            //currentGameScreen = new CutsceneVideoState(testVideo, ScreenState.ScreenStateType.LevelReviewState);
            //currentGameScreen = new CampaignLobbyState();
            //currentGameScreen = new HighScoresState(true);

            // DANIEL UNCOMMMENT THIS LINE BEFORE YOU MERGE WITH MASTER
            preloadedAssets = true;
        }
        public TileMap(LevelState parent, DungeonGenerator.DungeonRoom[,] room, Vector2 tileSize)
        {
            tileSkin = new Texture2D[5];

            this.size     = new TileDimensions(room.GetLength(0) * GlobalGameConstants.TilesPerRoomWide, room.GetLength(1) * GlobalGameConstants.TilesPerRoomHigh);
            this.tileSize = tileSize;

            this.parent = parent;

            map      = new TileType[size.x, size.y];
            floorMap = new FloorType[size.x, size.y];
            mapMod   = new WallMod[size.x, size.y];

            Random rand = new Random();

            for (int i = 0; i < floorMap.GetLength(0); i++)
            {
                for (int j = 0; j < floorMap.GetLength(1); j++)
                {
                    int randVal = Game1.rand.Next() % 100;

                    if (randVal > 15)
                    {
                        floorMap[i, j] = Game1.rand.Next() % 2 == 0 ? FloorType.A : FloorType.B;
                    }
                    else if (randVal > 10)
                    {
                        floorMap[i, j] = Game1.rand.Next() % 2 == 0 ? FloorType.C : FloorType.D;
                    }
                    else if (randVal > 5)
                    {
                        floorMap[i, j] = Game1.rand.Next() % 2 == 0 ? FloorType.E : FloorType.F;
                    }
                    else
                    {
                        floorMap[i, j] = Game1.rand.Next() % 2 == 0 ? FloorType.G : FloorType.H;
                    }
                }
            }

            for (int i = 0; i < room.GetLength(0); i++)
            {
                for (int j = 0; j < room.GetLength(1); j++)
                {
                    if (room[i, j].attributes != null)
                    {
                        ChunkManager.Chunk c = ChunkLib.getRandomChunkByValues(room[i, j].attributes.ToArray(), rand);

                        if (c == null)
                        {
                            throw new Exception("NO CHUNK FOR VALUES");
                        }

                        if (c != null)
                        {
                            foreach (ChunkManager.Chunk.ChunkAttribute attr in c.Attributes)
                            {
                                if (!room[i, j].attributes.Contains(attr.AttributeName))
                                {
                                    room[i, j].attributes.Add(attr.AttributeName);
                                }
                            }

                            if (c != null)
                            {
                                for (int p = 0; p < GlobalGameConstants.TilesPerRoomWide; p++)
                                {
                                    for (int q = 0; q < GlobalGameConstants.TilesPerRoomHigh; q++)
                                    {
                                        map[(i * GlobalGameConstants.TilesPerRoomWide) + p, (j * GlobalGameConstants.TilesPerRoomHigh) + q] = (TileType)(c.tilemap[(q * GlobalGameConstants.TilesPerRoomHigh) + p]);
                                    }
                                }

                                room[i, j].chunkName = c.Name;

                                if (room[i, j].attributes.Contains("start"))
                                {
                                    int startX = 0;
                                    int startY = 0;

                                    while (c.tilemap[startY * GlobalGameConstants.TilesPerRoomHigh + startX] == 1)
                                    {
                                        startX = rand.Next() % GlobalGameConstants.TilesPerRoomWide;
                                        startY = rand.Next() % GlobalGameConstants.TilesPerRoomHigh;
                                    }

                                    startPosition.X = (i * GlobalGameConstants.TilesPerRoomWide * GlobalGameConstants.TileSize.X) + ((GlobalGameConstants.TilesPerRoomWide / 2) * GlobalGameConstants.TileSize.X);
                                    startPosition.Y = (j * GlobalGameConstants.TilesPerRoomHigh * GlobalGameConstants.TileSize.Y) + ((GlobalGameConstants.TilesPerRoomHigh / 2) * GlobalGameConstants.TileSize.Y);
                                }

                                if (room[i, j].intensity > 0.95f)
                                {
                                    endFlagPosition.X = (i * GlobalGameConstants.TilesPerRoomWide * GlobalGameConstants.TileSize.X) + ((GlobalGameConstants.TilesPerRoomWide / 2) * GlobalGameConstants.TileSize.X);
                                    endFlagPosition.Y = (j * GlobalGameConstants.TilesPerRoomHigh * GlobalGameConstants.TileSize.Y) + ((GlobalGameConstants.TilesPerRoomHigh / 2) * GlobalGameConstants.TileSize.Y);
                                }
                            }
                            else
                            {
                                for (int p = 0; p < GlobalGameConstants.TilesPerRoomWide; p++)
                                {
                                    for (int q = 0; q < GlobalGameConstants.TilesPerRoomHigh; q++)
                                    {
                                        map[(i * GlobalGameConstants.TilesPerRoomWide) + p, (j * GlobalGameConstants.TilesPerRoomHigh) + q] = TileType.TestWall;
                                    }
                                }
                            }
                        }
                    }
                    else
                    {
                        //fill a room with empty tiles if it is empty
                        for (int p = 0; p < GlobalGameConstants.TilesPerRoomWide; p++)
                        {
                            for (int q = 0; q < GlobalGameConstants.TilesPerRoomHigh; q++)
                            {
                                map[(i * GlobalGameConstants.TilesPerRoomWide) + p, (j * GlobalGameConstants.TilesPerRoomHigh) + q] = TileType.TestWall;
                            }
                        }
                    }
                }
            }

            convertTestWallsToWalls();
        }