equal
deleted
inserted
replaced
442 _map_extra_bits[tile >> 2] |= (bits&3) << ((tile&3)*2); |
442 _map_extra_bits[tile >> 2] |= (bits&3) << ((tile&3)*2); |
443 } |
443 } |
444 |
444 |
445 uint GetMapExtraBits(uint tile) |
445 uint GetMapExtraBits(uint tile) |
446 { |
446 { |
447 return (_map_extra_bits[tile >> 2] >> (tile&3)*2)&3; |
447 if (GET_TILE_X(tile) < MapSizeX() && GET_TILE_Y(tile) < MapSizeY() && |
|
448 GET_TILE_X(tile) > 0 && GET_TILE_Y(tile) > 0) |
|
449 return (_map_extra_bits[tile >> 2] >> (tile&3)*2)&3; |
|
450 else |
|
451 return 0; |
448 } |
452 } |
449 |
453 |
450 #define TILELOOP_BITS 4 |
454 #define TILELOOP_BITS 4 |
451 #define TILELOOP_SIZE (1 << TILELOOP_BITS) |
455 #define TILELOOP_SIZE (1 << TILELOOP_BITS) |
452 #define TILELOOP_ASSERTMASK ((TILELOOP_SIZE-1) + ((TILELOOP_SIZE-1) << TILE_X_BITS)) |
456 #define TILELOOP_ASSERTMASK ((TILELOOP_SIZE-1) + ((TILELOOP_SIZE-1) << TILE_X_BITS)) |