public PaletteHeaderData(Project p, string command, IEnumerable<string> values, FileParser parser, IList<int> spacing)
: base(p, command, values, 3, parser, spacing)
{
int dest = -1;
try {
dest = Project.EvalToInt(GetValue(2));
}
catch(FormatException) {
dest = -1;
}
if (dest != -1)
sourceFromRam = true;
else {
paletteDataFile = Project.GetFileWithLabel(GetValue(2));
if (!(paletteDataFile.GetData(GetValue(2)) is RgbData))
throw new Exception("Label \"" + GetValue(2) + "\" was expected to reference data defined with m_RGB16");
}
}