private KeyValuePair <int, SceneItemDefinition>?ProcessSectionItem(string line)
        {
            if (line.StartsWith("end"))
            {
                currentSection = IDESection.END;
                return(null);
            }

            string[] toks = line.Split(new char[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries);

            if (toks.Length < 5)
            {
                string msg = "Incorrect number of tokens in OBJS/TOBJ section: " + toks.Length.ToString() + ".";
                Log.Instance.Print(msg, MessageType.Error);
                throw new LoadingException(msg);
            }

            SceneItemDefinition obj = new SceneItemDefinition();
            int id = Int32.Parse(toks[0]);

            obj.Name          = toks[1];
            obj.TextureFolder = toks[2];
            obj.DrawDistance  = float.Parse(toks[4]);
            obj.Flags         = (IdeFlags)int.Parse(toks[5]);

            return(new KeyValuePair <int, SceneItemDefinition>(id, obj));
        }
 private void ProcessNewSectionStart(string line)
 {
     if (line.StartsWith("objs"))
     currentSection = IDESection.OBJS;
      else if (line.StartsWith("tobj"))
     currentSection = IDESection.TOBJ;
 }
 private void ProcessNewSectionStart(string line)
 {
     if (line.StartsWith("objs"))
     {
         currentSection = IDESection.OBJS;
     }
     else if (line.StartsWith("tobj"))
     {
         currentSection = IDESection.TOBJ;
     }
 }
        private KeyValuePair<int, SceneItemDefinition>? ProcessSectionItem(string line)
        {
            if (line.StartsWith("end"))
             {
            currentSection = IDESection.END;
            return null;
             }

             string[] toks = line.Split(new char[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries);

             if (toks.Length < 5)
             {
            string msg = "Incorrect number of tokens in OBJS/TOBJ section: " + toks.Length.ToString() + ".";
            Log.Instance.Print(msg, MessageType.Error);
            throw new LoadingException(msg);
             }

             SceneItemDefinition obj = new SceneItemDefinition();
             int id = Int32.Parse(toks[0]);
             obj.Name = toks[1];
             obj.TextureFolder = toks[2];
             obj.DrawDistance = float.Parse(toks[4]);
             obj.Flags = (IdeFlags)int.Parse(toks[5]);

             return new KeyValuePair<int, SceneItemDefinition>(id, obj);
        }