Hex Editor - use Ram Poke dialog for the Poke address function. Ram Watch - Successfully stop/start sound on ram poke
This commit is contained in:
parent
7141ed0fa4
commit
321a45722e
|
@ -459,22 +459,32 @@ namespace BizHawk.MultiClient
|
||||||
int p = GetHighlightedAddress();
|
int p = GetHighlightedAddress();
|
||||||
if (p >= 0)
|
if (p >= 0)
|
||||||
{
|
{
|
||||||
Global.Sound.StopSound();
|
Watch w = new Watch();
|
||||||
InputPrompt i = new InputPrompt();
|
w.address = p;
|
||||||
Global.Sound.StartSound();
|
w.value = MakeValue(p);
|
||||||
i.Text = "Poke 0x" + String.Format(NumDigitsStr, p);
|
w.bigendian = Global.Config.HexEditorBigEndian;
|
||||||
i.SetMessage("Enter a hexadecimal value");
|
w.signed = asigned.HEX;
|
||||||
i.ShowDialog();
|
|
||||||
|
|
||||||
if (i.UserOK)
|
switch (Global.Config.HexEditorDataSize)
|
||||||
{
|
{
|
||||||
if (InputValidate.IsValidHexNumber(i.UserText))
|
default:
|
||||||
{
|
case 1:
|
||||||
int value = int.Parse(i.UserText, NumberStyles.HexNumber);
|
w.type = atype.BYTE;
|
||||||
PokeHighlighted(value);
|
break;
|
||||||
UpdateValues();
|
case 2:
|
||||||
}
|
w.type = atype.WORD;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
w.type = atype.DWORD;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RamPoke poke = new RamPoke();
|
||||||
|
poke.SetWatchObject(w, Domain);
|
||||||
|
poke.location = GetAddressCoordinates(p);
|
||||||
|
Global.Sound.StopSound();
|
||||||
|
poke.ShowDialog();
|
||||||
|
Global.Sound.StartSound();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -925,11 +925,11 @@ namespace BizHawk.MultiClient
|
||||||
ListView.SelectedIndexCollection indexes = WatchListView.SelectedIndices;
|
ListView.SelectedIndexCollection indexes = WatchListView.SelectedIndices;
|
||||||
Global.Sound.StopSound();
|
Global.Sound.StopSound();
|
||||||
RamPoke p = new RamPoke();
|
RamPoke p = new RamPoke();
|
||||||
Global.Sound.StartSound();
|
|
||||||
if (indexes.Count > 0)
|
if (indexes.Count > 0)
|
||||||
p.SetWatchObject(watchList[indexes[0]], Domain);
|
p.SetWatchObject(watchList[indexes[0]], Domain);
|
||||||
p.location = GetPromptPoint();
|
p.location = GetPromptPoint();
|
||||||
p.ShowDialog();
|
p.ShowDialog();
|
||||||
|
Global.Sound.StartSound();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void pokeAddressToolStripMenuItem_Click(object sender, EventArgs e)
|
private void pokeAddressToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
|
Loading…
Reference in New Issue