Exemplo n.º 1
0
        internal protected override IGameResource PrecacheResource(Game owner, string resource_name, string r_path, string r_name)
        {
            IGameResource gr     = null;
            bool          result = false;

            switch (resource_name)
            {
            case Managers.BlamDefinition.ResourceScripts:
                gr     = new Scripting.XmlInterface();
                result = gr.Load(r_path, r_name);
                break;

            case Managers.BlamDefinition.ResourceStringIds:
                gr     = new Managers.StringIdStaticCollection();
                result = gr.Load(r_path, r_name);
                break;

            case Managers.BlamDefinition.ResourceVertexBuffers:
                gr     = new Render.VertexBufferInterface.VertexBuffersGen3();
                result = gr.Load(r_path, r_name);
                break;
            }

            if (!result && gr != null)
            {
                gr.Close();
                gr = null;
            }

            return(gr);
        }
Exemplo n.º 2
0
		internal protected override IGameResource PrecacheResource(Game owner, string resource_name, string r_path, string r_name)
		{
			IGameResource gr = null;
			bool result = false;

			switch (resource_name)
			{
				case Managers.BlamDefinition.ResourceScripts:
					gr = new Scripting.XmlInterface();
					result = gr.Load(r_path, r_name);
					break;

				case Managers.BlamDefinition.ResourceStringIds:
					gr = new Managers.StringIdStaticCollection();
					result = gr.Load(r_path, r_name);
					break;

				case Managers.BlamDefinition.ResourceVertexBuffers:
					gr = new Render.VertexBufferInterface.VertexBuffersGen3();
					result = gr.Load(r_path, r_name);
					break;
			}

			if (!result && gr != null)
			{
				gr.Close();
				gr = null;
			}

			return gr;
		}
Exemplo n.º 3
0
		static void TestNewStringIdManagerResources(string r_path, string r_name)
		{
			var sid_sc = new Managers.StringIdStaticCollection();
			sid_sc.Load(r_path, r_name);

			var sm2 = new Managers.StringIdManager(sid_sc);
			sm2.Definition.ToString();

			sm2 = null;
		}
Exemplo n.º 4
0
        static void TestNewStringIdManagerResources(string r_path, string r_name)
        {
            var sid_sc = new Managers.StringIdStaticCollection();

            sid_sc.Load(r_path, r_name);

            var sm2 = new Managers.StringIdManager(sid_sc);

            sm2.Definition.ToString();

            sm2 = null;
        }