You could try lowering your color depth, or restricting the loop to the part that is actually on-screen. Also, drawing black rectangles may be faster than drawing a sprite.
Also, do I understand correctly that you're first drawing (or restoring) the entire playfield, and then erasing the parts that are fogged? Because that's two draw operations for each fogged tile.
Finally, I would avoid calling a function like index() in the inner loop, just on general principle.
Also, do I understand correctly that you're first drawing (or restoring) the entire playfield, and then erasing the parts that are fogged? Because that's two draw operations for each fogged tile.
Finally, I would avoid calling a function like index() in the inner loop, just on general principle.