Skip to content

Commit

Permalink
Change stuff I forgot :/
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTools committed Sep 27, 2019
1 parent b18f64b commit f7ff9b0
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions NSMBe5/LevelChooser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ private void importLevelButton_Click(object sender, EventArgs e) {
return;

// Get the files
int LevelID = (int)levelTreeView.SelectedNode.Tag;
DSFileSystem.File LevelFile = ROM.FS.getFileById(LevelID);
DSFileSystem.File BGFile = ROM.FS.getFileById(LevelID + 1);
string LevelFilename = (string)levelTreeView.SelectedNode.Tag;
DSFileSystem.File LevelFile = ROM.getLevelFile(LevelFilename);
DSFileSystem.File BGFile = ROM.getBGDatFile(LevelFilename);

// Load it
try
Expand All @@ -251,9 +251,9 @@ private void exportLevelButton_Click(object sender, EventArgs e) {
return;

// Get the files
int LevelID = (int)levelTreeView.SelectedNode.Tag;
DSFileSystem.File LevelFile = ROM.FS.getFileById(LevelID);
DSFileSystem.File BGFile = ROM.FS.getFileById(LevelID + 1);
string LevelFilename = (string)levelTreeView.SelectedNode.Tag;
DSFileSystem.File LevelFile = ROM.getLevelFile(LevelFilename);
DSFileSystem.File BGFile = ROM.getBGDatFile(LevelFilename);

// Load it
FileStream fs = new FileStream(exportLevelDialog.FileName, FileMode.Create);
Expand All @@ -279,9 +279,9 @@ private void importClipboard_Click(object sender, EventArgs e)
return;
try
{
int LevelID = (int)levelTreeView.SelectedNode.Tag;
DSFileSystem.File LevelFile = ROM.FS.getFileById(LevelID);
DSFileSystem.File BGFile = ROM.FS.getFileById(LevelID + 1);
string LevelFilename = (string)levelTreeView.SelectedNode.Tag;
DSFileSystem.File LevelFile = ROM.getLevelFile(LevelFilename);
DSFileSystem.File BGFile = ROM.getBGDatFile(LevelFilename);
ClipboardLevelSource level = new ClipboardLevelSource();
level.level.Import(LevelFile, BGFile);
}
Expand All @@ -293,9 +293,9 @@ private void importClipboard_Click(object sender, EventArgs e)

private void exportClipboard_Click(object sender, EventArgs e)
{
int LevelID = (int)levelTreeView.SelectedNode.Tag;
DSFileSystem.File LevelFile = ROM.FS.getFileById(LevelID);
DSFileSystem.File BGFile = ROM.FS.getFileById(LevelID + 1);
string LevelFilename = (string)levelTreeView.SelectedNode.Tag;
DSFileSystem.File LevelFile = ROM.getLevelFile(LevelFilename);
DSFileSystem.File BGFile = ROM.getBGDatFile(LevelFilename);

ByteArrayInputStream strm = new ByteArrayInputStream(new byte[0]);
BinaryWriter bw = new BinaryWriter(strm);
Expand Down

0 comments on commit f7ff9b0

Please sign in to comment.