|
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) |
Side * | create_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) |
Side * | side_n (int n) |
Side * | find_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_unit * | find_next_unit (Side *side, struct a_unit *prevunit) |
a_unit * | find_prev_unit (Side *side, struct a_unit *nextunit) |
a_unit * | find_next_actor (Side *side, struct a_unit *prevunit) |
a_unit * | find_prev_actor (Side *side, struct a_unit *nextunit) |
a_unit * | find_next_mover (Side *side, struct a_unit *prevunit) |
a_unit * | find_prev_mover (Side *side, struct a_unit *nextunit) |
a_unit * | find_next_awake_mover (Side *side, struct a_unit *prevunit) |
a_unit * | find_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_view * | unit_view_at (Side *side, int x, int y) |
a_unit_view * | unit_view_next (Side *side, int x, int y, struct a_unit_view *uview) |
a_unit * | query_unit_from_uview (struct a_unit_view *uview) |
a_unit_view * | query_uvstack_from_unit (struct a_unit *unit) |
a_unit_view * | query_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) |
Side * | parse_side_spec (char *str) |
int | actual_advantage (Side *side) |
Doctrine * | new_doctrine (int id) |
Doctrine * | find_doctrine (int id) |
Doctrine * | find_doctrine_by_name (char *name) |
Doctrine * | clone_doctrine (Doctrine *doctrine) |
void | set_doctrine (Side *side, char *spec) |
StandingOrder * | new_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 |
Side * | sidelist |
| List of .
|
Side * | lastside |
| Last in list.
|
Side * | indepside |
| List of independant .
|
Side * | curside |
| Current .
|
Side * | tmpside |
| Temporary pointer.
|
int | numsides |
| Number of .
|
int | numtotsides |
| Total number of .
|
int | numplayers |
| Number of .
|