Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

Commit

Permalink
added auto playing through chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
MgAl2O4 committed Jan 12, 2021
1 parent 2687aba commit d6752cf
Show file tree
Hide file tree
Showing 9 changed files with 621 additions and 354 deletions.
9 changes: 7 additions & 2 deletions ImageScan/MLDataExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private struct ButtonML
public ButtonML(string path, string typeCode)
{
fileName = path;
ButtonSlots = new ScannerMessageBox.EButtonType[6];
ButtonSlots = new ScannerMessageBox.EButtonType[8];

string[] tokens = typeCode.Split(new char[] { ':', ' ', ',' }, StringSplitOptions.RemoveEmptyEntries);
for (int idx = 0; idx < tokens.Length; idx += 2)
Expand All @@ -108,12 +108,16 @@ public ButtonML(string path, string typeCode)
else if (tokens[idx] == "center") { buttonPos = ScannerMessageBox.EButtonPos.Center; }
else if (tokens[idx] == "centerL") { buttonPos = ScannerMessageBox.EButtonPos.CenterTwoLeft; }
else if (tokens[idx] == "centerR") { buttonPos = ScannerMessageBox.EButtonPos.CenterTwoRight; }
else if (tokens[idx] == "combatS") { buttonPos = ScannerMessageBox.EButtonPos.CombatStart; }
else if (tokens[idx] == "combatD") { buttonPos = ScannerMessageBox.EButtonPos.CombatDetails; }

if (tokens[idx + 1] == "retry") { buttonType = ScannerMessageBox.EButtonType.Retry; }
else if (tokens[idx + 1] == "ok") { buttonType = ScannerMessageBox.EButtonType.Ok; }
else if (tokens[idx + 1] == "cancel") { buttonType = ScannerMessageBox.EButtonType.Cancel; }
else if (tokens[idx + 1] == "close") { buttonType = ScannerMessageBox.EButtonType.Close; }
else if (tokens[idx + 1] == "next") { buttonType = ScannerMessageBox.EButtonType.Next; }
else if (tokens[idx + 1] == "start") { buttonType = ScannerMessageBox.EButtonType.Start; }
else if (tokens[idx + 1] == "details") { buttonType = ScannerMessageBox.EButtonType.Details; }

ButtonSlots[(int)buttonPos] = buttonType;
}
Expand All @@ -140,7 +144,7 @@ public void DoTheThing()
//ExportDemon();
//ExportPurify();
//ExportButtons();
ExportStats();
//ExportStats();

if (numSavedFiles > 0)
{
Expand Down Expand Up @@ -636,6 +640,7 @@ private void ExportButtons()
fileList.Add(new ButtonML("real-msgClose.jpg", "center:close"));
fileList.Add(new ButtonML("real-msgClose2.jpg", "center:close"));
fileList.Add(new ButtonML("real-msgOkCancel.jpg", "centerL:cancel, centerR:ok"));
fileList.Add(new ButtonML("real-msgCombatStart.jpg", "combatS:start, combatD:details"));

var buttonsScanner = new ScannerMessageBox { DebugLevel = ScannerBase.EDebugLevel.None };

Expand Down
2 changes: 1 addition & 1 deletion ML/sinocolo-buttons.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from nn import NNTraining

training = NNTraining(inputFile='sino-ml-buttons.json', outputFile='sino-ml-buttons.txt')
training.run(numFeatures=16*8, numClasses=6)
training.run(numFeatures=16*8, numClasses=8)
Loading

0 comments on commit d6752cf

Please sign in to comment.