MCPcopy Create free account
hub / github.com/EasyRPG/Player / testAnimJump

Function testAnimJump

tests/game_character_anim.cpp:109–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107
108template <typename T>
109static 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
128static void testStanding(AnimType at, int speed) {
129 const MockGame mg(map_id);

Callers 2

testJumpingFunction · 0.85
testBoatFunction · 0.85

Calls 8

IsJumpingMethod · 0.80
IsAnimatedMethod · 0.80
IsStoppingMethod · 0.80
JumpMethod · 0.80
testCharFunction · 0.70
ForceUpdateFunction · 0.70
GetXMethod · 0.45
GetYMethod · 0.45

Tested by

no test coverage detected