Itse koodi:
Code: Select all
Type IMAGEMAP
Field x
Field y
Field r
Field g
Field b
EndType
asd=LoadImage("media\map.bmp")
Lock Image(asd)
For x=1 To ImageWidth(asd)
For y=1 To ImageHeight(asd)
PickImageColor2 asd,x,y
Newa.IMAGEMAP=New(IMAGEMAP)
Newa\x=x
Newa\y=y
Newa\r=getRGB(RED)
Newa\g=getRGB(GREEN)
Newa\b=getRGB(BLUE )
Next y
Next x
Unlock Image(asd)
Repeat
SetWindow ""+FPS()
x=MouseX()
y=MouseY()
For iMap.IMAGEMAP=Each IMAGEMAP
If Distance(x,y,iMap\x,iMap\y)<50 Then
Color iMap\r, iMap\g, iMap\b
Dot iMap\x,iMap\y
EndIf
Next iMap
DrawScreen
Forever