public class CrossVersion
extends java.lang.Object
This Class provides helper functions for Cross Version Compatible coding of IL-2 1946 mods.
Modifier and Type | Method and Description |
---|---|
static float |
floatindex(float f,
float[] af)
This helper function compares a given float value to an array of float comparatives and returns the interpolated index position of the given float value in that array.
|
static void |
setLimits6DoF(java.lang.Object obj,
float[] limits)
This helper function lets you set the "limits6DoF" field regardless the game version your mod is running on.
|
static void |
setPrintCompassHeading(java.lang.Object obj,
boolean flag)
This helper function lets you set the "printCompassHeading" field regardless the game version your mod is running on.
|
public static final void setPrintCompassHeading(java.lang.Object obj, boolean flag)
obj
- The Object (Aircraft or Cockpit) instance where you want to set the "printCompassHeading" field for.flag
- defines the value which the field "printCompassHeading" will be set to.public static final void setLimits6DoF(java.lang.Object obj, float[] limits)
obj
- The Cockpit instance where you want to set the "limits6DoF" field for.limits
- The limits to apply for 6DoFpublic static final float floatindex(float f, float[] af)
f
- The float value "f" to find the array index of.af
- The array of float values to compare "f" to.