|
Defines |
#define | INITMAXTASKS 100 |
#define | DEF_TASK(name, dname, code, argtypes, DOFN, createfn, setfn, netsetfn, pushfn, netpushfn, argdecl) static TaskOutcome DOFN(Unit *unit, Task *task); |
#define | DEF_TASK(NAME, DNAME, code, ARGTYPES, DOFN, createfn, setfn, netsetfn, pushfn, netpushfn, argdecl) { NAME, DNAME, ARGTYPES, DOFN }, |
Enumerations |
enum | choicestate {
eitherway,
leftthenright,
rightthenleft,
leftonly,
rightonly
} |
Functions |
void | init_tasks (void) |
Task * | create_task (TaskType type) |
Task * | clone_task (Task *oldtask) |
Unit * | find_unit_to_complete (Unit *unit, Task *task) |
int | target_visible (Unit *unit, Task *task) |
int | direct_access_to (int x, int y) |
int | can_resupply_from_here (int x, int y) |
int | can_auto_resupply_self (Unit *unit, int *materials, int numtypes) |
TaskOutcome | execute_task (Unit *unit) |
int | choose_move_direction (Unit *unit, int x, int y, int range) |
int | choose_move_dirs (Unit *unit, int tx, int ty, int shortest, int(*dirtest)(Unit *, int), void(*dirsort)(Unit *, int *, int), int *dirs) |
int | plausible_move_dir (Unit *unit, int dir) |
void | sort_directions (Unit *unit, int *dirs, int numdirs) |
void | free_task (Task *task) |
void | add_task (Unit *unit, int pos, Task *task) |
Task * | create_build_task (Unit *unit, int id, int cp) |
void | set_build_task (Unit *unit, int id, int cp) |
void | push_build_task (Unit *unit, int id, int cp) |
Task * | create_capture_task (Unit *unit, int id, int capmethod, int n) |
void | set_capture_task (Unit *unit, int id, int capmethod, int n) |
void | push_capture_task (Unit *unit, int id, int capmethod, int n) |
Task * | create_collect_task (Unit *unit, int m, int x, int y) |
void | set_collect_task (Unit *unit, int m, int x, int y) |
Task * | create_disband_task (Unit *unit) |
void | set_disband_task (Unit *unit) |
Task * | create_hit_unit_task (Unit *unit, int id, int hitmethod, int n) |
void | set_hit_unit_task (Unit *unit, int id, int hitmethod, int n) |
void | push_hit_unit_task (Unit *unit, int id, int hitmethod, int n) |
Task * | create_move_dir_task (Unit *unit, int dir, int n) |
void | set_move_dir_task (Unit *unit, int dir, int n) |
void | push_move_dir_task (Unit *unit, int dir, int n) |
Task * | create_move_to_task (Unit *unit, int x, int y, int dist) |
void | set_move_to_task (Unit *unit, int x, int y, int dist) |
void | push_move_to_task (Unit *unit, int x, int y, int dist) |
Task * | create_occupy_task (Unit *unit, Unit *transport) |
void | set_occupy_task (Unit *unit, Unit *transport) |
void | push_occupy_task (Unit *unit, Unit *transport) |
Task * | create_pickup_task (Unit *unit, Unit *occ) |
void | push_pickup_task (Unit *unit, Unit *occ) |
Task * | create_produce_task (Unit *unit, int m, int n) |
void | push_produce_task (Unit *unit, int m, int n) |
Task * | create_construct_task (Unit *unit, int u, int run, int transid, int x, int y) |
void | set_construct_task (Unit *unit, int u, int run, int transid, int x, int y) |
void | push_construct_task (Unit *unit, int u, int run, int transid, int x, int y) |
Task * | create_repair_task (Unit *unit, int id, int hp) |
void | set_repair_task (Unit *unit, int id, int hp) |
void | push_repair_task (Unit *unit, int id, int hp) |
Task * | create_develop_task (Unit *unit, int u2, int n) |
void | set_develop_task (Unit *unit, int u2, int techgoal) |
void | push_develop_task (Unit *unit, int u2, int techgoal) |
Task * | create_resupply_task (Unit *unit, int m) |
void | set_resupply_task (Unit *unit, int m) |
Task * | create_sentry_task (Unit *unit, int n) |
void | set_sentry_task (Unit *unit, int n) |
void | push_sentry_task (Unit *unit, int n) |
int | parse_location (Side *side, char *arg, int *xp, int *yp) |
Unit * | parse_unit (Side *side, char *arg) |
char * | parse_task (Side *side, char *str, Task **taskp) |
char * | task_desig (Task *task) |
Variables |
TaskDefn | taskdefns [] |
| Task definition array.
|
Task * | freetasks |
char * | taskbuf |
int * | lowm = NULL |
int | numlow = 0 |
int | xs [NUMDIRS] |
int | ys [NUMDIRS] |
int | terrs [NUMDIRS] |