+void ObjectRenderer::FloodFillOnCPU(int64_t x, int64_t y, const PixelBounds & bounds, const CPURenderTarget & target, const Colour & fill)
+{
+ if (x < 0 || x < bounds.x || x > bounds.x+bounds.w || x >= target.w)
+ return;
+ if (y < 0 || y < bounds.y || y > bounds.y+bounds.h || y >= target.h)
+ return;
+
+ if (GetColour(target, x, y) != Colour(1,1,1,1))
+ return;
+
+ SetColour(target, x, y, fill);
+ FloodFillOnCPU(x-1, y, bounds, target, fill);
+ FloodFillOnCPU(x+1, y, bounds, target, fill);
+ FloodFillOnCPU(x,y-1,bounds,target,fill);
+ FloodFillOnCPU(x,y+1,bounds,target,fill);
+
+}
+