Open ivan-mogilko opened 2 months ago
Special cursor case is inventory cursor that has extra hotspot gfx drawn upon it. Currently this is implemented by creating a temporary bitmap and combining 2 images on it. Because of such approach, this cursor image does not have a matching sprite number. When player cycles cursors with active inventory on, the cursor texture has to be updated between sprites that have an identifying number and one that does not. This is a special case that has to be tested too.
Recently there was a bug, which caused engine to paint this temporary cursor bitmap over other cached cursor textures, if their size matched, because it did not realize that previous texture has a identifier (so it's associated with a persistent sprite) while new sprite does not (so it's a temporary generated image).
Of course, it's also possible to change this implementation in the engine, maybe allocating this inventory cursor as a dynamic sprite with a number. But it's still proper to have a test.
Need cursor tests, using screenshot method to compare the graphic and graphical position.
Something like: