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

Method GetPanWait

src/game_player.cpp:865–875  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

863}
864
865int Game_Player::GetPanWait() {
866 bool is_maniac = Player::IsPatchManiac();
867 const auto distance = std::max(
868 std::abs(data()->pan_current_x - data()->pan_finish_x),
869 std::abs(data()->pan_current_y - data()->pan_finish_y));
870 const auto speed = !is_maniac ? data()->pan_speed : static_cast<int>(std::max(
871 std::abs(data()->maniac_horizontal_pan_speed),
872 std::abs(data()->maniac_vertical_pan_speed)));
873 assert(speed > 0);
874 return distance / speed + (distance % speed != 0);
875}
876
877void Game_Player::UpdatePan() {
878 if (!IsPanActive())

Callers 4

CommandPanScreenMethod · 0.80
testPanAbsFunction · 0.80
testPanSpeedFunction · 0.80
game_character.cppFile · 0.80

Calls 1

maxFunction · 0.85

Tested by

no test coverage detected