diff --git a/includes/gravity.h b/includes/gravity.h index 986aefcf9..9168b9df5 100644 --- a/includes/gravity.h +++ b/includes/gravity.h @@ -11,7 +11,7 @@ extern float gravmap[YRES/CELL][XRES/CELL]; //Maps to be used by the main thread extern float *gravpf; extern float *gravxf; extern float *gravyf; -extern unsigned gravmask[YRES/CELL][XRES/CELL]; +extern unsigned *gravmaskf; extern float th_ogravmap[YRES/CELL][XRES/CELL]; // Maps to be processed by the gravity thread extern float th_gravmap[YRES/CELL][XRES/CELL]; diff --git a/src/graphics.c b/src/graphics.c index 62475fce5..55dd0532a 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1427,7 +1427,7 @@ void draw_grav_zones(pixel * vid) { for (x=0; xshape; @@ -476,9 +477,16 @@ void gravity_mask() { if(cshape[y*(XRES/CELL)+x]){ if(c_mask_el->shapeout) - gravmask[y][x] = 0xFFFFFFFF; + maskvalue = 0xFFFFFFFF; else - gravmask[y][x] = 0x00000000; + maskvalue = 0x00000000; + for (j=0; j