mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-23 10:51:58 -05:00
Fix errors
This commit is contained in:
parent
3ed7694495
commit
c9afcaa5b3
8 changed files with 46 additions and 43 deletions
|
@ -759,7 +759,7 @@ private:
|
|||
{
|
||||
dst->stations[i].Start = { src->station_starts[i].x, src->station_starts[i].y };
|
||||
}
|
||||
dst->stations[i].SetBaseZ(src->station_height[i] * 4);
|
||||
dst->stations[i].SetBaseZ(src->station_height[i] * RCT1_COORDS_Z_STEP);
|
||||
dst->stations[i].Length = src->station_length[i];
|
||||
dst->stations[i].Depart = src->station_light[i];
|
||||
|
||||
|
@ -1994,8 +1994,8 @@ private:
|
|||
dst->SetGhost(src->IsGhost());
|
||||
dst->SetLastForTile(src->IsLastForTile());
|
||||
|
||||
dst->SetBaseZ(src->base_height * 4);
|
||||
dst->SetClearanceZ(src->clearance_height * 4);
|
||||
dst->SetBaseZ(src->base_height * RCT1_COORDS_Z_STEP);
|
||||
dst->SetClearanceZ(src->clearance_height * RCT1_COORDS_Z_STEP);
|
||||
|
||||
switch (tileElementType)
|
||||
{
|
||||
|
|
|
@ -42,31 +42,31 @@ void RCT12TileElementBase::SetOccupiedQuadrants(uint8_t quadrants)
|
|||
|
||||
bool RCT12TileElementBase::IsLastForTile() const
|
||||
{
|
||||
return (this->flags & TILE_ELEMENT_FLAG_LAST_TILE) != 0;
|
||||
return (this->flags & RCT12_TILE_ELEMENT_FLAG_LAST_TILE) != 0;
|
||||
}
|
||||
|
||||
bool RCT12TileElementBase::IsGhost() const
|
||||
{
|
||||
return (this->flags & TILE_ELEMENT_FLAG_GHOST) != 0;
|
||||
return (this->flags & RCT12_TILE_ELEMENT_FLAG_GHOST) != 0;
|
||||
}
|
||||
|
||||
void RCT12TileElementBase::SetLastForTile(bool on)
|
||||
{
|
||||
if (on)
|
||||
flags |= TILE_ELEMENT_FLAG_LAST_TILE;
|
||||
flags |= RCT12_TILE_ELEMENT_FLAG_LAST_TILE;
|
||||
else
|
||||
flags &= ~TILE_ELEMENT_FLAG_LAST_TILE;
|
||||
flags &= ~RCT12_TILE_ELEMENT_FLAG_LAST_TILE;
|
||||
}
|
||||
|
||||
void RCT12TileElementBase::SetGhost(bool isGhost)
|
||||
{
|
||||
if (isGhost)
|
||||
{
|
||||
this->flags |= TILE_ELEMENT_FLAG_GHOST;
|
||||
this->flags |= RCT12_TILE_ELEMENT_FLAG_GHOST;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->flags &= ~TILE_ELEMENT_FLAG_GHOST;
|
||||
this->flags &= ~RCT12_TILE_ELEMENT_FLAG_GHOST;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -745,18 +745,18 @@ void RCT12PathElement::SetAdditionIsGhost(bool isGhost)
|
|||
|
||||
bool RCT12PathElement::IsBroken() const
|
||||
{
|
||||
return (flags & RCT12_TILE_ELEMENT_FLAG_BLOCKED_BY_VEHICLE) != 0;
|
||||
return (flags & RCT12_TILE_ELEMENT_FLAG_BROKEN) != 0;
|
||||
}
|
||||
|
||||
void RCT12PathElement::SetIsBroken(bool isBroken)
|
||||
{
|
||||
if (isBroken)
|
||||
{
|
||||
flags |= RCT12_TILE_ELEMENT_FLAG_BLOCKED_BY_VEHICLE;
|
||||
flags |= RCT12_TILE_ELEMENT_FLAG_BROKEN;
|
||||
}
|
||||
else
|
||||
{
|
||||
flags &= ~RCT12_TILE_ELEMENT_FLAG_BLOCKED_BY_VEHICLE;
|
||||
flags &= ~RCT12_TILE_ELEMENT_FLAG_BROKEN;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1377,35 +1377,35 @@ void TrackElement::SetInverted(bool inverted)
|
|||
|
||||
bool TrackElement::BlockBrakeClosed() const
|
||||
{
|
||||
return (Flags2 & TRACK_ELEMENT_FLAG2_BLOCK_BRAKE_CLOSED) != 0;
|
||||
return (Flags2 & TRACK_ELEMENT_FLAGS2_BLOCK_BRAKE_CLOSED) != 0;
|
||||
}
|
||||
|
||||
void TrackElement::SetBlockBrakeClosed(bool isClosed)
|
||||
{
|
||||
if (isClosed)
|
||||
{
|
||||
Flags2 |= TRACK_ELEMENT_FLAG2_BLOCK_BRAKE_CLOSED;
|
||||
Flags2 |= TRACK_ELEMENT_FLAGS2_BLOCK_BRAKE_CLOSED;
|
||||
}
|
||||
else
|
||||
{
|
||||
Flags2 &= ~TRACK_ELEMENT_FLAG2_BLOCK_BRAKE_CLOSED;
|
||||
Flags2 &= ~TRACK_ELEMENT_FLAGS2_BLOCK_BRAKE_CLOSED;
|
||||
}
|
||||
}
|
||||
|
||||
bool TrackElement::IsIndestructible() const
|
||||
{
|
||||
return (Flags2 & TRACK_ELEMENT_FLAG2_INDESTRUCTIBLE_TRACK_PIECE) != 0;
|
||||
return (Flags2 & TRACK_ELEMENT_FLAGS2_INDESTRUCTIBLE_TRACK_PIECE) != 0;
|
||||
}
|
||||
|
||||
void TrackElement::SetIsIndestructible(bool isIndestructible)
|
||||
{
|
||||
if (isIndestructible)
|
||||
{
|
||||
Flags2 |= TRACK_ELEMENT_FLAG2_INDESTRUCTIBLE_TRACK_PIECE;
|
||||
Flags2 |= TRACK_ELEMENT_FLAGS2_INDESTRUCTIBLE_TRACK_PIECE;
|
||||
}
|
||||
else
|
||||
{
|
||||
Flags2 &= ~TRACK_ELEMENT_FLAG2_INDESTRUCTIBLE_TRACK_PIECE;
|
||||
Flags2 &= ~TRACK_ELEMENT_FLAGS2_INDESTRUCTIBLE_TRACK_PIECE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -66,8 +66,8 @@ enum
|
|||
TRACK_ELEMENT_FLAGS2_CABLE_LIFT = 1 << 2,
|
||||
TRACK_ELEMENT_FLAGS2_HIGHLIGHT = 1 << 3,
|
||||
TRACK_ELEMENT_FLAGS2_HAS_GREEN_LIGHT = 1 << 4,
|
||||
TRACK_ELEMENT_FLAG2_BLOCK_BRAKE_CLOSED = 1 << 5,
|
||||
TRACK_ELEMENT_FLAG2_INDESTRUCTIBLE_TRACK_PIECE = 1 << 6,
|
||||
TRACK_ELEMENT_FLAGS2_BLOCK_BRAKE_CLOSED = 1 << 5,
|
||||
TRACK_ELEMENT_FLAGS2_INDESTRUCTIBLE_TRACK_PIECE = 1 << 6,
|
||||
};
|
||||
|
||||
enum
|
||||
|
|
|
@ -1563,7 +1563,7 @@ void PathElement::SetAdditionIsGhost(bool isGhost)
|
|||
|
||||
PathSurfaceIndex PathElement::GetSurfaceEntryIndex() const
|
||||
{
|
||||
return (SurfaceIndex & RCT12_FOOTPATH_PROPERTIES_TYPE_MASK) >> 4;
|
||||
return SurfaceIndex;
|
||||
}
|
||||
|
||||
PathRailingsIndex PathElement::GetRailingEntryIndex() const
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
rct_scenery_entry* get_large_scenery_entry(int32_t entryIndex);
|
||||
|
||||
enum
|
||||
enum
|
||||
{
|
||||
LARGE_SCENERY_ELEMENT_FLAGS2_ACCOUNTED = 1 << 0,
|
||||
};
|
||||
|
|
|
@ -190,12 +190,15 @@ assert_struct_size(SurfaceElement, 16);
|
|||
struct PathElement : TileElementBase
|
||||
{
|
||||
private:
|
||||
PathSurfaceIndex SurfaceIndex; // 4
|
||||
PathSurfaceIndex SurfaceIndex; // 4
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-private-field"
|
||||
PathRailingsIndex RailingsIndex; // 6
|
||||
uint8_t Additions; // 7 (0 means no addition)
|
||||
uint8_t Edges; // 8
|
||||
uint8_t Flags2; // 9
|
||||
uint8_t SlopeDirection; // 10
|
||||
#pragma clang diagnostic pop
|
||||
uint8_t Additions; // 7 (0 means no addition)
|
||||
uint8_t Edges; // 8
|
||||
uint8_t Flags2; // 9
|
||||
uint8_t SlopeDirection; // 10
|
||||
union
|
||||
{
|
||||
uint8_t AdditionStatus; // 11, only used for litter bins
|
||||
|
@ -371,9 +374,9 @@ struct SmallSceneryElement : TileElementBase
|
|||
{
|
||||
private:
|
||||
uint16_t entryIndex; // 4
|
||||
uint8_t age; // 5
|
||||
uint8_t colour_1; // 6
|
||||
uint8_t colour_2; // 7
|
||||
uint8_t age; // 5
|
||||
uint8_t colour_1; // 6
|
||||
uint8_t colour_2; // 7
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-private-field"
|
||||
uint8_t pad_09[7];
|
||||
|
@ -483,11 +486,11 @@ assert_struct_size(WallElement, 16);
|
|||
struct EntranceElement : TileElementBase
|
||||
{
|
||||
private:
|
||||
uint8_t entranceType; // 4
|
||||
uint8_t SequenceIndex; // 5. Only uses the lower nibble.
|
||||
uint8_t StationIndex; // 6
|
||||
uint8_t entranceType; // 4
|
||||
uint8_t SequenceIndex; // 5. Only uses the lower nibble.
|
||||
uint8_t StationIndex; // 6
|
||||
PathSurfaceIndex PathType; // 7
|
||||
ride_id_t rideIndex; // 8
|
||||
ride_id_t rideIndex; // 8
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-private-field"
|
||||
uint8_t pad_0B[5];
|
||||
|
|
|
@ -157,15 +157,15 @@ rct_sprite* get_sprite(size_t sprite_idx)
|
|||
|
||||
bool TileElementBase::IsLastForTile() const
|
||||
{
|
||||
return (this->flags & TILE_ELEMENT_FLAG_LAST_TILE) != 0;
|
||||
return (this->Flags & TILE_ELEMENT_FLAG_LAST_TILE) != 0;
|
||||
}
|
||||
|
||||
void TileElementBase::SetLastForTile(bool on)
|
||||
{
|
||||
if (on)
|
||||
flags |= TILE_ELEMENT_FLAG_LAST_TILE;
|
||||
Flags |= TILE_ELEMENT_FLAG_LAST_TILE;
|
||||
else
|
||||
flags &= ~TILE_ELEMENT_FLAG_LAST_TILE;
|
||||
Flags &= ~TILE_ELEMENT_FLAG_LAST_TILE;
|
||||
}
|
||||
|
||||
uint8_t TileElementBase::GetType() const
|
||||
|
@ -175,12 +175,12 @@ uint8_t TileElementBase::GetType() const
|
|||
|
||||
bool TileElementBase::IsGhost() const
|
||||
{
|
||||
return (this->flags & TILE_ELEMENT_FLAG_GHOST) != 0;
|
||||
return (this->Flags & TILE_ELEMENT_FLAG_GHOST) != 0;
|
||||
}
|
||||
|
||||
bool TrackElement::BlockBrakeClosed() const
|
||||
{
|
||||
return (flags & TILE_ELEMENT_FLAG_BLOCK_BRAKE_CLOSED) != 0;
|
||||
return (Flags2 & TRACK_ELEMENT_FLAGS2_BLOCK_BRAKE_CLOSED) != 0;
|
||||
}
|
||||
|
||||
TileElement* map_get_first_element_at(const CoordsXY& elementPos)
|
||||
|
@ -439,7 +439,7 @@ bool TrackElement::IsHighlighted() const
|
|||
|
||||
uint8_t PathElement::GetEdges() const
|
||||
{
|
||||
return edges & 0xF;
|
||||
return Edges & 0xF;
|
||||
}
|
||||
|
||||
StationObject* ride_get_station_object(const Ride* ride)
|
||||
|
@ -455,13 +455,13 @@ bool Vehicle::IsGhost() const
|
|||
|
||||
uint8_t TileElementBase::GetOccupiedQuadrants() const
|
||||
{
|
||||
return flags & TILE_ELEMENT_OCCUPIED_QUADRANTS_MASK;
|
||||
return Flags & TILE_ELEMENT_OCCUPIED_QUADRANTS_MASK;
|
||||
}
|
||||
|
||||
void TileElementBase::SetOccupiedQuadrants(uint8_t quadrants)
|
||||
{
|
||||
flags &= ~TILE_ELEMENT_OCCUPIED_QUADRANTS_MASK;
|
||||
flags |= (quadrants & TILE_ELEMENT_OCCUPIED_QUADRANTS_MASK);
|
||||
Flags &= ~TILE_ELEMENT_OCCUPIED_QUADRANTS_MASK;
|
||||
Flags |= (quadrants & TILE_ELEMENT_OCCUPIED_QUADRANTS_MASK);
|
||||
}
|
||||
|
||||
int32_t TileElementBase::GetBaseZ() const
|
||||
|
|
Loading…
Add table
Reference in a new issue