Function UpdateMap()
cwidth=40
cheight=30 (поменять, в зависимости от того, сколько блоков вмешается на экран по ширине и высоте соответственно)
For x=0 to cwidth
For y=0 to cheight
light = False
If day=1 Then
light=True
EndIf
If NTT(x*32, y*32)=False And day=0 Then
light=False
EndIf
If Not light And NTT(x*32, y*32) Then
light=True
EndIf
If light Then
DrawImage ground, x*32, y*32
EndIf
If Not light Then
DrawImage dground, x*32, y*32
EndIf
Next
Next
End Function
Я имел ввиду что-то вроде этого.