Skip to content

Commit

Permalink
Removed conversion code
Browse files Browse the repository at this point in the history
Previous commit will be released as Prerelease 3.5 as a conversion tool.
  • Loading branch information
David-JonesDVN committed Dec 6, 2019
1 parent 48b6326 commit 0ea4620
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
1.0-pre4 (06/12/2019)
Changed: The backwards compatibility code has been rewritten. Unfortunately this breaks compatibility with older versions. An intermediary version called pre3.5 is provided for conversion of settings.json to the new format.

1.0-pre3 (13/08/2019)
Added: Selected patches list to show the order of installed patches.
Added: Touhou 17 support.
Expand Down
20 changes: 1 addition & 19 deletions Touhou Launcher/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -518,15 +518,6 @@ public MainForm()
if (count > curCfg.gameCFG.Length)
{
GameConfig[] backwardsComp = new GameConfig[count];
Array.Copy(curCfg.gameCFG, backwardsComp, mainGameCount - 1);
backwardsComp[mainGameCount - 1] = new GameConfig(mainGameCount - 1);
backwardsComp[mainGameCount - 1].GameDir = new List<string> { "", "", "", "" };
backwardsComp[mainGameCount - 1].crapCFG = new List<string> { "None", "None" };
backwardsComp[mainGameCount - 1].appLocale = new List<bool> { false, false, false, false };
Array.Copy(curCfg.gameCFG, mainGameCount - 1, backwardsComp, mainGameCount, count - (mainGameCount));
curCfg.gameCFG = backwardsComp;
//Superior backwards compatibility model. Will be switched in after the next version comes out.
/*GameConfig[] backwardsComp = new GameConfig[count];
int lastCat = 0, offset = 0;
for (int i = 0; i < curCfg.gameCFG.Length; i++)
{
Expand All @@ -540,16 +531,7 @@ public MainForm()
lastCat = curCfg.gameCFG[i].category;
backwardsComp[i] = curCfg.gameCFG[i + offset];
}
curCfg.gameCFG = backwardsComp;*/
}
for (int i = 0; i < curCfg.gameCFG.Length; i++) //Intermediary backwards compatibility. Will remove in the next version.
{
if (i < mainGameCount)
curCfg.gameCFG[i].category = 0;
else if (i < mainGameCount + fightingGameCount)
curCfg.gameCFG[i].category = 1;
else
curCfg.gameCFG[i].category = 2;
curCfg.gameCFG = backwardsComp;
}
foreach (Button btn in GetAll(games, typeof(Button)))
if (btn.Name != "btnRandom")
Expand Down

0 comments on commit 0ea4620

Please sign in to comment.