home *** CD-ROM | disk | FTP | other *** search
/ Amiga Times / AmigaTimes.iso / spiele / FreeCiv / src / freeciv-1.7.0 / server / gotohand.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-10-06  |  1.6 KB  |  39 lines

  1. /********************************************************************** 
  2.  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
  3.    This program is free software; you can redistribute it and/or modify
  4.    it under the terms of the GNU General Public License as published by
  5.    the Free Software Foundation; either version 2, or (at your option)
  6.    any later version.
  7.  
  8.    This program is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.    GNU General Public License for more details.
  12. ***********************************************************************/
  13. #ifndef __GOTOHAND_H
  14. #define __GOTOHAND_H
  15.  
  16. void do_unit_goto(struct player *pplayer, struct unit *punit);
  17. void generate_warmap(struct city *pcity, struct unit *punit);
  18. void really_generate_warmap(struct city *pcity, struct unit *punit, enum unit_move_type which);
  19.  
  20. /* all other functions are internal */
  21.  
  22. #define THRESHOLD 12
  23.  
  24. #include <map.h> /* just to allow MAP_MAX_ to be used */
  25.  
  26. int could_unit_move_to_tile(struct unit *punit, int x0, int y0, int x, int y);
  27. int goto_is_sane(struct player *pplayer, struct unit *punit, int x, int y, int omni);
  28.  
  29. struct move_cost_map {
  30.   unsigned char cost[MAP_MAX_WIDTH][MAP_MAX_HEIGHT];
  31.   unsigned char seacost[MAP_MAX_WIDTH][MAP_MAX_HEIGHT];
  32.   unsigned char vector[MAP_MAX_WIDTH][MAP_MAX_HEIGHT];
  33.   struct city *warcity; /* so we know what we're dealing with here */
  34.   struct unit *warunit; /* so we know what we're dealing with here */
  35.   int orig_x, orig_y;
  36. };
  37.  
  38. #endif
  39.