int AdjacentCombo(int cmb, int dir)
 * Returns the combo adjacent to a combo at position 'cmb' with a given direction.

int AdjacentCombo(int cmb, int dir, int dist)
 * Returns the combo adjacent to a combo at position 'cmb' with a given direction at a distance
 * of 'dist' combo positions away in that direction.
 * Returns the combo on the screen edge of dist would overflow the screen.
 
float BoolToFloat(bool input);
int BoolToInt(bool input) ;
 * Convert boolean variable 'input' to floating point, or int.
 
int CenterComboX(int loc);
 * Returns the centre X-component coordinate for a combo at position 'loc' 
 * Similar to Center*() functions, and ComboX().

int CenterComboY(int loc);
 * Returns the centre Y-component coordinate for a combo at position 'loc' 
 * Similar to Center*() functions, and ComboY().

int CenterLinkX(bool hitoffset); 
int CenterLinkX(bool hitoffset, bool drawoffset);
 * As CenterLinkX(), but overloaded to allow including the hit and draw offsets
 * for his sprite. 
 
int CenterLinkY(bool hitoffset); 
int CenterLinkY(bool hitoffset, bool drawoffset);
 * As CenterLinkY(), but overloaded to allow including the hit and draw offsets
 * for his sprite. 

int CenterX(T, bool usehitbox);
 * Returns X-component centre of any sprited object, with option to use either its 
 * actual coordinates, or those of its sprite. 
 * Overloaded for all object types. 
 * Set 'usehitbox' true to use the hitbox centre, or false to use the sprite centre. 

int CenterX(T, bool usehitbox, bool trueoffset, bool drawoffset);
 * Returns X-component centre of any sprited object, with option to use either its 
 * actual coordinates, or those of its sprite. 
 * Overloaded for all object types. 
 * Set 'usehitbox' true to use the hitbox centre, or false to use the sprite centre. 
 * Includes the option to base this using its HitXOffset and DrawXOffset 

int CenterY(T, bool usehitbox);
 * Returns Y-component centre of any sprited object, with option to use either its 
 * actual coordinates, or those of its sprite. 
 * Overloaded for all object types. 
 * Set 'usehitbox' true to use the hitbox centre, or false to use the sprite centre. 

int CenterY(T, bool usehitbox, bool trueoffset, bool drawoffset);
 * Returns Y-component centre of any sprited object, with option to use either its 
 * actual coordinates, or those of its sprite. 
 * Overloaded for all object types. 
 * Set 'usehitbox' true to use the hitbox centre, or false to use the sprite centre. 
 * Includes the option to base this using its HitXOffset and DrawXOffset 

bool Chance(int percentChance);
 * Randomly returns true, or false, using input 'percentChance' to determine the percentage change of a 'true return'
 * This is a percentile check. e.g., if ( Chance(50) ) returns true if the RNG of 1->100 is < 50.
 
bool ChooseB();
 * Fairly select between true or false.
bool ChooseB(bool a, bool b);
bool ChooseB(bool a, bool b, bool c);
bool ChooseB(bool a, bool b, bool c, bool d);
bool ChooseB(bool a, bool b, bool c, bool d, bool e);
bool ChooseB(bool a, bool b, bool c, bool d, bool e, bool f);
bool ChooseB(bool a, bool b, bool c, bool d, bool e, bool f, bool g);
bool ChooseB(bool a, bool b, bool c, bool d, bool e, bool f, bool g, bool h);
 * Chooses one of the boolean options randomly and fairly.
 * Overloaded for two to eight args.
 
void ClearFFC(int ffc_id);
 * Clears all variables, flags and scripts on ffc ID 'ffc_id'.
 
void CloneCombo(int pos_a, int pos_b)
 * Clones combo from position 'pos_a' to position 'pos_b'

void CloneLayerCombo(int layer, int pos_a, int pos_b)
 * Clones combo on layer 'layer' posigtion 'pos_a' to the same layer at position 'pos_b'

void CloneLayerCombo(int layer_a, int layer_b, int pos_a, int pos_b);
 * Clones a combo on layer 'layer_a' at position 'pos_a', to layer 'layer_b" at position 'pos_b'.

bool Collision(int cmb);
 * Check for collision between Link and a combo at location 'cmb'. 

bool Collision(int cmb, bool checkcoldetection) ;
 * Check for collision between Link and a combo at position 'cmb' . 
 * Set checkcoldetection to true if you wish to return false from an NPC with ColDetection disabled. 

bool Collision(int cmb, ffc f)
 * Check for collision between ffc 'f' and a combo at location 'cmb'. 
 
bool Collision(T, int cmb);
bool Collision(int cmb, T);
 * Returns collision between any sprited object and a combo position.
 * Overloaded to use all sprited object types, and reversed arguments.

bool Collision(T, int cmb, bool checkcoldetection);
 * Returns collision between any sprited object, and a combo at position cmb.
 * Overloaded for all sprited object types. 
 * You can specify that if CollDetection on the sprited object is false, that
 * this funtion will also return false. 
 
bool Collision(int cmb, ffc f, int a1, int b1, int c1, int d1, int a2, int b2, int c2, int d2);
 * Overload for Collision(combo, ffc) with additional constraints on the hitboxes of both.
 
bool Collision(int cmb, T, int a1, int b1, int c1, int d1, int a2, int b2, int c2, int d2);
 * Overload for Collision(combo, sprited_obj T) with additional constraints on the hitboxes of both.
 
bool CollisionDir(int cmb, lweapon l, int dir, bool checkcoldetection);
 * Returns collision between an lweapon and a combo, as Collision(int pos, lweapon).
 * Returns false if the weapon is not facing direction 'dir'.
 * If checkcoldetection == true, and weap->CollDetection == false, this returns false.
 
bool CollisionDir(int cmb, lweapon l, int dir, bool facingspecificdir, bool checkcoldetection);
 * Returns collision between an lweapon and a combo, as Collision(int pos, lweapon).
 * If facingspecificdir == true and weapon->Dir != dir, this returns false.
 * If facingspecificdir == false, and weapon->Dir == dir, this returns false.
 * 	This allows setting a check if the weapon is any direction other than 'dir'.
 * If checkcoldetection == true, and weap->CollDetection == false, this returns false. 

int DecimalToInt(int v);
 * Converts floating point value 'v', after the decimal, to an integer.
 
int DirRev(int dir);
 * Returns the inverse of a given cardinal direction. 
 
void DirRev(eweapon l);
void DirRev(lweapon l);
void DirRev(npc l);
 * Takes a pointer to a given object, and reverses its direction.  

int DirX(int dir);
 * Returns a multiplication factor for ->Step based on direction.
 * Specifically, return the x component of a line with a length of 1 extending
 * in the given direction from origin.
 * Use: Step = step * DirX(dir);
 * Valid only if dir is 0 to 7.

int DirY(int dir);
 * Returns a multiplication factor for ->Step based on direction.
 * Specifically, return the y component of a line with a length of 1 extending
 * in the given direction from origin.
 * Use: Step = step * DirX(dir);
 * Valid only if dir is 0 to 7.

float Distance(int x1, int y1, int x2, int y2, int scale) ;
 * Returns the distance between two sets of coordinates using Pythagoras' Theorem
 * Allows scaling for large distance determinations.
 * Argument 'scale' represents a ratio of 1:scale.
 * Argument 'scale' is most precise when using powers of 10 (i.e. 1, 10, 100, 1000, 10000).
 * If arg 'scale' is set to 0, it defaults to '1'. 
 * Returns -1 on error. 

float Distance2(int x1, int y1, int x2, int y2) ;
 * As Distance(), but uses std.cfg settings to control behaviour on overflow/underflow/illegal values.
 
bool DistX(int combo_pos, int distance);
 * Returns true if the absolute distance on the X-axis between Link and a specified combo
 * position is < 'distance'.
 
bool DistX(ffc ff_id, int distance);
 * Returns true if the absolute distance on the X-axis between Link and a specified ffc
 * position is < 'distance'.
 
bool DistX(T, int distance);
 * Returns true if the absolute distance on the X-axis between Link and a specified sprited
 * object type T, is < 'distance'.
 
bool DistX(int combo_a, int combo_b);
 * Returns true if the absolute distance on the X-axis between two combo positions is < 'distance'.
 
bool DistX(ffc ffid, int combo_pos);
bool DistX(int combo_pos, ffc ffid);
 * Returns true if the absolute distance on the X-axis between  a specified ffc
 * and a combo position is < 'distance'.
 * Overloaded for reversed args order.
 
bool DistX(int combo_pos, T);
bool DistX(T, int combo_pos);
 * Returns true if the absolute distance on the X-axis between a sprited object T
 * and a combo position is < 'distance'.
 * Overloaded for all sprited object types.
 * Overloaded for reversed args order.
 
bool DistX(T, T);
 * Returns true if the absolute distance on the X-axis between two sprited object types is < 'distance'.
 * Overloaded for all sprited object combinations. 
 
bool DistY(int combo_pos, int distance);
 * Returns true if the absolute distance on the Y-axis between Link and a specified combo
 * position is < 'distance'.
 
bool DistY(ffc ff_id, int distance);
 * Returns true if the absolute distance on the Y-axis between Link and a specified ffc
 * position is < 'distance'.
 
bool DistY(T, int distance);
 * Returns true if the absolute distance on the Y-axis between Link and a specified sprited
 * object type T, is < 'distance'.
 
bool DistY(int combo_a, int combo_b);
 * Returns true if the absolute distance on the Y-axis between two combo positions is < 'distance'.
 
bool DistY(ffc ffid, int combo_pos);
bool DistY(int combo_pos, ffc ffid);
 * Returns true if the absolute distance on the Y-axis between  a specified ffc
 * and a combo position is < 'distance'.
 * Overloaded for reversed args order.
 
bool DistY(int combo_pos, T);
bool DistY(T, int combo_pos);
 * Returns true if the absolute distance on the Y-axis between a sprited object T
 * and a combo position is < 'distance'.
 * Overloaded for all sprited object types.
 * Overloaded for reversed args order.
 
bool DistY(T, T);
 * Returns true if the absolute distance on the Y-axis between two sprited object types is < 'distance'.
 * Overloaded for all sprited object combinations. 

lweapon EtoLWeapon(eweapon a);
 * Creates an lweapon with the attributes of eweapon 'e', converting its type to the closest
 * possible match in the process.
 
void EToLWeapon(lweapon b, eweapon a);
void EToLWeapon(eweapon a, lweapon b);
 * Copies the attributes of an eweapon, to an lweapon, converting its type int he process.
 * Overloaded for reversed args order. 
 
int EtoLWeaponID(int type);
 * Takes an eweapon type and returns the closest compatible match as an lweapon type. 
 * Returns -1 if the type is illegal;
 
lweapon EWeaponToLWeapon(eweapon a);
 * See: EtoLWeapon(eweapon);
 
void EWeaponToLWeapon(eweapon a, lweapon b);
 * See: EtoLWeapon(lweapon,eweapon);
 
int EWeaponToLWeaponID(int type);
 * See: EtoLWeaponID(int);

int GetDigitValue(int n, int place);
 * Extracts a single digit from n at the place specified. 
 * -4 is the ten-thousandTHs place, 0 is the ones spot, and 4 is the ten-thousanDs spot. 

int GetHighFloat(int n);
 * Takes a float as input 'n', and returns the integer portion as int. 

int GetLowFloat(int n);
 * Takes a float as input 'n', and returns the decimal portion as int. 

int GetPartialValue(int n, int place, int num);
 * Extracts an integer using specific places of any value 'n', from position 'place' plus a number of places 'num'.

void GiveLinkItem(int itm_id);
void GiveLinkItem(int itm_id, int holdtype);
 * Creates an item on the screen at Link's coordinatesm giving it to him,
 * and running its collect script (if any). 
 * Overloaded to allow setting a 'hold up item' action, where valid args are:
	0: None
	1: One-hand, automatic for land or water
	2: Two-hand, automatic for land or water. 
	LA_HOLD1LAND
	LA_HOLD12AND
	LA_HOLD1WATER
	LA_HOLD2WATER

int Greater(int valA, int valB)
int Greater(int valA, int valB, int valC)
int Greater(int valA, int valB, int valC, int valD)
int Greater(int valA, int valB, int valC, int valD, int valE)
int Greater(int valA, int valB, int valC, int valD, int valE, int valF)
int Greater(int valA, int valB, int valC, int valD, int valE, int valF, int valG)
int Greater(int valA, int valB, int valC, int valD, int valE, int valF, int valG, int valH)
 * Accepts two to eight args, aand returns the arg that is the greatest numeric literal value. 
 
int Greatest(int arr);
 * Returns the highest value stored in an array.

int GreatestIndex(int arr);
 * Returns the array index of the highest value stored in an array.
 * If two or more indices of the array contain the same (highest) value, this will return the 
 * highest-numbered index containing that value.

int HitboxBottom();
 * Returns the Y value for the bottom of Link's hitbox.
 
int HitboxLeft();
 * Returns the Y value for the left edge of Link's hitbox. 

int HitboxRight();
 * Returns the X value for the right edge of Link's hitbox. 

int HitboxTop();
 * Returns the Y value for the top of Link's hitbox. 

int ImpactVelocity(int mass1, int velocity1, int mass2, int velociy2 ) 
 * Accepts the mass, and velocity if two objects. Determins the acceleration on impact. 
 * Returns the net change that would affect both objects. 

int ImpactVelocityA(int massA, int velocityA, int massB, int velociyB ) 
 * Accepts the mass, and velocity if two objects. Determins the acceleration on impact. 
 * Returns the change of acceleration for object 'B'. 

int ImpactVelocityB(int massA, int velocityA, int massB, int velociyB ) 
 * Accepts the mass, and velocity if two objects. Determins the acceleration on impact. 
 * Returns the change of acceleration for object 'B'.

void ImpactVelocity(lweapon a, eweapon b, int massA, int velocityA, int massB, int velociyB ) 
 * Accepts the mass, and velocity if two weapons. Determins the acceleration on impact. 
 * Changes the Step of both to reflect their mass on collision. 

int Least(int arr);
 * Returns the lowest value stored in an array.

int LeastIndex(int arr);
 * Returns the array index of the lowest value stored in an array.
 * If two or more indices of the array contain the same (lowest) value, this will return the 
 * highest-numbered index containing that value.
 
int Lesser(int valA, int valB)
int Lesser(int valA, int valB, int valC)
int Lesser(int valA, int valB, int valC, int valD)
int Lesser(int valA, int valB, int valC, int valD, int valE)
int Lesser(int valA, int valB, int valC, int valD, int valE, int valF)
int Lesser(int valA, int valB, int valC, int valD, int valE, int valF, int valG)
int Lesser(int valA, int valB, int valC, int valD, int valE, int valF, int valG, int valH)
 * Accepts two to eight args, aand returns the arg that is the least numeric literal value. 
 
bool LinkFacing(ffc f);
 * Returns if Link is facing the specified ffc.
 
bool LinkFacing(int combo_pos);
 * Returns if Link is facing the specified combo position.
 
bool LinkFacing(T);
 * Returns if Link is facing the sprited object T.
 * Overloaded for all sprited object types. 
 
eweapon LtoEWeapon(eweapon a);
 * Creates an eweapon with the attributes of lweapon 'e', converting its type to the closest
 * possible match in the process.
 
void LtoEWeapon(lweapon b, eweapon a);
void LtoEWeapon(eweapon a, lweapon b);
 * Copies the attributes of an lweapon, to an eweapon, converting its type int he process.
 * Overloaded for reversed args order. 
 
int LtoEWeaponID(int type);
 * Takes an lweapon type and returns the closest compatible match as an eweapon type. 
 * Returns -1 if the type is illegal;
 
eweapon LWeaponToEWeapon(eweapon a);
 * See: LtoEWeapon(lweapon);
 
void LWeaponToEWeapon(lweapon a, eweapon b);
 * See: LtoEWeapon(lweapon,eweapon);
 
int LWeaponToEWeaponID(int type);
 * See: LtoEWeaponID(int);

void NoInput();
 * Kills inputs from A, B, L, R, Start, Map, and Ex buttons. 
 
void NoInput(bool stick);
 * Kills inputs from A, B, L, R, Start, Map, and Ex buttons. 
 * Allows killing analogue stick inputs as well.


 * Matching - Comparison Functions: use an array (list) of values, and compare against a pointer, or pointer variable. 

bool MatchAction(int list)
 * Match the present Link->Action to those on array 'list'.
 * Returns true of any of the entries on the list match. 
 * Checks if the present Link->Action is one from a predefined list.

bool MatchComboC(int list, int cmb)
 * Compares combo 'cmb' and compares it to the values in array 'list'. 
 * Returns true of any of the entries on the list match its CSet.

bool MatchComboD(int list, int cmb)
 * Compares combo 'cmb' and compares it to the values in array 'list'. 
 * Returns true of any of the entries on the list match its Data. 

bool MatchComboF(int list, int cmb)
 * Compares combo 'cmb' and compares it to the values in array 'list'. 
 * Returns true of any of the entries on the list match its Flag.

bool MatchComboI(int list, int cmb)
 * Compares combo 'cmb' and compares it to the values in array 'list'. 
 * Returns true of any of the entries on the list match its Inherent Flag.

bool MatchComboS(int list, int cmb)
 * Compares combo 'cmb' and compares it to the values in array 'list'. 
 * Returns true of any of the entries on the list match its Solidity.

bool MatchComboT(int list, int cmb)
 * Compares combo 'cmb' and compares it to the values in array 'list'. 
 * Returns true of any of the entries on the list match its Type.

bool MatchEWeaponType(int list, eweapon e)
 * Match a given eweapon to the contents of an array 'list'
 * Returns true of any of the entries on the list match. 

int MatchFFCScript(int script_id)
 * Matches a running ffc script to script_id. 
 * Returns the ffc running that script, if any.
 * Returns 0 on failure to find a match.
 
int MatchFFCScript(int script_id, int list)
 * Compares the scripts of all running ffcs, to all indices of an array 'list' searching for
 * a match to ffc script 'script_id'.
 * If there is a match, it MatchScript() will return the first match (FFC number) found.

bool MatchItem(int list, item i)
 * Match a given item ID number to the contents of an array 'list'
 * Returns true of any of the entries on the list match. 

bool MatchLayerComboC(int list, int layer, int cmb)
 * Compares combo 'cmb' on Layer 'layer' and compares it to the values in array 'list'. 
 * Returns true of any of the entries on the list match its CSet.

bool MatchLayerComboD(int list, int layer, int cmb)
 * Compares combo 'cmb' on Layer 'layer' and compares it to the values in array 'list'. 
 * Returns true of any of the entries on the list match its Data. 

bool MatchLayerComboF(int list, int layer, int cmb)
 * Compares combo 'cmb' on Layer 'layer' and compares it to the values in array 'list'. 
 * Returns true of any of the entries on the list match its Flag.

bool MatchLayerComboI(int list, int layer, int cmb)
 * Compares combo 'cmb' on Layer 'layer' and compares it to the values in array 'list'. 
 * Returns true of any of the entries on the list match its Inherent Flag.

bool MatchLayerComboS(int list, int layer, int cmb);
 * Compares combo 'cmb' on Layer 'layer' and compares it to the values in array 'list'. 
 * Returns true of any of the entries on the list match its Solidity.

bool MatchLayerComboT(int list, int layer, int cmb);
 * Compares combo 'cmb' on Layer 'layer' and compares it to the values in array 'list'. 
 * Returns true of any of the entries on the list match its Type.

bool MatchLWeaponType(int list, lweapon l);
 * Match a given lweapon to the contents of an array 'list'
 * Returns true of any of the entries on the list match.

bool MatchNPC(int list, npc n);
 * Match a given npc ID number to the contents of an array 'list'
 * Returns true of any of the entries on the list match. 

bool MatchNPCT(int list, npc n);
 * Match a given NPC TYPE to the contents of an array 'list'
 * Returns true of any of the entries on the list match.

void NoLinkKnockback();
 * Negates engine knockback for Link on land, or in water.
 
void NoLinkKnockbackLand();
 * Negates engine knockback for Link only on land.
 
void NoLinkKnockbackWater();
 * Negates engine knockback for Link only in water.
 
void NoPress();
 * Kills presses from A, B, L, R, Start, Map, and Ex buttons.
 
void NoPress(bool stick);
 * Kills presses from A, B, L, R, Start, Map, and Ex buttons.
 * Allows killing analogue stick inputs as well.

int ProximityX(int a);
 * Returns the X-axis absolute distance in pixels between Link and a combo at pos 'a'.

int ProximityX(ffc ffc_id);
 * Returns the X-axis absolute distance in pixels between Link and a given ffc ID.
 
int ProximityX(int cmb_a, int cmb_b);
int ProximityX(int cmb_a, int cmb_b, bool from-centre);
 * Returns the absolute X-axis distance in pixels between two combo positions. 
 * Overloaded with an an arg to measure from the centre of both objects.

int ProximityX(T);
 * Returns the X-axis absolute distance in pixels between Link and a given sprited object T.
 * Overloaded for all sprited object types.
 
int ProximityX(int combo_pos, T); 
int ProximityX(T, int combo_pos); 
int ProximityX(int combo_pos, T, bool from-centre);
int ProximityX(T, int combo_pos, bool from-centre);
 * Returns the X-axis absolute distance in pixels between a combo position and any sprited object T.
 * Overloaded for all sprited object types, and for reversed args order. 
 * Overloaded with an an arg to measure from the centre of both objects.
 
int ProximityX(ffc a, ffc b);
int ProximityX(ffc a, ffc b, bool from-centre);
 * Returns the X-axis absolute distance in pixels between two ffcs.
 * Overloaded with an an arg to measure from the centre of both objects.

int ProximityX(ffc ffc_id, T);
int ProximityX(T, ffc ffc_id);
int ProximityX(ffc ffc_id, T, bool from-centre);
int ProximityX(T, ffc ffc_id, bool from-centre);
 * Returns the X-axis absolute distance in pixels between an ffc and any sprited object T.
 * Overloaded for all sprited object types, and for reversed args order. 
 * Overloaded with an an arg to measure from the centre of both objects.
 
int ProximityX(T, T);
int ProximityX(T, T, bool from-centre);
 * Returns the X-axis absolute distance in pixels between two sprited objects T.
 * Overloaded for all sprited object types, and for reversed args order. 
 * Overloaded with an an arg to measure from the centre of both objects.
 
int ProximityY(int a);
 * Returns the Y-axis absolute distance in pixels between Link and a combo at pos 'a'.

int ProximityY(ffc ffc_id);
 * Returns the Y-axis absolute distance in pixels between Link and a given ffc ID.
 
int ProximityY(int cmb_a, int cmb_b);
int ProximityY(int cmb_a, int cmb_b, bool from-centre);
 * Returns the absolute Y-axis distance in pixels between two combo positions. 
 * Overloaded with an an arg to measure from the centre of both objects.

int ProximityY(T);
 * Returns the Y-axis absolute distance in pixels between Link and a given sprited object T.
 * Overloaded for all sprited object types.
 
int ProximityY(int combo_pos, T); 
int ProximityY(T, int combo_pos); 
int ProximityY(int combo_pos, T, bool from-centre);
int ProximityY(T, int combo_pos, bool from-centre);
 * Returns the Y-axis absolute distance in pixels between a combo position and any sprited object T.
 * Overloaded for all sprited object types, and for reversed args order. 
 * Overloaded with an an arg to measure from the centre of both objects.
 
int ProximityY(ffc a, ffc b);
int ProximityY(ffc a, ffc b, bool from-centre);
 * Returns the Y-axis absolute distance in pixels between two ffcs.
 * Overloaded with an an arg to measure from the centre of both objects.

int ProximityY(ffc ffc_id, T);
int ProximityY(T, ffc ffc_id);
int ProximityY(ffc ffc_id, T, bool from-centre);
int ProximityY(T, ffc ffc_id, bool from-centre);
 * Returns the Y-axis absolute distance in pixels between an ffc and any sprited object T.
 * Overloaded for all sprited object types, and for reversed args order. 
 * Overloaded with an an arg to measure from the centre of both objects.
 
int ProximityY(T, T);
int ProximityY(T, T, bool from-centre);
 * Returns the Y-axis absolute distance in pixels between two sprited objects T.
 * Overloaded for all sprited object types, and for reversed args order. 
 * Overloaded with an an arg to measure from the centre of both objects.

bool RandB();
 * Randomly returns true or false;
 
bool RandB(int percentTrue);
 * Randomly returns a percentile check.
 
float SafeDistance(int x1, int y1, int x2, int y2);
 * As Distance(), but with additional sanity checks.
 
float SafeSqrt(float val);
 * Safe Sqrt functions if an irrational number would be involved.
 * Returns '464' (square root of 215296), if the value passed is negative. 
 * Returns '0' on Sqrt(0).
 
float SafeSqrt(float val, float specifyNegRet);
 * Returns square root of 'val'. 
 * Returns 'specifyNegRet' if a negative value is passed as 'val'. Returns '0' for Sqrt(0).

void ScreenToLayer(int sourceMap, int sourceScreen, int layerMin, int layerMax, int drawOpacity, int destLayer);
 * Draws a screen specified by 'sourceMap and sourceScreen;, from layers specified by 'layerMin and layerMax', 
 * at a desired opacity, to the layer specified by 'destLayer' of the current screen.

void ScreenToLayer(int sourceMap, int sourceScreen, int drawOpacity, int destLayer);
 * Draws all layers of a screen specified by 'sourceMap and sourceScreen;,
 * at a desired opacity, to the layer specified by 'destLayer' of the current screen.

void SetCombo(int pos, int data, int type, int flag, int inh_flag, int cset, int solid)
 * Sets the values for combo at position 'pos' to those specified. Pass -1 to leave a value unchanged.

void SetLayerComboValues(int layer, int pos, int data, int type, int flag, int inh_flag, int cset, int solid)
 * Sets the values for a combo on layer 'layer', at position 'pos' to the values specified.
 * Pass -1 to any value to leave it unchanged. 

int SpeedRev(int speed, int reduceinertia);
 * Returns a reversed speed, given a new speed for an object given a base speed and an interia factor. 

void TraceArray(int arr);
 * Trace the indices of an array, with a space between each.
void TraceArray(int arr, bool verbose);
 * As above, with additional logging. 
 * WARNING: Very slow.
 
void TraceArrayB(bool arr, int size);
void TraceArrayB(bool arr, int size, bool verbose);
 * As TraceArray(), for boolean arrays. 
 * You must provide the array size.

void TraceStr(int string, int value);
 * Traces a string, and traces a value appended at its end.

void TraceStrB(int string, bool value);
 * As TraceStr(), but the value is a bool and it prints true/false.
 
bool Xor(bool valA, bool valB);
 * Returns the result of a logical exclusive-or on two boolean values.