Write subtitles to movie files
This commit is contained in:
parent
945cb9c693
commit
f886b65015
|
@ -191,6 +191,11 @@ namespace BizHawk.MultiClient
|
|||
sw.WriteLine(kvp.Key + " " + kvp.Value);
|
||||
}
|
||||
|
||||
for (int x = 0; x < Subtitles.Count(); x++)
|
||||
{
|
||||
sw.WriteLine(Subtitles.GetSubtitleText(x));
|
||||
}
|
||||
|
||||
for (int x = 0; x < length; x++)
|
||||
{
|
||||
sw.WriteLine(Log.GetFrame(x));
|
||||
|
|
|
@ -33,6 +33,25 @@ namespace BizHawk.MultiClient
|
|||
return subs[index];
|
||||
}
|
||||
|
||||
public string GetSubtitleText(int index)
|
||||
{
|
||||
if (index >= subs.Count || index < 0) return "";
|
||||
|
||||
StringBuilder sb = new StringBuilder("subtitle ");
|
||||
sb.Append(subs[index].Frame.ToString());
|
||||
sb.Append(" ");
|
||||
sb.Append(subs[index].X.ToString());
|
||||
sb.Append(" ");
|
||||
sb.Append(subs[index].Y.ToString());
|
||||
sb.Append(" ");
|
||||
sb.Append(subs[index].Duration.ToString());
|
||||
sb.Append(" ");
|
||||
sb.Append(subs[index].Color.ToString());
|
||||
sb.Append(" ");
|
||||
sb.Append(subs[index].Message);
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Manages the logic of what subtitle should be displayed on any given frame based on frame & duration
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue