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

OBJ_GALAXY Class Reference

List of all members.

Private Methods

table GetProducts ()
table GetResources ()
GALOBJ FindStationWithWare (int a_mode, int a_ware, GALOBJ a_startsector, int a_price, int a_maxjumps, int a_amount, GALOBJ a_trader)
int FindSector (int a_flags, GALOBJ a_startsector, int a_jumps, int a_race, int a_num)
int SectorGetNumFactories (int x, int y)
int SectorGetNumDocks (int x, int y)
int SectorGetRaceID (int x, int y)

Private Attributes

table gal_Products
table gal_Resources

Detailed Description

Game code instantiates one global object of this class. The object handles galaxy-wide functions and holds galaxy-wide game information like all sectors, products & ressources for all stations in all sectors.


Member Function Documentation

int FindSector int    a_flags,
GALOBJ    a_startsector,
int    a_jumps,
int    a_race,
int    a_num
[private]
 

find a sector (not the startsector!)

Parameters:
a_flags  FIND_NEAREST, FIND_RANDOM, FIND_MULTIPLE, FIND_EXACTJUMPS
a_startsector  sector to start the search at
a_jumps  if > 0, maximum jumps, if FIND_EXACTJUMPS is set, exact jumps
a_race  if != 0 owner race of sector
a_num  number of sectors to find if FIND_MULTIPLE is set
Returns :
if flag FIND_MULTIPLE is set, returns an array of found asteroids, else returns an asteroid if found or 0 if nothing is found

GALOBJ FindStationWithWare int    a_mode,
int    a_ware,
GALOBJ    a_startsector,
int    a_price,
int    a_maxjumps,
int    a_amount,
GALOBJ    a_trader
[private]
 

find a station with ware

Parameters:
a_mode  the following flags can be "or´d": FINDWARE_RESOURCE, FINDWARE_PRODUCT, FINDWARE_BESTPRICE, FINDWARE_MINJUMPS, FINDWARE_ONLYTYPEAVAILABLE, FINDWARE_PRICEDEPENDONJUMPS
a_price  a_price < 0: price does not matter,
a_maxjumps  a_maxjumps < 0: use maximum jumps
a_amount  a_amount < 0: any amount
a_startsector  start search from this sector within a radius given by a_maxjumps
a_ware  which ware, e.g. TYPECODE(SGTYPE_W_LASER,SG_WR_LS_ALPHA)
a_trader  function checks if passed object is allowed to land
Returns :
a station found or 0

table GetProducts   [private]
 

returns gal_Products

table GetResources   [private]
 

returns gal_Resources

int SectorGetNumDocks int    x,
int    y
[private]
 

returns number of docks in sector with coordinates x,y

int SectorGetNumFactories int    x,
int    y
[private]
 

returns number of factories in sector with coordinates x,y

int SectorGetRaceID int    x,
int    y
[private]
 

Returns raceID of sector with coordinates x,y. The sector is owned by this race.


Member Data Documentation

table gal_Products [private]
 

table of all stations that produce a product, format: (product, (station, sector))

table gal_Resources [private]
 

table of all stations that need resources, format: (resource, (station, sector))


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