Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

side.h File Reference

Definitions for sides in Xconq. More...

#include "parambox.h"

Include dependency graph for side.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Namespaces

namespace  Xconq
namespace  Xconq::AI

Classes

struct  a_doctrine
 Doctine. More...

struct  a_standing_order
 Standing order. More...

struct  a_side
 Side. More...

struct  ParamBoxSide

Defines

#define NOSIDES   (0)
 No Sides are all zero bits.

#define ALLSIDES   (-1)
 All Sides is all ones.

#define add_side_to_set(side, mask)   ((mask) | (1 << ((side) ? (side)->id : 0)))
 Add Side to vector.

#define remove_side_from_set(side, mask)   ((mask) & ~(1 << ((side) ? (side)->id : 0)))
 Remove side from mask.

#define side_in_set(side, mask)   ((mask) & (1 << ((side) ? (side)->id : 0)))
 Side in set.

#define side_in_play(side)   (side->ingame)
 Is side playing?

#define for_all_real_sides(v)   for (v = (sidelist ? sidelist->next : NULL); v != NULL; v = v->next)
 Iterate real ..

#define for_all_sides(v)   for (v = sidelist; v != NULL; v = v->next)
 Iterate all sides.

#define terrain_view(s, x, y)   ((s)->terrview ? aref((s)->terrview, x, y) : buildtview(terrain_at(x, y)))
 Terrain view.

#define set_terrain_view(s, x, y, v)   ((s)->terrview ? aset((s)->terrview, x, y, v) : 0)
 Set View Terrain view.

#define buildtview(t)   ((t) + 1)
 Convert Terrain to View Terrain type.

#define vterrain(v)   ((v) - 1)
 Convert View Terrain type to Terrain type.

#define UNSEEN   (0)
 a cell which has not been seen by a side.

#define terrain_view_date(s, x, y)   ((s)->terrviewdate ? aref((s)->terrviewdate, x, y) : 0)
 Terrain view on date.

#define set_terrain_view_date(s, x, y, v)   ((s)->terrviewdate ? aset((s)->terrviewdate, x, y, v) : 0)
 Set View Terrain type on date.

#define aux_terrain_view(s, x, y, t)
 Auxillary Terrain view.

#define set_aux_terrain_view(s, x, y, t, v)   (((s)->auxterrview && (s)->auxterrview[t]) ? aset((s)->auxterrview[t], x, y, v) : 0)
 Set auxillary Terrain view.

#define aux_terrain_view_date(s, x, y, t)   (((s)->auxterrviewdate && (s)->auxterrviewdate[t]) ? aref((s)->auxterrviewdate[t], x, y) : 0)
 Auxillary Terrain view on date.

#define set_aux_terrain_view_date(s, x, y, t, v)   (((s)->auxterrviewdate && (s)->auxterrviewdate[t]) ? aset((s)->auxterrviewdate[t], x, y, v) : 0)
 Set auxillary Terrain view.

#define for_all_unit_views(v)   for (v = viewlist; v != NULL; v = v->vnext)
 Iteration over all Unit views.

#define nextview(s, x, y, uv)   ((uv)->transport == NULL ? unit_view_next((s), (x), (y), (uv)) : (uv)->nexthere)
 Find next unit view.

#define for_all_view_stack(s, x, y, uv)   for ((uv) = unit_view_at(s,x,y); (uv) != NULL; (uv) = unit_view_next(s,x,y,uv))
 Iterate Unit views at cell.

#define for_all_uvstack(uvs, uv)
#define for_all_view_stack_with_occs(s, x, y, uv)
 Iterate Unit stack and occupants.

#define for_all_occupant_views(uv, v)   for (v = (uv)->occupant; v != NULL; v = v->nexthere)
 Iterate views of occupants.

#define for_all_occupant_views_with_occs(uv, var)
 Iterate over ALL components.

#define view_unit(uv)   (((uv)->unit != NULL && (uv)->id == (uv)->unit->id) ? (uv)->unit : NULL)
 View Unit Unit pointer.

#define material_view(s, x, y, m)   (((s)->materialview && (s)->materialview[m]) ? aref((s)->materialview[m], x, y) : (cell_material_defined(m) ? material_at(x, y, m) : 0))
 Material view.

#define set_material_view(s, x, y, m, v)   (((s)->materialview && (s)->materialview[m]) ? aset((s)->materialview[m], x, y, v) : 0)
 Set Material view.

#define material_view_date(s, x, y, m)   (((s)->materialviewdate && (s)->materialviewdate[m]) ? aref((s)->materialviewdate[m], x, y) : 0)
 Material view on date.

#define set_material_view_date(s, x, y, m, v)   (((s)->materialviewdate && (s)->materialviewdate[m]) ? aset((s)->materialviewdate[m], x, y, v) : 0)
 Set Material view at date.

#define temperature_view(s, x, y)   ((s)->tempview ? aref((s)->tempview, x, y) : (temperatures_defined() ? temperature_at(x, y) : 0))
 Show temperture view.

#define set_temperature_view(s, x, y, v)   ((s)->tempview ? aset((s)->tempview, x, y, v) : 0)
 Set temperture view.

#define temperature_view_date(s, x, y)   ((s)->tempviewdate ? aref((s)->tempviewdate, x, y) : 0)
 Show temperture view on date.

#define set_temperature_view_date(s, x, y, v)   ((s)->tempviewdate ? aset((s)->tempviewdate, x, y, v) : 0)
 Set temperture view on date.

#define cloud_view(s, x, y)   ((s)->cloudview ? aref((s)->cloudview, x, y) : (clouds_defined() ? raw_cloud_at(x, y) : 0))
 Show cloud view.

#define set_cloud_view(s, x, y, v)   ((s)->cloudview ? aset((s)->cloudview, x, y, v) : 0)
 Set cloud view.

#define cloud_view_date(s, x, y)   ((s)->cloudviewdate ? aref((s)->cloudviewdate, x, y) : 0)
 Show cloud view on date.

#define set_cloud_view_date(s, x, y, v)   ((s)->cloudviewdate ? aset((s)->cloudviewdate, x, y, v) : 0)
 Set cloud view on date.

#define cloud_bottom_view(s, x, y)   ((s)->cloudbottomview ? aref((s)->cloudbottomview, x, y) : (cloud_bottoms_defined() ? raw_cloud_bottom_at(x, y) : 0))
 Get cloud bottom.

#define set_cloud_bottom_view(s, x, y, v)   ((s)->cloudbottomview ? aset((s)->cloudbottomview, x, y, v) : 0)
 Set cloud bottom.

#define cloud_bottom_view_date(s, x, y)   ((s)->cloudbottomviewdate ? aref((s)->cloudbottomviewdate, x, y) : 0)
 Get cloud bottom on date.

#define set_cloud_bottom_view_date(s, x, y, v)   ((s)->cloudbottomviewdate ? aset((s)->cloudbottomviewdate, x, y, v) : 0)
 Set cloud bottom on date.

#define cloud_height_view(s, x, y)   ((s)->cloudheightview ? aref((s)->cloudheightview, x, y) : (cloud_heights_defined() ? raw_cloud_height_at(x, y) : 0))
 Get cloud height.

#define set_cloud_height_view(s, x, y, v)   ((s)->cloudheightview ? aset((s)->cloudheightview, x, y, v) : 0)
 Set cloud height.

#define cloud_height_view_date(s, x, y)   ((s)->cloudheightviewdate ? aref((s)->cloudheightviewdate, x, y) : 0)
 Get cloud height on date.

#define set_cloud_height_view_date(s, x, y, v)   ((s)->cloudheightviewdate ? aset((s)->cloudheightviewdate, x, y, v) : 0)
 Set cloud height on date.

#define wind_view(s, x, y)   ((s)->windview ? aref((s)->windview, x, y) : (winds_defined() ? raw_wind_at(x, y) : CALM))
 Get wind view.

#define set_wind_view(s, x, y, v)   ((s)->windview ? aset((s)->windview, x, y, v) : 0)
 Set wind view.

#define wind_view_date(s, x, y)   ((s)->windviewdate ? aref((s)->windviewdate, x, y) : 0)
 Get wind on date.

#define set_wind_view_date(s, x, y, v)   ((s)->windviewdate ? aset((s)->windviewdate, x, y, v) : 0)
 Set wind on date.

#define cover(s, x, y)   ((s)->coverage ? aref((s)->coverage, x, y) : 0)
 Get vision coverage.

#define set_cover(s, x, y, v)   ((s)->coverage ? aset((s)->coverage, x, y, v) : 0)
 Set vision coverage.

#define add_cover(s, x, y, v)   ((s)->coverage ? aadd((s)->coverage, (x), (y), (v)) : 0)
 Add vision coverage.

#define alt_cover(s, x, y)   ((s)->alt_coverage ? aref((s)->alt_coverage, x, y) : 0)
 Get alternate vision coverage.

#define set_alt_cover(s, x, y, v)   ((s)->alt_coverage ? aset((s)->alt_coverage, x, y, v) : 0)
 Set alternate vision coverage.

#define side_has_treasury(s, m)   (s != indepside ? m_treasury(m) : g_indepside_has_treasury() ? m_treasury(m) : FALSE)
 Has treasury?

#define side_wants_display(s)   ((s)->player && (s)->player->displayname)
 Side wants display?

#define side_wants_ai(s)   ((s)->player && (s)->player->aitypename)
 Side wants AI?

#define side_has_display(s)   (((s)->ui) != NULL || ((s)->rui) != NULL)
 Side has display?

#define side_has_local_display(s)   ((s)->ui != NULL)
 Side has local display?

#define side_has_ai(s)   (((s)->ai) != NULL || ((s)->rai) != NULL)
 Side has AI?

#define side_has_local_ai(s)   ((s)->ai != NULL)
 Side has local AI?

#define side_lost(s)   ((s) != NULL && !(s)->ingame && (s)->status < 0)
 Has side lost?

#define side_drew(s)   ((s) != NULL && !(s)->ingame && (s)->status == 0)
 Has side drawn?

#define side_won(s)   ((s) != NULL && !(s)->ingame && (s)->status > 0)
 Has side won?

#define side_gain_count(s, u, r)   (((s)->gaincounts)[num_gain_reasons*(u)+(r)])
#define side_loss_count(s, u, r)   (((s)->losscounts)[num_loss_reasons*(u)+(r)])
#define side_atkstats(s, a, d)   ((s)->atkstats[a] ? ((s)->atkstats[a])[d] : 0)
#define side_hitstats(s, a, d)   ((s)->hitstats[a] ? ((s)->hitstats[a])[d] : 0)
#define terrain_visible(side, x, y)   ((side)->see_all || (terrain_view((side), (x), (y)) != UNSEEN))
 Is Terrain visible?

#define borders_visible(side, x, y, d)   ((side)->see_all || seen_border((side), (x), (y), (d)))
 is border visable?

#define units_visible(side, x, y)   ((side)->see_all || (cover((side), (x), (y)) >= 1))
 Is unit visible? Can one or more Units be seen in cell?

#define has_advance(side, a)   ((side)->advance[(a)] == DONE)
 Does side have advance?

#define side_can_build(side, u)   ((side)->canbuild != NULL ? (side)->canbuild[u] : TRUE)
 Can side build unit type?

#define side_can_carry(side, u)   ((side)->cancarry != NULL ? (side)->cancarry[u] : TRUE)
 Can side carry unit type?

#define side_can_develop(side, u)   ((side)->candevelop != NULL ? (side)->candevelop[u] : TRUE)
 Can side develop Unit?

#define side_can_research(side, a)   ((side)->canresearch != NULL ? (side)->canresearch[a] : TRUE)
 Can reasearch Advance?

#define inactive_indepside(side)   ((side) == indepside && !side_has_ai(side) && !side_has_display(side))
#define is_designer(side)   (FALSE)
#define for_all_doctrines(d)   for ((d) = doctrine_list; (d) != NULL; (d) = (d)->next)

Typedefs

typedef int SideMask
 Side mask.

typedef a_doctrine Doctrine
 Doctine.

typedef a_standing_order StandingOrder
 Standing order.

typedef Xconq::AI::AI_Side AI_Side
typedef a_side Side
 Side.


Enumerations

enum  sordercond { sorder_always, sorder_at, sorder_in, sorder_near }
 Standing order conditions. This modifies a standing order to be limited to a particular location/unit. More...


Functions

int n_units_on_side (Side *side)
void init_sides (void)
Sidecreate_side (void)
void init_side_unithead (Side *side)
int side_has_units (Side *side)
void init_doctrine (Side *side)
void init_self_unit (Side *side)
int init_view (Side *side)
void calc_start_xy (Side *side)
char * side_name (Side *side)
char * side_adjective (Side *side)
int side_number (Side *side)
Sideside_n (int n)
Sidefind_side_by_name (char *str)
int side_controls_side (Side *side, Side *side2)
int side_controls_unit (Side *side, struct a_unit *unit)
int side_sees_unit (Side *side, struct a_unit *unit)
int side_sees_image (Side *side, struct a_unit *unit)
int occupants_visible (Side *side, struct a_unit *unit)
int num_units_in_play (Side *side, int u)
int num_units_incomplete (Side *side, int u)
a_unitfind_next_unit (Side *side, struct a_unit *prevunit)
a_unitfind_prev_unit (Side *side, struct a_unit *nextunit)
a_unitfind_next_actor (Side *side, struct a_unit *prevunit)
a_unitfind_prev_actor (Side *side, struct a_unit *nextunit)
a_unitfind_next_mover (Side *side, struct a_unit *prevunit)
a_unitfind_prev_mover (Side *side, struct a_unit *nextunit)
a_unitfind_next_awake_mover (Side *side, struct a_unit *prevunit)
a_unitfind_prev_awake_mover (Side *side, struct a_unit *nextunit)
int side_initacp (Side *side)
int side_acp (Side *side)
int side_acp_reserved (Side *side)
int using_tech_levels (void)
void remove_side_from_game (Side *side)
int num_displayed_sides (void)
int trusted_side (Side *side1, Side *side2)
int enemy_side (Side *s1, Side *s2)
int allied_side (Side *s1, Side *s2)
int neutral_side (Side *s1, Side *s2)
void reveal_side (Side *sender, Side *recipient, int *types)
void receive_message (Side *side, Side *sender, char *str)
a_unit_viewunit_view_at (Side *side, int x, int y)
a_unit_viewunit_view_next (Side *side, int x, int y, struct a_unit_view *uview)
a_unitquery_unit_from_uview (struct a_unit_view *uview)
a_unit_viewquery_uvstack_from_unit (struct a_unit *unit)
a_unit_viewquery_uvstack_at (int x, int y)
void all_see_occupy (struct a_unit *unit, int x, int y, int inopen)
void all_see_leave (struct a_unit *unit, int x, int y, int inopen)
void cover_area (Side *side, struct a_unit *unit, struct a_unit *oldtransport, int x0, int y0, int x1, int y1)
void reset_coverage (void)
void really_reset_coverage (void)
void calc_coverage (Side *side)
void reset_all_views (void)
void reset_view (Side *side)
void react_to_seen_unit (Side *side, struct a_unit *unit, int x, int y)
void all_see_cell (int x, int y)
int see_cell (Side *side, int x, int y)
void see_exact (Side *side, int x, int y)
int seen_border (Side *side, int x, int y, int dir)
void maybe_track (struct a_unit *unit)
void maybe_lose_track (struct a_unit *unit, int nx, int ny)
char * side_desig (Side *side)
Sideparse_side_spec (char *str)
int actual_advantage (Side *side)
Doctrinenew_doctrine (int id)
Doctrinefind_doctrine (int id)
Doctrinefind_doctrine_by_name (char *name)
Doctrineclone_doctrine (Doctrine *doctrine)
void set_doctrine (Side *side, char *spec)
StandingOrdernew_standing_order (void)
void add_standing_order (Side *side, StandingOrder *sorder, int pos)
int parse_standing_order (Side *side, char *cmdstr)
char * parse_unit_types (Side *side, char *str, char *utypevec)
char * parse_order_cond (Side *side, char *str, StandingOrder *sorder)
char * get_next_arg (char *str, char *buf, char **rsltp)
char * standing_order_desc (StandingOrder *sorder, char *buf)
void fn_set_terrain_view (int x, int y, int val)
void fn_set_aux_terrain_view (int x, int y, int val)
void fn_set_terrain_view_date (int x, int y, int val)
void fn_set_aux_terrain_view_date (int x, int y, int val)
void fn_set_material_view (int x, int y, int val)
void fn_set_material_view_date (int x, int y, int val)
void fn_set_temp_view (int x, int y, int val)
void fn_set_temp_view_date (int x, int y, int val)
void fn_set_cloud_view (int x, int y, int val)
void fn_set_cloud_bottom_view (int x, int y, int val)
void fn_set_cloud_height_view (int x, int y, int val)
void fn_set_cloud_view_date (int x, int y, int val)
void fn_set_wind_view (int x, int y, int val)
void fn_set_wind_view_date (int x, int y, int val)
int load_side_config (Side *side)
void update_side_display_all_sides (Side *side, int rightnow)
int side_material_supply (Side *side, int m)
int side_material_production (Side *side, int m)
int side_material_storage (Side *side, int m)
int fn_test_side_in_sideclass (Obj *osclass, ParamBox *pbox)

Variables

Sidesidelist
 List of .

Sidelastside
 Last in list.

Sideindepside
 List of independant .

Sidecurside
 Current .

Sidetmpside
 Temporary pointer.

int numsides
 Number of .

int numtotsides
 Total number of .

int numplayers
 Number of .


Detailed Description

Definitions for sides in Xconq.

Note:
Many of the side macros check for a null side pointer. This is due to a null pointer being used to indicate that the unit was independant. That has been changed, now the independant units are assigned to side 0. The check for a null side pointer should not be needed any longer, but has been left in for the time being. In particular, the Side Mask equates a null side pointer and the side 0 as being the same thing.

Define Documentation

#define add_cover s,
x,
y,
 )     ((s)->coverage ? aadd((s)->coverage, (x), (y), (v)) : 0)
 

Add vision coverage.

Add vision coverate at cell.

See also:
aref.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
v is the value of the vision coverage.
Returns:
the vision coverage at cell.

#define add_side_to_set side,
mask   )     ((mask) | (1 << ((side) ? (side)->id : 0)))
 

Add Side to vector.

Sets the bit corresponding to the Side number, or the zero'th bit if the pointer is nil.

Parameters:
side is the pointer to the .
mask is the side mask.
Returns:
the modified side mask.

#define ALLSIDES   (-1)
 

All Sides is all ones.

#define alt_cover s,
x,
 )     ((s)->alt_coverage ? aref((s)->alt_coverage, x, y) : 0)
 

Get alternate vision coverage.

Get alternate vision coverate at cell.

See also:
aref.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
Returns:
the alternate vision coverage at cell.

#define aux_terrain_view s,
x,
y,
 ) 
 

Value:

(((s)->auxterrview && (s)->auxterrview[t]) ? \
        aref((s)->auxterrview[t], x, y) : \
        (aux_terrain_defined(t) ? aux_terrain_at(x, y, t) : 0))
Auxillary Terrain view.

If the auxillary viewTerrainType exists for a , and exits for this Terrain type, return the auxillary viewTerrainType. If a global auxillary view for a terrain type exits, return the global auxillary viewTerrainType. If it doesn't, return UNSEEN.

See also:
aref.
Parameters:
s is the pointer to the .
x is the x-coordinate of the cell to view.
y is the y-coordinaof of the cell to view.
t is the terrain of the cell.
Returns:
  • the value for the viewTerrainType at the co-ordinates,
  • zero if side->terrviewdate is NULL

#define aux_terrain_view_date s,
x,
y,
 )     (((s)->auxterrviewdate && (s)->auxterrviewdate[t]) ? aref((s)->auxterrviewdate[t], x, y) : 0)
 

Auxillary Terrain view on date.

If the auxillary viewTerrainType exists for a , and exits for this Terrain type at the current date, return the auxillary View Terrain Type. If a global auxillary view for a terrain type exits, return the global auxillary View Terrain Type. If it doesn't, return UNSEEN.

See also:
aref, aux_terrain_view.
Parameters:
s is the pointer to the .
x is the x-coordinate of the cell to view.
y is the y-coordinaof of the cell to view.
t is the Terrain of the cell.
Returns:
  • the value for the viewTerrainType at the co-ordinates,
  • zero if side->terrviewdate is NULL

#define borders_visible side,
x,
y,
 )     ((side)->see_all || seen_border((side), (x), (y), (d)))
 

is border visable?

Can border be seen?

See also:
seen_border.
Parameters:
side is the pointer t the .
x is the x co-ordinate of the cell.
y is the y co-ordiante of the cell.
d is the direction for which to check for the border.
Returns:
TRUE is a border is visible.

#define buildtview  )     ((t) + 1)
 

Convert Terrain to View Terrain type.

Take the Terrain type, and convert it to a viewTerrainType by adding 1 to it.

Parameters:
t is the Terrain type.
Returns:
the View Terrain type.

#define cloud_bottom_view s,
x,
 )     ((s)->cloudbottomview ? aref((s)->cloudbottomview, x, y) : (cloud_bottoms_defined() ? raw_cloud_bottom_at(x, y) : 0))
 

Get cloud bottom.

Get cloud bottom value.

See also:
aref, cloud_bottoms_defined, raw_cloud_bottom_at.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
Returns:
the clouds viewable at cell.

#define cloud_bottom_view_date s,
x,
 )     ((s)->cloudbottomviewdate ? aref((s)->cloudbottomviewdate, x, y) : 0)
 

Get cloud bottom on date.

Get cloud bottom value on this date.

See also:
aref.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
Returns:
the clouds viewable at cell.

#define cloud_height_view s,
x,
 )     ((s)->cloudheightview ? aref((s)->cloudheightview, x, y) : (cloud_heights_defined() ? raw_cloud_height_at(x, y) : 0))
 

Get cloud height.

Get cloud height value.

See also:
aref, cloud_heights_defined, raw_cloud_height_at.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
Returns:
the clouds viewable at cell.

#define cloud_height_view_date s,
x,
 )     ((s)->cloudheightviewdate ? aref((s)->cloudheightviewdate, x, y) : 0)
 

Get cloud height on date.

Get cloud height value on this date.

See also:
aref.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
Returns:
the clouds viewable at cell.

#define cloud_view s,
x,
 )     ((s)->cloudview ? aref((s)->cloudview, x, y) : (clouds_defined() ? raw_cloud_at(x, y) : 0))
 

Show cloud view.

Show viewable cloud at cell.

See also:
aref, clouds_defined, raw_clouds_at.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
Returns:
the clouds viewable at cell.

#define cloud_view_date s,
x,
 )     ((s)->cloudviewdate ? aref((s)->cloudviewdate, x, y) : 0)
 

Show cloud view on date.

Show viewable cloud at cell on this date.

See also:
aref.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
Returns:
the clouds viewable at cell.

#define cover s,
x,
 )     ((s)->coverage ? aref((s)->coverage, x, y) : 0)
 

Get vision coverage.

Get vision coverate at cell.

See also:
aref.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
Returns:
the vision coverage at cell.

#define for_all_doctrines  )     for ((d) = doctrine_list; (d) != NULL; (d) = (d)->next)
 

#define for_all_occupant_views uv,
 )     for (v = (uv)->occupant; v != NULL; v = v->nexthere)
 

Iterate views of occupants.

Iterate over all views of occupants.

Parameters:
uv is the unit view of the transport.
v is the occupant view iteration variable.

#define for_all_occupant_views_with_occs uv,
var   ) 
 

Value:

for ((var) = (uv)->occupant; \
       (var) != NULL && (var) != (uv)->nexthere; \
         (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 : NULL)))))
Iterate over ALL components.

Iterate through all occupants including occupents within occupents within occupents within a unit view. This nifty little macro will climb the occupant : nexthere tree and follow all branches three levels below (uv) to find all the occs within occs within occs within (uv). The test for (var) != (uv)->nexthere is to stop the macro from climbing up above (uv).

Parameters:
uv is a pointer to the unit view.
var is the iteration varable.

#define for_all_real_sides  )     for (v = (sidelist ? sidelist->next : NULL); v != NULL; v = v->next)
 

Iterate real ..

This is the old for_all_sides which does not include indepside.

Parameters:
v is the side iteration variable. It is a pointer to a .

#define for_all_sides  )     for (v = sidelist; v != NULL; v = v->next)
 

Iterate all sides.

This is the new indepside-including version of for_all_sides. It has replaced for_all_side_plus_indep everywhere.

Parameters:
v is the side iteration variable. It is a pointer to a .

#define for_all_unit_views  )     for (v = viewlist; v != NULL; v = v->vnext)
 

Iteration over all Unit views.

For header to iterat through all .

Parameters:
v is the vector list iteration variable.

#define for_all_uvstack uvs,
uv   ) 
 

Value:

for ((uv) = (uvs); (uv); \
         (uv) = unit_view_next((uvs)->observer == -1 \
                                ? NULL : side_n((uvs)->observer), \
                               (uvs)->x, (uvs)->y, (uv)))

#define for_all_view_stack s,
x,
y,
uv   )     for ((uv) = unit_view_at(s,x,y); (uv) != NULL; (uv) = unit_view_next(s,x,y,uv))
 

Iterate Unit views at cell.

Iterate over all unit views at a given location.

See also:
unit_view_at, unit_view_next.
Parameters:
s is a pointer to the .
x is the x co-ordinate of the cell.
y is the y co-ordinate of the cell.
uv is the Unit view iteration variable.

#define for_all_view_stack_with_occs s,
x,
y,
uv   ) 
 

Value:

for ((uv) = unit_view_at((s), (x), (y)); \
          (uv) != NULL; \
         (uv) = ((uv)->occupant != NULL ? \
                        (uv)->occupant : \
                      (nextview((s), (x), (y), (uv)) != NULL ? \
                        nextview((s), (x), (y), (uv)) : \
                      ((uv)->transport != NULL && \
                        nextview((s), (x), (y), (uv)->transport) != NULL ? \
                        nextview((s), (x), (y), (uv)->transport) : \
                      ((uv)->transport != NULL && \
                        (uv)->transport->transport != NULL && \
                        nextview((s), (x), (y), (uv)->transport->transport) != NULL ? \
                        nextview((s), (x), (y), (uv)->transport->transport) : \
                      ((uv)->transport != NULL && \
                        (uv)->transport->transport != NULL && \
                        (uv)->transport->transport->transport != NULL && \
                        nextview((s), (x), (y), (uv)->transport->transport->transport) != NULL ? \
                        nextview((s), (x), (y), (uv)->transport->transport->transport) : NULL))))))
Iterate Unit stack and occupants.

Iterate through all unit views 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.

Parameters:
x is the x location.
y is the y location.
var is the Unit view pointer.

#define has_advance side,
 )     ((side)->advance[(a)] == DONE)
 

Does side have advance?

Does the have this advance?

Parameters:
side is the pointer t the .
a is the Advance for which to check.
Returns:
TRUE if side has the advance.

#define inactive_indepside side   )     ((side) == indepside && !side_has_ai(side) && !side_has_display(side))
 

Is an independant side inactive?

Check to see if a side is both independant and inactive.

See also:
side_has_display.
Parameters:
side is the pointer t the .
Returns:
TRUE if the side is independant, run by AI, and has a display.

#define is_designer side   )     (FALSE)
 

#define material_view s,
x,
y,
 )     (((s)->materialview && (s)->materialview[m]) ? aref((s)->materialview[m], x, y) : (cell_material_defined(m) ? material_at(x, y, m) : 0))
 

Material view.

Show viewable Material at cell.

See also:
aref, cell_material_defined, material_at.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
m is the Material type.
Returns:
the Material viewable at cell.

#define material_view_date s,
x,
y,
 )     (((s)->materialviewdate && (s)->materialviewdate[m]) ? aref((s)->materialviewdate[m], x, y) : 0)
 

Material view on date.

Show viewable Material at cell at date.

See also:
aref.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
m is the Material type.
Returns:
the Material viewable at cell at date.

#define nextview s,
x,
y,
uv   )     ((uv)->transport == NULL ? unit_view_next((s), (x), (y), (uv)) : (uv)->nexthere)
 

Find next unit view.

Find unit_view_next for top units, (uv)->nexthere for occs.

Parameters:
s is a pointer to the .
x is the x location.
y is the y location.
uv is the Unit view iteration variable.

#define NOSIDES   (0)
 

No Sides are all zero bits.

#define remove_side_from_set side,
mask   )     ((mask) & ~(1 << ((side) ? (side)->id : 0)))
 

Remove side from mask.

Resets the bit corresponding to the Side number, or the zero'th bit if the pointer is nil.

Parameters:
side is the pointer to the .
mask is the side mask.
Returns:
the side mask.

#define set_alt_cover s,
x,
y,
 )     ((s)->alt_coverage ? aset((s)->alt_coverage, x, y, v) : 0)
 

Set alternate vision coverage.

Set the alternate vision coverage at cell.

See also:
aset.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
v is the value of the alternate vision coverage.
Returns:
the alternate vision coverage at cell.

#define set_aux_terrain_view s,
x,
y,
t,
 )     (((s)->auxterrview && (s)->auxterrview[t]) ? aset((s)->auxterrview[t], x, y, v) : 0)
 

Set auxillary Terrain view.

Sets the value of the auxillary viewTerrainType at a cell, if a has auxillary view defined. Otherwise does nothing.

See also:
aset, aux_terrain_view.
Parameters:
s is a pointer to the .
x is the cell's x co-ordinate to set.
y is the cell's y co-ordinate to set.
t is the terrain of the cell.
v is the viewTerrainType to which to set the cell.
Returns:
  • the new value for the viewTerrainType at the co-ordinates,
  • zero if side->terrviewdate is NULL

#define set_aux_terrain_view_date s,
x,
y,
t,
 )     (((s)->auxterrviewdate && (s)->auxterrviewdate[t]) ? aset((s)->auxterrviewdate[t], x, y, v) : 0)
 

Set auxillary Terrain view.

Sets the value of the auxillary Terrain view type at a cell, if a side has auxillary view defined on this date. Otherwise does nothing.

See also:
aset, aux_terrain_view.
Parameters:
s is a pointer to the .
x is the cell's x co-ordinate to set.
y is the cell's y co-ordinate to set.
t is the terrain of the cell.
v is the view terain type to which to set the cell.
Returns:
  • the new value for the viewTerrainType at the co-ordinates,
  • zero if ->terrviewdate is NULL

#define set_cloud_bottom_view s,
x,
y,
 )     ((s)->cloudbottomview ? aset((s)->cloudbottomview, x, y, v) : 0)
 

Set cloud bottom.

Set the cloud bottom at cell.

See also:
aset.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
v is the value of the cloud bottom.
Returns:
the cloud bottom at cell.

#define set_cloud_bottom_view_date s,
x,
y,
 )     ((s)->cloudbottomviewdate ? aset((s)->cloudbottomviewdate, x, y, v) : 0)
 

Set cloud bottom on date.

Set the cloud bottom at cell on this date.

See also:
aset.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
v is the value of the cloud bottom.
Returns:
the cloud bottom at cell.

#define set_cloud_height_view s,
x,
y,
 )     ((s)->cloudheightview ? aset((s)->cloudheightview, x, y, v) : 0)
 

Set cloud height.

Set the cloud height at cell.

See also:
aset.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
v is the value of the cloud height.
Returns:
the cloud height at cell.

#define set_cloud_height_view_date s,
x,
y,
 )     ((s)->cloudheightviewdate ? aset((s)->cloudheightviewdate, x, y, v) : 0)
 

Set cloud height on date.

Set the cloud height at cell on this date.

See also:
aset.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
v is the value of the cloud height.
Returns:
the cloud height at cell.

#define set_cloud_view s,
x,
y,
 )     ((s)->cloudview ? aset((s)->cloudview, x, y, v) : 0)
 

Set cloud view.

Set the viewable cloud at cell.

See also:
aset.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
v is the value of the cloud.
Returns:
the cloud viewable at cell.

#define set_cloud_view_date s,
x,
y,
 )     ((s)->cloudviewdate ? aset((s)->cloudviewdate, x, y, v) : 0)
 

Set cloud view on date.

Set the viewable cloud at cell on this date.

See also:
aset.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
v is the value of the cloud.
Returns:
the cloud viewable at cell.

#define set_cover s,
x,
y,
 )     ((s)->coverage ? aset((s)->coverage, x, y, v) : 0)
 

Set vision coverage.

Set the vision coverage at cell.

See also:
aset.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
v is the value of the vision coverage.
Returns:
the vision coverage at cell.

#define set_material_view s,
x,
y,
m,
 )     (((s)->materialview && (s)->materialview[m]) ? aset((s)->materialview[m], x, y, v) : 0)
 

Set Material view.

Set viewable Material at cell.

See also:
aset.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
m is the Material type.
v is the viewable Material at cell.
Returns:
the Material viewable at cell or zero if not setable.

#define set_material_view_date s,
x,
y,
m,
 )     (((s)->materialviewdate && (s)->materialviewdate[m]) ? aset((s)->materialviewdate[m], x, y, v) : 0)
 

Set Material view at date.

Set viewable Material at cell on date.

See also:
aset.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
m is the Material type.
v is the viewable Material at cell.
Returns:
the Material viewable at cell on date or zero if not setable.

#define set_temperature_view s,
x,
y,
 )     ((s)->tempview ? aset((s)->tempview, x, y, v) : 0)
 

Set temperture view.

Set the viewable temperature at cell.

See also:
aset.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
v is the value of the temperature.
Returns:
the temperature viewable at cell.

#define set_temperature_view_date s,
x,
y,
 )     ((s)->tempviewdate ? aset((s)->tempviewdate, x, y, v) : 0)
 

Set temperture view on date.

Set the viewable temperature at cell on this date.

See also:
aset.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
v is the value of the temperature.
Returns:
the temperature viewable at cell.

#define set_terrain_view s,
x,
y,
 )     ((s)->terrview ? aset((s)->terrview, x, y, v) : 0)
 

Set View Terrain view.

Sets the value of the viewTerrainType at a cell, if a has a view defined. Otherwise does nothing.

See also:
aset.
Parameters:
s is a pointer to the .
x is the cell's x co-ordinate to set.
y is the cell's y co-ordinate to set.
v is the view terain type to which to set the cell.
Returns:
the view type of the terrain, or 0.

#define set_terrain_view_date s,
x,
y,
 )     ((s)->terrviewdate ? aset((s)->terrviewdate, x, y, v) : 0)
 

Set View Terrain type on date.

Sets the value of the viewTerrainType on date at a cell, if a has a view on date defined. Otherwise does nothing.

See also:
aset.
Parameters:
s is a pointer to the .
x is the cell's x co-ordinate to set.
y is the cell's y co-ordinate to set.
v is the view terain type to which to set the cell.
Returns:
  • the new value for the viewTerrainType at the co-ordinates,
  • zero if side->terrviewdate is NULL

#define set_wind_view s,
x,
y,
 )     ((s)->windview ? aset((s)->windview, x, y, v) : 0)
 

Set wind view.

Set the wind at cell.

See also:
aset.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
v is the value of the wind.
Returns:
the wind at cell.

#define set_wind_view_date s,
x,
y,
 )     ((s)->windviewdate ? aset((s)->windviewdate, x, y, v) : 0)
 

Set wind on date.

Set the wind at cell on this date.

See also:
aset.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
v is the value of the wind.
Returns:
the wind at cell.

#define side_atkstats s,
a,
 )     ((s)->atkstats[a] ? ((s)->atkstats[a])[d] : 0)
 

#define side_can_build side,
 )     ((side)->canbuild != NULL ? (side)->canbuild[u] : TRUE)
 

Can side build unit type?

Can the build a Unit type?

Parameters:
side is the pointer t the .
u is the Unit type for which to check.
Returns:
TRUE if the unit type can be built.

#define side_can_carry side,
 )     ((side)->cancarry != NULL ? (side)->cancarry[u] : TRUE)
 

Can side carry unit type?

Can the carry a Unit type?

Parameters:
side is the pointer t the .
u is the Unit type for which to check.
Returns:
TRUE if the unit type can be carried.

#define side_can_develop side,
 )     ((side)->candevelop != NULL ? (side)->candevelop[u] : TRUE)
 

Can side develop Unit?

Can this side develop this Unit type?

Parameters:
side is the pointer t the .
u is the Unit type for which to check.
Returns:
TRUE if the Side can develp the Unit.

#define side_can_research side,
 )     ((side)->canresearch != NULL ? (side)->canresearch[a] : TRUE)
 

Can reasearch Advance?

Can the Side research this Advance?

Parameters:
side is the pointer t the .
a is the Advance to be reshearched.
Returns:
TRUE if the Advance my be researched.

#define side_drew  )     ((s) != NULL && !(s)->ingame && (s)->status == 0)
 

Has side drawn?

Parameters:
s is the pointer to the .
Returns:
TRUE if the side pointer is not NULL, the ingame status is FALSE, and the status is 0.

#define side_gain_count s,
u,
 )     (((s)->gaincounts)[num_gain_reasons*(u)+(r)])
 

#define side_has_ai  )     (((s)->ai) != NULL || ((s)->rai) != NULL)
 

Side has AI?

See if the has an AI running.

Parameters:
s is the pointer to the .
Returns:
TRUE if the side's AI pointer and the remote AI pointer are not NULL.

#define side_has_display  )     (((s)->ui) != NULL || ((s)->rui) != NULL)
 

Side has display?

See if has a display.

Parameters:
s is the pointer to the .
Returns:
TRUE if the side's user interface pointer and the side's remote user interface pointer are not NULL.

#define side_has_local_ai  )     ((s)->ai != NULL)
 

Side has local AI?

See if the has an AI running locally.

Parameters:
s is the pointer to the .
Returns:
TRUE if the side's AI pointer is not NULL.

#define side_has_local_display  )     ((s)->ui != NULL)
 

Side has local display?

See if has a local display.

Parameters:
s is the pointer to the .
Returns:
TRUE if the side's user interface pointer is not NULL.

#define side_has_treasury s,
 )     (s != indepside ? m_treasury(m) : g_indepside_has_treasury() ? m_treasury(m) : FALSE)
 

Has treasury?

Tests both that s can have a treasury and that m can be stored in it.

See also:
m_treasury, g_indepside_has_treasury.
Parameters:
s is the pointer to the .
m is the Material.

#define side_hitstats s,
a,
 )     ((s)->hitstats[a] ? ((s)->hitstats[a])[d] : 0)
 

#define side_in_play side   )     (side->ingame)
 

Is side playing?

Check to see if is in game and playing.

Parameters:
side is a pointer to the to check.

#define side_in_set side,
mask   )     ((mask) & (1 << ((side) ? (side)->id : 0)))
 

Side in set.

This returns a non-zero value if the Side is set.

Parameters:
side is a pointer to the .
mask is the side mask.
Returns:
non-zero if the side is in the set.

#define side_loss_count s,
u,
 )     (((s)->losscounts)[num_loss_reasons*(u)+(r)])
 

#define side_lost  )     ((s) != NULL && !(s)->ingame && (s)->status < 0)
 

Has side lost?

Parameters:
s is the pointer to the .
Returns:
TRUE if the side pointer is not NULL, the ingame status is FALSE, and the status is less than 0.

#define side_wants_ai  )     ((s)->player && (s)->player->aitypename)
 

Side wants AI?

Determin if a needs AI.

Parameters:
s is the pointer to the .
Returns:
TRUE if the side's player pointer and the side's player ai type name are not NULL.

#define side_wants_display  )     ((s)->player && (s)->player->displayname)
 

Side wants display?

Determine if needs a display.

Parameters:
s is the pointer to the .
Returns:
TRUE is side's player pointer and side's player display name are not NULL.

#define side_won  )     ((s) != NULL && !(s)->ingame && (s)->status > 0)
 

Has side won?

Parameters:
s is the pointer to the .
Returns:
TRUE if the side pointer is not NULL, the ingame status is FALSE, and the status is greater than 0.

#define temperature_view s,
x,
 )     ((s)->tempview ? aref((s)->tempview, x, y) : (temperatures_defined() ? temperature_at(x, y) : 0))
 

Show temperture view.

Show viewable temperature at cell.

See also:
aref, temperature_defined, temperature_at.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
Returns:
the temperature viewable at cell.

#define temperature_view_date s,
x,
 )     ((s)->tempviewdate ? aref((s)->tempviewdate, x, y) : 0)
 

Show temperture view on date.

Show viewable temperature at cell on this date.

See also:
aref.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
Returns:
the temperature viewable at cell.

#define terrain_view s,
x,
 )     ((s)->terrview ? aref((s)->terrview, x, y) : buildtview(terrain_at(x, y)))
 

Terrain view.

If the viewTerrainType exists for a , return the View Terrain Type. If it doesn't, return the the View Terrain Type from the terrain.

See also:
aref, buildtview, terrain_at.
Parameters:
s is the pointer to the .
x is the x-coordinate of the cell to view.
y is the y-coordinate of the cell to view.
Returns:
the value for the viewTerrainType at the co-ordinates.

#define terrain_view_date s,
x,
 )     ((s)->terrviewdate ? aref((s)->terrviewdate, x, y) : 0)
 

Terrain view on date.

If the viewTerrainType on date exists for a side, return the viewTerrainType. If it doesn't, return UNSEEN.

See also:
aref.
Parameters:
s is the pointer to the .
x is the x-coordinate of the cell to view.
y is the y-coordinaof of the cell to view.
Returns:
  • the value for the viewTerrainType at the co-ordinates,
  • zero if side->terrviewdate is NULL

#define terrain_visible side,
x,
 )     ((side)->see_all || (terrain_view((side), (x), (y)) != UNSEEN))
 

Is Terrain visible?

Can terain be seen by side at this location?

See also:
terrain_view.
Parameters:
side is the pointer to the .
x is the x co-ordinate of the cell.
y is the y co-ordinate of the cell.
Returns:
TRUE if side can see something at cell(x,y).

#define units_visible side,
x,
 )     ((side)->see_all || (cover((side), (x), (y)) >= 1))
 

Is unit visible? Can one or more Units be seen in cell?

See also:
cover.
Parameters:
side is the pointer t the .
x is the x co-ordinate of the cell.
y is the y co-ordiante of the cell.
Returns:
TRUE if at least one Unit is visible.

#define UNSEEN   (0)
 

a cell which has not been seen by a side.

#define view_unit uv   )     (((uv)->unit != NULL && (uv)->id == (uv)->unit->id) ? (uv)->unit : NULL)
 

View Unit Unit pointer.

Given a unit view pointer, return the actual Unit.

Parameters:
uv is the pointer to the unit view.
Returns:
  • NULL if
    • pointer to unit is NULL,
    • view unit id is not the same as the actual Unit id.
  • pointer to actual Unit.

#define vterrain  )     ((v) - 1)
 

Convert View Terrain type to Terrain type.

Take a viewTerrainType and convert it to a Terrain type by subtracting 1 from it.

Parameters:
v is the View Terrain type.
Returns:
the Terrain type.

#define wind_view s,
x,
 )     ((s)->windview ? aref((s)->windview, x, y) : (winds_defined() ? raw_wind_at(x, y) : CALM))
 

Get wind view.

Get wind view.

See also:
aref, winds_defined, raw_wind_at.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
Returns:
the wind viewable at cell.

#define wind_view_date s,
x,
 )     ((s)->windviewdate ? aref((s)->windviewdate, x, y) : 0)
 

Get wind on date.

Get wind value on this date.

See also:
aref.
Parameters:
s is the pointer to the .
x is the x co-ordiate of the cell.
y is the y co-ordiate of the cell.
Returns:
the wind viewable at cell.


Typedef Documentation

typedef Xconq::AI::AI_Side AI_Side
 

typedef struct a_doctrine Doctrine
 

Doctine.

Doctrine is policy info that Units and Players use to help decide behavior.

typedef struct a_side Side
 

Side.

Each Xconq player is a "side" - more or less one country. A side may or may not be played by a person, and may or may not have a display attached to it. Each side has a different view of the world. Side 0 is for independant units.

typedef int SideMask
 

Side mask.

A side mask is a bit vector, where the bit position corresponds to the side number. It currently is implemented on tha basis of a 32 bit integer, so it cannot support more than 30 players.

typedef struct a_standing_order StandingOrder
 

Standing order.

A standing order is a conditional order that applies to any matching unit not already doing a task.


Enumeration Type Documentation

enum sordercond
 

Standing order conditions. This modifies a standing order to be limited to a particular location/unit.

Enumeration values:
sorder_always  always
sorder_at  when at
sorder_in  when in
sorder_near  when near


Function Documentation

int actual_advantage Side side  ) 
 

void add_standing_order Side side,
StandingOrder sorder,
int  pos
 

void all_see_cell int  x,
int  y
 

void all_see_leave struct a_unit unit,
int  x,
int  y,
int  inopen
 

void all_see_occupy struct a_unit unit,
int  x,
int  y,
int  inopen
 

int allied_side Side s1,
Side s2
 

void calc_coverage Side side  ) 
 

void calc_start_xy Side side  ) 
 

Doctrine* clone_doctrine Doctrine doctrine  ) 
 

void cover_area Side side,
struct a_unit unit,
struct a_unit oldtransport,
int  x0,
int  y0,
int  x1,
int  y1
 

Side* create_side void   ) 
 

int enemy_side Side s1,
Side s2
 

Doctrine* find_doctrine int  id  ) 
 

Doctrine* find_doctrine_by_name char *  name  ) 
 

struct a_unit* find_next_actor Side side,
struct a_unit prevunit
 

struct a_unit* find_next_awake_mover Side side,
struct a_unit prevunit
 

struct a_unit* find_next_mover Side side,
struct a_unit prevunit
 

struct a_unit* find_next_unit Side side,
struct a_unit prevunit
 

struct a_unit* find_prev_actor Side side,
struct a_unit nextunit
 

struct a_unit* find_prev_awake_mover Side side,
struct a_unit nextunit
 

struct a_unit* find_prev_mover Side side,
struct a_unit nextunit
 

struct a_unit* find_prev_unit Side side,
struct a_unit nextunit
 

Side* find_side_by_name char *  str  ) 
 

void fn_set_aux_terrain_view int  x,
int  y,
int  val
 

void fn_set_aux_terrain_view_date int  x,
int  y,
int  val
 

void fn_set_cloud_bottom_view int  x,
int  y,
int  val
 

void fn_set_cloud_height_view int  x,
int  y,
int  val
 

void fn_set_cloud_view int  x,
int  y,
int  val
 

void fn_set_cloud_view_date int  x,
int  y,
int  val
 

void fn_set_material_view int  x,
int  y,
int  val
 

void fn_set_material_view_date int  x,
int  y,
int  val
 

void fn_set_temp_view int  x,
int  y,
int  val
 

void fn_set_temp_view_date int  x,
int  y,
int  val
 

void fn_set_terrain_view int  x,
int  y,
int  val
 

void fn_set_terrain_view_date int  x,
int  y,
int  val
 

void fn_set_wind_view int  x,
int  y,
int  val
 

void fn_set_wind_view_date int  x,
int  y,
int  val
 

int fn_test_side_in_sideclass Obj osclass,
ParamBox pbox
 

char* get_next_arg char *  str,
char *  buf,
char **  rsltp
 

void init_doctrine Side side  ) 
 

void init_self_unit Side side  ) 
 

void init_side_unithead Side side  ) 
 

void init_sides void   ) 
 

int init_view Side side  ) 
 

int load_side_config Side side  ) 
 

void maybe_lose_track struct a_unit unit,
int  nx,
int  ny
 

void maybe_track struct a_unit unit  ) 
 

int n_units_on_side Side side  ) 
 

int neutral_side Side s1,
Side s2
 

Doctrine* new_doctrine int  id  ) 
 

StandingOrder* new_standing_order void   ) 
 

int num_displayed_sides void   ) 
 

int num_units_in_play Side side,
int  u
 

int num_units_incomplete Side side,
int  u
 

int occupants_visible Side side,
struct a_unit unit
 

char* parse_order_cond Side side,
char *  str,
StandingOrder sorder
 

Side* parse_side_spec char *  str  ) 
 

int parse_standing_order Side side,
char *  cmdstr
 

char* parse_unit_types Side side,
char *  str,
char *  utypevec
 

struct a_unit* query_unit_from_uview struct a_unit_view uview  ) 
 

struct a_unit_view* query_uvstack_at int  x,
int  y
 

Note:
See note for 'query_uvstack_from_unit'.

struct a_unit_view* query_uvstack_from_unit struct a_unit unit  ) 
 

void react_to_seen_unit Side side,
struct a_unit unit,
int  x,
int  y
 

void really_reset_coverage void   ) 
 

void receive_message Side side,
Side sender,
char *  str
 

void remove_side_from_game Side side  ) 
 

void reset_all_views void   ) 
 

void reset_coverage void   ) 
 

void reset_view Side side  ) 
 

void reveal_side Side sender,
Side recipient,
int *  types
 

int see_cell Side side,
int  x,
int  y
 

void see_exact Side side,
int  x,
int  y
 

int seen_border Side side,
int  x,
int  y,
int  dir
 

void set_doctrine Side side,
char *  spec
 

int side_acp Side side  ) 
 

int side_acp_reserved Side side  ) 
 

char* side_adjective Side side  ) 
 

int side_controls_side Side side,
Side side2
 

int side_controls_unit Side side,
struct a_unit unit
 

char* side_desig Side side  ) 
 

int side_has_units Side side  ) 
 

int side_initacp Side side  ) 
 

int side_material_production Side side,
int  m
 

int side_material_storage Side side,
int  m
 

int side_material_supply Side side,
int  m
 

Side* side_n int  n  ) 
 

char* side_name Side side  ) 
 

int side_number Side side  ) 
 

int side_sees_image Side side,
struct a_unit unit
 

int side_sees_unit Side side,
struct a_unit unit
 

char* standing_order_desc StandingOrder sorder,
char *  buf
 

int trusted_side Side side1,
Side side2
 

struct a_unit_view* unit_view_at Side side,
int  x,
int  y
 

struct a_unit_view* unit_view_next Side side,
int  x,
int  y,
struct a_unit_view uview
 

void update_side_display_all_sides Side side,
int  rightnow
 

int using_tech_levels void   ) 
 


Variable Documentation

Side* curside
 

Current .

Side* indepside
 

List of independant .

Side* lastside
 

Last in list.

int numplayers
 

Number of .

int numsides
 

Number of .

int numtotsides
 

Total number of .

Side* sidelist
 

List of .

Side* tmpside
 

Temporary pointer.


Generated on Sat Sep 17 10:29:31 2005 for XconqKernel by doxygen 1.3.6