using System;
using System.Collections.Generic;
using System.Text;
using QuadEngine;

namespace HumanLikeBattleRobots.Data
{
    static class GraphicResources
    {
        public static IQuadTexture AxisTexture;
        public static IQuadTexture CannonBallTexture;
        public static IQuadTexture CollisionTexture;
        public static IQuadTexture RobotShadowTexture;
        public static IQuadTexture RobotShadowSmallTexture;
        public static IQuadTexture CannonballShadowTexture;
        public static IQuadFont TestFont;

        //текстуры окружения
        public static IQuadTexture GroundTexture;
        public static IQuadTexture BushTexture;
        public static IQuadTexture BoxTexture;
        public static IQuadTexture CraterTexture;
        public static IQuadTexture BonusTexture;

        //текстуры оружия
        public static IQuadTexture MachineGunLeftTexture;
        public static IQuadTexture MachineGunRightTexture;
        public static IQuadTexture SmallCannonTexture;
        public static IQuadTexture ShotgunTexture;

        public static IQuadTexture BulletTexture;
        
        // текстуры эффектов
        public static IQuadTexture ExplosionTexture;
        public static IQuadTexture SmokeTexture;

        //текстуры для робота игрока
        public static IQuadTexture MyTowerTexture;
        public static IQuadTexture MyRobotHullTexture;
        public static IQuadTexture MyLeftLegTexture;
        public static IQuadTexture MyRightLegTexture;
        public static IQuadTexture InfoPictureTexture;
        public static IQuadTexture StarTexture;

        //текстуры для вражеских роботов
        //текстуры для робосолдата
        public static IQuadTexture SoldierTower1Texture;
        public static IQuadTexture SoldierTower2Texture;
        public static IQuadTexture SoldierHull1Texture;
        public static IQuadTexture SoldierHull2Texture;
        public static IQuadTexture SoldierLegTexture;
        //текстуры для робота-мины
        public static IQuadTexture MineHullTexture;
        public static IQuadTexture MineLegTexture;

        public static void Initialize(IQuadDevice QuadDevice, IQuadRender QuadRender)
        {
            QuadDevice.CreateTexture(out AxisTexture);
            AxisTexture.LoadFromFile(0, "data\\textures\\axis.png");

            QuadDevice.CreateTexture(out CannonBallTexture);
            CannonBallTexture.LoadFromFile(0, "data\\textures\\cannonball2.png");

            QuadDevice.CreateTexture(out CollisionTexture);
            CollisionTexture.LoadFromFile(0, "data\\textures\\collision.png");

            QuadDevice.CreateTexture(out RobotShadowTexture);
            RobotShadowTexture.LoadFromFile(0, "data\\textures\\robotshadow2.png");

            QuadDevice.CreateTexture(out RobotShadowSmallTexture);
            RobotShadowSmallTexture.LoadFromFile(0, "data\\textures\\robotshadowsmall.png");

            QuadDevice.CreateTexture(out CannonballShadowTexture);
            CannonballShadowTexture.LoadFromFile(0, "data\\textures\\cannonballshadow.png");

            QuadDevice.CreateTexture(out MachineGunLeftTexture);
            MachineGunLeftTexture.LoadFromFile(0, "data\\textures\\machinegunleft.png");

            QuadDevice.CreateTexture(out MachineGunRightTexture);
            MachineGunRightTexture.LoadFromFile(0, "data\\textures\\machinegunright.png");

            QuadDevice.CreateTexture(out SmallCannonTexture);
            SmallCannonTexture.LoadFromFile(0, "data\\textures\\smallcannon.png", 49, 30);

            QuadDevice.CreateTexture(out ShotgunTexture);
            ShotgunTexture.LoadFromFile(0, "data\\textures\\shotgun.png", 89, 30);

            QuadDevice.CreateTexture(out BulletTexture);
            BulletTexture.LoadFromFile(0, "data\\textures\\bullet.png");


            //текстуры эффектов
            QuadDevice.CreateTexture(out ExplosionTexture);
            ExplosionTexture.LoadFromFile(0, "data\\textures\\explosion.png", 162, 150);

            QuadDevice.CreateTexture(out SmokeTexture);
            SmokeTexture.LoadFromFile(0, "data\\textures\\smoke.png");

            //текстуры для окружения
            QuadDevice.CreateTexture(out GroundTexture);
            GroundTexture.LoadFromFile(0, "data\\textures\\ground3.png");

            QuadDevice.CreateTexture(out BushTexture);
            BushTexture.LoadFromFile(0, "data\\textures\\bush2.png");

            QuadDevice.CreateTexture(out BoxTexture);
            BoxTexture.LoadFromFile(0, "data\\textures\\box.png");

            QuadDevice.CreateTexture(out BonusTexture);
            BonusTexture.LoadFromFile(0, "data\\textures\\bonuses.png", 45, 45);

            QuadDevice.CreateTexture(out CraterTexture);
            CraterTexture.LoadFromFile(0, "data\\textures\\crater.png");

            //текстуры для робота игрока
            QuadDevice.CreateTexture(out MyTowerTexture);
            MyTowerTexture.LoadFromFile(0, "data\\textures\\mytower.png");

            QuadDevice.CreateTexture(out MyRobotHullTexture);
            MyRobotHullTexture.LoadFromFile(0, "data\\textures\\myrobothull.png");

            QuadDevice.CreateTexture(out MyLeftLegTexture);
            MyLeftLegTexture.LoadFromFile(0, "data\\textures\\myrobotleftleg.png");

            QuadDevice.CreateTexture(out MyRightLegTexture);
            MyRightLegTexture.LoadFromFile(0, "data\\textures\\myrobotrightleg.png");

            QuadDevice.CreateTexture(out InfoPictureTexture);
            InfoPictureTexture.LoadFromFile(0, "data\\textures\\info.png");

            QuadDevice.CreateTexture(out StarTexture);
            StarTexture.LoadFromFile(0, "data\\textures\\star.png");

            //текстуры для вражеских роботов
            //текстуры для робосолдата
            QuadDevice.CreateTexture(out SoldierTower1Texture);
            SoldierTower1Texture.LoadFromFile(0, "data\\textures\\enemytower1.png");

            QuadDevice.CreateTexture(out SoldierTower2Texture);
            SoldierTower2Texture.LoadFromFile(0, "data\\textures\\enemytower2.png");

            QuadDevice.CreateTexture(out SoldierHull1Texture);
            SoldierHull1Texture.LoadFromFile(0, "data\\textures\\enemysoldierhull1.png");

            QuadDevice.CreateTexture(out SoldierHull2Texture);
            SoldierHull2Texture.LoadFromFile(0, "data\\textures\\enemysoldierhull2.png");

            QuadDevice.CreateTexture(out SoldierLegTexture);
            SoldierLegTexture.LoadFromFile(0, "data\\textures\\enemysoldierleg.png", 36, 71);

            //текстуры для робота-мины
            QuadDevice.CreateTexture(out MineHullTexture);
            MineHullTexture.LoadFromFile(0, "data\\textures\\minehull.png");

            QuadDevice.CreateTexture(out MineLegTexture);
            MineLegTexture.LoadFromFile(0, "data\\textures\\mineleg.png");


            QuadDevice.CreateFont(out TestFont);
            TestFont.LoadFromFile("data\\fonts\\test_font.png", "data\\fonts\\test_font.qef");


            //TestFont.LoadFromFile("data\\fonts\\tex.bmp", "data\\fonts\\uv.qef");
        }
    }
}
