1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 13:33:02 +01:00

Cleanup vehicle drawing code part 2 (#16960) (#16960)

* Rename assembly variable names

* Repurpose unused rct_ride_entry_vehicle field for NumRotationFrames
This commit is contained in:
spacek531
2022-04-10 13:26:00 -07:00
committed by GitHub
parent b35b1e2ec9
commit 5ecb7a6c6a
4 changed files with 324 additions and 306 deletions

View File

@@ -218,6 +218,7 @@ void RideObject::Load()
if (vehicleEntry->car_visual != VEHICLE_VISUAL_RIVER_RAPIDS)
{
const auto numRotationFrames = vehicleEntry->GetNumRotationFrames();
vehicleEntry->NumRotationFrames = numRotationFrames;
uint32_t b = vehicleEntry->base_num_frames * numRotationFrames;
image_index += b;

View File

@@ -93,7 +93,7 @@ enum : uint32_t
struct rct_ride_entry_vehicle
{
uint16_t rotation_frame_mask;
uint8_t num_vertical_frames; // Appears to be unused, except as a temporary variable in RCT2 (not needed for OpenRCT2)
uint8_t NumRotationFrames;
uint8_t num_horizontal_frames; // Appears to be unused, except as a temporary variable in RCT2 (not needed for OpenRCT2)
uint32_t spacing;
uint16_t car_mass;

File diff suppressed because it is too large Load Diff

View File

@@ -215,11 +215,6 @@ namespace OpenRCT2::Scripting
uint8_t numVerticalFrames_get() const
{
auto entry = GetEntry();
if (entry != nullptr)
{
return entry->num_vertical_frames;
}
return 0;
}