B
binaryidiot
Guest
So in my code I have a few calls to ds_grid_set_region, when ran on windows these work exactly as expected, however running on html 5 they will only set a region up to the smaller of the width and the height. The only way I can get my code to work properly is If the ds_grid I'm working with is a square, if it is at all a rectangle then part of it will be all set to 0.
GML:
function createBSPGrid(width, length, minAreaSize, maxAreaSize){
//Setup data structures
var grid = ds_grid_create(width, length);
//Set everything to walls
ds_grid_set_region(grid, 0, 0, width-1, length-1, wall);
//Assign cords for area
var x1 = 1, y1 = 1;
var x2 = width - 2, y2 = length - 2;
//Assign area
ds_grid_set_region(grid, x1, y1, x2, y2, areaNum);
leaf(grid, x1, y1, x2, y2, minAreaSize, maxAreaSize);
return grid;
}