It is used to change the colour of a pixel. Write pixel uses a 24 bit colour value with alpha information.
You need to extract the individual 8 bit Red, Green, Blue and Alpha values from it, using the method above. Tweak the values, then you can combine the value back into a 24 bit value.
RGB1=ReadPixelFast(loop,loop1,TextureBuffer(texture)) r=(RGB1 And $FF0000)shr 16;separate out the red g=(RGB1 And $FF00) shr 8;green b=RGB1 And $FF;and blue parts of the color a=(RGB1 And $FF000000)Shr 24 a=255; remove any alpha information currently in the texture. newrgb= (a shl 24) or (r shl 16) or (g shl 8) or b; combine the ARGB back into a number WritePixelFast(loop,loop1,newrgb,TextureBuffer(texture)); write the info back to the texture
You need to extract the individual 8 bit Red, Green, Blue and Alpha values from it, using the method above. Tweak the values, then you can combine the value back into a 24 bit value.