namespace Ryujinx.Graphics
{
/// <summary>
/// Method call parameters.
/// </summary>
struct MethodParams
/// Method offset.
public int Method { get; }
/// Method call argument.
public int Argument { get; }
/// Sub-channel where the call should be sent.
public int SubChannel { get; }
/// For multiple calls to the same method, this is the remaining calls count.
public int MethodCount { get; }
/// Indicates if the current call is the last one from a batch of calls to the same method.
public bool IsLastCall => MethodCount <= 1;
/// Constructs the method call parameters structure.
/// <param name="method">Method offset</param>
/// <param name="argument">Method call argument</param>
/// <param name="subChannel">Optional sub-channel where the method should be sent (not required for macro calls)</param>
/// <param name="methodCount">Optional remaining calls count (not required for macro calls)</param>
public MethodParams(
int method,
int argument,
int subChannel = 0,
int methodCount = 0)
Method = method;
Argument = argument;
SubChannel = subChannel;
MethodCount = methodCount;
}