public Object Clone() { ExtendedFrame frm = new ExtendedFrame(); frm.names = (ArrayList)names.Clone(); frm.offsets = (ArrayList)offsets.Clone(); frm.script = script; return frm; }
protected int readExtendedFrames(StreamReader rdr, System.Collections.ArrayList frames) { string str; int realFrames = 0; for (int frms = 0; frms < FRAMES2_MAX; ++frms) { ExtendedFrame frm = new ExtendedFrame(); bool[] set = new bool[PARTS_MAX]; for (int parts = 0; parts < PARTS_MAX; ++parts) { str = rdr.ReadLine(); if (str.Length > 0) { set[parts] = true; frm.names.Add(str); } } //read offsets str = rdr.ReadLine(); string[] split = str.Split(';'); for (int i = 0; i < PARTS_MAX; ++i) { if (!set[i]) continue; Vec2i offset = new Vec2i(Convert.ToInt32(split[2*i]), Convert.ToInt32(split[2*i+1])); frm.offsets.Add(offset); } if (set[0] || set[1]) realFrames = frms+1; if (split.Length > PARTS_MAX * 2) frm.script = split[PARTS_MAX * 2].Replace('\xaf', ';'); frames.Add(frm); } frames.RemoveRange(realFrames, FRAMES2_MAX - realFrames); str = rdr.ReadLine(); return Convert.ToInt32(str); }