map.h
changeset 4849 9a3c3ae7f62f
parent 4848 56549aa3e234
child 5118 5a56a0f12206
equal deleted inserted replaced
4848:56549aa3e234 4849:9a3c3ae7f62f
    65 static inline TileIndex TileVirtXY(uint x, uint y)
    65 static inline TileIndex TileVirtXY(uint x, uint y)
    66 {
    66 {
    67 	return (y >> 4 << MapLogX()) + (x >> 4);
    67 	return (y >> 4 << MapLogX()) + (x >> 4);
    68 }
    68 }
    69 
    69 
    70 typedef enum Owner {
    70 typedef byte Owner;
       
    71 enum Owners {
    71 	OWNER_TOWN      = 0x0F, // a town owns the tile
    72 	OWNER_TOWN      = 0x0F, // a town owns the tile
    72 	OWNER_NONE      = 0x10, // nobody owns the tile
    73 	OWNER_NONE      = 0x10, // nobody owns the tile
    73 	OWNER_WATER     = 0x11, // "water" owns the tile
    74 	OWNER_WATER     = 0x11, // "water" owns the tile
    74 	OWNER_END       = 0x12,
    75 	OWNER_END       = 0x12,
    75 } Owner;
    76 };
    76 
    77 
    77 enum {
    78 enum {
    78 	INVALID_TILE = (TileIndex)-1
    79 	INVALID_TILE = (TileIndex)-1
    79 };
    80 };
    80 
    81