| 772 | } |
| 773 | |
| 774 | void Game_Player::StartPan(int direction, int distance, int speed) { |
| 775 | distance *= SCREEN_TILE_SIZE; |
| 776 | |
| 777 | if (direction == PanUp) { |
| 778 | int new_pan = data()->pan_finish_y + distance; |
| 779 | data()->pan_finish_y = new_pan; |
| 780 | } else if (direction == PanRight) { |
| 781 | int new_pan = data()->pan_finish_x - distance; |
| 782 | data()->pan_finish_x = new_pan; |
| 783 | } else if (direction == PanDown) { |
| 784 | int new_pan = data()->pan_finish_y - distance; |
| 785 | data()->pan_finish_y = new_pan; |
| 786 | } else if (direction == PanLeft) { |
| 787 | int new_pan = data()->pan_finish_x + distance; |
| 788 | data()->pan_finish_x = new_pan; |
| 789 | } |
| 790 | |
| 791 | data()->pan_speed = 2 << speed; |
| 792 | |
| 793 | if (Player::IsPatchManiac()) { |
| 794 | // Maniac uses separate horizontal/vertical pan for everything |
| 795 | data()->maniac_horizontal_pan_speed = data()->pan_speed; |
| 796 | data()->maniac_vertical_pan_speed = data()->pan_speed; |
| 797 | } |
| 798 | } |
| 799 | |
| 800 | void Game_Player::StartPixelPan(int h, int v, int speed, bool interpolated, bool centered, bool relative) { |
| 801 | if (!Player::IsPatchManiac()) { |
no outgoing calls
no test coverage detected