2012-01-20 03:28:00 -07:00
|
|
|
inline bool getassignment( const df::coord2d &xy )
|
2012-01-19 13:11:52 -07:00
|
|
|
{
|
|
|
|
return getassignment(xy.x,xy.y);
|
|
|
|
}
|
|
|
|
inline bool getassignment( int x, int y )
|
|
|
|
{
|
|
|
|
return (tile_bitmask[y] & (1 << x));
|
|
|
|
}
|
2012-01-20 03:28:00 -07:00
|
|
|
inline void setassignment( const df::coord2d &xy, bool bit )
|
2012-01-19 13:11:52 -07:00
|
|
|
{
|
|
|
|
return setassignment(xy.x,xy.y, bit);
|
|
|
|
}
|
|
|
|
inline void setassignment( int x, int y, bool bit )
|
|
|
|
{
|
|
|
|
if(bit)
|
|
|
|
tile_bitmask[y] |= (1 << x);
|
|
|
|
else
|
2012-04-11 09:42:05 -06:00
|
|
|
tile_bitmask[y] &= ~(1 << x);
|
2012-04-14 04:12:59 -06:00
|
|
|
}
|
|
|
|
bool has_assignments()
|
|
|
|
{
|
|
|
|
for (int i = 0; i < 16; i++)
|
|
|
|
if (tile_bitmask[i])
|
|
|
|
return true;
|
|
|
|
return false;
|
|
|
|
}
|