The screen is bitmap 0 and to see anything the current bitmap need to be 0.
When you load to a bitmap the current bitmap is set to the number of the bitmap you loaded.
To get the code to work you can.
delete the bitmap after you have got the image from it.
`Initialize the program
hide mouse
cls
`load background bitmap
load bitmap "background.bmp", 0
`load the source bitmap file
load bitmap "f15.bmp", 1
`grab image 1 from bitmap
get image 1,0,0,300,300
`delete the bitmap
delete bitmap 1
`draw the sprite
sprite 1,170,90,1
`wait for keypress
wait key
end
Change the active bitmap to 0(screen) after get image.
`Initialize the program
hide mouse
cls
`load background bitmap
load bitmap "background.bmp", 0
`load the source bitmap file
load bitmap "f15.bmp", 1
`grab image 1 from bitmap
get image 1,0,0,300,300
`set bitmap back to 0, the screen
set current bitmap 0
`draw the sprite
sprite 1,170,90,1
`wait for keypress
wait key
end
Since you are not breaking the image up into seperate images there is no point loading as a bitmap in the first place. Use load image instead.
hide mouse
cls
`load background bitmap
load bitmap "background.bmp", 0
`load the source bitmap file
load image "f15.bmp",1,1
`create the sprite
sprite 1,170,90,1
`wait for keypress
wait key
end
you ain't the cops