Atari 7800 - some multiclient todos
This commit is contained in:
parent
9c047b34b4
commit
39a54959d0
|
@ -1104,6 +1104,7 @@ namespace BizHawk.MultiClient
|
|||
case "GB": str += "Game Boy"; break;
|
||||
case "GBC": str += "Game Boy Color"; break;
|
||||
case "A26": str += "Atari 2600"; break;
|
||||
case "A78": str += "Atari 7800"; break;
|
||||
}
|
||||
|
||||
if (INTERIM) str += " (interim)";
|
||||
|
@ -2936,7 +2937,7 @@ namespace BizHawk.MultiClient
|
|||
if (INTERIM)
|
||||
{
|
||||
ofd.Filter = FormatFilter(
|
||||
"Rom Files", "*.nes;*.sms;*.gg;*.sg;*.pce;*.sgx;*.bin;*.smd;*.rom;*.a26;*.cue;*.exe;*.gb;*.gbc;*.gen;*.md;*.col;.int;*.smc;*.sfc;%ARCH%",
|
||||
"Rom Files", "*.nes;*.sms;*.gg;*.sg;*.pce;*.sgx;*.bin;*.smd;*.rom;*.a26;*.a78;*.cue;*.exe;*.gb;*.gbc;*.gen;*.md;*.col;.int;*.smc;*.sfc;%ARCH%",
|
||||
"Disc Images", "*.cue",
|
||||
"NES", "*.nes;%ARCH%",
|
||||
"Super NES", "*.smc;*.sfc;%ARCH%",
|
||||
|
@ -2946,6 +2947,7 @@ namespace BizHawk.MultiClient
|
|||
"Archive Files", "%ARCH%",
|
||||
"Savestate", "*.state",
|
||||
"Atari 2600", "*.a26;*.bin;%ARCH%",
|
||||
"Atari 7800", "*.a78;*.bin;%ARCH%",
|
||||
"Genesis (experimental)", "*.gen;*.smd;*.bin;*.md;*.cue;%ARCH%",
|
||||
"Gameboy", "*.gb;*.gbc;%ARCH%",
|
||||
"Colecovision (very experimental)", "*.col;%ARCH%",
|
||||
|
|
|
@ -50,6 +50,21 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public bool Loaded { get; private set; }
|
||||
public bool IsText { get; private set; }
|
||||
public int LoopOffset = -1;
|
||||
public bool Loop
|
||||
{
|
||||
get
|
||||
{
|
||||
if (LoopOffset >= 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int Rerecords
|
||||
{
|
||||
|
@ -94,7 +109,14 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (Loaded)
|
||||
{
|
||||
return Log.Length;
|
||||
if (Loop)
|
||||
{
|
||||
return 999999; //TODO: rethink this, maybe return a nullable int, and on the client side check for null and act accordingly
|
||||
}
|
||||
else
|
||||
{
|
||||
return Log.Length;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -383,9 +405,21 @@ namespace BizHawk.MultiClient
|
|||
public string GetInput(int frame)
|
||||
{
|
||||
lastlog = frame;
|
||||
if (frame < Log.Length)
|
||||
|
||||
int getframe;
|
||||
|
||||
if (Loop)
|
||||
{
|
||||
return Log.GetFrame(frame);
|
||||
getframe = (frame % Log.Length);
|
||||
}
|
||||
else
|
||||
{
|
||||
getframe = frame;
|
||||
}
|
||||
|
||||
if (getframe < Log.Length)
|
||||
{
|
||||
return Log.GetFrame(getframe);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -797,6 +831,13 @@ namespace BizHawk.MultiClient
|
|||
using (StreamWriter sw = new StreamWriter(file))
|
||||
{
|
||||
Header.WriteText(sw);
|
||||
|
||||
//TODO: clean this up
|
||||
if (LoopOffset >= 0)
|
||||
{
|
||||
sw.WriteLine("LoopOffset " + LoopOffset.ToString());
|
||||
}
|
||||
|
||||
Subtitles.WriteText(sw);
|
||||
Log.WriteText(sw);
|
||||
}
|
||||
|
@ -853,10 +894,23 @@ namespace BizHawk.MultiClient
|
|||
if (str == "1")
|
||||
StartsFromSavestate = true;
|
||||
}
|
||||
else if (str.Contains("LoopOffset"))
|
||||
{
|
||||
str = ParseHeader(str, "LoopOffset");
|
||||
try
|
||||
{
|
||||
LoopOffset = int.Parse(str);
|
||||
}
|
||||
catch
|
||||
{
|
||||
//Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
if (Header.AddHeaderFromLine(str))
|
||||
continue;
|
||||
|
||||
|
||||
if (str.StartsWith("subtitle") || str.StartsWith("sub"))
|
||||
{
|
||||
Subtitles.AddSubtitle(str);
|
||||
|
|
Loading…
Reference in New Issue