| 125 | } |
| 126 | |
| 127 | void Game_Character::Update() { |
| 128 | if (!IsActive() || IsProcessed()) { |
| 129 | return; |
| 130 | } |
| 131 | SetProcessed(true); |
| 132 | |
| 133 | if (IsStopping()) { |
| 134 | this->UpdateNextMovementAction(); |
| 135 | } |
| 136 | UpdateFlash(); |
| 137 | |
| 138 | if (IsStopping()) { |
| 139 | if (GetStopCount() == 0 || IsMoveRouteOverwritten() || |
| 140 | ((Main_Data::game_system->GetMessageContinueEvents() || !Game_Map::GetInterpreter().IsRunning()) && !IsPaused())) { |
| 141 | SetStopCount(GetStopCount() + 1); |
| 142 | } |
| 143 | } else if (IsJumping()) { |
| 144 | static const int jump_speed[] = {8, 12, 16, 24, 32, 64}; |
| 145 | auto amount = jump_speed[GetMoveSpeed() -1 ]; |
| 146 | this->UpdateMovement(amount); |
| 147 | } else { |
| 148 | int amount = 1 << (1 + GetMoveSpeed()); |
| 149 | this->UpdateMovement(amount); |
| 150 | } |
| 151 | |
| 152 | this->UpdateAnimation(); |
| 153 | } |
| 154 | |
| 155 | void Game_Character::UpdateMovement(int amount) { |
| 156 | SetRemainingStep(GetRemainingStep() - amount); |
nothing calls this directly
no test coverage detected