Hi!
As i keep on learning Blitz2 and try different things out, i have the following code
Code:
; init code and img loading & shape adquiring...
; now the problematic code:
statement paintmap{bitmapnum, startx, starty}
shared map()
use bitmap bitmapnum
for y=0 to 15
for x=0 to 19
blit map.b(startx + x, starty + y), x asl 4, y asl 4
next
next
end statement
blitz
slice 0,44,320,256,$fff8,5,8,32,320,320
paintmap{0,mapx,mapy}
show 0
use palette 0
mousewait
end
If i use the statement as shown, and it's the same using blit or block statemens to paint, i have a execution error telling me Blit or Block are only available in AMIGA mode... and i don't understand what is wrong...
I managed to get the above example working replacing the procedure paintmap with a subroutine:
.paintmap:
all the same code as in the procedure
return
And now it runs ok... but i would preffer to use procedures instead of subroutines...
Any ideas? :-)