Programming help Okay, I'm stumped. I'm probably doing something really stupid again, but here goes: These are the important parts of my code. This is inside a main loop, so the idea is to switch between states in every frame (well, I also built in a delay to do it every five frames, but you get the picture). For some reason the sprite suddenly stayed in state 0. I found a number of other ways to do this, but I'd still like to know what was wrong with what I had.