Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   Compound Members   Related Pages  

Global Functions


Functions

int FindStringInArray (array a_arr, string a_str)
int FindStringInTable (table a_t, string a_str)
int FindStringInDynArray (dynarray a_arr, string a_str)
int GetRandomSpeaker (int raceid)
string GetRandomNameFromSpeaker (int speaker)
string GetIDCode (GALOBJ gobj)
string GetClassCode (GALOBJ gobj)
GALOBJ GetObjectSector (GALOBJ a_obj)
string GetObjectName (GALOBJ gobj)
string GetWareName (int maintype, int subtype)
int GetFixedValueFactor (int maintype)
int STypeToGType (int stypecode)
int WareTypeVolume (int maintype, int subtype)
int WareTypePriceAverage (int maintype, int subtype)
int WareTypePriceVariationPri (int maintype, int subtype, int a_price)
int WareTypePriceVariationSec (int maintype, int subtype, int a_price)
int WareTypePrice (int a_bestnum, int a_avgprice, int a_variation, int a_curnum)
int WareTypeMaxPrice (int maintype, int subtype)
int WareTypeMinPrice (int maintype, int subtype)
int WareTypeMaxPriceSec (int maintype, int subtype)
int WareTypeMinPriceSec (int maintype, int subtype)
int BestMissileForTarget (GALOBJ a_gTarget)
BOOL WareTypeIsIllegalForRace (int maintype, int subtype, int a_raceid)
BOOL CheckWareTableForIllegalWares (table a_tWares, int a_raceid)
void UpdateTradeRankingsFromDeal (GALOBJ a_actor, GALOBJ a_partner, int a_ware, int a_price, int a_amount)

Detailed Description

This is a list of all global functions which can be accessed from anywhere in KC-code.

Function Documentation

int BestMissileForTarget GALOBJ    a_gTarget
 

returns a sector-missiletype.

BOOL CheckWareTableForIllegalWares table    a_tWares,
int    a_raceid
 

returns whether a ware is illegal in the table.

int FindStringInArray array    a_arr,
string    a_str
 

find a string by name in an array. returns the index if found. if not found, returns -1

int FindStringInDynArray dynarray    a_arr,
string    a_str
 

find a string by name in an dynarray. returns the index if found. if not found, returns -1

int FindStringInTable table    a_t,
string    a_str
 

find a string by name in a table. the string is the value. returns the key if found. if not found, returns 0

string GetClassCode GALOBJ    gobj
 

Returns a string of two characters determining the class of the galaxy object (like DO for a space dock and M1 for an M1 carrier).

int GetFixedValueFactor int    maintype
 

Returns value factor for given maintype

string GetIDCode GALOBJ    gobj
 

Returns an alphanumeric ID code string of a galaxy object (like TM3EA-12 for a Teladi M3 ship).

string GetObjectName GALOBJ    gobj
 

Returns the name of any galaxy object, which can be a ship, station, sector or even a race.

GALOBJ GetObjectSector GALOBJ    a_obj
 

Returns the sector an object is in.

string GetRandomNameFromSpeaker int    speaker
 

Returns a rnd. name from a given speaker ID.

int GetRandomSpeaker int    raceid
 

Returns an ID of a random speaker of a given race.

string GetWareName int    maintype,
int    subtype
 

Returns string with warename.

int STypeToGType int    stypecode
 

Cast sector-type (as typecode) in galaxy-type

void UpdateTradeRankingsFromDeal GALOBJ    a_actor,
GALOBJ    a_partner,
int    a_ware,
int    a_price,
int    a_amount
 

a_mount > 0 : buy, a_amount < 0: sell

BOOL WareTypeIsIllegalForRace int    maintype,
int    subtype,
int    a_raceid
 

returns if a ware is illegal amongst a race.

int WareTypeMaxPrice int    maintype,
int    subtype
 

returns max price of ware.

int WareTypeMaxPriceSec int    maintype,
int    subtype
 

returns max price of ware.

int WareTypeMinPrice int    maintype,
int    subtype
 

returns min price of ware.

int WareTypeMinPriceSec int    maintype,
int    subtype
 

returns min price of ware.

int WareTypePrice int    a_bestnum,
int    a_avgprice,
int    a_variation,
int    a_curnum
 

returns price of ware.

int WareTypePriceAverage int    maintype,
int    subtype
 

returns average price of ware

int WareTypePriceVariationPri int    maintype,
int    subtype,
int    a_price
 

returns variation of ware.

int WareTypePriceVariationSec int    maintype,
int    subtype,
int    a_price
 

returns variation of ware.

int WareTypeVolume int    maintype,
int    subtype
 

returns vol. of ware. NOTE: a ware has always a minimum volume of 1


Generated on Mon Aug 26 18:26:35 2002 for X² KC by doxygen1.2.17