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

Method GetJumpHeight

src/game_character.cpp:64–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64int Game_Character::GetJumpHeight() const {
65 if (IsJumping()) {
66 int jump_height = (GetRemainingStep() > SCREEN_TILE_SIZE / 2 ? SCREEN_TILE_SIZE - GetRemainingStep() : GetRemainingStep()) / 8;
67 return (jump_height < 5 ? jump_height * 2 : jump_height < 13 ? jump_height + 4 : 16);
68 }
69 return 0;
70}
71
72int Game_Character::GetScreenX() const {
73 int x = GetSpriteX() / TILE_SIZE - Game_Map::GetDisplayX() / TILE_SIZE + TILE_SIZE;

Callers 2

DrawMethod · 0.80
testInitFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected