tile.h
changeset 1942 634961366cdc
parent 1927 4126e0e3e884
child 1944 012fa5e69118
equal deleted inserted replaced
1941:b1cb02c0401c 1942:634961366cdc
    16 	MP_INDUSTRY,
    16 	MP_INDUSTRY,
    17 	MP_TUNNELBRIDGE,
    17 	MP_TUNNELBRIDGE,
    18 	MP_UNMOVABLE
    18 	MP_UNMOVABLE
    19 } TileType;
    19 } TileType;
    20 
    20 
    21 /* XXX: This should be moved out to a new file (rail.h) along with some other
    21 /* TODO: Find out values */
    22  * cleanups. I'll do that after 0.4) */
    22 /* Direction as commonly used in v->direction, 8 way. */
    23 typedef enum {
    23 typedef enum Directions {
    24 	RAILTYPE_RAIL   = 0,
    24 	DIR_N   = 0,
    25 	RAILTYPE_MONO   = 1,
    25 	DIR_NE  = 1,      /* Northeast, upper right on your monitor */
    26 	RAILTYPE_MAGLEV = 2,
    26 	DIR_E   = 2,
    27 	RAILTYPE_END,
    27 	DIR_SE  = 3,
    28 	RAILTYPE_MASK   = 0x3,
    28 	DIR_S   = 4,
    29 	INVALID_RAILTYPE = 0xFF,
    29 	DIR_SW  = 5,
    30 } RailType;
    30 	DIR_W   = 6,
       
    31 	DIR_NW  = 7,
       
    32 	DIR_END,
       
    33 	INVALID_DIR = 0xFF,
       
    34 } Direction;
    31 
    35 
       
    36 /* Direction commonly used as the direction of entering and leaving tiles, 4-way */
       
    37 typedef enum DiagonalDirections {
       
    38 	DIAGDIR_NE  = 0,      /* Northeast, upper right on your monitor */
       
    39 	DIAGDIR_SE  = 1,
       
    40 	DIAGDIR_SW  = 2,
       
    41 	DIAGDIR_NW  = 3,
       
    42 	DIAGDIR_END,
       
    43 	INVALID_DIAGDIR = 0xFF,
       
    44 } DiagDirection;
    32 
    45 
    33 void SetMapExtraBits(TileIndex tile, byte flags);
    46 void SetMapExtraBits(TileIndex tile, byte flags);
    34 uint GetMapExtraBits(TileIndex tile);
    47 uint GetMapExtraBits(TileIndex tile);
    35 
    48 
    36 uint GetTileSlope(TileIndex tile, uint *h);
    49 uint GetTileSlope(TileIndex tile, uint *h);