map.h
changeset 979 f12f96116cdd
parent 955 25bc5b97e3e2
child 1035 0a170deb6e33
equal deleted inserted replaced
978:cda858b94a7c 979:f12f96116cdd
     2 #define MAP_H
     2 #define MAP_H
     3 
     3 
     4 #define TILE_FROM_XY(x,y) (int)((((y) >> 4) << MapLogX()) + ((x) >> 4))
     4 #define TILE_FROM_XY(x,y) (int)((((y) >> 4) << MapLogX()) + ((x) >> 4))
     5 #define TILE_XY(x,y) (int)(((y) << MapLogX()) + (x))
     5 #define TILE_XY(x,y) (int)(((y) << MapLogX()) + (x))
     6 
     6 
     7 #define TILE_MASK(x) (int)((x) & ((1 << (MapLogX() + MapLogY())) - 1))
     7 #define TILE_MASK(x) ((x) & ((1 << (MapLogX() + MapLogY())) - 1))
     8 
     8 
     9 extern byte   _map_type_and_height[];
     9 extern byte   _map_type_and_height[];
    10 extern byte   _map5[];
    10 extern byte   _map5[];
    11 extern byte   _map3_lo[];
    11 extern byte   _map3_lo[];
    12 extern byte   _map3_hi[];
    12 extern byte   _map3_hi[];