mirror of https://github.com/OpenRCT2/OpenRCT2.git
Compare commits
3 Commits
0db5a9deab
...
36dd25d4c5
Author | SHA1 | Date |
---|---|---|
Harry Hopkinson | 36dd25d4c5 | |
Harry Hopkinson | 9266a6f0d3 | |
Harry Hopkinson | 51d1a5985f |
|
@ -1,6 +1,7 @@
|
|||
0.4.11 (in development)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: [#11512] Coloured usernames by group on multiplayer servers.
|
||||
- Feature: [#21656] Save the currently following entity into the save file.
|
||||
- Feature: [#21734] Park admittance price can now be set via text input.
|
||||
- Improved: [#21769] Expose “animation is backwards” wall property in Tile Inspector.
|
||||
- Improved: [#21855] Add a separator between “Load Game” and “Save Game”, to avoid accidental overwriting.
|
||||
|
|
|
@ -533,6 +533,12 @@ void GameLoadInit()
|
|||
auto& gameState = GetGameState();
|
||||
windowManager->SetMainView(gameState.SavedView, gameState.SavedViewZoom, gameState.SavedViewRotation);
|
||||
|
||||
if (gameState.CurrentlyFollowingEntity != EntityId::GetNull())
|
||||
{
|
||||
auto* mainWindow = WindowGetMain();
|
||||
WindowFollowSprite(*mainWindow, gameState.CurrentlyFollowingEntity);
|
||||
}
|
||||
|
||||
if (NetworkGetMode() != NETWORK_MODE_CLIENT)
|
||||
{
|
||||
GameActions::ClearQueue();
|
||||
|
|
|
@ -126,6 +126,7 @@ namespace OpenRCT2
|
|||
ScreenCoordsXY SavedView;
|
||||
uint8_t SavedViewRotation;
|
||||
ZoomLevel SavedViewZoom;
|
||||
EntityId CurrentlyFollowingEntity{ EntityId::GetNull() };
|
||||
|
||||
ObjectEntryIndex LastEntranceStyle;
|
||||
|
||||
|
|
|
@ -1753,6 +1753,7 @@ void WindowFollowSprite(WindowBase& w, EntityId spriteIndex)
|
|||
if (spriteIndex.ToUnderlying() < MAX_ENTITIES || spriteIndex.IsNull())
|
||||
{
|
||||
w.viewport_smart_follow_sprite = spriteIndex;
|
||||
GetGameState().CurrentlyFollowingEntity = spriteIndex;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1760,6 +1761,7 @@ void WindowUnfollowSprite(WindowBase& w)
|
|||
{
|
||||
w.viewport_smart_follow_sprite = EntityId::GetNull();
|
||||
w.viewport_target_sprite = EntityId::GetNull();
|
||||
GetGameState().CurrentlyFollowingEntity = EntityId::GetNull();
|
||||
}
|
||||
|
||||
Viewport* WindowGetViewport(WindowBase* w)
|
||||
|
|
|
@ -599,7 +599,7 @@ namespace OpenRCT2
|
|||
|
||||
void ReadWriteInterfaceChunk(GameState_t& gameState, OrcaStream& os)
|
||||
{
|
||||
os.ReadWriteChunk(ParkFileChunkType::INTERFACE, [&gameState](OrcaStream::ChunkStream& cs) {
|
||||
os.ReadWriteChunk(ParkFileChunkType::INTERFACE, [&gameState, &os](OrcaStream::ChunkStream& cs) {
|
||||
cs.ReadWrite(gameState.SavedView.x);
|
||||
cs.ReadWrite(gameState.SavedView.y);
|
||||
if (cs.GetMode() == OrcaStream::Mode::READING)
|
||||
|
@ -612,6 +612,12 @@ namespace OpenRCT2
|
|||
cs.Write(static_cast<int8_t>(gameState.SavedViewZoom));
|
||||
}
|
||||
cs.ReadWrite(gameState.SavedViewRotation);
|
||||
|
||||
if (os.GetHeader().TargetVersion >= PARK_FILE_CURRENT_VERSION)
|
||||
cs.ReadWrite(gameState.CurrentlyFollowingEntity);
|
||||
else
|
||||
gameState.CurrentlyFollowingEntity = EntityId::GetNull();
|
||||
|
||||
cs.ReadWrite(gameState.LastEntranceStyle);
|
||||
cs.ReadWrite(gameState.EditorStep);
|
||||
});
|
||||
|
|
|
@ -11,10 +11,10 @@ namespace OpenRCT2
|
|||
struct GameState_t;
|
||||
|
||||
// Current version that is saved.
|
||||
constexpr uint32_t PARK_FILE_CURRENT_VERSION = 33;
|
||||
constexpr uint32_t PARK_FILE_CURRENT_VERSION = 34;
|
||||
|
||||
// The minimum version that is forwards compatible with the current version.
|
||||
constexpr uint32_t PARK_FILE_MIN_VERSION = 33;
|
||||
constexpr uint32_t PARK_FILE_MIN_VERSION = 34;
|
||||
|
||||
// The minimum version that is backwards compatible with the current version.
|
||||
// If this is increased beyond 0, uncomment the checks in ParkFile.cpp and Context.cpp!
|
||||
|
|
|
@ -1625,19 +1625,12 @@ constexpr CoordsXY defaultRightQuarterTurn3TilesBoundLengths[4][3] = {
|
|||
},
|
||||
};
|
||||
|
||||
static constexpr int8_t right_quarter_turn_3_tiles_sprite_map[] = {
|
||||
0,
|
||||
-1,
|
||||
1,
|
||||
2,
|
||||
};
|
||||
|
||||
void TrackPaintUtilRightQuarterTurn3TilesPaint(
|
||||
PaintSession& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence,
|
||||
const ImageId colourFlags, const uint32_t sprites[4][3], const CoordsXY offsets[4][3], const CoordsXY boundsLengths[4][3],
|
||||
const CoordsXYZ boundsOffsets[4][3])
|
||||
{
|
||||
int32_t index = right_quarter_turn_3_tiles_sprite_map[trackSequence];
|
||||
int32_t index = kRightQuarterTurn3TilesSpriteMap[trackSequence];
|
||||
if (index < 0)
|
||||
{
|
||||
return;
|
||||
|
@ -1665,7 +1658,7 @@ void TrackPaintUtilRightQuarterTurn3TilesPaint2WithHeightOffset(
|
|||
PaintSession& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence,
|
||||
const ImageId colourFlags, const uint32_t sprites[4][3], int32_t heightOffset)
|
||||
{
|
||||
int8_t sprite = right_quarter_turn_3_tiles_sprite_map[trackSequence];
|
||||
int8_t sprite = kRightQuarterTurn3TilesSpriteMap[trackSequence];
|
||||
if (sprite < 0)
|
||||
{
|
||||
return;
|
||||
|
@ -1753,7 +1746,7 @@ void TrackPaintUtilRightQuarterTurn3TilesPaint3(
|
|||
PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags,
|
||||
const SpriteBb sprites[4][3])
|
||||
{
|
||||
int8_t sprite = right_quarter_turn_3_tiles_sprite_map[trackSequence];
|
||||
int8_t sprite = kRightQuarterTurn3TilesSpriteMap[trackSequence];
|
||||
if (sprite < 0)
|
||||
{
|
||||
return;
|
||||
|
@ -1770,7 +1763,7 @@ void TrackPaintUtilRightQuarterTurn3TilesPaint4(
|
|||
PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags,
|
||||
const SpriteBb sprites[4][3])
|
||||
{
|
||||
int8_t sprite = right_quarter_turn_3_tiles_sprite_map[trackSequence];
|
||||
int8_t sprite = kRightQuarterTurn3TilesSpriteMap[trackSequence];
|
||||
if (sprite < 0)
|
||||
{
|
||||
return;
|
||||
|
|
|
@ -258,6 +258,8 @@ extern const CoordsXY defaultRightQuarterTurn3TilesOffsets[4][3];
|
|||
extern const CoordsXYZ defaultRightQuarterTurn3TilesBoundOffsets[4][3];
|
||||
extern const CoordsXY defaultRightQuarterTurn3TilesBoundLengths[4][3];
|
||||
|
||||
constexpr int8_t kRightQuarterTurn3TilesSpriteMap[] = { 0, -1, 1, 2 };
|
||||
|
||||
extern const CoordsXY defaultRightHelixUpSmallQuarterBoundLengths[4][3][2];
|
||||
extern const CoordsXYZ defaultRightHelixUpSmallQuarterBoundOffsets[4][3][2];
|
||||
|
||||
|
|
|
@ -1392,9 +1392,7 @@ static void PaintMiniatureRailwayTrackRightQuarterTurn3Tiles(
|
|||
miniature_railway_right_quarter_turn_3_tile_track_floor, nullptr, defaultRightQuarterTurn3TilesBoundLengths,
|
||||
miniature_railway_right_quarter_turn_3_tile_bound_offsets);
|
||||
|
||||
static constexpr int8_t _right_quarter_turn_3_tiles_sprite_map[] = { 0, -1, 1, 2 };
|
||||
|
||||
int32_t index = _right_quarter_turn_3_tiles_sprite_map[trackSequence];
|
||||
int32_t index = kRightQuarterTurn3TilesSpriteMap[trackSequence];
|
||||
|
||||
auto imageId = session.TrackColours.WithIndex(
|
||||
miniature_railway_track_pieces_flat_quarter_turn_3_tiles[direction][index]);
|
||||
|
|
Loading…
Reference in New Issue