public Cf3MapObjectNeedle(int nCX, int nCY, int nType = 0) : base(f3MapObjectType.MOT_NEEDLE) { m_EnemyList.Add(this); m_Graphic = CResourceManager.ResourceManager.Get(RID.RID_NEEDLE); SetPos(nCX * 32 + 16, nCY * 32 + 17); switch (nType) { case 1: m_Type = NDT.NDT_HORIZONTAL; m_State = NDS.NDS_LEFT; break; case 2: m_Type = NDT.NDT_VERTICAL; m_StartY = m_Y; m_State = NDS.NDS_STOP; break; case 3: m_Type = NDT.NDT_HORIZONTAL; m_State = NDS.NDS_RIGHT; break; default: m_Type = NDT.NDT_UNDEFINED; break; } m_Speed = 0; }
public DownloadStationPatcher(NDS downloadStation) { mDownloadStation = downloadStation; mFileSystem = mDownloadStation.ToFileSystem(); SFSDirectory d = mFileSystem.GetDirectoryByPath("//ds_demo"); //this is shitty... d.Files.Remove(d.GetFileByPath("ds_demo/ANDEdemo")); d.Files.Remove(d.GetFileByPath("ds_demo/AGFEdemo")); d.Files.Remove(d.GetFileByPath("ds_demo/AMFEclip")); d.Files.Remove(d.GetFileByPath("ds_demo/AMTEdemo")); d.Files.Remove(d.GetFileByPath("ds_demo/APTEdemo")); d.Files.Remove(d.GetFileByPath("ds_demo/ATTEdemo")); d.Files.Remove(d.GetFileByPath("ds_demo/ATTEpush")); d.Files.Remove(d.GetFileByPath("ds_demo/testcode")); d.Files.Remove(d.GetFileByPath("ds_demo/AMCEdemo")); mFileSystem.GetFileByPath("//mb/server").Data = haxxStationServer; mFileSystem.GetFileByPath("//mb/icon.nbfc").Data = haxxStationIconImage; mFileSystem.GetFileByPath("//mb/icon.nbfp").Data = haxxStationIconPltt; //change banner mDownloadStation.Banner.Banner.Image = haxxStationIconImage; mDownloadStation.Banner.Banner.Pltt = haxxStationIconPltt; String banner = title + "\n" + subTitle1 + "\n" + subTitle2; for (int i = 0; i < 6; i++) { mDownloadStation.Banner.Banner.GameName[i] = banner; } mDemoMenu = new DemoMenu(); }
public DownloadStationPatcher(NDS downloadStation) { mDownloadStation = downloadStation; mFileSystem = mDownloadStation.ToFileSystem(); SFSDirectory d = mFileSystem.GetDirectoryByPath("//ds_demo"); //this is shitty... d.Files.Remove(d.GetFileByPath("ds_demo/ANDEdemo")); d.Files.Remove(d.GetFileByPath("ds_demo/AGFEdemo")); d.Files.Remove(d.GetFileByPath("ds_demo/AMFEclip")); d.Files.Remove(d.GetFileByPath("ds_demo/AMTEdemo")); d.Files.Remove(d.GetFileByPath("ds_demo/APTEdemo")); d.Files.Remove(d.GetFileByPath("ds_demo/ATTEdemo")); d.Files.Remove(d.GetFileByPath("ds_demo/ATTEpush")); d.Files.Remove(d.GetFileByPath("ds_demo/testcode")); d.Files.Remove(d.GetFileByPath("ds_demo/AMCEdemo")); mFileSystem.GetFileByPath("//mb/server").Data = haxxStationServer; mFileSystem.GetFileByPath("//mb/icon.nbfc").Data = haxxStationIconImage; mFileSystem.GetFileByPath("//mb/icon.nbfp").Data = haxxStationIconPltt; //change banner mDownloadStation.Banner.Banner.Image = haxxStationIconImage; mDownloadStation.Banner.Banner.Pltt = haxxStationIconPltt; for (int i = 0; i < 6; i++) { mDownloadStation.Banner.Banner.GameName[i] = "HaxxStation\nBy Gericom, shutterbug2000\nand Apache Thunder"; } mDemoMenu = new DemoMenu(); }
private static void ScanFile(Stream fileStream) { NDS nds = null; try { nds = new NDS(fileStream); } catch (Exception) { Console.WriteLine("NDS parsing failed."); return; } var ser = new SequenceSerializer(); var sdatFiles = nds.FileSystem.RootDir.FindMatchingFiles("*.sdat"); foreach (var sdatFile in sdatFiles) { SDat sdat; try { sdat = SDat.Open(nds.FileSystem.OpenFile(sdatFile)); } catch (InvalidDataException) { Console.Out.WriteLine($"{sdatFile.AbsPath} Fail"); continue; //if this isn't even a valid sdat, no need to try the sequence parser on it } Console.Out.WriteLine($"{sdatFile.AbsPath} Loaded"); for (int sequenceIndex = 0; sequenceIndex < sdat.sequenceInfo.Count; ++sequenceIndex) { if (sdat.sequenceInfo[sequenceIndex] == null) { continue; } string seqName; if (sdat.seqSymbols != null && sdat.seqSymbols[sequenceIndex] != null) { seqName = $"# {sequenceIndex} {sdat.seqSymbols[sequenceIndex]}"; } else { seqName = $"# {sequenceIndex}"; } SSEQ sseq = null; try { sseq = sdat.OpenSequence(sequenceIndex); } catch (Exception) { Console.WriteLine($"Sequence {seqName} failed to parse."); } try { ser.Clear(); ser.Serialize(sseq.sequence); } catch (Exception) { Console.WriteLine($"Sequence {seqName} failed to serialize."); } } } }
private void run(string[] args) { nds = new NDS(File.OpenRead(args[0])); scriptArchive = new MainArchive(nds.FileSystem.OpenFile("jpn/spt.bin")); SPT spt = new SPT(scriptArchive.OpenFile(int.Parse(args[1]))); string contents = spt.OpenSection(int.Parse(args[2])); }
public IconTest(string romName) { InitializeComponent(); nds = new NDS(File.OpenRead(romName)); Bitmap bm = nds.Banner.Icon().ToBitmap(); iconDisplay.Image = bm; }
private static int ListItems(NDS nds, List <FileSystem.File> sdats) { foreach (var sdatFile in sdats) { SDat sdat = SDat.Open(nds.FileSystem.OpenFile(sdatFile)); ListItems(sdat); } return(ERR_OK); }
public void CountPrice() { Console.WriteLine("Enter Price of the article"); int quantity = Convert.ToInt32(Console.ReadLine()); NDS countNDS = new NDS(quantity, account); Console.WriteLine("Customer {0} has made order of article with price {1}$ / 1ent by Provider {2}. Price to Pay:", customer, account, provider); Console.WriteLine("Price with NDS = {0}", countNDS.CountWithNds()); Console.WriteLine("Price with NDS = {0}", countNDS.CountWithoutNds()); }
public GraphicsTestForm(string[] args) { InitializeComponent(); nds = new NDS(File.OpenRead(args[0])); nclr = new NCLR(nds.FileSystem.OpenFile(@"data/data0/BG1.NCLR")); ncgr = new NCGR(nds.FileSystem.OpenFile(@"data/data0/BG1.NCGR")); nscr = new NSCR(nds.FileSystem.OpenFile(@"data/data0/BG1.NSCR")); Bitmap bitmap = nscr.ToBitmap(ncgr, nclr.Palette); ImgDisp.Image = bitmap; }
private static BasePlayer MakePlayer(string name, NDS nds, List <FileSystem.File> sdats) { foreach (var sdatFile in sdats) { SDat sdat = SDat.Open(nds.FileSystem.OpenFile(sdatFile)); BasePlayer player = MakePlayer(sdat, name); if (player != null) { return(player); } } throw new FileNotFoundException($"Failed to find a sequence by the name of \"{name}\""); }
public void Run(string[] args) { nds = new NDS(File.OpenRead(args[0])); outputPath = args[1]; var archiveList = nds.FileSystem.RootDir.FindMatchingFiles("*.bin"); foreach (var archiveEntry in archiveList) { Console.WriteLine($"Opening archive \"{archiveEntry.AbsPath}\""); var archiveStream = nds.FileSystem.OpenFile(archiveEntry); var archive = new MainArchive(archiveStream); for (var fileIndex = 0; fileIndex < archive.FileCount; ++fileIndex) { try { var fileStream = archive.OpenFile(fileIndex); var ext = SniffFileExtension(fileStream); fileStream.Position = 0; if (ext == "bin") { bool isArch = SniffArchive(fileStream); fileStream.Position = 0; if (isArch) { Console.WriteLine($"Opening subarch \"{archiveEntry.AbsPath}/{fileIndex}"); var subArch = new SubArchive(fileStream); for (int subFileIndex = 0; subFileIndex < subArch.FileCount; ++subFileIndex) { var subfile = subArch.OpenFile(subFileIndex); var subExt = SniffFileExtension(subfile); subfile.Position = 0; WriteFile(subfile, $"{archiveEntry.AbsPath}/{fileIndex}/{subFileIndex}.{subExt}"); } continue; } } WriteFile(fileStream, $"{archiveEntry.AbsPath}/{fileIndex}.{ext}"); } catch (Exception err) { Console.WriteLine(err.Message); } } } }
static int Main(string[] args) { if (args.Length == 0) { return(ListUsage()); } NDS nds; try { nds = new NDS(File.OpenRead(args[0])); } catch (FileNotFoundException) { Console.Error.WriteLine("NDS file not found"); return(ERR_NDS_FNF); } var sdats = nds.FileSystem.RootDir.FindMatchingFiles("*.sdat"); if (sdats.Count == 0) { Console.Error.WriteLine("NDS file not found"); return(ERR_NO_SDAT); } try { switch (args.Length) { case 1: return(ListItems(nds, sdats)); case 2: return(Play(args[1], nds, sdats)); case 3: return(Save(args[1], nds, sdats, args[2])); default: Console.Error.WriteLine("Too many arguments"); return(ERR_ARGUMENTS); } } catch (SDat.NoSymbolsException) { Console.Error.WriteLine("No sequence symbols"); return(ERR_NO_SYMBOLS); } catch (FileNotFoundException) { Console.Error.WriteLine("Sequence not found"); return(ERR_SEQ_NOT_FOUND); } }
private static int Disasm(string name, NDS nds, List <FileSystem.File> sdats) { foreach (var sdatFile in sdats) { SDat sdat = SDat.Open(nds.FileSystem.OpenFile(sdatFile)); int res = Disasm(sdat, name); if (res == ERR_SEQ_NOT_FOUND) { continue; } return(res); } Console.Error.WriteLine("Sequence not found"); return(ERR_SEQ_NOT_FOUND); }
public TestForm(string[] args) { InitializeComponent(); nds = new NDS(File.OpenRead(args[0])); MainArchive mainArchive = new MainArchive(nds.FileSystem.OpenFile(args[1])); NCLR nclr = new NCLR(mainArchive.OpenFile(int.Parse(args[2]))); SubArchive subArchive = new SubArchive(mainArchive.OpenFile(int.Parse(args[3]))); NCGR ncgr = new NCGR(subArchive.OpenFile(2)); NANR nanr = new NANR(subArchive.OpenFile(1)); NCER ncer = new NCER(subArchive.OpenFile(0)); NANR.Animation anim = nanr.animations[int.Parse(args[4])]; //imgDisp.Image = cell.DrawOamBoxes(Color.Red); player = new AnimationPlayer_WinForms(anim, ncgr, nclr, ncer, imgDisp); player.Start(); }
private static int Save(string name, NDS nds, List <FileSystem.File> sdats, string output) { BasePlayer player = MakePlayer(name, nds, sdats); var wp = new SequenceWaveProviderAdapter(player); using (var w = new WaveFileWriter(File.OpenWrite(output), wp.WaveFormat)) { var buff = new byte[2048]; for (int i = 0; i < 200; i++) { int written = wp.Read(buff, 0, buff.Length / 2); w.Write(buff, 0, written); if (written < buff.Length / 2) { break; } } } return(ERR_OK); }
private void ScanFile(Stream fileStream) { NDS nds = null; try { nds = new NDS(fileStream); } catch (Exception) { Console.WriteLine("NDS parsing failed."); return; } var arm7 = nds.OpenARM7(); string hash = BitConverter.ToString(hasher.ComputeHash(arm7)); if (hashes.ContainsKey(hash)) { hashes[hash]++; } else { hashes.Add(hash, 1); } }
static int Main(string[] args) { if (args.Length == 0) { return(ListUsage()); } NDS nds; try { nds = new NDS(File.OpenRead(args[0])); } catch (FileNotFoundException) { Console.Error.WriteLine("NDS file not found"); return(ERR_NDS_FNF); } var sdats = nds.FileSystem.RootDir.FindMatchingFiles("*.sdat"); if (sdats.Count == 0) { Console.Error.WriteLine("SDAT file not found"); return(ERR_NO_SDAT); } switch (args.Length) { case 1: return(ListItems(nds, sdats)); case 2: return(Disasm(args[1], nds, sdats)); default: Console.Error.WriteLine("Too many arguments"); return(ERR_ARGUMENTS); } }
public override void OnMove() { if (!IsValid()) { return; } if (m_Type == NDT.NDT_UNDEFINED) { // このタイミングで初期化 if (m_pParent.GetHit((int)Math.Floor(m_X / 32), (int)Math.Floor((m_Y + 16) / 32), HIT.HIT_TOP)) { m_Type = NDT.NDT_HORIZONTAL; m_State = NDS.NDS_STOP; } else { m_Type = NDT.NDT_VERTICAL; m_StartY = m_Y; m_State = NDS.NDS_STOP; } } if (m_Type == NDT.NDT_HORIZONTAL) { if (m_State == NDS.NDS_STOP) { TL.BringClose(ref m_Speed, 0.0f, 1.0f); if (m_Speed == 0) { if (!m_pParent.GetHit((int)Math.Floor((m_X + 15) / 32), (int)Math.Floor((m_Y + 16) / 32), HIT.HIT_TOP) || m_pParent.GetHit((int)Math.Floor((m_X + 15) / 32), (int)Math.Floor((m_Y) / 32), HIT.HIT_LEFT)) { m_State = NDS.NDS_LEFT; } else { m_State = NDS.NDS_RIGHT; } } } else if (m_State == NDS.NDS_LEFT) { m_X -= 1; if (!m_pParent.GetHit((int)Math.Floor((m_X - 16) / 32), (int)Math.Floor((m_Y + 16) / 32), HIT.HIT_TOP) || m_pParent.GetHit((int)Math.Floor((m_X - 16) / 32), (int)Math.Floor((m_Y) / 32), HIT.HIT_RIGHT)) { m_State = NDS.NDS_STOP; m_Speed = 20; } } else if (m_State == NDS.NDS_RIGHT) { m_X += 1; if (!m_pParent.GetHit((int)Math.Floor((m_X + 15) / 32), (int)Math.Floor((m_Y + 16) / 32), HIT.HIT_TOP) || m_pParent.GetHit((int)Math.Floor((m_X + 15) / 32), (int)Math.Floor((m_Y) / 32), HIT.HIT_LEFT)) { m_State = NDS.NDS_STOP; m_Speed = 20; } } } else if (m_Type == NDT.NDT_VERTICAL) { if (m_State == NDS.NDS_STOP) { if (m_Speed != 0) { TL.BringClose(ref m_Speed, 0.0f, 1.0f); if (m_Speed == 0) { m_State = NDS.NDS_UP; } } } else if (m_State == NDS.NDS_UP) { TL.BringClose(ref m_Y, m_StartY, 1.0f); if (m_Y == m_StartY) { m_State = NDS.NDS_STOP; } } else if (m_State == NDS.NDS_DOWN) { m_Speed += 0.2f; TL.Saturate(0.0f, ref m_Speed, 10.0f); m_Y += m_Speed; if (m_pParent.GetHit((int)Math.Floor(m_X / 32), (int)Math.Floor((m_Y + 16) / 32), HIT.HIT_TOP)) { m_Y = (float)Math.Floor((m_Y + 16) / 32) * 32 - 15; m_Speed = 20; m_State = NDS.NDS_STOP; } else if (m_Y > m_pParent.GetHeight() * 32 + 16) { m_Type = NDT.NDT_DEAD; new Cf3MapObjectEffect(m_X, m_Y, 1); } } } else if (m_Type == NDT.NDT_DEAD) { Kill(); } }
public BoardSelector(NDS Rom) { this.Rom = Rom; this.InitializeComponent(); }
private async void Solve(object sender, RoutedEventArgs e) { var loader = new Windows.ApplicationModel.Resources.ResourceLoader(); if (at.Text == "" || bt.Text == "" || ct.Text == "") { MessageDialog messageDialog = new MessageDialog(loader.GetString("NoneInErr")); await messageDialog.ShowAsync(); return; } if (at.Text == "0") { MessageDialog messageDialog = new MessageDialog(loader.GetString("QeouErr")); await messageDialog.ShowAsync(); return; } #region Startup Check //Start-up Check if this is a new session if (Answer.Visibility == Visibility.Visible) { Answer.Visibility = Visibility.Collapsed; p_ratermm.Visibility = Visibility.Visible; p_rational.Visibility = Visibility.Visible; p_numer.Visibility = Visibility.Visible; p_ratline.Visibility = Visibility.Visible; p_ratdoni.Visibility = Visibility.Visible; p_first.Visibility = Visibility.Visible; p_second.Visibility = Visibility.Visible; p_irrational.Visibility = Visibility.Visible; p_coe.Visibility = Visibility.Visible; p_surd1.Visibility = Visibility.Visible; p_surd2.Visibility = Visibility.Visible; p_surdnumer.Visibility = Visibility.Visible; p_irraline.Visibility = Visibility.Visible; p_irratdoni.Visibility = Visibility.Visible; p_i.Visibility = Visibility.Collapsed; p_appro.Visibility = Visibility.Visible; txt.Visibility = Visibility.Visible; n_ratermm.Visibility = Visibility.Visible; n_rational.Visibility = Visibility.Visible; n_numer.Visibility = Visibility.Visible; n_ratline.Visibility = Visibility.Visible; n_ratdoni.Visibility = Visibility.Visible; n_first.Visibility = Visibility.Visible; n_second.Visibility = Visibility.Visible; n_irrational.Visibility = Visibility.Visible; n_coe.Visibility = Visibility.Visible; n_surd1.Visibility = Visibility.Visible; n_surd2.Visibility = Visibility.Visible; n_surdnumer.Visibility = Visibility.Visible; n_irraline.Visibility = Visibility.Visible; n_irratdoni.Visibility = Visibility.Visible; n_i.Visibility = Visibility.Collapsed; n_appro.Visibility = Visibility.Visible; } #endregion //Give value to numbers int a, b, c, m, b_b, a_b, m_b; int[] x = new int[2]; int[] y = new int[2]; a = Convert.ToInt32(at.Text); a_b = Convert.ToInt32(at.Text); b = Convert.ToInt32(bt.Text); b_b = Convert.ToInt32(bt.Text); c = Convert.ToInt32(ct.Text); m = b * b - 4 * a * c; m_b = m; #region Dealer //Dealing with imaginary answer if (m < 0) { p_i.Visibility = Visibility.Visible; n_i.Visibility = Visibility.Visible; m = -m; } p_second.Visibility = Visibility.Collapsed; n_second.Visibility = Visibility.Collapsed; //Dealing with the negative term;a_b and b_b are the backup of the original values when dealing in the complex form if (a < 0 && b < 0) { //when a and b are both negative p_first.Visibility = Visibility.Collapsed; n_first.Visibility = Visibility.Collapsed; b = -b; a = -a; } else { //when b is negative if (b < 0) { p_ratermm.Visibility = Visibility.Collapsed; n_ratermm.Visibility = Visibility.Collapsed; b = -b; } //when a is negative if (a < 0) { p_ratermm.Visibility = Visibility.Collapsed; n_ratermm.Visibility = Visibility.Collapsed; p_first.Visibility = Visibility.Collapsed; n_first.Visibility = Visibility.Collapsed; p_second.Visibility = Visibility.Visible; n_second.Visibility = Visibility.Visible; a = -a; } } #endregion #region delta=0 //When delta is zero if (m == 0) { p_first.Visibility = Visibility.Collapsed; p_second.Visibility = Visibility.Collapsed; p_irrational.Visibility = Visibility.Collapsed; Ans2.Visibility = Visibility.Collapsed; txt.Visibility = Visibility.Collapsed; //Simplify the fraction x[0] = b; x[1] = 2 * a; int[] rat = NDS.FracSimp(x); b = rat[0]; a = rat[1]; //When the rational donimonator is ignoreable if (a == 1) { p_ratline.Visibility = Visibility.Collapsed; p_ratdoni.Visibility = Visibility.Collapsed; p_appro.Visibility = Visibility.Collapsed; n_appro.Visibility = Visibility.Collapsed; } //Generation of the approximate form double appro = b_b / (2 * a_b); p_appro.Text = "(Approximately " + appro + ")"; //Finalise the answer p_numer.Text = b.ToString(); p_ratdoni.Text = a.ToString(); } #endregion #region rational term=0 //When the rational term is 0 else if (b == 0) { p_ratermm.Visibility = Visibility.Collapsed; n_ratermm.Visibility = Visibility.Collapsed; p_first.Visibility = Visibility.Collapsed; n_second.Visibility = Visibility.Collapsed; p_rational.Visibility = Visibility.Collapsed; n_rational.Visibility = Visibility.Collapsed; x = NDS.SimpSurd(m); y[0] = x[0]; y[1] = 2 * a; int[] irrat = NDS.FracSimp(y); //when the coefficient is ignorable if (irrat[0] == 1) { p_coe.Visibility = Visibility.Collapsed; n_coe.Visibility = Visibility.Collapsed; } //when the irrational donimonator is ignoreable if (irrat[1] == 1) { p_irratdoni.Visibility = Visibility.Collapsed; n_irratdoni.Visibility = Visibility.Collapsed; p_irraline.Visibility = Visibility.Collapsed; n_irraline.Visibility = Visibility.Collapsed; } //When the number in the surd is ignoreable if (x[1] == 1) { p_surd1.Visibility = Visibility.Collapsed; p_surd2.Visibility = Visibility.Collapsed; n_surd1.Visibility = Visibility.Collapsed; n_surd2.Visibility = Visibility.Collapsed; } if (irrat[1] == 1 && x[1] == 1) { p_appro.Visibility = Visibility.Collapsed; n_appro.Visibility = Visibility.Collapsed; } //Generation of the approximate form double appro = System.Math.Sqrt(m) / (2 * a_b); if (p_i.Visibility == Visibility.Visible) { p_appro.Visibility = Visibility.Collapsed; n_appro.Visibility = Visibility.Collapsed; } else { p_appro.Text = "(Approximately " + appro + ")"; n_appro.Text = "(Approximately -" + appro + ")"; } //Finalise the answer p_coe.Text = irrat[0].ToString(); p_surdnumer.Text = x[1].ToString(); p_irratdoni.Text = irrat[1].ToString(); n_coe.Text = irrat[0].ToString(); n_surdnumer.Text = x[1].ToString(); n_irratdoni.Text = irrat[1].ToString(); } #endregion #region General Term //Provide answer in general term else { p_second.Visibility = Visibility.Collapsed; n_second.Visibility = Visibility.Collapsed; p_first.Visibility = Visibility.Visible; n_first.Visibility = Visibility.Visible; x[0] = b; x[1] = 2 * a; a_b = a; int[] rat = NDS.FracSimp(x); b = rat[0]; a = rat[1]; x = NDS.SimpSurd(m); y[0] = x[0]; y[1] = 2 * a_b; int[] irrat = NDS.FracSimp(y); //here, b is rational numerator, a is rational donimonator,x[1] is number in the surd,irrat[0] is the coefficient, irrat[1] is the irrational donimonator. //When the number in the surd is ignoreable if (x[1] == 1) { p_first.Visibility = Visibility.Collapsed; p_second.Visibility = Visibility.Collapsed; n_first.Visibility = Visibility.Collapsed; n_second.Visibility = Visibility.Collapsed; p_irrational.Visibility = Visibility.Collapsed; n_irrational.Visibility = Visibility.Collapsed; int k, i, q, s, p; int[] sigo = new int[2]; if (a < irrat[1]) { k = a; } else { k = irrat[1]; } for (i = k; i > 0; i--) { if (a % i == 0 && irrat[1] % i == 0) { q = a / i; s = q * irrat[1]; p = b * s / a + irrat[0] * s / irrat[1]; sigo[0] = p; sigo[1] = s; } } int[] sig = NDS.FracSimp(sigo); if (a == 1) { p_ratline.Visibility = Visibility.Collapsed; p_ratdoni.Visibility = Visibility.Collapsed; p_appro.Visibility = Visibility.Collapsed; n_appro.Visibility = Visibility.Collapsed; } //Generation of the approximate form double appro = sig[0] / sig[1]; if (p_i.Visibility == Visibility.Visible) { p_appro.Visibility = Visibility.Collapsed; n_appro.Visibility = Visibility.Collapsed; } else { p_appro.Text = "(Approximately " + appro + ")"; n_appro.Text = "(Approximately -" + appro + ")"; } //Finalise the answer p_numer.Text = sig[0].ToString(); p_ratdoni.Text = sig[1].ToString(); n_numer.Text = sig[0].ToString(); n_ratdoni.Text = sig[1].ToString(); } else { //When the rational donimonator id ignorable if (a == 1) { p_ratline.Visibility = Visibility.Collapsed; p_ratdoni.Visibility = Visibility.Collapsed; n_ratline.Visibility = Visibility.Collapsed; n_ratdoni.Visibility = Visibility.Collapsed; } //when the irrational coefficient is ignorable if (irrat[0] == 1) { p_coe.Visibility = Visibility.Collapsed; n_coe.Visibility = Visibility.Collapsed; } //when the irrational donimonator is ignorable if (irrat[1] == 1) { p_irratdoni.Visibility = Visibility.Collapsed; n_irratdoni.Visibility = Visibility.Collapsed; p_irraline.Visibility = Visibility.Collapsed; n_irraline.Visibility = Visibility.Collapsed; } //Generation of the approximate form double appro1 = b_b / (2 * a_b); double appro2 = System.Math.Sqrt(m) / (2 * a_b); if (p_i.Visibility == Visibility.Visible) { p_appro.Text = "(Approximately " + appro1 + "+" + appro2 + "i)"; n_appro.Text = "(Approximately " + appro1 + "-" + appro2 + "i)"; } else { p_appro.Text = "(Approximately " + appro1 + "+" + appro2 + ")"; n_appro.Text = "(Approximately " + appro1 + "-" + appro2 + ")"; }; //Finalise the answer p_numer.Text = b.ToString(); p_ratdoni.Text = a.ToString(); n_numer.Text = b.ToString(); n_ratdoni.Text = a.ToString(); p_coe.Text = irrat[0].ToString(); p_surdnumer.Text = x[1].ToString(); p_irratdoni.Text = irrat[1].ToString(); n_coe.Text = irrat[0].ToString(); n_surdnumer.Text = x[1].ToString(); n_irratdoni.Text = irrat[1].ToString(); } } #endregion //Show the Answer Answer.Visibility = Visibility.Visible; }
public void AddRom(NDS rom) { if (rom.Header.SubRamAddress >= 0x03000000) { byte[] newArm7 = new byte[rom.SubRom.Length + arm7Fix.Length]; Array.Copy(arm7Fix, newArm7, arm7Fix.Length); Array.Copy(rom.SubRom, 0, newArm7, arm7Fix.Length, rom.SubRom.Length); IOUtil.WriteU32LE(newArm7, 0x28, rom.Header.SubEntryAddress); IOUtil.WriteU32LE(newArm7, 0x2C, rom.Header.SubRamAddress); IOUtil.WriteU32LE(newArm7, 0x30, rom.Header.SubSize); rom.SubRom = newArm7; rom.Header.SubSize = (uint)newArm7.Length; rom.Header.SubRamAddress = 0x02380000; rom.Header.SubEntryAddress = 0x02380000; } byte[] newRomFixed = rom.Write(true); uint arm9offset = (uint)(newRomFixed[0x20] | (newRomFixed[0x21] << 8) | (newRomFixed[0x22] << 16) | (newRomFixed[0x23] << 24)); uint arm9loadaddr = (uint)(newRomFixed[0x28] | (newRomFixed[0x29] << 8) | (newRomFixed[0x2A] << 16) | (newRomFixed[0x2B] << 24)); uint arm9size = (uint)(newRomFixed[0x2C] | (newRomFixed[0x2D] << 8) | (newRomFixed[0x2E] << 16) | (newRomFixed[0x2F] << 24)); uint arm7offset = (uint)(newRomFixed[0x30] | (newRomFixed[0x31] << 8) | (newRomFixed[0x32] << 16) | (newRomFixed[0x33] << 24)); //arm9 offset becomes 0x180 newRomFixed[0x20] = 0x80; newRomFixed[0x21] = 0x01; newRomFixed[0x22] = 0x00; newRomFixed[0x23] = 0x00; //arm9 load becomes 0x02332C40 (rsa_GetDecodedHash) newRomFixed[0x28] = 0x40; newRomFixed[0x29] = 0x2C; newRomFixed[0x2A] = 0x33; newRomFixed[0x2B] = 0x02; //arm9 size becomes 0x100 newRomFixed[0x2C] = 0x00; newRomFixed[0x2D] = 0x01; newRomFixed[0x2E] = 0x00; newRomFixed[0x2F] = 0x00; ushort newcrc = CRC16.GetCRC16(newRomFixed, 0, 0x15E); newRomFixed[0x15E] = (byte)(newcrc & 0xFF); newRomFixed[0x15F] = (byte)(newcrc >> 8); Array.Copy(exploitData, 0, newRomFixed, 0x180, exploitData.Length); newRomFixed[0x180 + 0x3C] = (byte)(arm7offset & 0xFF); newRomFixed[0x180 + 0x3D] = (byte)((arm7offset >> 8) & 0xFF); newRomFixed[0x180 + 0x3E] = (byte)((arm7offset >> 16) & 0xFF); newRomFixed[0x180 + 0x3F] = (byte)((arm7offset >> 24) & 0xFF); newRomFixed[0x180 + 0x40] = (byte)(arm9offset & 0xFF); newRomFixed[0x180 + 0x41] = (byte)((arm9offset >> 8) & 0xFF); newRomFixed[0x180 + 0x42] = (byte)((arm9offset >> 16) & 0xFF); newRomFixed[0x180 + 0x43] = (byte)((arm9offset >> 24) & 0xFF); newRomFixed[0x180 + 0x44] = (byte)(arm9loadaddr & 0xFF); newRomFixed[0x180 + 0x45] = (byte)((arm9loadaddr >> 8) & 0xFF); newRomFixed[0x180 + 0x46] = (byte)((arm9loadaddr >> 16) & 0xFF); newRomFixed[0x180 + 0x47] = (byte)((arm9loadaddr >> 24) & 0xFF); newRomFixed[0x180 + 0x48] = (byte)(arm9size & 0xFF); newRomFixed[0x180 + 0x49] = (byte)((arm9size >> 8) & 0xFF); newRomFixed[0x180 + 0x4A] = (byte)((arm9size >> 16) & 0xFF); newRomFixed[0x180 + 0x4B] = (byte)((arm9size >> 24) & 0xFF); string fileName = "rom" + mDemoMenu.entries.Count.ToString("0000") + "d"; var entry = new DemoMenu.DemoMenuEntry() { rating = 1, guideMode = 0x15, touchText1 = top, touchText2 = top1, internalName = fileName }; if (rom.Banner != null) { string[] lines = rom.Banner.Banner.GameName[1].Split(new char[] { '\n' }, StringSplitOptions.RemoveEmptyEntries); if (lines.Length > 0) { entry.bannerText1 = lines[0]; } else { entry.bannerText1 = "Bannerless Homebrew"; } if (lines.Length > 1) { entry.bannerText2 = lines[1]; } else { entry.bannerText2 = ""; } entry.bannerImage = rom.Banner.Banner.Image; entry.bannerPalette = rom.Banner.Banner.Pltt; } else { entry.bannerText1 = "Bannerless Homebrew"; entry.bannerText2 = ""; entry.bannerImage = new byte[512]; entry.bannerPalette = new byte[32]; } mDemoMenu.entries.Add(entry); var d = mFileSystem.GetDirectoryByPath("//ds_demo"); d.Files.Add(new SFSFile(-1, fileName, d) { Data = newRomFixed }); }
public object Read(NDS.Nitro.ARM9 Code, ref UInt32 Address) { object tmp; switch (Type.Name) { case "Boolean": case "Byte": case "SByte": case "Int16": case "UInt16": case "Int32": goto default; case "UInt32": tmp = Code.ReadU32LE(Address); Address += 4; return tmp; case "Int64": case "UInt64": case "IntPtr": case "UIntPtr": case "Char": case "Double": goto default; //read as Fx32 case "Single": tmp = (float)Code.ReadU32LE(Address) / 4096f; Address += 4; return tmp; default: throw new Exception(Type.Name + " is not supported!"); } }
private static int Play(string name, NDS nds, List <FileSystem.File> sdats) { BasePlayer player = MakePlayer(name, nds, sdats); return(Play(player)); }
public ScreenControlNDS(NDS nds) { //not sure if we actually need this nds instance yet this.nds = nds; }
public CourseSelector(NDS Rom) { this.Rom = Rom; this.InitializeComponent(); }
/// <summary> /// Constructs an HL7 segment for the specified Segments enum object /// </summary> /// <param name="seg">The Segments enum object to construct for</param> public Segment(Segments seg) { switch (seg) { case Segments.ABS: ABS abs = new ABS(); Name = abs.Name; Description = abs.Description; Fields = abs.Fields; break; case Segments.ACC: ACC acc = new ACC(); Name = acc.Name; Description = acc.Description; Fields = acc.Fields; break; case Segments.ADD: ADD add = new ADD(); Name = add.Name; Description = add.Description; Fields = add.Fields; break; case Segments.AFF: AFF aff = new AFF(); Name = aff.Name; Description = aff.Description; Fields = aff.Fields; break; case Segments.AIG: AIG aig = new AIG(); Name = aig.Name; Description = aig.Description; Fields = aig.Fields; break; case Segments.AIL: AIL ail = new AIL(); Name = ail.Name; Description = ail.Description; Fields = ail.Fields; break; case Segments.AIP: AIP aip = new AIP(); Name = aip.Name; Description = aip.Description; Fields = aip.Fields; break; case Segments.AIS: AIS ais = new AIS(); Name = ais.Name; Description = ais.Description; Fields = ais.Fields; break; case Segments.AL1: AL1 al1 = new AL1(); Name = al1.Name; Description = al1.Description; Fields = al1.Fields; break; case Segments.APR: APR apr = new APR(); Name = apr.Name; Description = apr.Description; Fields = apr.Fields; break; case Segments.ARQ: ARQ arq = new ARQ(); Name = arq.Name; Description = arq.Description; Fields = arq.Fields; break; case Segments.AUT: AUT aut = new AUT(); Name = aut.Name; Description = aut.Description; Fields = aut.Fields; break; case Segments.BHS: BHS bhs = new BHS(); Name = bhs.Name; Description = bhs.Description; Fields = bhs.Fields; break; case Segments.BLC: BLC blc = new BLC(); Name = blc.Name; Description = blc.Description; Fields = blc.Fields; break; case Segments.BLG: BLG blg = new BLG(); Name = blg.Name; Description = blg.Description; Fields = blg.Fields; break; case Segments.BPO: BPO bpo = new BPO(); Name = bpo.Name; Description = bpo.Description; Fields = bpo.Fields; break; case Segments.BPX: BPX bpx = new BPX(); Name = bpx.Name; Description = bpx.Description; Fields = bpx.Fields; break; case Segments.BTS: BTS bts = new BTS(); Name = bts.Name; Description = bts.Description; Fields = bts.Fields; break; case Segments.BTX: BTX btx = new BTX(); Name = btx.Name; Description = btx.Description; Fields = btx.Fields; break; case Segments.CDM: CDM cdm = new CDM(); Name = cdm.Name; Description = cdm.Description; Fields = cdm.Fields; break; case Segments.CER: CER cer = new CER(); Name = cer.Name; Description = cer.Description; Fields = cer.Fields; break; case Segments.CM0: CM0 cm0 = new CM0(); Name = cm0.Name; Description = cm0.Description; Fields = cm0.Fields; break; case Segments.CM1: CM1 cm1 = new CM1(); Name = cm1.Name; Description = cm1.Description; Fields = cm1.Fields; break; case Segments.CM2: CM2 cm2 = new CM2(); Name = cm2.Name; Description = cm2.Description; Fields = cm2.Fields; break; case Segments.CNS: CNS cns = new CNS(); Name = cns.Name; Description = cns.Description; Fields = cns.Fields; break; case Segments.CON: CON con = new CON(); Name = con.Name; Description = con.Description; Fields = con.Fields; break; case Segments.CSP: CSP csp = new CSP(); Name = csp.Name; Description = csp.Description; Fields = csp.Fields; break; case Segments.CSR: CSR csr = new CSR(); Name = csr.Name; Description = csr.Description; Fields = csr.Fields; break; case Segments.CSS: CSS css = new CSS(); Name = css.Name; Description = css.Description; Fields = css.Fields; break; case Segments.CTD: CTD ctd = new CTD(); Name = ctd.Name; Description = ctd.Description; Fields = ctd.Fields; break; case Segments.CTI: CTI cti = new CTI(); Name = cti.Name; Description = cti.Description; Fields = cti.Fields; break; case Segments.DB1: DB1 db1 = new DB1(); Name = db1.Name; Description = db1.Description; Fields = db1.Fields; break; case Segments.DG1: DG1 dg1 = new DG1(); Name = dg1.Name; Description = dg1.Description; Fields = dg1.Fields; break; case Segments.DRG: DRG drg = new DRG(); Name = drg.Name; Description = drg.Description; Fields = drg.Fields; break; case Segments.DSC: DSC dsc = new DSC(); Name = dsc.Name; Description = dsc.Description; Fields = dsc.Fields; break; case Segments.DSP: DSP dsp = new DSP(); Name = dsp.Name; Description = dsp.Description; Fields = dsp.Fields; break; case Segments.ECD: ECD ecd = new ECD(); Name = ecd.Name; Description = ecd.Description; Fields = ecd.Fields; break; case Segments.ECR: ECR ecr = new ECR(); Name = ecr.Name; Description = ecr.Description; Fields = ecr.Fields; break; case Segments.EDU: EDU edu = new EDU(); Name = edu.Name; Description = edu.Description; Fields = edu.Fields; break; case Segments.EQL: EQL eql = new EQL(); Name = eql.Name; Description = eql.Description; Fields = eql.Fields; break; case Segments.EQP: EQP eqp = new EQP(); Name = eqp.Name; Description = eqp.Description; Fields = eqp.Fields; break; case Segments.EQU: EQU equ = new EQU(); Name = equ.Name; Description = equ.Description; Fields = equ.Fields; break; case Segments.ERQ: ERQ erq = new ERQ(); Name = erq.Name; Description = erq.Description; Fields = erq.Fields; break; case Segments.ERR: ERR err = new ERR(); Name = err.Name; Description = err.Description; Fields = err.Fields; break; case Segments.EVN: EVN evn = new EVN(); Name = evn.Name; Description = evn.Description; Fields = evn.Fields; break; case Segments.FAC: FAC fac = new FAC(); Name = fac.Name; Description = fac.Description; Fields = fac.Fields; break; case Segments.FHS: FHS fhs = new FHS(); Name = fhs.Name; Description = fhs.Description; Fields = fhs.Fields; break; case Segments.FT1: FT1 ft1 = new FT1(); Name = ft1.Name; Description = ft1.Description; Fields = ft1.Fields; break; case Segments.FTS: FTS fts = new FTS(); Name = fts.Name; Description = fts.Description; Fields = fts.Fields; break; case Segments.GOL: GOL gol = new GOL(); Name = gol.Name; Description = gol.Description; Fields = gol.Fields; break; case Segments.GP1: GP1 gp1 = new GP1(); Name = gp1.Name; Description = gp1.Description; Fields = gp1.Fields; break; case Segments.GP2: GP2 gp2 = new GP2(); Name = gp2.Name; Description = gp2.Description; Fields = gp2.Fields; break; case Segments.GT1: GT1 gt1 = new GT1(); Name = gt1.Name; Description = gt1.Description; Fields = gt1.Fields; break; case Segments.IAM: IAM iam = new IAM(); Name = iam.Name; Description = iam.Description; Fields = iam.Fields; break; case Segments.IIM: IIM iim = new IIM(); Name = iim.Name; Description = iim.Description; Fields = iim.Fields; break; case Segments.IN1: IN1 in1 = new IN1(); Name = in1.Name; Description = in1.Description; Fields = in1.Fields; break; case Segments.IN2: IN2 in2 = new IN2(); Name = in2.Name; Description = in2.Description; Fields = in2.Fields; break; case Segments.IN3: IN3 in3 = new IN3(); Name = in3.Name; Description = in3.Description; Fields = in3.Fields; break; case Segments.INV: INV inv = new INV(); Name = inv.Name; Description = inv.Description; Fields = inv.Fields; break; case Segments.IPC: IPC ipc = new IPC(); Name = ipc.Name; Description = ipc.Description; Fields = ipc.Fields; break; case Segments.ISD: ISD isd = new ISD(); Name = isd.Name; Description = isd.Description; Fields = isd.Fields; break; case Segments.LAN: LAN lan = new LAN(); Name = lan.Name; Description = lan.Description; Fields = lan.Fields; break; case Segments.LCC: LCC lcc = new LCC(); Name = lcc.Name; Description = lcc.Description; Fields = lcc.Fields; break; case Segments.LCH: LCH lch = new LCH(); Name = lch.Name; Description = lch.Description; Fields = lch.Fields; break; case Segments.LDP: LDP ldp = new LDP(); Name = ldp.Name; Description = ldp.Description; Fields = ldp.Fields; break; case Segments.LOC: LOC loc = new LOC(); Name = loc.Name; Description = loc.Description; Fields = loc.Fields; break; case Segments.LRL: LRL lrl = new LRL(); Name = lrl.Name; Description = lrl.Description; Fields = lrl.Fields; break; case Segments.MFA: MFA mfa = new MFA(); Name = mfa.Name; Description = mfa.Description; Fields = mfa.Fields; break; case Segments.MFE: MFE mfe = new MFE(); Name = mfe.Name; Description = mfe.Description; Fields = mfe.Fields; break; case Segments.MFI: MFI mfi = new MFI(); Name = mfi.Name; Description = mfi.Description; Fields = mfi.Fields; break; case Segments.MRG: MRG mrg = new MRG(); Name = mrg.Name; Description = mrg.Description; Fields = mrg.Fields; break; case Segments.MSA: MSA msa = new MSA(); Name = msa.Name; Description = msa.Description; Fields = msa.Fields; break; case Segments.MSH: MSH msh = new MSH(); Name = msh.Name; Description = msh.Description; Fields = msh.Fields; break; case Segments.NCK: NCK nck = new NCK(); Name = nck.Name; Description = nck.Description; Fields = nck.Fields; break; case Segments.NDS: NDS nds = new NDS(); Name = nds.Name; Description = nds.Description; Fields = nds.Fields; break; case Segments.NK1: NK1 nk1 = new NK1(); Name = nk1.Name; Description = nk1.Description; Fields = nk1.Fields; break; case Segments.NPU: NPU npu = new NPU(); Name = npu.Name; Description = npu.Description; Fields = npu.Fields; break; case Segments.NSC: NSC nsc = new NSC(); Name = nsc.Name; Description = nsc.Description; Fields = nsc.Fields; break; case Segments.NST: NST nst = new NST(); Name = nst.Name; Description = nst.Description; Fields = nst.Fields; break; case Segments.NTE: NTE nte = new NTE(); Name = nte.Name; Description = nte.Description; Fields = nte.Fields; break; case Segments.OBR: OBR obr = new OBR(); Name = obr.Name; Description = obr.Description; Fields = obr.Fields; break; case Segments.OBX: OBX obx = new OBX(); Name = obx.Name; Description = obx.Description; Fields = obx.Fields; break; case Segments.ODS: ODS ods = new ODS(); Name = ods.Name; Description = ods.Description; Fields = ods.Fields; break; case Segments.ODT: ODT odt = new ODT(); Name = odt.Name; Description = odt.Description; Fields = odt.Fields; break; case Segments.OM1: OM1 om1 = new OM1(); Name = om1.Name; Description = om1.Description; Fields = om1.Fields; break; case Segments.OM2: OM2 om2 = new OM2(); Name = om2.Name; Description = om2.Description; Fields = om2.Fields; break; case Segments.OM3: OM3 om3 = new OM3(); Name = om3.Name; Description = om3.Description; Fields = om3.Fields; break; case Segments.OM4: OM4 om4 = new OM4(); Name = om4.Name; Description = om4.Description; Fields = om4.Fields; break; case Segments.OM5: OM5 om5 = new OM5(); Name = om5.Name; Description = om5.Description; Fields = om5.Fields; break; case Segments.OM6: OM6 om6 = new OM6(); Name = om6.Name; Description = om6.Description; Fields = om6.Fields; break; case Segments.OM7: OM7 om7 = new OM7(); Name = om7.Name; Description = om7.Description; Fields = om7.Fields; break; case Segments.ORC: ORC orc = new ORC(); Name = orc.Name; Description = orc.Description; Fields = orc.Fields; break; case Segments.ORG: ORG org = new ORG(); Name = org.Name; Description = org.Description; Fields = org.Fields; break; case Segments.OVR: OVR ovr = new OVR(); Name = ovr.Name; Description = ovr.Description; Fields = ovr.Fields; break; case Segments.PCR: PCR pcr = new PCR(); Name = pcr.Name; Description = pcr.Description; Fields = pcr.Fields; break; case Segments.PD1: PD1 pd1 = new PD1(); Name = pd1.Name; Description = pd1.Description; Fields = pd1.Fields; break; case Segments.PDA: PDA pda = new PDA(); Name = pda.Name; Description = pda.Description; Fields = pda.Fields; break; case Segments.PDC: PDC pdc = new PDC(); Name = pdc.Name; Description = pdc.Description; Fields = pdc.Fields; break; case Segments.PEO: PEO peo = new PEO(); Name = peo.Name; Description = peo.Description; Fields = peo.Fields; break; case Segments.PES: PES pes = new PES(); Name = pes.Name; Description = pes.Description; Fields = pes.Fields; break; case Segments.PID: PID pid = new PID(); Name = pid.Name; Description = pid.Description; Fields = pid.Fields; break; case Segments.PR1: PR1 pr1 = new PR1(); Name = pr1.Name; Description = pr1.Description; Fields = pr1.Fields; break; case Segments.PRA: PRA pra = new PRA(); Name = pra.Name; Description = pra.Description; Fields = pra.Fields; break; case Segments.PRB: PRB prb = new PRB(); Name = prb.Name; Description = prb.Description; Fields = prb.Fields; break; case Segments.PRC: PRC prc = new PRC(); Name = prc.Name; Description = prc.Description; Fields = prc.Fields; break; case Segments.PRD: PRD prd = new PRD(); Name = prd.Name; Description = prd.Description; Fields = prd.Fields; break; case Segments.PSH: PSH psh = new PSH(); Name = psh.Name; Description = psh.Description; Fields = psh.Fields; break; case Segments.PTH: PTH pth = new PTH(); Name = pth.Name; Description = pth.Description; Fields = pth.Fields; break; case Segments.PV1: PV1 pv1 = new PV1(); Name = pv1.Name; Description = pv1.Description; Fields = pv1.Fields; break; case Segments.PV2: PV2 pv2 = new PV2(); Name = pv2.Name; Description = pv2.Description; Fields = pv2.Fields; break; case Segments.QAK: QAK qak = new QAK(); Name = qak.Name; Description = qak.Description; Fields = qak.Fields; break; case Segments.QID: QID qid = new QID(); Name = qid.Name; Description = qid.Description; Fields = qid.Fields; break; case Segments.QPD: QPD qpd = new QPD(); Name = qpd.Name; Description = qpd.Description; Fields = qpd.Fields; break; case Segments.QRD: QRD qrd = new QRD(); Name = qrd.Name; Description = qrd.Description; Fields = qrd.Fields; break; case Segments.QRF: QRF qrf = new QRF(); Name = qrf.Name; Description = qrf.Description; Fields = qrf.Fields; break; case Segments.QRI: QRI qri = new QRI(); Name = qri.Name; Description = qri.Description; Fields = qri.Fields; break; case Segments.RCP: RCP rcp = new RCP(); Name = rcp.Name; Description = rcp.Description; Fields = rcp.Fields; break; case Segments.RDF: RDF rdf = new RDF(); Name = rdf.Name; Description = rdf.Description; Fields = rdf.Fields; break; case Segments.RF1: RF1 rf1 = new RF1(); Name = rf1.Name; Description = rf1.Description; Fields = rf1.Fields; break; case Segments.RGS: RGS rgs = new RGS(); Name = rgs.Name; Description = rgs.Description; Fields = rgs.Fields; break; case Segments.RMI: RMI rmi = new RMI(); Name = rmi.Name; Description = rmi.Description; Fields = rmi.Fields; break; case Segments.ROL: ROL rol = new ROL(); Name = rol.Name; Description = rol.Description; Fields = rol.Fields; break; case Segments.RQ1: RQ1 rq1 = new RQ1(); Name = rq1.Name; Description = rq1.Description; Fields = rq1.Fields; break; case Segments.RQD: RQD rqd = new RQD(); Name = rqd.Name; Description = rqd.Description; Fields = rqd.Fields; break; case Segments.RXA: RXA rxa = new RXA(); Name = rxa.Name; Description = rxa.Description; Fields = rxa.Fields; break; case Segments.RXC: RXC rxc = new RXC(); Name = rxc.Name; Description = rxc.Description; Fields = rxc.Fields; break; case Segments.RXD: RXD rxd = new RXD(); Name = rxd.Name; Description = rxd.Description; Fields = rxd.Fields; break; case Segments.RXE: RXE rxe = new RXE(); Name = rxe.Name; Description = rxe.Description; Fields = rxe.Fields; break; case Segments.RXG: RXG rxg = new RXG(); Name = rxg.Name; Description = rxg.Description; Fields = rxg.Fields; break; case Segments.RXO: RXO rxo = new RXO(); Name = rxo.Name; Description = rxo.Description; Fields = rxo.Fields; break; case Segments.RXR: RXR rxr = new RXR(); Name = rxr.Name; Description = rxr.Description; Fields = rxr.Fields; break; case Segments.SAC: SAC sac = new SAC(); Name = sac.Name; Description = sac.Description; Fields = sac.Fields; break; case Segments.SCH: SCH sch = new SCH(); Name = sch.Name; Description = sch.Description; Fields = sch.Fields; break; case Segments.SFT: SFT sft = new SFT(); Name = sft.Name; Description = sft.Description; Fields = sft.Fields; break; case Segments.SID: SID sid = new SID(); Name = sid.Name; Description = sid.Description; Fields = sid.Fields; break; case Segments.SPM: SPM spm = new SPM(); Name = spm.Name; Description = spm.Description; Fields = spm.Fields; break; case Segments.SPR: SPR spr = new SPR(); Name = spr.Name; Description = spr.Description; Fields = spr.Fields; break; case Segments.STF: STF stf = new STF(); Name = stf.Name; Description = stf.Description; Fields = stf.Fields; break; case Segments.TCC: TCC tcc = new TCC(); Name = tcc.Name; Description = tcc.Description; Fields = tcc.Fields; break; case Segments.TCD: TCD tcd = new TCD(); Name = tcd.Name; Description = tcd.Description; Fields = tcd.Fields; break; case Segments.TQ1: TQ1 tq1 = new TQ1(); Name = tq1.Name; Description = tq1.Description; Fields = tq1.Fields; break; case Segments.TQ2: TQ2 tq2 = new TQ2(); Name = tq2.Name; Description = tq2.Description; Fields = tq2.Fields; break; case Segments.TXA: TXA txa = new TXA(); Name = txa.Name; Description = txa.Description; Fields = txa.Fields; break; case Segments.UB1: UB1 ub1 = new UB1(); Name = ub1.Name; Description = ub1.Description; Fields = ub1.Fields; break; case Segments.UB2: UB2 ub2 = new UB2(); Name = ub2.Name; Description = ub2.Description; Fields = ub2.Fields; break; case Segments.URD: URD urd = new URD(); Name = urd.Name; Description = urd.Description; Fields = urd.Fields; break; case Segments.URS: URS urs = new URS(); Name = urs.Name; Description = urs.Description; Fields = urs.Fields; break; case Segments.VAR: VAR var = new VAR(); Name = var.Name; Description = var.Description; Fields = var.Fields; break; case Segments.VTQ: VTQ vtq = new VTQ(); Name = vtq.Name; Description = vtq.Description; Fields = vtq.Fields; break; } }
public ASMHackInfo(NDS Rom, UInt32 AreaLo) { RamAddress = Rom.Header.MainRamAddress; this.ArenaLo = AreaLo; }