How do you use sprite functions from sprites.h with grayscale?
Q: I would like to know if it is possible to use the sprite functions in sprites.h with grayscale. I have tried using the Sprite16 function with grayscale, and none of the sprites I intended to be in grayscale appeared. I tried to use DrawIcon and the grayscale worked just fine. But DrawIcon is too slow… Can Sprite16 and Sprite32 handle grayscale sprites. A: Very common question in a recent time. See, you probably tried to use GraySetAMSPlane. Sprite16 have a parameter for drawing plane, so it is not sensitive to GraySetAMSPlane: you need to give the plane as an explicite parameter. In fact, you need to have two different sprite planes and to draw a sprite twice, passing two different planes as a parameter. For example, static unsigned short light_definition [] = {…}; static unsigned short dark_definition [] = {…}; … Sprite16 (x, y, height, light_definition, GrayGetPlane (LIGHT_PLANE), A_XOR); Sprite16 (x, y, height, dark_definition, GrayGetPlane (DARK_PLANE), A_XOR); In other