This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Classes | |
struct | a_world |
World. More... | |
struct | a_area |
Area. More... | |
struct | a_feature |
Feature. More... | |
struct | a_waypoint |
Waypoint. More... | |
struct | a_path |
Path. More... | |
struct | a_region |
Region. More... | |
struct | a_region_link |
Defines | |
#define | MINWIDTH 3 |
Minimum Area width. | |
#define | MINHEIGHT 3 |
Minimum Area height. | |
#define | malloc_area_layer(TYPE) ((TYPE *) xmalloc(area.width * area.height * sizeof(TYPE))) |
Allocate layer. | |
#define | zero_area_layer(ADDR, TYPE) (memset(ADDR, 0, area.width * area.height * sizeof(TYPE))) |
Zero area. | |
#define | aref(m, x, y) (in_area((x),(y)) ? (m)[area.width * (y) + wrapx((x))] : 0) |
Area refernce. | |
#define | aset(m, x, y, v) (in_area((x),(y)) ? (m)[area.width * (y) + wrapx((x))] = (v) : 0) |
Area set. | |
#define | aadd(m, x, y, v) (in_area((x),(y)) ? (m)[area.width * (y) + wrapx((x))] += (v) : 0) |
Area add. | |
#define | NOUSER (0) |
No user id. | |
#define | user_defined() (area.user != NULL) |
Is user area defined? | |
#define | user_at(x, y) aref(area.user, x, y) |
User at? | |
#define | set_user_at(x, y, u) aset(area.user, x, y, u) |
#define | radius_covers_n_cells(dist) (1 + (((dist) + 1) * (dist) * 3)) |
Number of cells covered by a radius. | |
#define | cell_is_within_range(x, y, n, x1, y1) |
Is cell in range? | |
#define | cell_is_within_reach(u, x1, y1) cell_is_within_range((u)->x, (u)->y, (u)->reach, (x1), (y1)) |
Is cell in reach? | |
#define | for_all_cells_within_range(x, y, n, x1, y1) |
Iterate over range. | |
#define | for_all_cells_within_reach(u, x1, y1) for_all_cells_within_range((u)->x, (u)->y, (u)->reach, (x1), (y1)) |
Iterate over all cells in range. | |
#define | unit_at(x, y) aref(area.units, x, y) |
Unit at cell. | |
#define | set_unit_at(x, y, u) aset(area.units, x, y, u) |
Set unit at cell. | |
#define | for_all_stack(x, y, var) for ((var) = unit_at((x), (y)); (var) != NULL; (var) = (var)->nexthere) |
Iterate Unit stack. | |
#define | for_all_stack_with_occs(x, y, var) |
Iterate Unit stack and occupants. | |
#define | terrain_defined() (area.terrain != NULL) |
Is Terrain defined. | |
#define | terrain_at(x, y) aref(area.terrain, x, y) |
Terrain at. | |
#define | set_terrain_at(x, y, t) aset(area.terrain, x, y, t) |
Set Terrain at. | |
#define | any_aux_terrain_defined() (area.auxterrain != NULL) |
Is any auxillary terrain defined? | |
#define | aux_terrain_defined(at) (any_aux_terrain_defined() && area.auxterrain[at] != NULL) |
Is kind of auxillary terrain defined? | |
#define | aux_terrain_at(x, y, at) aref(area.auxterrain[at], x, y) |
Auxillary Terrain at. | |
#define | set_aux_terrain_at(x, y, at, v) aset(area.auxterrain[at], x, y, v) |
Set auxillary Terrain at. | |
#define | any_borders_at(x, y, b) (aux_terrain_at(x, y, b) != 0) |
Are there borders at? | |
#define | border_at(x, y, dir, b) (aux_terrain_defined(b) ? (aux_terrain_at(x, y, b) & (1 << (dir))) : FALSE) |
Is Border in dirction at. | |
#define | any_connections_at(x, y, c) (aux_terrain_at(x, y, c) != 0) |
Are there connections at? | |
#define | connection_at(x, y, dir, c) (aux_terrain_defined(c) ? (aux_terrain_at(x, y, c) & (1 << (dir))) : FALSE) |
Is connection in dirction at. | |
#define | elevations_defined() (area.elevations != NULL) |
Are elevations defined? | |
#define | elev_at(x, y) aref(area.elevations, x, y) |
Elevation at. | |
#define | set_elev_at(x, y, v) aset(area.elevations, x, y, v) |
Set elevation at. | |
#define | features_defined() (area.features != NULL) |
Are features defined? | |
#define | raw_feature_at(x, y) aref(area.features, x, y) |
Raw feature at. Get the id fo the feature at cell(x,y). The "raw feature" is its "short" identifier. | |
#define | set_raw_feature_at(x, y, f) aset(area.features, x, y, f) |
Set raw feature at. Set the id fo the feature at cell(x,y). The "raw feature" is its "short" identifier. | |
#define | people_sides_defined() (area.peopleside != NULL) |
Population defined? | |
#define | people_side_at(x, y) aref(area.peopleside, x, y) |
Side of people at. | |
#define | set_people_side_at(x, y, s) aset(area.peopleside, x, y, s) |
Set Side of people at. | |
#define | NOBODY (60) |
Nobody. | |
#define | populated(x, y) (people_side_at(x,y) != NOBODY) |
Is populated? | |
#define | control_sides_defined() (area.controlside != NULL) |
Is Area control defined? | |
#define | control_side_at(x, y) aref(area.controlside, x, y) |
Controled by at. | |
#define | set_control_side_at(x, y, s) aset(area.controlside, x, y, s) |
Set controled by at. | |
#define | NOCONTROL (60) |
#define | controlled(x, y) (control_side_at(x,y) != NOCONTROL) |
Is Controlled? | |
#define | any_cell_materials_defined() (area.materials != NULL) |
Are cell Materials defined? | |
#define | cell_material_defined(m) (area.materials[m] != NULL) |
Is this material defined in cells? | |
#define | material_at(x, y, m) aref(area.materials[m], x, y) |
Material at cell. | |
#define | set_material_at(x, y, m, v) aset(area.materials[m], x, y, v) |
Set Material at cell. | |
#define | temperatures_defined() (area.temperature != NULL) |
Is temperature defined? | |
#define | temperature_at(x, y) aref(area.temperature, x, y) |
Temperature at cell. | |
#define | set_temperature_at(x, y, v) aset(area.temperature, x, y, v) |
Set temperature at cell. | |
#define | clouds_defined() (area.clouds != NULL) |
Are clouds defined? | |
#define | raw_cloud_at(x, y) aref(area.clouds, x, y) |
Clouds at cell. | |
#define | set_raw_cloud_at(x, y, v) aset(area.clouds, x, y, v) |
Set clouds at cell. | |
#define | cloud_bottoms_defined() (area.cloudbottoms != NULL) |
Are cloud bottoms defined? | |
#define | raw_cloud_bottom_at(x, y) aref(area.cloudbottoms, x, y) |
Cloud bottom at cell. | |
#define | set_raw_cloud_bottom_at(x, y, v) aset(area.cloudbottoms, x, y, v) |
Set cloud bottoms at cell. | |
#define | cloud_heights_defined() (area.cloudheights != NULL) |
Are cloud tops defined? | |
#define | raw_cloud_height_at(x, y) aref(area.cloudheights, x, y) |
Cloud top at cell. | |
#define | set_raw_cloud_height_at(x, y, v) aset(area.cloudheights, x, y, v) |
Set cloud top at cell. | |
#define | winds_defined() (area.winds != NULL) |
Are winds defined? | |
#define | raw_wind_at(x, y) aref(area.winds, x, y) |
Raw wind at cell. | |
#define | set_raw_wind_at(x, y, v) aset(area.winds, x, y, v) |
Set raw wind at cell. | |
#define | wind_dir(w) ((w) & 0x07) |
Wind direction. | |
#define | wind_force(w) ((w) >> 3) |
Wind froce. | |
#define | wind_dir_at(x, y) (wind_dir(raw_wind_at(x, y))) |
Wind direction at. | |
#define | wind_force_at(x, y) (wind_force(raw_wind_at(x, y))) |
Wind force at. | |
#define | set_wind_at(x, y, d, f) (set_raw_wind_at(x, y, ((f) << 3) | (d))) |
Set wind at cell. | |
#define | CALM (0) |
Calm wind force. | |
#define | tmp1_at(x, y) aref(area.tmp1, x, y) |
Get scratch layer 1. | |
#define | set_tmp1_at(x, y, v) aset(area.tmp1, x, y, v) |
Set scratch layer 1. | |
#define | tmp2_at(x, y) aref(area.tmp2, x, y) |
Get scratch layer 2. | |
#define | set_tmp2_at(x, y, v) aset(area.tmp2, x, y, v) |
Set scratch layer 2. | |
#define | tmp3_at(x, y) aref(area.tmp3, x, y) |
Get scratch layer 3. | |
#define | set_tmp3_at(x, y, v) aset(area.tmp3, x, y, v) |
Set scratch layer 3. | |
#define | wrapx(x) (area.xwrap ? (((x) + (area.width << 8)) % area.width) : (x)) |
Wrap x. | |
#define | limity(y) (max(0, min((y), (area.height-1)))) |
Constrain y co-ordinate. | |
#define | interior(y) (max(1, min((y), (area.height-2)))) |
Constrain y to inerior of world. | |
#define | xy_in_dir(x, y, dir, nx, ny) (nx) = wrapx((x) + dirx[dir]); (ny) = (y) + diry[dir]; |
Coordinate in direction. | |
#define | in_area(x, y) (between(0, (y), area.height-1) && x_in_area(x, y)) |
Is in area? | |
#define | x_in_area(x, y) |
Is x in area? | |
#define | inside_area(x, y) (between(1, (y), area.height-2) && x_inside_area(x, y)) |
Is valid unit position? | |
#define | x_inside_area(x, y) |
Is x a valid unit postion? | |
#define | for_all_cells(x, y) |
Iterate over all cells. | |
#define | for_all_interior_cells(x, y) |
Iterate over all interior cells. | |
#define | for_all_features(feat) for ((feat) = featurelist; (feat) != NULL; (feat) = (feat)->next) |
Iterate through features. | |
#define | lighting(x, y, snx, sny) |
Lighting at cell. | |
#define | night_at(x, y) (daynight && lighting((x), (y), (int) sunx, (int) suny) == 0) |
Night at cell? | |
Typedefs | |
typedef a_world | World |
World. | |
typedef a_area | Area |
Area. | |
typedef a_feature | Feature |
Feature. | |
typedef a_waypoint | Waypoint |
Waypoint. | |
typedef a_path | Path |
Path. | |
typedef a_region | TRegion |
Region. | |
typedef a_region_link | TRegionLink |
Functions | |
void | init_world (void) |
int | set_world_circumference (int circum, int warn) |
int | set_area_shape (int width, int height, int warn) |
int | valid_area_shape (int width, int height, int warn) |
void | check_area_shape (void) |
void | calculate_world_globals (void) |
void | final_init_world (void) |
void | compute_elevation_bounds (void) |
void | allocate_area_terrain (void) |
void | allocate_area_aux_terrain (int t) |
void | allocate_area_scratch (int n) |
void | allocate_area_elevations (void) |
void | allocate_area_temperatures (void) |
void | allocate_area_people_sides (void) |
void | allocate_area_control_sides (void) |
void | allocate_area_material (int m) |
void | allocate_area_clouds (void) |
void | allocate_area_cloud_altitudes (void) |
void | allocate_area_cloud_bottoms (void) |
void | allocate_area_cloud_heights (void) |
void | allocate_area_winds (void) |
int | fn_terrain_at (int x, int y) |
int | fn_aux_terrain_at (int x, int y) |
int | fn_feature_at (int x, int y) |
int | fn_elevation_at (int x, int y) |
int | fn_people_side_at (int x, int y) |
int | fn_control_side_at (int x, int y) |
int | fn_material_at (int x, int y) |
int | fn_temperature_at (int x, int y) |
int | fn_raw_cloud_at (int x, int y) |
int | fn_raw_cloud_bottom_at (int x, int y) |
int | fn_raw_cloud_height_at (int x, int y) |
int | fn_raw_wind_at (int x, int y) |
void | allocate_area_users (void) |
int | fn_user_at (int x, int y) |
void | fn_set_user_at (int x, int y, int val) |
void | fn_set_terrain_at (int x, int y, int val) |
void | fn_set_aux_terrain_at (int x, int y, int val) |
void | fn_set_people_side_at (int x, int y, int val) |
void | fn_set_control_side_at (int x, int y, int val) |
void | fn_set_raw_feature_at (int x, int y, int val) |
void | fn_set_elevation_at (int x, int y, int val) |
void | fn_set_material_at (int x, int y, int val) |
void | fn_set_temperature_at (int x, int y, int val) |
void | fn_set_raw_wind_at (int x, int y, int val) |
void | fn_set_raw_cloud_at (int x, int y, int val) |
void | fn_set_raw_cloud_bottom_at (int x, int y, int val) |
void | fn_set_raw_cloud_height_at (int x, int y, int val) |
void | change_terrain_type (int x, int y, int t2) |
int | limited_search_around (int x0, int y0, int range, int(*pred)(int, int, int *, ParamBox *), int incr, int *counter, int rsltlimit, ParamBox *parambox) |
int | search_around (int x0, int y0, int range, int(*pred)(int, int, int *, ParamBox *), int incr, ParamBox *parambox) |
int | search_around (int x0, int y0, int maxdist, int(*pred)(int, int), int *rxp, int *ryp, int incr) |
int | limited_search_around (int x0, int y0, int maxdist, int(*pred)(int, int, int *), int *rxp, int *ryp, int incr, int rsltlimit) |
int | search_and_apply (int x0, int y0, int maxdist, int(*pred)(int, int), int *rxp, int *ryp, int incr, void(*fn)(int, int), int num) |
void | apply_to_area (int x0, int y0, int dist, void(*fn)(int, int)) |
void | apply_to_area_plus_edge (int x0, int y0, int dist, void(*fn)(int, int)) |
void | apply_to_ring (int x0, int y0, int distmin, int distmax, void(*fn)(int, int)) |
void | apply_to_hexagon (int x0, int y0, int w2, int h2, void(*fn)(int, int)) |
int | limited_search_under_arc (int x, int y, int dir, int range, int dirbias, int(*pred)(int x, int y, int *counter, ParamBox *parambox), int *counter, int rsltlimit, ParamBox *parambox) |
int | search_under_arc (int x, int y, int dir, int range, int dirbias, int(*pred)(int x, int y, int *counter, ParamBox *parambox), ParamBox *parambox) |
void | apply_to_path (int fx, int fy, int tx, int ty, int(*dirtest)(int x, int y, int dir), int(*dirsort)(int x, int y, int *dirchoices, int numchoices), int(*fn)(int x, int y, int dir, int j, int numchoices), int shortest) |
int | search_straight_line (int x0, int y0, int x1, int y1, int(*pred)(int, int), int *rxp, int *ryp) |
void | set_border_at (int x, int y, int dir, int t, int onoff) |
void | set_connection_at (int x, int y, int dir, int t, int onoff) |
void | patch_linear_terrain (int t) |
void | init_features (void) |
Feature * | find_feature (int fid) |
Feature * | feature_at (int x, int y) |
void | compute_all_feature_centroids (void) |
void | compute_feature_centroid (Feature *feature) |
int | point_in_dir (int x, int y, int dir, int *xp, int *yp) |
int | interior_point_in_dir (int x, int y, int dir, int *xp, int *yp) |
int | point_in_dir_n (int x, int y, int dir, int n, int *xp, int *yp) |
int | interior_point_in_dir_n (int x, int y, int dir, int n, int *xp, int *yp) |
int | random_point (int *xp, int *yp) |
int | random_edge_point (int *xp, int *yp) |
int | random_point_near (int cx, int cy, int radius, int *xp, int *yp) |
int | random_point_in_area (int cx, int cy, int rx, int ry, int *xp, int *yp) |
void | terrain_subtype_warning (char *context, int t) |
int | approx_dir (int dx, int dy) |
int | hextant (int dx, int dy) |
int | distance (int x1, int y1, int x2, int y2) |
int | world_distance (int x1, int y1, int x2, int y2) |
int | closest_dir (int x, int y) |
void | xy_to_latlong (int x, int y, int xf, int yf, int *latp, int *lonp) |
int | latlong_to_xy (int lat, int lon, int *xp, int *yp, int *xfp, int *yfp) |
int | num_people_at (int x, int y) |
Variables | |
World | world |
Area | area |
int | midturnrestore |
int | numfeatures |
int | minelev |
int | maxelev |
int | mintemp |
int | maxtemp |
int | minwindforce |
int | maxwindforce |
int | any_materials_in_terrain |
int | any_elev_variation |
int | any_temp_variation |
int | any_temp_variation_in_layer |
int | any_wind_variation |
int | any_wind_variation_in_layer |
int | any_clouds |
|
Area add. Increment the value of a cell in a layer.
|
|
Is any auxillary terrain defined? Check to see if there is any auxillary terrain defined.
|
|
Are there borders at? Check for a border at a given cell.
|
|
Are cell Materials defined? Check to see if materials in cells are used.
|
|
Are there connections at? Check for a connections at a given cell.
|
|
Area refernce. Returns a value at a cell in the layer.
|
|
Area set. Set the value of a cell in a layer.
|
|
Auxillary Terrain at. Get the auxillary terrain at a cell.
|
|
Is kind of auxillary terrain defined? Check to see if a specific type of auxillary terrain is defined.
|
|
Is Border in dirction at. See if there is a border in the specified direction at cell(x,y) for the specified border type.
|
|
Calm wind force.
|
|
Value: (( (x) - (x1) > (n) || (x1) - (x) > (n) || (y) - (y1) > (n) \ || (y1) - (y) > (n) || (x) + (y) - (x1) - (y1) > (n) \ || (x1) + (y1) - (x) - (y) > (n) ) ? FALSE : TRUE) Test if cell at (x1, y1) is within n steps from (x, y)
|
|
Is cell in reach? Test if cell at (x1, y1) is within reach of .
|
|
Is this material defined in cells? Check to see if a specific material is defined in cells.
|
|
Are cloud bottoms defined? Check to see if cloud bottoms are used in game.
|
|
Are cloud tops defined? Check to see if cloud tops are used in game.
|
|
Are clouds defined? Check to see if clouds are used in game.
|
|
Is connection in dirction at. See if there is a connection in the specified direction at cell(x,y) for the specified connection type.
|
|
Controled by at. Retrieve the side that controls cell(x,y).
|
|
Is Area control defined? Check to see if the control layer is defined.
|
|
Is Controlled? Check to see if the cell(x,y) is controlled by a side.
|
|
Elevation at. Get the elevation at cell(x,y). Elevations are stored in area.elevations.
|
|
Are elevations defined? Check to see if the elevation layer has been defined.
|
|
Are features defined? Check to see if features are defined in this game.
|
|
Value: Iterate over all cells.Iteration over all valid cell positions in a area. These should be used carefully, since they don't (can't) have any grouping braces embedded.
|
|
Value: for((x1) = (x) - (n); (x1) <= (x) + (n); (x1)++) \ for((y1) = max((y) - (n), (y) - (n) + (x) - (x1)); \ (y1) <= min((y) + (n), (y) + (n) + (x) - (x1)); (y1)++) For header to repeat for all cells within range of starting cell.
|
|
Iterate over all cells in range. Repeat for all cells withing reach of a unit.
|
|
Iterate through features. Walk thrhoug all defined features.
|
|
Value: Iterate over all interior cells.This doesn't generate positions along area edges. Typically more useful within game than for_all_cells(). Iteration over all valid interior cell positions in a area. These should be used carefully, since they don't (can't) have any grouping braces embedded.
|
|
Iterate Unit stack. Iterate through all in this cell (but not their occs).
|
|
Value: for ((var) = unit_at((x), (y)); \ (var) != NULL; \ (var) = ((var)->occupant != NULL ? \ (var)->occupant : \ ((var)->nexthere != NULL ? \ (var)->nexthere : \ ((var)->transport != NULL && \ (var)->transport->nexthere != NULL ? \ (var)->transport->nexthere : \ ((var)->transport != NULL && \ (var)->transport->transport != NULL && \ (var)->transport->transport->nexthere != NULL ? \ (var)->transport->transport->nexthere : \ ((var)->transport != NULL && \ (var)->transport->transport != NULL && \ (var)->transport->transport->transport != NULL && \ (var)->transport->transport->transport->nexthere != NULL ? \ (var)->transport->transport->transport->nexthere : NULL)))))) Iterate through all units in this cell including occs within occs within occs. This nifty little macro will climb the occupant : nexthere tree and follow all branches four levels down to find all the occs within occs within occs within units in the stack.
|
|
Is in area? Test whether x,y is a valid position anywhere in the current area.
|
|
Is valid unit position? Test whether x,y is a valid position anywhere in the current area.
|
|
Constrain y to inerior of world. Constrain y co-ordinate to be within world.
|
|
Value: ((world_distance(x, y, snx, sny) < world.daylight_width) ? 2 : \ ((world_distance(x, y, snx, sny) < world.twilight_width) ? 1 : 0)) Returns the lighting state of a given position.
|
|
Constrain y co-ordinate. Constrain y to northern and southern edges.
|
|
Allocate layer. Use this macro to get a area-spanning layer of the given type. This allocates enough memory to hold a value of TYPE for every cell in the world.
|
|
Material at cell. Get the amount of a specific material in cexll(x,y).
|
|
Minimum Area height. This is the smallest allowable height for a map.
|
|
Minimum Area width. This is the smallest allowable width for a map.
|
|
Night at cell? Is it night at cell(x,y)
|
|
Nobody. A cell might be entirely uninhabited, so need an extra value to indicate. This value is chosen to be well above any possible MAXSIDES, and encodes in layers as 'X', which is convenient.
|
|
A cell might be entirely uncontrolled, so need an extra value to indicate. This value is chosen to be well above any possible MAXSIDES, and encodes in layers as 'X', which is convenient.
|
|
No user id. This needs to not be the id of any unit. |
|
Side of people at. Get the Side number of the people at cell(x,y).
|
|
Population defined? Check to see if people are assigned to sides.
|
|
Is populated? Check to see if the cell(x,y) is populated.
|
|
Number of cells covered by a radius. Calculate number of cells that could be covered by a radius sweeping from an origin. Obviously, one should not provide a radius length < 0.
|
|
Clouds at cell. Get clouds at cell(x,y).
|
|
Cloud bottom at cell. Get cloud bottom at cell(x,y).
|
|
Cloud top at cell. Get cloud top at cell(x,y).
|
|
Raw feature at. Get the id fo the feature at cell(x,y). The "raw feature" is its "short" identifier.
|
|
Raw wind at cell. Get raw wind value at cell(x,y). The raw wind value is a combination of direction and force. The direction is in the bottom 3 bits of the cell value.
|
|
Set auxillary Terrain at. Set the auxillary terrain at a cell.
|
|
Set controled by at. Set the side that controls cell(x,y).
|
|
Set elevation at. Set the elevation at cell(x,y). Elevations are stored in area.elevations.
|
|
Set Material at cell. Set the amount of a specific material in cexll(x,y).
|
|
Set Side of people at. Set the Side number of the people at cell(x,y).
|
|
Set clouds at cell. set clouds at cell(x,y).
|
|
Set cloud bottoms at cell. set cloud bottom at cell(x,y).
|
|
Set cloud top at cell. set cloud top at cell(x,y).
|
|
Set raw feature at. Set the id fo the feature at cell(x,y). The "raw feature" is its "short" identifier.
|
|
Set raw wind at cell. Set raw wind value at cell(x,y). The raw wind value is a combination of direction and force. The direction is in the bottom 3 bits of the cell value.
|
|
Set temperature at cell. Set temperature at cell(x,y).
|
|
Set Terrain at. Set the Terrain type at cell(x,y);
|
|
Set scratch layer 1. Set the value of scratch layer 1 at cell(x,y).
|
|
Set scratch layer 2. Set the value of scratch layer 2 at cell(x,y).
|
|
Set scratch layer 3. Set the value of scratch layer 3 at cell(x,y).
|
|
Set unit at cell. Set the pointer to the at cell(x,y).
|
|
|
|
Set wind at cell. Set wind value at cell(x,y).
|
|
Temperature at cell. Get temperature at cell(x,y).
|
|
Is temperature defined? Check to see if temperature is defined.
|
|
Terrain at. The Terrain at each cell is just the number of the Terrain type.
|
|
Is Terrain defined. Test if the terrain has been allocated yet.
|
|
Get scratch layer 1. Get the value of scratch layer 1 at cell(x,y).
|
|
Get scratch layer 2. Get the value of scratch layer 2 at cell(x,y).
|
|
Get scratch layer 3. Get the value of scratch layer 3 at cell(x,y).
|
|
Unit at cell. The is a raw pointer - this macro is used a *lot*. This could be space-optimized by using a 16-bit unit id. It uses the area.units global layer. Multiple units can be stacked by building a list using the ->nexthere pointer.
|
|
User at? Get the User id at cell.
|
|
Is user area defined?
|
|
Wind direction. Extract the wind direction from the raw wind value.
|
|
Wind direction at. Get the wind direction at cell(x,y).
|
|
Wind froce. Extract the wind force from the raw wind value.
|
|
Wind force at. Get the wind force at cell(x,y).
|
|
Are winds defined? Check to see if winds are used in game.
|
|
Wrap x. This little macro implements wraparound in the x direction.
|
|
Value: (area.xwrap ? TRUE : (between(0, (x), area.width-1) && \ between(area.halfheight, \ (x)+(y), \ area.width+area.halfheight-1))) Test whether x is a inside the current area.
|
|
Value: (area.xwrap ? TRUE : (between(1, (x), area.width-2) && \ between(area.halfheight+1, \ (x)+(y), \ area.width+area.halfheight-2))) Test whether x is a inside the current area.
|
|
Coordinate in direction. Calculate the co-ordinates of moving a distance of one in a direction, contraining the x co-ordiante to be wrapped.
|
|
Zero area. This sets an allocated layer to zero using memset by calculating the number of cells in the area times the size of TYPE. It uses the size of the global area to determine the area size.
|
|
Area. An "area" is always basically a rectangular array of positions. The hex effect can be achieved by interpreting neighborliness and direction differently, but that's all that's needed. All of the "layers" are dynamically allocated as needed, to save (considerable!) space. See the discussion of layers for a more complet discussion of the various types of layers. |
|
Feature. Named geographical features. |
|
Path. Array of waypoints defining path. |
|
Region.
|
|
Terrain Region Link. |
|
Waypoint. Co-ordinate of point in path. ??? |
|
World. This structure contains variables which affect the entire world map. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Any clouds? ??? |
|
Any elevation variation? ??? |
|
Any Materials in terrain? ??? |
|
Any temperture variation? ??? |
|
Any temperature variation in layer? ??? |
|
Any wind variation? ??? |
|
Any wind variation in layer? ??? |
|
Area global. |
|
Maximum elevation. |
|
Maximum termperature. |
|
Maximum windforce. |
|
Mid turn restore flag. ??? |
|
Minimum elevation. |
|
Minimum termperature. |
|
Minimum wind forces. |
|
Number of features. |
|
World global. |