-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for initial release of WW branch of RE4R.
- Loading branch information
1 parent
4febb53
commit 5508988
Showing
10 changed files
with
163 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,6 @@ public enum GameVersion : int | |
{ | ||
Unknown, | ||
RE4R_Demo_20230309_1, | ||
RE4R_WW_20230323_1, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System.Diagnostics; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace SRTPluginProviderRE4R.Structs | ||
{ | ||
[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 0x8)] | ||
[DebuggerDisplay("{_DebuggerDisplay,nq}")] | ||
public struct EntityHealth | ||
{ | ||
[FieldOffset(0x0)] private int maximumHealth; | ||
[FieldOffset(0x4)] private int currentHealth; | ||
|
||
public int MaximumHealth => maximumHealth; | ||
public int CurrentHealth => currentHealth; | ||
|
||
public bool IsTrigger => MaximumHealth == 1 && CurrentHealth == 1; | ||
public bool IsAlive => !IsTrigger && MaximumHealth > 0 && CurrentHealth > 0 && CurrentHealth <= MaximumHealth; | ||
public bool IsDamaged => MaximumHealth > 0 && CurrentHealth > 0 && CurrentHealth < MaximumHealth; | ||
public float Percentage => ((IsAlive) ? (float)CurrentHealth / (float)MaximumHealth : 0f); | ||
|
||
/// <summary> | ||
/// Debugger display message. | ||
/// </summary> | ||
[DebuggerBrowsable(DebuggerBrowsableState.Never)] | ||
public string _DebuggerDisplay | ||
{ | ||
get | ||
{ | ||
if (IsTrigger) | ||
return string.Format("TRIGGER", CurrentHealth, MaximumHealth, Percentage); | ||
else if (IsAlive) | ||
return string.Format("{0} / {1} ({2:P1})", CurrentHealth, MaximumHealth, Percentage); | ||
else | ||
return "DEAD / DEAD (0%)"; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System.Diagnostics; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace SRTPluginProviderRE4R.Structs | ||
{ | ||
[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 0x0C)] | ||
[DebuggerDisplay("{_DebuggerDisplay,nq}")] | ||
public struct GameRank | ||
{ | ||
[FieldOffset(0x0)] private int rank; | ||
[FieldOffset(0x4)] private float actionPoint; | ||
[FieldOffset(0x8)] private float itemPoint; | ||
|
||
public int Rank => rank; | ||
public float ActionPoint => actionPoint; | ||
public float ItemPoint => itemPoint; | ||
|
||
/// <summary> | ||
/// Debugger display message. | ||
/// </summary> | ||
[DebuggerBrowsable(DebuggerBrowsableState.Never)] | ||
public string _DebuggerDisplay => $"Rank {Rank} (AP {ActionPoint} / IP {ItemPoint})"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters