class UFunction extends UStruct;

// Persistent variables.
var int FunctionFlags;
var byte iNative[2];
var byte RepOffset[2];
var byte OperPrecedence;

// Variables in memory only.
var byte NumParms;
var byte ParmsSize[2];
var byte ReturnValueOffset[2];

final function SetNativeIndex(int Value) {
  class 'TWord'.static.SetValue(Value, iNative[0], iNative[1]);
}

final function int GetNativeIndex() {
  return class 'TWord'.static.GetValue(iNative[0], iNative[1]);
}

final function SetRepOffset(int Value) {
  class 'TWord'.static.SetValue(Value, RepOffset[0], RepOffset[1]);
}

final function int GetRepOffset() {
  return class 'TWord'.static.GetValue(RepOffset[0], RepOffset[1]);
}

final function SetParmsSize(int Value) {
  class 'TWord'.static.SetValue(Value, ParmsSize[0], ParmsSize[1]);
}

final function int GetParmsSize() {
  return class 'TWord'.static.GetValue(ParmsSize[0], ParmsSize[1]);
}

final function SetReturnValueOffset(int Value) {
  class 'TWord'.static.SetValue(Value, ReturnValueOffset[0], ReturnValueOffset[1]);
}

final function int GetReturnValueOffset() {
  return class 'TWord'.static.GetValue(ReturnValueOffset[0], ReturnValueOffset[1]);
}

static final function UFunction CastFunction(Object Other) {
  return Other;
}