Skip to content

Commit

Permalink
Add matching CallResult changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ernegien committed Apr 24, 2023
1 parent 7a88704 commit 88d02de
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions src/OGXbdmDumper/CallResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,13 @@ public class CallResult
/// </summary>
public uint Eax { get; }

/// <summary>
/// The floating-point result value.
/// </summary>
public float St0 { get; }

/// <summary>
/// A value used to uniquely identify a connection.
/// </summary>
public uint ConnectionId { get; }

/// <summary>
/// Constructs a call result.
/// </summary>
/// <param name="eax"></param>
/// <param name="st0"></param>
/// <param name="connectionId"></param>
public CallResult(uint eax, uint st0, uint connectionId = 0)
public CallResult(uint eax)
{
Eax = eax;
ConnectionId = (uint)(connectionId & ushort.MaxValue);

byte[] data = new byte[4];
using (MemoryStream ms = new MemoryStream(data))
using (BinaryWriter bw = new BinaryWriter(ms))
{
bw.Write((uint)st0);
}
St0 = BitConverter.ToSingle(data, 0);
}

/// <summary>
Expand Down

0 comments on commit 88d02de

Please sign in to comment.