hardly lol if you can call this working. I realized that the hardest thing to do was change the background color by clearing the screen, while still keeping the image you have drawn on there.
It lags when you change the color and when you change from blue to white, it clears everything. If i figure out why its doing that, i'll give you an updated code.
what i did is took the current screen color, got an image, put it in a memblock, cleared the screen, compared the image colors in the memblock to the point i took on the screen, and then changed the color if the current point matched the one i took from the screen.
Here's the code:
Rem my first paint program made by me
Sync on
Sync rate 200
Set display mode 800,600,32
Rem main loop
r=255 : g=255 : b=255
cls rgb(r,g,b)
line 0,60,799,60
get image 1,0,60,799,599
do
ink 0,0
gosub texts
text 0,0,"To go to help say help"
text 0,20,"Type something>"+string$
text 0,40,"What you said>"+command$
oldx=MValuex-0.0001
oldy=MValuey-0.0001
MValuex=mousex()
MValuey=mousey()
Rem the mouseclicking making a dot
if mouseclick() = 1
line oldx,oldy,MValuex,MValuey
endif
sync
Loop
texts:
if key=0
if keystate(14)=1 or returnkey()=1
if keystate(14)=1
get image 1,0,60,799,599
string$=left$(string$,len(string$)-1)
cls rgb(r,g,b)
paste image 1,0,60
endif
if returnkey()=1
command$=string$
Rem red
if string$ = "red"
r=255 : g=0 : b=0
red=1
endif
rem blue
if string$ = "blue"
r=0 : g=0 : b=255
blue=1
endif
Rem grass
if string$ = "green"
r=0 : g=255 : b=0
green=1
endif
Rem whitey
if string$ = "white"
r=255 : g=255 : b=255
white=1
endif
if red=0 and white=0 and green=0 and blue=0
get image 1,0,60,799,599
cls rgb(r,g,b)
paste image 1,0,60
else
get image 1,0,60,799,599
if memblock exist(1)=1 then delete memblock 1
color=point(798,1)
cls rgb(r,g,b)
make memblock from image 1,1
for num=0 to get memblock size(1)-12 step 2
if memblock dword(1,num)=color then write memblock dword 1,num,rgb(r,g,b)
next num
delete image 1
make image from memblock 1,1
paste image 1,0,60
red=0 : white=0 : green=0 : blue=0
endif
string$=""
endif
else
string$=string$+inkey$()
endif
if scancode()>0 then key=1
else
if scancode()=0 then key=0
endif
return
its got ok fps besides when changing the screen color.