1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

Provide conversion from gamecommand in replay manager

This commit is contained in:
duncanspumpkin
2019-02-22 11:24:13 +00:00
parent e1977d1a2f
commit 9d76c609f3

View File

@@ -16,6 +16,7 @@
#include "PlatformEnvironment.h" #include "PlatformEnvironment.h"
#include "actions/GameAction.h" #include "actions/GameAction.h"
#include "actions/TrackPlaceAction.hpp" #include "actions/TrackPlaceAction.hpp"
#include "actions/RideSetSetting.hpp"
#include "config/Config.h" #include "config/Config.h"
#include "core/DataSerialiser.h" #include "core/DataSerialiser.h"
#include "core/Path.hpp" #include "core/Path.hpp"
@@ -492,6 +493,15 @@ namespace OpenRCT2
result.action->SetFlags(command.ebx & 0xFF); result.action->SetFlags(command.ebx & 0xFF);
break; break;
} }
case GAME_COMMAND_SET_RIDE_SETTING:
{
ride_id_t rideId = command.edx & 0xFF;
RideSetSetting setting = static_cast<RideSetSetting>((command.edx >> 8) & 0xFF);
uint8_t value = (command.ebx >> 8) & 0xFF;
result.action = std::make_unique<RideSetSettingAction>(rideId, setting, value);
result.action->SetFlags(command.ebx & 0xFF);
}
default: default:
throw std::runtime_error("Deprecated game command requires replay translation."); throw std::runtime_error("Deprecated game command requires replay translation.");
} }