Skip to content

Commit

Permalink
Fixing StructConverter's handling of cutscene text.
Browse files Browse the repository at this point in the history
  • Loading branch information
MainMemory committed Mar 2, 2015
1 parent 9b6ea1c commit fac7a7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions StructConverter/MainForm.cs
Expand Up @@ -509,7 +509,7 @@ private void button4_Click(object sender, EventArgs e)
case "cutscenetext":
{
CutsceneText texts = new CutsceneText(data.Filename);
string[] langs = new string[5];
uint addr = (uint)(data.Address + imagebase);
for (int j = 0; j < 5; j++)
{
string[] strs = texts.Text[j];
Expand All @@ -518,9 +518,9 @@ private void button4_Click(object sender, EventArgs e)
writer.WriteLine("\t" + string.Join("," + Environment.NewLine + "\t", strs.Select((a) => a.ToC(lang) + " " + a.ToComment()).ToArray()));
writer.WriteLine("};");
writer.WriteLine();
langs[j] = string.Format("{0}_{1}", name, lang);
pointers.Add(addr, string.Format("{0}_{1}", name, lang));
addr += 4;
}
writer.WriteLine("char **{0}[] = {{ {1} }};", name, string.Join(", ", langs));
}
break;
case "recapscreen":
Expand Down

0 comments on commit fac7a7a

Please sign in to comment.