1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 08:14:38 +01:00
Files
OpenRCT2/src/openrct2/title/Command/SetSpeed.cpp
Hielke Morsink 1fc2312abd Move most command logic from sequence player
This commit also moves everything related to the OpenRCT2::Title namespace.

Can be compiled with ENABLE_SCRIPTING disabled.
2022-06-28 21:57:26 +02:00

25 lines
700 B
C++

/*****************************************************************************
* Copyright (c) 2014-2022 OpenRCT2 developers
*
* For a complete list of all authors, please refer to contributors.md
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
*
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#include "SetSpeed.h"
#include "../../Game.h"
#include <algorithm>
namespace OpenRCT2::Title
{
int16_t SetSpeedCommand::operator()(int16_t timer)
{
gGameSpeed = std::clamp<uint8_t>(Speed, 1, 4);
return 0;
}
} // namespace OpenRCT2::Title