diff --git a/TuBS/TuBS.sln b/TuBS/TuBS.sln
index 4986667..04c1cb6 100644
--- a/TuBS/TuBS.sln
+++ b/TuBS/TuBS.sln
@@ -16,6 +16,6 @@ Global
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
description = Berwick Saga translation tool.
- version = 1.7
+ version = 1.8
EndGlobalSection
EndGlobal
diff --git a/TuBS/TuBS.userprefs b/TuBS/TuBS.userprefs
index ee9da50..7635d25 100644
--- a/TuBS/TuBS.userprefs
+++ b/TuBS/TuBS.userprefs
@@ -3,22 +3,22 @@
-
-
-
-
+
+
+
+
-
+
-
+
diff --git a/TuBS/TuBS/ExportScript.cs b/TuBS/TuBS/ExportScript.cs
index 1086b06..1f0921a 100644
--- a/TuBS/TuBS/ExportScript.cs
+++ b/TuBS/TuBS/ExportScript.cs
@@ -22,7 +22,7 @@ protected List DumpText (FileInfo file, char[] code_page)
while (reader.BaseStream.Position < reader.BaseStream.Length) {
ushort num1 = reader.ReadUInt16 ();
if ((int)num1 < 32768) {//ordinary char from "font"
- if(code_page.Length > num1)
+ if (code_page.Length > num1)
str += code_page [num1].ToString ();
else
str += "<" + num1.ToString () + ">";
@@ -37,12 +37,12 @@ protected List DumpText (FileInfo file, char[] code_page)
else if ((int)num1 == 44544)
str += "▲";
else if ((int)num1 == 33024) { // window end
- if(scene.Active == true)
- script.Add ("#" + scene.Window + ": " + scene.GetActor());
+ if (scene.Active == true)
+ script.Add ("#" + scene.Window + "; Size: " + scene.GetSize () + "; " + scene.GetActor ());
script.Add (str);
script.Add ("-----------------------");
str = "";
- //info bytes
+ //info bytes
} else if ((int)num1 == 35074) {
str += "■";
reader.BaseStream.Position -= 2;
@@ -60,7 +60,7 @@ protected List DumpText (FileInfo file, char[] code_page)
str += "■";
reader.BaseStream.Position -= 2;
strsq += "[" + reader.ReadByte () + "." + reader.ReadByte () + ".]";
- } else if ((int)num1 ==2024 || (int)num1 == 33280 || (int)num1 == 39936 || (int)num1 == 47104) { //some strange chars
+ } else if ((int)num1 == 2024 || (int)num1 == 33280 || (int)num1 == 39936 || (int)num1 == 47104) { //some strange chars
str += "■";
reader.BaseStream.Position -= 2;
strsq += "[" + reader.ReadByte () + "." + reader.ReadByte () + ".]";
@@ -75,6 +75,17 @@ protected List DumpText (FileInfo file, char[] code_page)
strsq += reader.ReadByte () + ".";
}
strsq += "]";
+ } else if ((int)num1 == 40961) { //window size
+ ushort size = reader.ReadUInt16 ();
+ scene.SetSize (size);
+ str += "■";
+ reader.BaseStream.Position -= 4;
+ strsq += "[";
+ for (int i = 0; i < 4; i++)
+ if (reader.BaseStream.Position < reader.BaseStream.Length) {
+ strsq += reader.ReadByte () + ".";
+ }
+ strsq += "]";
} else {
str += "■";
reader.BaseStream.Position -= 2;
@@ -139,9 +150,26 @@ class Scene
{
ushort upper_actor;
ushort lower_actor;
+ ushort upper_size;
+ ushort lower_size;
public string Window = "Lower Window"; //message appears in lower window by default
public bool Active = false;
+ public void SetSize (ushort size)
+ {
+ if (Window == "Upper Window")
+ upper_size = size;
+ else
+ lower_size = size;
+ }
+
+ public string GetSize ()
+ {
+ if (Window == "Upper Window")
+ return upper_size.ToString ();
+ return lower_size.ToString ();
+ }
+
public void SetActor (ushort id)
{
Active = true;
diff --git a/TuBS/TuBS/MainWindow.cs b/TuBS/TuBS/MainWindow.cs
index d9437a1..a951088 100644
--- a/TuBS/TuBS/MainWindow.cs
+++ b/TuBS/TuBS/MainWindow.cs
@@ -20,6 +20,16 @@ public MainWindow () : base (Gtk.WindowType.Toplevel)
progressbar.Text = "Status: " + pathdat4 + " not found";
if (!File.Exists (pathdat3))
progressbar.Text = "Status: " + pathdat3 + " not found";
+ if ('/' != System.IO.Path.DirectorySeparatorChar) {
+ string[] lines = File.ReadAllLines ("list.txt");
+ for (int i = 0; i < lines.Length; i++)
+ lines [i] = lines [i].Replace ('/', System.IO.Path.DirectorySeparatorChar);
+ File.WriteAllLines("list.txt", lines);
+ lines = File.ReadAllLines ("protect.txt");
+ for (int i = 0; i < lines.Length; i++)
+ lines [i] = lines [i].Replace ('/', System.IO.Path.DirectorySeparatorChar);
+ File.WriteAllLines ("protect.txt", lines);
+ }
foreach (string list in Directory.EnumerateFiles(Directory.GetCurrentDirectory (), "list*.txt", SearchOption.TopDirectoryOnly))
ReadImportList (list);
}
diff --git a/TuBS/TuBS/Program.cs b/TuBS/TuBS/Program.cs
index eba0157..b9f5e9c 100644
--- a/TuBS/TuBS/Program.cs
+++ b/TuBS/TuBS/Program.cs
@@ -24,3 +24,12 @@ public static void Main (string[] args)
}
}
}
+
+
+//ToDo list for 2.0
+// 1.лучшее форматирование текста
+// 2.new flow of work (prepare(once) -> update images (one time) -> import text (every time))
+// 3.хедеры для скриптов (и картинок?)
+// 4.кёрнинг и sjis.dat
+// 5.самопроверка
+// 6.архивы в памяти
\ No newline at end of file
diff --git a/TuBS/TuBS/TuBS.csproj b/TuBS/TuBS/TuBS.csproj
index 4bf16bf..1e713ae 100644
--- a/TuBS/TuBS/TuBS.csproj
+++ b/TuBS/TuBS/TuBS.csproj
@@ -8,7 +8,7 @@
TuBS
TuBS
Berwick Saga translation tool.
- 1.7
+ 1.8
v4.5