| 107 | |
| 108 | template <typename T> |
| 109 | static void testAnimJump(T& ch) { |
| 110 | testChar(ch, 0, 1); |
| 111 | ForceUpdate(ch); |
| 112 | |
| 113 | for (int i = 0; i < 255; ++i) { |
| 114 | if (ch.IsJumping()) { |
| 115 | // Animation gets reset every frame of an active jump |
| 116 | testChar(ch, 0, 1); |
| 117 | } else { |
| 118 | // Animation ticks up normally on the frame when the jump finishes and the flag is cleared. |
| 119 | testChar(ch, ch.IsAnimated(), 1); |
| 120 | } |
| 121 | if (ch.IsStopping()) { |
| 122 | ch.Jump(ch.GetX(), ch.GetY()); |
| 123 | } |
| 124 | ForceUpdate(ch); |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | static void testStanding(AnimType at, int speed) { |
| 129 | const MockGame mg(map_id); |
no test coverage detected