Refactor code for loading one tool dialog from another. Remove PCE address offset from Ram Search
This commit is contained in:
parent
ae2b97050e
commit
28dc1b9c8e
|
@ -955,7 +955,7 @@ namespace BizHawk.MultiClient
|
||||||
recentROMToolStripMenuItem.DropDownItems.Add(auto);
|
recentROMToolStripMenuItem.DropDownItems.Add(auto);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadRamWatch()
|
public void LoadRamWatch()
|
||||||
{
|
{
|
||||||
if (!RamWatch1.IsHandleCreated || RamWatch1.IsDisposed)
|
if (!RamWatch1.IsHandleCreated || RamWatch1.IsDisposed)
|
||||||
{
|
{
|
||||||
|
@ -968,7 +968,7 @@ namespace BizHawk.MultiClient
|
||||||
RamWatch1.Focus();
|
RamWatch1.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadRamSearch()
|
public void LoadRamSearch()
|
||||||
{
|
{
|
||||||
if (!RamSearch1.IsHandleCreated || RamSearch1.IsDisposed)
|
if (!RamSearch1.IsHandleCreated || RamSearch1.IsDisposed)
|
||||||
{
|
{
|
||||||
|
@ -990,7 +990,7 @@ namespace BizHawk.MultiClient
|
||||||
HexEditor1.Focus();
|
HexEditor1.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadNESPPU()
|
public void LoadNESPPU()
|
||||||
{
|
{
|
||||||
if (!NESPPU1.IsHandleCreated || NESPPU1.IsDisposed)
|
if (!NESPPU1.IsHandleCreated || NESPPU1.IsDisposed)
|
||||||
{
|
{
|
||||||
|
|
|
@ -240,16 +240,7 @@ namespace BizHawk.MultiClient
|
||||||
w.bigendian = MemoryViewer.BigEndian;
|
w.bigendian = MemoryViewer.BigEndian;
|
||||||
w.signed = asigned.HEX;
|
w.signed = asigned.HEX;
|
||||||
|
|
||||||
if (!Global.MainForm.RamWatch1.IsHandleCreated || Global.MainForm.RamWatch1.IsDisposed)
|
Global.MainForm.LoadRamWatch();
|
||||||
{
|
|
||||||
Global.MainForm.RamWatch1 = new RamWatch();
|
|
||||||
Global.MainForm.RamWatch1.Show();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Global.MainForm.RamWatch1.Focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
Global.MainForm.RamWatch1.AddWatch(w);
|
Global.MainForm.RamWatch1.AddWatch(w);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,15 +253,7 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
if (indexes.Count > 0)
|
if (indexes.Count > 0)
|
||||||
{
|
{
|
||||||
if (!Global.MainForm.RamWatch1.IsHandleCreated || Global.MainForm.RamWatch1.IsDisposed)
|
Global.MainForm.LoadRamWatch();
|
||||||
{
|
|
||||||
Global.MainForm.RamWatch1 = new RamWatch();
|
|
||||||
Global.MainForm.RamWatch1.Show();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Global.MainForm.RamWatch1.Focus();
|
|
||||||
}
|
|
||||||
for (int x = 0; x < indexes.Count; x++)
|
for (int x = 0; x < indexes.Count; x++)
|
||||||
Global.MainForm.RamWatch1.AddWatch(searchList[indexes[x]]);
|
Global.MainForm.RamWatch1.AddWatch(searchList[indexes[x]]);
|
||||||
}
|
}
|
||||||
|
@ -321,9 +313,6 @@ namespace BizHawk.MultiClient
|
||||||
searchList.Clear();
|
searchList.Clear();
|
||||||
undoList.Clear();
|
undoList.Clear();
|
||||||
SetPlatformAndMemoryDomainLabel();
|
SetPlatformAndMemoryDomainLabel();
|
||||||
int startaddress = 0;
|
|
||||||
if (Global.Emulator.SystemId == "PCE")
|
|
||||||
startaddress = 0x1F0000; //For now, until Emulator core functionality can better handle a prefix
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
int divisor = 1;
|
int divisor = 1;
|
||||||
|
|
||||||
|
@ -346,7 +335,7 @@ namespace BizHawk.MultiClient
|
||||||
for (int x = 0; x <= ((Domain.Size / divisor)-1); x++)
|
for (int x = 0; x <= ((Domain.Size / divisor)-1); x++)
|
||||||
{
|
{
|
||||||
searchList.Add(new Watch());
|
searchList.Add(new Watch());
|
||||||
searchList[x].address = count + startaddress;
|
searchList[x].address = count;
|
||||||
searchList[x].type = GetDataSize();
|
searchList[x].type = GetDataSize();
|
||||||
searchList[x].bigendian = GetBigEndian();
|
searchList[x].bigendian = GetBigEndian();
|
||||||
searchList[x].signed = GetDataType();
|
searchList[x].signed = GetDataType();
|
||||||
|
|
Loading…
Reference in New Issue