There are three anomalies with image index currently that I am able to repro. I'm not sure if they are regressions. Somewhat related to #865 and #1021. TheExDeus did mention in #865 that it's redundant for us to modulo
image_index in both the events file and in the engine functions, and it could be the cause of these anomalies.
- An instance with no sprite in GM8.1 and GMSv1.4 are supposed to increment image index without bound. We can test this with a single object in a room in a new game and the following draw code. The image index doesn't increase in ENIGMA.
- An instance with a sprite does allow manually
image_index+=1incrementing the image index past the number of subimages. We can test this by giving the above example object a sprite with one subframe and adding the manual increment to the draw event. In GM8.1 and GMSv1.4 the image index will increase without bound.
- Giving -1 subimage index to any sprite drawing function can crash when in a scope that doesn't have a current instance. This includes from engine places like the main event loop or even just the room create code. This specifically effects the implementation of
cursor_spritewhich still doesn't animate due to this issue.