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

Create TrackDesignMazElement struct

Closes #10053
This commit is contained in:
Tulio Leao
2019-10-07 21:39:18 -03:00
parent 6be7c42a3d
commit 7193ba1bb7
2 changed files with 33 additions and 4 deletions

View File

@@ -379,7 +379,7 @@ rct_string_id TrackDesign::CreateTrackDesignMaze(const Ride& ride)
if (tileElement->AsTrack()->GetRideIndex() != ride.id)
continue;
rct_td46_maze_element maze{};
TrackDesignMazeElement maze{};
maze.maze_entry = tileElement->AsTrack()->GetMazeEntry();
maze.x = (x - startLoc.x) / 32;
@@ -418,7 +418,7 @@ rct_string_id TrackDesign::CreateTrackDesignMaze(const Ride& ride)
// Add something that stops this from walking off the end
uint8_t entranceDirection = tileElement->GetDirection();
rct_td46_maze_element mazeEntrance{};
TrackDesignMazeElement mazeEntrance{};
mazeEntrance.direction = entranceDirection;
mazeEntrance.type = 8;
mazeEntrance.x = (int8_t)((entranceLoc.x - startLoc.x) / 32);
@@ -445,7 +445,7 @@ rct_string_id TrackDesign::CreateTrackDesignMaze(const Ride& ride)
// Add something that stops this from walking off the end
uint8_t exit_direction = tileElement->GetDirection();
rct_td46_maze_element mazeExit{};
TrackDesignMazeElement mazeExit{};
mazeExit.direction = exit_direction;
mazeExit.type = 0x80;
mazeExit.x = (int8_t)((exitLoc.x - startLoc.x) / 32);