Skip to content
This repository has been archived by the owner on Apr 25, 2021. It is now read-only.

Commit

Permalink
Updated for latest patch.
Browse files Browse the repository at this point in the history
Moved poison logic to keep fine/caution/danger text color.
  • Loading branch information
Squirrelies committed Feb 20, 2019
1 parent 8e598fd commit ab64598
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 7 deletions.
3 changes: 3 additions & 0 deletions RE2REmakeSRT/GameHashes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public static class GameHashes
// Personally observed upon release. Ghost Survivors DLC.
public static readonly byte[] Stock_1p10 = new byte[32] { 0xDF, 0x24, 0xE7, 0x07, 0x3E, 0x38, 0x1C, 0x37, 0xCE, 0xA5, 0x21, 0x95, 0x74, 0xEF, 0x3A, 0x81, 0x60, 0x3B, 0x9F, 0x3F, 0xE0, 0xCA, 0x5C, 0x3A, 0x05, 0x89, 0x95, 0x68, 0x5D, 0x72, 0x90, 0xD0 };

// Personally observed upon release. Bug fix patch.
public static readonly byte[] Stock_1p11 = new byte[32] { 0x57, 0x1D, 0xEE, 0x3F, 0x37, 0xF6, 0xE7, 0x86, 0x1A, 0xF1, 0xA4, 0xAD, 0xB8, 0x15, 0xF6, 0xF1, 0x53, 0x37, 0xBA, 0x48, 0x73, 0xE4, 0xD6, 0x99, 0xCA, 0x71, 0x32, 0x85, 0xEA, 0x8D, 0x95, 0x4D };

// Reported by T710MA on Speedrun.com (https://pbs.twimg.com/media/DzHTNaQUYAEsFFI.jpg:large). Unsure if region modified by Capcom or user-modified.
public static readonly byte[] Unknown_1 = new byte[32] { 0xD0, 0xA2, 0xB8, 0x74, 0xA1, 0x47, 0x41, 0x08, 0xE7, 0x21, 0x25, 0x58, 0x9F, 0x79, 0xA5, 0x1A, 0x66, 0xC8, 0xCB, 0x05, 0x6B, 0xA3, 0xD5, 0x46, 0x28, 0xDA, 0xED, 0xAE, 0x1D, 0x7E, 0xA5, 0xEB };
}
Expand Down
20 changes: 20 additions & 0 deletions RE2REmakeSRT/GameMemory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,26 @@ public GameMemory(int pid)
PointerInventoryEntries[i] = new MultilevelPointer(memoryAccess, BaseAddress + 0x070AFE10, 0x50, 0x98, 0x10, 0x20 + (i * 0x08), 0x18);
}

break;
}
case REmake2VersionEnumeration.Stock_1p11: // NEW
{
PointerIGT = new MultilevelPointer(memoryAccess, BaseAddress + 0x070B0910, 0x2E0, 0x218, 0x610, 0x710, 0x60);
PointerRank = new MultilevelPointer(memoryAccess, BaseAddress + 0x0708A9D8);
PointerPlayerHP = new MultilevelPointer(memoryAccess, BaseAddress + 0x070B0840, 0x50, 0x20);
PointerPlayerPoison = new MultilevelPointer(memoryAccess, BaseAddress + 0x070B0840, 0x50, 0x20, 0xF8);

PointerEnemyEntries = new MultilevelPointer[32];
for (int i = 0; i < PointerEnemyEntries.Length; ++i)
PointerEnemyEntries[i] = new MultilevelPointer(memoryAccess, BaseAddress + 0x070838A8, 0x80 + (i * 0x08), 0x88, 0x18, 0x1A0);

if (!Program.programSpecialOptions.Flags.HasFlag(ProgramFlags.NoInventory))
{
PointerInventoryEntries = new MultilevelPointer[20];
for (int i = 0; i < PointerInventoryEntries.Length; ++i)
PointerInventoryEntries[i] = new MultilevelPointer(memoryAccess, BaseAddress + 0x070B0840, 0x50, 0x98, 0x10, 0x20 + (i * 0x08), 0x18);
}

break;
}
default:
Expand Down
8 changes: 3 additions & 5 deletions RE2REmakeSRT/MainUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,6 @@ private void playerHealthStatus_Paint(object sender, PaintEventArgs e)
e.Graphics.DrawString("DEAD", healthFont, Brushes.Red, 15, 37, stdStringFormat);
playerHealthStatus.ThreadSafeSetHealthImage(Properties.Resources.EMPTY, "EMPTY");
}
else if (Program.gameMem.PlayerPoisoned)
{
e.Graphics.DrawString(Program.gameMem.PlayerCurrentHealth.ToString(), healthFont, Brushes.MediumPurple, 15, 37, stdStringFormat);
playerHealthStatus.ThreadSafeSetHealthImage(Properties.Resources.POISON, "POISON");
}
else if (Program.gameMem.PlayerCurrentHealth >= 801) // Fine (Green)
{
e.Graphics.DrawString(Program.gameMem.PlayerCurrentHealth.ToString(), healthFont, Brushes.LawnGreen, 15, 37, stdStringFormat);
Expand All @@ -204,6 +199,9 @@ private void playerHealthStatus_Paint(object sender, PaintEventArgs e)
e.Graphics.DrawString(Program.gameMem.PlayerCurrentHealth.ToString(), healthFont, Brushes.Red, 15, 37, stdStringFormat);
playerHealthStatus.ThreadSafeSetHealthImage(Properties.Resources.DANGER, "DANGER");
}

if (Program.gameMem.PlayerPoisoned)
playerHealthStatus.ThreadSafeSetHealthImage(Properties.Resources.POISON, "POISON");
}

private void playerInfoPanel_Paint(object sender, PaintEventArgs e)
Expand Down
4 changes: 2 additions & 2 deletions RE2REmakeSRT/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.3.0")]
[assembly: AssemblyFileVersion("1.2.3.0")]
[assembly: AssemblyVersion("1.2.4.0")]
[assembly: AssemblyFileVersion("1.2.4.0")]
4 changes: 4 additions & 0 deletions RE2REmakeSRT/REmake2VersionDetector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ public static REmake2VersionEnumeration GetVersion(int pid)
{
return REmake2VersionEnumeration.Stock_1p10;
}
else if (processHash.SequenceEqual(GameHashes.Stock_1p11))
{
return REmake2VersionEnumeration.Stock_1p11;
}
else
{
// Either a version we've never encountered before or this game was modified.
Expand Down
1 change: 1 addition & 0 deletions RE2REmakeSRT/REmake2VersionEnumeration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ public enum REmake2VersionEnumeration : byte
Stock_1p00 = 0x01, // 1.00
Stock_1p01 = 0x02, // 1.01
Stock_1p10, // 1.10 (Ghost Survivors DLC)
Stock_1p11,
Demo = 0xFF // Unsupported.
}
}

0 comments on commit ab64598

Please sign in to comment.