From 06d72920648e5ed3d5a77a2062521d887edf7675 Mon Sep 17 00:00:00 2001 From: Alexey 'Cluster' Avdyukhin Date: Sat, 5 Nov 2022 15:55:34 +0400 Subject: More UNIF fields --- UnifFile.cs | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) (limited to 'UnifFile.cs') diff --git a/UnifFile.cs b/UnifFile.cs index f7362b5..6872372 100644 --- a/UnifFile.cs +++ b/UnifFile.cs @@ -417,6 +417,174 @@ namespace com.clusterrr.Famicom.Containers } } + /// + /// PRG0 field + /// + public IEnumerable? PRG0 + { + get + { + if (ContainsField("PRG0")) + return this["PRG0"]; + else + return null; + } + set + { + if (value != null) + this["PRG0"] = value; + else + RemoveField("PRG0"); + } + } + + /// + /// PRG1 field + /// + public IEnumerable? PRG1 + { + get + { + if (ContainsField("PRG1")) + return this["PRG1"]; + else + return null; + } + set + { + if (value != null) + this["PRG1"] = value; + else + RemoveField("PRG1"); + } + } + + /// + /// PRG2 field + /// + public IEnumerable? PRG2 + { + get + { + if (ContainsField("PRG2")) + return this["PRG2"]; + else + return null; + } + set + { + if (value != null) + this["PRG2"] = value; + else + RemoveField("PRG2"); + } + } + + /// + /// PRG3 field + /// + public IEnumerable? PRG3 + { + get + { + if (ContainsField("PRG3")) + return this["PRG3"]; + else + return null; + } + set + { + if (value != null) + this["PRG3"] = value; + else + RemoveField("PRG3"); + } + } + + /// + /// CHR0 field + /// + public IEnumerable? CHR0 + { + get + { + if (ContainsField("CHR0")) + return this["CHR0"]; + else + return null; + } + set + { + if (value != null) + this["CHR0"] = value; + else + RemoveField("CHR0"); + } + } + + /// + /// CHR1 field + /// + public IEnumerable? CHR1 + { + get + { + if (ContainsField("CHR1")) + return this["CHR1"]; + else + return null; + } + set + { + if (value != null) + this["CHR1"] = value; + else + RemoveField("CHR1"); + } + } + + /// + /// CHR2 field + /// + public IEnumerable? CHR2 + { + get + { + if (ContainsField("CHR2")) + return this["CHR2"]; + else + return null; + } + set + { + if (value != null) + this["CHR2"] = value; + else + RemoveField("CHR2"); + } + } + + /// + /// CHR3 field + /// + public IEnumerable? CHR3 + { + get + { + if (ContainsField("CHR3")) + return this["CHR3"]; + else + return null; + } + set + { + if (value != null) + this["CHR3"] = value; + else + RemoveField("CHR3"); + } + } + /// /// Calculate CRC32 for PRG and CHR fields and store it into PCKx and CCKx fields /// -- cgit v1.2.3