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

plan.c File Reference

#include "conq.h"
#include "kernel.h"
#include "aiutil.h"
#include "ai.h"
#include "aiscore.h"
#include "aiunit.h"
#include "aiunit2.h"
#include "aitact.h"
#include "aioprt.h"
#include "plan.def"

Include dependency graph for plan.c:

Include dependency graph

Defines

#define DEF_PLAN(NAME, code)   NAME,
#define SAMEPATH   1
#define EXPLORE_PATH   2
#define markloc(x, y)   (set_tmp1_at(x, y, mark))
#define markedloc(x, y)   (tmp1_at(x, y) == mark)
#define get_fromdir(x, y)   (tmp2_at(x, y))
#define set_fromdir(x, y, dir)   (set_tmp2_at(x, y, dir))
#define get_dist(x, y)   (tmp3_at(x, y))
#define set_dist(x, y, d)   (set_tmp3_at(x, y, d))

Functions

int ai_go_after_victim (Unit *unit, int range, int broadcast)
void init_unit_plan (Unit *unit)
void set_unit_plan_type (Side *side, Unit *unit, int type)
void set_unit_asleep (Side *side, Unit *unit, int flag, int recurse)
void set_unit_reserve (Side *side, Unit *unit, int flag, int recurse)
void set_unit_ai_control (Side *side, Unit *unit, int flag, int recurse)
void set_unit_curadvance (Side *side, Unit *unit, int a)
void set_unit_researchdone (Side *side, Unit *unit, int flag)
void set_unit_main_goal (Side *side, Unit *unit, Goal *goal)
void set_unit_waiting_for_transport (Side *side, Unit *unit, int flag)
int execute_plan (Unit *unit)
int is_in_formation (Unit *unit)
int move_into_formation (Unit *unit)
int task_is_in_agenda (Plan *plan, Task *task)
int execute_standing_order (Unit *unit, int addtask)
int tasks_match (Task *task1, Task *task2)
int find_alternate_hit_target (Unit *unit, Task *task, int *xp, int *yp)
int ai_victim_here (int x, int y, int *numvictims)
Taskfind_unit_task_by_type (Unit *unit, TaskType tt)
int low_on_supplies_one (Unit *unit)
int low_on_ammo_one (Unit *unit)
void make_plausible_random_args (char *argtypestr, int i, int *args, Unit *unit)
void set_waiting_for_tasks (Unit *unit, int flag)
void wake_unit (Side *side, Unit *unit, int forcewakeoccs)
void selectively_wake_unit (Side *side, Unit *unit, int wakeoccs, int forcewakeoccs)
void wake_area (Side *side, int x, int y, int n, int occs)
void set_formation (Unit *unit, Unit *leader, int x, int y, int dist, int flex)
void delay_unit (Unit *unit, int flag)
void pop_task (Plan *plan)
int clear_task_agenda (Unit *unit)
void clear_task_outcome (Unit *unit)
void free_plan (Unit *unit)
char * plan_desig (Plan *plan)
void force_replan (Unit *unit)
int est_completion_time (Unit *unit, int u2)
int past_halfway_point (Unit *unit)

Variables

char * plantypenames []
 Plan type name array.

int victim_id
int victim_x
int victim_y
int victim_rating
int victim_utype
int victim_sidenum
OccStatus victim_occstatus
int victim_flags
int victim_dmgtypes
char * planbuf = NULL

Define Documentation

#define DEF_PLAN NAME,
code   )     NAME,
 

#define EXPLORE_PATH   2
 

#define get_dist x,
 )     (tmp3_at(x, y))
 

#define get_fromdir x,
 )     (tmp2_at(x, y))
 

#define markedloc x,
 )     (tmp1_at(x, y) == mark)
 

#define markloc x,
 )     (set_tmp1_at(x, y, mark))
 

#define SAMEPATH   1
 

#define set_dist x,
y,
 )     (set_tmp3_at(x, y, d))
 

#define set_fromdir x,
y,
dir   )     (set_tmp2_at(x, y, dir))
 


Function Documentation

int ai_go_after_victim Unit unit,
int  range,
int  broadcast
 

int ai_victim_here int  x,
int  y,
int *  numvictims
 

int clear_task_agenda Unit unit  ) 
 

void clear_task_outcome Unit unit  ) 
 

void delay_unit Unit unit,
int  flag
 

int est_completion_time Unit unit,
int  u2
 

int execute_plan Unit unit  ) 
 

int execute_standing_order Unit unit,
int  addtask
 

int find_alternate_hit_target Unit unit,
Task task,
int *  xp,
int *  yp
 

Task* find_unit_task_by_type Unit unit,
TaskType  tt
 

void force_replan Unit unit  ) 
 

void free_plan Unit unit  ) 
 

void init_unit_plan Unit unit  ) 
 

int is_in_formation Unit unit  ) 
 

int low_on_ammo_one Unit unit  ) 
 

int low_on_supplies_one Unit unit  ) 
 

void make_plausible_random_args char *  argtypestr,
int  i,
int *  args,
Unit unit
 

int move_into_formation Unit unit  ) 
 

int past_halfway_point Unit unit  ) 
 

char* plan_desig Plan plan  ) 
 

void pop_task Plan plan  ) 
 

void selectively_wake_unit Side side,
Unit unit,
int  wakeoccs,
int  forcewakeoccs
 

void set_formation Unit unit,
Unit leader,
int  x,
int  y,
int  dist,
int  flex
 

void set_unit_ai_control Side side,
Unit unit,
int  flag,
int  recurse
 

void set_unit_asleep Side side,
Unit unit,
int  flag,
int  recurse
 

void set_unit_curadvance Side side,
Unit unit,
int  a
 

void set_unit_main_goal Side side,
Unit unit,
Goal goal
 

void set_unit_plan_type Side side,
Unit unit,
int  type
 

void set_unit_researchdone Side side,
Unit unit,
int  flag
 

void set_unit_reserve Side side,
Unit unit,
int  flag,
int  recurse
 

void set_unit_waiting_for_transport Side side,
Unit unit,
int  flag
 

void set_waiting_for_tasks Unit unit,
int  flag
 

int task_is_in_agenda Plan plan,
Task task
 

int tasks_match Task task1,
Task task2
 

void wake_area Side side,
int  x,
int  y,
int  n,
int  occs
 

void wake_unit Side side,
Unit unit,
int  forcewakeoccs
 


Variable Documentation

char* planbuf = NULL
 

char* plantypenames[]
 

Initial value:

 {


#define DEF_PLAN(NAME,code) 

# 1 "/home/groups/x/xc/xconq/cron-scratch/doc-export/kernel//plan.def" 1













# 89 "/home/groups/x/xc/xconq/cron-scratch/doc-export/kernel/plan.c" 2

    NULL
}
Plan type name array.

int victim_dmgtypes
 

int victim_flags
 

int victim_id
 

OccStatus victim_occstatus
 

int victim_rating
 

int victim_sidenum
 

int victim_utype
 

int victim_x
 

int victim_y
 


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