Hello,
the link to the F.L.E is down, has anyone the freeware landscape editor for download or a working link?
thx
the link to the F.L.E is down, has anyone the freeware landscape editor for download or a working link?
thx
;----------------------------------------------------------------------------- ; function for extracting the alpha Function ReadAlpha(tex) t=TextureBuffer(tex) LockBuffer t For y=0 To TextureHeight(tex)-1 For x=0 To TextureWidth(tex)-1 pix=ReadPixelFast(x,y,t) pix=(pix And $ff000000) Shr 24 alphainfo(x,y)=pix Next Next UnlockBuffer t End Function ;----------------------------------------------------------------------------- ;----------------------------------------------------------------------------- ; function for putting the alpha back on Function WriteAlpha(tex) t=TextureBuffer(tex) LockBuffer t For y=0 To TextureHeight(tex)-1 For x=0 To TextureWidth(tex)-1 pix=ReadPixelFast(x,y,t) pix=(pix And $ffffff) Or (alphainfo(x,y) Shl 24) WritePixelFast (x,y,pix,t) Next Next UnlockBuffer t End Function ;-----------------------------------------------------------------------------
texture=LoadTexture("image.png",1+2+16+32) ReadAlpha(texture) texture=LoadTexture("image.png",1+4+8+16+32) WriteAlpha(texture) EntityTexture mesh,texture