1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Fix alignment and dead code

This commit is contained in:
Gymnasiast
2017-01-01 19:58:05 +01:00
parent 95b954c5cb
commit 69ea33452b
3 changed files with 17 additions and 23 deletions

View File

@@ -3645,7 +3645,8 @@ enum {
STR_TILE_INSPECTOR_PASTE_TIP = 5994,
STR_BOOSTER = 5995,
STR_RIDE_CONSTRUCTION_BOOSTER_SPEED = 5996,
STR_RIDE_CONSTRUCTION_BOOSTER_SPEED = 5996,
// Have to include resource strings (from scenarios and objects) for the time being now that language is partially working
STR_COUNT = 32768
};

View File

@@ -7488,12 +7488,6 @@ loc_6DAEB9:
if (regs.eax > _vehicleVelocityF64E08) {
vehicle->acceleration = RideProperties[ride->type].acceleration << 16; //_vehicleVelocityF64E08 * 1.2;
}
// else if (!(gCurrentTicks & 0x0F)) {
// if (_vehicleF64E2C == 0) {
// _vehicleF64E2C++;
// audio_play_sound_at_location(SOUND_51, vehicle->x, vehicle->y, vehicle->z);
// }
// }
}
}
@@ -7841,11 +7835,11 @@ loc_6DBA33:;
}
}
// Bit of a hack. We need a flag or something similar to distinguish between spinning control track and boosters.
// Boosters share their ID with the Spinning Control track.
if (trackType == TRACK_ELEM_BOOSTER && ride->type != RIDE_TYPE_WILD_MOUSE) {
regs.eax = (vehicle->brake_speed << 16);
if (regs.eax < _vehicleVelocityF64E08) {
regs.eax = RideProperties[ride->type].acceleration << 16; //_vehicleVelocityF64E08 * 1.2;
regs.eax = RideProperties[ride->type].acceleration << 16;
vehicle->acceleration = regs.eax;
}
}

View File

@@ -2141,8 +2141,8 @@ static void window_ride_construction_invalidate(rct_window *w)
stringId = RideConfigurationStringIds[_currentTrackCurve & 0xFF];
if (stringId == STR_RAPIDS && ride->type == RIDE_TYPE_CAR_RIDE)
stringId = STR_LOG_BUMPS;
if (stringId == STR_SPINNING_CONTROL_TOGGLE_TRACK && ride->type != RIDE_TYPE_WILD_MOUSE)
stringId = STR_BOOSTER;
if (stringId == STR_SPINNING_CONTROL_TOGGLE_TRACK && ride->type != RIDE_TYPE_WILD_MOUSE)
stringId = STR_BOOSTER;
}
set_format_arg(0, uint16, stringId);
@@ -3230,8 +3230,8 @@ static void window_ride_construction_update_widgets(rct_window *w)
window_ride_construction_widgets[WIDX_U_TRACK].type = WWT_EMPTY;
window_ride_construction_widgets[WIDX_O_TRACK].type = WWT_EMPTY;
bool brakesSelected = _selectedTrackType == TRACK_ELEM_BRAKES || _currentTrackCurve == (0x100 | TRACK_ELEM_BRAKES);
bool boosterSelected = ride->type != RIDE_TYPE_WILD_MOUSE && (_selectedTrackType == TRACK_ELEM_BOOSTER || _currentTrackCurve == (0x100 | TRACK_ELEM_BOOSTER));
bool brakesSelected = _selectedTrackType == TRACK_ELEM_BRAKES || _currentTrackCurve == (0x100 | TRACK_ELEM_BRAKES);
bool boosterSelected = ride->type != RIDE_TYPE_WILD_MOUSE && (_selectedTrackType == TRACK_ELEM_BOOSTER || _currentTrackCurve == (0x100 | TRACK_ELEM_BOOSTER));
if (!brakesSelected && !boosterSelected) {
if (is_track_enabled(TRACK_FLAT_ROLL_BANKING)) {
@@ -3261,10 +3261,10 @@ static void window_ride_construction_update_widgets(rct_window *w)
}
}
} else {
if (brakesSelected)
window_ride_construction_widgets[WIDX_BANKING_GROUPBOX].text = STR_RIDE_CONSTRUCTION_BRAKE_SPEED;
else
window_ride_construction_widgets[WIDX_BANKING_GROUPBOX].text = STR_RIDE_CONSTRUCTION_BOOSTER_SPEED;
if (brakesSelected)
window_ride_construction_widgets[WIDX_BANKING_GROUPBOX].text = STR_RIDE_CONSTRUCTION_BRAKE_SPEED;
else
window_ride_construction_widgets[WIDX_BANKING_GROUPBOX].text = STR_RIDE_CONSTRUCTION_BOOSTER_SPEED;
_currentlyShowingBrakeSpeed = 1;
window_ride_construction_widgets[WIDX_BANK_LEFT].text = STR_RIDE_CONSTRUCTION_BRAKE_SPEED_VELOCITY;
@@ -3505,12 +3505,11 @@ static void window_ride_construction_show_special_track_dropdown(rct_window *w,
trackPieceStringId = STR_LOG_BUMPS;
}
if (trackPieceStringId == STR_SPINNING_CONTROL_TOGGLE_TRACK) {
rct_ride *ride = get_ride(_currentRideIndex);
if (ride->type != RIDE_TYPE_WILD_MOUSE)
trackPieceStringId = STR_BOOSTER;
}
if (trackPieceStringId == STR_SPINNING_CONTROL_TOGGLE_TRACK) {
rct_ride *ride = get_ride(_currentRideIndex);
if (ride->type != RIDE_TYPE_WILD_MOUSE)
trackPieceStringId = STR_BOOSTER;
}
gDropdownItemsFormat[i] = trackPieceStringId;
if ((trackPiece | 0x100) == _currentTrackCurve) {
defaultIndex = i;