Remove old game command

This commit is contained in:
duncanspumpkin 2019-03-11 19:11:54 +00:00
parent 7fbf11ac79
commit 539c12b41a
4 changed files with 2 additions and 53 deletions

View File

@ -1289,7 +1289,7 @@ GAME_COMMAND_POINTER* new_game_command_table[GAME_COMMAND_COUNT] = {
game_command_smooth_land,
game_command_raise_water,
game_command_lower_water,
game_command_set_brakes_speed,
nullptr,
game_command_hire_new_staff_member,
game_command_set_staff_patrol,
game_command_fire_staff_member,

View File

@ -47,7 +47,7 @@ enum GAME_COMMAND
GAME_COMMAND_EDIT_LAND_SMOOTH,
GAME_COMMAND_RAISE_WATER,
GAME_COMMAND_LOWER_WATER,
GAME_COMMAND_SET_BRAKES_SPEED,
GAME_COMMAND_SET_BRAKES_SPEED, // GA
GAME_COMMAND_HIRE_NEW_STAFF_MEMBER,
GAME_COMMAND_SET_STAFF_PATROL,
GAME_COMMAND_FIRE_STAFF_MEMBER,

View File

@ -1264,55 +1264,6 @@ void game_command_remove_track(
*edx & 0xFF, (*edx >> 8) & 0xFF, *eax & 0xFFFF, *ecx & 0xFFFF, *edi & 0xFFFF, (*ebx >> 8) & 0xFF, *ebx & 0xFF);
}
/**
*
* rct2: 0x006C5AE9
*/
void game_command_set_brakes_speed(
int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, [[maybe_unused]] int32_t* esi, int32_t* edi,
[[maybe_unused]] int32_t* ebp)
{
int32_t x = (*eax & 0xFFFF);
int32_t y = (*ecx & 0xFFFF);
int32_t z = (*edi & 0xFFFF);
int32_t trackType = (*edx & 0xFF);
int32_t brakesSpeed = ((*ebx >> 8) & 0xFF);
gCommandExpenditureType = RCT_EXPENDITURE_TYPE_RIDE_CONSTRUCTION;
gCommandPosition.x = x + 16;
gCommandPosition.y = y + 16;
gCommandPosition.z = z;
if (*ebx & GAME_COMMAND_FLAG_APPLY)
{
*ebx = 0;
return;
}
TileElement* tileElement = map_get_first_element_at(x >> 5, y >> 5);
if (tileElement == nullptr)
{
log_warning("Invalid game command for setting brakes speed. x = %d, y = %d", x, y);
*ebx = MONEY32_UNDEFINED;
return;
}
do
{
if (tileElement->base_height * 8 != z)
continue;
if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK)
continue;
if (tileElement->AsTrack()->GetTrackType() != trackType)
continue;
tileElement->AsTrack()->SetBrakeBoosterSpeed(brakesSpeed);
break;
} while (!(tileElement++)->IsLastForTile());
*ebx = 0;
}
void track_circuit_iterator_begin(track_circuit_iterator* it, CoordsXYE first)
{
it->last = first;

View File

@ -557,7 +557,5 @@ money32 maze_set_track(
uint16_t x, uint16_t y, uint16_t z, uint8_t flags, bool initialPlacement, uint8_t direction, ride_id_t rideIndex,
uint8_t mode);
void game_command_set_brakes_speed(
int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp);
bool track_element_is_booster(uint8_t rideType, uint8_t trackType);
bool track_element_has_speed_setting(uint8_t trackType);