S
Snayff
Guest
Evening all,
I am converting a 2d array to a ds_grid but I am not sure how to convert the bitwise operations. Do we have to do something specific to use bitwise operations with ds_grid?
I have gone from
to
The value shown in the grid is 3, as expected.
However, when I not the bits to set them to 0 the value is -4.
Any ideas?
Snayff
I am converting a 2d array to a ds_grid but I am not sure how to convert the bitwise operations. Do we have to do something specific to use bitwise operations with ds_grid?
I have gone from
Code:
oControllerTile.tileArray[_arrayHeight, _arrayLength] |= ISBLOCKINGMOVEMENT | ISBLOCKINGSIGHT;
Code:
ds_grid_set_region(oControllerTile.tileArray, 0, 0, ds_grid_width(oControllerTile.tileArray), ds_grid_height(oControllerTile.tileArray), ISBLOCKINGMOVEMENT | ISBLOCKINGSIGHT);
However, when I not the bits to set them to 0 the value is -4.
Code:
ds_grid_set_region(oControllerTile.tileArray, _startingTileX, _startingTileY, _startingTileX + _widthOfRoom, _startingTileY + _heightOfRoom, (~ISBLOCKINGMOVEMENT) & (~ISBLOCKINGSIGHT) );
Any ideas?
Snayff