mirror of https://github.com/OpenRCT2/OpenRCT2.git
Add conversion from old command
This commit is contained in:
parent
f10391c98d
commit
c55ff1288d
|
@ -15,6 +15,7 @@
|
||||||
#include "ParkImporter.h"
|
#include "ParkImporter.h"
|
||||||
#include "PlatformEnvironment.h"
|
#include "PlatformEnvironment.h"
|
||||||
#include "actions/GameAction.h"
|
#include "actions/GameAction.h"
|
||||||
|
#include "actions/RideEntranceExitPlaceAction.hpp"
|
||||||
#include "actions/RideSetSetting.hpp"
|
#include "actions/RideSetSetting.hpp"
|
||||||
#include "actions/TrackPlaceAction.hpp"
|
#include "actions/TrackPlaceAction.hpp"
|
||||||
#include "config/Config.h"
|
#include "config/Config.h"
|
||||||
|
@ -503,6 +504,17 @@ namespace OpenRCT2
|
||||||
result.action->SetFlags(command.ebx & 0xFF);
|
result.action->SetFlags(command.ebx & 0xFF);
|
||||||
break;
|
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:
|
default:
|
||||||
throw std::runtime_error("Deprecated game command requires replay translation.");
|
throw std::runtime_error("Deprecated game command requires replay translation.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue