1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Fix formating and other issues

Refactor as per comments.

Simplified some of the code as well

Use constants
This commit is contained in:
duncanspumpkin
2019-02-28 16:27:19 +00:00
parent c55ff1288d
commit e128a78b91
6 changed files with 19 additions and 71 deletions

View File

@@ -506,12 +506,12 @@ namespace OpenRCT2
}
case GAME_COMMAND_PLACE_RIDE_ENTRANCE_OR_EXIT:
{
CoordsXY loc = {command.eax & 0xFFFF, command.ecx & 0xFFFF};
CoordsXY loc = { (int32_t)(command.eax & 0xFFFF), (int32_t)(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 = std::make_unique<RideEntranceExitPlaceAction>(loc, direction, rideId, stationNum, isExit);
result.action->SetFlags(command.ebx & 0xFF);
break;
}