I must be doing something wrong but I've compared my code to the examples scattered about and I can' see a problem.
This code doesn't produce colour, only alpha values seem to be reproduced when I use drawimage(hill). If I draw the pixmap to the screen then I get the expected result (alphablended sickly yellow stripes).
I must be doing something wrong. Can anyone help, I've been going round in circles for an hour already!
This code doesn't produce colour, only alpha values seem to be reproduced when I use drawimage(hill). If I draw the pixmap to the screen then I get the expected result (alphablended sickly yellow stripes).
Local i%,j%
Local alpha%= 255
Local red%= 127
Local green%= 127
Local blue%= 63
For t:terrain=EachIn mylist1
hill=CreateImage(t.w,t.h)
pmhill=LockImage(hill)
For j=0 To t.h-1
For i=0 To t.w-1
alpha:+1
If alpha>255 Then alpha=0
WritePixel(pmhill,i,j,alpha Shl 24 + red Shl 16 + green Shl 8 + blue)
Next
Next
UnlockImage(hill)
Release pmhill
next
I must be doing something wrong. Can anyone help, I've been going round in circles for an hour already!