Add conversion from old command

This commit is contained in:
duncanspumpkin 2019-02-28 11:19:37 +00:00
parent f10391c98d
commit c55ff1288d
1 changed files with 12 additions and 0 deletions

View File

@ -15,6 +15,7 @@
#include "ParkImporter.h"
#include "PlatformEnvironment.h"
#include "actions/GameAction.h"
#include "actions/RideEntranceExitPlaceAction.hpp"
#include "actions/RideSetSetting.hpp"
#include "actions/TrackPlaceAction.hpp"
#include "config/Config.h"
@ -503,6 +504,17 @@ namespace OpenRCT2
result.action->SetFlags(command.ebx & 0xFF);
break;
}
case GAME_COMMAND_PLACE_RIDE_ENTRANCE_OR_EXIT:
{
CoordsXY loc = {command.eax & 0xFFFF, command.ecx & 0xFFFF};
Direction direction = (command.ebx >> 8) & 0xFF;
ride_id_t rideId = command.edx & 0xFF;
uint8_t stationNum = command.edi & 0xFF;
bool isExit = ((command.edx >> 8) & 0xFF) != 0;
result.action = std::make_unique<RideEntranceExitPlaceAction>(loc,direction,rideId,stationNum,isExit);
result.action->SetFlags(command.ebx & 0xFF);
break;
}
default:
throw std::runtime_error("Deprecated game command requires replay translation.");
}