Detect minimap change. Debug log on minimap change and music change.

rabi_display
wcko87 8 years ago
parent 8318dd19e1
commit cd0b45de22
  1. 5
      rabi_splitter_WPF/MemorySnapshot.cs
  2. 18
      rabi_splitter_WPF/RabiRibiDisplay.cs

@ -53,6 +53,7 @@ namespace rabi_splitter_WPF
public readonly int nPackUps;
public readonly int nRegenUps;
public readonly int minimapPosition;
public MemorySnapshot(Process process, int veridx)
{
@ -67,7 +68,9 @@ namespace rabi_splitter_WPF
carrotXp = MemoryHelper.GetMemoryValue<int>(process, 0xD654BC);
hammerXp = MemoryHelper.GetMemoryValue<int>(process, 0xD654B4);
ribbonXp = MemoryHelper.GetMemoryValue<int>(process, 0xD654B8);
itemPercent = MemoryHelper.GetMemoryValue<int>(process, 0xA730E8);
itemPercent = MemoryHelper.GetMemoryValue<float>(process, 0xA730E8);
minimapPosition = MemoryHelper.GetMemoryValue<int>(process, 0xA72E08);
nAttackUps = countItems(process, 0xD6352C, 0xD63628);
nHpUps = countItems(process, 0xD6342C, 0xD63528);

@ -80,6 +80,24 @@ namespace rabi_splitter_WPF
#endregion
#region Detect Music change
if (MusicChanged())
{
DebugLog($"Music Change: {StaticData.GetMusicName(prevSnapshot.musicid)} -> {StaticData.GetMusicName(snapshot.musicid)}");
}
#endregion
#region Detect Minimap Change
if (prevSnapshot != null && (prevSnapshot.minimapPosition != snapshot.minimapPosition))
{
DebugLog($"Minimap Shift! {prevSnapshot.minimapPosition} -> {snapshot.minimapPosition}");
}
#endregion
#region Detect Reload
bool reloaded = (prevSnapshot != null) && (snapshot.playtime < prevSnapshot.playtime);

Loading…
Cancel
Save