2022-06-18 17:21:33 +02:00
|
|
|
/*****************************************************************************
|
2024-01-01 12:52:28 +01:00
|
|
|
* Copyright (c) 2014-2024 OpenRCT2 developers
|
2022-06-18 17:21:33 +02:00
|
|
|
*
|
|
|
|
* 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 "Wait.h"
|
|
|
|
|
2024-04-23 21:31:05 +02:00
|
|
|
#include "../../../Context.h"
|
2022-06-19 00:18:18 +02:00
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
2022-06-18 17:21:33 +02:00
|
|
|
namespace OpenRCT2::Title
|
|
|
|
{
|
|
|
|
int16_t WaitCommand::operator()(int16_t timer)
|
|
|
|
{
|
2022-06-19 00:18:18 +02:00
|
|
|
// Return number of game ticks this wait command lasts
|
2024-02-23 23:30:35 +01:00
|
|
|
return std::max<int16_t>(1, kGameUpdateFPS * Milliseconds / 1000);
|
2022-06-18 17:21:33 +02:00
|
|
|
}
|
|
|
|
} // namespace OpenRCT2::Title
|