(svn r1415) Move TILE_FROM_XY and TILE_XY to map.h and push TILE_[XY] bits from map.h into map.c.
Now the whole source except map.c is independent of TILE_[XY]_BITS!
This commit is contained in:
4
map.h
4
map.h
@@ -1,8 +1,8 @@
|
||||
#ifndef MAP_H
|
||||
#define MAP_H
|
||||
|
||||
#define TILE_X_BITS 8
|
||||
#define TILE_Y_BITS 8
|
||||
#define TILE_FROM_XY(x,y) (int)((((y) >> 4) << MapLogX()) + ((x) >> 4))
|
||||
#define TILE_XY(x,y) (int)(((y) << MapLogX()) + (x))
|
||||
|
||||
#define TILE_MASK(x) (int)((x) & ((1 << (MapLogX() + MapLogY())) - 1))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user