internal GDFEntry(GDFEntry xIn) { xref = xIn.xref; xName = xIn.xName; xSize = xIn.xSize; Atts = xIn.Atts; xStartBlock = xIn.xStartBlock; }
/// <summary> /// Create an instance of this project /// </summary> /// <param name="Image">Image to build from</param> /// <param name="OutFolder">Save location</param> /// <param name="HeaderInfo">Header info</param> public CreateSVOD(GDFImage Image, string OutFolder, HeaderData HeaderInfo) { if (!Image.Valid) return; BaseImage = Image; OutLocation = OutFolder; xHeader = HeaderInfo; if (Image.Deviation == 0 && Image.baseoffset != 0) Deviation = (uint)((Image.baseoffset / 0x1000) + 1); else Deviation = Image.Deviation; xActive = false; }
internal GDFEntry(GDFImage xIn) { DJsIO xIO = xIn.xIO; entryoffset = xIO.Position; xStartBlock = xIO.ReadUInt32(false); xSize = xIO.ReadInt32(false); Atts = (GDFAttributes)xIO.ReadByte(); byte nlen = xIO.ReadByte(); if (nlen != 0xFF) { xName = xIO.ReadString(StringForm.ASCII, nlen); } if (!VariousFunctions.IsValidXboxName(xName)) { throw new Exception("Invalid Name"); } xref = xIn; }
private void buttonX2_Click(object sender, EventArgs e) { string result = VariousFunctions.GetUserFileLocale("Open a GDF Image", "", true); if (result == null) return; if (ximg != null) ximg.Close(); try { ximg = new GDFImage(result, (uint)numericUpDown11.Value); if (ximg.Valid) textBoxX2.Text = ximg.FileNameLong; } catch (Exception x) { ximg = null; textBoxX2.Text = ""; MessageBox.Show(x.Message); } }
internal GDFFolder(int size, uint xBlock, GDFImage Ref) { xSize = size; xStartBlock = xBlock; xref = Ref; }
internal GDFEntry(GDFImage xIn) { DJsIO xIO = xIn.xIO; entryoffset = xIO.Position; xStartBlock = xIO.ReadUInt32(false); xSize = xIO.ReadInt32(false); Atts = (GDFAttributes)xIO.ReadByte(); byte nlen = xIO.ReadByte(); if (nlen != 0xFF) (xName = xIO.ReadString(StringForm.ASCII, nlen)).IsValidXboxName(); if (xName == "") throw new Exception("No Name"); xName.IsValidXboxName(); xref = xIn; }
void ReadFile(string file) { try { switch (VariousFunctions.ReadFileType(file)) { case XboxFileType.STFS: { LogRecord x = new LogRecord(); STFSPackage xPackage = new STFSPackage(file, x); if (!xPackage.ParseSuccess) return; PackageExplorer xExplorer = new PackageExplorer(this); xExplorer.listBox4.Items.AddRange(x.Log); x.WhenLogged += new LogRecord.OnLog(xExplorer.xAddLog); xExplorer.set(ref xPackage); xExplorer.Show(); } break; case XboxFileType.SVOD: { SVODPackage hd = new SVODPackage(file, null); if (!hd.IsValid) return; HDDGameForm frm = new HDDGameForm(hd, file, this); frm.MdiParent = this; frm.Show(); } break; case XboxFileType.Music: { MusicFile xfile = new MusicFile(file); MusicView xview = new MusicView(this, file, xfile); xview.MdiParent = this; xview.Show(); } break; case XboxFileType.GPD: { GameGPD y = new GameGPD(file, 0xFFFFFFFF); GPDViewer z = new GPDViewer(y, file, this); z.MdiParent = this; z.Show(); } break; case XboxFileType.FATX: { FATXDrive xdrive = new FATXDrive(file); Files.Add(file); FATXBrowser y = new FATXBrowser(xdrive, file, this); y.MdiParent = this; y.Show(); } break; case XboxFileType.GDF: { StatsForm x = new StatsForm(0); x.Text = "Select Deviation"; if (x.ShowDialog() != DialogResult.OK) return; GDFImage ximg = new GDFImage(file, x.ChosenID); if (!ximg.Valid) throw new Exception("Invalid package"); GDFViewer xViewer = new GDFViewer(ximg, this); xViewer.MdiParent = this; xViewer.Show(); } break; default: MessageBox.Show("Error: Unknown file"); return; } Files.Add(file); } catch (Exception x) { MessageBox.Show(x.Message); } }