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

namespace Halo3Map.Scripting
{
    public class ScriptString
    {
        public string cmd;
        public int position;

        public static string total;

        public ScriptString(int pos)
        {
            if (pos > total.Length)
                cmd = "";
            else
            {
                int end = total.IndexOf('\0', pos);
                cmd = total.Substring(pos, end - pos);
            }
            position = pos;
        }

        public ScriptString()
        {

        }

        public static void readStrings(ref ScriptsData sd)
        {
            for (int i = 0; i < sd.scripttable.Count; i++)
            {
                char c = (char)sd.scripttable[i].c;
                total += c;
            }
        }
    }
}
