Exemplo n.º 1
0
        public void Load(Stream s)
        {
            p = new Doom3Parser(s);

            p.ReadToken("mapProcFile003");

            Models = new List <Model>();

            while (true)
            {
                string what;
                try
                {
                    what = p.ReadToken();
                }
                catch (Exception)
                {
                    break;
                }
                switch (what)
                {
                case "model":
                    Models.Add(ReadModel());
                    break;

                case "nodes":
                    ReadNodes();
                    break;

                case "interAreaPortals":
                    ReadPortals();
                    break;

                case "shadowModel":
                    ReadShadowModel();
                    break;

                default:
                    throw new Exception("dont know " + what);
                }
            }
            p = null;
        }
Exemplo n.º 2
0
        public void Load(Stream s)
        {
            p = new Doom3Parser(s);

            p.ReadToken("mapProcFile003");

            Models = new List<Model>();

            while (true)
            {
                string what;
                try
                {
                    what = p.ReadToken();
                }
                catch (Exception)
                {
                    break;
                }
                switch (what)
                {
                    case "model":
                        Models.Add(ReadModel());
                        break;
                    case "nodes":
                        ReadNodes();
                        break;
                    case "interAreaPortals":
                        ReadPortals();
                        break;
                    case "shadowModel":
                        ReadShadowModel();
                        break;
                    default:
                        throw new Exception("dont know " + what);
                }
            }
            p = null;
        }