Start a Client.Core project, and moved several files over to this, including Global.cs, made a GlobalWinF class for handling winform specific global instances
This commit is contained in:
parent
954935466d
commit
067363b80d
|
@ -3,6 +3,8 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
//some helpful p/invoke from http://www.codeproject.com/KB/audio-video/Motion_Detection.aspx?msg=1142967
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
|
|
|
@ -7,6 +7,8 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
@ -5,6 +5,8 @@ using System.Text;
|
|||
using System.IO;
|
||||
using System.Drawing;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient.AVOut
|
||||
{
|
||||
public class GifWriter : IVideoWriter
|
||||
|
|
|
@ -7,6 +7,8 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient.AVOut
|
||||
{
|
||||
public partial class GifWriterForm : Form
|
||||
|
|
|
@ -7,6 +7,8 @@ using System.Text;
|
|||
using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
|
||||
using ICSharpCode.SharpZipLib.Zip.Compression;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
@ -7,6 +7,8 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -85,8 +87,8 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void buttonAuto_Click(object sender, EventArgs e)
|
||||
{
|
||||
numericTextBoxW.Text = Global.Emulator.CoreComm.NominalWidth.ToString();
|
||||
numericTextBoxH.Text = Global.Emulator.CoreComm.NominalHeight.ToString();
|
||||
numericTextBoxW.Text = GlobalWinF.Emulator.CoreComm.NominalWidth.ToString();
|
||||
numericTextBoxH.Text = GlobalWinF.Emulator.CoreComm.NominalHeight.ToString();
|
||||
}
|
||||
|
||||
private void buttonOK_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -159,8 +159,6 @@
|
|||
<Compile Include="BizBox.Designer.cs">
|
||||
<DependentUpon>BizBox.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Config.cs" />
|
||||
<Compile Include="ConfigService.cs" />
|
||||
<Compile Include="config\AutofireConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -244,7 +242,7 @@
|
|||
<Compile Include="DisplayManager\DisplayManager.cs" />
|
||||
<Compile Include="DisplayManager\Filters\Hq2x.cs" />
|
||||
<Compile Include="FirmwareManager.cs" />
|
||||
<Compile Include="Global.cs" />
|
||||
<Compile Include="GlobalWinF.cs" />
|
||||
<Compile Include="HawkFile.cs" />
|
||||
<Compile Include="Input\ControllerBinding.cs" />
|
||||
<Compile Include="Input\GamePad.cs" Condition=" '$(OS)' == 'Windows_NT' " />
|
||||
|
@ -708,7 +706,6 @@
|
|||
<Compile Include="tools\Watch\RamWatch.Designer.cs">
|
||||
<DependentUpon>RamWatch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\Watch.cs" />
|
||||
<Compile Include="tools\Watch\WatchEditor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -955,7 +952,6 @@
|
|||
<Compile Include="tools\InputPrompt.Designer.cs">
|
||||
<DependentUpon>InputPrompt.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RecentFiles.cs" />
|
||||
<Compile Include="RenderPanel.cs" />
|
||||
<Compile Include="RomGame.cs" />
|
||||
<Compile Include="ScreenSaver.cs" />
|
||||
|
@ -982,6 +978,10 @@
|
|||
<Project>{EE135301-08B3-4EFC-A61C-1C53E1C65CB9}</Project>
|
||||
<Name>BizHawk.Util</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Client.Core\Client.Core.csproj">
|
||||
<Project>{24A0AA3C-B25F-4197-B23D-476D6462DBA0}</Project>
|
||||
<Name>Client.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="AboutBox.resx">
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,62 +0,0 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public static class ConfigService
|
||||
{
|
||||
public static T Load<T>(string filepath, T currentConfig) where T : new()
|
||||
{
|
||||
T config = new T();
|
||||
|
||||
try
|
||||
{
|
||||
var file = new FileInfo(filepath);
|
||||
if (file.Exists)
|
||||
using (var reader = file.OpenText())
|
||||
{
|
||||
var s = new JsonSerializer {SuppressMissingMemberException = true, SuppressDuplicateMemberException = true};
|
||||
var r = new JsonReader(reader);
|
||||
config = (T)s.Deserialize(r, typeof(T));
|
||||
}
|
||||
}
|
||||
catch (Exception e) { MessageBox.Show(e.ToString(), "Config Error"); }
|
||||
if (config == null) return new T();
|
||||
|
||||
//patch up arrays in the config with the minimum number of things
|
||||
foreach(var fi in typeof(T).GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public))
|
||||
if (fi.FieldType.IsArray)
|
||||
{
|
||||
Array aold = fi.GetValue(currentConfig) as Array;
|
||||
Array anew = fi.GetValue(config) as Array;
|
||||
if (aold.Length == anew.Length) continue;
|
||||
|
||||
//create an array of the right size
|
||||
Array acreate = Array.CreateInstance(fi.FieldType.GetElementType(), Math.Max(aold.Length,anew.Length));
|
||||
|
||||
//copy the old values in, (presumably the defaults), and then copy the new ones on top
|
||||
Array.Copy(aold, acreate, Math.Min(aold.Length,acreate.Length));
|
||||
Array.Copy(anew, acreate, Math.Min(anew.Length, acreate.Length));
|
||||
|
||||
//stash it into the config struct
|
||||
fi.SetValue(config, acreate);
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static void Save(string filepath, object config)
|
||||
{
|
||||
var file = new FileInfo(filepath);
|
||||
using (var writer = file.CreateText())
|
||||
{
|
||||
var s = new JsonSerializer();
|
||||
var w = new JsonWriter(writer) { Formatting = Formatting.Indented };
|
||||
s.Serialize(w, config);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -11,6 +11,8 @@ using System.Drawing.Imaging;
|
|||
//using dx=SlimDX;
|
||||
//using d3d=SlimDX.Direct3D9;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -340,14 +342,14 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private string MakeFrameCounter()
|
||||
{
|
||||
if (Global.MovieSession.Movie.IsFinished)
|
||||
if (GlobalWinF.MovieSession.Movie.IsFinished)
|
||||
{
|
||||
StringBuilder s = new StringBuilder();
|
||||
s.Append(Global.Emulator.Frame);
|
||||
s.Append(GlobalWinF.Emulator.Frame);
|
||||
s.Append('/');
|
||||
if (Global.MovieSession.Movie.Frames.HasValue)
|
||||
if (GlobalWinF.MovieSession.Movie.Frames.HasValue)
|
||||
{
|
||||
s.Append(Global.MovieSession.Movie.Frames);
|
||||
s.Append(GlobalWinF.MovieSession.Movie.Frames);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -356,14 +358,14 @@ namespace BizHawk.MultiClient
|
|||
s.Append(" (Finished)");
|
||||
return s.ToString();
|
||||
}
|
||||
else if (Global.MovieSession.Movie.IsPlaying)
|
||||
else if (GlobalWinF.MovieSession.Movie.IsPlaying)
|
||||
{
|
||||
StringBuilder s = new StringBuilder();
|
||||
s.Append(Global.Emulator.Frame);
|
||||
s.Append(GlobalWinF.Emulator.Frame);
|
||||
s.Append('/');
|
||||
if (Global.MovieSession.Movie.Frames.HasValue)
|
||||
if (GlobalWinF.MovieSession.Movie.Frames.HasValue)
|
||||
{
|
||||
s.Append(Global.MovieSession.Movie.Frames);
|
||||
s.Append(GlobalWinF.MovieSession.Movie.Frames);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -371,19 +373,19 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
return s.ToString();
|
||||
}
|
||||
else if (Global.MovieSession.Movie.IsRecording)
|
||||
else if (GlobalWinF.MovieSession.Movie.IsRecording)
|
||||
{
|
||||
return Global.Emulator.Frame.ToString();
|
||||
return GlobalWinF.Emulator.Frame.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
return Global.Emulator.Frame.ToString();
|
||||
return GlobalWinF.Emulator.Frame.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private string MakeLagCounter()
|
||||
{
|
||||
return Global.Emulator.LagCount.ToString();
|
||||
return GlobalWinF.Emulator.LagCount.ToString();
|
||||
}
|
||||
|
||||
private List<UIMessage> messages = new List<UIMessage>(5);
|
||||
|
@ -391,19 +393,19 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public void AddMessage(string message)
|
||||
{
|
||||
Global.DisplayManager.NeedsToPaint = true;
|
||||
GlobalWinF.DisplayManager.NeedsToPaint = true;
|
||||
messages.Add(new UIMessage { Message = message, ExpireAt = DateTime.Now + TimeSpan.FromSeconds(2) });
|
||||
}
|
||||
|
||||
public void AddGUIText(string message, int x, int y, bool alert, Color BackGround, Color ForeColor, int anchor)
|
||||
{
|
||||
Global.DisplayManager.NeedsToPaint = true;
|
||||
GlobalWinF.DisplayManager.NeedsToPaint = true;
|
||||
GUITextList.Add(new UIDisplay { Message = message, X = x, Y = y, BackGround = BackGround, ForeColor = ForeColor, Alert = alert, Anchor = anchor });
|
||||
}
|
||||
|
||||
public void ClearGUIText()
|
||||
{
|
||||
Global.DisplayManager.NeedsToPaint = true;
|
||||
GlobalWinF.DisplayManager.NeedsToPaint = true;
|
||||
|
||||
GUITextList.Clear();
|
||||
}
|
||||
|
@ -411,7 +413,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public void DrawMessages(IBlitter g)
|
||||
{
|
||||
if (!Global.ClientControls["MaxTurbo"])
|
||||
if (!GlobalWinF.ClientControls["MaxTurbo"])
|
||||
{
|
||||
messages.RemoveAll(m => DateTime.Now > m.ExpireAt);
|
||||
int line = 1;
|
||||
|
@ -481,13 +483,13 @@ namespace BizHawk.MultiClient
|
|||
public string MakeInputDisplay()
|
||||
{
|
||||
StringBuilder s;
|
||||
if (!Global.MovieSession.Movie.IsActive || Global.MovieSession.Movie.IsFinished)
|
||||
if (!GlobalWinF.MovieSession.Movie.IsActive || GlobalWinF.MovieSession.Movie.IsFinished)
|
||||
{
|
||||
s = new StringBuilder(Global.GetOutputControllersAsMnemonic());
|
||||
s = new StringBuilder(GlobalWinF.GetOutputControllersAsMnemonic());
|
||||
}
|
||||
else
|
||||
{
|
||||
s = new StringBuilder(Global.MovieSession.Movie.GetInput(Global.Emulator.Frame - 1));
|
||||
s = new StringBuilder(GlobalWinF.MovieSession.Movie.GetInput(GlobalWinF.Emulator.Frame - 1));
|
||||
}
|
||||
|
||||
s.Replace(".", " ").Replace("|", "").Replace(" 000, 000", " ");
|
||||
|
@ -497,9 +499,9 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public string MakeRerecordCount()
|
||||
{
|
||||
if (Global.MovieSession.Movie.IsActive)
|
||||
if (GlobalWinF.MovieSession.Movie.IsActive)
|
||||
{
|
||||
return "Rerecord Count: " + Global.MovieSession.Movie.Rerecords.ToString();
|
||||
return "Rerecord Count: " + GlobalWinF.MovieSession.Movie.Rerecords.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -526,7 +528,7 @@ namespace BizHawk.MultiClient
|
|||
Color c;
|
||||
float x = GetX(g, Global.Config.DispInpx, Global.Config.DispInpanchor, MessageFont, input);
|
||||
float y = GetY(g, Global.Config.DispInpy, Global.Config.DispInpanchor, MessageFont, input);
|
||||
if (Global.MovieSession.Movie.IsPlaying && !Global.MovieSession.Movie.IsRecording)
|
||||
if (GlobalWinF.MovieSession.Movie.IsPlaying && !GlobalWinF.MovieSession.Movie.IsRecording)
|
||||
{
|
||||
c = Color.FromArgb(Global.Config.MovieInput);
|
||||
}
|
||||
|
@ -538,7 +540,7 @@ namespace BizHawk.MultiClient
|
|||
g.DrawString(input, MessageFont, Color.Black, x+1,y+1);
|
||||
g.DrawString(input, MessageFont, c, x,y);
|
||||
}
|
||||
if (Global.MovieSession.MultiTrack.IsActive)
|
||||
if (GlobalWinF.MovieSession.MultiTrack.IsActive)
|
||||
{
|
||||
float x = GetX(g, Global.Config.DispMultix, Global.Config.DispMultianchor, MessageFont, MT);
|
||||
float y = GetY(g, Global.Config.DispMultiy, Global.Config.DispMultianchor, MessageFont, MT);
|
||||
|
@ -559,7 +561,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
string counter = MakeLagCounter();
|
||||
|
||||
if (Global.Emulator.IsLagFrame)
|
||||
if (GlobalWinF.Emulator.IsLagFrame)
|
||||
{
|
||||
float x = GetX(g, Global.Config.DispLagx, Global.Config.DispLaganchor, AlertFont, counter);
|
||||
float y = GetY(g, Global.Config.DispLagy, Global.Config.DispLaganchor, AlertFont, counter);
|
||||
|
@ -584,17 +586,17 @@ namespace BizHawk.MultiClient
|
|||
g.DrawString(rerec, MessageFont, FixedMessagesColor, x, y);
|
||||
}
|
||||
|
||||
if (Global.ClientControls["Autohold"] || Global.ClientControls["Autofire"])
|
||||
if (GlobalWinF.ClientControls["Autohold"] || GlobalWinF.ClientControls["Autofire"])
|
||||
{
|
||||
StringBuilder disp = new StringBuilder("Held: ");
|
||||
|
||||
foreach (string s in Global.StickyXORAdapter.CurrentStickies)
|
||||
foreach (string s in GlobalWinF.StickyXORAdapter.CurrentStickies)
|
||||
{
|
||||
disp.Append(s);
|
||||
disp.Append(' ');
|
||||
}
|
||||
|
||||
foreach (string s in Global.AutofireStickyXORAdapter.CurrentStickies)
|
||||
foreach (string s in GlobalWinF.AutofireStickyXORAdapter.CurrentStickies)
|
||||
{
|
||||
disp.Append("Auto-");
|
||||
disp.Append(s);
|
||||
|
@ -622,9 +624,9 @@ namespace BizHawk.MultiClient
|
|||
// //g.DrawEllipse(new Pen(new SolidBrush(Color.Pink)), new Rectangle((int)g.ClipBounds.Width - 22, 2, 20, 20));
|
||||
//}
|
||||
|
||||
if (Global.MovieSession.Movie.IsActive && Global.Config.DisplaySubtitles)
|
||||
if (GlobalWinF.MovieSession.Movie.IsActive && Global.Config.DisplaySubtitles)
|
||||
{
|
||||
List<Subtitle> s = Global.MovieSession.Movie.Subtitles.GetSubtitles(Global.Emulator.Frame);
|
||||
List<Subtitle> s = GlobalWinF.MovieSession.Movie.Subtitles.GetSubtitles(GlobalWinF.Emulator.Frame);
|
||||
if (s == null)
|
||||
{
|
||||
return;
|
||||
|
@ -660,7 +662,7 @@ namespace BizHawk.MultiClient
|
|||
/// <summary>update Global.RenderPanel from the passed IVideoProvider</summary>
|
||||
public void UpdateSource(IVideoProvider videoProvider)
|
||||
{
|
||||
UpdateSourceEx(videoProvider, Global.RenderPanel);
|
||||
UpdateSourceEx(videoProvider, GlobalWinF.RenderPanel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -773,10 +775,10 @@ namespace BizHawk.MultiClient
|
|||
|
||||
void RenderOSD(IBlitter renderPanel)
|
||||
{
|
||||
Global.OSD.Begin(renderPanel);
|
||||
GlobalWinF.OSD.Begin(renderPanel);
|
||||
renderPanel.Open();
|
||||
Global.OSD.DrawScreenInfo(renderPanel);
|
||||
Global.OSD.DrawMessages(renderPanel);
|
||||
GlobalWinF.OSD.DrawScreenInfo(renderPanel);
|
||||
GlobalWinF.OSD.DrawMessages(renderPanel);
|
||||
renderPanel.Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@ using System.Linq;
|
|||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
//IDEA: put filesizes in DB too. then scans can go real quick by only scanning filesizes that match (and then scanning filesizes that dont match, in case of an emergency)
|
||||
//this would be adviseable if we end up with a very large firmware file
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ using SlimDX.DirectSound;
|
|||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public static class Global
|
||||
public static class GlobalWinF
|
||||
{
|
||||
public static MainForm MainForm;
|
||||
#if WINDOWS
|
||||
|
@ -18,12 +18,9 @@ namespace BizHawk.MultiClient
|
|||
public static IRenderer RenderPanel;
|
||||
public static OSDManager OSD = new OSDManager();
|
||||
public static DisplayManager DisplayManager = new DisplayManager();
|
||||
public static Config Config;
|
||||
public static IEmulator Emulator;
|
||||
public static CoreComm CoreComm;
|
||||
public static GameInfo Game;
|
||||
public static CheatList CheatList;
|
||||
|
||||
public static Controller NullControls;
|
||||
public static AutofireController AutofireNullControls;
|
||||
|
|
@ -2,6 +2,8 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public class Controller : IController
|
||||
|
@ -14,7 +16,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private readonly Dictionary<string, ControllerDefinition.FloatRange> FloatRanges = new WorkingDictionary<string, ControllerDefinition.FloatRange>();
|
||||
|
||||
private readonly Dictionary<string, Config.AnalogBind> FloatBinds = new Dictionary<string, Config.AnalogBind>();
|
||||
private readonly Dictionary<string, BizHawk.Client.Core.Config.AnalogBind> FloatBinds = new Dictionary<string, Config.AnalogBind>();
|
||||
|
||||
public Controller(ControllerDefinition definition)
|
||||
{
|
||||
|
@ -153,7 +155,7 @@ namespace BizHawk.MultiClient
|
|||
bindings[button].Add(control.Trim());
|
||||
}
|
||||
|
||||
public void BindFloat(string button, Config.AnalogBind bind)
|
||||
public void BindFloat(string button, BizHawk.Client.Core.Config.AnalogBind bind)
|
||||
{
|
||||
FloatBinds[button] = bind;
|
||||
}
|
||||
|
@ -212,7 +214,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (autofire)
|
||||
{
|
||||
int a = (Global.Emulator.Frame - buttonStarts[button]) % (On + Off);
|
||||
int a = (GlobalWinF.Emulator.Frame - buttonStarts[button]) % (On + Off);
|
||||
if (a < On)
|
||||
return buttons[button];
|
||||
else
|
||||
|
@ -252,7 +254,7 @@ namespace BizHawk.MultiClient
|
|||
foreach (var bound_button in kvp.Value)
|
||||
{
|
||||
if (buttons[kvp.Key] == false && controller[bound_button])
|
||||
buttonStarts[kvp.Key] = Global.Emulator.Frame;
|
||||
buttonStarts[kvp.Key] = GlobalWinF.Emulator.Frame;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace BizHawk.MultiClient
|
|||
continue; // Don't input XBOX 360 controllers into here; we'll process them via XInput (there are limitations in some trigger axes when xbox pads go over xinput)
|
||||
|
||||
var joystick = new Joystick(dinput, device.InstanceGuid);
|
||||
joystick.SetCooperativeLevel(Global.MainForm.Handle, CooperativeLevel.Background | CooperativeLevel.Nonexclusive);
|
||||
joystick.SetCooperativeLevel(GlobalWinF.MainForm.Handle, CooperativeLevel.Background | CooperativeLevel.Nonexclusive);
|
||||
foreach (DeviceObjectInstance deviceObject in joystick.GetObjects())
|
||||
{
|
||||
if ((deviceObject.ObjectType & ObjectDeviceType.Axis) != 0)
|
||||
|
|
|
@ -337,7 +337,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
}
|
||||
|
||||
bool swallow = !Global.MainForm.AllowInput;
|
||||
bool swallow = !GlobalWinF.MainForm.AllowInput;
|
||||
|
||||
foreach (var ie in _NewEvents)
|
||||
{
|
||||
|
@ -399,7 +399,7 @@ namespace BizHawk.MultiClient
|
|||
lock (this)
|
||||
{
|
||||
if (InputEvents.Count == 0) return null;
|
||||
if (!Global.MainForm.AllowInput) return null;
|
||||
if (!GlobalWinF.MainForm.AllowInput) return null;
|
||||
|
||||
//we only listen to releases for input binding, because we need to distinguish releases of pure modifierkeys from modified keys
|
||||
//if you just pressed ctrl, wanting to bind ctrl, we'd see: pressed:ctrl, unpressed:ctrl
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
if (keyboard == null || keyboard.Disposed)
|
||||
keyboard = new Keyboard(dinput);
|
||||
keyboard.SetCooperativeLevel(Global.MainForm.Handle, CooperativeLevel.Background | CooperativeLevel.Nonexclusive);
|
||||
keyboard.SetCooperativeLevel(GlobalWinF.MainForm.Handle, CooperativeLevel.Background | CooperativeLevel.Nonexclusive);
|
||||
}
|
||||
|
||||
public static void Update()
|
||||
|
|
|
@ -3,6 +3,8 @@ using System.Text;
|
|||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
#pragma warning disable 162
|
||||
|
||||
//thanks! - http://sharp-developer.net/ru/CodeBank/WinForms/GuiConsole.aspx
|
||||
|
|
|
@ -4,6 +4,8 @@ using System.Drawing;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
//todo - perks - pause, copy to clipboard, backlog length limiting
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
|
@ -18,7 +20,7 @@ namespace BizHawk.MultiClient
|
|||
Closing += (o, e) =>
|
||||
{
|
||||
Global.Config.ShowLogWindow = false;
|
||||
Global.MainForm.notifyLogWindowClosing();
|
||||
GlobalWinF.MainForm.notifyLogWindowClosing();
|
||||
LogConsole.notifyLogWindowClosing();
|
||||
SaveConfigSettings();
|
||||
};
|
||||
|
|
|
@ -7,6 +7,8 @@ using BizHawk.Emulation.Consoles.Calculator;
|
|||
using BizHawk.Emulation.Consoles.GB;
|
||||
using BizHawk.Emulation.Consoles.Nintendo.SNES;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
partial class MainForm
|
||||
|
@ -28,11 +30,11 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void DumpStatus_Click(object sender, EventArgs e)
|
||||
{
|
||||
string details = Global.Emulator.CoreComm.RomStatusDetails;
|
||||
string details = GlobalWinF.Emulator.CoreComm.RomStatusDetails;
|
||||
if (string.IsNullOrEmpty(details)) return;
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
LogWindow.ShowReport("Dump Status Report", details, this);
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
}
|
||||
|
||||
private void saveWindowPositionToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -62,7 +64,7 @@ namespace BizHawk.MultiClient
|
|||
old = Global.Config.VSyncThrottle;
|
||||
Global.Config.VSyncThrottle = false;
|
||||
if (old)
|
||||
Global.RenderPanel.Resized = true;
|
||||
GlobalWinF.RenderPanel.Resized = true;
|
||||
}
|
||||
LimitFrameRateMessage();
|
||||
}
|
||||
|
@ -77,7 +79,7 @@ namespace BizHawk.MultiClient
|
|||
bool old = Global.Config.VSyncThrottle;
|
||||
Global.Config.VSyncThrottle = false;
|
||||
if (old)
|
||||
Global.RenderPanel.Resized = true;
|
||||
GlobalWinF.RenderPanel.Resized = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -85,7 +87,7 @@ namespace BizHawk.MultiClient
|
|||
private void miDisplayVsync_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.VSyncThrottle ^= true;
|
||||
Global.RenderPanel.Resized = true;
|
||||
GlobalWinF.RenderPanel.Resized = true;
|
||||
if (Global.Config.VSyncThrottle)
|
||||
{
|
||||
Global.Config.ClockThrottle = false;
|
||||
|
@ -101,18 +103,18 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
Global.Config.VSync ^= true;
|
||||
if (!Global.Config.VSyncThrottle) // when vsync throttle is on, vsync is forced to on, so no change to make here
|
||||
Global.RenderPanel.Resized = true;
|
||||
GlobalWinF.RenderPanel.Resized = true;
|
||||
}
|
||||
|
||||
public void LimitFrameRateMessage()
|
||||
{
|
||||
if (Global.Config.ClockThrottle)
|
||||
{
|
||||
Global.OSD.AddMessage("Framerate limiting on");
|
||||
GlobalWinF.OSD.AddMessage("Framerate limiting on");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("Framerate limiting off");
|
||||
GlobalWinF.OSD.AddMessage("Framerate limiting off");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,11 +123,11 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (Global.Config.VSyncThrottle)
|
||||
{
|
||||
Global.OSD.AddMessage("Display Vsync is set to on");
|
||||
GlobalWinF.OSD.AddMessage("Display Vsync is set to on");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("Display Vsync is set to off");
|
||||
GlobalWinF.OSD.AddMessage("Display Vsync is set to off");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -138,11 +140,11 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (Global.Config.AutoMinimizeSkipping)
|
||||
{
|
||||
Global.OSD.AddMessage("Autominimizing set to on");
|
||||
GlobalWinF.OSD.AddMessage("Autominimizing set to on");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("Autominimizing set to off");
|
||||
GlobalWinF.OSD.AddMessage("Autominimizing set to off");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -159,7 +161,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public void FrameSkipMessage()
|
||||
{
|
||||
Global.OSD.AddMessage("Frameskipping set to " + Global.Config.FrameSkip.ToString());
|
||||
GlobalWinF.OSD.AddMessage("Frameskipping set to " + Global.Config.FrameSkip.ToString());
|
||||
}
|
||||
|
||||
public void ClickSpeedItem(int num)
|
||||
|
@ -439,7 +441,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void OpenControllerConfig()
|
||||
{
|
||||
ControllerConfig c = new ControllerConfig(Global.Emulator.ControllerDefinition);
|
||||
ControllerConfig c = new ControllerConfig(GlobalWinF.Emulator.ControllerDefinition);
|
||||
c.ShowDialog();
|
||||
if (c.DialogResult == DialogResult.OK)
|
||||
{
|
||||
|
@ -466,25 +468,25 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void displayFPSToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.DisplayManager.NeedsToPaint = true;
|
||||
GlobalWinF.DisplayManager.NeedsToPaint = true;
|
||||
ToggleFPS();
|
||||
}
|
||||
|
||||
private void displayFrameCounterToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.DisplayManager.NeedsToPaint = true;
|
||||
GlobalWinF.DisplayManager.NeedsToPaint = true;
|
||||
ToggleFrameCounter();
|
||||
}
|
||||
|
||||
private void displayInputToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.DisplayManager.NeedsToPaint = true;
|
||||
GlobalWinF.DisplayManager.NeedsToPaint = true;
|
||||
ToggleInputDisplay();
|
||||
}
|
||||
|
||||
private void displayLagCounterToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.DisplayManager.NeedsToPaint = true;
|
||||
GlobalWinF.DisplayManager.NeedsToPaint = true;
|
||||
ToggleLagCounter();
|
||||
}
|
||||
|
||||
|
@ -636,9 +638,9 @@ namespace BizHawk.MultiClient
|
|||
virtualPadToolStripMenuItem.ShortcutKeyDisplayString = Global.Config.HotkeyBindings["Virtual Pad"].Bindings;
|
||||
traceLoggerToolStripMenuItem.ShortcutKeyDisplayString = Global.Config.HotkeyBindings["Trace Logger"].Bindings;
|
||||
toolBoxToolStripMenuItem.Enabled = !ToolBox1.IsHandleCreated || ToolBox1.IsDisposed;
|
||||
traceLoggerToolStripMenuItem.Enabled = Global.Emulator.CoreComm.CpuTraceAvailable;
|
||||
traceLoggerToolStripMenuItem.Enabled = GlobalWinF.Emulator.CoreComm.CpuTraceAvailable;
|
||||
|
||||
cheatsToolStripMenuItem.Enabled = !(Global.Emulator is NullEmulator);
|
||||
cheatsToolStripMenuItem.Enabled = !(GlobalWinF.Emulator is NullEmulator);
|
||||
}
|
||||
|
||||
private void saveSlotToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
|
||||
|
@ -671,13 +673,13 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void autoloadVirtualKeyboardToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!(Global.Emulator is TI83)) return;
|
||||
if (!(GlobalWinF.Emulator is TI83)) return;
|
||||
Global.Config.TI83autoloadKeyPad ^= true;
|
||||
}
|
||||
|
||||
private void keypadToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!(Global.Emulator is TI83))
|
||||
if (!(GlobalWinF.Emulator is TI83))
|
||||
return;
|
||||
LoadTI83KeyPad();
|
||||
}
|
||||
|
@ -696,7 +698,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void displayRerecordCountToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.DisplayManager.NeedsToPaint = true;
|
||||
GlobalWinF.DisplayManager.NeedsToPaint = true;
|
||||
Global.Config.DisplayRerecordCount ^= true;
|
||||
}
|
||||
|
||||
|
@ -733,9 +735,9 @@ namespace BizHawk.MultiClient
|
|||
Filter = "PNG File (*.png)|*.png"
|
||||
};
|
||||
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
var result = sfd.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result != DialogResult.OK)
|
||||
return;
|
||||
TakeScreenshot(sfd.FileName);
|
||||
|
@ -761,11 +763,11 @@ namespace BizHawk.MultiClient
|
|||
Global.Config.AcceptBackgroundInput ^= true;
|
||||
if (Global.Config.AcceptBackgroundInput)
|
||||
{
|
||||
Global.OSD.AddMessage("Background Input enabled");
|
||||
GlobalWinF.OSD.AddMessage("Background Input enabled");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("Background Input disabled");
|
||||
GlobalWinF.OSD.AddMessage("Background Input disabled");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -827,11 +829,11 @@ namespace BizHawk.MultiClient
|
|||
Global.Config.ShowContextMenu ^= true;
|
||||
if (Global.Config.ShowContextMenu)
|
||||
{
|
||||
Global.OSD.AddMessage("Context menu enabled");
|
||||
GlobalWinF.OSD.AddMessage("Context menu enabled");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("Context menu disabled");
|
||||
GlobalWinF.OSD.AddMessage("Context menu disabled");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -856,10 +858,10 @@ namespace BizHawk.MultiClient
|
|||
s.DisableFrame();
|
||||
int index = -1;
|
||||
Subtitle sub = new Subtitle();
|
||||
for (int x = 0; x < Global.MovieSession.Movie.Subtitles.Count; x++)
|
||||
for (int x = 0; x < GlobalWinF.MovieSession.Movie.Subtitles.Count; x++)
|
||||
{
|
||||
sub = Global.MovieSession.Movie.Subtitles.GetSubtitleByIndex(x);
|
||||
if (Global.Emulator.Frame == sub.Frame)
|
||||
sub = GlobalWinF.MovieSession.Movie.Subtitles.GetSubtitleByIndex(x);
|
||||
if (GlobalWinF.Emulator.Frame == sub.Frame)
|
||||
{
|
||||
index = x;
|
||||
break;
|
||||
|
@ -867,15 +869,15 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
if (index < 0)
|
||||
{
|
||||
sub = new Subtitle { Frame = Global.Emulator.Frame };
|
||||
sub = new Subtitle { Frame = GlobalWinF.Emulator.Frame };
|
||||
}
|
||||
s.sub = sub;
|
||||
|
||||
if (s.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
if (index >= 0)
|
||||
Global.MovieSession.Movie.Subtitles.Remove(index);
|
||||
Global.MovieSession.Movie.Subtitles.AddSubtitle(s.sub);
|
||||
GlobalWinF.MovieSession.Movie.Subtitles.Remove(index);
|
||||
GlobalWinF.MovieSession.Movie.Subtitles.AddSubtitle(s.sub);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -941,7 +943,7 @@ namespace BizHawk.MultiClient
|
|||
cmiLoadLastRom.Visible = false;
|
||||
toolStripSeparator_afterRomLoading.Visible = false;
|
||||
|
||||
if (Global.MovieSession.Movie.IsActive)
|
||||
if (GlobalWinF.MovieSession.Movie.IsActive)
|
||||
{
|
||||
cmiRecordMovie.Visible = false;
|
||||
cmiPlayMovie.Visible = false;
|
||||
|
@ -1028,7 +1030,7 @@ namespace BizHawk.MultiClient
|
|||
ShowMenuContextMenuSeparator.Visible = cmiShowMenu.Visible = false;
|
||||
}
|
||||
|
||||
ContextMenuStopMovieNoSaving.Visible = Global.MovieSession.Movie.IsActive && Global.MovieSession.Movie.HasChanges;
|
||||
ContextMenuStopMovieNoSaving.Visible = GlobalWinF.MovieSession.Movie.IsActive && GlobalWinF.MovieSession.Movie.HasChanges;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1042,7 +1044,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void makeMovieBackupToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MovieSession.Movie.WriteBackup();
|
||||
GlobalWinF.MovieSession.Movie.WriteBackup();
|
||||
}
|
||||
|
||||
private void automaticallyBackupMoviesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -1072,7 +1074,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void displaySubtitlesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.DisplayManager.NeedsToPaint = true;
|
||||
GlobalWinF.DisplayManager.NeedsToPaint = true;
|
||||
Global.Config.DisplaySubtitles ^= true;
|
||||
}
|
||||
|
||||
|
@ -1096,20 +1098,20 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void viewCommentsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.MovieSession.Movie.IsActive)
|
||||
if (GlobalWinF.MovieSession.Movie.IsActive)
|
||||
{
|
||||
EditCommentsForm c = new EditCommentsForm { ReadOnly = ReadOnly };
|
||||
c.GetMovie(Global.MovieSession.Movie);
|
||||
c.GetMovie(GlobalWinF.MovieSession.Movie);
|
||||
c.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void viewSubtitlesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.MovieSession.Movie.IsActive)
|
||||
if (GlobalWinF.MovieSession.Movie.IsActive)
|
||||
{
|
||||
EditSubtitlesForm s = new EditSubtitlesForm { ReadOnly = ReadOnly };
|
||||
s.GetMovie(Global.MovieSession.Movie);
|
||||
s.GetMovie(GlobalWinF.MovieSession.Movie);
|
||||
s.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
@ -1158,12 +1160,12 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void movieToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
fullMovieLoadstatesToolStripMenuItem.Enabled = !Global.MovieSession.MultiTrack.IsActive;
|
||||
stopMovieWithoutSavingToolStripMenuItem.Enabled = Global.MovieSession.Movie.IsActive && Global.MovieSession.Movie.HasChanges;
|
||||
fullMovieLoadstatesToolStripMenuItem.Enabled = !GlobalWinF.MovieSession.MultiTrack.IsActive;
|
||||
stopMovieWithoutSavingToolStripMenuItem.Enabled = GlobalWinF.MovieSession.Movie.IsActive && GlobalWinF.MovieSession.Movie.HasChanges;
|
||||
stopMovieToolStripMenuItem.Enabled
|
||||
= playFromBeginningToolStripMenuItem.Enabled
|
||||
= saveMovieToolStripMenuItem.Enabled
|
||||
= Global.MovieSession.Movie.IsActive;
|
||||
= GlobalWinF.MovieSession.Movie.IsActive;
|
||||
|
||||
readonlyToolStripMenuItem.Checked = ReadOnly;
|
||||
bindSavestatesToMoviesToolStripMenuItem.Checked = Global.Config.BindSavestatesToMovies;
|
||||
|
@ -1181,14 +1183,14 @@ namespace BizHawk.MultiClient
|
|||
private void saveConfigToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveConfig();
|
||||
Global.OSD.AddMessage("Saved settings");
|
||||
GlobalWinF.OSD.AddMessage("Saved settings");
|
||||
}
|
||||
|
||||
private void loadConfigToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config = ConfigService.Load(PathManager.DefaultIniPath, Global.Config);
|
||||
Global.Config.ResolveDefaults();
|
||||
Global.OSD.AddMessage("Config file loaded");
|
||||
GlobalWinF.OSD.AddMessage("Config file loaded");
|
||||
}
|
||||
|
||||
private void frameSkipToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
|
||||
|
@ -1273,7 +1275,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void menuStrip1_MenuDeactivate(object sender, EventArgs e)
|
||||
{
|
||||
Global.DisplayManager.NeedsToPaint = true;
|
||||
GlobalWinF.DisplayManager.NeedsToPaint = true;
|
||||
if (!wasPaused)
|
||||
{
|
||||
UnpauseEmulator();
|
||||
|
@ -1431,12 +1433,12 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
rebootCoreToolStripMenuItem.Enabled = !IsNullEmulator();
|
||||
|
||||
resetToolStripMenuItem.Enabled = Global.Emulator.ControllerDefinition.BoolButtons.Contains("Reset") &&
|
||||
(!Global.MovieSession.Movie.IsPlaying || Global.MovieSession.Movie.IsFinished);
|
||||
resetToolStripMenuItem.Enabled = GlobalWinF.Emulator.ControllerDefinition.BoolButtons.Contains("Reset") &&
|
||||
(!GlobalWinF.MovieSession.Movie.IsPlaying || GlobalWinF.MovieSession.Movie.IsFinished);
|
||||
|
||||
|
||||
hardResetToolStripMenuItem.Enabled = Global.Emulator.ControllerDefinition.BoolButtons.Contains("Power") &&
|
||||
(!Global.MovieSession.Movie.IsPlaying || Global.MovieSession.Movie.IsFinished);
|
||||
hardResetToolStripMenuItem.Enabled = GlobalWinF.Emulator.ControllerDefinition.BoolButtons.Contains("Power") &&
|
||||
(!GlobalWinF.MovieSession.Movie.IsPlaying || GlobalWinF.MovieSession.Movie.IsFinished);
|
||||
|
||||
pauseToolStripMenuItem.Checked = EmulatorPaused;
|
||||
if (didMenuPause)
|
||||
|
@ -1500,11 +1502,11 @@ namespace BizHawk.MultiClient
|
|||
Global.Config.BackupSavestates ^= true;
|
||||
if (Global.Config.BackupSavestates)
|
||||
{
|
||||
Global.OSD.AddMessage("Backup savestates enabled");
|
||||
GlobalWinF.OSD.AddMessage("Backup savestates enabled");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("Backup savestates disabled");
|
||||
GlobalWinF.OSD.AddMessage("Backup savestates disabled");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1513,11 +1515,11 @@ namespace BizHawk.MultiClient
|
|||
Global.Config.AutoSavestates ^= true;
|
||||
if (Global.Config.AutoSavestates)
|
||||
{
|
||||
Global.OSD.AddMessage("AutoSavestates enabled");
|
||||
GlobalWinF.OSD.AddMessage("AutoSavestates enabled");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("AutoSavestates disabled");
|
||||
GlobalWinF.OSD.AddMessage("AutoSavestates disabled");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1526,11 +1528,11 @@ namespace BizHawk.MultiClient
|
|||
Global.Config.SaveScreenshotWithStates ^= true;
|
||||
if (Global.Config.SaveScreenshotWithStates)
|
||||
{
|
||||
Global.OSD.AddMessage("Screenshots will be saved in savestates");
|
||||
GlobalWinF.OSD.AddMessage("Screenshots will be saved in savestates");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("Screenshots will not be saved in savestates");
|
||||
GlobalWinF.OSD.AddMessage("Screenshots will not be saved in savestates");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1538,7 +1540,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
string path = PathManager.SaveStatePrefix(Global.Game) + "." + "QuickSave" + Global.Config.SaveSlot + ".State";
|
||||
SwapBackupSavestate(path);
|
||||
Global.OSD.AddMessage("Save slot " + Global.Config.SaveSlot.ToString() + " restored.");
|
||||
GlobalWinF.OSD.AddMessage("Save slot " + Global.Config.SaveSlot.ToString() + " restored.");
|
||||
}
|
||||
|
||||
private void FreezeStatus_Click(object sender, EventArgs e)
|
||||
|
@ -1551,7 +1553,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public void UpdateCheatStatus()
|
||||
{
|
||||
if (Global.CheatList.ActiveCount > 0)
|
||||
if (GlobalWinF.CheatList.ActiveCount > 0)
|
||||
{
|
||||
CheatStatus.ToolTipText = "Cheats are currently active";
|
||||
CheatStatus.Image = Properties.Resources.Freeze;
|
||||
|
@ -1597,40 +1599,40 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void bWToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.Emulator is Atari2600)
|
||||
if (GlobalWinF.Emulator is Atari2600)
|
||||
{
|
||||
Global.Config.Atari2600_BW ^= true;
|
||||
((Atari2600)Global.Emulator).SetBw(Global.Config.Atari2600_BW);
|
||||
((Atari2600)GlobalWinF.Emulator).SetBw(Global.Config.Atari2600_BW);
|
||||
if (Global.Config.Atari2600_BW)
|
||||
Global.OSD.AddMessage("Setting to Black and White Switch to On");
|
||||
GlobalWinF.OSD.AddMessage("Setting to Black and White Switch to On");
|
||||
else
|
||||
Global.OSD.AddMessage("Setting to Black and White Switch to Off");
|
||||
GlobalWinF.OSD.AddMessage("Setting to Black and White Switch to Off");
|
||||
}
|
||||
}
|
||||
|
||||
private void p0DifficultyToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.Emulator is Atari2600)
|
||||
if (GlobalWinF.Emulator is Atari2600)
|
||||
{
|
||||
Global.Config.Atari2600_LeftDifficulty ^= true;
|
||||
((Atari2600)Global.Emulator).SetP0Diff(Global.Config.Atari2600_BW);
|
||||
((Atari2600)GlobalWinF.Emulator).SetP0Diff(Global.Config.Atari2600_BW);
|
||||
if (Global.Config.Atari2600_LeftDifficulty)
|
||||
Global.OSD.AddMessage("Setting Left Difficulty to B");
|
||||
GlobalWinF.OSD.AddMessage("Setting Left Difficulty to B");
|
||||
else
|
||||
Global.OSD.AddMessage("Setting Left Difficulty to A");
|
||||
GlobalWinF.OSD.AddMessage("Setting Left Difficulty to A");
|
||||
}
|
||||
}
|
||||
|
||||
private void rightDifficultyToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.Emulator is Atari2600)
|
||||
if (GlobalWinF.Emulator is Atari2600)
|
||||
{
|
||||
Global.Config.Atari2600_RightDifficulty ^= true;
|
||||
((Atari2600)Global.Emulator).SetP1Diff(Global.Config.Atari2600_BW);
|
||||
((Atari2600)GlobalWinF.Emulator).SetP1Diff(Global.Config.Atari2600_BW);
|
||||
if (Global.Config.Atari2600_RightDifficulty)
|
||||
Global.OSD.AddMessage("Setting Right Difficulty to B");
|
||||
GlobalWinF.OSD.AddMessage("Setting Right Difficulty to B");
|
||||
else
|
||||
Global.OSD.AddMessage("Setting Right Difficulty to A");
|
||||
GlobalWinF.OSD.AddMessage("Setting Right Difficulty to A");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1684,7 +1686,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public void SNES_ToggleBG1(bool? setto = null)
|
||||
{
|
||||
if (Global.Emulator is LibsnesCore)
|
||||
if (GlobalWinF.Emulator is LibsnesCore)
|
||||
{
|
||||
if (setto.HasValue)
|
||||
{
|
||||
|
@ -1698,18 +1700,18 @@ namespace BizHawk.MultiClient
|
|||
SyncCoreCommInputSignals();
|
||||
if (Global.Config.SNES_ShowBG1_1)
|
||||
{
|
||||
Global.OSD.AddMessage("BG 1 Layer On");
|
||||
GlobalWinF.OSD.AddMessage("BG 1 Layer On");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("BG 1 Layer Off");
|
||||
GlobalWinF.OSD.AddMessage("BG 1 Layer Off");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SNES_ToggleBG2(bool? setto = null)
|
||||
{
|
||||
if (Global.Emulator is LibsnesCore)
|
||||
if (GlobalWinF.Emulator is LibsnesCore)
|
||||
{
|
||||
if (setto.HasValue)
|
||||
{
|
||||
|
@ -1722,18 +1724,18 @@ namespace BizHawk.MultiClient
|
|||
SyncCoreCommInputSignals();
|
||||
if (Global.Config.SNES_ShowBG2_1)
|
||||
{
|
||||
Global.OSD.AddMessage("BG 2 Layer On");
|
||||
GlobalWinF.OSD.AddMessage("BG 2 Layer On");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("BG 2 Layer Off");
|
||||
GlobalWinF.OSD.AddMessage("BG 2 Layer Off");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SNES_ToggleBG3(bool? setto = null)
|
||||
{
|
||||
if (Global.Emulator is LibsnesCore)
|
||||
if (GlobalWinF.Emulator is LibsnesCore)
|
||||
{
|
||||
if (setto.HasValue)
|
||||
{
|
||||
|
@ -1746,18 +1748,18 @@ namespace BizHawk.MultiClient
|
|||
SyncCoreCommInputSignals();
|
||||
if (Global.Config.SNES_ShowBG3_1)
|
||||
{
|
||||
Global.OSD.AddMessage("BG 3 Layer On");
|
||||
GlobalWinF.OSD.AddMessage("BG 3 Layer On");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("BG 3 Layer Off");
|
||||
GlobalWinF.OSD.AddMessage("BG 3 Layer Off");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SNES_ToggleBG4(bool? setto = null)
|
||||
{
|
||||
if (Global.Emulator is LibsnesCore)
|
||||
if (GlobalWinF.Emulator is LibsnesCore)
|
||||
{
|
||||
if (setto.HasValue)
|
||||
{
|
||||
|
@ -1770,18 +1772,18 @@ namespace BizHawk.MultiClient
|
|||
SyncCoreCommInputSignals();
|
||||
if (Global.Config.SNES_ShowBG4_1)
|
||||
{
|
||||
Global.OSD.AddMessage("BG 4 Layer On");
|
||||
GlobalWinF.OSD.AddMessage("BG 4 Layer On");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("BG 4 Layer Off");
|
||||
GlobalWinF.OSD.AddMessage("BG 4 Layer Off");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SNES_ToggleOBJ1(bool? setto = null)
|
||||
{
|
||||
if (Global.Emulator is LibsnesCore)
|
||||
if (GlobalWinF.Emulator is LibsnesCore)
|
||||
{
|
||||
if (setto.HasValue)
|
||||
{
|
||||
|
@ -1794,18 +1796,18 @@ namespace BizHawk.MultiClient
|
|||
SyncCoreCommInputSignals();
|
||||
if (Global.Config.SNES_ShowOBJ1)
|
||||
{
|
||||
Global.OSD.AddMessage("OBJ 1 Layer On");
|
||||
GlobalWinF.OSD.AddMessage("OBJ 1 Layer On");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("OBJ 1 Layer Off");
|
||||
GlobalWinF.OSD.AddMessage("OBJ 1 Layer Off");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SNES_ToggleOBJ2(bool? setto = null)
|
||||
{
|
||||
if (Global.Emulator is LibsnesCore)
|
||||
if (GlobalWinF.Emulator is LibsnesCore)
|
||||
{
|
||||
if (setto.HasValue)
|
||||
{
|
||||
|
@ -1818,18 +1820,18 @@ namespace BizHawk.MultiClient
|
|||
SyncCoreCommInputSignals();
|
||||
if (Global.Config.SNES_ShowOBJ2)
|
||||
{
|
||||
Global.OSD.AddMessage("OBJ 2 Layer On");
|
||||
GlobalWinF.OSD.AddMessage("OBJ 2 Layer On");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("OBJ 2 Layer Off");
|
||||
GlobalWinF.OSD.AddMessage("OBJ 2 Layer Off");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SNES_ToggleOBJ3(bool? setto = null)
|
||||
{
|
||||
if (Global.Emulator is LibsnesCore)
|
||||
if (GlobalWinF.Emulator is LibsnesCore)
|
||||
{
|
||||
if (setto.HasValue)
|
||||
{
|
||||
|
@ -1842,18 +1844,18 @@ namespace BizHawk.MultiClient
|
|||
SyncCoreCommInputSignals();
|
||||
if (Global.Config.SNES_ShowOBJ3)
|
||||
{
|
||||
Global.OSD.AddMessage("OBJ 3 Layer On");
|
||||
GlobalWinF.OSD.AddMessage("OBJ 3 Layer On");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("OBJ 3 Layer Off");
|
||||
GlobalWinF.OSD.AddMessage("OBJ 3 Layer Off");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SNES_ToggleOBJ4(bool? setto = null)
|
||||
{
|
||||
if (Global.Emulator is LibsnesCore)
|
||||
if (GlobalWinF.Emulator is LibsnesCore)
|
||||
{
|
||||
if (setto.HasValue)
|
||||
{
|
||||
|
@ -1866,11 +1868,11 @@ namespace BizHawk.MultiClient
|
|||
SyncCoreCommInputSignals();
|
||||
if (Global.Config.SNES_ShowOBJ4)
|
||||
{
|
||||
Global.OSD.AddMessage("OBJ 4 Layer On");
|
||||
GlobalWinF.OSD.AddMessage("OBJ 4 Layer On");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("OBJ 4 Layer Off");
|
||||
GlobalWinF.OSD.AddMessage("OBJ 4 Layer Off");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2120,7 +2122,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
var ofd = new OpenFileDialog
|
||||
{
|
||||
InitialDirectory = PathManager.GetRomsPath(Global.Emulator.SystemId),
|
||||
InitialDirectory = PathManager.GetRomsPath(GlobalWinF.Emulator.SystemId),
|
||||
Multiselect = true,
|
||||
Filter = FormatFilter(
|
||||
"Movie Files", "*.fm2;*.mc2;*.mcm;*.mmv;*.gmv;*.vbm;*.lsmv;*.fcm;*.fmv;*.vmv;*.nmv;*.smv;*.zmv;",
|
||||
|
@ -2140,9 +2142,9 @@ namespace BizHawk.MultiClient
|
|||
RestoreDirectory = false
|
||||
};
|
||||
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
var result = ofd.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result != DialogResult.OK)
|
||||
return;
|
||||
|
||||
|
@ -2187,7 +2189,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
else if (ext.ToUpper() == ".CHT")
|
||||
{
|
||||
Global.CheatList.Load(filePaths[0], false);
|
||||
GlobalWinF.CheatList.Load(filePaths[0], false);
|
||||
LoadCheatsWindow();
|
||||
}
|
||||
else if (ext.ToUpper() == ".WCH")
|
||||
|
@ -2225,7 +2227,7 @@ namespace BizHawk.MultiClient
|
|||
m.WriteMovie();
|
||||
StartNewMovie(m, false);
|
||||
}
|
||||
Global.OSD.AddMessage(warningMsg);
|
||||
GlobalWinF.OSD.AddMessage(warningMsg);
|
||||
}
|
||||
else
|
||||
LoadRom(filePaths[0]);
|
||||
|
@ -2258,12 +2260,12 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void createDualGBXMLToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
using (var dlg = new GBtools.DualGBXMLCreator())
|
||||
{
|
||||
dlg.ShowDialog(this);
|
||||
}
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
}
|
||||
|
||||
private void tempN64PluginControlToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -2271,11 +2273,11 @@ namespace BizHawk.MultiClient
|
|||
var result = new N64VideoPluginconfig().ShowDialog();
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
Global.OSD.AddMessage("Plugin settings saved");
|
||||
GlobalWinF.OSD.AddMessage("Plugin settings saved");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("Plugin settings aborted");
|
||||
GlobalWinF.OSD.AddMessage("Plugin settings aborted");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2309,7 +2311,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void preferencesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (var dlg = new SATTools.SaturnPrefs())
|
||||
using (var dlg = new SaturnPrefs())
|
||||
{
|
||||
var result = dlg.ShowDialog(this);
|
||||
if (result == DialogResult.OK)
|
||||
|
@ -2361,9 +2363,9 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void changeDMGPalettesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.Emulator is Gameboy)
|
||||
if (GlobalWinF.Emulator is Gameboy)
|
||||
{
|
||||
var g = Global.Emulator as Gameboy;
|
||||
var g = GlobalWinF.Emulator as Gameboy;
|
||||
if (g.IsCGBMode())
|
||||
{
|
||||
if (GBtools.CGBColorChooserForm.DoCGBColorChooserFormDialog(this))
|
||||
|
@ -2390,7 +2392,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void sNESToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
if ((Global.Emulator as LibsnesCore).IsSGB)
|
||||
if ((GlobalWinF.Emulator as LibsnesCore).IsSGB)
|
||||
{
|
||||
loadGBInSGBToolStripMenuItem.Visible = true;
|
||||
loadGBInSGBToolStripMenuItem.Checked = Global.Config.GB_AsSGB;
|
||||
|
@ -2412,7 +2414,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void MainForm_Resize(object sender, EventArgs e)
|
||||
{
|
||||
Global.RenderPanel.Resized = true;
|
||||
GlobalWinF.RenderPanel.Resized = true;
|
||||
}
|
||||
|
||||
private void backupSaveramToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -2420,11 +2422,11 @@ namespace BizHawk.MultiClient
|
|||
Global.Config.BackupSaveram ^= true;
|
||||
if (Global.Config.BackupSaveram)
|
||||
{
|
||||
Global.OSD.AddMessage("Backup saveram enabled");
|
||||
GlobalWinF.OSD.AddMessage("Backup saveram enabled");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("Backup saveram disabled");
|
||||
GlobalWinF.OSD.AddMessage("Backup saveram disabled");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2447,13 +2449,13 @@ namespace BizHawk.MultiClient
|
|||
private void showClippedRegionsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.GGShowClippedRegions ^= true;
|
||||
Global.CoreComm.GG_ShowClippedRegions = Global.Config.GGShowClippedRegions;
|
||||
GlobalWinF.CoreComm.GG_ShowClippedRegions = Global.Config.GGShowClippedRegions;
|
||||
}
|
||||
|
||||
private void highlightActiveDisplayRegionToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.GGHighlightActiveDisplayRegion ^= true;
|
||||
Global.CoreComm.GG_HighlightActiveDisplayRegion = Global.Config.GGHighlightActiveDisplayRegion;
|
||||
GlobalWinF.CoreComm.GG_HighlightActiveDisplayRegion = Global.Config.GGHighlightActiveDisplayRegion;
|
||||
}
|
||||
|
||||
private void saveMovieToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -2615,14 +2617,14 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
try
|
||||
{
|
||||
(Global.Emulator as TI83).LinkPort.SendFileToCalc(File.OpenRead(OFD.FileName), true);
|
||||
(GlobalWinF.Emulator as TI83).LinkPort.SendFileToCalc(File.OpenRead(OFD.FileName), true);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
string Message = string.Format("Invalid file format. Reason: {0} \nForce transfer? This may cause the calculator to crash.", ex.Message);
|
||||
|
||||
if (MessageBox.Show(Message, "Upload Failed", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
|
||||
(Global.Emulator as TI83).LinkPort.SendFileToCalc(File.OpenRead(OFD.FileName), false);
|
||||
(GlobalWinF.Emulator as TI83).LinkPort.SendFileToCalc(File.OpenRead(OFD.FileName), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
partial class MainForm
|
||||
|
@ -10,70 +12,70 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public void ClearFrame()
|
||||
{
|
||||
if (Global.MovieSession.Movie.IsPlaying)
|
||||
if (GlobalWinF.MovieSession.Movie.IsPlaying)
|
||||
{
|
||||
Global.MovieSession.Movie.ClearFrame(Global.Emulator.Frame);
|
||||
Global.OSD.AddMessage("Scrubbed input at frame " + Global.Emulator.Frame.ToString());
|
||||
GlobalWinF.MovieSession.Movie.ClearFrame(GlobalWinF.Emulator.Frame);
|
||||
GlobalWinF.OSD.AddMessage("Scrubbed input at frame " + GlobalWinF.Emulator.Frame.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public void StartNewMovie(Movie m, bool record)
|
||||
{
|
||||
//If a movie is already loaded, save it before starting a new movie
|
||||
if (Global.MovieSession.Movie.IsActive)
|
||||
if (GlobalWinF.MovieSession.Movie.IsActive)
|
||||
{
|
||||
Global.MovieSession.Movie.WriteMovie();
|
||||
GlobalWinF.MovieSession.Movie.WriteMovie();
|
||||
}
|
||||
|
||||
Global.MovieSession = new MovieSession {Movie = m};
|
||||
GlobalWinF.MovieSession = new MovieSession {Movie = m};
|
||||
RewireInputChain();
|
||||
|
||||
if (!record)
|
||||
{
|
||||
Global.MovieSession.Movie.LoadMovie();
|
||||
GlobalWinF.MovieSession.Movie.LoadMovie();
|
||||
SetSyncDependentSettings();
|
||||
}
|
||||
|
||||
LoadRom(Global.MainForm.CurrentlyOpenRom, true, !record);
|
||||
LoadRom(GlobalWinF.MainForm.CurrentlyOpenRom, true, !record);
|
||||
|
||||
Global.Config.RecentMovies.Add(m.Filename);
|
||||
if (Global.MovieSession.Movie.StartsFromSavestate)
|
||||
if (GlobalWinF.MovieSession.Movie.StartsFromSavestate)
|
||||
{
|
||||
LoadStateFile(Global.MovieSession.Movie.Filename, Path.GetFileName(Global.MovieSession.Movie.Filename));
|
||||
Global.Emulator.ResetFrameCounter();
|
||||
LoadStateFile(GlobalWinF.MovieSession.Movie.Filename, Path.GetFileName(GlobalWinF.MovieSession.Movie.Filename));
|
||||
GlobalWinF.Emulator.ResetFrameCounter();
|
||||
}
|
||||
if (record)
|
||||
{
|
||||
Global.MovieSession.Movie.StartRecording();
|
||||
GlobalWinF.MovieSession.Movie.StartRecording();
|
||||
ReadOnly = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.MovieSession.Movie.StartPlayback();
|
||||
GlobalWinF.MovieSession.Movie.StartPlayback();
|
||||
}
|
||||
SetMainformMovieInfo();
|
||||
TAStudio1.Restart();
|
||||
VirtualPadForm1.Restart();
|
||||
Global.DisplayManager.NeedsToPaint = true;
|
||||
GlobalWinF.DisplayManager.NeedsToPaint = true;
|
||||
}
|
||||
|
||||
public void SetMainformMovieInfo()
|
||||
{
|
||||
if (Global.MovieSession.Movie.IsPlaying)
|
||||
if (GlobalWinF.MovieSession.Movie.IsPlaying)
|
||||
{
|
||||
Text = DisplayNameForSystem(Global.Game.System) + " - " + Global.Game.Name + " - " + Path.GetFileName(Global.MovieSession.Movie.Filename);
|
||||
Text = DisplayNameForSystem(Global.Game.System) + " - " + Global.Game.Name + " - " + Path.GetFileName(GlobalWinF.MovieSession.Movie.Filename);
|
||||
PlayRecordStatus.Image = Properties.Resources.Play;
|
||||
PlayRecordStatus.ToolTipText = "Movie is in playback mode";
|
||||
PlayRecordStatus.Visible = true;
|
||||
}
|
||||
else if (Global.MovieSession.Movie.IsRecording)
|
||||
else if (GlobalWinF.MovieSession.Movie.IsRecording)
|
||||
{
|
||||
Text = DisplayNameForSystem(Global.Game.System) + " - " + Global.Game.Name + " - " + Path.GetFileName(Global.MovieSession.Movie.Filename);
|
||||
Text = DisplayNameForSystem(Global.Game.System) + " - " + Global.Game.Name + " - " + Path.GetFileName(GlobalWinF.MovieSession.Movie.Filename);
|
||||
PlayRecordStatus.Image = Properties.Resources.RecordHS;
|
||||
PlayRecordStatus.ToolTipText = "Movie is in record mode";
|
||||
PlayRecordStatus.Visible = true;
|
||||
}
|
||||
else if (!Global.MovieSession.Movie.IsActive)
|
||||
else if (!GlobalWinF.MovieSession.Movie.IsActive)
|
||||
{
|
||||
Text = DisplayNameForSystem(Global.Game.System) + " - " + Global.Game.Name;
|
||||
PlayRecordStatus.Image = Properties.Resources.Blank;
|
||||
|
@ -90,10 +92,10 @@ namespace BizHawk.MultiClient
|
|||
public void RecordMovie()
|
||||
{
|
||||
// put any BEETA quality cores here
|
||||
if (Global.Emulator is Emulation.Consoles.Nintendo.GBA.GBA ||
|
||||
Global.Emulator is Emulation.Consoles.Sega.Genesis ||
|
||||
Global.Emulator is Emulation.Consoles.Sega.Saturn.Yabause ||
|
||||
Global.Emulator is Emulation.Consoles.Sony.PSP.PSP)
|
||||
if (GlobalWinF.Emulator is Emulation.Consoles.Nintendo.GBA.GBA ||
|
||||
GlobalWinF.Emulator is Emulation.Consoles.Sega.Genesis ||
|
||||
GlobalWinF.Emulator is Emulation.Consoles.Sega.Saturn.Yabause ||
|
||||
GlobalWinF.Emulator is Emulation.Consoles.Sony.PSP.PSP)
|
||||
{
|
||||
var result = MessageBox.Show
|
||||
(this, "Thanks for using Bizhawk! The emulation core you have selected " +
|
||||
|
@ -108,44 +110,44 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public void PlayMovieFromBeginning()
|
||||
{
|
||||
if (Global.MovieSession.Movie.IsActive)
|
||||
if (GlobalWinF.MovieSession.Movie.IsActive)
|
||||
{
|
||||
LoadRom(CurrentlyOpenRom, true, true);
|
||||
if (Global.MovieSession.Movie.StartsFromSavestate)
|
||||
if (GlobalWinF.MovieSession.Movie.StartsFromSavestate)
|
||||
{
|
||||
LoadStateFile(Global.MovieSession.Movie.Filename, Path.GetFileName(Global.MovieSession.Movie.Filename));
|
||||
Global.Emulator.ResetFrameCounter();
|
||||
LoadStateFile(GlobalWinF.MovieSession.Movie.Filename, Path.GetFileName(GlobalWinF.MovieSession.Movie.Filename));
|
||||
GlobalWinF.Emulator.ResetFrameCounter();
|
||||
}
|
||||
Global.MovieSession.Movie.StartPlayback();
|
||||
GlobalWinF.MovieSession.Movie.StartPlayback();
|
||||
SetMainformMovieInfo();
|
||||
Global.OSD.AddMessage("Replaying movie file in read-only mode");
|
||||
Global.MainForm.ReadOnly = true;
|
||||
GlobalWinF.OSD.AddMessage("Replaying movie file in read-only mode");
|
||||
GlobalWinF.MainForm.ReadOnly = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void StopMovie(bool abortchanges = false)
|
||||
{
|
||||
string message = "Movie ";
|
||||
if (Global.MovieSession.Movie.IsRecording)
|
||||
if (GlobalWinF.MovieSession.Movie.IsRecording)
|
||||
{
|
||||
message += "recording ";
|
||||
}
|
||||
else if (Global.MovieSession.Movie.IsPlaying)
|
||||
else if (GlobalWinF.MovieSession.Movie.IsPlaying)
|
||||
{
|
||||
message += "playback ";
|
||||
}
|
||||
|
||||
message += "stopped.";
|
||||
|
||||
if (Global.MovieSession.Movie.IsActive)
|
||||
if (GlobalWinF.MovieSession.Movie.IsActive)
|
||||
{
|
||||
Global.MovieSession.Movie.Stop(abortchanges);
|
||||
GlobalWinF.MovieSession.Movie.Stop(abortchanges);
|
||||
if (!abortchanges)
|
||||
{
|
||||
Global.OSD.AddMessage(Path.GetFileName(Global.MovieSession.Movie.Filename) + " written to disk.");
|
||||
GlobalWinF.OSD.AddMessage(Path.GetFileName(GlobalWinF.MovieSession.Movie.Filename) + " written to disk.");
|
||||
}
|
||||
Global.OSD.AddMessage(message);
|
||||
Global.MainForm.ReadOnly = true;
|
||||
GlobalWinF.OSD.AddMessage(message);
|
||||
GlobalWinF.MainForm.ReadOnly = true;
|
||||
SetMainformMovieInfo();
|
||||
}
|
||||
}
|
||||
|
@ -161,44 +163,44 @@ namespace BizHawk.MultiClient
|
|||
private bool HandleMovieLoadState(StreamReader reader)
|
||||
{
|
||||
//Note, some of the situations in these IF's may be identical and could be combined but I intentionally separated it out for clarity
|
||||
if (!Global.MovieSession.Movie.IsActive)
|
||||
if (!GlobalWinF.MovieSession.Movie.IsActive)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
else if (Global.MovieSession.Movie.IsRecording)
|
||||
else if (GlobalWinF.MovieSession.Movie.IsRecording)
|
||||
{
|
||||
|
||||
if (ReadOnly)
|
||||
{
|
||||
if (!Global.MovieSession.Movie.CheckTimeLines(reader, false))
|
||||
if (!GlobalWinF.MovieSession.Movie.CheckTimeLines(reader, false))
|
||||
{
|
||||
return false; //Timeline/GUID error
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.MovieSession.Movie.WriteMovie();
|
||||
Global.MovieSession.Movie.SwitchToPlay();
|
||||
GlobalWinF.MovieSession.Movie.WriteMovie();
|
||||
GlobalWinF.MovieSession.Movie.SwitchToPlay();
|
||||
SetMainformMovieInfo();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Global.MovieSession.Movie.CheckTimeLines(reader, true))
|
||||
if (!GlobalWinF.MovieSession.Movie.CheckTimeLines(reader, true))
|
||||
{
|
||||
return false; //GUID Error
|
||||
}
|
||||
reader.BaseStream.Position = 0;
|
||||
reader.DiscardBufferedData();
|
||||
Global.MovieSession.Movie.LoadLogFromSavestateText(reader);
|
||||
GlobalWinF.MovieSession.Movie.LoadLogFromSavestateText(reader);
|
||||
}
|
||||
}
|
||||
|
||||
else if (Global.MovieSession.Movie.IsPlaying && !Global.MovieSession.Movie.IsFinished)
|
||||
else if (GlobalWinF.MovieSession.Movie.IsPlaying && !GlobalWinF.MovieSession.Movie.IsFinished)
|
||||
{
|
||||
if (ReadOnly)
|
||||
{
|
||||
if (!Global.MovieSession.Movie.CheckTimeLines(reader, false))
|
||||
if (!GlobalWinF.MovieSession.Movie.CheckTimeLines(reader, false))
|
||||
{
|
||||
return false; //Timeline/GUID error
|
||||
}
|
||||
|
@ -206,33 +208,33 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!Global.MovieSession.Movie.CheckTimeLines(reader, true))
|
||||
if (!GlobalWinF.MovieSession.Movie.CheckTimeLines(reader, true))
|
||||
{
|
||||
return false; //GUID Error
|
||||
}
|
||||
Global.MovieSession.Movie.SwitchToRecord();
|
||||
GlobalWinF.MovieSession.Movie.SwitchToRecord();
|
||||
SetMainformMovieInfo();
|
||||
reader.BaseStream.Position = 0;
|
||||
reader.DiscardBufferedData();
|
||||
Global.MovieSession.Movie.LoadLogFromSavestateText(reader);
|
||||
GlobalWinF.MovieSession.Movie.LoadLogFromSavestateText(reader);
|
||||
}
|
||||
}
|
||||
else if (Global.MovieSession.Movie.IsFinished)
|
||||
else if (GlobalWinF.MovieSession.Movie.IsFinished)
|
||||
{
|
||||
if (ReadOnly)
|
||||
{
|
||||
{
|
||||
if (!Global.MovieSession.Movie.CheckTimeLines(reader, false))
|
||||
if (!GlobalWinF.MovieSession.Movie.CheckTimeLines(reader, false))
|
||||
{
|
||||
return false; //Timeline/GUID error
|
||||
}
|
||||
else if (Global.MovieSession.Movie.IsFinished) //TimeLine check can change a movie to finished, hence the check here (not a good design)
|
||||
else if (GlobalWinF.MovieSession.Movie.IsFinished) //TimeLine check can change a movie to finished, hence the check here (not a good design)
|
||||
{
|
||||
Global.MovieSession.LatchInputFromPlayer(Global.MovieInputSourceAdapter);
|
||||
GlobalWinF.MovieSession.LatchInputFromPlayer(GlobalWinF.MovieInputSourceAdapter);
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.MovieSession.Movie.SwitchToPlay();
|
||||
GlobalWinF.MovieSession.Movie.SwitchToPlay();
|
||||
SetMainformMovieInfo();
|
||||
}
|
||||
}
|
||||
|
@ -240,17 +242,17 @@ namespace BizHawk.MultiClient
|
|||
else
|
||||
{
|
||||
{
|
||||
if (!Global.MovieSession.Movie.CheckTimeLines(reader, true))
|
||||
if (!GlobalWinF.MovieSession.Movie.CheckTimeLines(reader, true))
|
||||
{
|
||||
return false; //GUID Error
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.MovieSession.Movie.StartRecording();
|
||||
GlobalWinF.MovieSession.Movie.StartRecording();
|
||||
SetMainformMovieInfo();
|
||||
reader.BaseStream.Position = 0;
|
||||
reader.DiscardBufferedData();
|
||||
Global.MovieSession.Movie.LoadLogFromSavestateText(reader);
|
||||
GlobalWinF.MovieSession.Movie.LoadLogFromSavestateText(reader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -260,98 +262,98 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void HandleMovieSaveState(StreamWriter writer)
|
||||
{
|
||||
if (Global.MovieSession.Movie.IsActive)
|
||||
if (GlobalWinF.MovieSession.Movie.IsActive)
|
||||
{
|
||||
Global.MovieSession.Movie.DumpLogIntoSavestateText(writer);
|
||||
GlobalWinF.MovieSession.Movie.DumpLogIntoSavestateText(writer);
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleMovieOnFrameLoop()
|
||||
{
|
||||
if (!Global.MovieSession.Movie.IsActive)
|
||||
if (!GlobalWinF.MovieSession.Movie.IsActive)
|
||||
{
|
||||
Global.MovieSession.LatchInputFromPlayer(Global.MovieInputSourceAdapter);
|
||||
GlobalWinF.MovieSession.LatchInputFromPlayer(GlobalWinF.MovieInputSourceAdapter);
|
||||
}
|
||||
|
||||
else if (Global.MovieSession.Movie.IsFinished)
|
||||
else if (GlobalWinF.MovieSession.Movie.IsFinished)
|
||||
{
|
||||
if (Global.Emulator.Frame < Global.MovieSession.Movie.Frames) //This scenario can happen from rewinding (suddenly we are back in the movie, so hook back up to the movie
|
||||
if (GlobalWinF.Emulator.Frame < GlobalWinF.MovieSession.Movie.Frames) //This scenario can happen from rewinding (suddenly we are back in the movie, so hook back up to the movie
|
||||
{
|
||||
Global.MovieSession.Movie.SwitchToPlay();
|
||||
Global.MovieSession.LatchInputFromLog();
|
||||
GlobalWinF.MovieSession.Movie.SwitchToPlay();
|
||||
GlobalWinF.MovieSession.LatchInputFromLog();
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.MovieSession.LatchInputFromPlayer(Global.MovieInputSourceAdapter);
|
||||
GlobalWinF.MovieSession.LatchInputFromPlayer(GlobalWinF.MovieInputSourceAdapter);
|
||||
}
|
||||
}
|
||||
|
||||
else if (Global.MovieSession.Movie.IsPlaying)
|
||||
else if (GlobalWinF.MovieSession.Movie.IsPlaying)
|
||||
{
|
||||
if (Global.Emulator.Frame >= Global.MovieSession.Movie.Frames)
|
||||
if (GlobalWinF.Emulator.Frame >= GlobalWinF.MovieSession.Movie.Frames)
|
||||
{
|
||||
if (TAStudio1.IsHandleCreated && !TAStudio1.IsDisposed)
|
||||
{
|
||||
Global.MovieSession.Movie.CaptureState();
|
||||
Global.MovieSession.LatchInputFromLog();
|
||||
Global.MovieSession.Movie.CommitFrame(Global.Emulator.Frame, Global.MovieOutputHardpoint);
|
||||
GlobalWinF.MovieSession.Movie.CaptureState();
|
||||
GlobalWinF.MovieSession.LatchInputFromLog();
|
||||
GlobalWinF.MovieSession.Movie.CommitFrame(GlobalWinF.Emulator.Frame, GlobalWinF.MovieOutputHardpoint);
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.MovieSession.Movie.Finish();
|
||||
GlobalWinF.MovieSession.Movie.Finish();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.MovieSession.Movie.CaptureState();
|
||||
Global.MovieSession.LatchInputFromLog();
|
||||
if (Global.ClientControls["ClearFrame"])
|
||||
GlobalWinF.MovieSession.Movie.CaptureState();
|
||||
GlobalWinF.MovieSession.LatchInputFromLog();
|
||||
if (GlobalWinF.ClientControls["ClearFrame"])
|
||||
{
|
||||
Global.MovieSession.LatchInputFromPlayer(Global.MovieInputSourceAdapter);
|
||||
GlobalWinF.MovieSession.LatchInputFromPlayer(GlobalWinF.MovieInputSourceAdapter);
|
||||
ClearFrame();
|
||||
}
|
||||
else if (TAStudio1.IsHandleCreated && !TAStudio1.IsDisposed || Global.Config.MoviePlaybackPokeMode)
|
||||
{
|
||||
Global.MovieSession.LatchInputFromPlayer(Global.MovieInputSourceAdapter);
|
||||
GlobalWinF.MovieSession.LatchInputFromPlayer(GlobalWinF.MovieInputSourceAdapter);
|
||||
MnemonicsGenerator mg = new MnemonicsGenerator();
|
||||
mg.SetSource( Global.MovieOutputHardpoint);
|
||||
mg.SetSource( GlobalWinF.MovieOutputHardpoint);
|
||||
if (!mg.IsEmpty)
|
||||
{
|
||||
Global.MovieSession.LatchInputFromPlayer(Global.MovieInputSourceAdapter);
|
||||
Global.MovieSession.Movie.PokeFrame(Global.Emulator.Frame, mg.GetControllersAsMnemonic());
|
||||
GlobalWinF.MovieSession.LatchInputFromPlayer(GlobalWinF.MovieInputSourceAdapter);
|
||||
GlobalWinF.MovieSession.Movie.PokeFrame(GlobalWinF.Emulator.Frame, mg.GetControllersAsMnemonic());
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.MovieSession.LatchInputFromLog();
|
||||
GlobalWinF.MovieSession.LatchInputFromLog();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (Global.MovieSession.Movie.IsRecording)
|
||||
else if (GlobalWinF.MovieSession.Movie.IsRecording)
|
||||
{
|
||||
Global.MovieSession.Movie.CaptureState();
|
||||
if (Global.MovieSession.MultiTrack.IsActive)
|
||||
GlobalWinF.MovieSession.Movie.CaptureState();
|
||||
if (GlobalWinF.MovieSession.MultiTrack.IsActive)
|
||||
{
|
||||
Global.MovieSession.LatchMultitrackPlayerInput(Global.MovieInputSourceAdapter, Global.MultitrackRewiringControllerAdapter);
|
||||
GlobalWinF.MovieSession.LatchMultitrackPlayerInput(GlobalWinF.MovieInputSourceAdapter, GlobalWinF.MultitrackRewiringControllerAdapter);
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.MovieSession.LatchInputFromPlayer(Global.MovieInputSourceAdapter);
|
||||
GlobalWinF.MovieSession.LatchInputFromPlayer(GlobalWinF.MovieInputSourceAdapter);
|
||||
}
|
||||
//the movie session makes sure that the correct input has been read and merged to its MovieControllerAdapter;
|
||||
//this has been wired to Global.MovieOutputHardpoint in RewireInputChain
|
||||
Global.MovieSession.Movie.CommitFrame(Global.Emulator.Frame, Global.MovieOutputHardpoint);
|
||||
GlobalWinF.MovieSession.Movie.CommitFrame(GlobalWinF.Emulator.Frame, GlobalWinF.MovieOutputHardpoint);
|
||||
}
|
||||
}
|
||||
|
||||
//On movie load, these need to be set based on the contents of the movie file
|
||||
private void SetSyncDependentSettings()
|
||||
{
|
||||
switch (Global.Emulator.SystemId)
|
||||
switch (GlobalWinF.Emulator.SystemId)
|
||||
{
|
||||
case "Coleco":
|
||||
string str = Global.MovieSession.Movie.Header.GetHeaderLine(MovieHeader.SKIPBIOS);
|
||||
string str = GlobalWinF.MovieSession.Movie.Header.GetHeaderLine(MovieHeader.SKIPBIOS);
|
||||
if (!String.IsNullOrWhiteSpace(str))
|
||||
{
|
||||
if (str.ToLower() == "true")
|
||||
|
|
|
@ -4,6 +4,8 @@ using System.Threading;
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class MainForm
|
||||
|
@ -388,9 +390,9 @@ namespace BizHawk.MultiClient
|
|||
|
||||
|
||||
//log a frame
|
||||
if (LastState != null && Global.Emulator.Frame % RewindFrequency == 0)
|
||||
if (LastState != null && GlobalWinF.Emulator.Frame % RewindFrequency == 0)
|
||||
{
|
||||
byte[] CurrentState = Global.Emulator.SaveStateBinary();
|
||||
byte[] CurrentState = GlobalWinF.Emulator.SaveStateBinary();
|
||||
RewindThread.Capture(CurrentState);
|
||||
}
|
||||
}
|
||||
|
@ -399,12 +401,12 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (RewindActive != enabled)
|
||||
{
|
||||
Global.OSD.AddMessage("Rewind " + (enabled ? "Enabled" : "Disabled"));
|
||||
GlobalWinF.OSD.AddMessage("Rewind " + (enabled ? "Enabled" : "Disabled"));
|
||||
}
|
||||
|
||||
if (RewindFrequency != frequency && enabled)
|
||||
{
|
||||
Global.OSD.AddMessage("Rewind frequency set to " + frequency);
|
||||
GlobalWinF.OSD.AddMessage("Rewind frequency set to " + frequency);
|
||||
}
|
||||
|
||||
RewindActive = enabled;
|
||||
|
@ -417,7 +419,7 @@ namespace BizHawk.MultiClient
|
|||
public void DoRewindSettings()
|
||||
{
|
||||
// This is the first frame. Capture the state, and put it in LastState for future deltas to be compared against.
|
||||
LastState = Global.Emulator.SaveStateBinary();
|
||||
LastState = GlobalWinF.Emulator.SaveStateBinary();
|
||||
|
||||
int state_size = 0;
|
||||
if (LastState.Length >= Global.Config.Rewind_LargeStateSize)
|
||||
|
@ -570,7 +572,7 @@ namespace BizHawk.MultiClient
|
|||
bool fullstate = reader.ReadBoolean();
|
||||
if (fullstate)
|
||||
{
|
||||
Global.Emulator.LoadStateBinary(reader);
|
||||
GlobalWinF.Emulator.LoadStateBinary(reader);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -588,7 +590,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
reader.Close();
|
||||
output.Position = 0;
|
||||
Global.Emulator.LoadStateBinary(new BinaryReader(output));
|
||||
GlobalWinF.Emulator.LoadStateBinary(new BinaryReader(output));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -601,7 +603,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
for (int i = 0; i < frames; i++)
|
||||
{
|
||||
if (RewindBuf.Count == 0 || (Global.MovieSession.Movie.Loaded && 0 == Global.MovieSession.Movie.Frames))
|
||||
if (RewindBuf.Count == 0 || (GlobalWinF.MovieSession.Movie.Loaded && 0 == GlobalWinF.MovieSession.Movie.Frames))
|
||||
return;
|
||||
|
||||
if (LastState.Length < 0x10000)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -12,6 +12,8 @@ using Microsoft.VisualBasic.ApplicationServices;
|
|||
|
||||
#pragma warning disable 618
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
static class Program
|
||||
|
@ -67,13 +69,13 @@ namespace BizHawk.MultiClient
|
|||
Global.Config.ResolveDefaults();
|
||||
|
||||
#if WINDOWS
|
||||
try { Global.DSound = SoundEnumeration.Create(); }
|
||||
try { GlobalWinF.DSound = SoundEnumeration.Create(); }
|
||||
catch
|
||||
{
|
||||
MessageBox.Show("Couldn't initialize DirectSound! Things may go poorly for you. Try changing your sound driver to 41khz instead of 48khz in mmsys.cpl.", "Initialization Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
|
||||
try { Global.Direct3D = new Direct3D(); }
|
||||
try { GlobalWinF.Direct3D = new Direct3D(); }
|
||||
catch
|
||||
{
|
||||
//fallback to GDI rendering
|
||||
|
@ -122,10 +124,10 @@ namespace BizHawk.MultiClient
|
|||
#if WINDOWS
|
||||
finally
|
||||
{
|
||||
if (Global.DSound != null && Global.DSound.Disposed == false)
|
||||
Global.DSound.Dispose();
|
||||
if (Global.Direct3D != null && Global.Direct3D.Disposed == false)
|
||||
Global.Direct3D.Dispose();
|
||||
if (GlobalWinF.DSound != null && GlobalWinF.DSound.Disposed == false)
|
||||
GlobalWinF.DSound.Dispose();
|
||||
if (GlobalWinF.Direct3D != null && GlobalWinF.Direct3D.Disposed == false)
|
||||
GlobalWinF.Direct3D.Dispose();
|
||||
GamePad.CloseAll();
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -10,6 +10,8 @@ using SlimDX;
|
|||
using SlimDX.Direct3D9;
|
||||
using d3d9font=SlimDX.Direct3D9.Font;
|
||||
#endif
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
using BizHawk.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
|
@ -346,13 +348,13 @@ namespace BizHawk.MultiClient
|
|||
d3d = direct3D;
|
||||
backingControl = control;
|
||||
control.MouseDoubleClick += (o, e) => HandleFullscreenToggle(o, e);
|
||||
control.MouseClick += (o, e) => Global.MainForm.MainForm_MouseClick(o, e);
|
||||
control.MouseClick += (o, e) => GlobalWinF.MainForm.MainForm_MouseClick(o, e);
|
||||
}
|
||||
|
||||
private void HandleFullscreenToggle(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
Global.MainForm.ToggleFullscreen();
|
||||
GlobalWinF.MainForm.ToggleFullscreen();
|
||||
}
|
||||
|
||||
private void DestroyDevice()
|
||||
|
@ -390,7 +392,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
get
|
||||
{
|
||||
if (Global.ForceNoThrottle)
|
||||
if (GlobalWinF.ForceNoThrottle)
|
||||
return false;
|
||||
return Global.Config.VSyncThrottle || Global.Config.VSync;
|
||||
}
|
||||
|
@ -461,13 +463,13 @@ namespace BizHawk.MultiClient
|
|||
// Wait until device is available or user gets annoyed and closes app
|
||||
Result r;
|
||||
// it can take a while for the device to be ready again, so avoid sound looping during the wait
|
||||
if (Global.Sound != null) Global.Sound.StopSound();
|
||||
if (GlobalWinF.Sound != null) GlobalWinF.Sound.StopSound();
|
||||
do
|
||||
{
|
||||
r = _device.TestCooperativeLevel();
|
||||
Thread.Sleep(100);
|
||||
} while (r == ResultCode.DeviceLost);
|
||||
if (Global.Sound != null) Global.Sound.StartSound();
|
||||
if (GlobalWinF.Sound != null) GlobalWinF.Sound.StartSound();
|
||||
|
||||
// lets try recovery!
|
||||
DestroyDevice();
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
using System.IO;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
class SavestateManager
|
||||
|
@ -14,7 +16,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public void Update()
|
||||
{
|
||||
if (Global.Game == null || Global.Emulator == null)
|
||||
if (Global.Game == null || GlobalWinF.Emulator == null)
|
||||
{
|
||||
for (int x = 0; x < 10; x++)
|
||||
slots[x] = false;
|
||||
|
|
|
@ -6,6 +6,8 @@ using SlimDX.DirectSound;
|
|||
using SlimDX.Multimedia;
|
||||
#endif
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
#if WINDOWS
|
||||
|
@ -135,7 +137,7 @@ namespace BizHawk.MultiClient
|
|||
syncsoundProvider = null;
|
||||
asyncsoundProvider = source;
|
||||
semisync.BaseSoundProvider = source;
|
||||
semisync.RecalculateMagic(Global.CoreComm.VsyncRate);
|
||||
semisync.RecalculateMagic(GlobalWinF.CoreComm.VsyncRate);
|
||||
}
|
||||
|
||||
static int circularDist(int from, int to, int size)
|
||||
|
@ -206,7 +208,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
samplesProvided = 2 * nsampgot;
|
||||
|
||||
if (!Global.ForceNoThrottle)
|
||||
if (!GlobalWinF.ForceNoThrottle)
|
||||
while (samplesNeeded < samplesProvided)
|
||||
{
|
||||
System.Threading.Thread.Sleep((samplesProvided - samplesNeeded) / 88); // let audio clock control sleep time
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
//this throttle is nitsuja's fine-tuned techniques from desmume
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
|
@ -23,7 +25,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
get
|
||||
{
|
||||
if (Global.ClientControls["MaxTurbo"])
|
||||
if (GlobalWinF.ClientControls["MaxTurbo"])
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
|
@ -37,7 +39,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
get
|
||||
{
|
||||
if (Global.ClientControls["MaxTurbo"])
|
||||
if (GlobalWinF.ClientControls["MaxTurbo"])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -52,7 +54,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
get
|
||||
{
|
||||
if (Global.ClientControls["MaxTurbo"])
|
||||
if (GlobalWinF.ClientControls["MaxTurbo"])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class AutofireConfig : Form
|
||||
|
@ -37,18 +39,18 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void Ok_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.AutoFireController.On = Global.Config.AutofireOn = (int)OnNumeric.Value;
|
||||
Global.AutoFireController.Off = Global.Config.AutofireOff = (int)OffNumeric.Value;
|
||||
GlobalWinF.AutoFireController.On = Global.Config.AutofireOn = (int)OnNumeric.Value;
|
||||
GlobalWinF.AutoFireController.Off = Global.Config.AutofireOff = (int)OffNumeric.Value;
|
||||
Global.Config.AutofireLagFrames = LagFrameCheck.Checked;
|
||||
Global.AutofireStickyXORAdapter.SetOnOffPatternFromConfig();
|
||||
GlobalWinF.AutofireStickyXORAdapter.SetOnOffPatternFromConfig();
|
||||
|
||||
Global.OSD.AddMessage("Autofire settings saved");
|
||||
GlobalWinF.OSD.AddMessage("Autofire settings saved");
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.OSD.AddMessage("Autofire config aborted");
|
||||
GlobalWinF.OSD.AddMessage("Autofire config aborted");
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@ using System.Drawing;
|
|||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class ControllerConfig : Form
|
||||
|
@ -51,7 +53,7 @@ namespace BizHawk.MultiClient
|
|||
return cp;
|
||||
}
|
||||
|
||||
Control CreateAnalogPanel(Dictionary<string, Config.AnalogBind> settings, List<string> buttons, Size size)
|
||||
Control CreateAnalogPanel(Dictionary<string, BizHawk.Client.Core.Config.AnalogBind> settings, List<string> buttons, Size size)
|
||||
{
|
||||
var acp = new AnalogBindPanel(settings, buttons) { Dock = DockStyle.Fill };
|
||||
return acp;
|
||||
|
@ -115,7 +117,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
if (buckets[0].Count > 0)
|
||||
{
|
||||
if (Global.Emulator.SystemId == "C64") //This is a kludge, if there starts to be more exceptions to this pattern, we will need a more robust solution
|
||||
if (GlobalWinF.Emulator.SystemId == "C64") //This is a kludge, if there starts to be more exceptions to this pattern, we will need a more robust solution
|
||||
{
|
||||
tt.TabPages.Add("Keyboard");
|
||||
}
|
||||
|
@ -153,7 +155,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void LoadPanels(Dictionary<string, Dictionary<string, string>> normal,
|
||||
Dictionary<string, Dictionary<string, string>> autofire,
|
||||
Dictionary<string, Dictionary<string, Config.AnalogBind>> analog)
|
||||
Dictionary<string, Dictionary<string, BizHawk.Client.Core.Config.AnalogBind>> analog)
|
||||
{
|
||||
LoadToPanel(tabPage1, the_definition.Name, the_definition.BoolButtons, normal, "", CreateNormalPanel);
|
||||
LoadToPanel(tabPage2, the_definition.Name, the_definition.BoolButtons, autofire, "", CreateNormalPanel);
|
||||
|
@ -170,7 +172,7 @@ namespace BizHawk.MultiClient
|
|||
LoadPanels(cd.AllTrollers, cd.AllTrollersAutoFire, cd.AllTrollersAnalog);
|
||||
}
|
||||
|
||||
private void LoadPanels(Config c)
|
||||
private void LoadPanels(BizHawk.Client.Core.Config c)
|
||||
{
|
||||
LoadPanels(c.AllTrollers, c.AllTrollersAutoFire, c.AllTrollersAnalog);
|
||||
}
|
||||
|
@ -257,14 +259,14 @@ namespace BizHawk.MultiClient
|
|||
|
||||
Save();
|
||||
|
||||
Global.OSD.AddMessage("Controller settings saved");
|
||||
GlobalWinF.OSD.AddMessage("Controller settings saved");
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void buttonCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.OSD.AddMessage("Controller config aborted");
|
||||
GlobalWinF.OSD.AddMessage("Controller config aborted");
|
||||
Close();
|
||||
}
|
||||
|
||||
|
@ -356,10 +358,10 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
public Dictionary<string, Dictionary<string, string>> AllTrollers = new Dictionary<string, Dictionary<string, string>>();
|
||||
public Dictionary<string, Dictionary<string, string>> AllTrollersAutoFire = new Dictionary<string, Dictionary<string, string>>();
|
||||
public Dictionary<string, Dictionary<string, Config.AnalogBind>> AllTrollersAnalog = new Dictionary<string, Dictionary<string, Config.AnalogBind>>();
|
||||
public Dictionary<string, Dictionary<string, BizHawk.Client.Core.Config.AnalogBind>> AllTrollersAnalog = new Dictionary<string, Dictionary<string, BizHawk.Client.Core.Config.AnalogBind>>();
|
||||
}
|
||||
|
||||
public static void ConfigCheckAllControlDefaults(Config c)
|
||||
public static void ConfigCheckAllControlDefaults(BizHawk.Client.Core.Config c)
|
||||
{
|
||||
if (c.AllTrollers.Count == 0 && c.AllTrollersAutoFire.Count == 0 && c.AllTrollersAnalog.Count == 0)
|
||||
{
|
||||
|
@ -380,7 +382,7 @@ namespace BizHawk.MultiClient
|
|||
cd = ConfigService.Load(ControlDefaultPath, cd);
|
||||
cd.AllTrollers[the_definition.Name] = new Dictionary<string, string>();
|
||||
cd.AllTrollersAutoFire[the_definition.Name] = new Dictionary<string, string>();
|
||||
cd.AllTrollersAnalog[the_definition.Name] = new Dictionary<string, Config.AnalogBind>();
|
||||
cd.AllTrollersAnalog[the_definition.Name] = new Dictionary<string, BizHawk.Client.Core.Config.AnalogBind>();
|
||||
|
||||
SaveToDefaults(cd);
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class AnalogBindControl : UserControl
|
||||
|
@ -17,10 +19,10 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
|
||||
public string ButtonName;
|
||||
public Config.AnalogBind Bind;
|
||||
public BizHawk.Client.Core.Config.AnalogBind Bind;
|
||||
bool listening = false;
|
||||
|
||||
public AnalogBindControl(string ButtonName, Config.AnalogBind Bind)
|
||||
public AnalogBindControl(string ButtonName, BizHawk.Client.Core.Config.AnalogBind Bind)
|
||||
: this()
|
||||
{
|
||||
this.Bind = Bind;
|
||||
|
|
|
@ -5,13 +5,15 @@ using System.Text;
|
|||
using System.Windows.Forms;
|
||||
using System.Drawing;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
class AnalogBindPanel : UserControl
|
||||
{
|
||||
Dictionary<string, Config.AnalogBind> RealConfigObject;
|
||||
Dictionary<string, BizHawk.Client.Core.Config.AnalogBind> RealConfigObject;
|
||||
|
||||
public AnalogBindPanel(Dictionary<string, Config.AnalogBind> RealConfigObject, List<string> RealConfigButtons = null)
|
||||
public AnalogBindPanel(Dictionary<string, BizHawk.Client.Core.Config.AnalogBind> RealConfigObject, List<string> RealConfigButtons = null)
|
||||
:base()
|
||||
{
|
||||
this.RealConfigObject = RealConfigObject;
|
||||
|
@ -38,7 +40,7 @@ namespace BizHawk.MultiClient
|
|||
/// save to config
|
||||
/// </summary>
|
||||
/// <param name="SaveConfigObject">if non-null, save to possibly different config object than originally initialized from</param>
|
||||
public void Save(Dictionary<string, Config.AnalogBind> SaveConfigObject = null)
|
||||
public void Save(Dictionary<string, BizHawk.Client.Core.Config.AnalogBind> SaveConfigObject = null)
|
||||
{
|
||||
var saveto = SaveConfigObject ?? RealConfigObject;
|
||||
foreach (Control c in Controls)
|
||||
|
|
|
@ -9,6 +9,8 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
//notes: eventually, we intend to have a "firmware acquisition interface" exposed to the emulator cores.
|
||||
//it will be implemented by the multiclient, and use firmware keys to fetch the firmware content.
|
||||
//however, for now, the cores are using strings from the config class. so we have the `configMember` which is
|
||||
|
@ -175,7 +177,7 @@ namespace BizHawk.MultiClient
|
|||
DoScan();
|
||||
}
|
||||
|
||||
FirmwareManager Manager { get { return Global.MainForm.FirmwareManager; } }
|
||||
FirmwareManager Manager { get { return GlobalWinF.MainForm.FirmwareManager; } }
|
||||
|
||||
private void DoScan()
|
||||
{
|
||||
|
|
|
@ -7,6 +7,8 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class GifAnimator : Form
|
||||
|
|
|
@ -7,6 +7,8 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class HotkeyConfig : Form
|
||||
|
@ -31,14 +33,14 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void IDB_CANCEL_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.OSD.AddMessage("Hotkey config aborted");
|
||||
GlobalWinF.OSD.AddMessage("Hotkey config aborted");
|
||||
Close();
|
||||
}
|
||||
|
||||
private void IDB_SAVE_Click(object sender, EventArgs e)
|
||||
{
|
||||
Save();
|
||||
Global.OSD.AddMessage("Hotkey settings saved");
|
||||
GlobalWinF.OSD.AddMessage("Hotkey settings saved");
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
@ -59,7 +61,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
foreach (InputWidget w in _inputWidgets)
|
||||
{
|
||||
Binding b = Global.Config.HotkeyBindings.FirstOrDefault(x => x.DisplayName == w.WidgetName);
|
||||
var b = Global.Config.HotkeyBindings.FirstOrDefault(x => x.DisplayName == w.WidgetName);
|
||||
b.Bindings = w.Text;
|
||||
}
|
||||
}
|
||||
|
@ -95,14 +97,14 @@ namespace BizHawk.MultiClient
|
|||
tb.Name = tab;
|
||||
tb.Text = tab;
|
||||
|
||||
List<Binding> bindings = Global.Config.HotkeyBindings.Where(x => x.TabGroup == tab).OrderBy(x => x.Ordinal).ThenBy(x => x.DisplayName).ToList();
|
||||
var bindings = Global.Config.HotkeyBindings.Where(x => x.TabGroup == tab).OrderBy(x => x.Ordinal).ThenBy(x => x.DisplayName).ToList();
|
||||
|
||||
int _x = 6;
|
||||
int _y = 14;
|
||||
int iw_offset_x = 110;
|
||||
int iw_offset_y = -4;
|
||||
int iw_width = 120;
|
||||
foreach (Binding b in bindings)
|
||||
foreach (var b in bindings)
|
||||
{
|
||||
Label l = new Label()
|
||||
{
|
||||
|
@ -139,7 +141,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
foreach (InputWidget w in _inputWidgets)
|
||||
{
|
||||
Binding b = Global.Config.HotkeyBindings.FirstOrDefault(x => x.DisplayName == w.WidgetName);
|
||||
var b = Global.Config.HotkeyBindings.FirstOrDefault(x => x.DisplayName == w.WidgetName);
|
||||
w.Text = b.DefaultBinding;
|
||||
}
|
||||
}
|
||||
|
@ -180,7 +182,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
string user_selection = SearchBox.Text;
|
||||
|
||||
Binding b = Global.Config.HotkeyBindings.FirstOrDefault(x => x.DisplayName == SearchBox.Text);
|
||||
var b = Global.Config.HotkeyBindings.FirstOrDefault(x => x.DisplayName == SearchBox.Text);
|
||||
|
||||
//Found
|
||||
if (b != null)
|
||||
|
|
|
@ -7,6 +7,8 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class MessageConfig : Form
|
||||
|
@ -68,17 +70,17 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void SetMaxXY()
|
||||
{
|
||||
XNumeric.Maximum = Global.Emulator.VideoProvider.BufferWidth - 12;
|
||||
YNumeric.Maximum = Global.Emulator.VideoProvider.BufferHeight - 12;
|
||||
PositionPanel.Size = new Size(Global.Emulator.VideoProvider.BufferWidth + 2, Global.Emulator.VideoProvider.BufferHeight + 2);
|
||||
XNumeric.Maximum = GlobalWinF.Emulator.VideoProvider.BufferWidth - 12;
|
||||
YNumeric.Maximum = GlobalWinF.Emulator.VideoProvider.BufferHeight - 12;
|
||||
PositionPanel.Size = new Size(GlobalWinF.Emulator.VideoProvider.BufferWidth + 2, GlobalWinF.Emulator.VideoProvider.BufferHeight + 2);
|
||||
|
||||
int width;
|
||||
if (Global.Emulator.VideoProvider.BufferWidth > 128)
|
||||
width = Global.Emulator.VideoProvider.BufferWidth + 44;
|
||||
if (GlobalWinF.Emulator.VideoProvider.BufferWidth > 128)
|
||||
width = GlobalWinF.Emulator.VideoProvider.BufferWidth + 44;
|
||||
else
|
||||
width = 128 + 44;
|
||||
|
||||
PositionGroupBox.Size = new Size(width, Global.Emulator.VideoProvider.BufferHeight + 52);
|
||||
PositionGroupBox.Size = new Size(width, GlobalWinF.Emulator.VideoProvider.BufferHeight + 52);
|
||||
}
|
||||
|
||||
private void SetColorBox()
|
||||
|
@ -227,7 +229,7 @@ namespace BizHawk.MultiClient
|
|||
private void OK_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveSettings();
|
||||
Global.OSD.AddMessage("Message settings saved");
|
||||
GlobalWinF.OSD.AddMessage("Message settings saved");
|
||||
this.Close();
|
||||
}
|
||||
|
||||
|
@ -287,7 +289,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.OSD.AddMessage("Message config aborted");
|
||||
GlobalWinF.OSD.AddMessage("Message config aborted");
|
||||
this.Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class PathConfig : Form
|
||||
|
@ -56,13 +58,13 @@ namespace BizHawk.MultiClient
|
|||
private void OK_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveSettings();
|
||||
Global.OSD.AddMessage("Path settings saved");
|
||||
GlobalWinF.OSD.AddMessage("Path settings saved");
|
||||
Close();
|
||||
}
|
||||
|
||||
private void Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.OSD.AddMessage("Path config aborted");
|
||||
GlobalWinF.OSD.AddMessage("Path config aborted");
|
||||
Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@ using System.Linq;
|
|||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public static class PathManager
|
||||
|
@ -228,9 +230,9 @@ namespace BizHawk.MultiClient
|
|||
public static string SaveRamPath(GameInfo game)
|
||||
{
|
||||
string name = FilesystemSafeName(game);
|
||||
if (Global.MovieSession.Movie.IsActive)
|
||||
if (GlobalWinF.MovieSession.Movie.IsActive)
|
||||
{
|
||||
name += "." + Path.GetFileNameWithoutExtension(Global.MovieSession.Movie.Filename);
|
||||
name += "." + Path.GetFileNameWithoutExtension(GlobalWinF.MovieSession.Movie.Filename);
|
||||
}
|
||||
|
||||
PathEntry pathEntry = Global.Config.PathEntries[game.System, "Save RAM"];
|
||||
|
@ -259,9 +261,9 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
string name = FilesystemSafeName(game);
|
||||
|
||||
if (Global.Config.BindSavestatesToMovies && Global.MovieSession.Movie.IsActive)
|
||||
if (Global.Config.BindSavestatesToMovies && GlobalWinF.MovieSession.Movie.IsActive)
|
||||
{
|
||||
name += "." + Path.GetFileNameWithoutExtension(Global.MovieSession.Movie.Filename);
|
||||
name += "." + Path.GetFileNameWithoutExtension(GlobalWinF.MovieSession.Movie.Filename);
|
||||
}
|
||||
|
||||
PathEntry pathEntry = Global.Config.PathEntries[game.System, "Savestates"];
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
using System.Windows.Forms;
|
||||
using System.Drawing;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class RewindConfig : Form
|
||||
|
@ -9,7 +11,7 @@ namespace BizHawk.MultiClient
|
|||
private long StateSize;
|
||||
private int MediumStateSize;
|
||||
private int LargeStateSize;
|
||||
private int StateSizeCategory = 1; //1 = small, 2 = med, 3 = larg //TODO: enum
|
||||
private int StateSizeCategory = 1; //1 = small, 2 = med, 3 = larg //TODO: enum
|
||||
public RewindConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
@ -17,10 +19,10 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void RewindConfig_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.MainForm.RewindBuf != null)
|
||||
if (GlobalWinF.MainForm.RewindBuf != null)
|
||||
{
|
||||
FullnessLabel.Text = String.Format("{0:0.00}", Global.MainForm.Rewind_FullnessRatio * 100) + "%";
|
||||
RewindFramesUsedLabel.Text = Global.MainForm.Rewind_Count.ToString();
|
||||
FullnessLabel.Text = String.Format("{0:0.00}", GlobalWinF.MainForm.Rewind_FullnessRatio * 100) + "%";
|
||||
RewindFramesUsedLabel.Text = GlobalWinF.MainForm.Rewind_Count.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -31,7 +33,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
DiskBufferCheckbox.Checked = Global.Config.Rewind_OnDisk;
|
||||
RewindIsThreadedCheckbox.Checked = Global.Config.Rewind_IsThreaded;
|
||||
StateSize = Global.Emulator.SaveStateBinary().Length;
|
||||
StateSize = GlobalWinF.Emulator.SaveStateBinary().Length;
|
||||
BufferSizeUpDown.Value = Global.Config.Rewind_BufferSize;
|
||||
|
||||
MediumStateSize = Global.Config.Rewind_MediumStateSize;
|
||||
|
@ -109,13 +111,13 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.OSD.AddMessage("Rewind config aborted");
|
||||
GlobalWinF.OSD.AddMessage("Rewind config aborted");
|
||||
Close();
|
||||
}
|
||||
|
||||
private void OK_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.OSD.AddMessage("Rewind settings saved");
|
||||
GlobalWinF.OSD.AddMessage("Rewind settings saved");
|
||||
|
||||
Global.Config.RewindFrequencySmall = (int)SmallSavestateNumeric.Value;
|
||||
Global.Config.RewindFrequencyMedium = (int)MediumSavestateNumeric.Value;
|
||||
|
@ -125,7 +127,7 @@ namespace BizHawk.MultiClient
|
|||
Global.Config.RewindEnabledMedium = MediumStateEnabledBox.Checked;
|
||||
Global.Config.RewindEnabledLarge = LargeStateEnabledBox.Checked;
|
||||
|
||||
Global.MainForm.DoRewindSettings();
|
||||
GlobalWinF.MainForm.DoRewindSettings();
|
||||
|
||||
Global.Config.Rewind_UseDelta = UseDeltaCompression.Checked;
|
||||
|
||||
|
@ -135,7 +137,7 @@ namespace BizHawk.MultiClient
|
|||
Global.Config.Rewind_BufferSize = (int)BufferSizeUpDown.Value;
|
||||
if (Global.Config.Rewind_IsThreaded != RewindIsThreadedCheckbox.Checked)
|
||||
{
|
||||
Global.MainForm.FlagNeedsReboot();
|
||||
GlobalWinF.MainForm.FlagNeedsReboot();
|
||||
Global.Config.Rewind_IsThreaded = RewindIsThreadedCheckbox.Checked;
|
||||
}
|
||||
|
||||
|
@ -258,13 +260,13 @@ namespace BizHawk.MultiClient
|
|||
if (UseDeltaCompression.Checked || StateSize == 0)
|
||||
{
|
||||
|
||||
if (Global.MainForm.Rewind_Count > 0)
|
||||
if (GlobalWinF.MainForm.Rewind_Count > 0)
|
||||
{
|
||||
avg_state_size = (long)(Global.MainForm.Rewind_Size / Global.MainForm.Rewind_Count);
|
||||
avg_state_size = (long)(GlobalWinF.MainForm.Rewind_Size / GlobalWinF.MainForm.Rewind_Count);
|
||||
}
|
||||
else
|
||||
{
|
||||
avg_state_size = Global.Emulator.SaveStateBinary().Length;
|
||||
avg_state_size = GlobalWinF.Emulator.SaveStateBinary().Length;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -7,6 +7,8 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class SoundConfig : Form
|
||||
|
@ -47,16 +49,16 @@ namespace BizHawk.MultiClient
|
|||
Global.Config.SoundVolume = SoundVolBar.Value;
|
||||
Global.Config.SoundThrottle = ThrottlecheckBox.Checked;
|
||||
Global.Config.SoundDevice = (string)listBoxSoundDevices.SelectedItem ?? "<default>";
|
||||
Global.Sound.ChangeVolume(Global.Config.SoundVolume);
|
||||
Global.Sound.UpdateSoundSettings();
|
||||
Global.Sound.StartSound();
|
||||
Global.OSD.AddMessage("Sound settings saved");
|
||||
GlobalWinF.Sound.ChangeVolume(Global.Config.SoundVolume);
|
||||
GlobalWinF.Sound.UpdateSoundSettings();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
GlobalWinF.OSD.AddMessage("Sound settings saved");
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.OSD.AddMessage("Sound config aborted");
|
||||
GlobalWinF.OSD.AddMessage("Sound config aborted");
|
||||
this.Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -307,7 +309,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (stickySet.Contains(button))
|
||||
{
|
||||
int a = (Global.Emulator.Frame - buttonStarts[button]) % (On + Off);
|
||||
int a = (GlobalWinF.Emulator.Frame - buttonStarts[button]) % (On + Off);
|
||||
if (a < On)
|
||||
return this[button];
|
||||
else
|
||||
|
@ -331,7 +333,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
|
||||
|
||||
int a = (Global.Emulator.Frame - buttonStarts[button]) % (On + Off);
|
||||
int a = (GlobalWinF.Emulator.Frame - buttonStarts[button]) % (On + Off);
|
||||
if (a < On)
|
||||
{
|
||||
source ^= true;
|
||||
|
|
|
@ -3,6 +3,8 @@ using System.IO;
|
|||
using System.Windows.Forms;
|
||||
using System.Globalization;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public class Movie
|
||||
|
@ -239,7 +241,7 @@ namespace BizHawk.MultiClient
|
|||
/// <param name="truncate"></param>
|
||||
public void StartRecording(bool truncate = true)
|
||||
{
|
||||
Global.MainForm.ClearSaveRAM();
|
||||
GlobalWinF.MainForm.ClearSaveRAM();
|
||||
Mode = MOVIEMODE.RECORD;
|
||||
if (Global.Config.EnableBackupMovies && MakeBackup && Log.Length > 0)
|
||||
{
|
||||
|
@ -254,7 +256,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public void StartPlayback()
|
||||
{
|
||||
Global.MainForm.ClearSaveRAM();
|
||||
GlobalWinF.MainForm.ClearSaveRAM();
|
||||
Mode = MOVIEMODE.PLAY;
|
||||
}
|
||||
|
||||
|
@ -372,7 +374,7 @@ namespace BizHawk.MultiClient
|
|||
var directory_info = new FileInfo(BackupName).Directory;
|
||||
if (directory_info != null) Directory.CreateDirectory(directory_info.FullName);
|
||||
|
||||
Global.OSD.AddMessage("Backup movie saved to " + BackupName);
|
||||
GlobalWinF.OSD.AddMessage("Backup movie saved to " + BackupName);
|
||||
if (IsText)
|
||||
{
|
||||
WriteText(BackupName);
|
||||
|
@ -563,7 +565,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (StateCapturing)
|
||||
{
|
||||
byte[] state = Global.Emulator.SaveStateBinary();
|
||||
byte[] state = GlobalWinF.Emulator.SaveStateBinary();
|
||||
Log.AddState(state);
|
||||
GC.Collect();
|
||||
}
|
||||
|
@ -575,43 +577,43 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
return;
|
||||
}
|
||||
if (frame <= Global.Emulator.Frame)
|
||||
if (frame <= GlobalWinF.Emulator.Frame)
|
||||
{
|
||||
if (frame <= Log.StateFirstIndex)
|
||||
{
|
||||
Global.Emulator.LoadStateBinary(new BinaryReader(new MemoryStream(Log.InitState)));
|
||||
if (Global.MainForm.EmulatorPaused && frame > 0)
|
||||
GlobalWinF.Emulator.LoadStateBinary(new BinaryReader(new MemoryStream(Log.InitState)));
|
||||
if (GlobalWinF.MainForm.EmulatorPaused && frame > 0)
|
||||
{
|
||||
Global.MainForm.UnpauseEmulator();
|
||||
GlobalWinF.MainForm.UnpauseEmulator();
|
||||
}
|
||||
if (MOVIEMODE.RECORD == Mode)
|
||||
{
|
||||
Mode = MOVIEMODE.PLAY;
|
||||
Global.MainForm.RestoreReadWriteOnStop = true;
|
||||
GlobalWinF.MainForm.RestoreReadWriteOnStop = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (frame == 0)
|
||||
{
|
||||
Global.Emulator.LoadStateBinary(new BinaryReader(new MemoryStream(Log.InitState)));
|
||||
GlobalWinF.Emulator.LoadStateBinary(new BinaryReader(new MemoryStream(Log.InitState)));
|
||||
}
|
||||
else
|
||||
{
|
||||
//frame-1 because we need to go back an extra frame and then run a frame, otherwise the display doesn't get updated.
|
||||
Global.Emulator.LoadStateBinary(new BinaryReader(new MemoryStream(Log.GetState(frame - 1))));
|
||||
Global.MainForm.UpdateFrame = true;
|
||||
GlobalWinF.Emulator.LoadStateBinary(new BinaryReader(new MemoryStream(Log.GetState(frame - 1))));
|
||||
GlobalWinF.MainForm.UpdateFrame = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (frame <= Log.StateLastIndex)
|
||||
{
|
||||
Global.Emulator.LoadStateBinary(new BinaryReader(new MemoryStream(Log.GetState(frame - 1))));
|
||||
Global.MainForm.UpdateFrame = true;
|
||||
GlobalWinF.Emulator.LoadStateBinary(new BinaryReader(new MemoryStream(Log.GetState(frame - 1))));
|
||||
GlobalWinF.MainForm.UpdateFrame = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.MainForm.UnpauseEmulator();
|
||||
GlobalWinF.MainForm.UnpauseEmulator();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -628,10 +630,10 @@ namespace BizHawk.MultiClient
|
|||
//this allows users to restore a movie with any savestate from that "timeline"
|
||||
if (Global.Config.VBAStyleMovieLoadState)
|
||||
{
|
||||
if (Global.Emulator.Frame < Log.Length)
|
||||
if (GlobalWinF.Emulator.Frame < Log.Length)
|
||||
{
|
||||
Log.TruncateMovie(Global.Emulator.Frame);
|
||||
Log .TruncateStates(Global.Emulator.Frame);
|
||||
Log.TruncateMovie(GlobalWinF.Emulator.Frame);
|
||||
Log .TruncateStates(GlobalWinF.Emulator.Frame);
|
||||
}
|
||||
}
|
||||
changes = true;
|
||||
|
@ -664,7 +666,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
int? stateFrame = null;
|
||||
//We are in record mode so replace the movie log with the one from the savestate
|
||||
if (!Global.MovieSession.MultiTrack.IsActive)
|
||||
if (!GlobalWinF.MovieSession.MultiTrack.IsActive)
|
||||
{
|
||||
if (Global.Config.EnableBackupMovies && MakeBackup && Log.Length > 0)
|
||||
{
|
||||
|
@ -686,7 +688,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
stateFrame = int.Parse(strs[1], NumberStyles.HexNumber);
|
||||
}
|
||||
catch { Global.OSD.AddMessage("Savestate Frame failed to parse"); } //TODO: message?
|
||||
catch { GlobalWinF.OSD.AddMessage("Savestate Frame failed to parse"); } //TODO: message?
|
||||
}
|
||||
else if (line.Contains("Frame "))
|
||||
{
|
||||
|
@ -695,7 +697,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
stateFrame = int.Parse(strs[1]);
|
||||
}
|
||||
catch { Global.OSD.AddMessage("Savestate Frame failed to parse"); } //TODO: message?
|
||||
catch { GlobalWinF.OSD.AddMessage("Savestate Frame failed to parse"); } //TODO: message?
|
||||
}
|
||||
if (line[0] == '|')
|
||||
{
|
||||
|
@ -720,7 +722,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
stateFrame = int.Parse(strs[1], NumberStyles.HexNumber);
|
||||
}
|
||||
catch { Global.OSD.AddMessage("Savestate Frame failed to parse"); } //TODO: message?
|
||||
catch { GlobalWinF.OSD.AddMessage("Savestate Frame failed to parse"); } //TODO: message?
|
||||
}
|
||||
else if (line.Contains("Frame "))
|
||||
{
|
||||
|
@ -843,7 +845,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
stateFrame = int.Parse(strs[1], NumberStyles.HexNumber);
|
||||
}
|
||||
catch { Global.OSD.AddMessage("Savestate Frame number failed to parse"); }
|
||||
catch { GlobalWinF.OSD.AddMessage("Savestate Frame number failed to parse"); }
|
||||
}
|
||||
else if (line.Contains("Frame "))
|
||||
{
|
||||
|
@ -852,7 +854,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
stateFrame = int.Parse(strs[1]);
|
||||
}
|
||||
catch { Global.OSD.AddMessage("Savestate Frame number failed to parse"); }
|
||||
catch { GlobalWinF.OSD.AddMessage("Savestate Frame number failed to parse"); }
|
||||
}
|
||||
else if (line == "[Input]") continue;
|
||||
else if (line == "[/Input]") break;
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public class MovieHeader
|
||||
|
@ -55,9 +57,9 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public MovieHeader() //All required fields will be set to default values
|
||||
{
|
||||
if (Global.MainForm != null)
|
||||
if (GlobalWinF.MainForm != null)
|
||||
{
|
||||
HeaderParams.Add(EMULATIONVERSION, Global.MainForm.GetEmuVersion());
|
||||
HeaderParams.Add(EMULATIONVERSION, GlobalWinF.MainForm.GetEmuVersion());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -4,6 +4,8 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
#pragma warning disable 219
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
|
|
|
@ -81,23 +81,23 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public void AddState(byte[] state)
|
||||
{
|
||||
if (Global.Emulator.Frame == 0)
|
||||
if (GlobalWinF.Emulator.Frame == 0)
|
||||
{
|
||||
InitState = state;
|
||||
}
|
||||
if (Global.Emulator.Frame < StateFirstIndex)
|
||||
if (GlobalWinF.Emulator.Frame < StateFirstIndex)
|
||||
{
|
||||
_state_records.Clear();
|
||||
_state_records.Add(new StateRecord(Global.Emulator.Frame, state));
|
||||
_state_records.Add(new StateRecord(GlobalWinF.Emulator.Frame, state));
|
||||
}
|
||||
if (Global.Emulator.Frame > StateLastIndex)
|
||||
if (GlobalWinF.Emulator.Frame > StateLastIndex)
|
||||
{
|
||||
if (StateSizeInBytes + state.Length > MAXSTATERECORDSIZE)
|
||||
{
|
||||
// Discard the oldest state to save space.
|
||||
_state_records.RemoveAt(0);
|
||||
}
|
||||
_state_records.Add(new StateRecord(Global.Emulator.Frame,state));
|
||||
_state_records.Add(new StateRecord(GlobalWinF.Emulator.Frame,state));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -127,12 +127,12 @@ namespace BizHawk.MultiClient
|
|||
if (frame <= StateFirstIndex)
|
||||
{
|
||||
_state_records.Clear();
|
||||
Global.MovieSession.Movie.RewindToFrame(0);
|
||||
GlobalWinF.MovieSession.Movie.RewindToFrame(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
_state_records.RemoveRange(frame - StateFirstIndex, StateLastIndex - frame + 1);
|
||||
Global.MovieSession.Movie.RewindToFrame(frame);
|
||||
GlobalWinF.MovieSession.Movie.RewindToFrame(frame);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
Index = index;
|
||||
State = state;
|
||||
Lagged = Global.Emulator.IsLagFrame;
|
||||
Lagged = GlobalWinF.Emulator.IsLagFrame;
|
||||
}
|
||||
|
||||
public readonly int Index;
|
||||
|
|
|
@ -3,6 +3,8 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public static class MnemonicConstants
|
||||
|
@ -225,7 +227,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
get
|
||||
{
|
||||
switch (Global.Emulator.SystemId)
|
||||
switch (GlobalWinF.Emulator.SystemId)
|
||||
{
|
||||
default:
|
||||
case "NULL":
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
/// </summary>
|
||||
public void LatchInputFromLog()
|
||||
{
|
||||
string loggedFrame = Movie.GetInput(Global.Emulator.Frame);
|
||||
string loggedFrame = Movie.GetInput(GlobalWinF.Emulator.Frame);
|
||||
MovieControllerAdapter.SetControllersAsMnemonic(loggedFrame);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@ using System.Text;
|
|||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class PlayMovie : Form
|
||||
|
@ -65,12 +67,12 @@ namespace BizHawk.MultiClient
|
|||
//Import file if necessary
|
||||
|
||||
|
||||
Global.MainForm.StartNewMovie(MovieList[MovieView.SelectedIndices[0]], false);
|
||||
GlobalWinF.MainForm.StartNewMovie(MovieList[MovieView.SelectedIndices[0]], false);
|
||||
}
|
||||
|
||||
private void OK_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.ReadOnly = ReadOnlyCheckBox.Checked;
|
||||
GlobalWinF.MainForm.ReadOnly = ReadOnlyCheckBox.Checked;
|
||||
Run();
|
||||
Close();
|
||||
}
|
||||
|
@ -81,9 +83,9 @@ namespace BizHawk.MultiClient
|
|||
string filter = "Movie Files (*." + Global.Config.MovieExtension + ")|*." + Global.Config.MovieExtension + "|Savestates|*.state|All Files|*.*";
|
||||
ofd.Filter = filter;
|
||||
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
var result = ofd.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
var file = new FileInfo(ofd.FileName);
|
||||
|
@ -387,7 +389,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
break;
|
||||
case MovieHeader.EMULATIONVERSION:
|
||||
if (kvp.Value != Global.MainForm.GetEmuVersion())
|
||||
if (kvp.Value != GlobalWinF.MainForm.GetEmuVersion())
|
||||
{
|
||||
item.BackColor = Color.Yellow;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
using BizHawk.Emulation.Consoles.GB;
|
||||
using BizHawk.Emulation.Consoles.Nintendo.SNES;
|
||||
using BizHawk.Emulation.Consoles.Sega;
|
||||
|
@ -60,7 +62,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
//Header
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.AUTHOR, AuthorBox.Text);
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.EMULATIONVERSION, Global.MainForm.GetEmuVersion());
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.EMULATIONVERSION, GlobalWinF.MainForm.GetEmuVersion());
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.MOVIEVERSION, MovieHeader.MovieVersion);
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.GUID, MovieHeader.MakeGUID());
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.PLATFORM, Global.Game.System);
|
||||
|
@ -76,45 +78,45 @@ namespace BizHawk.MultiClient
|
|||
MovieToRecord.Header.SetHeaderLine(MovieHeader.GAMENAME, "NULL");
|
||||
}
|
||||
|
||||
if (Global.Emulator.BoardName != null)
|
||||
if (GlobalWinF.Emulator.BoardName != null)
|
||||
{
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.BOARDNAME, Global.Emulator.BoardName);
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.BOARDNAME, GlobalWinF.Emulator.BoardName);
|
||||
}
|
||||
|
||||
if (Global.Emulator is Gameboy)
|
||||
if (GlobalWinF.Emulator is Gameboy)
|
||||
{
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.GB_FORCEDMG, Global.Config.GB_ForceDMG.ToString());
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.GB_GBA_IN_CGB, Global.Config.GB_GBACGB.ToString());
|
||||
}
|
||||
|
||||
if (Global.Emulator is LibsnesCore)
|
||||
if (GlobalWinF.Emulator is LibsnesCore)
|
||||
{
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.SGB, ((Global.Emulator) as LibsnesCore).IsSGB.ToString());
|
||||
if ((Global.Emulator as LibsnesCore).DisplayType == DisplayType.PAL)
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.SGB, ((GlobalWinF.Emulator) as LibsnesCore).IsSGB.ToString());
|
||||
if ((GlobalWinF.Emulator as LibsnesCore).DisplayType == DisplayType.PAL)
|
||||
{
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.PAL, "1");
|
||||
}
|
||||
}
|
||||
else if (Global.Emulator is SMS)
|
||||
else if (GlobalWinF.Emulator is SMS)
|
||||
{
|
||||
if ((Global.Emulator as SMS).DisplayType == DisplayType.PAL)
|
||||
if ((GlobalWinF.Emulator as SMS).DisplayType == DisplayType.PAL)
|
||||
{
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.PAL, "1");
|
||||
}
|
||||
}
|
||||
else if (Global.Emulator is NES)
|
||||
else if (GlobalWinF.Emulator is NES)
|
||||
{
|
||||
if ((Global.Emulator as NES).DisplayType == DisplayType.PAL)
|
||||
if ((GlobalWinF.Emulator as NES).DisplayType == DisplayType.PAL)
|
||||
{
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.PAL, "1");
|
||||
}
|
||||
}
|
||||
else if (Global.Emulator is ColecoVision)
|
||||
else if (GlobalWinF.Emulator is ColecoVision)
|
||||
{
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.SKIPBIOS, Global.Config.ColecoSkipBiosIntro.ToString());
|
||||
}
|
||||
|
||||
else if (Global.Emulator is N64)
|
||||
else if (GlobalWinF.Emulator is N64)
|
||||
{
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.VIDEOPLUGIN, Global.Config.N64VidPlugin);
|
||||
|
||||
|
@ -141,7 +143,7 @@ namespace BizHawk.MultiClient
|
|||
MovieToRecord.StartsFromSavestate = true;
|
||||
var temppath = path;
|
||||
var writer = new StreamWriter(temppath);
|
||||
Global.Emulator.SaveStateText(writer);
|
||||
GlobalWinF.Emulator.SaveStateText(writer);
|
||||
writer.Close();
|
||||
|
||||
var file = new FileInfo(temppath);
|
||||
|
@ -160,7 +162,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
}
|
||||
Global.MainForm.StartNewMovie(MovieToRecord, true);
|
||||
GlobalWinF.MainForm.StartNewMovie(MovieToRecord, true);
|
||||
|
||||
Global.Config.UseDefaultAuthor = DefaultAuthorCheckBox.Checked;
|
||||
if (DefaultAuthorCheckBox.Checked)
|
||||
|
@ -194,9 +196,9 @@ namespace BizHawk.MultiClient
|
|||
string filter = "Movie Files (*." + Global.Config.MovieExtension + ")|*." + Global.Config.MovieExtension + "|Savestates|*.state|All Files|*.*";
|
||||
sfd.Filter = filter;
|
||||
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
var result = sfd.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
filename = sfd.FileName;
|
||||
|
|
|
@ -3,6 +3,8 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public class Cheat
|
||||
|
|
|
@ -231,7 +231,7 @@
|
|||
//
|
||||
// CompareBox
|
||||
//
|
||||
this.CompareBox.ByteSize = BizHawk.MultiClient.Watch.WatchSize.Byte;
|
||||
this.CompareBox.ByteSize = BizHawk.Client.Core.Watch.WatchSize.Byte;
|
||||
this.CompareBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
||||
this.CompareBox.Location = new System.Drawing.Point(113, 91);
|
||||
this.CompareBox.MaxLength = 2;
|
||||
|
@ -240,11 +240,11 @@
|
|||
this.CompareBox.Size = new System.Drawing.Size(65, 20);
|
||||
this.CompareBox.TabIndex = 15;
|
||||
this.CompareBox.Text = "00";
|
||||
this.CompareBox.Type = BizHawk.MultiClient.Watch.DisplayType.Hex;
|
||||
this.CompareBox.Type = BizHawk.Client.Core.Watch.DisplayType.Hex;
|
||||
//
|
||||
// ValueBox
|
||||
//
|
||||
this.ValueBox.ByteSize = BizHawk.MultiClient.Watch.WatchSize.Byte;
|
||||
this.ValueBox.ByteSize = BizHawk.Client.Core.Watch.WatchSize.Byte;
|
||||
this.ValueBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
||||
this.ValueBox.Location = new System.Drawing.Point(113, 65);
|
||||
this.ValueBox.MaxLength = 2;
|
||||
|
@ -253,7 +253,7 @@
|
|||
this.ValueBox.Size = new System.Drawing.Size(65, 20);
|
||||
this.ValueBox.TabIndex = 12;
|
||||
this.ValueBox.Text = "00";
|
||||
this.ValueBox.Type = BizHawk.MultiClient.Watch.DisplayType.Hex;
|
||||
this.ValueBox.Type = BizHawk.Client.Core.Watch.DisplayType.Hex;
|
||||
//
|
||||
// CheatEdit
|
||||
//
|
||||
|
|
|
@ -8,6 +8,8 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class CheatEdit : UserControl
|
||||
|
@ -31,9 +33,9 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void CheatEdit_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.Emulator != null)
|
||||
if (GlobalWinF.Emulator != null)
|
||||
{
|
||||
ToolHelpers.PopulateMemoryDomainDropdown(ref DomainDropDown, Global.Emulator.MainMemory);
|
||||
ToolHelpers.PopulateMemoryDomainDropdown(ref DomainDropDown, GlobalWinF.Emulator.MainMemory);
|
||||
}
|
||||
SetFormToDefault();
|
||||
}
|
||||
|
@ -79,9 +81,9 @@ namespace BizHawk.MultiClient
|
|||
|
||||
NameBox.Text = String.Empty;
|
||||
|
||||
if (Global.Emulator != null)
|
||||
if (GlobalWinF.Emulator != null)
|
||||
{
|
||||
AddressBox.SetHexProperties(Global.Emulator.MainMemory.Size);
|
||||
AddressBox.SetHexProperties(GlobalWinF.Emulator.MainMemory.Size);
|
||||
}
|
||||
|
||||
ValueBox.ByteSize =
|
||||
|
|
|
@ -9,6 +9,7 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
using BizHawk.Emulation.Consoles.Nintendo.SNES;
|
||||
using BizHawk.Emulation.Consoles.Nintendo;
|
||||
using BizHawk.Emulation.Consoles.Sega;
|
||||
|
@ -85,23 +86,23 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void UpdateListView()
|
||||
{
|
||||
CheatListView.ItemCount = Global.CheatList.Count;
|
||||
TotalLabel.Text = Global.CheatList.CheatCount.ToString()
|
||||
+ (Global.CheatList.CheatCount == 1 ? " cheat " : " cheats ")
|
||||
+ Global.CheatList.ActiveCount.ToString() + " active";
|
||||
CheatListView.ItemCount = GlobalWinF.CheatList.Count;
|
||||
TotalLabel.Text = GlobalWinF.CheatList.CheatCount.ToString()
|
||||
+ (GlobalWinF.CheatList.CheatCount == 1 ? " cheat " : " cheats ")
|
||||
+ GlobalWinF.CheatList.ActiveCount.ToString() + " active";
|
||||
}
|
||||
|
||||
public void LoadFileFromRecent(string path)
|
||||
{
|
||||
bool ask_result = true;
|
||||
if (Global.CheatList.Changes)
|
||||
if (GlobalWinF.CheatList.Changes)
|
||||
{
|
||||
ask_result = AskSave();
|
||||
}
|
||||
|
||||
if (ask_result)
|
||||
{
|
||||
bool load_result = Global.CheatList.Load(path, append: false);
|
||||
bool load_result = GlobalWinF.CheatList.Load(path, append: false);
|
||||
if (!load_result)
|
||||
{
|
||||
ToolHelpers.HandleLoadError(Global.Config.RecentWatches, path);
|
||||
|
@ -121,11 +122,11 @@ namespace BizHawk.MultiClient
|
|||
|
||||
if (saved)
|
||||
{
|
||||
message = Path.GetFileName(Global.CheatList.CurrentFileName) + " saved.";
|
||||
message = Path.GetFileName(GlobalWinF.CheatList.CurrentFileName) + " saved.";
|
||||
}
|
||||
else
|
||||
{
|
||||
message = Path.GetFileName(Global.CheatList.CurrentFileName) + (Global.CheatList.Changes ? " *" : String.Empty);
|
||||
message = Path.GetFileName(GlobalWinF.CheatList.CurrentFileName) + (GlobalWinF.CheatList.Changes ? " *" : String.Empty);
|
||||
}
|
||||
|
||||
MessageLabel.Text = message;
|
||||
|
@ -138,14 +139,14 @@ namespace BizHawk.MultiClient
|
|||
return true;
|
||||
}
|
||||
|
||||
if (Global.CheatList.Changes)
|
||||
if (GlobalWinF.CheatList.Changes)
|
||||
{
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
DialogResult result = MessageBox.Show("Save Changes?", "Cheats", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button3);
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
Global.CheatList.Save();
|
||||
GlobalWinF.CheatList.Save();
|
||||
}
|
||||
else if (result == DialogResult.No)
|
||||
{
|
||||
|
@ -165,17 +166,17 @@ namespace BizHawk.MultiClient
|
|||
if (file != null)
|
||||
{
|
||||
bool result = true;
|
||||
if (Global.CheatList.Changes)
|
||||
if (GlobalWinF.CheatList.Changes)
|
||||
{
|
||||
result = AskSave();
|
||||
}
|
||||
|
||||
if (result)
|
||||
{
|
||||
Global.CheatList.Load(file.FullName, append);
|
||||
GlobalWinF.CheatList.Load(file.FullName, append);
|
||||
UpdateListView();
|
||||
UpdateMessageLabel();
|
||||
Global.Config.RecentCheats.Add(Global.CheatList.CurrentFileName);
|
||||
Global.Config.RecentCheats.Add(GlobalWinF.CheatList.CurrentFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -203,16 +204,16 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
GameGenieToolbarSeparator.Visible =
|
||||
LoadGameGenieToolbarItem.Visible =
|
||||
((Global.Emulator is NES)
|
||||
|| (Global.Emulator is Genesis)
|
||||
|| (Global.Emulator.SystemId == "GB")
|
||||
((GlobalWinF.Emulator is NES)
|
||||
|| (GlobalWinF.Emulator is Genesis)
|
||||
|| (GlobalWinF.Emulator.SystemId == "GB")
|
||||
|| (Global.Game.System == "GG")
|
||||
|| (Global.Emulator is LibsnesCore));
|
||||
|| (GlobalWinF.Emulator is LibsnesCore));
|
||||
}
|
||||
|
||||
private void AddCheat()
|
||||
{
|
||||
Global.CheatList.Add(CheatEditor.Cheat);
|
||||
GlobalWinF.CheatList.Add(CheatEditor.Cheat);
|
||||
UpdateListView();
|
||||
UpdateMessageLabel();
|
||||
}
|
||||
|
@ -278,7 +279,7 @@ namespace BizHawk.MultiClient
|
|||
private void CheatListView_QueryItemText(int index, int column, out string text)
|
||||
{
|
||||
text = "";
|
||||
if (index >= Global.CheatList.Count || Global.CheatList[index].IsSeparator)
|
||||
if (index >= GlobalWinF.CheatList.Count || GlobalWinF.CheatList[index].IsSeparator)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -288,44 +289,44 @@ namespace BizHawk.MultiClient
|
|||
switch (columnName)
|
||||
{
|
||||
case NAME:
|
||||
text = Global.CheatList[index].Name;
|
||||
text = GlobalWinF.CheatList[index].Name;
|
||||
break;
|
||||
case ADDRESS:
|
||||
text = Global.CheatList[index].AddressStr;
|
||||
text = GlobalWinF.CheatList[index].AddressStr;
|
||||
break;
|
||||
case VALUE:
|
||||
text = Global.CheatList[index].ValueStr;
|
||||
text = GlobalWinF.CheatList[index].ValueStr;
|
||||
break;
|
||||
case COMPARE:
|
||||
text = Global.CheatList[index].CompareStr;
|
||||
text = GlobalWinF.CheatList[index].CompareStr;
|
||||
break;
|
||||
case ON:
|
||||
text = Global.CheatList[index].Enabled ? "*" : "";
|
||||
text = GlobalWinF.CheatList[index].Enabled ? "*" : "";
|
||||
break;
|
||||
case DOMAIN:
|
||||
text = Global.CheatList[index].Domain.Name;
|
||||
text = GlobalWinF.CheatList[index].Domain.Name;
|
||||
break;
|
||||
case SIZE:
|
||||
text = Global.CheatList[index].Size.ToString();
|
||||
text = GlobalWinF.CheatList[index].Size.ToString();
|
||||
break;
|
||||
case ENDIAN:
|
||||
text = Global.CheatList[index].BigEndian.Value ? "Big" : "Little";
|
||||
text = GlobalWinF.CheatList[index].BigEndian.Value ? "Big" : "Little";
|
||||
break;
|
||||
case TYPE:
|
||||
text = Watch.DisplayTypeToString(Global.CheatList[index].Type);
|
||||
text = Watch.DisplayTypeToString(GlobalWinF.CheatList[index].Type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void CheatListView_QueryItemBkColor(int index, int column, ref Color color)
|
||||
{
|
||||
if (index < Global.CheatList.Count)
|
||||
if (index < GlobalWinF.CheatList.Count)
|
||||
{
|
||||
if (Global.CheatList[index].IsSeparator)
|
||||
if (GlobalWinF.CheatList[index].IsSeparator)
|
||||
{
|
||||
color = BackColor;
|
||||
}
|
||||
else if (Global.CheatList[index].Enabled)
|
||||
else if (GlobalWinF.CheatList[index].Enabled)
|
||||
{
|
||||
color = Color.LightCyan;
|
||||
}
|
||||
|
@ -355,9 +356,9 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
foreach (int index in SelectedIndices)
|
||||
{
|
||||
if (!Global.CheatList[index].IsSeparator)
|
||||
if (!GlobalWinF.CheatList[index].IsSeparator)
|
||||
{
|
||||
selected.Add(Global.CheatList[index]);
|
||||
selected.Add(GlobalWinF.CheatList[index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -383,9 +384,9 @@ namespace BizHawk.MultiClient
|
|||
|
||||
foreach (int index in indices)
|
||||
{
|
||||
var cheat = Global.CheatList[index];
|
||||
Global.CheatList.Remove(Global.CheatList[index]);
|
||||
Global.CheatList.Insert(index - 1, cheat);
|
||||
var cheat = GlobalWinF.CheatList[index];
|
||||
GlobalWinF.CheatList.Remove(GlobalWinF.CheatList[index]);
|
||||
GlobalWinF.CheatList.Insert(index - 1, cheat);
|
||||
}
|
||||
|
||||
UpdateMessageLabel();
|
||||
|
@ -415,12 +416,12 @@ namespace BizHawk.MultiClient
|
|||
|
||||
foreach (int index in indices)
|
||||
{
|
||||
var cheat = Global.CheatList[index];
|
||||
var cheat = GlobalWinF.CheatList[index];
|
||||
|
||||
if (index < Global.CheatList.Count - 1)
|
||||
if (index < GlobalWinF.CheatList.Count - 1)
|
||||
{
|
||||
Global.CheatList.Remove(Global.CheatList[index]);
|
||||
Global.CheatList.Insert(index + 1, cheat);
|
||||
GlobalWinF.CheatList.Remove(GlobalWinF.CheatList[index]);
|
||||
GlobalWinF.CheatList.Insert(index + 1, cheat);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -447,7 +448,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
foreach (int index in SelectedIndices)
|
||||
{
|
||||
Global.CheatList.Remove(Global.CheatList[SelectedIndices[0]]); //SelectedIndices[0] used since each iteration will make this the correct list index
|
||||
GlobalWinF.CheatList.Remove(GlobalWinF.CheatList[SelectedIndices[0]]); //SelectedIndices[0] used since each iteration will make this the correct list index
|
||||
}
|
||||
CheatListView.SelectedIndices.Clear();
|
||||
}
|
||||
|
@ -459,7 +460,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
SelectedCheats.ForEach(x => x.Toggle());
|
||||
ToolHelpers.UpdateCheatRelatedTools();
|
||||
Global.CheatList.FlagChanges();
|
||||
GlobalWinF.CheatList.FlagChanges();
|
||||
}
|
||||
|
||||
private void SaveColumnInfo()
|
||||
|
@ -544,14 +545,14 @@ namespace BizHawk.MultiClient
|
|||
private void NewList()
|
||||
{
|
||||
bool result = true;
|
||||
if (Global.CheatList.Changes)
|
||||
if (GlobalWinF.CheatList.Changes)
|
||||
{
|
||||
result = AskSave();
|
||||
}
|
||||
|
||||
if (result)
|
||||
{
|
||||
Global.CheatList.NewList();
|
||||
GlobalWinF.CheatList.NewList();
|
||||
UpdateListView();
|
||||
UpdateMessageLabel();
|
||||
}
|
||||
|
@ -563,7 +564,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void FileSubMenu_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
SaveMenuItem.Enabled = Global.CheatList.Changes;
|
||||
SaveMenuItem.Enabled = GlobalWinF.CheatList.Changes;
|
||||
}
|
||||
|
||||
private void RecentSubMenu_DropDownOpened(object sender, EventArgs e)
|
||||
|
@ -582,14 +583,14 @@ namespace BizHawk.MultiClient
|
|||
private void OpenMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool append = sender == AppendMenuItem;
|
||||
LoadFile(CheatList.GetFileFromUser(Global.CheatList.CurrentFileName), append);
|
||||
LoadFile(CheatList.GetFileFromUser(GlobalWinF.CheatList.CurrentFileName), append);
|
||||
}
|
||||
|
||||
private void SaveMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.CheatList.Changes)
|
||||
if (GlobalWinF.CheatList.Changes)
|
||||
{
|
||||
if (Global.CheatList.Save())
|
||||
if (GlobalWinF.CheatList.Save())
|
||||
{
|
||||
UpdateMessageLabel(saved: true);
|
||||
}
|
||||
|
@ -602,7 +603,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void SaveAsMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.CheatList.SaveAs())
|
||||
if (GlobalWinF.CheatList.SaveAs())
|
||||
{
|
||||
UpdateMessageLabel(saved: true);
|
||||
}
|
||||
|
@ -626,15 +627,15 @@ namespace BizHawk.MultiClient
|
|||
ToggleMenuItem.Enabled =
|
||||
SelectedIndices.Any();
|
||||
|
||||
DisableAllCheatsMenuItem.Enabled = Global.CheatList.ActiveCount > 0;
|
||||
DisableAllCheatsMenuItem.Enabled = GlobalWinF.CheatList.ActiveCount > 0;
|
||||
|
||||
GameGenieSeparator.Visible =
|
||||
OpenGameGenieEncoderDecoderMenuItem.Visible =
|
||||
((Global.Emulator is NES)
|
||||
|| (Global.Emulator is Genesis)
|
||||
|| (Global.Emulator.SystemId == "GB")
|
||||
((GlobalWinF.Emulator is NES)
|
||||
|| (GlobalWinF.Emulator is Genesis)
|
||||
|| (GlobalWinF.Emulator.SystemId == "GB")
|
||||
|| (Global.Game.System == "GG")
|
||||
|| (Global.Emulator is LibsnesCore));
|
||||
|| (GlobalWinF.Emulator is LibsnesCore));
|
||||
}
|
||||
|
||||
private void RemoveCheatMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -648,7 +649,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
foreach (int index in CheatListView.SelectedIndices)
|
||||
{
|
||||
Global.CheatList.Add(new Cheat(Global.CheatList[index]));
|
||||
GlobalWinF.CheatList.Add(new Cheat(GlobalWinF.CheatList[index]));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -660,11 +661,11 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (SelectedIndices.Any())
|
||||
{
|
||||
Global.CheatList.Insert(SelectedIndices.Max(), Cheat.Separator);
|
||||
GlobalWinF.CheatList.Insert(SelectedIndices.Max(), Cheat.Separator);
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.CheatList.Add(Cheat.Separator);
|
||||
GlobalWinF.CheatList.Add(Cheat.Separator);
|
||||
}
|
||||
|
||||
UpdateListView();
|
||||
|
@ -683,7 +684,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void SelectAllMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
for (int i = 0; i < Global.CheatList.Count; i++)
|
||||
for (int i = 0; i < GlobalWinF.CheatList.Count; i++)
|
||||
{
|
||||
CheatListView.SelectItem(i, true);
|
||||
}
|
||||
|
@ -696,12 +697,12 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void DisableAllCheatsMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.CheatList.DisableAll();
|
||||
GlobalWinF.CheatList.DisableAll();
|
||||
}
|
||||
|
||||
private void OpenGameGenieEncoderDecoderMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.LoadGameGenieEC();
|
||||
GlobalWinF.MainForm.LoadGameGenieEC();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -913,7 +914,7 @@ namespace BizHawk.MultiClient
|
|||
_sortReverse = false;
|
||||
}
|
||||
|
||||
Global.CheatList.Sort(column.Name, _sortReverse);
|
||||
GlobalWinF.CheatList.Sort(column.Name, _sortReverse);
|
||||
|
||||
_sortedColumn = column.Name;
|
||||
_sortReverse ^= true;
|
||||
|
@ -942,7 +943,7 @@ namespace BizHawk.MultiClient
|
|||
RemoveContextMenuItem.Enabled =
|
||||
SelectedCheats.Any();
|
||||
|
||||
DisableAllContextMenuItem.Enabled = Global.CheatList.ActiveCount > 0;
|
||||
DisableAllContextMenuItem.Enabled = GlobalWinF.CheatList.ActiveCount > 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -6,6 +6,8 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public class CheatList : IEnumerable<Cheat>
|
||||
|
@ -327,7 +329,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
Global.MainForm.UpdateCheatStatus();
|
||||
GlobalWinF.MainForm.UpdateCheatStatus();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -505,12 +507,12 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private string GenerateDefaultFilename()
|
||||
{
|
||||
PathEntry pathEntry = Global.Config.PathEntries[Global.Emulator.SystemId, "Cheats"];
|
||||
PathEntry pathEntry = Global.Config.PathEntries[GlobalWinF.Emulator.SystemId, "Cheats"];
|
||||
if (pathEntry == null)
|
||||
{
|
||||
pathEntry = Global.Config.PathEntries[Global.Emulator.SystemId, "Base"];
|
||||
pathEntry = Global.Config.PathEntries[GlobalWinF.Emulator.SystemId, "Base"];
|
||||
}
|
||||
string path = PathManager.MakeAbsolutePath(pathEntry.Path, Global.Emulator.SystemId);
|
||||
string path = PathManager.MakeAbsolutePath(pathEntry.Path, GlobalWinF.Emulator.SystemId);
|
||||
|
||||
var f = new FileInfo(path);
|
||||
if (f.Directory != null && f.Directory.Exists == false)
|
||||
|
@ -590,9 +592,9 @@ namespace BizHawk.MultiClient
|
|||
ofd.Filter = "Cheat Files (*.cht)|*.cht|All Files|*.*";
|
||||
ofd.RestoreDirectory = true;
|
||||
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
var result = ofd.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result != DialogResult.OK)
|
||||
return null;
|
||||
var file = new FileInfo(ofd.FileName);
|
||||
|
@ -606,16 +608,16 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
sfd.FileName = Path.GetFileNameWithoutExtension(_currentFileName);
|
||||
}
|
||||
else if (!(Global.Emulator is NullEmulator))
|
||||
else if (!(GlobalWinF.Emulator is NullEmulator))
|
||||
{
|
||||
sfd.FileName = PathManager.FilesystemSafeName(Global.Game);
|
||||
}
|
||||
sfd.InitialDirectory = PathManager.GetCheatsPath(Global.Game);
|
||||
sfd.Filter = "Cheat Files (*.cht)|*.cht|All Files|*.*";
|
||||
sfd.RestoreDirectory = true;
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
var result = sfd.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result != DialogResult.OK)
|
||||
{
|
||||
return null;
|
||||
|
|
|
@ -3,6 +3,8 @@ using System.Drawing;
|
|||
using System.Windows.Forms;
|
||||
using BizHawk.Emulation.Consoles.GB;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient.GBtools
|
||||
{
|
||||
public partial class CGBColorChooserForm : Form
|
||||
|
|
|
@ -4,6 +4,8 @@ using System.Drawing;
|
|||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient.GBtools
|
||||
{
|
||||
public partial class ColorChooserForm : Form
|
||||
|
|
|
@ -7,6 +7,8 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient.GBtools
|
||||
{
|
||||
public partial class DualGBFileSelector : UserControl
|
||||
|
|
|
@ -3,6 +3,8 @@ using System.Drawing;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient.GBtools
|
||||
{
|
||||
public partial class GBGPUView : Form
|
||||
|
@ -78,9 +80,9 @@ namespace BizHawk.MultiClient.GBtools
|
|||
|
||||
public void Restart()
|
||||
{
|
||||
if (Global.Emulator is Emulation.Consoles.GB.Gameboy)
|
||||
if (GlobalWinF.Emulator is Emulation.Consoles.GB.Gameboy)
|
||||
{
|
||||
gb = Global.Emulator as Emulation.Consoles.GB.Gameboy;
|
||||
gb = GlobalWinF.Emulator as Emulation.Consoles.GB.Gameboy;
|
||||
cgb = gb.IsCGBMode();
|
||||
_lcdc = 0;
|
||||
if (!gb.GetGPUMemoryAreas(out vram, out bgpal, out sppal, out oam))
|
||||
|
@ -955,9 +957,9 @@ namespace BizHawk.MultiClient.GBtools
|
|||
dlg.FullOpen = true;
|
||||
dlg.Color = spriteback;
|
||||
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
var result = dlg.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
// force full opaque
|
||||
|
|
|
@ -5,6 +5,8 @@ using System.Windows.Forms;
|
|||
using System.Globalization;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class GBGameGenie : Form
|
||||
|
@ -346,7 +348,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void AddCheatClick(object sender, EventArgs e)
|
||||
{
|
||||
if ((Global.Emulator.SystemId == "GB") || (Global.Game.System == "GG"))
|
||||
if ((GlobalWinF.Emulator.SystemId == "GB") || (Global.Game.System == "GG"))
|
||||
{
|
||||
string NAME = String.Empty;
|
||||
int ADDRESS = 0;
|
||||
|
@ -389,9 +391,9 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < Global.Emulator.MemoryDomains.Count; i++)
|
||||
for (int i = 0; i < GlobalWinF.Emulator.MemoryDomains.Count; i++)
|
||||
{
|
||||
if (Global.Emulator.MemoryDomains[i].ToString() == "System Bus")
|
||||
if (GlobalWinF.Emulator.MemoryDomains[i].ToString() == "System Bus")
|
||||
{
|
||||
sysBusIndex = i;
|
||||
break;
|
||||
|
@ -399,14 +401,14 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
|
||||
Watch watch = Watch.GenerateWatch(
|
||||
Global.Emulator.MemoryDomains[sysBusIndex],
|
||||
GlobalWinF.Emulator.MemoryDomains[sysBusIndex],
|
||||
ADDRESS,
|
||||
Watch.WatchSize.Byte,
|
||||
Watch.DisplayType.Hex,
|
||||
NAME,
|
||||
false);
|
||||
|
||||
Global.CheatList.Add(new Cheat(
|
||||
GlobalWinF.CheatList.Add(new Cheat(
|
||||
watch,
|
||||
VALUE,
|
||||
COMPARE,
|
||||
|
|
|
@ -673,7 +673,7 @@ namespace BizHawk.MultiClient.GBAtools
|
|||
|
||||
public void Restart()
|
||||
{
|
||||
gba = Global.Emulator as Emulation.Consoles.Nintendo.GBA.GBA;
|
||||
gba = GlobalWinF.Emulator as Emulation.Consoles.Nintendo.GBA.GBA;
|
||||
if (gba != null)
|
||||
{
|
||||
gba.GetGPUMemoryAreas(out vram, out palram, out oam, out mmio);
|
||||
|
|
|
@ -4,6 +4,8 @@ using System.Drawing;
|
|||
using System.Windows.Forms;
|
||||
using System.Globalization;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
using BizHawk.Emulation.Consoles.Sega;
|
||||
|
||||
#pragma warning disable 675 //TOOD: fix the potential problem this is masking
|
||||
|
@ -222,7 +224,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void addcheatbt_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.Emulator is Genesis)
|
||||
if (GlobalWinF.Emulator is Genesis)
|
||||
{
|
||||
string NAME;
|
||||
int ADDRESS = 0;
|
||||
|
@ -253,16 +255,16 @@ namespace BizHawk.MultiClient
|
|||
VALUE = ValueBox.ToRawInt();
|
||||
}
|
||||
|
||||
for (int i = 0; i < Global.Emulator.MemoryDomains.Count; i++)
|
||||
for (int i = 0; i < GlobalWinF.Emulator.MemoryDomains.Count; i++)
|
||||
{
|
||||
if (Global.Emulator.MemoryDomains[i].ToString() == "Rom Data")
|
||||
if (GlobalWinF.Emulator.MemoryDomains[i].ToString() == "Rom Data")
|
||||
{
|
||||
romDataDomainIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
Watch watch = Watch.GenerateWatch(
|
||||
Global.Emulator.MemoryDomains[romDataDomainIndex],
|
||||
GlobalWinF.Emulator.MemoryDomains[romDataDomainIndex],
|
||||
ADDRESS,
|
||||
Watch.WatchSize.Word,
|
||||
Watch.DisplayType.Hex,
|
||||
|
@ -270,7 +272,7 @@ namespace BizHawk.MultiClient
|
|||
bigEndian: true
|
||||
);
|
||||
|
||||
Global.CheatList.Add(new Cheat(
|
||||
GlobalWinF.CheatList.Add(new Cheat(
|
||||
watch,
|
||||
VALUE,
|
||||
compare: null,
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class HexColors_Form : Form
|
||||
|
@ -25,8 +27,8 @@ namespace BizHawk.MultiClient
|
|||
if (colorDialog1.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Global.Config.HexBackgrndColor = colorDialog1.Color;
|
||||
Global.MainForm.HexEditor1.Header.BackColor = colorDialog1.Color;
|
||||
Global.MainForm.HexEditor1.MemoryViewerBox.BackColor = Global.Config.HexBackgrndColor;
|
||||
GlobalWinF.MainForm.HexEditor1.Header.BackColor = colorDialog1.Color;
|
||||
GlobalWinF.MainForm.HexEditor1.MemoryViewerBox.BackColor = Global.Config.HexBackgrndColor;
|
||||
HexBackgrnd.BackColor = colorDialog1.Color;
|
||||
}
|
||||
}
|
||||
|
@ -36,8 +38,8 @@ namespace BizHawk.MultiClient
|
|||
if (colorDialog1.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Global.Config.HexForegrndColor = colorDialog1.Color;
|
||||
Global.MainForm.HexEditor1.Header.ForeColor = colorDialog1.Color;
|
||||
Global.MainForm.HexEditor1.MemoryViewerBox.ForeColor = Global.Config.HexForegrndColor;
|
||||
GlobalWinF.MainForm.HexEditor1.Header.ForeColor = colorDialog1.Color;
|
||||
GlobalWinF.MainForm.HexEditor1.MemoryViewerBox.ForeColor = Global.Config.HexForegrndColor;
|
||||
HexForegrnd.BackColor = colorDialog1.Color;
|
||||
|
||||
}
|
||||
|
@ -48,7 +50,7 @@ namespace BizHawk.MultiClient
|
|||
if (colorDialog1.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Global.Config.HexMenubarColor = colorDialog1.Color;
|
||||
Global.MainForm.HexEditor1.menuStrip1.BackColor = Global.Config.HexMenubarColor;
|
||||
GlobalWinF.MainForm.HexEditor1.menuStrip1.BackColor = Global.Config.HexMenubarColor;
|
||||
HexMenubar.BackColor = colorDialog1.Color;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@ using System.Windows.Forms;
|
|||
using System.Globalization;
|
||||
using System.IO;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class HexEditor : Form
|
||||
|
@ -257,9 +259,9 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private int? GetDomainInt(string name)
|
||||
{
|
||||
for (int i = 0; i < Global.Emulator.MemoryDomains.Count; i++)
|
||||
for (int i = 0; i < GlobalWinF.Emulator.MemoryDomains.Count; i++)
|
||||
{
|
||||
if (Global.Emulator.MemoryDomains[i].Name == name)
|
||||
if (GlobalWinF.Emulator.MemoryDomains[i].Name == name)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
@ -384,7 +386,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private bool CurrentROMIsArchive()
|
||||
{
|
||||
string path = Global.MainForm.CurrentlyOpenRom;
|
||||
string path = GlobalWinF.MainForm.CurrentlyOpenRom;
|
||||
if (path == null)
|
||||
{
|
||||
return false;
|
||||
|
@ -412,7 +414,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private byte[] GetRomBytes()
|
||||
{
|
||||
string path = Global.MainForm.CurrentlyOpenRom;
|
||||
string path = GlobalWinF.MainForm.CurrentlyOpenRom;
|
||||
if (path == null)
|
||||
{
|
||||
return null;
|
||||
|
@ -455,9 +457,9 @@ namespace BizHawk.MultiClient
|
|||
//<zeromus> THIS IS HORRIBLE.
|
||||
Domain = ROMDomain;
|
||||
}
|
||||
else if (pos < Global.Emulator.MemoryDomains.Count) //Sanity check
|
||||
else if (pos < GlobalWinF.Emulator.MemoryDomains.Count) //Sanity check
|
||||
{
|
||||
SetMemoryDomain(Global.Emulator.MemoryDomains[pos]);
|
||||
SetMemoryDomain(GlobalWinF.Emulator.MemoryDomains[pos]);
|
||||
}
|
||||
SetHeader();
|
||||
UpdateGroupBoxTitle();
|
||||
|
@ -469,7 +471,7 @@ namespace BizHawk.MultiClient
|
|||
private void UpdateGroupBoxTitle()
|
||||
{
|
||||
string memoryDomain = Domain.ToString();
|
||||
string systemID = Global.Emulator.SystemId;
|
||||
string systemID = GlobalWinF.Emulator.SystemId;
|
||||
int addresses = Domain.Size / DataSize;
|
||||
string addressesString = "0x" + string.Format("{0:X8}", addresses).TrimStart('0');
|
||||
//if ((addresses & 0x3FF) == 0)
|
||||
|
@ -482,11 +484,11 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
memoryDomainsToolStripMenuItem.DropDownItems.Clear();
|
||||
|
||||
for (int i = 0; i < Global.Emulator.MemoryDomains.Count; i++)
|
||||
for (int i = 0; i < GlobalWinF.Emulator.MemoryDomains.Count; i++)
|
||||
{
|
||||
if (Global.Emulator.MemoryDomains[i].Size > 0)
|
||||
if (GlobalWinF.Emulator.MemoryDomains[i].Size > 0)
|
||||
{
|
||||
string str = Global.Emulator.MemoryDomains[i].ToString();
|
||||
string str = GlobalWinF.Emulator.MemoryDomains[i].ToString();
|
||||
var item = new ToolStripMenuItem { Text = str };
|
||||
{
|
||||
int z = i;
|
||||
|
@ -534,9 +536,9 @@ namespace BizHawk.MultiClient
|
|||
InputPrompt i = new InputPrompt { Text = "Go to Address" };
|
||||
i._Location = GetPromptPoint();
|
||||
i.SetMessage("Enter a hexadecimal value");
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
i.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
|
||||
if (i.UserOK)
|
||||
{
|
||||
|
@ -704,16 +706,16 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (HighlightedAddress.HasValue || SecondaryHighlightedAddresses.Count > 0)
|
||||
{
|
||||
Global.MainForm.LoadRamWatch(true);
|
||||
GlobalWinF.MainForm.LoadRamWatch(true);
|
||||
}
|
||||
|
||||
if (HighlightedAddress.HasValue)
|
||||
{
|
||||
Global.MainForm.RamWatch1.AddWatch(MakeWatch(HighlightedAddress.Value));
|
||||
GlobalWinF.MainForm.RamWatch1.AddWatch(MakeWatch(HighlightedAddress.Value));
|
||||
}
|
||||
foreach (int i in SecondaryHighlightedAddresses)
|
||||
{
|
||||
Global.MainForm.RamWatch1.AddWatch(MakeWatch(i));
|
||||
GlobalWinF.MainForm.RamWatch1.AddWatch(MakeWatch(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -751,10 +753,10 @@ namespace BizHawk.MultiClient
|
|||
|
||||
poke.SetWatch(Watches);
|
||||
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
var result = poke.ShowDialog();
|
||||
UpdateValues();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -833,7 +835,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private bool IsFrozen(int address)
|
||||
{
|
||||
return Global.CheatList.IsActive(Domain, address);
|
||||
return GlobalWinF.CheatList.IsActive(Domain, address);
|
||||
}
|
||||
|
||||
private void ToggleFreeze()
|
||||
|
@ -866,8 +868,8 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (address >= 0)
|
||||
{
|
||||
var cheats = Global.CheatList.Where(x => x.Contains(address)).ToList();
|
||||
Global.CheatList.RemoveRange(cheats);
|
||||
var cheats = GlobalWinF.CheatList.Where(x => x.Contains(address)).ToList();
|
||||
GlobalWinF.CheatList.RemoveRange(cheats);
|
||||
}
|
||||
MemoryViewerBox.Refresh();
|
||||
}
|
||||
|
@ -891,10 +893,10 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void UpdateRelatedDialogs()
|
||||
{
|
||||
Global.MainForm.UpdateCheatStatus();
|
||||
Global.MainForm.RamSearch1.UpdateValues();
|
||||
Global.MainForm.RamWatch1.UpdateValues();
|
||||
Global.MainForm.Cheats_UpdateValues();
|
||||
GlobalWinF.MainForm.UpdateCheatStatus();
|
||||
GlobalWinF.MainForm.RamSearch1.UpdateValues();
|
||||
GlobalWinF.MainForm.RamWatch1.UpdateValues();
|
||||
GlobalWinF.MainForm.Cheats_UpdateValues();
|
||||
UpdateValues();
|
||||
}
|
||||
|
||||
|
@ -910,7 +912,7 @@ namespace BizHawk.MultiClient
|
|||
String.Empty,
|
||||
BigEndian);
|
||||
|
||||
Global.CheatList.Add(new Cheat(
|
||||
GlobalWinF.CheatList.Add(new Cheat(
|
||||
watch,
|
||||
watch.Value.Value,
|
||||
compare: null,
|
||||
|
@ -997,19 +999,19 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
var sfd = new SaveFileDialog();
|
||||
|
||||
if (!(Global.Emulator is NullEmulator))
|
||||
if (!(GlobalWinF.Emulator is NullEmulator))
|
||||
sfd.FileName = PathManager.FilesystemSafeName(Global.Game);
|
||||
else
|
||||
sfd.FileName = "MemoryDump";
|
||||
|
||||
|
||||
sfd.InitialDirectory = PathManager.GetPlatformBase(Global.Emulator.SystemId);
|
||||
sfd.InitialDirectory = PathManager.GetPlatformBase(GlobalWinF.Emulator.SystemId);
|
||||
|
||||
sfd.Filter = "Text (*.txt)|*.txt|All Files|*.*";
|
||||
sfd.RestoreDirectory = true;
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
var result = sfd.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result != DialogResult.OK)
|
||||
return null;
|
||||
var file = new FileInfo(sfd.FileName);
|
||||
|
@ -1020,7 +1022,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (Domain.Name == "ROM File")
|
||||
{
|
||||
string extension = Path.GetExtension(Global.MainForm.CurrentlyOpenRom);
|
||||
string extension = Path.GetExtension(GlobalWinF.MainForm.CurrentlyOpenRom);
|
||||
|
||||
return "Binary (*" + extension + ")|*" + extension + "|All Files|*.*";
|
||||
}
|
||||
|
@ -1034,19 +1036,19 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
var sfd = new SaveFileDialog();
|
||||
|
||||
if (!(Global.Emulator is NullEmulator))
|
||||
if (!(GlobalWinF.Emulator is NullEmulator))
|
||||
sfd.FileName = PathManager.FilesystemSafeName(Global.Game);
|
||||
else
|
||||
sfd.FileName = "MemoryDump";
|
||||
|
||||
|
||||
sfd.InitialDirectory = PathManager.GetPlatformBase(Global.Emulator.SystemId);
|
||||
sfd.InitialDirectory = PathManager.GetPlatformBase(GlobalWinF.Emulator.SystemId);
|
||||
|
||||
sfd.Filter = GetSaveFileFilter();
|
||||
sfd.RestoreDirectory = true;
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
var result = sfd.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result != DialogResult.OK)
|
||||
return null;
|
||||
var file = new FileInfo(sfd.FileName);
|
||||
|
@ -1207,7 +1209,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void MemoryViewerBox_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
var activeCheats = Global.CheatList.Where(x => x.Enabled);
|
||||
var activeCheats = GlobalWinF.CheatList.Where(x => x.Enabled);
|
||||
foreach (var cheat in activeCheats)
|
||||
{
|
||||
if (IsVisible(cheat.Address.Value))
|
||||
|
@ -1232,7 +1234,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
Rectangle textrect = new Rectangle(textpoint, new Size((8 * DataSize), fontHeight));
|
||||
|
||||
if (Global.CheatList.IsActive(Domain, addressHighlighted))
|
||||
if (GlobalWinF.CheatList.IsActive(Domain, addressHighlighted))
|
||||
{
|
||||
e.Graphics.FillRectangle(new SolidBrush(Global.Config.HexHighlightFreezeColor), rect);
|
||||
e.Graphics.FillRectangle(new SolidBrush(Global.Config.HexHighlightFreezeColor), textrect);
|
||||
|
@ -1254,7 +1256,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
Rectangle textrect = new Rectangle(textpoint, new Size(8, fontHeight));
|
||||
|
||||
if (Global.CheatList.IsActive(Domain, address))
|
||||
if (GlobalWinF.CheatList.IsActive(Domain, address))
|
||||
{
|
||||
e.Graphics.FillRectangle(new SolidBrush(Global.Config.HexHighlightFreezeColor), rect);
|
||||
e.Graphics.FillRectangle(new SolidBrush(Global.Config.HexHighlightFreezeColor), textrect);
|
||||
|
@ -1690,10 +1692,10 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void IncrementAddress(int address)
|
||||
{
|
||||
if (Global.CheatList.IsActive(Domain, address))
|
||||
if (GlobalWinF.CheatList.IsActive(Domain, address))
|
||||
{
|
||||
Global.CheatList.FirstOrDefault(x => x.Domain == Domain && x.Address == address).Increment();
|
||||
Global.CheatList.FlagChanges();
|
||||
GlobalWinF.CheatList.FirstOrDefault(x => x.Domain == Domain && x.Address == address).Increment();
|
||||
GlobalWinF.CheatList.FlagChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1728,10 +1730,10 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void DecrementAddress(int address)
|
||||
{
|
||||
if (Global.CheatList.IsActive(Domain, address))
|
||||
if (GlobalWinF.CheatList.IsActive(Domain, address))
|
||||
{
|
||||
Global.CheatList.FirstOrDefault(x => x.Domain == Domain && x.Address == address).Decrement();
|
||||
Global.CheatList.FlagChanges();
|
||||
GlobalWinF.CheatList.FirstOrDefault(x => x.Domain == Domain && x.Address == address).Decrement();
|
||||
GlobalWinF.CheatList.FlagChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2059,9 +2061,9 @@ namespace BizHawk.MultiClient
|
|||
private void setColorsToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
HexColors_Form h = new HexColors_Form();
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
h.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
}
|
||||
|
||||
private void resetToDefaultToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
|
@ -2121,7 +2123,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
else
|
||||
{
|
||||
FileInfo file = new FileInfo(Global.MainForm.CurrentlyOpenRom);
|
||||
FileInfo file = new FileInfo(GlobalWinF.MainForm.CurrentlyOpenRom);
|
||||
SaveFileBinary(file);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,12 +60,12 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void Find_Prev_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.HexEditor1.FindPrev(GetFindBoxChars(), false);
|
||||
GlobalWinF.MainForm.HexEditor1.FindPrev(GetFindBoxChars(), false);
|
||||
}
|
||||
|
||||
private void Find_Next_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.HexEditor1.FindNext(GetFindBoxChars(), false);
|
||||
GlobalWinF.MainForm.HexEditor1.FindNext(GetFindBoxChars(), false);
|
||||
}
|
||||
|
||||
private void ChangeCasing()
|
||||
|
@ -94,7 +94,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (e.KeyData == Keys.Enter)
|
||||
{
|
||||
Global.MainForm.HexEditor1.FindNext(GetFindBoxChars(), false);
|
||||
GlobalWinF.MainForm.HexEditor1.FindNext(GetFindBoxChars(), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ using System.Windows.Forms;
|
|||
using System.Text;
|
||||
using System.Globalization;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
|
@ -517,9 +518,9 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
InputPrompt i = new InputPrompt {Text = "Go to Address"};
|
||||
i.SetMessage("Enter a hexadecimal value");
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
i.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
|
||||
if (i.UserOK)
|
||||
{
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
@ -6,6 +6,8 @@ using System.Linq;
|
|||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class LuaConsole : Form
|
||||
|
@ -178,9 +180,9 @@ namespace BizHawk.MultiClient
|
|||
if (!Directory.Exists(ofd.InitialDirectory))
|
||||
Directory.CreateDirectory(ofd.InitialDirectory);
|
||||
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
var result = ofd.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result != DialogResult.OK)
|
||||
return null;
|
||||
var file = new FileInfo(ofd.FileName);
|
||||
|
@ -708,9 +710,9 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void luaFunctionsListToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
new LuaFunctionList().Show();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
}
|
||||
|
||||
public bool LoadLuaSession(string path)
|
||||
|
@ -907,7 +909,7 @@ namespace BizHawk.MultiClient
|
|||
sfd.FileName = Path.GetFileNameWithoutExtension(currentSessionFile);
|
||||
sfd.InitialDirectory = Path.GetDirectoryName(currentSessionFile);
|
||||
}
|
||||
else if (!(Global.Emulator is NullEmulator))
|
||||
else if (!(GlobalWinF.Emulator is NullEmulator))
|
||||
{
|
||||
sfd.FileName = PathManager.FilesystemSafeName(Global.Game);
|
||||
sfd.InitialDirectory = PathManager.GetLuaPath();
|
||||
|
@ -920,9 +922,9 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
sfd.Filter = "Lua Session Files (*.luases)|*.luases|All Files|*.*";
|
||||
sfd.RestoreDirectory = true;
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
var result = sfd.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result != DialogResult.OK)
|
||||
return null;
|
||||
var file = new FileInfo(sfd.FileName);
|
||||
|
@ -1017,9 +1019,9 @@ namespace BizHawk.MultiClient
|
|||
|
||||
if (changes)
|
||||
{
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
DialogResult result = MessageBox.Show("Save changes to session?", "Lua Console", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button3);
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
if (string.Compare(currentSessionFile, "") == 0)
|
||||
|
@ -1099,7 +1101,7 @@ namespace BizHawk.MultiClient
|
|||
turnOffAllScriptsToolStripMenuItem.Enabled = luaRunning;
|
||||
|
||||
|
||||
showRegisteredFunctionsToolStripMenuItem.Enabled = Global.MainForm.LuaConsole1.LuaImp.RegisteredFunctions.Any();
|
||||
showRegisteredFunctionsToolStripMenuItem.Enabled = GlobalWinF.MainForm.LuaConsole1.LuaImp.RegisteredFunctions.Any();
|
||||
}
|
||||
|
||||
private void contextMenuStrip1_Opening(object sender, CancelEventArgs e)
|
||||
|
@ -1245,7 +1247,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void showRegisteredFunctionsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.MainForm.LuaConsole1.LuaImp.RegisteredFunctions.Any())
|
||||
if (GlobalWinF.MainForm.LuaConsole1.LuaImp.RegisteredFunctions.Any())
|
||||
{
|
||||
LuaRegisteredFunctionsList dialog = new LuaRegisteredFunctionsList();
|
||||
dialog.ShowDialog();
|
||||
|
@ -1254,7 +1256,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void contextMenuStrip2_Opening(object sender, CancelEventArgs e)
|
||||
{
|
||||
registeredFunctionsToolStripMenuItem.Enabled = Global.MainForm.LuaConsole1.LuaImp.RegisteredFunctions.Any();
|
||||
registeredFunctionsToolStripMenuItem.Enabled = GlobalWinF.MainForm.LuaConsole1.LuaImp.RegisteredFunctions.Any();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
|
||||
|
||||
namespace BizHawk.MultiClient.tools
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public class LuaDocumentation
|
||||
{
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace BizHawk.MultiClient
|
|||
private void PopulateListView()
|
||||
{
|
||||
FunctionView.Items.Clear();
|
||||
foreach (LuaDocumentation.LibraryFunction l in Global.MainForm.LuaConsole1.LuaImp.docs.FunctionList)
|
||||
foreach (LuaDocumentation.LibraryFunction l in GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.FunctionList)
|
||||
{
|
||||
ListViewItem item = new ListViewItem {Text = l.ReturnType};
|
||||
item.SubItems.Add(l.library + ".");
|
||||
|
@ -41,16 +41,16 @@ namespace BizHawk.MultiClient
|
|||
switch (column)
|
||||
{
|
||||
case 0: //Return
|
||||
Global.MainForm.LuaConsole1.LuaImp.docs.FunctionList = Global.MainForm.LuaConsole1.LuaImp.docs.FunctionList.OrderByDescending(x => x.ReturnType).ToList();
|
||||
GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.FunctionList = GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.FunctionList.OrderByDescending(x => x.ReturnType).ToList();
|
||||
break;
|
||||
case 1: //Library
|
||||
Global.MainForm.LuaConsole1.LuaImp.docs.FunctionList = Global.MainForm.LuaConsole1.LuaImp.docs.FunctionList.OrderByDescending(x => x.library).ToList();
|
||||
GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.FunctionList = GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.FunctionList.OrderByDescending(x => x.library).ToList();
|
||||
break;
|
||||
case 2: //Name
|
||||
Global.MainForm.LuaConsole1.LuaImp.docs.FunctionList = Global.MainForm.LuaConsole1.LuaImp.docs.FunctionList.OrderByDescending(x => x.name).ToList();
|
||||
GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.FunctionList = GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.FunctionList.OrderByDescending(x => x.name).ToList();
|
||||
break;
|
||||
case 3: //Parameters
|
||||
Global.MainForm.LuaConsole1.LuaImp.docs.FunctionList = Global.MainForm.LuaConsole1.LuaImp.docs.FunctionList.OrderByDescending(x => x.ParameterList).ToList();
|
||||
GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.FunctionList = GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.FunctionList.OrderByDescending(x => x.ParameterList).ToList();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -59,16 +59,16 @@ namespace BizHawk.MultiClient
|
|||
switch (column)
|
||||
{
|
||||
case 0: //Return
|
||||
Global.MainForm.LuaConsole1.LuaImp.docs.FunctionList = Global.MainForm.LuaConsole1.LuaImp.docs.FunctionList.OrderBy(x => x.ReturnType).ToList();
|
||||
GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.FunctionList = GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.FunctionList.OrderBy(x => x.ReturnType).ToList();
|
||||
break;
|
||||
case 1: //Library
|
||||
Global.MainForm.LuaConsole1.LuaImp.docs.FunctionList = Global.MainForm.LuaConsole1.LuaImp.docs.FunctionList.OrderBy(x => x.library).ToList();
|
||||
GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.FunctionList = GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.FunctionList.OrderBy(x => x.library).ToList();
|
||||
break;
|
||||
case 2: //Name
|
||||
Global.MainForm.LuaConsole1.LuaImp.docs.FunctionList = Global.MainForm.LuaConsole1.LuaImp.docs.FunctionList.OrderBy(x => x.name).ToList();
|
||||
GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.FunctionList = GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.FunctionList.OrderBy(x => x.name).ToList();
|
||||
break;
|
||||
case 3: //Parameters
|
||||
Global.MainForm.LuaConsole1.LuaImp.docs.FunctionList = Global.MainForm.LuaConsole1.LuaImp.docs.FunctionList.OrderBy(x => x.ParameterList).ToList();
|
||||
GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.FunctionList = GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.FunctionList.OrderBy(x => x.ParameterList).ToList();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
foreach (int index in indexes)
|
||||
{
|
||||
var library_function = Global.MainForm.LuaConsole1.LuaImp.docs.FunctionList[index];
|
||||
var library_function = GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.FunctionList[index];
|
||||
sb.Append(library_function.library).Append('.').Append(library_function.name).Append("()\n");
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -30,7 +30,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
FunctionView.Items.Clear();
|
||||
|
||||
List<NamedLuaFunction> nlfs = Global.MainForm.LuaConsole1.LuaImp.RegisteredFunctions.OrderBy(x => x.Event).ThenBy(x => x.Name).ToList();
|
||||
List<NamedLuaFunction> nlfs = GlobalWinF.MainForm.LuaConsole1.LuaImp.RegisteredFunctions.OrderBy(x => x.Event).ThenBy(x => x.Name).ToList();
|
||||
foreach (NamedLuaFunction nlf in nlfs)
|
||||
{
|
||||
ListViewItem item = new ListViewItem { Text = nlf.Event };
|
||||
|
@ -55,7 +55,7 @@ namespace BizHawk.MultiClient
|
|||
ListView.SelectedIndexCollection indexes = FunctionView.SelectedIndices;
|
||||
if (indexes.Count > 0)
|
||||
{
|
||||
Global.MainForm.LuaConsole1.LuaImp.RegisteredFunctions[indexes[0]].Call();
|
||||
GlobalWinF.MainForm.LuaConsole1.LuaImp.RegisteredFunctions[indexes[0]].Call();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,8 +64,8 @@ namespace BizHawk.MultiClient
|
|||
ListView.SelectedIndexCollection indexes = FunctionView.SelectedIndices;
|
||||
if (indexes.Count > 0)
|
||||
{
|
||||
NamedLuaFunction nlf = Global.MainForm.LuaConsole1.LuaImp.RegisteredFunctions[indexes[0]];
|
||||
Global.MainForm.LuaConsole1.LuaImp.RegisteredFunctions.Remove(nlf);
|
||||
NamedLuaFunction nlf = GlobalWinF.MainForm.LuaConsole1.LuaImp.RegisteredFunctions[indexes[0]];
|
||||
GlobalWinF.MainForm.LuaConsole1.LuaImp.RegisteredFunctions.Remove(nlf);
|
||||
PopulateListView();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient.tools
|
||||
{
|
||||
enum BoxType { ALL, SIGNED, UNSIGNED, HEX };
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
namespace BizHawk.MultiClient.tools
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
partial class LuaWinform
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Windows.Forms;
|
||||
using LuaInterface;
|
||||
|
||||
namespace BizHawk.MultiClient.tools
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class LuaWinform : Form
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ namespace BizHawk.MultiClient.tools
|
|||
|
||||
public void CloseThis()
|
||||
{
|
||||
Global.MainForm.LuaConsole1.LuaImp.WindowClosed(Handle);
|
||||
GlobalWinF.MainForm.LuaConsole1.LuaImp.WindowClosed(Handle);
|
||||
}
|
||||
|
||||
public void DoLuaEvent(IntPtr handle)
|
||||
|
|
|
@ -6,7 +6,8 @@ using System.Text;
|
|||
using System.Windows.Forms;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.IO;
|
||||
using BizHawk.MultiClient.tools;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
|
@ -433,7 +434,7 @@ namespace BizHawk.MultiClient
|
|||
private void GenerateLibraryRegex()
|
||||
{
|
||||
StringBuilder list = new StringBuilder();
|
||||
List<string> Libs = Global.MainForm.LuaConsole1.LuaImp.docs.GetLibraryList();
|
||||
List<string> Libs = GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.GetLibraryList();
|
||||
for (int i = 0; i < Libs.Count; i++)
|
||||
{
|
||||
list.Append(Libs[i]);
|
||||
|
@ -564,7 +565,7 @@ namespace BizHawk.MultiClient
|
|||
sfd.FileName = Path.GetFileNameWithoutExtension(currentFile);
|
||||
sfd.InitialDirectory = Path.GetDirectoryName(currentFile);
|
||||
}
|
||||
else if (!(Global.Emulator is NullEmulator))
|
||||
else if (!(GlobalWinF.Emulator is NullEmulator))
|
||||
{
|
||||
sfd.FileName = PathManager.FilesystemSafeName(Global.Game);
|
||||
sfd.InitialDirectory = PathManager.GetLuaPath();
|
||||
|
@ -576,9 +577,9 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
sfd.Filter = "Watch Files (*.lua)|*.lua|All Files|*.*";
|
||||
sfd.RestoreDirectory = true;
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
var result = sfd.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result != DialogResult.OK)
|
||||
return null;
|
||||
var file = new FileInfo(sfd.FileName);
|
||||
|
@ -658,7 +659,7 @@ namespace BizHawk.MultiClient
|
|||
string currentword = CurrentWord();
|
||||
if (IsLibraryWord(currentword))
|
||||
{
|
||||
List<string> libfunctions = Global.MainForm.LuaConsole1.LuaImp.docs.GetFunctionsByLibrary(currentword);
|
||||
List<string> libfunctions = GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.GetFunctionsByLibrary(currentword);
|
||||
|
||||
// Position autocomplete box near the cursor's current position
|
||||
int x = LuaText.GetPositionFromCharIndex(LuaText.SelectionStart).X + LuaText.Location.X + 5;
|
||||
|
@ -782,7 +783,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private bool IsLibraryWord(string word)
|
||||
{
|
||||
List<string> Libs = Global.MainForm.LuaConsole1.LuaImp.docs.GetLibraryList();
|
||||
List<string> Libs = GlobalWinF.MainForm.LuaConsole1.LuaImp.docs.GetLibraryList();
|
||||
if (Libs.Contains(word))
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
namespace BizHawk.MultiClient.tools
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
partial class LuaWriterColorConfig
|
||||
{
|
||||
|
|
|
@ -2,40 +2,42 @@
|
|||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BizHawk.MultiClient.tools
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class LuaWriterColorConfig : Form
|
||||
{
|
||||
//Get existing global Lua color settings
|
||||
//Get existing global Lua color settings
|
||||
int TextColor = Global.Config.LuaDefaultTextColor;
|
||||
int KeyWordColor = Global.Config.LuaKeyWordColor;
|
||||
int CommentColor = Global.Config.LuaCommentColor;
|
||||
int StringColor = Global.Config.LuaStringColor;
|
||||
int SymbolColor = Global.Config.LuaSymbolColor;
|
||||
int LibraryColor = Global.Config.LuaLibraryColor;
|
||||
int KeyWordColor = Global.Config.LuaKeyWordColor;
|
||||
int CommentColor = Global.Config.LuaCommentColor;
|
||||
int StringColor = Global.Config.LuaStringColor;
|
||||
int SymbolColor = Global.Config.LuaSymbolColor;
|
||||
int LibraryColor = Global.Config.LuaLibraryColor;
|
||||
|
||||
public LuaWriterColorConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void LuaWriterColorConfig_Load(object sender, EventArgs e)
|
||||
{
|
||||
//Set the initial colors into the panels
|
||||
private void LuaWriterColorConfig_Load(object sender, EventArgs e)
|
||||
{
|
||||
//Set the initial colors into the panels
|
||||
SetTextColor(TextColor);
|
||||
SetKeyWordColor(KeyWordColor);
|
||||
SetCommentColor(CommentColor);
|
||||
SetStringColor(StringColor);
|
||||
SetSymbolColor(SymbolColor);
|
||||
SetLibraryColor(LibraryColor);
|
||||
SetKeyWordColor(KeyWordColor);
|
||||
SetCommentColor(CommentColor);
|
||||
SetStringColor(StringColor);
|
||||
SetSymbolColor(SymbolColor);
|
||||
SetLibraryColor(LibraryColor);
|
||||
|
||||
BoldText.Checked = Global.Config.LuaDefaultTextBold;
|
||||
BoldKeyWords.Checked = Global.Config.LuaKeyWordBold;
|
||||
BoldComments.Checked = Global.Config.LuaCommentBold;
|
||||
BoldStrings.Checked = Global.Config.LuaStringBold;
|
||||
BoldSymbols.Checked = Global.Config.LuaSymbolBold;
|
||||
BoldLibraries.Checked = Global.Config.LuaLibraryBold;
|
||||
}
|
||||
BoldKeyWords.Checked = Global.Config.LuaKeyWordBold;
|
||||
BoldComments.Checked = Global.Config.LuaCommentBold;
|
||||
BoldStrings.Checked = Global.Config.LuaStringBold;
|
||||
BoldSymbols.Checked = Global.Config.LuaSymbolBold;
|
||||
BoldLibraries.Checked = Global.Config.LuaLibraryBold;
|
||||
}
|
||||
|
||||
private void SetTextColor(int color)
|
||||
{
|
||||
|
@ -43,35 +45,35 @@ namespace BizHawk.MultiClient.tools
|
|||
panelText.BackColor = Color.FromArgb(color); //Update panel color with new selection
|
||||
}
|
||||
|
||||
private void SetKeyWordColor(int color)
|
||||
{
|
||||
KeyWordColor = color; //Set new color
|
||||
panelKeyWord.BackColor = Color.FromArgb(color); //Update panel color with new selection
|
||||
}
|
||||
private void SetKeyWordColor(int color)
|
||||
{
|
||||
KeyWordColor = color; //Set new color
|
||||
panelKeyWord.BackColor = Color.FromArgb(color); //Update panel color with new selection
|
||||
}
|
||||
|
||||
private void SetCommentColor(int color)
|
||||
{
|
||||
CommentColor = color; //Set new color
|
||||
panelComment.BackColor = Color.FromArgb(color); //Update panel color with new selection
|
||||
}
|
||||
private void SetCommentColor(int color)
|
||||
{
|
||||
CommentColor = color; //Set new color
|
||||
panelComment.BackColor = Color.FromArgb(color); //Update panel color with new selection
|
||||
}
|
||||
|
||||
private void SetStringColor(int color)
|
||||
{
|
||||
StringColor = color; //Set new color
|
||||
panelString.BackColor = Color.FromArgb(color); //Update panel color with new selection
|
||||
}
|
||||
private void SetStringColor(int color)
|
||||
{
|
||||
StringColor = color; //Set new color
|
||||
panelString.BackColor = Color.FromArgb(color); //Update panel color with new selection
|
||||
}
|
||||
|
||||
private void SetSymbolColor(int color)
|
||||
{
|
||||
SymbolColor = color; //Set new color
|
||||
panelSymbol.BackColor = Color.FromArgb(color); //Update panel color with new selection
|
||||
}
|
||||
private void SetSymbolColor(int color)
|
||||
{
|
||||
SymbolColor = color; //Set new color
|
||||
panelSymbol.BackColor = Color.FromArgb(color); //Update panel color with new selection
|
||||
}
|
||||
|
||||
private void SetLibraryColor(int color)
|
||||
{
|
||||
LibraryColor = color; //Set new color
|
||||
private void SetLibraryColor(int color)
|
||||
{
|
||||
LibraryColor = color; //Set new color
|
||||
panelLibrary.BackColor = Color.FromArgb(color); //Update panel color with new selection
|
||||
}
|
||||
}
|
||||
|
||||
//Pop up color dialog when double-clicked
|
||||
private void panelText_DoubleClick(object sender, EventArgs e)
|
||||
|
@ -82,93 +84,93 @@ namespace BizHawk.MultiClient.tools
|
|||
}
|
||||
}
|
||||
|
||||
//Pop up color dialog when double-clicked
|
||||
private void panelKeyWord_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (KeyWordColorDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
SetKeyWordColor(KeyWordColorDialog.Color.ToArgb());
|
||||
}
|
||||
}
|
||||
|
||||
//Pop up color dialog when double-clicked
|
||||
private void panelComment_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (CommentColorDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
SetCommentColor(CommentColorDialog.Color.ToArgb());
|
||||
}
|
||||
}
|
||||
|
||||
//Pop up color dialog when double-clicked
|
||||
private void panelString_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (StringColorDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
SetStringColor(StringColorDialog.Color.ToArgb());
|
||||
}
|
||||
}
|
||||
|
||||
//Pop up color dialog when double-clicked
|
||||
private void panelSymbol_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (SymbolColorDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
SetSymbolColor(SymbolColorDialog.Color.ToArgb());
|
||||
}
|
||||
}
|
||||
|
||||
//Pop up color dialog when double-clicked
|
||||
private void panelLibrary_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (LibraryColorDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
SetLibraryColor(LibraryColorDialog.Color.ToArgb());
|
||||
LibraryColorDialog.Color = Color.FromArgb(10349567);
|
||||
}
|
||||
}
|
||||
|
||||
private void OK_Click(object sender, EventArgs e)
|
||||
//Pop up color dialog when double-clicked
|
||||
private void panelKeyWord_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveData(); //Save the chosen settings
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
if (KeyWordColorDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
SetKeyWordColor(KeyWordColorDialog.Color.ToArgb());
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveData()
|
||||
{
|
||||
//Colors
|
||||
Global.Config.LuaDefaultTextColor = TextColor;
|
||||
Global.Config.LuaKeyWordColor = KeyWordColor;
|
||||
Global.Config.LuaCommentColor = CommentColor;
|
||||
Global.Config.LuaStringColor = StringColor;
|
||||
Global.Config.LuaSymbolColor = SymbolColor;
|
||||
Global.Config.LuaLibraryColor = LibraryColor;
|
||||
|
||||
//Bold
|
||||
Global.Config.LuaDefaultTextBold = BoldText.Checked;
|
||||
Global.Config.LuaKeyWordBold = BoldKeyWords.Checked;
|
||||
Global.Config.LuaCommentBold = BoldComments.Checked;
|
||||
Global.Config.LuaStringBold = BoldStrings.Checked;
|
||||
Global.Config.LuaSymbolBold = BoldSymbols.Checked;
|
||||
Global.Config.LuaLibraryBold = BoldLibraries.Checked;
|
||||
}
|
||||
//Pop up color dialog when double-clicked
|
||||
private void panelComment_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (CommentColorDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
SetCommentColor(CommentColorDialog.Color.ToArgb());
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonDefaults_Click(object sender, EventArgs e)
|
||||
{
|
||||
//Pop up color dialog when double-clicked
|
||||
private void panelString_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (StringColorDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
SetStringColor(StringColorDialog.Color.ToArgb());
|
||||
}
|
||||
}
|
||||
|
||||
//Pop up color dialog when double-clicked
|
||||
private void panelSymbol_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (SymbolColorDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
SetSymbolColor(SymbolColorDialog.Color.ToArgb());
|
||||
}
|
||||
}
|
||||
|
||||
//Pop up color dialog when double-clicked
|
||||
private void panelLibrary_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (LibraryColorDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
SetLibraryColor(LibraryColorDialog.Color.ToArgb());
|
||||
LibraryColorDialog.Color = Color.FromArgb(10349567);
|
||||
}
|
||||
}
|
||||
|
||||
private void OK_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveData(); //Save the chosen settings
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void SaveData()
|
||||
{
|
||||
//Colors
|
||||
Global.Config.LuaDefaultTextColor = TextColor;
|
||||
Global.Config.LuaKeyWordColor = KeyWordColor;
|
||||
Global.Config.LuaCommentColor = CommentColor;
|
||||
Global.Config.LuaStringColor = StringColor;
|
||||
Global.Config.LuaSymbolColor = SymbolColor;
|
||||
Global.Config.LuaLibraryColor = LibraryColor;
|
||||
|
||||
//Bold
|
||||
Global.Config.LuaDefaultTextBold = BoldText.Checked;
|
||||
Global.Config.LuaKeyWordBold = BoldKeyWords.Checked;
|
||||
Global.Config.LuaCommentBold = BoldComments.Checked;
|
||||
Global.Config.LuaStringBold = BoldStrings.Checked;
|
||||
Global.Config.LuaSymbolBold = BoldSymbols.Checked;
|
||||
Global.Config.LuaLibraryBold = BoldLibraries.Checked;
|
||||
}
|
||||
|
||||
private void buttonDefaults_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetTextColor(-16777216);
|
||||
SetKeyWordColor(-16776961);
|
||||
SetCommentColor(-16744448);
|
||||
SetStringColor(-8355712);
|
||||
SetSymbolColor(-16777216);
|
||||
SetKeyWordColor(-16776961);
|
||||
SetCommentColor(-16744448);
|
||||
SetStringColor(-8355712);
|
||||
SetSymbolColor(-16777216);
|
||||
SetLibraryColor(-16711681);
|
||||
|
||||
BoldText.Checked = false;
|
||||
BoldKeyWords.Checked = false;
|
||||
BoldComments.Checked = false;
|
||||
BoldStrings.Checked = false;
|
||||
BoldSymbols.Checked = false;
|
||||
BoldLibraries.Checked = false;
|
||||
}
|
||||
}
|
||||
BoldKeyWords.Checked = false;
|
||||
BoldComments.Checked = false;
|
||||
BoldStrings.Checked = false;
|
||||
BoldSymbols.Checked = false;
|
||||
BoldLibraries.Checked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class N64VideoPluginconfig : Form
|
||||
|
@ -38,7 +40,7 @@ namespace BizHawk.MultiClient
|
|||
Global.Config.N64VideoSizeX = Int32.Parse(strArr[0].Trim());
|
||||
Global.Config.N64VideoSizeY = Int32.Parse(strArr[1].Trim());
|
||||
Global.Config.N64VidPlugin = PluginComboBox.Text;
|
||||
Global.MainForm.FlagNeedsReboot(); //TODO: this won't always be necessary, keep that in mind
|
||||
GlobalWinF.MainForm.FlagNeedsReboot(); //TODO: this won't always be necessary, keep that in mind
|
||||
|
||||
//Rice
|
||||
Global.Config.RicePlugin.NormalAlphaBlender = RiceNormalAlphaBlender_CB.Checked;
|
||||
|
|
|
@ -4,6 +4,8 @@ using System.Drawing;
|
|||
using System.Windows.Forms;
|
||||
using BizHawk.Emulation.Consoles.Nintendo;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class NESDebugger : Form
|
||||
|
@ -38,9 +40,9 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public void Restart()
|
||||
{
|
||||
if (!(Global.Emulator is NES)) Close();
|
||||
if (!(GlobalWinF.Emulator is NES)) Close();
|
||||
if (!IsHandleCreated || IsDisposed) return;
|
||||
_nes = Global.Emulator as NES;
|
||||
_nes = GlobalWinF.Emulator as NES;
|
||||
}
|
||||
|
||||
public void UpdateValues()
|
||||
|
@ -78,7 +80,7 @@ namespace BizHawk.MultiClient
|
|||
private void NESDebugger_Load(object sender, EventArgs e)
|
||||
{
|
||||
LoadConfigSettings();
|
||||
_nes = Global.Emulator as NES;
|
||||
_nes = GlobalWinF.Emulator as NES;
|
||||
}
|
||||
|
||||
private void LoadConfigSettings()
|
||||
|
|
|
@ -3,6 +3,8 @@ using System.Collections.Generic;
|
|||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.Globalization;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
using BizHawk.Emulation.Consoles.Nintendo;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
|
@ -351,7 +353,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void AddCheatClick()
|
||||
{
|
||||
if (Global.Emulator is NES)
|
||||
if (GlobalWinF.Emulator is NES)
|
||||
{
|
||||
if (String.IsNullOrWhiteSpace(AddressBox.Text) || (String.IsNullOrWhiteSpace(ValueBox.Text)))
|
||||
{
|
||||
|
@ -359,7 +361,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
|
||||
Watch watch = Watch.GenerateWatch(
|
||||
Global.Emulator.MemoryDomains[1], /*System Bus*/
|
||||
GlobalWinF.Emulator.MemoryDomains[1], /*System Bus*/
|
||||
AddressBox.ToRawInt(),
|
||||
Watch.WatchSize.Byte,
|
||||
Watch.DisplayType.Hex,
|
||||
|
@ -372,13 +374,13 @@ namespace BizHawk.MultiClient
|
|||
compare = CompareBox.ToRawInt();
|
||||
}
|
||||
|
||||
Global.CheatList.Add(new Cheat(
|
||||
GlobalWinF.CheatList.Add(new Cheat(
|
||||
watch,
|
||||
ValueBox.ToRawInt(),
|
||||
compare,
|
||||
enabled: true));
|
||||
|
||||
Global.MainForm.Cheats_UpdateValues();
|
||||
GlobalWinF.MainForm.Cheats_UpdateValues();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@ using System.Drawing;
|
|||
using System.Windows.Forms;
|
||||
using BizHawk.Emulation.Consoles.Nintendo;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class NESGraphicsConfig : Form
|
||||
|
@ -22,7 +24,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void NESGraphicsConfig_Load(object sender, EventArgs e)
|
||||
{
|
||||
nes = Global.Emulator as NES;
|
||||
nes = GlobalWinF.Emulator as NES;
|
||||
LoadStuff();
|
||||
}
|
||||
|
||||
|
@ -73,7 +75,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
Global.Config.NESPaletteFile = palette.Name;
|
||||
nes.SetPalette(NES.Palettes.Load_FCEUX_Palette(HawkFile.ReadAllBytes(palette.Name)));
|
||||
Global.OSD.AddMessage("Palette file loaded: " + palette.Name);
|
||||
GlobalWinF.OSD.AddMessage("Palette file loaded: " + palette.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -81,7 +83,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
Global.Config.NESPaletteFile = "";
|
||||
nes.SetPalette(NES.Palettes.FCEUX_Standard);
|
||||
Global.OSD.AddMessage("Standard Palette set");
|
||||
GlobalWinF.OSD.AddMessage("Standard Palette set");
|
||||
}
|
||||
|
||||
Global.Config.NTSC_NESTopLine = (int)NTSC_FirstLineNumeric.Value;
|
||||
|
|
|
@ -4,6 +4,8 @@ using System.Drawing.Imaging;
|
|||
using System.Windows.Forms;
|
||||
using BizHawk.Emulation.Consoles.Nintendo;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class NESNameTableViewer : Form
|
||||
|
@ -35,7 +37,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
if (now == false)
|
||||
{
|
||||
if (Global.Emulator.Frame % RefreshRate.Value != 0) return;
|
||||
if (GlobalWinF.Emulator.Frame % RefreshRate.Value != 0) return;
|
||||
}
|
||||
|
||||
BitmapData bmpdata = NameTableView.Nametables.LockBits(new Rectangle(0, 0, 512, 480), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
|
@ -105,15 +107,15 @@ namespace BizHawk.MultiClient
|
|||
public void UpdateValues()
|
||||
{
|
||||
if (!IsHandleCreated || IsDisposed) return;
|
||||
if (!(Global.Emulator is NES)) return;
|
||||
NES.PPU ppu = (Global.Emulator as NES).ppu;
|
||||
if (!(GlobalWinF.Emulator is NES)) return;
|
||||
NES.PPU ppu = (GlobalWinF.Emulator as NES).ppu;
|
||||
ppu.NTViewCallback = Callback;
|
||||
}
|
||||
|
||||
public void Restart()
|
||||
{
|
||||
if (!(Global.Emulator is NES)) Close();
|
||||
_nes = Global.Emulator as NES;
|
||||
if (!(GlobalWinF.Emulator is NES)) Close();
|
||||
_nes = GlobalWinF.Emulator as NES;
|
||||
Generate(true);
|
||||
}
|
||||
|
||||
|
@ -122,7 +124,7 @@ namespace BizHawk.MultiClient
|
|||
if (Global.Config.NESNameTableSaveWindowPosition && Global.Config.NESNameTableWndx >= 0 && Global.Config.NESNameTableWndy >= 0)
|
||||
Location = new Point(Global.Config.NESNameTableWndx, Global.Config.NESNameTableWndy);
|
||||
|
||||
_nes = Global.Emulator as NES;
|
||||
_nes = GlobalWinF.Emulator as NES;
|
||||
RefreshRate.Value = Global.Config.NESNameTableRefreshRate;
|
||||
Generate(true);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.Globalization;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
using BizHawk.Emulation.Consoles.Nintendo;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
|
@ -50,9 +52,9 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public void Restart()
|
||||
{
|
||||
if (!(Global.Emulator is NES)) Close();
|
||||
if (!(GlobalWinF.Emulator is NES)) Close();
|
||||
if (!IsHandleCreated || IsDisposed) return;
|
||||
_nes = Global.Emulator as NES;
|
||||
_nes = GlobalWinF.Emulator as NES;
|
||||
Generate(true);
|
||||
}
|
||||
|
||||
|
@ -99,7 +101,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (!IsHandleCreated || IsDisposed) return;
|
||||
|
||||
if (Global.Emulator.Frame % RefreshRate.Value == 0 || now)
|
||||
if (GlobalWinF.Emulator.Frame % RefreshRate.Value == 0 || now)
|
||||
{
|
||||
bool Changed = CheckChange();
|
||||
|
||||
|
@ -231,14 +233,14 @@ namespace BizHawk.MultiClient
|
|||
public void UpdateValues()
|
||||
{
|
||||
if (!IsHandleCreated || IsDisposed) return;
|
||||
if (!(Global.Emulator is NES)) return;
|
||||
if (!(GlobalWinF.Emulator is NES)) return;
|
||||
_nes.ppu.PPUViewCallback = Callback;
|
||||
}
|
||||
|
||||
private void NESPPU_Load(object sender, EventArgs e)
|
||||
{
|
||||
LoadConfigSettings();
|
||||
_nes = Global.Emulator as NES;
|
||||
_nes = GlobalWinF.Emulator as NES;
|
||||
ClearDetails();
|
||||
RefreshRate.Value = Global.Config.NESPPURefreshRate;
|
||||
Generate(true);
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class NESSoundConfig : Form
|
||||
|
@ -45,7 +47,7 @@ namespace BizHawk.MultiClient
|
|||
Global.Config.NESTriangle = tr;
|
||||
Global.Config.NESNoise = no;
|
||||
Global.Config.NESDMC = dmc;
|
||||
Global.MainForm.SetNESSoundChannels();
|
||||
GlobalWinF.MainForm.SetNESSoundChannels();
|
||||
Close();
|
||||
}
|
||||
|
||||
|
@ -75,35 +77,35 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
label6.Text = trackBar1.Value.ToString();
|
||||
Global.Config.NESSquare1 = trackBar1.Value;
|
||||
Global.MainForm.SetNESSoundChannels();
|
||||
GlobalWinF.MainForm.SetNESSoundChannels();
|
||||
}
|
||||
|
||||
private void trackBar2_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
label7.Text = trackBar2.Value.ToString();
|
||||
Global.Config.NESSquare2 = trackBar2.Value;
|
||||
Global.MainForm.SetNESSoundChannels();
|
||||
GlobalWinF.MainForm.SetNESSoundChannels();
|
||||
}
|
||||
|
||||
private void trackBar3_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
label8.Text = trackBar3.Value.ToString();
|
||||
Global.Config.NESTriangle = trackBar3.Value;
|
||||
Global.MainForm.SetNESSoundChannels();
|
||||
GlobalWinF.MainForm.SetNESSoundChannels();
|
||||
}
|
||||
|
||||
private void trackBar4_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
label9.Text = trackBar4.Value.ToString();
|
||||
Global.Config.NESNoise = trackBar4.Value;
|
||||
Global.MainForm.SetNESSoundChannels();
|
||||
GlobalWinF.MainForm.SetNESSoundChannels();
|
||||
}
|
||||
|
||||
private void trackBar5_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
label10.Text = trackBar5.Value.ToString();
|
||||
Global.Config.NESDMC = trackBar5.Value;
|
||||
Global.MainForm.SetNESSoundChannels();
|
||||
GlobalWinF.MainForm.SetNESSoundChannels();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ using System.Windows.Forms;
|
|||
using System.IO;
|
||||
using System.Drawing.Imaging;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public sealed class NameTableViewer : Control
|
||||
|
@ -74,9 +76,9 @@ namespace BizHawk.MultiClient
|
|||
RestoreDirectory = true
|
||||
};
|
||||
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
var result = sfd.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result != DialogResult.OK)
|
||||
{
|
||||
return;
|
||||
|
|
|
@ -3,6 +3,8 @@ using System.Windows.Forms;
|
|||
using System.IO;
|
||||
using System.Drawing.Imaging;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public sealed class PaletteViewer : Control
|
||||
|
@ -81,9 +83,9 @@ namespace BizHawk.MultiClient
|
|||
RestoreDirectory = true
|
||||
};
|
||||
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
var result = sfd.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result != DialogResult.OK)
|
||||
return;
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@ using System.Windows.Forms;
|
|||
using System.IO;
|
||||
using System.Drawing.Imaging;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public sealed class PatternViewer : Control
|
||||
|
@ -42,9 +44,9 @@ namespace BizHawk.MultiClient
|
|||
RestoreDirectory = true
|
||||
};
|
||||
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
var result = sfd.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result != DialogResult.OK)
|
||||
return;
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@ using System.Windows.Forms;
|
|||
using System.IO;
|
||||
using System.Drawing.Imaging;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public sealed class SpriteViewer : Control
|
||||
|
@ -47,9 +49,9 @@ namespace BizHawk.MultiClient
|
|||
RestoreDirectory = true
|
||||
};
|
||||
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
var result = sfd.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result != DialogResult.OK)
|
||||
return;
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.Drawing.Imaging;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
using BizHawk.Emulation.Consoles.TurboGrafx;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
|
@ -20,7 +22,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public unsafe void Generate()
|
||||
{
|
||||
if (Global.Emulator.Frame % RefreshRate.Value != 0) return;
|
||||
if (GlobalWinF.Emulator.Frame % RefreshRate.Value != 0) return;
|
||||
|
||||
VDC vdc = VDCtype == 0 ? pce.VDC1 : pce.VDC2;
|
||||
|
||||
|
@ -65,18 +67,18 @@ namespace BizHawk.MultiClient
|
|||
public void Restart()
|
||||
{
|
||||
if (!IsHandleCreated || IsDisposed) return;
|
||||
if (!(Global.Emulator is PCEngine))
|
||||
if (!(GlobalWinF.Emulator is PCEngine))
|
||||
{
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
pce = Global.Emulator as PCEngine;
|
||||
pce = GlobalWinF.Emulator as PCEngine;
|
||||
}
|
||||
|
||||
public void UpdateValues()
|
||||
{
|
||||
if (!IsHandleCreated || IsDisposed) return;
|
||||
if (!(Global.Emulator is PCEngine)) return;
|
||||
if (!(GlobalWinF.Emulator is PCEngine)) return;
|
||||
Generate();
|
||||
}
|
||||
|
||||
|
@ -95,7 +97,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void PCEBGViewer_Load(object sender, EventArgs e)
|
||||
{
|
||||
pce = Global.Emulator as PCEngine;
|
||||
pce = GlobalWinF.Emulator as PCEngine;
|
||||
LoadConfigSettings();
|
||||
if (Global.Config.PCEBGViewerRefreshRate >= RefreshRate.Minimum && Global.Config.PCEBGViewerRefreshRate <= RefreshRate.Maximum)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class PCEGraphicsConfig : Form
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class SMSGraphicsConfig : Form
|
||||
|
|
|
@ -6,6 +6,8 @@ using System.Globalization;
|
|||
using System.Text.RegularExpressions;
|
||||
using BizHawk.Emulation.Consoles.Nintendo.SNES;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class SNESGameGenie : Form
|
||||
|
@ -13,7 +15,7 @@ namespace BizHawk.MultiClient
|
|||
private readonly Dictionary<char, int> GameGenieTable = new Dictionary<char, int>();
|
||||
private bool Processing = false;
|
||||
|
||||
public SNESGameGenie()
|
||||
public SNESGameGenie()
|
||||
{
|
||||
InitializeComponent();
|
||||
Closing += (o, e) => SaveConfigSettings();
|
||||
|
@ -291,7 +293,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void AddCheat_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.Emulator is LibsnesCore)
|
||||
if (GlobalWinF.Emulator is LibsnesCore)
|
||||
{
|
||||
string NAME;
|
||||
int ADDRESS = 0;
|
||||
|
@ -321,9 +323,9 @@ namespace BizHawk.MultiClient
|
|||
VALUE = (byte)(int.Parse(ValueBox.Text, NumberStyles.HexNumber));
|
||||
}
|
||||
|
||||
for (int i = 0; i < Global.Emulator.MemoryDomains.Count; i++)
|
||||
for (int i = 0; i < GlobalWinF.Emulator.MemoryDomains.Count; i++)
|
||||
{
|
||||
if (Global.Emulator.MemoryDomains[i].ToString() == "BUS")
|
||||
if (GlobalWinF.Emulator.MemoryDomains[i].ToString() == "BUS")
|
||||
{
|
||||
sysBusIndex = i;
|
||||
break;
|
||||
|
@ -331,7 +333,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
|
||||
Watch watch = Watch.GenerateWatch(
|
||||
Global.Emulator.MemoryDomains[sysBusIndex],
|
||||
GlobalWinF.Emulator.MemoryDomains[sysBusIndex],
|
||||
ADDRESS,
|
||||
Watch.WatchSize.Byte,
|
||||
Watch.DisplayType.Hex,
|
||||
|
@ -339,7 +341,7 @@ namespace BizHawk.MultiClient
|
|||
bigEndian: false
|
||||
);
|
||||
|
||||
Global.CheatList.Add(new Cheat(
|
||||
GlobalWinF.CheatList.Add(new Cheat(
|
||||
watch,
|
||||
VALUE,
|
||||
compare: null,
|
||||
|
|
|
@ -28,6 +28,8 @@ using System.Collections.Generic;
|
|||
using System.Drawing;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
using BizHawk.Emulation.Consoles.Nintendo.SNES;
|
||||
using BizHawk.Core;
|
||||
|
||||
|
@ -152,7 +154,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
void SyncCore()
|
||||
{
|
||||
LibsnesCore core = Global.Emulator as LibsnesCore;
|
||||
LibsnesCore core = GlobalWinF.Emulator as LibsnesCore;
|
||||
if (currentSnesCore != core && currentSnesCore != null)
|
||||
{
|
||||
currentSnesCore.ScanlineHookManager.Unregister(this);
|
||||
|
@ -1384,7 +1386,7 @@ namespace BizHawk.MultiClient
|
|||
suppression = false;
|
||||
}
|
||||
|
||||
Global.MainForm.SyncCoreCommInputSignals();
|
||||
GlobalWinF.MainForm.SyncCoreCommInputSignals();
|
||||
}
|
||||
|
||||
private void lblEnPrio0_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
namespace BizHawk.MultiClient.SATTools
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
partial class SaturnPrefs
|
||||
{
|
||||
|
|
|
@ -7,7 +7,9 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BizHawk.MultiClient.SATTools
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class SaturnPrefs : Form
|
||||
{
|
||||
|
|
|
@ -2,13 +2,15 @@
|
|||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
class StateVisualizer
|
||||
{
|
||||
public StateVisualizer()
|
||||
{
|
||||
TimeLine movietimeline = new TimeLine(Global.MovieSession.Movie.LogDump);
|
||||
TimeLine movietimeline = new TimeLine(GlobalWinF.MovieSession.Movie.LogDump);
|
||||
|
||||
Timelines = new List<TimeLine> {movietimeline};
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
components.Dispose();
|
||||
}
|
||||
|
||||
Global.MovieSession.Movie.StateCapturing = false;
|
||||
GlobalWinF.MovieSession.Movie.StateCapturing = false;
|
||||
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@ using System.ComponentModel;
|
|||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class TAStudio : Form
|
||||
|
@ -60,7 +62,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (!IsHandleCreated || IsDisposed) return;
|
||||
TASView.BlazingFast = true;
|
||||
if (Global.MovieSession.Movie.IsActive)
|
||||
if (GlobalWinF.MovieSession.Movie.IsActive)
|
||||
{
|
||||
DisplayList();
|
||||
}
|
||||
|
@ -69,14 +71,14 @@ namespace BizHawk.MultiClient
|
|||
TASView.ItemCount = 0;
|
||||
}
|
||||
|
||||
if (Global.MovieSession.Movie.IsPlaying && !Global.MovieSession.Movie.IsFinished)
|
||||
if (GlobalWinF.MovieSession.Movie.IsPlaying && !GlobalWinF.MovieSession.Movie.IsFinished)
|
||||
{
|
||||
TASView.BlazingFast = false;
|
||||
}
|
||||
|
||||
if (Global.Emulator.Frame < stopOnFrame)
|
||||
if (GlobalWinF.Emulator.Frame < stopOnFrame)
|
||||
{
|
||||
Global.MainForm.PressFrameAdvance = true;
|
||||
GlobalWinF.MainForm.PressFrameAdvance = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,28 +99,28 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void TASView_QueryItemBkColor(int index, int column, ref Color color)
|
||||
{
|
||||
if (index == 0 && Global.MovieSession.Movie.StateFirstIndex == 0)
|
||||
if (index == 0 && GlobalWinF.MovieSession.Movie.StateFirstIndex == 0)
|
||||
{
|
||||
if (color != Color.LightGreen)
|
||||
{
|
||||
color = Color.LightGreen; //special case for frame 0. Normally we need to go back an extra frame, but for frame 0 we can reload the rom.
|
||||
}
|
||||
}
|
||||
else if (Global.MovieSession.Movie.FrameLagged(index))
|
||||
else if (GlobalWinF.MovieSession.Movie.FrameLagged(index))
|
||||
{
|
||||
if (color != Color.Pink)
|
||||
{
|
||||
color = Color.Pink;
|
||||
}
|
||||
}
|
||||
else if (index > Global.MovieSession.Movie.StateFirstIndex && index <= Global.MovieSession.Movie.StateLastIndex)
|
||||
else if (index > GlobalWinF.MovieSession.Movie.StateFirstIndex && index <= GlobalWinF.MovieSession.Movie.StateLastIndex)
|
||||
{
|
||||
if (color != Color.LightGreen)
|
||||
{
|
||||
color = Color.LightGreen;
|
||||
}
|
||||
}
|
||||
if (index == Global.Emulator.Frame)
|
||||
if (index == GlobalWinF.Emulator.Frame)
|
||||
{
|
||||
if (color != Color.LightBlue)
|
||||
{
|
||||
|
@ -132,24 +134,24 @@ namespace BizHawk.MultiClient
|
|||
text = "";
|
||||
|
||||
//If this is just for an actual frame and not just the list view cursor at the end
|
||||
if (Global.MovieSession.Movie.Frames != index)
|
||||
if (GlobalWinF.MovieSession.Movie.Frames != index)
|
||||
{
|
||||
if (column == 0)
|
||||
text = String.Format("{0:#,##0}", index);
|
||||
if (column == 1)
|
||||
text = Global.MovieSession.Movie.GetInput(index);
|
||||
text = GlobalWinF.MovieSession.Movie.GetInput(index);
|
||||
}
|
||||
}
|
||||
|
||||
private void DisplayList()
|
||||
{
|
||||
TASView.ItemCount = Global.MovieSession.Movie.RawFrames;
|
||||
if (Global.MovieSession.Movie.Frames == Global.Emulator.Frame && Global.MovieSession.Movie.StateLastIndex == Global.Emulator.Frame - 1)
|
||||
TASView.ItemCount = GlobalWinF.MovieSession.Movie.RawFrames;
|
||||
if (GlobalWinF.MovieSession.Movie.Frames == GlobalWinF.Emulator.Frame && GlobalWinF.MovieSession.Movie.StateLastIndex == GlobalWinF.Emulator.Frame - 1)
|
||||
{
|
||||
//If we're at the end of the movie add one to show the cursor as a blank frame
|
||||
TASView.ItemCount++;
|
||||
}
|
||||
TASView.ensureVisible(Global.Emulator.Frame - 1);
|
||||
TASView.ensureVisible(GlobalWinF.Emulator.Frame - 1);
|
||||
}
|
||||
|
||||
public void Restart()
|
||||
|
@ -163,13 +165,13 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
//TODO: don't engage until new/open project
|
||||
//
|
||||
Global.MainForm.PauseEmulator();
|
||||
GlobalWinF.MainForm.PauseEmulator();
|
||||
Engaged = true;
|
||||
Global.OSD.AddMessage("TAStudio engaged");
|
||||
if (Global.MovieSession.Movie.IsActive)
|
||||
GlobalWinF.OSD.AddMessage("TAStudio engaged");
|
||||
if (GlobalWinF.MovieSession.Movie.IsActive)
|
||||
{
|
||||
Global.MovieSession.Movie.StateCapturing = true;
|
||||
ReadOnlyCheckBox.Checked = Global.MainForm.ReadOnly;
|
||||
GlobalWinF.MovieSession.Movie.StateCapturing = true;
|
||||
ReadOnlyCheckBox.Checked = GlobalWinF.MainForm.ReadOnly;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -245,36 +247,36 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void StopButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.StopMovie();
|
||||
GlobalWinF.MainForm.StopMovie();
|
||||
Restart();
|
||||
}
|
||||
|
||||
private void FrameAdvanceButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.PressFrameAdvance = true;
|
||||
GlobalWinF.MainForm.PressFrameAdvance = true;
|
||||
}
|
||||
|
||||
private void RewindButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
stopOnFrame = 0;
|
||||
if (Global.MovieSession.Movie.IsFinished || !Global.MovieSession.Movie.IsActive)
|
||||
if (GlobalWinF.MovieSession.Movie.IsFinished || !GlobalWinF.MovieSession.Movie.IsActive)
|
||||
{
|
||||
Global.MainForm.Rewind(1);
|
||||
if (Global.Emulator.Frame <= Global.MovieSession.Movie.Frames)
|
||||
GlobalWinF.MainForm.Rewind(1);
|
||||
if (GlobalWinF.Emulator.Frame <= GlobalWinF.MovieSession.Movie.Frames)
|
||||
{
|
||||
Global.MovieSession.Movie.SwitchToPlay();
|
||||
GlobalWinF.MovieSession.Movie.SwitchToPlay();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.MovieSession.Movie.RewindToFrame(Global.Emulator.Frame - 1);
|
||||
GlobalWinF.MovieSession.Movie.RewindToFrame(GlobalWinF.Emulator.Frame - 1);
|
||||
}
|
||||
UpdateValues();
|
||||
}
|
||||
|
||||
private void PauseButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.TogglePause();
|
||||
GlobalWinF.MainForm.TogglePause();
|
||||
}
|
||||
|
||||
private void autoloadToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -286,22 +288,22 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (ReadOnlyCheckBox.Checked)
|
||||
{
|
||||
Global.MainForm.SetReadOnly(true);
|
||||
GlobalWinF.MainForm.SetReadOnly(true);
|
||||
ReadOnlyCheckBox.BackColor = SystemColors.Control;
|
||||
|
||||
if (Global.MovieSession.Movie.IsActive)
|
||||
if (GlobalWinF.MovieSession.Movie.IsActive)
|
||||
{
|
||||
Global.MovieSession.Movie.SwitchToPlay();
|
||||
GlobalWinF.MovieSession.Movie.SwitchToPlay();
|
||||
toolTip1.SetToolTip(ReadOnlyCheckBox, "Currently Read-Only Mode");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.MainForm.SetReadOnly(false);
|
||||
GlobalWinF.MainForm.SetReadOnly(false);
|
||||
ReadOnlyCheckBox.BackColor = Color.LightCoral;
|
||||
if (Global.MovieSession.Movie.IsActive)
|
||||
if (GlobalWinF.MovieSession.Movie.IsActive)
|
||||
{
|
||||
Global.MovieSession.Movie.SwitchToRecord();
|
||||
GlobalWinF.MovieSession.Movie.SwitchToRecord();
|
||||
toolTip1.SetToolTip(ReadOnlyCheckBox, "Currently Read+Write Mode");
|
||||
}
|
||||
}
|
||||
|
@ -309,7 +311,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void RewindToBeginning_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.Rewind(Global.Emulator.Frame);
|
||||
GlobalWinF.MainForm.Rewind(GlobalWinF.Emulator.Frame);
|
||||
DisplayList();
|
||||
}
|
||||
|
||||
|
@ -318,7 +320,7 @@ namespace BizHawk.MultiClient
|
|||
//TODO: adelikat: I removed the stop on frame feature, so this will keep playing into movie finished mode, need to rebuild that functionality
|
||||
|
||||
FastFowardToEnd.Checked ^= true;
|
||||
Global.MainForm.FastForward = FastFowardToEnd.Checked;
|
||||
GlobalWinF.MainForm.FastForward = FastFowardToEnd.Checked;
|
||||
if (FastFowardToEnd.Checked)
|
||||
{
|
||||
FastForward.Checked = false;
|
||||
|
@ -369,17 +371,17 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void newProjectToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.RecordMovie();
|
||||
GlobalWinF.MainForm.RecordMovie();
|
||||
}
|
||||
|
||||
private void openProjectToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.PlayMovie();
|
||||
GlobalWinF.MainForm.PlayMovie();
|
||||
}
|
||||
|
||||
private void saveProjectToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MovieSession.Movie.WriteMovie();
|
||||
GlobalWinF.MovieSession.Movie.WriteMovie();
|
||||
}
|
||||
|
||||
private void saveProjectAsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -388,15 +390,15 @@ namespace BizHawk.MultiClient
|
|||
|
||||
if ("" != fileName)
|
||||
{
|
||||
Global.MovieSession.Movie.Filename = fileName;
|
||||
Global.MovieSession.Movie.WriteMovie();
|
||||
GlobalWinF.MovieSession.Movie.Filename = fileName;
|
||||
GlobalWinF.MovieSession.Movie.WriteMovie();
|
||||
}
|
||||
}
|
||||
|
||||
private void FastForward_Click(object sender, EventArgs e)
|
||||
{
|
||||
FastForward.Checked ^= true;
|
||||
Global.MainForm.FastForward = FastForward.Checked;
|
||||
GlobalWinF.MainForm.FastForward = FastForward.Checked;
|
||||
if (FastForward.Checked)
|
||||
{
|
||||
TurboFastForward.Checked = false;
|
||||
|
@ -406,7 +408,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void TurboFastForward_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.TurboFastForward ^= true;
|
||||
GlobalWinF.MainForm.TurboFastForward ^= true;
|
||||
TurboFastForward.Checked ^= true;
|
||||
if (TurboFastForward.Checked)
|
||||
{
|
||||
|
@ -422,16 +424,16 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void TASView_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (TASView.selectedItem <= Global.MovieSession.Movie.StateLastIndex)
|
||||
if (TASView.selectedItem <= GlobalWinF.MovieSession.Movie.StateLastIndex)
|
||||
{
|
||||
stopOnFrame = 0;
|
||||
Global.MovieSession.Movie.RewindToFrame(TASView.selectedItem);
|
||||
GlobalWinF.MovieSession.Movie.RewindToFrame(TASView.selectedItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.MovieSession.Movie.RewindToFrame(Global.MovieSession.Movie.StateLastIndex);
|
||||
GlobalWinF.MovieSession.Movie.RewindToFrame(GlobalWinF.MovieSession.Movie.StateLastIndex);
|
||||
stopOnFrame = TASView.selectedItem;
|
||||
Global.MainForm.PressFrameAdvance = true;
|
||||
GlobalWinF.MainForm.PressFrameAdvance = true;
|
||||
}
|
||||
|
||||
UpdateValues();
|
||||
|
@ -453,14 +455,14 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPath, null),
|
||||
DefaultExt = "." + Global.Config.MovieExtension,
|
||||
FileName = Global.MovieSession.Movie.Filename
|
||||
FileName = GlobalWinF.MovieSession.Movie.Filename
|
||||
};
|
||||
string filter = "Movie Files (*." + Global.Config.MovieExtension + ")|*." + Global.Config.MovieExtension + "|Savestates|*.state|All Files|*.*";
|
||||
sfd.Filter = filter;
|
||||
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
var result = sfd.ShowDialog();
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
return sfd.FileName;
|
||||
|
@ -478,11 +480,11 @@ namespace BizHawk.MultiClient
|
|||
|
||||
if (e.Delta > 0) //Scroll up
|
||||
{
|
||||
Global.MovieSession.Movie.RewindToFrame(Global.Emulator.Frame - 1);
|
||||
GlobalWinF.MovieSession.Movie.RewindToFrame(GlobalWinF.Emulator.Frame - 1);
|
||||
}
|
||||
else if (e.Delta < 0) //Scroll down
|
||||
{
|
||||
Global.MainForm.PressFrameAdvance = true;
|
||||
GlobalWinF.MainForm.PressFrameAdvance = true;
|
||||
}
|
||||
|
||||
UpdateValues();
|
||||
|
@ -535,7 +537,7 @@ namespace BizHawk.MultiClient
|
|||
ListView.SelectedIndexCollection list = TASView.SelectedIndices;
|
||||
for (int index = 0; index < list.Count; index++)
|
||||
{
|
||||
Global.MovieSession.Movie.InsertBlankFrame(list[index]);
|
||||
GlobalWinF.MovieSession.Movie.InsertBlankFrame(list[index]);
|
||||
}
|
||||
|
||||
UpdateValues();
|
||||
|
@ -546,7 +548,7 @@ namespace BizHawk.MultiClient
|
|||
ListView.SelectedIndexCollection list = TASView.SelectedIndices;
|
||||
foreach (object t in list)
|
||||
{
|
||||
Global.MovieSession.Movie.DeleteFrame(list[0]); //TODO: this doesn't allow of non-continuous deletion, instead it should iterate from last to first and remove the iterated value
|
||||
GlobalWinF.MovieSession.Movie.DeleteFrame(list[0]); //TODO: this doesn't allow of non-continuous deletion, instead it should iterate from last to first and remove the iterated value
|
||||
}
|
||||
|
||||
UpdateValues();
|
||||
|
@ -557,7 +559,7 @@ namespace BizHawk.MultiClient
|
|||
ListView.SelectedIndexCollection list = TASView.SelectedIndices;
|
||||
for (int index = 0; index < list.Count; index++)
|
||||
{
|
||||
Global.MovieSession.Movie.InsertFrame(Global.MovieSession.Movie.GetInput(list[index]), list[index]);
|
||||
GlobalWinF.MovieSession.Movie.InsertFrame(GlobalWinF.MovieSession.Movie.GetInput(list[index]), list[index]);
|
||||
}
|
||||
|
||||
UpdateValues();
|
||||
|
@ -568,7 +570,7 @@ namespace BizHawk.MultiClient
|
|||
ListView.SelectedIndexCollection list = TASView.SelectedIndices;
|
||||
for (int index = 0; index < list.Count; index++)
|
||||
{
|
||||
Global.MovieSession.Movie.ClearFrame(list[index]);
|
||||
GlobalWinF.MovieSession.Movie.ClearFrame(list[index]);
|
||||
}
|
||||
|
||||
UpdateValues();
|
||||
|
@ -589,7 +591,7 @@ namespace BizHawk.MultiClient
|
|||
int frames = int.Parse(prompt.UserText);
|
||||
for (int i = 0; i < frames; i++)
|
||||
{
|
||||
Global.MovieSession.Movie.InsertBlankFrame(list[0] + i);
|
||||
GlobalWinF.MovieSession.Movie.InsertBlankFrame(list[0] + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -634,7 +636,7 @@ namespace BizHawk.MultiClient
|
|||
ListView.SelectedIndexCollection list = TASView.SelectedIndices;
|
||||
if (list.Count > 0)
|
||||
{
|
||||
Global.MovieSession.Movie.TruncateMovie(list[0]);
|
||||
GlobalWinF.MovieSession.Movie.TruncateMovie(list[0]);
|
||||
UpdateValues();
|
||||
}
|
||||
}
|
||||
|
@ -655,7 +657,7 @@ namespace BizHawk.MultiClient
|
|||
ListView.SelectedIndexCollection list = TASView.SelectedIndices;
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
{
|
||||
ClipboardEntry entry = new ClipboardEntry {Frame = list[i], Inputstr = Global.MovieSession.Movie.GetInput(list[i])};
|
||||
ClipboardEntry entry = new ClipboardEntry {Frame = list[i], Inputstr = GlobalWinF.MovieSession.Movie.GetInput(list[i])};
|
||||
Clipboard.Add(entry);
|
||||
}
|
||||
UpdateSlicerDisplay();
|
||||
|
@ -700,7 +702,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
for (int i = 0; i < Clipboard.Count; i++)
|
||||
{
|
||||
Global.MovieSession.Movie.ModifyFrame(Clipboard[i].Inputstr, list[0] + i);
|
||||
GlobalWinF.MovieSession.Movie.ModifyFrame(Clipboard[i].Inputstr, list[0] + i);
|
||||
}
|
||||
}
|
||||
UpdateValues();
|
||||
|
@ -713,7 +715,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
for (int i = 0; i < Clipboard.Count; i++)
|
||||
{
|
||||
Global.MovieSession.Movie.InsertFrame(Clipboard[i].Inputstr, list[0] + i);
|
||||
GlobalWinF.MovieSession.Movie.InsertFrame(Clipboard[i].Inputstr, list[0] + i);
|
||||
}
|
||||
}
|
||||
UpdateValues();
|
||||
|
@ -737,9 +739,9 @@ namespace BizHawk.MultiClient
|
|||
Clipboard.Clear();
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
{
|
||||
ClipboardEntry entry = new ClipboardEntry {Frame = list[i], Inputstr = Global.MovieSession.Movie.GetInput(list[i])};
|
||||
ClipboardEntry entry = new ClipboardEntry {Frame = list[i], Inputstr = GlobalWinF.MovieSession.Movie.GetInput(list[i])};
|
||||
Clipboard.Add(entry);
|
||||
Global.MovieSession.Movie.DeleteFrame(list[0]);
|
||||
GlobalWinF.MovieSession.Movie.DeleteFrame(list[0]);
|
||||
}
|
||||
|
||||
UpdateValues();
|
||||
|
@ -768,13 +770,13 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (e.Button == MouseButtons.Middle)
|
||||
{
|
||||
Global.MainForm.TogglePause();
|
||||
GlobalWinF.MainForm.TogglePause();
|
||||
}
|
||||
}
|
||||
|
||||
private void TAStudio_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
Global.MainForm.ProcessInput();
|
||||
GlobalWinF.MainForm.ProcessInput();
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Emulation.Consoles.Calculator;
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
|
@ -93,7 +95,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public void Restart()
|
||||
{
|
||||
if (!(Global.Emulator is TI83))
|
||||
if (!(GlobalWinF.Emulator is TI83))
|
||||
Close();
|
||||
if (!IsHandleCreated || IsDisposed) return;
|
||||
}
|
||||
|
@ -122,247 +124,247 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void button42_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("ENTER");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("ENTER");
|
||||
}
|
||||
|
||||
private void button43_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("DASH");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("DASH");
|
||||
}
|
||||
|
||||
private void button39_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("2");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("2");
|
||||
}
|
||||
|
||||
private void ONE_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("1");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("1");
|
||||
}
|
||||
|
||||
private void THREE_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("3");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("3");
|
||||
}
|
||||
|
||||
private void FOUR_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("4");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("4");
|
||||
}
|
||||
|
||||
private void FIVE_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("5");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("5");
|
||||
}
|
||||
|
||||
private void SIX_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("6");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("6");
|
||||
}
|
||||
|
||||
private void SEVEN_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("7");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("7");
|
||||
}
|
||||
|
||||
private void EIGHT_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("8");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("8");
|
||||
}
|
||||
|
||||
private void NINE_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("9");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("9");
|
||||
}
|
||||
|
||||
private void ON_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("ON");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("ON");
|
||||
}
|
||||
|
||||
private void STO_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("STO");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("STO");
|
||||
}
|
||||
|
||||
private void PLUS_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("PLUS");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("PLUS");
|
||||
}
|
||||
|
||||
private void LN_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("LN");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("LN");
|
||||
}
|
||||
|
||||
private void MINUS_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("MINUS");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("MINUS");
|
||||
}
|
||||
|
||||
private void LOG_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("LOG");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("LOG");
|
||||
}
|
||||
|
||||
private void MULTIPLY_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("MULTIPLY");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("MULTIPLY");
|
||||
}
|
||||
|
||||
private void button26_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("SQUARED");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("SQUARED");
|
||||
}
|
||||
|
||||
private void button25_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("COMMA");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("COMMA");
|
||||
}
|
||||
|
||||
private void button24_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("PARAOPEN");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("PARAOPEN");
|
||||
}
|
||||
|
||||
private void button23_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("PARACLOSE");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("PARACLOSE");
|
||||
}
|
||||
|
||||
private void button22_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("DIVIDE");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("DIVIDE");
|
||||
}
|
||||
|
||||
private void button17_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("NEG1");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("NEG1");
|
||||
}
|
||||
|
||||
private void button18_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("SIN");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("SIN");
|
||||
}
|
||||
|
||||
private void button19_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("COS");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("COS");
|
||||
}
|
||||
|
||||
private void button20_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("TAN");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("TAN");
|
||||
}
|
||||
|
||||
private void button21_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("EXP");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("EXP");
|
||||
}
|
||||
|
||||
private void button12_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("MATH");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("MATH");
|
||||
}
|
||||
|
||||
private void button13_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("MATRIX");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("MATRIX");
|
||||
}
|
||||
|
||||
private void button14_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("PRGM");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("PRGM");
|
||||
}
|
||||
|
||||
private void button15_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("VARS");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("VARS");
|
||||
}
|
||||
|
||||
private void button16_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("CLEAR");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("CLEAR");
|
||||
}
|
||||
|
||||
private void button11_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("ALPHA");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("ALPHA");
|
||||
}
|
||||
|
||||
private void button4_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("X");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("X");
|
||||
}
|
||||
|
||||
private void button10_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("STAT");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("STAT");
|
||||
}
|
||||
|
||||
private void button5_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("2ND");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("2ND");
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("MODE");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("MODE");
|
||||
}
|
||||
|
||||
private void button3_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("DEL");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("DEL");
|
||||
}
|
||||
|
||||
private void button47_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("LEFT");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("LEFT");
|
||||
}
|
||||
|
||||
private void button49_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("DOWN");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("DOWN");
|
||||
}
|
||||
|
||||
private void button48_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("RIGHT");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("RIGHT");
|
||||
}
|
||||
|
||||
private void button50_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("UP");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("UP");
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("Y");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("Y");
|
||||
}
|
||||
|
||||
private void button6_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("WINDOW");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("WINDOW");
|
||||
}
|
||||
|
||||
private void button7_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("ZOOM");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("ZOOM");
|
||||
}
|
||||
|
||||
private void button8_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("TRACE");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("TRACE");
|
||||
}
|
||||
|
||||
private void button9_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("GRAPH");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("GRAPH");
|
||||
}
|
||||
|
||||
private void PERIOD_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("DOT");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("DOT");
|
||||
}
|
||||
|
||||
private void showHotkToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -381,7 +383,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void ZERO_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.ClickyVirtualPadController.Click("0");
|
||||
GlobalWinF.ClickyVirtualPadController.Click("0");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
using BizHawk.Emulation.Consoles.Nintendo;
|
||||
using BizHawk.Emulation.Consoles.Calculator;
|
||||
using BizHawk.Emulation.Consoles.Nintendo.SNES;
|
||||
|
@ -17,8 +19,8 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void ToolBox_Load(object sender, EventArgs e)
|
||||
{
|
||||
int x = Global.MainForm.Location.X + Global.MainForm.Size.Width;
|
||||
int y = Global.MainForm.Location.Y;
|
||||
int x = GlobalWinF.MainForm.Location.X + GlobalWinF.MainForm.Size.Width;
|
||||
int y = GlobalWinF.MainForm.Location.Y;
|
||||
Location = new Point(x, y);
|
||||
HideShowIcons();
|
||||
}
|
||||
|
@ -30,7 +32,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void HideShowIcons()
|
||||
{
|
||||
if (Global.Emulator is NES)
|
||||
if (GlobalWinF.Emulator is NES)
|
||||
{
|
||||
NESPPU.Visible = true;
|
||||
NESDebugger.Visible = true;
|
||||
|
@ -45,7 +47,7 @@ namespace BizHawk.MultiClient
|
|||
NESNameTable.Visible = false;
|
||||
}
|
||||
|
||||
if (Global.Emulator is TI83)
|
||||
if (GlobalWinF.Emulator is TI83)
|
||||
{
|
||||
KeypadTool.Visible = true;
|
||||
}
|
||||
|
@ -54,7 +56,7 @@ namespace BizHawk.MultiClient
|
|||
KeypadTool.Visible = false;
|
||||
}
|
||||
|
||||
if (Global.Emulator is LibsnesCore)
|
||||
if (GlobalWinF.Emulator is LibsnesCore)
|
||||
{
|
||||
SNESGraphicsDebuggerButton.Visible = true;
|
||||
SNESGameGenie.Visible = true;
|
||||
|
@ -86,88 +88,88 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void toolStripButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.LoadCheatsWindow();
|
||||
GlobalWinF.MainForm.LoadCheatsWindow();
|
||||
}
|
||||
|
||||
private void toolStripButton2_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.LoadRamWatch(true);
|
||||
GlobalWinF.MainForm.LoadRamWatch(true);
|
||||
}
|
||||
|
||||
private void toolStripButton3_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.LoadRamSearch();
|
||||
GlobalWinF.MainForm.LoadRamSearch();
|
||||
}
|
||||
|
||||
private void HexEditor_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.LoadHexEditor();
|
||||
GlobalWinF.MainForm.LoadHexEditor();
|
||||
}
|
||||
|
||||
private void toolStripButton5_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.OpenLuaConsole();
|
||||
GlobalWinF.MainForm.OpenLuaConsole();
|
||||
}
|
||||
|
||||
private void NESPPU_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.LoadNESPPU();
|
||||
GlobalWinF.MainForm.LoadNESPPU();
|
||||
}
|
||||
|
||||
private void NESDebugger_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.LoadNESDebugger();
|
||||
GlobalWinF.MainForm.LoadNESDebugger();
|
||||
}
|
||||
|
||||
private void NESGameGenie_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.LoadGameGenieEC();
|
||||
GlobalWinF.MainForm.LoadGameGenieEC();
|
||||
}
|
||||
|
||||
private void NESNameTable_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.LoadNESNameTable();
|
||||
GlobalWinF.MainForm.LoadNESNameTable();
|
||||
}
|
||||
|
||||
private void KeyPadTool_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.Emulator is TI83)
|
||||
if (GlobalWinF.Emulator is TI83)
|
||||
{
|
||||
Global.MainForm.LoadTI83KeyPad();
|
||||
GlobalWinF.MainForm.LoadTI83KeyPad();
|
||||
}
|
||||
}
|
||||
|
||||
private void TAStudioButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.LoadTAStudio();
|
||||
GlobalWinF.MainForm.LoadTAStudio();
|
||||
}
|
||||
|
||||
private void SNESGraphicsDebuggerButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.Emulator is LibsnesCore)
|
||||
if (GlobalWinF.Emulator is LibsnesCore)
|
||||
{
|
||||
Global.MainForm.LoadSNESGraphicsDebugger();
|
||||
GlobalWinF.MainForm.LoadSNESGraphicsDebugger();
|
||||
}
|
||||
}
|
||||
|
||||
private void TAStudioButton_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.LoadVirtualPads();
|
||||
GlobalWinF.MainForm.LoadVirtualPads();
|
||||
}
|
||||
|
||||
private void SNESGameGenie_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.LoadGameGenieEC();
|
||||
GlobalWinF.MainForm.LoadGameGenieEC();
|
||||
}
|
||||
|
||||
private void GGGameGenie_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.LoadGameGenieEC();
|
||||
GlobalWinF.MainForm.LoadGameGenieEC();
|
||||
}
|
||||
|
||||
private void GBGameGenie_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.LoadGameGenieEC();
|
||||
GlobalWinF.MainForm.LoadGameGenieEC();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Core;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
class ToolHelpers
|
||||
|
@ -46,24 +48,24 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public static void HandleLoadError(RecentFiles recent, string path)
|
||||
{
|
||||
Global.Sound.StopSound();
|
||||
GlobalWinF.Sound.StopSound();
|
||||
DialogResult result = MessageBox.Show("Could not open " + path + "\nRemove from list?", "File not found", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
recent.Remove(path);
|
||||
}
|
||||
|
||||
Global.Sound.StartSound();
|
||||
GlobalWinF.Sound.StartSound();
|
||||
}
|
||||
|
||||
public static ToolStripMenuItem[] GenerateMemoryDomainMenuItems(Action<int> SetCallback, string SelectedDomain = "", int? maxSize = null)
|
||||
{
|
||||
var items = new List<ToolStripMenuItem>();
|
||||
|
||||
if (Global.Emulator.MemoryDomains.Any())
|
||||
if (GlobalWinF.Emulator.MemoryDomains.Any())
|
||||
{
|
||||
int counter = 0;
|
||||
foreach (var domain in Global.Emulator.MemoryDomains)
|
||||
foreach (var domain in GlobalWinF.Emulator.MemoryDomains)
|
||||
{
|
||||
string temp = domain.ToString();
|
||||
var item = new ToolStripMenuItem { Text = temp };
|
||||
|
@ -92,9 +94,9 @@ namespace BizHawk.MultiClient
|
|||
public static void PopulateMemoryDomainDropdown(ref ComboBox dropdown, MemoryDomain startDomain)
|
||||
{
|
||||
dropdown.Items.Clear();
|
||||
if (Global.Emulator.MemoryDomains.Count > 0)
|
||||
if (GlobalWinF.Emulator.MemoryDomains.Count > 0)
|
||||
{
|
||||
foreach (var domain in Global.Emulator.MemoryDomains)
|
||||
foreach (var domain in GlobalWinF.Emulator.MemoryDomains)
|
||||
{
|
||||
var result = dropdown.Items.Add(domain.ToString());
|
||||
if (domain.Name == startDomain.Name)
|
||||
|
@ -107,16 +109,16 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public static void UpdateCheatRelatedTools()
|
||||
{
|
||||
Global.MainForm.RamWatch1.UpdateValues();
|
||||
Global.MainForm.HexEditor1.UpdateValues();
|
||||
Global.MainForm.Cheats_UpdateValues();
|
||||
Global.MainForm.RamSearch1.UpdateValues();
|
||||
Global.MainForm.UpdateCheatStatus();
|
||||
GlobalWinF.MainForm.RamWatch1.UpdateValues();
|
||||
GlobalWinF.MainForm.HexEditor1.UpdateValues();
|
||||
GlobalWinF.MainForm.Cheats_UpdateValues();
|
||||
GlobalWinF.MainForm.RamSearch1.UpdateValues();
|
||||
GlobalWinF.MainForm.UpdateCheatStatus();
|
||||
}
|
||||
|
||||
public static void UnfreezeAll()
|
||||
{
|
||||
Global.CheatList.DisableAll();
|
||||
GlobalWinF.CheatList.DisableAll();
|
||||
UpdateCheatRelatedTools();
|
||||
}
|
||||
|
||||
|
@ -126,7 +128,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (!watch.IsSeparator)
|
||||
{
|
||||
Global.CheatList.Add(
|
||||
GlobalWinF.CheatList.Add(
|
||||
new Cheat(watch, watch.Value.Value, compare: null, enabled: true)
|
||||
);
|
||||
}
|
||||
|
@ -141,7 +143,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (!watch.IsSeparator)
|
||||
{
|
||||
Global.CheatList.Remove(watch);
|
||||
GlobalWinF.CheatList.Remove(watch);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -150,15 +152,15 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public static void ViewInHexEditor(MemoryDomain domain, IEnumerable<int> addresses)
|
||||
{
|
||||
Global.MainForm.LoadHexEditor();
|
||||
Global.MainForm.HexEditor1.SetDomain(domain);
|
||||
Global.MainForm.HexEditor1.SetToAddresses(addresses.ToList());
|
||||
GlobalWinF.MainForm.LoadHexEditor();
|
||||
GlobalWinF.MainForm.HexEditor1.SetDomain(domain);
|
||||
GlobalWinF.MainForm.HexEditor1.SetToAddresses(addresses.ToList());
|
||||
}
|
||||
|
||||
public static MemoryDomain DomainByName(string name)
|
||||
{
|
||||
//Attempts to find the memory domain by name, if it fails, it defaults to index 0
|
||||
foreach (MemoryDomain domain in Global.Emulator.MemoryDomains)
|
||||
foreach (MemoryDomain domain in GlobalWinF.Emulator.MemoryDomains)
|
||||
{
|
||||
if (domain.Name == name)
|
||||
{
|
||||
|
@ -166,7 +168,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
return Global.Emulator.MainMemory;
|
||||
return GlobalWinF.Emulator.MainMemory;
|
||||
}
|
||||
|
||||
public static void AddColumn(ListView listView, string columnName, bool enabled, int columnWidth)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue