~ubuntu-branches/debian/sid/freeciv/sid

« back to all changes in this revision

Viewing changes to common/tile.h

  • Committer: Package Import Robot
  • Author(s): Clint Adams, Karl Goetz, Clint Adams
  • Date: 2011-08-28 22:40:00 UTC
  • mfrom: (1.2.19 upstream)
  • Revision ID: package-import@ubuntu.com-20110828224000-j2r1erewlem25dox
Tags: 2.3.0-1
[ Karl Goetz ]
* New upstream version.
* Fix themes_sdl_use_system_fonts.diff to apply cleanly on 2.3.0
* Massage work_around_unity_induced_breakage.diff to get it
  applying to the new codebase (The patch assumes commits made
  after 2.3.0 was tagged upstream).

[ Clint Adams ]
* Fudge build system to think there is no libtool mismatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
#ifndef FC__TILE_H
15
15
#define FC__TILE_H
16
16
 
 
17
/* utility */
 
18
#include "bitvector.h"
 
19
 
 
20
/* common */
17
21
#include "base.h"
18
22
#include "fc_types.h"
19
23
#include "player.h"
37
41
  int nat_x, nat_y; /* Native coordinates of the tile. */
38
42
  int index; /* Index coordinate of the tile. */
39
43
  Continent_id continent;
40
 
  bv_player tile_known, tile_seen[V_COUNT];
41
44
  bv_special special;
42
45
  bv_bases bases;
43
46
  struct resource *resource;            /* NULL for no resource */
49
52
  char *spec_sprite;
50
53
};
51
54
 
52
 
/* get 'struct tile_list' and related functions: */
 
55
/* 'struct tile_list' and related functions. */
53
56
#define SPECLIST_TAG tile
54
57
#define SPECLIST_TYPE struct tile
55
58
#include "speclist.h"
56
 
 
57
 
#define tile_list_iterate(tile_list, ptile) \
58
 
    TYPED_LIST_ITERATE(struct tile, tile_list, ptile)
59
 
#define tile_list_iterate_end  LIST_ITERATE_END
 
59
#define tile_list_iterate(tile_list, ptile)                                 \
 
60
  TYPED_LIST_ITERATE(struct tile, tile_list, ptile)
 
61
#define tile_list_iterate_end LIST_ITERATE_END
 
62
 
 
63
/* 'struct tile_hash' and related functions. */
 
64
#define SPECHASH_TAG tile
 
65
#define SPECHASH_KEY_TYPE struct tile *
 
66
#define SPECHASH_DATA_TYPE void *
 
67
#include "spechash.h"
 
68
#define tile_hash_iterate(hash, ptile)                                      \
 
69
  TYPED_HASH_KEYS_ITERATE(struct tile *, hash, ptile)
 
70
#define tile_hash_iterate_end HASH_KEYS_ITERATE_END
 
71
 
60
72
 
61
73
/* Tile accessor functions. */
62
74
int tile_index(const struct tile *ptile);
138
150
const char *tile_get_info_text(const struct tile *ptile, int linebreaks);
139
151
 
140
152
/* Virtual tiles are tiles that do not exist on the game map. */
141
 
struct tile *create_tile_virtual(void);
142
 
void destroy_tile_virtual(struct tile *vtile);
 
153
struct tile *tile_virtual_new(const struct tile *ptile);
 
154
void tile_virtual_destroy(struct tile *vtile);
143
155
 
144
156
#endif /* FC__TILE_H */