I have been staring at the screen for a while and cannot work out why this isn't working, so I an going to have a break and figure someone here will know in an instant.
function draw_map()
`Draw the map using the loaded sprites and the map data
for y = 0 to MAPHEIGHT-1
for x = 0 to MAPWIDTH-1
`create bitmap 1, 640, 480
set current bitmap 0
paste image MAPDATA(x,y)+1, x*32, y*32
sync
next x
next y
`copy bitmap 1,0
`sync
sleep 5000
endfunction
What I am trying to do is paste images onto bitmap 1 and then copy it over to 0.
The code as it is works - it reads the imagenumber(to get the right tile) from the array and draws the map to the screen. But as soon as I change set current bitmap to 1 and then uncomment the copy bitmap 1,0 and sync command I just get a blank screen.
I have obviously misunderstood a concept here or my code sucks :-(
All help greatly appreciated.