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

move.c File Reference

#include "conq.h"
#include "kernel.h"
#include "action.def"

Include dependency graph for move.c:

Include dependency graph

Defines

#define DEF_ACTION(name, code, args, prepfn, netprepfn, DOFN, checkfn, ARGDECL, doc)   extern int DOFN ARGDECL;

Enumerations

enum  { over_nothing = 0, over_own = 1, over_border = 2, over_all = 3 }

Functions

void allocate_used_cells (Unit *unit)
void free_used_cells (Unit *unit)
int has_enough_mp (Unit *unit, Unit *unit2, int mp)
int can_have_enough_mp (Unit *unit, Unit *unit2, int mp)
int type_max_speed_from_any_occs (int u)
int type_max_speed (int u)
int could_move (int uactor, int umover)
 Could uactor move umover?

int can_move (Unit *actor, Unit *mover)
 Can a given unit move?

int prep_move_action (Unit *unit, Unit *unit2, int x, int y, int z)
int do_move_action (Unit *unit, Unit *unit2, int x, int y, int z)
int check_move_action (Unit *unit, Unit *unit2, int x, int y, int z)
int can_move_via_conn (Unit *unit, int nx, int ny)
int unit_speed (Unit *unit, int nx, int ny)
int move_unit (Unit *unit, int nx, int ny)
void change_control_side_around (int x, int y, int u, Side *side)
int can_move_at_all (Unit *unit)
int in_blocking_zoc (Unit *unit, int x, int y, int z)
int unit_blockable_by (Unit *unit, Unit *unit2)
int total_move_cost (int u, int u2, int x1, int y1, int z1, int x2, int y2, int z2)
int zoc_range (Unit *unit, int u2)
int zoc_move_cost (Unit *unit, int ox, int oy, int oz)
int prep_enter_action (Unit *unit, Unit *unit2, Unit *newtransport)
int do_enter_action (Unit *unit, Unit *unit2, Unit *newtransport)
int check_enter_action (Unit *unit, Unit *unit2, Unit *newtransport)
int sides_allow_entry (Unit *unit, Unit *transport)
int terrain_always_impassable (int u, int t)
int type_can_move_in_terrain (int u, int t)
int type_can_have_enough_mp (int u, int mp)

Variables

int retreating
 Retreat flag.

int retreating_from
 Type of Unit from which a Unit is retreating.

int * cache__type_max_speed_from_any_occs = NULL
int * cache__type_max_speed = NULL

Define Documentation

#define DEF_ACTION name,
code,
args,
prepfn,
netprepfn,
DOFN,
checkfn,
ARGDECL,
doc   )     extern int DOFN ARGDECL;
 


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
over_nothing 
over_own 
over_border 
over_all 


Function Documentation

void allocate_used_cells Unit unit  ) 
 

int can_have_enough_mp Unit unit,
Unit unit2,
int  mp
 

int can_move Unit actor,
Unit mover
 

Can a given unit move?

Todo:
Allow ACP-indep movement.

Allow taking from treasury.

int can_move_at_all Unit unit  ) 
 

int can_move_via_conn Unit unit,
int  nx,
int  ny
 

void change_control_side_around int  x,
int  y,
int  u,
Side side
 

int check_enter_action Unit unit,
Unit unit2,
Unit newtransport
 

int check_move_action Unit unit,
Unit unit2,
int  x,
int  y,
int  z
 

int could_move int  uactor,
int  umover
 

Could uactor move umover?

Todo:
Allow ACP-indep movement.

Should cache results.

int do_enter_action Unit unit,
Unit unit2,
Unit newtransport
 

int do_move_action Unit unit,
Unit unit2,
int  x,
int  y,
int  z
 

void free_used_cells Unit unit  ) 
 

int has_enough_mp Unit unit,
Unit unit2,
int  mp
 

int in_blocking_zoc Unit unit,
int  x,
int  y,
int  z
 

int move_unit Unit unit,
int  nx,
int  ny
 

int prep_enter_action Unit unit,
Unit unit2,
Unit newtransport
 

int prep_move_action Unit unit,
Unit unit2,
int  x,
int  y,
int  z
 

int sides_allow_entry Unit unit,
Unit transport
 

int terrain_always_impassable int  u,
int  t
 

int total_move_cost int  u,
int  u2,
int  x1,
int  y1,
int  z1,
int  x2,
int  y2,
int  z2
 

int type_can_have_enough_mp int  u,
int  mp
 

int type_can_move_in_terrain int  u,
int  t
 

int type_max_speed int  u  ) 
 

int type_max_speed_from_any_occs int  u  ) 
 

int unit_blockable_by Unit unit,
Unit unit2
 

int unit_speed Unit unit,
int  nx,
int  ny
 

int zoc_move_cost Unit unit,
int  ox,
int  oy,
int  oz
 

int zoc_range Unit unit,
int  u2
 


Variable Documentation

int* cache__type_max_speed = NULL
 

int* cache__type_max_speed_from_any_occs = NULL
 

int retreating
 

Retreat flag.

This is used to indicate that a move is a retreat; for normal movement it will always be false.

int retreating_from
 

Type of Unit from which a Unit is retreating.

This is a specific type of Unit that the retreater is running away from.


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